@ihabdevteam/core 0.345.0 → 0.346.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.
@@ -824,8 +824,8 @@
824
824
  * This source code is licensed under the ISC license.
825
825
  * See the LICENSE file in the root directory of this source tree.
826
826
  */const W1=[["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"}]],H1=ee("thumbs-up",W1),Ys={"alert-triangle":Ls,"align-start-vertical":Cd,anchor:Z0,armchair:J0,"arrow-down":bd,"arrow-left":vd,"arrow-right":_d,"arrow-right-left":Bd,"arrow-up-a-z":e1,"audio-lines":Ad,baby:Ed,ban:Sd,"bar-chart-2":n1,bell:jd,"book-marked":Ld,"book-open":Rd,"bow-arrow":Id,braces:Od,bug:Wd,calendar:Us,"calendar-check":Vd,"calendar-days":Ud,camera:Kd,car:o1,"chart-column":Zd,"chart-line":Jd,"chart-pie":ep,check:$s,"chevron-down":Gs,"chevron-left":Rs,"chevron-right":Ps,"chevron-up":Ks,circle:$1,"clipboard-list":op,coffee:i1,combine:ip,copy:up,"chevrons-left-right-ellipsis":dp,"credit-card":mp,database:Is,diff:Cp,download:Fs,ear:yp,edit:xp,"edit-2":wp,"edit-3":kp,ellipsis:Os,eraser:Ep,"external-link":Sp,eye:jp,"file-text":Lp,"flip-horizontal":Rp,"folder-open":Ip,"folder-plus":Op,gamepad:Wp,"gamepad-2":u1,clock:d1,target:m1,percent:f1,gavel:Vp,"git-merge":zs,globe:Gp,"grip-vertical":Yp,headphones:Xp,heart:Qp,home:tm,inbox:g1,info:am,"key-round":om,landmark:im,layers:um,"layout-dashboard":dm,leaf:mm,lightbulb:fm,link:gm,"link-2":ym,"link-2-off":xm,list:wm,"list-checks":km,"list-ordered":Nm,"list-tree":y1,loader:Dm,lock:Tm,"log-out":Mm,mail:$m,"map-pin":Pm,menu:F1,"message-circle":Fm,"message-circle-question-mark":zm,"message-square":Hm,"message-square-more":x1,"message-square-text":qm,minus:w1,"minus-circle":Gm,moon:z1,"more-horizontal":Os,package:Ym,palette:Xm,"party-popper":Qm,pause:th,pencil:ah,phone:oh,play:ih,"play-circle":uh,plus:dh,printer:mh,"refresh-cw":fh,repeat:gh,replace:yh,rocket:xh,"rotate-ccw":wh,"rotate-cw":kh,salad:Nh,"scan-search":Dh,search:Mh,"circle-alert":Ws,"alert-circle":Ws,"check-circle":Hs,scissors:$h,"search-x":Ph,send:Fh,settings:zh,"share-2":k1,"shield-check":Hh,"shopping-cart":qh,shuffle:Gh,"skip-back":Yh,"skip-forward":Xh,sparkles:N1,square:Qh,star:t0,store:a0,"sun-medium":o0,table:i0,"table-2":u0,tag:d0,terminal:m0,"text-cursor-input":f0,"text-initial":g0,"thumbs-up":H1,ticket:y0,trash:w0,triangle:P1,"trash-2":x0,"trending-up":k0,"triangle-alert":Ls,trophy:N0,type:D1,unlink:D0,upload:T0,user:Ir,"user-plus":L0,"user-round":R0,"user-round-check":I0,users:O0,"users-round":W0,volume:T1,"volume-2":Vs,wrench:q0,x:qs,zap:K0};function V1(e){return Ys[e]??null}const Zs=new Set;function q1(e){return Ln&&!(e in Ys)&&!Zs.has(e)&&(Zs.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 U1=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 G1(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?U1(a):null}const Xs=new Map;function K1(e){const t=typeof e=="string"?G1(e):null,a=t?V1(t)??Xs.get(t)??null:null,[r,i]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let s=!1;return q1(t).then(l=>{Xs.set(t,l),s||i(l)}),()=>{s=!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 Js(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 Y1(e){if(Array.isArray(e))return e}function Z1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,i,s,l,u=[],c=!0,d=!1;try{if(s=(a=a.call(e)).next,t!==0)for(;!(c=(r=s.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(m){d=!0,i=m}finally{try{if(!c&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}function X1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
827
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J1(e,t){return Y1(e)||Z1(e,t)||Q1(e,t)||X1()}function Q1(e,t){if(e){if(typeof e=="string")return Js(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)?Js(e,t):void 0}}const Qs=Object.entries,ei=Object.setPrototypeOf,ef=Object.isFrozen,tf=Object.getPrototypeOf,nf=Object.getOwnPropertyDescriptor;let Tt=Object.freeze,Mt=Object.seal,aa=Object.create,ti=typeof Reflect<"u"&&Reflect,Fr=ti.apply,Or=ti.construct;Tt||(Tt=function(t){return t}),Mt||(Mt=function(t){return t}),Fr||(Fr=function(t,a){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(a,i)}),Or||(Or=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return new t(...r)});const Vn=Et(Array.prototype.forEach),af=Et(Array.prototype.lastIndexOf),ni=Et(Array.prototype.pop),_a=Et(Array.prototype.push),rf=Et(Array.prototype.splice),ra=Array.isArray,wa=Et(String.prototype.toLowerCase),zr=Et(String.prototype.toString),ai=Et(String.prototype.match),Ba=Et(String.prototype.replace),ri=Et(String.prototype.indexOf),of=Et(String.prototype.trim),sf=Et(Number.prototype.toString),lf=Et(Boolean.prototype.toString),oi=typeof BigInt>"u"?null:Et(BigInt.prototype.toString),si=typeof Symbol>"u"?null:Et(Symbol.prototype.toString),Xt=Et(Object.prototype.hasOwnProperty),ka=Et(Object.prototype.toString),zt=Et(RegExp.prototype.test),qn=uf(TypeError);function Et(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return Fr(e,t,r)}}function uf(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Or(e,a)}}function pt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(ei&&ei(e,null),!ra(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=a(i);s!==i&&(ef(t)||(t[r]=s),i=s)}e[i]=!0}return e}function cf(e){for(let t=0;t<e.length;t++)Xt(e,t)||(e[t]=null);return e}function tn(e){const t=aa(null);for(const r of Qs(e)){var a=J1(r,2);const i=a[0],s=a[1];Xt(e,i)&&(ra(s)?t[i]=cf(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=tn(s):t[i]=s)}return t}function df(e){switch(typeof e){case"string":return e;case"number":return sf(e);case"boolean":return lf(e);case"bigint":return oi?oi(e):"0";case"symbol":return si?si(e):"Symbol()";case"undefined":return ka(e);case"function":case"object":{if(e===null)return ka(e);const t=e,a=un(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:ka(r)}return ka(e)}default:return ka(e)}}function un(e,t){for(;e!==null;){const r=nf(e,t);if(r){if(r.get)return Et(r.get);if(typeof r.value=="function")return Et(r.value)}e=tf(e)}function a(){return null}return a}function pf(e){try{return zt(e,""),!0}catch{return!1}}const ii=Tt(["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"]),Wr=Tt(["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"]),Hr=Tt(["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"]),mf=Tt(["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"]),Vr=Tt(["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"]),hf=Tt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),li=Tt(["#text"]),ui=Tt(["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"]),qr=Tt(["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"]),ci=Tt(["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"]),Ja=Tt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ff=Mt(/{{[\w\W]*|^[\w\W]*}}/g),Cf=Mt(/<%[\w\W]*|^[\w\W]*%>/g),gf=Mt(/\${[\w\W]*/g),bf=Mt(/^data-[\-\w.\u00B7-\uFFFF]+$/),yf=Mt(/^aria-[\-\w]+$/),di=Mt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vf=Mt(/^(?:\w+script|data):/i),xf=Mt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_f=Mt(/^html$/i),wf=Mt(/^[a-z][.\w]*(-[.\w]+)+$/i),pi=Mt(/<[/\w!]/g),mi=Mt(/<[/\w]/g),Bf=Mt(/<\/no(script|embed|frames)/i),kf=Mt(/\/>/i),nn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},hi=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Af=Tt(pt({},hi)),Nf=(function(){const e={};return Vn(hi,t=>{e[t]=Mt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Tt(e)})(),Ef=function(){return typeof window>"u"?null:window},Df=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";a&&a.hasAttribute(i)&&(r=a.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$n=function(t,a,r,i){return Xt(t,a)&&ra(t[a])?pt(i.base?tn(i.base):{},t[a],i.transform):r},Ur=function(t,a,r){const i=Xt(t,a)?t[a]:void 0;return i&&typeof i=="object"?tn(i):r()};function Ci(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ef();const t=he=>Ci(he);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==nn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,i=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,p=e.trustedTypes,f=u.prototype,b=un(f,"cloneNode"),v=un(f,"remove"),C=un(f,"nextSibling"),h=un(f,"childNodes"),_=un(f,"parentNode"),g=un(f,"shadowRoot"),A=un(f,"attributes"),y=l&&l.prototype?un(l.prototype,"nodeType"):null,k=l&&l.prototype?un(l.prototype,"nodeName"):null,x=l&&l.prototype?un(l.prototype,"ownerDocument"):null,w=function(T){return y?y(T):T.nodeType},B=function(T){return k?k(T):T.nodeName};if(typeof s=="function"){const he=a.createElement("template");he.content&&he.content.ownerDocument&&(a=he.content.ownerDocument)}let E,D="",N,O=!1,P=0;const G=function(){if(P>0)throw qn('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.')},L=function(T){G(),P++;try{return E.createHTML(T)}finally{P--}},M=function(T){G(),P++;try{return E.createScriptURL(T)}finally{P--}},$=function(){return O||(N=Df(p,i),O=!0),N},Z=a,q=Z.implementation,z=Z.createNodeIterator,V=Z.createDocumentFragment,R=Z.getElementsByTagName,H=r.importNode;let W=fi();t.isSupported=typeof Qs=="function"&&typeof _=="function"&&q&&q.createHTMLDocument!==void 0;const I=ff,S=Cf,j=gf,F=bf,U=yf,re=vf,te=xf,le=wf;let K=di,oe=null;const Ae=pt({},[...ii,...Wr,...Hr,...Vr,...li]);let Y=null;const Q=pt({},[...ui,...qr,...ci,...Ja]);let me=Object.seal(aa(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}})),De=null,be=null;const ne=Object.seal(aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ue=!0,fe=!0,ge=!1,Ce=!0,$e=!1,He=!0,je=!1,Ie=!1,qe=null,mt=null,ct=!1,rt=!1,ft=!1,ke=!1,Ve=!0,we=!1;const Ue="user-content-";let Be=!0,Me=!1,Se={},Je=null;const Qe=pt({},["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 dt=null;const ht=pt({},["audio","video","img","source","image","track"]);let wt=null;const Ct=pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let Ye=it,se=!1,Ne=null;const We=pt({},[Nt,gt,it],zr),nt=Tt(["mi","mo","mn","ms","mtext"]);let Fe=pt({},nt);const Ge=Tt(["annotation-xml"]);let bt=pt({},Ge);const Re=pt({},["title","style","font","a","script"]);let tt=null;const xt=["application/xhtml+xml","text/html"],Lt="text/html";let et=null,ot=null;const lt=a.createElement("form"),st=function(T){return T instanceof RegExp||T instanceof Function},jt=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ot&&ot===T)return;(!T||typeof T!="object")&&(T={}),T=tn(T),tt=xt.indexOf(T.PARSER_MEDIA_TYPE)===-1?Lt:T.PARSER_MEDIA_TYPE,et=tt==="application/xhtml+xml"?zr:wa,oe=$n(T,"ALLOWED_TAGS",Ae,{transform:et}),Y=$n(T,"ALLOWED_ATTR",Q,{transform:et}),Ne=$n(T,"ALLOWED_NAMESPACES",We,{transform:zr}),wt=$n(T,"ADD_URI_SAFE_ATTR",Ct,{transform:et,base:Ct}),dt=$n(T,"ADD_DATA_URI_TAGS",ht,{transform:et,base:ht}),Je=$n(T,"FORBID_CONTENTS",Qe,{transform:et}),De=$n(T,"FORBID_TAGS",tn({}),{transform:et}),be=$n(T,"FORBID_ATTR",tn({}),{transform:et}),Se=Xt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?tn(T.USE_PROFILES):T.USE_PROFILES:!1,ue=T.ALLOW_ARIA_ATTR!==!1,fe=T.ALLOW_DATA_ATTR!==!1,ge=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$e=T.SAFE_FOR_TEMPLATES||!1,He=T.SAFE_FOR_XML!==!1,je=T.WHOLE_DOCUMENT||!1,rt=T.RETURN_DOM||!1,ft=T.RETURN_DOM_FRAGMENT||!1,ke=T.RETURN_TRUSTED_TYPE||!1,ct=T.FORCE_BODY||!1,Ve=T.SANITIZE_DOM!==!1,we=T.SANITIZE_NAMED_PROPS||!1,Be=T.KEEP_CONTENT!==!1,Me=T.IN_PLACE||!1,K=pf(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:di,Ye=typeof T.NAMESPACE=="string"?T.NAMESPACE:it,Fe=Ur(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>pt({},nt)),bt=Ur(T,"HTML_INTEGRATION_POINTS",()=>pt({},Ge));const X=Ur(T,"CUSTOM_ELEMENT_HANDLING",()=>aa(null));if(me=aa(null),Xt(X,"tagNameCheck")&&st(X.tagNameCheck)&&(me.tagNameCheck=X.tagNameCheck),Xt(X,"attributeNameCheck")&&st(X.attributeNameCheck)&&(me.attributeNameCheck=X.attributeNameCheck),Xt(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(me.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),Mt(me),$e&&(fe=!1),ft&&(rt=!0),Se&&(oe=pt({},li),Y=aa(null),Se.html===!0&&(pt(oe,ii),pt(Y,ui)),Se.svg===!0&&(pt(oe,Wr),pt(Y,qr),pt(Y,Ja)),Se.svgFilters===!0&&(pt(oe,Hr),pt(Y,qr),pt(Y,Ja)),Se.mathMl===!0&&(pt(oe,Vr),pt(Y,ci),pt(Y,Ja))),ne.tagCheck=null,ne.attributeCheck=null,Xt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ne.tagCheck=T.ADD_TAGS:ra(T.ADD_TAGS)&&(oe===Ae&&(oe=tn(oe)),pt(oe,T.ADD_TAGS,et))),Xt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ne.attributeCheck=T.ADD_ATTR:ra(T.ADD_ATTR)&&(Y===Q&&(Y=tn(Y)),pt(Y,T.ADD_ATTR,et))),Xt(T,"ADD_FORBID_CONTENTS")&&ra(T.ADD_FORBID_CONTENTS)&&(Je===Qe&&(Je=tn(Je)),pt(Je,T.ADD_FORBID_CONTENTS,et)),Be&&(oe["#text"]=!0),je&&pt(oe,["html","head","body"]),oe.table&&(pt(oe,["tbody"]),delete De.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=E;E=T.TRUSTED_TYPES_POLICY;try{D=L("")}catch(Ee){throw E=ce,Ee}}else T.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=$()),E&&typeof D=="string"&&(D=L("")));Tt&&Tt(T),ot=T},Wt=pt({},[...Wr,...Hr,...mf]),mn=pt({},[...Vr,...hf]),hn=function(T,X,ce){return X.namespaceURI===it?T==="svg":X.namespaceURI===Nt?T==="svg"&&(ce==="annotation-xml"||Fe[ce]):!!Wt[T]},jn=function(T,X,ce){return X.namespaceURI===it?T==="math":X.namespaceURI===gt?T==="math"&&bt[ce]:!!mn[T]},zn=function(T,X,ce){return X.namespaceURI===gt&&!bt[ce]||X.namespaceURI===Nt&&!Fe[ce]?!1:!mn[T]&&(Re[T]||!Wt[T])},Wn=function(T){let X=_(T);(!X||!X.tagName)&&(X={namespaceURI:Ye,tagName:"template"});const ce=wa(T.tagName),Ee=wa(X.tagName);return Ne[T.namespaceURI]?T.namespaceURI===gt?hn(ce,X,Ee):T.namespaceURI===Nt?jn(ce,X,Ee):T.namespaceURI===it?zn(ce,X,Ee):!!(tt==="application/xhtml+xml"&&Ne[T.namespaceURI]):!1},It=function(T){_a(t.removed,{element:T});try{_(T).removeChild(T)}catch{if(v(T),!_(T))throw qn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},vn=function(T,X,ce){try{T.removeAttributeNode(X)}catch{try{T.removeAttribute(ce)}catch{}}},Ft=function(T){on(T);const X=h(T);if(X){const Ee=[];Vn(X,Pe=>{_a(Ee,Pe)}),Vn(Ee,Pe=>{try{v(Pe)}catch{}})}const ce=A(T);if(ce)for(let Ee=ce.length-1;Ee>=0;--Ee){const Pe=ce[Ee],Xe=Pe&&Pe.name;typeof Xe=="string"&&vn(T,Pe,Xe)}},Ht=function(T,X,ce){if(!ce)try{ce=X.getAttributeNode(T)}catch{ce=null}_a(t.removed,{attribute:ce||null,from:X});try{ce?X.removeAttributeNode(ce):X.removeAttribute(T)}catch{try{X.removeAttribute(T)}catch{}}if(T==="is")if(rt||ft)try{It(X)}catch{}else try{X.setAttribute(T,"")}catch{}},Mn=function(T){const X=A(T);if(X)for(let ce=X.length-1;ce>=0;--ce){const Ee=X[ce],Pe=Ee&&Ee.name;typeof Pe!="string"||Y[et(Pe)]||vn(T,Ee,Pe)}},on=function(T){const X=[T];for(;X.length>0;){const ce=X.pop();w(ce)===nn.element&&Mn(ce);const Pe=h(ce);if(Pe)for(let Xe=Pe.length-1;Xe>=0;--Xe)X.push(Pe[Xe])}},xn=function(T,X){return He?T==="patchsrc"?!0:T==="for"&&X!=="label"&&X!=="output":!1},Hn=function(T){if(!He)return;const X=[T];for(;X.length>0;){const ce=X.pop(),Ee=w(ce);if(Ee===nn.processingInstruction||Ee===nn.comment&&zt(mi,ce.data)){try{v(ce)}catch{}continue}if(Ee===nn.element){const Xe=ce,vt=et(B(ce));try{Xe.hasAttribute&&Xe.hasAttribute("patchsrc")&&Xe.removeAttribute("patchsrc"),Xe.hasAttribute&&Xe.hasAttribute("for")&&xn("for",vt)&&Xe.removeAttribute("for")}catch{}}const Pe=h(ce);if(Pe)for(let Xe=Pe.length-1;Xe>=0;--Xe)X.push(Pe[Xe])}},_n=function(T){let X=null,ce=null;if(ct)T="<remove></remove>"+T;else{const Xe=ai(T,/^[\r\n\t ]+/);ce=Xe&&Xe[0]}tt==="application/xhtml+xml"&&Ye===it&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const Ee=E?L(T):T;if(Ye===it)try{X=new m().parseFromString(Ee,tt)}catch{}if(!X||!X.documentElement){X=q.createDocument(Ye,"template",null);try{X.documentElement.innerHTML=se?D:Ee}catch{}}const Pe=X.body||X.documentElement;return T&&ce&&Pe.insertBefore(a.createTextNode(ce),Pe.childNodes[0]||null),Ye===it?R.call(X,je?"html":"body")[0]:je?X.documentElement:Pe},Vt=function(T){const X=x?x(T):T.ownerDocument;return z.call(X||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},$t=function(T){return T=Ba(T,I," "),T=Ba(T,S," "),T=Ba(T,j," "),T},qt=function(T){var X;T.normalize();const ce=x?x(T):T.ownerDocument,Ee=z.call(ce||T,T,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Pe=Ee.nextNode();for(;Pe;)Pe.data=$t(Pe.data),Pe=Ee.nextNode();const Xe=(X=T.querySelectorAll)===null||X===void 0?void 0:X.call(T,"template");Xe&&Vn(Xe,vt=>{Ot(vt.content)&&qt(vt.content)})},fn=function(T){const X=k?k(T):null;return typeof X!="string"||et(X)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==A(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==y(T)||T.childNodes!==h(T)},Ot=function(T){if(!y||typeof T!="object"||T===null)return!1;try{return y(T)===nn.documentFragment}catch{return!1}},sn=function(T){if(!y||typeof T!="object"||T===null)return!1;try{return typeof y(T)=="number"}catch{return!1}};function Dt(he,T,X){he.length!==0&&Vn(he,ce=>{ce.call(t,T,X,ot)})}const ie=function(T,X){return!!(He&&T.hasChildNodes()&&!sn(T.firstElementChild)&&zt(pi,T.textContent)&&zt(pi,T.innerHTML)||He&&T.namespaceURI===it&&Af[X]&&(sn(T.firstElementChild)||typeof T.textContent=="string"&&zt(Nf[X],T.textContent))||T.nodeType===nn.processingInstruction||He&&T.nodeType===nn.comment&&zt(mi,T.data))},ve=function(T,X){if(T instanceof RegExp)return zt(T,X);if(T instanceof Function){for(var ce=arguments.length,Ee=new Array(ce>2?ce-2:0),Pe=2;Pe<ce;Pe++)Ee[Pe-2]=arguments[Pe];return!!T(X,...Ee)}return!1},Te=function(T,X,ce){if(!De[X]&&ae(X)&&ve(me.tagNameCheck,X))return!1;if(Be&&!Je[X]){const Ee=_(T),Pe=h(T);if(Pe&&Ee){const Xe=Pe.length;for(let vt=Xe-1;vt>=0;--vt){const Bt=T===ce?b(Pe[vt],!0):Pe[vt];Ee.insertBefore(Bt,C(T))}}}return It(T),!0},Ke=function(T,X,ce,Ee){return T.length===0?X:X===ce||X===Ee?tn(X):X},Oe=function(T,X){return T===X||_(T)!==null?!1:(Me&&on(T),!0)},Ze=function(T,X){if(Dt(W.beforeSanitizeElements,T,null),Oe(T,X))return!0;if(fn(T))return It(T),!0;const ce=et(B(T));if(oe=Ke(W.uponSanitizeElement,oe,Ae,qe),Dt(W.uponSanitizeElement,T,{tagName:ce,allowedTags:oe}),Oe(T,X))return!0;if(ie(T,ce))return It(T),!0;if(De[ce]||!(ne.tagCheck instanceof Function&&ne.tagCheck(ce))&&!oe[ce]){const Pe=Te(T,ce,X);return Pe===!1&&Dt(W.afterSanitizeElements,T,null),Pe}if(w(T)===nn.element&&!Wn(T)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&zt(Bf,T.innerHTML))return It(T),!0;if($e&&T.nodeType===nn.text){const Pe=$t(T.textContent);T.textContent!==Pe&&(_a(t.removed,{element:T.cloneNode()}),T.textContent=Pe)}return Dt(W.afterSanitizeElements,T,null),!1},J=function(T,X,ce){if(be[X]||xn(X,T)||Ve&&(X==="id"||X==="name")&&(ce in a||ce in lt))return!1;const Ee=Y[X]||ne.attributeCheck instanceof Function&&ne.attributeCheck(X,T);return fe&&zt(F,X)||ue&&zt(U,X)?!0:Ee?wt[X]||zt(K,Ba(ce,te,""))||(X==="src"||X==="xlink:href"||X==="href")&&T!=="script"&&ri(ce,"data:")===0&&dt[T]||ge&&!zt(re,Ba(ce,te,""))?!0:!ce:ae(T)&&ve(me.tagNameCheck,T)&&ve(me.attributeNameCheck,X,T)||X==="is"&&me.allowCustomizedBuiltInElements&&ve(me.tagNameCheck,ce)},de=pt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ae=function(T){return!de[wa(T)]&&zt(le,T)},ye=function(T,X,ce,Ee){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!ce)switch(p.getAttributeType(T,X)){case"TrustedHTML":return L(Ee);case"TrustedScriptURL":return M(Ee)}return Ee},Le=function(T,X,ce,Ee){try{ce?T.setAttributeNS(ce,X,Ee):T.setAttribute(X,Ee),fn(T)?It(T):ni(t.removed)}catch{Ht(X,T)}},ze=function(T){Dt(W.beforeSanitizeAttributes,T,null);const X=T.attributes;if(!X||fn(T))return;Y=Ke(W.uponSanitizeAttribute,Y,Q,mt);const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Ee=X.length;const Pe=et(T.nodeName);for(;Ee--;){const Xe=X[Ee],vt=Xe.name,Bt=Xe.namespaceURI,Yt=Xe.value,Zt=et(vt),Rr=Yt;let Ut=vt==="value"?Rr:of(Rr);if(ce.attrName=Zt,ce.attrValue=Ut,ce.keepAttr=!0,ce.forceKeepAttr=void 0,Dt(W.uponSanitizeAttribute,T,ce),Ut=ce.attrValue,we&&(Zt==="id"||Zt==="name")&&ri(Ut,Ue)!==0&&(Ht(vt,T,Xe),Ut=Ue+Ut),He&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ut)){Ht(vt,T,Xe);continue}if(Zt==="attributename"&&ai(Ut,"href")){Ht(vt,T,Xe);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){Ht(vt,T,Xe);continue}if(!Ce&&zt(kf,Ut)){Ht(vt,T,Xe);continue}if($e&&(Ut=$t(Ut)),!J(Pe,Zt,Ut)){Ht(vt,T,Xe);continue}Ut=ye(Pe,Zt,Bt,Ut),Ut!==Rr&&Le(T,vt,Bt,Ut)}}Dt(W.afterSanitizeAttributes,T,null)},ut=function(T){let X=null;const ce=Vt(T);for(Dt(W.beforeSanitizeShadowDOM,T,null);X=ce.nextNode();)if(Dt(W.uponSanitizeShadowNode,X,null),Ze(X,T),ze(X),Ot(X.content)&&ut(X.content),w(X)===nn.element){const Ee=g(X);Ot(Ee)&&(yt(Ee),ut(Ee))}Dt(W.afterSanitizeShadowDOM,T,null)},yt=function(T){const X=[{node:T,shadow:null}];for(;X.length>0;){const ce=X.pop();if(ce.shadow){ut(ce.shadow);continue}const Ee=ce.node,Xe=w(Ee)===nn.element,vt=h(Ee);if(vt)for(let Bt=vt.length-1;Bt>=0;--Bt)X.push({node:vt[Bt],shadow:null});if(Xe){const Bt=k?k(Ee):null;if(typeof Bt=="string"&&et(Bt)==="template"){const Yt=Ee.content;Ot(Yt)&&X.push({node:Yt,shadow:null})}}if(Xe){const Bt=g(Ee);Ot(Bt)&&X.push({node:null,shadow:Bt},{node:Bt,shadow:null})}}};return t.sanitize=function(he){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,ce=null,Ee=null,Pe=null;if(se=!he,se&&(he="<!-->"),typeof he!="string"&&!sn(he)&&(he=df(he),typeof he!="string"))throw qn("dirty is not a string, aborting");if(!t.isSupported)return he;Ie?(oe=qe,Y=mt):jt(T),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(oe=tn(oe)),W.uponSanitizeAttribute.length>0&&(Y=tn(Y)),t.removed=[];const Xe=Me&&typeof he!="string"&&sn(he);if(Xe){Hn(he);const Yt=B(he);if(typeof Yt=="string"){const Zt=et(Yt);if(!oe[Zt]||De[Zt])throw Ft(he),qn("root node is forbidden and cannot be sanitized in-place")}if(fn(he))throw Ft(he),qn("root node is clobbered and cannot be sanitized in-place");try{yt(he)}catch(Zt){throw Ft(he),Zt}}else if(sn(he))X=_n("<!---->"),ce=X.ownerDocument.importNode(he,!0),ce.nodeType===nn.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?X=ce:X.appendChild(ce),yt(ce);else{if(!rt&&!$e&&!je&&he.indexOf("<")===-1)return E&&ke?L(he):he;if(X=_n(he),!X)return rt?null:ke?D:""}X&&ct&&It(X.firstChild);const vt=Xe?he:X;try{const Yt=Vt(vt);for(;Ee=Yt.nextNode();)Ze(Ee,vt),ze(Ee),Ot(Ee.content)&&ut(Ee.content)}catch(Yt){throw Xe&&(Ft(he),Vn(t.removed,Zt=>{Zt.element&&on(Zt.element)})),Yt}if(Xe)return Vn(t.removed,Yt=>{Yt.element&&on(Yt.element)}),$e&&qt(he),he;if(rt){if($e&&qt(X),ft)for(Pe=V.call(X.ownerDocument);X.firstChild;)Pe.appendChild(X.firstChild);else Pe=X;return(Y.shadowroot||Y.shadowrootmode)&&(Pe=H.call(r,Pe,!0)),Pe}let Bt=je?X.outerHTML:X.innerHTML;return je&&oe["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&zt(_f,X.ownerDocument.doctype.name)&&(Bt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
828
- `+Bt),$e&&(Bt=$t(Bt)),E&&ke?L(Bt):Bt},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jt(he),Ie=!0,qe=oe,mt=Y},t.clearConfig=function(){ot=null,Ie=!1,qe=null,mt=null,E=N,D=""},t.isValidAttribute=function(he,T,X){ot||jt({});const ce=et(he),Ee=et(T);return J(ce,Ee,X)},t.addHook=function(he,T){typeof T=="function"&&Xt(W,he)&&_a(W[he],T)},t.removeHook=function(he,T){if(Xt(W,he)){if(T!==void 0){const X=af(W[he],T);return X===-1?void 0:rf(W[he],X,1)[0]}return ni(W[he])}},t.removeHooks=function(he){Xt(W,he)&&(W[he]=[])},t.removeAllHooks=function(){W=fi()},t}var oa=Ci();let Gr=null;const Sf=1500;function Kr(){Gr?.clear(),Gr=null}function Tf(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;Kr();let i=!1;const s=()=>{if(!i){i=!0;try{t?.()}catch{}}};try{r.cancel()}catch{s();return}const l=()=>{Kr();try{r.cancel();const d=new SpeechSynthesisUtterance(e),m=r.getVoices().find(p=>p.lang.startsWith("ko"));m&&(d.voice=m),d.rate=a,d.onend=t?s:null,d.onerror=t?s:null,r.speak(d)}catch{s()}};let u;try{u=r.getVoices()}catch{s();return}if(u.length>0){l();return}const c=setTimeout(l,Sf);try{r.addEventListener("voiceschanged",l,{once:!0})}catch{clearTimeout(c),s();return}Gr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",l)}}}function Yr(){Kr(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const jf=/^(?:[a-z]+:)?\/\//i,Mf="__ihab_core_asset_base_url__";function Lf(){return globalThis[Mf]??""}function Zr(e){const t=String(e||"").trim();if(!t)return"";if(jf.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=Lf();return r?`${r}${a}`:a}const gi="__ihab_core_storage_resolvers__";function Aa(){return globalThis[gi]??null}function $f(e){globalThis[gi]=e}let bi=class extends Error{constructor(t){super(`
827
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J1(e,t){return Y1(e)||Z1(e,t)||Q1(e,t)||X1()}function Q1(e,t){if(e){if(typeof e=="string")return Js(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)?Js(e,t):void 0}}const Qs=Object.entries,ei=Object.setPrototypeOf,ef=Object.isFrozen,tf=Object.getPrototypeOf,nf=Object.getOwnPropertyDescriptor;let Tt=Object.freeze,Mt=Object.seal,aa=Object.create,ti=typeof Reflect<"u"&&Reflect,Fr=ti.apply,Or=ti.construct;Tt||(Tt=function(t){return t}),Mt||(Mt=function(t){return t}),Fr||(Fr=function(t,a){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(a,i)}),Or||(Or=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return new t(...r)});const Vn=Et(Array.prototype.forEach),af=Et(Array.prototype.lastIndexOf),ni=Et(Array.prototype.pop),_a=Et(Array.prototype.push),rf=Et(Array.prototype.splice),ra=Array.isArray,wa=Et(String.prototype.toLowerCase),zr=Et(String.prototype.toString),ai=Et(String.prototype.match),Ba=Et(String.prototype.replace),ri=Et(String.prototype.indexOf),of=Et(String.prototype.trim),sf=Et(Number.prototype.toString),lf=Et(Boolean.prototype.toString),oi=typeof BigInt>"u"?null:Et(BigInt.prototype.toString),si=typeof Symbol>"u"?null:Et(Symbol.prototype.toString),Xt=Et(Object.prototype.hasOwnProperty),ka=Et(Object.prototype.toString),zt=Et(RegExp.prototype.test),qn=uf(TypeError);function Et(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return Fr(e,t,r)}}function uf(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Or(e,a)}}function pt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(ei&&ei(e,null),!ra(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=a(i);s!==i&&(ef(t)||(t[r]=s),i=s)}e[i]=!0}return e}function cf(e){for(let t=0;t<e.length;t++)Xt(e,t)||(e[t]=null);return e}function tn(e){const t=aa(null);for(const r of Qs(e)){var a=J1(r,2);const i=a[0],s=a[1];Xt(e,i)&&(ra(s)?t[i]=cf(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=tn(s):t[i]=s)}return t}function df(e){switch(typeof e){case"string":return e;case"number":return sf(e);case"boolean":return lf(e);case"bigint":return oi?oi(e):"0";case"symbol":return si?si(e):"Symbol()";case"undefined":return ka(e);case"function":case"object":{if(e===null)return ka(e);const t=e,a=un(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:ka(r)}return ka(e)}default:return ka(e)}}function un(e,t){for(;e!==null;){const r=nf(e,t);if(r){if(r.get)return Et(r.get);if(typeof r.value=="function")return Et(r.value)}e=tf(e)}function a(){return null}return a}function pf(e){try{return zt(e,""),!0}catch{return!1}}const ii=Tt(["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"]),Wr=Tt(["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"]),Hr=Tt(["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"]),mf=Tt(["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"]),Vr=Tt(["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"]),hf=Tt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),li=Tt(["#text"]),ui=Tt(["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"]),qr=Tt(["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"]),ci=Tt(["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"]),Ja=Tt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ff=Mt(/{{[\w\W]*|^[\w\W]*}}/g),Cf=Mt(/<%[\w\W]*|^[\w\W]*%>/g),gf=Mt(/\${[\w\W]*/g),bf=Mt(/^data-[\-\w.\u00B7-\uFFFF]+$/),yf=Mt(/^aria-[\-\w]+$/),di=Mt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vf=Mt(/^(?:\w+script|data):/i),xf=Mt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_f=Mt(/^html$/i),wf=Mt(/^[a-z][.\w]*(-[.\w]+)+$/i),pi=Mt(/<[/\w!]/g),mi=Mt(/<[/\w]/g),Bf=Mt(/<\/no(script|embed|frames)/i),kf=Mt(/\/>/i),nn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},hi=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Af=Tt(pt({},hi)),Nf=(function(){const e={};return Vn(hi,t=>{e[t]=Mt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Tt(e)})(),Ef=function(){return typeof window>"u"?null:window},Df=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";a&&a.hasAttribute(i)&&(r=a.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$n=function(t,a,r,i){return Xt(t,a)&&ra(t[a])?pt(i.base?tn(i.base):{},t[a],i.transform):r},Ur=function(t,a,r){const i=Xt(t,a)?t[a]:void 0;return i&&typeof i=="object"?tn(i):r()};function Ci(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ef();const t=Ce=>Ci(Ce);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==nn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,i=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,p=e.trustedTypes,f=u.prototype,b=un(f,"cloneNode"),v=un(f,"remove"),C=un(f,"nextSibling"),h=un(f,"childNodes"),_=un(f,"parentNode"),g=un(f,"shadowRoot"),A=un(f,"attributes"),y=l&&l.prototype?un(l.prototype,"nodeType"):null,k=l&&l.prototype?un(l.prototype,"nodeName"):null,x=l&&l.prototype?un(l.prototype,"ownerDocument"):null,w=function(T){return y?y(T):T.nodeType},B=function(T){return k?k(T):T.nodeName};if(typeof s=="function"){const Ce=a.createElement("template");Ce.content&&Ce.content.ownerDocument&&(a=Ce.content.ownerDocument)}let E,D="",N,O=!1,P=0;const G=function(){if(P>0)throw qn('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.')},L=function(T){G(),P++;try{return E.createHTML(T)}finally{P--}},M=function(T){G(),P++;try{return E.createScriptURL(T)}finally{P--}},$=function(){return O||(N=Df(p,i),O=!0),N},Y=a,q=Y.implementation,z=Y.createNodeIterator,V=Y.createDocumentFragment,R=Y.getElementsByTagName,H=r.importNode;let W=fi();t.isSupported=typeof Qs=="function"&&typeof _=="function"&&q&&q.createHTMLDocument!==void 0;const I=ff,S=Cf,j=gf,F=bf,U=yf,ae=vf,te=xf,le=wf;let K=di,re=null;const ke=pt({},[...ii,...Wr,...Hr,...Vr,...li]);let Z=null;const Q=pt({},[...ui,...qr,...ci,...Ja]);let he=Object.seal(aa(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}})),De=null,ye=null;const de=Object.seal(aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,ge=!0,fe=!1,ue=!0,Me=!1,ze=!0,je=!1,Oe=!1,We=null,mt=null,ct=!1,rt=!1,ft=!1,Ae=!1,qe=!0,we=!1;const Ue="user-content-";let Be=!0,Le=!1,Se={},Je=null;const Qe=pt({},["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 dt=null;const ht=pt({},["audio","video","img","source","image","track"]);let wt=null;const Ct=pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let Ye=it,oe=!1,Ne=null;const Ve=pt({},[Nt,gt,it],zr),nt=Tt(["mi","mo","mn","ms","mtext"]);let Ie=pt({},nt);const Ge=Tt(["annotation-xml"]);let bt=pt({},Ge);const Re=pt({},["title","style","font","a","script"]);let tt=null;const xt=["application/xhtml+xml","text/html"],Lt="text/html";let et=null,ot=null;const lt=a.createElement("form"),st=function(T){return T instanceof RegExp||T instanceof Function},jt=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ot&&ot===T)return;(!T||typeof T!="object")&&(T={}),T=tn(T),tt=xt.indexOf(T.PARSER_MEDIA_TYPE)===-1?Lt:T.PARSER_MEDIA_TYPE,et=tt==="application/xhtml+xml"?zr:wa,re=$n(T,"ALLOWED_TAGS",ke,{transform:et}),Z=$n(T,"ALLOWED_ATTR",Q,{transform:et}),Ne=$n(T,"ALLOWED_NAMESPACES",Ve,{transform:zr}),wt=$n(T,"ADD_URI_SAFE_ATTR",Ct,{transform:et,base:Ct}),dt=$n(T,"ADD_DATA_URI_TAGS",ht,{transform:et,base:ht}),Je=$n(T,"FORBID_CONTENTS",Qe,{transform:et}),De=$n(T,"FORBID_TAGS",tn({}),{transform:et}),ye=$n(T,"FORBID_ATTR",tn({}),{transform:et}),Se=Xt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?tn(T.USE_PROFILES):T.USE_PROFILES:!1,ie=T.ALLOW_ARIA_ATTR!==!1,ge=T.ALLOW_DATA_ATTR!==!1,fe=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Me=T.SAFE_FOR_TEMPLATES||!1,ze=T.SAFE_FOR_XML!==!1,je=T.WHOLE_DOCUMENT||!1,rt=T.RETURN_DOM||!1,ft=T.RETURN_DOM_FRAGMENT||!1,Ae=T.RETURN_TRUSTED_TYPE||!1,ct=T.FORCE_BODY||!1,qe=T.SANITIZE_DOM!==!1,we=T.SANITIZE_NAMED_PROPS||!1,Be=T.KEEP_CONTENT!==!1,Le=T.IN_PLACE||!1,K=pf(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:di,Ye=typeof T.NAMESPACE=="string"?T.NAMESPACE:it,Ie=Ur(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>pt({},nt)),bt=Ur(T,"HTML_INTEGRATION_POINTS",()=>pt({},Ge));const X=Ur(T,"CUSTOM_ELEMENT_HANDLING",()=>aa(null));if(he=aa(null),Xt(X,"tagNameCheck")&&st(X.tagNameCheck)&&(he.tagNameCheck=X.tagNameCheck),Xt(X,"attributeNameCheck")&&st(X.attributeNameCheck)&&(he.attributeNameCheck=X.attributeNameCheck),Xt(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(he.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),Mt(he),Me&&(ge=!1),ft&&(rt=!0),Se&&(re=pt({},li),Z=aa(null),Se.html===!0&&(pt(re,ii),pt(Z,ui)),Se.svg===!0&&(pt(re,Wr),pt(Z,qr),pt(Z,Ja)),Se.svgFilters===!0&&(pt(re,Hr),pt(Z,qr),pt(Z,Ja)),Se.mathMl===!0&&(pt(re,Vr),pt(Z,ci),pt(Z,Ja))),de.tagCheck=null,de.attributeCheck=null,Xt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?de.tagCheck=T.ADD_TAGS:ra(T.ADD_TAGS)&&(re===ke&&(re=tn(re)),pt(re,T.ADD_TAGS,et))),Xt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?de.attributeCheck=T.ADD_ATTR:ra(T.ADD_ATTR)&&(Z===Q&&(Z=tn(Z)),pt(Z,T.ADD_ATTR,et))),Xt(T,"ADD_FORBID_CONTENTS")&&ra(T.ADD_FORBID_CONTENTS)&&(Je===Qe&&(Je=tn(Je)),pt(Je,T.ADD_FORBID_CONTENTS,et)),Be&&(re["#text"]=!0),je&&pt(re,["html","head","body"]),re.table&&(pt(re,["tbody"]),delete De.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=E;E=T.TRUSTED_TYPES_POLICY;try{D=L("")}catch(Ee){throw E=ce,Ee}}else T.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=$()),E&&typeof D=="string"&&(D=L("")));Tt&&Tt(T),ot=T},Wt=pt({},[...Wr,...Hr,...mf]),mn=pt({},[...Vr,...hf]),hn=function(T,X,ce){return X.namespaceURI===it?T==="svg":X.namespaceURI===Nt?T==="svg"&&(ce==="annotation-xml"||Ie[ce]):!!Wt[T]},jn=function(T,X,ce){return X.namespaceURI===it?T==="math":X.namespaceURI===gt?T==="math"&&bt[ce]:!!mn[T]},zn=function(T,X,ce){return X.namespaceURI===gt&&!bt[ce]||X.namespaceURI===Nt&&!Ie[ce]?!1:!mn[T]&&(Re[T]||!Wt[T])},Wn=function(T){let X=_(T);(!X||!X.tagName)&&(X={namespaceURI:Ye,tagName:"template"});const ce=wa(T.tagName),Ee=wa(X.tagName);return Ne[T.namespaceURI]?T.namespaceURI===gt?hn(ce,X,Ee):T.namespaceURI===Nt?jn(ce,X,Ee):T.namespaceURI===it?zn(ce,X,Ee):!!(tt==="application/xhtml+xml"&&Ne[T.namespaceURI]):!1},It=function(T){_a(t.removed,{element:T});try{_(T).removeChild(T)}catch{if(v(T),!_(T))throw qn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},vn=function(T,X,ce){try{T.removeAttributeNode(X)}catch{try{T.removeAttribute(ce)}catch{}}},Ft=function(T){on(T);const X=h(T);if(X){const Ee=[];Vn(X,Pe=>{_a(Ee,Pe)}),Vn(Ee,Pe=>{try{v(Pe)}catch{}})}const ce=A(T);if(ce)for(let Ee=ce.length-1;Ee>=0;--Ee){const Pe=ce[Ee],Xe=Pe&&Pe.name;typeof Xe=="string"&&vn(T,Pe,Xe)}},Ht=function(T,X,ce){if(!ce)try{ce=X.getAttributeNode(T)}catch{ce=null}_a(t.removed,{attribute:ce||null,from:X});try{ce?X.removeAttributeNode(ce):X.removeAttribute(T)}catch{try{X.removeAttribute(T)}catch{}}if(T==="is")if(rt||ft)try{It(X)}catch{}else try{X.setAttribute(T,"")}catch{}},Mn=function(T){const X=A(T);if(X)for(let ce=X.length-1;ce>=0;--ce){const Ee=X[ce],Pe=Ee&&Ee.name;typeof Pe!="string"||Z[et(Pe)]||vn(T,Ee,Pe)}},on=function(T){const X=[T];for(;X.length>0;){const ce=X.pop();w(ce)===nn.element&&Mn(ce);const Pe=h(ce);if(Pe)for(let Xe=Pe.length-1;Xe>=0;--Xe)X.push(Pe[Xe])}},xn=function(T,X){return ze?T==="patchsrc"?!0:T==="for"&&X!=="label"&&X!=="output":!1},Hn=function(T){if(!ze)return;const X=[T];for(;X.length>0;){const ce=X.pop(),Ee=w(ce);if(Ee===nn.processingInstruction||Ee===nn.comment&&zt(mi,ce.data)){try{v(ce)}catch{}continue}if(Ee===nn.element){const Xe=ce,vt=et(B(ce));try{Xe.hasAttribute&&Xe.hasAttribute("patchsrc")&&Xe.removeAttribute("patchsrc"),Xe.hasAttribute&&Xe.hasAttribute("for")&&xn("for",vt)&&Xe.removeAttribute("for")}catch{}}const Pe=h(ce);if(Pe)for(let Xe=Pe.length-1;Xe>=0;--Xe)X.push(Pe[Xe])}},_n=function(T){let X=null,ce=null;if(ct)T="<remove></remove>"+T;else{const Xe=ai(T,/^[\r\n\t ]+/);ce=Xe&&Xe[0]}tt==="application/xhtml+xml"&&Ye===it&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const Ee=E?L(T):T;if(Ye===it)try{X=new m().parseFromString(Ee,tt)}catch{}if(!X||!X.documentElement){X=q.createDocument(Ye,"template",null);try{X.documentElement.innerHTML=oe?D:Ee}catch{}}const Pe=X.body||X.documentElement;return T&&ce&&Pe.insertBefore(a.createTextNode(ce),Pe.childNodes[0]||null),Ye===it?R.call(X,je?"html":"body")[0]:je?X.documentElement:Pe},Vt=function(T){const X=x?x(T):T.ownerDocument;return z.call(X||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},$t=function(T){return T=Ba(T,I," "),T=Ba(T,S," "),T=Ba(T,j," "),T},qt=function(T){var X;T.normalize();const ce=x?x(T):T.ownerDocument,Ee=z.call(ce||T,T,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Pe=Ee.nextNode();for(;Pe;)Pe.data=$t(Pe.data),Pe=Ee.nextNode();const Xe=(X=T.querySelectorAll)===null||X===void 0?void 0:X.call(T,"template");Xe&&Vn(Xe,vt=>{Ot(vt.content)&&qt(vt.content)})},fn=function(T){const X=k?k(T):null;return typeof X!="string"||et(X)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==A(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==y(T)||T.childNodes!==h(T)},Ot=function(T){if(!y||typeof T!="object"||T===null)return!1;try{return y(T)===nn.documentFragment}catch{return!1}},sn=function(T){if(!y||typeof T!="object"||T===null)return!1;try{return typeof y(T)=="number"}catch{return!1}};function Dt(Ce,T,X){Ce.length!==0&&Vn(Ce,ce=>{ce.call(t,T,X,ot)})}const se=function(T,X){return!!(ze&&T.hasChildNodes()&&!sn(T.firstElementChild)&&zt(pi,T.textContent)&&zt(pi,T.innerHTML)||ze&&T.namespaceURI===it&&Af[X]&&(sn(T.firstElementChild)||typeof T.textContent=="string"&&zt(Nf[X],T.textContent))||T.nodeType===nn.processingInstruction||ze&&T.nodeType===nn.comment&&zt(mi,T.data))},ve=function(T,X){if(T instanceof RegExp)return zt(T,X);if(T instanceof Function){for(var ce=arguments.length,Ee=new Array(ce>2?ce-2:0),Pe=2;Pe<ce;Pe++)Ee[Pe-2]=arguments[Pe];return!!T(X,...Ee)}return!1},Te=function(T,X,ce){if(!De[X]&&ne(X)&&ve(he.tagNameCheck,X))return!1;if(Be&&!Je[X]){const Ee=_(T),Pe=h(T);if(Pe&&Ee){const Xe=Pe.length;for(let vt=Xe-1;vt>=0;--vt){const Bt=T===ce?b(Pe[vt],!0):Pe[vt];Ee.insertBefore(Bt,C(T))}}}return It(T),!0},Ke=function(T,X,ce,Ee){return T.length===0?X:X===ce||X===Ee?tn(X):X},Fe=function(T,X){return T===X||_(T)!==null?!1:(Le&&on(T),!0)},Ze=function(T,X){if(Dt(W.beforeSanitizeElements,T,null),Fe(T,X))return!0;if(fn(T))return It(T),!0;const ce=et(B(T));if(re=Ke(W.uponSanitizeElement,re,ke,We),Dt(W.uponSanitizeElement,T,{tagName:ce,allowedTags:re}),Fe(T,X))return!0;if(se(T,ce))return It(T),!0;if(De[ce]||!(de.tagCheck instanceof Function&&de.tagCheck(ce))&&!re[ce]){const Pe=Te(T,ce,X);return Pe===!1&&Dt(W.afterSanitizeElements,T,null),Pe}if(w(T)===nn.element&&!Wn(T)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&zt(Bf,T.innerHTML))return It(T),!0;if(Me&&T.nodeType===nn.text){const Pe=$t(T.textContent);T.textContent!==Pe&&(_a(t.removed,{element:T.cloneNode()}),T.textContent=Pe)}return Dt(W.afterSanitizeElements,T,null),!1},J=function(T,X,ce){if(ye[X]||xn(X,T)||qe&&(X==="id"||X==="name")&&(ce in a||ce in lt))return!1;const Ee=Z[X]||de.attributeCheck instanceof Function&&de.attributeCheck(X,T);return ge&&zt(F,X)||ie&&zt(U,X)?!0:Ee?wt[X]||zt(K,Ba(ce,te,""))||(X==="src"||X==="xlink:href"||X==="href")&&T!=="script"&&ri(ce,"data:")===0&&dt[T]||fe&&!zt(ae,Ba(ce,te,""))?!0:!ce:ne(T)&&ve(he.tagNameCheck,T)&&ve(he.attributeNameCheck,X,T)||X==="is"&&he.allowCustomizedBuiltInElements&&ve(he.tagNameCheck,ce)},pe=pt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ne=function(T){return!pe[wa(T)]&&zt(le,T)},be=function(T,X,ce,Ee){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!ce)switch(p.getAttributeType(T,X)){case"TrustedHTML":return L(Ee);case"TrustedScriptURL":return M(Ee)}return Ee},$e=function(T,X,ce,Ee){try{ce?T.setAttributeNS(ce,X,Ee):T.setAttribute(X,Ee),fn(T)?It(T):ni(t.removed)}catch{Ht(X,T)}},He=function(T){Dt(W.beforeSanitizeAttributes,T,null);const X=T.attributes;if(!X||fn(T))return;Z=Ke(W.uponSanitizeAttribute,Z,Q,mt);const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let Ee=X.length;const Pe=et(T.nodeName);for(;Ee--;){const Xe=X[Ee],vt=Xe.name,Bt=Xe.namespaceURI,Yt=Xe.value,Zt=et(vt),Rr=Yt;let Ut=vt==="value"?Rr:of(Rr);if(ce.attrName=Zt,ce.attrValue=Ut,ce.keepAttr=!0,ce.forceKeepAttr=void 0,Dt(W.uponSanitizeAttribute,T,ce),Ut=ce.attrValue,we&&(Zt==="id"||Zt==="name")&&ri(Ut,Ue)!==0&&(Ht(vt,T,Xe),Ut=Ue+Ut),ze&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ut)){Ht(vt,T,Xe);continue}if(Zt==="attributename"&&ai(Ut,"href")){Ht(vt,T,Xe);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){Ht(vt,T,Xe);continue}if(!ue&&zt(kf,Ut)){Ht(vt,T,Xe);continue}if(Me&&(Ut=$t(Ut)),!J(Pe,Zt,Ut)){Ht(vt,T,Xe);continue}Ut=be(Pe,Zt,Bt,Ut),Ut!==Rr&&$e(T,vt,Bt,Ut)}}Dt(W.afterSanitizeAttributes,T,null)},ut=function(T){let X=null;const ce=Vt(T);for(Dt(W.beforeSanitizeShadowDOM,T,null);X=ce.nextNode();)if(Dt(W.uponSanitizeShadowNode,X,null),Ze(X,T),He(X),Ot(X.content)&&ut(X.content),w(X)===nn.element){const Ee=g(X);Ot(Ee)&&(yt(Ee),ut(Ee))}Dt(W.afterSanitizeShadowDOM,T,null)},yt=function(T){const X=[{node:T,shadow:null}];for(;X.length>0;){const ce=X.pop();if(ce.shadow){ut(ce.shadow);continue}const Ee=ce.node,Xe=w(Ee)===nn.element,vt=h(Ee);if(vt)for(let Bt=vt.length-1;Bt>=0;--Bt)X.push({node:vt[Bt],shadow:null});if(Xe){const Bt=k?k(Ee):null;if(typeof Bt=="string"&&et(Bt)==="template"){const Yt=Ee.content;Ot(Yt)&&X.push({node:Yt,shadow:null})}}if(Xe){const Bt=g(Ee);Ot(Bt)&&X.push({node:null,shadow:Bt},{node:Bt,shadow:null})}}};return t.sanitize=function(Ce){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,ce=null,Ee=null,Pe=null;if(oe=!Ce,oe&&(Ce="<!-->"),typeof Ce!="string"&&!sn(Ce)&&(Ce=df(Ce),typeof Ce!="string"))throw qn("dirty is not a string, aborting");if(!t.isSupported)return Ce;Oe?(re=We,Z=mt):jt(T),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(re=tn(re)),W.uponSanitizeAttribute.length>0&&(Z=tn(Z)),t.removed=[];const Xe=Le&&typeof Ce!="string"&&sn(Ce);if(Xe){Hn(Ce);const Yt=B(Ce);if(typeof Yt=="string"){const Zt=et(Yt);if(!re[Zt]||De[Zt])throw Ft(Ce),qn("root node is forbidden and cannot be sanitized in-place")}if(fn(Ce))throw Ft(Ce),qn("root node is clobbered and cannot be sanitized in-place");try{yt(Ce)}catch(Zt){throw Ft(Ce),Zt}}else if(sn(Ce))X=_n("<!---->"),ce=X.ownerDocument.importNode(Ce,!0),ce.nodeType===nn.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?X=ce:X.appendChild(ce),yt(ce);else{if(!rt&&!Me&&!je&&Ce.indexOf("<")===-1)return E&&Ae?L(Ce):Ce;if(X=_n(Ce),!X)return rt?null:Ae?D:""}X&&ct&&It(X.firstChild);const vt=Xe?Ce:X;try{const Yt=Vt(vt);for(;Ee=Yt.nextNode();)Ze(Ee,vt),He(Ee),Ot(Ee.content)&&ut(Ee.content)}catch(Yt){throw Xe&&(Ft(Ce),Vn(t.removed,Zt=>{Zt.element&&on(Zt.element)})),Yt}if(Xe)return Vn(t.removed,Yt=>{Yt.element&&on(Yt.element)}),Me&&qt(Ce),Ce;if(rt){if(Me&&qt(X),ft)for(Pe=V.call(X.ownerDocument);X.firstChild;)Pe.appendChild(X.firstChild);else Pe=X;return(Z.shadowroot||Z.shadowrootmode)&&(Pe=H.call(r,Pe,!0)),Pe}let Bt=je?X.outerHTML:X.innerHTML;return je&&re["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&zt(_f,X.ownerDocument.doctype.name)&&(Bt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
828
+ `+Bt),Me&&(Bt=$t(Bt)),E&&Ae?L(Bt):Bt},t.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jt(Ce),Oe=!0,We=re,mt=Z},t.clearConfig=function(){ot=null,Oe=!1,We=null,mt=null,E=N,D=""},t.isValidAttribute=function(Ce,T,X){ot||jt({});const ce=et(Ce),Ee=et(T);return J(ce,Ee,X)},t.addHook=function(Ce,T){typeof T=="function"&&Xt(W,Ce)&&_a(W[Ce],T)},t.removeHook=function(Ce,T){if(Xt(W,Ce)){if(T!==void 0){const X=af(W[Ce],T);return X===-1?void 0:rf(W[Ce],X,1)[0]}return ni(W[Ce])}},t.removeHooks=function(Ce){Xt(W,Ce)&&(W[Ce]=[])},t.removeAllHooks=function(){W=fi()},t}var oa=Ci();let Gr=null;const Sf=1500;function Kr(){Gr?.clear(),Gr=null}function Tf(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;Kr();let i=!1;const s=()=>{if(!i){i=!0;try{t?.()}catch{}}};try{r.cancel()}catch{s();return}const l=()=>{Kr();try{r.cancel();const d=new SpeechSynthesisUtterance(e),m=r.getVoices().find(p=>p.lang.startsWith("ko"));m&&(d.voice=m),d.rate=a,d.onend=t?s:null,d.onerror=t?s:null,r.speak(d)}catch{s()}};let u;try{u=r.getVoices()}catch{s();return}if(u.length>0){l();return}const c=setTimeout(l,Sf);try{r.addEventListener("voiceschanged",l,{once:!0})}catch{clearTimeout(c),s();return}Gr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",l)}}}function Yr(){Kr(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const jf=/^(?:[a-z]+:)?\/\//i,Mf="__ihab_core_asset_base_url__";function Lf(){return globalThis[Mf]??""}function Zr(e){const t=String(e||"").trim();if(!t)return"";if(jf.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=Lf();return r?`${r}${a}`:a}const gi="__ihab_core_storage_resolvers__";function Aa(){return globalThis[gi]??null}function $f(e){globalThis[gi]=e}let bi=class extends Error{constructor(t){super(`
829
829
  [ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
830
830
 
831
831
  \uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
@@ -844,19 +844,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
844
844
  \uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
845
845
  npm install @supabase/supabase-js
846
846
  pnpm add @supabase/supabase-js
847
- `),this.name="StorageNotConfiguredError"}};function Rf(e){$f(e)}function yi(e,t){if(!e)return null;const a=Aa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function vi(e){if(!e)return null;const t=Aa();if(!t)throw new bi("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function xi(e){const t=Aa();if(!t)throw new bi("downloadSound");return t.download(e)}function Pf(){return Aa()?.noiseBaseUrl??"/sounds/noise"}function If(){const e=Number(Aa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Ff(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}const _i="__ihab_core_tts_config__";function Na(){return globalThis[_i]?.urlResolver??null}function Xr(){return globalThis[_i]?.fallbackUrlResolver??null}const Of="__ihab_core_pronunciation_resolver__";function zf(){return globalThis[Of]??null}let Rn=null;const Ea=new WeakMap,Jr=new WeakMap,Qr=new WeakMap;let wi=!1;const Bi=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Wf(){if(wi||typeof document>"u")return;wi=!0;const e=()=>{try{Rn&&Rn.state!=="running"&&Rn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function ki(){if(Rn)return Rn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Rn=new e,Wf(),Rn):null}catch{return null}}function eo(){try{Rn?.resume()}catch{}}function to(e,t){const a=Ea.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),i=e.createGain(),s=e.createAnalyser();s.fftSize=1024,s.smoothingTimeConstant=.6,i.gain.value=Bi(Jr.get(t)??t.volume),r.connect(i),i.connect(s),i.connect(e.destination);try{t.volume=1}catch{}const l={gain:i,analyser:s};return Ea.set(t,l),l}catch{return null}}function Qa(e){if(!e)return Promise.resolve(null);const t=Ea.get(e);if(t)return Promise.resolve(t.analyser);const a=ki();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(to(a,e)?.analyser??null);const r=Qr.get(e);if(r)return r;const i=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?to(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{Qr.delete(e)});return Qr.set(e,i),i}function Hf(e){if(!e)return null;const t=Ea.get(e);if(t)return t.analyser;const a=ki();return a?a.state==="running"?to(a,e)?.analyser??null:(Qa(e),null):null}function Pn(e,t){const a=Bi(t);Jr.set(e,a);const r=Ea.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const i=r.gain.gain;try{const s=r.gain.context.currentTime;i.cancelScheduledValues(s),i.setTargetAtTime(a,s,.01)}catch{try{i.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function er(e){return Jr.get(e)??e.volume}function Vf(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const i=t[r];a+=i*i}return Math.sqrt(a/t.length)}const qf="__ihab_core_image_config__";function sa(){return globalThis[qf]??null}const Ai="word_image_existence_map_v1",Uf="ihab:image-existence-updated";let Da=null;function Gf(){Da!==null&&(clearTimeout(Da),Da=null),typeof window<"u"&&window.dispatchEvent(new Event(Uf))}function Kf(){Da===null&&(Da=setTimeout(Gf,200))}let Un=null,no=0;const Sa=new Map;function Yf(){if(Un)return Un;try{const e=typeof localStorage<"u"?localStorage.getItem(Ai):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,i]of Object.entries(t))typeof i=="boolean"&&(a[r]=i);Un=a}catch{Un={}}return Un}let ao=null;function Zf(){ao===null&&(ao=setTimeout(()=>{ao=null;try{typeof localStorage<"u"&&Un&&localStorage.setItem(Ai,JSON.stringify(Un))}catch{}},200))}function Xf(e,t){return`${e}_${t??1}`}async function Jf(e,t,a=!1){const r=Yf(),i=Xf(e,t);if(!a&&i in r)return r[i];if(!a&&Sa.has(i))return Sa.get(i);const s=sa();if(!s)return!1;let l;try{l=s(e,t)}catch{return!1}if(!l)return!1;let u;try{u=fetch(l,{method:"HEAD",signal:Ff(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:d.status===404||d.status===410?!1:null,()=>null).then(d=>Sa.get(i)!==c?d??!1:(Sa.delete(i),d===null?!1:(r[i]=d,no++,Zf(),d)));return Sa.set(i,c),c}async function Ni(e,t){const a=no,r=await Jf(e,t);return no!==a&&Kf(),r}const Qf=["onset","vowel","coda","glide"],Ei="none",eC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},tC="\uC5C6\uC74C";function nC(e){return Qf.includes(e)}function aC(e){const t={};for(const[a,r]of Object.entries(e)){const i=nC(a)?a:eC[a];i&&(t[i]=r===tC?Ei:r)}return t}const rC={\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"}},Di=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Si=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],oC=["","\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 Ta(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 sC(e){const t=Ta(e[0]||"");return t?Di[t.cho]:""}function iC(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=l=>Di.includes(l),r=l=>Si.includes(l),i=t.map(l=>a(l)?"cho":r(l)?"jung":Ta(l)?"syl":"other"),s=t.map(l=>Ta(l));if(i.includes("other")){const l=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(l)}return l=>{const u=[...l.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let m=0;m<t.length;m++){const p=u[c+m],f=i[m];if(f==="cho"){if(sC(p)!==t[m]){d=!1;break}}else if(f==="jung"){const b=Ta(p);if(!b||Si[b.jung]!==t[m]){d=!1;break}}else{const b=s[m];if(b&&b.jong===0){const v=Ta(p);if(!v||v.cho!==b.cho||v.jung!==b.jung){d=!1;break}}else if(p!==t[m]){d=!1;break}}}if(d)return!0}return!1}}const lC={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(lC).map(([e,t])=>[t.join(""),oC[Number(e)]]));const uC="word_pair_index_v2",cC="word_pair_index_sig_v2";let tr=null;function dC(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(i=>typeof i=="string"))return!1}return!0}function pC(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(uC),t=localStorage.getItem(cC);if(!e||!t)return null;const a=JSON.parse(e);return dC(a)?{index:a,sig:t}:null}catch{return null}}function mC(){if(tr)return tr;const e=pC();return e?(tr=e.index,e.sig,tr):null}function hC(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function fC(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 ro=/[ㄱ-ㅎ]/,CC=/[ㅏ-ㅣ]/;function Ti(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||ro.test(a)||CC.test(a))return a}return null}function gC(e){const t=Ti(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ro.test(t)?"\uC774":"\uAC00"}function bC(e){return`${e}${gC(e)}`}function yC(e){const t=Ti(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ro.test(t)?"\uC744":"\uB97C"}function vC(e){return`${e}${yC(e)}`}function xC(e,t,a){const r=e.slice(),[i]=r.splice(t,1);return r.splice(a,0,i),r}function ja(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const i=Math.floor(t()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a}const _C=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Rt?.t=="function"?Rt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function ji(e,t){if(t===void 0&&(t=_C()),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 wC="__ihab_core_word_pool__";function Mi(){return globalThis[wC]??null}const Li=globalThis;function $i(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function BC(e){$i("time",()=>Li.__ihabTrainingTimeLogger?.(e))}function kC(e){$i("completion",()=>Li.__ihabTrainingCompletionLogger?.(e))}const AC="Asia/Seoul",NC=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Ma(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 s=new Date(`${r}T00:00:00Z`);if(Number.isNaN(s.getTime())||s.toISOString().slice(0,10)!==r)return null}const i=NC.exec(a);t=new Date(i?`${i[1]}T${i[2]}:${i[3]??"00"}${i[4]?`.${i[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function EC(e){return Ma(e)!==null}const DC=e=>Ma(e);function Ri(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=DC(e);return r?r.toLocaleDateString(a,{timeZone:AC,year:"numeric",month:"short",day:"numeric"}):""}function SC(e,t,a){if(!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12)return`${e}-${t}`;const r=a&&a.startsWith("ko")?"ko-KR":a||"en-US";return new Intl.DateTimeFormat(r,{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function nr(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||SC(a,r,t)}function La(){return so(new Date)}function oo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Ma(e)?.toISOString().slice(0,10)===e?e:La()}function ia(){return jC(La())}const TC=540*60*1e3;function Pi(e,t,a){return new Date(Date.UTC(e,t,a)-TC)}function jC(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function so(e){if(e==null||e==="")return"";const t=Ma(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Ii(e,t){if(!e)return"";const a=Ma(e);if(!a)return"";const r=a.getTime(),i=Math.max(0,Math.floor((Date.now()-r)/1e3)),s=Math.floor(i/60),l=Math.floor(s/60),u=Math.floor(l/24),c=Math.floor(u/7),d=Math.floor(u/30),m=Math.floor(u/365);return s<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):s<60?t("store.time.minutesAgo",{n:s}):l<24?t("store.time.hoursAgo",{n:l}):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:m})}function Fi(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:i=!1,fallback:s="\u2014"}=t;if(!e)return s;const l=so(e instanceof Date?e:String(e));if(!l)return s;const[u,c,d]=l.split("-"),m=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${m}${a}${p}${i?".":""}`}function ar(e){if(typeof e=="string"){const t=e.trim();return t&&EC(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 Jt(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function MC(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 LC(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:Jt(r.contextCode)??Jt(r.itemId)??Jt(r.itemCode)??Jt(r.id),question:Jt(r.question)??Jt(r.q)??Jt(r.sentence)??Jt(r.text)??Jt(r.prompt)??Jt(r.word)??Jt(r.targetSyllable),answer:Jt(r.answer),selected:Jt(r.selectedText)??Jt(r.selected),correct:MC(r),shownAt:ar(r.shownAt)??ar(r.shown_at),answeredAt:ar(r.answeredAt)??ar(r.answered_at)}}):[]}const io=globalThis;async function $C(){try{return await io.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function lo(e){const t=a=>{};try{const a=io.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function rr(e){try{io.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function RC(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 la(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Oi(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),i=Number(a[2]),s=a[1].padStart(2,"0");return i===0?t("date.timeH",{h:r,hh:s,mm:a[2]}):t("date.timeHM",{h:r,hh:s,m:i,mm:a[2]})}function uo(e){return(e??0).toLocaleString("ko-KR")}const PC=[{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"}]}],IC=[{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 zi(){return PC}function FC(){return IC}const OC=[],zC=[],WC=[],HC=[];function VC(){return{LISTEN_IN_NOISE:OC,SHORT_STORY:zC,LONG_STORY:WC,ORDERING_SENTENCE:HC}}const qC=[{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."}],Wi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function UC(e){return qC.map(t=>{const a=Wi[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var GC={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",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."},KC={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"},YC={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"}},ZC={clearAriaLabel:"\uAC80\uC0C9\uC5B4 \uC9C0\uC6B0\uAE30"},XC={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},JC={selected:"\uC120\uD0DD\uB428"},QC={placeholder:"\uC120\uD0DD"},eg={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},tg={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"},ng={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"},ag={language:{training:{label:"\uD6C8\uB828 \uC5B8\uC5B4",sub:"\uD6C8\uB828\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uB2E8\uC5B4\uC640 \uC74C\uC131 \uC5B8\uC5B4"}},notifications:{title:"\uC54C\uB9BC"},display:{fontSize:{small:"\uC791\uAC8C",large:"\uD06C\uAC8C"}},cache:{title:"\uCE90\uC2DC \uAD00\uB9AC",confirmMessage:"\uCE90\uC2DC({{size}})\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",delete:"\uC0AD\uC81C",deleting:"\uC0AD\uC81C \uC911",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"},trainingRecord:{label:"\uD6C8\uB828 \uAE30\uB85D",sub:"\uC624\uB298\uC758 \uD6C8\uB828 \uC9C4\uD589\uB960 \uBC0F \uD559\uC2B5 \uC77C\uC218"}}},button:{save:"\uC124\uC815 \uC800\uC7A5"},popup:{clear:{confirm:"\uCD08\uAE30\uD654"},update:{confirm:"\uC5C5\uB370\uC774\uD2B8"},cache:{title:"{{label}} \uC0AD\uC81C",message:"{{label}}({{size}})\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"}},saved:"\u2713 \uC800\uC7A5\uB428",account:{title:"\uACC4\uC815",delete:{sub:"\uD0C8\uD1F4 \uD6C4 30\uC77C \uC774\uB0B4 \uC7AC\uAC00\uC785 \uC2DC \uBCF5\uAD6C \uAC00\uB2A5\uD569\uB2C8\uB2E4."}}},rg={addButton:"\uC774\uC6A9\uAD8C \uCD94\uAC00\uD558\uAE30",couponButton:"\uCFE0\uD3F0 \uC785\uB825",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026",segment:{personal:"\uB9D0\uADC0",org:"\uB9D0\uADC0\uB9E4\uB2C8\uC800"},org:{title:"\uD604\uC7AC \uC774\uC6A9\uAD8C",disc:"\uAE30\uAD00\uC5D0\uC11C \uC0AC\uC6A9 \uC911\uC778 \uC774\uC6A9\uAD8C \uC815\uBCF4\uC785\uB2C8\uB2E4.",empty:"\uB4F1\uB85D\uB41C \uAE30\uAD00 \uC774\uC6A9\uAD8C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",fallbackTitle:"\uAE30\uAD00 \uC774\uC6A9\uAD8C",startDate:"\uC2DC\uC791\uC77C",endDate:"\uB9CC\uB8CC\uC77C",remaining:"\uB0A8\uC740 \uAE30\uAC04",duration:"\uC774\uC6A9 \uAE30\uAC04"},active:{infoTitle:"\uC774\uC6A9 \uC815\uBCF4",refund:"\uD658\uBD88 \uC694\uCCAD",startDate:"\uC0AC\uC6A9 \uC2DC\uC791\uC77C",endDate:"\uC885\uB8CC\uC77C",remaining:"\uB0A8\uC740 \uAE30\uAC04"},pending:{title:"\uBCF4\uC720",empty:"\uB300\uAE30 \uC911\uC778 \uC774\uC6A9\uAD8C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}},og={profile:{planSuffix:"\uD50C\uB79C",plan:"\uD50C\uB79C"},basicInfo:{name:{placeholder:"\uD64D\uAE38\uB3D9"}},security:{title:"\uBCF4\uC548",password:{label:"\uBE44\uBC00\uBC88\uD638",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."},twoFactor:{label:"2\uB2E8\uACC4 \uC778\uC99D",sub:"\uACC4\uC815 \uBCF4\uC548\uC744 \uAC15\uD654\uD558\uC138\uC694"}}},sg={guide:{faq:{title:"\uC790\uC8FC \uBB3B\uB294 \uC9C8\uBB38",desc:"FAQ \uBAA8\uC544\uBCF4\uAE30"}}},ig={settings:"\uC124\uC815",start:{title:"\uB2E8\uC5B4\uD6C8\uB828 \uC2DC\uC791",description:"\uC544\uB798 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD574 \uC2DC\uC791\uD558\uC138\uC694"},difficulty:{tooltip:"\uAC00\uC7A5 \uC26C\uC6B4 \uB09C\uC774\uB3C4\uB294 '\uBB34\uC791\uC704', \uAC00\uC7A5 \uC5B4\uB824\uC6B4 \uB09C\uC774\uB3C4\uB294 '\uCD08\uC131\uCC28\uC774' \uC785\uB2C8\uB2E4."},contrast:{label:"\uB300\uB9BD",type:"\uB300\uB9BD \uC885\uB958",count:"\uB300\uB9BD \uAC2F\uC218",n:"{{n}}\uAC1C"},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",comingSoon:"\uC900\uBE44 \uC911",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",summary:"{{correct}}\uAC1C\uC758 \uBB38\uD56D\uC744 \uC798 \uB4E4\uC5C8\uC2B5\uB2C8\uB2E4.",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",viewResult:"\uACB0\uACFC \uD655\uC778",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:{idle:"\uB300\uAE30",resolving:"\uB9AC\uC18C\uC2A4 \uB9E4\uD551 \uC911\u2026",checking_exists:"\uD30C\uC77C \uC874\uC7AC \uD655\uC778\u2026",getting_signed_url:"\uC11C\uBA85 URL \uC870\uD68C\u2026",downloading:"\uB2E4\uC6B4\uB85C\uB4DC \uC911\u2026",measuring_duration:"\uC624\uB514\uC624 \uAE38\uC774 \uCE21\uC815\u2026",ready:"\uC900\uBE44 \uC644\uB8CC",error:"\uC624\uB958 \uBC1C\uC0DD",synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},lg={totalCount:"\uAC1C\uC758 \uD6C8\uB828 \uBB36\uC74C",renameGroup:"\uADF8\uB8F9 \uC774\uB984 \uBC14\uAFB8\uAE30",itemCount:"\uD6C8\uB828 \uAC1C\uC218",menu:{edit:"\uD6C8\uB828 \uBB36\uC74C \uC218\uC815",rename:"\uC774\uB984 \uBC14\uAFB8\uAE30",move:"\uADF8\uB8F9 \uC774\uB3D9",duplicate:"\uD6C8\uB828 \uBB36\uC74C \uBCF5\uC0AC",publish:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uC62C\uB9AC\uAE30"},sort:{customers:"\uD6C8\uB828 \uACE0\uAC1D"},copyLink:"\uB9C1\uD06C \uBCF5\uC0AC",removeLink:"\uB9C1\uD06C \uC81C\uAC70",linkRemoved:"\uB9C1\uD06C\uAC00 \uC81C\uAC70\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",linkSaveFirst:"\uBA3C\uC800 \uD6C8\uB828 \uBB36\uC74C\uC744 \uC800\uC7A5\uD574\uC8FC\uC138\uC694.",linkSaveFirstHint:"\uC800\uC7A5\uB41C \uD6C8\uB828 \uBB36\uC74C\uC5D0\uC11C\uB9CC \uACF5\uC720 \uB9C1\uD06C\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",linkCopySelect:"\uBCF5\uC0AC\uAC00 \uB9C9\uD600 \uB9C1\uD06C\uB97C \uC120\uD0DD\uD588\uC2B5\uB2C8\uB2E4. Ctrl/\u2318+C\uB85C \uBCF5\uC0AC\uD558\uC138\uC694.",nameRequired:"\uD6C8\uB828 \uBB36\uC74C \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694.",itemRequired:"\uD6C8\uB828\uC744 1\uAC1C \uC774\uC0C1 \uB2F4\uC544\uC8FC\uC138\uC694.",randomAdd:"\uBB34\uC791\uC704 \uCD94\uAC00"},ug={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",basicInfo:{editTooltip:"\uC218\uC815\uD558\uAE30"},member:{placeholder:"\uC774\uBA54\uC77C \uB610\uB294 \uC804\uD654",link:"\uC5F0\uACB0",linking:"\uC5F0\uACB0 \uC911\u2026"},device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addTooltip:"\uC0C8\uB85C \uC0DD\uC131",addButton:"\uAE30\uAE30 \uCD94\uAC00",listTooltip:"\uBAA9\uB85D \uBCF4\uAE30",listTitle:"\uCE21 \uAE30\uAE30 \uBAA9\uB85D",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",release:"\uD574\uC81C",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{title:"\uBC29\uBB38 \uC608\uC815",addTooltip:"\uC608\uC815 \uB4F1\uB85D",listTooltip:"\uC804\uCCB4 \uBCF4\uAE30",empty:"\uC608\uC815\uB41C \uBC29\uBB38\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D",memoPlaceholder:"\uBC29\uBB38 \uC608\uC815 \uAD00\uB828 \uBA54\uBAA8\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694."},visitHistory:{title:"\uBC29\uBB38 \uC774\uB825",addTooltip:"\uC2E0\uADDC \uB4F1\uB85D",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"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uC0C1\uD669",active:"\uD65C\uC131",inactive:"\uBE44\uD65C\uC131",copy:"\uB9C1\uD06C \uBCF5\uC0AC",copied:"\uB9C1\uD06C\uAC00 \uBCF5\uC0AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",visits:{title:"\uBC29\uBB38"},trainingRecord:{title:"\uACE0\uAC1D \uD6C8\uB828 \uAE30\uB85D"},status:{trainingSubtitle:"\uD6C8\uB828 \uD604\uD669"},detail:{session:{completedFmt:"\uC644\uB8CC {{done}}/{{total}} \xB7 {{duration}}"},visitSuffix:"\uC758 \uBC29\uBB38"},duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"}},cg={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"}}}},dg={title:"\uCFE0\uD3F0",subtitle:"\uCFE0\uD3F0 \uCF54\uB4DC\uB97C \uC785\uB825\uD558\uAC70\uB098 \uBCF4\uC720 \uCFE0\uD3F0\uC744 \uD655\uC778\uD558\uC138\uC694.",input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9",error:{invalid:"\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uCFE0\uD3F0 \uCF54\uB4DC\uC785\uB2C8\uB2E4.",alreadyUsed:"\uC774\uBBF8 \uC0AC\uC6A9\uB41C \uCFE0\uD3F0\uC785\uB2C8\uB2E4."},success:{applied:'"{{name}}" \uCFE0\uD3F0\uC774 \uC801\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.'},section:{owned:"\uBCF4\uC720 \uCFE0\uD3F0"},status:{used:"\uC0AC\uC6A9 \uC644\uB8CC",available:"\uC0AC\uC6A9 \uAC00\uB2A5"}},pg={unitVisit:"\uAC74",periodAll:"\uC804\uCCB4",showN:"{{n}}\uAC1C\uC529"},mg={subtitle:"\uC5C5\uCCB4 \uBC0F \uBC95\uC778 \uC815\uBCF4\uB97C \uAD00\uB9AC\uD558\uC138\uC694.",editButton:"\uC815\uBCF4 \uC218\uC815",basicInfo:{title:"\uAE30\uBCF8 \uC815\uBCF4"},contactInfo:{title:"\uC5F0\uB77D\uCC98 \uC815\uBCF4"}},hg={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."}},fg={comingSoon:"\uB2E8\uC5B4\uD6C8\uB828 \uAE30\uB2A5\uC744 \uC900\uBE44 \uC911\uC785\uB2C8\uB2E4."},Cg={colName:"\uB2E8\uC5B4\uD45C \uC774\uB984",open:"\uC5F4\uAE30",countSuffix:"\uAC1C\uC758 \uB2E8\uC5B4\uD45C",tab:{cards:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC",tables:"\uB2E8\uC5B4\uD45C"},cardsEmpty:"\uC544\uC9C1 \uB9CC\uB4E0 \uB2E8\uC5B4\uD45C \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",addCard:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC \uCD94\uAC00",menu:{publishStore:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uC62C\uB9AC\uAE30",unpublishStore:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0\uC11C \uB0B4\uB9AC\uAE30"},newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},gg={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},bg={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",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",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",store:{badge:"\uB9D0\uADC0\uC790\uB8CC\uC2E4"},card:{sub:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC",empty:"\uC774 \uCE74\uB4DC\uC5D0 \uB2E8\uC5B4\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},toast:{renameError:"\uC774\uB984 \uBCC0\uACBD\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",saveError:"\uC800\uC7A5\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",deleteError:"\uC0AD\uC81C\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",duplicateError:"\uBCF5\uC81C\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",saveSuccess:"\uB2E8\uC5B4\uD45C\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},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"}},yg={editBanner:{message:"\uC800\uC7A5\uD558\uBA74 \uC9C0\uAE08 \uC218\uC815 \uC911\uC778 \uB2E8\uC5B4\uD45C\uAC00 \uAC31\uC2E0\uB429\uB2C8\uB2E4."},filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",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",popup:{title:"{{n}}\uBC88 \uCE78\uC5D0 \uB123\uC744 \uB2E8\uC5B4\uB97C \uC120\uD0DD\uD558\uC138\uC694"}},vg={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},xg={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"}},_g={maxUses:"\uCD5C\uB300 \uC0AC\uC6A9 \uD69F\uC218 (\uBE44\uC6CC\uB450\uBA74 \uBB34\uC81C\uD55C)",redirect:"\uC774\uB3D9\uD560 \uD398\uC774\uC9C0 URL (\uBE44\uC6CC\uB450\uBA74 \uC571 \uBA54\uC778)",creating:"\uC0DD\uC131 \uC911\u2026",create:"\uB9C1\uD06C \uC0DD\uC131",created:"\u2713 \uB9C1\uD06C\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4",copied:"\uBCF5\uC0AC\uB428!",copy:"\uBCF5\uC0AC",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026",empty:"\uC0DD\uC131\uB41C \uB9C1\uD06C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",uses:"{{count}}\uD68C \uC0AC\uC6A9",expiresAt:"\uB9CC\uB8CC: {{date}}",createdAt:"\uC0DD\uC131: {{date}}",confirmDelete:"\uC0AD\uC81C\uD560\uAE4C\uC694?",deactivate:"\uBE44\uD65C\uC131\uD654",delete:"\uC0AD\uC81C",status:{active:"\uC720\uD6A8",expired:"\uB9CC\uB8CC",inactive:"\uBE44\uD65C\uC131"}},wg={passwordPlaceholder:"\uBE44\uBC00\uBC88\uD638 \uC785\uB825"},Bg={subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uC5EC \uB4E3\uAE30 \uC5F0\uC2B5\uC744 \uC9C4\uD589\uD558\uC138\uC694."},kg={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",validationError:{brandAndProduct:"\uBE0C\uB79C\uB4DC\uC640 \uC81C\uD488\uBA85\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."},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"}},Ag={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",daily:"\uC77C\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"},subscriptionStatus:{active:"{{pct}}% \uD65C\uC131",expired:"{{pct}}% \uB9CC\uB8CC",unused:"{{pct}}% \uBBF8\uC0AC\uC6A9"}},Ng={editBanner:{message:"\uC800\uC7A5\uD558\uBA74 \uC9C0\uAE08 \uC218\uC815 \uC911\uC778 \uB300\uB9BD\uC30D\uD45C\uAC00 \uAC31\uC2E0\uB429\uB2C8\uB2E4."},phonemeSelect:{title:"\uC74C\uC18C \uC120\uD0DD",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",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},searchLabel:{error:"\uB370\uC774\uD130 \uBD88\uB7EC\uC624\uAE30 \uC2E4\uD328",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},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."]},Eg={sentenceTyping:{roundCount:"{{rounds}}\uBB38\uC81C \xB7 \uBB38\uC81C\uB2F9 {{timeLimit}}\uCD08"},wordDefense:{me:"\uB098"},dictation:{title:"\uBC1B\uC544\uC4F0\uAE30",desc:"\uBB38\uC7A5\uC744 \uB4E3\uACE0 \uC815\uD655\uD788 \uBC1B\uC544\uC801\uB294 \uC5F0\uC2B5\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC74C\uC131 \uC7AC\uC0DD, \uC785\uB825 \uD544\uB4DC, \uC815\uB2F5 \uBE44\uAD50"},result:{heading:"{{number}}\uB2E8\uACC4 \uD574\uB2F5",retry:"\uB2E4\uC2DC \uD480\uAE30"},common:{accuracy:"{{pct}}% \uC815\uD655\uB3C4"},soundMatch:{title:"\uC18C\uB9AC \uB9E4\uCE6D",desc:"\uAC19\uC740 \uC18C\uB9AC\uB97C \uAC00\uC9C4 \uB2E8\uC5B4 \uB610\uB294 \uBB38\uC7A5\uC744 \uBE60\uB974\uAC8C \uB9E4\uCE6D\uD558\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uD50C\uB808\uC774 \uBC84\uD2BC, \uD0C0\uC774\uBA38, \uC810\uC218 \uC9D1\uACC4"},orderSequence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uD769\uC5B4\uC9C4 \uBB38\uC7A5 \uC870\uAC01\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uBB38\uC7A5 \uC138\uD2B8, \uC21C\uC11C \uD655\uC778 \uC778\uD130\uD398\uC774\uC2A4"},speedListen:{title:"\uC18D\uB3C4 \uB4E3\uAE30",desc:"\uC2DC\uAC04 \uC81C\uD55C \uB0B4\uC5D0 \uBB38\uC7A5\uC758 \uB2E8\uC5B4 \uC218\uB97C \uB9DE\uCD94\uB294 \uB3C4\uC804\uD615 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC81C\uD55C\uC2DC\uAC04, \uC810\uC218\uD310"},noiseChallenge:{title:"\uC18C\uC74C \uCC4C\uB9B0\uC9C0",desc:"\uBC30\uACBD \uC18C\uC74C \uC18D\uC5D0\uC11C \uBB38\uC7A5\uC744 \uBD84\uBCC4\uD558\uB294 \uC5F0\uC2B5\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uB2E4\uC591\uD55C \uC18C\uC74C \uB808\uBCA8, \uC810\uC218 \uC9D1\uACC4"},fastListen:{title:"\uBE60\uB978 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uBB38\uC7A5\uC744 \uBE60\uB974\uAC8C \uB4E4\uB824\uC8FC\uACE0 \uD575\uC2EC \uB2E8\uC5B4\uB97C \uC120\uD0DD\uD558\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uB09C\uC774\uB3C4\uBCC4 \uC18D\uB3C4, \uD0C0\uC774\uBA38"},shadowing:{title:"\uC250\uB3C4\uC789",desc:"\uBB38\uC7A5\uC744 \uB530\uB77C \uB9D0\uD558\uBA70 \uBC1C\uC74C\uACFC \uC5B5\uC591\uC744 \uC5F0\uC2B5\uD558\uB294 \uBAA8\uB4DC\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC7AC\uC0DD, \uB179\uC74C, \uBE44\uAD50 \uD53C\uB4DC\uBC31"},phonemeHunt:{title:"\uC74C\uC6B4 \uCC3E\uAE30",desc:"\uD2B9\uC815 \uC74C\uC6B4(\uBC1C\uC74C)\uC744 \uD3EC\uD568\uD55C \uB2E8\uC5B4\uB97C \uCC3E\uC544\uB0B4\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC74C\uC6B4 \uD544\uD130, \uD78C\uD2B8 \uAE30\uB2A5"}},Dg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
847
+ `),this.name="StorageNotConfiguredError"}};function Rf(e){$f(e)}function yi(e,t){if(!e)return null;const a=Aa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function vi(e){if(!e)return null;const t=Aa();if(!t)throw new bi("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function xi(e){const t=Aa();if(!t)throw new bi("downloadSound");return t.download(e)}function Pf(){return Aa()?.noiseBaseUrl??"/sounds/noise"}function If(){const e=Number(Aa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Ff(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}const _i="__ihab_core_tts_config__";function Na(){return globalThis[_i]?.urlResolver??null}function Xr(){return globalThis[_i]?.fallbackUrlResolver??null}const Of="__ihab_core_pronunciation_resolver__";function zf(){return globalThis[Of]??null}let Rn=null;const Ea=new WeakMap,Jr=new WeakMap,Qr=new WeakMap;let wi=!1;const Bi=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Wf(){if(wi||typeof document>"u")return;wi=!0;const e=()=>{try{Rn&&Rn.state!=="running"&&Rn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function ki(){if(Rn)return Rn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Rn=new e,Wf(),Rn):null}catch{return null}}function eo(){try{Rn?.resume()}catch{}}function to(e,t){const a=Ea.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),i=e.createGain(),s=e.createAnalyser();s.fftSize=1024,s.smoothingTimeConstant=.6,i.gain.value=Bi(Jr.get(t)??t.volume),r.connect(i),i.connect(s),i.connect(e.destination);try{t.volume=1}catch{}const l={gain:i,analyser:s};return Ea.set(t,l),l}catch{return null}}function Qa(e){if(!e)return Promise.resolve(null);const t=Ea.get(e);if(t)return Promise.resolve(t.analyser);const a=ki();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(to(a,e)?.analyser??null);const r=Qr.get(e);if(r)return r;const i=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?to(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{Qr.delete(e)});return Qr.set(e,i),i}function Hf(e){if(!e)return null;const t=Ea.get(e);if(t)return t.analyser;const a=ki();return a?a.state==="running"?to(a,e)?.analyser??null:(Qa(e),null):null}function Pn(e,t){const a=Bi(t);Jr.set(e,a);const r=Ea.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const i=r.gain.gain;try{const s=r.gain.context.currentTime;i.cancelScheduledValues(s),i.setTargetAtTime(a,s,.01)}catch{try{i.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function er(e){return Jr.get(e)??e.volume}function Vf(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const i=t[r];a+=i*i}return Math.sqrt(a/t.length)}const qf="__ihab_core_image_config__";function sa(){return globalThis[qf]??null}const Ai="word_image_existence_map_v1",Uf="ihab:image-existence-updated";let Da=null;function Gf(){Da!==null&&(clearTimeout(Da),Da=null),typeof window<"u"&&window.dispatchEvent(new Event(Uf))}function Kf(){Da===null&&(Da=setTimeout(Gf,200))}let Un=null,no=0;const Sa=new Map;function Yf(){if(Un)return Un;try{const e=typeof localStorage<"u"?localStorage.getItem(Ai):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,i]of Object.entries(t))typeof i=="boolean"&&(a[r]=i);Un=a}catch{Un={}}return Un}let ao=null;function Zf(){ao===null&&(ao=setTimeout(()=>{ao=null;try{typeof localStorage<"u"&&Un&&localStorage.setItem(Ai,JSON.stringify(Un))}catch{}},200))}function Xf(e,t){return`${e}_${t??1}`}async function Jf(e,t,a=!1){const r=Yf(),i=Xf(e,t);if(!a&&i in r)return r[i];if(!a&&Sa.has(i))return Sa.get(i);const s=sa();if(!s)return!1;let l;try{l=s(e,t)}catch{return!1}if(!l)return!1;let u;try{u=fetch(l,{method:"HEAD",signal:Ff(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:d.status===404||d.status===410?!1:null,()=>null).then(d=>Sa.get(i)!==c?d??!1:(Sa.delete(i),d===null?!1:(r[i]=d,no++,Zf(),d)));return Sa.set(i,c),c}async function Ni(e,t){const a=no,r=await Jf(e,t);return no!==a&&Kf(),r}const Qf=["onset","vowel","coda","glide"],Ei="none",eC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},tC="\uC5C6\uC74C";function nC(e){return Qf.includes(e)}function aC(e){const t={};for(const[a,r]of Object.entries(e)){const i=nC(a)?a:eC[a];i&&(t[i]=r===tC?Ei:r)}return t}const rC={\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"}},Di=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Si=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],oC=["","\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 Ta(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 sC(e){const t=Ta(e[0]||"");return t?Di[t.cho]:""}function iC(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=l=>Di.includes(l),r=l=>Si.includes(l),i=t.map(l=>a(l)?"cho":r(l)?"jung":Ta(l)?"syl":"other"),s=t.map(l=>Ta(l));if(i.includes("other")){const l=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(l)}return l=>{const u=[...l.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let m=0;m<t.length;m++){const p=u[c+m],f=i[m];if(f==="cho"){if(sC(p)!==t[m]){d=!1;break}}else if(f==="jung"){const b=Ta(p);if(!b||Si[b.jung]!==t[m]){d=!1;break}}else{const b=s[m];if(b&&b.jong===0){const v=Ta(p);if(!v||v.cho!==b.cho||v.jung!==b.jung){d=!1;break}}else if(p!==t[m]){d=!1;break}}}if(d)return!0}return!1}}const lC={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(lC).map(([e,t])=>[t.join(""),oC[Number(e)]]));const uC="word_pair_index_v2",cC="word_pair_index_sig_v2";let tr=null;function dC(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(i=>typeof i=="string"))return!1}return!0}function pC(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(uC),t=localStorage.getItem(cC);if(!e||!t)return null;const a=JSON.parse(e);return dC(a)?{index:a,sig:t}:null}catch{return null}}function mC(){if(tr)return tr;const e=pC();return e?(tr=e.index,e.sig,tr):null}function hC(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function fC(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 ro=/[ㄱ-ㅎ]/,CC=/[ㅏ-ㅣ]/;function Ti(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||ro.test(a)||CC.test(a))return a}return null}function gC(e){const t=Ti(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ro.test(t)?"\uC774":"\uAC00"}function bC(e){return`${e}${gC(e)}`}function yC(e){const t=Ti(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ro.test(t)?"\uC744":"\uB97C"}function vC(e){return`${e}${yC(e)}`}function xC(e,t,a){const r=e.slice(),[i]=r.splice(t,1);return r.splice(a,0,i),r}function ja(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const i=Math.floor(t()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a}const _C=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Rt?.t=="function"?Rt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function ji(e,t){if(t===void 0&&(t=_C()),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 wC="__ihab_core_word_pool__";function Mi(){return globalThis[wC]??null}const Li=globalThis;function $i(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function BC(e){$i("time",()=>Li.__ihabTrainingTimeLogger?.(e))}function kC(e){$i("completion",()=>Li.__ihabTrainingCompletionLogger?.(e))}const AC="Asia/Seoul",NC=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Ma(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 s=new Date(`${r}T00:00:00Z`);if(Number.isNaN(s.getTime())||s.toISOString().slice(0,10)!==r)return null}const i=NC.exec(a);t=new Date(i?`${i[1]}T${i[2]}:${i[3]??"00"}${i[4]?`.${i[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function EC(e){return Ma(e)!==null}const DC=e=>Ma(e);function Ri(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=DC(e);return r?r.toLocaleDateString(a,{timeZone:AC,year:"numeric",month:"short",day:"numeric"}):""}function SC(e,t,a){if(!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12)return`${e}-${t}`;const r=a&&a.startsWith("ko")?"ko-KR":a||"en-US";return new Intl.DateTimeFormat(r,{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function nr(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||SC(a,r,t)}function La(){return so(new Date)}function oo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Ma(e)?.toISOString().slice(0,10)===e?e:La()}function ia(){return jC(La())}const TC=540*60*1e3;function Pi(e,t,a){return new Date(Date.UTC(e,t,a)-TC)}function jC(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function so(e){if(e==null||e==="")return"";const t=Ma(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Ii(e,t){if(!e)return"";const a=Ma(e);if(!a)return"";const r=a.getTime(),i=Math.max(0,Math.floor((Date.now()-r)/1e3)),s=Math.floor(i/60),l=Math.floor(s/60),u=Math.floor(l/24),c=Math.floor(u/7),d=Math.floor(u/30),m=Math.floor(u/365);return s<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):s<60?t("store.time.minutesAgo",{n:s}):l<24?t("store.time.hoursAgo",{n:l}):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:m})}function Fi(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:i=!1,fallback:s="\u2014"}=t;if(!e)return s;const l=so(e instanceof Date?e:String(e));if(!l)return s;const[u,c,d]=l.split("-"),m=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${m}${a}${p}${i?".":""}`}function ar(e){if(typeof e=="string"){const t=e.trim();return t&&EC(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 Jt(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function MC(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 LC(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:Jt(r.contextCode)??Jt(r.itemId)??Jt(r.itemCode)??Jt(r.id),question:Jt(r.question)??Jt(r.q)??Jt(r.sentence)??Jt(r.text)??Jt(r.prompt)??Jt(r.word)??Jt(r.targetSyllable),answer:Jt(r.answer),selected:Jt(r.selectedText)??Jt(r.selected),correct:MC(r),shownAt:ar(r.shownAt)??ar(r.shown_at),answeredAt:ar(r.answeredAt)??ar(r.answered_at)}}):[]}const io=globalThis;async function $C(){try{return await io.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function lo(e){const t=a=>{};try{const a=io.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function rr(e){try{io.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function RC(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 la(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Oi(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),i=Number(a[2]),s=a[1].padStart(2,"0");return i===0?t("date.timeH",{h:r,hh:s,mm:a[2]}):t("date.timeHM",{h:r,hh:s,m:i,mm:a[2]})}function uo(e){return(e??0).toLocaleString("ko-KR")}const PC=[{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"}]}],IC=[{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 zi(){return PC}function FC(){return IC}const OC=[],zC=[],WC=[],HC=[];function VC(){return{LISTEN_IN_NOISE:OC,SHORT_STORY:zC,LONG_STORY:WC,ORDERING_SENTENCE:HC}}const qC=[{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."}],Wi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function UC(e){return qC.map(t=>{const a=Wi[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var GC={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",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."},KC={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"},YC={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"}},ZC={clearAriaLabel:"\uAC80\uC0C9\uC5B4 \uC9C0\uC6B0\uAE30"},XC={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},JC={selected:"\uC120\uD0DD\uB428"},QC={placeholder:"\uC120\uD0DD"},eg={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},tg={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"},ng={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"},ag={language:{training:{label:"\uD6C8\uB828 \uC5B8\uC5B4",sub:"\uD6C8\uB828\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uB2E8\uC5B4\uC640 \uC74C\uC131 \uC5B8\uC5B4"}},notifications:{title:"\uC54C\uB9BC"},display:{fontSize:{small:"\uC791\uAC8C",large:"\uD06C\uAC8C"}},cache:{title:"\uCE90\uC2DC \uAD00\uB9AC",confirmMessage:"\uCE90\uC2DC({{size}})\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",delete:"\uC0AD\uC81C",deleting:"\uC0AD\uC81C \uC911",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"},trainingRecord:{label:"\uD6C8\uB828 \uAE30\uB85D",sub:"\uC624\uB298\uC758 \uD6C8\uB828 \uC9C4\uD589\uB960 \uBC0F \uD559\uC2B5 \uC77C\uC218"}}},button:{save:"\uC124\uC815 \uC800\uC7A5"},popup:{clear:{confirm:"\uCD08\uAE30\uD654"},update:{confirm:"\uC5C5\uB370\uC774\uD2B8"},cache:{title:"{{label}} \uC0AD\uC81C",message:"{{label}}({{size}})\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"}},saved:"\u2713 \uC800\uC7A5\uB428",account:{title:"\uACC4\uC815",delete:{sub:"\uD0C8\uD1F4 \uD6C4 30\uC77C \uC774\uB0B4 \uC7AC\uAC00\uC785 \uC2DC \uBCF5\uAD6C \uAC00\uB2A5\uD569\uB2C8\uB2E4."}}},rg={addButton:"\uC774\uC6A9\uAD8C \uCD94\uAC00\uD558\uAE30",couponButton:"\uCFE0\uD3F0 \uC785\uB825",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026",segment:{personal:"\uB9D0\uADC0",org:"\uB9D0\uADC0\uB9E4\uB2C8\uC800"},org:{title:"\uD604\uC7AC \uC774\uC6A9\uAD8C",disc:"\uAE30\uAD00\uC5D0\uC11C \uC0AC\uC6A9 \uC911\uC778 \uC774\uC6A9\uAD8C \uC815\uBCF4\uC785\uB2C8\uB2E4.",empty:"\uB4F1\uB85D\uB41C \uAE30\uAD00 \uC774\uC6A9\uAD8C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",fallbackTitle:"\uAE30\uAD00 \uC774\uC6A9\uAD8C",startDate:"\uC2DC\uC791\uC77C",endDate:"\uB9CC\uB8CC\uC77C",remaining:"\uB0A8\uC740 \uAE30\uAC04",duration:"\uC774\uC6A9 \uAE30\uAC04"},active:{infoTitle:"\uC774\uC6A9 \uC815\uBCF4",refund:"\uD658\uBD88 \uC694\uCCAD",startDate:"\uC0AC\uC6A9 \uC2DC\uC791\uC77C",endDate:"\uC885\uB8CC\uC77C",remaining:"\uB0A8\uC740 \uAE30\uAC04"},pending:{title:"\uBCF4\uC720",empty:"\uB300\uAE30 \uC911\uC778 \uC774\uC6A9\uAD8C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}},og={profile:{planSuffix:"\uD50C\uB79C",plan:"\uD50C\uB79C"},basicInfo:{name:{placeholder:"\uD64D\uAE38\uB3D9"}},security:{title:"\uBCF4\uC548",password:{label:"\uBE44\uBC00\uBC88\uD638",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."},twoFactor:{label:"2\uB2E8\uACC4 \uC778\uC99D",sub:"\uACC4\uC815 \uBCF4\uC548\uC744 \uAC15\uD654\uD558\uC138\uC694"}}},sg={guide:{faq:{title:"\uC790\uC8FC \uBB3B\uB294 \uC9C8\uBB38",desc:"FAQ \uBAA8\uC544\uBCF4\uAE30"}}},ig={settings:"\uC124\uC815",start:{title:"\uB2E8\uC5B4\uD6C8\uB828 \uC2DC\uC791",description:"\uC544\uB798 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD574 \uC2DC\uC791\uD558\uC138\uC694"},difficulty:{tooltip:"\uAC00\uC7A5 \uC26C\uC6B4 \uB09C\uC774\uB3C4\uB294 '\uBB34\uC791\uC704', \uAC00\uC7A5 \uC5B4\uB824\uC6B4 \uB09C\uC774\uB3C4\uB294 '\uCD08\uC131\uCC28\uC774' \uC785\uB2C8\uB2E4."},contrast:{label:"\uB300\uB9BD",type:"\uB300\uB9BD \uC885\uB958",count:"\uB300\uB9BD \uAC2F\uC218",n:"{{n}}\uAC1C"},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",comingSoon:"\uC900\uBE44 \uC911",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",summary:"{{correct}}\uAC1C\uC758 \uBB38\uD56D\uC744 \uC798 \uB4E4\uC5C8\uC2B5\uB2C8\uB2E4.",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",viewResult:"\uACB0\uACFC \uD655\uC778",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:{idle:"\uB300\uAE30",resolving:"\uB9AC\uC18C\uC2A4 \uB9E4\uD551 \uC911\u2026",checking_exists:"\uD30C\uC77C \uC874\uC7AC \uD655\uC778\u2026",getting_signed_url:"\uC11C\uBA85 URL \uC870\uD68C\u2026",downloading:"\uB2E4\uC6B4\uB85C\uB4DC \uC911\u2026",measuring_duration:"\uC624\uB514\uC624 \uAE38\uC774 \uCE21\uC815\u2026",ready:"\uC900\uBE44 \uC644\uB8CC",error:"\uC624\uB958 \uBC1C\uC0DD",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"}},lg={totalCount:"\uAC1C\uC758 \uD6C8\uB828 \uBB36\uC74C",renameGroup:"\uADF8\uB8F9 \uC774\uB984 \uBC14\uAFB8\uAE30",itemCount:"\uD6C8\uB828 \uAC1C\uC218",menu:{edit:"\uD6C8\uB828 \uBB36\uC74C \uC218\uC815",rename:"\uC774\uB984 \uBC14\uAFB8\uAE30",move:"\uADF8\uB8F9 \uC774\uB3D9",duplicate:"\uD6C8\uB828 \uBB36\uC74C \uBCF5\uC0AC",publish:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uC62C\uB9AC\uAE30"},sort:{customers:"\uD6C8\uB828 \uACE0\uAC1D"},copyLink:"\uB9C1\uD06C \uBCF5\uC0AC",removeLink:"\uB9C1\uD06C \uC81C\uAC70",linkRemoved:"\uB9C1\uD06C\uAC00 \uC81C\uAC70\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",linkSaveFirst:"\uBA3C\uC800 \uD6C8\uB828 \uBB36\uC74C\uC744 \uC800\uC7A5\uD574\uC8FC\uC138\uC694.",linkSaveFirstHint:"\uC800\uC7A5\uB41C \uD6C8\uB828 \uBB36\uC74C\uC5D0\uC11C\uB9CC \uACF5\uC720 \uB9C1\uD06C\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",linkCopySelect:"\uBCF5\uC0AC\uAC00 \uB9C9\uD600 \uB9C1\uD06C\uB97C \uC120\uD0DD\uD588\uC2B5\uB2C8\uB2E4. Ctrl/\u2318+C\uB85C \uBCF5\uC0AC\uD558\uC138\uC694.",nameRequired:"\uD6C8\uB828 \uBB36\uC74C \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694.",itemRequired:"\uD6C8\uB828\uC744 1\uAC1C \uC774\uC0C1 \uB2F4\uC544\uC8FC\uC138\uC694.",randomAdd:"\uBB34\uC791\uC704 \uCD94\uAC00"},ug={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",basicInfo:{editTooltip:"\uC218\uC815\uD558\uAE30"},member:{placeholder:"\uC774\uBA54\uC77C \uB610\uB294 \uC804\uD654",link:"\uC5F0\uACB0",linking:"\uC5F0\uACB0 \uC911\u2026"},device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addTooltip:"\uC0C8\uB85C \uC0DD\uC131",addButton:"\uAE30\uAE30 \uCD94\uAC00",listTooltip:"\uBAA9\uB85D \uBCF4\uAE30",listTitle:"\uCE21 \uAE30\uAE30 \uBAA9\uB85D",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",release:"\uD574\uC81C",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{title:"\uBC29\uBB38 \uC608\uC815",addTooltip:"\uC608\uC815 \uB4F1\uB85D",listTooltip:"\uC804\uCCB4 \uBCF4\uAE30",empty:"\uC608\uC815\uB41C \uBC29\uBB38\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D",memoPlaceholder:"\uBC29\uBB38 \uC608\uC815 \uAD00\uB828 \uBA54\uBAA8\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694."},visitHistory:{title:"\uBC29\uBB38 \uC774\uB825",addTooltip:"\uC2E0\uADDC \uB4F1\uB85D",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"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uC0C1\uD669",active:"\uD65C\uC131",inactive:"\uBE44\uD65C\uC131",copy:"\uB9C1\uD06C \uBCF5\uC0AC",copied:"\uB9C1\uD06C\uAC00 \uBCF5\uC0AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",visits:{title:"\uBC29\uBB38"},trainingRecord:{title:"\uACE0\uAC1D \uD6C8\uB828 \uAE30\uB85D"},status:{trainingSubtitle:"\uD6C8\uB828 \uD604\uD669"},detail:{session:{completedFmt:"\uC644\uB8CC {{done}}/{{total}} \xB7 {{duration}}"},visitSuffix:"\uC758 \uBC29\uBB38"},duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"}},cg={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"}}}},dg={title:"\uCFE0\uD3F0",subtitle:"\uCFE0\uD3F0 \uCF54\uB4DC\uB97C \uC785\uB825\uD558\uAC70\uB098 \uBCF4\uC720 \uCFE0\uD3F0\uC744 \uD655\uC778\uD558\uC138\uC694.",input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9",error:{invalid:"\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uCFE0\uD3F0 \uCF54\uB4DC\uC785\uB2C8\uB2E4.",alreadyUsed:"\uC774\uBBF8 \uC0AC\uC6A9\uB41C \uCFE0\uD3F0\uC785\uB2C8\uB2E4."},success:{applied:'"{{name}}" \uCFE0\uD3F0\uC774 \uC801\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.'},section:{owned:"\uBCF4\uC720 \uCFE0\uD3F0"},status:{used:"\uC0AC\uC6A9 \uC644\uB8CC",available:"\uC0AC\uC6A9 \uAC00\uB2A5"}},pg={unitVisit:"\uAC74",periodAll:"\uC804\uCCB4",showN:"{{n}}\uAC1C\uC529"},mg={subtitle:"\uC5C5\uCCB4 \uBC0F \uBC95\uC778 \uC815\uBCF4\uB97C \uAD00\uB9AC\uD558\uC138\uC694.",editButton:"\uC815\uBCF4 \uC218\uC815",basicInfo:{title:"\uAE30\uBCF8 \uC815\uBCF4"},contactInfo:{title:"\uC5F0\uB77D\uCC98 \uC815\uBCF4"}},hg={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."}},fg={comingSoon:"\uB2E8\uC5B4\uD6C8\uB828 \uAE30\uB2A5\uC744 \uC900\uBE44 \uC911\uC785\uB2C8\uB2E4."},Cg={colName:"\uB2E8\uC5B4\uD45C \uC774\uB984",open:"\uC5F4\uAE30",countSuffix:"\uAC1C\uC758 \uB2E8\uC5B4\uD45C",tab:{cards:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC",tables:"\uB2E8\uC5B4\uD45C"},cardsEmpty:"\uC544\uC9C1 \uB9CC\uB4E0 \uB2E8\uC5B4\uD45C \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",addCard:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC \uCD94\uAC00",menu:{publishStore:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uC62C\uB9AC\uAE30",unpublishStore:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0\uC11C \uB0B4\uB9AC\uAE30"},newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},gg={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},bg={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",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",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",store:{badge:"\uB9D0\uADC0\uC790\uB8CC\uC2E4"},card:{sub:"\uB2E8\uC5B4\uD45C \uCE74\uB4DC",empty:"\uC774 \uCE74\uB4DC\uC5D0 \uB2E8\uC5B4\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},toast:{renameError:"\uC774\uB984 \uBCC0\uACBD\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",saveError:"\uC800\uC7A5\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",deleteError:"\uC0AD\uC81C\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",duplicateError:"\uBCF5\uC81C\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",saveSuccess:"\uB2E8\uC5B4\uD45C\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},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"}},yg={editBanner:{message:"\uC800\uC7A5\uD558\uBA74 \uC9C0\uAE08 \uC218\uC815 \uC911\uC778 \uB2E8\uC5B4\uD45C\uAC00 \uAC31\uC2E0\uB429\uB2C8\uB2E4."},filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",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",popup:{title:"{{n}}\uBC88 \uCE78\uC5D0 \uB123\uC744 \uB2E8\uC5B4\uB97C \uC120\uD0DD\uD558\uC138\uC694"}},vg={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},xg={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"}},_g={maxUses:"\uCD5C\uB300 \uC0AC\uC6A9 \uD69F\uC218 (\uBE44\uC6CC\uB450\uBA74 \uBB34\uC81C\uD55C)",redirect:"\uC774\uB3D9\uD560 \uD398\uC774\uC9C0 URL (\uBE44\uC6CC\uB450\uBA74 \uC571 \uBA54\uC778)",creating:"\uC0DD\uC131 \uC911\u2026",create:"\uB9C1\uD06C \uC0DD\uC131",created:"\u2713 \uB9C1\uD06C\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4",copied:"\uBCF5\uC0AC\uB428!",copy:"\uBCF5\uC0AC",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026",empty:"\uC0DD\uC131\uB41C \uB9C1\uD06C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",uses:"{{count}}\uD68C \uC0AC\uC6A9",expiresAt:"\uB9CC\uB8CC: {{date}}",createdAt:"\uC0DD\uC131: {{date}}",confirmDelete:"\uC0AD\uC81C\uD560\uAE4C\uC694?",deactivate:"\uBE44\uD65C\uC131\uD654",delete:"\uC0AD\uC81C",status:{active:"\uC720\uD6A8",expired:"\uB9CC\uB8CC",inactive:"\uBE44\uD65C\uC131"}},wg={passwordPlaceholder:"\uBE44\uBC00\uBC88\uD638 \uC785\uB825"},Bg={subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uC5EC \uB4E3\uAE30 \uC5F0\uC2B5\uC744 \uC9C4\uD589\uD558\uC138\uC694."},kg={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",validationError:{brandAndProduct:"\uBE0C\uB79C\uB4DC\uC640 \uC81C\uD488\uBA85\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."},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"}},Ag={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",daily:"\uC77C\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"},subscriptionStatus:{active:"{{pct}}% \uD65C\uC131",expired:"{{pct}}% \uB9CC\uB8CC",unused:"{{pct}}% \uBBF8\uC0AC\uC6A9"}},Ng={editBanner:{message:"\uC800\uC7A5\uD558\uBA74 \uC9C0\uAE08 \uC218\uC815 \uC911\uC778 \uB300\uB9BD\uC30D\uD45C\uAC00 \uAC31\uC2E0\uB429\uB2C8\uB2E4."},phonemeSelect:{title:"\uC74C\uC18C \uC120\uD0DD",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",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},searchLabel:{error:"\uB370\uC774\uD130 \uBD88\uB7EC\uC624\uAE30 \uC2E4\uD328",loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},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."]},Eg={sentenceTyping:{roundCount:"{{rounds}}\uBB38\uC81C \xB7 \uBB38\uC81C\uB2F9 {{timeLimit}}\uCD08"},wordDefense:{me:"\uB098"},dictation:{title:"\uBC1B\uC544\uC4F0\uAE30",desc:"\uBB38\uC7A5\uC744 \uB4E3\uACE0 \uC815\uD655\uD788 \uBC1B\uC544\uC801\uB294 \uC5F0\uC2B5\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC74C\uC131 \uC7AC\uC0DD, \uC785\uB825 \uD544\uB4DC, \uC815\uB2F5 \uBE44\uAD50"},result:{heading:"{{number}}\uB2E8\uACC4 \uD574\uB2F5",retry:"\uB2E4\uC2DC \uD480\uAE30"},common:{accuracy:"{{pct}}% \uC815\uD655\uB3C4"},soundMatch:{title:"\uC18C\uB9AC \uB9E4\uCE6D",desc:"\uAC19\uC740 \uC18C\uB9AC\uB97C \uAC00\uC9C4 \uB2E8\uC5B4 \uB610\uB294 \uBB38\uC7A5\uC744 \uBE60\uB974\uAC8C \uB9E4\uCE6D\uD558\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uD50C\uB808\uC774 \uBC84\uD2BC, \uD0C0\uC774\uBA38, \uC810\uC218 \uC9D1\uACC4"},orderSequence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uD769\uC5B4\uC9C4 \uBB38\uC7A5 \uC870\uAC01\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uBB38\uC7A5 \uC138\uD2B8, \uC21C\uC11C \uD655\uC778 \uC778\uD130\uD398\uC774\uC2A4"},speedListen:{title:"\uC18D\uB3C4 \uB4E3\uAE30",desc:"\uC2DC\uAC04 \uC81C\uD55C \uB0B4\uC5D0 \uBB38\uC7A5\uC758 \uB2E8\uC5B4 \uC218\uB97C \uB9DE\uCD94\uB294 \uB3C4\uC804\uD615 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC81C\uD55C\uC2DC\uAC04, \uC810\uC218\uD310"},noiseChallenge:{title:"\uC18C\uC74C \uCC4C\uB9B0\uC9C0",desc:"\uBC30\uACBD \uC18C\uC74C \uC18D\uC5D0\uC11C \uBB38\uC7A5\uC744 \uBD84\uBCC4\uD558\uB294 \uC5F0\uC2B5\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uB2E4\uC591\uD55C \uC18C\uC74C \uB808\uBCA8, \uC810\uC218 \uC9D1\uACC4"},fastListen:{title:"\uBE60\uB978 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uBB38\uC7A5\uC744 \uBE60\uB974\uAC8C \uB4E4\uB824\uC8FC\uACE0 \uD575\uC2EC \uB2E8\uC5B4\uB97C \uC120\uD0DD\uD558\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uB09C\uC774\uB3C4\uBCC4 \uC18D\uB3C4, \uD0C0\uC774\uBA38"},shadowing:{title:"\uC250\uB3C4\uC789",desc:"\uBB38\uC7A5\uC744 \uB530\uB77C \uB9D0\uD558\uBA70 \uBC1C\uC74C\uACFC \uC5B5\uC591\uC744 \uC5F0\uC2B5\uD558\uB294 \uBAA8\uB4DC\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC7AC\uC0DD, \uB179\uC74C, \uBE44\uAD50 \uD53C\uB4DC\uBC31"},phonemeHunt:{title:"\uC74C\uC6B4 \uCC3E\uAE30",desc:"\uD2B9\uC815 \uC74C\uC6B4(\uBC1C\uC74C)\uC744 \uD3EC\uD568\uD55C \uB2E8\uC5B4\uB97C \uCC3E\uC544\uB0B4\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4.",comingSoon:"\uAD6C\uD604 \uC608\uC815: \uC74C\uC6B4 \uD544\uD130, \uD78C\uD2B8 \uAE30\uB2A5"}},Dg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
848
848
  \uC2E0\uB8B0\uB97C \uC313\uACE0
849
- \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",kakao:"KAKAO Talk \uC624\uD508\uCC44\uD305"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",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"},Sg={trainingPhone:{topic:"\uD143\uBC2D\uAC00\uAFB8\uAE30",prev:"\uC774\uC804",next:"\uB2E4\uC74C",speed:"\uBE60\uB974\uAE30 3",noiseType:"\uC640\uAE00\uC640\uAE00",settings:"\uC124\uC815",start:{caption:"\uC544\uB798 \uD50C\uB808\uC774(\u25B6) \uBC84\uD2BC\uC744 \uB20C\uB7EC \uBB38\uC7A5\uC744 \uC798 \uB4E4\uC5B4\uBCF4\uC138\uC694. \uC798 \uB4E4\uC73C\uC2E0 \uB4A4 \uBB38\uC7A5\uC744 \uD655\uC778\uD558\uC138\uC694."},feedback:{caption:"\uC798 \uD0A4\uC6B4 \uBAA8\uC885\uC744 \uD143\uBC2D\uC5D0 \uC2EC\uACE0 \uBE44\uB2D0\uC744 \uC798 \uB36E\uC5B4 \uC90D\uB2C8\uB2E4."},done:{heardWell:"\uC798 \uB4E4\uB9B0 \uBB38\uC7A5",listenAgain:"\uD55C \uBC88 \uB354 \uB4E3\uAE30"}}},Tg={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},jg={options:"\uD6C8\uB828 \uC635\uC158",difficulty:"\uB09C\uC774\uB3C4",exclude:"\uC81C\uC678",chosung:"\uCD08\uC131",excludeOptions:{none:"\uC5C6\uC74C",noImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"}},Mg={answer:"\uC815\uB2F5",distractor:"\uC624\uB2F5"},Lg={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"},$g={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Rg={ariaLabel:"\uC120\uD0DD \uD0ED"},Pg={ariaLabel:"\uD0ED"},Ig={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Fg={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Og={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"},reason:{notLoggedIn:"\uB85C\uADF8\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},list:{title:"\uBC1B\uC740 \uC219\uC81C"},status:{expired:"\uB9CC\uB8CC\uB428",done:"\uC644\uB8CC {{count}}\uD68C \xB7 {{date}}",notDone:"\uBBF8\uC644\uB8CC"}},zg={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30",crossword:"\uAC00\uB85C\uC138\uB85C"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",count:"\uC804\uCCB4",done:"\uC644\uB8CC",remaining:"\uBBF8\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},filter:{countSuffix:" \uD6C8\uB828"},time:{countLabel:"{{n}}\uD68C \uD6C8\uB828",empty:"\uD6C8\uB828 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},daily:{title:"\uC624\uB298\uC758 \uB4E3\uAE30 \uAE30\uB85D",empty:"\uC644\uB8CC\uD55C \uD68C\uCC28\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},crossword:{title:"\uAC00\uB85C\uC138\uB85C\uD034\uC988",empty:"\uC644\uB8CC\uD55C \uB808\uBCA8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30",trainingType:{LISTEN_IN_NOISE:"\uC18C\uC74C \uD558 \uBB38\uC7A5",SHORT_STORY:"\uC9E7\uC740 \uC774\uC57C\uAE30",LONG_STORY:"\uAE34 \uC774\uC57C\uAE30",ORDERING_SENTENCE:"\uBB38\uC7A5 \uC21C\uC11C\uD654"}},Wg={publish:{descPlaceholder:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uD45C\uC2DC\uD560 \uD55C \uC904 \uC124\uBA85 (\uC120\uD0DD)"},import:"\uB0B4 \uD6C8\uB828\uC5D0 \uAC00\uC838\uC624\uAE30",publisher:"\uAC8C\uC2DC\uC790",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"},badge:{shared:"\uB9D0\uADC0\uC790\uB8CC\uC2E4"}},Hg={manage:{unit:"\uAC74"}},Vg={cancelLabel:"\uCDE8\uC18C"},qg={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ug={panelTitle:"\uD6C8\uB828 \uC624\uB2F5",viewItems:"\uBB38\uD56D",viewTypes:"\uC720\uD615",colPending:"\uB0A8\uC740 \uAC83",colTrend:"\uBCC0\uD654",colRuns:"\uD310",unitItem:"\uAC1C",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.",summaryLabel:"\uC313\uC778 \uAE30\uB85D",summaryValue:"{{items}}\uBB38\uD56D \xB7 \uC544\uC9C1 \uBABB \uC7A1\uC740 \uAC83 {{pending}}\uAC1C",nextLabel:"\uB2E4\uC74C\uC5D0 \uBCFC \uAC83",nextCount:"{{count}}\uAC1C",nextCountCapped:"{{total}}\uAC1C \uC911 {{shown}}\uAC1C",picked:"\u2192 {{what}}",typeClear:"\uB2E4 \uC7A1\uC558\uC5B4\uC694",typePending:"{{total}}\uAC1C \uC911 {{pending}}\uAC1C \uB0A8\uC74C",flat:"\uBCC0\uD654 \uC5C6\uC74C",runs:"{{count}}\uD310",avgDuration:"\uD3C9\uADE0 {{sec}}\uCD08"},Gg={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"},Kg={panelTitle:"\uB2E8\uC5B4\uD45C \uCC44\uC810",viewWords:"\uB0B1\uB9D0",viewTables:"\uD45C",colLatest:"\uB9C8\uC9C0\uB9C9",colTrend:"\uBCC0\uD654",unitTime:"\uD68C",summaryLabel:"\uC313\uC778 \uCC44\uC810",summaryValue:"{{times}}\uD68C \xB7 \uB0B1\uB9D0 {{words}}\uAC1C",nextLabel:"\uB2E4\uC74C\uC5D0 \uBCFC \uAC83",nextCount:"{{count}}\uAC1C",allClear:"\uC9C0\uB09C\uBC88\uC5D0 \uBAA8\uB450 \uB9DE\uD614\uC2B5\uB2C8\uB2E4.",times:"{{count}}\uD68C",flat:"\uBCC0\uD654 \uC5C6\uC74C",recentLabel:"\uCD5C\uADFC \uCC44\uC810",nextCountCapped:"{{total}}\uAC1C \uC911 {{shown}}\uAC1C"},Yg={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Zg={selectYearMonth:"\uC5F0\uC6D4 \uC120\uD0DD",chooseDate:"\uB0A0\uC9DC \uC120\uD0DD"},Xg={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Jg={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Qg={devNone:"\uBC1C\uB2EC \uC790\uB8CC \uC5C6\uC74C",place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},eb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},tb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},nb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},ab={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},rb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},ob={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},sb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},ib={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"},lb={common:GC,calendar:KC,passCard:YC,searchField:ZC,rating:XC,colorPicker:JC,dropdown:QC,accordion:eg,header:tg,nav:ng,settings:ag,usage:rg,account:og,help:sg,training:ig,trainingSettings:lg,customers:ug,payment:cg,coupons:dg,visits:pg,company:mg,trainingType:hg,myWordTraining:fg,myWordTable:Cg,keyWords:gg,wordTable:bg,wordSearch:yg,wordPrint:vg,topic:xg,accessLinkManager:_g,login:wg,trainingPlanRun:Bg,device:kg,manager:Ag,wordPairs:Ng,game:Eg,footer:Dg,landing:Sg,date:Tg,trainingSetPage:jg,wordTrainingPreview:Mg,wordData:Lg,textField:$g,segmentedControl:Rg,tabs:Pg,fileUpload:Ig,avatar:Fg,myHomework:Og,trainingStatus:zg,store:Wg,homework:Hg,inquiry:Vg,progress:qg,trainingMiss:Ug,table:Gg,wordScore:Kg,topBanner:Yg,datePicker:Zg,report:Xg,tooltip:Jg,phonemeProfile:Qg,bulkBar:eb,debug:tb,badge:nb,loader:ab,soundCompass:rb,breadcrumb:ob,board:sb,promoBannerBg:ib},ub={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",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."},cb={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"]},db={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"}},pb={clearAriaLabel:"Clear search"},mb={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},hb={selected:"selected"},fb={placeholder:"Select"},Cb={collapse:"Collapse",expand:"Expand"},gb={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},bb={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"},yb={language:{training:{label:"Training Language",sub:"Language used for training words and speech"}},notifications:{title:"Notifications"},display:{fontSize:{small:"Small",large:"Large"}},cache:{title:"Cache Management",confirmMessage:"Delete cache ({{size}}). Do you want to continue?",delete:"Delete",deleting:"Deleting",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"},trainingRecord:{label:"Training Record",sub:"Daily training progress and streak"}}},button:{save:"Save Settings"},popup:{clear:{confirm:"Reset"},update:{confirm:"Update"},cache:{title:"Delete {{label}}",message:"Delete {{label}} ({{size}}). Do you want to continue?"}},saved:"\u2713 Saved",account:{title:"Account",delete:{sub:"You can restore your account within 30 days of withdrawal."}}},vb={addButton:"Add Subscription",couponButton:"Enter Coupon",active:{infoTitle:"Subscription Info",refund:"Request Refund",startDate:"Start Date",endDate:"End Date",remaining:"Remaining"},pending:{title:"Pending",empty:"No pending subscriptions."},loading:"Loading\u2026",segment:{personal:"Malgwi",org:"Malgwi Manager"},org:{title:"Current Plan",disc:"Subscription plan in use by your organization.",empty:"No organization plan registered.",fallbackTitle:"Organization Plan",startDate:"Start Date",endDate:"End Date",remaining:"Remaining",duration:"Duration"}},xb={profile:{planSuffix:"",plan:"Plan"},basicInfo:{name:{placeholder:"John Doe"}},security:{title:"Security",password:{label:"Password",currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."},twoFactor:{label:"Two-Factor Authentication",sub:"Strengthen your account security"}}},_b={guide:{faq:{title:"FAQ",desc:"View all frequently asked questions"}}},wb={settings:"Settings",start:{title:"Start Word Training",description:"Select a training type below to begin"},difficulty:{tooltip:"The easiest difficulty is 'Random', the hardest is 'Initial Consonant Difference'."},contrast:{label:"Contrast",type:"Contrast Type",count:"Contrast Count",n:"{{n}}"},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",comingSoon:"Coming Soon",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",summary:"You heard {{correct}} item(s) correctly.",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",viewResult:"View Results",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{idle:"Idle",resolving:"Resolving\u2026",checking_exists:"Checking file\u2026",getting_signed_url:"Getting URL\u2026",downloading:"Downloading\u2026",measuring_duration:"Measuring length\u2026",ready:"Ready",error:"Error",synthesizing:"Preparing the sound\u2026"}},Bb={totalCount:" training bundles",sort:{customers:"Customers"},copyLink:"Copy Link",removeLink:"Remove Link",linkRemoved:"Link removed.",linkSaveFirst:"Please save the training bundle first.",linkSaveFirstHint:"You can only create a shared link from a saved training bundle.",linkCopySelect:"Copy blocked \u2014 link selected. Press Ctrl/\u2318+C to copy.",nameRequired:"Please enter a training bundle name.",itemRequired:"Please add at least one training item.",randomAdd:"Random Add",menu:{publish:"Post to Store",duplicate:"Duplicate Training Bundle",edit:"Edit Training Bundle",move:"Move Group",rename:"Rename"},itemCount:"Number of Items",renameGroup:"Rename Group"},kb={totalCount:" customers",loadError:"Failed to load list",basicInfo:{editTooltip:"Edit"},member:{placeholder:"Email or phone",link:"Link",linking:"Linking\u2026"},device:{title:"Hearing Devices",addTooltip:"Add New",addButton:"Add device",listTooltip:"View List",listTitle:" Device List",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",release:"Release",historyTitle:"Hearing device history"},schedule:{title:"Upcoming Visits",addTooltip:"Add Schedule",listTooltip:"View All",empty:"No upcoming visits",registerTitle:" Register Schedule",memoPlaceholder:"Enter a memo for this visit."},visitHistory:{title:"Visit History",addTooltip:"Add Visit",empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",visits:{title:"Visits"},trainingRecord:{title:"Customer Training Records"},status:{trainingSubtitle:"Training Status"},detail:{session:{completedFmt:"Done {{done}}/{{total}} \xB7 {{duration}}"},visitSuffix:" visits"},homework:{active:"Active",copied:"Link copied.",copy:"Copy Link",inactive:"Inactive",title:"Homework Progress"},duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"}},Ab={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Nb={title:"Coupons",subtitle:"Enter a coupon code or view your coupons",input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply",error:{invalid:"Invalid coupon code.",alreadyUsed:"This coupon has already been used."},success:{applied:'"{{name}}" coupon applied.'},section:{owned:"My Coupons"},status:{used:"Used",available:"Available"}},Eb={unitVisit:"",periodAll:"All",showN:"Show {{n}}"},Db={subtitle:"Manage company and business information",editButton:"Edit Info",basicInfo:{title:"Basic Info"},contactInfo:{title:"Contact Info"}},Sb={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."}},Tb={comingSoon:"Word training is coming soon."},jb={colName:"Table Name",open:"Open",countSuffix:" tables",addCard:"Add Word Table Card",cardsEmpty:"No word table cards created yet.",menu:{publishStore:"Post to Training Store",unpublishStore:"Remove from Training Store"},newBadge:"Newly created",tab:{cards:"Word Table Cards",tables:"Word Tables"},publishedBadge:"Published",sharedBadge:"Shared"},Mb={title:"Key Words",empty:"No key words available."},Lb={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",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",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",store:{badge:"Training Store"},card:{sub:"Word Table Card",empty:"No word tables in this card."},toast:{renameError:"Failed to rename",saveError:"Failed to save",deleteError:"Failed to delete",duplicateError:"Failed to duplicate",saveSuccess:"Word table saved."},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"}},$b={editBanner:{message:"Saving will update the word table you're editing."},filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",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",popup:{title:"Select a word for cell {{n}}"}},Rb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},Pb={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"}},Ib={maxUses:"Max uses (leave blank for unlimited)",redirect:"Redirect URL (leave blank for app home)",creating:"Creating\u2026",create:"Create link",created:"\u2713 Link created",copied:"Copied!",copy:"Copy",loading:"Loading\u2026",empty:"No links created yet.",uses_one:"Used {{count}} time",uses_other:"Used {{count}} times",expiresAt:"Expires: {{date}}",createdAt:"Created: {{date}}",confirmDelete:"Delete this link?",deactivate:"Deactivate",delete:"Delete",status:{active:"Active",expired:"Expired",inactive:"Inactive"}},Fb={passwordPlaceholder:"Enter password"},Ob={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",validationError:{brandAndProduct:"Please enter brand and product name."},addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},zb={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",daily:"Daily",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"},subscriptionStatus:{active:"{{pct}}% Active",expired:"{{pct}}% Expired",unused:"{{pct}}% Unused"}},Wb={editBanner:{message:"Saving will update the contrast pair table you're editing."},phonemeSelect:{title:"Phoneme Selection",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",onlySameStructure:"Only same phoneme structure"},searchLabel:{error:"Failed to load data",loading:"Loading\u2026"},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."]},Hb={sentenceTyping:{roundCount:"{{rounds}} rounds \xB7 {{timeLimit}}s each"},wordDefense:{me:"Me"},dictation:{title:"Dictation",desc:"Practice writing down exactly what you hear.",comingSoon:"Coming soon: audio playback, input field, answer comparison"},result:{heading:"Level {{number}} Answer",retry:"Try Again"},common:{accuracy:"{{pct}}% accuracy"},soundMatch:{title:"Sound Match",desc:"Quickly match words or sentences that share the same sound.",comingSoon:"Coming soon: play button, timer, score tracking"},orderSequence:{title:"Sentence Ordering",desc:"Arrange scattered sentence fragments in the correct order.",comingSoon:"Coming soon: sentence sets, ordering interface"},speedListen:{title:"Speed Listen",desc:"A challenge game to count the number of words in a sentence within a time limit.",comingSoon:"Coming soon: time limit, scoreboard"},noiseChallenge:{title:"Noise Challenge",desc:"Practice distinguishing sentences amid background noise.",comingSoon:"Coming soon: various noise levels, score tracking"},fastListen:{title:"Fast Listen",desc:"Listen to short sentences at speed and select the key word.",comingSoon:"Coming soon: speed by difficulty, timer"},shadowing:{title:"Shadowing",desc:"Practice pronunciation and intonation by repeating sentences aloud.",comingSoon:"Coming soon: playback, recording, comparison feedback"},phonemeHunt:{title:"Phoneme Hunt",desc:"Find words that contain a specific phoneme (sound).",comingSoon:"Coming soon: phoneme filter, hint feature"}},Vb={lead:`IHAB builds trust
849
+ \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",kakao:"KAKAO Talk \uC624\uD508\uCC44\uD305"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",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"},Sg={trainingPhone:{topic:"\uD143\uBC2D\uAC00\uAFB8\uAE30",prev:"\uC774\uC804",next:"\uB2E4\uC74C",speed:"\uBE60\uB974\uAE30 3",noiseType:"\uC640\uAE00\uC640\uAE00",settings:"\uC124\uC815",start:{caption:"\uC544\uB798 \uD50C\uB808\uC774(\u25B6) \uBC84\uD2BC\uC744 \uB20C\uB7EC \uBB38\uC7A5\uC744 \uC798 \uB4E4\uC5B4\uBCF4\uC138\uC694. \uC798 \uB4E4\uC73C\uC2E0 \uB4A4 \uBB38\uC7A5\uC744 \uD655\uC778\uD558\uC138\uC694."},feedback:{caption:"\uC798 \uD0A4\uC6B4 \uBAA8\uC885\uC744 \uD143\uBC2D\uC5D0 \uC2EC\uACE0 \uBE44\uB2D0\uC744 \uC798 \uB36E\uC5B4 \uC90D\uB2C8\uB2E4."},done:{heardWell:"\uC798 \uB4E4\uB9B0 \uBB38\uC7A5",listenAgain:"\uD55C \uBC88 \uB354 \uB4E3\uAE30"}}},Tg={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},jg={options:"\uD6C8\uB828 \uC635\uC158",difficulty:"\uB09C\uC774\uB3C4",exclude:"\uC81C\uC678",chosung:"\uCD08\uC131",excludeOptions:{none:"\uC5C6\uC74C",noImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"}},Mg={answer:"\uC815\uB2F5",distractor:"\uC624\uB2F5"},Lg={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"},$g={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Rg={ariaLabel:"\uC120\uD0DD \uD0ED"},Pg={ariaLabel:"\uD0ED"},Ig={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Fg={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Og={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"},reason:{notLoggedIn:"\uB85C\uADF8\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},list:{title:"\uBC1B\uC740 \uC219\uC81C"},status:{expired:"\uB9CC\uB8CC\uB428",done:"\uC644\uB8CC {{count}}\uD68C \xB7 {{date}}",notDone:"\uBBF8\uC644\uB8CC"}},zg={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30",crossword:"\uAC00\uB85C\uC138\uB85C"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",count:"\uC804\uCCB4",done:"\uC644\uB8CC",remaining:"\uBBF8\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},filter:{countSuffix:" \uD6C8\uB828"},time:{countLabel:"{{n}}\uD68C \uD6C8\uB828",empty:"\uD6C8\uB828 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},daily:{title:"\uC624\uB298\uC758 \uB4E3\uAE30 \uAE30\uB85D",empty:"\uC644\uB8CC\uD55C \uD68C\uCC28\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},crossword:{title:"\uAC00\uB85C\uC138\uB85C\uD034\uC988",empty:"\uC644\uB8CC\uD55C \uB808\uBCA8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30",trainingType:{LISTEN_IN_NOISE:"\uC18C\uC74C \uD558 \uBB38\uC7A5",SHORT_STORY:"\uC9E7\uC740 \uC774\uC57C\uAE30",LONG_STORY:"\uAE34 \uC774\uC57C\uAE30",ORDERING_SENTENCE:"\uBB38\uC7A5 \uC21C\uC11C\uD654"}},Wg={publish:{descPlaceholder:"\uB9D0\uADC0\uC790\uB8CC\uC2E4\uC5D0 \uD45C\uC2DC\uD560 \uD55C \uC904 \uC124\uBA85 (\uC120\uD0DD)"},import:"\uB0B4 \uD6C8\uB828\uC5D0 \uAC00\uC838\uC624\uAE30",publisher:"\uAC8C\uC2DC\uC790",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"},badge:{shared:"\uB9D0\uADC0\uC790\uB8CC\uC2E4"}},Hg={manage:{unit:"\uAC74"}},Vg={cancelLabel:"\uCDE8\uC18C"},qg={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ug={panelTitle:"\uD6C8\uB828 \uC624\uB2F5",viewItems:"\uBB38\uD56D",viewTypes:"\uC720\uD615",colPending:"\uB0A8\uC740 \uAC83",colTrend:"\uBCC0\uD654",colRuns:"\uD310",unitItem:"\uAC1C",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.",summaryLabel:"\uC313\uC778 \uAE30\uB85D",summaryValue:"{{items}}\uBB38\uD56D \xB7 \uC544\uC9C1 \uBABB \uC7A1\uC740 \uAC83 {{pending}}\uAC1C",nextLabel:"\uB2E4\uC74C\uC5D0 \uBCFC \uAC83",nextCount:"{{count}}\uAC1C",nextCountCapped:"{{total}}\uAC1C \uC911 {{shown}}\uAC1C",picked:"\u2192 {{what}}",typeClear:"\uB2E4 \uC7A1\uC558\uC5B4\uC694",typePending:"{{total}}\uAC1C \uC911 {{pending}}\uAC1C \uB0A8\uC74C",flat:"\uBCC0\uD654 \uC5C6\uC74C",runs:"{{count}}\uD310",avgDuration:"\uD3C9\uADE0 {{sec}}\uCD08"},Gg={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"},Kg={panelTitle:"\uB2E8\uC5B4\uD45C \uCC44\uC810",viewWords:"\uB0B1\uB9D0",viewTables:"\uD45C",colLatest:"\uB9C8\uC9C0\uB9C9",colTrend:"\uBCC0\uD654",unitTime:"\uD68C",summaryLabel:"\uC313\uC778 \uCC44\uC810",summaryValue:"{{times}}\uD68C \xB7 \uB0B1\uB9D0 {{words}}\uAC1C",nextLabel:"\uB2E4\uC74C\uC5D0 \uBCFC \uAC83",nextCount:"{{count}}\uAC1C",allClear:"\uC9C0\uB09C\uBC88\uC5D0 \uBAA8\uB450 \uB9DE\uD614\uC2B5\uB2C8\uB2E4.",times:"{{count}}\uD68C",flat:"\uBCC0\uD654 \uC5C6\uC74C",recentLabel:"\uCD5C\uADFC \uCC44\uC810",nextCountCapped:"{{total}}\uAC1C \uC911 {{shown}}\uAC1C"},Yg={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Zg={selectYearMonth:"\uC5F0\uC6D4 \uC120\uD0DD",chooseDate:"\uB0A0\uC9DC \uC120\uD0DD"},Xg={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Jg={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Qg={devNone:"\uBC1C\uB2EC \uC790\uB8CC \uC5C6\uC74C",place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},eb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},tb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},nb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},ab={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},rb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},ob={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},sb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},ib={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"},lb={common:GC,calendar:KC,passCard:YC,searchField:ZC,rating:XC,colorPicker:JC,dropdown:QC,accordion:eg,header:tg,nav:ng,settings:ag,usage:rg,account:og,help:sg,training:ig,trainingSettings:lg,customers:ug,payment:cg,coupons:dg,visits:pg,company:mg,trainingType:hg,myWordTraining:fg,myWordTable:Cg,keyWords:gg,wordTable:bg,wordSearch:yg,wordPrint:vg,topic:xg,accessLinkManager:_g,login:wg,trainingPlanRun:Bg,device:kg,manager:Ag,wordPairs:Ng,game:Eg,footer:Dg,landing:Sg,date:Tg,trainingSetPage:jg,wordTrainingPreview:Mg,wordData:Lg,textField:$g,segmentedControl:Rg,tabs:Pg,fileUpload:Ig,avatar:Fg,myHomework:Og,trainingStatus:zg,store:Wg,homework:Hg,inquiry:Vg,progress:qg,trainingMiss:Ug,table:Gg,wordScore:Kg,topBanner:Yg,datePicker:Zg,report:Xg,tooltip:Jg,phonemeProfile:Qg,bulkBar:eb,debug:tb,badge:nb,loader:ab,soundCompass:rb,breadcrumb:ob,board:sb,promoBannerBg:ib},ub={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",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."},cb={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"]},db={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"}},pb={clearAriaLabel:"Clear search"},mb={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},hb={selected:"selected"},fb={placeholder:"Select"},Cb={collapse:"Collapse",expand:"Expand"},gb={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},bb={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"},yb={language:{training:{label:"Training Language",sub:"Language used for training words and speech"}},notifications:{title:"Notifications"},display:{fontSize:{small:"Small",large:"Large"}},cache:{title:"Cache Management",confirmMessage:"Delete cache ({{size}}). Do you want to continue?",delete:"Delete",deleting:"Deleting",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"},trainingRecord:{label:"Training Record",sub:"Daily training progress and streak"}}},button:{save:"Save Settings"},popup:{clear:{confirm:"Reset"},update:{confirm:"Update"},cache:{title:"Delete {{label}}",message:"Delete {{label}} ({{size}}). Do you want to continue?"}},saved:"\u2713 Saved",account:{title:"Account",delete:{sub:"You can restore your account within 30 days of withdrawal."}}},vb={addButton:"Add Subscription",couponButton:"Enter Coupon",active:{infoTitle:"Subscription Info",refund:"Request Refund",startDate:"Start Date",endDate:"End Date",remaining:"Remaining"},pending:{title:"Pending",empty:"No pending subscriptions."},loading:"Loading\u2026",segment:{personal:"Malgwi",org:"Malgwi Manager"},org:{title:"Current Plan",disc:"Subscription plan in use by your organization.",empty:"No organization plan registered.",fallbackTitle:"Organization Plan",startDate:"Start Date",endDate:"End Date",remaining:"Remaining",duration:"Duration"}},xb={profile:{planSuffix:"",plan:"Plan"},basicInfo:{name:{placeholder:"John Doe"}},security:{title:"Security",password:{label:"Password",currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."},twoFactor:{label:"Two-Factor Authentication",sub:"Strengthen your account security"}}},_b={guide:{faq:{title:"FAQ",desc:"View all frequently asked questions"}}},wb={settings:"Settings",start:{title:"Start Word Training",description:"Select a training type below to begin"},difficulty:{tooltip:"The easiest difficulty is 'Random', the hardest is 'Initial Consonant Difference'."},contrast:{label:"Contrast",type:"Contrast Type",count:"Contrast Count",n:"{{n}}"},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",comingSoon:"Coming Soon",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",summary:"You heard {{correct}} item(s) correctly.",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",viewResult:"View Results",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{idle:"Idle",resolving:"Resolving\u2026",checking_exists:"Checking file\u2026",getting_signed_url:"Getting URL\u2026",downloading:"Downloading\u2026",measuring_duration:"Measuring length\u2026",ready:"Ready",error:"Error",synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},Bb={totalCount:" training bundles",sort:{customers:"Customers"},copyLink:"Copy Link",removeLink:"Remove Link",linkRemoved:"Link removed.",linkSaveFirst:"Please save the training bundle first.",linkSaveFirstHint:"You can only create a shared link from a saved training bundle.",linkCopySelect:"Copy blocked \u2014 link selected. Press Ctrl/\u2318+C to copy.",nameRequired:"Please enter a training bundle name.",itemRequired:"Please add at least one training item.",randomAdd:"Random Add",menu:{publish:"Post to Store",duplicate:"Duplicate Training Bundle",edit:"Edit Training Bundle",move:"Move Group",rename:"Rename"},itemCount:"Number of Items",renameGroup:"Rename Group"},kb={totalCount:" customers",loadError:"Failed to load list",basicInfo:{editTooltip:"Edit"},member:{placeholder:"Email or phone",link:"Link",linking:"Linking\u2026"},device:{title:"Hearing Devices",addTooltip:"Add New",addButton:"Add device",listTooltip:"View List",listTitle:" Device List",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",release:"Release",historyTitle:"Hearing device history"},schedule:{title:"Upcoming Visits",addTooltip:"Add Schedule",listTooltip:"View All",empty:"No upcoming visits",registerTitle:" Register Schedule",memoPlaceholder:"Enter a memo for this visit."},visitHistory:{title:"Visit History",addTooltip:"Add Visit",empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",visits:{title:"Visits"},trainingRecord:{title:"Customer Training Records"},status:{trainingSubtitle:"Training Status"},detail:{session:{completedFmt:"Done {{done}}/{{total}} \xB7 {{duration}}"},visitSuffix:" visits"},homework:{active:"Active",copied:"Link copied.",copy:"Copy Link",inactive:"Inactive",title:"Homework Progress"},duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"}},Ab={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Nb={title:"Coupons",subtitle:"Enter a coupon code or view your coupons",input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply",error:{invalid:"Invalid coupon code.",alreadyUsed:"This coupon has already been used."},success:{applied:'"{{name}}" coupon applied.'},section:{owned:"My Coupons"},status:{used:"Used",available:"Available"}},Eb={unitVisit:"",periodAll:"All",showN:"Show {{n}}"},Db={subtitle:"Manage company and business information",editButton:"Edit Info",basicInfo:{title:"Basic Info"},contactInfo:{title:"Contact Info"}},Sb={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."}},Tb={comingSoon:"Word training is coming soon."},jb={colName:"Table Name",open:"Open",countSuffix:" tables",addCard:"Add Word Table Card",cardsEmpty:"No word table cards created yet.",menu:{publishStore:"Post to Training Store",unpublishStore:"Remove from Training Store"},newBadge:"Newly created",tab:{cards:"Word Table Cards",tables:"Word Tables"},publishedBadge:"Published",sharedBadge:"Shared"},Mb={title:"Key Words",empty:"No key words available."},Lb={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",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",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",store:{badge:"Training Store"},card:{sub:"Word Table Card",empty:"No word tables in this card."},toast:{renameError:"Failed to rename",saveError:"Failed to save",deleteError:"Failed to delete",duplicateError:"Failed to duplicate",saveSuccess:"Word table saved."},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"}},$b={editBanner:{message:"Saving will update the word table you're editing."},filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",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",popup:{title:"Select a word for cell {{n}}"}},Rb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},Pb={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"}},Ib={maxUses:"Max uses (leave blank for unlimited)",redirect:"Redirect URL (leave blank for app home)",creating:"Creating\u2026",create:"Create link",created:"\u2713 Link created",copied:"Copied!",copy:"Copy",loading:"Loading\u2026",empty:"No links created yet.",uses_one:"Used {{count}} time",uses_other:"Used {{count}} times",expiresAt:"Expires: {{date}}",createdAt:"Created: {{date}}",confirmDelete:"Delete this link?",deactivate:"Deactivate",delete:"Delete",status:{active:"Active",expired:"Expired",inactive:"Inactive"}},Fb={passwordPlaceholder:"Enter password"},Ob={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",validationError:{brandAndProduct:"Please enter brand and product name."},addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},zb={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",daily:"Daily",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"},subscriptionStatus:{active:"{{pct}}% Active",expired:"{{pct}}% Expired",unused:"{{pct}}% Unused"}},Wb={editBanner:{message:"Saving will update the contrast pair table you're editing."},phonemeSelect:{title:"Phoneme Selection",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",onlySameStructure:"Only same phoneme structure"},searchLabel:{error:"Failed to load data",loading:"Loading\u2026"},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."]},Hb={sentenceTyping:{roundCount:"{{rounds}} rounds \xB7 {{timeLimit}}s each"},wordDefense:{me:"Me"},dictation:{title:"Dictation",desc:"Practice writing down exactly what you hear.",comingSoon:"Coming soon: audio playback, input field, answer comparison"},result:{heading:"Level {{number}} Answer",retry:"Try Again"},common:{accuracy:"{{pct}}% accuracy"},soundMatch:{title:"Sound Match",desc:"Quickly match words or sentences that share the same sound.",comingSoon:"Coming soon: play button, timer, score tracking"},orderSequence:{title:"Sentence Ordering",desc:"Arrange scattered sentence fragments in the correct order.",comingSoon:"Coming soon: sentence sets, ordering interface"},speedListen:{title:"Speed Listen",desc:"A challenge game to count the number of words in a sentence within a time limit.",comingSoon:"Coming soon: time limit, scoreboard"},noiseChallenge:{title:"Noise Challenge",desc:"Practice distinguishing sentences amid background noise.",comingSoon:"Coming soon: various noise levels, score tracking"},fastListen:{title:"Fast Listen",desc:"Listen to short sentences at speed and select the key word.",comingSoon:"Coming soon: speed by difficulty, timer"},shadowing:{title:"Shadowing",desc:"Practice pronunciation and intonation by repeating sentences aloud.",comingSoon:"Coming soon: playback, recording, comparison feedback"},phonemeHunt:{title:"Phoneme Hunt",desc:"Find words that contain a specific phoneme (sound).",comingSoon:"Coming soon: phoneme filter, hint feature"}},Vb={lead:`IHAB builds trust
850
850
  through sound
851
- 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",kakao:"KAKAO Talk Open Chat"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea"},qb={trainingPhone:{topic:"Gardening",prev:"Prev",next:"Next",speed:"Speed 3",noiseType:"Crowd noise",settings:"Settings",start:{caption:"Press the play (\u25B6) button below and listen carefully. After listening, check the sentence."},feedback:{caption:"Plant the well-grown seedlings in the garden bed and cover them carefully with plastic film."},done:{heardWell:"Heard clearly",listenAgain:"Listen again"}}},Ub={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Gb={options:"Training Options",difficulty:"Difficulty",exclude:"Exclude",chosung:"Initial Consonant",excludeOptions:{none:"None",noImage:"No Image"}},Kb={answer:"Answer",distractor:"Distractor"},Yb={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"},Zb={clearAriaLabel:"Clear input"},Xb={ariaLabel:"Select tab"},Jb={ariaLabel:"Tabs"},Qb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},ey={ariaLabel:"User avatar"},ty={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"},reason:{notLoggedIn:"Login required."},list:{title:"Received Homework"},status:{expired:"Expired",done:"Done {{count}}\xD7 \xB7 {{date}}",notDone:"Not done"}},ny={weekly:{title:"Weekly Training",daily:"Daily Listening",crossword:"Crossword"},homework:{title:"Homework Progress",totalRate:"Overall rate",count:"Total",done:"Done",remaining:"Remaining"},today:{tooltipTotal:"Total",tooltipDone:"Done"},filter:{countSuffix:" sessions"},time:{countLabel_one:"{{n}} session",countLabel_other:"{{n}} sessions",empty:"No training records"},daily:{title:"Today's Listening Record",empty:"No completed sessions"},crossword:{title:"Crossword Quiz",empty:"No completed levels"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details",trainingType:{LISTEN_IN_NOISE:"Sentence in Noise",SHORT_STORY:"Short Story",LONG_STORY:"Long Story",ORDERING_SENTENCE:"Sentence Ordering"}},ay={import:"Add to my trainings",publisher:"Publisher",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"},badge:{shared:"Store"},publish:{descPlaceholder:"One-line description for the Training Store (optional)"}},ry={manage:{unit:"item(s)"}},oy={cancelLabel:"Cancel"},sy={subtitle:"Select a topic to start listening practice."},iy={steps:"Step {{current}} of {{total}}"},ly={panelTitle:"Training misses",viewItems:"Items",viewTypes:"Types",colPending:"Left",colTrend:"Change",colRuns:"Runs",unitItem:" items",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.",summaryLabel:"Recorded",summaryValue:"{{items}} items \xB7 {{pending}} still missed",nextLabel:"Next to work on",nextCount:"{{count}}",nextCountCapped:"{{shown}} of {{total}}",picked:"\u2192 {{what}}",typeClear:"All caught up",typePending:"{{pending}} of {{total}} left",flat:"no change",runs_one:"{{count}} run",runs_other:"{{count}} runs",avgDuration:"{{sec}}s avg"},uy={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},cy={panelTitle:"Word table scores",viewWords:"Words",viewTables:"Tables",colLatest:"When",colTrend:"Change",unitTime:" times",summaryLabel:"Scored",summaryValue:"{{times}} times \xB7 {{words}} words",nextLabel:"Focus next",nextCount:"{{count}}",allClear:"All correct last time.",times:"{{count}}x",flat:"no change",recentLabel:"Recent scorings",nextCountCapped:"{{shown}} of {{total}}"},dy={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},py={selectYearMonth:"Select year and month",chooseDate:"Choose a date"},my={previewRegion:"Report preview \u2014 scrollable sideways"},hy={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},fy={devNone:"No acquisition data",place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Cy={clearSelection:"Clear selection"},gy={showResult:"Show {{type}} result"},by={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},yy={loading:"Loading"},vy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},xy={ariaLabel:"Breadcrumb"},_y={empty:"No items yet."},wy={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"},By={common:ub,calendar:cb,passCard:db,searchField:pb,rating:mb,colorPicker:hb,dropdown:fb,accordion:Cb,header:gb,nav:bb,settings:yb,usage:vb,account:xb,help:_b,training:wb,trainingSettings:Bb,customers:kb,payment:Ab,coupons:Nb,visits:Eb,company:Db,trainingType:Sb,myWordTraining:Tb,myWordTable:jb,keyWords:Mb,wordTable:Lb,wordSearch:$b,wordPrint:Rb,topic:Pb,accessLinkManager:Ib,login:Fb,device:Ob,manager:zb,wordPairs:Wb,game:Hb,footer:Vb,landing:qb,date:Ub,trainingSetPage:Gb,wordTrainingPreview:Kb,wordData:Yb,textField:Zb,segmentedControl:Xb,tabs:Jb,fileUpload:Qb,avatar:ey,myHomework:ty,trainingStatus:ny,store:ay,homework:ry,inquiry:oy,trainingPlanRun:sy,progress:iy,trainingMiss:ly,table:uy,wordScore:cy,topBanner:dy,datePicker:py,report:my,tooltip:hy,phonemeProfile:fy,bulkBar:Cy,debug:gy,badge:by,loader:yy,soundCompass:vy,breadcrumb:xy,board:_y,promoBannerBg:wy};const ky="0.345.0",Ay=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],co="ko",Ny="ihab_display_language";function Hi(){if(typeof window>"u")return co;try{const e=localStorage.getItem(Ny);if(e&&Ay.some(t=>t.code===e))return e}catch{}return co}function Vi(e){try{document.documentElement.lang=e}catch{}}Rt.on("languageChanged",Vi),Vi(Hi()),Rt.use(xe.initReactI18next).init({resources:{ko:{translation:lb},en:{translation:By}},lng:Hi(),fallbackLng:co,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Ey=new Map;try{Rt.store?.on?.("added",()=>Ey.clear())}catch{}let or=null,qi=null,Ui=null;function Dy(){const e=Mi();if(e&&e.entries.length>0){const t=mC();if(or&&qi===e&&Ui===t)return or;const a=new Set,r=[];for(const i of e.entries)!i.word||a.has(i.word)||(a.add(i.word),r.push({w:i.word,s:i.syllables,p:t?.[i.word]?[...t[i.word].cho??[],...t[i.word].jung??[],...t[i.word].jong??[]]:[],pron:i.pronunciation||i.word,grade:i.grade}));return or=r,qi=e,Ui=t,or}return[]}new Proxy([],{get(e,t){const a=Dy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Sy(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 Ty(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Sy(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function jy(e){const[t,a]=o.useState(null),[r,i]=o.useState(null),[s,l]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),i(null),l(null),c(null);return}const p=e.split("/").pop();let f=e;p&&(e.startsWith("/")?f=Zr(e):/^(Logo|Symbol)/i.test(p)?f=Zr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),f=e)),l(null),c(null),a(e),i(f)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function f(){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")){l("mask");return}if(v.startsWith("image/")){l("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const h=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Ty(h);if(!_){l("none");return}c(_),l("inline");return}l("none")}catch{p||l("none")}}return f(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,f=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(f=URL.createObjectURL(b),m(f))}).catch(()=>{p||l("img")}),()=>{p=!0,f&&URL.revokeObjectURL(f),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function at(e){const{icon:t,label:a,className:r,imgClassName:i,maskClassName:s,svgClassName:l,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=i??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",f=l??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,v=K1(b),{iconToUse:C,mode:h,svgText:_,blobUrl:g}=jy(b),A=(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:m,...E,style:y?{...E.style,...y}:E.style});if(!t)return null;if(typeof t!="string")return A(t);if(t==="none")return A(n.jsx("span",{className:f,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 A(o.createElement(v,{className:f,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(h==="mask"){const B={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return A(n.jsx("span",{className:p,style:B}),{"aria-hidden":"true"})}return h==="img"?A(k(C,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?A(n.jsx("span",{className:f,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):A(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return k(Zr(t),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,w=`<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 A(n.jsx("span",{className:f,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Gi(e){const[t,a]=o.useState(!1),r=o.useRef(!1),i=o.useRef(!0);o.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const l=e();if(l&&typeof l.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,i.current&&a(!1)};l.then(u,u)}},[e]);return{pending:t,press:s}}function My({icon:e,title:t,message:a,action:r,className:i}){const{pending:s,press:l}=Gi(r?.onClick);return n.jsxs("div",{className:_e("empty-state",i),children:[e&&n.jsx(at,{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:l,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(at,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function Ly({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:i,className:s}){const{t:l}=xe.useTranslation(),{pending:u,press:c}=Gi(r);return n.jsxs("div",{className:_e("empty-state","error-state",s),role:"alert",children:[n.jsx(at,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??l("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(at,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:i??l("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function $y({icon:e,title:t,description:a,cta:r,tone:i="main",disabled:s=!1,onClick:l,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,f=()=>{s||l?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:f,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f())},className:_e("action-card",`action-card--${i}`,s&&"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(at,{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:m,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(at,{icon:"arrow-right",size:18})})]})]})})}function Ry({as:e="div",className:t="",children:a,storage:r,...i}){r&&Rf({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 s=_e("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...i,children:a})}function Py(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 po(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=i=>{if(i.key!=="Tab")return;const s=Array.from(a.querySelectorAll(Cn)).filter(Py);if(!s.length){i.preventDefault();return}const l=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;i.shiftKey&&(c===l||d)?(i.preventDefault(),u.focus()):!i.shiftKey&&c===u&&(i.preventDefault(),l.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Cn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',mo=new WeakMap;function ho(e,t){e&&mo.set(e,t)}function fo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!mo.has(r);)r=r.parentElement;if(!r)return t;t=mo.get(r)??null}return t}function Ki(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 sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Ki(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const i=Array.from(document.querySelectorAll(Cn)).filter(c=>!(e&&e.contains(c))&&Ki(c));let s=null,l=null;for(const c of i)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:l||(l=c);const u=s??l;return u?.focus(),u}function Iy({title:e="",lines:t=[],notices:a=null,children:r,variant:i="default",dismissible:s=!1,className:l=""}){const{t:u}=xe.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const C=m.current;C&&C.contains(document.activeElement)&&sr(C),d(!0)},[]);if(c)return null;const f=`notice-box notice-box--${i} body-2 ${l}`.trim(),b=s&&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:f,role:"note",children:[a.map((C,h)=>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((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):C.children??null})]},h)),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,h)=>n.jsx("li",{className:"notice-box__line",children:C},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:f,role:"note",children:[v,b]})}const ua=[];let ir=!1;function Yi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!ir&&typeof document<"u"&&(document.addEventListener("keydown",Yi),ir=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&ir&&typeof document<"u"&&(document.removeEventListener("keydown",Yi),ir=!1)}}const Zi=o.createContext(null);function Fy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const Xi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Oy(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 Ss.useSyncExternalStore(t,()=>Xi(e),()=>!1)}function zy(e){const[t,a]=o.useState(Xi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),i=l=>a(l.matches),s=r;return s.addEventListener?s.addEventListener("change",i):s.addListener&&s.addListener(i),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",i):s.removeListener&&s.removeListener(i)}},[e]),t}const Wy=typeof Ss.useSyncExternalStore=="function"?Oy:zy;function ln(e){const t=o.useContext(Zi),a=Wy(e);return t&&typeof t.mobile=="boolean"&&Fy(e)?t.mobile:a}const Hy="(prefers-reduced-motion: reduce)";function Co(){return ln(Hy)}function cn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:i=20,onClose:s,closeOnOutsideClick:l=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:f=!1,useBorder:b=!0,header:v,focusOnOpen:C}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[A,y]=o.useState(!1),[k,x]=o.useState("bottom"),[w,B]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,O=o.useCallback((V=!1)=>{if(E&&f)return;const R=a?a.getBoundingClientRect():t;if(!R||!h.current)return;const H=h.current,{offsetWidth:W,offsetHeight:I}=H,S=window.innerWidth,j=window.innerHeight,F=S-R.right,U=R.left,re=R.top,te=j-R.bottom;let le=0,K=0,oe="top";if(re>=I+r)oe="top",K=R.top-r-I,le=R.left+R.width/2-W/2;else if(te>=I+r)oe="bottom",K=R.bottom+r,le=R.left+R.width/2-W/2;else if(F>=W+r)oe="right",le=R.right+r,K=R.top+R.height/2-I/2;else if(U>=W+r)oe="left",le=R.left-r-W,K=R.top+R.height/2-I/2;else{const me=Math.max(re,te,F,U);me===re?(oe="top",K=R.top-r-I,le=R.left+R.width/2-W/2):me===te?(oe="bottom",K=R.bottom+r,le=R.left+R.width/2-W/2):me===F?(oe="right",le=R.right+r,K=R.top+R.height/2-I/2):(oe="left",le=R.left-r-W,K=R.top+R.height/2-I/2)}const Ae=Number.isFinite(Number(i))?Number(i):8;le=Math.min(Math.max(le,Ae),S-W-Ae),K=Math.min(Math.max(K,Ae),j-I-Ae);const Y=Math.round(le),Q=Math.round(K);V&&h.current?(h.current.style.left=`${Y}px`,h.current.style.top=`${Q}px`,h.current.dataset.placement=oe):(x(oe||k),g({position:"fixed",left:Y,top:Q}),B(!0))},[E,f,a,t,r,i,k]);o.useLayoutEffect(()=>{if(N)return;if(E&&f){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}O();const V=requestAnimationFrame(()=>O());return()=>cancelAnimationFrame(V)},[t,a,r,m,i,N,E,f,O]),o.useEffect(()=>{if(N||E&&f||!h.current||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>{t&&O()});return V.observe(h.current),()=>V.disconnect()},[t,m,i,N,E,f,O]),o.useEffect(()=>{if(N||E&&f)return;let V=null;const R=()=>{if(typeof requestAnimationFrame>"u"){O(!0);return}V===null&&(V=requestAnimationFrame(()=>{V=null,O(!0)}))},H=W=>{if(!a&&s){const I=W.target;if(I&&h.current&&h.current.contains(I))return;try{if(I&&I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}$.current(!0);return}R()};return window.addEventListener("resize",R),document.addEventListener("scroll",H,{passive:!0,capture:!0}),()=>{V!==null&&cancelAnimationFrame(V),window.removeEventListener("resize",R),document.removeEventListener("scroll",H,{capture:!0})}},[t,a,s,r,m,i,N,E,f,O]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const V=window.matchMedia("(max-width: 768px)"),R=()=>D(!!V.matches);R();try{V.addEventListener?V.addEventListener("change",R):V.addListener(R)}catch{try{V.addListener(R)}catch{}}return()=>{try{V.removeEventListener?V.removeEventListener("change",R):V.removeListener(R)}catch{}}},[]);const P=o.useRef(!1),G=o.useRef(null),L=Co(),M=o.useCallback((V=!1)=>{if(s&&!(A||P.current)){if(P.current=!0,V){y(!0);try{s&&s()}catch{P.current=!1,y(!1)}return}y(!0),G.current=setTimeout(()=>{G.current=null;try{s&&s()}catch{P.current=!1,y(!1)}},L?0:200)}},[A,s,y,L]);o.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),o.useEffect(()=>{if(N)return;const V=W=>{const I=h.current;if(!I)return;const S=W.target;if(S&&!I.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}l&&M(!0)}},R=W=>{const I=h.current;if(!I)return;const S=W.target;if(S&&!I.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}l&&M(!0)}},H=W=>{if(W.key==="Tab"){const I=h.current;if(!I)return;const S=I.querySelectorAll(Cn);if(!S||S.length===0)return;const j=S[0],F=S[S.length-1],U=document.activeElement;W.shiftKey?U===j&&(W.preventDefault(),F.focus()):U===F&&(W.preventDefault(),j.focus())}};return document.addEventListener("pointerdown",V,!0),document.addEventListener("click",R,!0),document.addEventListener("keydown",H),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("click",R,!0),document.removeEventListener("keydown",H)}},[s,l,M,N]);const $=o.useRef(M);o.useEffect(()=>{$.current=M});const Z=!!s;o.useEffect(()=>{if(!(N||!Z))return Gn(()=>$.current())},[N,Z]),o.useEffect(()=>{const V=()=>{M(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",V),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",V)}},[M]);const q=o.useRef(null);o.useEffect(()=>{if(N||C===!1||!w)return;const V=h.current;if(!V)return;const R=V.querySelector(Cn);if(R)return q.current=document.activeElement,R.focus(),()=>{const H=q.current;q.current=null,H&&document.contains(H)&&H.focus()}},[N,C,w]),o.useEffect(()=>{c==="dialog"&&!d&&St("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 z=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${A?"is-closing":""} ${u} ${E&&f?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"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:[v!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:v}),m]});if(N||typeof document>"u")return z;if(p||E&&f){const V=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{l&&M(!0)}}),z]});return en.createPortal(V,document.body)}return en.createPortal(z,document.body)}function Bn(e){const{anchorRect:t,text:a,offset:r=8,onClose:i,className:s="",ariaLabel:l}=e||{};return a?n.jsx(cn,{anchorRect:t,offset:r,onClose:i,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:l||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=xe.useTranslation(),{anchorRect:a,title:r,items:i,activeIndex:s=-1,showIndex:l=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(i)?i:i?[i]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(cn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,f)=>n.jsxs("li",{className:`tooltip-description__item body-3${f===s?" tooltip-description__item--active":""}`,children:[l&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[f+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},f))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let go=0,Ji=!1;function Qi(){Ji||typeof document>"u"||(Ji=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(go=Date.now())},!0),document.addEventListener("touchstart",()=>{go=Date.now()},{capture:!0,passive:!0}))}Qi();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return Qi(),Date.now()-go<e}function bo(e,t,a,{enabled:r=!0,fallbackOnParent:i=!1}={}){const s=$a(e),l=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const f=p,b=p.target,v=a.current,C=!!(b&&v&&v.contains(b));if(f.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&l.current(!1,v)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,l]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),l.current(!p,m??a.current),!0)},[a,l]);return o.useEffect(()=>{if(!r||!i)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let f=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},v=h=>{f=b(h)?s.current:null},C=h=>{const _=f;f=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),l.current(!_,m))};return p.addEventListener("touchstart",v,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",v),p.removeEventListener("touchend",C)}},[r,i,a,s,l]),{touchPress:d}}function Vy(e,t){const{size:a=48,type:r,htmlType:i,href:s,target:l,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:f,children:b,ariaLabel:v,variant:C="default",align:h="center",nowrap:_=!1,selected:g,toggleable:A=!1,ariaExpanded:y,ariaControls:k,disabled:x=!1,useLabel:w=!0,useBorder:B=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,width:O,minWidth:P,onClick:G,onDisabledClick:L,showTooltipInfo:M=!1,tooltipInfoText:$=null,tooltipDescription:Z=null,tooltipOnly:q=!1,iconSize:z="medium",iconColor:V,shape:R="rounded",color:H,className:W,...I}=e,S=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),j=S.match(/^\d+$/)?`button${S}`:`button-${S}`,F=Number(a),U=!isNaN(F)&&F<40?"button-2":"button-1",re=m??b,te=x||!!I.disabled,le=te?D?"disabled-covered":N?"disabled-invisibled":"disabled":C,K=le?`button--variant-${le}`:"",oe=h?`button--align-${h}`:"",Ae=_?"button--nowrap":"",Y=R?`button--shape-${R}`:"",Q=typeof V=="string"&&V.startsWith("--")?`var(${V})`:V,me={...O?{width:typeof O=="number"?`${O}px`:O}:{},...P?{minWidth:typeof P=="number"?`${P}px`:P}:{},...B?{}:{"--button-border":te?"0":"1px solid transparent"},...Q?{"--button-icon-color":Q}:{},...H?{"--color-main":H}:{}},De=w===!1?"":re,be=Array.isArray(De)?De.length>0:!!De,ne=!!d,ue=r??(be||c||ne?"bar":"dot"),fe=`${j}--${ue}`,ge=o.useRef(null);o.useEffect(()=>{!Ln||i!==void 0||ge.current?.closest("form")&&St(`button-in-form:${typeof re=="string"?re:""}`,'[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 re=="string"&&re?` \uB2E8\uCD94: ${re}`:""))},[i,re]);const Ce=o.useRef(t);Ce.current=t;const $e=o.useCallback(Re=>{ge.current=Re;const tt=Ce.current;typeof tt=="function"?tt(Re):tt&&(tt.current=Re)},[]),He=o.useRef(te),[je,Ie]=o.useState(!!g),[qe,mt]=o.useState(!1),[ct,rt]=o.useState(null),ft=o.useCallback(()=>mt(!1),[]),[ke,Ve]=o.useState(!1),we=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Ie(g)},[g]),o.useEffect(()=>{if(He.current&&!te&&ge.current){const Re=ge.current;let tt=!1;try{tt=Re.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Re.blur(),Re.style.pointerEvents="none";const xt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge.current&&(ge.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(xt)}He.current=te},[te]);const Ue=typeof g=="boolean"?!!g:je,Be=typeof y=="boolean"?void 0:A||typeof g=="boolean"?Ue?"true":"false":I["aria-pressed"],Me=_e("button",j,fe,K,oe,Ae,Y,Ue?"is-selected":null,E?null:"button--no-bg",q?"button--tooltip-only":null,W),Se=`button__icon button__icon--${z}`,Je=Array.isArray(f)?f:f!==void 0?[f]:[],Qe=()=>{if(Array.isArray(De))return De.map((tt,xt)=>{const Lt=Je[xt];return n.jsxs("span",{className:`button__label-text${Lt!==void 0?" button__label-text--has-sub":""}`,children:[tt,Lt!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Lt})]},xt)});const Re=f!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[De,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:f})]})},dt=Re=>{typeof g!="boolean"&&!A&&Ie(!1),Re.currentTarget.blur()},ht=Re=>{te||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Re),dt(Re))},wt=Re=>{if(q&&gt&&it.touchPress(Re.currentTarget),te){gt&&it.touchPress(Re.currentTarget),Re.preventDefault(),L?.(Re);return}typeof g!="boolean"&&A&&Ie(tt=>!tt),G?.(Re)},Ct=o.useCallback(()=>{(M||Z)&&(mt(!0),rt(ge.current?.getBoundingClientRect()??null))},[M,Z]),Nt=o.useCallback(()=>{(M||Z)&&(mt(!1),rt(null))},[M,Z]),gt=!!(M||Z),it=bo(qe,Re=>{Re?Ct():Nt()},ge,{enabled:gt&&(te||q),fallbackOnParent:gt&&te}),Ye={...I};delete Ye.disabled,delete Ye.className,delete Ye.faded,delete Ye.useFaded,delete Ye.loading,delete Ye.onMouseLeave,delete Ye.onPointerEnter,delete Ye.onPointerLeave,delete Ye.onPointerUp,delete Ye.onFocus,delete Ye.onBlur,te&&(Object.keys(Ye).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Ye[Re]=="function"&&delete Ye[Re]}),Ye["aria-disabled"]="true");const se=(typeof M=="string"?M:null)??(typeof $=="string"?$:null)??(typeof v=="string"?v:null)??(typeof re=="string"?re:null)??void 0,Ne=typeof v=="string"?v:typeof re=="string"?re:se,We=Z?[Z.title,...Z.items??[]].filter(Boolean).join(". "):M&&se&&se!==Ne?se:"",nt=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,We?we:null].filter(Boolean).join(" ")||void 0,Fe=(Re,tt)=>n.jsx(at,{icon:Re,label:tt??Ne,className:Se,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Ge=()=>ue==="dot"?n.jsxs(n.Fragment,{children:[Fe(c),be&&n.jsx("span",{className:`button__label ${U}`,children:Qe()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Fe(c)}),be&&n.jsx("span",{className:`button__label ${U}`,children:Qe()})]}),ne&&n.jsx("span",{className:"button__right",children:Fe(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Fe(c,v??re)}),be&&n.jsx("span",{className:`button__label ${U}`,children:Qe()}),ne&&n.jsx("span",{className:"button__right",children:Fe(d)})]}),bt=!!s&&!te;return n.jsxs(n.Fragment,{children:[n.jsxs(bt?"a":"button",{...Ye,ref:$e,...bt?{href:s,target:l,rel:u??(l==="_blank"?"noreferrer":void 0)}:{type:i??"button",disabled:te&&!L&&!ke},className:Me,"aria-pressed":Be,"aria-expanded":typeof y=="boolean"?y:I["aria-expanded"],"aria-controls":k??I["aria-controls"],"aria-label":Ne,"aria-disabled":te&&(bt||L||ke)?!0:void 0,"aria-describedby":nt,style:me,onClick:wt,onMouseLeave:ht,onPointerEnter:Re=>{ca(Re)||Ct(),!te&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Nt(),!te&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Re)},onPointerUp:Re=>{te&&gt&&it.touchPress(Re.currentTarget),!te&&typeof I.onPointerUp=="function"&&I.onPointerUp(Re)},onFocus:Re=>{Ve(!0),da()||Ct(),!te&&typeof I.onFocus=="function"&&I.onFocus(Re)},onBlur:Re=>{Ve(!1),te||dt(Re),Nt(),!te&&typeof I.onBlur=="function"&&I.onBlur(Re)},children:[Ge(),We?n.jsx("span",{id:we,hidden:!0,"aria-label":We}):null]}),qe&&Z?n.jsx(Kn,{anchorRect:ct,title:Z.title,items:Z.items,onClose:ft}):qe&&se?n.jsx(Bn,{anchorRect:ct,text:se,onClose:ft}):null]})}const pe=o.forwardRef(Vy);pe.displayName="Button";function kt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const i=r.current?.parentElement??null;return t(i,e),()=>a(i)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},yo=new WeakMap;function vo(e){if(e)return yo.get(e)}function Gt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),yo.set(e,t))}function Kt(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),yo.delete(e))}const el={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function tl(){const e=kt(el,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const nl={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function al(){const e=kt(nl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const rl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ol(){const e=kt(rl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const sl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function il(){const e=kt(sl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const ll={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function ul(){const e=kt(ll,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const cl={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function dl(){const e=kt(cl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const pl={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function ml(){const e=kt(pl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const hl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fl(){const e=kt(hl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Cl={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function gl(){const e=kt(Cl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const bl={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function yl(){const e=kt(bl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const vl={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function xl(){const e=kt(vl,Gt,Kt);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 _l={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wl(){const e=kt(_l,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Bl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function kl(){const e=kt(Bl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Al={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Nl(){const e=kt(Al,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const Qt=(e,t,a)=>({key:e,get label(){return Rt.t(`promoBannerBg.${e}`,t)},textTone:a}),qy=[Qt("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("soft","\uC18C\uD504\uD2B8","dark"),Qt("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),Qt("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),Qt("warm","\uC6DC(\uAC15\uC870)","dark"),Qt("dark","\uB2E4\uD06C","light"),Qt("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),Qt("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),Qt("outline","\uC544\uC6C3\uB77C\uC778","dark"),Qt("success","\uC131\uACF5/\uC644\uB8CC","light"),Qt("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),Qt("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],El={main:tl,soft:al,sub:ol,deep:il,softSub:ul,warm:dl,dark:ml,radial:fl,diagonal:gl,dots:yl,outline:xl,success:wl,naver:kl,instagram:Nl};function Dl({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:i=.1,lineHeightRatio:s=1.4}={}){const l=A=>Math.max(a,Math.min(r,Number(A))),u=A=>{try{const y=localStorage.getItem(A),k=y?Number(y):1;return Number.isFinite(k)?l(k):l(1)}catch{return l(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const f=A=>{d(typeof A=="function"?y=>l(A(y)):l(A))},b=()=>f(A=>+(A+i).toFixed(6)),v=()=>f(A=>+(A-i).toFixed(6)),C=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:f,increase:b,decrease:v,canIncrease:C,canDecrease:h,fontSize:_,lineHeight:g}}function Sl(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const xo=" \xB7 ",Tl=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(xo)?e.split(xo).pop()??e:e})(),Uy=o.createContext(!1),Yn=[];let jl=null;function Gy(e){const t=o.useContext(Uy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(jl=document.title);const a={text:Tl?`${e}${xo}${Tl}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:jl??document.title}},[e,t])}const _o=[{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"}],Ky=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function an(e,t){return Ky().compare(e,t)}const lr=new Map;function Yy(e){const t=lr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let i=0;for(let s=r.exec(e);s;s=r.exec(e)){let l=s.index,u=s[0];u[0]==="-"&&l>0&&!/\s/.test(e[l-1])&&(l+=1,u=u.slice(1)),l>i&&a.push(e.slice(i,l)),a.push(Number(u)),i=s.index+s[0].length}return i<e.length&&a.push(e.slice(i)),lr.size>5e3&&lr.clear(),lr.set(e,a),a}function Zy(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 Xy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),i=a(t);if(r===i)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Zy(m);return p!==null?[p]:Yy(m)},l=s(e,r),u=s(t,i),c=Math.min(l.length,u.length);for(let d=0;d<c;d++){const m=l[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const f=an(m,p);if(f!==0)return f}return l.length!==u.length?l.length-u.length:an(r,i)}const Ml=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function wo(e,t,a){const r=Ml(e),i=Ml(t);if(r||i)return r===i?0:r?1:-1;const s=Xy(e,t);return a?s:-s}function Jy(e,t,a){const{t:r}=xe.useTranslation(),[i,s]=o.useState(()=>{const v=a?.initialPageSize;return v&&_o.some(C=>C.value===v)?v:"25"}),[l,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),l!==1&&u(1));const m=o.useMemo(()=>_o.map(v=>({...v,label:r("visits.showN",{n:v.value})})),[r]),p=o.useCallback(v=>{_o.some(C=>C.value===v)&&(s(v),u(1))},[]),f=Math.max(1,Math.ceil(e.length/Number(i))),b=Math.min(Math.max(1,Number.isFinite(l)?Math.floor(l):1),f);return l!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(i),b*Number(i)),[e,b,i]),pageSizeProps:{options:m,value:i,onChange:p},paginationProps:{page:b,total:f,onChange:u},setPage:u}}function Qy(e){const[t,a]=o.useState(null),r=o.useRef(t),i=o.useRef(e?.onSortChange);i.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),i.current?.(m)},[]),l=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((f,b)=>wo(d(f,m),d(b,m),p))},[t]);return{sort:t,field:l,sortRows:u}}const dn="\uC804\uCCB4";Object.fromEntries(Object.entries(rC).map(([e,{nucleus:t}])=>[e,t]));const e2={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"})},t2={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"})},n2={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 a2(e,t){if("place"in t)return e2[t.place](e);const a=t2[t.vowel](e);return t.glide?`${a} \xB7 ${n2[t.glide](e)}`:a}const r2=(e,{defaultValue:t})=>t,Ll=(e,t)=>({jamos:e,phonetic:t,tooltip:a2(r2,t)}),kn=(e,t)=>t.map(a=>Ll([a],{place:e})),Pt=(e,t,a)=>Ll([...e],a?{vowel:t,glide:a}:{vowel:t}),Bo={cho:[kn("labial",["\u3142","\u3143","\u314D","\u3141"]),kn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),kn("alveolar",["\u3145","\u3146"]),kn("palatal",["\u3148","\u3149","\u314A"]),kn("velar",["\u3131","\u3132","\u314B"]),kn("glottal",["\u314E"])],jung:[[Pt("\u3163","frontHigh"),Pt("\u315F","frontHigh","w"),Pt("\u3162","frontHigh","velar")],[Pt("\u3161","backHighUnrounded")],[Pt("\u315C","backHighRounded"),Pt("\u3160","backHighRounded","j")],[Pt("\u3154\u3150","frontMid"),Pt("\u3156\u3152","frontMid","j"),Pt("\u3159\u315A\u315E","frontMid","w")],[Pt("\u3153","backMidUnrounded"),Pt("\u3155","backMidUnrounded","j"),Pt("\u315D","backMidUnrounded","w")],[Pt("\u3157","backMidRounded"),Pt("\u315B","backMidRounded","j")],[Pt("\u314F","low"),Pt("\u3151","low","j"),Pt("\u3158","low","w")]],jong:[kn("labial",["\u3142","\u3141"]),kn("alveolar",["\u3137","\u3134","\u3139"]),kn("velar",["\u3131","\u3147"])]},o2=e=>e===s2?[]:Array.from(e),s2="__NO_CODA__",ko=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:i})=>({v:a.join(""),phonetic:r,tooltip:i}))),$l={cho:ko(Bo.cho),jung:ko(Bo.jung),jong:ko(Bo.jong)};$l.jung.flat().forEach(({v:e})=>{for(const t of o2(e));}),new Set($l.cho.flat().map(e=>e.v));function i2(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),i=o.useCallback(s=>{const l=s.getBoundingClientRect();t(u=>u?null:l)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:i}}function l2(e){const[t,a]=o.useState(null),[r,i]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const l=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),i(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),i(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:l,close:u}}function Rl(e="warning"){const[t,a]=o.useState(""),[r,i]=o.useState(e),[s,l]=o.useState(0),u=o.useCallback((p,f)=>{i(f),a(p),l(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(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 Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[i,s]=o.useState(!1),[l,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{i&&m()},[i,m]),o.useEffect(()=>{if(!i)return;let b=d.current?.offsetHeight??0;b>0&&m();let v=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++v>4){C?.disconnect(),C=null;return}m()}}),C.observe(d.current));const h=w=>{const B=w.target;r&&B.closest?.(r)||c.current?.contains(B)||d.current?.contains(B)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},A=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",A,!0);const y=()=>{a==="reposition"?g():a==="close"&&s(!1)};let k=null;const x=()=>{y(),k&&clearTimeout(k),k=setTimeout(()=>{k=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",y),window.addEventListener("orientationchange",x)),()=>{_!==null&&cancelAnimationFrame(_),C?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",A,!0),a!=="ignore"&&(window.removeEventListener("resize",y),window.removeEventListener("orientationchange",x)),k&&clearTimeout(k)}},[i,m,t,a,r]),o.useEffect(()=>{if(i)return Gn(()=>s(!1))},[i]);const p=o.useCallback(()=>s(b=>!b),[]),f=o.useCallback(()=>s(!1),[]);return{open:i,setOpen:s,toggle:p,close:f,style:l,triggerRef:c,menuRef:d}}function u2(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:i,playMs:s=1100,feedbackMs:l=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,f]=o.useState("idle"),[b,v]=o.useState(null),[C,h]=o.useState([]),[_,g]=o.useState(null),[A,y]=o.useState(0),k=o.useRef(0),x=o.useCallback(R=>{k.current=typeof R=="function"?R(k.current):R,y(k.current)},[]),w=o.useRef(r),B=o.useRef(i);o.useEffect(()=>{w.current=r,B.current=i},[r,i]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(R,H)=>{E.current.push(setTimeout(H,R))};o.useEffect(()=>()=>D(),[]);const O=u[d]?.id??null,P=o.useRef(null),G=o.useCallback(()=>{D(),f("playing"),h([]),g(null),x(0);let R=0;e.forEach((H,W)=>{N(R,()=>{m(W),v(H.id),w.current?.(H)}),N(R+1e3,()=>{v(null),h(I=>[...I,H.id])}),R+=1300}),N(R,()=>{f("done"),B.current?.({score:0,total:e.length})})},[e,x]),L=o.useCallback((R,H)=>{if(H>=R.length){f("done"),B.current?.({score:k.current,total:R.length});return}P.current=null,m(H),g(null),f("playing"),v(R[H].id),w.current?.(R[H]),N(s,()=>{v(null),f("waiting")})},[s]),M=o.useCallback(()=>{D();const R=ja(e);c(R),x(0),h([]),L(R,0)},[e,L,x]),$=o.useCallback(()=>{t==="playback"?(c(e),G()):M()},[t,e,G,M]),Z=o.useCallback(()=>{D(),f("idle"),v(null),h([]),g(null),m(0),x(0),c([])},[x]),q=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?$():Z(),()=>D()),[t,q,a]);const z=o.useCallback(R=>{p!=="waiting"||t==="playback"||P.current===d||(P.current=d,g(R),R===u[d]?.id&&x(H=>H+1),t==="exam"?(f("playing"),N(400,()=>L(u,d+1))):(f("feedback"),N(l,()=>L(u,d+1))))},[p,t,u,d,L,l,x]),V=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:_,answerId:O,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:z},index:d,total:V,score:A,phase:p,done:p==="done",start:$,reset:Z}}const Ao=new Map,No=new Map,c2=()=>()=>{},d2=()=>!0,p2=()=>!1;function Pl(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 m2(e){if(typeof window>"u")return"";const t=(a,r)=>{const i=r.attrName.toLowerCase(),s=r.attrValue.trim();(i==="href"||i==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(i==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const l=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(l)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function h2(e,t){const a=new Set;for(const l of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(l[2]);for(const l of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(l[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(l=>l[1])),i=[...a].filter(l=>r.has(l));if(i.length===0)return e;let s=e;for(const l of i){const u=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${l}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function f2(e){const t=No.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Ao.set(e,r),r)).catch(()=>null).finally(()=>{No.delete(e)});return No.set(e,a),a}function C2(e,t=!0){const a=o.useSyncExternalStore(c2,d2,p2)&&t&&e?Pl(e)??Ao.get(e)??null:null,[r,i]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){i({src:e,enabled:t,svg:null});return}const s=Pl(e)??Ao.get(e)??null;if(s!==null){i({src:e,enabled:t,svg:s});return}let l=!0;return f2(e).then(u=>{l&&i({src:e,enabled:t,svg:u})}),()=>{l=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function g2({title:e,description:t,actionLabel:a,onAction:r,bg:i,color:s,size:l="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=i??s??"main",f=o.useRef(null),[b,v]=o.useState("main"),C=ln("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const A=f.current;if(!A)return;const y=vo(A),k=(x,w,B)=>{if(B!==void 0)A.style.setProperty(w,B),h.current[x]=!0;else if(h.current[x]){const E=y?.[x];E?A.style.setProperty(w,E):A.style.removeProperty(w),h.current[x]=!1}};k("title","--promo-banner-bg-title",c),k("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const A=f.current;if(!A)return;const y=vo(A);v(y?.actionVariant??"main")},[p]);const _=_e("promo-banner",`promo-banner--${l}`,m),g=El[p];return n.jsxs("div",{ref:f,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${l==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(pe,{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 b2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":i}){const{t:s}=xe.useTranslation(),l=i??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,f]=o.useState(!1),[b,v]=o.useState(!1),[C,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),A=o.useRef(null),y=Co(),k=p||b||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||k||y)return;const B=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(B)},[c,t,k,y]);const w=B=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},B)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const B=E=>{E.pointerType==="touch"&&(A.current&&A.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]),c===0?null:n.jsxs("section",{ref:A,className:_e("top-banner",r),"aria-label":l,"aria-roledescription":"carousel",onPointerEnter:B=>{_.current=B.pointerType},onPointerDown:B=>{_.current=B.pointerType,B.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:B=>{B.pointerType==="touch"&&w(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&f(!0)},onMouseLeave:()=>f(!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(-${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":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===x,onClick:()=>m(E)},E))})]})}function y2({title:e,body:t,open:a=!1,onToggle:r,avatar:i,titleClassName:s="body-2",bodyClassName:l="body-2",className:u=""}){const{t:c}=xe.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 m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),f=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[f+1]:p[f-1])?.focus()}},children:[i&&n.jsx("div",{className:"accordion-item__avatar",children:i}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(at,{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 ${l}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function v2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:i}){const[s,l]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(y2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>l(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:i},c.id??d))})}function x2(){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 _2(){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 w2(){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 At(e){const{t}=xe.useTranslation(),{type:a="bar",size:r,className:i="","aria-label":s,"aria-hidden":l}=e;if(a==="dot"){const{icon:k,number:x,position:w="top-right",onClick:B,animate:E=!1}=e,D=k??"check",N=x!==void 0?"number":D,O=typeof r=="number"?r:32,P=_e("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${O}`,E?"circle-badge--animate":"",B?"circle-badge--clickable":"",i),G=x!==void 0?t("badge.nthSelected",{n:x,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:P,onClick:B,onKeyDown:B?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":l?void 0:s??G,"aria-hidden":l||void 0,role:B?"button":l?void 0:"img",tabIndex:B?0:void 0,children:[x!==void 0&&x,x===void 0&&D==="check"&&n.jsx(x2,{}),x===void 0&&D==="remove"&&n.jsx(_2,{}),x===void 0&&D==="minus"&&n.jsx(w2,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:f,iconRight:b,color:v}=e,C=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",_={small:12,medium:14,large:16}[C]??14,g=_e("badge",`badge--${d}`,`badge--${C}`,m!=="filled"?`badge--${m}`:"",h,i),A=v?.startsWith("--")?`var(${v})`:v,y=p!==void 0||A?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...A?{"--badge-color":A}:{}}:void 0;return n.jsxs("span",{className:g,style:y,"aria-label":l?void 0:s,role:s&&!l?"img":void 0,"aria-hidden":l||void 0,children:[f&&n.jsx(at,{icon:f,size:_,className:"badge__icon"}),u??c,b&&n.jsx(at,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:i}=xe.useTranslation(),s=r==="small"?40:48,[l,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of l){const A=_?.[g.ci]?.items?.[g.ii];if(!A||!Array.isArray(A.children)||!A.children.length)break;_=[{title:null,items:A.children}],h.push({title:A.label||null,columns:_})}return h},[e,l]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),f=o.useRef(null),b=o.useRef(null),v=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const A=f.current?.querySelector("button:not([disabled])");if(A&&A.offsetParent){A.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[v]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(A=>[...A.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(pe,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:i("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:f,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,A)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&A>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(pe,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx(At,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?i("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>C(g,_,A),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},A))})]},_))})]})}const Il=".content-area";function Eo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Il);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&St("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Il}) \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 Do=52,ur=10,Fl=e=>e&&e>0?e:0;function Ol({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:i,moreItems:s=[],scrollContainer:l}){const{t:u}=xe.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[f,b]=o.useState(0),v=e.length;o.useEffect(()=>{const R=p.current;if(!R)return;const H=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(R):null,j=R.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),F=R.querySelector(".bottom-nav__left"),U=F?.nextElementSibling,re=(F?.offsetWidth??0)+(F&&U?.classList.contains("bottom-nav__divider")?U.offsetWidth:0);b(Math.max(0,j-re))};if(H(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(H);W.observe(R);const I=R.querySelector(".bottom-nav__left");return I&&W.observe(I),()=>W.disconnect()},[i]);const C=Do+1,h=R=>Math.max(0,Math.floor((R+ur)/(Do+ur))),_=v*(Do+ur)-ur<=f,g=f<=0||s.length===0&&_?v:Math.min(v,h(f-C)),A=f>0&&g<v,y=A?g:v,k=e.slice(0,y),x=e.slice(y),w=A||s.length>0,B=o.useCallback((R,H)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:Ia(H)}),[]),E=o.useId(),{open:D,toggle:N,close:O,style:P,triggerRef:G,menuRef:L}=Fa({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),M=o.useCallback((R,H)=>H>0?u("nav.badgeLabel",{label:R,count:H,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),$=o.useCallback((R,H)=>H>0?u("nav.badgeInsideLabel",{label:R,count:H,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),Z=o.useCallback(()=>i?.(c),[i,c]),q=o.useMemo(()=>x.find(R=>!!R.key&&R.key===t)??s.find(R=>R.selected||R.key&&R.key===t),[x,t,s]),z=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),Eo(l,"BottomNav")),O())}})),...s.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),O()}}))]}],[x,s,t,a,O]),V=[...x,...s].reduce((R,H)=>R+Fl(H.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[i&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(pe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:Z})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:k.map((R,H)=>{const W=Fl(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(pe,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:M(R.label,W),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),Eo(l,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(At,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},R.key??`__slot-${H}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:G,className:"bottom-nav__slot",children:[n.jsx(pe,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:$(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),V),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),V>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(At,{type:"dot",position:"top-right",number:Math.min(V,99),size:24})}),D&&en.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:P,ref:L,children:n.jsx(Oa,{columns:z,onClose:O})}),document.body)]})})]})]})}function zl(e){if(typeof e!="string")return!1;let t="";for(const r of e){const i=r.charCodeAt(0);i<=32||i>=127&&i<=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 Wl(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function B2(e){const{t}=xe.useTranslation(),{activeKey:a,unreadCount:r,onDebug:i,onNotification:s,onSetting:l,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return i||s||l||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[i&&n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:i,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Wl(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx(At,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),l&&n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:l,selected:a==="settings"}),u&&n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(pe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Hl(e){const{t}=xe.useTranslation(),{item:a,itemKey:r,label:i,icon:s,active:l,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",f=a?.label??i??"",b=a?.icon??s??"",v=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(at,{icon:b,label:typeof f=="string"?f:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${l?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(A=>{if(h)return;const y=A.detail>0;if(y)try{A.currentTarget.blur()}catch{}u?.(p,A.currentTarget,y)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof f=="string"?Wl(t,f,v):void 0,"aria-current":l?"page":void 0,style:c,"aria-disabled":h,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:f}),v>0&&n.jsx(At,{type:"dot",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 Vl(e){const{t}=xe.useTranslation(),{items:a=[],activeKey:r,onChange:i,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b,scrollContainer:v}=e||{},C=f==="manager",h=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),_=o.useRef(null),[g,A]=o.useState(null);o.useEffect(()=>{const B=_.current;if(!B)return;let E=null;const D=()=>{const{scrollHeight:P,clientHeight:G,scrollTop:L}=B;if(P<=G+1){A(z=>z===null?z:null);return}const M=Math.max(24,G/P*G),$=G-M,Z=P-G,q={top:Math.round(L/Z*$),height:Math.round(M)};A(z=>z&&z.top===q.top&&z.height===q.height?z:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),B.addEventListener("scroll",N,{passive:!0});const O=typeof ResizeObserver<"u"?new ResizeObserver(N):null;O?.observe(B);for(const P of Array.from(B.children))O?.observe(P);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",N),O?.disconnect()}},[a]);const y=o.useRef(null),k=o.useCallback(B=>{const E=_.current;E&&(B.preventDefault(),y.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),x=o.useCallback(B=>{const E=_.current,D=y.current;!E||!D||(E.scrollTop=D.top+(B.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(B=>{y.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:[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:x,onPointerUp:w,onPointerCancel:w})}),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(Hl,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(D,N,O)=>{if(B.disabled)return;if(B.href){if(zl(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),O)try{N?.blur()}catch{}return}if(i?.(B.key),Eo(v,"SideNav"),!O)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 P=document.querySelector(".header");if(P){const G=typeof P.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&P.matches(":hover"))){P.classList.add("header--force-collapsed");const L=()=>{P.classList.remove("header--force-collapsed"),P.removeEventListener("mouseenter",L)};P.addEventListener("mouseenter",L)}}}})]},B.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Hl,{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:h})]}),n.jsx(B2,{activeKey:r,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var cr='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>',So='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>',k2='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 ql({appMode:e}){const{t}=xe.useTranslation(),a=e==="manager",r=a?So:cr,i=k2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:i,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 Ul({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:i,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b,scrollContainer:v}){const{t:C}=xe.useTranslation(),h=ln("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(P=>!P.section&&(P.key||P.label)).map(P=>({key:P.key,label:typeof P.label=="string"?P.label:void 0,icon:P.icon,state:P.disabled?"disabled":void 0,badgeCount:P.badge})),[a]),g=o.useCallback(P=>{const G=a?.find(L=>L.key===P);if(!G?.disabled){if(G?.href){zl(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.(P)}},[a,t]),A=o.useMemo(()=>{const P=[];return l&&P.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:l}),u&&P.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&P.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),m&&P.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&P.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&P.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),P},[C,l,u,d,m,p,c,s]),y=o.useCallback((P,G)=>({position:"fixed",top:P.bottom+8,right:Math.max(8,window.innerWidth-P.right),zIndex:Ia(G)}),[]),k=o.useId(),{open:x,toggle:w,close:B,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:y,onScroll:"ignore",onResize:"reposition"}),O=o.useMemo(()=>[{items:A.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===e),closeOnSelect:!0,onClick:()=>{P.onClick?.(),B()}}))}],[A,e,B]);return n.jsxs("aside",{className:`header${f==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ql,{appMode:f}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(pe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":x,"aria-controls":x?k:void 0}),!!u&&!!s&&s>0&&n.jsx(At,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),x&&en.createPortal(n.jsx("div",{id:k,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:O,onClose:B})}),document.body)]})]}),n.jsx(Vl,{scrollContainer:v,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b}),h&&n.jsx(Ol,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:v,appMode:f,onAppModeChange:b})]})}const A2=Ul,N2=()=>Rt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Gl(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 la(`${t.toLocaleString("ko-KR")}\uC6D0`)}return la(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function E2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function D2(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\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 i=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return i?i[2].toLowerCase()==="year"?`${i[1]}\uB144`:`${i[1]}\uC77C`:a||N2()}function S2(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 Kl(e){return{type:e.type??E2(e),plan:D2(e),label:e.label,price:Gl(e.price),originalPrice:Gl(e.originalPrice),discountLabel:e.discountLabel}}var T2='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>',j2='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>',Yl='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 Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function M2(e){if(e)return To.get(e)}function An(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Nn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const Zl={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function Xl(e={}){const t=kt(Zl,An,Nn);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("${Yl}")`}})]})}const Jl="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",pa=240;var za='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 L2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},$2=100,R2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function Ql(e={}){const t=kt(L2,An,Nn),a="var(--color-main)",r=270,i=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:R2.map(({scale:s,opacity:l},u)=>n.jsx("g",{transform:`translate(${r} ${i}) scale(${s*$2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:l,children:n.jsx("path",{d:Jl,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("${za}")`}})]})}const P2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},I2=100,F2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function O2(e={}){const t=kt(P2,An,Nn),a="#ffffff",r=270,i=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:F2.map(({scale:s,opacity:l},u)=>n.jsx("g",{transform:`translate(${r} ${i}) scale(${s*I2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:l,children:n.jsx("path",{d:Jl,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("${Yl}")`}})]})}const z2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function W2(e={}){const t=kt(z2,An,Nn);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("${za}")`}})]})}const H2={Logo_SpeechEar_ko:{"":cr,_mono:T2},Logo_SpeechEarManager_ko:{"":So,_mono:j2}};function V2(e,t){if(e)return H2[e]?.[t??""]??void 0}const q2={speechear:cr,manager:So},U2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},eu=10;function G2(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 tu(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 i=Math.floor(e/60);return i>0?t("passCard.remainingMinute",{n:i}):t("passCard.remainingSecond",{n:Math.floor(e)})}function K2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),i=a==="\uC624\uD508\uD2B9\uAC00"||a===Rt.t("passCard.specialLabel");return r?n.jsx(W2,{}):i?n.jsx(O2,{}):n.jsx(Ql,{})}return n.jsx(Xl,{})}function nu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:i,endDate:s,remainingSeconds:l,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:f,copyrightColor:b,logoSrc:v,label:C,price:h,originalPrice:_,discountLabel:g,onUse:A,onRefund:y,onDelete:k}){const{t:x}=xe.useTranslation(),w=t?Kl(t):void 0,B=i??w?.type??"speechear",E=r??w?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??w?.label,N=h??(a?w?.price:void 0),O=_??(a?w?.originalPrice:void 0),P=g??w?.discountLabel,G=o.useMemo(()=>{if(N)return null;const Y=t?.durationDays??S2(t?.code);if(!Y||Y<=0)return l!=null?{percent:null,remainingLabel:tu(l,x)}:null;const Q=Y*86400;let me;if(l!=null)me=l;else if((c==="active"||c==="expired")&&s){const ne=new Date(s).getTime();if(Number.isNaN(ne))return null;const ue=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),fe=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),ge=Math.round(ue&&fe?(Date.UTC(+ue[1],+ue[2]-1,+ue[3])-Date.UTC(+fe[1],+fe[2]-1,+fe[3]))/864e5:(ne-Date.now())/864e5);me=Math.max(0,u?ge+1:ge)*86400}else c==="expired"?me=0:me=Q;const De=G2(me),be=Math.max(0,Math.min(100,Math.floor(Math.min(De,Q)/Q*100)));return c==="pending"&&be>=100?null:{percent:be,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):tu(me,x)}},[N,c,s,l,u,t?.durationDays,t?.code,x]),L=o.useRef(null),[M,$]=o.useState({}),[Z,q]=o.useState(null),z=!!(A||y||k),V=o.useRef(!1),R=o.useRef(void 0),[H,W]=o.useState(v);o.useLayoutEffect(()=>{W(v)},[v]),o.useLayoutEffect(()=>{const Y=L.current;Y&&(p!==void 0&&Y.style.setProperty("--pass-card-text",p),f!==void 0&&Y.style.setProperty("--pass-card-sub",f),b!==void 0&&Y.style.setProperty("--pass-card-copyright",b))},[p,f,b]),o.useLayoutEffect(()=>{const Y=L.current;if(!Y)return;const Q=M2(Y);if(!v){const me=U2[B],De=c==="expired"?"_mono":Q?.logoColor??"",be=V2(me,De);W(be)}},[d,v,B,c]);const I=Y=>{const Q=L.current;if(!Q)return null;const{left:me,top:De,width:be,height:ne}=Q.getBoundingClientRect(),ue=(Y.clientX-me)/be-.5;return{rotateX:-((Y.clientY-De)/ne-.5)*eu,rotateY:ue*eu}},S=(Y,Q)=>{const me=Q*-.7,De=Y*.7+10,be=20+(Math.abs(Y)+Math.abs(Q))*.4;return`${me}px ${De}px ${be}px rgba(0, 0, 0, 0.18)`},j=o.useCallback(Y=>{if(da())return;V.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{V.current=!1},200);const Q=I(Y);Q&&$({transform:`perspective(800px) rotateX(${Q.rotateX}deg) rotateY(${Q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(Q.rotateX,Q.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)"})},[]),F=o.useCallback(Y=>{if(da())return;const Q=I(Y);if(!Q)return;const me=V.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";$({transform:`perspective(800px) rotateX(${Q.rotateX}deg) rotateY(${Q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(Q.rotateX,Q.rotateY),transition:me})},[]),U=o.useCallback(()=>{clearTimeout(R.current),V.current=!1,$({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)"})},[]),re=o.useCallback(()=>q(null),[]),te=o.useMemo(()=>{const Y=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),Q=E.replace("\uC774\uC6A9\uAD8C","").replace(Y==="\uC774\uC6A9\uAD8C"?"":Y,"").trim(),me=Q.match(/^(.*?)(일|년)$/);return me?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:me[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:me[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:Q})},[E,x]),le=o.useMemo(()=>{const Y=la(N);if(!Y)return null;const Q=Y.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!Q)return n.jsx("span",{className:"h1",children:Y});const[,me,De,be]=Q;return n.jsxs(n.Fragment,{children:[me&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:me}),n.jsx("span",{className:"h1 pass-card__price-amount",children:De}),be.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:be.trim()})]})},[N]),K=o.useCallback(()=>{z&&q(Y=>{if(Y)return null;const Q=L.current?.getBoundingClientRect();if(!Q)return null;const me=50;return{left:Q.left,right:Q.right,width:Q.width,height:Q.height,x:Q.x,y:Q.y+me,top:Q.top+me,bottom:Q.bottom+me}})},[z]),oe=o.useCallback(Y=>{z&&(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),K())},[z,K]),Ae=[{items:[...A?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{A(),q(null)},closeOnSelect:!0}]:[],...y?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{y(),q(null)},closeOnSelect:!0}]:[],...k?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${z?" pass-card--clickable":""}`,style:M,onMouseEnter:j,onMouseMove:F,onMouseLeave:U,onPointerUp:Y=>{Y.pointerType==="touch"&&U()},onPointerCancel:Y=>{Y.pointerType==="touch"&&U()},onClick:K,onKeyDown:z?oe:void 0,role:z?"button":void 0,tabIndex:z?0:void 0,"aria-label":e,"aria-haspopup":z?"menu":void 0,"aria-expanded":z?!!Z:void 0,children:[d??K2(B,E,D),!m&&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:H??q2[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:te}),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:[P&&n.jsx("span",{className:"pass-card__discount body-3",children:P}),n.jsxs("div",{className:"pass-card__price",children:[O&&n.jsx("span",{className:"pass-card__price-original body-3",children:la(O)}),le]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.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."})]})]})}),Z&&n.jsx(cn,{anchorRect:Z,onClose:re,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:Ae,onClose:re,size:"small"})})]})}const Y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function Z2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=kt(Y2,An,Nn);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("${za}")`}})]})}const X2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function J2(e={}){const t=kt(X2,An,Nn);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("${za}")`}})]})}function Q2(e,t){if(e){if(t==="manager_pro")return n.jsx(J2,{});if(t==="manager_standard")return n.jsx(Z2,{});if(t==="manager_lite")return n.jsx(Ql,{})}}function ev(e){const t=la(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,i,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),i,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function tv(e){const{t}=xe.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:i,onSelect:s,period:l="monthly",ownedCodes:u}=e||{},c=y=>!!y&&!!u?.includes(y),d=y=>y.onceOnly??/오픈\s*특가/.test(y.label??""),m=(i.tiers||[]).some(y=>d(y)&&c(y.code)),p=y=>{const k=y.prices?y.prices[l]:y.price;return k?(i.tiers||[]).some(x=>!!x.badge&&x.originals?.[l]===k):!1},f=i.colorToken?`var(--color-${i.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[l]:y.price,h=(i.tiers||[]).length>0&&(i.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)}),_=(i.tiers||[]).length>0&&(i.tiers||[]).every(y=>{const k=C(y);return k==="\uBB38\uC758"||k===v}),g=i.group==="org",A=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:f,"--plan-color":f},children:[i.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(At,{label:i.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:f},children:i.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:i.tier??i.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:i.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:(i.recommendedFor||[]).map((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(at,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:f}}),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:(i.features||[]).map((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(at,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:f}}),y]},k))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(pe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>i.tiers?.[0]&&s?.({...i.tiers[0],productId:i.id,productTitle:i.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(i.tiers||[]).map(y=>{const k=y.label||a,x=d(y),w=x||y.openPromo===!0,B=k.replace(/^오픈\s*특가\s*/,"")||a,E=y.prices?y.prices[l]:y.price,D=y.badge?w?`${r}
852
- ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!m)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:ev(E)})})]},y.id);const N=i.tier??(g?i.title:void 0),O=n.jsx(nu,{showPrice:!0,product:{type:A,code:y.code,name:B,label:N,price:E,originalPrice:y.originals?.[l]??void 0,discountLabel:D},bg:Q2(g,i.id)}),P=()=>s?.({...y,productId:i.id,productTitle:i.title,preview:O});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:P,onKeyDown:s?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),P())}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,children:O},y.id)})})})})]})}function nv({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 jo='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 au={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function av(){const e=kt(au,An,Nn);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("${jo}")`}})})}const ru={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function rv(e={}){const t=kt(ru,An,Nn);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("${za}")`}})]})}function ou({keys:e,anchor:t="top-right",scale:a,className:r=""}){const i=Array.isArray(e)?e:[e];return n.jsx("span",{className:_e("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:i.map((s,l)=>n.jsxs("span",{className:"shortcut-badge__group",children:[l>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:s})]},`${s}-${l}`))})}const Wa=(e,t,a)=>e+(t-e)*a;function ov({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:i,selectedId:s=null,answerId:l=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:m,clickable:p=!1,onSelectSpeaker:f,buttonSize:b=40,showIcon:v=!0,onCenterClick:C,centerLabel:h,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:A="top-right",shortcutScale:y,scaleShortcut:k=!1}){const{t:x}=xe.useTranslation(),w=Math.max(0,Math.min(1,a)),B=t/2,E=110/300,D=.18,N=Y=>t*(E+(Y-1)*D),O=Y=>{const Q=N(Y.row??1),me=Y.angleDeg*Math.PI/180;return{x:B+Q*Math.cos(me),y:B+Q*Math.sin(me)}},P=Math.max(...e.map(Y=>Y.row??1),1),G=t*.08,L=t*.1,M=t*.24,$=t-2*G,Z=t-L-M,q=t-M/2,z=o.useMemo(()=>[...new Set(e.map(Y=>Y.deg))].sort((Y,Q)=>Y-Q),[e]),V=z.length,R=Math.max(68,V>1?$/(V-1):0),H=o.useMemo(()=>new Map(z.map((Y,Q)=>[Y,Q])),[z]),W=Y=>{const Q=H.get(Y.deg)??0,me=B+(Q-(V-1)/2)*R,De=P>1?Math.min(68,Z/(P-1)):0,be=De*(P-1),ne=L+(Z-be)/2,ue=P===1?L+Z*.4:ne+(P-(Y.row??1))*De;return{x:me,y:ue}},I=Y=>{const Q=O(Y),me=W(Y);return{x:Wa(Q.x,me.x,w),y:Wa(Q.y,me.y,w)}},S={x:B,y:Wa(B,q,w)},j=Math.round(b*1.2),F=Math.round(Math.max(16,Math.min(80,b*.7))),U=[],re=new Map;for(const Y of e){const Q=Y.row??1;re.has(Q)||re.set(Q,[]),re.get(Q).push(Y)}for(const[Y,Q]of re.entries()){if(Q.length<2)continue;const me=[...Q].sort((qe,mt)=>qe.deg-mt.deg),De=me.map(qe=>I(qe)),be=me.map(qe=>qe.deg),ne=be[be.length-1]-be[0],ue=ne/(be.length-1),fe=360-ne,ge=me.length>=3&&ue>0&&fe<=ue*1.5,Ce=Math.round(N(Y)*1e3)/1e3,$e=(qe,mt,ct,rt)=>{const ft=(mt.angleDeg-qe.angleDeg+540)%360-180;if(ft===0)return`L ${rt.x} ${rt.y}`;if(w===0)return`A ${Ce} ${Ce} 0 0 ${ft>0?1:0} ${rt.x} ${rt.y}`;const ke=(qe.angleDeg+ft/2)*Math.PI/180,Ve={x:B+Ce*Math.cos(ke),y:B+Ce*Math.sin(ke)},we={x:(ct.x+rt.x)/2,y:(ct.y+rt.y)/2},Ue={x:Wa(Ve.x,we.x,w),y:Wa(Ve.y,we.y,w)},Be={x:2*Ue.x-we.x,y:2*Ue.y-we.y};return`Q ${Be.x} ${Be.y} ${rt.x} ${rt.y}`},He=ge?[...me,me[0]]:me,je=ge?[...De,De[0]]:De;let Ie=`M ${je[0].x} ${je[0].y}`;for(let qe=1;qe<je.length;qe++)Ie+=" "+$e(He[qe-1],He[qe],je[qe-1],je[qe]);U.push({key:`arc-${Y}`,d:Ie})}const te=o.useMemo(()=>new Set(i??[]),[i]),le=Y=>({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")})[Y],K=Y=>{if(r===Y.id)return"active";if(u){if(Y.id===l)return"correct";if(Y.id===s&&s!==l)return"wrong"}return te.has(Y.id)?"played":"idle"},oe=Y=>r===Y.id?"loop":u?Y.id===l?"loop":null:c&&Y.id===s?"once":null,Ae=(Y,Q)=>{switch(Y){case"played":case"correct":return n.jsx($s,{size:Q});case"wrong":return n.jsx(qs,{size:Q});default:return n.jsx(Vs,{size:Q})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(Y=>{const{x:Q,y:me}=I(Y);return n.jsx("line",{x1:S.x,y1:S.y,x2:Q,y2:me,stroke:"#dde3ec",strokeWidth:"1"},Y.id)}),U.map(Y=>n.jsx("path",{d:Y.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},Y.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:j,height:j,left:S.x-j/2,top:S.y-j/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:j,height:j,left:S.x,top:S.y},"aria-label":h,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:C,children:n.jsx(Ir,{size:F,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:j,height:j,left:S.x,top:S.y},children:n.jsx(Ir,{size:F,color:"currentColor",strokeWidth:1.5})}),e.map((Y,Q)=>{const{x:me,y:De}=I(Y),be=K(Y),ne=oe(Y),ue={...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},fe=b,ge=Math.round(Math.max(10,Math.min(56,fe*.38))),Ce=Math.round(Math.max(7,Math.min(18,fe*.2))),$e=Math.round(Math.max(10,Math.min(56,fe*.4))),He=v==="answered"&&(be==="played"||be==="correct"||be==="wrong"),je=v===!0||He,Ie=!He;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ue,left:me-fe/2,top:De-fe/2},children:[ne&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${be}`+(ne==="once"?" sound-compass__pulse--once":""),style:{width:fe,height:fe,...ne==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...m!==void 0?{"--sc-pulse-scale":String(m)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>f?.(Y.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${be}`,style:{width:fe,height:fe},"aria-label":le(be)?`${Y.label}, ${le(be)}`:Y.label,"aria-pressed":s!=null?Y.id===s:void 0,children:[je&&Ae(be,ge),Ie&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?Ce:$e},children:Q+1})]}),Y.shortcut&&n.jsx(ou,{keys:Y.shortcut,anchor:A,className:"sound-compass__speaker-shortcut"})]},Y.id)})]})})}function sv({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:_e("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function iv({orientation:e="horizontal",label:t,className:a=""}){const r=_e("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 su({checked:e,onChange:t,name:a,value:r,disabled:i=!1,label:s,className:l=""}){const u=o.useId();return n.jsxs("label",{className:`radio${i?" radio--disabled":""} ${l}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:i,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),s&&n.jsx("span",{className:"radio__label body-2",children:s})]})}function lv({options:e,value:t,onChange:a,name:r,disabled:i=!1,direction:s="vertical",className:l="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${s} ${l}`.trim(),role:"radiogroup","aria-label":u,children:e.map(m=>n.jsx(su,{name:d,value:m.value,checked:t===m.value,disabled:i||m.disabled,label:m.label,onChange:p=>{p&&a?.(m.value)}},m.value))})}const uv={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function cv({tone:e="info",title:t,message:a,children:r,dismissible:i=!1,onDismiss:s,live:l,className:u=""}){const{t:c}=xe.useTranslation(),[d,m]=o.useState(!1),p=o.useRef(null),f=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&sr(g),m(!0),s?.()},[s]);if(d)return null;const b=_e("alert",`alert--${e}`,u),v=l??(e==="danger"||e==="warning"?"assertive":"polite"),C=v==="assertive"?"alert":v==="polite"?"status":void 0,h=!!t,_=!!(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(at,{icon:uv[e],size:20,className:"alert__icon"}),h&&n.jsx("span",{className:"alert__title body-2",children:t}),!h&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),h&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),i&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:f,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const dv={ready:"search",guide:"info",error:"circle-alert"};function pv(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let i=0,s=0;for(const l of a){const u=e.indexOf(l,i);u<0||(u>i&&r.push(e.slice(i,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:l},s++)),i=u+l.length)}return i<e.length&&r.push(e.slice(i)),r}function mv({status:e="guide",label:t,children:a,emphasis:r,icon:i,className:s=""}){const l=i===!1?null:i??dv[e],u=_e("search-summary",`search-summary--${e}`,s),c=t??a,d=typeof c=="string"&&r&&r.length>0?pv(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[l!=null&&n.jsx(at,{icon:l,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ha({title:e,items:t}){const{t:a}=xe.useTranslation(),{anchorRect:r,openAt:i,close:s}=Pa(),l=o.useRef(null),u=bo(!!r,(c,d)=>{c&&d?i(l.current?.querySelector("button")??d):s()},l);return n.jsxs("span",{ref:l,style:{display:"contents"},children:[n.jsx(pe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ca(c)||i(c.currentTarget)},onPointerLeave:c=>{ca(c)||s()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{da()||i(c.currentTarget)},onBlur:s}),r&&n.jsx(Kn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:s})]})}function hv({items:e=[],value:t,onChange:a,className:r="",size:i=40}){const s=o.useId(),{t:l}=xe.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,m=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),f=(C,h=p())=>{if(h.length===0)return;const _=(C%h.length+h.length)%h.length;h[_]?.focus(),h[_]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const h=p(),_=h.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?f(_+1,h):C.key==="ArrowLeft"||C.key==="ArrowUp"?f(_-1,h):C.key==="Home"?f(0,h):f(h.length-1,h)},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--${i}`,role:"tablist","aria-label":l("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${s}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${s}-${C.key}`,disabled:C.disabled,tabIndex:C.key===m?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-${s}-${v.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${s}-${v.key}`,tabIndex:0,className:"tabs__panel",children:v.panel},v.key)]})}const fv={xs:12,sm:16,md:20,lg:28,xl:36};function Cv(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 gv({src:e,name:t,size:a="md",shape:r="circle",className:i=""}){const{t:s}=xe.useTranslation(),[l,u]=o.useState(null),c=!!e&&l===e,d=t?Cv(t):"",m=!!e&&!c,p=!m&&!!d,f=t||s("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${i}`.trim(),role:"img","aria-label":f,children:[m&&n.jsx("img",{className:"avatar__image",src:e,alt:f,onError:()=>u(e??null)}),!m&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!m&&!p&&n.jsx(at,{icon:"user-round",size:fv[a],className:"avatar__icon"})]})}function bv(e,t){if(!t)return!0;const a=t.split(",").map(s=>s.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),i=e.type.toLowerCase();return a.some(s=>{const l=s.toLowerCase();return l.startsWith(".")?r.endsWith(l):l.endsWith("/*")?i.startsWith(l.slice(0,-1)):i===l})}function yv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:i=!0,files:s,onRemove:l,className:u=""}){const{t:c}=xe.useTranslation(),d=o.useRef(null),[m,p]=o.useState(!1),[f,b]=o.useState([]),v=s??f,C=x=>{if(!x||x.length===0)return;const w=Array.from(x).filter(E=>bv(E,t));if(w.length===0)return;const B=a?w:w.slice(0,1);if(s===void 0){const E=a?[...v,...B]:B;b(E),e?.(E)}else e?.(B)},h=x=>{x.preventDefault(),!r&&p(!0)},_=x=>{x.preventDefault(),p(!1)},g=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},A=x=>{const w=x.target;try{C(w.files)}finally{w.value=""}},y=()=>{r||d.current?.click()},k=x=>{if(!r&&(l?.(x),s===void 0)){const w=v.filter((B,E)=>E!==x);b(w),l||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:_e("file-upload__dropzone",m&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:y,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),y())},onDragOver:h,onDragLeave:_,onDrop:g,children:[n.jsx(at,{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(),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:A,tabIndex:-1})]}),i&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((x,w)=>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(w),children:n.jsx(at,{icon:"x",size:14})})]},`${x.name}-${w}`))})]})}function vv({items:e,className:t=""}){const{t:a}=xe.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,i)=>{const s=i===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[s?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}),!s&&n.jsx(at,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},i)})})})}const xv={small:14,medium:20,large:28};function _v({value:e,onChange:t,max:a=5,readOnly:r=!1,size:i="medium",ariaLabel:s,className:l=""}){const{t:u}=xe.useTranslation(),c=r||!t,[d,m]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,f=d??p,b=xv[i],v=x=>{x!==e&&t?.(x)},C=x=>{c||v(x)},h=x=>{c||da()||m(x)},_=o.useRef(null),g=x=>{const w=Math.min(a,Math.max(1,x));v(w),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(w))?.focus()},A=x=>{if(!c){switch(x.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}x.preventDefault()}},y=p>=1&&p<=a?Math.round(p):1,k=()=>{c||m(null)};return n.jsx("div",{className:`rating rating--${i}${c?" rating--readOnly":""} ${l}`.trim(),ref:_,onKeyDown:A,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):s??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,w)=>{const B=w+1,E=Math.max(0,Math.min(1,f-w)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(at,{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(at,{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:()=>h(B),children:N},B)})})}const wv=20,Bv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function kv({value:e,onChange:t,palette:a=Bv,size:r=40,className:i="",ariaLabel:s}){const{t:l}=xe.useTranslation();return n.jsx("div",{className:`color-picker ${i}`.trim(),role:"group","aria-label":s,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} ${l("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(at,{icon:"check",size:wv,className:"color-picker__check"})},u)})})}function iu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:i,bgColor:s,useHover:l=!0,iconSize:u="medium"}){const{t:c}=xe.useTranslation(),d=u==="small",m=_e("category-icon",d?"category-icon--small":""),p=d?16:20,f=o.useRef(null),[b,v]=o.useState(!1),C=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!i&&!s?B:{...B,...i?{color:i,"--t-item-fg":i}:{},...s?{"--t-item-bg":s}:{}}},[r,i,s]),h=a||t,_=l&&!!h,[g,A]=o.useState(null);o.useLayoutEffect(()=>{b&&A(f.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!l&&b)try{v(!1)}catch{}},[l,b]),o.useEffect(()=>{if(!b)return;const B=E=>{const D=f.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(()=>{l&&v(!0)},[l]),k=o.useCallback(()=>{l&&v(!1)},[l]),x=o.useCallback(()=>v(!1),[]),w=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:f,className:_e("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:y,onPointerLeave:k,onFocus:y,onBlur:k,onKeyDown:w,role:"button",tabIndex:0,"aria-label":typeof h=="string"?c("common.descriptionFor",{name:h,defaultValue:`${h} \uC124\uBA85`}):void 0,"aria-haspopup":!!h,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(at,{icon:e,label:t,className:m,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),b&&h&&n.jsx(Bn,{anchorRect:g,text:typeof h=="string"?h:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof h=="string"?h:void 0})]})}let In=null;function dr(e){if(In&&In!==e)try{In()}catch{}return In=e,()=>{In===e&&(In=null)}}function pr(e){if(In===e){In=null;try{e()}catch{}}}function mr(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){St("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 i=!1;const s=u=>{if(!i){i=!0;try{t?.(u)}catch{}a(u)}};let l;try{l=new Audio(e)}catch{return s(!1),{el:{},stop:()=>{},done:r}}l.onended=()=>s(!0),l.onerror=()=>s(!1);try{l.play().catch(()=>s(!1))}catch{s(!1)}return{el:l,stop:()=>{try{l.pause()}catch{}s(!1)},done:r}}function Av(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=l=>l.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const l=a.sentences||a.items||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.items||a.sentences||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.items||a.sentences||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.sentences||a.items||[],u=Array.isArray(l)&&l.length>0?r(l):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const i=a.sentences||a.items||[],s=r(Array.isArray(i)?i:[]);return s.length===0&&(a.contextCode||a.context_code)&&s.push(String(a.contextCode||a.context_code)),{previewCodes:s,previewBucket:null}}function Nv(e,t){const[a,r]=o.useState(!1),[i,s]=o.useState(-1),[l,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null),[f,b]=o.useState(!1),v=o.useRef([]),{previewCodes:C,previewBucket:h}=Av(e,t),_=`${C.join(",")}|${h??""}`,g=o.useMemo(()=>l.key===_?l.urls:[],[l,_]);o.useEffect(()=>{if(!C.length)return;let y=!1;return(async()=>{const k=[],x=[];for(const w of C)try{const B=yi(w,h);if(!B){k.push("");continue}let E=null;try{E=await vi(B)}catch{}if(!E)try{const D=await xi(B);D&&(E=URL.createObjectURL(D),x.push(E))}catch{}k.push(E??"")}catch{k.push("")}y?x.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(v.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),v.current=x,u({key:_,urls:k}))})(),()=>{y=!0}},[C.join(","),h]),o.useEffect(()=>()=>{v.current.forEach(y=>{try{URL.revokeObjectURL(y)}catch{}}),v.current=[]},[]);const A=o.useCallback(async y=>{if(y.stopPropagation(),y.preventDefault(),d.current){m.current&&pr(m.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),s(-1);return}if(!g.filter(Boolean).length)return;let k=null;const x=()=>{d.current=!1,k?.stop()};m.current=x;const w=dr(x);d.current=!0,r(!0);for(let B=0;B<g.length&&d.current;B++){const E=g[B];if(E&&(s(B),k=mr(E),c.current=k.el,!await k.done))break}w(),m.current===x&&(m.current=null,d.current=!1,r(!1),s(-1))},[g]);return o.useEffect(()=>()=>{m.current&&pr(m.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:i,previewUrls:g,previewHover:f,setPreviewHover:b,previewBtnRef:p,handlePreview:A}}const Ev=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 i=r;return i.sentence||i.text||i.context||i.question||i.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Mo(e){const{index:t,type:a,trainingData:r,ariaLabel:i,depth:s,renderPopup:l,completed:u,completedIds:c,selectedIds:d,tooltipText:m,useDescriptionTooltip:p=!1,onRemove:f,hideCheckBadge:b=!1,showTypeLabel:v=!1,onComplete:C,onSelect:h,onMore:_,countLabelOverride:g,size:A="square"}=e||{},{t:y}=xe.useTranslation(),[k,x]=o.useState(!1),w=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:O,previewHover:P,setPreviewHover:G,previewBtnRef:L,handlePreview:M}=Nv(r,a?.key),$=o.useCallback(()=>{h?h():x(!0)},[h]),Z=o.useCallback(()=>x(!1),[]),q=o.useCallback(()=>E(!0),[]),z=o.useCallback(()=>E(!1),[]),V=o.useCallback(()=>G(!0),[G]),R=o.useCallback(()=>G(!1),[G]),[H,W]=o.useState(null);o.useLayoutEffect(()=>{P&&W(L.current?.getBoundingClientRect()??null)},[P,L]);const[I,S]=o.useState(null);o.useLayoutEffect(()=>{B&&!k&&p&&S(w.current?.getBoundingClientRect()??null)},[B,k,p]);const j=o.useCallback(we=>{we.target===we.currentTarget&&(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),$())},[$]),F=r||null,U=o.useMemo(()=>{if(!p)return null;const we=m?(Array.isArray(m)?m:[m]).filter(Boolean):null,Ue=we&&we.length>0?we:Ev(F);return Ue&&Ue.length>0?Ue:null},[p,m,F]),re=o.useCallback(we=>{we.stopPropagation(),f?.()},[f]),te=o.useCallback(we=>we.stopPropagation(),[]),le=o.useCallback(we=>{typeof C=="function"&&C(we)},[C]),K=u||(c&&r?.id!=null?c.has(String(r.id)):!1),oe=!K&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Sl("speechear.popup.close",Z);const Ae=zi(),Y=`${a?.label||""} ${t+1}`,Q=F?.title||F?.name||Y;let me=a?.icon,De,be="",ne="";try{const we=F?.category_0||F?.category_main_code||F?.category_main,Ue=F?.category_1||F?.category_sub_code||F?.category_sub,Be=Ae.find(Me=>Me.key===we);Be?.icon&&(me=Be.icon),!De&&Be?.color&&(De={"--t-item-fg":Be.color}),!De&&F?.iconColor&&(De={"--t-item-fg":F.iconColor}),be=Be?y(`topic.${Be.key}`,{defaultValue:Be.label||""}):"";try{const Me=Be?.subs?.find(Se=>Se.key===Ue);ne=Me?y(`topic.sub.${Me.key}`,{defaultValue:Me.label||""}):""}catch{}}catch{}const ue=ne?`${be} / ${ne}`:be||a?.label||Q,fe=we=>y("training.countQuestions",{n:we,count:we}),ge=we=>y("training.countSentences",{n:we,count:we});let Ce="";try{if(F)if(a?.key==="LISTEN_IN_NOISE"){let we=0;Array.isArray(F.items)&&F.items.length>0?we=F.items.length:Array.isArray(F.sentences)&&F.sentences.length>0?we=F.sentences.length:F.sentences&&(we=1),Ce=ge(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(F?.questions)?we=F.questions.length:Array.isArray(F?.sentences)&&(we=F.sentences.length),Ce=fe(we)}else if(a?.key==="LONG_STORY"){let we=1;if(Array.isArray(F.items)&&F.items.length>0){const Ue=F.items.reduce((Be,Me)=>{const Se=Me.questionItems;return Array.isArray(Se)?Be+Se.length:Array.isArray(Me.questions)?Be+Me.questions.length:Be},0);we=Ue>0?Ue:F.items.length}else Array.isArray(F.questions)&&F.questions.length>0?we=F.questions.length:Array.isArray(F.sentences)&&F.sentences.length>0&&(we=F.sentences.length);Ce=fe(we)}else if(a?.key==="ORDERING_SENTENCE"){let we=1;Array.isArray(F.items)&&F.items.length>0?we=F.items.length:Array.isArray(F.sentences)&&F.sentences.length>0&&(we=F.sentences.length),Ce=ge(we)}else Array.isArray(F.items)&&(Ce=F.items.length>0?fe(F.items.length):"")}catch{}const $e=A==="row",He=A==="list"||$e,je=A==="compact",Ie=A==="small",qe=Ie&&a?.key?FC().find(we=>we.key===a.key):void 0,mt=qe?Wi[qe.key]:void 0,ct=qe?mt?y(`trainingType.${mt}.title`,{defaultValue:qe.label}):qe.label??"":"",rt=v&&a?.label&&a.label!==String(Q)?String(a.label):Ie&&ct&&ct!==String(Q)?ct:"",ft=!!rt,ke=g!==void 0?g:Ce,Ve=[rt,typeof Q=="string"?Q:"",ke].map(we=>String(we??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${He?" training-block-button--list":""}${$e?" training-block-button--row":""}${je?" training-block-button--compact":""}${Ie?" training-block-button--small":""}${K?" training-block-button--completed":""}${oe?" training-block-button--selected":""}${ft&&!Ie?" training-block-button--withType":""}${Ie&&!ft?" training-block-button--no-type-label":""}`,onClick:$,onPointerEnter:q,onPointerLeave:z,role:"button",tabIndex:0,onKeyDown:j,"aria-label":typeof i=="string"?i:Ve||void 0,title:!p&&m&&(Array.isArray(m)?m.filter(Boolean).join(`
853
- `):m)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&a?.label&&a.label!==String(Q)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ie&&ct&&ct!==String(Q)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ct}),n.jsx(iu,{icon:me,label:Q,tooltip:ue,wrapperStyle:De,iconSize:Ie||je?"small":"medium"}),!b&&(K||oe)&&!(f&&B)&&n.jsx(At,{className:f?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":K?y("training.completed","\uD6C8\uB828 \uC644\uB8CC"):y("training.selected","\uC120\uD0DD\uB428")}),f&&n.jsx(At,{className:`training-block-button__remove${B?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":y("common.remove","\uC81C\uAC70"),onClick:re}),n.jsx("div",{className:`training-block-button__title ${je?"body-3":Ie?"body-3b":"h3"}`,children:String(Q)}),n.jsxs("div",{className:"training-block-button__description",children:[ke?n.jsx("div",{className:`training-block-button__count ${Ie?"caption-2":"caption-1"}`,children:ke}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(at,{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})})]}),(He&&!$e||Ie)&&O.length>0&&n.jsx("div",{ref:L,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:V,onPointerLeave:R,children:n.jsx(pe,{htmlType:"button",size:Ie?28:32,type:"dot",icon:D?"pause":"play",variant:Ie?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(Q).trim()?D?y("training.stopFor",{name:Q,defaultValue:`${Q} \uC815\uC9C0`}):y("training.previewFor",{name:Q,defaultValue:`${Q} \uBBF8\uB9AC \uB4E3\uAE30`}):D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:M})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:we=>{we.stopPropagation(),_(we)},children:n.jsx(pe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(Q).trim()?y("common.moreFor",{name:Q}):y("common.more","\uB354\uBCF4\uAE30")})})]}),P&&n.jsx(Bn,{anchorRect:H,text:D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),B&&!k&&p&&(U?n.jsx(Kn,{anchorRect:I,items:U,activeIndex:N,onClose:z}):F?.subTitle?n.jsx(Bn,{anchorRect:I,text:F.subTitle,offset:8,onClose:z}):null),k&&l&&l({trainingData:F,typeKey:a?.key??"",onClose:Z,onComplete:le,popupTitle:String(Q),popupSubTitle:a?.subTitle,depth:s!=null?String(s):void 0,popupIcon:me,popupIconTooltip:String(ue),popupWrapperStyle:De})]})}const lu=200;function Dv(e){return e.itemId?(VC()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function uu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:i}){const{t:s}=xe.useTranslation(),l=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):UC(s).map(c=>{const d=(e?.items??[]).filter(m=>m.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(Dv).filter(m=>m!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,s]);if(l.length===0)return null;const u=n.jsx("div",{className:"tooltip-training__box",children:n.jsx("div",{className:"tooltip-training__groups",children:l.flatMap(({key:c,label:d,type:m,data:p},f)=>[f>0?n.jsx("div",{className:"tooltip-training__divider"},`div-${c}`):null,n.jsxs("div",{className:"tooltip-training__section",children:[n.jsx("div",{className:"tooltip-training__section-header",children:n.jsx("span",{className:"tooltip-training__type-label body-3b",children:d})}),n.jsx("div",{className:"tooltip-training__items",children:p.map((b,v)=>n.jsx(Mo,{index:v,type:m,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??v)))})]},c)])})});return a?n.jsx(cn,{anchorRect:a,offset:r,onClose:i,closeOnOutsideClick:!1,className:"tooltip-training",ariaLabel:s("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const Sv=200;function Tv({icon:e,count:t,title:a,plan:r,tooltip:i=!0,hoverAccent:s=!1,className:l="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const m=!!u||!!c||i&&!!r,p=_e("count-tile",m&&"count-tile--interactive",m&&s&&"count-tile--accent",u&&"count-tile--clickable",l),f=o.useRef(null),[b,v]=o.useState(null),C=o.useRef(null),h=o.useRef(null),_=!!(b&&r&&i),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),h.current&&(clearTimeout(h.current),h.current=null)},[]),A=o.useCallback(()=>{g(),v(null)},[g]),y=o.useCallback(()=>{!i||!r||(g(),C.current=setTimeout(()=>{C.current=null,v(f.current?.getBoundingClientRect()??null)},lu))},[i,r,g]),k=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!h.current&&(h.current=setTimeout(()=>{h.current=null,v(null)},Sv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!i||!r)&&A()},[i,r,A]),o.useEffect(()=>{if(!_)return;const x=B=>B instanceof Element&&(f.current?.contains(B)||!!B.closest(".tooltip-training")),w=B=>{x(B.target)?g():k()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[_,g,k]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:f,className:p,onClick:u?x=>{A(),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"?A():y()},onMouseEnter:c,onMouseLeave:x=>{k(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(at,{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(uu,{plan:r,anchorRect:b,onClose:A})]})}let Va=0,cu="",Lo="",qa=0;function du(){return pu(!1)}function jv(){return pu(!0)}function pu(e){const t=typeof document<"u";Va===0&&t&&(cu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(qa===0&&(Lo=document.body.style.paddingRight),qa++,document.body.style.paddingRight="0px"),Va++;let a=!1;return()=>{a||(a=!0,Va=Math.max(0,Va-1),e&&t&&(qa=Math.max(0,qa-1),qa===0&&(Lo?document.body.style.paddingRight=Lo:document.body.style.removeProperty("padding-right"))),Va===0&&t&&(document.body.style.overflow=cu))}}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 Lv({open:e,onClose:t,ariaLabel:a,title:r,children:i,size:s="md",closeOnBackdrop:l=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:m}){const{t:p}=xe.useTranslation(),f=o.useId(),b=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,A=du(),y=b.current;return ho(y,g),y?.focus(),()=>{A();const k=document.activeElement;(!k||k===document.body||y&&y.contains(k))&&fo(g)?.focus?.()}},[e]);const C=o.useRef(v),h=o.useRef(u);o.useEffect(()=>{C.current=v,h.current=u}),o.useEffect(()=>{if(e)return Gn(()=>{h.current&&C.current()})},[e]);const _=o.useRef(!1);return po(b,e),!e||typeof document>"u"?null:en.createPortal(n.jsx("div",{className:_e("dialog",d),onPointerDown:l?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:l?g=>{const A=_.current;_.current=!1,A&&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?f:void 0,tabIndex:-1,className:_e("dialog__surface",`dialog__surface--${s}`,m),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:f,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:i})]})}),document.body)}function $v({columns:e,rows:t,rowKey:a,title:r,toolbar:i,empty:s,loading:l,caption:u,className:c=""}){const{t:d}=xe.useTranslation(),m=!l&&t.length===0;return n.jsxs("div",{className:_e("board",c),children:[r||i?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),i?n.jsx("div",{className:"board__toolbar",children:i}):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:_e("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:l?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l})}):m?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:s??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,f)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:_e("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,f)},b.key))},a(p,f)))})]})]})}function Rv({name:e,role:t,photo:a,media:r,credentials:i,size:s=190,className:l=""}){return n.jsxs("div",{className:_e("person-card",l),children:[n.jsx("div",{className:"person-card__photo",style:{width:s,height:s},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,i?.length?n.jsx("ul",{className:"person-card__credentials",children:i.map(u=>n.jsx("li",{children:u},u))}):null]})}function Pv({groups:e,className:t=""}){return n.jsx("div",{className:_e("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,i)=>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((s,l)=>n.jsx("p",{children:s},l))})]},`${r.label??""}-${i}`))})]},a.title))})}function Iv({title:e,kind:t,body:a,badge:r,badgeSrc:i,footer:s,width:l,className:u=""}){const c=r??(i?n.jsx("img",{src:i,alt:""}):null);return n.jsxs("div",{className:_e("publication-card",u),style:l?{width:l,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}),s?n.jsx("div",{className:"publication-card__footer",children:s}):null]})}function Fv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const i=$a(a);return o.useEffect(()=>{const s=setTimeout(()=>i.current?.(),r);return()=>clearTimeout(s)},[r,i]),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 Ov({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:i=2,tone:s="dark",className:l=""}){const u=i===1?"h1":"h2";return n.jsxs("div",{className:_e("section-header",`section-header--${s}`,l),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 zv({items:e,className:t=""}){return n.jsx("ul",{className:_e("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))})}function mu(e){return typeof e=="string"?e:e.label}function hu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:i,onSelectSuggestion:s,autoActiveFirst:l=!1}){const u=o.useId(),[c,d]=o.useState(!1),[m,p]=o.useState(-1),f=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return i===!1?a:N?typeof i=="function"?i(a,N):a.filter(O=>mu(O).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,i]),[v,C]=o.useState(!1),h=o.useRef([]),_=v&&b.length===0?h.current:b;o.useEffect(()=>{_.length&&(h.current=_)},[_]);const g=o.useCallback(()=>C(!0),[]),A=o.useCallback(()=>C(!1),[]),y=l?0:-1;o.useEffect(()=>{c||p(y)},[c,y]),o.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const k=m<_.length?m:y<_.length?y:-1,x=o.useCallback(N=>{s?s(N):t?.(mu(N)),d(!1)},[t,s]),w=o.useCallback(()=>d(!0),[]),B=o.useCallback(()=>{d(!0),p(y)},[y]),E=o.useCallback(()=>{f.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p(O=>Math.min(_.length-1,(O<_.length?O:y)+1))):N.key==="ArrowUp"?(N.preventDefault(),p(O=>Math.max(y,(O<_.length?O:_.length)-1))):N.key==="Enter"?k>=0&&x(_[k]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,k,c,x,y]);return{listId:u,open:c,activeIdx:k,filtered:_,handleFocus:w,handleBlur:E,handleInput:B,handleKeyDown:D,handleSelect:x,handleCompositionStart:g,handleCompositionEnd:A}}const $o=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Xn(e){const{value:t,defaultValue:a,name:r,inputRef:i,onChange:s,label:l,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:m,ghostText:p,ghostHint:f,type:b="text",disabled:v=!1,readOnly:C=!1,error:h,helperText:_,maxLength:g,size:A=48,variant:y="input",fullWidth:k=!1,newline:x=!1,multiline:w=!1,rows:B=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:O,showCount:P=!0,className:G="",onFocus:L,onBlur:M,onKeyDown:$,onEnter:Z,inputMode:q,autoComplete:z,autoFocus:V,suggestions:R,filterSuggestions:H,onSelectSuggestion:W,autoActiveFirst:I,openOnFocus:S=!1}=e,j=C||v?void 0:R,{t:F}=xe.useTranslation(),U=o.useId();!l&&!u&&St(`TextField:unnamed:${U}`,"[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 re=`tf-${U}`,te=`tf-helper-${U}`,le=o.useRef(null),K=hu({value:t??"",onChange:s,suggestions:j??[],openOnFocus:S,filterSuggestions:H,onSelectSuggestion:W,autoActiveFirst:I}),oe=!!j&&K.open&&K.filtered.length>0,Ae=o.useRef(null),[Y,Q]=o.useState(null),me=o.useCallback(()=>{const ke=Ae.current;if(!ke||typeof window>"u")return;const Ve=ke.getBoundingClientRect(),we=230,Ue=window.innerHeight-Ve.bottom<we+8&&Ve.top>we+8;Q({position:"fixed",left:Ve.left,width:Ve.width,...Ue?{bottom:window.innerHeight-Ve.top+8}:{top:Ve.bottom+8},zIndex:Ia(ke)})},[]);$o(()=>{if(!oe)return;me();let ke=null;const Ve=()=>{if(typeof requestAnimationFrame>"u"){me();return}ke===null&&(ke=requestAnimationFrame(()=>{ke=null,me()}))},we=Ue=>{const Be=Ue.target;Be&&Be.nodeType===1&&Be.closest?.(".text-field__suggestions")||Ve()};return window.addEventListener("scroll",we,!0),window.addEventListener("resize",Ve),()=>{ke!==null&&cancelAnimationFrame(ke),window.removeEventListener("scroll",we,!0),window.removeEventListener("resize",Ve)}},[oe,me]);const De=o.useCallback(ke=>{le.current=ke,typeof i=="function"?i(ke):i&&(i.current=ke)},[i]),be=p?`${p}${f??F("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:m,ne=t!==void 0,ue=ne&&b==="password",[fe,ge]=o.useState((a??"").length),Ce=ne?(t??"").length:fe,$e=o.useRef(t);$o(()=>{$e.current=t}),o.useEffect(()=>{const ke=le.current;if(!ue||!ke)return;const Ve=t??"";ke.value!==Ve&&(ke.value=Ve)},[ue,t]),o.useEffect(()=>{if(!x||!le.current)return;const ke=le.current;ke.style.height="",ke.scrollHeight>ke.clientHeight&&(ke.style.height=`${ke.scrollHeight}px`)},[t,fe,x]);const He=g!=null&&Ce>g,je=A===32?16:20,Ie=_e("text-field",`text-field--s${A}`,y==="display"?"text-field--display":"",k?"text-field--full-width":"",v?"text-field--disabled":"",C?"text-field--readonly":"",h?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",G),qe={id:re,...ue?{}:ne?{value:t}:{defaultValue:a},ref:De,placeholder:be,name:r,disabled:v,readOnly:C,autoFocus:V,maxLength:g,list:O,inputMode:q,autoComplete:z,"aria-label":!l&&u?u:void 0,"aria-required":d,"aria-invalid":!!h,"aria-describedby":[_||h?te:null,c].filter(Boolean).join(" ")||void 0,role:j?"combobox":void 0,"aria-autocomplete":j?"list":void 0,"aria-haspopup":j?"listbox":void 0,"aria-expanded":j?oe:void 0,"aria-controls":oe?K.listId:void 0,"aria-activedescendant":oe&&K.activeIdx>=0?`${K.listId}-option-${K.activeIdx}`:void 0,onChange:ke=>{const Ve=ke.target;ne||ge(Ve.value.length),s?.(Ve.value),j&&K.handleInput(),ue&&queueMicrotask(()=>{const we=$e.current??"";Ve.value!==we&&(Ve.value=we)})},onCompositionStart:j?K.handleCompositionStart:void 0,onCompositionEnd:j?K.handleCompositionEnd:void 0,onFocus:(ke=>{L?.(ke),j&&K.handleFocus()}),onBlur:(ke=>{M?.(ke),j&&K.handleBlur()}),onKeyDown:(ke=>{const Ve=(ke.key==="Tab"&&!ke.shiftKey||ke.key===" ")&&!ke.nativeEvent.isComposing;if(p&&Ve&&!C&&!v&&!(ke.currentTarget.value??"").trim()){ke.preventDefault();const we=ke.currentTarget;ne||(we.value=p,ge(p.length)),s?.(p);return}j&&ke.key==="Enter"&&!ke.nativeEvent.isComposing&&K.activeIdx>=0?ke.preventDefault():Z&&ke.key==="Enter"&&!ke.nativeEvent.isComposing&&(ke.preventDefault(),Z()),$?.(ke),j&&K.handleKeyDown(ke)})},mt=N&&!v&&!C&&Ce>0,ct=()=>x?n.jsx("textarea",{...qe,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{...qe,className:"text-field__input text-field__input--textarea body-2",rows:B}):n.jsx("input",{...qe,type:b,className:"text-field__input body-2"}),rt=y==="display"&&!x&&!w&&!!be,ft=()=>n.jsxs(n.Fragment,{children:[ct(),rt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:be})]});return n.jsxs("div",{ref:Ae,className:Ie,children:[l&&n.jsxs("label",{htmlFor:re,className:"text-field__label caption-1",children:[l,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(at,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})}),ft(),g!=null&&P&&n.jsxs("span",{className:`text-field__count caption-2${He?" text-field__count--over":""}`,children:[Ce,"/",g]}),mt&&n.jsx(pe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:F("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:ke=>{ke.preventDefault()},onClick:()=>{!ne&&le.current&&(le.current.value="",ge(0)),s?.("")},tabIndex:-1}),D&&!mt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(at,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})})]}),!!j&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:K.open&&(t??"").length>0&&K.filtered.length===0?F("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),oe&&(typeof document>"u"?null:en.createPortal(n.jsx("ul",{id:K.listId,className:"text-field__suggestions",role:"listbox",style:Y??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:K.filtered.map((ke,Ve)=>n.jsx("li",{id:`${K.listId}-option-${Ve}`,role:"option","aria-selected":Ve===K.activeIdx,className:`text-field__suggestion body-2${Ve===K.activeIdx?" is-active":""}`,onMouseDown:we=>we.preventDefault(),onClick:()=>{K.handleSelect(ke),le.current?.focus()},children:typeof ke=="string"?ke:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:ke.label}),ke.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:ke.hint})]})},typeof ke=="string"?`${ke}-${Ve}`:ke.id))}),document.body)),(_||h)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:te,className:"text-field__helper caption-1",role:h?"alert":void 0,children:h||_})})]})}function pn({options:e,value:t,onChange:a,placeholder:r,disabled:i=!1,block:s=!1,size:l=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:m}){const{t:p}=xe.useTranslation(),f=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),v=o.useId(),C=o.useRef(null),h=o.useCallback((L,M)=>{const $=window.innerHeight-L.bottom<260&&L.top>260;return{position:"fixed",left:L.left,minWidth:L.width,...$?{bottom:window.innerHeight-L.top+6}:{top:L.bottom+6},zIndex:Ia(M)}},[]),{open:_,setOpen:g,toggle:A,style:y,triggerRef:k,menuRef:x}=Fa({computeStyle:h}),[w,B]=o.useState(-1),E=o.useCallback(()=>B(-1),[]),D=e.find(L=>L.value===t);o.useEffect(()=>{if(_){const L=e.findIndex(M=>M.value===t);B(L>=0?L:e.length?0:-1),requestAnimationFrame(()=>{const M=x.current;if(!M)return;const $=M.querySelectorAll(".dropdown__option")[L];$&&(M.scrollTop=Math.max(0,$.offsetTop-M.clientHeight/2+$.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&B(L=>{if(L>=0&&L<e.length)return L;const M=e.findIndex($=>$.value===t);return M>=0?M:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{i||A()},[i,A]),O=o.useCallback(L=>{L.disabled||i||(L.value!==t&&a?.(L.value),g(!1))},[a,g,i,t]);o.useEffect(()=>{i&&g(!1)},[i,g]);const P=o.useCallback(L=>{if(!i){if(!_){(L.key==="Enter"||L.key===" "||L.key==="ArrowDown")&&(L.preventDefault(),g(!0));return}if(L.key==="Escape"){L.preventDefault(),g(!1);return}L.key==="ArrowDown"?(L.preventDefault(),B(M=>{let $=M+1;for(;$<e.length&&e[$].disabled;)$++;return $<e.length?$:M})):L.key==="ArrowUp"?(L.preventDefault(),B(M=>{let $=M-1;for(;$>=0&&e[$].disabled;)$--;return $>=0?$:M})):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),e[w]?O(e[w]):g(!1))}},[i,_,e,w,O,g]),G=_?n.jsx("div",{ref:x,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:y,onMouseLeave:E,onMouseDown:L=>L.preventDefault(),children:e.map((L,M)=>n.jsxs("button",{id:`${b}-option-${M}`,type:"button",role:"option","aria-selected":L.value===t,className:_e("dropdown__option body-2",L.value===t?"dropdown__option--active":"",M===w?"dropdown__option--active":"",L.disabled?"dropdown__option--disabled":""),onMouseDown:$=>$.preventDefault(),onClick:()=>O(L),onMouseEnter:()=>B(M),disabled:L.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:L.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"})})}),L.label]},L.value))}):null;return n.jsxs("div",{ref:C,className:_e("dropdown",`dropdown--s${l}`,_?"dropdown--open":"",s?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:P,children:[n.jsxs("button",{ref:k,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&w>=0?`${b}-option-${w}`:void 0,"aria-label":d,"aria-describedby":[d&&D?v:"",m??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:i,onClick:N,onBlur:L=>{_&&!x.current?.contains(L.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:v,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:f}),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"&&en.createPortal(G,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function hr({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:i,className:s=""}){const{t:l}=xe.useTranslation(),u=r??l("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=i??l("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),m=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:_e("pagination",s),children:[n.jsx(pe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:m}),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(pe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Ua=new Map;function gn(e){const{t}=xe.useTranslation(),{options:a=[],value:r=a.find(y=>!y.disabled)?.key??a[0]?.key,onChange:i=y=>{},className:s="",size:l=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:m,ariaLabel:p}=e||{},f=o.useRef(null),b=a.filter(y=>!y.disabled),v=o.useId(),C=a.map(y=>y.key).join("\xB7");o.useEffect(()=>{if(!(!Ln||p!=null&&p!=="")){if(Ua.set(v,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ua.size>1){const y=[...Ua.values()].sort();St(`segmented-control-unnamed:${y.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ua.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()=>{Ua.delete(v)}}},[p,C,v]);const h=y=>{if(!b.length)return;const k=Math.max(0,b.findIndex(w=>w.key===r)),x=y==="first"?b[0]:y==="last"?b[b.length-1]:b[(k+y+b.length)%b.length];x&&(i(x.key),Array.from(f.current?.querySelectorAll("[data-segkey]")??[]).find(w=>w.dataset.segkey===x.key)?.focus())},_=y=>{switch(y.key){case"ArrowRight":case"ArrowDown":h(1);break;case"ArrowLeft":case"ArrowUp":h(-1);break;case"Home":h("first");break;case"End":h("last");break;default:return}y.preventDefault()},g=y=>{const k=x=>typeof x=="string"||typeof x=="number";if(!(!k(y.label)||y.count==null||y.count===!1||!k(y.count)))return`${y.label}, ${y.count}`},A=b.some(y=>y.key===r)?r:b[0]?.key;return n.jsx("div",{ref:f,onKeyDown:_,className:_e("segmented-control",`segmented-control--${u}`,`segmented-control--${l}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",m!=null&&"segmented-control--min",s),style:m!=null?{"--segmented-min-button-w":`${m}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(y=>n.jsx(pe,{htmlType:"button",role:"radio","aria-checked":y.key===r,"data-segkey":y.key,tabIndex:y.key===A?0:-1,label:y.label,count:y.count,ariaLabel:g(y),disabled:y.disabled,className:y.key===r?"is-selected":"",onClick:()=>{y.disabled||i(y.key)},size:l,shape:u,useBorder:!1,useBG:!1},y.key))})}function Ro({count:e,search:t,segment:a,filters:r,pageSize:i,pagination:s,actions:l,className:u}){const{t:c}=xe.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]}),m=!!(t||r?.length||i||s||l);return n.jsxs("div",{className:_e("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,f)=>n.jsx(gn,{size:40,...p},p.ariaLabel??f))]}),m&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Xn,{className:"toolbar__search",size:40,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,f)=>n.jsx(pn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},f)),(i||s)&&n.jsxs("div",{className:"toolbar__pager",children:[i&&n.jsx(pn,{size:40,options:i.options,value:i.value,onChange:i.onChange,ariaLabel:i.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),s&&n.jsx(hr,{page:s.page,totalPages:s.total,onChange:s.onChange,prevLabel:s.prevLabel,nextLabel:s.nextLabel})]}),l]})})]})}function fu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(fu).join(""):""}function Wv(e){let t=e.replace(/\r\n/g,`
851
+ 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",kakao:"KAKAO Talk Open Chat"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea"},qb={trainingPhone:{topic:"Gardening",prev:"Prev",next:"Next",speed:"Speed 3",noiseType:"Crowd noise",settings:"Settings",start:{caption:"Press the play (\u25B6) button below and listen carefully. After listening, check the sentence."},feedback:{caption:"Plant the well-grown seedlings in the garden bed and cover them carefully with plastic film."},done:{heardWell:"Heard clearly",listenAgain:"Listen again"}}},Ub={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Gb={options:"Training Options",difficulty:"Difficulty",exclude:"Exclude",chosung:"Initial Consonant",excludeOptions:{none:"None",noImage:"No Image"}},Kb={answer:"Answer",distractor:"Distractor"},Yb={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"},Zb={clearAriaLabel:"Clear input"},Xb={ariaLabel:"Select tab"},Jb={ariaLabel:"Tabs"},Qb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},ey={ariaLabel:"User avatar"},ty={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"},reason:{notLoggedIn:"Login required."},list:{title:"Received Homework"},status:{expired:"Expired",done:"Done {{count}}\xD7 \xB7 {{date}}",notDone:"Not done"}},ny={weekly:{title:"Weekly Training",daily:"Daily Listening",crossword:"Crossword"},homework:{title:"Homework Progress",totalRate:"Overall rate",count:"Total",done:"Done",remaining:"Remaining"},today:{tooltipTotal:"Total",tooltipDone:"Done"},filter:{countSuffix:" sessions"},time:{countLabel_one:"{{n}} session",countLabel_other:"{{n}} sessions",empty:"No training records"},daily:{title:"Today's Listening Record",empty:"No completed sessions"},crossword:{title:"Crossword Quiz",empty:"No completed levels"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details",trainingType:{LISTEN_IN_NOISE:"Sentence in Noise",SHORT_STORY:"Short Story",LONG_STORY:"Long Story",ORDERING_SENTENCE:"Sentence Ordering"}},ay={import:"Add to my trainings",publisher:"Publisher",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"},badge:{shared:"Store"},publish:{descPlaceholder:"One-line description for the Training Store (optional)"}},ry={manage:{unit:"item(s)"}},oy={cancelLabel:"Cancel"},sy={subtitle:"Select a topic to start listening practice."},iy={steps:"Step {{current}} of {{total}}"},ly={panelTitle:"Training misses",viewItems:"Items",viewTypes:"Types",colPending:"Left",colTrend:"Change",colRuns:"Runs",unitItem:" items",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.",summaryLabel:"Recorded",summaryValue:"{{items}} items \xB7 {{pending}} still missed",nextLabel:"Next to work on",nextCount:"{{count}}",nextCountCapped:"{{shown}} of {{total}}",picked:"\u2192 {{what}}",typeClear:"All caught up",typePending:"{{pending}} of {{total}} left",flat:"no change",runs_one:"{{count}} run",runs_other:"{{count}} runs",avgDuration:"{{sec}}s avg"},uy={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},cy={panelTitle:"Word table scores",viewWords:"Words",viewTables:"Tables",colLatest:"When",colTrend:"Change",unitTime:" times",summaryLabel:"Scored",summaryValue:"{{times}} times \xB7 {{words}} words",nextLabel:"Focus next",nextCount:"{{count}}",allClear:"All correct last time.",times:"{{count}}x",flat:"no change",recentLabel:"Recent scorings",nextCountCapped:"{{shown}} of {{total}}"},dy={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},py={selectYearMonth:"Select year and month",chooseDate:"Choose a date"},my={previewRegion:"Report preview \u2014 scrollable sideways"},hy={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},fy={devNone:"No acquisition data",place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Cy={clearSelection:"Clear selection"},gy={showResult:"Show {{type}} result"},by={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},yy={loading:"Loading"},vy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},xy={ariaLabel:"Breadcrumb"},_y={empty:"No items yet."},wy={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"},By={common:ub,calendar:cb,passCard:db,searchField:pb,rating:mb,colorPicker:hb,dropdown:fb,accordion:Cb,header:gb,nav:bb,settings:yb,usage:vb,account:xb,help:_b,training:wb,trainingSettings:Bb,customers:kb,payment:Ab,coupons:Nb,visits:Eb,company:Db,trainingType:Sb,myWordTraining:Tb,myWordTable:jb,keyWords:Mb,wordTable:Lb,wordSearch:$b,wordPrint:Rb,topic:Pb,accessLinkManager:Ib,login:Fb,device:Ob,manager:zb,wordPairs:Wb,game:Hb,footer:Vb,landing:qb,date:Ub,trainingSetPage:Gb,wordTrainingPreview:Kb,wordData:Yb,textField:Zb,segmentedControl:Xb,tabs:Jb,fileUpload:Qb,avatar:ey,myHomework:ty,trainingStatus:ny,store:ay,homework:ry,inquiry:oy,trainingPlanRun:sy,progress:iy,trainingMiss:ly,table:uy,wordScore:cy,topBanner:dy,datePicker:py,report:my,tooltip:hy,phonemeProfile:fy,bulkBar:Cy,debug:gy,badge:by,loader:yy,soundCompass:vy,breadcrumb:xy,board:_y,promoBannerBg:wy};const ky="0.346.0",Ay=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],co="ko",Ny="ihab_display_language";function Hi(){if(typeof window>"u")return co;try{const e=localStorage.getItem(Ny);if(e&&Ay.some(t=>t.code===e))return e}catch{}return co}function Vi(e){try{document.documentElement.lang=e}catch{}}Rt.on("languageChanged",Vi),Vi(Hi()),Rt.use(xe.initReactI18next).init({resources:{ko:{translation:lb},en:{translation:By}},lng:Hi(),fallbackLng:co,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Ey=new Map;try{Rt.store?.on?.("added",()=>Ey.clear())}catch{}let or=null,qi=null,Ui=null;function Dy(){const e=Mi();if(e&&e.entries.length>0){const t=mC();if(or&&qi===e&&Ui===t)return or;const a=new Set,r=[];for(const i of e.entries)!i.word||a.has(i.word)||(a.add(i.word),r.push({w:i.word,s:i.syllables,p:t?.[i.word]?[...t[i.word].cho??[],...t[i.word].jung??[],...t[i.word].jong??[]]:[],pron:i.pronunciation||i.word,grade:i.grade}));return or=r,qi=e,Ui=t,or}return[]}new Proxy([],{get(e,t){const a=Dy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Sy(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 Ty(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Sy(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function jy(e){const[t,a]=o.useState(null),[r,i]=o.useState(null),[s,l]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),i(null),l(null),c(null);return}const p=e.split("/").pop();let f=e;p&&(e.startsWith("/")?f=Zr(e):/^(Logo|Symbol)/i.test(p)?f=Zr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),f=e)),l(null),c(null),a(e),i(f)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function f(){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")){l("mask");return}if(v.startsWith("image/")){l("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const h=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Ty(h);if(!_){l("none");return}c(_),l("inline");return}l("none")}catch{p||l("none")}}return f(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,f=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(f=URL.createObjectURL(b),m(f))}).catch(()=>{p||l("img")}),()=>{p=!0,f&&URL.revokeObjectURL(f),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function at(e){const{icon:t,label:a,className:r,imgClassName:i,maskClassName:s,svgClassName:l,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=i??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",f=l??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,v=K1(b),{iconToUse:C,mode:h,svgText:_,blobUrl:g}=jy(b),A=(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:m,...E,style:y?{...E.style,...y}:E.style});if(!t)return null;if(typeof t!="string")return A(t);if(t==="none")return A(n.jsx("span",{className:f,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 A(o.createElement(v,{className:f,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(h==="mask"){const B={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return A(n.jsx("span",{className:p,style:B}),{"aria-hidden":"true"})}return h==="img"?A(k(C,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?A(n.jsx("span",{className:f,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):A(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return k(Zr(t),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,w=`<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 A(n.jsx("span",{className:f,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Gi(e){const[t,a]=o.useState(!1),r=o.useRef(!1),i=o.useRef(!0);o.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const l=e();if(l&&typeof l.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,i.current&&a(!1)};l.then(u,u)}},[e]);return{pending:t,press:s}}function My({icon:e,title:t,message:a,action:r,className:i}){const{pending:s,press:l}=Gi(r?.onClick);return n.jsxs("div",{className:_e("empty-state",i),children:[e&&n.jsx(at,{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:l,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(at,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function Ly({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:i,className:s}){const{t:l}=xe.useTranslation(),{pending:u,press:c}=Gi(r);return n.jsxs("div",{className:_e("empty-state","error-state",s),role:"alert",children:[n.jsx(at,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??l("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(at,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:i??l("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function $y({icon:e,title:t,description:a,cta:r,tone:i="main",disabled:s=!1,onClick:l,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,f=()=>{s||l?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:f,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f())},className:_e("action-card",`action-card--${i}`,s&&"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(at,{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:m,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(at,{icon:"arrow-right",size:18})})]})]})})}function Ry({as:e="div",className:t="",children:a,storage:r,...i}){r&&Rf({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 s=_e("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...i,children:a})}function Py(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 po(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=i=>{if(i.key!=="Tab")return;const s=Array.from(a.querySelectorAll(Cn)).filter(Py);if(!s.length){i.preventDefault();return}const l=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;i.shiftKey&&(c===l||d)?(i.preventDefault(),u.focus()):!i.shiftKey&&c===u&&(i.preventDefault(),l.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Cn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',mo=new WeakMap;function ho(e,t){e&&mo.set(e,t)}function fo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!mo.has(r);)r=r.parentElement;if(!r)return t;t=mo.get(r)??null}return t}function Ki(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 sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Ki(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const i=Array.from(document.querySelectorAll(Cn)).filter(c=>!(e&&e.contains(c))&&Ki(c));let s=null,l=null;for(const c of i)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:l||(l=c);const u=s??l;return u?.focus(),u}function Iy({title:e="",lines:t=[],notices:a=null,children:r,variant:i="default",dismissible:s=!1,className:l=""}){const{t:u}=xe.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const C=m.current;C&&C.contains(document.activeElement)&&sr(C),d(!0)},[]);if(c)return null;const f=`notice-box notice-box--${i} body-2 ${l}`.trim(),b=s&&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:f,role:"note",children:[a.map((C,h)=>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((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):C.children??null})]},h)),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,h)=>n.jsx("li",{className:"notice-box__line",children:C},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:f,role:"note",children:[v,b]})}const ua=[];let ir=!1;function Yi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!ir&&typeof document<"u"&&(document.addEventListener("keydown",Yi),ir=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&ir&&typeof document<"u"&&(document.removeEventListener("keydown",Yi),ir=!1)}}const Zi=o.createContext(null);function Fy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const Xi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Oy(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 Ss.useSyncExternalStore(t,()=>Xi(e),()=>!1)}function zy(e){const[t,a]=o.useState(Xi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),i=l=>a(l.matches),s=r;return s.addEventListener?s.addEventListener("change",i):s.addListener&&s.addListener(i),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",i):s.removeListener&&s.removeListener(i)}},[e]),t}const Wy=typeof Ss.useSyncExternalStore=="function"?Oy:zy;function ln(e){const t=o.useContext(Zi),a=Wy(e);return t&&typeof t.mobile=="boolean"&&Fy(e)?t.mobile:a}const Hy="(prefers-reduced-motion: reduce)";function Co(){return ln(Hy)}function cn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:i=20,onClose:s,closeOnOutsideClick:l=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:f=!1,useBorder:b=!0,header:v,focusOnOpen:C}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[A,y]=o.useState(!1),[k,x]=o.useState("bottom"),[w,B]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,O=o.useCallback((V=!1)=>{if(E&&f)return;const R=a?a.getBoundingClientRect():t;if(!R||!h.current)return;const H=h.current,{offsetWidth:W,offsetHeight:I}=H,S=window.innerWidth,j=window.innerHeight,F=S-R.right,U=R.left,ae=R.top,te=j-R.bottom;let le=0,K=0,re="top";if(ae>=I+r)re="top",K=R.top-r-I,le=R.left+R.width/2-W/2;else if(te>=I+r)re="bottom",K=R.bottom+r,le=R.left+R.width/2-W/2;else if(F>=W+r)re="right",le=R.right+r,K=R.top+R.height/2-I/2;else if(U>=W+r)re="left",le=R.left-r-W,K=R.top+R.height/2-I/2;else{const he=Math.max(ae,te,F,U);he===ae?(re="top",K=R.top-r-I,le=R.left+R.width/2-W/2):he===te?(re="bottom",K=R.bottom+r,le=R.left+R.width/2-W/2):he===F?(re="right",le=R.right+r,K=R.top+R.height/2-I/2):(re="left",le=R.left-r-W,K=R.top+R.height/2-I/2)}const ke=Number.isFinite(Number(i))?Number(i):8;le=Math.min(Math.max(le,ke),S-W-ke),K=Math.min(Math.max(K,ke),j-I-ke);const Z=Math.round(le),Q=Math.round(K);V&&h.current?(h.current.style.left=`${Z}px`,h.current.style.top=`${Q}px`,h.current.dataset.placement=re):(x(re||k),g({position:"fixed",left:Z,top:Q}),B(!0))},[E,f,a,t,r,i,k]);o.useLayoutEffect(()=>{if(N)return;if(E&&f){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}O();const V=requestAnimationFrame(()=>O());return()=>cancelAnimationFrame(V)},[t,a,r,m,i,N,E,f,O]),o.useEffect(()=>{if(N||E&&f||!h.current||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>{t&&O()});return V.observe(h.current),()=>V.disconnect()},[t,m,i,N,E,f,O]),o.useEffect(()=>{if(N||E&&f)return;let V=null;const R=()=>{if(typeof requestAnimationFrame>"u"){O(!0);return}V===null&&(V=requestAnimationFrame(()=>{V=null,O(!0)}))},H=W=>{if(!a&&s){const I=W.target;if(I&&h.current&&h.current.contains(I))return;try{if(I&&I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}$.current(!0);return}R()};return window.addEventListener("resize",R),document.addEventListener("scroll",H,{passive:!0,capture:!0}),()=>{V!==null&&cancelAnimationFrame(V),window.removeEventListener("resize",R),document.removeEventListener("scroll",H,{capture:!0})}},[t,a,s,r,m,i,N,E,f,O]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const V=window.matchMedia("(max-width: 768px)"),R=()=>D(!!V.matches);R();try{V.addEventListener?V.addEventListener("change",R):V.addListener(R)}catch{try{V.addListener(R)}catch{}}return()=>{try{V.removeEventListener?V.removeEventListener("change",R):V.removeListener(R)}catch{}}},[]);const P=o.useRef(!1),G=o.useRef(null),L=Co(),M=o.useCallback((V=!1)=>{if(s&&!(A||P.current)){if(P.current=!0,V){y(!0);try{s&&s()}catch{P.current=!1,y(!1)}return}y(!0),G.current=setTimeout(()=>{G.current=null;try{s&&s()}catch{P.current=!1,y(!1)}},L?0:200)}},[A,s,y,L]);o.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),o.useEffect(()=>{if(N)return;const V=W=>{const I=h.current;if(!I)return;const S=W.target;if(S&&!I.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}l&&M(!0)}},R=W=>{const I=h.current;if(!I)return;const S=W.target;if(S&&!I.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}l&&M(!0)}},H=W=>{if(W.key==="Tab"){const I=h.current;if(!I)return;const S=I.querySelectorAll(Cn);if(!S||S.length===0)return;const j=S[0],F=S[S.length-1],U=document.activeElement;W.shiftKey?U===j&&(W.preventDefault(),F.focus()):U===F&&(W.preventDefault(),j.focus())}};return document.addEventListener("pointerdown",V,!0),document.addEventListener("click",R,!0),document.addEventListener("keydown",H),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("click",R,!0),document.removeEventListener("keydown",H)}},[s,l,M,N]);const $=o.useRef(M);o.useEffect(()=>{$.current=M});const Y=!!s;o.useEffect(()=>{if(!(N||!Y))return Gn(()=>$.current())},[N,Y]),o.useEffect(()=>{const V=()=>{M(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",V),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",V)}},[M]);const q=o.useRef(null);o.useEffect(()=>{if(N||C===!1||!w)return;const V=h.current;if(!V)return;const R=V.querySelector(Cn);if(R)return q.current=document.activeElement,R.focus(),()=>{const H=q.current;q.current=null,H&&document.contains(H)&&H.focus()}},[N,C,w]),o.useEffect(()=>{c==="dialog"&&!d&&St("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 z=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${A?"is-closing":""} ${u} ${E&&f?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"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:[v!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:v}),m]});if(N||typeof document>"u")return z;if(p||E&&f){const V=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{l&&M(!0)}}),z]});return en.createPortal(V,document.body)}return en.createPortal(z,document.body)}function Bn(e){const{anchorRect:t,text:a,offset:r=8,onClose:i,className:s="",ariaLabel:l}=e||{};return a?n.jsx(cn,{anchorRect:t,offset:r,onClose:i,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:l||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=xe.useTranslation(),{anchorRect:a,title:r,items:i,activeIndex:s=-1,showIndex:l=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(i)?i:i?[i]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(cn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,f)=>n.jsxs("li",{className:`tooltip-description__item body-3${f===s?" tooltip-description__item--active":""}`,children:[l&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[f+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},f))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let go=0,Ji=!1;function Qi(){Ji||typeof document>"u"||(Ji=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(go=Date.now())},!0),document.addEventListener("touchstart",()=>{go=Date.now()},{capture:!0,passive:!0}))}Qi();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return Qi(),Date.now()-go<e}function bo(e,t,a,{enabled:r=!0,fallbackOnParent:i=!1}={}){const s=$a(e),l=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const f=p,b=p.target,v=a.current,C=!!(b&&v&&v.contains(b));if(f.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&l.current(!1,v)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,l]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),l.current(!p,m??a.current),!0)},[a,l]);return o.useEffect(()=>{if(!r||!i)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let f=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},v=h=>{f=b(h)?s.current:null},C=h=>{const _=f;f=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),l.current(!_,m))};return p.addEventListener("touchstart",v,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",v),p.removeEventListener("touchend",C)}},[r,i,a,s,l]),{touchPress:d}}function Vy(e,t){const{size:a=48,type:r,htmlType:i,href:s,target:l,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:f,children:b,ariaLabel:v,variant:C="default",align:h="center",nowrap:_=!1,selected:g,toggleable:A=!1,ariaExpanded:y,ariaControls:k,disabled:x=!1,useLabel:w=!0,useBorder:B=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,width:O,minWidth:P,onClick:G,onDisabledClick:L,showTooltipInfo:M=!1,tooltipInfoText:$=null,tooltipDescription:Y=null,tooltipOnly:q=!1,iconSize:z="medium",iconColor:V,shape:R="rounded",color:H,className:W,...I}=e,S=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),j=S.match(/^\d+$/)?`button${S}`:`button-${S}`,F=Number(a),U=!isNaN(F)&&F<40?"button-2":"button-1",ae=m??b,te=x||!!I.disabled,le=te?D?"disabled-covered":N?"disabled-invisibled":"disabled":C,K=le?`button--variant-${le}`:"",re=h?`button--align-${h}`:"",ke=_?"button--nowrap":"",Z=R?`button--shape-${R}`:"",Q=typeof V=="string"&&V.startsWith("--")?`var(${V})`:V,he={...O?{width:typeof O=="number"?`${O}px`:O}:{},...P?{minWidth:typeof P=="number"?`${P}px`:P}:{},...B?{}:{"--button-border":te?"0":"1px solid transparent"},...Q?{"--button-icon-color":Q}:{},...H?{"--color-main":H}:{}},De=w===!1?"":ae,ye=Array.isArray(De)?De.length>0:!!De,de=!!d,ie=r??(ye||c||de?"bar":"dot"),ge=`${j}--${ie}`,fe=o.useRef(null);o.useEffect(()=>{!Ln||i!==void 0||fe.current?.closest("form")&&St(`button-in-form:${typeof ae=="string"?ae:""}`,'[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 ae=="string"&&ae?` \uB2E8\uCD94: ${ae}`:""))},[i,ae]);const ue=o.useRef(t);ue.current=t;const Me=o.useCallback(Re=>{fe.current=Re;const tt=ue.current;typeof tt=="function"?tt(Re):tt&&(tt.current=Re)},[]),ze=o.useRef(te),[je,Oe]=o.useState(!!g),[We,mt]=o.useState(!1),[ct,rt]=o.useState(null),ft=o.useCallback(()=>mt(!1),[]),[Ae,qe]=o.useState(!1),we=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Oe(g)},[g]),o.useEffect(()=>{if(ze.current&&!te&&fe.current){const Re=fe.current;let tt=!1;try{tt=Re.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Re.blur(),Re.style.pointerEvents="none";const xt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{fe.current&&(fe.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(xt)}ze.current=te},[te]);const Ue=typeof g=="boolean"?!!g:je,Be=typeof y=="boolean"?void 0:A||typeof g=="boolean"?Ue?"true":"false":I["aria-pressed"],Le=_e("button",j,ge,K,re,ke,Z,Ue?"is-selected":null,E?null:"button--no-bg",q?"button--tooltip-only":null,W),Se=`button__icon button__icon--${z}`,Je=Array.isArray(f)?f:f!==void 0?[f]:[],Qe=()=>{if(Array.isArray(De))return De.map((tt,xt)=>{const Lt=Je[xt];return n.jsxs("span",{className:`button__label-text${Lt!==void 0?" button__label-text--has-sub":""}`,children:[tt,Lt!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Lt})]},xt)});const Re=f!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[De,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:f})]})},dt=Re=>{typeof g!="boolean"&&!A&&Oe(!1),Re.currentTarget.blur()},ht=Re=>{te||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Re),dt(Re))},wt=Re=>{if(q&&gt&&it.touchPress(Re.currentTarget),te){gt&&it.touchPress(Re.currentTarget),Re.preventDefault(),L?.(Re);return}typeof g!="boolean"&&A&&Oe(tt=>!tt),G?.(Re)},Ct=o.useCallback(()=>{(M||Y)&&(mt(!0),rt(fe.current?.getBoundingClientRect()??null))},[M,Y]),Nt=o.useCallback(()=>{(M||Y)&&(mt(!1),rt(null))},[M,Y]),gt=!!(M||Y),it=bo(We,Re=>{Re?Ct():Nt()},fe,{enabled:gt&&(te||q),fallbackOnParent:gt&&te}),Ye={...I};delete Ye.disabled,delete Ye.className,delete Ye.faded,delete Ye.useFaded,delete Ye.loading,delete Ye.onMouseLeave,delete Ye.onPointerEnter,delete Ye.onPointerLeave,delete Ye.onPointerUp,delete Ye.onFocus,delete Ye.onBlur,te&&(Object.keys(Ye).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Ye[Re]=="function"&&delete Ye[Re]}),Ye["aria-disabled"]="true");const oe=(typeof M=="string"?M:null)??(typeof $=="string"?$:null)??(typeof v=="string"?v:null)??(typeof ae=="string"?ae:null)??void 0,Ne=typeof v=="string"?v:typeof ae=="string"?ae:oe,Ve=Y?[Y.title,...Y.items??[]].filter(Boolean).join(". "):M&&oe&&oe!==Ne?oe:"",nt=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,Ve?we:null].filter(Boolean).join(" ")||void 0,Ie=(Re,tt)=>n.jsx(at,{icon:Re,label:tt??Ne,className:Se,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Ge=()=>ie==="dot"?n.jsxs(n.Fragment,{children:[Ie(c),ye&&n.jsx("span",{className:`button__label ${U}`,children:Qe()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ie(c)}),ye&&n.jsx("span",{className:`button__label ${U}`,children:Qe()})]}),de&&n.jsx("span",{className:"button__right",children:Ie(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Ie(c,v??ae)}),ye&&n.jsx("span",{className:`button__label ${U}`,children:Qe()}),de&&n.jsx("span",{className:"button__right",children:Ie(d)})]}),bt=!!s&&!te;return n.jsxs(n.Fragment,{children:[n.jsxs(bt?"a":"button",{...Ye,ref:Me,...bt?{href:s,target:l,rel:u??(l==="_blank"?"noreferrer":void 0)}:{type:i??"button",disabled:te&&!L&&!Ae},className:Le,"aria-pressed":Be,"aria-expanded":typeof y=="boolean"?y:I["aria-expanded"],"aria-controls":k??I["aria-controls"],"aria-label":Ne,"aria-disabled":te&&(bt||L||Ae)?!0:void 0,"aria-describedby":nt,style:he,onClick:wt,onMouseLeave:ht,onPointerEnter:Re=>{ca(Re)||Ct(),!te&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Nt(),!te&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Re)},onPointerUp:Re=>{te&&gt&&it.touchPress(Re.currentTarget),!te&&typeof I.onPointerUp=="function"&&I.onPointerUp(Re)},onFocus:Re=>{qe(!0),da()||Ct(),!te&&typeof I.onFocus=="function"&&I.onFocus(Re)},onBlur:Re=>{qe(!1),te||dt(Re),Nt(),!te&&typeof I.onBlur=="function"&&I.onBlur(Re)},children:[Ge(),Ve?n.jsx("span",{id:we,hidden:!0,"aria-label":Ve}):null]}),We&&Y?n.jsx(Kn,{anchorRect:ct,title:Y.title,items:Y.items,onClose:ft}):We&&oe?n.jsx(Bn,{anchorRect:ct,text:oe,onClose:ft}):null]})}const me=o.forwardRef(Vy);me.displayName="Button";function kt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const i=r.current?.parentElement??null;return t(i,e),()=>a(i)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},yo=new WeakMap;function vo(e){if(e)return yo.get(e)}function Gt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),yo.set(e,t))}function Kt(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),yo.delete(e))}const el={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function tl(){const e=kt(el,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const nl={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function al(){const e=kt(nl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const rl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ol(){const e=kt(rl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const sl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function il(){const e=kt(sl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const ll={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function ul(){const e=kt(ll,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const cl={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function dl(){const e=kt(cl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const pl={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function ml(){const e=kt(pl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const hl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fl(){const e=kt(hl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Cl={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function gl(){const e=kt(Cl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const bl={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function yl(){const e=kt(bl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const vl={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function xl(){const e=kt(vl,Gt,Kt);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 _l={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wl(){const e=kt(_l,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Bl={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function kl(){const e=kt(Bl,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Al={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Nl(){const e=kt(Al,Gt,Kt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const Qt=(e,t,a)=>({key:e,get label(){return Rt.t(`promoBannerBg.${e}`,t)},textTone:a}),qy=[Qt("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("soft","\uC18C\uD504\uD2B8","dark"),Qt("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),Qt("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),Qt("warm","\uC6DC(\uAC15\uC870)","dark"),Qt("dark","\uB2E4\uD06C","light"),Qt("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Qt("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),Qt("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),Qt("outline","\uC544\uC6C3\uB77C\uC778","dark"),Qt("success","\uC131\uACF5/\uC644\uB8CC","light"),Qt("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),Qt("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],El={main:tl,soft:al,sub:ol,deep:il,softSub:ul,warm:dl,dark:ml,radial:fl,diagonal:gl,dots:yl,outline:xl,success:wl,naver:kl,instagram:Nl};function Dl({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:i=.1,lineHeightRatio:s=1.4}={}){const l=A=>Math.max(a,Math.min(r,Number(A))),u=A=>{try{const y=localStorage.getItem(A),k=y?Number(y):1;return Number.isFinite(k)?l(k):l(1)}catch{return l(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const f=A=>{d(typeof A=="function"?y=>l(A(y)):l(A))},b=()=>f(A=>+(A+i).toFixed(6)),v=()=>f(A=>+(A-i).toFixed(6)),C=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:f,increase:b,decrease:v,canIncrease:C,canDecrease:h,fontSize:_,lineHeight:g}}function Sl(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const xo=" \xB7 ",Tl=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(xo)?e.split(xo).pop()??e:e})(),Uy=o.createContext(!1),Yn=[];let jl=null;function Gy(e){const t=o.useContext(Uy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(jl=document.title);const a={text:Tl?`${e}${xo}${Tl}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:jl??document.title}},[e,t])}const _o=[{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"}],Ky=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function an(e,t){return Ky().compare(e,t)}const lr=new Map;function Yy(e){const t=lr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let i=0;for(let s=r.exec(e);s;s=r.exec(e)){let l=s.index,u=s[0];u[0]==="-"&&l>0&&!/\s/.test(e[l-1])&&(l+=1,u=u.slice(1)),l>i&&a.push(e.slice(i,l)),a.push(Number(u)),i=s.index+s[0].length}return i<e.length&&a.push(e.slice(i)),lr.size>5e3&&lr.clear(),lr.set(e,a),a}function Zy(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 Xy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),i=a(t);if(r===i)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Zy(m);return p!==null?[p]:Yy(m)},l=s(e,r),u=s(t,i),c=Math.min(l.length,u.length);for(let d=0;d<c;d++){const m=l[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const f=an(m,p);if(f!==0)return f}return l.length!==u.length?l.length-u.length:an(r,i)}const Ml=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function wo(e,t,a){const r=Ml(e),i=Ml(t);if(r||i)return r===i?0:r?1:-1;const s=Xy(e,t);return a?s:-s}function Jy(e,t,a){const{t:r}=xe.useTranslation(),[i,s]=o.useState(()=>{const v=a?.initialPageSize;return v&&_o.some(C=>C.value===v)?v:"25"}),[l,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),l!==1&&u(1));const m=o.useMemo(()=>_o.map(v=>({...v,label:r("visits.showN",{n:v.value})})),[r]),p=o.useCallback(v=>{_o.some(C=>C.value===v)&&(s(v),u(1))},[]),f=Math.max(1,Math.ceil(e.length/Number(i))),b=Math.min(Math.max(1,Number.isFinite(l)?Math.floor(l):1),f);return l!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(i),b*Number(i)),[e,b,i]),pageSizeProps:{options:m,value:i,onChange:p},paginationProps:{page:b,total:f,onChange:u},setPage:u}}function Qy(e){const[t,a]=o.useState(null),r=o.useRef(t),i=o.useRef(e?.onSortChange);i.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),i.current?.(m)},[]),l=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((f,b)=>wo(d(f,m),d(b,m),p))},[t]);return{sort:t,field:l,sortRows:u}}const dn="\uC804\uCCB4";Object.fromEntries(Object.entries(rC).map(([e,{nucleus:t}])=>[e,t]));const e2={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"})},t2={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"})},n2={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 a2(e,t){if("place"in t)return e2[t.place](e);const a=t2[t.vowel](e);return t.glide?`${a} \xB7 ${n2[t.glide](e)}`:a}const r2=(e,{defaultValue:t})=>t,Ll=(e,t)=>({jamos:e,phonetic:t,tooltip:a2(r2,t)}),kn=(e,t)=>t.map(a=>Ll([a],{place:e})),Pt=(e,t,a)=>Ll([...e],a?{vowel:t,glide:a}:{vowel:t}),Bo={cho:[kn("labial",["\u3142","\u3143","\u314D","\u3141"]),kn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),kn("alveolar",["\u3145","\u3146"]),kn("palatal",["\u3148","\u3149","\u314A"]),kn("velar",["\u3131","\u3132","\u314B"]),kn("glottal",["\u314E"])],jung:[[Pt("\u3163","frontHigh"),Pt("\u315F","frontHigh","w"),Pt("\u3162","frontHigh","velar")],[Pt("\u3161","backHighUnrounded")],[Pt("\u315C","backHighRounded"),Pt("\u3160","backHighRounded","j")],[Pt("\u3154\u3150","frontMid"),Pt("\u3156\u3152","frontMid","j"),Pt("\u3159\u315A\u315E","frontMid","w")],[Pt("\u3153","backMidUnrounded"),Pt("\u3155","backMidUnrounded","j"),Pt("\u315D","backMidUnrounded","w")],[Pt("\u3157","backMidRounded"),Pt("\u315B","backMidRounded","j")],[Pt("\u314F","low"),Pt("\u3151","low","j"),Pt("\u3158","low","w")]],jong:[kn("labial",["\u3142","\u3141"]),kn("alveolar",["\u3137","\u3134","\u3139"]),kn("velar",["\u3131","\u3147"])]},o2=e=>e===s2?[]:Array.from(e),s2="__NO_CODA__",ko=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:i})=>({v:a.join(""),phonetic:r,tooltip:i}))),$l={cho:ko(Bo.cho),jung:ko(Bo.jung),jong:ko(Bo.jong)};$l.jung.flat().forEach(({v:e})=>{for(const t of o2(e));}),new Set($l.cho.flat().map(e=>e.v));function i2(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),i=o.useCallback(s=>{const l=s.getBoundingClientRect();t(u=>u?null:l)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:i}}function l2(e){const[t,a]=o.useState(null),[r,i]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const l=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),i(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),i(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:l,close:u}}function Rl(e="warning"){const[t,a]=o.useState(""),[r,i]=o.useState(e),[s,l]=o.useState(0),u=o.useCallback((p,f)=>{i(f),a(p),l(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(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 Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[i,s]=o.useState(!1),[l,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{i&&m()},[i,m]),o.useEffect(()=>{if(!i)return;let b=d.current?.offsetHeight??0;b>0&&m();let v=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++v>4){C?.disconnect(),C=null;return}m()}}),C.observe(d.current));const h=w=>{const B=w.target;r&&B.closest?.(r)||c.current?.contains(B)||d.current?.contains(B)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},A=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",A,!0);const y=()=>{a==="reposition"?g():a==="close"&&s(!1)};let k=null;const x=()=>{y(),k&&clearTimeout(k),k=setTimeout(()=>{k=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",y),window.addEventListener("orientationchange",x)),()=>{_!==null&&cancelAnimationFrame(_),C?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",A,!0),a!=="ignore"&&(window.removeEventListener("resize",y),window.removeEventListener("orientationchange",x)),k&&clearTimeout(k)}},[i,m,t,a,r]),o.useEffect(()=>{if(i)return Gn(()=>s(!1))},[i]);const p=o.useCallback(()=>s(b=>!b),[]),f=o.useCallback(()=>s(!1),[]);return{open:i,setOpen:s,toggle:p,close:f,style:l,triggerRef:c,menuRef:d}}function u2(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:i,playMs:s=1100,feedbackMs:l=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,f]=o.useState("idle"),[b,v]=o.useState(null),[C,h]=o.useState([]),[_,g]=o.useState(null),[A,y]=o.useState(0),k=o.useRef(0),x=o.useCallback(R=>{k.current=typeof R=="function"?R(k.current):R,y(k.current)},[]),w=o.useRef(r),B=o.useRef(i);o.useEffect(()=>{w.current=r,B.current=i},[r,i]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(R,H)=>{E.current.push(setTimeout(H,R))};o.useEffect(()=>()=>D(),[]);const O=u[d]?.id??null,P=o.useRef(null),G=o.useCallback(()=>{D(),f("playing"),h([]),g(null),x(0);let R=0;e.forEach((H,W)=>{N(R,()=>{m(W),v(H.id),w.current?.(H)}),N(R+1e3,()=>{v(null),h(I=>[...I,H.id])}),R+=1300}),N(R,()=>{f("done"),B.current?.({score:0,total:e.length})})},[e,x]),L=o.useCallback((R,H)=>{if(H>=R.length){f("done"),B.current?.({score:k.current,total:R.length});return}P.current=null,m(H),g(null),f("playing"),v(R[H].id),w.current?.(R[H]),N(s,()=>{v(null),f("waiting")})},[s]),M=o.useCallback(()=>{D();const R=ja(e);c(R),x(0),h([]),L(R,0)},[e,L,x]),$=o.useCallback(()=>{t==="playback"?(c(e),G()):M()},[t,e,G,M]),Y=o.useCallback(()=>{D(),f("idle"),v(null),h([]),g(null),m(0),x(0),c([])},[x]),q=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?$():Y(),()=>D()),[t,q,a]);const z=o.useCallback(R=>{p!=="waiting"||t==="playback"||P.current===d||(P.current=d,g(R),R===u[d]?.id&&x(H=>H+1),t==="exam"?(f("playing"),N(400,()=>L(u,d+1))):(f("feedback"),N(l,()=>L(u,d+1))))},[p,t,u,d,L,l,x]),V=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:_,answerId:O,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:z},index:d,total:V,score:A,phase:p,done:p==="done",start:$,reset:Y}}const Ao=new Map,No=new Map,c2=()=>()=>{},d2=()=>!0,p2=()=>!1;function Pl(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 m2(e){if(typeof window>"u")return"";const t=(a,r)=>{const i=r.attrName.toLowerCase(),s=r.attrValue.trim();(i==="href"||i==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(i==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const l=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(l)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function h2(e,t){const a=new Set;for(const l of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(l[2]);for(const l of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(l[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(l=>l[1])),i=[...a].filter(l=>r.has(l));if(i.length===0)return e;let s=e;for(const l of i){const u=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${l}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function f2(e){const t=No.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Ao.set(e,r),r)).catch(()=>null).finally(()=>{No.delete(e)});return No.set(e,a),a}function C2(e,t=!0){const a=o.useSyncExternalStore(c2,d2,p2)&&t&&e?Pl(e)??Ao.get(e)??null:null,[r,i]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){i({src:e,enabled:t,svg:null});return}const s=Pl(e)??Ao.get(e)??null;if(s!==null){i({src:e,enabled:t,svg:s});return}let l=!0;return f2(e).then(u=>{l&&i({src:e,enabled:t,svg:u})}),()=>{l=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function g2({title:e,description:t,actionLabel:a,onAction:r,bg:i,color:s,size:l="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=i??s??"main",f=o.useRef(null),[b,v]=o.useState("main"),C=ln("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const A=f.current;if(!A)return;const y=vo(A),k=(x,w,B)=>{if(B!==void 0)A.style.setProperty(w,B),h.current[x]=!0;else if(h.current[x]){const E=y?.[x];E?A.style.setProperty(w,E):A.style.removeProperty(w),h.current[x]=!1}};k("title","--promo-banner-bg-title",c),k("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const A=f.current;if(!A)return;const y=vo(A);v(y?.actionVariant??"main")},[p]);const _=_e("promo-banner",`promo-banner--${l}`,m),g=El[p];return n.jsxs("div",{ref:f,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${l==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(me,{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 b2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":i}){const{t:s}=xe.useTranslation(),l=i??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,f]=o.useState(!1),[b,v]=o.useState(!1),[C,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),A=o.useRef(null),y=Co(),k=p||b||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||k||y)return;const B=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(B)},[c,t,k,y]);const w=B=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},B)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const B=E=>{E.pointerType==="touch"&&(A.current&&A.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]),c===0?null:n.jsxs("section",{ref:A,className:_e("top-banner",r),"aria-label":l,"aria-roledescription":"carousel",onPointerEnter:B=>{_.current=B.pointerType},onPointerDown:B=>{_.current=B.pointerType,B.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:B=>{B.pointerType==="touch"&&w(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&f(!0)},onMouseLeave:()=>f(!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(-${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":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===x,onClick:()=>m(E)},E))})]})}function y2({title:e,body:t,open:a=!1,onToggle:r,avatar:i,titleClassName:s="body-2",bodyClassName:l="body-2",className:u=""}){const{t:c}=xe.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 m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),f=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[f+1]:p[f-1])?.focus()}},children:[i&&n.jsx("div",{className:"accordion-item__avatar",children:i}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(at,{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 ${l}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function v2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:i}){const[s,l]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(y2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>l(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:i},c.id??d))})}function x2(){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 _2(){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 w2(){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 At(e){const{t}=xe.useTranslation(),{type:a="bar",size:r,className:i="","aria-label":s,"aria-hidden":l}=e;if(a==="dot"){const{icon:k,number:x,position:w="top-right",onClick:B,animate:E=!1}=e,D=k??"check",N=x!==void 0?"number":D,O=typeof r=="number"?r:32,P=_e("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${O}`,E?"circle-badge--animate":"",B?"circle-badge--clickable":"",i),G=x!==void 0?t("badge.nthSelected",{n:x,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:P,onClick:B,onKeyDown:B?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":l?void 0:s??G,"aria-hidden":l||void 0,role:B?"button":l?void 0:"img",tabIndex:B?0:void 0,children:[x!==void 0&&x,x===void 0&&D==="check"&&n.jsx(x2,{}),x===void 0&&D==="remove"&&n.jsx(_2,{}),x===void 0&&D==="minus"&&n.jsx(w2,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:f,iconRight:b,color:v}=e,C=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",_={small:12,medium:14,large:16}[C]??14,g=_e("badge",`badge--${d}`,`badge--${C}`,m!=="filled"?`badge--${m}`:"",h,i),A=v?.startsWith("--")?`var(${v})`:v,y=p!==void 0||A?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...A?{"--badge-color":A}:{}}:void 0;return n.jsxs("span",{className:g,style:y,"aria-label":l?void 0:s,role:s&&!l?"img":void 0,"aria-hidden":l||void 0,children:[f&&n.jsx(at,{icon:f,size:_,className:"badge__icon"}),u??c,b&&n.jsx(at,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:i}=xe.useTranslation(),s=r==="small"?40:48,[l,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of l){const A=_?.[g.ci]?.items?.[g.ii];if(!A||!Array.isArray(A.children)||!A.children.length)break;_=[{title:null,items:A.children}],h.push({title:A.label||null,columns:_})}return h},[e,l]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),f=o.useRef(null),b=o.useRef(null),v=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const A=f.current?.querySelector("button:not([disabled])");if(A&&A.offsetParent){A.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[v]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(A=>[...A.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(me,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:i("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:f,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,A)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&A>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(me,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx(At,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?i("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>C(g,_,A),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},A))})]},_))})]})}const Il=".content-area";function Eo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Il);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&St("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Il}) \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 Do=52,ur=10,Fl=e=>e&&e>0?e:0;function Ol({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:i,moreItems:s=[],scrollContainer:l}){const{t:u}=xe.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[f,b]=o.useState(0),v=e.length;o.useEffect(()=>{const R=p.current;if(!R)return;const H=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(R):null,j=R.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),F=R.querySelector(".bottom-nav__left"),U=F?.nextElementSibling,ae=(F?.offsetWidth??0)+(F&&U?.classList.contains("bottom-nav__divider")?U.offsetWidth:0);b(Math.max(0,j-ae))};if(H(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(H);W.observe(R);const I=R.querySelector(".bottom-nav__left");return I&&W.observe(I),()=>W.disconnect()},[i]);const C=Do+1,h=R=>Math.max(0,Math.floor((R+ur)/(Do+ur))),_=v*(Do+ur)-ur<=f,g=f<=0||s.length===0&&_?v:Math.min(v,h(f-C)),A=f>0&&g<v,y=A?g:v,k=e.slice(0,y),x=e.slice(y),w=A||s.length>0,B=o.useCallback((R,H)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:Ia(H)}),[]),E=o.useId(),{open:D,toggle:N,close:O,style:P,triggerRef:G,menuRef:L}=Fa({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),M=o.useCallback((R,H)=>H>0?u("nav.badgeLabel",{label:R,count:H,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),$=o.useCallback((R,H)=>H>0?u("nav.badgeInsideLabel",{label:R,count:H,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),Y=o.useCallback(()=>i?.(c),[i,c]),q=o.useMemo(()=>x.find(R=>!!R.key&&R.key===t)??s.find(R=>R.selected||R.key&&R.key===t),[x,t,s]),z=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),Eo(l,"BottomNav")),O())}})),...s.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),O()}}))]}],[x,s,t,a,O]),V=[...x,...s].reduce((R,H)=>R+Fl(H.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[i&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:Y})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:k.map((R,H)=>{const W=Fl(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:M(R.label,W),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),Eo(l,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(At,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},R.key??`__slot-${H}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:G,className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:$(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),V),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),V>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(At,{type:"dot",position:"top-right",number:Math.min(V,99),size:24})}),D&&en.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:P,ref:L,children:n.jsx(Oa,{columns:z,onClose:O})}),document.body)]})})]})]})}function zl(e){if(typeof e!="string")return!1;let t="";for(const r of e){const i=r.charCodeAt(0);i<=32||i>=127&&i<=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 Wl(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function B2(e){const{t}=xe.useTranslation(),{activeKey:a,unreadCount:r,onDebug:i,onNotification:s,onSetting:l,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return i||s||l||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[i&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:i,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Wl(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx(At,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),l&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:l,selected:a==="settings"}),u&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Hl(e){const{t}=xe.useTranslation(),{item:a,itemKey:r,label:i,icon:s,active:l,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",f=a?.label??i??"",b=a?.icon??s??"",v=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(at,{icon:b,label:typeof f=="string"?f:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${l?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(A=>{if(h)return;const y=A.detail>0;if(y)try{A.currentTarget.blur()}catch{}u?.(p,A.currentTarget,y)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof f=="string"?Wl(t,f,v):void 0,"aria-current":l?"page":void 0,style:c,"aria-disabled":h,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:f}),v>0&&n.jsx(At,{type:"dot",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 Vl(e){const{t}=xe.useTranslation(),{items:a=[],activeKey:r,onChange:i,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b,scrollContainer:v}=e||{},C=f==="manager",h=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),_=o.useRef(null),[g,A]=o.useState(null);o.useEffect(()=>{const B=_.current;if(!B)return;let E=null;const D=()=>{const{scrollHeight:P,clientHeight:G,scrollTop:L}=B;if(P<=G+1){A(z=>z===null?z:null);return}const M=Math.max(24,G/P*G),$=G-M,Y=P-G,q={top:Math.round(L/Y*$),height:Math.round(M)};A(z=>z&&z.top===q.top&&z.height===q.height?z:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),B.addEventListener("scroll",N,{passive:!0});const O=typeof ResizeObserver<"u"?new ResizeObserver(N):null;O?.observe(B);for(const P of Array.from(B.children))O?.observe(P);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",N),O?.disconnect()}},[a]);const y=o.useRef(null),k=o.useCallback(B=>{const E=_.current;E&&(B.preventDefault(),y.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),x=o.useCallback(B=>{const E=_.current,D=y.current;!E||!D||(E.scrollTop=D.top+(B.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(B=>{y.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:[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:x,onPointerUp:w,onPointerCancel:w})}),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(Hl,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(D,N,O)=>{if(B.disabled)return;if(B.href){if(zl(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),O)try{N?.blur()}catch{}return}if(i?.(B.key),Eo(v,"SideNav"),!O)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 P=document.querySelector(".header");if(P){const G=typeof P.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&P.matches(":hover"))){P.classList.add("header--force-collapsed");const L=()=>{P.classList.remove("header--force-collapsed"),P.removeEventListener("mouseenter",L)};P.addEventListener("mouseenter",L)}}}})]},B.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Hl,{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:h})]}),n.jsx(B2,{activeKey:r,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var cr='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>',So='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>',k2='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 ql({appMode:e}){const{t}=xe.useTranslation(),a=e==="manager",r=a?So:cr,i=k2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:i,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 Ul({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:i,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b,scrollContainer:v}){const{t:C}=xe.useTranslation(),h=ln("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(P=>!P.section&&(P.key||P.label)).map(P=>({key:P.key,label:typeof P.label=="string"?P.label:void 0,icon:P.icon,state:P.disabled?"disabled":void 0,badgeCount:P.badge})),[a]),g=o.useCallback(P=>{const G=a?.find(L=>L.key===P);if(!G?.disabled){if(G?.href){zl(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.(P)}},[a,t]),A=o.useMemo(()=>{const P=[];return l&&P.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:l}),u&&P.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&P.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),m&&P.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&P.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&P.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),P},[C,l,u,d,m,p,c,s]),y=o.useCallback((P,G)=>({position:"fixed",top:P.bottom+8,right:Math.max(8,window.innerWidth-P.right),zIndex:Ia(G)}),[]),k=o.useId(),{open:x,toggle:w,close:B,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:y,onScroll:"ignore",onResize:"reposition"}),O=o.useMemo(()=>[{items:A.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===e),closeOnSelect:!0,onClick:()=>{P.onClick?.(),B()}}))}],[A,e,B]);return n.jsxs("aside",{className:`header${f==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ql,{appMode:f}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(me,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":x,"aria-controls":x?k:void 0}),!!u&&!!s&&s>0&&n.jsx(At,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),x&&en.createPortal(n.jsx("div",{id:k,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:O,onClose:B})}),document.body)]})]}),n.jsx(Vl,{scrollContainer:v,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:l,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:f,onAppModeChange:b}),h&&n.jsx(Ol,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:v,appMode:f,onAppModeChange:b})]})}const A2=Ul,N2=()=>Rt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Gl(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 la(`${t.toLocaleString("ko-KR")}\uC6D0`)}return la(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function E2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function D2(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\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 i=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return i?i[2].toLowerCase()==="year"?`${i[1]}\uB144`:`${i[1]}\uC77C`:a||N2()}function S2(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 Kl(e){return{type:e.type??E2(e),plan:D2(e),label:e.label,price:Gl(e.price),originalPrice:Gl(e.originalPrice),discountLabel:e.discountLabel}}var T2='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>',j2='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>',Yl='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 Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function M2(e){if(e)return To.get(e)}function An(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Nn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const Zl={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function Xl(e={}){const t=kt(Zl,An,Nn);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("${Yl}")`}})]})}const Jl="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",pa=240;var za='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 L2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},$2=100,R2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function Ql(e={}){const t=kt(L2,An,Nn),a="var(--color-main)",r=270,i=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:R2.map(({scale:s,opacity:l},u)=>n.jsx("g",{transform:`translate(${r} ${i}) scale(${s*$2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:l,children:n.jsx("path",{d:Jl,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("${za}")`}})]})}const P2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},I2=100,F2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function O2(e={}){const t=kt(P2,An,Nn),a="#ffffff",r=270,i=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:F2.map(({scale:s,opacity:l},u)=>n.jsx("g",{transform:`translate(${r} ${i}) scale(${s*I2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:l,children:n.jsx("path",{d:Jl,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("${Yl}")`}})]})}const z2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function W2(e={}){const t=kt(z2,An,Nn);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("${za}")`}})]})}const H2={Logo_SpeechEar_ko:{"":cr,_mono:T2},Logo_SpeechEarManager_ko:{"":So,_mono:j2}};function V2(e,t){if(e)return H2[e]?.[t??""]??void 0}const q2={speechear:cr,manager:So},U2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},eu=10;function G2(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 tu(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 i=Math.floor(e/60);return i>0?t("passCard.remainingMinute",{n:i}):t("passCard.remainingSecond",{n:Math.floor(e)})}function K2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),i=a==="\uC624\uD508\uD2B9\uAC00"||a===Rt.t("passCard.specialLabel");return r?n.jsx(W2,{}):i?n.jsx(O2,{}):n.jsx(Ql,{})}return n.jsx(Xl,{})}function nu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:i,endDate:s,remainingSeconds:l,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:f,copyrightColor:b,logoSrc:v,label:C,price:h,originalPrice:_,discountLabel:g,onUse:A,onRefund:y,onDelete:k}){const{t:x}=xe.useTranslation(),w=t?Kl(t):void 0,B=i??w?.type??"speechear",E=r??w?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??w?.label,N=h??(a?w?.price:void 0),O=_??(a?w?.originalPrice:void 0),P=g??w?.discountLabel,G=o.useMemo(()=>{if(N)return null;const Z=t?.durationDays??S2(t?.code);if(!Z||Z<=0)return l!=null?{percent:null,remainingLabel:tu(l,x)}:null;const Q=Z*86400;let he;if(l!=null)he=l;else if((c==="active"||c==="expired")&&s){const de=new Date(s).getTime();if(Number.isNaN(de))return null;const ie=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),ge=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),fe=Math.round(ie&&ge?(Date.UTC(+ie[1],+ie[2]-1,+ie[3])-Date.UTC(+ge[1],+ge[2]-1,+ge[3]))/864e5:(de-Date.now())/864e5);he=Math.max(0,u?fe+1:fe)*86400}else c==="expired"?he=0:he=Q;const De=G2(he),ye=Math.max(0,Math.min(100,Math.floor(Math.min(De,Q)/Q*100)));return c==="pending"&&ye>=100?null:{percent:ye,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):tu(he,x)}},[N,c,s,l,u,t?.durationDays,t?.code,x]),L=o.useRef(null),[M,$]=o.useState({}),[Y,q]=o.useState(null),z=!!(A||y||k),V=o.useRef(!1),R=o.useRef(void 0),[H,W]=o.useState(v);o.useLayoutEffect(()=>{W(v)},[v]),o.useLayoutEffect(()=>{const Z=L.current;Z&&(p!==void 0&&Z.style.setProperty("--pass-card-text",p),f!==void 0&&Z.style.setProperty("--pass-card-sub",f),b!==void 0&&Z.style.setProperty("--pass-card-copyright",b))},[p,f,b]),o.useLayoutEffect(()=>{const Z=L.current;if(!Z)return;const Q=M2(Z);if(!v){const he=U2[B],De=c==="expired"?"_mono":Q?.logoColor??"",ye=V2(he,De);W(ye)}},[d,v,B,c]);const I=Z=>{const Q=L.current;if(!Q)return null;const{left:he,top:De,width:ye,height:de}=Q.getBoundingClientRect(),ie=(Z.clientX-he)/ye-.5;return{rotateX:-((Z.clientY-De)/de-.5)*eu,rotateY:ie*eu}},S=(Z,Q)=>{const he=Q*-.7,De=Z*.7+10,ye=20+(Math.abs(Z)+Math.abs(Q))*.4;return`${he}px ${De}px ${ye}px rgba(0, 0, 0, 0.18)`},j=o.useCallback(Z=>{if(da())return;V.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{V.current=!1},200);const Q=I(Z);Q&&$({transform:`perspective(800px) rotateX(${Q.rotateX}deg) rotateY(${Q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(Q.rotateX,Q.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)"})},[]),F=o.useCallback(Z=>{if(da())return;const Q=I(Z);if(!Q)return;const he=V.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";$({transform:`perspective(800px) rotateX(${Q.rotateX}deg) rotateY(${Q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(Q.rotateX,Q.rotateY),transition:he})},[]),U=o.useCallback(()=>{clearTimeout(R.current),V.current=!1,$({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ae=o.useCallback(()=>q(null),[]),te=o.useMemo(()=>{const Z=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),Q=E.replace("\uC774\uC6A9\uAD8C","").replace(Z==="\uC774\uC6A9\uAD8C"?"":Z,"").trim(),he=Q.match(/^(.*?)(일|년)$/);return he?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:he[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:he[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:Q})},[E,x]),le=o.useMemo(()=>{const Z=la(N);if(!Z)return null;const Q=Z.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!Q)return n.jsx("span",{className:"h1",children:Z});const[,he,De,ye]=Q;return n.jsxs(n.Fragment,{children:[he&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:he}),n.jsx("span",{className:"h1 pass-card__price-amount",children:De}),ye.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ye.trim()})]})},[N]),K=o.useCallback(()=>{z&&q(Z=>{if(Z)return null;const Q=L.current?.getBoundingClientRect();if(!Q)return null;const he=50;return{left:Q.left,right:Q.right,width:Q.width,height:Q.height,x:Q.x,y:Q.y+he,top:Q.top+he,bottom:Q.bottom+he}})},[z]),re=o.useCallback(Z=>{z&&(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),K())},[z,K]),ke=[{items:[...A?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{A(),q(null)},closeOnSelect:!0}]:[],...y?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{y(),q(null)},closeOnSelect:!0}]:[],...k?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${z?" pass-card--clickable":""}`,style:M,onMouseEnter:j,onMouseMove:F,onMouseLeave:U,onPointerUp:Z=>{Z.pointerType==="touch"&&U()},onPointerCancel:Z=>{Z.pointerType==="touch"&&U()},onClick:K,onKeyDown:z?re:void 0,role:z?"button":void 0,tabIndex:z?0:void 0,"aria-label":e,"aria-haspopup":z?"menu":void 0,"aria-expanded":z?!!Y:void 0,children:[d??K2(B,E,D),!m&&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:H??q2[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:te}),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:[P&&n.jsx("span",{className:"pass-card__discount body-3",children:P}),n.jsxs("div",{className:"pass-card__price",children:[O&&n.jsx("span",{className:"pass-card__price-original body-3",children:la(O)}),le]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.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."})]})]})}),Y&&n.jsx(cn,{anchorRect:Y,onClose:ae,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:ke,onClose:ae,size:"small"})})]})}const Y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function Z2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=kt(Y2,An,Nn);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("${za}")`}})]})}const X2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function J2(e={}){const t=kt(X2,An,Nn);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("${za}")`}})]})}function Q2(e,t){if(e){if(t==="manager_pro")return n.jsx(J2,{});if(t==="manager_standard")return n.jsx(Z2,{});if(t==="manager_lite")return n.jsx(Ql,{})}}function ev(e){const t=la(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,i,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),i,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function tv(e){const{t}=xe.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:i,onSelect:s,period:l="monthly",ownedCodes:u}=e||{},c=y=>!!y&&!!u?.includes(y),d=y=>y.onceOnly??/오픈\s*특가/.test(y.label??""),m=(i.tiers||[]).some(y=>d(y)&&c(y.code)),p=y=>{const k=y.prices?y.prices[l]:y.price;return k?(i.tiers||[]).some(x=>!!x.badge&&x.originals?.[l]===k):!1},f=i.colorToken?`var(--color-${i.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[l]:y.price,h=(i.tiers||[]).length>0&&(i.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)}),_=(i.tiers||[]).length>0&&(i.tiers||[]).every(y=>{const k=C(y);return k==="\uBB38\uC758"||k===v}),g=i.group==="org",A=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:f,"--plan-color":f},children:[i.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(At,{label:i.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:f},children:i.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:i.tier??i.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:i.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:(i.recommendedFor||[]).map((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(at,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:f}}),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:(i.features||[]).map((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(at,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:f}}),y]},k))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(me,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>i.tiers?.[0]&&s?.({...i.tiers[0],productId:i.id,productTitle:i.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(i.tiers||[]).map(y=>{const k=y.label||a,x=d(y),w=x||y.openPromo===!0,B=k.replace(/^오픈\s*특가\s*/,"")||a,E=y.prices?y.prices[l]:y.price,D=y.badge?w?`${r}
852
+ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!m)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:ev(E)})})]},y.id);const N=i.tier??(g?i.title:void 0),O=n.jsx(nu,{showPrice:!0,product:{type:A,code:y.code,name:B,label:N,price:E,originalPrice:y.originals?.[l]??void 0,discountLabel:D},bg:Q2(g,i.id)}),P=()=>s?.({...y,productId:i.id,productTitle:i.title,preview:O});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:P,onKeyDown:s?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),P())}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,children:O},y.id)})})})})]})}function nv({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 jo='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 au={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function av(){const e=kt(au,An,Nn);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("${jo}")`}})})}const ru={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function rv(e={}){const t=kt(ru,An,Nn);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("${za}")`}})]})}function ou({keys:e,anchor:t="top-right",scale:a,className:r=""}){const i=Array.isArray(e)?e:[e];return n.jsx("span",{className:_e("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:i.map((s,l)=>n.jsxs("span",{className:"shortcut-badge__group",children:[l>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:s})]},`${s}-${l}`))})}const Wa=(e,t,a)=>e+(t-e)*a;function ov({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:i,selectedId:s=null,answerId:l=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:m,clickable:p=!1,onSelectSpeaker:f,buttonSize:b=40,showIcon:v=!0,onCenterClick:C,centerLabel:h,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:A="top-right",shortcutScale:y,scaleShortcut:k=!1}){const{t:x}=xe.useTranslation(),w=Math.max(0,Math.min(1,a)),B=t/2,E=110/300,D=.18,N=Z=>t*(E+(Z-1)*D),O=Z=>{const Q=N(Z.row??1),he=Z.angleDeg*Math.PI/180;return{x:B+Q*Math.cos(he),y:B+Q*Math.sin(he)}},P=Math.max(...e.map(Z=>Z.row??1),1),G=t*.08,L=t*.1,M=t*.24,$=t-2*G,Y=t-L-M,q=t-M/2,z=o.useMemo(()=>[...new Set(e.map(Z=>Z.deg))].sort((Z,Q)=>Z-Q),[e]),V=z.length,R=Math.max(68,V>1?$/(V-1):0),H=o.useMemo(()=>new Map(z.map((Z,Q)=>[Z,Q])),[z]),W=Z=>{const Q=H.get(Z.deg)??0,he=B+(Q-(V-1)/2)*R,De=P>1?Math.min(68,Y/(P-1)):0,ye=De*(P-1),de=L+(Y-ye)/2,ie=P===1?L+Y*.4:de+(P-(Z.row??1))*De;return{x:he,y:ie}},I=Z=>{const Q=O(Z),he=W(Z);return{x:Wa(Q.x,he.x,w),y:Wa(Q.y,he.y,w)}},S={x:B,y:Wa(B,q,w)},j=Math.round(b*1.2),F=Math.round(Math.max(16,Math.min(80,b*.7))),U=[],ae=new Map;for(const Z of e){const Q=Z.row??1;ae.has(Q)||ae.set(Q,[]),ae.get(Q).push(Z)}for(const[Z,Q]of ae.entries()){if(Q.length<2)continue;const he=[...Q].sort((We,mt)=>We.deg-mt.deg),De=he.map(We=>I(We)),ye=he.map(We=>We.deg),de=ye[ye.length-1]-ye[0],ie=de/(ye.length-1),ge=360-de,fe=he.length>=3&&ie>0&&ge<=ie*1.5,ue=Math.round(N(Z)*1e3)/1e3,Me=(We,mt,ct,rt)=>{const ft=(mt.angleDeg-We.angleDeg+540)%360-180;if(ft===0)return`L ${rt.x} ${rt.y}`;if(w===0)return`A ${ue} ${ue} 0 0 ${ft>0?1:0} ${rt.x} ${rt.y}`;const Ae=(We.angleDeg+ft/2)*Math.PI/180,qe={x:B+ue*Math.cos(Ae),y:B+ue*Math.sin(Ae)},we={x:(ct.x+rt.x)/2,y:(ct.y+rt.y)/2},Ue={x:Wa(qe.x,we.x,w),y:Wa(qe.y,we.y,w)},Be={x:2*Ue.x-we.x,y:2*Ue.y-we.y};return`Q ${Be.x} ${Be.y} ${rt.x} ${rt.y}`},ze=fe?[...he,he[0]]:he,je=fe?[...De,De[0]]:De;let Oe=`M ${je[0].x} ${je[0].y}`;for(let We=1;We<je.length;We++)Oe+=" "+Me(ze[We-1],ze[We],je[We-1],je[We]);U.push({key:`arc-${Z}`,d:Oe})}const te=o.useMemo(()=>new Set(i??[]),[i]),le=Z=>({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")})[Z],K=Z=>{if(r===Z.id)return"active";if(u){if(Z.id===l)return"correct";if(Z.id===s&&s!==l)return"wrong"}return te.has(Z.id)?"played":"idle"},re=Z=>r===Z.id?"loop":u?Z.id===l?"loop":null:c&&Z.id===s?"once":null,ke=(Z,Q)=>{switch(Z){case"played":case"correct":return n.jsx($s,{size:Q});case"wrong":return n.jsx(qs,{size:Q});default:return n.jsx(Vs,{size:Q})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(Z=>{const{x:Q,y:he}=I(Z);return n.jsx("line",{x1:S.x,y1:S.y,x2:Q,y2:he,stroke:"#dde3ec",strokeWidth:"1"},Z.id)}),U.map(Z=>n.jsx("path",{d:Z.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},Z.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:j,height:j,left:S.x-j/2,top:S.y-j/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:j,height:j,left:S.x,top:S.y},"aria-label":h,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:C,children:n.jsx(Ir,{size:F,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:j,height:j,left:S.x,top:S.y},children:n.jsx(Ir,{size:F,color:"currentColor",strokeWidth:1.5})}),e.map((Z,Q)=>{const{x:he,y:De}=I(Z),ye=K(Z),de=re(Z),ie={...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:ye!=="idle"?10:1},ge=b,fe=Math.round(Math.max(10,Math.min(56,ge*.38))),ue=Math.round(Math.max(7,Math.min(18,ge*.2))),Me=Math.round(Math.max(10,Math.min(56,ge*.4))),ze=v==="answered"&&(ye==="played"||ye==="correct"||ye==="wrong"),je=v===!0||ze,Oe=!ze;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ie,left:he-ge/2,top:De-ge/2},children:[de&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ye}`+(de==="once"?" sound-compass__pulse--once":""),style:{width:ge,height:ge,...de==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...m!==void 0?{"--sc-pulse-scale":String(m)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>f?.(Z.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ye}`,style:{width:ge,height:ge},"aria-label":le(ye)?`${Z.label}, ${le(ye)}`:Z.label,"aria-pressed":s!=null?Z.id===s:void 0,children:[je&&ke(ye,fe),Oe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?ue:Me},children:Q+1})]}),Z.shortcut&&n.jsx(ou,{keys:Z.shortcut,anchor:A,className:"sound-compass__speaker-shortcut"})]},Z.id)})]})})}function sv({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:_e("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function iv({orientation:e="horizontal",label:t,className:a=""}){const r=_e("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 su({checked:e,onChange:t,name:a,value:r,disabled:i=!1,label:s,className:l=""}){const u=o.useId();return n.jsxs("label",{className:`radio${i?" radio--disabled":""} ${l}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:i,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),s&&n.jsx("span",{className:"radio__label body-2",children:s})]})}function lv({options:e,value:t,onChange:a,name:r,disabled:i=!1,direction:s="vertical",className:l="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${s} ${l}`.trim(),role:"radiogroup","aria-label":u,children:e.map(m=>n.jsx(su,{name:d,value:m.value,checked:t===m.value,disabled:i||m.disabled,label:m.label,onChange:p=>{p&&a?.(m.value)}},m.value))})}const uv={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function cv({tone:e="info",title:t,message:a,children:r,dismissible:i=!1,onDismiss:s,live:l,className:u=""}){const{t:c}=xe.useTranslation(),[d,m]=o.useState(!1),p=o.useRef(null),f=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&sr(g),m(!0),s?.()},[s]);if(d)return null;const b=_e("alert",`alert--${e}`,u),v=l??(e==="danger"||e==="warning"?"assertive":"polite"),C=v==="assertive"?"alert":v==="polite"?"status":void 0,h=!!t,_=!!(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(at,{icon:uv[e],size:20,className:"alert__icon"}),h&&n.jsx("span",{className:"alert__title body-2",children:t}),!h&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),h&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),i&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:f,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const dv={ready:"search",guide:"info",error:"circle-alert"};function pv(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let i=0,s=0;for(const l of a){const u=e.indexOf(l,i);u<0||(u>i&&r.push(e.slice(i,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:l},s++)),i=u+l.length)}return i<e.length&&r.push(e.slice(i)),r}function mv({status:e="guide",label:t,children:a,emphasis:r,icon:i,className:s=""}){const l=i===!1?null:i??dv[e],u=_e("search-summary",`search-summary--${e}`,s),c=t??a,d=typeof c=="string"&&r&&r.length>0?pv(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[l!=null&&n.jsx(at,{icon:l,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ha({title:e,items:t}){const{t:a}=xe.useTranslation(),{anchorRect:r,openAt:i,close:s}=Pa(),l=o.useRef(null),u=bo(!!r,(c,d)=>{c&&d?i(l.current?.querySelector("button")??d):s()},l);return n.jsxs("span",{ref:l,style:{display:"contents"},children:[n.jsx(me,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ca(c)||i(c.currentTarget)},onPointerLeave:c=>{ca(c)||s()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{da()||i(c.currentTarget)},onBlur:s}),r&&n.jsx(Kn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:s})]})}function hv({items:e=[],value:t,onChange:a,className:r="",size:i=40}){const s=o.useId(),{t:l}=xe.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,m=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),f=(C,h=p())=>{if(h.length===0)return;const _=(C%h.length+h.length)%h.length;h[_]?.focus(),h[_]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const h=p(),_=h.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?f(_+1,h):C.key==="ArrowLeft"||C.key==="ArrowUp"?f(_-1,h):C.key==="Home"?f(0,h):f(h.length-1,h)},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--${i}`,role:"tablist","aria-label":l("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${s}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${s}-${C.key}`,disabled:C.disabled,tabIndex:C.key===m?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-${s}-${v.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${s}-${v.key}`,tabIndex:0,className:"tabs__panel",children:v.panel},v.key)]})}const fv={xs:12,sm:16,md:20,lg:28,xl:36};function Cv(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 gv({src:e,name:t,size:a="md",shape:r="circle",className:i=""}){const{t:s}=xe.useTranslation(),[l,u]=o.useState(null),c=!!e&&l===e,d=t?Cv(t):"",m=!!e&&!c,p=!m&&!!d,f=t||s("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${i}`.trim(),role:"img","aria-label":f,children:[m&&n.jsx("img",{className:"avatar__image",src:e,alt:f,onError:()=>u(e??null)}),!m&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!m&&!p&&n.jsx(at,{icon:"user-round",size:fv[a],className:"avatar__icon"})]})}function bv(e,t){if(!t)return!0;const a=t.split(",").map(s=>s.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),i=e.type.toLowerCase();return a.some(s=>{const l=s.toLowerCase();return l.startsWith(".")?r.endsWith(l):l.endsWith("/*")?i.startsWith(l.slice(0,-1)):i===l})}function yv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:i=!0,files:s,onRemove:l,className:u=""}){const{t:c}=xe.useTranslation(),d=o.useRef(null),[m,p]=o.useState(!1),[f,b]=o.useState([]),v=s??f,C=x=>{if(!x||x.length===0)return;const w=Array.from(x).filter(E=>bv(E,t));if(w.length===0)return;const B=a?w:w.slice(0,1);if(s===void 0){const E=a?[...v,...B]:B;b(E),e?.(E)}else e?.(B)},h=x=>{x.preventDefault(),!r&&p(!0)},_=x=>{x.preventDefault(),p(!1)},g=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},A=x=>{const w=x.target;try{C(w.files)}finally{w.value=""}},y=()=>{r||d.current?.click()},k=x=>{if(!r&&(l?.(x),s===void 0)){const w=v.filter((B,E)=>E!==x);b(w),l||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:_e("file-upload__dropzone",m&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:y,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),y())},onDragOver:h,onDragLeave:_,onDrop:g,children:[n.jsx(at,{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(),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:A,tabIndex:-1})]}),i&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((x,w)=>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(w),children:n.jsx(at,{icon:"x",size:14})})]},`${x.name}-${w}`))})]})}function vv({items:e,className:t=""}){const{t:a}=xe.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,i)=>{const s=i===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[s?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}),!s&&n.jsx(at,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},i)})})})}const xv={small:14,medium:20,large:28};function _v({value:e,onChange:t,max:a=5,readOnly:r=!1,size:i="medium",ariaLabel:s,className:l=""}){const{t:u}=xe.useTranslation(),c=r||!t,[d,m]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,f=d??p,b=xv[i],v=x=>{x!==e&&t?.(x)},C=x=>{c||v(x)},h=x=>{c||da()||m(x)},_=o.useRef(null),g=x=>{const w=Math.min(a,Math.max(1,x));v(w),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(w))?.focus()},A=x=>{if(!c){switch(x.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}x.preventDefault()}},y=p>=1&&p<=a?Math.round(p):1,k=()=>{c||m(null)};return n.jsx("div",{className:`rating rating--${i}${c?" rating--readOnly":""} ${l}`.trim(),ref:_,onKeyDown:A,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):s??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,w)=>{const B=w+1,E=Math.max(0,Math.min(1,f-w)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(at,{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(at,{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:()=>h(B),children:N},B)})})}const wv=20,Bv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function kv({value:e,onChange:t,palette:a=Bv,size:r=40,className:i="",ariaLabel:s}){const{t:l}=xe.useTranslation();return n.jsx("div",{className:`color-picker ${i}`.trim(),role:"group","aria-label":s,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} ${l("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(at,{icon:"check",size:wv,className:"color-picker__check"})},u)})})}function iu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:i,bgColor:s,useHover:l=!0,iconSize:u="medium"}){const{t:c}=xe.useTranslation(),d=u==="small",m=_e("category-icon",d?"category-icon--small":""),p=d?16:20,f=o.useRef(null),[b,v]=o.useState(!1),C=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!i&&!s?B:{...B,...i?{color:i,"--t-item-fg":i}:{},...s?{"--t-item-bg":s}:{}}},[r,i,s]),h=a||t,_=l&&!!h,[g,A]=o.useState(null);o.useLayoutEffect(()=>{b&&A(f.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!l&&b)try{v(!1)}catch{}},[l,b]),o.useEffect(()=>{if(!b)return;const B=E=>{const D=f.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(()=>{l&&v(!0)},[l]),k=o.useCallback(()=>{l&&v(!1)},[l]),x=o.useCallback(()=>v(!1),[]),w=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:f,className:_e("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:y,onPointerLeave:k,onFocus:y,onBlur:k,onKeyDown:w,role:"button",tabIndex:0,"aria-label":typeof h=="string"?c("common.descriptionFor",{name:h,defaultValue:`${h} \uC124\uBA85`}):void 0,"aria-haspopup":!!h,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(at,{icon:e,label:t,className:m,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),b&&h&&n.jsx(Bn,{anchorRect:g,text:typeof h=="string"?h:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof h=="string"?h:void 0})]})}let In=null;function dr(e){if(In&&In!==e)try{In()}catch{}return In=e,()=>{In===e&&(In=null)}}function pr(e){if(In===e){In=null;try{e()}catch{}}}function mr(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){St("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 i=!1;const s=u=>{if(!i){i=!0;try{t?.(u)}catch{}a(u)}};let l;try{l=new Audio(e)}catch{return s(!1),{el:{},stop:()=>{},done:r}}l.onended=()=>s(!0),l.onerror=()=>s(!1);try{l.play().catch(()=>s(!1))}catch{s(!1)}return{el:l,stop:()=>{try{l.pause()}catch{}s(!1)},done:r}}function Av(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=l=>l.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const l=a.sentences||a.items||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.items||a.sentences||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.items||a.sentences||[],u=Array.isArray(l)&&l.length>0?r(l):[];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 l=a.sentences||a.items||[],u=Array.isArray(l)&&l.length>0?r(l):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const i=a.sentences||a.items||[],s=r(Array.isArray(i)?i:[]);return s.length===0&&(a.contextCode||a.context_code)&&s.push(String(a.contextCode||a.context_code)),{previewCodes:s,previewBucket:null}}function Nv(e,t){const[a,r]=o.useState(!1),[i,s]=o.useState(-1),[l,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null),[f,b]=o.useState(!1),v=o.useRef([]),{previewCodes:C,previewBucket:h}=Av(e,t),_=`${C.join(",")}|${h??""}`,g=o.useMemo(()=>l.key===_?l.urls:[],[l,_]);o.useEffect(()=>{if(!C.length)return;let y=!1;return(async()=>{const k=[],x=[];for(const w of C)try{const B=yi(w,h);if(!B){k.push("");continue}let E=null;try{E=await vi(B)}catch{}if(!E)try{const D=await xi(B);D&&(E=URL.createObjectURL(D),x.push(E))}catch{}k.push(E??"")}catch{k.push("")}y?x.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(v.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),v.current=x,u({key:_,urls:k}))})(),()=>{y=!0}},[C.join(","),h]),o.useEffect(()=>()=>{v.current.forEach(y=>{try{URL.revokeObjectURL(y)}catch{}}),v.current=[]},[]);const A=o.useCallback(async y=>{if(y.stopPropagation(),y.preventDefault(),d.current){m.current&&pr(m.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),s(-1);return}if(!g.filter(Boolean).length)return;let k=null;const x=()=>{d.current=!1,k?.stop()};m.current=x;const w=dr(x);d.current=!0,r(!0);for(let B=0;B<g.length&&d.current;B++){const E=g[B];if(E&&(s(B),k=mr(E),c.current=k.el,!await k.done))break}w(),m.current===x&&(m.current=null,d.current=!1,r(!1),s(-1))},[g]);return o.useEffect(()=>()=>{m.current&&pr(m.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:i,previewUrls:g,previewHover:f,setPreviewHover:b,previewBtnRef:p,handlePreview:A}}const Ev=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 i=r;return i.sentence||i.text||i.context||i.question||i.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Mo(e){const{index:t,type:a,trainingData:r,ariaLabel:i,depth:s,renderPopup:l,completed:u,completedIds:c,selectedIds:d,tooltipText:m,useDescriptionTooltip:p=!1,onRemove:f,hideCheckBadge:b=!1,showTypeLabel:v=!1,onComplete:C,onSelect:h,onMore:_,countLabelOverride:g,size:A="square"}=e||{},{t:y}=xe.useTranslation(),[k,x]=o.useState(!1),w=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:O,previewHover:P,setPreviewHover:G,previewBtnRef:L,handlePreview:M}=Nv(r,a?.key),$=o.useCallback(()=>{h?h():x(!0)},[h]),Y=o.useCallback(()=>x(!1),[]),q=o.useCallback(()=>E(!0),[]),z=o.useCallback(()=>E(!1),[]),V=o.useCallback(()=>G(!0),[G]),R=o.useCallback(()=>G(!1),[G]),[H,W]=o.useState(null);o.useLayoutEffect(()=>{P&&W(L.current?.getBoundingClientRect()??null)},[P,L]);const[I,S]=o.useState(null);o.useLayoutEffect(()=>{B&&!k&&p&&S(w.current?.getBoundingClientRect()??null)},[B,k,p]);const j=o.useCallback(we=>{we.target===we.currentTarget&&(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),$())},[$]),F=r||null,U=o.useMemo(()=>{if(!p)return null;const we=m?(Array.isArray(m)?m:[m]).filter(Boolean):null,Ue=we&&we.length>0?we:Ev(F);return Ue&&Ue.length>0?Ue:null},[p,m,F]),ae=o.useCallback(we=>{we.stopPropagation(),f?.()},[f]),te=o.useCallback(we=>we.stopPropagation(),[]),le=o.useCallback(we=>{typeof C=="function"&&C(we)},[C]),K=u||(c&&r?.id!=null?c.has(String(r.id)):!1),re=!K&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Sl("speechear.popup.close",Y);const ke=zi(),Z=`${a?.label||""} ${t+1}`,Q=F?.title||F?.name||Z;let he=a?.icon,De,ye="",de="";try{const we=F?.category_0||F?.category_main_code||F?.category_main,Ue=F?.category_1||F?.category_sub_code||F?.category_sub,Be=ke.find(Le=>Le.key===we);Be?.icon&&(he=Be.icon),!De&&Be?.color&&(De={"--t-item-fg":Be.color}),!De&&F?.iconColor&&(De={"--t-item-fg":F.iconColor}),ye=Be?y(`topic.${Be.key}`,{defaultValue:Be.label||""}):"";try{const Le=Be?.subs?.find(Se=>Se.key===Ue);de=Le?y(`topic.sub.${Le.key}`,{defaultValue:Le.label||""}):""}catch{}}catch{}const ie=de?`${ye} / ${de}`:ye||a?.label||Q,ge=we=>y("training.countQuestions",{n:we,count:we}),fe=we=>y("training.countSentences",{n:we,count:we});let ue="";try{if(F)if(a?.key==="LISTEN_IN_NOISE"){let we=0;Array.isArray(F.items)&&F.items.length>0?we=F.items.length:Array.isArray(F.sentences)&&F.sentences.length>0?we=F.sentences.length:F.sentences&&(we=1),ue=fe(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(F?.questions)?we=F.questions.length:Array.isArray(F?.sentences)&&(we=F.sentences.length),ue=ge(we)}else if(a?.key==="LONG_STORY"){let we=1;if(Array.isArray(F.items)&&F.items.length>0){const Ue=F.items.reduce((Be,Le)=>{const Se=Le.questionItems;return Array.isArray(Se)?Be+Se.length:Array.isArray(Le.questions)?Be+Le.questions.length:Be},0);we=Ue>0?Ue:F.items.length}else Array.isArray(F.questions)&&F.questions.length>0?we=F.questions.length:Array.isArray(F.sentences)&&F.sentences.length>0&&(we=F.sentences.length);ue=ge(we)}else if(a?.key==="ORDERING_SENTENCE"){let we=1;Array.isArray(F.items)&&F.items.length>0?we=F.items.length:Array.isArray(F.sentences)&&F.sentences.length>0&&(we=F.sentences.length),ue=fe(we)}else Array.isArray(F.items)&&(ue=F.items.length>0?ge(F.items.length):"")}catch{}const Me=A==="row",ze=A==="list"||Me,je=A==="compact",Oe=A==="small",We=Oe&&a?.key?FC().find(we=>we.key===a.key):void 0,mt=We?Wi[We.key]:void 0,ct=We?mt?y(`trainingType.${mt}.title`,{defaultValue:We.label}):We.label??"":"",rt=v&&a?.label&&a.label!==String(Q)?String(a.label):Oe&&ct&&ct!==String(Q)?ct:"",ft=!!rt,Ae=g!==void 0?g:ue,qe=[rt,typeof Q=="string"?Q:"",Ae].map(we=>String(we??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${ze?" training-block-button--list":""}${Me?" training-block-button--row":""}${je?" training-block-button--compact":""}${Oe?" training-block-button--small":""}${K?" training-block-button--completed":""}${re?" training-block-button--selected":""}${ft&&!Oe?" training-block-button--withType":""}${Oe&&!ft?" training-block-button--no-type-label":""}`,onClick:$,onPointerEnter:q,onPointerLeave:z,role:"button",tabIndex:0,onKeyDown:j,"aria-label":typeof i=="string"?i:qe||void 0,title:!p&&m&&(Array.isArray(m)?m.filter(Boolean).join(`
853
+ `):m)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&a?.label&&a.label!==String(Q)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Oe&&ct&&ct!==String(Q)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ct}),n.jsx(iu,{icon:he,label:Q,tooltip:ie,wrapperStyle:De,iconSize:Oe||je?"small":"medium"}),!b&&(K||re)&&!(f&&B)&&n.jsx(At,{className:f?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":K?y("training.completed","\uD6C8\uB828 \uC644\uB8CC"):y("training.selected","\uC120\uD0DD\uB428")}),f&&n.jsx(At,{className:`training-block-button__remove${B?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":y("common.remove","\uC81C\uAC70"),onClick:ae}),n.jsx("div",{className:`training-block-button__title ${je?"body-3":Oe?"body-3b":"h3"}`,children:String(Q)}),n.jsxs("div",{className:"training-block-button__description",children:[Ae?n.jsx("div",{className:`training-block-button__count ${Oe?"caption-2":"caption-1"}`,children:Ae}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(at,{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:Oe?12:20})})]}),(ze&&!Me||Oe)&&O.length>0&&n.jsx("div",{ref:L,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:V,onPointerLeave:R,children:n.jsx(me,{htmlType:"button",size:Oe?28:32,type:"dot",icon:D?"pause":"play",variant:Oe?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(Q).trim()?D?y("training.stopFor",{name:Q,defaultValue:`${Q} \uC815\uC9C0`}):y("training.previewFor",{name:Q,defaultValue:`${Q} \uBBF8\uB9AC \uB4E3\uAE30`}):D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:M})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:we=>{we.stopPropagation(),_(we)},children:n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(Q).trim()?y("common.moreFor",{name:Q}):y("common.more","\uB354\uBCF4\uAE30")})})]}),P&&n.jsx(Bn,{anchorRect:H,text:D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),B&&!k&&p&&(U?n.jsx(Kn,{anchorRect:I,items:U,activeIndex:N,onClose:z}):F?.subTitle?n.jsx(Bn,{anchorRect:I,text:F.subTitle,offset:8,onClose:z}):null),k&&l&&l({trainingData:F,typeKey:a?.key??"",onClose:Y,onComplete:le,popupTitle:String(Q),popupSubTitle:a?.subTitle,depth:s!=null?String(s):void 0,popupIcon:he,popupIconTooltip:String(ie),popupWrapperStyle:De})]})}const lu=200;function Dv(e){return e.itemId?(VC()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function uu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:i}){const{t:s}=xe.useTranslation(),l=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):UC(s).map(c=>{const d=(e?.items??[]).filter(m=>m.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(Dv).filter(m=>m!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,s]);if(l.length===0)return null;const u=n.jsx("div",{className:"tooltip-training__box",children:n.jsx("div",{className:"tooltip-training__groups",children:l.flatMap(({key:c,label:d,type:m,data:p},f)=>[f>0?n.jsx("div",{className:"tooltip-training__divider"},`div-${c}`):null,n.jsxs("div",{className:"tooltip-training__section",children:[n.jsx("div",{className:"tooltip-training__section-header",children:n.jsx("span",{className:"tooltip-training__type-label body-3b",children:d})}),n.jsx("div",{className:"tooltip-training__items",children:p.map((b,v)=>n.jsx(Mo,{index:v,type:m,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??v)))})]},c)])})});return a?n.jsx(cn,{anchorRect:a,offset:r,onClose:i,closeOnOutsideClick:!1,className:"tooltip-training",ariaLabel:s("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const Sv=200;function Tv({icon:e,count:t,title:a,plan:r,tooltip:i=!0,hoverAccent:s=!1,className:l="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const m=!!u||!!c||i&&!!r,p=_e("count-tile",m&&"count-tile--interactive",m&&s&&"count-tile--accent",u&&"count-tile--clickable",l),f=o.useRef(null),[b,v]=o.useState(null),C=o.useRef(null),h=o.useRef(null),_=!!(b&&r&&i),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),h.current&&(clearTimeout(h.current),h.current=null)},[]),A=o.useCallback(()=>{g(),v(null)},[g]),y=o.useCallback(()=>{!i||!r||(g(),C.current=setTimeout(()=>{C.current=null,v(f.current?.getBoundingClientRect()??null)},lu))},[i,r,g]),k=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!h.current&&(h.current=setTimeout(()=>{h.current=null,v(null)},Sv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!i||!r)&&A()},[i,r,A]),o.useEffect(()=>{if(!_)return;const x=B=>B instanceof Element&&(f.current?.contains(B)||!!B.closest(".tooltip-training")),w=B=>{x(B.target)?g():k()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[_,g,k]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:f,className:p,onClick:u?x=>{A(),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"?A():y()},onMouseEnter:c,onMouseLeave:x=>{k(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(at,{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(uu,{plan:r,anchorRect:b,onClose:A})]})}let Va=0,cu="",Lo="",qa=0;function du(){return pu(!1)}function jv(){return pu(!0)}function pu(e){const t=typeof document<"u";Va===0&&t&&(cu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(qa===0&&(Lo=document.body.style.paddingRight),qa++,document.body.style.paddingRight="0px"),Va++;let a=!1;return()=>{a||(a=!0,Va=Math.max(0,Va-1),e&&t&&(qa=Math.max(0,qa-1),qa===0&&(Lo?document.body.style.paddingRight=Lo:document.body.style.removeProperty("padding-right"))),Va===0&&t&&(document.body.style.overflow=cu))}}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 Lv({open:e,onClose:t,ariaLabel:a,title:r,children:i,size:s="md",closeOnBackdrop:l=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:m}){const{t:p}=xe.useTranslation(),f=o.useId(),b=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,A=du(),y=b.current;return ho(y,g),y?.focus(),()=>{A();const k=document.activeElement;(!k||k===document.body||y&&y.contains(k))&&fo(g)?.focus?.()}},[e]);const C=o.useRef(v),h=o.useRef(u);o.useEffect(()=>{C.current=v,h.current=u}),o.useEffect(()=>{if(e)return Gn(()=>{h.current&&C.current()})},[e]);const _=o.useRef(!1);return po(b,e),!e||typeof document>"u"?null:en.createPortal(n.jsx("div",{className:_e("dialog",d),onPointerDown:l?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:l?g=>{const A=_.current;_.current=!1,A&&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?f:void 0,tabIndex:-1,className:_e("dialog__surface",`dialog__surface--${s}`,m),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:f,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:i})]})}),document.body)}function $v({columns:e,rows:t,rowKey:a,title:r,toolbar:i,empty:s,loading:l,caption:u,className:c=""}){const{t:d}=xe.useTranslation(),m=!l&&t.length===0;return n.jsxs("div",{className:_e("board",c),children:[r||i?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),i?n.jsx("div",{className:"board__toolbar",children:i}):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:_e("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:l?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l})}):m?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:s??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,f)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:_e("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,f)},b.key))},a(p,f)))})]})]})}function Rv({name:e,role:t,photo:a,media:r,credentials:i,size:s=190,className:l=""}){return n.jsxs("div",{className:_e("person-card",l),children:[n.jsx("div",{className:"person-card__photo",style:{width:s,height:s},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,i?.length?n.jsx("ul",{className:"person-card__credentials",children:i.map(u=>n.jsx("li",{children:u},u))}):null]})}function Pv({groups:e,className:t=""}){return n.jsx("div",{className:_e("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,i)=>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((s,l)=>n.jsx("p",{children:s},l))})]},`${r.label??""}-${i}`))})]},a.title))})}function Iv({title:e,kind:t,body:a,badge:r,badgeSrc:i,footer:s,width:l,className:u=""}){const c=r??(i?n.jsx("img",{src:i,alt:""}):null);return n.jsxs("div",{className:_e("publication-card",u),style:l?{width:l,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}),s?n.jsx("div",{className:"publication-card__footer",children:s}):null]})}function Fv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const i=$a(a);return o.useEffect(()=>{const s=setTimeout(()=>i.current?.(),r);return()=>clearTimeout(s)},[r,i]),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 Ov({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:i=2,tone:s="dark",className:l=""}){const u=i===1?"h1":"h2";return n.jsxs("div",{className:_e("section-header",`section-header--${s}`,l),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 zv({items:e,className:t=""}){return n.jsx("ul",{className:_e("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))})}function mu(e){return typeof e=="string"?e:e.label}function hu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:i,onSelectSuggestion:s,autoActiveFirst:l=!1}){const u=o.useId(),[c,d]=o.useState(!1),[m,p]=o.useState(-1),f=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return i===!1?a:N?typeof i=="function"?i(a,N):a.filter(O=>mu(O).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,i]),[v,C]=o.useState(!1),h=o.useRef([]),_=v&&b.length===0?h.current:b;o.useEffect(()=>{_.length&&(h.current=_)},[_]);const g=o.useCallback(()=>C(!0),[]),A=o.useCallback(()=>C(!1),[]),y=l?0:-1;o.useEffect(()=>{c||p(y)},[c,y]),o.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const k=m<_.length?m:y<_.length?y:-1,x=o.useCallback(N=>{s?s(N):t?.(mu(N)),d(!1)},[t,s]),w=o.useCallback(()=>d(!0),[]),B=o.useCallback(()=>{d(!0),p(y)},[y]),E=o.useCallback(()=>{f.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p(O=>Math.min(_.length-1,(O<_.length?O:y)+1))):N.key==="ArrowUp"?(N.preventDefault(),p(O=>Math.max(y,(O<_.length?O:_.length)-1))):N.key==="Enter"?k>=0&&x(_[k]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,k,c,x,y]);return{listId:u,open:c,activeIdx:k,filtered:_,handleFocus:w,handleBlur:E,handleInput:B,handleKeyDown:D,handleSelect:x,handleCompositionStart:g,handleCompositionEnd:A}}const $o=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Xn(e){const{value:t,defaultValue:a,name:r,inputRef:i,onChange:s,label:l,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:m,ghostText:p,ghostHint:f,type:b="text",disabled:v=!1,readOnly:C=!1,error:h,helperText:_,maxLength:g,size:A=48,variant:y="input",fullWidth:k=!1,newline:x=!1,multiline:w=!1,rows:B=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:O,showCount:P=!0,className:G="",onFocus:L,onBlur:M,onKeyDown:$,onEnter:Y,inputMode:q,autoComplete:z,autoFocus:V,suggestions:R,filterSuggestions:H,onSelectSuggestion:W,autoActiveFirst:I,openOnFocus:S=!1}=e,j=C||v?void 0:R,{t:F}=xe.useTranslation(),U=o.useId();!l&&!u&&St(`TextField:unnamed:${U}`,"[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 ae=`tf-${U}`,te=`tf-helper-${U}`,le=o.useRef(null),K=hu({value:t??"",onChange:s,suggestions:j??[],openOnFocus:S,filterSuggestions:H,onSelectSuggestion:W,autoActiveFirst:I}),re=!!j&&K.open&&K.filtered.length>0,ke=o.useRef(null),[Z,Q]=o.useState(null),he=o.useCallback(()=>{const Ae=ke.current;if(!Ae||typeof window>"u")return;const qe=Ae.getBoundingClientRect(),we=230,Ue=window.innerHeight-qe.bottom<we+8&&qe.top>we+8;Q({position:"fixed",left:qe.left,width:qe.width,...Ue?{bottom:window.innerHeight-qe.top+8}:{top:qe.bottom+8},zIndex:Ia(Ae)})},[]);$o(()=>{if(!re)return;he();let Ae=null;const qe=()=>{if(typeof requestAnimationFrame>"u"){he();return}Ae===null&&(Ae=requestAnimationFrame(()=>{Ae=null,he()}))},we=Ue=>{const Be=Ue.target;Be&&Be.nodeType===1&&Be.closest?.(".text-field__suggestions")||qe()};return window.addEventListener("scroll",we,!0),window.addEventListener("resize",qe),()=>{Ae!==null&&cancelAnimationFrame(Ae),window.removeEventListener("scroll",we,!0),window.removeEventListener("resize",qe)}},[re,he]);const De=o.useCallback(Ae=>{le.current=Ae,typeof i=="function"?i(Ae):i&&(i.current=Ae)},[i]),ye=p?`${p}${f??F("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:m,de=t!==void 0,ie=de&&b==="password",[ge,fe]=o.useState((a??"").length),ue=de?(t??"").length:ge,Me=o.useRef(t);$o(()=>{Me.current=t}),o.useEffect(()=>{const Ae=le.current;if(!ie||!Ae)return;const qe=t??"";Ae.value!==qe&&(Ae.value=qe)},[ie,t]),o.useEffect(()=>{if(!x||!le.current)return;const Ae=le.current;Ae.style.height="",Ae.scrollHeight>Ae.clientHeight&&(Ae.style.height=`${Ae.scrollHeight}px`)},[t,ge,x]);const ze=g!=null&&ue>g,je=A===32?16:20,Oe=_e("text-field",`text-field--s${A}`,y==="display"?"text-field--display":"",k?"text-field--full-width":"",v?"text-field--disabled":"",C?"text-field--readonly":"",h?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",G),We={id:ae,...ie?{}:de?{value:t}:{defaultValue:a},ref:De,placeholder:ye,name:r,disabled:v,readOnly:C,autoFocus:V,maxLength:g,list:O,inputMode:q,autoComplete:z,"aria-label":!l&&u?u:void 0,"aria-required":d,"aria-invalid":!!h,"aria-describedby":[_||h?te:null,c].filter(Boolean).join(" ")||void 0,role:j?"combobox":void 0,"aria-autocomplete":j?"list":void 0,"aria-haspopup":j?"listbox":void 0,"aria-expanded":j?re:void 0,"aria-controls":re?K.listId:void 0,"aria-activedescendant":re&&K.activeIdx>=0?`${K.listId}-option-${K.activeIdx}`:void 0,onChange:Ae=>{const qe=Ae.target;de||fe(qe.value.length),s?.(qe.value),j&&K.handleInput(),ie&&queueMicrotask(()=>{const we=Me.current??"";qe.value!==we&&(qe.value=we)})},onCompositionStart:j?K.handleCompositionStart:void 0,onCompositionEnd:j?K.handleCompositionEnd:void 0,onFocus:(Ae=>{L?.(Ae),j&&K.handleFocus()}),onBlur:(Ae=>{M?.(Ae),j&&K.handleBlur()}),onKeyDown:(Ae=>{const qe=(Ae.key==="Tab"&&!Ae.shiftKey||Ae.key===" ")&&!Ae.nativeEvent.isComposing;if(p&&qe&&!C&&!v&&!(Ae.currentTarget.value??"").trim()){Ae.preventDefault();const we=Ae.currentTarget;de||(we.value=p,fe(p.length)),s?.(p);return}j&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&K.activeIdx>=0?Ae.preventDefault():Y&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&(Ae.preventDefault(),Y()),$?.(Ae),j&&K.handleKeyDown(Ae)})},mt=N&&!v&&!C&&ue>0,ct=()=>x?n.jsx("textarea",{...We,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{...We,className:"text-field__input text-field__input--textarea body-2",rows:B}):n.jsx("input",{...We,type:b,className:"text-field__input body-2"}),rt=y==="display"&&!x&&!w&&!!ye,ft=()=>n.jsxs(n.Fragment,{children:[ct(),rt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ye})]});return n.jsxs("div",{ref:ke,className:Oe,children:[l&&n.jsxs("label",{htmlFor:ae,className:"text-field__label caption-1",children:[l,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(at,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})}),ft(),g!=null&&P&&n.jsxs("span",{className:`text-field__count caption-2${ze?" text-field__count--over":""}`,children:[ue,"/",g]}),mt&&n.jsx(me,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:F("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>{!de&&le.current&&(le.current.value="",fe(0)),s?.("")},tabIndex:-1}),D&&!mt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(at,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})})]}),!!j&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:K.open&&(t??"").length>0&&K.filtered.length===0?F("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),re&&(typeof document>"u"?null:en.createPortal(n.jsx("ul",{id:K.listId,className:"text-field__suggestions",role:"listbox",style:Z??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:K.filtered.map((Ae,qe)=>n.jsx("li",{id:`${K.listId}-option-${qe}`,role:"option","aria-selected":qe===K.activeIdx,className:`text-field__suggestion body-2${qe===K.activeIdx?" is-active":""}`,onMouseDown:we=>we.preventDefault(),onClick:()=>{K.handleSelect(Ae),le.current?.focus()},children:typeof Ae=="string"?Ae:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ae.label}),Ae.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ae.hint})]})},typeof Ae=="string"?`${Ae}-${qe}`:Ae.id))}),document.body)),(_||h)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:te,className:"text-field__helper caption-1",role:h?"alert":void 0,children:h||_})})]})}function pn({options:e,value:t,onChange:a,placeholder:r,disabled:i=!1,block:s=!1,size:l=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:m}){const{t:p}=xe.useTranslation(),f=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),v=o.useId(),C=o.useRef(null),h=o.useCallback((L,M)=>{const $=window.innerHeight-L.bottom<260&&L.top>260;return{position:"fixed",left:L.left,minWidth:L.width,...$?{bottom:window.innerHeight-L.top+6}:{top:L.bottom+6},zIndex:Ia(M)}},[]),{open:_,setOpen:g,toggle:A,style:y,triggerRef:k,menuRef:x}=Fa({computeStyle:h}),[w,B]=o.useState(-1),E=o.useCallback(()=>B(-1),[]),D=e.find(L=>L.value===t);o.useEffect(()=>{if(_){const L=e.findIndex(M=>M.value===t);B(L>=0?L:e.length?0:-1),requestAnimationFrame(()=>{const M=x.current;if(!M)return;const $=M.querySelectorAll(".dropdown__option")[L];$&&(M.scrollTop=Math.max(0,$.offsetTop-M.clientHeight/2+$.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&B(L=>{if(L>=0&&L<e.length)return L;const M=e.findIndex($=>$.value===t);return M>=0?M:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{i||A()},[i,A]),O=o.useCallback(L=>{L.disabled||i||(L.value!==t&&a?.(L.value),g(!1))},[a,g,i,t]);o.useEffect(()=>{i&&g(!1)},[i,g]);const P=o.useCallback(L=>{if(!i){if(!_){(L.key==="Enter"||L.key===" "||L.key==="ArrowDown")&&(L.preventDefault(),g(!0));return}if(L.key==="Escape"){L.preventDefault(),g(!1);return}L.key==="ArrowDown"?(L.preventDefault(),B(M=>{let $=M+1;for(;$<e.length&&e[$].disabled;)$++;return $<e.length?$:M})):L.key==="ArrowUp"?(L.preventDefault(),B(M=>{let $=M-1;for(;$>=0&&e[$].disabled;)$--;return $>=0?$:M})):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),e[w]?O(e[w]):g(!1))}},[i,_,e,w,O,g]),G=_?n.jsx("div",{ref:x,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:y,onMouseLeave:E,onMouseDown:L=>L.preventDefault(),children:e.map((L,M)=>n.jsxs("button",{id:`${b}-option-${M}`,type:"button",role:"option","aria-selected":L.value===t,className:_e("dropdown__option body-2",L.value===t?"dropdown__option--active":"",M===w?"dropdown__option--active":"",L.disabled?"dropdown__option--disabled":""),onMouseDown:$=>$.preventDefault(),onClick:()=>O(L),onMouseEnter:()=>B(M),disabled:L.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:L.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"})})}),L.label]},L.value))}):null;return n.jsxs("div",{ref:C,className:_e("dropdown",`dropdown--s${l}`,_?"dropdown--open":"",s?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:P,children:[n.jsxs("button",{ref:k,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&w>=0?`${b}-option-${w}`:void 0,"aria-label":d,"aria-describedby":[d&&D?v:"",m??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:i,onClick:N,onBlur:L=>{_&&!x.current?.contains(L.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:v,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:f}),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"&&en.createPortal(G,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function hr({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:i,className:s=""}){const{t:l}=xe.useTranslation(),u=r??l("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=i??l("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),m=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:_e("pagination",s),children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:m}),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(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Ua=new Map;function gn(e){const{t}=xe.useTranslation(),{options:a=[],value:r=a.find(y=>!y.disabled)?.key??a[0]?.key,onChange:i=y=>{},className:s="",size:l=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:m,ariaLabel:p}=e||{},f=o.useRef(null),b=a.filter(y=>!y.disabled),v=o.useId(),C=a.map(y=>y.key).join("\xB7");o.useEffect(()=>{if(!(!Ln||p!=null&&p!=="")){if(Ua.set(v,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ua.size>1){const y=[...Ua.values()].sort();St(`segmented-control-unnamed:${y.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ua.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()=>{Ua.delete(v)}}},[p,C,v]);const h=y=>{if(!b.length)return;const k=Math.max(0,b.findIndex(w=>w.key===r)),x=y==="first"?b[0]:y==="last"?b[b.length-1]:b[(k+y+b.length)%b.length];x&&(i(x.key),Array.from(f.current?.querySelectorAll("[data-segkey]")??[]).find(w=>w.dataset.segkey===x.key)?.focus())},_=y=>{switch(y.key){case"ArrowRight":case"ArrowDown":h(1);break;case"ArrowLeft":case"ArrowUp":h(-1);break;case"Home":h("first");break;case"End":h("last");break;default:return}y.preventDefault()},g=y=>{const k=x=>typeof x=="string"||typeof x=="number";if(!(!k(y.label)||y.count==null||y.count===!1||!k(y.count)))return`${y.label}, ${y.count}`},A=b.some(y=>y.key===r)?r:b[0]?.key;return n.jsx("div",{ref:f,onKeyDown:_,className:_e("segmented-control",`segmented-control--${u}`,`segmented-control--${l}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",m!=null&&"segmented-control--min",s),style:m!=null?{"--segmented-min-button-w":`${m}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(y=>n.jsx(me,{htmlType:"button",role:"radio","aria-checked":y.key===r,"data-segkey":y.key,tabIndex:y.key===A?0:-1,label:y.label,count:y.count,ariaLabel:g(y),disabled:y.disabled,className:y.key===r?"is-selected":"",onClick:()=>{y.disabled||i(y.key)},size:l,shape:u,useBorder:!1,useBG:!1},y.key))})}function Ro({count:e,search:t,segment:a,filters:r,pageSize:i,pagination:s,actions:l,className:u}){const{t:c}=xe.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]}),m=!!(t||r?.length||i||s||l);return n.jsxs("div",{className:_e("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,f)=>n.jsx(gn,{size:40,...p},p.ariaLabel??f))]}),m&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Xn,{className:"toolbar__search",size:40,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,f)=>n.jsx(pn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},f)),(i||s)&&n.jsxs("div",{className:"toolbar__pager",children:[i&&n.jsx(pn,{size:40,options:i.options,value:i.value,onChange:i.onChange,ariaLabel:i.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),s&&n.jsx(hr,{page:s.page,totalPages:s.total,onChange:s.onChange,prevLabel:s.prevLabel,nextLabel:s.nextLabel})]}),l]})})]})}function fu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(fu).join(""):""}function Wv(e){let t=e.replace(/\r\n/g,`
854
854
  `).replace(/\r/g,`
855
855
  `);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
856
856
  `).map(s=>s.replace(/\t/g," ")),r=a.filter(s=>s.trim().length>0),i=r.length>0?Math.min(...r.map(s=>s.match(/^ */)?.[0].length??0)):0;return a.map(s=>s.slice(i)).join(`
857
857
  `)}const Hv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Vv=/^(?: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 qv(e,t){let a=e;const r=[],i=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),s=(l,u)=>r.push({type:l,content:u});for(;a.length>0;){const l=a.match(/^\s+/);if(l){s("whitespace",l[0]),a=a.slice(l[0].length);continue}if(!i&&a.startsWith("//")){const v=a.indexOf(`
858
858
  `),C=v===-1?a:a.slice(0,v);s("comment",C),a=a.slice(C.length);continue}if(i&&a.startsWith("#")){const v=a.indexOf(`
859
- `),C=v===-1?a:a.slice(0,v);s("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(Vv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const v=p[0];s(i&&Hv.has(v)?"command":"identifier",v),a=a.slice(v.length);continue}const f=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(f){s("operator",f[0]),a=a.slice(f[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function Uv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:i="default",className:s=""}){const{t:l}=xe.useTranslation(),[u,c]=o.useState(!1),d=Wv(fu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await RC(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},f=qv(d,t),b=i==="small"?"caption-1":"body-3";return n.jsxs("div",{className:_e("code-box",i==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":l("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(pe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?l("common.copied","\uBCF5\uC0AC\uB428"):l("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:f.map((v,C)=>n.jsx("span",{className:`code-token ${v.type} ${b}`,children:v.content},C))})})]})}const Gv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=xe.useTranslation(),{variant:a="spinner",size:r=24,progress:i=null,label:s}=e||{},l=s||t("loader.loading","Loading");if(a==="bar"){const c=i==null||!Number.isFinite(Number(i)),d=c?0:Math.max(0,Math.min(100,Number(i)));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":l,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":l,children:[n.jsx("span",{style:Gv,children:l}),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"})]})]})}function Cu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:i,labelPosition:s="right",className:l="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${l}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&i?i:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function gu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:i,size:s="medium",className:l,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:_e("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",l),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:f=>{t?.(f.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!i&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),i&&n.jsx("span",{className:"checkbox__label body-3",children:i})]})}function Kv({count:e,actions:t,onClear:a,clearLabel:r,visible:i,content:s,max:l}){const{t:u}=xe.useTranslation(),c=i!==void 0?i:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),f=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,A=b.current;if(b.current=c,c&&!A){const y=typeof document<"u"?document.activeElement:null;f.current=y&&y!==document.body&&!g?.contains(y)?y:null}else!c&&A&&g&&g.contains(document.activeElement)&&sr(g,f.current)},[c]);const[v,C]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const A=E=>{h.current=E,C(E)},y=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){A(!1);return}const N=D[0].offsetTop,O=D.some($=>$.offsetTop!==N);if(!h.current){_.current=g.clientWidth,O&&A(!0);return}if(O)return;const P=D[0],G=D[D.length-1],L=G.offsetLeft+G.offsetWidth-P.offsetLeft,M=_.current;(M==null||L<=M)&&A(!1)};if(y(),typeof ResizeObserver>"u")return;const k=new ResizeObserver(y);k.observe(g);const x=g.parentElement;let w=x?.clientWidth??0;const B=new ResizeObserver(()=>{const E=x?.clientWidth??0;E!==w&&(w=E,_.current=null,y())});return x&&B.observe(x),()=>{k.disconnect(),B.disconnect()}},[s,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:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),l!==void 0&&n.jsx(At,{size:"small",fill:"soft",variant:"main",label:`${e} / ${l}`,"aria-label":u("common.selectedOfMax",{count:e,max:l,defaultValue:`\uCD5C\uB300 ${l}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${v?" bulk-bar__actions--stacked":""}`,children:[n.jsx(pe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,A)=>n.jsx(pe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},A))]})]})}const Yv=[{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:_e("item-actions",a),children:Yv.map(({key:r,icon:i,closeFirst:s})=>{const l=e[r];if(!l)return null;const u=r==="publish"?l.published?l.unpublish:l.publish:l;return n.jsx(pe,{htmlType:"button",size:40,type:"dot",icon:i,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function bu(e,t){const a=()=>{if(e){const[C,h]=e.split("-");return{y:+C,m:+h-1}}const[b,v]=oo(t).split("-");return{y:+b,m:+v-1}},[r,i]=o.useState(()=>a().y),[s,l]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();i(b.y),l(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const v=c.current.y*12+c.current.m+b,C=Math.floor(v/12),h=v-C*12;c.current={y:C,m:h},i(C),l(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),f=o.useCallback((b,v)=>{c.current={y:b,m:v},i(b),l(v)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:f}}function fr(e,t){return new Date(e,t+1,0).getDate()}function Xv(e,t){return new Date(e,t,1).getDay()}function Cr(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Jv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Qv(e,t,a,r){const i=a?+a.split("-")[0]:e-10,s=r?+r.split("-")[0]:e+10,l=[];for(let u=i;u<=s;u++)for(let c=0;c<12;c++){const d=`${u}-${String(c+1).padStart(2,"0")}`;a&&d<a.slice(0,7)||r&&d>r.slice(0,7)||l.push({value:d,label:t(u,c+1)})}return l}function e4({value:e,onChange:t,size:a=48,min:r,max:i,disabled:s,placeholder:l,className:u,today:c}){const{t:d,i18n:m}=xe.useTranslation(),p=l??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),f=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=oo(c),{viewY:v,viewM:C,prevMonth:h,nextMonth:_,setViewYM:g}=bu(e,c),A=o.useId(),y=o.useCallback((I,S)=>{const j=window.innerHeight,F=window.innerWidth,U=typeof document<"u"?document.getElementById(A):null,re=Math.max(U?.offsetHeight||0,U?.scrollHeight||0)||300,te=Math.max(I.width,U?.offsetWidth||0,260),le=j-I.bottom,K=I.top,oe=le<re&&K>le,Ae=8,Y=(Q,me)=>Math.min(Math.max(Ae,Q),Math.max(Ae,me));return{position:"fixed",left:Y(I.left,F-te-Ae),width:I.width,minWidth:260,...oe?{top:"auto",bottom:Y(j-I.top+6,j-re-Ae)}:{bottom:"auto",top:Y(I.bottom+6,j-re-Ae)},zIndex:Ia(S)}},[A]),{open:k,setOpen:x,toggle:w,style:B,triggerRef:E,menuRef:D}=Fa({computeStyle:y,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!k)return;const I=D.current;return(I?.querySelector(".date-picker__day--selected:not(:disabled)")??I?.querySelector(".date-picker__day--today:not(:disabled)")??I?.querySelector(".date-picker__day:not(:disabled)")??I?.querySelector(Cn)??I)?.focus?.(),()=>{const S=document.activeElement;(!S||S===document.body)&&E.current?.focus?.()}},[k,D,E]);const[N,O]=o.useState(1),P=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!k)return;const I=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;O(I)},[k]),o.useEffect(()=>{if(G.current==null)return;const I=G.current;G.current=null,P.current?.querySelector(`[data-day="${I}"]`)?.focus()}),o.useEffect(()=>{O(I=>Math.min(I,fr(v,C)))},[v,C]);const L=o.useCallback(I=>{let S=Cr(I.getFullYear(),I.getMonth(),I.getDate());r&&S<r&&(S=r),i&&S>i&&(S=i);const[j,F,U]=S.split("-").map(Number);(j!==v||F-1!==C)&&g(j,F-1),O(U),G.current=U},[r,i,v,C,g]),M=o.useCallback(I=>{const S=new Date(v,C,N),j=U=>{S.setDate(S.getDate()+U),L(S)},F=U=>{const re=S.getFullYear()*12+S.getMonth()+U,te=Math.floor(re/12),le=re-te*12;L(new Date(te,le,Math.min(S.getDate(),fr(te,le))))};switch(I.key){case"ArrowLeft":j(-1);break;case"ArrowRight":j(1);break;case"ArrowUp":j(-7);break;case"ArrowDown":j(7);break;case"Home":j(-S.getDay());break;case"End":j(6-S.getDay());break;case"PageUp":I.shiftKey?F(-12):F(-1);break;case"PageDown":I.shiftKey?F(12):F(1);break;default:return}I.preventDefault()},[v,C,N,L]),$=o.useCallback(I=>{s||(t(Cr(v,C,I)),x(!1))},[v,C,t,x,s]);o.useEffect(()=>{s&&x(!1)},[s,x]);const Z=I=>{const S=Cr(v,C,I);return!!(r&&S<r||i&&S>i)},q=(()=>{const I=fr(v,C);if(N>=1&&N<=I&&!Z(N))return N;for(let S=1;S<=I;S++)if(!Z(S))return S;return-1})(),z=[];for(let I=0;I<Xv(v,C);I++)z.push(null);for(let I=1;I<=fr(v,C);I++)z.push(I);const V=a===64?20:a===40?16:18,R=Qv(v,(I,S)=>nr(d,m.language,I,S),r,i),H=`${v}-${String(C+1).padStart(2,"0")}`,W=k?en.createPortal(n.jsxs("div",{ref:D,id:A,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:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Rs,{size:16,strokeWidth:2})}),n.jsx(pn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYearMonth","\uC5F0\uC6D4 \uC120\uD0DD"),options:R,value:H,onChange:I=>{const[S,j]=I.split("-");g(+S,+j-1)},block:!0,size:40}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:P,onKeyDown:M,children:[f.map(I=>n.jsx("div",{className:"date-picker__dow caption-1",children:I},I)),z.map((I,S)=>{if(I===null)return n.jsx("div",{},`e${S}`);const j=Cr(v,C,I),F=j===e,U=j===b,re=Z(I),te=S%7;return n.jsx("button",{type:"button",disabled:re,"data-day":I,tabIndex:I===q?0:-1,"aria-current":U?"date":void 0,onClick:()=>!re&&$(I),className:_e("date-picker__day caption-1",F&&"date-picker__day--selected",U&&!F&&"date-picker__day--today",re&&"date-picker__day--disabled",te===0&&"date-picker__day--sun",te===6&&"date-picker__day--sat"),children:I},I)})]})]}),document.body):null;return n.jsxs("div",{className:_e("date-picker",`date-picker--s${a}`,k&&"date-picker--open",u),children:[n.jsxs("button",{ref:E,type:"button",className:"date-picker__trigger body-2",onClick:()=>!s&&w(),disabled:s,"aria-haspopup":"true","aria-expanded":k,children:[n.jsx("span",{className:e?"date-picker__value":"date-picker__placeholder",children:e?Jv(e):p}),n.jsx(Us,{size:V,className:"date-picker__icon",strokeWidth:1.5})]}),W]})}function t4({src:e,alt:t,className:a,style:r,tone:i,textColor:s}){const l=!i&&!!s,u=C2(e,l),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return i?n.jsx("span",{className:_e("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":i},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):l&&u?n.jsx("span",{className:_e("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":s},dangerouslySetInnerHTML:{__html:h2(m2(u),c)}}):n.jsx("img",{src:e,alt:t,className:_e("brand-logo",a),style:r,draggable:!1})}function yu({children:e,className:t}){const a=o.useRef(null),[r,i]=o.useState(null);return o.useEffect(()=>{i(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const l=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(l(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>l());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:_e("section-head-float",t),children:e})}function Po({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ka({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Io({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:i,headRight:s,headFloat:l,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:f,totalNum:b,totalUnit:v,totalLabel:C,subRow:h,subRowAlign:_="start",className:g,inGrid:A=!1,children:y}){const{t:k}=xe.useTranslation(),x=o.useRef(null),{anchorRect:w,openAt:B,close:E}=Pa(),D=o.useCallback(()=>{f&&x.current&&B(x.current)},[f,B]),[N,O]=o.useState(!1);$o(()=>{const S=x.current;if(!S||!u)return;const j=U=>O(U>0&&U<d);if(j(S.clientWidth),typeof ResizeObserver>"u")return;const F=new ResizeObserver(U=>j(U[0].contentRect.width));return F.observe(S),()=>F.disconnect()},[u,d]);const[P,G]=o.useState(null),L=o.useCallback(()=>G(null),[]),M=o.useCallback(S=>{const j=S.currentTarget.getBoundingClientRect();G(F=>F?null:{left:j.left,right:j.right,top:j.top,bottom:j.bottom,width:j.width,height:j.height,x:j.x,y:j.y})},[]),$=!!u&&N;o.useEffect(()=>{$||G(null)},[$]);const Z=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,j)=>j===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const j=S.target;j&&typeof j.closest=="function"&&j.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),z=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),V=typeof s=="function"?s({collapsed:$}):s,R=b!=null||C?n.jsxs(Ka,{label:C,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),v&&n.jsx("span",{className:"barchart-total__unit h5",children:v})]}):null,H=V||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&($?n.jsx(pe,{htmlType:"button",size:32,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":!!P,onClick:M}):n.jsx(gn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),V]}):null,W=o.useId(),I=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:["manager-section",A&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?z:void 0,onPointerEnter:f?D:void 0,onPointerLeave:f?E:void 0,onFocus:f?D:void 0,onBlur:f?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[f&&w&&n.jsx(Bn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:f}),l&&n.jsx(yu,{children:l}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(at,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(I,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),H,i&&n.jsx("div",{className:"manager-section__disc body-3",children:i})]}),(R||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[R,h]}),y,P&&n.jsx(cn,{anchorRect:P,onClose:L,ariaLabel:u?.ariaLabel??k("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:Z}],onClose:L,size:"small"})})]})}const Ya=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Fo=e=>Ya(e.getFullYear(),e.getMonth()+1);function ma(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 Oo=(e,t)=>`${e}#${t}`;function bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function n4(){const e=ia();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<bn(t,a)){const l=new Date(t,a,0);t=l.getFullYear(),a=l.getMonth(),r=l.getDate()}const i=Math.floor((r-bn(t,a))/7),s=Ya(t,a+1);return{monthKey:s,value:Oo(s,i)}}function a4(e){const t=ia(),a=Fo(t),r=(c,d)=>Ya(c,d+1),i=new Map;i.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());i.has(d)||i.set(d,[]),i.get(d).push(c)}for(const[c,d]of[...i.entries()]){const m=ma(c);if(!m)continue;const p=m.year,f=m.month1-1,b=bn(p,f);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const v=new Date(p,f,0),C=r(v.getFullYear(),v.getMonth());i.has(C)||i.set(C,[])}const s=new Map;for(const[c,d]of i){const m=ma(c);if(!m)continue;const p=m.year,f=m.month1-1,b=new Date(p,f+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),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(v).fill(0)),A=Array.from({length:b+1},()=>new Array(v).fill(0));for(const y of d){const k=y.date.getDate();if(h[k]+=y.a,_[k]+=y.b,y.parts)for(let x=0;x<v;x++)g[k][x]+=y.parts[x]??0;if(y.partsB)for(let x=0;x<v;x++)A[k][x]+=y.partsB[x]??0}s.set(c,{year:p,month:f,daysInMonth:b,partsLen:v,hasPartsB:C,dayA:h,dayB:_,dayParts:g,dayPartsB:A})}const l=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:f,dayA:b,dayB:v,dayParts:C,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),A=s.get(r(p===11?m+1:m,(p+1)%12)),y=d.partsLen,k=[];for(let w=1;w<=f;w++){const B=_&&w>g;k.push({label:String(w),...B&&b[w]===0&&v[w]===0?{future:!0}:{},a:B&&b[w]===0&&v[w]===0?-1:b[w],b:v[w],...y?{parts:C[w]}:{},...y&&d.hasPartsB?{partsB:h[w]}:{}})}const x=[];for(let w=bn(m,p);w<=f;w+=7){const B=Math.max(0,w+6-f),E=B&&A?Math.max(y,A.partsLen):y,D=d.hasPartsB||!!(B&&A?.hasPartsB);let N=0,O=0;const P=new Array(E).fill(0),G=new Array(E).fill(0);for(let M=w;M<=Math.min(w+6,f);M++){N+=b[M],O+=v[M];for(let $=0;$<y;$++)P[$]+=C[M][$],G[$]+=h[M][$]}if(B&&A)for(let M=1;M<=B&&!l(A.year,A.month,M);M++){N+=A.dayA[M],O+=A.dayB[M];for(let $=0;$<A.partsLen;$++)P[$]+=A.dayParts[M][$],G[$]+=A.dayPartsB[M][$]}const L=B?`${(p+1)%12+1}/${B}`:`${w+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:O,...E?{parts:P}:{},...E&&D?{partsB:G}:{}})}u[c]={weekly:x,daily:k}}return u}function vu(){const e=ia(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let i=2024;i<=t;i++){const s=i===t?a:12;for(let l=1;l<=s;l++)r.push({value:Ya(i,l),year:i,month:l})}return r.reverse()}vu();function r4(){return vu()}function xu(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 _u(e){const{t,i18n:a}=xe.useTranslation(),[r,i]=o.useState("week"),s=o.useMemo(()=>r4().filter(E=>E.value in e),[e]),l=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),O=bn(D.year,D.month-1),P=Math.ceil((N-O+1)/7);for(let G=P-1;G>=0;G--)E.push({value:Oo(D.value,G),monthKey:D.value,year:D.year,month:D.month,week:G})}return E},[s]),u=o.useCallback(E=>`${nr(t,a.language,E.year,E.month)} ${xu(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:nr(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>l.map(E=>({value:E.value,label:u(E)})),[l,u]),m=o.useMemo(()=>n4(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),f=o.useMemo(()=>l.find(E=>E.value===m.value)?.value??l[0]?.value??"",[l,m]),[b,v]=o.useState(""),[C,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||v(p)},[s,b,p]),o.useEffect(()=>{l.find(E=>E.value===C)||h(f)},[l,C,f]);const _=r==="month"?c:d,g=r==="month"?b:C,A=r==="month"?v:h,y=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===g),x=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&A(_[E+1].value)},[_,g,A]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&A(_[E-1].value)},[_,g,A]),B=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:i,range:g,setRange:A,activeOptions:_,activeIdx:k,handlePrev:x,handleNext:w,periodOptions:B,monthRange:b,weekRange:C,weekRanges:l,DOW:y}}const _t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function En(e,t=!0){return e.future===!0||t&&e.a===-1}function o4({data:e,colorA:t,colorB:a,labelA:r,labelB:i,barWidth:s=10,barGap:l=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:f,grouped:b=!1,baseline:v,focusableBars:C=!1}){const h=!a,_=!!(m&&m.length>0),g=v,A=o.useMemo(()=>_?Math.max(0,...e.filter(z=>!En(z,g==null)).map(z=>b?Math.max(0,...(z.parts??[]).map(_t)):(z.parts??[]).reduce((V,R)=>V+Math.max(0,_t(R)),0))):Math.max(0,...e.filter(z=>!En(z,g==null)).flatMap(z=>h?[_t(z.a)]:[_t(z.a),_t(z.b)])),[e,h,_,b]),y=o.useMemo(()=>{if(g==null)return 0;const z=e.filter(V=>!En(V,g==null)).flatMap(V=>_?(V.parts??[]).map(_t):h?[_t(V.a)]:[_t(V.a),_t(V.b)]);return Math.max(0,...z.map(V=>Math.abs(V-g)))},[e,g,_,h]),k=o.useMemo(()=>{const z=g!=null?y:A;return c??(d?z>0?z:10:Math.ceil(z/10)*10||10)},[A,y,g,c,d]),x=u,w=_?b?Math.max(1,m.length):1:h?1:2,B={"--bar-width":`${o.useMemo(()=>{const z=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(z*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,l)}px`},D=o.useMemo(()=>{const z=Math.round(k/2);return g!=null?[g+k,...z!==k?[g+z]:[],g,...z!==k?[g-z]:[],g-k]:z!==k?[k,z,0]:[k,0]},[k,g]),N=z=>g!=null?1-(z-(g-k))/(2*k):1-z/k,[O,P]=o.useState(null),G=o.useCallback(()=>P(null),[]),L=o.useCallback((z,V)=>{const R=[z.label,z.sublabel].filter(Boolean).join(" ");let H;if(_&&b&&z.rawPartsB)H=(p??[]).map((W,I)=>{const S=z.rawPartsB[I]??0;return{text:S>0?`${W}: ${V[I]??0}% (${z.rawParts?.[I]??0}/${S})`:`${W}: -`,color:(m??[])[I]}});else if(_&&b)H=(p??[]).map((W,I)=>({text:`${W}: ${Z(V[I]??0)}`,color:(m??[])[I]}));else if(_){const W=(p??[]).map((S,j)=>({text:`${S}: ${V[j]??0}`,color:(m??[])[j]})),I=W.filter((S,j)=>(V[j]??0)>0);H=I.length?I:W}else f&&!h?H=[{text:`${r} ${_t(z.a)}%`,color:t},{text:`${i} ${_t(z.b)}%`,color:a}]:f&&z.rawB!==void 0?H=[{text:`${f.total} ${z.rawB}`},{text:`${f.done} ${z.rawA??0}`,color:t}]:h?H=[{text:`${r}: ${_t(z.a)}`,color:t}]:H=[{text:`${r}: ${_t(z.a)}`,color:t},{text:`${i}: ${_t(z.b)}`,color:a}];return{title:R,items:H}},[_,b,p,m,f,h,r,i,t,a,g]),M=o.useCallback((z,V,R)=>{const H=z.getBoundingClientRect(),{title:W,items:I}=L(V,R);P({rect:{left:H.left,top:H.top,right:H.right,bottom:H.bottom,width:H.width,height:H.height},title:W,items:I})},[L]),$=o.useCallback((z,V)=>{const{title:R,items:H}=L(z,V);return[R,...H.map(W=>W.text)].filter(Boolean).join(", ")},[L]),Z=z=>g!=null&&z>g?`+${z}`:`${z}`,q=O!=null;return o.useEffect(()=>{if(!q)return;const z=()=>P(null),V=R=>{const H=R.target;H&&typeof H.closest=="function"&&H.closest(".manager-bar-chart-col")||P(null)};return window.addEventListener("scroll",z,!0),document.addEventListener("pointerdown",V,!0),()=>{window.removeEventListener("scroll",z,!0),document.removeEventListener("pointerdown",V,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:x},children:[D.slice(0,-1).map((z,V)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&z===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(z)*x},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:z})},V)),e.map((z,V)=>{const R=En(z,g==null),H=x/2,W=F=>g!=null?Math.min(H,Math.abs(_t(F)-g)/k*H):Math.min(x,Math.max(0,_t(F)/k*x)),I=R?0:W(z.a),S=R?0:W(z.b),j=(z.parts??[]).map(_t);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-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?$(z,j):void 0,onMouseEnter:R?void 0:F=>M(F.currentTarget,z,j),onFocus:R||!C?void 0:F=>M(F.currentTarget,z,j),onBlur:C?G:void 0,onMouseLeave:G,children:!R&&(_&&b?(m??[]).map((F,U)=>{const re=j[U]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:W(re),background:F}},U);const te=_t(re)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:B,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!te&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(re),background:F}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:te&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(re),background:F}})})]},U)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:B,children:(()=>{const F=j.reduce((re,te,le)=>te>0?le:re,-1);let U=x;return j.map((re,te)=>{if(re<=0)return null;const le=Math.min(U,re/k*x);return U-=le,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:le,background:(m??[])[te],borderRadius:te===F?"6px 6px 0 0":void 0}},te)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:_t(z.a),c:t},...h?[]:[{v:_t(z.b),c:a}]].map(({v:F,c:U},re)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:B,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:F>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(F),background:U}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:F<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(F),background:U}})})]},re))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:I,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:S,background:a}})]}))},V)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((z,V)=>{const R=En(z,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${R?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[z.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),z.label]}),z.sublabel&&n.jsx("span",{className:"caption-1",children:z.sublabel})]},V)})})]})})}),O&&n.jsx(Kn,{anchorRect:O.rect,title:O.title,items:O.items,showIndex:!1,closeOnOutsideClick:!1})]})}function wu({control:e}){const{t}=xe.useTranslation(),{activeOptions:a,activeIdx:r,range:i,setRange:s,handlePrev:l,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),f=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(pe,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:l}),n.jsx(pn,{value:i,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(pe,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:f,showTooltipInfo:f,disabled:r<=0,onClick:u}),n.jsx(gn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function zo(e,t,a,r=!0){const i=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,l)=>{const u=new Date(t);u.setDate(t.getDate()+l);const c=(e[Fo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&En(c,r)||u>i;return{dt:u,entry:c,isFuture:d}})}function s4(e,t,a,r=!0){const{period:i,monthRange:s,weekRange:l,weekRanges:u,DOW:c}=t,d=ia(),m=d.getFullYear(),p=d.getMonth()+1,f=d.getDate();if(i==="month"){const C=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,A=_&&g?bn(_,g-1):1;return C.weekly.map((y,k)=>{const x=k+1;let w=y.label,B=!1,E=!1;if(_&&g){const D=A+k*7,N=new Date(_,g-1,D+6),O=N.getMonth()+1,P=N.getDate(),G=O===g?`${P}`:`${O}/${P}`;w=a("manager.chart.weekRange",{start:D,end:G});const L=new Date(m,p-1,f).getTime();B=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>f)}return{...y,label:w,sublabel:xu(a,x-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===l);if(!b)return[];const v=new Date(b.year,b.month-1,bn(b.year,b.month-1)+b.week*7);return zo(e,v,d,r).map(({dt:C,entry:h,isFuture:_})=>{const g=C.getMonth()+1,A=C.getDate(),y=C.getFullYear();return{label:g===b.month&&y===b.year?`${A}`:`${g}/${A}`,sublabel:c[C.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:y===m&&g===p&&A===f,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const i4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function l4({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:i,data:s,colorA:l,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:f,control:b,hideControls:v=!1,rate:C=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:A,series:y,seriesMode:k="stack",loading:x=!1,onDetail:w,headExtra:B,headSegment:E,icon:D,disc:N,onClick:O,cardAriaLabel:P,cardTooltip:G,detailSize:L=32,barGap:M,baseline:$,className:Z,inGrid:q=!1}){const{t:z}=xe.useTranslation(),V=i4[t],R=_u(s),H=b??R,W=o.useMemo(()=>s4(s,H,z,$==null),[s,H,z,$]),I=k==="group"&&!!y&&y.length>0;M!=null&&!I&&St("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!C)return W;const K=H.period==="month"?ma(H.monthRange):null,oe=ia(),Ae=y?.length??0,Y=Q=>{const me=[],De=[],be=[];for(let ne=0;ne<Ae;ne++){let ue=0,fe=0,ge=0;for(const Ce of Q){const $e=_t(Ce.a[ne]),He=_t(Ce.b[ne]);He<=0||(ue+=$e,fe+=He,ge+=$e/He*100)}me.push(h==="weighted"?fe>0?Math.round(ue/fe*100):0:Q.length?Math.round(ge/Q.length):0),De.push(ue),be.push(fe)}return{pct:me,ra:De,rb:be}};return W.map((Q,me)=>{let De=Q.a===-1?-1:Q.b>0?Math.round(Q.a/Q.b*100):0;if(K&&!En(Q)){const ne=K.year,ue=K.month1-1,fe=zo(s,new Date(ne,ue,bn(ne,ue)+me*7),oe).filter(ge=>!ge.isFuture);if(h==="weighted"){let ge=0,Ce=0;for(const{entry:$e}of fe)$e&&$e.b>0&&(ge+=$e.a,Ce+=$e.b);De=Ce>0?Math.round(ge/Ce*100):0}else De=fe.length?Math.round(fe.reduce((ge,{entry:Ce})=>ge+(Ce&&Ce.b>0?Ce.a/Ce.b*100:0),0)/fe.length):0}let be=null;if(I&&!En(Q)){let ne;if(K){const fe=K.year,ge=K.month1-1;ne=zo(s,new Date(fe,ge,bn(fe,ge)+me*7),oe).filter(Ce=>!Ce.isFuture).map(({entry:Ce})=>({a:Ce?.parts??[],b:Ce?.partsB??[]}))}else ne=[{a:Q.parts??[],b:Q.partsB??[]}];const ue=Y(ne);be={parts:ue.pct,rawParts:ue.ra,rawPartsB:ue.rb}}return{...Q,a:De,b:Q.a===-1?0:d&&Q.parts&&Q.parts[1]>0?Math.round(Q.parts[0]/Q.parts[1]*100):0,rawA:Q.a===-1?-1:Q.a,rawB:Q.b,...be??{}}})},[W,C,h,d,H.period,H.monthRange,s,I,y?.length]),j=o.useMemo(()=>{if(C||g){const oe=(H.period==="week"?W:s[H.monthRange]?.daily??[]).filter(Y=>Y.a!==-1);if(oe.length===0)return 0;if(C&&h==="weighted"){let Y=0,Q=0;for(const me of oe)me.b>0&&(Y+=me.a,Q+=me.b);return Q>0?Math.round(Y/Q*100):0}const Ae=C?oe.reduce((Y,Q)=>Y+(Q.b>0?Q.a/Q.b*100:0),0):oe.reduce((Y,Q)=>Y+(Q.a>0?Q.a:0),0);return Math.round(Ae/oe.length)}const K=H.period==="month"?s[H.monthRange]?.daily??[]:S;return $!=null?K.reduce((oe,Ae)=>oe+(En(Ae,!1)?0:_t(Ae.a)+(d?_t(Ae.b):0)),0):K.reduce((oe,Ae)=>oe+(Ae.a>0?Ae.a:0)+(d&&Ae.b>0?Ae.b:0),0)},[S,W,C,h,g,$,d,H.period,H.monthRange,s]),F=y&&y.length>0?y.map(K=>({color:K.color,label:K.label})):[{color:l,label:z(c)},...d?[{color:u,label:z(d)}]:[]],U=t==="small",re=[U?"manager-section--compact":t==="large"?"manager-section--full":void 0,Z].filter(Boolean).join(" ")||void 0,te=r?z(r):"",le=te?z("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):z("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Io,{className:re,inGrid:q,icon:D,disc:N,onClick:O,ariaLabel:P,tooltip:G,headSegment:E,headMenuItems:w?[{label:le,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:z(r),titleLevel:i,titleClassName:U?"h5 chart-section-title--small":void 0,headRight:U?B??void 0:({collapsed:K})=>n.jsxs(n.Fragment,{children:[!v&&n.jsx(wu,{control:H}),B,w&&!K&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(pe,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:le,showTooltipInfo:le,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?C||g||f&&A?n.jsx(Ka,{label:U?void 0:`${z(H.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${z(f??c)}`,children:A?(A(j).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((K,oe)=>/\d/.test(K)?n.jsx("span",{className:"barchart-total__num h0",children:K},oe):n.jsx("span",{className:"barchart-total__unit h5",children:K},oe)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:j}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:z(p)})]})}):n.jsxs(Ka,{children:[n.jsx("span",{className:"barchart-total__num h0",children:j}),n.jsx("span",{className:"barchart-total__unit h5",children:z(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:z(p)})]}):n.jsx("span",{}),n.jsx(Po,{items:F,className:"caption-1"})]}),children:x?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:V.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(K=>!!K.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(o4,{focusableBars:e,data:S,colorA:l,colorB:d?u:void 0,labelA:z(c),labelB:d?z(d):void 0,barWidth:a??V.barWidth,barGap:M,baseline:$,height:V.height,maxOverride:C?100:void 0,tightMax:_,seriesColors:y?.map(K=>K.color),seriesLabels:y?.map(K=>K.label),rateLabels:C?{total:z("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:z("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:I})})}const Bu=120,u4={left:38,right:16,top:26,bottom:24};function c4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:i,height:s=156,fallbackWidth:l=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,f]=o.useState(null),[b,v]=o.useState(null);o.useEffect(()=>{if(!b)return;const $=q=>f(Math.round(q)||null);if($(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(([q])=>$(q.contentRect.width));return Z.observe(b),()=>{Z.disconnect()}},[b]);const{payload:C,anchorRect:h,openAfterDelay:_,close:g}=l2(Bu),A=o.useCallback(($,Z)=>{$&&_($,Z.getBoundingClientRect())},[_]),y=p??l,k=s,{left:x,right:w,top:B,bottom:E}={...u4,...u},[D,N]=t,O=$=>N===D?x:x+(y-x-w)*($-D)/(N-D),P=$=>B+(k-B-E)*(100-$)/100,G={x:O,y:P,plot:{left:x,right:y-w,top:B,bottom:k-E,width:Math.max(0,y-x-w),height:Math.max(0,k-B-E)}},L=e.filter($=>!$.hollow),M=i??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:_e("line-chart",m),viewBox:`0 0 ${y} ${k}`,role:"img","aria-label":d??e.map($=>$.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map($=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:y-w,y1:P($),y2:P($)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:P($)+4,textAnchor:"end",children:[$,"%"]})]},$)),c?.(G),a.map($=>n.jsx("text",{className:"line-chart__tick",x:O($.x),y:k-5,textAnchor:"middle",children:$.label},$.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:M,points:L.map($=>`${O($.x)},${P($.pct)}`).join(" ")}),e.map($=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:Z=>A($.description,Z.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:O($.x),cy:P($.pct),r:12}),n.jsx("circle",{className:_e("line-chart__dot-main",$.hollow&&"is-hollow"),cx:O($.x),cy:P($.pct),r:4,stroke:M,fill:$.hollow?void 0:M})]},$.x))]}),C!=null&&n.jsx(cn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function d4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:i,tipGroups:s,start:l,className:u}){return n.jsxs("div",{className:_e("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:_e("game-intro__title",r),children:a}),i!=null&&n.jsx("p",{className:"game-intro__description body-3",children:i}),s?.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((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),l&&n.jsx(pe,{htmlType:"button",className:l.className,variant:"main",color:l.color,size:48,width:"100%",disabled:l.disabled,onClick:l.onClick,children:l.label})]})}const ku=(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")}`},Au=(e,t,a,r)=>({from:Pi(e,t,a),to:new Date(Pi(e,t,a+r).getTime()-1),fromYmd:ku(e,t,a),toYmd:ku(e,t,a+r-1)});function p4(e,t=0){if(e.period==="month"){const i=ma(e.monthRange),s=ia(),l=i?i.year:s.getFullYear(),u=(i?i.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(l,u+1,0)).getUTCDate();return Au(l,u,1,c)}const a=e.weekRanges.find(i=>i.value===e.weekRange);if(!a){const i=new Date,s=La();return{from:i,to:i,fromYmd:s,toYmd:s}}const r=bn(a.year,a.month-1);return Au(a.year,a.month-1,r+(a.week+t)*7,7)}const Wo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Nu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Eu({done:e,total:t,segments:a,color:r="var(--color-main)",size:i="medium",strokeWidth:s,label:l="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof i=="number"?i:Wo[i].diameter,m=s??(typeof i=="number"?12:Wo[i].strokeWidth),p=d/2,f=(d-m)/2,b=2*Math.PI*f;if(a&&a.length>0){const _=a.reduce((g,A)=>{const y=g.length>0?g[g.length-1].acc:0,k=Number.isFinite(A.ratio)?A.ratio:0,x=Math.max(0,Math.min(k,1-y));return g.push({color:A.color,rotate:-90+y*360,dash:b*x,acc:y+x}),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:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,A)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:f,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},A))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,C=b*v,h=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:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),v>0&&n.jsx("circle",{cx:p,cy:p,r:f,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${C} ${h}`,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":i==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Nu(v)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||i==="medium"?" ring-chart__label--tight":""}`,children:l})]})]})}function m4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:i,totalLabelKey:s,legend:l,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:f,...b}){const{t:v}=xe.useTranslation();if(!e)return n.jsx(Eu,{...b});const C=(b.total??0)>0?Nu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Wo[b.size??"medium"].diameter,g=b.size==="large",A=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,y=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(at,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Io,{className:A,inGrid:d,onClick:m,ariaLabel:p,tooltip:f,title:v(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:y||(h?void 0:a),subRow:(i||l)&&n.jsxs(n.Fragment,{children:[i?n.jsxs(Ka,{label:!h&&s?v(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:C}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),l&&n.jsx(Po,{items:l})]}),children:u?n.jsx("div",{className:"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(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Eu,{...b,hideCenter:b.hideCenter??h})})})}function h4({label:e,value:t,change:a,changeType:r,icon:i,tooltip:s,onClick:l,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),f=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),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(h=>{l&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),l())},[l]);return n.jsxs("div",{ref:c,className:`manager-stat-card${l?" manager-stat-card--clickable":""}`,onClick:l,onKeyDown:l?C:void 0,onPointerEnter:f,onPointerLeave:p,onFocus:f,onBlur:p,role:l?"button":void 0,tabIndex:l?0:void 0,"aria-label":l?[e,t,v].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Bn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),i&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(at,{icon:i,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),v&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:v})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Du({value:e,onChange:t,min:a=0,max:r=100,step:i=1,orientation:s="horizontal",size:l=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:f,labelPos:b,labelAlign:v="right",showMinMax:C=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:A=!1,tickStep:y,tickShape:k="dot"}){t&&!c&&St("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)),w=r>a?(x-a)/(r-a):0,B=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,O={"--slider-ratio":String(w),"--slider-thumb":`${l}px`,...N?B?{height:N}:{width:N}:{}},P=y??i,G=(g||A)&&P>0&&r>a?Math.floor((r-a)/P+1e-6):0;if(G>0&&G<=100){const W=k!=="dash",I=re=>W?`radial-gradient(circle, ${re} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${re} calc(50% - 2px), ${re} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${re} calc(50% - 2px), ${re} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",j=[],F=[],U=[];for(let re=0;re<=G;re++){const te=re*P/(r-a);if(te>1+1e-6)break;const le=`${((B?1-te:te)*100).toFixed(4)}%`,K=te<=w+1e-6;if(K?!A:!g)continue;const oe=K?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";j.push(I(oe)),F.push(B?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),U.push(B?`center ${le}`:`${le} center`)}j.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))"),F.push("100% 100%"),U.push("0 0"),O.backgroundImage=j.join(", "),O.backgroundSize=F.join(", "),O.backgroundPosition=U.join(", "),O.backgroundRepeat="no-repeat"}const L=f?f(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&h?h:x===r&&_?_:void 0,M=n.jsx("input",{type:"range",className:_e("slider",`slider--${s}`,E&&"slider--static",!p&&!C&&m),min:a,max:r,step:i,value:x,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:O});if(!p&&!C)return M;const $=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),Z=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=C?n.jsxs("div",{className:_e("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[B?Z:$,M,B?$:Z]}):M;if(!p)return q;const z=b??(B?"bottom":"right"),V=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,R=f?f(x):p==="percent"?V:p==="count"?`${x} / ${r}`:String(x),H=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:_e("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${z}`,`slider-wrap--align-${v}`,m),children:[q,H]})}const f4=.86,C4=250,Ho=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Vo=(e,t,a,r)=>{const i=Ho(e,t,a,r);return`${i<0?"-":"+"}${Math.abs(i)} dB`};function qo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:i,labelPos:s,labelAlign:l="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:f}){const b=o.useRef(null),v=o.useRef(null),C=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const x=M=>{const $=Vo(M,c,d,m);C.current&&(C.current.textContent=$);const Z=b.current;Z&&(Z.setAttribute("aria-valuenow",String(Ho(M,c,d,m))),Z.setAttribute("aria-valuetext",$))},w=e??Hf(t)??(_&&_.el===t?_.node:null),B=v.current;if(!w||!B){B?.style.setProperty("--meter-level","0"),x(u);let M=!1;return!e&&t&&Qa(t).then($=>{!M&&$&&g({el:t,node:$})}),()=>{M=!0}}eo();const E=new Float32Array(w.fftSize);let D=0,N=0,O=0,P=0,G=null;const L=M=>{const $=Vf(w,E);D=$>D?$:D*f4;const Z=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,Z),z=q-c,V=Math.min(1,Math.max(0,(z-d)/(m-d)));if(B.style.setProperty("--meter-level",V.toFixed(3)),N+=q,O+=1,M-P>=C4){const R=N/O;G=G==null?R:G*.6+R*.4,x(G),N=0,O=0,P=M}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const A=typeof r=="number"?`${r}px`:r,y=n.jsx("div",{className:"audio-meter__track",style:A?a==="vertical"?{height:A}:{width:A}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),k=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:_e("audio-meter",`audio-meter--${a}`,i&&`audio-meter--label-${k}`,i&&`audio-meter--align-${l}`,p),role:"meter","aria-label":f,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Ho(u,c,d,m),"aria-valuetext":Vo(u,c,d,m),children:[y,i&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Vo(u,c,d,m)})]})}const Su=260;function Tu({message:e,position:t,duration:a,onClose:r}){const[i,s]=o.useState(!1),[l,u]=o.useState(!1),c=o.useRef(l),d=o.useRef(i);o.useEffect(()=>{c.current=l},[l]),o.useEffect(()=>{d.current=i},[i]);const m=o.useRef(null),p=o.useRef(""),f=o.useRef(r);o.useEffect(()=>{f.current=r});const b=a,v=o.useRef(null),C=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),A=o.useRef(null),y=o.useRef(null),k=o.useRef(null),x=o.useRef(()=>{});x.current=E=>{E<0||(C.current=Date.now(),h.current=E,v.current=setTimeout(()=>{v.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{f.current()}catch{}},Su)},E))};const w=o.useCallback(()=>{_.current||!v.current||(_.current=!0,clearTimeout(v.current),v.current=null,h.current=Math.max(0,h.current-(Date.now()-C.current)))},[]),B=o.useCallback(()=>{_.current&&(_.current=!1,x.current(h.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&&(_.current?h.current=b:x.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=m.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(),s(!0)):(u(!0),A.current=requestAnimationFrame(()=>{y.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,x.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),Su);return p.current=e,()=>{v.current&&clearTimeout(v.current),g.current&&clearTimeout(g.current),A.current&&cancelAnimationFrame(A.current),y.current&&cancelAnimationFrame(y.current),k.current&&clearTimeout(k.current),v.current=null,g.current=null,A.current=null,y.current=null,k.current=null}},[e,b,t]),{mounted:l,showing:i,popupRef:m,pause:w,resume:B}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:i=2e3}){const{mounted:s,showing:l,popupRef:u,pause:c,resume:d}=Tu({message:e,position:t,duration:i,onClose:r}),m=o.useRef(null),[p,f]=o.useState(!1);if(o.useEffect(()=>{l?f(!0):s||f(!1)},[l,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",v=n.jsx("div",{ref:u,className:`toast toast--${t} ${l?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{m.current=C.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||l?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?en.createPortal(v,document.body):v}const g4=24;function b4({value:e,max:t=100,size:a=8,color:r,trackColor:i,label:s,formatValue:l,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,f=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=f/p*100,v=Number.isFinite(t)&&t>0?t:0,C=u??(a>=g4?"inside":"bottom"),h=C==="center"?"inside":C,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),i&&(g["--progress-bar-track"]=i),n.jsxs("div",{className:_e("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":f,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":s?l?l(f):s==="percent"?void 0:s==="raw"?String(f):`${f} / ${v}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:l?l(f):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(f):`${f} / ${v}`})]})}const ju={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},y4="rgba(255, 255, 255, 0.16)";function Mu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:i,variant:s="numbered",announce:l=!1,ariaLabel:u}){const{t:c}=xe.useTranslation(),d=ln("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),f={};if(a&&(f["--pi-inactive-bg"]=a),r&&(f["--pi-inactive-color"]=r),i&&(a||(f["--pi-inactive-bg"]=y4),r||(f["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:f,role:l?"status":"img","aria-label":l?void 0:p,children:[l&&n.jsx("span",{style:ju,children:p}),Array.from({length:e}).map((v,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<m?" done":C===m?" active":""}`},C))]});const b=l?n.jsx("span",{role:"status",style:ju,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:f,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:f,role:"list","aria-label":p,children:Array.from({length:e}).map((v,C)=>n.jsx("span",{role:"listitem","aria-current":C===m?"step":void 0,className:`progress-indicator-dot ${C<m?" done":C===m?" active":""} body-3`,children:C+1},C))})]})}function v4(e){if(!e)return[];const t=[];let a=0,r="";for(const i of e.trim()){if(i==="("?a++:i===")"&&a--,/\s/.test(i)&&a===0){r&&(t.push(r),r="");continue}r+=i}return r&&t.push(r),t}function x4({children:e,className:t,style:a,rowLabel:r,onRowClick:i}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&i?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Uo({variant:e="default",children:t,className:a,draggable:r,onClick:i,onMouseEnter:s,onMouseLeave:l,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:f}){const b=o.useCallback(v=>{i&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i())},[i]);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":m,className:"table-row__full-cell",children:n.jsx(Ga,{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":m,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:i,onKeyDown:i?b:void 0,onMouseEnter:s,onMouseLeave:l,onDragStart:u,onDragEnd:c,role:"row",tabIndex:i&&!f?0:void 0,"aria-describedby":i&&!f?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function _4({dir:e}){return n.jsx(e==="asc"?Ks:Gs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function w4({children:e,onClick:t,className:a,sortDir:r,ariaSort:i,onResizeStart:s}){const l=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(_4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":i,className:_e("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:l}):l,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Go({fields:e=[],headerGroups:t,items:a=[],renderRow:r,onRowClick:i,isRowClickable:s,onRowMouseEnter:l,onRowMouseLeave:u,onRowDragStart:c,onRowDragEnd:d,draggingId:m,gridTemplateColumns:p,mobileGridTemplateColumns:f,resizable:b=!1,resizeMode:v="grow",resizeStorageKey:C,size:h="small",title:_,icon:g,count:A,collapsed:y=!1,onToggleCollapse:k,headerActions:x,empty:w,loading:B,dragOver:E=!1,onDragOver:D,onDragLeave:N,onDrop:O,renderExpandedRow:P,expandedId:G}){const{t:L}=xe.useTranslation(),M=o.useId(),$=`table-title-${M}`,Z=`table-row-hint-${M}`,q=ln("(max-width: 767px)"),z=f&&q?f:null,V=b&&!q,R=48,H=o.useRef(()=>R),W=C?`table-cols:${C}`:null,I=o.useRef(null),S=o.useRef(null),j=o.useRef(null),F=o.useRef(null),[U,re]=o.useState(!1),[te,le]=o.useState(0),K=o.useCallback(()=>{const se=j.current;se&&(re(se.scrollWidth>se.clientWidth+1),le(se.clientWidth))},[]),oe=o.useCallback((se,Ne)=>{const We=se.current;We&&S.current&&S.current.unobserve(We),se.current=Ne,Ne?(!S.current&&typeof ResizeObserver<"u"&&(S.current=new ResizeObserver(()=>K())),S.current?.observe(Ne)):!j.current&&!F.current&&(S.current?.disconnect(),S.current=null),K()},[K]),Ae=o.useCallback(se=>oe(j,se),[oe]),Y=o.useCallback(se=>oe(F,se),[oe]);o.useEffect(()=>{K()}),o.useEffect(()=>{if(typeof window>"u")return;const se=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>K()):null;return window.addEventListener("resize",K),()=>{se!=null&&cancelAnimationFrame(se),window.removeEventListener("resize",K)}},[K]);const Q=o.useRef(()=>!1),me=o.useRef([]),De=o.useRef(null),be=se=>{if(!se||typeof window>"u")return null;try{const Ne=JSON.parse(window.localStorage.getItem(se)??"null");return Array.isArray(Ne)&&Ne.length>0&&Ne.every(We=>typeof We=="number"&&Number.isFinite(We)&&We>0)?Ne:null}catch{return null}},[ne,ue]=o.useState(()=>be(W)),[fe,ge]=o.useState(W),[Ce,$e]=o.useState(()=>be(W)!==null);if(fe!==W){ge(W);const se=be(W);ue(se),$e(se!==null)}const He=o.useRef(ne);o.useEffect(()=>{He.current=ne},[ne]);const je=o.useCallback(se=>{const Ne=De.current;if(!Ne)return;const We=He.current;if(We){const nt=[...We];if(Ne.next!=null&&Ne.startWNext!=null){const Fe=se.clientX-Ne.startX,Ge=Math.max(H.current(Ne.index)-Ne.startW,Math.min(Ne.startWNext-H.current(Ne.next),Fe));nt[Ne.index]=Ne.startW+Ge,nt[Ne.next]=Ne.startWNext-Ge}else nt[Ne.index]=Math.max(H.current(Ne.index),Ne.startW+(se.clientX-Ne.startX));He.current=nt,ue(nt)}},[]),Ie=o.useCallback(()=>{if(De.current=null,window.removeEventListener("pointermove",je),window.removeEventListener("pointerup",Ie),window.removeEventListener("pointercancel",Ie),document.body.style.cursor="",document.body.style.userSelect="",W&&He.current)try{window.localStorage.setItem(W,JSON.stringify(He.current))}catch{}},[je,W]),qe=o.useCallback((se,Ne)=>{Ne.preventDefault(),Ne.stopPropagation();const We=I.current;if(!We)return;const nt=Array.from(We.children).map(Ge=>Ge.getBoundingClientRect().width),Fe=v==="fit"?e.findIndex((Ge,bt)=>bt>se&&Ge.resizable!==!1):-1;De.current=Fe>=0?{index:se,startX:Ne.clientX,startW:nt[se],next:Fe,startWNext:nt[Fe]}:{index:se,startX:Ne.clientX,startW:nt[se]},He.current=nt,ue(nt),$e(!0),window.addEventListener("pointermove",je),window.addEventListener("pointerup",Ie),window.addEventListener("pointercancel",Ie),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[je,Ie,v,e]),mt=o.useCallback(()=>{const se=I.current,Ne=se?.closest(".table-wrap");if(!se||!Ne)return null;const We=Ne.style.getPropertyValue("--table-grid-cols");Ne.style.setProperty("--table-grid-cols",e.map((et,ot)=>Q.current(ot)?me.current[ot]:"max-content").join(" "));const nt=Array.from(Ne.querySelectorAll(".table-row")).filter(et=>!et.classList.contains("table-row--loading")&&!et.classList.contains("table-row--empty")),Fe=e.map((et,ot)=>{let lt=se.children[ot]?.getBoundingClientRect().width??0;for(const jt of nt){const Wt=jt.children[ot];Wt&&(lt=Math.max(lt,Wt.getBoundingClientRect().width))}const st=Q.current(ot)?parseFloat(me.current[ot]):NaN;return Number.isFinite(st)?st:Math.max(H.current(ot),Math.ceil(lt))}),Ge=window.getComputedStyle(se),bt=se.clientWidth-(parseFloat(Ge.paddingLeft)||0)-(parseFloat(Ge.paddingRight)||0);We?Ne.style.setProperty("--table-grid-cols",We):Ne.style.removeProperty("--table-grid-cols");let Re=Fe;const tt=Fe.reduce((et,ot,lt)=>et+(Q.current(lt)?ot:0),0),xt=Fe.reduce((et,ot,lt)=>et+(Q.current(lt)?0:ot),0),Lt=bt-tt;if(bt>0&&xt>0&&Lt>0){const et=Lt/xt;Re=Fe.map((lt,st)=>Q.current(st)?lt:Math.max(H.current(st),Math.round(lt*et)));const ot=Math.round(Lt-Re.reduce((lt,st,jt)=>lt+(Q.current(jt)?0:st),0));if(ot!==0){let lt=-1;Re.forEach((st,jt)=>{!Q.current(jt)&&(lt<0||st>Re[lt])&&(lt=jt)}),lt>=0&&(Re[lt]=Math.max(H.current(lt),Re[lt]+ot))}}return Re},[e,v]),ct=(se,Ne)=>se!==null&&se.length===Ne.length&&se.every((We,nt)=>We===Ne[nt]),rt=o.useRef(mt);o.useEffect(()=>{rt.current=mt});const[ft,ke]=o.useState(0),Ve=a.length>0,we=`${W??""}|${ft}|${e.length}|${te}`,Ue=!Ce&&V&&W!==null&&!B?`${we}|${Ve?1:0}`:null,Be=o.useRef(null);o.useEffect(()=>{if(Ue===null||!Ve||Be.current===we)return;const se=rt.current();se&&(Be.current=we,ue(Ne=>ct(Ne,se)?Ne:se))},[Ue]);const Me=o.useCallback(()=>{if(W)try{window.localStorage.removeItem(W)}catch{}$e(!1);const se=rt.current();ue(se),He.current=se,ke(Ne=>Ne+1)},[W]);o.useEffect(()=>()=>{De.current&&(window.removeEventListener("pointermove",je),window.removeEventListener("pointerup",Ie),window.removeEventListener("pointercancel",Ie),document.body.style.cursor="",document.body.style.userSelect="")},[je,Ie]);const Se=v4(p),Je=Se.filter(se=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(se));Je.length>0&&St(`table-content-track:${p}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${Je.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: ${p})`);const Qe=e.findIndex(se=>!!se.sortDir);e.filter(se=>!!se.sortDir).length>1&&St("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 dt=se=>se===Qe?e[se].sortDir==="asc"?"ascending":"descending":e[se].onClick?"none":void 0,ht=se=>/^\d+(\.\d+)?px$/.test(Se[se]??""),wt=se=>{const Ne=Se[se]??"",We=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ne)??/^(\d+(?:\.\d+)?)px$/.exec(Ne);return We?parseFloat(We[1]):R};Q.current=ht,H.current=wt,me.current=Se;const Ct=se=>v==="fit"&&!ht(se)?"fr":"px",Nt=ne&&ne.length===e.length&&!q,gt=z??(Nt?e.map((se,Ne)=>se.resizable===!1&&Se[Ne]?Se[Ne]:`${ne[Ne]}${Ct(Ne)}`).join(" "):p),it=gt?{"--table-grid-cols":gt}:void 0,Ye=_!==void 0;return n.jsxs("div",{ref:Ae,className:`table-wrap table-wrap--${h}${V?" table-wrap--resizable":""}${E?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:it,onDragOver:D,onDragLeave:N,onDrop:O,tabIndex:U?0:void 0,role:U?"region":void 0,"aria-label":U?typeof _=="string"?_:L("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:Z,className:"table-row-hint",children:L("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Y,role:"table","aria-labelledby":Ye&&typeof _=="string"?$:void 0,className:"table body-2",children:[Ye&&n.jsxs("div",{className:_e("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?L("common.expand","\uD3BC\uCE58\uAE30"):L("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),g&&n.jsx(at,{icon:g,label:typeof _=="string"?_:void 0,className:"table-header__icon"}),n.jsx("span",{id:$,className:"table-header__title h5b",children:_}),A!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:A}),x&&n.jsx("span",{className:"table-header__actions",onClick:se=>se.stopPropagation(),children:x})]}),!y&&n.jsxs(n.Fragment,{children:[t&&t.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:t.map((se,Ne)=>n.jsx("div",{role:"columnheader","aria-colspan":se.span,className:_e("table-field body-3",se.className),style:{gridColumn:`span ${se.span}`},children:se.label},Ne))}),n.jsxs("div",{role:"presentation",className:_e("table-fields-strip",V&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:I,children:e.map((se,Ne)=>n.jsx(w4,{onClick:se.onClick,className:se.className,sortDir:se.sortDir,ariaSort:dt(Ne),onResizeStart:V&&Ne<e.length-1&&se.resizable!==!1&&(v!=="fit"||e.some((We,nt)=>nt>Ne&&We.resizable!==!1))?We=>qe(Ne,We):void 0,children:se.label},Ne))}),V&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:Me})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(Uo,{variant:"loading",colSpan:e.length||void 0}):a.length===0&&w?n.jsx(Uo,{variant:"empty",colSpan:e.length||void 0,children:w}):a.map((se,Ne)=>{const We=m!=null&&se.id===m,nt=!!i&&(s?s(se):!0),Fe=G!=null&&se.id!=null&&(G instanceof Set?G.has(se.id)||[...G].some(Ge=>String(Ge)===String(se.id)):String(se.id)===String(G));return n.jsx(Uo,{className:`${nt?" table-row--clickable":""}${c?" table-row--draggable":""}${We?" table-row--dragging":""}`.trim(),draggable:!!c,onClick:nt?()=>i(se):void 0,colSpan:e.length||void 0,rowHasButton:r(se).some(Ge=>!!Ge.rowLabel),describedBy:Z,onMouseEnter:l?Ge=>l(se,Ge):void 0,onMouseLeave:u?Ge=>u(se,Ge):void 0,onDragStart:c?Ge=>c(se,Ge):void 0,onDragEnd:d?Ge=>d(se,Ge):void 0,expandedContent:Fe&&P?P(se):void 0,children:r(se).map((Ge,bt)=>n.jsx(x4,{className:Ge.className,style:Ge.style,rowLabel:nt?Ge.rowLabel:void 0,onRowClick:nt?()=>i(se):void 0,children:Ge.content},bt))},se.id!=null?`${typeof se.id}:${se.id}`:`__idx:${Ne}`)})})]})]})]})}const B4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Lu(e){return e?B4[e]??null:null}function $u(e){switch(Lu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Ru(e,t){const a=Lu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const fa=e=>e==null?"":String(e).trim();function Ko(e,t,a,r){const i=fa(e),s=fa(t),l=fa(a);if(r&&i&&s&&l){const c=`${i.padStart(4,"0")}-${s.padStart(2,"0")}-${l.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Ri(c,r);if(m)return m}}const u=[i,s,l];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function k4(e,t,a){const r=fa(e);return r?`${r}-${fa(t).padStart(2,"0")}-${fa(a).padStart(2,"0")}`:""}function Pu(e,t){return t!=="wornAt"?String(e[t]??""):k4(e.wornYear,e.wornMonth,e.wornDay)}function A4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:i,onRelease:s,onAdd:l}){const{t:u,i18n:c}=xe.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=Qy(),f=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,A)=>{if(h==="worn"){const y=Number(A.worn)-Number(g.worn);return _?y:-y}return wo(Pu(g,h),Pu(A,h),_)})},[e,m]),{pageRows:b,pageSizeProps:v,paginationProps:C}=Jy(f,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Ro,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:v,pagination:C,actions:l&&n.jsx(pe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:l})}),n.jsx(Go,{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((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(gu,{checked:h.worn,disabled:h.worn?!s:!i,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?i?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx(At,{size:"small",variant:$u(h.device),fill:"soft",label:Ru(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Ko(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(pe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Iu(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 N4(e,t){return new Date(e,t+1,0).getDate()}function E4(e,t){return new Date(e,t,1).getDay()}function D4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:i}){const{t:s,i18n:l}=xe.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=oo(i),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,f]=o.useState(()=>Number(c.slice(5,7))-1),[b,v]=o.useState(null),C=o.useRef(null),h=o.useMemo(()=>{const x={};return e.forEach(w=>{x[w.date]||(x[w.date]=[]),x[w.date].push(w)}),x},[e]),_=o.useMemo(()=>{const x=N4(d,p),w=E4(d,p),B=[];for(let E=0;E<w;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]),g=o.useCallback(()=>{p===0?(m(x=>x-1),f(11)):f(x=>x-1)},[p]),A=o.useCallback(()=>{p===11?(m(x=>x+1),f(0)):f(x=>x+1)},[p]),y=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,k=x=>y(x)===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":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(at,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:nr(s,l.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:A,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(at,{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:s("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:s("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:s("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,w)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const B=x,E=y(B),D=h[E]??[],N=Ri(E,l.language),O=b===E;return n.jsxs("div",{className:`calendar-cell${k(B)?" today":""}${O?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":k(B)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?P=>{P.target===P.currentTarget&&(P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),r(E)))}:void 0,onDragOver:a?P=>{P.preventDefault(),v(E)}:void 0,onDragLeave:a?P=>{P.currentTarget.contains(P.relatedTarget)||v(null)}:void 0,onDrop:a?P=>{P.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 P=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),G=P.length===1&&P[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):P.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${G}`,children:[P.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((P,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${P.status==="noVisit"?" calendar-visit-badge--no-visit":P.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{C.current=P.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,v(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(P)}:void 0,...Iu(t?()=>t(P):void 0),"aria-label":[N,P.time?Oi(P.time,s):null,P.customer,s(P.status==="noVisit"?"calendar.legend.noVisit":P.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[P.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Oi(P.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:P.customer}),P.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},P.id??G))})]},B)})]})]})}const S4={page:"h3",pagePopup:"h4",popup:"h5"};function Ca({type:e="page",title:t,headingLevel:a=2,icon:r,action:i,disc:s,children:l,inGrid:u=!1,className:c,style:d}){const m=S4[e],p=t||s||i||r,f=a?`h${a}`:"div";return n.jsxs("div",{className:_e("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(at,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(f,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),i&&n.jsx("div",{className:"section__action",children:i})]}),l]})}let Yo=null,Fu=!1;function Ou(){if(Fu||typeof document>"u")return;Fu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Yo="keyboard")},!0);const e=()=>{Yo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Ou();function gr(){return Ou(),Yo==="keyboard"}const br=20;function T4(e){const{t}=xe.useTranslation(),{type:a,trainingDatas:r,depth:i,renderPopup:s,completedIds:l,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:f,sectionType:b="page"}=e||{},[,v]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],h=C.length,[_,g]=o.useState(Math.min(h,br)),A=o.useMemo(()=>Array.isArray(i)?[...i,a?.label].filter(Boolean).join(" \xB7 "):[i||"",a?.label].filter(Boolean).join(" \xB7 "),[i,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Sl("speechear.data.updated",()=>v(w=>w+1));const y=o.useRef(null),k=o.useRef(null);function x(){const w=document.activeElement;k.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(B=>Math.min(h,B+br))}return o.useEffect(()=>{const w=k.current;if(w==null)return;k.current=null;const B=document.activeElement;B&&B!==document.body||y.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(Ca,{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,_).map((w,B)=>{const E=w;return n.jsx(Mo,{index:B,type:a,trainingData:E,depth:A,renderPopup:s,completedIds:l,selectedIds:u,size:d,useDescriptionTooltip:m,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 f=="function"?D=>f(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${B}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(pe,{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 j4(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 M4({gap:e=10,count:t,className:a,children:r}){const i=o.useRef(null),[s,l]=o.useState({width:0,card:0}),u=t??j4(r);o.useLayoutEffect(()=>{const f=i.current;if(!f)return;const b=()=>{const C=f.style.maxWidth;f.style.maxWidth="none";const h=f.clientWidth;f.style.maxWidth=C;const _=f.firstElementChild?.offsetWidth??0;l(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(b);return v.observe(f),()=>v.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?hC(s.width,c,e):0,m=d>0?fC(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:i,className:_e("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Zo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,i]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;i({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const l=o.useCallback(()=>{a.current===e&&i({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&i({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:l,onError:u}}var L4='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 $4=L4,Xo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:i=!1,onSelect:s,flipDelay:l=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=xe.useTranslation(),f=e.word||e.title||"",b=t||!f,v=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:f,subLabel:C,colloquialLabel:h,homonum:e.homonum});f&&(_.label!==f||_.subLabel!==C||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:f,subLabel:C,colloquialLabel:h,homonum:e.homonum});const A=o.useRef(null),y=ln("(max-width: 767px)"),[k,x]=o.useState(!1),w=`${typeof v=="string"?v:v?.src??""}\0${f}`,[B,E]=o.useState({for:"",url:""}),D=B.for===w?B.url:"",N=Mi(),O=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),P=O?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:G,loading:L,hasImage:M,onLoad:$,onError:Z}=Zo(P);o.useEffect(()=>{let j=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){E({for:w,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const U=v.src;if(U){E({for:w,url:U});return}}}const F=Na();if(F&&f)try{const U=await Promise.resolve(F(f));!j&&U&&E({for:w,url:U})}catch{}})(),()=>{j=!0}},[v,f,w]);const q=o.useRef(!0),z=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,z.current&&pr(z.current),z.current=null;try{A.current?.pause()}catch{}A.current=null}),[]);const V=o.useCallback(()=>new Promise(j=>{if(typeof window<"u"&&window.speechSynthesis&&f){x(!0),window.speechSynthesis.cancel();const F=new SpeechSynthesisUtterance(f);F.lang="ko-KR",F.onend=()=>{x(!1);try{a?.()}catch{}j()},F.onerror=()=>{x(!1),j()},window.speechSynthesis.speak(F)}else j()}),[f,a]),R=o.useCallback(j=>{const F=mr(j,U=>{if(x(!1),U)try{a?.()}catch{}});return A.current=F.el,F.done},[a]),H=o.useCallback(async()=>{if(t||!q.current)return;const j=()=>{z.current===j&&(z.current=null);try{A.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},F=dr(j);z.current=j;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(x(!0),await R(D)))return;const U=Xr();if(U&&f)try{const re=await Promise.resolve(U(f));if(!q.current||z.current!==j||re&&(x(!0),await R(re)))return}catch{}if(!q.current||z.current!==j)return;await V()}finally{F(),z.current===j&&(z.current=null)}},[t,D,f,R,V]);o.useImperativeHandle(m,()=>({play:()=>H()}),[H]);const W=j=>j.stopPropagation(),I=o.useCallback(j=>{if(j.stopPropagation(),!t){if(k){try{A.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}H()}},[t,k,H]),S=_e("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",i?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?i:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" "||j.key==="Spacebar")&&(j.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${l}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[i&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx(At,{type:"dot",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:O?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):M?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:G,className:"training-word-card__image",src:P,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:$,onError:Z})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!O&&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?W:void 0,children:n.jsx(pe,{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,onClick:I,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("${$4}")`}})})]})})}),R4=260;function Fn(e){const{t}=xe.useTranslation(),{title:a,subtitle:r,headerActions:i,headerSegment:s,children:l,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:f=!1,footerClassName:b="",footerLayout:v="center",onClose:C,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:A="",ariaLabel:y,useTitle:k=!0,inline:x=!1,size:w,layer:B="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[O,P]=o.useState(!1),G=o.useRef(!1),L=o.useRef(null),M=o.useId(),$=o.useRef(null);o.useEffect(()=>{},[x,a,y,A]),o.useEffect(()=>{N!==void 0&&$.current&&($.current.scrollTop=0)},[N]);const[Z,q]=o.useState(!1);o.useEffect(()=>{const K=$.current;if(!K)return;const oe=()=>q(K.scrollHeight>K.clientHeight+1);if(oe(),typeof ResizeObserver>"u")return;const Ae=new ResizeObserver(oe);Ae.observe(K);const Y=K.firstElementChild;return Y&&Ae.observe(Y),()=>Ae.disconnect()},[l,N]),o.useEffect(()=>{if(!x)return du()},[x]),o.useEffect(()=>{if(x)return;const K=document.activeElement,oe=L.current;return ho(oe,K),oe&&!oe.contains(document.activeElement)&&(oe.querySelector(Cn)??oe).focus(),()=>{const Ae=document.activeElement;(!Ae||Ae===document.body||oe&&oe.contains(Ae))&&fo(K)?.focus?.()}},[x]),po(L,!x);const z=o.useRef(!0),V=Co(),R=o.useRef(null);o.useEffect(()=>(z.current=!0,()=>{z.current=!1,R.current&&(clearTimeout(R.current),R.current=null)}),[]);const H=o.useCallback(()=>{!z.current||!G.current||(G.current=!1,P(!1))},[]),W=o.useCallback((K,oe=!1)=>{if(oe&&!z.current||G.current)return;G.current=!0,P(!0);const Ae=setTimeout(()=>{R.current===Ae&&(R.current=null);let Y;try{Y=K?K():void 0}catch{H();return}Y&&typeof Y.then=="function"&&Y.then(()=>{setTimeout(H,120)},H)},V?0:R4);oe&&(R.current=Ae)},[H,V]),I=o.useCallback(()=>{h||_&&_()===!1||W(C,!0)},[W,C,h,_]),S=o.useRef(I);o.useEffect(()=>{S.current=I});const j=!x&&!!C;o.useEffect(()=>{if(j)return Gn(()=>S.current())},[j]);const F=j&&g,U=o.useRef(!1),re=K=>{U.current=K.target===K.currentTarget},te=K=>{const oe=U.current;U.current=!1,oe&&K.target===K.currentTarget&&I()},le=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${O?"popup--closing":""} ${A}`,onPointerDown:F?re:void 0,onClick:F?te:void 0,onMouseDown:x?void 0:K=>{K.target===K.currentTarget&&K.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${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?M:void 0,"aria-label":!x&&!(k&&a)?y??(typeof a=="string"?a:void 0):void 0,children:[!k&&(i||C)?n.jsxs("div",{className:"popup-close-float",children:[i,C&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:I,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||i||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:M,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:M,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(gn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(K=>({key:K.key,label:K.label,disabled:K.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[i,C&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:I,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:$,tabIndex:Z?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof l=="function"?l({animateThen:W,closeWithAnimation:I}):l})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${f?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?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:W,closeWithAnimation:I}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:W,closeWithAnimation:I}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${v!=="center"?` popup-footer--${v}`:""}`,children:u.map((K,oe)=>n.jsx(pe,{htmlType:"button",size:48,variant:K.variant??"default",label:K.label,disabled:K.disabled,onClick:()=>K.onClick?.({animateThen:W,closeWithAnimation:I})},oe))}):c?n.jsx("div",{className:`popup-footer${v!=="center"?` popup-footer--${v}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:W,closeWithAnimation:I}):c}):null]})});return x||typeof document>"u"?le:en.createPortal(le,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function zu(e,t){return e===t?null:t}const Wu={o:"circle",triangle:"triangle",x:"x"},Hu={o:"main",triangle:"warn",x:"danger"};function P4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const i=t+a+r;return{marked:i,o:t,triangle:a,x:r,rate:i===0?null:(t+a*.5)/i}}function Jo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Vu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function I4(e,t){return!t&&e>0}const ga={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 F4(e="landscape"){St("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}=ga[e],i=document.createElement("style");i.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(i);const s=()=>{document.head.removeChild(i),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function qu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let i=0;i<e.length;i+=a)r.push(e.slice(i,i+a));return r}const O4={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}},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}}};function z4(e,t){const a=O4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),i=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,l;return e==="landscape"?(l=i,s=Math.ceil(r/l)):(s=i,l=Math.ceil(r/s)),(e==="landscape"?s<l:l<s)&&([s,l]=[l,s]),{cols:s,rows:l}}const W4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Uu={\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"},Gu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Qo={\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"},es={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function Ku(e){return Object.fromEntries(Object.entries(Uu).map(([t,a])=>[t,Qo[t]?e(`wordTable.pos.${Qo[t]}`,{defaultValue:a}):a]))}function Yu(e){return Object.fromEntries(Object.entries(Gu).map(([t,a])=>[t,es[t]?e(`wordSearch.filter.type.${es[t]}`,{defaultValue:a}):a]))}const H4={pos:Qo,wordType:es};function ts(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function Zu(e,t,a,r){if(r!=="dashed")return{};const i=e%t,s=Math.floor(e/t),l=i<t-1,u=s<a-1;if(!l&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],f=[];return l&&(m.push(d("bottom")),p.push("1px 100%"),f.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),f.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:f.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const V4=280,q4=240,U4=280,G4=400,K4=120,Y4=280;function Xu(e,t){const a=o.useRef(null),[r,i]=o.useState(1),[s,l]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,f=Math.min(1,m,p);i(f),l(Math.max(0,(c-e*f)/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 m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const Z4=24,X4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},J4=400,Ju=8;function Qu({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:i=!0,showImage:s=!0,showPronunciation:l=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=xe.useTranslation(),f=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,h]=o.useState(1),[_,g]=o.useState(!1),[A,y]=o.useState({for:"",url:""}),[k,x]=o.useState(null),w=t&&t.length>0?t:zf()?.(e,r)??"",B=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:O,onError:P}=Zo(B),G=o.useCallback(()=>x(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>x(null),[]),M=bo(!!k,j=>{j?G():L()},b),$=o.useMemo(()=>{if(!d)return null;const j=[];return d.grade&&j.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&j.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&j.push(p("wordTable.info.pos",{v:ts(d.pos,Ku(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&j.push(p("wordTable.info.wordType",{v:ts(d.wordType,Yu(p)),defaultValue:"\uC720\uD615: {{v}}"})),j.length?j:null},[d,p]),Z=w||e,q=A.for===Z?A.url:"";o.useEffect(()=>{const j=Na(),F=w||e;if(!j||!F)return;let U=!1;return Promise.resolve(j(F)).then(re=>{!U&&re&&y({for:F,url:re})}),()=>{U=!0}},[w,e]);const z=o.useRef(null),V=o.useRef(null);o.useEffect(()=>()=>{v.current?.pause(),V.current?.()},[]);const R=o.useCallback(j=>{if(j.stopPropagation(),_){z.current?.();return}if(!q)return;g(!0);const F=mr(q,()=>{g(!1),V.current?.()});v.current=F.el,z.current=F.stop,V.current=dr(F.stop)},[_,q]),H=s&&!!B&&!N,W=H&&i?V4:H?U4:q4,I=H&&i?G4:H?Y4:K4;o.useEffect(()=>{const j=f.current;if(!j||typeof ResizeObserver>"u")return;const F=new ResizeObserver(([U])=>{const{width:re,height:te}=U.contentRect;h(Math.min(re/W,te/I))});return F.observe(j),()=>F.disconnect()},[W,I]);const S=c*m<Z4;return n.jsxs("div",{ref:f,className:_e("word-table-cell",S&&"word-table-cell--tap-too-small",H?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":I,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${C})`},children:[H&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:B,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:O,onError:P})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),l&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(pe,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:R})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(pe,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:R})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:j=>{ca(j)||G()},onPointerLeave:j=>{ca(j)||L()},onFocus:()=>{da()||G()},onBlur:L,children:[n.jsx(pe,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:j=>{j.stopPropagation(),M.touchPress()}}),k&&$&&n.jsx(Kn,{anchorRect:k,items:$,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:i="landscape",contentTypes:s=["image","word","standardPron"],cutLine:l="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:f=null,onActivateCell:b,onRemoveCell:v,onRemoveItem:C,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:A,buttonSize:y=40,brand:k,code:x,pageNumber:w,pageNumberPosition:B="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:O,scoreIndexOffset:P=0}){const G=o.useCallback((Be,Me)=>{O?.(P+Be,Me)},[O,P]),L=(Be,Me)=>{const Se=N?.[yr(P+Be)]??null;return n.jsx("div",{className:_e("word-table-cell__score",Se?"word-table-cell__score--marked":""),style:Ve>1?{transform:`translateX(-50%) scale(${Ve})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Je=>n.jsx("span",{className:_e("word-table-cell__score-slot",Se===Je?"word-table-cell__score-slot--on":""),children:n.jsx(pe,{htmlType:"button",size:y,type:"dot",shape:"pill",icon:Wu[Je],variant:Se===Je?Hu[Je]:"default",selected:Se===Je,useBorder:!1,...ke?{}:{tabIndex:-1,role:"img"},showTooltipInfo:M(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:M(`wordTable.scoring.${Je}`,{word:Me,defaultValue:`${Me} ${Je}`}),onClick:ke?Qe=>{Qe.stopPropagation(),G(Be,Je)}:void 0})},Je))})},{t:M}=xe.useTranslation(),$=m!==void 0,Z=e!=null||!!t||!!a,q=ln("(max-width: 767px)"),z=o.useRef(null),[V,R]=o.useState(null),H=d?.length??0,[W,I]=o.useState(null),[S,j]=o.useState(""),F=o.useRef(null),U=o.useRef(null),re=o.useRef(null),te=o.useRef(null),le=o.useCallback(Be=>{U.current=Be,typeof A=="function"?A(Be):A&&(A.current=Be)},[A]),K=o.useCallback((Be,Me)=>{F.current=Me,h?.(Be,Me),j(M("wordTable.reorder.moved",{n:Me+1,total:H,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,M,H]);o.useEffect(()=>{const Be=F.current;Be!=null&&(F.current=null,U.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{te.current?.()},[]);const oe=o.useCallback((Be,Me)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Se=Be.key==="ArrowRight";if(!Se&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Je=Me+(Se?1:-1);Je<0||Je>=H||K(Me,Je)},[h,H,K]),Ae=o.useCallback((Be,Me)=>{if(!h||Be.pointerType==="mouse")return;const Se=Be.target.closest?.("button");if(Se&&!Se.closest(".word-table-block__card-handle"))return;te.current?.();const Je={x:Be.clientX,y:Be.clientY};let Qe=!1;const dt=se=>{Qe&&se.cancelable&&se.preventDefault()};let ht=null,wt=null;const Ct=()=>{const se=wt;if(!se)return;const Ne=document.elementFromPoint?.(se.x,se.y)?.closest?.("[data-wordtable-cell]"),We=Ne?Number(Ne.dataset.wordtableCell):NaN,nt=Number.isInteger(We)?We:null;re.current=nt,R(Fe=>Fe===nt?Fe:nt)},Nt=se=>{if(!Qe){(Math.abs(se.clientX-Je.x)>Ju||Math.abs(se.clientY-Je.y)>Ju)&&Ye();return}if(wt={x:se.clientX,y:se.clientY},typeof requestAnimationFrame>"u"){Ct();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,Ct()}))},gt=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,Ct());const se=re.current,Ne=Qe;Ye(),Ne&&se!=null&&se!==Me&&K(Me,se)},it=setTimeout(()=>{Qe=!0,I(Me),re.current=Me,R(Me),window.addEventListener("touchmove",dt,{passive:!1})},J4);function Ye(){clearTimeout(it),window.removeEventListener("pointermove",Nt),window.removeEventListener("pointerup",gt),window.removeEventListener("pointercancel",gt),window.removeEventListener("touchmove",dt),Qe=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),re.current=null,te.current=null,I(null),R(null)}te.current=Ye,window.addEventListener("pointermove",Nt),window.addEventListener("pointerup",gt),window.addEventListener("pointercancel",gt)},[h,K]),{width:Y,height:Q}=ga[i],me=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:De,scale:be,offset:ne}=Xu(Y,E?Q:void 0),ue=$?m?.length??0:d?.length??0,fe=Math.max(p??ue,1),{cols:ge,rows:Ce}=z4(i,fe),$e={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},He=$?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),je=!!k?.show,Ie=!!k?.show&&k?.top!==!1,qe=!!k?.show&&k?.bottom!==!1,mt=k?.copyright??"\xA9 IHAB, Inc. All rights reserved.",ct=_e("word-table-block__content",W4[l],u&&"word-table-block__content--outline",c&&He&&"word-table-block__content--div-line",!je&&w&&B!=="none"&&"word-table-block__content--page-number",Ie&&"word-table-block__content--brand-top",qe&&"word-table-block__content--brand-bottom"),rt={transform:`scale(${1/be})`,transformOrigin:"center center"},ft=y*vr.length+4*(vr.length-1),ke=!!O,Ve=ke?Math.max(1,Math.min(1/be,Y/ge/ft)):1,we=n.jsxs("div",{ref:De,className:"word-table__scaler",style:{height:Q*be},children:[n.jsx("div",{className:_e("word-table",D&&!ke&&"word-table--score-readonly",!Z&&r),style:{width:Y,height:Q,transform:`scale(${be})`,transformOrigin:"top left",marginLeft:ne},children:n.jsxs("div",{ref:le,className:ct,style:{gridTemplateColumns:`repeat(${ge}, 1fr)`,gridTemplateRows:`repeat(${Ce}, 1fr)`},children:[$?n.jsx(n.Fragment,{children:(m??[]).map((Be,Me)=>n.jsx("div",{className:_e("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",f===Me?"word-table-block__edit-cell--active":""),style:Zu(Me,ge,Ce,l),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(Qu,{outerScale:be,label:Se.word,subLabel:Se.pronunciation,colloquialLabel:Se.colloquialPronunciation,homonum:Se.homonum,showWord:$e.word,showImage:$e.image,showPronunciation:$e.pron,showColloquial:$e.colloq,buttonSize:y})]},Je)),D&&L(Me,Be.map(Se=>Se.word).join(" / ")),v&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(pe,{htmlType:"button",size:y,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>v(Me)})})]}):b&&n.jsx("div",{style:rt,children:n.jsx(pe,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Me)})})},Me))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Me)=>n.jsxs("div",{"data-wordtable-cell":h?Me:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${V===Me?" word-table-block__card--drag-over":""}${W===Me?" word-table-block__card--dragging":""}`,style:Zu(Me,ge,Ce,l),draggable:!!h,onPointerDown:h?Se=>Ae(Se,Me):void 0,onKeyDown:h?Se=>oe(Se,Me):void 0,onDragStart:h?()=>{z.current=Me}:void 0,onDragOver:h?Se=>{Se.preventDefault(),R(Me)}:void 0,onDragLeave:h?()=>R(null):void 0,onDrop:h?Se=>{Se.preventDefault(),z.current!==null&&z.current!==Me&&h(z.current,Me),z.current=null,R(null)}:void 0,onDragEnd:h?()=>{z.current=null,R(null)}:void 0,children:[(Be.words??[]).map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(Qu,{outerScale:be,label:Se.label,subLabel:Se.subLabel,colloquialLabel:Se.colloquialLabel,homonum:Se.homonum,showWord:$e.word,showImage:$e.image,showPronunciation:$e.pron,showColloquial:$e.colloq,buttonSize:y,wordInfo:Se.grade||Se.syllables!=null||Se.pos||Se.wordType?{grade:Se.grade,syllables:Se.syllables,pos:Se.pos,wordType:Se.wordType}:void 0})]},Je)),D&&L(Me,(Be.words??[]).map(Se=>Se.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(pe,{htmlType:"button",size:y,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:M("wordTable.reorder.handle",{word:(Be.words??[]).map(Se=>Se.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||C)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Me,Be),C&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(pe,{htmlType:"button",size:y,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>C(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,ge*Ce-(d?.length??0))}).map((Be,Me)=>{const Se=(d?.length??0)+Me<fe;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Se&&n.jsx("div",{style:rt,children:n.jsx(pe,{htmlType:"button",size:y,type:"bar",icon:"plus",label:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Me)})})},`filler-${Me}`)})]}),Ie&&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:k?.topLogo?.src??cr,alt:k?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[k?.title&&n.jsx("span",{className:"word-table__paper-title",children:k.title},"t"),k?.owner&&n.jsx("span",{className:"word-table__owner",children:k.owner},"o"),x&&n.jsx("span",{className:"word-table__code",children:x},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Me,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Me]},Se))})})()]})}),qe&&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:[k?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:k.bottomLogo.src,alt:k.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:mt})]}),n.jsxs("span",{className:"word-table__band-end",children:[k?.link&&n.jsx("span",{className:"word-table__link",children:k.link}),w&&B!=="none"&&n.jsx("span",{className:"word-table__page-count",children:M("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!je&&w&&B!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${B}`,children:M("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:X4,children:S})]}),Ue=me==null?we:n.jsx("div",{className:"word-table__frame",style:{height:me},children:we});return Z?n.jsx(Ca,{type:"page",icon:t,title:e,disc:a,className:_e("word-table-block",r),children:Ue}):Ue}function Q4(e,t,a){const r=[];for(const i of e??[]){if(i.type==="note"||i.type==="input")continue;const s=i.displayLabel??i.label,l=ex(i,t?.[i.label],a);l!==null&&r.push(`${s} ${l}`)}return r.join(" \xB7 ")}function ex(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(i=>i!==dn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(i=>tx(e,i)).join(", ")}function tx(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 Dn({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:i=!1,defaultCollapsed:s=!1,collapsed:l,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:f,sectionAlign:b,className:v}){const C=(f??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=xe.useTranslation(),[_,g]=o.useState(s),A=l??_,y=()=>{const N=!A;g(N),u?.(N)},k=N=>{if(!i)return;const O=N.target;!O||typeof O.closest!="function"||O.closest(".filter-panel__collapse-toggle")||O.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||y()},x=o.useMemo(()=>r!==void 0||!A?"":Q4(d,m,h("common.all","\uC804\uCCB4")),[r,A,d,m,h]),w=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),B=e||a||r||i,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:_e("filter-panel",i?"filter-panel--collapsible":"",A?"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:i?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:[A?w:a,i&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:A?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:A?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:A?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!A,onClick:y})]})]}),!A&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_e("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(N=>{const O=m[N.label],P=O===void 0||(Array.isArray(O)?O.length===0:!1),G=(N.items??[]).filter(M=>M!=null);N.allOption&&G.some(M=>(typeof M=="string"?M:M.value)===dn)&&St(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${dn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=M=>{const $=typeof M=="string"?M:M.value,Z=typeof M!="string"&&!!M.disabled,q=typeof M!="string"?M.labels:void 0,z=typeof M!="string"?M.displayLabel:void 0,V=typeof M!="string"?M.tooltip:void 0,R=typeof M!="string"?M.descriptionTooltip:void 0,H=typeof M!="string"?M.shape:void 0,W=Array.isArray(O)?O.includes($):O===$;return n.jsx(pe,{htmlType:"button",size:"keyboard",label:q??z??$,type:N.itemType??(q?"bar":$.length===1?"dot":void 0),selected:W,disabled:Z,shape:H,showTooltipInfo:!!V,tooltipInfoText:V,tooltipDescription:R,onClick:()=>p?.($,N.label)},$)};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:_e("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(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:M=>p?.(M,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(gn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:dn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...G.map(M=>{const $=typeof M=="string"?M:M.value,Z=typeof M!="string"?M.displayLabel:void 0,q=typeof M!="string"?M.disabled:void 0;return{key:$,label:Z??$,disabled:q}})],value:P&&N.allOption?dn:m[N.label]??"",onChange:M=>p?.(M,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(pn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:dn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...G.map(M=>{const $=typeof M=="string"?M:M.value,Z=typeof M!="string"?M.displayLabel:void 0,q=typeof M!="string"?M.disabled:void 0;return{value:$,label:Z??$,disabled:q}})],value:P&&N.allOption?dn:m[N.label],onChange:M=>p?.(M,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(pe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:P,disabled:N.allOptionDisabled,onClick:()=>p?.(dn,N.label)}),N.groups?N.groups.map((M,$)=>n.jsxs("div",{className:"filter-panel__item-group",children:[$===0&&N.allOption&&n.jsx(pe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:P,disabled:N.allOptionDisabled,onClick:()=>p?.(dn,N.label)}),M.filter(Z=>Z!=null).map(L)]},$)):G.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const nx=[1,2,3,4,5,6,7,8,9,10,11,12],ec=[8,4,2,1],rn="show",yn="hide";function tc(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:"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 nc(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 ac(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function rc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function oc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function sc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:rn,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:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function ic(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function lc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...ec.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function uc(e,t){return e===t||!ec.includes(e)?Number.POSITIVE_INFINITY:e}function ax(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:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(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?rn:yn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?rn:yn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?rn:yn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?rn:yn}:{}}}function pc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===dn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(i=>i.includes(t)?i.filter(s=>s!==t):[...i,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===rn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===rn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===rn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===rn),!0):!1}function rx(e){return"sections"in e}function ns(e){const{t}=xe.useTranslation(),{title:a,className:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c};if(rx(e))return n.jsx(Dn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:f,orientation:b,showOutline:v,cutLine:C,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:A=!1,middleSections:y=[],extraSelected:k={},onExtraSelect:x,showPaperBands:w=!1,showTopInfo:B=!0,showBottomInfo:E=!0}=e,D=[tc(t,{hasImage:m,hasColloquial:p}),nc(t),...y,ac(t),...g?[sc(t)]:[],...A?[ic(t)]:[],...w?[rc(t),oc(t)]:[]],N={...dc(t,{contentTypes:f,orientation:b,showOutline:v,cutLine:C,showDivLine:h,showTopInfo:B,showBottomInfo:E}),...k},O=(P,G)=>{pc(t,P,G,_)||x?.(P,G)};return n.jsx(Dn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:O,...d,sectionAlign:"horizontal"})}function as(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ox(e){return as(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function rs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function sx(e,t,a,r="",i=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?rs(r):"";xr?.();let l=null;if(s){const d=document.title;document.title=s,l=()=>{document.title=d,window.removeEventListener("afterprint",l),xr===l&&(xr=null)},xr=l,window.addEventListener("afterprint",l)}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}ya={iframe:u,at:Date.now()},c.open(),c.write(os(e,t,a,!0,s,i)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{l?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function os(e,t,a,r=!1,i="",s=""){i=i?rs(i):"";const l=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(f=>f.cssText)}catch{return[]}}).join(`
859
+ `),C=v===-1?a:a.slice(0,v);s("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(Vv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const v=p[0];s(i&&Hv.has(v)?"command":"identifier",v),a=a.slice(v.length);continue}const f=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(f){s("operator",f[0]),a=a.slice(f[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function Uv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:i="default",className:s=""}){const{t:l}=xe.useTranslation(),[u,c]=o.useState(!1),d=Wv(fu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await RC(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},f=qv(d,t),b=i==="small"?"caption-1":"body-3";return n.jsxs("div",{className:_e("code-box",i==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":l("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(me,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?l("common.copied","\uBCF5\uC0AC\uB428"):l("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:f.map((v,C)=>n.jsx("span",{className:`code-token ${v.type} ${b}`,children:v.content},C))})})]})}const Gv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=xe.useTranslation(),{variant:a="spinner",size:r=24,progress:i=null,label:s}=e||{},l=s||t("loader.loading","Loading");if(a==="bar"){const c=i==null||!Number.isFinite(Number(i)),d=c?0:Math.max(0,Math.min(100,Number(i)));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":l,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":l,children:[n.jsx("span",{style:Gv,children:l}),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"})]})]})}function Cu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:i,labelPosition:s="right",className:l="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${l}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&i?i:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function gu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:i,size:s="medium",className:l,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:_e("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",l),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:f=>{t?.(f.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!i&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),i&&n.jsx("span",{className:"checkbox__label body-3",children:i})]})}function Kv({count:e,actions:t,onClear:a,clearLabel:r,visible:i,content:s,max:l}){const{t:u}=xe.useTranslation(),c=i!==void 0?i:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),f=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,A=b.current;if(b.current=c,c&&!A){const y=typeof document<"u"?document.activeElement:null;f.current=y&&y!==document.body&&!g?.contains(y)?y:null}else!c&&A&&g&&g.contains(document.activeElement)&&sr(g,f.current)},[c]);const[v,C]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const A=E=>{h.current=E,C(E)},y=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){A(!1);return}const N=D[0].offsetTop,O=D.some($=>$.offsetTop!==N);if(!h.current){_.current=g.clientWidth,O&&A(!0);return}if(O)return;const P=D[0],G=D[D.length-1],L=G.offsetLeft+G.offsetWidth-P.offsetLeft,M=_.current;(M==null||L<=M)&&A(!1)};if(y(),typeof ResizeObserver>"u")return;const k=new ResizeObserver(y);k.observe(g);const x=g.parentElement;let w=x?.clientWidth??0;const B=new ResizeObserver(()=>{const E=x?.clientWidth??0;E!==w&&(w=E,_.current=null,y())});return x&&B.observe(x),()=>{k.disconnect(),B.disconnect()}},[s,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:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),l!==void 0&&n.jsx(At,{size:"small",fill:"soft",variant:"main",label:`${e} / ${l}`,"aria-label":u("common.selectedOfMax",{count:e,max:l,defaultValue:`\uCD5C\uB300 ${l}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${v?" bulk-bar__actions--stacked":""}`,children:[n.jsx(me,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,A)=>n.jsx(me,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},A))]})]})}const Yv=[{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:_e("item-actions",a),children:Yv.map(({key:r,icon:i,closeFirst:s})=>{const l=e[r];if(!l)return null;const u=r==="publish"?l.published?l.unpublish:l.publish:l;return n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:i,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function bu(e,t){const a=()=>{if(e){const[C,h]=e.split("-");return{y:+C,m:+h-1}}const[b,v]=oo(t).split("-");return{y:+b,m:+v-1}},[r,i]=o.useState(()=>a().y),[s,l]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();i(b.y),l(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const v=c.current.y*12+c.current.m+b,C=Math.floor(v/12),h=v-C*12;c.current={y:C,m:h},i(C),l(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),f=o.useCallback((b,v)=>{c.current={y:b,m:v},i(b),l(v)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:f}}function fr(e,t){return new Date(e,t+1,0).getDate()}function Xv(e,t){return new Date(e,t,1).getDay()}function Cr(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Jv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Qv(e,t,a,r){const i=a?+a.split("-")[0]:e-10,s=r?+r.split("-")[0]:e+10,l=[];for(let u=i;u<=s;u++)for(let c=0;c<12;c++){const d=`${u}-${String(c+1).padStart(2,"0")}`;a&&d<a.slice(0,7)||r&&d>r.slice(0,7)||l.push({value:d,label:t(u,c+1)})}return l}function e4({value:e,onChange:t,size:a=48,min:r,max:i,disabled:s,placeholder:l,className:u,today:c}){const{t:d,i18n:m}=xe.useTranslation(),p=l??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),f=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=oo(c),{viewY:v,viewM:C,prevMonth:h,nextMonth:_,setViewYM:g}=bu(e,c),A=o.useId(),y=o.useCallback((I,S)=>{const j=window.innerHeight,F=window.innerWidth,U=typeof document<"u"?document.getElementById(A):null,ae=Math.max(U?.offsetHeight||0,U?.scrollHeight||0)||300,te=Math.max(I.width,U?.offsetWidth||0,260),le=j-I.bottom,K=I.top,re=le<ae&&K>le,ke=8,Z=(Q,he)=>Math.min(Math.max(ke,Q),Math.max(ke,he));return{position:"fixed",left:Z(I.left,F-te-ke),width:I.width,minWidth:260,...re?{top:"auto",bottom:Z(j-I.top+6,j-ae-ke)}:{bottom:"auto",top:Z(I.bottom+6,j-ae-ke)},zIndex:Ia(S)}},[A]),{open:k,setOpen:x,toggle:w,style:B,triggerRef:E,menuRef:D}=Fa({computeStyle:y,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!k)return;const I=D.current;return(I?.querySelector(".date-picker__day--selected:not(:disabled)")??I?.querySelector(".date-picker__day--today:not(:disabled)")??I?.querySelector(".date-picker__day:not(:disabled)")??I?.querySelector(Cn)??I)?.focus?.(),()=>{const S=document.activeElement;(!S||S===document.body)&&E.current?.focus?.()}},[k,D,E]);const[N,O]=o.useState(1),P=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!k)return;const I=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;O(I)},[k]),o.useEffect(()=>{if(G.current==null)return;const I=G.current;G.current=null,P.current?.querySelector(`[data-day="${I}"]`)?.focus()}),o.useEffect(()=>{O(I=>Math.min(I,fr(v,C)))},[v,C]);const L=o.useCallback(I=>{let S=Cr(I.getFullYear(),I.getMonth(),I.getDate());r&&S<r&&(S=r),i&&S>i&&(S=i);const[j,F,U]=S.split("-").map(Number);(j!==v||F-1!==C)&&g(j,F-1),O(U),G.current=U},[r,i,v,C,g]),M=o.useCallback(I=>{const S=new Date(v,C,N),j=U=>{S.setDate(S.getDate()+U),L(S)},F=U=>{const ae=S.getFullYear()*12+S.getMonth()+U,te=Math.floor(ae/12),le=ae-te*12;L(new Date(te,le,Math.min(S.getDate(),fr(te,le))))};switch(I.key){case"ArrowLeft":j(-1);break;case"ArrowRight":j(1);break;case"ArrowUp":j(-7);break;case"ArrowDown":j(7);break;case"Home":j(-S.getDay());break;case"End":j(6-S.getDay());break;case"PageUp":I.shiftKey?F(-12):F(-1);break;case"PageDown":I.shiftKey?F(12):F(1);break;default:return}I.preventDefault()},[v,C,N,L]),$=o.useCallback(I=>{s||(t(Cr(v,C,I)),x(!1))},[v,C,t,x,s]);o.useEffect(()=>{s&&x(!1)},[s,x]);const Y=I=>{const S=Cr(v,C,I);return!!(r&&S<r||i&&S>i)},q=(()=>{const I=fr(v,C);if(N>=1&&N<=I&&!Y(N))return N;for(let S=1;S<=I;S++)if(!Y(S))return S;return-1})(),z=[];for(let I=0;I<Xv(v,C);I++)z.push(null);for(let I=1;I<=fr(v,C);I++)z.push(I);const V=a===64?20:a===40?16:18,R=Qv(v,(I,S)=>nr(d,m.language,I,S),r,i),H=`${v}-${String(C+1).padStart(2,"0")}`,W=k?en.createPortal(n.jsxs("div",{ref:D,id:A,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:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Rs,{size:16,strokeWidth:2})}),n.jsx(pn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYearMonth","\uC5F0\uC6D4 \uC120\uD0DD"),options:R,value:H,onChange:I=>{const[S,j]=I.split("-");g(+S,+j-1)},block:!0,size:40}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:P,onKeyDown:M,children:[f.map(I=>n.jsx("div",{className:"date-picker__dow caption-1",children:I},I)),z.map((I,S)=>{if(I===null)return n.jsx("div",{},`e${S}`);const j=Cr(v,C,I),F=j===e,U=j===b,ae=Y(I),te=S%7;return n.jsx("button",{type:"button",disabled:ae,"data-day":I,tabIndex:I===q?0:-1,"aria-current":U?"date":void 0,onClick:()=>!ae&&$(I),className:_e("date-picker__day caption-1",F&&"date-picker__day--selected",U&&!F&&"date-picker__day--today",ae&&"date-picker__day--disabled",te===0&&"date-picker__day--sun",te===6&&"date-picker__day--sat"),children:I},I)})]})]}),document.body):null;return n.jsxs("div",{className:_e("date-picker",`date-picker--s${a}`,k&&"date-picker--open",u),children:[n.jsxs("button",{ref:E,type:"button",className:"date-picker__trigger body-2",onClick:()=>!s&&w(),disabled:s,"aria-haspopup":"true","aria-expanded":k,children:[n.jsx("span",{className:e?"date-picker__value":"date-picker__placeholder",children:e?Jv(e):p}),n.jsx(Us,{size:V,className:"date-picker__icon",strokeWidth:1.5})]}),W]})}function t4({src:e,alt:t,className:a,style:r,tone:i,textColor:s}){const l=!i&&!!s,u=C2(e,l),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return i?n.jsx("span",{className:_e("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":i},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):l&&u?n.jsx("span",{className:_e("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":s},dangerouslySetInnerHTML:{__html:h2(m2(u),c)}}):n.jsx("img",{src:e,alt:t,className:_e("brand-logo",a),style:r,draggable:!1})}function yu({children:e,className:t}){const a=o.useRef(null),[r,i]=o.useState(null);return o.useEffect(()=>{i(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const l=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(l(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>l());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:_e("section-head-float",t),children:e})}function Po({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ka({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Io({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:i,headRight:s,headFloat:l,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:f,totalNum:b,totalUnit:v,totalLabel:C,subRow:h,subRowAlign:_="start",className:g,inGrid:A=!1,children:y}){const{t:k}=xe.useTranslation(),x=o.useRef(null),{anchorRect:w,openAt:B,close:E}=Pa(),D=o.useCallback(()=>{f&&x.current&&B(x.current)},[f,B]),[N,O]=o.useState(!1);$o(()=>{const S=x.current;if(!S||!u)return;const j=U=>O(U>0&&U<d);if(j(S.clientWidth),typeof ResizeObserver>"u")return;const F=new ResizeObserver(U=>j(U[0].contentRect.width));return F.observe(S),()=>F.disconnect()},[u,d]);const[P,G]=o.useState(null),L=o.useCallback(()=>G(null),[]),M=o.useCallback(S=>{const j=S.currentTarget.getBoundingClientRect();G(F=>F?null:{left:j.left,right:j.right,top:j.top,bottom:j.bottom,width:j.width,height:j.height,x:j.x,y:j.y})},[]),$=!!u&&N;o.useEffect(()=>{$||G(null)},[$]);const Y=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,j)=>j===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const j=S.target;j&&typeof j.closest=="function"&&j.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),z=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),V=typeof s=="function"?s({collapsed:$}):s,R=b!=null||C?n.jsxs(Ka,{label:C,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),v&&n.jsx("span",{className:"barchart-total__unit h5",children:v})]}):null,H=V||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&($?n.jsx(me,{htmlType:"button",size:32,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":!!P,onClick:M}):n.jsx(gn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),V]}):null,W=o.useId(),I=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:["manager-section",A&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?z:void 0,onPointerEnter:f?D:void 0,onPointerLeave:f?E:void 0,onFocus:f?D:void 0,onBlur:f?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[f&&w&&n.jsx(Bn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:f}),l&&n.jsx(yu,{children:l}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(at,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(I,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),H,i&&n.jsx("div",{className:"manager-section__disc body-3",children:i})]}),(R||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[R,h]}),y,P&&n.jsx(cn,{anchorRect:P,onClose:L,ariaLabel:u?.ariaLabel??k("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:Y}],onClose:L,size:"small"})})]})}const Ya=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Fo=e=>Ya(e.getFullYear(),e.getMonth()+1);function ma(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 Oo=(e,t)=>`${e}#${t}`;function bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function n4(){const e=ia();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<bn(t,a)){const l=new Date(t,a,0);t=l.getFullYear(),a=l.getMonth(),r=l.getDate()}const i=Math.floor((r-bn(t,a))/7),s=Ya(t,a+1);return{monthKey:s,value:Oo(s,i)}}function a4(e){const t=ia(),a=Fo(t),r=(c,d)=>Ya(c,d+1),i=new Map;i.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());i.has(d)||i.set(d,[]),i.get(d).push(c)}for(const[c,d]of[...i.entries()]){const m=ma(c);if(!m)continue;const p=m.year,f=m.month1-1,b=bn(p,f);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const v=new Date(p,f,0),C=r(v.getFullYear(),v.getMonth());i.has(C)||i.set(C,[])}const s=new Map;for(const[c,d]of i){const m=ma(c);if(!m)continue;const p=m.year,f=m.month1-1,b=new Date(p,f+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),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(v).fill(0)),A=Array.from({length:b+1},()=>new Array(v).fill(0));for(const y of d){const k=y.date.getDate();if(h[k]+=y.a,_[k]+=y.b,y.parts)for(let x=0;x<v;x++)g[k][x]+=y.parts[x]??0;if(y.partsB)for(let x=0;x<v;x++)A[k][x]+=y.partsB[x]??0}s.set(c,{year:p,month:f,daysInMonth:b,partsLen:v,hasPartsB:C,dayA:h,dayB:_,dayParts:g,dayPartsB:A})}const l=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:f,dayA:b,dayB:v,dayParts:C,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),A=s.get(r(p===11?m+1:m,(p+1)%12)),y=d.partsLen,k=[];for(let w=1;w<=f;w++){const B=_&&w>g;k.push({label:String(w),...B&&b[w]===0&&v[w]===0?{future:!0}:{},a:B&&b[w]===0&&v[w]===0?-1:b[w],b:v[w],...y?{parts:C[w]}:{},...y&&d.hasPartsB?{partsB:h[w]}:{}})}const x=[];for(let w=bn(m,p);w<=f;w+=7){const B=Math.max(0,w+6-f),E=B&&A?Math.max(y,A.partsLen):y,D=d.hasPartsB||!!(B&&A?.hasPartsB);let N=0,O=0;const P=new Array(E).fill(0),G=new Array(E).fill(0);for(let M=w;M<=Math.min(w+6,f);M++){N+=b[M],O+=v[M];for(let $=0;$<y;$++)P[$]+=C[M][$],G[$]+=h[M][$]}if(B&&A)for(let M=1;M<=B&&!l(A.year,A.month,M);M++){N+=A.dayA[M],O+=A.dayB[M];for(let $=0;$<A.partsLen;$++)P[$]+=A.dayParts[M][$],G[$]+=A.dayPartsB[M][$]}const L=B?`${(p+1)%12+1}/${B}`:`${w+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:O,...E?{parts:P}:{},...E&&D?{partsB:G}:{}})}u[c]={weekly:x,daily:k}}return u}function vu(){const e=ia(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let i=2024;i<=t;i++){const s=i===t?a:12;for(let l=1;l<=s;l++)r.push({value:Ya(i,l),year:i,month:l})}return r.reverse()}vu();function r4(){return vu()}function xu(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 _u(e){const{t,i18n:a}=xe.useTranslation(),[r,i]=o.useState("week"),s=o.useMemo(()=>r4().filter(E=>E.value in e),[e]),l=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),O=bn(D.year,D.month-1),P=Math.ceil((N-O+1)/7);for(let G=P-1;G>=0;G--)E.push({value:Oo(D.value,G),monthKey:D.value,year:D.year,month:D.month,week:G})}return E},[s]),u=o.useCallback(E=>`${nr(t,a.language,E.year,E.month)} ${xu(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:nr(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>l.map(E=>({value:E.value,label:u(E)})),[l,u]),m=o.useMemo(()=>n4(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),f=o.useMemo(()=>l.find(E=>E.value===m.value)?.value??l[0]?.value??"",[l,m]),[b,v]=o.useState(""),[C,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||v(p)},[s,b,p]),o.useEffect(()=>{l.find(E=>E.value===C)||h(f)},[l,C,f]);const _=r==="month"?c:d,g=r==="month"?b:C,A=r==="month"?v:h,y=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===g),x=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&A(_[E+1].value)},[_,g,A]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&A(_[E-1].value)},[_,g,A]),B=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:i,range:g,setRange:A,activeOptions:_,activeIdx:k,handlePrev:x,handleNext:w,periodOptions:B,monthRange:b,weekRange:C,weekRanges:l,DOW:y}}const _t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function En(e,t=!0){return e.future===!0||t&&e.a===-1}function o4({data:e,colorA:t,colorB:a,labelA:r,labelB:i,barWidth:s=10,barGap:l=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:f,grouped:b=!1,baseline:v,focusableBars:C=!1}){const h=!a,_=!!(m&&m.length>0),g=v,A=o.useMemo(()=>_?Math.max(0,...e.filter(z=>!En(z,g==null)).map(z=>b?Math.max(0,...(z.parts??[]).map(_t)):(z.parts??[]).reduce((V,R)=>V+Math.max(0,_t(R)),0))):Math.max(0,...e.filter(z=>!En(z,g==null)).flatMap(z=>h?[_t(z.a)]:[_t(z.a),_t(z.b)])),[e,h,_,b]),y=o.useMemo(()=>{if(g==null)return 0;const z=e.filter(V=>!En(V,g==null)).flatMap(V=>_?(V.parts??[]).map(_t):h?[_t(V.a)]:[_t(V.a),_t(V.b)]);return Math.max(0,...z.map(V=>Math.abs(V-g)))},[e,g,_,h]),k=o.useMemo(()=>{const z=g!=null?y:A;return c??(d?z>0?z:10:Math.ceil(z/10)*10||10)},[A,y,g,c,d]),x=u,w=_?b?Math.max(1,m.length):1:h?1:2,B={"--bar-width":`${o.useMemo(()=>{const z=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(z*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,l)}px`},D=o.useMemo(()=>{const z=Math.round(k/2);return g!=null?[g+k,...z!==k?[g+z]:[],g,...z!==k?[g-z]:[],g-k]:z!==k?[k,z,0]:[k,0]},[k,g]),N=z=>g!=null?1-(z-(g-k))/(2*k):1-z/k,[O,P]=o.useState(null),G=o.useCallback(()=>P(null),[]),L=o.useCallback((z,V)=>{const R=[z.label,z.sublabel].filter(Boolean).join(" ");let H;if(_&&b&&z.rawPartsB)H=(p??[]).map((W,I)=>{const S=z.rawPartsB[I]??0;return{text:S>0?`${W}: ${V[I]??0}% (${z.rawParts?.[I]??0}/${S})`:`${W}: -`,color:(m??[])[I]}});else if(_&&b)H=(p??[]).map((W,I)=>({text:`${W}: ${Y(V[I]??0)}`,color:(m??[])[I]}));else if(_){const W=(p??[]).map((S,j)=>({text:`${S}: ${V[j]??0}`,color:(m??[])[j]})),I=W.filter((S,j)=>(V[j]??0)>0);H=I.length?I:W}else f&&!h?H=[{text:`${r} ${_t(z.a)}%`,color:t},{text:`${i} ${_t(z.b)}%`,color:a}]:f&&z.rawB!==void 0?H=[{text:`${f.total} ${z.rawB}`},{text:`${f.done} ${z.rawA??0}`,color:t}]:h?H=[{text:`${r}: ${_t(z.a)}`,color:t}]:H=[{text:`${r}: ${_t(z.a)}`,color:t},{text:`${i}: ${_t(z.b)}`,color:a}];return{title:R,items:H}},[_,b,p,m,f,h,r,i,t,a,g]),M=o.useCallback((z,V,R)=>{const H=z.getBoundingClientRect(),{title:W,items:I}=L(V,R);P({rect:{left:H.left,top:H.top,right:H.right,bottom:H.bottom,width:H.width,height:H.height},title:W,items:I})},[L]),$=o.useCallback((z,V)=>{const{title:R,items:H}=L(z,V);return[R,...H.map(W=>W.text)].filter(Boolean).join(", ")},[L]),Y=z=>g!=null&&z>g?`+${z}`:`${z}`,q=O!=null;return o.useEffect(()=>{if(!q)return;const z=()=>P(null),V=R=>{const H=R.target;H&&typeof H.closest=="function"&&H.closest(".manager-bar-chart-col")||P(null)};return window.addEventListener("scroll",z,!0),document.addEventListener("pointerdown",V,!0),()=>{window.removeEventListener("scroll",z,!0),document.removeEventListener("pointerdown",V,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:x},children:[D.slice(0,-1).map((z,V)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&z===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(z)*x},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:z})},V)),e.map((z,V)=>{const R=En(z,g==null),H=x/2,W=F=>g!=null?Math.min(H,Math.abs(_t(F)-g)/k*H):Math.min(x,Math.max(0,_t(F)/k*x)),I=R?0:W(z.a),S=R?0:W(z.b),j=(z.parts??[]).map(_t);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-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?$(z,j):void 0,onMouseEnter:R?void 0:F=>M(F.currentTarget,z,j),onFocus:R||!C?void 0:F=>M(F.currentTarget,z,j),onBlur:C?G:void 0,onMouseLeave:G,children:!R&&(_&&b?(m??[]).map((F,U)=>{const ae=j[U]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:W(ae),background:F}},U);const te=_t(ae)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:B,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!te&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(ae),background:F}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:te&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(ae),background:F}})})]},U)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:B,children:(()=>{const F=j.reduce((ae,te,le)=>te>0?le:ae,-1);let U=x;return j.map((ae,te)=>{if(ae<=0)return null;const le=Math.min(U,ae/k*x);return U-=le,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:le,background:(m??[])[te],borderRadius:te===F?"6px 6px 0 0":void 0}},te)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:_t(z.a),c:t},...h?[]:[{v:_t(z.b),c:a}]].map(({v:F,c:U},ae)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:B,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:F>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(F),background:U}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:F<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(F),background:U}})})]},ae))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:I,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...B,height:S,background:a}})]}))},V)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((z,V)=>{const R=En(z,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${R?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[z.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),z.label]}),z.sublabel&&n.jsx("span",{className:"caption-1",children:z.sublabel})]},V)})})]})})}),O&&n.jsx(Kn,{anchorRect:O.rect,title:O.title,items:O.items,showIndex:!1,closeOnOutsideClick:!1})]})}function wu({control:e}){const{t}=xe.useTranslation(),{activeOptions:a,activeIdx:r,range:i,setRange:s,handlePrev:l,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),f=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:l}),n.jsx(pn,{value:i,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(me,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:f,showTooltipInfo:f,disabled:r<=0,onClick:u}),n.jsx(gn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function zo(e,t,a,r=!0){const i=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,l)=>{const u=new Date(t);u.setDate(t.getDate()+l);const c=(e[Fo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&En(c,r)||u>i;return{dt:u,entry:c,isFuture:d}})}function s4(e,t,a,r=!0){const{period:i,monthRange:s,weekRange:l,weekRanges:u,DOW:c}=t,d=ia(),m=d.getFullYear(),p=d.getMonth()+1,f=d.getDate();if(i==="month"){const C=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,A=_&&g?bn(_,g-1):1;return C.weekly.map((y,k)=>{const x=k+1;let w=y.label,B=!1,E=!1;if(_&&g){const D=A+k*7,N=new Date(_,g-1,D+6),O=N.getMonth()+1,P=N.getDate(),G=O===g?`${P}`:`${O}/${P}`;w=a("manager.chart.weekRange",{start:D,end:G});const L=new Date(m,p-1,f).getTime();B=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>f)}return{...y,label:w,sublabel:xu(a,x-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===l);if(!b)return[];const v=new Date(b.year,b.month-1,bn(b.year,b.month-1)+b.week*7);return zo(e,v,d,r).map(({dt:C,entry:h,isFuture:_})=>{const g=C.getMonth()+1,A=C.getDate(),y=C.getFullYear();return{label:g===b.month&&y===b.year?`${A}`:`${g}/${A}`,sublabel:c[C.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:y===m&&g===p&&A===f,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const i4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function l4({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:i,data:s,colorA:l,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:f,control:b,hideControls:v=!1,rate:C=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:A,series:y,seriesMode:k="stack",loading:x=!1,onDetail:w,headExtra:B,headSegment:E,icon:D,disc:N,onClick:O,cardAriaLabel:P,cardTooltip:G,detailSize:L=32,barGap:M,baseline:$,className:Y,inGrid:q=!1}){const{t:z}=xe.useTranslation(),V=i4[t],R=_u(s),H=b??R,W=o.useMemo(()=>s4(s,H,z,$==null),[s,H,z,$]),I=k==="group"&&!!y&&y.length>0;M!=null&&!I&&St("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!C)return W;const K=H.period==="month"?ma(H.monthRange):null,re=ia(),ke=y?.length??0,Z=Q=>{const he=[],De=[],ye=[];for(let de=0;de<ke;de++){let ie=0,ge=0,fe=0;for(const ue of Q){const Me=_t(ue.a[de]),ze=_t(ue.b[de]);ze<=0||(ie+=Me,ge+=ze,fe+=Me/ze*100)}he.push(h==="weighted"?ge>0?Math.round(ie/ge*100):0:Q.length?Math.round(fe/Q.length):0),De.push(ie),ye.push(ge)}return{pct:he,ra:De,rb:ye}};return W.map((Q,he)=>{let De=Q.a===-1?-1:Q.b>0?Math.round(Q.a/Q.b*100):0;if(K&&!En(Q)){const de=K.year,ie=K.month1-1,ge=zo(s,new Date(de,ie,bn(de,ie)+he*7),re).filter(fe=>!fe.isFuture);if(h==="weighted"){let fe=0,ue=0;for(const{entry:Me}of ge)Me&&Me.b>0&&(fe+=Me.a,ue+=Me.b);De=ue>0?Math.round(fe/ue*100):0}else De=ge.length?Math.round(ge.reduce((fe,{entry:ue})=>fe+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/ge.length):0}let ye=null;if(I&&!En(Q)){let de;if(K){const ge=K.year,fe=K.month1-1;de=zo(s,new Date(ge,fe,bn(ge,fe)+he*7),re).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else de=[{a:Q.parts??[],b:Q.partsB??[]}];const ie=Z(de);ye={parts:ie.pct,rawParts:ie.ra,rawPartsB:ie.rb}}return{...Q,a:De,b:Q.a===-1?0:d&&Q.parts&&Q.parts[1]>0?Math.round(Q.parts[0]/Q.parts[1]*100):0,rawA:Q.a===-1?-1:Q.a,rawB:Q.b,...ye??{}}})},[W,C,h,d,H.period,H.monthRange,s,I,y?.length]),j=o.useMemo(()=>{if(C||g){const re=(H.period==="week"?W:s[H.monthRange]?.daily??[]).filter(Z=>Z.a!==-1);if(re.length===0)return 0;if(C&&h==="weighted"){let Z=0,Q=0;for(const he of re)he.b>0&&(Z+=he.a,Q+=he.b);return Q>0?Math.round(Z/Q*100):0}const ke=C?re.reduce((Z,Q)=>Z+(Q.b>0?Q.a/Q.b*100:0),0):re.reduce((Z,Q)=>Z+(Q.a>0?Q.a:0),0);return Math.round(ke/re.length)}const K=H.period==="month"?s[H.monthRange]?.daily??[]:S;return $!=null?K.reduce((re,ke)=>re+(En(ke,!1)?0:_t(ke.a)+(d?_t(ke.b):0)),0):K.reduce((re,ke)=>re+(ke.a>0?ke.a:0)+(d&&ke.b>0?ke.b:0),0)},[S,W,C,h,g,$,d,H.period,H.monthRange,s]),F=y&&y.length>0?y.map(K=>({color:K.color,label:K.label})):[{color:l,label:z(c)},...d?[{color:u,label:z(d)}]:[]],U=t==="small",ae=[U?"manager-section--compact":t==="large"?"manager-section--full":void 0,Y].filter(Boolean).join(" ")||void 0,te=r?z(r):"",le=te?z("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):z("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Io,{className:ae,inGrid:q,icon:D,disc:N,onClick:O,ariaLabel:P,tooltip:G,headSegment:E,headMenuItems:w?[{label:le,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:z(r),titleLevel:i,titleClassName:U?"h5 chart-section-title--small":void 0,headRight:U?B??void 0:({collapsed:K})=>n.jsxs(n.Fragment,{children:[!v&&n.jsx(wu,{control:H}),B,w&&!K&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(me,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:le,showTooltipInfo:le,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?C||g||f&&A?n.jsx(Ka,{label:U?void 0:`${z(H.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${z(f??c)}`,children:A?(A(j).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((K,re)=>/\d/.test(K)?n.jsx("span",{className:"barchart-total__num h0",children:K},re):n.jsx("span",{className:"barchart-total__unit h5",children:K},re)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:j}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:z(p)})]})}):n.jsxs(Ka,{children:[n.jsx("span",{className:"barchart-total__num h0",children:j}),n.jsx("span",{className:"barchart-total__unit h5",children:z(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:z(p)})]}):n.jsx("span",{}),n.jsx(Po,{items:F,className:"caption-1"})]}),children:x?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:V.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(K=>!!K.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(o4,{focusableBars:e,data:S,colorA:l,colorB:d?u:void 0,labelA:z(c),labelB:d?z(d):void 0,barWidth:a??V.barWidth,barGap:M,baseline:$,height:V.height,maxOverride:C?100:void 0,tightMax:_,seriesColors:y?.map(K=>K.color),seriesLabels:y?.map(K=>K.label),rateLabels:C?{total:z("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:z("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:I})})}const Bu=120,u4={left:38,right:16,top:26,bottom:24};function c4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:i,height:s=156,fallbackWidth:l=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,f]=o.useState(null),[b,v]=o.useState(null);o.useEffect(()=>{if(!b)return;const $=q=>f(Math.round(q)||null);if($(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const Y=new ResizeObserver(([q])=>$(q.contentRect.width));return Y.observe(b),()=>{Y.disconnect()}},[b]);const{payload:C,anchorRect:h,openAfterDelay:_,close:g}=l2(Bu),A=o.useCallback(($,Y)=>{$&&_($,Y.getBoundingClientRect())},[_]),y=p??l,k=s,{left:x,right:w,top:B,bottom:E}={...u4,...u},[D,N]=t,O=$=>N===D?x:x+(y-x-w)*($-D)/(N-D),P=$=>B+(k-B-E)*(100-$)/100,G={x:O,y:P,plot:{left:x,right:y-w,top:B,bottom:k-E,width:Math.max(0,y-x-w),height:Math.max(0,k-B-E)}},L=e.filter($=>!$.hollow),M=i??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:_e("line-chart",m),viewBox:`0 0 ${y} ${k}`,role:"img","aria-label":d??e.map($=>$.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map($=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:y-w,y1:P($),y2:P($)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:P($)+4,textAnchor:"end",children:[$,"%"]})]},$)),c?.(G),a.map($=>n.jsx("text",{className:"line-chart__tick",x:O($.x),y:k-5,textAnchor:"middle",children:$.label},$.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:M,points:L.map($=>`${O($.x)},${P($.pct)}`).join(" ")}),e.map($=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:Y=>A($.description,Y.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:O($.x),cy:P($.pct),r:12}),n.jsx("circle",{className:_e("line-chart__dot-main",$.hollow&&"is-hollow"),cx:O($.x),cy:P($.pct),r:4,stroke:M,fill:$.hollow?void 0:M})]},$.x))]}),C!=null&&n.jsx(cn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function d4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:i,tipGroups:s,start:l,className:u}){return n.jsxs("div",{className:_e("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:_e("game-intro__title",r),children:a}),i!=null&&n.jsx("p",{className:"game-intro__description body-3",children:i}),s?.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((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),l&&n.jsx(me,{htmlType:"button",className:l.className,variant:"main",color:l.color,size:48,width:"100%",disabled:l.disabled,onClick:l.onClick,children:l.label})]})}const ku=(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")}`},Au=(e,t,a,r)=>({from:Pi(e,t,a),to:new Date(Pi(e,t,a+r).getTime()-1),fromYmd:ku(e,t,a),toYmd:ku(e,t,a+r-1)});function p4(e,t=0){if(e.period==="month"){const i=ma(e.monthRange),s=ia(),l=i?i.year:s.getFullYear(),u=(i?i.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(l,u+1,0)).getUTCDate();return Au(l,u,1,c)}const a=e.weekRanges.find(i=>i.value===e.weekRange);if(!a){const i=new Date,s=La();return{from:i,to:i,fromYmd:s,toYmd:s}}const r=bn(a.year,a.month-1);return Au(a.year,a.month-1,r+(a.week+t)*7,7)}const Wo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Nu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Eu({done:e,total:t,segments:a,color:r="var(--color-main)",size:i="medium",strokeWidth:s,label:l="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof i=="number"?i:Wo[i].diameter,m=s??(typeof i=="number"?12:Wo[i].strokeWidth),p=d/2,f=(d-m)/2,b=2*Math.PI*f;if(a&&a.length>0){const _=a.reduce((g,A)=>{const y=g.length>0?g[g.length-1].acc:0,k=Number.isFinite(A.ratio)?A.ratio:0,x=Math.max(0,Math.min(k,1-y));return g.push({color:A.color,rotate:-90+y*360,dash:b*x,acc:y+x}),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:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,A)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:f,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},A))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,C=b*v,h=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:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),v>0&&n.jsx("circle",{cx:p,cy:p,r:f,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${C} ${h}`,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":i==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Nu(v)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||i==="medium"?" ring-chart__label--tight":""}`,children:l})]})]})}function m4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:i,totalLabelKey:s,legend:l,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:f,...b}){const{t:v}=xe.useTranslation();if(!e)return n.jsx(Eu,{...b});const C=(b.total??0)>0?Nu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Wo[b.size??"medium"].diameter,g=b.size==="large",A=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,y=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(at,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Io,{className:A,inGrid:d,onClick:m,ariaLabel:p,tooltip:f,title:v(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:y||(h?void 0:a),subRow:(i||l)&&n.jsxs(n.Fragment,{children:[i?n.jsxs(Ka,{label:!h&&s?v(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:C}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),l&&n.jsx(Po,{items:l})]}),children:u?n.jsx("div",{className:"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(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Eu,{...b,hideCenter:b.hideCenter??h})})})}function h4({label:e,value:t,change:a,changeType:r,icon:i,tooltip:s,onClick:l,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),f=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),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(h=>{l&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),l())},[l]);return n.jsxs("div",{ref:c,className:`manager-stat-card${l?" manager-stat-card--clickable":""}`,onClick:l,onKeyDown:l?C:void 0,onPointerEnter:f,onPointerLeave:p,onFocus:f,onBlur:p,role:l?"button":void 0,tabIndex:l?0:void 0,"aria-label":l?[e,t,v].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Bn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),i&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(at,{icon:i,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),v&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:v})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Du({value:e,onChange:t,min:a=0,max:r=100,step:i=1,orientation:s="horizontal",size:l=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:f,labelPos:b,labelAlign:v="right",showMinMax:C=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:A=!1,tickStep:y,tickShape:k="dot"}){t&&!c&&St("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)),w=r>a?(x-a)/(r-a):0,B=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,O={"--slider-ratio":String(w),"--slider-thumb":`${l}px`,...N?B?{height:N}:{width:N}:{}},P=y??i,G=(g||A)&&P>0&&r>a?Math.floor((r-a)/P+1e-6):0;if(G>0&&G<=100){const W=k!=="dash",I=ae=>W?`radial-gradient(circle, ${ae} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",j=[],F=[],U=[];for(let ae=0;ae<=G;ae++){const te=ae*P/(r-a);if(te>1+1e-6)break;const le=`${((B?1-te:te)*100).toFixed(4)}%`,K=te<=w+1e-6;if(K?!A:!g)continue;const re=K?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";j.push(I(re)),F.push(B?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),U.push(B?`center ${le}`:`${le} center`)}j.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))"),F.push("100% 100%"),U.push("0 0"),O.backgroundImage=j.join(", "),O.backgroundSize=F.join(", "),O.backgroundPosition=U.join(", "),O.backgroundRepeat="no-repeat"}const L=f?f(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&h?h:x===r&&_?_:void 0,M=n.jsx("input",{type:"range",className:_e("slider",`slider--${s}`,E&&"slider--static",!p&&!C&&m),min:a,max:r,step:i,value:x,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:O});if(!p&&!C)return M;const $=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),Y=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=C?n.jsxs("div",{className:_e("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[B?Y:$,M,B?$:Y]}):M;if(!p)return q;const z=b??(B?"bottom":"right"),V=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,R=f?f(x):p==="percent"?V:p==="count"?`${x} / ${r}`:String(x),H=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:_e("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${z}`,`slider-wrap--align-${v}`,m),children:[q,H]})}const f4=.86,C4=250,Ho=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Vo=(e,t,a,r)=>{const i=Ho(e,t,a,r);return`${i<0?"-":"+"}${Math.abs(i)} dB`};function qo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:i,labelPos:s,labelAlign:l="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:f}){const b=o.useRef(null),v=o.useRef(null),C=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const x=M=>{const $=Vo(M,c,d,m);C.current&&(C.current.textContent=$);const Y=b.current;Y&&(Y.setAttribute("aria-valuenow",String(Ho(M,c,d,m))),Y.setAttribute("aria-valuetext",$))},w=e??Hf(t)??(_&&_.el===t?_.node:null),B=v.current;if(!w||!B){B?.style.setProperty("--meter-level","0"),x(u);let M=!1;return!e&&t&&Qa(t).then($=>{!M&&$&&g({el:t,node:$})}),()=>{M=!0}}eo();const E=new Float32Array(w.fftSize);let D=0,N=0,O=0,P=0,G=null;const L=M=>{const $=Vf(w,E);D=$>D?$:D*f4;const Y=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,Y),z=q-c,V=Math.min(1,Math.max(0,(z-d)/(m-d)));if(B.style.setProperty("--meter-level",V.toFixed(3)),N+=q,O+=1,M-P>=C4){const R=N/O;G=G==null?R:G*.6+R*.4,x(G),N=0,O=0,P=M}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const A=typeof r=="number"?`${r}px`:r,y=n.jsx("div",{className:"audio-meter__track",style:A?a==="vertical"?{height:A}:{width:A}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),k=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:_e("audio-meter",`audio-meter--${a}`,i&&`audio-meter--label-${k}`,i&&`audio-meter--align-${l}`,p),role:"meter","aria-label":f,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Ho(u,c,d,m),"aria-valuetext":Vo(u,c,d,m),children:[y,i&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Vo(u,c,d,m)})]})}const Su=260;function Tu({message:e,position:t,duration:a,onClose:r}){const[i,s]=o.useState(!1),[l,u]=o.useState(!1),c=o.useRef(l),d=o.useRef(i);o.useEffect(()=>{c.current=l},[l]),o.useEffect(()=>{d.current=i},[i]);const m=o.useRef(null),p=o.useRef(""),f=o.useRef(r);o.useEffect(()=>{f.current=r});const b=a,v=o.useRef(null),C=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),A=o.useRef(null),y=o.useRef(null),k=o.useRef(null),x=o.useRef(()=>{});x.current=E=>{E<0||(C.current=Date.now(),h.current=E,v.current=setTimeout(()=>{v.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{f.current()}catch{}},Su)},E))};const w=o.useCallback(()=>{_.current||!v.current||(_.current=!0,clearTimeout(v.current),v.current=null,h.current=Math.max(0,h.current-(Date.now()-C.current)))},[]),B=o.useCallback(()=>{_.current&&(_.current=!1,x.current(h.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&&(_.current?h.current=b:x.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=m.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(),s(!0)):(u(!0),A.current=requestAnimationFrame(()=>{y.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,x.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),Su);return p.current=e,()=>{v.current&&clearTimeout(v.current),g.current&&clearTimeout(g.current),A.current&&cancelAnimationFrame(A.current),y.current&&cancelAnimationFrame(y.current),k.current&&clearTimeout(k.current),v.current=null,g.current=null,A.current=null,y.current=null,k.current=null}},[e,b,t]),{mounted:l,showing:i,popupRef:m,pause:w,resume:B}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:i=2e3}){const{mounted:s,showing:l,popupRef:u,pause:c,resume:d}=Tu({message:e,position:t,duration:i,onClose:r}),m=o.useRef(null),[p,f]=o.useState(!1);if(o.useEffect(()=>{l?f(!0):s||f(!1)},[l,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",v=n.jsx("div",{ref:u,className:`toast toast--${t} ${l?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{m.current=C.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||l?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?en.createPortal(v,document.body):v}const g4=24;function b4({value:e,max:t=100,size:a=8,color:r,trackColor:i,label:s,formatValue:l,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,f=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=f/p*100,v=Number.isFinite(t)&&t>0?t:0,C=u??(a>=g4?"inside":"bottom"),h=C==="center"?"inside":C,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),i&&(g["--progress-bar-track"]=i),n.jsxs("div",{className:_e("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":f,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":s?l?l(f):s==="percent"?void 0:s==="raw"?String(f):`${f} / ${v}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:l?l(f):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(f):`${f} / ${v}`})]})}const ju={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},y4="rgba(255, 255, 255, 0.16)";function Mu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:i,variant:s="numbered",announce:l=!1,ariaLabel:u}){const{t:c}=xe.useTranslation(),d=ln("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),f={};if(a&&(f["--pi-inactive-bg"]=a),r&&(f["--pi-inactive-color"]=r),i&&(a||(f["--pi-inactive-bg"]=y4),r||(f["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:f,role:l?"status":"img","aria-label":l?void 0:p,children:[l&&n.jsx("span",{style:ju,children:p}),Array.from({length:e}).map((v,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<m?" done":C===m?" active":""}`},C))]});const b=l?n.jsx("span",{role:"status",style:ju,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:f,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:f,role:"list","aria-label":p,children:Array.from({length:e}).map((v,C)=>n.jsx("span",{role:"listitem","aria-current":C===m?"step":void 0,className:`progress-indicator-dot ${C<m?" done":C===m?" active":""} body-3`,children:C+1},C))})]})}function v4(e){if(!e)return[];const t=[];let a=0,r="";for(const i of e.trim()){if(i==="("?a++:i===")"&&a--,/\s/.test(i)&&a===0){r&&(t.push(r),r="");continue}r+=i}return r&&t.push(r),t}function x4({children:e,className:t,style:a,rowLabel:r,onRowClick:i}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&i?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Uo({variant:e="default",children:t,className:a,draggable:r,onClick:i,onMouseEnter:s,onMouseLeave:l,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:f}){const b=o.useCallback(v=>{i&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i())},[i]);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":m,className:"table-row__full-cell",children:n.jsx(Ga,{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":m,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:i,onKeyDown:i?b:void 0,onMouseEnter:s,onMouseLeave:l,onDragStart:u,onDragEnd:c,role:"row",tabIndex:i&&!f?0:void 0,"aria-describedby":i&&!f?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function _4({dir:e}){return n.jsx(e==="asc"?Ks:Gs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function w4({children:e,onClick:t,className:a,sortDir:r,ariaSort:i,onResizeStart:s}){const l=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(_4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":i,className:_e("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:l}):l,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Go({fields:e=[],headerGroups:t,items:a=[],renderRow:r,onRowClick:i,isRowClickable:s,onRowMouseEnter:l,onRowMouseLeave:u,onRowDragStart:c,onRowDragEnd:d,draggingId:m,gridTemplateColumns:p,mobileGridTemplateColumns:f,resizable:b=!1,resizeMode:v="grow",resizeStorageKey:C,size:h="small",title:_,icon:g,count:A,collapsed:y=!1,onToggleCollapse:k,headerActions:x,empty:w,loading:B,dragOver:E=!1,onDragOver:D,onDragLeave:N,onDrop:O,renderExpandedRow:P,expandedId:G}){const{t:L}=xe.useTranslation(),M=o.useId(),$=`table-title-${M}`,Y=`table-row-hint-${M}`,q=ln("(max-width: 767px)"),z=f&&q?f:null,V=b&&!q,R=48,H=o.useRef(()=>R),W=C?`table-cols:${C}`:null,I=o.useRef(null),S=o.useRef(null),j=o.useRef(null),F=o.useRef(null),[U,ae]=o.useState(!1),[te,le]=o.useState(0),K=o.useCallback(()=>{const oe=j.current;oe&&(ae(oe.scrollWidth>oe.clientWidth+1),le(oe.clientWidth))},[]),re=o.useCallback((oe,Ne)=>{const Ve=oe.current;Ve&&S.current&&S.current.unobserve(Ve),oe.current=Ne,Ne?(!S.current&&typeof ResizeObserver<"u"&&(S.current=new ResizeObserver(()=>K())),S.current?.observe(Ne)):!j.current&&!F.current&&(S.current?.disconnect(),S.current=null),K()},[K]),ke=o.useCallback(oe=>re(j,oe),[re]),Z=o.useCallback(oe=>re(F,oe),[re]);o.useEffect(()=>{K()}),o.useEffect(()=>{if(typeof window>"u")return;const oe=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>K()):null;return window.addEventListener("resize",K),()=>{oe!=null&&cancelAnimationFrame(oe),window.removeEventListener("resize",K)}},[K]);const Q=o.useRef(()=>!1),he=o.useRef([]),De=o.useRef(null),ye=oe=>{if(!oe||typeof window>"u")return null;try{const Ne=JSON.parse(window.localStorage.getItem(oe)??"null");return Array.isArray(Ne)&&Ne.length>0&&Ne.every(Ve=>typeof Ve=="number"&&Number.isFinite(Ve)&&Ve>0)?Ne:null}catch{return null}},[de,ie]=o.useState(()=>ye(W)),[ge,fe]=o.useState(W),[ue,Me]=o.useState(()=>ye(W)!==null);if(ge!==W){fe(W);const oe=ye(W);ie(oe),Me(oe!==null)}const ze=o.useRef(de);o.useEffect(()=>{ze.current=de},[de]);const je=o.useCallback(oe=>{const Ne=De.current;if(!Ne)return;const Ve=ze.current;if(Ve){const nt=[...Ve];if(Ne.next!=null&&Ne.startWNext!=null){const Ie=oe.clientX-Ne.startX,Ge=Math.max(H.current(Ne.index)-Ne.startW,Math.min(Ne.startWNext-H.current(Ne.next),Ie));nt[Ne.index]=Ne.startW+Ge,nt[Ne.next]=Ne.startWNext-Ge}else nt[Ne.index]=Math.max(H.current(Ne.index),Ne.startW+(oe.clientX-Ne.startX));ze.current=nt,ie(nt)}},[]),Oe=o.useCallback(()=>{if(De.current=null,window.removeEventListener("pointermove",je),window.removeEventListener("pointerup",Oe),window.removeEventListener("pointercancel",Oe),document.body.style.cursor="",document.body.style.userSelect="",W&&ze.current)try{window.localStorage.setItem(W,JSON.stringify(ze.current))}catch{}},[je,W]),We=o.useCallback((oe,Ne)=>{Ne.preventDefault(),Ne.stopPropagation();const Ve=I.current;if(!Ve)return;const nt=Array.from(Ve.children).map(Ge=>Ge.getBoundingClientRect().width),Ie=v==="fit"?e.findIndex((Ge,bt)=>bt>oe&&Ge.resizable!==!1):-1;De.current=Ie>=0?{index:oe,startX:Ne.clientX,startW:nt[oe],next:Ie,startWNext:nt[Ie]}:{index:oe,startX:Ne.clientX,startW:nt[oe]},ze.current=nt,ie(nt),Me(!0),window.addEventListener("pointermove",je),window.addEventListener("pointerup",Oe),window.addEventListener("pointercancel",Oe),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[je,Oe,v,e]),mt=o.useCallback(()=>{const oe=I.current,Ne=oe?.closest(".table-wrap");if(!oe||!Ne)return null;const Ve=Ne.style.getPropertyValue("--table-grid-cols");Ne.style.setProperty("--table-grid-cols",e.map((et,ot)=>Q.current(ot)?he.current[ot]:"max-content").join(" "));const nt=Array.from(Ne.querySelectorAll(".table-row")).filter(et=>!et.classList.contains("table-row--loading")&&!et.classList.contains("table-row--empty")),Ie=e.map((et,ot)=>{let lt=oe.children[ot]?.getBoundingClientRect().width??0;for(const jt of nt){const Wt=jt.children[ot];Wt&&(lt=Math.max(lt,Wt.getBoundingClientRect().width))}const st=Q.current(ot)?parseFloat(he.current[ot]):NaN;return Number.isFinite(st)?st:Math.max(H.current(ot),Math.ceil(lt))}),Ge=window.getComputedStyle(oe),bt=oe.clientWidth-(parseFloat(Ge.paddingLeft)||0)-(parseFloat(Ge.paddingRight)||0);Ve?Ne.style.setProperty("--table-grid-cols",Ve):Ne.style.removeProperty("--table-grid-cols");let Re=Ie;const tt=Ie.reduce((et,ot,lt)=>et+(Q.current(lt)?ot:0),0),xt=Ie.reduce((et,ot,lt)=>et+(Q.current(lt)?0:ot),0),Lt=bt-tt;if(bt>0&&xt>0&&Lt>0){const et=Lt/xt;Re=Ie.map((lt,st)=>Q.current(st)?lt:Math.max(H.current(st),Math.round(lt*et)));const ot=Math.round(Lt-Re.reduce((lt,st,jt)=>lt+(Q.current(jt)?0:st),0));if(ot!==0){let lt=-1;Re.forEach((st,jt)=>{!Q.current(jt)&&(lt<0||st>Re[lt])&&(lt=jt)}),lt>=0&&(Re[lt]=Math.max(H.current(lt),Re[lt]+ot))}}return Re},[e,v]),ct=(oe,Ne)=>oe!==null&&oe.length===Ne.length&&oe.every((Ve,nt)=>Ve===Ne[nt]),rt=o.useRef(mt);o.useEffect(()=>{rt.current=mt});const[ft,Ae]=o.useState(0),qe=a.length>0,we=`${W??""}|${ft}|${e.length}|${te}`,Ue=!ue&&V&&W!==null&&!B?`${we}|${qe?1:0}`:null,Be=o.useRef(null);o.useEffect(()=>{if(Ue===null||!qe||Be.current===we)return;const oe=rt.current();oe&&(Be.current=we,ie(Ne=>ct(Ne,oe)?Ne:oe))},[Ue]);const Le=o.useCallback(()=>{if(W)try{window.localStorage.removeItem(W)}catch{}Me(!1);const oe=rt.current();ie(oe),ze.current=oe,Ae(Ne=>Ne+1)},[W]);o.useEffect(()=>()=>{De.current&&(window.removeEventListener("pointermove",je),window.removeEventListener("pointerup",Oe),window.removeEventListener("pointercancel",Oe),document.body.style.cursor="",document.body.style.userSelect="")},[je,Oe]);const Se=v4(p),Je=Se.filter(oe=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(oe));Je.length>0&&St(`table-content-track:${p}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${Je.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: ${p})`);const Qe=e.findIndex(oe=>!!oe.sortDir);e.filter(oe=>!!oe.sortDir).length>1&&St("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 dt=oe=>oe===Qe?e[oe].sortDir==="asc"?"ascending":"descending":e[oe].onClick?"none":void 0,ht=oe=>/^\d+(\.\d+)?px$/.test(Se[oe]??""),wt=oe=>{const Ne=Se[oe]??"",Ve=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ne)??/^(\d+(?:\.\d+)?)px$/.exec(Ne);return Ve?parseFloat(Ve[1]):R};Q.current=ht,H.current=wt,he.current=Se;const Ct=oe=>v==="fit"&&!ht(oe)?"fr":"px",Nt=de&&de.length===e.length&&!q,gt=z??(Nt?e.map((oe,Ne)=>oe.resizable===!1&&Se[Ne]?Se[Ne]:`${de[Ne]}${Ct(Ne)}`).join(" "):p),it=gt?{"--table-grid-cols":gt}:void 0,Ye=_!==void 0;return n.jsxs("div",{ref:ke,className:`table-wrap table-wrap--${h}${V?" table-wrap--resizable":""}${E?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:it,onDragOver:D,onDragLeave:N,onDrop:O,tabIndex:U?0:void 0,role:U?"region":void 0,"aria-label":U?typeof _=="string"?_:L("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:Y,className:"table-row-hint",children:L("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Z,role:"table","aria-labelledby":Ye&&typeof _=="string"?$:void 0,className:"table body-2",children:[Ye&&n.jsxs("div",{className:_e("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?L("common.expand","\uD3BC\uCE58\uAE30"):L("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),g&&n.jsx(at,{icon:g,label:typeof _=="string"?_:void 0,className:"table-header__icon"}),n.jsx("span",{id:$,className:"table-header__title h5b",children:_}),A!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:A}),x&&n.jsx("span",{className:"table-header__actions",onClick:oe=>oe.stopPropagation(),children:x})]}),!y&&n.jsxs(n.Fragment,{children:[t&&t.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:t.map((oe,Ne)=>n.jsx("div",{role:"columnheader","aria-colspan":oe.span,className:_e("table-field body-3",oe.className),style:{gridColumn:`span ${oe.span}`},children:oe.label},Ne))}),n.jsxs("div",{role:"presentation",className:_e("table-fields-strip",V&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:I,children:e.map((oe,Ne)=>n.jsx(w4,{onClick:oe.onClick,className:oe.className,sortDir:oe.sortDir,ariaSort:dt(Ne),onResizeStart:V&&Ne<e.length-1&&oe.resizable!==!1&&(v!=="fit"||e.some((Ve,nt)=>nt>Ne&&Ve.resizable!==!1))?Ve=>We(Ne,Ve):void 0,children:oe.label},Ne))}),V&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:Le})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(Uo,{variant:"loading",colSpan:e.length||void 0}):a.length===0&&w?n.jsx(Uo,{variant:"empty",colSpan:e.length||void 0,children:w}):a.map((oe,Ne)=>{const Ve=m!=null&&oe.id===m,nt=!!i&&(s?s(oe):!0),Ie=G!=null&&oe.id!=null&&(G instanceof Set?G.has(oe.id)||[...G].some(Ge=>String(Ge)===String(oe.id)):String(oe.id)===String(G));return n.jsx(Uo,{className:`${nt?" table-row--clickable":""}${c?" table-row--draggable":""}${Ve?" table-row--dragging":""}`.trim(),draggable:!!c,onClick:nt?()=>i(oe):void 0,colSpan:e.length||void 0,rowHasButton:r(oe).some(Ge=>!!Ge.rowLabel),describedBy:Y,onMouseEnter:l?Ge=>l(oe,Ge):void 0,onMouseLeave:u?Ge=>u(oe,Ge):void 0,onDragStart:c?Ge=>c(oe,Ge):void 0,onDragEnd:d?Ge=>d(oe,Ge):void 0,expandedContent:Ie&&P?P(oe):void 0,children:r(oe).map((Ge,bt)=>n.jsx(x4,{className:Ge.className,style:Ge.style,rowLabel:nt?Ge.rowLabel:void 0,onRowClick:nt?()=>i(oe):void 0,children:Ge.content},bt))},oe.id!=null?`${typeof oe.id}:${oe.id}`:`__idx:${Ne}`)})})]})]})]})}const B4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Lu(e){return e?B4[e]??null:null}function $u(e){switch(Lu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Ru(e,t){const a=Lu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const fa=e=>e==null?"":String(e).trim();function Ko(e,t,a,r){const i=fa(e),s=fa(t),l=fa(a);if(r&&i&&s&&l){const c=`${i.padStart(4,"0")}-${s.padStart(2,"0")}-${l.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Ri(c,r);if(m)return m}}const u=[i,s,l];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function k4(e,t,a){const r=fa(e);return r?`${r}-${fa(t).padStart(2,"0")}-${fa(a).padStart(2,"0")}`:""}function Pu(e,t){return t!=="wornAt"?String(e[t]??""):k4(e.wornYear,e.wornMonth,e.wornDay)}function A4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:i,onRelease:s,onAdd:l}){const{t:u,i18n:c}=xe.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=Qy(),f=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,A)=>{if(h==="worn"){const y=Number(A.worn)-Number(g.worn);return _?y:-y}return wo(Pu(g,h),Pu(A,h),_)})},[e,m]),{pageRows:b,pageSizeProps:v,paginationProps:C}=Jy(f,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Ro,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:v,pagination:C,actions:l&&n.jsx(me,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:l})}),n.jsx(Go,{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((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(gu,{checked:h.worn,disabled:h.worn?!s:!i,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?i?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx(At,{size:"small",variant:$u(h.device),fill:"soft",label:Ru(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Ko(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(me,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Iu(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 N4(e,t){return new Date(e,t+1,0).getDate()}function E4(e,t){return new Date(e,t,1).getDay()}function D4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:i}){const{t:s,i18n:l}=xe.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=oo(i),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,f]=o.useState(()=>Number(c.slice(5,7))-1),[b,v]=o.useState(null),C=o.useRef(null),h=o.useMemo(()=>{const x={};return e.forEach(w=>{x[w.date]||(x[w.date]=[]),x[w.date].push(w)}),x},[e]),_=o.useMemo(()=>{const x=N4(d,p),w=E4(d,p),B=[];for(let E=0;E<w;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]),g=o.useCallback(()=>{p===0?(m(x=>x-1),f(11)):f(x=>x-1)},[p]),A=o.useCallback(()=>{p===11?(m(x=>x+1),f(0)):f(x=>x+1)},[p]),y=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,k=x=>y(x)===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":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(at,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:nr(s,l.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:A,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(at,{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:s("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:s("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:s("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,w)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const B=x,E=y(B),D=h[E]??[],N=Ri(E,l.language),O=b===E;return n.jsxs("div",{className:`calendar-cell${k(B)?" today":""}${O?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":k(B)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?P=>{P.target===P.currentTarget&&(P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),r(E)))}:void 0,onDragOver:a?P=>{P.preventDefault(),v(E)}:void 0,onDragLeave:a?P=>{P.currentTarget.contains(P.relatedTarget)||v(null)}:void 0,onDrop:a?P=>{P.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 P=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),G=P.length===1&&P[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):P.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${G}`,children:[P.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((P,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${P.status==="noVisit"?" calendar-visit-badge--no-visit":P.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{C.current=P.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,v(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(P)}:void 0,...Iu(t?()=>t(P):void 0),"aria-label":[N,P.time?Oi(P.time,s):null,P.customer,s(P.status==="noVisit"?"calendar.legend.noVisit":P.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[P.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Oi(P.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:P.customer}),P.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},P.id??G))})]},B)})]})]})}const S4={page:"h3",pagePopup:"h4",popup:"h5"};function Ca({type:e="page",title:t,headingLevel:a=2,icon:r,action:i,disc:s,children:l,inGrid:u=!1,className:c,style:d}){const m=S4[e],p=t||s||i||r,f=a?`h${a}`:"div";return n.jsxs("div",{className:_e("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(at,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(f,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),i&&n.jsx("div",{className:"section__action",children:i})]}),l]})}let Yo=null,Fu=!1;function Ou(){if(Fu||typeof document>"u")return;Fu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Yo="keyboard")},!0);const e=()=>{Yo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Ou();function gr(){return Ou(),Yo==="keyboard"}const br=20;function T4(e){const{t}=xe.useTranslation(),{type:a,trainingDatas:r,depth:i,renderPopup:s,completedIds:l,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:f,sectionType:b="page"}=e||{},[,v]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],h=C.length,[_,g]=o.useState(Math.min(h,br)),A=o.useMemo(()=>Array.isArray(i)?[...i,a?.label].filter(Boolean).join(" \xB7 "):[i||"",a?.label].filter(Boolean).join(" \xB7 "),[i,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Sl("speechear.data.updated",()=>v(w=>w+1));const y=o.useRef(null),k=o.useRef(null);function x(){const w=document.activeElement;k.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(B=>Math.min(h,B+br))}return o.useEffect(()=>{const w=k.current;if(w==null)return;k.current=null;const B=document.activeElement;B&&B!==document.body||y.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(Ca,{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,_).map((w,B)=>{const E=w;return n.jsx(Mo,{index:B,type:a,trainingData:E,depth:A,renderPopup:s,completedIds:l,selectedIds:u,size:d,useDescriptionTooltip:m,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 f=="function"?D=>f(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${B}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(me,{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 j4(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 M4({gap:e=10,count:t,className:a,children:r}){const i=o.useRef(null),[s,l]=o.useState({width:0,card:0}),u=t??j4(r);o.useLayoutEffect(()=>{const f=i.current;if(!f)return;const b=()=>{const C=f.style.maxWidth;f.style.maxWidth="none";const h=f.clientWidth;f.style.maxWidth=C;const _=f.firstElementChild?.offsetWidth??0;l(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(b);return v.observe(f),()=>v.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?hC(s.width,c,e):0,m=d>0?fC(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:i,className:_e("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Zo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,i]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;i({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const l=o.useCallback(()=>{a.current===e&&i({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&i({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:l,onError:u}}var L4='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 $4=L4,Xo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:i=!1,onSelect:s,flipDelay:l=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=xe.useTranslation(),f=e.word||e.title||"",b=t||!f,v=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:f,subLabel:C,colloquialLabel:h,homonum:e.homonum});f&&(_.label!==f||_.subLabel!==C||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:f,subLabel:C,colloquialLabel:h,homonum:e.homonum});const A=o.useRef(null),y=ln("(max-width: 767px)"),[k,x]=o.useState(!1),w=`${typeof v=="string"?v:v?.src??""}\0${f}`,[B,E]=o.useState({for:"",url:""}),D=B.for===w?B.url:"",N=Mi(),O=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),P=O?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:G,loading:L,hasImage:M,onLoad:$,onError:Y}=Zo(P);o.useEffect(()=>{let j=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){E({for:w,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const U=v.src;if(U){E({for:w,url:U});return}}}const F=Na();if(F&&f)try{const U=await Promise.resolve(F(f));!j&&U&&E({for:w,url:U})}catch{}})(),()=>{j=!0}},[v,f,w]);const q=o.useRef(!0),z=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,z.current&&pr(z.current),z.current=null;try{A.current?.pause()}catch{}A.current=null}),[]);const V=o.useCallback(()=>new Promise(j=>{if(typeof window<"u"&&window.speechSynthesis&&f){x(!0),window.speechSynthesis.cancel();const F=new SpeechSynthesisUtterance(f);F.lang="ko-KR",F.onend=()=>{x(!1);try{a?.()}catch{}j()},F.onerror=()=>{x(!1),j()},window.speechSynthesis.speak(F)}else j()}),[f,a]),R=o.useCallback(j=>{const F=mr(j,U=>{if(x(!1),U)try{a?.()}catch{}});return A.current=F.el,F.done},[a]),H=o.useCallback(async()=>{if(t||!q.current)return;const j=()=>{z.current===j&&(z.current=null);try{A.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},F=dr(j);z.current=j;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(x(!0),await R(D)))return;const U=Xr();if(U&&f)try{const ae=await Promise.resolve(U(f));if(!q.current||z.current!==j||ae&&(x(!0),await R(ae)))return}catch{}if(!q.current||z.current!==j)return;await V()}finally{F(),z.current===j&&(z.current=null)}},[t,D,f,R,V]);o.useImperativeHandle(m,()=>({play:()=>H()}),[H]);const W=j=>j.stopPropagation(),I=o.useCallback(j=>{if(j.stopPropagation(),!t){if(k){try{A.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}H()}},[t,k,H]),S=_e("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",i?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?i:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" "||j.key==="Spacebar")&&(j.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${l}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[i&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx(At,{type:"dot",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:O?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):M?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:G,className:"training-word-card__image",src:P,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:$,onError:Y})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!O&&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?W:void 0,children:n.jsx(me,{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,onClick:I,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("${$4}")`}})})]})})}),R4=260;function Fn(e){const{t}=xe.useTranslation(),{title:a,subtitle:r,headerActions:i,headerSegment:s,children:l,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:f=!1,footerClassName:b="",footerLayout:v="center",onClose:C,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:A="",ariaLabel:y,useTitle:k=!0,inline:x=!1,size:w,layer:B="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[O,P]=o.useState(!1),G=o.useRef(!1),L=o.useRef(null),M=o.useId(),$=o.useRef(null);o.useEffect(()=>{},[x,a,y,A]),o.useEffect(()=>{N!==void 0&&$.current&&($.current.scrollTop=0)},[N]);const[Y,q]=o.useState(!1);o.useEffect(()=>{const K=$.current;if(!K)return;const re=()=>q(K.scrollHeight>K.clientHeight+1);if(re(),typeof ResizeObserver>"u")return;const ke=new ResizeObserver(re);ke.observe(K);const Z=K.firstElementChild;return Z&&ke.observe(Z),()=>ke.disconnect()},[l,N]),o.useEffect(()=>{if(!x)return du()},[x]),o.useEffect(()=>{if(x)return;const K=document.activeElement,re=L.current;return ho(re,K),re&&!re.contains(document.activeElement)&&(re.querySelector(Cn)??re).focus(),()=>{const ke=document.activeElement;(!ke||ke===document.body||re&&re.contains(ke))&&fo(K)?.focus?.()}},[x]),po(L,!x);const z=o.useRef(!0),V=Co(),R=o.useRef(null);o.useEffect(()=>(z.current=!0,()=>{z.current=!1,R.current&&(clearTimeout(R.current),R.current=null)}),[]);const H=o.useCallback(()=>{!z.current||!G.current||(G.current=!1,P(!1))},[]),W=o.useCallback((K,re=!1)=>{if(re&&!z.current||G.current)return;G.current=!0,P(!0);const ke=setTimeout(()=>{R.current===ke&&(R.current=null);let Z;try{Z=K?K():void 0}catch{H();return}Z&&typeof Z.then=="function"&&Z.then(()=>{setTimeout(H,120)},H)},V?0:R4);re&&(R.current=ke)},[H,V]),I=o.useCallback(()=>{h||_&&_()===!1||W(C,!0)},[W,C,h,_]),S=o.useRef(I);o.useEffect(()=>{S.current=I});const j=!x&&!!C;o.useEffect(()=>{if(j)return Gn(()=>S.current())},[j]);const F=j&&g,U=o.useRef(!1),ae=K=>{U.current=K.target===K.currentTarget},te=K=>{const re=U.current;U.current=!1,re&&K.target===K.currentTarget&&I()},le=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${O?"popup--closing":""} ${A}`,onPointerDown:F?ae:void 0,onClick:F?te:void 0,onMouseDown:x?void 0:K=>{K.target===K.currentTarget&&K.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${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?M:void 0,"aria-label":!x&&!(k&&a)?y??(typeof a=="string"?a:void 0):void 0,children:[!k&&(i||C)?n.jsxs("div",{className:"popup-close-float",children:[i,C&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:I,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||i||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:M,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:M,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(gn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(K=>({key:K.key,label:K.label,disabled:K.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[i,C&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:I,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:$,tabIndex:Y?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof l=="function"?l({animateThen:W,closeWithAnimation:I}):l})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${f?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?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:W,closeWithAnimation:I}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:W,closeWithAnimation:I}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${v!=="center"?` popup-footer--${v}`:""}`,children:u.map((K,re)=>n.jsx(me,{htmlType:"button",size:48,variant:K.variant??"default",label:K.label,disabled:K.disabled,onClick:()=>K.onClick?.({animateThen:W,closeWithAnimation:I})},re))}):c?n.jsx("div",{className:`popup-footer${v!=="center"?` popup-footer--${v}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:W,closeWithAnimation:I}):c}):null]})});return x||typeof document>"u"?le:en.createPortal(le,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function zu(e,t){return e===t?null:t}const Wu={o:"circle",triangle:"triangle",x:"x"},Hu={o:"main",triangle:"warn",x:"danger"};function P4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const i=t+a+r;return{marked:i,o:t,triangle:a,x:r,rate:i===0?null:(t+a*.5)/i}}function Jo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Vu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function I4(e,t){return!t&&e>0}const ga={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 F4(e="landscape"){St("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}=ga[e],i=document.createElement("style");i.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(i);const s=()=>{document.head.removeChild(i),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function qu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let i=0;i<e.length;i+=a)r.push(e.slice(i,i+a));return r}const O4={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}},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}}};function z4(e,t){const a=O4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),i=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,l;return e==="landscape"?(l=i,s=Math.ceil(r/l)):(s=i,l=Math.ceil(r/s)),(e==="landscape"?s<l:l<s)&&([s,l]=[l,s]),{cols:s,rows:l}}const W4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Uu={\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"},Gu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Qo={\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"},es={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function Ku(e){return Object.fromEntries(Object.entries(Uu).map(([t,a])=>[t,Qo[t]?e(`wordTable.pos.${Qo[t]}`,{defaultValue:a}):a]))}function Yu(e){return Object.fromEntries(Object.entries(Gu).map(([t,a])=>[t,es[t]?e(`wordSearch.filter.type.${es[t]}`,{defaultValue:a}):a]))}const H4={pos:Qo,wordType:es};function ts(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function Zu(e,t,a,r){if(r!=="dashed")return{};const i=e%t,s=Math.floor(e/t),l=i<t-1,u=s<a-1;if(!l&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],f=[];return l&&(m.push(d("bottom")),p.push("1px 100%"),f.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),f.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:f.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const V4=280,q4=240,U4=280,G4=400,K4=120,Y4=280;function Xu(e,t){const a=o.useRef(null),[r,i]=o.useState(1),[s,l]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,f=Math.min(1,m,p);i(f),l(Math.max(0,(c-e*f)/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 m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const Z4=24,X4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},J4=400,Ju=8;function Qu({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:i=!0,showImage:s=!0,showPronunciation:l=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=xe.useTranslation(),f=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,h]=o.useState(1),[_,g]=o.useState(!1),[A,y]=o.useState({for:"",url:""}),[k,x]=o.useState(null),w=t&&t.length>0?t:zf()?.(e,r)??"",B=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:O,onError:P}=Zo(B),G=o.useCallback(()=>x(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>x(null),[]),M=bo(!!k,j=>{j?G():L()},b),$=o.useMemo(()=>{if(!d)return null;const j=[];return d.grade&&j.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&j.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&j.push(p("wordTable.info.pos",{v:ts(d.pos,Ku(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&j.push(p("wordTable.info.wordType",{v:ts(d.wordType,Yu(p)),defaultValue:"\uC720\uD615: {{v}}"})),j.length?j:null},[d,p]),Y=w||e,q=A.for===Y?A.url:"";o.useEffect(()=>{const j=Na(),F=w||e;if(!j||!F)return;let U=!1;return Promise.resolve(j(F)).then(ae=>{!U&&ae&&y({for:F,url:ae})}),()=>{U=!0}},[w,e]);const z=o.useRef(null),V=o.useRef(null);o.useEffect(()=>()=>{v.current?.pause(),V.current?.()},[]);const R=o.useCallback(j=>{if(j.stopPropagation(),_){z.current?.();return}if(!q)return;g(!0);const F=mr(q,()=>{g(!1),V.current?.()});v.current=F.el,z.current=F.stop,V.current=dr(F.stop)},[_,q]),H=s&&!!B&&!N,W=H&&i?V4:H?U4:q4,I=H&&i?G4:H?Y4:K4;o.useEffect(()=>{const j=f.current;if(!j||typeof ResizeObserver>"u")return;const F=new ResizeObserver(([U])=>{const{width:ae,height:te}=U.contentRect;h(Math.min(ae/W,te/I))});return F.observe(j),()=>F.disconnect()},[W,I]);const S=c*m<Z4;return n.jsxs("div",{ref:f,className:_e("word-table-cell",S&&"word-table-cell--tap-too-small",H?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":I,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${C})`},children:[H&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:B,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:O,onError:P})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),l&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(me,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:R})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(me,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:R})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:j=>{ca(j)||G()},onPointerLeave:j=>{ca(j)||L()},onFocus:()=>{da()||G()},onBlur:L,children:[n.jsx(me,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:j=>{j.stopPropagation(),M.touchPress()}}),k&&$&&n.jsx(Kn,{anchorRect:k,items:$,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:i="landscape",contentTypes:s=["image","word","standardPron"],cutLine:l="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:f=null,onActivateCell:b,onRemoveCell:v,onRemoveItem:C,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:A,buttonSize:y=40,brand:k,code:x,pageNumber:w,pageNumberPosition:B="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:O,scoreIndexOffset:P=0}){const G=o.useCallback((Be,Le)=>{O?.(P+Be,Le)},[O,P]),L=(Be,Le)=>{const Se=N?.[yr(P+Be)]??null;return n.jsx("div",{className:_e("word-table-cell__score",Se?"word-table-cell__score--marked":""),style:qe>1?{transform:`translateX(-50%) scale(${qe})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Je=>n.jsx("span",{className:_e("word-table-cell__score-slot",Se===Je?"word-table-cell__score-slot--on":""),children:n.jsx(me,{htmlType:"button",size:y,type:"dot",shape:"pill",icon:Wu[Je],variant:Se===Je?Hu[Je]:"default",selected:Se===Je,useBorder:!1,...Ae?{}:{tabIndex:-1,role:"img"},showTooltipInfo:M(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:M(`wordTable.scoring.${Je}`,{word:Le,defaultValue:`${Le} ${Je}`}),onClick:Ae?Qe=>{Qe.stopPropagation(),G(Be,Je)}:void 0})},Je))})},{t:M}=xe.useTranslation(),$=m!==void 0,Y=e!=null||!!t||!!a,q=ln("(max-width: 767px)"),z=o.useRef(null),[V,R]=o.useState(null),H=d?.length??0,[W,I]=o.useState(null),[S,j]=o.useState(""),F=o.useRef(null),U=o.useRef(null),ae=o.useRef(null),te=o.useRef(null),le=o.useCallback(Be=>{U.current=Be,typeof A=="function"?A(Be):A&&(A.current=Be)},[A]),K=o.useCallback((Be,Le)=>{F.current=Le,h?.(Be,Le),j(M("wordTable.reorder.moved",{n:Le+1,total:H,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,M,H]);o.useEffect(()=>{const Be=F.current;Be!=null&&(F.current=null,U.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{te.current?.()},[]);const re=o.useCallback((Be,Le)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Se=Be.key==="ArrowRight";if(!Se&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Je=Le+(Se?1:-1);Je<0||Je>=H||K(Le,Je)},[h,H,K]),ke=o.useCallback((Be,Le)=>{if(!h||Be.pointerType==="mouse")return;const Se=Be.target.closest?.("button");if(Se&&!Se.closest(".word-table-block__card-handle"))return;te.current?.();const Je={x:Be.clientX,y:Be.clientY};let Qe=!1;const dt=oe=>{Qe&&oe.cancelable&&oe.preventDefault()};let ht=null,wt=null;const Ct=()=>{const oe=wt;if(!oe)return;const Ne=document.elementFromPoint?.(oe.x,oe.y)?.closest?.("[data-wordtable-cell]"),Ve=Ne?Number(Ne.dataset.wordtableCell):NaN,nt=Number.isInteger(Ve)?Ve:null;ae.current=nt,R(Ie=>Ie===nt?Ie:nt)},Nt=oe=>{if(!Qe){(Math.abs(oe.clientX-Je.x)>Ju||Math.abs(oe.clientY-Je.y)>Ju)&&Ye();return}if(wt={x:oe.clientX,y:oe.clientY},typeof requestAnimationFrame>"u"){Ct();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,Ct()}))},gt=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,Ct());const oe=ae.current,Ne=Qe;Ye(),Ne&&oe!=null&&oe!==Le&&K(Le,oe)},it=setTimeout(()=>{Qe=!0,I(Le),ae.current=Le,R(Le),window.addEventListener("touchmove",dt,{passive:!1})},J4);function Ye(){clearTimeout(it),window.removeEventListener("pointermove",Nt),window.removeEventListener("pointerup",gt),window.removeEventListener("pointercancel",gt),window.removeEventListener("touchmove",dt),Qe=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),ae.current=null,te.current=null,I(null),R(null)}te.current=Ye,window.addEventListener("pointermove",Nt),window.addEventListener("pointerup",gt),window.addEventListener("pointercancel",gt)},[h,K]),{width:Z,height:Q}=ga[i],he=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:De,scale:ye,offset:de}=Xu(Z,E?Q:void 0),ie=$?m?.length??0:d?.length??0,ge=Math.max(p??ie,1),{cols:fe,rows:ue}=z4(i,ge),Me={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},ze=$?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),je=!!k?.show,Oe=!!k?.show&&k?.top!==!1,We=!!k?.show&&k?.bottom!==!1,mt=k?.copyright??"\xA9 IHAB, Inc. All rights reserved.",ct=_e("word-table-block__content",W4[l],u&&"word-table-block__content--outline",c&&ze&&"word-table-block__content--div-line",!je&&w&&B!=="none"&&"word-table-block__content--page-number",Oe&&"word-table-block__content--brand-top",We&&"word-table-block__content--brand-bottom"),rt={transform:`scale(${1/ye})`,transformOrigin:"center center"},ft=y*vr.length+4*(vr.length-1),Ae=!!O,qe=Ae?Math.max(1,Math.min(1/ye,Z/fe/ft)):1,we=n.jsxs("div",{ref:De,className:"word-table__scaler",style:{height:Q*ye},children:[n.jsx("div",{className:_e("word-table",D&&!Ae&&"word-table--score-readonly",!Y&&r),style:{width:Z,height:Q,transform:`scale(${ye})`,transformOrigin:"top left",marginLeft:de},children:n.jsxs("div",{ref:le,className:ct,style:{gridTemplateColumns:`repeat(${fe}, 1fr)`,gridTemplateRows:`repeat(${ue}, 1fr)`},children:[$?n.jsx(n.Fragment,{children:(m??[]).map((Be,Le)=>n.jsx("div",{className:_e("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",f===Le?"word-table-block__edit-cell--active":""),style:Zu(Le,fe,ue,l),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(Qu,{outerScale:ye,label:Se.word,subLabel:Se.pronunciation,colloquialLabel:Se.colloquialPronunciation,homonum:Se.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:y})]},Je)),D&&L(Le,Be.map(Se=>Se.word).join(" / ")),v&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(me,{htmlType:"button",size:y,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>v(Le)})})]}):b&&n.jsx("div",{style:rt,children:n.jsx(me,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Le)=>n.jsxs("div",{"data-wordtable-cell":h?Le:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${V===Le?" word-table-block__card--drag-over":""}${W===Le?" word-table-block__card--dragging":""}`,style:Zu(Le,fe,ue,l),draggable:!!h,onPointerDown:h?Se=>ke(Se,Le):void 0,onKeyDown:h?Se=>re(Se,Le):void 0,onDragStart:h?()=>{z.current=Le}:void 0,onDragOver:h?Se=>{Se.preventDefault(),R(Le)}:void 0,onDragLeave:h?()=>R(null):void 0,onDrop:h?Se=>{Se.preventDefault(),z.current!==null&&z.current!==Le&&h(z.current,Le),z.current=null,R(null)}:void 0,onDragEnd:h?()=>{z.current=null,R(null)}:void 0,children:[(Be.words??[]).map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(Qu,{outerScale:ye,label:Se.label,subLabel:Se.subLabel,colloquialLabel:Se.colloquialLabel,homonum:Se.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:y,wordInfo:Se.grade||Se.syllables!=null||Se.pos||Se.wordType?{grade:Se.grade,syllables:Se.syllables,pos:Se.pos,wordType:Se.wordType}:void 0})]},Je)),D&&L(Le,(Be.words??[]).map(Se=>Se.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(me,{htmlType:"button",size:y,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:M("wordTable.reorder.handle",{word:(Be.words??[]).map(Se=>Se.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||C)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Le,Be),C&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(me,{htmlType:"button",size:y,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>C(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,fe*ue-(d?.length??0))}).map((Be,Le)=>{const Se=(d?.length??0)+Le<ge;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Se&&n.jsx("div",{style:rt,children:n.jsx(me,{htmlType:"button",size:y,type:"bar",icon:"plus",label:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Le)})})},`filler-${Le}`)})]}),Oe&&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:k?.topLogo?.src??cr,alt:k?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[k?.title&&n.jsx("span",{className:"word-table__paper-title",children:k.title},"t"),k?.owner&&n.jsx("span",{className:"word-table__owner",children:k.owner},"o"),x&&n.jsx("span",{className:"word-table__code",children:x},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Le,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Se))})})()]})}),We&&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:[k?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:k.bottomLogo.src,alt:k.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:mt})]}),n.jsxs("span",{className:"word-table__band-end",children:[k?.link&&n.jsx("span",{className:"word-table__link",children:k.link}),w&&B!=="none"&&n.jsx("span",{className:"word-table__page-count",children:M("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!je&&w&&B!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${B}`,children:M("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:X4,children:S})]}),Ue=he==null?we:n.jsx("div",{className:"word-table__frame",style:{height:he},children:we});return Y?n.jsx(Ca,{type:"page",icon:t,title:e,disc:a,className:_e("word-table-block",r),children:Ue}):Ue}function Q4(e,t,a){const r=[];for(const i of e??[]){if(i.type==="note"||i.type==="input")continue;const s=i.displayLabel??i.label,l=ex(i,t?.[i.label],a);l!==null&&r.push(`${s} ${l}`)}return r.join(" \xB7 ")}function ex(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(i=>i!==dn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(i=>tx(e,i)).join(", ")}function tx(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 Dn({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:i=!1,defaultCollapsed:s=!1,collapsed:l,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:f,sectionAlign:b,className:v}){const C=(f??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=xe.useTranslation(),[_,g]=o.useState(s),A=l??_,y=()=>{const N=!A;g(N),u?.(N)},k=N=>{if(!i)return;const O=N.target;!O||typeof O.closest!="function"||O.closest(".filter-panel__collapse-toggle")||O.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||y()},x=o.useMemo(()=>r!==void 0||!A?"":Q4(d,m,h("common.all","\uC804\uCCB4")),[r,A,d,m,h]),w=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),B=e||a||r||i,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:_e("filter-panel",i?"filter-panel--collapsible":"",A?"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:i?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:[A?w:a,i&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:A?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:A?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:A?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!A,onClick:y})]})]}),!A&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_e("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(N=>{const O=m[N.label],P=O===void 0||(Array.isArray(O)?O.length===0:!1),G=(N.items??[]).filter(M=>M!=null);N.allOption&&G.some(M=>(typeof M=="string"?M:M.value)===dn)&&St(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${dn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=M=>{const $=typeof M=="string"?M:M.value,Y=typeof M!="string"&&!!M.disabled,q=typeof M!="string"?M.labels:void 0,z=typeof M!="string"?M.displayLabel:void 0,V=typeof M!="string"?M.tooltip:void 0,R=typeof M!="string"?M.descriptionTooltip:void 0,H=typeof M!="string"?M.shape:void 0,W=Array.isArray(O)?O.includes($):O===$;return n.jsx(me,{htmlType:"button",size:"keyboard",label:q??z??$,type:N.itemType??(q?"bar":$.length===1?"dot":void 0),selected:W,disabled:Y,shape:H,showTooltipInfo:!!V,tooltipInfoText:V,tooltipDescription:R,onClick:()=>p?.($,N.label)},$)};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:_e("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(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:M=>p?.(M,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(gn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:dn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...G.map(M=>{const $=typeof M=="string"?M:M.value,Y=typeof M!="string"?M.displayLabel:void 0,q=typeof M!="string"?M.disabled:void 0;return{key:$,label:Y??$,disabled:q}})],value:P&&N.allOption?dn:m[N.label]??"",onChange:M=>p?.(M,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(pn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:dn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...G.map(M=>{const $=typeof M=="string"?M:M.value,Y=typeof M!="string"?M.displayLabel:void 0,q=typeof M!="string"?M.disabled:void 0;return{value:$,label:Y??$,disabled:q}})],value:P&&N.allOption?dn:m[N.label],onChange:M=>p?.(M,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(me,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:P,disabled:N.allOptionDisabled,onClick:()=>p?.(dn,N.label)}),N.groups?N.groups.map((M,$)=>n.jsxs("div",{className:"filter-panel__item-group",children:[$===0&&N.allOption&&n.jsx(me,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:P,disabled:N.allOptionDisabled,onClick:()=>p?.(dn,N.label)}),M.filter(Y=>Y!=null).map(L)]},$)):G.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const nx=[1,2,3,4,5,6,7,8,9,10,11,12],ec=[8,4,2,1],rn="show",yn="hide";function tc(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:"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 nc(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 ac(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function rc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function oc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function sc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:rn,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:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function ic(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:rn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function lc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...ec.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function uc(e,t){return e===t||!ec.includes(e)?Number.POSITIVE_INFINITY:e}function ax(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:yn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(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?rn:yn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?rn:yn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?rn:yn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?rn:yn}:{}}}function pc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===dn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(i=>i.includes(t)?i.filter(s=>s!==t):[...i,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===rn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===rn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===rn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===rn),!0):!1}function rx(e){return"sections"in e}function ns(e){const{t}=xe.useTranslation(),{title:a,className:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c};if(rx(e))return n.jsx(Dn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:f,orientation:b,showOutline:v,cutLine:C,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:A=!1,middleSections:y=[],extraSelected:k={},onExtraSelect:x,showPaperBands:w=!1,showTopInfo:B=!0,showBottomInfo:E=!0}=e,D=[tc(t,{hasImage:m,hasColloquial:p}),nc(t),...y,ac(t),...g?[sc(t)]:[],...A?[ic(t)]:[],...w?[rc(t),oc(t)]:[]],N={...dc(t,{contentTypes:f,orientation:b,showOutline:v,cutLine:C,showDivLine:h,showTopInfo:B,showBottomInfo:E}),...k},O=(P,G)=>{pc(t,P,G,_)||x?.(P,G)};return n.jsx(Dn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:O,...d,sectionAlign:"horizontal"})}function as(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ox(e){return as(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function rs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function sx(e,t,a,r="",i=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?rs(r):"";xr?.();let l=null;if(s){const d=document.title;document.title=s,l=()=>{document.title=d,window.removeEventListener("afterprint",l),xr===l&&(xr=null)},xr=l,window.addEventListener("afterprint",l)}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}ya={iframe:u,at:Date.now()},c.open(),c.write(os(e,t,a,!0,s,i)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{l?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function os(e,t,a,r=!1,i="",s=""){i=i?rs(i):"";const l=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(f=>f.cssText)}catch{return[]}}).join(`
860
860
  `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=s?`<div class="paper-head">${as(s)}</div>`:"",m=e.map(p=>{const f=p.cloneNode(!0);return f.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),f.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),f.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),f.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),f.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}${f.outerHTML}</div>`}).join(`
861
861
  `);return`<!DOCTYPE html>
862
862
  <html${c?` lang="${ox(c)}"`:""} data-theme="${u}">
@@ -1063,17 +1063,17 @@ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!m)return p(
1063
1063
  `:""}
1064
1064
  <\/script>
1065
1065
  </body>
1066
- </html>`}const ix=1e3;function ss({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:i,header:s=""}){const{t:l}=xe.useTranslation(),u=o.useCallback(()=>{sx(e(),t,a,r,s)},[e,t,a,r,s]),c=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=window.open("","_blank");if(!p){i?.();return}p.document.write(os(m,t,a,!1,r,s)),p.document.close()},[e,t,a,r,i,s]),d=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=os(m,t,a,!1,r,s),f=new Blob([p],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(f),v=(r?rs(r):"")||l("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),ix)},[e,t,a,r,s,l]);return{print:u,openNewWindow:c,downloadHtml:d}}function mc(e,t){const{t:a}=xe.useTranslation(),r=t?.paperBands===!0,[i,s]=o.useState("landscape"),[l,u]=o.useState(["image","word","standardPron"]),[c,d]=o.useState("show"),[m,p]=o.useState(!0),[f,b]=o.useState(!0),[v,C]=o.useState(!0),[h,_]=o.useState(!0),[g,A]=o.useState(8),[y,k]=o.useState("right"),x=e.length,w=e.some(Z=>(Z.words??[]).length>1),B=e.some(Z=>(Z.words??[]).some(q=>!!q.colloquialLabel)),E=Math.min(g,Math.max(x,1)),D=o.useMemo(()=>qu(e,E),[e,E]),N=D.length>1,O=E,[P,G]=o.useState(!1);o.useEffect(()=>{let Z=!1;if(!sa()){G(!1);return}return Promise.all(e.flatMap(q=>(q.words??[]).map(z=>Ni(z.label,z.homonum)))).then(q=>{Z||G(q.some(Boolean))},()=>{}),()=>{Z=!0}},[e]);const L=o.useMemo(()=>[tc(a,{hasImage:P,hasColloquial:B}),nc(a),...x>0?[lc(a,{hasPairs:w,itemCount:x})]:[],ac(a),...O>1?[sc(a)]:[],...w?[ic(a)]:[],...r?[rc(a),oc(a)]:[]],[a,P,B,x,w,N,O,r]),M={...dc(a,{contentTypes:l,orientation:i,showOutline:m,cutLine:c,showDivLine:h,showTopInfo:f,showBottomInfo:v}),...x>0?{[a(w?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${E}\uAC1C`}:{},...N?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:y}:{}},$=o.useCallback((Z,q)=>{pc(a,Z,q,{setContentTypes:u,setOrientation:s,setShowOutline:p,setCutLine:d,setShowDivLine:_,setShowTopInfo:b,setShowBottomInfo:C})||(q===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||q===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?A(uc(parseInt(Z),x)):q===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&k(cc(Z)))},[a,x]);return{settings:{orientation:i,contentTypes:l,cutLine:c,showOutline:m,showDivLine:h,count:O,showTopInfo:f,showBottomInfo:v},filterSections:L,filterSelected:M,handleSelect:$,pages:D,isPaginated:N,pageNumberPosition:y}}function lx({items:e,words:t,title:a,subtitle:r,emptyText:i,buttons:s,renderButtons:l,renderFooter:u,footerClassName:c,footerLayout:d,printFileName:m,showSettings:p,autoPrint:f,className:b,onClose:v,scoring:C=!1,onScoreChange:h,printHeader:_,brand:g,code:A,beforeClose:y}){const{t:k}=xe.useTranslation(),x=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(oe=>typeof oe=="string"&&oe.length>0).map((oe,Ae)=>({id:`${oe}-${Ae}`,words:[{label:oe}]})),[e,t]),{settings:w,filterSections:B,filterSelected:E,handleSelect:D,pages:N,isPaginated:O,pageNumberPosition:P}=mc(x,{paperBands:!!g?.show}),G=o.useMemo(()=>Vu(N.map(oe=>oe.length)),[N]),[L,M]=o.useState({}),$=o.useCallback((oe,Ae)=>{M(Y=>({...Y,[yr(oe)]:zu(Y[yr(oe)]??null,Ae)}))},[]),Z=o.useRef(h);o.useEffect(()=>{Z.current=h});const q=o.useRef(L);o.useEffect(()=>{q.current!==L&&(q.current=L,Z.current?.(Jo(L)))},[L]);const z=o.useMemo(()=>Jo(L),[L]),V=o.useRef(null),{toastMessage:R,toastKey:H,showWarning:W,clearToast:I}=Rl("warning"),S=o.useRef([]),j=o.useCallback(()=>O?S.current.filter(oe=>oe!==null):V.current?[V.current]:[],[O]),{print:F,openNewWindow:U}=ss({getElements:j,paperW:ga[w.orientation].width,paperH:ga[w.orientation].height,fileName:m??"",header:_??"",onPopupBlocked:()=>W(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."))}),re=o.useMemo(()=>u?void 0:l?l({print:F,openNewWindow:U}):m?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>U()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>F()},...s??[]]:s,[u,l,m,s,k,F,U]),te=o.useMemo(()=>u?u({print:F,openNewWindow:U}):void 0,[u,F,U]),le=o.useRef(!1),K=o.useRef(F);return o.useEffect(()=>{K.current=F},[F]),o.useEffect(()=>{if(!f||le.current)return;const oe=window.setTimeout(()=>{le.current=!0,K.current()},100);return()=>window.clearTimeout(oe)},[f]),n.jsxs(Fn,{title:a??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:r,size:"large",className:_e("word-table-popup",b),buttons:re,footer:te,footerClassName:c,footerLayout:d,beforeClose:y,onClose:v,children:[x.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[p&&n.jsx(ns,{sections:B,selected:E,onSelect:D}),O?n.jsx("div",{className:"word-table-popup__pages",children:N.map((oe,Ae)=>n.jsx(ba,{items:oe,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:Y=>{S.current[Ae]=Y},pageNumber:{current:Ae+1,total:N.length},pageNumberPosition:P,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:A,scoring:C,scoreIndexOffset:G[Ae],marks:z,onMarkClick:$},Ae))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(ba,{items:x,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:V,fitHeight:!0,scoring:C,marks:z,onMarkClick:$,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:A})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:i??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ha,{message:R,position:"top",onClose:I},H)]})}const ux=new Set(["x","triangle"]);function cx(e,t){const a=[];for(let r=0;r<e.length;r++){const i=t[String(r)];i&&ux.has(i)&&a.push(e[r])}return a}const dx=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function hc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const s=Math.floor(a);if(s===0)return{base:t,round:1};const l=(s===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${s}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:l?t.slice(0,l.index).trim():t,round:s+1}}let r=t,i=1;for(;;){const s=dx.exec(r);if(!s)break;i=Math.max(i,(s[1]?Number(s[1]):1)+1),r=r.slice(0,s.index).trim()}return{base:r,round:i}}function px(e,t){const[,a,r]=so(t).split("-"),i=`${a}.${r}`,{base:s,round:l}=hc(typeof e=="string"?{name:e}:e),u=l>=2?`${l}\uCC28 `:"";return`${s||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${i}`}function mx(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:hc(e).round}}function hx(e,t){const a={};for(const[r,i]of Object.entries(t)){if(i!=="o"&&i!=="triangle"&&i!=="x")continue;const s=Number(r),l=e[s];l&&(a[r]=l)}return a}function fx(e){return e.map(t=>t.label).join(" / ")}function Cx(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function fc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function gx(e,t,a){const r=Fi(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Cc(e,t,a){return a===0?0:(e+t*.5)/a}function bx(e){const t=new Map,a=[...e].sort((i,s)=>i.scoredAt.localeCompare(s.scoredAt));for(const i of a)for(const[s,l]of Object.entries(i.marks)){const u=i.labels?.[s];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:l,latestAt:i.scoredAt};if(l==="o")c.o++;else if(l==="triangle")c.triangle++;else if(l==="x")c.x++;else continue;c.latest=l,c.latestAt=i.scoredAt,t.set(u,c)}const r=[];for(const[i,s]of t){const l=s.o+s.triangle+s.x;r.push({label:fc(i),key:i,tried:l,o:s.o,triangle:s.triangle,x:s.x,rate:Cc(s.o,s.triangle,l),latest:s.latest,latestAt:s.latestAt})}return r.sort((i,s)=>i.rate-s.rate||s.tried-i.tried||an(i.label,s.label)||an(i.key??i.label,s.key??s.label)),r}function yx(e){const t=new Map;for(const r of e){const i=r.tableId??`name:${r.tableName}`,s=t.get(i)??{tableName:r.tableName,tableId:r.tableId,rows:[]};s.rows.push(r),t.set(i,s)}const a=[];for(const r of t.values()){const i=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,s=r.rows.filter(u=>i(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(s.length===0)continue;const l=s.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,m=c.filter(p=>p==="triangle").length;return Cc(d,m,i(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:l,times:s.map(u=>u.scoredAt),delta:l.length>=2?l[l.length-1]-l[0]:null})}return a.sort((r,i)=>(i.times[i.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function vx(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function xx(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 _x(e){const t=new Map;let a=0,r=0;const i=e.map((l,u)=>({r:l,at:u})).sort((l,u)=>l.r.answeredAt.localeCompare(u.r.answeredAt)||xx(l.r.id,u.r.id)||l.at-u.at).map(l=>l.r);for(const l of i){if(l.isCorrect==null)continue;const u=l.itemTitle?.trim();if(!u){r++;continue}a++;const c=l.itemId?.trim()||u,d=`${l.trainingType}|${c}`,m=t.get(d)??{trainingType:l.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:l.isCorrect,latestAt:l.answeredAt,lastSelected:l.selected,setIds:[]};if(m.tried++,l.isCorrect||m.wrong++,m.title=u,m.latestCorrect=l.isCorrect,m.latestAt=l.answeredAt,m.lastSelected=l.selected,l.setId){const p=m.setIds.indexOf(l.setId);p>0&&m.setIds.splice(p,1),p!==0&&m.setIds.unshift(l.setId)}t.set(d,m)}const s=[...t.entries()].map(([l,u])=>({key:l,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 s.sort((l,u)=>l.rate-u.rate||u.tried-l.tried||an(l.title,u.title)),{items:s,counted:a,skippedNoTitle:r}}function wx(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function Bx(e){const t=new Map;for(const r of e){const i=t.get(r.trainingType)??[];i.push(r),t.set(r.trainingType,i)}const a=[...t.entries()].map(([r,i])=>({trainingType:r,items:i,pending:i.filter(s=>!s.latestCorrect).length}));return a.sort((r,i)=>i.pending-r.pending||r.trainingType.localeCompare(i.trainingType)),a}const is=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function kx(e){const t=new Map;let a=0;for(const s of e){if(s.latestCorrect)continue;const l=s.setIds[0];if(!l){a++;continue}const u=`${s.trainingType}|${l}`,c=t.get(u)??{setId:l,trainingType:s.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(s,l)=>l.pending-s.pending||s.trainingType.localeCompare(l.trainingType)||s.setId.localeCompare(l.setId),i=[...t.values()];return{sentence:i.filter(s=>is.includes(s.trainingType)).sort(r),word:i.filter(s=>!is.includes(s.trainingType)).sort(r),noSet:a}}function Ax(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const i=[];for(const s of e){const l=new Set,u=[];for(const c of s.cellLabels)r.has(c)&&!l.has(c)&&(l.add(c),u.push(c));u.length!==0&&i.push({id:s.id,name:s.name,kind:s.kind,covered:u,totalCells:s.cellLabels.length})}return i.sort((s,l)=>l.covered.length-s.covered.length||s.totalCells-l.totalCells||an(s.name,l.name)),i.slice(0,Math.max(0,a))}function Nx(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function Ex(e,t){const a=new Map;for(const i of e)for(const s of i.cells){const l=i.labelOf(s);a.has(l)||a.set(l,s)}const r=[];for(const i of t){const s=a.get(i);s!==void 0&&r.push(s)}return r}function ls(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,i)=>String(a[i]))}function Dx(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),i=a%60;return t?t(r,i):r>0&&i>0?ls(Rt.t("customers.duration.minSec",{m:r,s:i,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s:i}):r>0?ls(Rt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ls(Rt.t("customers.duration.sec",{s:i,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s:i})}function Sx(e,t){const a=[],r=new Set;for(const i of e){const s=t(i);r.has(s)||(r.add(s),a.push({key:s,value:i,pinned:!1}))}return a}function Tx(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function jx(e,t){return e.filter(a=>a.key!==t)}function Mx(e,t,a){const r=e.filter(d=>d.pinned),i=new Set(r.map(d=>d.key)),s=e.length-r.length,l=[],u=new Set(i);for(const d of t){if(l.length>=s)break;const m=a(d);u.has(m)||(u.add(m),l.push({key:m,value:d,pinned:!1}))}const c=[...l];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function Lx(e){return e.map(t=>t.value)}function $x(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},i=t?.key?` icon-grid-menu__button--${t.key}`:"",s=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${i}`,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":s,children:n.jsx(at,{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:s,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Rx(e){const{categories:t=[],selected:a,onSelect:r,size:i="medium"}=e||{},s=a!==void 0,[l,u]=o.useState(()=>s?null:(t&&t[0]?.key)??null),c=s?a:l,d=o.useRef(r);o.useEffect(()=>{d.current=r});const m=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(s||m.current||!p)return;m.current=!0;const b=l??p;l==null&&u(b),d.current?.(b)},[s,p]);const f=o.useCallback(b=>{const v=c===b?null:b;m.current=!0,s||u(v),r?.(v)},[c,s,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${i}`,children:(t||[]).map(b=>n.jsx($x,{category:b,isSelected:c===b.key,onClick:()=>f(b.key)},b.key))})}function Px({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const i=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(s=>n.jsx(pe,{htmlType:"button",size:i,type:"bar",label:s.label,selected:t===s.key,className:"choice-chips__button",onClick:()=>a?.(s.key)},s.key))})})}function Ix({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",i=a?.tel??"031-380-3724",{t:s}=xe.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:s("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1066
+ </html>`}const ix=1e3;function ss({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:i,header:s=""}){const{t:l}=xe.useTranslation(),u=o.useCallback(()=>{sx(e(),t,a,r,s)},[e,t,a,r,s]),c=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=window.open("","_blank");if(!p){i?.();return}p.document.write(os(m,t,a,!1,r,s)),p.document.close()},[e,t,a,r,i,s]),d=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=os(m,t,a,!1,r,s),f=new Blob([p],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(f),v=(r?rs(r):"")||l("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),ix)},[e,t,a,r,s,l]);return{print:u,openNewWindow:c,downloadHtml:d}}function mc(e,t){const{t:a}=xe.useTranslation(),r=t?.paperBands===!0,[i,s]=o.useState("landscape"),[l,u]=o.useState(["image","word","standardPron"]),[c,d]=o.useState("show"),[m,p]=o.useState(!0),[f,b]=o.useState(!0),[v,C]=o.useState(!0),[h,_]=o.useState(!0),[g,A]=o.useState(8),[y,k]=o.useState("right"),x=e.length,w=e.some(Y=>(Y.words??[]).length>1),B=e.some(Y=>(Y.words??[]).some(q=>!!q.colloquialLabel)),E=Math.min(g,Math.max(x,1)),D=o.useMemo(()=>qu(e,E),[e,E]),N=D.length>1,O=E,[P,G]=o.useState(!1);o.useEffect(()=>{let Y=!1;if(!sa()){G(!1);return}return Promise.all(e.flatMap(q=>(q.words??[]).map(z=>Ni(z.label,z.homonum)))).then(q=>{Y||G(q.some(Boolean))},()=>{}),()=>{Y=!0}},[e]);const L=o.useMemo(()=>[tc(a,{hasImage:P,hasColloquial:B}),nc(a),...x>0?[lc(a,{hasPairs:w,itemCount:x})]:[],ac(a),...O>1?[sc(a)]:[],...w?[ic(a)]:[],...r?[rc(a),oc(a)]:[]],[a,P,B,x,w,N,O,r]),M={...dc(a,{contentTypes:l,orientation:i,showOutline:m,cutLine:c,showDivLine:h,showTopInfo:f,showBottomInfo:v}),...x>0?{[a(w?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${E}\uAC1C`}:{},...N?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:y}:{}},$=o.useCallback((Y,q)=>{pc(a,Y,q,{setContentTypes:u,setOrientation:s,setShowOutline:p,setCutLine:d,setShowDivLine:_,setShowTopInfo:b,setShowBottomInfo:C})||(q===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||q===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?A(uc(parseInt(Y),x)):q===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&k(cc(Y)))},[a,x]);return{settings:{orientation:i,contentTypes:l,cutLine:c,showOutline:m,showDivLine:h,count:O,showTopInfo:f,showBottomInfo:v},filterSections:L,filterSelected:M,handleSelect:$,pages:D,isPaginated:N,pageNumberPosition:y}}function lx({items:e,words:t,title:a,subtitle:r,emptyText:i,buttons:s,renderButtons:l,renderFooter:u,footerClassName:c,footerLayout:d,printFileName:m,showSettings:p,autoPrint:f,className:b,onClose:v,scoring:C=!1,onScoreChange:h,printHeader:_,brand:g,code:A,beforeClose:y}){const{t:k}=xe.useTranslation(),x=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(re=>typeof re=="string"&&re.length>0).map((re,ke)=>({id:`${re}-${ke}`,words:[{label:re}]})),[e,t]),{settings:w,filterSections:B,filterSelected:E,handleSelect:D,pages:N,isPaginated:O,pageNumberPosition:P}=mc(x,{paperBands:!!g?.show}),G=o.useMemo(()=>Vu(N.map(re=>re.length)),[N]),[L,M]=o.useState({}),$=o.useCallback((re,ke)=>{M(Z=>({...Z,[yr(re)]:zu(Z[yr(re)]??null,ke)}))},[]),Y=o.useRef(h);o.useEffect(()=>{Y.current=h});const q=o.useRef(L);o.useEffect(()=>{q.current!==L&&(q.current=L,Y.current?.(Jo(L)))},[L]);const z=o.useMemo(()=>Jo(L),[L]),V=o.useRef(null),{toastMessage:R,toastKey:H,showWarning:W,clearToast:I}=Rl("warning"),S=o.useRef([]),j=o.useCallback(()=>O?S.current.filter(re=>re!==null):V.current?[V.current]:[],[O]),{print:F,openNewWindow:U}=ss({getElements:j,paperW:ga[w.orientation].width,paperH:ga[w.orientation].height,fileName:m??"",header:_??"",onPopupBlocked:()=>W(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."))}),ae=o.useMemo(()=>u?void 0:l?l({print:F,openNewWindow:U}):m?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>U()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>F()},...s??[]]:s,[u,l,m,s,k,F,U]),te=o.useMemo(()=>u?u({print:F,openNewWindow:U}):void 0,[u,F,U]),le=o.useRef(!1),K=o.useRef(F);return o.useEffect(()=>{K.current=F},[F]),o.useEffect(()=>{if(!f||le.current)return;const re=window.setTimeout(()=>{le.current=!0,K.current()},100);return()=>window.clearTimeout(re)},[f]),n.jsxs(Fn,{title:a??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:r,size:"large",className:_e("word-table-popup",b),buttons:ae,footer:te,footerClassName:c,footerLayout:d,beforeClose:y,onClose:v,children:[x.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[p&&n.jsx(ns,{sections:B,selected:E,onSelect:D}),O?n.jsx("div",{className:"word-table-popup__pages",children:N.map((re,ke)=>n.jsx(ba,{items:re,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:Z=>{S.current[ke]=Z},pageNumber:{current:ke+1,total:N.length},pageNumberPosition:P,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:A,scoring:C,scoreIndexOffset:G[ke],marks:z,onMarkClick:$},ke))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(ba,{items:x,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:V,fitHeight:!0,scoring:C,marks:z,onMarkClick:$,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:A})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:i??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ha,{message:R,position:"top",onClose:I},H)]})}const ux=new Set(["x","triangle"]);function cx(e,t){const a=[];for(let r=0;r<e.length;r++){const i=t[String(r)];i&&ux.has(i)&&a.push(e[r])}return a}const dx=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function hc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const s=Math.floor(a);if(s===0)return{base:t,round:1};const l=(s===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${s}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:l?t.slice(0,l.index).trim():t,round:s+1}}let r=t,i=1;for(;;){const s=dx.exec(r);if(!s)break;i=Math.max(i,(s[1]?Number(s[1]):1)+1),r=r.slice(0,s.index).trim()}return{base:r,round:i}}function px(e,t){const[,a,r]=so(t).split("-"),i=`${a}.${r}`,{base:s,round:l}=hc(typeof e=="string"?{name:e}:e),u=l>=2?`${l}\uCC28 `:"";return`${s||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${i}`}function mx(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:hc(e).round}}function hx(e,t){const a={};for(const[r,i]of Object.entries(t)){if(i!=="o"&&i!=="triangle"&&i!=="x")continue;const s=Number(r),l=e[s];l&&(a[r]=l)}return a}function fx(e){return e.map(t=>t.label).join(" / ")}function Cx(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function fc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function gx(e,t,a){const r=Fi(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Cc(e,t,a){return a===0?0:(e+t*.5)/a}function bx(e){const t=new Map,a=[...e].sort((i,s)=>i.scoredAt.localeCompare(s.scoredAt));for(const i of a)for(const[s,l]of Object.entries(i.marks)){const u=i.labels?.[s];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:l,latestAt:i.scoredAt};if(l==="o")c.o++;else if(l==="triangle")c.triangle++;else if(l==="x")c.x++;else continue;c.latest=l,c.latestAt=i.scoredAt,t.set(u,c)}const r=[];for(const[i,s]of t){const l=s.o+s.triangle+s.x;r.push({label:fc(i),key:i,tried:l,o:s.o,triangle:s.triangle,x:s.x,rate:Cc(s.o,s.triangle,l),latest:s.latest,latestAt:s.latestAt})}return r.sort((i,s)=>i.rate-s.rate||s.tried-i.tried||an(i.label,s.label)||an(i.key??i.label,s.key??s.label)),r}function yx(e){const t=new Map;for(const r of e){const i=r.tableId??`name:${r.tableName}`,s=t.get(i)??{tableName:r.tableName,tableId:r.tableId,rows:[]};s.rows.push(r),t.set(i,s)}const a=[];for(const r of t.values()){const i=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,s=r.rows.filter(u=>i(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(s.length===0)continue;const l=s.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,m=c.filter(p=>p==="triangle").length;return Cc(d,m,i(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:l,times:s.map(u=>u.scoredAt),delta:l.length>=2?l[l.length-1]-l[0]:null})}return a.sort((r,i)=>(i.times[i.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function vx(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function xx(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 _x(e){const t=new Map;let a=0,r=0;const i=e.map((l,u)=>({r:l,at:u})).sort((l,u)=>l.r.answeredAt.localeCompare(u.r.answeredAt)||xx(l.r.id,u.r.id)||l.at-u.at).map(l=>l.r);for(const l of i){if(l.isCorrect==null)continue;const u=l.itemTitle?.trim();if(!u){r++;continue}a++;const c=l.itemId?.trim()||u,d=`${l.trainingType}|${c}`,m=t.get(d)??{trainingType:l.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:l.isCorrect,latestAt:l.answeredAt,lastSelected:l.selected,setIds:[]};if(m.tried++,l.isCorrect||m.wrong++,m.title=u,m.latestCorrect=l.isCorrect,m.latestAt=l.answeredAt,m.lastSelected=l.selected,l.setId){const p=m.setIds.indexOf(l.setId);p>0&&m.setIds.splice(p,1),p!==0&&m.setIds.unshift(l.setId)}t.set(d,m)}const s=[...t.entries()].map(([l,u])=>({key:l,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 s.sort((l,u)=>l.rate-u.rate||u.tried-l.tried||an(l.title,u.title)),{items:s,counted:a,skippedNoTitle:r}}function wx(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function Bx(e){const t=new Map;for(const r of e){const i=t.get(r.trainingType)??[];i.push(r),t.set(r.trainingType,i)}const a=[...t.entries()].map(([r,i])=>({trainingType:r,items:i,pending:i.filter(s=>!s.latestCorrect).length}));return a.sort((r,i)=>i.pending-r.pending||r.trainingType.localeCompare(i.trainingType)),a}const is=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function kx(e){const t=new Map;let a=0;for(const s of e){if(s.latestCorrect)continue;const l=s.setIds[0];if(!l){a++;continue}const u=`${s.trainingType}|${l}`,c=t.get(u)??{setId:l,trainingType:s.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(s,l)=>l.pending-s.pending||s.trainingType.localeCompare(l.trainingType)||s.setId.localeCompare(l.setId),i=[...t.values()];return{sentence:i.filter(s=>is.includes(s.trainingType)).sort(r),word:i.filter(s=>!is.includes(s.trainingType)).sort(r),noSet:a}}function Ax(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const i=[];for(const s of e){const l=new Set,u=[];for(const c of s.cellLabels)r.has(c)&&!l.has(c)&&(l.add(c),u.push(c));u.length!==0&&i.push({id:s.id,name:s.name,kind:s.kind,covered:u,totalCells:s.cellLabels.length})}return i.sort((s,l)=>l.covered.length-s.covered.length||s.totalCells-l.totalCells||an(s.name,l.name)),i.slice(0,Math.max(0,a))}function Nx(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function Ex(e,t){const a=new Map;for(const i of e)for(const s of i.cells){const l=i.labelOf(s);a.has(l)||a.set(l,s)}const r=[];for(const i of t){const s=a.get(i);s!==void 0&&r.push(s)}return r}function ls(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,i)=>String(a[i]))}function Dx(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),i=a%60;return t?t(r,i):r>0&&i>0?ls(Rt.t("customers.duration.minSec",{m:r,s:i,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s:i}):r>0?ls(Rt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ls(Rt.t("customers.duration.sec",{s:i,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s:i})}function Sx(e,t){const a=[],r=new Set;for(const i of e){const s=t(i);r.has(s)||(r.add(s),a.push({key:s,value:i,pinned:!1}))}return a}function Tx(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function jx(e,t){return e.filter(a=>a.key!==t)}function Mx(e,t,a){const r=e.filter(d=>d.pinned),i=new Set(r.map(d=>d.key)),s=e.length-r.length,l=[],u=new Set(i);for(const d of t){if(l.length>=s)break;const m=a(d);u.has(m)||(u.add(m),l.push({key:m,value:d,pinned:!1}))}const c=[...l];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function Lx(e){return e.map(t=>t.value)}function $x(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},i=t?.key?` icon-grid-menu__button--${t.key}`:"",s=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${i}`,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":s,children:n.jsx(at,{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:s,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Rx(e){const{categories:t=[],selected:a,onSelect:r,size:i="medium"}=e||{},s=a!==void 0,[l,u]=o.useState(()=>s?null:(t&&t[0]?.key)??null),c=s?a:l,d=o.useRef(r);o.useEffect(()=>{d.current=r});const m=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(s||m.current||!p)return;m.current=!0;const b=l??p;l==null&&u(b),d.current?.(b)},[s,p]);const f=o.useCallback(b=>{const v=c===b?null:b;m.current=!0,s||u(v),r?.(v)},[c,s,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${i}`,children:(t||[]).map(b=>n.jsx($x,{category:b,isSelected:c===b.key,onClick:()=>f(b.key)},b.key))})}function Px({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const i=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(s=>n.jsx(me,{htmlType:"button",size:i,type:"bar",label:s.label,selected:t===s.key,className:"choice-chips__button",onClick:()=>a?.(s.key)},s.key))})})}function Ix({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",i=a?.tel??"031-380-3724",{t:s}=xe.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:s("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1067
1067
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1068
1068
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1069
- `).map((l,u,c)=>n.jsxs(o.Fragment,{children:[l,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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:l=>{e&&(l.preventDefault(),e())},children:s("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:l=>{t&&(l.preventDefault(),t())},children:s("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:jo,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:s("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("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:s("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",i]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function Fx({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:i,className:s,containerClassName:l,renderLink:u,menuLabel:c}){const{t:d}=xe.useTranslation(),m=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,f]=o.useState(!1),b=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Gn(()=>{const y=document.getElementById(b);y&&y.contains(document.activeElement)&&v.current?.focus(),f(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,A=y=>{y.matches&&f(!1)};return g&&(g.matches&&f(!1),g.addEventListener?.("change",A)),()=>{_(),g?.removeEventListener?.("change",A)}},[p,b]);const C=l?`${l} landing-header__inner`:"landing-header__inner",h=(_,g)=>u?u(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:s?`landing-header ${s}`:"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((_,g)=>n.jsx("span",{children:h(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[i,r.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>f(_=>!_),"aria-expanded":p,"aria-controls":b,"aria-label":p?m.close:m.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:l??void 0,children:r.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:h(_,()=>f(!1))},`${g}:${_.href}`))})})]})}function Ox({children:e,action:t,onClick:a,className:r}){const i=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:i,onClick:a,...Iu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function zx({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),i=o.useRef(null),s=o.useCallback(()=>{const C=t.current,h=C.phase!=="sound"&&C.at>0;i.current=h?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),l=o.useCallback(()=>{const C=i.current;return i.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,h,_=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:h,at:Date.now()-Math.max(0,_)},new Promise(A=>{const y=setTimeout(()=>{r.current===y&&(r.current=null),A(!!e.current&&g===a.current)},C);r.current=y})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),m=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),f=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:f,isCurrent:b,abort:u,waitPad:c,enterSound:d,leave:m,pause:s,resume:l,__bumpGenerationForTest:v}),[p,f,b,u,c,d,m,s,l,v])}const va=9,Wx=e=>Math.round(Math.min(va,Math.max(0,e))/va*100),Hx=e=>e/100*va,Za=2,gc=.1,Vx=e=>Math.min(Za,Math.max(0,e)),qx=.1,Ux=e=>Math.round(e*1e6)/1e6;function Xa(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Vx(t);const a=Math.min(va,Math.max(0,Number(e.level)||0))/va,r=Number(e.mainVolume);return r>0?a>0?Ux(Math.min(Za,Math.max(qx,a/r))):0:1}const bc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function yc(e){return bc(e)}function us(e){return bc(e)*Xa(e)}function cs(e,t=If()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,us(e)/a)}function Jn(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=Xa({level:a.level,mainVolume:a.mainVolume})),a}const Qn={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},ds=o.createContext(null);function _r(){return o.useContext(ds)}const ps=e=>`${Pf()}/${e}`,vc=e=>Array.from({length:10},(t,a)=>ps(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),wr={get defaultNoise(){return ps("noise1.mp3")},get street(){return vc("noise2")},get restaurant(){return vc("noise3")},get buzz(){return ps("noise4.mp3")}};function Gx(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return wr.defaultNoise;case"street":return wr.street[t];case"restaurant":return wr.restaurant[t];case"buzz":return wr.buzz;default:return null}}function Kx({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const i=o.useRef(e?.registerAnalyser);i.current=e?.registerAnalyser;const s=o.useRef(null),[l,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),m=o.useRef(null),p=o.useRef(null),f=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)},[]),h=o.useCallback((k,x=250)=>{const w=s.current;if(!w)return;const B=d.current;if(B){d.current=null;try{w.pause()}catch{}w.src=B,w.load()}if(!w.src)return;f.current+=1,C();try{eo(),Qa(w).then(O=>{if(s.current===w)try{i.current?.("noise",O)}catch{}})}catch{}const E=w.paused?0:er(w);w.paused&&Pn(w,0),w.play().catch(()=>{});const D=performance.now(),N=()=>{const O=Math.min(1,(performance.now()-D)/x);try{Pn(w,E+(k-E)*O)}catch{}O<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[C]),_=o.useCallback((k=250,x)=>{const w=s.current;if(!w||w.paused){x?.();return}const B=++f.current;C();const E=performance.now(),D=er(w),N=()=>{const O=Math.min(1,(performance.now()-E)/k);try{Pn(w,D*(1-O))}catch{}if(O<1)p.current=requestAnimationFrame(N);else{p.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{w.pause()}catch{}x?.()}};p.current=requestAnimationFrame(N),b.current=setTimeout(()=>{if(b.current=null,f.current===B){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{w.paused||(Pn(w,0),w.pause(),x?.())}catch{}}},k+150)},[C]);o.useEffect(()=>{const k=document.createElement("audio");return k.loop=!0,k.crossOrigin="anonymous",s.current=k,()=>{C();try{k.pause(),k.removeAttribute("src"),k.load()}catch{}s.current=null,c.current=null,d.current=null}},[C]);const g=e?cs(e.settings):0,A=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!A)return;let k=0;const x=setInterval(()=>{const w=s.current;if(!w||w.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,_())},400);return()=>clearInterval(x)},[_,A,t,a,v]),o.useEffect(()=>{const k=()=>{const x=s.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const w=t.current,B=!!w&&!w.paused&&!w.ended||v()||a.current==="playing",E=m.current;B&&E?.enabled&&E.volume>0&&h(E.volume)};return document.addEventListener("visibilitychange",k),()=>document.removeEventListener("visibilitychange",k)},[C,h,t,a,v]),o.useEffect(()=>{m.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,x=s.current;if(!x)return;const w=k?cs(k):0;if(!k||!k.enabled||w===0){_();return}if(c.current!==k.type){const B=Gx(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||v()){y.current?.();const D=()=>{x.removeEventListener("canplay",D),y.current===N&&(y.current=null);const O=t.current,P=m.current;(O&&!O.paused&&!O.ended||v())&&P?.enabled&&P.volume>0&&h(P.volume)},N=()=>x.removeEventListener("canplay",D);y.current=N,x.addEventListener("canplay",D)}}))}else{const B=t.current,E=!!B&&!B.paused&&!B.ended||v()||a.current==="playing";if(E&&d.current)h(w);else if(E&&x.paused&&x.src)h(w);else if(!x.paused)if(!E)_();else{C();const D=er(x),N=performance.now(),O=()=>{const P=Math.min(1,(performance.now()-N)/150);try{Pn(x,D+(w-D)*P)}catch{}P<1?p.current=requestAnimationFrame(O):p.current=null};p.current=requestAnimationFrame(O)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,h,_,t,a,m,v]),o.useEffect(()=>{const k=s.current;if(k)try{k.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:s,activeNoiseUrl:l,noiseSettingsRef:m,cancelNoiseFade:C,fadeInNoise:h,fadeOutNoise:_}}function Yx({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:i,setProgress:s,setPlaybackState:l,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:m,onDoneRef:p,handleEndRef:f}){const b=o.useRef(null),v=o.useRef(0),C=o.useRef(null),h=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{h.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const g=(k,x=1)=>{try{const w=(k||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(k||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,x)))}catch{return 1200}},A=o.useCallback(k=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,w=++h.current;try{try{x.cancel()}catch{}const B=k??e,E=Array.isArray(B)?B.filter(L=>!!L):[B||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));v.current=E.reduce((L,M)=>L+g(M,D||1),0),b.current=performance.now(),s(0),l("playing"),u("playMode");const N=m.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const O=()=>{try{const L=b.current||performance.now(),M=performance.now()-L,$=v.current||1200,Z=Math.min(1,M/$);try{r.current&&(r.current.style.left=`${Z*100}%`),i.current&&i.current.style.setProperty("--progress",String(Z))}catch{}Z<1&&(C.current=requestAnimationFrame(O))}catch{}},P=()=>{if(w===h.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),s(1),l("stopped");try{f.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=L=>{const M=new SpeechSynthesisUtterance(E[L]);try{M.rate=D}catch{}try{M.volume=Math.max(0,Math.min(1,a))}catch{}M.onend=()=>{if(w===h.current){if(L<E.length-1){try{G(L+1)}catch{P()}return}P()}},M.onerror=()=>{P()},M.onstart=()=>{if(!(L>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(O)}catch{}},_.current=!0,x.speak(M)};try{G(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,i,s,l,u,m,p,f]),y=o.useCallback(()=>{h.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),b.current=null}catch{}l("stopped"),u("active"),s(0)},[d,l,u,s]);return{startTTS:A,stopTTS:y}}const Zx=.01,Xx=.3;async function Jx(e,t,a,r=!1){let i=null;try{const s=window.AudioContext||window.webkitAudioContext;i=new s;const l=await i.decodeAudioData(e.slice(0)),u=l.numberOfChannels>0?l.getChannelData(0):null;if(!u)return null;let c=0;if(r){const b=Math.floor(Xx*l.sampleRate),v=Math.min(u.length,b);for(;c<v&&Math.abs(u[c])<=Zx;)c++;c>=v&&(c=0)}const d=u.length-c,m=a&&a>0?Math.min(d,Math.floor(a*l.sampleRate)):d,p=Math.max(t,m),f=Math.floor(p/t)||1;return new Array(t).fill(0).map((b,v)=>{const C=c+v*f,h=Math.min(C+f,c+p,u.length);let _=0;for(let g=C;g<h;g++){const A=Math.abs(u[g]);A>_&&(_=A)}return _})}catch{return null}finally{try{i?.close?.()}catch{}}}async function xc(e,t,a,r=!1){try{const i=await fetch(e);if(i.ok===!1)return null;const s=await i.arrayBuffer();return await Jx(s,t,a,r)}catch(i){try{const s=ji(i)}catch{}return null}}const ms=45,Qx=74,e_=2;function Br(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function kr(e){return Br(e)/45}const t_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),_c=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function wc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=_c(t),i=_c(a),s=[];let l=0;return e.forEach((u,c)=>{for(const[d,m]of[["lead",r],["sound",t_(u)],["tail",i]])s.push({kind:d,track:c,startMs:l,durMs:m}),l+=m}),{segments:s,totalMs:l,trackCount:e.length}}function Bc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,i,s]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:i,tail:s,totalMs:r.durMs+i.durMs+s.durMs}}function n_(e,t){const a=Bc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],i=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+i)/a.totalMs))}function a_(e,t,a){const r=Math.max(0,Math.floor(a)),i=Bc(e,t);if(!i||r===0||!(i.totalMs>0)||i.lead.durMs===0&&i.tail.durMs===0||!(i.sound.durMs>0))return{lead:0,sound:r,tail:0};const s=Math.round(i.lead.durMs/i.totalMs*r),l=Math.round(i.tail.durMs/i.totalMs*r),u=Math.max(1,r-s-l),c=s+u+l-r;return{lead:Math.max(0,s-Math.ceil(c/2)),sound:u,tail:Math.max(0,l-Math.floor(c/2))}}function r_({currentTime:e,sources:t,index:a,audioDuration:r}){const i=a||0,s=Array.isArray(t)&&t.length>0?t[i]:void 0,l=s?s.duration||r||0:r||0;if(!(l>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/l))}function o_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:i,tailMs:s}){const l=wc({durationsSec:[r],leadInMs:i,tailMs:s});return n_(l,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function s_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return a_(wc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function i_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function l_({ended:e,completedByEnd:t}){return!!e||!!t}function u_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function c_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function d_(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],i=[];for(const s of r)if(s){if(typeof s=="object"&&s!==null&&"src"in s&&s.src){const l=s;i.push({code:l.code??null,src:l.src});continue}if(typeof s=="string"&&(s.startsWith("http")||s.includes("/"))){i.push({code:null,src:s});continue}if(typeof s=="string"||typeof s=="number"){const l=String(s),u=a(l,t);u&&i.push({code:l,resolvedPath:u})}}return i}const kc=4,p_=kr(kc/ms);function m_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:i,noiseSrc:s,noiseRatio:l=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:m,showSoundWaveForm:p=!0,leadInMs:f=0,tailMs:b=0,trackDurationSec:v=0}=e,C=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null),[A,y]=o.useState(!1),[k,x]=o.useState(null),[w,B]=o.useState(2),[E,D]=o.useState(0),[N,O]=o.useState(null),[P,G]=o.useState(!1),[L,M]=o.useState(!1),$=3,Z=3,q=1,z=300,V=o.useRef(0),R=o.useCallback(()=>{const be=C.current,ne=h&&h.current?h.current:be?be.closest(".audio-player__wave"):null,ue=ne?ne.getBoundingClientRect():be?be.getBoundingClientRect():null,fe=ue?ue.width:0,ge=ue?Math.max(100,ue.width):320,Ce=ue?ue.height:0,$e=Math.max(q,Math.min(z,Math.floor((ge+Z)/($+Z)))),He=$e*$,je=Math.max(0,$e-1),Ie=Math.max(0,je>0?(ge-He)/je:Z);return{bars:$e,gap:Ie,height:Ce,width:fe}},[]),H=o.useRef(void 0),W=o.useRef(null),I=o.useCallback(async(be,ne,{quiet:ue=!1}={})=>{const fe=++V.current,ge=()=>V.current===fe;try{if(ue||y(!1),H.current=be,!be){ge()&&g(null);return}let Ce=ne;if(!Ce)try{for(let je=0;je<4&&!(C.current||h.current);je++)await new Promise(Ie=>requestAnimationFrame(Ie));await new Promise(je=>requestAnimationFrame(je));const He=R();He.height>0&&D(He.height),Ce=He.bars,B(He.gap)}catch{Ce=120}W.current=Ce;const $e=await xc(be,Ce);if(!ge())return;if(!$e){g(null),y(!1);return}g($e),x(Ce),y(!0)}catch{if(!ge())return;g(null),y(!1)}},[y,g,D,B,x,R]);o.useEffect(()=>{const be=h.current;if(!be||typeof ResizeObserver>"u")return;let ne=null;const ue=new ResizeObserver(()=>{ne!==null&&cancelAnimationFrame(ne),ne=requestAnimationFrame(()=>{ne=null;try{const fe=R();if(fe.width<=0||(fe.height>0&&D(fe.height),W.current===null||fe.bars===W.current))return;const ge=H.current;B(fe.gap),ge?I(ge,fe.bars,{quiet:!0}).catch(()=>{}):W.current=fe.bars}catch{}})});return ue.observe(be),()=>{ue.disconnect(),ne!==null&&cancelAnimationFrame(ne)}},[R,I]),o.useEffect(()=>{const be=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;I(typeof be=="string"?be:void 0).catch(()=>{}),M(!1)},[t,a,I]),o.useEffect(()=>{let be=!1;if(G(!1),O(null),!s||!k)return;const ne=c>0?c*(u||1):void 0;return xc(s,k,ne,!0).then(ue=>{be||(O(ue),ue||G(!0))}).catch(()=>{be||(O(null),G(!0))}),()=>{be=!0}},[s,k,c,u]);const S=Math.max(0,Math.min(1,d)),j=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),F=k||40,U=o.useMemo(()=>s_({bars:F,trackDurationSec:v,leadInMs:f,tailMs:b}),[F,v,f,b]),re=o.useMemo(()=>Array.from({length:F}).map((be,ne)=>{const ue=ne>=U.lead&&ne<U.lead+U.sound,fe=U.sound>0&&ue?Math.min(F-1,Math.round((ne-U.lead)/U.sound*F)):-1,ge=ue?_&&_[fe]!=null?_[fe]:null:_?0:null,Ce=ge==null?null:Math.min(1,ge/j*S),$e=Ce!=null&&E>0&&Br(Ce)<=kc,He=Ce==null?.15:$e?0:kr(Ce),je=$e,Ie=F>1?ne/(F-1):0;return n.jsx("div",{className:je?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":He,"--i":ne,"--mix":Ie}},ne)}),[F,_,j,S,E,U]),te={"--progress":String(Math.max(0,Math.min(1,r)))},le=o.useMemo(()=>N&&N.length&&Math.max(...N.map(be=>Number.isFinite(be)?Math.abs(be):0))||1,[N]),K=S*Math.max(0,l),oe=!s||!N||!N.length?1:Math.max(1,K),Ae={"--bar-gap":`${w}px`,"--wave-h":`${Br(oe)}px`,"--wave-h1":`${ms}px`},Y=A&&(s?!!N||P:!0);o.useEffect(()=>{Y&&M(!0)},[Y]);const Q=L?A:Y;o.useEffect(()=>{m?.(Q)},[Q,m]);const me=k||40,De=o.useMemo(()=>Array.from({length:me}).map((be,ne)=>{const ue=N&&N[ne]!=null?N[ne]:null,fe=ue==null?0:Math.abs(ue)/le*K,ge=Math.max(p_,kr(fe)),Ce=me>1?ne/(me-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":ge,"--i":ne,"--mix":Ce}},ne)}),[me,N,le,K,E]);return n.jsxs("div",{className:"audio-player__wave",ref:h,style:Ae,children:[s&&n.jsx("div",{className:`audio-player__wave-noise ${Y?"is-ready":""}`,"aria-hidden":"true",children:De}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${Q?"is-ready":""}`,ref:C,children:re}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${Q?"is-ready":""}`,ref:i,style:te,children:re})]})]})}const h_={idle:"\uB300\uAE30",synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",resolving:"\uB9AC\uC18C\uC2A4 \uB9E4\uD551 \uC911\u2026",checking_exists:"\uD30C\uC77C \uC874\uC7AC \uD655\uC778\u2026",getting_signed_url:"\uC11C\uBA85 URL \uC870\uD68C\u2026",downloading:"\uB2E4\uC6B4\uB85C\uB4DC \uC911\u2026",measuring_duration:"\uC624\uB514\uC624 \uAE38\uC774 \uCE21\uC815\u2026",ready:"\uC900\uBE44 \uC644\uB8CC",error:"\uC624\uB958 \uBC1C\uC0DD"},Ac={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function hs(e,t){return new Promise((a,r)=>{const i=document.createElement("audio");let s=!1;const l=()=>{try{i.removeAttribute("src"),i.load()}catch{}},u=()=>{if(s)return;s=!0;const d=isFinite(i.duration)&&i.duration||0;l(),a(d)},c=d=>{s||(s=!0,l(),t.rejectOnError?r(new Error(d)):a(0))};i.addEventListener("loadedmetadata",u),i.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),i.src=e})}const f_=2e3;function Nc(e,t=f_){return new Promise(a=>{let r=!1;const i=()=>{r||(r=!0,a())};e.addEventListener("canplay",i,{once:!0}),e.addEventListener("error",i,{once:!0}),setTimeout(i,t)})}function C_({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),i=o.useRef([]),s=o.useCallback(c=>{if(r.current=c,!c||!i.current.length)return;const d=i.current;i.current=[];for(const m of d)m(!0)},[]),l=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(m),i.current=i.current.filter(f=>f!==d),c(p)},m=setTimeout(()=>d(!0),a);i.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=i.current;i.current=[];for(const d of c)d(!1)},[]),{onReadyChange:s,waitForReady:u,markNotReady:l}}function g_(){const e=o.useRef([]),t=o.useCallback(i=>(e.current.push(i),i),[]),a=o.useCallback(i=>{const s=new Set([...i].filter(Boolean));e.current=e.current.filter(l=>{if(s.has(l))return!0;try{URL.revokeObjectURL(l)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const i of e.current)try{URL.revokeObjectURL(i)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function b_({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),i=o.useCallback(()=>r(null),[]),s=o.useCallback(()=>{try{const l=t.current?.getBoundingClientRect();if(!l)return;r({left:l.left,right:l.right,width:l.width,height:l.height,x:l.x,top:l.top+e,bottom:l.bottom+e,y:l.y+e,toJSON:l.toJSON.bind(l)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[a,i]),{ref:t,rect:a,show:s,hide:i}}function y_(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 v_=400,x_=2e3,Ec=5;function __({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:i,sequencer:s,leadInMs:l=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),m=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),f=o.useCallback(()=>{if(c.current!==null)return;let v=0;const C=()=>{if(Ln){const h=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&h-v>v_){const _=m.current===null||h-m.current>x_;if(m.current=h,_&&d.current<Ec){d.current+=1;const g=d.current;let A=null;try{A=typeof document<"u"?document.visibilityState:null}catch{}St(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(h-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,A==="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>=Ec?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}v=h}try{const h=e.current,_=Array.isArray(r.current)?r.current[i.current||0]:void 0,g=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,A=g?0:y_(h),y=t.current,k=(l||0)>0||(u||0)>0,x=k&&(s?.positionRef.current?.phase??"sound")!=="sound";if(A===null&&!x)try{y&&y.style.visibility!=="hidden"&&(y.style.visibility="hidden")}catch{}else{const w=g?_.duration:A||0;Ln&&x&&!(w>0)&&St("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?o_({phase:s?.positionRef.current?.phase??"sound",phaseElapsedMs:s?.positionRef.current?Math.max(0,Date.now()-s.positionRef.current.at):0,currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,trackDurationSec:w,leadInMs:l||0,tailMs:u||0}):r_({currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,sources:r.current,index:i.current,audioDuration:A??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,i,s,l,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:f,stop:p,settleTo:b}}function fs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:i=!1,ttsText:s=null,className:l,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:m=0}){const{t:p}=xe.useTranslation(),f=e,b=_r(),v=o.useRef(b?.registerAnalyser);o.useEffect(()=>{v.current=b?.registerAnalyser});const C=o.useRef(null),h=o.useRef(null),_=o.useRef(null),g=g_(),A=o.useRef(null),y=o.useRef(!1),k=o.useRef(null),{ref:x,rect:w,show:B,hide:E}=b_();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[O,P]=o.useState("idle"),[G,L]=o.useState("stopped"),M=o.useRef("stopped");o.useEffect(()=>{M.current=G},[G]);const[$,Z]=o.useState(0),[q,z]=o.useState("active"),V=o.useRef(!1);o.useEffect(()=>{if(q!=="playMode"||!V.current)return;V.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const de=_.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[q]);const[R,H]=o.useState(null),[W,I]=o.useState(null),[S,j]=o.useState(0),[F,U]=o.useState(!1),[re,te]=o.useState(0),le=b?.playbackRate??1,K=b?.mainVolume??1,oe=b?us(b.settings):0,Ae=b?yc(b.settings):K,[Y,Q]=o.useState("idle"),[me,De]=o.useState(""),[be]=o.useState("top"),ne=o.useRef(null),ue=o.useRef(0),fe=o.useRef(null),ge=o.useRef(!0),Ce=zx({mountedRef:ge}),$e=o.useRef(null),He=o.useRef(d),je=o.useRef(m);o.useEffect(()=>{He.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{je.current=Math.max(0,m||0)},[m]);const{start:Ie,stop:qe,settleTo:mt}=__({audioRef:C,fillRef:h,waveProgressRef:fe,sourcesRef:ne,currentIndexRef:ue,sequencer:Ce,leadInMs:d,tailMs:m}),{onReadyChange:ct,waitForReady:rt,markNotReady:ft}=C_({showSoundWaveForm:u,showNoiseWaveForm:c}),ke=o.useRef(null),Ve=o.useRef(i),we=o.useRef(r),Ue=o.useRef(null),Be=o.useRef(!1),[Me,Se]=o.useState(!1),Je=o.useCallback(J=>{Be.current=J,Se(J)},[]),Qe=o.useRef(null),{activeNoiseUrl:dt,noiseSettingsRef:ht,fadeInNoise:wt,fadeOutNoise:Ct}=Kx({noisePlayer:b,audioRef:C,playbackStateRef:M,sequencer:Ce}),{startTTS:Nt,stopTTS:gt}=Yx({ttsText:s,playbackRate:le,mainVolume:Ae,fillRef:h,waveProgressRef:fe,setProgress:Z,setPlaybackState:L,setStateLocal:z,fadeInNoise:wt,fadeOutNoise:Ct,noiseSettingsRef:ht,onDoneRef:we,handleEndRef:Qe});o.useEffect(()=>{Fe.current=gt});const it=J=>{if(typeof window>"u"||!window.speechSynthesis){try{De(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Nt(J);return}tt("tts"),Nt(J)},Ye=Array.isArray(t)?t.filter(Boolean):t?[t]:[],se=(!Ye||Ye.length===0)&&!!s,Ne=Array.isArray(R)&&R.length>0?R:Array.isArray(W)&&W.length>0?W:null,We=Math.max(Array.isArray(Ne)?Ne.length:0,Ye.length);o.useEffect(()=>(ge.current=!0,()=>{ge.current=!1}),[]);const nt=()=>{Ce.abort()},Fe=o.useRef(null),Ge=o.useRef(null),bt=o.useRef(null),Re=o.useRef(null);Re.current||(Re.current=()=>{bt.current=null;const J=C.current;if(Ge.current==="audio"&&J&&(!J.paused||Ce.isRunning())){nt();try{J.pause()}catch{}ge.current&&(L("paused"),qe(),Ct())}else if(Ge.current==="tts")try{Fe.current?.()}catch{}});const tt=J=>{Ge.current=J,bt.current=dr(Re.current)},xt=()=>{bt.current?.(),bt.current=null};o.useEffect(()=>()=>{Re.current&&pr(Re.current)},[]);const Lt=o.useRef(le);o.useEffect(()=>{Lt.current=le||1},[le]);const et=o.useCallback(J=>{const de=Lt.current||1;try{J.defaultPlaybackRate=de}catch{}try{J.playbackRate=de}catch{}},[]),ot=o.useCallback((J,de)=>{J.src=de,et(J),J.load(),et(J)},[et]),lt=o.useCallback(()=>{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Q("idle")},[]),st=o.useCallback(async(J,de=3,ae=50,ye=0)=>{lt();const Le=Ce.generation(),ze=!!J&&J.currentTime>0&&!J.ended,ut=Math.max(0,He.current-Math.max(0,ye));if(ut>0&&!ze){tt("audio"),Ie(),L("playing");const yt=ht.current;if(yt?.enabled&&(yt.volume??0)>0)try{wt(yt.volume)}catch{}if(!await Ce.waitPad(ut,"lead",ye)||!ge.current||!Ce.isCurrent(Le))return!1}Ce.enterSound();for(let yt=0;yt<de;yt++){if(!ge.current||!Ce.isCurrent(Le))return!1;try{return tt("audio"),await J.play(),!0}catch(he){if((he instanceof Error||typeof he=="object"&&he&&"name"in he?he.name:void 0)==="AbortError"){if(!Ce.isCurrent(Le))return!1;await new Promise(T=>setTimeout(T,ae));continue}try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Ie,Ce,wt,ht,lt]),jt=o.useCallback(J=>{const de=Ce.generation(),ae=Math.max(0,je.current-Math.max(0,J));Ie();const ye=ht.current;if(ye?.enabled&&(ye.volume??0)>0)try{wt(ye.volume)}catch{}const Le=()=>{try{$e.current?.()}catch{}};if(ae<=0){Ce.leave(),Le();return}Ce.waitPad(ae,"tail",J).then(ze=>{Ce.leave(),ze&&Ce.isCurrent(de)&&Le()}).catch(()=>{})},[Ce,Ie,wt,ht]),Wt=o.useCallback(()=>{const J=C.current;if(!J)return;const de=()=>{L("playing"),z("playMode"),U(!0),Ie();try{eo(),Qa(J).then(ze=>{if(ge.current)try{v.current?.("main",ze)}catch{}})}catch{}const Le=ht.current;Le?.enabled&&(Le?.volume??0)>0&&wt(Le.volume)},ae=()=>{l_({ended:!!J?.ended,completedByEnd:Be.current})||(L("paused"),qe(),Ct())},ye=()=>{const Le=()=>{try{const ze=ne.current,ut=i_(ze,ue.current);if(ut!==null){ue.current=ut,j(ut),U(!0);const yt=ze?.[ut]&&ze[ut].src;if(yt&&J){ot(J,yt),st(J).catch(()=>{});return}}}catch{}L("stopped"),Z(1);try{if(J)try{J.currentTime=0}catch{}}catch{}qe(),U(!1),Ct();try{!Ve.current&&Qe.current&&Qe.current()}catch{}};if($e.current=Le,je.current>0){Ie(),Ce.waitPad(je.current,"tail").then(ze=>{Ce.leave(),ze&&Le()}).catch(()=>{});return}Le()};return J.addEventListener("play",de),J.addEventListener("pause",ae),J.addEventListener("ended",ye),()=>{try{J.removeEventListener("play",de),J.removeEventListener("pause",ae),J.removeEventListener("ended",ye),qe()}catch{}}},[wt,Ct,st,ht,Ie,qe,Ce]);o.useEffect(()=>Wt(),[Wt]),o.useEffect(()=>{Ve.current=i},[i]),o.useEffect(()=>{we.current=r},[r]),o.useEffect(()=>{if(i||q!=="active")return;const J=k.current;if(!J)return;let de=null;const ae=requestAnimationFrame(()=>{try{const ye=J.getTotalLength();if(!ye)return;const Le=ye*.2;J.style.strokeDasharray=`${ye-Le} ${Le}`;const ze="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${ze}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${ye}}}`,document.head.appendChild(de),J.style.animation=`${ze} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ae),de?.remove()}},[q,i]),o.useEffect(()=>{ne.current=R},[R]),o.useEffect(()=>{ue.current=S},[S]),o.useEffect(()=>{const J=_.current,de=A.current;if(!J||!de)return;let ae=null;const ye=32,Le=60,ze=()=>{try{const yt=Array.from(J.querySelectorAll(":scope > .button"));let he=0;yt.forEach(Pe=>{if(Pe===de)return;const Xe=Pe.getBoundingClientRect();he+=Xe.width});const T=J.getBoundingClientRect().width,X=Math.max(0,Math.floor(T-he-8)),ce=We;if(!ce||X<=0){Array.from(de.children).forEach(Pe=>{try{Pe.style.width=""}catch{}});return}let Ee=Math.floor(X/ce);Ee>Le&&(Ee=Le),Ee<ye&&(Ee=Math.max(ye,Math.floor(X/ce))),Array.from(de.querySelectorAll(".button")).forEach(Pe=>{try{Pe.style.width=`${Ee}px`}catch{}})}catch{}},ut=requestAnimationFrame(ze);try{ae=new ResizeObserver(()=>{requestAnimationFrame(ze)}),ae.observe(J),ae.observe(de),window.addEventListener("resize",ze)}catch{}return()=>{try{cancelAnimationFrame(ut)}catch{}try{ae&&(ae.disconnect(),ae=null)}catch{}try{window.removeEventListener("resize",ze)}catch{}}},[R,W,We]),o.useEffect(()=>()=>{try{ke.current&&(clearTimeout(ke.current),ke.current=null),Ue.current&&(clearTimeout(Ue.current),Ue.current=null)}catch{}},[]);const mn=(J,de)=>{H(J),te(de),ft(),I(u_(J)),ne.current=J},hn=()=>{z("playMode"),j(0),U(!0)},jn=async(J,de)=>{Je(!1),y.current=!1,ot(J,de),await Nc(J),await rt()!==!1&&(N(!1),hn(),await st(J))},zn=async(J,de=!1)=>{const ae=C.current;N(!0),P("measuring_duration");try{const ye=await hs(J,{timeoutMs:1e4,rejectOnError:!0});mn([{src:J,objectUrl:null,duration:ye}],ye),P("ready"),de&&ae&&await jn(ae,J)}finally{y.current=!1,N(!1)}},Wn=async(J,de=!1)=>{const ae=C.current;N(!0),P("measuring_duration");try{const ye=await Promise.all(J.map(ze=>hs(ze,{timeoutMs:1e4})));if(!ge.current)return;const Le=J.map((ze,ut)=>({src:ze,objectUrl:null,duration:ye[ut]||0}));mn(Le,c_(Le)),P("ready"),de&&ae&&Le.length>0&&await jn(ae,Le[0].src)}finally{y.current=!1,N(!1)}},It=async(J=!1,de=!0)=>{const ae=C.current,ye=t?Array.isArray(t)?t:[t]:[];if(!ye||ye.length===0||!ye.some(Boolean))return!1;if(y.current)return null;y.current=!0,de&&N(!0),P("resolving");try{const Le=d_(t,a,yi),ze=[];let ut=0;for(const yt of Le){let he=yt.src??null,T=null;if(!he&&yt.resolvedPath){try{P("getting_signed_url"),he=await vi(yt.resolvedPath)}catch{he=null}if(!ge.current)return!1;if(!he)try{P("downloading");const ce=await xi(yt.resolvedPath);if(!ge.current)return!1;if(ce){const Ee=ce instanceof Blob?ce:new Blob([ce]);T=g.track(URL.createObjectURL(Ee)),he=T}}catch{P("error");try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),z("active")}catch{}}}if(!he)continue;let X=0;try{P("measuring_duration"),X=await hs(he,{timeoutMs:3e3})}catch{X=0}if(!ge.current){if(T)try{URL.revokeObjectURL(T)}catch{}for(const ce of ze)if(ce.objectUrl)try{URL.revokeObjectURL(ce.objectUrl)}catch{}return!1}ut+=X||0,ze.push({...yt,src:he,objectUrl:T,duration:X})}if(mn(ze,ut),ze.length>0&&J&&ae){const yt=ze[0];Je(!1);try{g.keepOnly(ze.map(he=>he.objectUrl))}catch{}if(P("ready"),y.current=!1,yt.src&&ae)try{if(ot(ae,yt.src),await Nc(ae),await rt()===!1)return!1;de&&N(!1),hn(),ae&&await st(ae)}catch{de&&N(!1)}else de&&N(!1);z("playMode"),j(0),U(!0)}return ze.length>0}finally{y.current=!1,de&&N(!1),P(Le=>Le==="ready"?"ready":"idle")}},vn=async J=>{const de=Ce.isRunning();if(J.paused&&!de){if(Be.current){await Ht();return}const ae=Ce.resume();if(ae){if(L("playing"),ae.phase==="tail"){jt(ae.elapsed);return}await st(J,3,50,ae.elapsed);return}await st(J),L("playing")}else Ce.pause(),nt(),J.pause(),L("paused"),de&&(qe(),Ct())},Ft=async()=>{const J=C.current;if(!(!J&&!se)){if(se){const de=window.speechSynthesis;if(q==="active"){const ae=Na(),ye=Array.isArray(s)?s.filter(Boolean):s?[s]:[];if(ae&&ye.length>0){if(y.current)return;z("load"),N(!0),P("synthesizing"),y.current=!0;try{const Le=await Promise.all(ye.map(ze=>Promise.resolve(ae(ze))));Le.length>1?await Wn(Le,!0):await zn(Le[0],!0)}catch{y.current=!1,N(!1),z("active"),it(ye.length>0?ye:void 0)}return}it(ye.length>0?ye:void 0);return}if(q==="playMode"){const ae=!!de&&(de.speaking||de.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!ae){await vn(J);return}try{if(de&&de.paused)try{tt("tts"),de.resume(),L("playing")}catch{}else try{de.pause(),L("paused")}catch{}}catch{}}return}if(q==="active"){if(i&&Array.isArray(ne.current)&&ne.current.length>0){const ae=ne.current[0];try{if(ae.src&&J)try{ot(J,ae.src),hn(),J&&await st(J)}catch{}hn();return}catch{}}z("load");let de;try{de=await It(!0)}catch{de=!1}if(de===!1&&ge.current){try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}z("active")}return}if(q!=="load"&&(q==="playMode"||q==="active"))try{J&&await vn(J)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Ht=async()=>{const J=C.current;if(J)try{const de=ne.current;if(Array.isArray(de)&&de.length>1){await $t(0);return}Je(!1);try{J.currentTime=0}catch{}J&&await st(J),L("playing"),z("playMode")}catch{}},Mn=()=>{nt(),xt(),Fe.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Ct(),L("stopped"),z("active"),Z(0),U(!1)},on=async(J,{sameSegment:de=!1}={})=>{nt();const ae=Ce.generation(),ye=C.current,Le=ne.current?.[J]?.src;try{if(Je(!1),j(J),U(!0),ue.current=J,!Le||!ye||(de||ft(),ot(ye,Le),!de&&await rt()===!1)||!Ce.isCurrent(ae)||(await st(ye),!Ce.isCurrent(ae)))return;L("playing"),z("playMode")}catch{}},xn=async()=>{const J=ne.current,de=ue.current||0;if(!J||de<=0){await Ht();return}await on(de-1)},Hn=async()=>{const J=ne.current,de=ue.current||0;if(!J||de>=J.length-1){Mn();return}await on(de+1)},_n=()=>{if(Be.current)return;const J=200,de=340;Je(!0),nt(),xt();try{Z(1)}catch{}mt(1);try{Q("hold")}catch{}try{const ae=C.current,ye=se&&!!ae?.src;if(!se||ye){if(ae){ae.pause();try{ae.currentTime=0}catch{}}}else gt();Ct()}catch{}try{L("stopped")}catch{}if(U(!1),!Ve.current)try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Ue.current=setTimeout(()=>{try{Q("out")}catch{}Ue.current=setTimeout(()=>{try{typeof we.current=="function"&&we.current(!0)}catch{}try{Q("idle")}catch{}Ue.current=null},de)},J)}catch{}};o.useEffect(()=>{Qe.current=_n});const Vt=o.useCallback(()=>De(""),[]),$t=async J=>{(ne.current||[])[J]&&await on(J,{sameSegment:J===ue.current})},qt=G==="playing",fn=o.useMemo(()=>{if(!W||W.length<=1)return W;const J=W[S];return J?[J]:W},[W,S]),Ot=i===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&et(J)}catch{}},[le,et]);const sn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const de=Math.max(0,Math.min(1,Ae)),ae=sn.current,ye=()=>{ae.raf!==null&&(cancelAnimationFrame(ae.raf),ae.raf=null),ae.timer!==null&&(clearTimeout(ae.timer),ae.timer=null)};ye();const Le=er(J);if(J.paused||Math.abs(Le-de)<.001||typeof requestAnimationFrame!="function"){try{Pn(J,de)}catch{}return}const ze=performance.now(),ut=()=>{const yt=Math.min(1,(performance.now()-ze)/150);try{Pn(J,Le+(de-Le)*yt)}catch{}ae.raf=yt<1?requestAnimationFrame(ut):null};return ae.raf=requestAnimationFrame(ut),ae.timer=setTimeout(()=>{ye();try{Pn(J,de)}catch{}},200),ye},[Ae]);const Dt=Y==="hold",ie=Y==="out",ve=q==="playMode"&&!D&&!Me||Dt||ie,Te=G!=="stopped"||Dt||ie,Ke=G==="paused",Oe=Math.max(0,Math.min(100,($||0)*100)),Ze=_e("audio-player__fill",ve?"is-visible":"",Te?"is-expanded":"",Ke?"is-paused":"",ie?"is-out":"");return n.jsxs("div",{className:`audio-player ${Ot?"is-disabled":""}${l?` ${l}`:""}`,role:"group","aria-label":typeof f=="string"?f:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${qt?"is-playing":""} ${D?"is-loading":""} ${q!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Ac[O]?"status":void 0,"aria-live":Ac[O]?"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.${O}`,{defaultValue:h_[O]})})]}):null,q==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Ot,onClick:()=>{V.current=gr(),E(),Ft()},"aria-label":typeof f=="string"?f: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,w&&n.jsx(Bn,{anchorRect:w,text:typeof f=="string"&&f?f:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${q==="playMode"||qt?"is-visible":""}`,inert:!(q==="playMode"||qt)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:xn,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:qt?"pause":"play",onClick:Ft,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":qt,width:"60px",variant:"transparent-white",disabled:q!=="playMode"}),n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Mn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),We>1?n.jsx("div",{ref:A,className:"audio-player__source-buttons",children:Array.from({length:We}).map((J,de)=>n.jsx(pe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{$t(de)}catch{}},ariaLabel:p("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:F&&S===de,disabled:q!=="playMode"||!(Array.isArray(R)&&R[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(R)||R.length<=1?n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Ht,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"}):null,n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Hn,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:q!=="playMode"}),n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:_n,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Ze,ref:h,style:{left:`${Oe}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(m_,{segments:fn,progress:$,totalDuration:re,waveProgressRef:fe,showSoundWaveForm:u,leadInMs:d,tailMs:m,trackDurationSec:R?.[S]?.duration??0,noiseSrc:c&&b?.settings.enabled&&oe>0?dt:null,noiseRatio:b?Xa(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:K,onReadyChange:ct})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(at,{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(ha,{message:me,position:be,onClose:Vt})]})}function Ar(e){const{t}=xe.useTranslation(),{text:a,label:r,anchorRect:i=null,onClose:s,closeOnOutsideClick:l=!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:m,decrease:p,canIncrease:f,canDecrease:b,fontSize:v,lineHeight:C}=Dl({storageKey:"tooltip-fontScale"}),h=o.useCallback(()=>d(k=>k==="dark"?"light":"dark"),[]),_=o.useCallback(k=>{try{k.stopPropagation()}catch{}try{typeof s=="function"&&s()}catch{}},[s]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],A={fontSize:`${v}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},y=n.jsxs("div",{className:`tooltip-textbox__root ${c==="dark"?"is-dark":""}`,children:[n.jsxs("div",{className:"tooltip-textbox__box",children:[r&&n.jsx("div",{className:"tooltip-textbox__label body-2b",children:r}),n.jsx("div",{className:"tooltip-textbox__text body-1",style:A,children:g.map((k,x)=>n.jsxs("div",{className:"tooltip-textbox__line",children:[g.length>1?n.jsx("div",{className:"tooltip-textbox__marker",children:n.jsx("span",{className:"tooltip-textbox__line-number button-1",children:x+1})}):null,n.jsx("span",{className:"tooltip-textbox__line-text",children:k})]},x))})]}),n.jsxs("div",{className:"tooltip-textbox__buttons",children:[n.jsx(pe,{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(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:m,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!f}),n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:h,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(pe,{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 i?n.jsx(cn,{anchorRect:i,className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,onClose:s,closeOnOutsideClick:l,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:y}):n.jsx("div",{className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,children:y})}function Dc({state:e="disabled"}){const{t}=xe.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(at,{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 Sc(e,t,a){const r=o.useRef(t),i=o.useRef(a);o.useEffect(()=>{r.current=t,i.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let s=null,l=10;const u=()=>{s=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(Cn)).find(m=>!m.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--l>0&&(s=requestAnimationFrame(u))};return s=requestAnimationFrame(u),()=>{s!==null&&cancelAnimationFrame(s);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip-content")){const d=i.current();if(d)try{d.focus()}catch{}}}},[e])}function Tc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:i=!1,onPreviewTextBtn:s,previewText:l=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:m=!1}){const{t:p}=xe.useTranslation(),f=ln("(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),[h,_]=o.useState(!1),[g,A]=o.useState(null),[y,k]=o.useState(null);Sc(h&&!!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(".tooltip-textbox__root"))return D[N];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(s);o.useEffect(()=>{x.current=s});const w=o.useMemo(()=>l==null?"":typeof l=="string"||typeof l=="number"?String(l):Array.isArray(l)&&l.every(D=>typeof D=="string"||typeof D=="number")?l.join(""):"",[l]),B=o.useCallback(()=>{_(!1),A(null),k(null)},[]);o.useEffect(()=>{if(!h)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)},[w]);const E=o.useCallback(()=>{let D;try{typeof s=="function"&&(D=s())}catch{}if(D!==!1){if(k(typeof D<"u"&&D!==null?D:l),!C.current){_(N=>!N);return}if(h)_(!1),A(null),k(null);else{const N=C.current.getBoundingClientRect();A(N),_(!0)}}},[s,l,h]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),i||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(pe,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"play-circle",label:f?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:m,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||m,onDisabledClick:m&&r!=="disabled"?()=>{}:void 0}),i&&n.jsx("div",{ref:C,children:n.jsx(pe,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"eye",label:f?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:h?"is-selected":void 0,"aria-expanded":h,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!l&&typeof s!="function"})})]}),h&&n.jsx(Ar,{text:y??l,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function Cs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ea({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:i={},children:s,className:l="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:m}=xe.useTranslation(),[p,f]=o.useState(()=>Cs(e,t));o.useEffect(()=>{const x=Cs(e,t);if(x!==p){const w=setTimeout(()=>f(x),0);return()=>clearTimeout(w)}},[e,t,p]);const b=o.useCallback((...x)=>{Cs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[v,C]=o.useState(!1),[h,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(x=>{if(!x)return null;try{const w=x;if(typeof x=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const D=w.currentTarget??w.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}},[]),A=o.useCallback((x,{text:w="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const O=g(x);_({text:w,label:B,anchorRect:O,backdrop:E,alignX:D,alignY:N}),C(!0)},[g]),y=o.useCallback(()=>{C(!1),_(x=>({...x,anchorRect:null}))},[]),k=o.Children.map(s,x=>{if(o.isValidElement(x)){const w=x;if(typeof w.type=="string")return w;const B=w.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(w,{onDone:E,disabled:N,showTooltip:A,hideTooltip:y})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${l}`,"aria-current":p==="active",children:[n.jsx(Dc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Tc,{state:p,title:r,...i,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(cn,{anchorRect:h.anchorRect,backdrop:h.backdrop,onClose:y,ariaLabel:m("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Ar,{text:h.text,onClose:y})}):null]})}function jc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=xe.useTranslation(),[i,s]=o.useState("disabled"),[l,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",l)}catch{}},[l]);const c=()=>u(P=>P==="dark"?"light":"dark"),{increase:d,decrease:m,canIncrease:p,canDecrease:f,fontSize:b,lineHeight:v}=Dl({storageKey:"textbox_fontScale"}),[C,h]=o.useState(""),_=o.useRef(null),g=o.useRef(!1),A=o.useCallback(()=>{g.current=gr()&&!!_.current&&_.current.contains(document.activeElement),s("active")},[]),y=o.useCallback(()=>h(""),[]),k=P=>{try{h(P)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const P=setTimeout(()=>s(t),0);return()=>clearTimeout(P)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(w);B!==w&&(E(w),s("disabled"));const D=t==="disabled"?i:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",O=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${v}px`}),[b,v]);return o.useEffect(()=>{if(D==="disabled"||!g.current)return;g.current=!1;const P=document.activeElement;P&&P!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:_,className:`training-text-box ${N} ${D!=="disabled"&&l==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(pe,{htmlType:"button",size:48,type:"bar",onClick:A,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:O,children:w})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(pe,{htmlType:"button",size:32,type:"dot",onClick:m,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:l==="dark"?"transparent-white":"transparent-gray",disabled:!f,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(pe,{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:l==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(pe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:l==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:l==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(ha,{message:C,position:"top",onClose:y})]})}function ta(e){return e==="active"||e==="done"}function gs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,useTitleFaded:s,onDone:l,onChange:u,answer:c,wrongAnswers:d,choices:m,multiSelect:p=!1,correctCount:f=0,useDisabledCovered:b=!1,choiceIcons:v,shuffleChoices:C=!0}){const{t:h}=xe.useTranslation(),_=i??h("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,A=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",y=Array.isArray(m)&&m.length?m:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,k=d?d.join("||"):"",x=m?m.join("||"):"",[w,B]=o.useState(()=>Array.isArray(y)?C?ja(y):y.slice():void 0);o.useEffect(()=>{Array.isArray(y)&&y.length?B(C?ja(y):y.slice()):B(void 0)},[c,k,x,C]);const[E,D]=o.useState(null),[N,O]=o.useState(()=>new Set);o.useEffect(()=>{D(null),O(new Set)},[x,c,k]);const P=o.useRef(void 0);o.useEffect(()=>{const M=P.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&(D(null),O(new Set)),P.current=t},[t,e]);const G=o.useCallback(M=>{if(!ta(A))return;const $=w?.[M];if($==null)return;const Z=$;if(p){const q=new Set(N);q.has(Z)?q.delete(Z):q.add(Z),O(q),typeof u=="function"&&u({selectedValues:[...q],__ts:Date.now()}),typeof l=="function"&&l({selectedValues:[...q],__ts:Date.now()})}else D(Z),typeof u=="function"&&u({selectedIndex:M,selectedValue:Z,__ts:Date.now()}),typeof l=="function"&&l({selectedIndex:M,selectedValue:Z,__ts:Date.now()})},[w,A,p,u,N]),L=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:s,children:n.jsx("div",{className:L,children:Array.isArray(w)&&w.length>0?w.map((M,$)=>n.jsx(pe,{htmlType:"button",size:56,type:"bar",onClick:()=>G($),ariaLabel:String(M),label:M,useLabel:!0,icon:v?v[String(M)]:void 0,variant:"default",disabled:A==="disabled",selected:p?N.has(M):E===M,useDisabledCovered:b,minWidth:0},String(M))):null})})}function bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u,demoSelected:c}){const{t:d}=xe.useTranslation(),m=i??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,f=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,h]=o.useState(c??null),_=`${String(b)}\0${JSON.stringify(v??null)}`,[g,A]=o.useState(_);g!==_&&(A(_),c==null&&h(null));const[y,k]=o.useState(c);Object.is(y,c)||(k(c),h(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&&h(null),x.current=t},[t,e,c]);const w=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof l=="function"&&l(N),ta(f)&&typeof s=="function"&&s(N)},[l,f,s]),B=o.useCallback(()=>{ta(f)&&(h(!1),w(!1))},[w,f]),E=o.useCallback(()=>{ta(f)&&(h(!0),w(!0))},[w,f]);return n.jsxs(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:m,onDone:s,useTitleFaded:!1,children:[n.jsx(jc,{context:u,state:f}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((D,N)=>n.jsx(pe,{htmlType:"button",size:56,type:"bar",onClick:()=>{ta(f)&&(h(N),w&&w(N))},disabled:f==="disabled",ariaLabel:String(D),label:D,variant:f,selected:C===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(pe,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:f==="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(pe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:f==="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 ys({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:i,btnLabel:s,soundSrc:l,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:m,disabled:p,_pageIndex:f,showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:h}){const{t:_}=xe.useTranslation(),g=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),A=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,title:g,onDone:i,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:m},children:n.jsx(fs,{soundSrc:l,ttsText:l?null:d??g,bucketPath:u,btnLabel:s||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:A,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:h},`audio-p${f??0}-s${e}`)})}const w_=[];function vs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u=w_}){const{t:c}=xe.useTranslation(),d=i??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),m=I=>typeof I=="string"?I:I&&(I.context||I.sentence||I.question||"")||"",[p,f]=o.useState(Array.isArray(u)?u:[]),[b,v]=o.useState(()=>(p||[]).map((I,S)=>({id:S,text:m(I)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),h=C!=="disabled",_=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const I=Array.isArray(u)?u:[];f(I);const S=(j=>{const F=(j||[]).map((le,K)=>({id:K,text:m(le)}));if(F.length<=1)return F;const U=(le,K)=>{if(le.length!==K.length)return!1;for(let oe=0;oe<le.length;oe++)if(le[oe].text!==K[oe].text)return!1;return!0};let re=ja(F),te=0;for(;U(re,F)&&te<20;)re=ja(F),te+=1;return re})(I);v(S);try{if(typeof l=="function"){const j=S.filter((F,U)=>F.text===m(I[U])).length;l({shuffled:S,score:j,total:(I||[]).length,initial:!0,__ts:Date.now()})}if(typeof s=="function"&&C==="active"){const j=S.filter((F,U)=>F.text===m(I[U])).length;g.current=u,s({shuffled:S,score:j,total:(I||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof s!="function"))return;const I=Array.isArray(u)?u:[],S=b.filter((j,F)=>j.text===m(I[F])).length;s({shuffled:b,score:S,total:I.length,initial:!0,__ts:Date.now()})},[C,u]);const A=(I,S)=>{const j=[...b],F=I+S;if(F<0||F>=j.length)return;const U=j[F];j[F]=j[I],j[I]=U,Z(j);try{if(typeof s=="function"&&C==="active"){const re=j.filter((te,le)=>te.text===m(p[le])).length;s({shuffled:j,score:re,total:(p||[]).length,__ts:Date.now()})}}catch{}},[y,k]=o.useState(null),x=o.useRef(null),w=o.useRef(null),B=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),O=o.useRef(null),P=o.useRef({dx:0,dy:0}),G=()=>{if(O.current!==null)return;const I=()=>{if(!x.current){O.current=null;return}O.current=requestAnimationFrame(I);const S=N.current,j=P.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${S.x-j.dx}px, ${S.y-j.dy}px, 0)`)};O.current=requestAnimationFrame(I)},L=o.useRef(new Map),M=o.useRef(new Map),$=()=>{const I=new Map;return L.current.forEach((S,j)=>{S&&S.getBoundingClientRect&&I.set(j,S.getBoundingClientRect())}),I},Z=I=>{const S=$();v(I);try{if(typeof l=="function"){const j=I.filter((F,U)=>F.text===m(p[U])).length;l({shuffled:I,score:j,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const j=$();I.forEach(F=>{const U=S.get(F.id),re=j.get(F.id),te=L.current.get(F.id);if(!te||!U||!re)return;const le=U.top-re.top;le&&(te.style.transition="none",te.style.transform=`translateY(${le}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const K=()=>{te.style.transition="",te.removeEventListener("transitionend",K)};te.addEventListener("transitionend",K)}))})})},q=(I,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(I))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const j=document.createElement("div");j.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(j),S.dataTransfer?.setDragImage(j,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(j)}catch{}})}catch{}}catch{}k(I);try{const j=b[I],F=document.createElement("div");F.className="order-list__dragging-object order-list__dragging-object--visible",F.textContent=j&&j.text?j.text:"",document.body.appendChild(F),x.current=F;const U=L.current.get(j.id);let re=S.clientX||0,te=S.clientY||0;try{if(U&&U.getBoundingClientRect){const Q=U.getBoundingClientRect();re=Q.left+Q.width/2,te=Q.top+Q.height/2}}catch{}const le=F.getBoundingClientRect(),K=le.width/2,oe=le.height/2;P.current={dx:K,dy:oe},F.style.transition="none",N.current={x:re,y:te},F.style.transform=`translate3d(${re-K}px, ${te-oe}px, 0)`,requestAnimationFrame(()=>{try{F.style.transition=""}catch{}G()});const Ae=Q=>{const me=Q;N.current={x:me.clientX,y:me.clientY},G()};B.current=Ae,document.addEventListener("mousemove",Ae);const Y=Q=>{const me=Q;N.current={x:me.clientX,y:me.clientY},G()};w.current=Y,document.addEventListener("dragover",Y);try{S.dataTransfer?.setData("text/plain",String(I));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:I}))}catch{}}catch{}}catch{}},z=(I,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const j=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(j&&E.current!==j){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{j.classList.add("drag-over")}catch{}E.current=j}}catch{}},V=(I,S)=>{S.preventDefault();const j=S.dataTransfer?.getData("text/plain")||"",F=j?parseInt(j,10):y,U=I;if(typeof F!="number"||isNaN(F)||F===U){k(null),W(),R();return}const re=xC(b,F,U);Z(re),k(null),R();try{if(typeof s=="function"&&C==="active"){const te=re.filter((le,K)=>le.text===m(p[K])).length;s({shuffled:re,score:te,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[U];if(!te)return;const le=te.querySelector(".order-list__slot")||te;try{le.classList.add("pulse"),le.offsetHeight,le.classList.add("to-dark");const K=()=>{le.classList.remove("pulse","to-dark"),le.removeEventListener("transitionend",K)};le.addEventListener("transitionend",K)}catch{}})}catch{}W()},R=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),O.current!==null&&(cancelAnimationFrame(O.current),O.current=null)},H=()=>{k(null),W(),R()};o.useEffect(()=>()=>R(),[]);const W=()=>{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(I=>I.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const I=Math.max(1,(b||[]).length);b.forEach((S,j)=>{const F=M.current.get(S.id);if(!F)return;let U=50;I>1&&(U=Math.round(j/(I-1)*100));try{F.style.setProperty("--marker-pos",U+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:b.map((I,S)=>{const j=Math.max(1,(b||[]).length),F=j>1?Math.round(S/(j-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":F+"%"},ref:U=>{const re=M.current;U?re.set(I.id,U):re.delete(I.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:U=>{const re=L.current;U?re.set(I.id,U):re.delete(I.id)},className:`order-list__draggable ${y===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:h,onDragStart:h?U=>q(S,U):void 0,onDragEnter:h?U=>z(S,U):void 0,onDragOver:h?U=>z(S,U):void 0,onDragLeave:h?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const U=document.querySelectorAll(".order-list .order-list__item");U&&U[S]&&(U[S].classList.remove("drag-over"),E.current===U[S]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:h?U=>V(S,U):void 0,onDragEnd:h?H:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:I.text}),h?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(pe,{htmlType:"button",size:32,type:"dot",onClick:()=>A(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(pe,{htmlType:"button",size:32,type:"dot",onClick:()=>A(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},I.id)})})})}const B_=8e3;function k_(e,t){return new Promise(a=>{let r=!1;const i=()=>{r||(r=!0,a())};e.then(i,i),setTimeout(i,t)})}function Mc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:m=!1,maxCards:p,playAllGapMs:f=0}){const{t:b}=xe.useTranslation(),v=i??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]),h=p??3,_=(C||[]).slice(0,h);(C||[]).length>h&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${h} shown`);const g=typeof e=="number"?e:-1,A=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[y,k]=o.useState(null),x=o.useRef([]),[w,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($=>$?.id??$?.word??"").join("|"),[C]);o.useEffect(()=>{k(null)},[N]);const O=o.useRef(void 0);o.useEffect(()=>{const $=O.current;typeof $=="number"&&typeof t=="number"&&typeof e=="number"&&$>=e&&t<e&&k(null),O.current=t},[t,e]);const P=o.useCallback(($,Z)=>{if(c)return;const q={item:$,index:Z,__ts:Date.now()};try{typeof l=="function"&&l(q)}catch{}if(A==="active"&&typeof s=="function")try{s(q)}catch{}},[c,l,A,s]),G=o.useRef(f);o.useEffect(()=>{G.current=Math.max(0,f||0)},[f]);const L=o.useCallback(async()=>{if(w||A==="disabled")return;B(!0);let $=!1;const Z=new Promise(q=>{E.current=()=>{$=!0,q()}});try{for(let q=0;q<_.length&&!(!D.current||$);q++){const z=x.current[q];if(!z)continue;await Promise.race([k_(z.play(),B_),Z]);const V=Math.max(0,G.current||0);V>0&&q<_.length-1&&!$&&D.current&&await Promise.race([new Promise(R=>{setTimeout(R,V)}),Z])}}finally{E.current=null,B(!1)}},[w,A,_.length]),M=o.useCallback(($,Z)=>{if(!ta(A))return;k(Z);const q={selectedValue:$.word||$.title||"",selectedIndex:Z,item:$,__ts:Date.now()};try{typeof l=="function"&&l(q)}catch{}if(typeof s=="function")try{s(q)}catch{}},[l,A,s]);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,onDone:s,titleProps:{usePlayAllBtn:!m&&_.length>0,onPlayAll:L,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:$=>{const Z=E.current;if(!Z)return;const q=$.target;q&&typeof q.closest=="function"&&q.closest(".training-word-card__bottom")&&Z()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map(($,Z)=>n.jsx(Xo,{ref:q=>{x.current[Z]=q},item:$,disabled:A==="disabled",onPlayDone:()=>P($,Z),selectable:c,selected:c&&y===Z,onSelect:c?()=>M($,Z):void 0,flipDelay:Z*120,hideLabel:d,hideAudio:m},$&&$.id||Z))})})}const A_=160,Lc=()=>{};function Sn(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:A,onClick:y,children:k,align:x="horizontal",icon:w,useFullWidth:B=!1}=e,E=D=>{y&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),y())};return n.jsxs("div",{className:_e("panel-row",x==="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:[w!=null&&n.jsx("div",{className:"panel-row__icon",children:w}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),A&&n.jsx("div",{className:"panel-row__sub caption-1",children:A})]}),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(Ga,{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:i,onClick:s,required:l,error:u,align:c="horizontal",useFullWidth:d=!1,icon:m}=e,p=a==="button"?void 0:s;let f=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;f=n.jsx(Cu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;f=n.jsx(gn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??40,ariaLabel:r})}else if(a==="dropdown"){const g=e,A=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(pn,{options:y.options,value:y.value,onChange:y.onChange,placeholder:y.placeholder,block:d,error:!!u,ariaDescribedBy:v,ariaLabel:y.ariaLabel??([r,y.placeholder].filter(Boolean).join(" ")||void 0)})},k))}):n.jsx(pn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Lc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:v});f=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[A,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}):A}else if(a==="button"){const g=e;g.buttons?.length?f=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((A,y)=>n.jsx(pe,{htmlType:"button",size:A.btnSize??40,variant:A.btnVariant??"default",disabled:A.disabled,onClick:A.onClick,children:A.label},y))}):f=n.jsx(pe,{htmlType:"button",size:g.btnSize??40,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;f=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;f=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Xn,{value:g.value,onChange:g.onChange??Lc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,ghostHint:g.ghostHint,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:l,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"&&(f=e.children);u&&a!=="input"&&a!=="dropdown"&&(f=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[f,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const h=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=g=>{p&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p())};return n.jsxs("div",{className:_e("panel-row",c==="vertical"?"panel-row--vertical":"",h?"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:[m!=null&&n.jsx("div",{className:"panel-row__icon",children:m}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,l&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,l&&n.jsx("span",{className:"required-mark",children:"*"})]}),i&&n.jsx("div",{className:"panel-row__sub caption-1",children:i})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}function $c(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function N_({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:i}=xe.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(s=>{const l=e[s],u=s==="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}),l&&t&&n.jsx(pe,{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(s)})]}),l?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[l.device&&n.jsx(At,{size:"small",variant:$u(l.device),fill:"soft",label:Ru(l.device,r)}),$c(l)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:$c(l)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:l.productName||l.brand}),Ko(l.wornYear,l.wornMonth,l.wornDay,i.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Ko(l.wornYear,l.wornMonth,l.wornDay,i.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},s)})})}function Nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:i,size:s="medium",minHeight:l,maxWidth:u,className:c,scrollable:d,scrollbarGutter:m="auto",compactRows:p=!1,useBorder:f=!0,useBg:b=!0,useRowBorder:v=!0,labelWidth:C,form:h=!1,loading:_,empty:g,children:A}){const y=_e("panel",`panel--${s}`,h?"panel--form":"",l!==void 0?"panel--fill":"",f?"":"panel--no-border",b?"":"panel--no-bg",v?"":"panel--no-row-border",p?"panel--compact-rows":"",c),k={};l!==void 0&&(k.minHeight=l),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:y,style:Object.keys(k).length?k:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:_e("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(at,{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})]}),i&&n.jsx("div",{className:"panel__actions",children:i})]}),_?n.jsx(Sn,{variant:"loading"}):g!=null&&o.Children.toArray(A).length===0?n.jsx(Sn,{variant:"empty",children:g}):d?n.jsx("div",{className:_e("panel__body--scroll",m==="stable"&&"panel__body--gutter-stable"),children:A}):A]})}function E_({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:i,style:s,children:l}){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 f=new ResizeObserver(([b])=>d(b.contentRect.width));return f.observe(p),()=>f.disconnect()},[r]);const m=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:_e("panel-grid",t==="columns"&&"panel-grid--columns",i),style:{"--panel-grid-cols":m?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...s},children:l})}function D_(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 Rc(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"}]}D_(Rt.t.bind(Rt)),Rc(Rt.t.bind(Rt));const Er="none",S_=.5,T_=1.5,j_=.25;function xs({title:e,valueLabel:t,value:a,min:r,max:i,step:s,tickStep:l,size:u,disabled:c,onChange:d}){return n.jsxs(Sn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Du,{value:a,onChange:d,min:r,max:i,step:s,size:u,showBgTick:!0,tickStep:l,ariaLabel:e,disabled:c,className:"noise-settings__slider-input"}),n.jsx("div",{className:_e("noise-settings__value","button-1",c?"noise-settings__value--disabled":""),children:t})]})}function Pc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=xe.useTranslation(),i=ln("(max-width: 767px)")?40:24,s=_r(),l=Xa(s?.settings??Qn),u=s?.settings.type??"defaultNoise",c=s?.settings.enabled??!0,d=s?.playbackRate??1,m=s?.mainVolume??1,p=Math.round(m*100),f=o.useCallback(_=>{try{s?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[s]),b=o.useCallback(_=>{try{s?.setPlaybackRate(_)}catch{}},[s]),v=o.useCallback(_=>{const g=Math.min(Za,Math.max(0,Math.round(_*10)/10));try{s?.setSettings({noiseRatio:g})}catch{}},[s]),C=o.useCallback(_=>{try{_===Er?s?.setSettings({enabled:!1}):s?.setSettings({type:_,enabled:!0})}catch{}},[s]),h=[{key:Er,label:r("training.noise.type.none","\uC5C6\uC74C")},...Rc(r).map(_=>({key:_.value,label:_.label}))];return n.jsx(cn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:"noise-settings__header",children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(pe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Nr,{className:"noise-settings",useBorder:!1,labelWidth:72,children:[n.jsx(xs,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:i,onChange:f}),n.jsx(xs,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:S_,max:T_,step:j_,size:i,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(Sn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(gn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:h,value:c?u:Er,onChange:C})}),n.jsx(xs,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:l.toFixed(1)}),value:l,min:0,max:Za,step:gc,size:i,disabled:!c,onChange:v})]}),a&&n.jsx("div",{className:"noise-settings__width-ghost","aria-hidden":"true",inert:!0,children:n.jsx(Sn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(gn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:h,value:Er,onChange:()=>{}})})})]})})}function Ic({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:i=0,stepCount:s=0,pageIndex:l=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:m}=xe.useTranslation(),[p,f]=o.useState(!1),[b,v]=o.useState(null),[C,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),A=_r(),y=u>0,k=y&&l<u-1,x=!y||l>=u-1,w=i===Math.max(0,s);o.useEffect(()=>{e||(f(!1),v(null))},[e]);const B=o.useCallback(()=>{f(!1),v(null)},[]),E=o.useCallback(()=>{if(p){f(!1),v(null);return}const Z=_?.current?.getBoundingClientRect();Z&&v(Z),t?.(),f(!0)},[p,t]),D=o.useCallback(()=>{if(p){f(!1),v(null);return}const Z=g?.current?.getBoundingClientRect();Z&&v(Z),t?.(),f(!0)},[p,t]),N=ln("(max-width: 767px)"),O=o.useRef(null),[P,G]=o.useState(null),L=o.useCallback(()=>{h(Z=>{const q=!Z;return G(q?O.current?.getBoundingClientRect()??null:null),q})},[]),M=o.useCallback(()=>{h(!1),G(null)},[]);o.useEffect(()=>{c&&(h(!1),G(null))},[c]);const $=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(qo,{analyser:A?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.noise","\uC18C\uC74C")}),n.jsx(qo,{analyser:A?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.noise","\uC18C\uC74C")})]})]});return Sc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings__header")?.closest(".tooltip-content")??null:null,()=>[_.current,g.current].map(Z=>Z?.querySelector("button")??null).find(Z=>!!Z&&Z.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(pe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:m("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(pe,{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:m("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:O,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(pe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:L,selected:C,"aria-expanded":N?C:void 0,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:$})]}),e&&C&&N&&P&&n.jsx(cn,{anchorRect:P,onClose:M,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:$})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(pe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),k&&n.jsx(pe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&p&&n.jsx(Pc,{anchorRect:b,onClose:B,hideNoiseRows:d})]})}function Fc({title:e,subtitle:t,desc:a,depth:r,icon:i,wrapperStyle:s,iconTooltip:l,pageIndex:u,pageCount:c,progressMax:d,progressIndex:m,onBack:p,onClose:f}){const{t:b}=xe.useTranslation(),v=ln("(max-width: 767px)"),C=Number.isInteger(m)?m:u||0,h=Number.isInteger(d)?d:c||0,_=p||f,g=Array.isArray(r)?v?r[r.length-1]:r.join(" / "):r,A=typeof e=="string"?e.trim():e,y=typeof t=="string"?t.trim():t,k=!!(A||y),x=k?A||y:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=g||(A?t:void 0),B=v&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const D=s&&typeof s=="object"?{...s}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[s]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(pe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:i?n.jsx(iu,{icon:i,label:e,tooltip:l,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(Mu,{max:Math.max(0,h??0),index:Math.max(0,C??0)})]})}function M_(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function L_(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 Oc=(e,t)=>{if(!t)return t;const a=typeof Rt?.t=="function"?Rt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function zc(e,t,a){const r=e,i=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",s=zi().find(u=>u.key===(r?.category_0||r?.category_main_code)),l=s?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:i,label:r?.title||i,depth:t,icon:s?.icon,wrapperStyle:s?.color?{"--t-item-fg":s.color}:void 0,iconTooltip:[s?Oc(`topic.${s.key}`,s.label):void 0,l?Oc(`topic.sub.${l.key}`,l.label):void 0].filter(Boolean).join(" / ")||void 0}}function _s(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Wc(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,i=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(i).toISOString()}:{}}}function $_(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function R_({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:i=[],emptyMessage:s,buildResults:l,metaPatch:u}){const c=zc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},m=t?.id||t?.title||i.length;return{id:`${e}:${m}`,meta:{...c,...d},pages:i,emptyMessage:s,buildResults:l}}function P_(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function I_(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 F_(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 Hc(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function O_(e,t,a,r){return Hc(e,t*a+r)}function z_({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const i=e;if(Array.isArray(i.selectedValues))return r.every(s=>i.selectedValues.includes(s))&&i.selectedValues.every(s=>r.includes(s));if(typeof i.correct=="boolean")return i.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(i=>String(i)===String(a[t]));if(typeof t<"u")return r.some(i=>String(i)===String(t))}}function W_(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 Vc=o.createContext(null);function H_(){const e=o.useContext(Vc);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function V_({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,choices:s=[],onDone:l,onChange:u}){const{t:c}=xe.useTranslation(),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,f]=o.useState(()=>s.map(()=>null)),b=JSON.stringify(s),v=s.length;o.useEffect(()=>{f(Array.from({length:v},()=>null))},[b]);const C=o.useRef(void 0);o.useEffect(()=>{const A=C.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&f(Array.from({length:v},()=>null)),C.current=t},[t,e,v]);const h=o.useMemo(()=>p.filter(A=>A!==null).length+1,[p]),_=o.useCallback(A=>{if(!ta(m))return;const y=p;let k;if(y[A]!=null){const w=y[A];k=y.map(B=>B!==null&&B>=w?null:B)}else k=[...y],k[A]=h;f(k);const x={selectedOrder:k,words:s,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(y[A]==null&&k.length>0&&k.every(w=>w!==null))try{typeof l=="function"&&l(x)}catch{}},[m,p,h,u,l,s]),g=i??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:l,children:n.jsx("div",{className:"training-step__cards",children:s.map((A,y)=>n.jsx(Xo,{item:{word:A},disabled:m==="disabled",selectable:!0,selected:p[y]!==null,orderRank:p[y],onSelect:()=>_(y),flipDelay:y*120,hideLabel:!1,hideAudio:!0},`${A}-${y}`))})})}function Dr(e){return null}Dr.__isTrainingPage=!0;function xa(e,t){const a=H_();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 qc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l}=xa(e,t);return n.jsx(ys,{...a,index:r,stepIndex:i,isLast:s,onDone:l})}function Uc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(gs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Gc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(bs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Kc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(vs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Yc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(Mc,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function q_({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(V_,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}const Zc=3e4,U_=/^(https?:|blob:|data:audio|\/|\.\/)/;function Xc(e){return typeof e=="string"&&U_.test(e)?e:null}const G_=e=>typeof e=="string"&&e.trim()!==""?e:null,ws=Symbol("timed-out");function K_(e,t){if(t<=0)return Promise.resolve(ws);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(ws),t)})]).finally(()=>clearTimeout(a))}function Y_(e){return e?Na()||Xr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Z_(e,t){const a=[],r=Xc(t);r&&a.push({kind:"raw",resolve:async()=>r});const i=(e??"").trim();if(!i)return a;for(const[s,l]of[["urlResolver",Na()],["fallbackUrlResolver",Xr()]])l&&a.push({kind:s,resolve:async u=>{let c;try{c=await K_(l(i),u)}catch(m){return St(`question-sound-threw-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,m),null}return c===ws?(St(`question-sound-slow-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 ${Zc}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):G_(c)||(St(`question-sound-empty-${s}`,`[core] configureTTS \uC758 ${s} \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 X_(){return Date.now()+Zc}const J_=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Q_(e){St("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 Sr(...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 i of r){if(typeof i=="string"&&i.trim().length)return i.trim();if(typeof i=="number"||typeof i=="boolean")return String(i)}}}return null}function ew(e){return Sr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function tw(e){return Xc(Sr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Jc(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=Sr(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 Qc(e){const{score:t,contextsLength:a,results:r=[],subtitle:i,onReplay:s,onClose:l,inline:u=!1,pending:c=!1}=e||{},{t:d}=xe.useTranslation(),m=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 f=o.useCallback(D=>{const N=Jc(D),O=Sr(D?.wording,D?.label);return N===!0?{variant:"main",label:O??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:O??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:O??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),b=a??0,v=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),h=o.useRef(null),[_,g]=o.useState(null),A=o.useCallback(()=>{h.current?.(),h.current=null,g(null)},[]);o.useEffect(()=>A,[A]);const y=o.useRef(0),k=(D,N)=>{if(!Ln)return;const O=Math.round(performance.now()-y.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${O}ms ${D}`,N??"")},x=o.useRef(0),w=o.useCallback((D,N,O)=>{A();const P=++x.current,G=()=>x.current===P;y.current=Ln?performance.now():0,k(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:O}),g(D),h.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,Yr()};const L=q=>{k("\uD2BC\uB2E4",q);const z=mr(q,V=>{k(`\uB05D\uB0AC\uB2E4 \u2014 ${V?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),V&&G()&&(h.current=null,g(null))});return h.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,z.stop(),Yr()},z.done},M=Z_(N,O);k("\uCC28\uB840",M.map(q=>q.kind));const $=M[0]?.kind==="raw",Z=$?L(O):Promise.resolve(!1);(async()=>{if(await Z||!G())return;const q=X_(),z=$?M.slice(1):M;for(let V=0;V<z.length;V++){if(!G())return;k(`${z[V].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await z[V].resolve(J_(q,z.length-V));if(k(`${z[V].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!G()||R&&(await L(R)||!G()))return}G()&&(k("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Q_(N),h.current=()=>{x.current++,Yr()},k("\uB0AD\uB3C5\uD55C\uB2E4"),Tf(N,{onEnd:()=>{G()&&(h.current=null,g(null))}}))})()},[A]),B=o.useMemo(()=>C.map(D=>{const N=D??{},O=ew(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:P,label:G}=f(N),L=Array.isArray(N.corrects)?N.corrects:[],M=L.length?L.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,$=typeof N.selectedText=="string"?N.selectedText:null,Z=Jc(N)===!0,q=tw(N),z=!!q||Y_(O);return{problem:O,variant:P,label:G,answer:M,selectedText:$,isCorrect:Z,sound:q,canHear:z}}),[C,f,d]),E=o.useMemo(()=>B.some(D=>D.answer!==null||D.selectedText!==null),[B]);return n.jsx(Fn,{onClose:l,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:m,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(pe,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(s)}),n.jsx(pe,{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?m: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.")}),i&&n.jsx("p",{className:"trp-result__subtitle body-3",children:i}),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(pe,{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?A():w(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(At,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const Bs=new Set;function nw(e){o.useEffect(()=>{if(!e||Bs.has(e))return;Bs.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,i=0,s=0;const l=()=>{const m=Date.now();a==null&&(a=m),r==null&&(r=m)},u=()=>{r!=null&&(i+=Date.now()-r,r=null)};t()&&l();const c=()=>{if(u(),a==null)return;const m=i-s;if(m<1e3||s===0&&i<5e3)return;const p=Date.now(),f=p-m;s=i,BC({trainingType:e,startedAt:new Date(f).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?l():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(),Bs.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function jr(e,t){return e&&e.key||`step-${t??0}`}function Mr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function aw(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const rw=300,ow=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Tn=Object.freeze({}),ed=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function ks(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,i=Array.isArray(a)?a.filter(s=>s?.correct===!0||s?.isCorrect===!0||s?.score===1||s?.heard===!0||s?.judgement===!0).length:null;return{results:a,correct:r!=null?i:null,total:r}}const sw=e=>n.jsx(Qc,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function iw(e){const{scenario:t,title:a,subTitle:r,depth:i,icon:s,wrapperStyle:l,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:m,stepCount:p,onBack:f,onComplete:b,onRoundFinished:v,onNext:C,onSettings:h,useNoiseSetting:_=!0,children:g,ariaLabel:A,label:y,buildResults:k,onResult:x,typeKey:w,entryPoint:B,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:O,hideNoiseRows:P=!1}=e;nw(w&&!ed.has(w)?w:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:L}=xe.useTranslation(),M=x,$=!!t,Z=t?.id||null,q=t?.meta||{},z=Array.isArray(t?.pages)?t.pages:[],V=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=V.length>0,H=ie=>ie===Dr||ie?.__isTrainingPage===!0,W=R&&V.some(ie=>H(ie.type)),I=W?V.filter(ie=>H(ie.type)).map((ie,ve)=>{const Te=ie.props||{};return{id:`children-page-${ve}`,steps:o.Children.toArray(Te.children).filter(o.isValidElement),pageTop:Te.pageTop||Te.top||null,pageBottom:Te.pageBottom||Te.bottom||null}}):[{id:"children-page-0",steps:V}],S=R&&!$&&typeof g!="function",j=S?Math.max(1,I.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 ie=document.body;return ie.dataset.ihabTrainingPopupCount=String(Number(ie.dataset.ihabTrainingPopupCount||"0")+1),ie.classList.add("ihab-training-popup-open"),()=>{const ve=Number(ie.dataset.ihabTrainingPopupCount||"1")-1;ve>0?ie.dataset.ihabTrainingPopupCount=String(ve):(delete ie.dataset.ihabTrainingPopupCount,ie.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return jv()},[]);const[F,U]=o.useState({...Qn,enabled:!1}),re=o.useRef(F);o.useEffect(()=>{re.current=F},[F]);const te=o.useRef(O),le=o.useRef(!1),K=o.useRef(null);o.useEffect(()=>{let ie=!1;const ve=Te=>{if(ie)return;le.current=!0;const Ke=Te?Jn({...Qn,enabled:!1},Te):{...Qn},Oe=K.current;K.current=null;const Ze=Oe?Jn(Ke,Oe):Ke;re.current=Ze,U(Ze),Oe&&!te.current&&lo(Ze),rr(Ze);const J=te.current;if(J){const de=typeof J=="function"?J(Ze):J,ae=Jn(Ze,de);re.current=ae,U(ae),rr(ae)}};return $C().then(Te=>{if(ie){const Ke=K.current;if(K.current=null,Ke&&!te.current){const Oe=Te?Jn({...Qn,enabled:!1},Te):{...Qn};lo(Jn(Oe,Ke))}return}ve(Te)}),()=>{ie=!0}},[]);const[oe,Ae]=o.useState(null),[Y,Q]=o.useState(null),me=o.useCallback((ie,ve)=>{ie==="main"?Ae(ve):Q(ve)},[]),De=o.useRef(null),be=o.useRef(null),ne=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const ie=De.current;De.current=null,ie&&lo(ie)},[]);o.useEffect(()=>{if(typeof window>"u")return;const ie=()=>{document.visibilityState==="hidden"&&ne()};return window.addEventListener("pagehide",ne),document.addEventListener("visibilitychange",ie),()=>{window.removeEventListener("pagehide",ne),document.removeEventListener("visibilitychange",ie),ne()}},[ne]);const ue=o.useCallback(ie=>{const ve=Jn(re.current,ie);if(re.current=ve,U(ve),!le.current){K.current={...K.current??{},...ie},rr(ve);return}te.current||(De.current=ve,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(ne,rw)),rr(ve)},[ne]),fe=F.mainSpeed,ge=F.mainVolume,Ce=o.useCallback(ie=>ue({mainSpeed:ie}),[ue]),$e=o.useCallback(ie=>ue({mainVolume:ie}),[ue]),He=o.useMemo(()=>({settings:F,setSettings:ue,registerAnalyser:me,mainAnalyser:oe,noiseAnalyser:Y,playbackRate:fe,setPlaybackRate:Ce,mainVolume:ge,setMainVolume:$e}),[F,ue,me,oe,Y,fe,Ce,ge,$e]),je=o.useRef(null),[Ie,qe]=o.useState(0),mt=o.useRef([]),[ct,rt]=o.useState("center"),[ft,ke]=o.useState(!1),Ve=o.useRef(!1),we=o.useRef(null),Ue=o.useCallback(ie=>{Ve.current||(Ve.current=!0,ke(!0),we.current=setTimeout(()=>{try{ie()}catch{Ve.current=!1,ke(!1)}},ow()?0:A_))},[]);o.useEffect(()=>()=>{we.current&&clearTimeout(we.current)},[]);const Be=o.useRef(f);o.useEffect(()=>{Be.current=f}),o.useEffect(()=>{const ie=je.current,ve=document.activeElement;if(ho(ie,ve),ie){const Te=Array.from(ie.querySelectorAll(Cn)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if(Te)try{Te.focus()}catch{}}return()=>{const Te=document.activeElement;if(!Te||Te===document.body||ie&&ie.contains(Te))try{fo(ve)?.focus?.()}catch{}}},[]),o.useEffect(()=>Gn(()=>Ue(()=>{const ie=Be.current;typeof ie=="function"&&ie()})),[Ue]),po(je,!0);const[Me,Se]=o.useState(!1),Je=o.useRef(!1),[Qe,dt]=o.useState(null),ht=o.useRef(0),wt=o.useRef(0),Ct=()=>{ht.current+=1,wt.current+=1,dt(null)},[Nt,gt]=o.useState(""),[it,Ye]=o.useState(()=>Mr()),se=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!$&&!S||(Ye(Mr()),Ct())},[$,Z,S]),o.useEffect(()=>{S&&Ye(ie=>{const ve=Math.max(0,Math.min(ie.pageIndex,Math.max(0,j-1)));return ve!==ie.pageIndex?{...ie,pageIndex:ve,stepIndex:0}:ie})},[S,j]);const Ne=S?Math.max(0,Math.min(it.pageIndex,j-1)):0,We=S?I[Ne]:null,nt=S&&We&&Array.isArray(We.steps)?We.steps:[],Fe=$?it.pageIndex:S?Ne:typeof c=="number"?c:0,Ge=$?z[Math.max(0,Math.min(it.pageIndex,Math.max(0,z.length-1)))]:null,bt=$&&Ge&&Array.isArray(Ge.steps)?Ge.steps:[],Re=$?bt.length:S?nt.length:typeof p=="number"?p:0,tt=$||S?Math.max(0,Math.min(it.stepIndex,Math.max(0,Re))):typeof m=="number"?m:0,xt=$?z.length:S?j:typeof d=="number"?d:0;o.useEffect(()=>{if(!$&&!S)return;const ie=$?Tr(Ge,Fe):We?.id||`children-page-${Fe??0}`,ve=new Date().toISOString();for(let Te=0;Te<=tt;Te+=1){const Ke=$?jr(bt[Te],Te):`step-${Te}`,Oe=lt(ie,Ke);ot.current.has(Oe)||ot.current.set(Oe,ve)}},[$,S,Fe,tt,We?.id]),o.useLayoutEffect(()=>{const ie=se.current;if(typeof Fe=="number"&&ie!==null&&Fe!==ie&&Fe>ie)try{gt(L("training.problemNotice",{n:Fe+1}))}catch{}se.current=typeof Fe=="number"?Fe:se.current},[Fe,c,L]),o.useLayoutEffect(()=>{const ie=je.current;if(!ie)return;const ve=()=>ie.querySelector(".page-popup__scroll");let Te=null,Ke=null,Oe=null;const Ze=Le=>{const ze=ve();if(!ze)return;const ut=ze.scrollHeight<=ze.clientHeight;if(rt(ut?"center":"top"),Le&&!Je.current){Je.current=!0;try{Se(!0)}catch{}try{ae.disconnect()}catch{}}},J=()=>{Te!==null&&cancelAnimationFrame(Te),Te=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>Ze(!0),60)})},de=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>Ze(!1))};J(),window.addEventListener("resize",de);const ae=new MutationObserver(J);ae.observe(ie,{childList:!0,subtree:!0,attributes:!0});const ye=setTimeout(()=>{Je.current||Ze(!0)},400);return()=>{window.removeEventListener("resize",de),Te!==null&&cancelAnimationFrame(Te),Ke!==null&&clearTimeout(Ke),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(ye);try{ae.disconnect()}catch{}}},[je]);const Lt=o.useCallback(ie=>{je.current&&(je.current._childOnNext=ie)},[]),et=o.useCallback(ie=>{je.current&&(je.current._childOnResult=ie)},[]),ot=o.useRef(new Map),lt=(ie,ve)=>`${ie}\0${ve}`,st=o.useCallback((ie,ve,Te)=>{Ye(Ke=>{const Oe=Ke.answersByPage[ie]||{},Ze=Oe[ve],J=_s(Te),de=_s(Ze);if(Ze&&de>J)return Ke;const ae=Wc(Te,ot.current.get(lt(ie,ve)),J);return{...Ke,answersByPage:{...Ke.answersByPage,[ie]:{...Oe,[ve]:ae}}}})},[Ye]),jt=o.useCallback((ie,ve,Te)=>{const Ke=Tr(Ge,Fe),Oe=jr(ie,ve);st(Ke,Oe,Te)},[Ge,Fe,st]),Wt=o.useCallback((ie,ve,Te)=>{const Ke=Tr(Ge,Fe),Oe=jr(ie,ve);st(Ke,Oe,Te),!Te?.allowChange&&ie?.autoAdvance!==!1&&Ye(Ze=>({...Ze,stepIndex:Math.max(Ze.stepIndex,ve+1)}))},[Ge,Fe,st,Ye]),mn=o.useCallback((ie,ve)=>{const Te=We?.id||`children-page-${Fe??0}`,Ke=typeof ve=="number"?ve:tt??0,Oe=`step-${Ke}`;st(Te,Oe,ie),ie?.allowChange||Ye(Ze=>({...Ze,stepIndex:Math.max(Ze.stepIndex,Ke+1)}))},[We,Fe,tt,st,Ye]),hn=o.useCallback((ie,ve)=>{const Te=We?.id||`children-page-${Fe??0}`,Ke=`step-${typeof ve=="number"?ve:tt??0}`;st(Te,Ke,ie)},[We,Fe,tt,st]),jn=S?{currentPageIndex:Fe??0,currentStepIndex:tt??0,totalStepsInPage:nt.length,handleStepDone:mn,handleStepChange:hn}:null,zn=async()=>{const ie=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:z,flowState:it,answersByPage:it.answersByPage})):null;return typeof M=="function"&&await Promise.resolve(M(ie))||ie},Wn=async()=>{const ie=We?.id||`children-page-${it.pageIndex}`,ve=it.answersByPage[ie]||{},Te=W?(()=>{const Ze={};let J=0;return I.forEach(de=>{const ae=it.answersByPage[de.id]||{},ye=Array.isArray(de.steps)?de.steps.length:0;for(let Le=0;Le<ye;Le+=1){const ze=ae[`step-${Le}`];typeof ze<"u"&&(Ze[`step-${J+Le}`]=ze)}J+=ye}),Ze})():ve;if(typeof k=="function"){const Ze=await Promise.resolve(k(Te,{pageAnswers:ve,answersByPage:it.answersByPage,pages:I,currentPageId:ie}));return typeof M=="function"&&await Promise.resolve(M(Ze))||Ze}const Ke=Object.entries(ve).map(([Ze,J],de)=>({index:de,key:Ze,payload:J})),Oe={results:Ke,answers:Ke,score:0};return typeof M=="function"&&await Promise.resolve(M(Oe))||Oe},It=()=>{const ie=++ht.current,ve=()=>ie!==ht.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($){const Oe=zn();dt(Tn);const Ze=Oe;Promise.resolve(Ze).then(J=>{ve()||dt(J||{isEmpty:!0})}).catch(J=>{!ve()&&dt({isEmpty:!0})});return}if(S){const Oe=Wn();dt(Tn);const Ze=Oe;Promise.resolve(Ze).then(J=>{ve()||dt(J||{isEmpty:!0})}).catch(J=>{!ve()&&dt({isEmpty:!0})});return}const Te=je.current&&je.current._childOnResult,Ke=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof Te=="function"){const Oe=Ke(Te);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?dt(Oe):dt(Oe&&typeof Oe.then=="function"?Tn:{});const Ze=()=>{ve()||dt(J=>J===Tn?{}:J)};Promise.resolve(Oe).then(J=>{J&&!ve()?dt(J):Ze()}).catch(J=>{Ze()});return}if(typeof M=="function"){const Oe=Ke(M);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?dt(Oe):dt(Oe&&typeof Oe.then=="function"?Tn:{});const Ze=()=>{ve()||dt(J=>J===Tn?{}:J)};Promise.resolve(Oe).then(J=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}J&&!ve()?dt(J):Ze()}).catch(J=>{console.error("viewResults external handler failed",J),Ze()});return}},vn=()=>{if($){if(typeof Fe=="number"&&typeof xt=="number"&&Fe<xt-1){Ye(ve=>({...ve,pageIndex:ve.pageIndex+1,stepIndex:0}));return}return It()}if(S){const ve=nt.length;if(typeof tt=="number"&&tt<ve-1){Ye(Te=>({...Te,stepIndex:Te.stepIndex+1}));return}if(typeof Fe=="number"&&typeof xt=="number"&&Fe<xt-1){Ye(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return It()}if(typeof C=="function"){try{C()}catch{}return}const ie=je.current&&je.current._childOnNext;if(typeof ie=="function"){try{ie()}catch{}return}},Ft=$?q.title||q.label||A||L("common.popup","\uD31D\uC5C5"):a||y||(Array.isArray(i)?i[i.length-1]:void 0)||A||L("common.popup","\uD31D\uC5C5"),Ht=A||Ft,Mn=$?q.title??q.label??Ft:a??y??Ft,on=(ie,ve)=>{const Te=Tr(Ge,Fe),Ke=jr(ie,ve),Oe=it.answersByPage[Te]?.[Ke],Ze=aw(ie,{page:Ge,pageIndex:Fe,step:ie,stepIndex:ve,storedPayload:Oe,answersByPage:it.answersByPage,flowState:it}),J={key:Ke,index:ve,stepIndex:tt,isLast:ve===bt.length-1};switch(ie?.type){case"listen":return n.jsx(ys,{...J,...Ze,onDone:de=>Wt(ie,ve,de)});case"confirm":return n.jsx(gs,{...J,...Ze,onDone:de=>Wt(ie,ve,de),onChange:de=>jt(ie,ve,de)});case"confirmWithText":return n.jsx(bs,{...J,...Ze,onDone:de=>Wt(ie,ve,de),onChange:de=>jt(ie,ve,de)});case"orderList":return n.jsx(vs,{...J,...Ze,onDone:de=>Wt(ie,ve,de),onChange:de=>jt(ie,ve,de)});default:return null}},xn=o.useRef(void 0);o.useEffect(()=>{const ie=xn.current;if(xn.current=Fe,ie===void 0||ie===Fe||!gr())return;const ve=je.current;if(!ve)return;const Te=document.activeElement;if(!(!Te||Te===document.body||!ve.contains(Te)||Te.disabled===!0))return;const Ke=ve.querySelector(`.training-steps ${Cn.split(", ").join(", .training-steps ")}`)??Array.from(ve.querySelectorAll(Cn)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Fe]);const Hn=$?z.length>0?n.jsx("div",{className:"training-steps",children:bt.map((ie,ve)=>on(ie,ve))},`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||L("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,_n=S?n.jsxs(Vc.Provider,{value:jn,children:[We?.pageTop?n.jsx("div",{className:"training-page-top",children:We.pageTop}):null,n.jsx("div",{className:"training-steps",children:nt.map((ie,ve)=>{const Te=ie;return o.cloneElement(Te,{...Te.props,_stepIndex:ve,_totalSteps:nt.length,_stepKey:`step-${ve}`,_pageIndex:Fe})})},`replay-${Ie}`),We?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:We.pageBottom}):null]}):null,Vt=o.useRef(-1),$t=o.useCallback(()=>{if(!w)return;const ie=Qe,{results:ve,correct:Te,total:Ke}=ks(Qe),Oe={correct:Te,total:Ke,attempt:mt.current.length+1,previousAttempts:[...mt.current]};if(Vt.current===wt.current)return Oe;Vt.current=wt.current,kC({items:LC(ve),category:ed.has(w)?"sentence":"word",trainingType:w,entryPoint:B??"sentence",itemRef:D??null,correct:Te,total:Ke,score:typeof ie?.score=="number"?ie.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:E??null});try{v?.(Oe)}catch{}return Oe},[w,B,E,D,Qe,v]);o.useEffect(()=>{!Qe||Qe===Tn||Qe?.isEmpty||(ks(Qe).total??0)>0&&$t()},[Qe,$t]);const qt=o.useCallback(()=>{const ie=$t();Ct(),Ue(()=>{typeof b=="function"&&b(ie),typeof f=="function"&&f()})},[b,f,$t,dt,Ue]),fn=o.useCallback(()=>gt(""),[gt]),Ot=o.useCallback(()=>{Ue(()=>{typeof f=="function"&&f()})},[f,Ue]),sn=n.jsxs("div",{className:`page-popup${ft?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Ht,children:[n.jsxs("div",{ref:je,className:`page-popup__panel ${Me?"":"page-popup__panel--measuring"} ${ct==="center"?"page-popup__panel--center":ct==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Fc,{title:Mn,subtitle:$?q.subtitle||q.label:Array.isArray(i)?i.join(" / "):void 0,desc:$?void 0:r,depth:$?q.depth:i,icon:$?q.icon:s,wrapperStyle:$?q.wrapperStyle:l,iconTooltip:$?q.iconTooltip:u,progressMax:xt,progressIndex:Fe,pageIndex:Fe,pageCount:xt,onBack:Ot,onClose:Ot}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ct==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?_n:$?Hn:typeof g=="function"?g({registerOnNext:Lt,registerOnResult:et,panelRef:je,setResultOverlay:dt}):g})}),n.jsx(Ic,{onSettings:h,onNext:vn,onResult:It,useNoiseSettingBtn:!!($?q.useNoiseSetting??!0:_),stepIndex:tt,stepCount:Re,pageIndex:Fe,pageCount:xt,resultOpen:!!(Qe&&!Qe.isEmpty),hideNoiseRows:P})]}),Qe&&!Qe.isEmpty&&(N??sw)({score:Qe.score,results:Qe.results||Qe.answers||[],contextsLength:Qe.results?Qe.results.length:Qe.answers?Qe.answers.length:0,onReplay:()=>{if(G.current=Date.now(),Qe!==Tn){const{correct:ie,total:ve}=ks(Qe);mt.current.push({correct:ie,total:ve})}if(Ct(),qe(ie=>ie+1),$){if(Ye(Mr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){Ye(Mr());return}try{const ie=je.current&&je.current._childOnResult;typeof ie=="function"&&ie({replay:!0})}catch{}},onClose:qt,pending:Qe===Tn}),Qe?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":L("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:L("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(pe,{htmlType:"button",variant:"main",size:48,onClick:qt,label:L("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ha,{message:Nt,position:"top",onClose:fn})]}),Dt=n.jsx(ds.Provider,{value:He,children:sn});return typeof document<"u"&&document.body?en.createPortal(Dt,document.body):Dt}const On=iw;On.Page=Dr,On.ListenStep=qc,On.ConfirmStep=Uc,On.ConfirmWithTextStep=Gc,On.OrderListStep=Kc,On.CardStep=Yc,On.CardOrderStep=q_;function lw({label:e,homonum:t}){const a=sa()?.(e,t)??"",{imgRef:r,loading:i,hasImage:s,onLoad:l,onError:u}=Zo(a);return s?n.jsxs("div",{className:"tooltip-word-image__cell",children:[i&&n.jsx("div",{className:"tooltip-word-image__spinner"}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:i?0:1},onLoad:l,onError:u})]}):n.jsx("div",{className:"tooltip-word-image__cell tooltip-word-image__cell--text h3",children:n.jsx("span",{children:e})})}function td({words:e,anchorRect:t}){const a=o.useRef(null),[r,i]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:s,offsetHeight:l}=a.current,u=window.innerWidth;let c=t.left+t.width/2-s/2,d=t.top-l-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-s-8)),i({left:c,top:d})},[t]),!t||e.length===0?null:en.createPortal(n.jsx("div",{ref:a,className:"tooltip-word-image",style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:"tooltip-word-image__cells",children:e.map(s=>n.jsx(lw,{label:s.label,homonum:s.homonum},`${s.label}_${s.homonum??1}`))})}),document.body)}function uw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:i,groups:s,selected:l=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:m,onPrintEmpty:p,className:f,emptyHint:b,sectionType:v="page",disc:C}){const{t:h,i18n:_}=xe.useTranslation(),g=_.language?.startsWith("ko")??!1,{anchorRect:A,openAt:y,close:k}=Pa(),[x,w]=o.useState(null),B=o.useCallback(()=>{k(),w(null)},[k]);i2(B,!!x);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",N=D.length>0,O=r===void 0&&t===void 0,P=N?"match":O?"original":"ganada",[G,L]=o.useState(()=>P),[M,$]=o.useState("50"),[Z,q]=o.useState(1),[z,V]=o.useState(N);z!==N&&(V(N),L(P));const R=G==="match"&&!N||G==="original"&&!O?P:G,H=o.useMemo(()=>[...N?[{value:"match",label:h("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...O?[{value:"original",label:h("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:h("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:h("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:h("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:h("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:h("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:h("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[h,N,O]),W=o.useMemo(()=>["10","25","50","100"].map(ne=>({value:ne,label:h("wordSearch.pageSize",{count:Number(ne),defaultValue:`${ne}\uAC1C\uC529 \uBCF4\uAE30`})})),[h]),I=ne=>ne.words?.[0],S=o.useMemo(()=>{const ne=[...D].length,ue=iC(D),fe=new Map;return ge=>{let Ce=fe.get(ge);return Ce===void 0&&(Ce=ue((ge.words?.[0]?.label??"").slice(0,ne))?0:1,fe.set(ge,Ce)),Ce}},[D]),j=o.useCallback((ne,ue)=>{const fe=$e=>I($e)?.label??"",ge=$e=>I($e)?.syllables??[...fe($e)].length,Ce=$e=>($e.words??[]).reduce((He,je)=>{const Ie=parseInt(je.grade??"",10);return Number.isFinite(Ie)&&Ie<He?Ie:He},999);switch(R){case"match":return S(ne)-S(ue)||an(fe(ne),fe(ue));case"ganada":return an(fe(ne),fe(ue));case"ganada_desc":return an(fe(ue),fe(ne));case"syllable":return ge(ne)-ge(ue)||an(fe(ne),fe(ue));case"syllable_desc":return ge(ue)-ge(ne)||an(fe(ne),fe(ue));case"grade":return Ce(ne)-Ce(ue)||an(fe(ne),fe(ue));case"grade_desc":return Ce(ue)-Ce(ne)||an(fe(ne),fe(ue));default:return 0}},[R,S]),F=o.useMemo(()=>i.slice().sort(j),[i,j]),U=Number(M)||10,re=o.useMemo(()=>(s??[]).flatMap(ne=>ne.items.slice().sort(j).map(ue=>({item:ue,label:ne.label}))),[s,j]),te=s?re.length:F.length,le=Math.max(1,Math.ceil(te/U)),K=Math.min(Z,le),oe=o.useMemo(()=>F.slice((K-1)*U,K*U),[F,K,U]),Ae=o.useMemo(()=>{if(!s)return null;const ne=re.slice((K-1)*U,K*U),ue=new Map;for(const{item:fe,label:ge}of ne)ue.has(ge)||ue.set(ge,[]),ue.get(ge).push(fe);return[...ue.entries()].map(([fe,ge])=>({label:fe,items:ge}))},[s,re,K,U]);o.useEffect(()=>{q(1)},[G,M,te,r]);const Y=te>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(pn,{size:40,options:H,value:R,onChange:L,ariaLabel:h("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(pn,{size:40,options:W,value:M,onChange:$,ariaLabel:h("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(hr,{page:K,totalPages:le,onChange:q})]}):void 0,Q=ne=>{u&&u(ne)},me=t!==void 0&&a?n.jsxs(n.Fragment,{children:[h("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),h("wordSearch.resultTitleSuffix",{unit:g?bC(a):a})]}):void 0,De=t!==void 0&&t>0&&c!==void 0&&a?h("wordSearch.resultDisc",{unit:g?vC(a):a,max:c,selected:l.length}):void 0,be=C??De;return n.jsxs(Ca,{type:v,className:_e("word-search-result-block",f),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(me||Y||be)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(at,{icon:e,className:"word-search-result-block__head-icon"}),me&&n.jsx("span",{className:"word-search-result-block__title h3",children:me})]}),Y&&n.jsx("div",{className:"word-search-result-block__head-actions",children:Y}),be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:be})]}),(s?s.length===0:i.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:h("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})]}),s?(Ae??[]).map(ne=>n.jsx("div",{className:"word-search-result-block__group",children:n.jsx("div",{className:"word-search-result-block__items",children:ne.items.map(ue=>{const fe=l.includes(ue.id);return n.jsx("div",{onMouseEnter:ge=>{y(ge.currentTarget),w(ue.words??[])},onMouseLeave:B,children:n.jsx(pe,{htmlType:"button",size:"word",align:"grid",label:(ue.words??[]).map(ge=>ge.label),subLabel:(ue.words??[]).some(ge=>ge.subLabel)?(ue.words??[]).map(ge=>ge.subLabel):void 0,selected:fe,onClick:()=>Q(ue.id),minWidth:200})},ue.id)})})},ne.label)):n.jsx("div",{className:"word-search-result-block__items",children:oe.map(ne=>{const ue=l.includes(ne.id);return n.jsx("div",{onMouseEnter:fe=>{y(fe.currentTarget),w(ne.words??[])},onMouseLeave:B,children:n.jsx(pe,{htmlType:"button",size:"word",align:"grid",label:(ne.words??[]).map(fe=>fe.label),subLabel:(ne.words??[]).some(fe=>fe.subLabel)?(ne.words??[]).map(fe=>fe.subLabel):void 0,selected:ue,onClick:()=>Q(ne.id),minWidth:200})},ne.id)})}),x&&A&&n.jsx(td,{words:x,anchorRect:A})]}),le>1&&n.jsx("div",{className:"word-search-result-block__pagination-bottom",children:n.jsx(hr,{page:K,totalPages:le,onChange:q})}),(d||m)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(pe,{htmlType:"button",size:"56",type:"bar",label:h("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:l.length===0,onClick:l.length===0?void 0:d}),m&&n.jsx("div",{onClick:l.length===0?p:void 0,children:n.jsx(pe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:h("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:l.length===0,onClick:l.length===0?void 0:m})})]})]})}function cw(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,i=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:i}})}function dw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:i=4,minCount:s=1,combinationSections:l,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:m,title:p,titleIcon:f,disc:b,showInfoButton:v=!0,onClearPhoneme:C,onSearch:h,onSearchEmpty:_,searchDisabled:g=!1,searchLabel:A,searchChecking:y=!1,pairMode:k=!1,sectionType:x="page",beforeSearchContent:w,beforeContent:B,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:O}=xe.useTranslation(),P=o.useMemo(()=>O("wordPairs.infoNotes",{returnObjects:!0}),[O]),G=o.useMemo(()=>Array.from({length:i-s+1},(S,j)=>{const F=s+j;return{key:String(F),label:O("wordPairs.count",{n:F})}}),[O,i,s]),L=o.useMemo(()=>O("wordPairs.ordinals",{returnObjects:!0}),[O]),M=o.useCallback(S=>N?O("wordPairs.phonemeOrdinalLabel",{ordinal:L[S-1]??S}):a===1?O("wordPairs.phonemeSingleLabel","\uC74C\uC808"):O("wordPairs.phonemeN",{n:S}),[N,L,a,O]),$=o.useCallback(S=>N?O("wordPairs.phonemeContrastOrdinalLabel",{ordinal:L[S-1]??S}):a===1?O("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):O("wordPairs.phonemeContrast",{n:S}),[N,L,a,O]),Z=o.useCallback((S,j)=>j?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:q,toggleAt:z,close:V}=Pa(),R=o.useCallback(S=>r(Number(S)),[r]),H=ln("(max-width: 767px)"),W=o.useCallback(S=>cw(S,e).map(({label:j,value:F,displayLabel:U})=>{const re=!!F&&F!=="\uC5C6\uC74C";return n.jsxs("span",{className:_e("phoneme-select-block__cell-jamo-part",F?"":"phoneme-select-block__cell-jamo-part--empty",re?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${F==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:F==="\uC5C6\uC74C"?"x":F||d}),re&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:U??j})]},j)}),[e,d]),I=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(pe,{htmlType:"button",size:40,type:H?"dot":void 0,icon:"info",label:H?void 0:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:q?"is-selected":void 0,"aria-expanded":!!q,"aria-haspopup":"dialog",onClick:S=>z(S.currentTarget)})}),q&&n.jsx(Kn,{title:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:P,anchorRect:q,onClose:V})]});return n.jsxs(Ca,{type:x,title:p,icon:f,disc:b,action:v?I:void 0,className:_e("phoneme-select-block",m),children:[B,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(gn,{options:G,value:String(a),onChange:R,size:40,ariaLabel:O("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((S,j)=>{const F=t[j*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:W(F)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(j+1)})]},j)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:O("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,j)=>{const F=t[j*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:W(F)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(j+1)})]},j)})})]}):t.map((S,j)=>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:W(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(j+1)})]},j))}),(l||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((S,j)=>{const F=t[j*2]??{};return n.jsx(Dn,{title:Z(M(j+1),j===0),sections:u?u(F,j*2):l,selected:F,onSelect:c?.(j*2),align:"newline"},j)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,j)=>{const F=t[j*2+1]??{};return n.jsx(Dn,{title:$(j+1),sections:u?u(F,j*2+1):l,selected:F,onSelect:c?.(j*2+1),align:"newline"},j)})})]}):t.map((S,j)=>n.jsx(Dn,{title:Z(M(j+1),j===0),sections:u?u(S,j):l,selected:S,onSelect:c?.(j),align:"newline"},j))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(C||h||y)&&(()=>{const S=t.every(j=>{const F=aC(j);return Object.entries(F).every(([U,re])=>!re||U==="coda"&&re===Ei)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?_:void 0,children:[C&&n.jsx(pe,{htmlType:"button",size:"56",type:"bar",label:O("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),h?n.jsx(pe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:y?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:A??O("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||g||y,onDisabledClick:y?()=>{}:void 0,"aria-busy":y||void 0,onClick:h}):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:A??O("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function pw({title:e,sections:t,selected:a,onSelect:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,headerAction:d,className:m}){const{t:p}=xe.useTranslation();return n.jsx(Dn,{className:m,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function mw({title:e,headerAction:t,sections:a,selected:r,onSelect:i,className:s}){const{t:l}=xe.useTranslation();return a.length===0?null:n.jsx(Dn,{className:s,title:e??l("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:i,align:"newline"})}function hw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:i,positionCount:s,onPositionCountChange:l,inputMode:u,onInputModeChange:c,className:d}){const{t:m}=xe.useTranslation(),p={searchMode:m("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:m("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:m("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:m("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:m("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:m("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:m("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:m("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:m("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:m("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:m("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},f=h=>m("wordPairs.count",{n:h}),b=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[m("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."),m("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."),m("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(Ha,{items:m("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[f(1),f(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[m("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."),m("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]:f(s),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(h,_)=>{_===p.searchMode?a(h===p.explicit?"explicit":h===p.pick?"pick":"include"):_===p.phonemeOrder?i(h===p.orderMatch?"ordered":"unordered"):_===p.count?l(h===f(2)?2:1):_===p.inputMode&&c(h===p.pronInput?"phoneme":"word")};return n.jsx(Dn,{className:d,title:e??m("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:v,onSelect:C,align:"inline"})}function fw(e){const{title:t,items:a,columns:r,resizeStorageKey:i,gridTemplateColumns:s,mobileGridTemplateColumns:l,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:m=!0,selectedId:p,selectedIds:f,onSelect:b,onClose:v,pageSizeOptions:C=[10,25,50,100],initialPageSize:h,emptyText:_,noMatchText:g,countLabel:A,topContent:y,className:k=""}=e,{t:x}=xe.useTranslation(),w=u??x("common.search","\uAC80\uC0C9"),B=_??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=g??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[O,P]=o.useState(d??r[0]?.key??""),[G,L]=o.useState(m),[M,$]=o.useState(String(h??C[0]??10)),[Z,q]=o.useState(1);o.useEffect(()=>{q(1)},[D,M]);const z=c!==null,V=o.useCallback((te,le)=>{if(!le)return!0;const K=le.toLowerCase();return r.some(oe=>{const Ae=te[oe.key];return Ae==null?!1:String(Ae).toLowerCase().includes(K)})},[r]),R=c??V,H=o.useMemo(()=>{const te=z?a.filter(le=>R(le,D)):a;return O?[...te].sort((le,K)=>{const oe=le[O],Ae=K[O];return oe===Ae?0:wo(oe,Ae,G)}):te},[a,D,O,G,z,R]),W=Math.max(1,Math.ceil(H.length/Number(M)));Z>W&&q(W);const I=Math.min(Z,W),S=H.slice((I-1)*Number(M),I*Number(M)),j=o.useCallback(te=>{O===te?L(le=>!le):(P(te),L(!0)),q(1)},[O]),F=o.useMemo(()=>{if(typeof A=="function"){const te=H.length,le=A(te);if(typeof le=="string"){const K=le.lastIndexOf(String(te));if(K>=0)return{prefix:le.slice(0,K),suffix:le.slice(K+String(te).length)}}return{label:le}}if(typeof A=="string"&&A.includes("{n}")){const[te,le]=A.split("{n}");return{prefix:te,suffix:le}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[A,H.length,x]),U=o.useMemo(()=>r.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>j(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&O===te.key?G?"asc":"desc":null})),[r,O,G,j]),re=o.useMemo(()=>C.map(te=>({value:String(te),label:x("common.pageSizeLabel",{n:te})})),[C,x]);return n.jsxs(Fn,{className:`popup-list ${k}`,title:t,onClose:v,children:[y,"label"in F&&n.jsx("p",{className:"toolbar__count body-1",children:F.label}),n.jsx(Ro,{count:"label"in F?void 0:{value:H.length,prefix:F.prefix,suffix:F.suffix},search:z?{value:D,onChange:N,placeholder:w}:void 0,pageSize:{options:re,value:M,onChange:$},pagination:{page:I,total:W,onChange:q}}),n.jsx(Go,{size:"medium",gridTemplateColumns:s,mobileGridTemplateColumns:l,resizable:!0,resizeStorageKey:i,fields:U,items:S,onRowClick:b,renderRow:te=>{const le=f!=null?te.id!=null&&f.has(te.id):p!=null&&te.id===p;return r.map(K=>({content:K.render?K.render(te):te[K.key]??"",className:_e(K.className,le&&"popup-list__row--selected")}))},empty:z&&D!==""&&a.length>0?E:B})]})}function nd(e){const{title:t,message:a,topContent:r,details:i,children:s,confirmLabel:l,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:m="main",confirmDisabled:p=!1,onConfirm:f,closeOnConfirm:b=!0,onClose:v,inline:C,size:h="small",className:_,initialFocus:g="close"}=e,{t:A}=xe.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")??[]),O=g==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];O&&!O.disabled&&O.focus()},[]);const k=o.useRef(!1),[x,w]=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;w(!0);let O=!1;try{O=await D()}catch(P){typeof console<"u"&&console.error(P)}finally{O||(k.current=!1,w(!1),requestAnimationFrame(()=>{const P=document.activeElement;(!P||P===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Fn,{title:t,onClose:v,closeDisabled:x,inline:C,size:h,className:_e("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 O=d.closeOnClick??!0;return O&&D(),O||N.didClose()})}}]:[],...c?[]:[{label:u??A("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:D})=>D()}],{label:l??A("common.confirm","\uD655\uC778"),variant:m,disabled:p||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);return await f(N.close),b&&D(),b||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),i&&i.length>0&&n.jsx(Nr,{children:i.map((D,N)=>n.jsx(Sn,{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}),s]})}function Cw(e,t,a={}){const{t:r}=xe.useTranslation(),[i,s]=o.useState(!1),l=o.useRef(!1),u=o.useCallback(()=>{l.current=!0},[]),c=o.useCallback(()=>l.current?(l.current=!1,!0):e?(s(!0),!1):!0,[e]),d=i?n.jsx(nd,{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:()=>{s(!1),t()},onClose:()=>s(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function gw({onApply:e,onCancel:t}){const{t:a}=xe.useTranslation(),[r,i]=o.useState(""),[s,l]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),m=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async v=>{const C=r.trim();if(C){l(!0),c(null);try{await e(C),v()}catch(h){c(ji(h)),l(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),f=o.useCallback((v,C)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&p(C)},[p]),b=v=>{i(v.target.value),c(null)};return n.jsx(Fn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:s,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:s,onClick:({closeWithAnimation:v})=>v()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||s,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?m:void 0,"aria-describedby":u?m:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:C=>f(C,v),disabled:s,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:m,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const ad=["var(--color-main)","var(--color-sub)"],bw=2e3;function yw(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 As({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:i,trigger:s=0}){const l=o.useMemo(()=>{const C=Math.floor(t/2),h=t-C,_=(g,A)=>Array.from({length:g}).map((y,k)=>{const x=6+Math.random()*12,w=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),B=ad[Math.floor(Math.random()*ad.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(A==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,O=Math.cos(N)*D,P=Math.sin(N)*D*1.35,G=Math.random()*720-360,L=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),M=Math.random()>.7?"50%":"3px";return{id:`${A}-${k}`,side:A,size:w,color:B,delay:E,vx:O,vy:P,angularVel:G,life:L,borderRadius:M}});return[..._(C,"left"),..._(h,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),m=o.useRef(i);o.useEffect(()=>{m.current=i},[i]);const p=o.useRef(null),f=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"&&f.current==null&&(f.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const V=setTimeout(()=>m.current?.(),0);return()=>clearTimeout(V)}const C=1200,h=performance.now(),_=f.current&&f.current!==document.body?f.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),A=V=>Math.max(40,(V||window.innerWidth)*.02),y=_?.width||window.innerWidth||375,k=_?.height||window.innerHeight||812,x=V=>{const R=[...V].sort((H,W)=>H-W);return R[Math.floor(R.length/2)]||1},w=x(l.map(V=>Math.abs(V.vy))),B=x(l.map(V=>Math.abs(V.vx))),E=Math.sqrt(2*C*(k*.72+g))/w,D=w*E/C,N=y*.5/(B*D),O=(V,R,H)=>Math.min(H,Math.max(R,V)),P=O(E,.8,2.4),G=O(N,.7,2.2),L=a>0?a/bw:1,M=l.map(V=>({...V,life:V.life*L,vx:V.vx*G,vy:V.vy*P,startTime:h+V.delay,ended:!1})),$=_?{x:_.left-A(_.width),y:_.top+_.height+g}:{x:-A(window.innerWidth),y:window.innerHeight+g},Z=_?{x:_.left+_.width+A(_.width),y:_.top+_.height+g}:{x:window.innerWidth+A(window.innerWidth),y:window.innerHeight+g},q=V=>{let R=!1;for(const H of M){const W=c.current[H.id];if(!W||!W)continue;if(V<H.startTime){W.style.display="none",R=!0;continue}if(!H._inited){const oe=H.side==="left"?$.x:Z.x,Ae=H.side==="left"?$.y:Z.y;W.style.left=`${oe}px`,W.style.top=`${Ae}px`,W.style.transform="translate3d(0px, 0px, 0)",W.style.display="block",W.style.zIndex="100000",typeof H.color=="string"&&H.color.startsWith("var(")&&(W.style.background=yw(W,H.color)??"#FF0060"),H._inited=!0}const I=(V-H.startTime)/1e3;if(I<0)continue;const S=H.life/1e3;if(I>=S){W.style.opacity="0",W.style.display="none",H.ended=!0;continue}R=!0;const j=H.side==="left"?$.x:Z.x,F=H.side==="left"?$.y:Z.y,U=j+H.vx*I,re=F+H.vy*I+.5*C*I*I,te=(H.angularVel||0)*I,le=U-j,K=re-F;W.style.transform=`translate3d(${le}px, ${K}px, 0) rotate(${te}deg)`,W.style.opacity=`${Math.max(0,1-I/S)}`}R?d.current=requestAnimationFrame(q):m.current?.()};d.current=requestAnimationFrame(q);const z=setTimeout(()=>{try{if((f.current?f.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const V=document.createElement("div");V.className="party-container",V.style.position="fixed",V.style.inset="0",V.style.pointerEvents="none",V.style.overflow="visible",V.style.zIndex="2147483647";for(const R of l){const H=document.createElement("span");H.className=`confetti confetti--${R.side}`,H.setAttribute("aria-hidden","true"),H.style.display="none",H.style.position="fixed",H.style.left="0px",H.style.top="0px",H.style.width=`${R.size}px`,H.style.height=`${Math.max(4,R.size*.6)}px`,H.style.background=R.color,H.style.borderRadius=R.borderRadius,H.style.transform="translate3d(0,0,0)",H.style.opacity="0",V.appendChild(H),c.current[R.id]=H}(document.body||f.current).appendChild(V),p.current=V}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(z),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,s,l]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:u,children:l.map(C=>n.jsx("span",{"aria-hidden":!0,ref:h=>{c.current[C.id]=h},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}-${s}`))});return typeof document<"u"?en.createPortal(v,f.current||document.body):v}const Ns=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function vw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const s=l=>{const u=l.detail??{};r(c=>({n:(c?.n??0)+1,count:Ns(u.count),strength:Ns(u.strength),duration:Ns(u.duration)}))};return window.addEventListener("party:trigger",s),()=>window.removeEventListener("party:trigger",s)},[]);const i=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(As,{active:t,trigger:e}),a&&n.jsx(As,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:i})]})}function xw({title:e,sub:t,rightAction:a,titleAction:r,badge:i,badgeVariant:s="default",documentTitle:l,onBack:u,backLabel:c,wrap:d=!1}){const{t:m}=xe.useTranslation();Gy(typeof e=="string"?e:l??null);const p=c??m("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(pe,{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}),i&&n.jsx("div",{className:"page-title__badge",children:n.jsx(At,{label:i,size:"small",variant:s,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 _w(e){return e??""}const rd=o.createContext({words:[],loading:!1});function ww(){return o.useContext(rd)}function Bw({words:e,loading:t,error:a,statusMessage:r,localVersion:i,remoteVersion:s,progress:l,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const m=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:i,remoteVersion:s,progress:l,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,i,s,l,u,c]);return n.jsx(rd.Provider,{value:m,children:d})}function kw({items:e,actions:t,columns:a,flat:r=!1,className:i,style:s}){const l=a??e.length;return n.jsx("section",{className:_e("summary-strip",r&&"summary-strip--flat",i),style:{"--summary-strip-cols":String(l),...s},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 Aw=(e,t)=>`${e} / ${t}`;function Nw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:i=Aw,pageWidth:s,pageHeight:l,margin:u,className:c,style:d}){const{t:m}=xe.useTranslation(),p=o.useRef(null),f=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,h]=o.useState(null),[_,g]=o.useState(!1);o.useEffect(()=>{const L=p.current;if(!L)return;const M=()=>g(L.scrollWidth>L.clientWidth+1);if(M(),typeof ResizeObserver>"u")return;const $=new ResizeObserver(M);return $.observe(L),()=>$.disconnect()},[C]);const A=e.map(L=>`${L.id}\0${L.section??""}\0${L.group??""}`).join(""),y=C&&C.shape===A?C.pages:null,[k,x]=o.useState(0);o.useEffect(()=>{const L=v.current;if(!L||typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>x(L.offsetHeight));return M.observe(L),()=>M.disconnect()},[]);const[w,B]=o.useState(0);o.useEffect(()=>{const L=f.current;if(!L||typeof ResizeObserver>"u")return;let M=null;const $=typeof requestAnimationFrame=="function"?z=>requestAnimationFrame(z):z=>setTimeout(z,16),Z=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:z=>clearTimeout(z),q=new ResizeObserver(()=>{M==null&&(M=$(()=>{M=null,B(z=>z+1)}))});return Array.from(L.children).forEach(z=>q.observe(z)),()=>{q.disconnect(),M!=null&&Z(M)}},[A]),o.useLayoutEffect(()=>{const L=f.current,M=v.current;if(!L||!M)return;const $=S=>S.getBoundingClientRect().height||S.offsetHeight,Z=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{Z.set(S.dataset.chromeSection??"",$(S))});const q=S=>$(M)-(Z.get(S??"")??0),z=Array.from(L.children).map(S=>$(S)),V=[];e.forEach((S,j)=>{const F=V[V.length-1],U=F?e[F[0]]:void 0;U&&S.group!=null&&U.group===S.group&&U.section===S.section?F.push(j):V.push([j])});const R=[];let H=[],W=0;const I=()=>{H.length&&R.push(H),H=[],W=0};V.forEach(S=>{const j=S.reduce((U,re)=>U+z[re],0),F=q(e[S[0]].section);H.length&&e[H[0]].section!==e[S[0]].section&&I(),j>F?S.forEach(U=>{H.length&&W+z[U]>F+.01&&I(),H.push(U),W+=z[U]}):(H.length&&W+j>F+.01&&I(),S.forEach(U=>H.push(U)),W+=j)}),I(),h(S=>S&&S.shape===A&&JSON.stringify(S.pages)===JSON.stringify(R)?S:{shape:A,pages:R})},[A,k,s,l,u,w]);const E=jo,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."]}),O=(L,M,$)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:$!=null&&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:i(L,M)})]})}),P=Array.from(new Set(e.map(L=>L.section??""))),G={...s?{"--report-page-w":s}:null,...l?{"--report-page-h":l}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:_e("report-doc",c),style:G,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?m("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:P.map(L=>{const M=O(1,1,L||void 0);return n.jsxs("div",{"data-chrome-section":L,children:[M.header,M.footer]},L)})}),n.jsx("div",{ref:f,className:"report-doc__measure-blocks",children:e.map(L=>n.jsx("div",{children:L.content},L.id))})]}),y&&n.jsx("div",{className:"report-doc__pages",children:y.map((L,M)=>{const{header:$,footer:Z}=O(M+1,y.length,e[L[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[$,L.map(q=>n.jsx("div",{children:e[q].content},e[q].id)),Z]},M)})})]})}function Ew({title:e,fields:t,columns:a=4,className:r,style:i}){return n.jsxs("div",{className:_e("report-info",r),style:{"--report-info-cols":String(a),...i},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((s,l)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:s.label}),n.jsx("span",{className:"report-info__value",children:s.value})]},l))})]})}const na=new Map;let Lr=null;const Dw=12;function Sw(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 $r(){const e=new Map;for(const t of na.keys()){if(!t.isConnected)continue;const a=Sw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,i)=>r.compareDocumentPosition(i)&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 i=r.getBoundingClientRect().height;i>0&&(a+=i+Dw)}}}function Tw(e){return typeof window>"u"?()=>{}:(na.set(e,(na.get(e)??0)+1),na.get(e)===1&&typeof ResizeObserver<"u"&&(Lr??(Lr=new ResizeObserver(()=>$r())),Lr.observe(e)),$r(),()=>{const t=(na.get(e)??1)-1;if(t>0){na.set(e,t),$r();return}na.delete(e),Lr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),$r()})}function jw({title:e,message:t,actionLabel:a,onAction:r,icon:i,onClose:s,className:l=""}){const{t:u}=xe.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),m=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,f=p?.parentElement?.closest(".update-alert-stack")??p,b=f?Tw(f):null;return()=>{b?.(),m.current&&p&&p.contains(document.activeElement)&&sr(p)}},[]),n.jsxs("div",{ref:d,className:_e("update-alert",l),role:"alert",children:[s&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{m.current=!0,s()},"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:i??n.jsx(Fs,{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(pe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function Mw({title:e,titleLevel:t=3,description:a,topActions:r,children:i,footerLeft:s,footerRight:l,ariaLabel:u,onClick:c,draggable:d,onDragStart:m,onDragEnd:p,className:f}){const b=t?`h${t}`:"div",v=s!=null||l!=null,C=i!=null&&i!==!1,h=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:_e("training-card",c?"training-card--clickable":"",f),onClick:c,onKeyDown:c?h: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:m,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:_=>_.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:i}),v&&n.jsxs("div",{className:"training-card__footer",children:[s!=null&&n.jsx("div",{className:"training-card__footer-left",children:s}),l!=null&&n.jsx("div",{className:"training-card__meta",children:l})]})]})}function Lw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:i,beforeSort:s,sort:l,actions:u,empty:c=!1,emptyContent:d,dragOver:m=!1,onDragOver:p,onDragLeave:f,onDrop:b,children:v,className:C}){const{t:h}=xe.useTranslation(),_=o.useId(),g=t?`h${t}`:"span",A=i!=null,y=_e("training-card-group",m&&"training-card-group--dragover",r&&"training-card-group--collapsed",A&&"training-card-group--collapsible",C);return n.jsxs("div",{className:y,onDragOver:p,onDragLeave:f,onDrop:b,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:[A&&n.jsx(pe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?h("common.expandFor",{name:e}):h("common.collapseFor",{name:e}):r?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:i}),typeof e=="string"?n.jsx(g,{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}),(s!=null||l||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:k=>k.stopPropagation(),children:[s,l&&n.jsx(pn,{size:40,options:l.options,value:l.value,placeholder:l.placeholder,onChange:l.onChange,ariaLabel:typeof e=="string"&&e?h("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 $w="speechear:saved_word_tables";function Rw(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 Pw(){try{const e=localStorage.getItem($w);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Rw):[]}catch{return[]}}function od(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 Es(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Iw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let i=2;t.has(r);i++)r=`${a.id}~${i}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Fw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:i,filterDefaultCollapsed:s,filterCollapsed:l,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:m,items:p,onSaveComplete:f,onLoad:b,onRemoveItem:v,onReset:C,resetLabel:h,saveButtonLabel:_,secondarySaveButtonLabel:g,onReorder:A,showCellCount:y,onAddItem:k,className:x,renderSavePopup:w,renderWordSearch:B,hideControls:E,saveOnly:D,tableName:N,nameValue:O,onNameChange:P,descriptionValue:G,onDescriptionChange:L,namePlaceholder:M,descriptionPlaceholder:$,existingNames:Z,editingName:q,onCancel:z,initialItemsPerPage:V,renderCellAction:R,actionsLeftExtra:H}){const{t:W}=xe.useTranslation(),I=h??W("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),S=p===void 0,j=!!P,[F,U]=o.useState([]),re=(O??"").trim(),te=re||(M??"").trim(),le=(G??"").trim()||($??"").trim(),K=(Z??[]).map(ae=>ae.trim().toLowerCase()),oe=[q?.trim().toLowerCase(),...F].filter(ae=>!!ae),Ae=[...K];for(const ae of oe){const ye=Ae.indexOf(ae);ye!==-1&&Ae.splice(ye,1)}const Y=re!==""&&Ae.includes(re.toLowerCase()),[Q,me]=o.useState(Array(4).fill(null)),[De,be]=o.useState(4),[ne,ue]=o.useState(null),fe=Q.slice(0,De),ge=!!d?.show,[Ce,$e]=o.useState(!0),[He,je]=o.useState(!0),Ie=d&&{...d,top:Ce,bottom:He},[qe,mt]=o.useState("landscape"),[ct,rt]=o.useState(["image","word","standardPron"]),[ft,ke]=o.useState("show"),[Ve,we]=o.useState(!0),[Ue,Be]=o.useState(!0),Me=o.useRef(null),Se=o.useRef([]),[Je,Qe]=o.useState(V==="all"?Number.POSITIVE_INFINITY:V??8),[dt,ht]=o.useState("right"),[wt,Ct]=o.useState(!1),[Nt,gt]=o.useState(!1),{toastMessage:it,toastType:Ye,showWarning:se,clearToast:Ne}=Rl("warning"),We=o.useCallback(()=>ue(null),[ue]);k&&!S&&!y&&St("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.');const[nt,Fe]=o.useState(()=>Math.max(p?.length??1,1)),Ge=S?De:y?Math.max(nt,p?.length??1,1):Math.max(p?.length??0,1),{width:bt,height:Re}=ga[qe],tt=!S&&!y,xt=p?.length??0,Lt=Math.min(Je,Math.max(xt,1)),et=tt?Lt:Ge,ot=tt?qu(p??[],et):null,lt=!!ot&&ot.length>1,st=S?fe.some(ae=>ae!==null&&ae.length>1):(p??[]).some(ae=>(ae.words??[]).length>1),jt=N?.trim()||`${Fi(La())} ${st?W("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):W("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Wt=o.useCallback(()=>lt?Se.current.filter(ae=>ae!==null):Me.current?[Me.current]:[],[lt]),{print:mn,openNewWindow:hn,downloadHtml:jn}=ss({getElements:Wt,paperW:bt,paperH:Re,fileName:jt,onPopupBlocked:()=>{se(W("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."))}}),zn=ae=>{be(ae),me(ye=>ye.length>=ae?ye:[...ye,...Array(ae-ye.length).fill(null)]),ue(null)},Wn=ae=>{me(ye=>{const Le=[...ye];return Le[ae]=null,Le}),ne===ae&&ue(null)},It=ae=>{if(ne===null)return;const ye=ne;me(ze=>{const ut=[...ze];return ut[ye]=ae.length>0?ae:null,ut});const Le=fe.findIndex((ze,ut)=>ut>ye&&ze===null);ue(Le!==-1?Le:null)},vn=S?fe.some(ae=>ae?.some(ye=>!!ye.colloquialPronunciation)):(p??[]).some(ae=>(ae.words??[]).some(ye=>!!ye.colloquialLabel)),Ft=o.useMemo(()=>sa()?S?Q.slice(0,De).flatMap(ae=>(ae??[]).map(ye=>[ye.word,ye.homonum])):(p??[]).flatMap(ae=>(ae.words??[]).map(ye=>[ye.label,ye.homonum])):[],[S,Q,De,p]),[Ht,Mn]=o.useState(!1);o.useEffect(()=>{if(Ft.length===0)return;let ae=!1;return Promise.all(Ft.map(([ye,Le])=>Ni(ye,Le))).then(ye=>{ae||Mn(ye.some(Boolean))},()=>{}),()=>{ae=!0}},[Ft]);const on=Ft.length>0&&Ht,xn=o.useMemo(()=>[...S||y?[{label:W("wordTable.filter.columns","\uCE78 \uC218"),items:nx.map(ae=>({value:`${ae}\uCE78`,displayLabel:W("wordTable.filter.column",{count:ae})})),display:"segmented"}]:[],...tt&&(p?.length??0)>0?[lc(W,{hasPairs:st,itemCount:xt})]:[],...lt?[ax(W)]:[]],[W,S,y,tt,p?.length,st,xt,lt]),Hn={...S||y?{[W("wordTable.filter.columns","\uCE78 \uC218")]:`${Ge}\uCE78`}:{},...tt&&(p?.length??0)>0?{[W(st?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Lt}\uAC1C`}:{},...lt?{[W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:dt}:{}},_n=(ae,ye)=>{ye===W("wordTable.filter.columns","\uCE78 \uC218")?S?zn(parseInt(ae)):Fe(parseInt(ae)):ye===W(st?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Qe(uc(parseInt(ae),xt)):ye===W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&ht(cc(ae))},Vt=S?Iw(fe.filter(ae=>ae!==null&&ae.length>0).map(ae=>({id:Es(ae),words:ae.map(od)}))):p??[],$t=()=>{S&&me(ae=>ae.length>De?ae.slice(0,De):ae)},qt=(ae=!1)=>{if(gt(ae),j&&f){const ye=te.trim().toLowerCase();ye&&U(Le=>Le.includes(ye)?Le:[...Le,ye]),f(te,Vt,le||void 0,ae),$t();return}if(D&&f){f("",Vt,void 0,ae),$t();return}if(f){Ct(!0);return}jn()},[fn,Ot]=o.useState(!1),[sn,Dt]=o.useState(""),ie=sn.trim(),ve=ie!==""&&K.includes(ie.toLowerCase()),Te=()=>{Dt(te?W("wordTable.save.copyName",{name:te,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ot(!0)},Ke=()=>{!ie||ve||!f||(f(ie,Vt,le||void 0,!0),$t(),Ot(!1))},Oe=Vt.length===0,Ze=Oe||j&&(te===""||Y),J=()=>{if(Oe){se(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(j&&te===""){se(W("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}j&&Y&&se(W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},de=n.jsx(ba,{items:Vt,orientation:qe,contentTypes:ct,cutLine:ft,showOutline:Ve,showDivLine:Ue,count:Ge});return n.jsxs(n.Fragment,{children:[n.jsxs(Ca,{type:"page",icon:t,title:e,disc:a,className:_e("word-table-block",x),children:[fn&&n.jsx(Fn,{size:"small",title:g??W("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ot(!1),footer:({closeWithAnimation:ae})=>n.jsxs(n.Fragment,{children:[n.jsx(pe,{htmlType:"button",size:48,type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:ae}),n.jsx(pe,{htmlType:"button",size:48,type:"bar",variant:"main",label:W("common.save","\uC800\uC7A5"),disabled:!ie||ve,onClick:Ke})]}),children:n.jsx(Xn,{label:W("wordTable.save.nameLabel","\uC774\uB984"),value:sn,onChange:Dt,placeholder:W("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:Ke,error:ve?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),wt&&f&&w?.({defaultName:typeof e=="string"?e:W("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:de,previewW:bt,previewH:Re,items:Vt,existingNames:Pw().map(ae=>ae.name),saveAsNew:Nt,onSave:(ae,ye)=>{f(ae,Vt,ye,Nt),$t(),Ct(!1)},onCancel:()=>Ct(!1)}),(S||k)&&ne!==null&&B?.({cellIndex:ne,onConfirm:S?It:ae=>{if(k){const ye=ae[0];if(ye){const Le=new Set((p??[]).map(ut=>ut.id));let ze=Es([ye]);for(let ut=2;Le.has(ze);ut++)ze=`${Es([ye])}~${ut}`;k({id:ze,words:[od(ye)]})}}ue(null)},onClose:We}),!E&&n.jsx(ns,{title:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,hasImage:on,hasColloquial:vn,contentTypes:ct,orientation:qe,showOutline:Ve,cutLine:ft,showDivLine:Ue,setters:{setContentTypes:rt,setOrientation:mt,setShowOutline:we,setCutLine:ke,setShowDivLine:Be,setShowTopInfo:$e,setShowBottomInfo:je},showCutLine:(tt?et:Ge)>1,showDivLine2:st,middleSections:xn,extraSelected:Hn,onExtraSelect:_n,showPaperBands:ge,showTopInfo:Ce,showBottomInfo:He}),lt&&ot?n.jsx("div",{className:"word-table-block__pages",children:ot.map((ae,ye)=>n.jsx(ba,{orientation:qe,contentTypes:ct,cutLine:ft,showOutline:Ve,showDivLine:Ue,count:et,items:ae,onRemoveItem:v,onReorder:A&&((Le,ze)=>A(Le+ye*et,ze+ye*et)),renderCellAction:R&&((Le,ze)=>R(Le+ye*et,ze)),brand:Ie,code:m,contentRef:Le=>{Se.current[ye]=Le},pageNumber:{current:ye+1,total:ot.length},pageNumberPosition:dt},ye))}):n.jsx(ba,{orientation:qe,contentTypes:ct,cutLine:ft,showOutline:Ve,showDivLine:Ue,count:Ge,items:S?void 0:p??[],editCells:S?fe:void 0,activeCell:ne,onActivateCell:S||k?ue:void 0,onRemoveCell:S?Wn:void 0,onRemoveItem:S?void 0:v,onReorder:S?void 0:A,renderCellAction:S?void 0:R,brand:Ie,code:m,showFillerAdd:!!k,contentRef:Me}),!E&&!D&&(C||H!=null)&&n.jsxs("div",{className:"word-table-block__table-actions",children:[C&&n.jsx(pe,{htmlType:"button",size:48,type:"bar",label:I,onClick:C}),H]}),j&&!E&&n.jsxs(Nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(Sn,{variant:"custom",label:W("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{required:!0,value:O??"",onChange:P,placeholder:M?M+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Y?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(O??"").trim()&&(M??"").trim()&&(ae.preventDefault(),P?.(M??""))}})}),n.jsx(Sn,{variant:"custom",label:W("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{value:G??"",onChange:L,placeholder:$?$+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(G??"").trim()&&($??"").trim()&&(ae.preventDefault(),L?.($??""))}})})]})]}),!E&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!D&&b&&n.jsx(pe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:b}),!D&&n.jsx(pe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:hn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[z&&n.jsx(pe,{htmlType:"button",size:"56",type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:z}),!D&&n.jsx(pe,{htmlType:"button",size:"56",type:"bar",label:W("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:mn}),g&&n.jsx(pe,{htmlType:"button",size:"56",type:"bar",label:g,onClick:()=>j?Te():qt(!0),disabled:Oe,onDisabledClick:()=>{se(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(pe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_??W("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>qt(!1),disabled:Ze,onDisabledClick:J})]})]}),n.jsx(ha,{message:it,type:Ye,onClose:Ne})]})}function sd({items:e,className:t}){const a=e.length,r=a<=3?1:2,i=Math.ceil(a/r)||1,s=r*i;return n.jsx("div",{className:_e("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:Array.from({length:s},(l,u)=>{const c=e[u];return c?n.jsx("div",{className:"word-table-thumb__cell",children:(c.words?.length?c.words:[{label:c.id}]).map((d,m)=>n.jsxs(o.Fragment,{children:[m>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:d.label})]},m))},u):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},u)})})}function Ow({items:e,name:t,description:a,createdAt:r,code:i,published:s,publishedLabel:l,shared:u,sharedLabel:c,isNew:d,publisherName:m,publishedAt:p,likeCount:f,downloadCount:b,onPublisherClick:v,selected:C,onClick:h,onMore:_,titleNode:g,className:A}){const{t:y}=xe.useTranslation(),k=g!=null,x=m!=null||p!=null||f!=null||b!=null,w=B=>{B.target===B.currentTarget&&!k&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),h?.())};return n.jsxs("div",{className:_e("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",A),role:"button",tabIndex:0,"aria-label":i?`${t} (${i})`:t,onClick:k?void 0:h,onKeyDown:w,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":y("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(sd,{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})]}),_&&!k&&n.jsx(pe,{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(),_(B)}})]}),(i||r||s||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?Ii(r,y):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(s||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[s&&n.jsx(At,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:l??y("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(At,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??y("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),i&&n.jsx("span",{className:"word-table-button__code caption-1",children:i})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[m&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":y("wordTable.publisherFilter",{name:m,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),v()},children:m}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:m})),p&&n.jsx("span",{className:"training-card__date body-4",children:Ii(p,y)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[f!=null&&n.jsx(At,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(f),"aria-label":y("common.likeCount",{count:f,defaultValue:`\uC88B\uC544\uC694 ${f}`})}),b!=null&&n.jsx(At,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":y("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1069
+ `).map((l,u,c)=>n.jsxs(o.Fragment,{children:[l,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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:l=>{e&&(l.preventDefault(),e())},children:s("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:l=>{t&&(l.preventDefault(),t())},children:s("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:jo,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:s("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("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:s("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",i]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function Fx({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:i,className:s,containerClassName:l,renderLink:u,menuLabel:c}){const{t:d}=xe.useTranslation(),m=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,f]=o.useState(!1),b=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Gn(()=>{const y=document.getElementById(b);y&&y.contains(document.activeElement)&&v.current?.focus(),f(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,A=y=>{y.matches&&f(!1)};return g&&(g.matches&&f(!1),g.addEventListener?.("change",A)),()=>{_(),g?.removeEventListener?.("change",A)}},[p,b]);const C=l?`${l} landing-header__inner`:"landing-header__inner",h=(_,g)=>u?u(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:s?`landing-header ${s}`:"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((_,g)=>n.jsx("span",{children:h(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[i,r.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>f(_=>!_),"aria-expanded":p,"aria-controls":b,"aria-label":p?m.close:m.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:l??void 0,children:r.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:h(_,()=>f(!1))},`${g}:${_.href}`))})})]})}function Ox({children:e,action:t,onClick:a,className:r}){const i=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:i,onClick:a,...Iu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function zx({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),i=o.useRef(null),s=o.useCallback(()=>{const C=t.current,h=C.phase!=="sound"&&C.at>0;i.current=h?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),l=o.useCallback(()=>{const C=i.current;return i.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,h,_=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:h,at:Date.now()-Math.max(0,_)},new Promise(A=>{const y=setTimeout(()=>{r.current===y&&(r.current=null),A(!!e.current&&g===a.current)},C);r.current=y})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),m=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),f=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:f,isCurrent:b,abort:u,waitPad:c,enterSound:d,leave:m,pause:s,resume:l,__bumpGenerationForTest:v}),[p,f,b,u,c,d,m,s,l,v])}const va=9,Wx=e=>Math.round(Math.min(va,Math.max(0,e))/va*100),Hx=e=>e/100*va,Za=2,gc=.1,Vx=e=>Math.min(Za,Math.max(0,e)),qx=.1,Ux=e=>Math.round(e*1e6)/1e6;function Xa(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Vx(t);const a=Math.min(va,Math.max(0,Number(e.level)||0))/va,r=Number(e.mainVolume);return r>0?a>0?Ux(Math.min(Za,Math.max(qx,a/r))):0:1}const bc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function yc(e){return bc(e)}function us(e){return bc(e)*Xa(e)}function cs(e,t=If()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,us(e)/a)}function Jn(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=Xa({level:a.level,mainVolume:a.mainVolume})),a}const Qn={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},ds=o.createContext(null);function _r(){return o.useContext(ds)}const ps=e=>`${Pf()}/${e}`,vc=e=>Array.from({length:10},(t,a)=>ps(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),wr={get defaultNoise(){return ps("noise1.mp3")},get street(){return vc("noise2")},get restaurant(){return vc("noise3")},get buzz(){return ps("noise4.mp3")}};function Gx(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return wr.defaultNoise;case"street":return wr.street[t];case"restaurant":return wr.restaurant[t];case"buzz":return wr.buzz;default:return null}}function Kx({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const i=o.useRef(e?.registerAnalyser);i.current=e?.registerAnalyser;const s=o.useRef(null),[l,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),m=o.useRef(null),p=o.useRef(null),f=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)},[]),h=o.useCallback((k,x=250)=>{const w=s.current;if(!w)return;const B=d.current;if(B){d.current=null;try{w.pause()}catch{}w.src=B,w.load()}if(!w.src)return;f.current+=1,C();try{eo(),Qa(w).then(O=>{if(s.current===w)try{i.current?.("noise",O)}catch{}})}catch{}const E=w.paused?0:er(w);w.paused&&Pn(w,0),w.play().catch(()=>{});const D=performance.now(),N=()=>{const O=Math.min(1,(performance.now()-D)/x);try{Pn(w,E+(k-E)*O)}catch{}O<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[C]),_=o.useCallback((k=250,x)=>{const w=s.current;if(!w||w.paused){x?.();return}const B=++f.current;C();const E=performance.now(),D=er(w),N=()=>{const O=Math.min(1,(performance.now()-E)/k);try{Pn(w,D*(1-O))}catch{}if(O<1)p.current=requestAnimationFrame(N);else{p.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{w.pause()}catch{}x?.()}};p.current=requestAnimationFrame(N),b.current=setTimeout(()=>{if(b.current=null,f.current===B){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{w.paused||(Pn(w,0),w.pause(),x?.())}catch{}}},k+150)},[C]);o.useEffect(()=>{const k=document.createElement("audio");return k.loop=!0,k.crossOrigin="anonymous",s.current=k,()=>{C();try{k.pause(),k.removeAttribute("src"),k.load()}catch{}s.current=null,c.current=null,d.current=null}},[C]);const g=e?cs(e.settings):0,A=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!A)return;let k=0;const x=setInterval(()=>{const w=s.current;if(!w||w.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,_())},400);return()=>clearInterval(x)},[_,A,t,a,v]),o.useEffect(()=>{const k=()=>{const x=s.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const w=t.current,B=!!w&&!w.paused&&!w.ended||v()||a.current==="playing",E=m.current;B&&E?.enabled&&E.volume>0&&h(E.volume)};return document.addEventListener("visibilitychange",k),()=>document.removeEventListener("visibilitychange",k)},[C,h,t,a,v]),o.useEffect(()=>{m.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,x=s.current;if(!x)return;const w=k?cs(k):0;if(!k||!k.enabled||w===0){_();return}if(c.current!==k.type){const B=Gx(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||v()){y.current?.();const D=()=>{x.removeEventListener("canplay",D),y.current===N&&(y.current=null);const O=t.current,P=m.current;(O&&!O.paused&&!O.ended||v())&&P?.enabled&&P.volume>0&&h(P.volume)},N=()=>x.removeEventListener("canplay",D);y.current=N,x.addEventListener("canplay",D)}}))}else{const B=t.current,E=!!B&&!B.paused&&!B.ended||v()||a.current==="playing";if(E&&d.current)h(w);else if(E&&x.paused&&x.src)h(w);else if(!x.paused)if(!E)_();else{C();const D=er(x),N=performance.now(),O=()=>{const P=Math.min(1,(performance.now()-N)/150);try{Pn(x,D+(w-D)*P)}catch{}P<1?p.current=requestAnimationFrame(O):p.current=null};p.current=requestAnimationFrame(O)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,h,_,t,a,m,v]),o.useEffect(()=>{const k=s.current;if(k)try{k.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:s,activeNoiseUrl:l,noiseSettingsRef:m,cancelNoiseFade:C,fadeInNoise:h,fadeOutNoise:_}}function Yx({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:i,setProgress:s,setPlaybackState:l,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:m,onDoneRef:p,handleEndRef:f}){const b=o.useRef(null),v=o.useRef(0),C=o.useRef(null),h=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{h.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const g=(k,x=1)=>{try{const w=(k||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(k||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,x)))}catch{return 1200}},A=o.useCallback(k=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,w=++h.current;try{try{x.cancel()}catch{}const B=k??e,E=Array.isArray(B)?B.filter(L=>!!L):[B||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));v.current=E.reduce((L,M)=>L+g(M,D||1),0),b.current=performance.now(),s(0),l("playing"),u("playMode");const N=m.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const O=()=>{try{const L=b.current||performance.now(),M=performance.now()-L,$=v.current||1200,Y=Math.min(1,M/$);try{r.current&&(r.current.style.left=`${Y*100}%`),i.current&&i.current.style.setProperty("--progress",String(Y))}catch{}Y<1&&(C.current=requestAnimationFrame(O))}catch{}},P=()=>{if(w===h.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),s(1),l("stopped");try{f.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=L=>{const M=new SpeechSynthesisUtterance(E[L]);try{M.rate=D}catch{}try{M.volume=Math.max(0,Math.min(1,a))}catch{}M.onend=()=>{if(w===h.current){if(L<E.length-1){try{G(L+1)}catch{P()}return}P()}},M.onerror=()=>{P()},M.onstart=()=>{if(!(L>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(O)}catch{}},_.current=!0,x.speak(M)};try{G(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,i,s,l,u,m,p,f]),y=o.useCallback(()=>{h.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),b.current=null}catch{}l("stopped"),u("active"),s(0)},[d,l,u,s]);return{startTTS:A,stopTTS:y}}const Zx=.01,Xx=.3;async function Jx(e,t,a,r=!1){let i=null;try{const s=window.AudioContext||window.webkitAudioContext;i=new s;const l=await i.decodeAudioData(e.slice(0)),u=l.numberOfChannels>0?l.getChannelData(0):null;if(!u)return null;let c=0;if(r){const b=Math.floor(Xx*l.sampleRate),v=Math.min(u.length,b);for(;c<v&&Math.abs(u[c])<=Zx;)c++;c>=v&&(c=0)}const d=u.length-c,m=a&&a>0?Math.min(d,Math.floor(a*l.sampleRate)):d,p=Math.max(t,m),f=Math.floor(p/t)||1;return new Array(t).fill(0).map((b,v)=>{const C=c+v*f,h=Math.min(C+f,c+p,u.length);let _=0;for(let g=C;g<h;g++){const A=Math.abs(u[g]);A>_&&(_=A)}return _})}catch{return null}finally{try{i?.close?.()}catch{}}}async function xc(e,t,a,r=!1){try{const i=await fetch(e);if(i.ok===!1)return null;const s=await i.arrayBuffer();return await Jx(s,t,a,r)}catch(i){try{const s=ji(i)}catch{}return null}}const ms=45,Qx=74,e_=2;function Br(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function kr(e){return Br(e)/45}const t_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),_c=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function wc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=_c(t),i=_c(a),s=[];let l=0;return e.forEach((u,c)=>{for(const[d,m]of[["lead",r],["sound",t_(u)],["tail",i]])s.push({kind:d,track:c,startMs:l,durMs:m}),l+=m}),{segments:s,totalMs:l,trackCount:e.length}}function Bc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,i,s]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:i,tail:s,totalMs:r.durMs+i.durMs+s.durMs}}function n_(e,t){const a=Bc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],i=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+i)/a.totalMs))}function a_(e,t,a){const r=Math.max(0,Math.floor(a)),i=Bc(e,t);if(!i||r===0||!(i.totalMs>0)||i.lead.durMs===0&&i.tail.durMs===0||!(i.sound.durMs>0))return{lead:0,sound:r,tail:0};const s=Math.round(i.lead.durMs/i.totalMs*r),l=Math.round(i.tail.durMs/i.totalMs*r),u=Math.max(1,r-s-l),c=s+u+l-r;return{lead:Math.max(0,s-Math.ceil(c/2)),sound:u,tail:Math.max(0,l-Math.floor(c/2))}}function r_({currentTime:e,sources:t,index:a,audioDuration:r}){const i=a||0,s=Array.isArray(t)&&t.length>0?t[i]:void 0,l=s?s.duration||r||0:r||0;if(!(l>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/l))}function o_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:i,tailMs:s}){const l=wc({durationsSec:[r],leadInMs:i,tailMs:s});return n_(l,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function s_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return a_(wc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function i_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function l_({ended:e,completedByEnd:t}){return!!e||!!t}function u_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function c_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function d_(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],i=[];for(const s of r)if(s){if(typeof s=="object"&&s!==null&&"src"in s&&s.src){const l=s;i.push({code:l.code??null,src:l.src});continue}if(typeof s=="string"&&(s.startsWith("http")||s.includes("/"))){i.push({code:null,src:s});continue}if(typeof s=="string"||typeof s=="number"){const l=String(s),u=a(l,t);u&&i.push({code:l,resolvedPath:u})}}return i}const kc=4,p_=kr(kc/ms);function m_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:i,noiseSrc:s,noiseRatio:l=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:m,showSoundWaveForm:p=!0,leadInMs:f=0,tailMs:b=0,trackDurationSec:v=0}=e,C=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null),[A,y]=o.useState(!1),[k,x]=o.useState(null),[w,B]=o.useState(2),[E,D]=o.useState(0),[N,O]=o.useState(null),[P,G]=o.useState(!1),[L,M]=o.useState(!1),$=3,Y=3,q=1,z=300,V=o.useRef(0),R=o.useCallback(()=>{const ye=C.current,de=h&&h.current?h.current:ye?ye.closest(".audio-player__wave"):null,ie=de?de.getBoundingClientRect():ye?ye.getBoundingClientRect():null,ge=ie?ie.width:0,fe=ie?Math.max(100,ie.width):320,ue=ie?ie.height:0,Me=Math.max(q,Math.min(z,Math.floor((fe+Y)/($+Y)))),ze=Me*$,je=Math.max(0,Me-1),Oe=Math.max(0,je>0?(fe-ze)/je:Y);return{bars:Me,gap:Oe,height:ue,width:ge}},[]),H=o.useRef(void 0),W=o.useRef(null),I=o.useCallback(async(ye,de,{quiet:ie=!1}={})=>{const ge=++V.current,fe=()=>V.current===ge;try{if(ie||y(!1),H.current=ye,!ye){fe()&&g(null);return}let ue=de;if(!ue)try{for(let je=0;je<4&&!(C.current||h.current);je++)await new Promise(Oe=>requestAnimationFrame(Oe));await new Promise(je=>requestAnimationFrame(je));const ze=R();ze.height>0&&D(ze.height),ue=ze.bars,B(ze.gap)}catch{ue=120}W.current=ue;const Me=await xc(ye,ue);if(!fe())return;if(!Me){g(null),y(!1);return}g(Me),x(ue),y(!0)}catch{if(!fe())return;g(null),y(!1)}},[y,g,D,B,x,R]);o.useEffect(()=>{const ye=h.current;if(!ye||typeof ResizeObserver>"u")return;let de=null;const ie=new ResizeObserver(()=>{de!==null&&cancelAnimationFrame(de),de=requestAnimationFrame(()=>{de=null;try{const ge=R();if(ge.width<=0||(ge.height>0&&D(ge.height),W.current===null||ge.bars===W.current))return;const fe=H.current;B(ge.gap),fe?I(fe,ge.bars,{quiet:!0}).catch(()=>{}):W.current=ge.bars}catch{}})});return ie.observe(ye),()=>{ie.disconnect(),de!==null&&cancelAnimationFrame(de)}},[R,I]),o.useEffect(()=>{const ye=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;I(typeof ye=="string"?ye:void 0).catch(()=>{}),M(!1)},[t,a,I]),o.useEffect(()=>{let ye=!1;if(G(!1),O(null),!s||!k)return;const de=c>0?c*(u||1):void 0;return xc(s,k,de,!0).then(ie=>{ye||(O(ie),ie||G(!0))}).catch(()=>{ye||(O(null),G(!0))}),()=>{ye=!0}},[s,k,c,u]);const S=Math.max(0,Math.min(1,d)),j=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),F=k||40,U=o.useMemo(()=>s_({bars:F,trackDurationSec:v,leadInMs:f,tailMs:b}),[F,v,f,b]),ae=o.useMemo(()=>Array.from({length:F}).map((ye,de)=>{const ie=de>=U.lead&&de<U.lead+U.sound,ge=U.sound>0&&ie?Math.min(F-1,Math.round((de-U.lead)/U.sound*F)):-1,fe=ie?_&&_[ge]!=null?_[ge]:null:_?0:null,ue=fe==null?null:Math.min(1,fe/j*S),Me=ue!=null&&E>0&&Br(ue)<=kc,ze=ue==null?.15:Me?0:kr(ue),je=Me,Oe=F>1?de/(F-1):0;return n.jsx("div",{className:je?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ze,"--i":de,"--mix":Oe}},de)}),[F,_,j,S,E,U]),te={"--progress":String(Math.max(0,Math.min(1,r)))},le=o.useMemo(()=>N&&N.length&&Math.max(...N.map(ye=>Number.isFinite(ye)?Math.abs(ye):0))||1,[N]),K=S*Math.max(0,l),re=!s||!N||!N.length?1:Math.max(1,K),ke={"--bar-gap":`${w}px`,"--wave-h":`${Br(re)}px`,"--wave-h1":`${ms}px`},Z=A&&(s?!!N||P:!0);o.useEffect(()=>{Z&&M(!0)},[Z]);const Q=L?A:Z;o.useEffect(()=>{m?.(Q)},[Q,m]);const he=k||40,De=o.useMemo(()=>Array.from({length:he}).map((ye,de)=>{const ie=N&&N[de]!=null?N[de]:null,ge=ie==null?0:Math.abs(ie)/le*K,fe=Math.max(p_,kr(ge)),ue=he>1?de/(he-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":fe,"--i":de,"--mix":ue}},de)}),[he,N,le,K,E]);return n.jsxs("div",{className:"audio-player__wave",ref:h,style:ke,children:[s&&n.jsx("div",{className:`audio-player__wave-noise ${Z?"is-ready":""}`,"aria-hidden":"true",children:De}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${Q?"is-ready":""}`,ref:C,children:ae}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${Q?"is-ready":""}`,ref:i,style:te,children:ae})]})]})}const Ac={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function hs(e,t){return new Promise((a,r)=>{const i=document.createElement("audio");let s=!1;const l=()=>{try{i.removeAttribute("src"),i.load()}catch{}},u=()=>{if(s)return;s=!0;const d=isFinite(i.duration)&&i.duration||0;l(),a(d)},c=d=>{s||(s=!0,l(),t.rejectOnError?r(new Error(d)):a(0))};i.addEventListener("loadedmetadata",u),i.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),i.src=e})}const h_=2e3;function Nc(e,t=h_){return new Promise(a=>{let r=!1;const i=()=>{r||(r=!0,a())};e.addEventListener("canplay",i,{once:!0}),e.addEventListener("error",i,{once:!0}),setTimeout(i,t)})}function f_({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),i=o.useRef([]),s=o.useCallback(c=>{if(r.current=c,!c||!i.current.length)return;const d=i.current;i.current=[];for(const m of d)m(!0)},[]),l=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(m),i.current=i.current.filter(f=>f!==d),c(p)},m=setTimeout(()=>d(!0),a);i.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=i.current;i.current=[];for(const d of c)d(!1)},[]),{onReadyChange:s,waitForReady:u,markNotReady:l}}function C_(){const e=o.useRef([]),t=o.useCallback(i=>(e.current.push(i),i),[]),a=o.useCallback(i=>{const s=new Set([...i].filter(Boolean));e.current=e.current.filter(l=>{if(s.has(l))return!0;try{URL.revokeObjectURL(l)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const i of e.current)try{URL.revokeObjectURL(i)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function g_({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),i=o.useCallback(()=>r(null),[]),s=o.useCallback(()=>{try{const l=t.current?.getBoundingClientRect();if(!l)return;r({left:l.left,right:l.right,width:l.width,height:l.height,x:l.x,top:l.top+e,bottom:l.bottom+e,y:l.y+e,toJSON:l.toJSON.bind(l)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[a,i]),{ref:t,rect:a,show:s,hide:i}}function b_(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 y_=400,v_=2e3,Ec=5;function x_({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:i,sequencer:s,leadInMs:l=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),m=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),f=o.useCallback(()=>{if(c.current!==null)return;let v=0;const C=()=>{if(Ln){const h=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&h-v>y_){const _=m.current===null||h-m.current>v_;if(m.current=h,_&&d.current<Ec){d.current+=1;const g=d.current;let A=null;try{A=typeof document<"u"?document.visibilityState:null}catch{}St(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(h-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,A==="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>=Ec?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}v=h}try{const h=e.current,_=Array.isArray(r.current)?r.current[i.current||0]:void 0,g=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,A=g?0:b_(h),y=t.current,k=(l||0)>0||(u||0)>0,x=k&&(s?.positionRef.current?.phase??"sound")!=="sound";if(A===null&&!x)try{y&&y.style.visibility!=="hidden"&&(y.style.visibility="hidden")}catch{}else{const w=g?_.duration:A||0;Ln&&x&&!(w>0)&&St("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?o_({phase:s?.positionRef.current?.phase??"sound",phaseElapsedMs:s?.positionRef.current?Math.max(0,Date.now()-s.positionRef.current.at):0,currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,trackDurationSec:w,leadInMs:l||0,tailMs:u||0}):r_({currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,sources:r.current,index:i.current,audioDuration:A??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,i,s,l,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:f,stop:p,settleTo:b}}function fs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:i=!1,ttsText:s=null,className:l,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:m=0}){const{t:p}=xe.useTranslation(),f=e,b=_r(),v=o.useRef(b?.registerAnalyser);o.useEffect(()=>{v.current=b?.registerAnalyser});const C=o.useRef(null),h=o.useRef(null),_=o.useRef(null),g=C_(),A=o.useRef(null),y=o.useRef(!1),k=o.useRef(null),{ref:x,rect:w,show:B,hide:E}=g_();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[O,P]=o.useState("idle"),[G,L]=o.useState("stopped"),M=o.useRef("stopped");o.useEffect(()=>{M.current=G},[G]);const[$,Y]=o.useState(0),[q,z]=o.useState("active"),V=o.useRef(!1);o.useEffect(()=>{if(q!=="playMode"||!V.current)return;V.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const pe=_.current?.querySelectorAll("button")[1];try{pe?.focus()}catch{}},[q]);const[R,H]=o.useState(null),[W,I]=o.useState(null),[S,j]=o.useState(0),[F,U]=o.useState(!1),[ae,te]=o.useState(0),le=b?.playbackRate??1,K=b?.mainVolume??1,re=b?us(b.settings):0,ke=b?yc(b.settings):K,[Z,Q]=o.useState("idle"),[he,De]=o.useState(""),[ye]=o.useState("top"),de=o.useRef(null),ie=o.useRef(0),ge=o.useRef(null),fe=o.useRef(!0),ue=zx({mountedRef:fe}),Me=o.useRef(null),ze=o.useRef(d),je=o.useRef(m);o.useEffect(()=>{ze.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{je.current=Math.max(0,m||0)},[m]);const{start:Oe,stop:We,settleTo:mt}=x_({audioRef:C,fillRef:h,waveProgressRef:ge,sourcesRef:de,currentIndexRef:ie,sequencer:ue,leadInMs:d,tailMs:m}),{onReadyChange:ct,waitForReady:rt,markNotReady:ft}=f_({showSoundWaveForm:u,showNoiseWaveForm:c}),Ae=o.useRef(null),qe=o.useRef(i),we=o.useRef(r),Ue=o.useRef(null),Be=o.useRef(!1),[Le,Se]=o.useState(!1),Je=o.useCallback(J=>{Be.current=J,Se(J)},[]),Qe=o.useRef(null),{activeNoiseUrl:dt,noiseSettingsRef:ht,fadeInNoise:wt,fadeOutNoise:Ct}=Kx({noisePlayer:b,audioRef:C,playbackStateRef:M,sequencer:ue}),{startTTS:Nt,stopTTS:gt}=Yx({ttsText:s,playbackRate:le,mainVolume:ke,fillRef:h,waveProgressRef:ge,setProgress:Y,setPlaybackState:L,setStateLocal:z,fadeInNoise:wt,fadeOutNoise:Ct,noiseSettingsRef:ht,onDoneRef:we,handleEndRef:Qe});o.useEffect(()=>{Ie.current=gt});const it=J=>{if(typeof window>"u"||!window.speechSynthesis){try{De(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Nt(J);return}tt("tts"),Nt(J)},Ye=Array.isArray(t)?t.filter(Boolean):t?[t]:[],oe=(!Ye||Ye.length===0)&&!!s,Ne=Array.isArray(R)&&R.length>0?R:Array.isArray(W)&&W.length>0?W:null,Ve=Math.max(Array.isArray(Ne)?Ne.length:0,Ye.length);o.useEffect(()=>(fe.current=!0,()=>{fe.current=!1}),[]);const nt=()=>{ue.abort()},Ie=o.useRef(null),Ge=o.useRef(null),bt=o.useRef(null),Re=o.useRef(null);Re.current||(Re.current=()=>{bt.current=null;const J=C.current;if(Ge.current==="audio"&&J&&(!J.paused||ue.isRunning())){nt();try{J.pause()}catch{}fe.current&&(L("paused"),We(),Ct())}else if(Ge.current==="tts")try{Ie.current?.()}catch{}});const tt=J=>{Ge.current=J,bt.current=dr(Re.current)},xt=()=>{bt.current?.(),bt.current=null};o.useEffect(()=>()=>{Re.current&&pr(Re.current)},[]);const Lt=o.useRef(le);o.useEffect(()=>{Lt.current=le||1},[le]);const et=o.useCallback(J=>{const pe=Lt.current||1;try{J.defaultPlaybackRate=pe}catch{}try{J.playbackRate=pe}catch{}},[]),ot=o.useCallback((J,pe)=>{J.src=pe,et(J),J.load(),et(J)},[et]),lt=o.useCallback(()=>{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Q("idle")},[]),st=o.useCallback(async(J,pe=3,ne=50,be=0)=>{lt();const $e=ue.generation(),He=!!J&&J.currentTime>0&&!J.ended,ut=Math.max(0,ze.current-Math.max(0,be));if(ut>0&&!He){tt("audio"),Oe(),L("playing");const yt=ht.current;if(yt?.enabled&&(yt.volume??0)>0)try{wt(yt.volume)}catch{}if(!await ue.waitPad(ut,"lead",be)||!fe.current||!ue.isCurrent($e))return!1}ue.enterSound();for(let yt=0;yt<pe;yt++){if(!fe.current||!ue.isCurrent($e))return!1;try{return tt("audio"),await J.play(),!0}catch(Ce){if((Ce instanceof Error||typeof Ce=="object"&&Ce&&"name"in Ce?Ce.name:void 0)==="AbortError"){if(!ue.isCurrent($e))return!1;await new Promise(T=>setTimeout(T,ne));continue}try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Oe,ue,wt,ht,lt]),jt=o.useCallback(J=>{const pe=ue.generation(),ne=Math.max(0,je.current-Math.max(0,J));Oe();const be=ht.current;if(be?.enabled&&(be.volume??0)>0)try{wt(be.volume)}catch{}const $e=()=>{try{Me.current?.()}catch{}};if(ne<=0){ue.leave(),$e();return}ue.waitPad(ne,"tail",J).then(He=>{ue.leave(),He&&ue.isCurrent(pe)&&$e()}).catch(()=>{})},[ue,Oe,wt,ht]),Wt=o.useCallback(()=>{const J=C.current;if(!J)return;const pe=()=>{L("playing"),z("playMode"),U(!0),Oe();try{eo(),Qa(J).then(He=>{if(fe.current)try{v.current?.("main",He)}catch{}})}catch{}const $e=ht.current;$e?.enabled&&($e?.volume??0)>0&&wt($e.volume)},ne=()=>{l_({ended:!!J?.ended,completedByEnd:Be.current})||(L("paused"),We(),Ct())},be=()=>{const $e=()=>{try{const He=de.current,ut=i_(He,ie.current);if(ut!==null){ie.current=ut,j(ut),U(!0);const yt=He?.[ut]&&He[ut].src;if(yt&&J){ot(J,yt),st(J).catch(()=>{});return}}}catch{}L("stopped"),Y(1);try{if(J)try{J.currentTime=0}catch{}}catch{}We(),U(!1),Ct();try{!qe.current&&Qe.current&&Qe.current()}catch{}};if(Me.current=$e,je.current>0){Oe(),ue.waitPad(je.current,"tail").then(He=>{ue.leave(),He&&$e()}).catch(()=>{});return}$e()};return J.addEventListener("play",pe),J.addEventListener("pause",ne),J.addEventListener("ended",be),()=>{try{J.removeEventListener("play",pe),J.removeEventListener("pause",ne),J.removeEventListener("ended",be),We()}catch{}}},[wt,Ct,st,ht,Oe,We,ue]);o.useEffect(()=>Wt(),[Wt]),o.useEffect(()=>{qe.current=i},[i]),o.useEffect(()=>{we.current=r},[r]),o.useEffect(()=>{if(i||q!=="active")return;const J=k.current;if(!J)return;let pe=null;const ne=requestAnimationFrame(()=>{try{const be=J.getTotalLength();if(!be)return;const $e=be*.2;J.style.strokeDasharray=`${be-$e} ${$e}`;const He="triFlow_"+Math.random().toString(36).slice(2);pe=document.createElement("style"),pe.textContent=`@keyframes ${He}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${be}}}`,document.head.appendChild(pe),J.style.animation=`${He} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ne),pe?.remove()}},[q,i]),o.useEffect(()=>{de.current=R},[R]),o.useEffect(()=>{ie.current=S},[S]),o.useEffect(()=>{const J=_.current,pe=A.current;if(!J||!pe)return;let ne=null;const be=32,$e=60,He=()=>{try{const yt=Array.from(J.querySelectorAll(":scope > .button"));let Ce=0;yt.forEach(Pe=>{if(Pe===pe)return;const Xe=Pe.getBoundingClientRect();Ce+=Xe.width});const T=J.getBoundingClientRect().width,X=Math.max(0,Math.floor(T-Ce-8)),ce=Ve;if(!ce||X<=0){Array.from(pe.children).forEach(Pe=>{try{Pe.style.width=""}catch{}});return}let Ee=Math.floor(X/ce);Ee>$e&&(Ee=$e),Ee<be&&(Ee=Math.max(be,Math.floor(X/ce))),Array.from(pe.querySelectorAll(".button")).forEach(Pe=>{try{Pe.style.width=`${Ee}px`}catch{}})}catch{}},ut=requestAnimationFrame(He);try{ne=new ResizeObserver(()=>{requestAnimationFrame(He)}),ne.observe(J),ne.observe(pe),window.addEventListener("resize",He)}catch{}return()=>{try{cancelAnimationFrame(ut)}catch{}try{ne&&(ne.disconnect(),ne=null)}catch{}try{window.removeEventListener("resize",He)}catch{}}},[R,W,Ve]),o.useEffect(()=>()=>{try{Ae.current&&(clearTimeout(Ae.current),Ae.current=null),Ue.current&&(clearTimeout(Ue.current),Ue.current=null)}catch{}},[]);const mn=(J,pe)=>{H(J),te(pe),ft(),I(u_(J)),de.current=J},hn=()=>{z("playMode"),j(0),U(!0)},jn=async(J,pe)=>{Je(!1),y.current=!1,ot(J,pe),await Nc(J),await rt()!==!1&&(N(!1),hn(),await st(J))},zn=async(J,pe=!1)=>{const ne=C.current;N(!0),P("measuring_duration");try{const be=await hs(J,{timeoutMs:1e4,rejectOnError:!0});mn([{src:J,objectUrl:null,duration:be}],be),P("ready"),pe&&ne&&await jn(ne,J)}finally{y.current=!1,N(!1)}},Wn=async(J,pe=!1)=>{const ne=C.current;N(!0),P("measuring_duration");try{const be=await Promise.all(J.map(He=>hs(He,{timeoutMs:1e4})));if(!fe.current)return;const $e=J.map((He,ut)=>({src:He,objectUrl:null,duration:be[ut]||0}));mn($e,c_($e)),P("ready"),pe&&ne&&$e.length>0&&await jn(ne,$e[0].src)}finally{y.current=!1,N(!1)}},It=async(J=!1,pe=!0)=>{const ne=C.current,be=t?Array.isArray(t)?t:[t]:[];if(!be||be.length===0||!be.some(Boolean))return!1;if(y.current)return null;y.current=!0,pe&&N(!0),P("resolving");try{const $e=d_(t,a,yi),He=[];let ut=0;for(const yt of $e){let Ce=yt.src??null,T=null;if(!Ce&&yt.resolvedPath){try{P("getting_signed_url"),Ce=await vi(yt.resolvedPath)}catch{Ce=null}if(!fe.current)return!1;if(!Ce)try{P("downloading");const ce=await xi(yt.resolvedPath);if(!fe.current)return!1;if(ce){const Ee=ce instanceof Blob?ce:new Blob([ce]);T=g.track(URL.createObjectURL(Ee)),Ce=T}}catch{P("error");try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),z("active")}catch{}}}if(!Ce)continue;let X=0;try{P("measuring_duration"),X=await hs(Ce,{timeoutMs:3e3})}catch{X=0}if(!fe.current){if(T)try{URL.revokeObjectURL(T)}catch{}for(const ce of He)if(ce.objectUrl)try{URL.revokeObjectURL(ce.objectUrl)}catch{}return!1}ut+=X||0,He.push({...yt,src:Ce,objectUrl:T,duration:X})}if(mn(He,ut),He.length>0&&J&&ne){const yt=He[0];Je(!1);try{g.keepOnly(He.map(Ce=>Ce.objectUrl))}catch{}if(P("ready"),y.current=!1,yt.src&&ne)try{if(ot(ne,yt.src),await Nc(ne),await rt()===!1)return!1;pe&&N(!1),hn(),ne&&await st(ne)}catch{pe&&N(!1)}else pe&&N(!1);z("playMode"),j(0),U(!0)}return He.length>0}finally{y.current=!1,pe&&N(!1),P($e=>$e==="ready"?"ready":"idle")}},vn=async J=>{const pe=ue.isRunning();if(J.paused&&!pe){if(Be.current){await Ht();return}const ne=ue.resume();if(ne){if(L("playing"),ne.phase==="tail"){jt(ne.elapsed);return}await st(J,3,50,ne.elapsed);return}await st(J),L("playing")}else ue.pause(),nt(),J.pause(),L("paused"),pe&&(We(),Ct())},Ft=async()=>{const J=C.current;if(!(!J&&!oe)){if(oe){const pe=window.speechSynthesis;if(q==="active"){const ne=Na(),be=Array.isArray(s)?s.filter(Boolean):s?[s]:[];if(ne&&be.length>0){if(y.current)return;z("load"),N(!0),P("synthesizing"),y.current=!0;try{const $e=await Promise.all(be.map(He=>Promise.resolve(ne(He))));$e.length>1?await Wn($e,!0):await zn($e[0],!0)}catch{y.current=!1,N(!1),z("active"),it(be.length>0?be:void 0)}return}it(be.length>0?be:void 0);return}if(q==="playMode"){const ne=!!pe&&(pe.speaking||pe.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!ne){await vn(J);return}try{if(pe&&pe.paused)try{tt("tts"),pe.resume(),L("playing")}catch{}else try{pe.pause(),L("paused")}catch{}}catch{}}return}if(q==="active"){if(i&&Array.isArray(de.current)&&de.current.length>0){const ne=de.current[0];try{if(ne.src&&J)try{ot(J,ne.src),hn(),J&&await st(J)}catch{}hn();return}catch{}}z("load");let pe;try{pe=await It(!0)}catch{pe=!1}if(pe===!1&&fe.current){try{De(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}z("active")}return}if(q!=="load"&&(q==="playMode"||q==="active"))try{J&&await vn(J)}catch(pe){(pe instanceof Error||typeof pe=="object"&&pe&&"name"in pe)&&pe.name}}},Ht=async()=>{const J=C.current;if(J)try{const pe=de.current;if(Array.isArray(pe)&&pe.length>1){await $t(0);return}Je(!1);try{J.currentTime=0}catch{}J&&await st(J),L("playing"),z("playMode")}catch{}},Mn=()=>{nt(),xt(),Ie.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Ct(),L("stopped"),z("active"),Y(0),U(!1)},on=async(J,{sameSegment:pe=!1}={})=>{nt();const ne=ue.generation(),be=C.current,$e=de.current?.[J]?.src;try{if(Je(!1),j(J),U(!0),ie.current=J,!$e||!be||(pe||ft(),ot(be,$e),!pe&&await rt()===!1)||!ue.isCurrent(ne)||(await st(be),!ue.isCurrent(ne)))return;L("playing"),z("playMode")}catch{}},xn=async()=>{const J=de.current,pe=ie.current||0;if(!J||pe<=0){await Ht();return}await on(pe-1)},Hn=async()=>{const J=de.current,pe=ie.current||0;if(!J||pe>=J.length-1){Mn();return}await on(pe+1)},_n=()=>{if(Be.current)return;const J=200,pe=340;Je(!0),nt(),xt();try{Y(1)}catch{}mt(1);try{Q("hold")}catch{}try{const ne=C.current,be=oe&&!!ne?.src;if(!oe||be){if(ne){ne.pause();try{ne.currentTime=0}catch{}}}else gt();Ct()}catch{}try{L("stopped")}catch{}if(U(!1),!qe.current)try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Ue.current=setTimeout(()=>{try{Q("out")}catch{}Ue.current=setTimeout(()=>{try{typeof we.current=="function"&&we.current(!0)}catch{}try{Q("idle")}catch{}Ue.current=null},pe)},J)}catch{}};o.useEffect(()=>{Qe.current=_n});const Vt=o.useCallback(()=>De(""),[]),$t=async J=>{(de.current||[])[J]&&await on(J,{sameSegment:J===ie.current})},qt=G==="playing",fn=o.useMemo(()=>{if(!W||W.length<=1)return W;const J=W[S];return J?[J]:W},[W,S]),Ot=i===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&et(J)}catch{}},[le,et]);const sn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const pe=Math.max(0,Math.min(1,ke)),ne=sn.current,be=()=>{ne.raf!==null&&(cancelAnimationFrame(ne.raf),ne.raf=null),ne.timer!==null&&(clearTimeout(ne.timer),ne.timer=null)};be();const $e=er(J);if(J.paused||Math.abs($e-pe)<.001||typeof requestAnimationFrame!="function"){try{Pn(J,pe)}catch{}return}const He=performance.now(),ut=()=>{const yt=Math.min(1,(performance.now()-He)/150);try{Pn(J,$e+(pe-$e)*yt)}catch{}ne.raf=yt<1?requestAnimationFrame(ut):null};return ne.raf=requestAnimationFrame(ut),ne.timer=setTimeout(()=>{be();try{Pn(J,pe)}catch{}},200),be},[ke]);const Dt=Z==="hold",se=Z==="out",ve=q==="playMode"&&!D&&!Le||Dt||se,Te=G!=="stopped"||Dt||se,Ke=G==="paused",Fe=Math.max(0,Math.min(100,($||0)*100)),Ze=_e("audio-player__fill",ve?"is-visible":"",Te?"is-expanded":"",Ke?"is-paused":"",se?"is-out":"");return n.jsxs("div",{className:`audio-player ${Ot?"is-disabled":""}${l?` ${l}`:""}`,role:"group","aria-label":typeof f=="string"?f:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${qt?"is-playing":""} ${D?"is-loading":""} ${q!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Ac[O]?"status":void 0,"aria-live":Ac[O]?"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,q==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Ot,onClick:()=>{V.current=gr(),E(),Ft()},"aria-label":typeof f=="string"?f: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,w&&n.jsx(Bn,{anchorRect:w,text:typeof f=="string"&&f?f:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${q==="playMode"||qt?"is-visible":""}`,inert:!(q==="playMode"||qt)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:xn,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:qt?"pause":"play",onClick:Ft,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":qt,width:"60px",variant:"transparent-white",disabled:q!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Mn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),Ve>1?n.jsx("div",{ref:A,className:"audio-player__source-buttons",children:Array.from({length:Ve}).map((J,pe)=>n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(pe+1),onClick:()=>{try{$t(pe)}catch{}},ariaLabel:p("training.sourcePlay",{n:pe+1}),variant:"transparent-white",selected:F&&S===pe,disabled:q!=="playMode"||!(Array.isArray(R)&&R[pe]),showTooltipInfo:!0},pe))}):null,!Array.isArray(R)||R.length<=1?n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Ht,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"}):null,n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Hn,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:q!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:_n,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Ze,ref:h,style:{left:`${Fe}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(m_,{segments:fn,progress:$,totalDuration:ae,waveProgressRef:ge,showSoundWaveForm:u,leadInMs:d,tailMs:m,trackDurationSec:R?.[S]?.duration??0,noiseSrc:c&&b?.settings.enabled&&re>0?dt:null,noiseRatio:b?Xa(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:K,onReadyChange:ct})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(at,{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(ha,{message:he,position:ye,onClose:Vt})]})}function Ar(e){const{t}=xe.useTranslation(),{text:a,label:r,anchorRect:i=null,onClose:s,closeOnOutsideClick:l=!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:m,decrease:p,canIncrease:f,canDecrease:b,fontSize:v,lineHeight:C}=Dl({storageKey:"tooltip-fontScale"}),h=o.useCallback(()=>d(k=>k==="dark"?"light":"dark"),[]),_=o.useCallback(k=>{try{k.stopPropagation()}catch{}try{typeof s=="function"&&s()}catch{}},[s]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],A={fontSize:`${v}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},y=n.jsxs("div",{className:`tooltip-textbox__root ${c==="dark"?"is-dark":""}`,children:[n.jsxs("div",{className:"tooltip-textbox__box",children:[r&&n.jsx("div",{className:"tooltip-textbox__label body-2b",children:r}),n.jsx("div",{className:"tooltip-textbox__text body-1",style:A,children:g.map((k,x)=>n.jsxs("div",{className:"tooltip-textbox__line",children:[g.length>1?n.jsx("div",{className:"tooltip-textbox__marker",children:n.jsx("span",{className:"tooltip-textbox__line-number button-1",children:x+1})}):null,n.jsx("span",{className:"tooltip-textbox__line-text",children:k})]},x))})]}),n.jsxs("div",{className:"tooltip-textbox__buttons",children:[n.jsx(me,{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(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:m,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!f}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:h,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:_,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return i?n.jsx(cn,{anchorRect:i,className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,onClose:s,closeOnOutsideClick:l,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:y}):n.jsx("div",{className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,children:y})}function Dc({state:e="disabled"}){const{t}=xe.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(at,{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 Sc(e,t,a){const r=o.useRef(t),i=o.useRef(a);o.useEffect(()=>{r.current=t,i.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let s=null,l=10;const u=()=>{s=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(Cn)).find(m=>!m.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--l>0&&(s=requestAnimationFrame(u))};return s=requestAnimationFrame(u),()=>{s!==null&&cancelAnimationFrame(s);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip-content")){const d=i.current();if(d)try{d.focus()}catch{}}}},[e])}function Tc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:i=!1,onPreviewTextBtn:s,previewText:l=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:m=!1}){const{t:p}=xe.useTranslation(),f=ln("(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),[h,_]=o.useState(!1),[g,A]=o.useState(null),[y,k]=o.useState(null);Sc(h&&!!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(".tooltip-textbox__root"))return D[N];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(s);o.useEffect(()=>{x.current=s});const w=o.useMemo(()=>l==null?"":typeof l=="string"||typeof l=="number"?String(l):Array.isArray(l)&&l.every(D=>typeof D=="string"||typeof D=="number")?l.join(""):"",[l]),B=o.useCallback(()=>{_(!1),A(null),k(null)},[]);o.useEffect(()=>{if(!h)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)},[w]);const E=o.useCallback(()=>{let D;try{typeof s=="function"&&(D=s())}catch{}if(D!==!1){if(k(typeof D<"u"&&D!==null?D:l),!C.current){_(N=>!N);return}if(h)_(!1),A(null),k(null);else{const N=C.current.getBoundingClientRect();A(N),_(!0)}}},[s,l,h]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),i||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(me,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"play-circle",label:f?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:m,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||m,onDisabledClick:m&&r!=="disabled"?()=>{}:void 0}),i&&n.jsx("div",{ref:C,children:n.jsx(me,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"eye",label:f?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:h?"is-selected":void 0,"aria-expanded":h,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!l&&typeof s!="function"})})]}),h&&n.jsx(Ar,{text:y??l,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function Cs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ea({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:i={},children:s,className:l="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:m}=xe.useTranslation(),[p,f]=o.useState(()=>Cs(e,t));o.useEffect(()=>{const x=Cs(e,t);if(x!==p){const w=setTimeout(()=>f(x),0);return()=>clearTimeout(w)}},[e,t,p]);const b=o.useCallback((...x)=>{Cs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[v,C]=o.useState(!1),[h,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(x=>{if(!x)return null;try{const w=x;if(typeof x=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const D=w.currentTarget??w.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}},[]),A=o.useCallback((x,{text:w="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const O=g(x);_({text:w,label:B,anchorRect:O,backdrop:E,alignX:D,alignY:N}),C(!0)},[g]),y=o.useCallback(()=>{C(!1),_(x=>({...x,anchorRect:null}))},[]),k=o.Children.map(s,x=>{if(o.isValidElement(x)){const w=x;if(typeof w.type=="string")return w;const B=w.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(w,{onDone:E,disabled:N,showTooltip:A,hideTooltip:y})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${l}`,"aria-current":p==="active",children:[n.jsx(Dc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Tc,{state:p,title:r,...i,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(cn,{anchorRect:h.anchorRect,backdrop:h.backdrop,onClose:y,ariaLabel:m("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Ar,{text:h.text,onClose:y})}):null]})}function jc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=xe.useTranslation(),[i,s]=o.useState("disabled"),[l,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",l)}catch{}},[l]);const c=()=>u(P=>P==="dark"?"light":"dark"),{increase:d,decrease:m,canIncrease:p,canDecrease:f,fontSize:b,lineHeight:v}=Dl({storageKey:"textbox_fontScale"}),[C,h]=o.useState(""),_=o.useRef(null),g=o.useRef(!1),A=o.useCallback(()=>{g.current=gr()&&!!_.current&&_.current.contains(document.activeElement),s("active")},[]),y=o.useCallback(()=>h(""),[]),k=P=>{try{h(P)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const P=setTimeout(()=>s(t),0);return()=>clearTimeout(P)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(w);B!==w&&(E(w),s("disabled"));const D=t==="disabled"?i:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",O=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${v}px`}),[b,v]);return o.useEffect(()=>{if(D==="disabled"||!g.current)return;g.current=!1;const P=document.activeElement;P&&P!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:_,className:`training-text-box ${N} ${D!=="disabled"&&l==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(me,{htmlType:"button",size:48,type:"bar",onClick:A,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:O,children:w})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:m,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:l==="dark"?"transparent-white":"transparent-gray",disabled:!f,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(me,{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:l==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:l==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:l==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(ha,{message:C,position:"top",onClose:y})]})}function ta(e){return e==="active"||e==="done"}function gs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,useTitleFaded:s,onDone:l,onChange:u,answer:c,wrongAnswers:d,choices:m,multiSelect:p=!1,correctCount:f=0,useDisabledCovered:b=!1,choiceIcons:v,shuffleChoices:C=!0}){const{t:h}=xe.useTranslation(),_=i??h("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,A=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",y=Array.isArray(m)&&m.length?m:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,k=d?d.join("||"):"",x=m?m.join("||"):"",[w,B]=o.useState(()=>Array.isArray(y)?C?ja(y):y.slice():void 0);o.useEffect(()=>{Array.isArray(y)&&y.length?B(C?ja(y):y.slice()):B(void 0)},[c,k,x,C]);const[E,D]=o.useState(null),[N,O]=o.useState(()=>new Set);o.useEffect(()=>{D(null),O(new Set)},[x,c,k]);const P=o.useRef(void 0);o.useEffect(()=>{const M=P.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&(D(null),O(new Set)),P.current=t},[t,e]);const G=o.useCallback(M=>{if(!ta(A))return;const $=w?.[M];if($==null)return;const Y=$;if(p){const q=new Set(N);q.has(Y)?q.delete(Y):q.add(Y),O(q),typeof u=="function"&&u({selectedValues:[...q],__ts:Date.now()}),typeof l=="function"&&l({selectedValues:[...q],__ts:Date.now()})}else D(Y),typeof u=="function"&&u({selectedIndex:M,selectedValue:Y,__ts:Date.now()}),typeof l=="function"&&l({selectedIndex:M,selectedValue:Y,__ts:Date.now()})},[w,A,p,u,N]),L=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:s,children:n.jsx("div",{className:L,children:Array.isArray(w)&&w.length>0?w.map((M,$)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>G($),ariaLabel:String(M),label:M,useLabel:!0,icon:v?v[String(M)]:void 0,variant:"default",disabled:A==="disabled",selected:p?N.has(M):E===M,useDisabledCovered:b,minWidth:0},String(M))):null})})}function bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u,demoSelected:c}){const{t:d}=xe.useTranslation(),m=i??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,f=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,h]=o.useState(c??null),_=`${String(b)}\0${JSON.stringify(v??null)}`,[g,A]=o.useState(_);g!==_&&(A(_),c==null&&h(null));const[y,k]=o.useState(c);Object.is(y,c)||(k(c),h(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&&h(null),x.current=t},[t,e,c]);const w=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof l=="function"&&l(N),ta(f)&&typeof s=="function"&&s(N)},[l,f,s]),B=o.useCallback(()=>{ta(f)&&(h(!1),w(!1))},[w,f]),E=o.useCallback(()=>{ta(f)&&(h(!0),w(!0))},[w,f]);return n.jsxs(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:m,onDone:s,useTitleFaded:!1,children:[n.jsx(jc,{context:u,state:f}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((D,N)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>{ta(f)&&(h(N),w&&w(N))},disabled:f==="disabled",ariaLabel:String(D),label:D,variant:f,selected:C===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:f==="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(me,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:f==="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 ys({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:i,btnLabel:s,soundSrc:l,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:m,disabled:p,_pageIndex:f,showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:h}){const{t:_}=xe.useTranslation(),g=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),A=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,title:g,onDone:i,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:m},children:n.jsx(fs,{soundSrc:l,ttsText:l?null:d??g,bucketPath:u,btnLabel:s||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:A,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:h},`audio-p${f??0}-s${e}`)})}const __=[];function vs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u=__}){const{t:c}=xe.useTranslation(),d=i??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),m=I=>typeof I=="string"?I:I&&(I.context||I.sentence||I.question||"")||"",[p,f]=o.useState(Array.isArray(u)?u:[]),[b,v]=o.useState(()=>(p||[]).map((I,S)=>({id:S,text:m(I)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),h=C!=="disabled",_=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const I=Array.isArray(u)?u:[];f(I);const S=(j=>{const F=(j||[]).map((le,K)=>({id:K,text:m(le)}));if(F.length<=1)return F;const U=(le,K)=>{if(le.length!==K.length)return!1;for(let re=0;re<le.length;re++)if(le[re].text!==K[re].text)return!1;return!0};let ae=ja(F),te=0;for(;U(ae,F)&&te<20;)ae=ja(F),te+=1;return ae})(I);v(S);try{if(typeof l=="function"){const j=S.filter((F,U)=>F.text===m(I[U])).length;l({shuffled:S,score:j,total:(I||[]).length,initial:!0,__ts:Date.now()})}if(typeof s=="function"&&C==="active"){const j=S.filter((F,U)=>F.text===m(I[U])).length;g.current=u,s({shuffled:S,score:j,total:(I||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof s!="function"))return;const I=Array.isArray(u)?u:[],S=b.filter((j,F)=>j.text===m(I[F])).length;s({shuffled:b,score:S,total:I.length,initial:!0,__ts:Date.now()})},[C,u]);const A=(I,S)=>{const j=[...b],F=I+S;if(F<0||F>=j.length)return;const U=j[F];j[F]=j[I],j[I]=U,Y(j);try{if(typeof s=="function"&&C==="active"){const ae=j.filter((te,le)=>te.text===m(p[le])).length;s({shuffled:j,score:ae,total:(p||[]).length,__ts:Date.now()})}}catch{}},[y,k]=o.useState(null),x=o.useRef(null),w=o.useRef(null),B=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),O=o.useRef(null),P=o.useRef({dx:0,dy:0}),G=()=>{if(O.current!==null)return;const I=()=>{if(!x.current){O.current=null;return}O.current=requestAnimationFrame(I);const S=N.current,j=P.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${S.x-j.dx}px, ${S.y-j.dy}px, 0)`)};O.current=requestAnimationFrame(I)},L=o.useRef(new Map),M=o.useRef(new Map),$=()=>{const I=new Map;return L.current.forEach((S,j)=>{S&&S.getBoundingClientRect&&I.set(j,S.getBoundingClientRect())}),I},Y=I=>{const S=$();v(I);try{if(typeof l=="function"){const j=I.filter((F,U)=>F.text===m(p[U])).length;l({shuffled:I,score:j,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const j=$();I.forEach(F=>{const U=S.get(F.id),ae=j.get(F.id),te=L.current.get(F.id);if(!te||!U||!ae)return;const le=U.top-ae.top;le&&(te.style.transition="none",te.style.transform=`translateY(${le}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const K=()=>{te.style.transition="",te.removeEventListener("transitionend",K)};te.addEventListener("transitionend",K)}))})})},q=(I,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(I))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const j=document.createElement("div");j.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(j),S.dataTransfer?.setDragImage(j,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(j)}catch{}})}catch{}}catch{}k(I);try{const j=b[I],F=document.createElement("div");F.className="order-list__dragging-object order-list__dragging-object--visible",F.textContent=j&&j.text?j.text:"",document.body.appendChild(F),x.current=F;const U=L.current.get(j.id);let ae=S.clientX||0,te=S.clientY||0;try{if(U&&U.getBoundingClientRect){const Q=U.getBoundingClientRect();ae=Q.left+Q.width/2,te=Q.top+Q.height/2}}catch{}const le=F.getBoundingClientRect(),K=le.width/2,re=le.height/2;P.current={dx:K,dy:re},F.style.transition="none",N.current={x:ae,y:te},F.style.transform=`translate3d(${ae-K}px, ${te-re}px, 0)`,requestAnimationFrame(()=>{try{F.style.transition=""}catch{}G()});const ke=Q=>{const he=Q;N.current={x:he.clientX,y:he.clientY},G()};B.current=ke,document.addEventListener("mousemove",ke);const Z=Q=>{const he=Q;N.current={x:he.clientX,y:he.clientY},G()};w.current=Z,document.addEventListener("dragover",Z);try{S.dataTransfer?.setData("text/plain",String(I));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:I}))}catch{}}catch{}}catch{}},z=(I,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const j=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(j&&E.current!==j){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{j.classList.add("drag-over")}catch{}E.current=j}}catch{}},V=(I,S)=>{S.preventDefault();const j=S.dataTransfer?.getData("text/plain")||"",F=j?parseInt(j,10):y,U=I;if(typeof F!="number"||isNaN(F)||F===U){k(null),W(),R();return}const ae=xC(b,F,U);Y(ae),k(null),R();try{if(typeof s=="function"&&C==="active"){const te=ae.filter((le,K)=>le.text===m(p[K])).length;s({shuffled:ae,score:te,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[U];if(!te)return;const le=te.querySelector(".order-list__slot")||te;try{le.classList.add("pulse"),le.offsetHeight,le.classList.add("to-dark");const K=()=>{le.classList.remove("pulse","to-dark"),le.removeEventListener("transitionend",K)};le.addEventListener("transitionend",K)}catch{}})}catch{}W()},R=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),O.current!==null&&(cancelAnimationFrame(O.current),O.current=null)},H=()=>{k(null),W(),R()};o.useEffect(()=>()=>R(),[]);const W=()=>{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(I=>I.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const I=Math.max(1,(b||[]).length);b.forEach((S,j)=>{const F=M.current.get(S.id);if(!F)return;let U=50;I>1&&(U=Math.round(j/(I-1)*100));try{F.style.setProperty("--marker-pos",U+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:b.map((I,S)=>{const j=Math.max(1,(b||[]).length),F=j>1?Math.round(S/(j-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":F+"%"},ref:U=>{const ae=M.current;U?ae.set(I.id,U):ae.delete(I.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:U=>{const ae=L.current;U?ae.set(I.id,U):ae.delete(I.id)},className:`order-list__draggable ${y===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:h,onDragStart:h?U=>q(S,U):void 0,onDragEnter:h?U=>z(S,U):void 0,onDragOver:h?U=>z(S,U):void 0,onDragLeave:h?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const U=document.querySelectorAll(".order-list .order-list__item");U&&U[S]&&(U[S].classList.remove("drag-over"),E.current===U[S]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:h?U=>V(S,U):void 0,onDragEnd:h?H:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:I.text}),h?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>A(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>A(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},I.id)})})})}const w_=8e3;function B_(e,t){return new Promise(a=>{let r=!1;const i=()=>{r||(r=!0,a())};e.then(i,i),setTimeout(i,t)})}function Mc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,onDone:s,onChange:l,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:m=!1,maxCards:p,playAllGapMs:f=0}){const{t:b}=xe.useTranslation(),v=i??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]),h=p??3,_=(C||[]).slice(0,h);(C||[]).length>h&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${h} shown`);const g=typeof e=="number"?e:-1,A=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[y,k]=o.useState(null),x=o.useRef([]),[w,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($=>$?.id??$?.word??"").join("|"),[C]);o.useEffect(()=>{k(null)},[N]);const O=o.useRef(void 0);o.useEffect(()=>{const $=O.current;typeof $=="number"&&typeof t=="number"&&typeof e=="number"&&$>=e&&t<e&&k(null),O.current=t},[t,e]);const P=o.useCallback(($,Y)=>{if(c)return;const q={item:$,index:Y,__ts:Date.now()};try{typeof l=="function"&&l(q)}catch{}if(A==="active"&&typeof s=="function")try{s(q)}catch{}},[c,l,A,s]),G=o.useRef(f);o.useEffect(()=>{G.current=Math.max(0,f||0)},[f]);const L=o.useCallback(async()=>{if(w||A==="disabled")return;B(!0);let $=!1;const Y=new Promise(q=>{E.current=()=>{$=!0,q()}});try{for(let q=0;q<_.length&&!(!D.current||$);q++){const z=x.current[q];if(!z)continue;await Promise.race([B_(z.play(),w_),Y]);const V=Math.max(0,G.current||0);V>0&&q<_.length-1&&!$&&D.current&&await Promise.race([new Promise(R=>{setTimeout(R,V)}),Y])}}finally{E.current=null,B(!1)}},[w,A,_.length]),M=o.useCallback(($,Y)=>{if(!ta(A))return;k(Y);const q={selectedValue:$.word||$.title||"",selectedIndex:Y,item:$,__ts:Date.now()};try{typeof l=="function"&&l(q)}catch{}if(typeof s=="function")try{s(q)}catch{}},[l,A,s]);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,onDone:s,titleProps:{usePlayAllBtn:!m&&_.length>0,onPlayAll:L,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:$=>{const Y=E.current;if(!Y)return;const q=$.target;q&&typeof q.closest=="function"&&q.closest(".training-word-card__bottom")&&Y()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map(($,Y)=>n.jsx(Xo,{ref:q=>{x.current[Y]=q},item:$,disabled:A==="disabled",onPlayDone:()=>P($,Y),selectable:c,selected:c&&y===Y,onSelect:c?()=>M($,Y):void 0,flipDelay:Y*120,hideLabel:d,hideAudio:m},$&&$.id||Y))})})}const k_=160,Lc=()=>{};function Sn(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:A,onClick:y,children:k,align:x="horizontal",icon:w,useFullWidth:B=!1}=e,E=D=>{y&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),y())};return n.jsxs("div",{className:_e("panel-row",x==="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:[w!=null&&n.jsx("div",{className:"panel-row__icon",children:w}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),A&&n.jsx("div",{className:"panel-row__sub caption-1",children:A})]}),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(Ga,{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:i,onClick:s,required:l,error:u,align:c="horizontal",useFullWidth:d=!1,icon:m}=e,p=a==="button"?void 0:s;let f=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;f=n.jsx(Cu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;f=n.jsx(gn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??40,ariaLabel:r})}else if(a==="dropdown"){const g=e,A=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(pn,{options:y.options,value:y.value,onChange:y.onChange,placeholder:y.placeholder,block:d,error:!!u,ariaDescribedBy:v,ariaLabel:y.ariaLabel??([r,y.placeholder].filter(Boolean).join(" ")||void 0)})},k))}):n.jsx(pn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Lc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:v});f=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[A,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}):A}else if(a==="button"){const g=e;g.buttons?.length?f=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((A,y)=>n.jsx(me,{htmlType:"button",size:A.btnSize??40,variant:A.btnVariant??"default",disabled:A.disabled,onClick:A.onClick,children:A.label},y))}):f=n.jsx(me,{htmlType:"button",size:g.btnSize??40,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;f=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;f=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Xn,{value:g.value,onChange:g.onChange??Lc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,ghostHint:g.ghostHint,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:l,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"&&(f=e.children);u&&a!=="input"&&a!=="dropdown"&&(f=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[f,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const h=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=g=>{p&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p())};return n.jsxs("div",{className:_e("panel-row",c==="vertical"?"panel-row--vertical":"",h?"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:[m!=null&&n.jsx("div",{className:"panel-row__icon",children:m}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,l&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,l&&n.jsx("span",{className:"required-mark",children:"*"})]}),i&&n.jsx("div",{className:"panel-row__sub caption-1",children:i})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}function $c(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function A_({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:i}=xe.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(s=>{const l=e[s],u=s==="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}),l&&t&&n.jsx(me,{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(s)})]}),l?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[l.device&&n.jsx(At,{size:"small",variant:$u(l.device),fill:"soft",label:Ru(l.device,r)}),$c(l)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:$c(l)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:l.productName||l.brand}),Ko(l.wornYear,l.wornMonth,l.wornDay,i.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Ko(l.wornYear,l.wornMonth,l.wornDay,i.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},s)})})}function Nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:i,size:s="medium",minHeight:l,maxWidth:u,className:c,scrollable:d,scrollbarGutter:m="auto",compactRows:p=!1,useBorder:f=!0,useBg:b=!0,useRowBorder:v=!0,labelWidth:C,form:h=!1,loading:_,empty:g,children:A}){const y=_e("panel",`panel--${s}`,h?"panel--form":"",l!==void 0?"panel--fill":"",f?"":"panel--no-border",b?"":"panel--no-bg",v?"":"panel--no-row-border",p?"panel--compact-rows":"",c),k={};l!==void 0&&(k.minHeight=l),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:y,style:Object.keys(k).length?k:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:_e("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(at,{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})]}),i&&n.jsx("div",{className:"panel__actions",children:i})]}),_?n.jsx(Sn,{variant:"loading"}):g!=null&&o.Children.toArray(A).length===0?n.jsx(Sn,{variant:"empty",children:g}):d?n.jsx("div",{className:_e("panel__body--scroll",m==="stable"&&"panel__body--gutter-stable"),children:A}):A]})}function N_({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:i,style:s,children:l}){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 f=new ResizeObserver(([b])=>d(b.contentRect.width));return f.observe(p),()=>f.disconnect()},[r]);const m=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:_e("panel-grid",t==="columns"&&"panel-grid--columns",i),style:{"--panel-grid-cols":m?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...s},children:l})}function E_(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 Rc(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"}]}E_(Rt.t.bind(Rt)),Rc(Rt.t.bind(Rt));const Er="none",D_=.5,S_=1.5,T_=.25;function xs({title:e,valueLabel:t,value:a,min:r,max:i,step:s,tickStep:l,size:u,disabled:c,onChange:d}){return n.jsxs(Sn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Du,{value:a,onChange:d,min:r,max:i,step:s,size:u,showBgTick:!0,tickStep:l,ariaLabel:e,disabled:c,className:"noise-settings__slider-input"}),n.jsx("div",{className:_e("noise-settings__value","button-1",c?"noise-settings__value--disabled":""),children:t})]})}function Pc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=xe.useTranslation(),i=ln("(max-width: 767px)")?40:24,s=_r(),l=Xa(s?.settings??Qn),u=s?.settings.type??"defaultNoise",c=s?.settings.enabled??!0,d=s?.playbackRate??1,m=s?.mainVolume??1,p=Math.round(m*100),f=o.useCallback(_=>{try{s?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[s]),b=o.useCallback(_=>{try{s?.setPlaybackRate(_)}catch{}},[s]),v=o.useCallback(_=>{const g=Math.min(Za,Math.max(0,Math.round(_*10)/10));try{s?.setSettings({noiseRatio:g})}catch{}},[s]),C=o.useCallback(_=>{try{_===Er?s?.setSettings({enabled:!1}):s?.setSettings({type:_,enabled:!0})}catch{}},[s]),h=[{key:Er,label:r("training.noise.type.none","\uC5C6\uC74C")},...Rc(r).map(_=>({key:_.value,label:_.label}))];return n.jsx(cn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:"noise-settings__header",children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Nr,{className:"noise-settings",useBorder:!1,labelWidth:72,children:[n.jsx(xs,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:i,onChange:f}),n.jsx(xs,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:D_,max:S_,step:T_,size:i,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(Sn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(gn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:h,value:c?u:Er,onChange:C})}),n.jsx(xs,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:l.toFixed(1)}),value:l,min:0,max:Za,step:gc,size:i,disabled:!c,onChange:v})]}),a&&n.jsx("div",{className:"noise-settings__width-ghost","aria-hidden":"true",inert:!0,children:n.jsx(Sn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(gn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:h,value:Er,onChange:()=>{}})})})]})})}function Ic({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:i=0,stepCount:s=0,pageIndex:l=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:m}=xe.useTranslation(),[p,f]=o.useState(!1),[b,v]=o.useState(null),[C,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),A=_r(),y=u>0,k=y&&l<u-1,x=!y||l>=u-1,w=i===Math.max(0,s);o.useEffect(()=>{e||(f(!1),v(null))},[e]);const B=o.useCallback(()=>{f(!1),v(null)},[]),E=o.useCallback(()=>{if(p){f(!1),v(null);return}const Y=_?.current?.getBoundingClientRect();Y&&v(Y),t?.(),f(!0)},[p,t]),D=o.useCallback(()=>{if(p){f(!1),v(null);return}const Y=g?.current?.getBoundingClientRect();Y&&v(Y),t?.(),f(!0)},[p,t]),N=ln("(max-width: 767px)"),O=o.useRef(null),[P,G]=o.useState(null),L=o.useCallback(()=>{h(Y=>{const q=!Y;return G(q?O.current?.getBoundingClientRect()??null:null),q})},[]),M=o.useCallback(()=>{h(!1),G(null)},[]);o.useEffect(()=>{c&&(h(!1),G(null))},[c]);const $=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(qo,{analyser:A?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.noise","\uC18C\uC74C")}),n.jsx(qo,{analyser:A?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.noise","\uC18C\uC74C")})]})]});return Sc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings__header")?.closest(".tooltip-content")??null:null,()=>[_.current,g.current].map(Y=>Y?.querySelector("button")??null).find(Y=>!!Y&&Y.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(me,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:m("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(me,{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:m("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:O,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:L,selected:C,"aria-expanded":N?C:void 0,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:$})]}),e&&C&&N&&P&&n.jsx(cn,{anchorRect:P,onClose:M,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:$})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(me,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),k&&n.jsx(me,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&p&&n.jsx(Pc,{anchorRect:b,onClose:B,hideNoiseRows:d})]})}function Fc({title:e,subtitle:t,desc:a,depth:r,icon:i,wrapperStyle:s,iconTooltip:l,pageIndex:u,pageCount:c,progressMax:d,progressIndex:m,onBack:p,onClose:f}){const{t:b}=xe.useTranslation(),v=ln("(max-width: 767px)"),C=Number.isInteger(m)?m:u||0,h=Number.isInteger(d)?d:c||0,_=p||f,g=Array.isArray(r)?v?r[r.length-1]:r.join(" / "):r,A=typeof e=="string"?e.trim():e,y=typeof t=="string"?t.trim():t,k=!!(A||y),x=k?A||y:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=g||(A?t:void 0),B=v&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const D=s&&typeof s=="object"?{...s}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[s]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(me,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:i?n.jsx(iu,{icon:i,label:e,tooltip:l,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(Mu,{max:Math.max(0,h??0),index:Math.max(0,C??0)})]})}function j_(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function M_(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 Oc=(e,t)=>{if(!t)return t;const a=typeof Rt?.t=="function"?Rt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function zc(e,t,a){const r=e,i=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",s=zi().find(u=>u.key===(r?.category_0||r?.category_main_code)),l=s?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:i,label:r?.title||i,depth:t,icon:s?.icon,wrapperStyle:s?.color?{"--t-item-fg":s.color}:void 0,iconTooltip:[s?Oc(`topic.${s.key}`,s.label):void 0,l?Oc(`topic.sub.${l.key}`,l.label):void 0].filter(Boolean).join(" / ")||void 0}}function _s(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Wc(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,i=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(i).toISOString()}:{}}}function L_(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function $_({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:i=[],emptyMessage:s,buildResults:l,metaPatch:u}){const c=zc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},m=t?.id||t?.title||i.length;return{id:`${e}:${m}`,meta:{...c,...d},pages:i,emptyMessage:s,buildResults:l}}function R_(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function P_(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 I_(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 Hc(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function F_(e,t,a,r){return Hc(e,t*a+r)}function O_({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const i=e;if(Array.isArray(i.selectedValues))return r.every(s=>i.selectedValues.includes(s))&&i.selectedValues.every(s=>r.includes(s));if(typeof i.correct=="boolean")return i.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(i=>String(i)===String(a[t]));if(typeof t<"u")return r.some(i=>String(i)===String(t))}}function z_(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 Vc=o.createContext(null);function W_(){const e=o.useContext(Vc);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function H_({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:i,choices:s=[],onDone:l,onChange:u}){const{t:c}=xe.useTranslation(),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,f]=o.useState(()=>s.map(()=>null)),b=JSON.stringify(s),v=s.length;o.useEffect(()=>{f(Array.from({length:v},()=>null))},[b]);const C=o.useRef(void 0);o.useEffect(()=>{const A=C.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&f(Array.from({length:v},()=>null)),C.current=t},[t,e,v]);const h=o.useMemo(()=>p.filter(A=>A!==null).length+1,[p]),_=o.useCallback(A=>{if(!ta(m))return;const y=p;let k;if(y[A]!=null){const w=y[A];k=y.map(B=>B!==null&&B>=w?null:B)}else k=[...y],k[A]=h;f(k);const x={selectedOrder:k,words:s,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(y[A]==null&&k.length>0&&k.every(w=>w!==null))try{typeof l=="function"&&l(x)}catch{}},[m,p,h,u,l,s]),g=i??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:l,children:n.jsx("div",{className:"training-step__cards",children:s.map((A,y)=>n.jsx(Xo,{item:{word:A},disabled:m==="disabled",selectable:!0,selected:p[y]!==null,orderRank:p[y],onSelect:()=>_(y),flipDelay:y*120,hideLabel:!1,hideAudio:!0},`${A}-${y}`))})})}function Dr(e){return null}Dr.__isTrainingPage=!0;function xa(e,t){const a=W_();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 qc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l}=xa(e,t);return n.jsx(ys,{...a,index:r,stepIndex:i,isLast:s,onDone:l})}function Uc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(gs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Gc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(bs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Kc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(vs,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function Yc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(Mc,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}function V_({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:i,isLast:s,onDone:l,onChange:u}=xa(e,t);return n.jsx(H_,{...a,index:r,stepIndex:i,isLast:s,onDone:l,onChange:u})}const Zc=3e4,q_=/^(https?:|blob:|data:audio|\/|\.\/)/;function Xc(e){return typeof e=="string"&&q_.test(e)?e:null}const U_=e=>typeof e=="string"&&e.trim()!==""?e:null,ws=Symbol("timed-out");function G_(e,t){if(t<=0)return Promise.resolve(ws);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(ws),t)})]).finally(()=>clearTimeout(a))}function K_(e){return e?Na()||Xr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Y_(e,t){const a=[],r=Xc(t);r&&a.push({kind:"raw",resolve:async()=>r});const i=(e??"").trim();if(!i)return a;for(const[s,l]of[["urlResolver",Na()],["fallbackUrlResolver",Xr()]])l&&a.push({kind:s,resolve:async u=>{let c;try{c=await G_(l(i),u)}catch(m){return St(`question-sound-threw-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,m),null}return c===ws?(St(`question-sound-slow-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 ${Zc}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):U_(c)||(St(`question-sound-empty-${s}`,`[core] configureTTS \uC758 ${s} \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 Z_(){return Date.now()+Zc}const X_=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function J_(e){St("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 Sr(...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 i of r){if(typeof i=="string"&&i.trim().length)return i.trim();if(typeof i=="number"||typeof i=="boolean")return String(i)}}}return null}function Q_(e){return Sr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function ew(e){return Xc(Sr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Jc(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=Sr(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 Qc(e){const{score:t,contextsLength:a,results:r=[],subtitle:i,onReplay:s,onClose:l,inline:u=!1,pending:c=!1}=e||{},{t:d}=xe.useTranslation(),m=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 f=o.useCallback(D=>{const N=Jc(D),O=Sr(D?.wording,D?.label);return N===!0?{variant:"main",label:O??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:O??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:O??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),b=a??0,v=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),h=o.useRef(null),[_,g]=o.useState(null),A=o.useCallback(()=>{h.current?.(),h.current=null,g(null)},[]);o.useEffect(()=>A,[A]);const y=o.useRef(0),k=(D,N)=>{if(!Ln)return;const O=Math.round(performance.now()-y.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${O}ms ${D}`,N??"")},x=o.useRef(0),w=o.useCallback((D,N,O)=>{A();const P=++x.current,G=()=>x.current===P;y.current=Ln?performance.now():0,k(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:O}),g(D),h.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,Yr()};const L=q=>{k("\uD2BC\uB2E4",q);const z=mr(q,V=>{k(`\uB05D\uB0AC\uB2E4 \u2014 ${V?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),V&&G()&&(h.current=null,g(null))});return h.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,z.stop(),Yr()},z.done},M=Y_(N,O);k("\uCC28\uB840",M.map(q=>q.kind));const $=M[0]?.kind==="raw",Y=$?L(O):Promise.resolve(!1);(async()=>{if(await Y||!G())return;const q=Z_(),z=$?M.slice(1):M;for(let V=0;V<z.length;V++){if(!G())return;k(`${z[V].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await z[V].resolve(X_(q,z.length-V));if(k(`${z[V].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!G()||R&&(await L(R)||!G()))return}G()&&(k("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),J_(N),h.current=()=>{x.current++,Yr()},k("\uB0AD\uB3C5\uD55C\uB2E4"),Tf(N,{onEnd:()=>{G()&&(h.current=null,g(null))}}))})()},[A]),B=o.useMemo(()=>C.map(D=>{const N=D??{},O=Q_(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:P,label:G}=f(N),L=Array.isArray(N.corrects)?N.corrects:[],M=L.length?L.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,$=typeof N.selectedText=="string"?N.selectedText:null,Y=Jc(N)===!0,q=ew(N),z=!!q||K_(O);return{problem:O,variant:P,label:G,answer:M,selectedText:$,isCorrect:Y,sound:q,canHear:z}}),[C,f,d]),E=o.useMemo(()=>B.some(D=>D.answer!==null||D.selectedText!==null),[B]);return n.jsx(Fn,{onClose:l,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:m,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(me,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(s)}),n.jsx(me,{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?m: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.")}),i&&n.jsx("p",{className:"trp-result__subtitle body-3",children:i}),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(me,{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?A():w(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(At,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const Bs=new Set;function tw(e){o.useEffect(()=>{if(!e||Bs.has(e))return;Bs.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,i=0,s=0;const l=()=>{const m=Date.now();a==null&&(a=m),r==null&&(r=m)},u=()=>{r!=null&&(i+=Date.now()-r,r=null)};t()&&l();const c=()=>{if(u(),a==null)return;const m=i-s;if(m<1e3||s===0&&i<5e3)return;const p=Date.now(),f=p-m;s=i,BC({trainingType:e,startedAt:new Date(f).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?l():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(),Bs.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function jr(e,t){return e&&e.key||`step-${t??0}`}function Mr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function nw(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const aw=300,rw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Tn=Object.freeze({}),ed=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function ks(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,i=Array.isArray(a)?a.filter(s=>s?.correct===!0||s?.isCorrect===!0||s?.score===1||s?.heard===!0||s?.judgement===!0).length:null;return{results:a,correct:r!=null?i:null,total:r}}const ow=e=>n.jsx(Qc,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function sw(e){const{scenario:t,title:a,subTitle:r,depth:i,icon:s,wrapperStyle:l,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:m,stepCount:p,onBack:f,onComplete:b,onRoundFinished:v,onNext:C,onSettings:h,useNoiseSetting:_=!0,children:g,ariaLabel:A,label:y,buildResults:k,onResult:x,typeKey:w,entryPoint:B,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:O,hideNoiseRows:P=!1}=e;tw(w&&!ed.has(w)?w:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:L}=xe.useTranslation(),M=x,$=!!t,Y=t?.id||null,q=t?.meta||{},z=Array.isArray(t?.pages)?t.pages:[],V=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=V.length>0,H=se=>se===Dr||se?.__isTrainingPage===!0,W=R&&V.some(se=>H(se.type)),I=W?V.filter(se=>H(se.type)).map((se,ve)=>{const Te=se.props||{};return{id:`children-page-${ve}`,steps:o.Children.toArray(Te.children).filter(o.isValidElement),pageTop:Te.pageTop||Te.top||null,pageBottom:Te.pageBottom||Te.bottom||null}}):[{id:"children-page-0",steps:V}],S=R&&!$&&typeof g!="function",j=S?Math.max(1,I.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 se=document.body;return se.dataset.ihabTrainingPopupCount=String(Number(se.dataset.ihabTrainingPopupCount||"0")+1),se.classList.add("ihab-training-popup-open"),()=>{const ve=Number(se.dataset.ihabTrainingPopupCount||"1")-1;ve>0?se.dataset.ihabTrainingPopupCount=String(ve):(delete se.dataset.ihabTrainingPopupCount,se.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return jv()},[]);const[F,U]=o.useState({...Qn,enabled:!1}),ae=o.useRef(F);o.useEffect(()=>{ae.current=F},[F]);const te=o.useRef(O),le=o.useRef(!1),K=o.useRef(null);o.useEffect(()=>{let se=!1;const ve=Te=>{if(se)return;le.current=!0;const Ke=Te?Jn({...Qn,enabled:!1},Te):{...Qn},Fe=K.current;K.current=null;const Ze=Fe?Jn(Ke,Fe):Ke;ae.current=Ze,U(Ze),Fe&&!te.current&&lo(Ze),rr(Ze);const J=te.current;if(J){const pe=typeof J=="function"?J(Ze):J,ne=Jn(Ze,pe);ae.current=ne,U(ne),rr(ne)}};return $C().then(Te=>{if(se){const Ke=K.current;if(K.current=null,Ke&&!te.current){const Fe=Te?Jn({...Qn,enabled:!1},Te):{...Qn};lo(Jn(Fe,Ke))}return}ve(Te)}),()=>{se=!0}},[]);const[re,ke]=o.useState(null),[Z,Q]=o.useState(null),he=o.useCallback((se,ve)=>{se==="main"?ke(ve):Q(ve)},[]),De=o.useRef(null),ye=o.useRef(null),de=o.useCallback(()=>{ye.current!==null&&(clearTimeout(ye.current),ye.current=null);const se=De.current;De.current=null,se&&lo(se)},[]);o.useEffect(()=>{if(typeof window>"u")return;const se=()=>{document.visibilityState==="hidden"&&de()};return window.addEventListener("pagehide",de),document.addEventListener("visibilitychange",se),()=>{window.removeEventListener("pagehide",de),document.removeEventListener("visibilitychange",se),de()}},[de]);const ie=o.useCallback(se=>{const ve=Jn(ae.current,se);if(ae.current=ve,U(ve),!le.current){K.current={...K.current??{},...se},rr(ve);return}te.current||(De.current=ve,ye.current!==null&&clearTimeout(ye.current),ye.current=setTimeout(de,aw)),rr(ve)},[de]),ge=F.mainSpeed,fe=F.mainVolume,ue=o.useCallback(se=>ie({mainSpeed:se}),[ie]),Me=o.useCallback(se=>ie({mainVolume:se}),[ie]),ze=o.useMemo(()=>({settings:F,setSettings:ie,registerAnalyser:he,mainAnalyser:re,noiseAnalyser:Z,playbackRate:ge,setPlaybackRate:ue,mainVolume:fe,setMainVolume:Me}),[F,ie,he,re,Z,ge,ue,fe,Me]),je=o.useRef(null),[Oe,We]=o.useState(0),mt=o.useRef([]),[ct,rt]=o.useState("center"),[ft,Ae]=o.useState(!1),qe=o.useRef(!1),we=o.useRef(null),Ue=o.useCallback(se=>{qe.current||(qe.current=!0,Ae(!0),we.current=setTimeout(()=>{try{se()}catch{qe.current=!1,Ae(!1)}},rw()?0:k_))},[]);o.useEffect(()=>()=>{we.current&&clearTimeout(we.current)},[]);const Be=o.useRef(f);o.useEffect(()=>{Be.current=f}),o.useEffect(()=>{const se=je.current,ve=document.activeElement;if(ho(se,ve),se){const Te=Array.from(se.querySelectorAll(Cn)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if(Te)try{Te.focus()}catch{}}return()=>{const Te=document.activeElement;if(!Te||Te===document.body||se&&se.contains(Te))try{fo(ve)?.focus?.()}catch{}}},[]),o.useEffect(()=>Gn(()=>Ue(()=>{const se=Be.current;typeof se=="function"&&se()})),[Ue]),po(je,!0);const[Le,Se]=o.useState(!1),Je=o.useRef(!1),[Qe,dt]=o.useState(null),ht=o.useRef(0),wt=o.useRef(0),Ct=()=>{ht.current+=1,wt.current+=1,dt(null)},[Nt,gt]=o.useState(""),[it,Ye]=o.useState(()=>Mr()),oe=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!$&&!S||(Ye(Mr()),Ct())},[$,Y,S]),o.useEffect(()=>{S&&Ye(se=>{const ve=Math.max(0,Math.min(se.pageIndex,Math.max(0,j-1)));return ve!==se.pageIndex?{...se,pageIndex:ve,stepIndex:0}:se})},[S,j]);const Ne=S?Math.max(0,Math.min(it.pageIndex,j-1)):0,Ve=S?I[Ne]:null,nt=S&&Ve&&Array.isArray(Ve.steps)?Ve.steps:[],Ie=$?it.pageIndex:S?Ne:typeof c=="number"?c:0,Ge=$?z[Math.max(0,Math.min(it.pageIndex,Math.max(0,z.length-1)))]:null,bt=$&&Ge&&Array.isArray(Ge.steps)?Ge.steps:[],Re=$?bt.length:S?nt.length:typeof p=="number"?p:0,tt=$||S?Math.max(0,Math.min(it.stepIndex,Math.max(0,Re))):typeof m=="number"?m:0,xt=$?z.length:S?j:typeof d=="number"?d:0;o.useEffect(()=>{if(!$&&!S)return;const se=$?Tr(Ge,Ie):Ve?.id||`children-page-${Ie??0}`,ve=new Date().toISOString();for(let Te=0;Te<=tt;Te+=1){const Ke=$?jr(bt[Te],Te):`step-${Te}`,Fe=lt(se,Ke);ot.current.has(Fe)||ot.current.set(Fe,ve)}},[$,S,Ie,tt,Ve?.id]),o.useLayoutEffect(()=>{const se=oe.current;if(typeof Ie=="number"&&se!==null&&Ie!==se&&Ie>se)try{gt(L("training.problemNotice",{n:Ie+1}))}catch{}oe.current=typeof Ie=="number"?Ie:oe.current},[Ie,c,L]),o.useLayoutEffect(()=>{const se=je.current;if(!se)return;const ve=()=>se.querySelector(".page-popup__scroll");let Te=null,Ke=null,Fe=null;const Ze=$e=>{const He=ve();if(!He)return;const ut=He.scrollHeight<=He.clientHeight;if(rt(ut?"center":"top"),$e&&!Je.current){Je.current=!0;try{Se(!0)}catch{}try{ne.disconnect()}catch{}}},J=()=>{Te!==null&&cancelAnimationFrame(Te),Te=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>Ze(!0),60)})},pe=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>Ze(!1))};J(),window.addEventListener("resize",pe);const ne=new MutationObserver(J);ne.observe(se,{childList:!0,subtree:!0,attributes:!0});const be=setTimeout(()=>{Je.current||Ze(!0)},400);return()=>{window.removeEventListener("resize",pe),Te!==null&&cancelAnimationFrame(Te),Ke!==null&&clearTimeout(Ke),Fe!==null&&cancelAnimationFrame(Fe),clearTimeout(be);try{ne.disconnect()}catch{}}},[je]);const Lt=o.useCallback(se=>{je.current&&(je.current._childOnNext=se)},[]),et=o.useCallback(se=>{je.current&&(je.current._childOnResult=se)},[]),ot=o.useRef(new Map),lt=(se,ve)=>`${se}\0${ve}`,st=o.useCallback((se,ve,Te)=>{Ye(Ke=>{const Fe=Ke.answersByPage[se]||{},Ze=Fe[ve],J=_s(Te),pe=_s(Ze);if(Ze&&pe>J)return Ke;const ne=Wc(Te,ot.current.get(lt(se,ve)),J);return{...Ke,answersByPage:{...Ke.answersByPage,[se]:{...Fe,[ve]:ne}}}})},[Ye]),jt=o.useCallback((se,ve,Te)=>{const Ke=Tr(Ge,Ie),Fe=jr(se,ve);st(Ke,Fe,Te)},[Ge,Ie,st]),Wt=o.useCallback((se,ve,Te)=>{const Ke=Tr(Ge,Ie),Fe=jr(se,ve);st(Ke,Fe,Te),!Te?.allowChange&&se?.autoAdvance!==!1&&Ye(Ze=>({...Ze,stepIndex:Math.max(Ze.stepIndex,ve+1)}))},[Ge,Ie,st,Ye]),mn=o.useCallback((se,ve)=>{const Te=Ve?.id||`children-page-${Ie??0}`,Ke=typeof ve=="number"?ve:tt??0,Fe=`step-${Ke}`;st(Te,Fe,se),se?.allowChange||Ye(Ze=>({...Ze,stepIndex:Math.max(Ze.stepIndex,Ke+1)}))},[Ve,Ie,tt,st,Ye]),hn=o.useCallback((se,ve)=>{const Te=Ve?.id||`children-page-${Ie??0}`,Ke=`step-${typeof ve=="number"?ve:tt??0}`;st(Te,Ke,se)},[Ve,Ie,tt,st]),jn=S?{currentPageIndex:Ie??0,currentStepIndex:tt??0,totalStepsInPage:nt.length,handleStepDone:mn,handleStepChange:hn}:null,zn=async()=>{const se=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:z,flowState:it,answersByPage:it.answersByPage})):null;return typeof M=="function"&&await Promise.resolve(M(se))||se},Wn=async()=>{const se=Ve?.id||`children-page-${it.pageIndex}`,ve=it.answersByPage[se]||{},Te=W?(()=>{const Ze={};let J=0;return I.forEach(pe=>{const ne=it.answersByPage[pe.id]||{},be=Array.isArray(pe.steps)?pe.steps.length:0;for(let $e=0;$e<be;$e+=1){const He=ne[`step-${$e}`];typeof He<"u"&&(Ze[`step-${J+$e}`]=He)}J+=be}),Ze})():ve;if(typeof k=="function"){const Ze=await Promise.resolve(k(Te,{pageAnswers:ve,answersByPage:it.answersByPage,pages:I,currentPageId:se}));return typeof M=="function"&&await Promise.resolve(M(Ze))||Ze}const Ke=Object.entries(ve).map(([Ze,J],pe)=>({index:pe,key:Ze,payload:J})),Fe={results:Ke,answers:Ke,score:0};return typeof M=="function"&&await Promise.resolve(M(Fe))||Fe},It=()=>{const se=++ht.current,ve=()=>se!==ht.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($){const Fe=zn();dt(Tn);const Ze=Fe;Promise.resolve(Ze).then(J=>{ve()||dt(J||{isEmpty:!0})}).catch(J=>{!ve()&&dt({isEmpty:!0})});return}if(S){const Fe=Wn();dt(Tn);const Ze=Fe;Promise.resolve(Ze).then(J=>{ve()||dt(J||{isEmpty:!0})}).catch(J=>{!ve()&&dt({isEmpty:!0})});return}const Te=je.current&&je.current._childOnResult,Ke=Fe=>{try{return Fe?Fe():void 0}catch{return}};if(typeof Te=="function"){const Fe=Ke(Te);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Fe&&typeof Fe.then!="function"?dt(Fe):dt(Fe&&typeof Fe.then=="function"?Tn:{});const Ze=()=>{ve()||dt(J=>J===Tn?{}:J)};Promise.resolve(Fe).then(J=>{J&&!ve()?dt(J):Ze()}).catch(J=>{Ze()});return}if(typeof M=="function"){const Fe=Ke(M);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Fe&&typeof Fe.then!="function"?dt(Fe):dt(Fe&&typeof Fe.then=="function"?Tn:{});const Ze=()=>{ve()||dt(J=>J===Tn?{}:J)};Promise.resolve(Fe).then(J=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("components.cjs.js",document.baseURI).href}catch{}J&&!ve()?dt(J):Ze()}).catch(J=>{console.error("viewResults external handler failed",J),Ze()});return}},vn=()=>{if($){if(typeof Ie=="number"&&typeof xt=="number"&&Ie<xt-1){Ye(ve=>({...ve,pageIndex:ve.pageIndex+1,stepIndex:0}));return}return It()}if(S){const ve=nt.length;if(typeof tt=="number"&&tt<ve-1){Ye(Te=>({...Te,stepIndex:Te.stepIndex+1}));return}if(typeof Ie=="number"&&typeof xt=="number"&&Ie<xt-1){Ye(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return It()}if(typeof C=="function"){try{C()}catch{}return}const se=je.current&&je.current._childOnNext;if(typeof se=="function"){try{se()}catch{}return}},Ft=$?q.title||q.label||A||L("common.popup","\uD31D\uC5C5"):a||y||(Array.isArray(i)?i[i.length-1]:void 0)||A||L("common.popup","\uD31D\uC5C5"),Ht=A||Ft,Mn=$?q.title??q.label??Ft:a??y??Ft,on=(se,ve)=>{const Te=Tr(Ge,Ie),Ke=jr(se,ve),Fe=it.answersByPage[Te]?.[Ke],Ze=nw(se,{page:Ge,pageIndex:Ie,step:se,stepIndex:ve,storedPayload:Fe,answersByPage:it.answersByPage,flowState:it}),J={key:Ke,index:ve,stepIndex:tt,isLast:ve===bt.length-1};switch(se?.type){case"listen":return n.jsx(ys,{...J,...Ze,onDone:pe=>Wt(se,ve,pe)});case"confirm":return n.jsx(gs,{...J,...Ze,onDone:pe=>Wt(se,ve,pe),onChange:pe=>jt(se,ve,pe)});case"confirmWithText":return n.jsx(bs,{...J,...Ze,onDone:pe=>Wt(se,ve,pe),onChange:pe=>jt(se,ve,pe)});case"orderList":return n.jsx(vs,{...J,...Ze,onDone:pe=>Wt(se,ve,pe),onChange:pe=>jt(se,ve,pe)});default:return null}},xn=o.useRef(void 0);o.useEffect(()=>{const se=xn.current;if(xn.current=Ie,se===void 0||se===Ie||!gr())return;const ve=je.current;if(!ve)return;const Te=document.activeElement;if(!(!Te||Te===document.body||!ve.contains(Te)||Te.disabled===!0))return;const Ke=ve.querySelector(`.training-steps ${Cn.split(", ").join(", .training-steps ")}`)??Array.from(ve.querySelectorAll(Cn)).find(Fe=>!Fe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Ie]);const Hn=$?z.length>0?n.jsx("div",{className:"training-steps",children:bt.map((se,ve)=>on(se,ve))},`replay-${Oe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||L("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,_n=S?n.jsxs(Vc.Provider,{value:jn,children:[Ve?.pageTop?n.jsx("div",{className:"training-page-top",children:Ve.pageTop}):null,n.jsx("div",{className:"training-steps",children:nt.map((se,ve)=>{const Te=se;return o.cloneElement(Te,{...Te.props,_stepIndex:ve,_totalSteps:nt.length,_stepKey:`step-${ve}`,_pageIndex:Ie})})},`replay-${Oe}`),Ve?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Ve.pageBottom}):null]}):null,Vt=o.useRef(-1),$t=o.useCallback(()=>{if(!w)return;const se=Qe,{results:ve,correct:Te,total:Ke}=ks(Qe),Fe={correct:Te,total:Ke,attempt:mt.current.length+1,previousAttempts:[...mt.current]};if(Vt.current===wt.current)return Fe;Vt.current=wt.current,kC({items:LC(ve),category:ed.has(w)?"sentence":"word",trainingType:w,entryPoint:B??"sentence",itemRef:D??null,correct:Te,total:Ke,score:typeof se?.score=="number"?se.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:E??null});try{v?.(Fe)}catch{}return Fe},[w,B,E,D,Qe,v]);o.useEffect(()=>{!Qe||Qe===Tn||Qe?.isEmpty||(ks(Qe).total??0)>0&&$t()},[Qe,$t]);const qt=o.useCallback(()=>{const se=$t();Ct(),Ue(()=>{typeof b=="function"&&b(se),typeof f=="function"&&f()})},[b,f,$t,dt,Ue]),fn=o.useCallback(()=>gt(""),[gt]),Ot=o.useCallback(()=>{Ue(()=>{typeof f=="function"&&f()})},[f,Ue]),sn=n.jsxs("div",{className:`page-popup${ft?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Ht,children:[n.jsxs("div",{ref:je,className:`page-popup__panel ${Le?"":"page-popup__panel--measuring"} ${ct==="center"?"page-popup__panel--center":ct==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Fc,{title:Mn,subtitle:$?q.subtitle||q.label:Array.isArray(i)?i.join(" / "):void 0,desc:$?void 0:r,depth:$?q.depth:i,icon:$?q.icon:s,wrapperStyle:$?q.wrapperStyle:l,iconTooltip:$?q.iconTooltip:u,progressMax:xt,progressIndex:Ie,pageIndex:Ie,pageCount:xt,onBack:Ot,onClose:Ot}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ct==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?_n:$?Hn:typeof g=="function"?g({registerOnNext:Lt,registerOnResult:et,panelRef:je,setResultOverlay:dt}):g})}),n.jsx(Ic,{onSettings:h,onNext:vn,onResult:It,useNoiseSettingBtn:!!($?q.useNoiseSetting??!0:_),stepIndex:tt,stepCount:Re,pageIndex:Ie,pageCount:xt,resultOpen:!!(Qe&&!Qe.isEmpty),hideNoiseRows:P})]}),Qe&&!Qe.isEmpty&&(N??ow)({score:Qe.score,results:Qe.results||Qe.answers||[],contextsLength:Qe.results?Qe.results.length:Qe.answers?Qe.answers.length:0,onReplay:()=>{if(G.current=Date.now(),Qe!==Tn){const{correct:se,total:ve}=ks(Qe);mt.current.push({correct:se,total:ve})}if(Ct(),We(se=>se+1),$){if(Ye(Mr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){Ye(Mr());return}try{const se=je.current&&je.current._childOnResult;typeof se=="function"&&se({replay:!0})}catch{}},onClose:qt,pending:Qe===Tn}),Qe?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":L("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:L("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(me,{htmlType:"button",variant:"main",size:48,onClick:qt,label:L("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ha,{message:Nt,position:"top",onClose:fn})]}),Dt=n.jsx(ds.Provider,{value:ze,children:sn});return typeof document<"u"&&document.body?en.createPortal(Dt,document.body):Dt}const On=sw;On.Page=Dr,On.ListenStep=qc,On.ConfirmStep=Uc,On.ConfirmWithTextStep=Gc,On.OrderListStep=Kc,On.CardStep=Yc,On.CardOrderStep=V_;function iw({label:e,homonum:t}){const a=sa()?.(e,t)??"",{imgRef:r,loading:i,hasImage:s,onLoad:l,onError:u}=Zo(a);return s?n.jsxs("div",{className:"tooltip-word-image__cell",children:[i&&n.jsx("div",{className:"tooltip-word-image__spinner"}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:i?0:1},onLoad:l,onError:u})]}):n.jsx("div",{className:"tooltip-word-image__cell tooltip-word-image__cell--text h3",children:n.jsx("span",{children:e})})}function td({words:e,anchorRect:t}){const a=o.useRef(null),[r,i]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:s,offsetHeight:l}=a.current,u=window.innerWidth;let c=t.left+t.width/2-s/2,d=t.top-l-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-s-8)),i({left:c,top:d})},[t]),!t||e.length===0?null:en.createPortal(n.jsx("div",{ref:a,className:"tooltip-word-image",style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:"tooltip-word-image__cells",children:e.map(s=>n.jsx(iw,{label:s.label,homonum:s.homonum},`${s.label}_${s.homonum??1}`))})}),document.body)}function lw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:i,groups:s,selected:l=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:m,onPrintEmpty:p,className:f,emptyHint:b,sectionType:v="page",disc:C}){const{t:h,i18n:_}=xe.useTranslation(),g=_.language?.startsWith("ko")??!1,{anchorRect:A,openAt:y,close:k}=Pa(),[x,w]=o.useState(null),B=o.useCallback(()=>{k(),w(null)},[k]);i2(B,!!x);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",N=D.length>0,O=r===void 0&&t===void 0,P=N?"match":O?"original":"ganada",[G,L]=o.useState(()=>P),[M,$]=o.useState("50"),[Y,q]=o.useState(1),[z,V]=o.useState(N);z!==N&&(V(N),L(P));const R=G==="match"&&!N||G==="original"&&!O?P:G,H=o.useMemo(()=>[...N?[{value:"match",label:h("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...O?[{value:"original",label:h("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:h("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:h("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:h("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:h("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:h("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:h("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[h,N,O]),W=o.useMemo(()=>["10","25","50","100"].map(ie=>({value:ie,label:h("wordSearch.pageSize",{count:Number(ie),defaultValue:`${ie}\uAC1C\uC529 \uBCF4\uAE30`})})),[h]),I=ie=>ie.words?.[0],S=o.useMemo(()=>{const ie=[...D].length,ge=iC(D),fe=new Map;return ue=>{let Me=fe.get(ue);return Me===void 0&&(Me=ge((ue.words?.[0]?.label??"").slice(0,ie))?0:1,fe.set(ue,Me)),Me}},[D]),j=o.useCallback((ie,ge)=>{const fe=ze=>I(ze)?.label??"",ue=ze=>I(ze)?.syllables??[...fe(ze)].length,Me=ze=>(ze.words??[]).reduce((je,Oe)=>{const We=parseInt(Oe.grade??"",10);return Number.isFinite(We)&&We<je?We:je},999);switch(R){case"match":return S(ie)-S(ge)||an(fe(ie),fe(ge));case"ganada":return an(fe(ie),fe(ge));case"ganada_desc":return an(fe(ge),fe(ie));case"syllable":return ue(ie)-ue(ge)||an(fe(ie),fe(ge));case"syllable_desc":return ue(ge)-ue(ie)||an(fe(ie),fe(ge));case"grade":return Me(ie)-Me(ge)||an(fe(ie),fe(ge));case"grade_desc":return Me(ge)-Me(ie)||an(fe(ie),fe(ge));default:return 0}},[R,S]),F=o.useMemo(()=>i.slice().sort(j),[i,j]),U=Number(M)||10,ae=o.useMemo(()=>(s??[]).flatMap(ie=>ie.items.slice().sort(j).map(ge=>({item:ge,label:ie.label}))),[s,j]),te=s?ae.length:F.length,le=Math.max(1,Math.ceil(te/U)),K=Math.min(Y,le),re=o.useMemo(()=>F.slice((K-1)*U,K*U),[F,K,U]),ke=o.useId(),Z=o.useMemo(()=>{if(!s)return null;const ie=ae.slice((K-1)*U,K*U),ge=new Map;for(const{item:fe,label:ue}of ie)ge.has(ue)||ge.set(ue,[]),ge.get(ue).push(fe);return[...ge.entries()].map(([fe,ue])=>({label:fe,items:ue}))},[s,ae,K,U]);o.useEffect(()=>{q(1)},[G,M,te,r]);const Q=te>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(pn,{size:40,options:H,value:R,onChange:L,ariaLabel:h("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(pn,{size:40,options:W,value:M,onChange:$,ariaLabel:h("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(hr,{page:K,totalPages:le,onChange:q})]}):void 0,he=ie=>{u&&u(ie)},De=t!==void 0&&a?n.jsxs(n.Fragment,{children:[h("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),h("wordSearch.resultTitleSuffix",{unit:g?bC(a):a})]}):void 0,ye=t!==void 0&&t>0&&c!==void 0&&a?h("wordSearch.resultDisc",{unit:g?vC(a):a,max:c,selected:l.length}):void 0,de=C??ye;return n.jsxs(Ca,{type:v,className:_e("word-search-result-block",f),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(De||Q||de)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(at,{icon:e,className:"word-search-result-block__head-icon"}),De&&n.jsx("span",{className:"word-search-result-block__title h3",children:De})]}),Q&&n.jsx("div",{className:"word-search-result-block__head-actions",children:Q}),de&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:de})]}),(s?s.length===0:i.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:h("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})]}),s?(Z??[]).map(ie=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${ke}-${ie.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${ke}-${ie.label}`,children:ie.label}),n.jsx("div",{className:"word-search-result-block__items",children:ie.items.map(ge=>{const fe=l.includes(ge.id);return n.jsx("div",{onMouseEnter:ue=>{y(ue.currentTarget),w(ge.words??[])},onMouseLeave:B,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(ge.words??[]).map(ue=>ue.label),subLabel:(ge.words??[]).some(ue=>ue.subLabel)?(ge.words??[]).map(ue=>ue.subLabel):void 0,selected:fe,onClick:()=>he(ge.id),minWidth:200})},ge.id)})})]},ie.label)):n.jsx("div",{className:"word-search-result-block__items",children:re.map(ie=>{const ge=l.includes(ie.id);return n.jsx("div",{onMouseEnter:fe=>{y(fe.currentTarget),w(ie.words??[])},onMouseLeave:B,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(ie.words??[]).map(fe=>fe.label),subLabel:(ie.words??[]).some(fe=>fe.subLabel)?(ie.words??[]).map(fe=>fe.subLabel):void 0,selected:ge,onClick:()=>he(ie.id),minWidth:200})},ie.id)})}),x&&A&&n.jsx(td,{words:x,anchorRect:A})]}),le>1&&n.jsx("div",{className:"word-search-result-block__pagination-bottom",children:n.jsx(hr,{page:K,totalPages:le,onChange:q})}),(d||m)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:h("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:l.length===0,onClick:l.length===0?void 0:d}),m&&n.jsx("div",{onClick:l.length===0?p:void 0,children:n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:h("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:l.length===0,onClick:l.length===0?void 0:m})})]})]})}function uw(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,i=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:i}})}function cw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:i=4,minCount:s=1,combinationSections:l,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:m,title:p,titleIcon:f,disc:b,showInfoButton:v=!0,onClearPhoneme:C,onSearch:h,onSearchEmpty:_,searchDisabled:g=!1,searchLabel:A,searchChecking:y=!1,pairMode:k=!1,sectionType:x="page",beforeSearchContent:w,beforeContent:B,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:O}=xe.useTranslation(),P=o.useMemo(()=>O("wordPairs.infoNotes",{returnObjects:!0}),[O]),G=o.useMemo(()=>Array.from({length:i-s+1},(S,j)=>{const F=s+j;return{key:String(F),label:O("wordPairs.count",{n:F})}}),[O,i,s]),L=o.useMemo(()=>O("wordPairs.ordinals",{returnObjects:!0}),[O]),M=o.useCallback(S=>N?O("wordPairs.phonemeOrdinalLabel",{ordinal:L[S-1]??S}):a===1?O("wordPairs.phonemeSingleLabel","\uC74C\uC808"):O("wordPairs.phonemeN",{n:S}),[N,L,a,O]),$=o.useCallback(S=>N?O("wordPairs.phonemeContrastOrdinalLabel",{ordinal:L[S-1]??S}):a===1?O("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):O("wordPairs.phonemeContrast",{n:S}),[N,L,a,O]),Y=o.useCallback((S,j)=>j?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:q,toggleAt:z,close:V}=Pa(),R=o.useCallback(S=>r(Number(S)),[r]),H=ln("(max-width: 767px)"),W=o.useCallback(S=>uw(S,e).map(({label:j,value:F,displayLabel:U})=>{const ae=!!F&&F!=="\uC5C6\uC74C";return n.jsxs("span",{className:_e("phoneme-select-block__cell-jamo-part",F?"":"phoneme-select-block__cell-jamo-part--empty",ae?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${F==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:F==="\uC5C6\uC74C"?"x":F||d}),ae&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:U??j})]},j)}),[e,d]),I=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:H?"dot":void 0,icon:"info",label:H?void 0:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:q?"is-selected":void 0,"aria-expanded":!!q,"aria-haspopup":"dialog",onClick:S=>z(S.currentTarget)})}),q&&n.jsx(Kn,{title:O("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:P,anchorRect:q,onClose:V})]});return n.jsxs(Ca,{type:x,title:p,icon:f,disc:b,action:v?I:void 0,className:_e("phoneme-select-block",m),children:[B,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(gn,{options:G,value:String(a),onChange:R,size:40,ariaLabel:O("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((S,j)=>{const F=t[j*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:W(F)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(j+1)})]},j)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:O("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,j)=>{const F=t[j*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:W(F)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(j+1)})]},j)})})]}):t.map((S,j)=>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:W(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(j+1)})]},j))}),(l||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((S,j)=>{const F=t[j*2]??{};return n.jsx(Dn,{title:Y(M(j+1),j===0),sections:u?u(F,j*2):l,selected:F,onSelect:c?.(j*2),align:"newline"},j)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,j)=>{const F=t[j*2+1]??{};return n.jsx(Dn,{title:$(j+1),sections:u?u(F,j*2+1):l,selected:F,onSelect:c?.(j*2+1),align:"newline"},j)})})]}):t.map((S,j)=>n.jsx(Dn,{title:Y(M(j+1),j===0),sections:u?u(S,j):l,selected:S,onSelect:c?.(j),align:"newline"},j))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(C||h||y)&&(()=>{const S=t.every(j=>{const F=aC(j);return Object.entries(F).every(([U,ae])=>!ae||U==="coda"&&ae===Ei)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?_:void 0,children:[C&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:O("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),h?n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:y?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:A??O("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||g||y,onDisabledClick:y?()=>{}:void 0,"aria-busy":y||void 0,onClick:h}):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:A??O("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function dw({title:e,sections:t,selected:a,onSelect:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,headerAction:d,className:m}){const{t:p}=xe.useTranslation();return n.jsx(Dn,{className:m,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function pw({title:e,headerAction:t,sections:a,selected:r,onSelect:i,className:s}){const{t:l}=xe.useTranslation();return a.length===0?null:n.jsx(Dn,{className:s,title:e??l("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:i,align:"newline"})}function mw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:i,positionCount:s,onPositionCountChange:l,inputMode:u,onInputModeChange:c,className:d}){const{t:m}=xe.useTranslation(),p={searchMode:m("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:m("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:m("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:m("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:m("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:m("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:m("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:m("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:m("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:m("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:m("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},f=h=>m("wordPairs.count",{n:h}),b=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[m("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."),m("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."),m("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(Ha,{items:m("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[f(1),f(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[m("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."),m("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]:f(s),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(h,_)=>{_===p.searchMode?a(h===p.explicit?"explicit":h===p.pick?"pick":"include"):_===p.phonemeOrder?i(h===p.orderMatch?"ordered":"unordered"):_===p.count?l(h===f(2)?2:1):_===p.inputMode&&c(h===p.pronInput?"phoneme":"word")};return n.jsx(Dn,{className:d,title:e??m("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:v,onSelect:C,align:"inline"})}function hw(e){const{title:t,items:a,columns:r,resizeStorageKey:i,gridTemplateColumns:s,mobileGridTemplateColumns:l,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:m=!0,selectedId:p,selectedIds:f,onSelect:b,onClose:v,pageSizeOptions:C=[10,25,50,100],initialPageSize:h,emptyText:_,noMatchText:g,countLabel:A,topContent:y,className:k=""}=e,{t:x}=xe.useTranslation(),w=u??x("common.search","\uAC80\uC0C9"),B=_??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=g??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[O,P]=o.useState(d??r[0]?.key??""),[G,L]=o.useState(m),[M,$]=o.useState(String(h??C[0]??10)),[Y,q]=o.useState(1);o.useEffect(()=>{q(1)},[D,M]);const z=c!==null,V=o.useCallback((te,le)=>{if(!le)return!0;const K=le.toLowerCase();return r.some(re=>{const ke=te[re.key];return ke==null?!1:String(ke).toLowerCase().includes(K)})},[r]),R=c??V,H=o.useMemo(()=>{const te=z?a.filter(le=>R(le,D)):a;return O?[...te].sort((le,K)=>{const re=le[O],ke=K[O];return re===ke?0:wo(re,ke,G)}):te},[a,D,O,G,z,R]),W=Math.max(1,Math.ceil(H.length/Number(M)));Y>W&&q(W);const I=Math.min(Y,W),S=H.slice((I-1)*Number(M),I*Number(M)),j=o.useCallback(te=>{O===te?L(le=>!le):(P(te),L(!0)),q(1)},[O]),F=o.useMemo(()=>{if(typeof A=="function"){const te=H.length,le=A(te);if(typeof le=="string"){const K=le.lastIndexOf(String(te));if(K>=0)return{prefix:le.slice(0,K),suffix:le.slice(K+String(te).length)}}return{label:le}}if(typeof A=="string"&&A.includes("{n}")){const[te,le]=A.split("{n}");return{prefix:te,suffix:le}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[A,H.length,x]),U=o.useMemo(()=>r.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>j(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&O===te.key?G?"asc":"desc":null})),[r,O,G,j]),ae=o.useMemo(()=>C.map(te=>({value:String(te),label:x("common.pageSizeLabel",{n:te})})),[C,x]);return n.jsxs(Fn,{className:`popup-list ${k}`,title:t,onClose:v,children:[y,"label"in F&&n.jsx("p",{className:"toolbar__count body-1",children:F.label}),n.jsx(Ro,{count:"label"in F?void 0:{value:H.length,prefix:F.prefix,suffix:F.suffix},search:z?{value:D,onChange:N,placeholder:w}:void 0,pageSize:{options:ae,value:M,onChange:$},pagination:{page:I,total:W,onChange:q}}),n.jsx(Go,{size:"medium",gridTemplateColumns:s,mobileGridTemplateColumns:l,resizable:!0,resizeStorageKey:i,fields:U,items:S,onRowClick:b,renderRow:te=>{const le=f!=null?te.id!=null&&f.has(te.id):p!=null&&te.id===p;return r.map(K=>({content:K.render?K.render(te):te[K.key]??"",className:_e(K.className,le&&"popup-list__row--selected")}))},empty:z&&D!==""&&a.length>0?E:B})]})}function nd(e){const{title:t,message:a,topContent:r,details:i,children:s,confirmLabel:l,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:m="main",confirmDisabled:p=!1,onConfirm:f,closeOnConfirm:b=!0,onClose:v,inline:C,size:h="small",className:_,initialFocus:g="close"}=e,{t:A}=xe.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")??[]),O=g==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];O&&!O.disabled&&O.focus()},[]);const k=o.useRef(!1),[x,w]=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;w(!0);let O=!1;try{O=await D()}catch(P){typeof console<"u"&&console.error(P)}finally{O||(k.current=!1,w(!1),requestAnimationFrame(()=>{const P=document.activeElement;(!P||P===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Fn,{title:t,onClose:v,closeDisabled:x,inline:C,size:h,className:_e("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 O=d.closeOnClick??!0;return O&&D(),O||N.didClose()})}}]:[],...c?[]:[{label:u??A("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:D})=>D()}],{label:l??A("common.confirm","\uD655\uC778"),variant:m,disabled:p||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);return await f(N.close),b&&D(),b||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),i&&i.length>0&&n.jsx(Nr,{children:i.map((D,N)=>n.jsx(Sn,{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}),s]})}function fw(e,t,a={}){const{t:r}=xe.useTranslation(),[i,s]=o.useState(!1),l=o.useRef(!1),u=o.useCallback(()=>{l.current=!0},[]),c=o.useCallback(()=>l.current?(l.current=!1,!0):e?(s(!0),!1):!0,[e]),d=i?n.jsx(nd,{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:()=>{s(!1),t()},onClose:()=>s(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function Cw({onApply:e,onCancel:t}){const{t:a}=xe.useTranslation(),[r,i]=o.useState(""),[s,l]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),m=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async v=>{const C=r.trim();if(C){l(!0),c(null);try{await e(C),v()}catch(h){c(ji(h)),l(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),f=o.useCallback((v,C)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&p(C)},[p]),b=v=>{i(v.target.value),c(null)};return n.jsx(Fn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:s,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:s,onClick:({closeWithAnimation:v})=>v()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||s,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?m:void 0,"aria-describedby":u?m:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:C=>f(C,v),disabled:s,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:m,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const ad=["var(--color-main)","var(--color-sub)"],gw=2e3;function bw(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 As({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:i,trigger:s=0}){const l=o.useMemo(()=>{const C=Math.floor(t/2),h=t-C,_=(g,A)=>Array.from({length:g}).map((y,k)=>{const x=6+Math.random()*12,w=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),B=ad[Math.floor(Math.random()*ad.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(A==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,O=Math.cos(N)*D,P=Math.sin(N)*D*1.35,G=Math.random()*720-360,L=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),M=Math.random()>.7?"50%":"3px";return{id:`${A}-${k}`,side:A,size:w,color:B,delay:E,vx:O,vy:P,angularVel:G,life:L,borderRadius:M}});return[..._(C,"left"),..._(h,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),m=o.useRef(i);o.useEffect(()=>{m.current=i},[i]);const p=o.useRef(null),f=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"&&f.current==null&&(f.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const V=setTimeout(()=>m.current?.(),0);return()=>clearTimeout(V)}const C=1200,h=performance.now(),_=f.current&&f.current!==document.body?f.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),A=V=>Math.max(40,(V||window.innerWidth)*.02),y=_?.width||window.innerWidth||375,k=_?.height||window.innerHeight||812,x=V=>{const R=[...V].sort((H,W)=>H-W);return R[Math.floor(R.length/2)]||1},w=x(l.map(V=>Math.abs(V.vy))),B=x(l.map(V=>Math.abs(V.vx))),E=Math.sqrt(2*C*(k*.72+g))/w,D=w*E/C,N=y*.5/(B*D),O=(V,R,H)=>Math.min(H,Math.max(R,V)),P=O(E,.8,2.4),G=O(N,.7,2.2),L=a>0?a/gw:1,M=l.map(V=>({...V,life:V.life*L,vx:V.vx*G,vy:V.vy*P,startTime:h+V.delay,ended:!1})),$=_?{x:_.left-A(_.width),y:_.top+_.height+g}:{x:-A(window.innerWidth),y:window.innerHeight+g},Y=_?{x:_.left+_.width+A(_.width),y:_.top+_.height+g}:{x:window.innerWidth+A(window.innerWidth),y:window.innerHeight+g},q=V=>{let R=!1;for(const H of M){const W=c.current[H.id];if(!W||!W)continue;if(V<H.startTime){W.style.display="none",R=!0;continue}if(!H._inited){const re=H.side==="left"?$.x:Y.x,ke=H.side==="left"?$.y:Y.y;W.style.left=`${re}px`,W.style.top=`${ke}px`,W.style.transform="translate3d(0px, 0px, 0)",W.style.display="block",W.style.zIndex="100000",typeof H.color=="string"&&H.color.startsWith("var(")&&(W.style.background=bw(W,H.color)??"#FF0060"),H._inited=!0}const I=(V-H.startTime)/1e3;if(I<0)continue;const S=H.life/1e3;if(I>=S){W.style.opacity="0",W.style.display="none",H.ended=!0;continue}R=!0;const j=H.side==="left"?$.x:Y.x,F=H.side==="left"?$.y:Y.y,U=j+H.vx*I,ae=F+H.vy*I+.5*C*I*I,te=(H.angularVel||0)*I,le=U-j,K=ae-F;W.style.transform=`translate3d(${le}px, ${K}px, 0) rotate(${te}deg)`,W.style.opacity=`${Math.max(0,1-I/S)}`}R?d.current=requestAnimationFrame(q):m.current?.()};d.current=requestAnimationFrame(q);const z=setTimeout(()=>{try{if((f.current?f.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const V=document.createElement("div");V.className="party-container",V.style.position="fixed",V.style.inset="0",V.style.pointerEvents="none",V.style.overflow="visible",V.style.zIndex="2147483647";for(const R of l){const H=document.createElement("span");H.className=`confetti confetti--${R.side}`,H.setAttribute("aria-hidden","true"),H.style.display="none",H.style.position="fixed",H.style.left="0px",H.style.top="0px",H.style.width=`${R.size}px`,H.style.height=`${Math.max(4,R.size*.6)}px`,H.style.background=R.color,H.style.borderRadius=R.borderRadius,H.style.transform="translate3d(0,0,0)",H.style.opacity="0",V.appendChild(H),c.current[R.id]=H}(document.body||f.current).appendChild(V),p.current=V}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(z),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,s,l]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:u,children:l.map(C=>n.jsx("span",{"aria-hidden":!0,ref:h=>{c.current[C.id]=h},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}-${s}`))});return typeof document<"u"?en.createPortal(v,f.current||document.body):v}const Ns=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function yw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const s=l=>{const u=l.detail??{};r(c=>({n:(c?.n??0)+1,count:Ns(u.count),strength:Ns(u.strength),duration:Ns(u.duration)}))};return window.addEventListener("party:trigger",s),()=>window.removeEventListener("party:trigger",s)},[]);const i=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(As,{active:t,trigger:e}),a&&n.jsx(As,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:i})]})}function vw({title:e,sub:t,rightAction:a,titleAction:r,badge:i,badgeVariant:s="default",documentTitle:l,onBack:u,backLabel:c,wrap:d=!1}){const{t:m}=xe.useTranslation();Gy(typeof e=="string"?e:l??null);const p=c??m("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(me,{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}),i&&n.jsx("div",{className:"page-title__badge",children:n.jsx(At,{label:i,size:"small",variant:s,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 xw(e){return e??""}const rd=o.createContext({words:[],loading:!1});function _w(){return o.useContext(rd)}function ww({words:e,loading:t,error:a,statusMessage:r,localVersion:i,remoteVersion:s,progress:l,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const m=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:i,remoteVersion:s,progress:l,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,i,s,l,u,c]);return n.jsx(rd.Provider,{value:m,children:d})}function Bw({items:e,actions:t,columns:a,flat:r=!1,className:i,style:s}){const l=a??e.length;return n.jsx("section",{className:_e("summary-strip",r&&"summary-strip--flat",i),style:{"--summary-strip-cols":String(l),...s},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 kw=(e,t)=>`${e} / ${t}`;function Aw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:i=kw,pageWidth:s,pageHeight:l,margin:u,className:c,style:d}){const{t:m}=xe.useTranslation(),p=o.useRef(null),f=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,h]=o.useState(null),[_,g]=o.useState(!1);o.useEffect(()=>{const L=p.current;if(!L)return;const M=()=>g(L.scrollWidth>L.clientWidth+1);if(M(),typeof ResizeObserver>"u")return;const $=new ResizeObserver(M);return $.observe(L),()=>$.disconnect()},[C]);const A=e.map(L=>`${L.id}\0${L.section??""}\0${L.group??""}`).join(""),y=C&&C.shape===A?C.pages:null,[k,x]=o.useState(0);o.useEffect(()=>{const L=v.current;if(!L||typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>x(L.offsetHeight));return M.observe(L),()=>M.disconnect()},[]);const[w,B]=o.useState(0);o.useEffect(()=>{const L=f.current;if(!L||typeof ResizeObserver>"u")return;let M=null;const $=typeof requestAnimationFrame=="function"?z=>requestAnimationFrame(z):z=>setTimeout(z,16),Y=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:z=>clearTimeout(z),q=new ResizeObserver(()=>{M==null&&(M=$(()=>{M=null,B(z=>z+1)}))});return Array.from(L.children).forEach(z=>q.observe(z)),()=>{q.disconnect(),M!=null&&Y(M)}},[A]),o.useLayoutEffect(()=>{const L=f.current,M=v.current;if(!L||!M)return;const $=S=>S.getBoundingClientRect().height||S.offsetHeight,Y=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{Y.set(S.dataset.chromeSection??"",$(S))});const q=S=>$(M)-(Y.get(S??"")??0),z=Array.from(L.children).map(S=>$(S)),V=[];e.forEach((S,j)=>{const F=V[V.length-1],U=F?e[F[0]]:void 0;U&&S.group!=null&&U.group===S.group&&U.section===S.section?F.push(j):V.push([j])});const R=[];let H=[],W=0;const I=()=>{H.length&&R.push(H),H=[],W=0};V.forEach(S=>{const j=S.reduce((U,ae)=>U+z[ae],0),F=q(e[S[0]].section);H.length&&e[H[0]].section!==e[S[0]].section&&I(),j>F?S.forEach(U=>{H.length&&W+z[U]>F+.01&&I(),H.push(U),W+=z[U]}):(H.length&&W+j>F+.01&&I(),S.forEach(U=>H.push(U)),W+=j)}),I(),h(S=>S&&S.shape===A&&JSON.stringify(S.pages)===JSON.stringify(R)?S:{shape:A,pages:R})},[A,k,s,l,u,w]);const E=jo,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."]}),O=(L,M,$)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:$!=null&&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:i(L,M)})]})}),P=Array.from(new Set(e.map(L=>L.section??""))),G={...s?{"--report-page-w":s}:null,...l?{"--report-page-h":l}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:_e("report-doc",c),style:G,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?m("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:P.map(L=>{const M=O(1,1,L||void 0);return n.jsxs("div",{"data-chrome-section":L,children:[M.header,M.footer]},L)})}),n.jsx("div",{ref:f,className:"report-doc__measure-blocks",children:e.map(L=>n.jsx("div",{children:L.content},L.id))})]}),y&&n.jsx("div",{className:"report-doc__pages",children:y.map((L,M)=>{const{header:$,footer:Y}=O(M+1,y.length,e[L[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[$,L.map(q=>n.jsx("div",{children:e[q].content},e[q].id)),Y]},M)})})]})}function Nw({title:e,fields:t,columns:a=4,className:r,style:i}){return n.jsxs("div",{className:_e("report-info",r),style:{"--report-info-cols":String(a),...i},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((s,l)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:s.label}),n.jsx("span",{className:"report-info__value",children:s.value})]},l))})]})}const na=new Map;let Lr=null;const Ew=12;function Dw(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 $r(){const e=new Map;for(const t of na.keys()){if(!t.isConnected)continue;const a=Dw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,i)=>r.compareDocumentPosition(i)&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 i=r.getBoundingClientRect().height;i>0&&(a+=i+Ew)}}}function Sw(e){return typeof window>"u"?()=>{}:(na.set(e,(na.get(e)??0)+1),na.get(e)===1&&typeof ResizeObserver<"u"&&(Lr??(Lr=new ResizeObserver(()=>$r())),Lr.observe(e)),$r(),()=>{const t=(na.get(e)??1)-1;if(t>0){na.set(e,t),$r();return}na.delete(e),Lr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),$r()})}function Tw({title:e,message:t,actionLabel:a,onAction:r,icon:i,onClose:s,className:l=""}){const{t:u}=xe.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),m=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,f=p?.parentElement?.closest(".update-alert-stack")??p,b=f?Sw(f):null;return()=>{b?.(),m.current&&p&&p.contains(document.activeElement)&&sr(p)}},[]),n.jsxs("div",{ref:d,className:_e("update-alert",l),role:"alert",children:[s&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{m.current=!0,s()},"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:i??n.jsx(Fs,{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(me,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function jw({title:e,titleLevel:t=3,description:a,topActions:r,children:i,footerLeft:s,footerRight:l,ariaLabel:u,onClick:c,draggable:d,onDragStart:m,onDragEnd:p,className:f}){const b=t?`h${t}`:"div",v=s!=null||l!=null,C=i!=null&&i!==!1,h=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:_e("training-card",c?"training-card--clickable":"",f),onClick:c,onKeyDown:c?h: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:m,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:_=>_.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:i}),v&&n.jsxs("div",{className:"training-card__footer",children:[s!=null&&n.jsx("div",{className:"training-card__footer-left",children:s}),l!=null&&n.jsx("div",{className:"training-card__meta",children:l})]})]})}function Mw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:i,beforeSort:s,sort:l,actions:u,empty:c=!1,emptyContent:d,dragOver:m=!1,onDragOver:p,onDragLeave:f,onDrop:b,children:v,className:C}){const{t:h}=xe.useTranslation(),_=o.useId(),g=t?`h${t}`:"span",A=i!=null,y=_e("training-card-group",m&&"training-card-group--dragover",r&&"training-card-group--collapsed",A&&"training-card-group--collapsible",C);return n.jsxs("div",{className:y,onDragOver:p,onDragLeave:f,onDrop:b,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:[A&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?h("common.expandFor",{name:e}):h("common.collapseFor",{name:e}):r?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:i}),typeof e=="string"?n.jsx(g,{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}),(s!=null||l||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:k=>k.stopPropagation(),children:[s,l&&n.jsx(pn,{size:40,options:l.options,value:l.value,placeholder:l.placeholder,onChange:l.onChange,ariaLabel:typeof e=="string"&&e?h("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 Lw="speechear:saved_word_tables";function $w(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 Rw(){try{const e=localStorage.getItem(Lw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter($w):[]}catch{return[]}}function od(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 Es(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Pw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let i=2;t.has(r);i++)r=`${a.id}~${i}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Iw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:i,filterDefaultCollapsed:s,filterCollapsed:l,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:m,items:p,onSaveComplete:f,onLoad:b,onRemoveItem:v,onReset:C,resetLabel:h,saveButtonLabel:_,secondarySaveButtonLabel:g,onReorder:A,showCellCount:y,onAddItem:k,className:x,renderSavePopup:w,renderWordSearch:B,hideControls:E,saveOnly:D,tableName:N,nameValue:O,onNameChange:P,descriptionValue:G,onDescriptionChange:L,namePlaceholder:M,descriptionPlaceholder:$,existingNames:Y,editingName:q,onCancel:z,initialItemsPerPage:V,renderCellAction:R,actionsLeftExtra:H}){const{t:W}=xe.useTranslation(),I=h??W("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),S=p===void 0,j=!!P,[F,U]=o.useState([]),ae=(O??"").trim(),te=ae||(M??"").trim(),le=(G??"").trim()||($??"").trim(),K=(Y??[]).map(ne=>ne.trim().toLowerCase()),re=[q?.trim().toLowerCase(),...F].filter(ne=>!!ne),ke=[...K];for(const ne of re){const be=ke.indexOf(ne);be!==-1&&ke.splice(be,1)}const Z=ae!==""&&ke.includes(ae.toLowerCase()),[Q,he]=o.useState(Array(4).fill(null)),[De,ye]=o.useState(4),[de,ie]=o.useState(null),ge=Q.slice(0,De),fe=!!d?.show,[ue,Me]=o.useState(!0),[ze,je]=o.useState(!0),Oe=d&&{...d,top:ue,bottom:ze},[We,mt]=o.useState("landscape"),[ct,rt]=o.useState(["image","word","standardPron"]),[ft,Ae]=o.useState("show"),[qe,we]=o.useState(!0),[Ue,Be]=o.useState(!0),Le=o.useRef(null),Se=o.useRef([]),[Je,Qe]=o.useState(V==="all"?Number.POSITIVE_INFINITY:V??8),[dt,ht]=o.useState("right"),[wt,Ct]=o.useState(!1),[Nt,gt]=o.useState(!1),{toastMessage:it,toastType:Ye,showWarning:oe,clearToast:Ne}=Rl("warning"),Ve=o.useCallback(()=>ie(null),[ie]);k&&!S&&!y&&St("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.');const[nt,Ie]=o.useState(()=>Math.max(p?.length??1,1)),Ge=S?De:y?Math.max(nt,p?.length??1,1):Math.max(p?.length??0,1),{width:bt,height:Re}=ga[We],tt=!S&&!y,xt=p?.length??0,Lt=Math.min(Je,Math.max(xt,1)),et=tt?Lt:Ge,ot=tt?qu(p??[],et):null,lt=!!ot&&ot.length>1,st=S?ge.some(ne=>ne!==null&&ne.length>1):(p??[]).some(ne=>(ne.words??[]).length>1),jt=N?.trim()||`${Fi(La())} ${st?W("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):W("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Wt=o.useCallback(()=>lt?Se.current.filter(ne=>ne!==null):Le.current?[Le.current]:[],[lt]),{print:mn,openNewWindow:hn,downloadHtml:jn}=ss({getElements:Wt,paperW:bt,paperH:Re,fileName:jt,onPopupBlocked:()=>{oe(W("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."))}}),zn=ne=>{ye(ne),he(be=>be.length>=ne?be:[...be,...Array(ne-be.length).fill(null)]),ie(null)},Wn=ne=>{he(be=>{const $e=[...be];return $e[ne]=null,$e}),de===ne&&ie(null)},It=ne=>{if(de===null)return;const be=de;he(He=>{const ut=[...He];return ut[be]=ne.length>0?ne:null,ut});const $e=ge.findIndex((He,ut)=>ut>be&&He===null);ie($e!==-1?$e:null)},vn=S?ge.some(ne=>ne?.some(be=>!!be.colloquialPronunciation)):(p??[]).some(ne=>(ne.words??[]).some(be=>!!be.colloquialLabel)),Ft=o.useMemo(()=>sa()?S?Q.slice(0,De).flatMap(ne=>(ne??[]).map(be=>[be.word,be.homonum])):(p??[]).flatMap(ne=>(ne.words??[]).map(be=>[be.label,be.homonum])):[],[S,Q,De,p]),[Ht,Mn]=o.useState(!1);o.useEffect(()=>{if(Ft.length===0)return;let ne=!1;return Promise.all(Ft.map(([be,$e])=>Ni(be,$e))).then(be=>{ne||Mn(be.some(Boolean))},()=>{}),()=>{ne=!0}},[Ft]);const on=Ft.length>0&&Ht,xn=o.useMemo(()=>[...S||y?[{label:W("wordTable.filter.columns","\uCE78 \uC218"),items:nx.map(ne=>({value:`${ne}\uCE78`,displayLabel:W("wordTable.filter.column",{count:ne})})),display:"segmented"}]:[],...tt&&(p?.length??0)>0?[lc(W,{hasPairs:st,itemCount:xt})]:[],...lt?[ax(W)]:[]],[W,S,y,tt,p?.length,st,xt,lt]),Hn={...S||y?{[W("wordTable.filter.columns","\uCE78 \uC218")]:`${Ge}\uCE78`}:{},...tt&&(p?.length??0)>0?{[W(st?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Lt}\uAC1C`}:{},...lt?{[W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:dt}:{}},_n=(ne,be)=>{be===W("wordTable.filter.columns","\uCE78 \uC218")?S?zn(parseInt(ne)):Ie(parseInt(ne)):be===W(st?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Qe(uc(parseInt(ne),xt)):be===W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&ht(cc(ne))},Vt=S?Pw(ge.filter(ne=>ne!==null&&ne.length>0).map(ne=>({id:Es(ne),words:ne.map(od)}))):p??[],$t=()=>{S&&he(ne=>ne.length>De?ne.slice(0,De):ne)},qt=(ne=!1)=>{if(gt(ne),j&&f){const be=te.trim().toLowerCase();be&&U($e=>$e.includes(be)?$e:[...$e,be]),f(te,Vt,le||void 0,ne),$t();return}if(D&&f){f("",Vt,void 0,ne),$t();return}if(f){Ct(!0);return}jn()},[fn,Ot]=o.useState(!1),[sn,Dt]=o.useState(""),se=sn.trim(),ve=se!==""&&K.includes(se.toLowerCase()),Te=()=>{Dt(te?W("wordTable.save.copyName",{name:te,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ot(!0)},Ke=()=>{!se||ve||!f||(f(se,Vt,le||void 0,!0),$t(),Ot(!1))},Fe=Vt.length===0,Ze=Fe||j&&(te===""||Z),J=()=>{if(Fe){oe(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(j&&te===""){oe(W("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}j&&Z&&oe(W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},pe=n.jsx(ba,{items:Vt,orientation:We,contentTypes:ct,cutLine:ft,showOutline:qe,showDivLine:Ue,count:Ge});return n.jsxs(n.Fragment,{children:[n.jsxs(Ca,{type:"page",icon:t,title:e,disc:a,className:_e("word-table-block",x),children:[fn&&n.jsx(Fn,{size:"small",title:g??W("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ot(!1),footer:({closeWithAnimation:ne})=>n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:48,type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:ne}),n.jsx(me,{htmlType:"button",size:48,type:"bar",variant:"main",label:W("common.save","\uC800\uC7A5"),disabled:!se||ve,onClick:Ke})]}),children:n.jsx(Xn,{label:W("wordTable.save.nameLabel","\uC774\uB984"),value:sn,onChange:Dt,placeholder:W("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:Ke,error:ve?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),wt&&f&&w?.({defaultName:typeof e=="string"?e:W("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:pe,previewW:bt,previewH:Re,items:Vt,existingNames:Rw().map(ne=>ne.name),saveAsNew:Nt,onSave:(ne,be)=>{f(ne,Vt,be,Nt),$t(),Ct(!1)},onCancel:()=>Ct(!1)}),(S||k)&&de!==null&&B?.({cellIndex:de,onConfirm:S?It:ne=>{if(k){const be=ne[0];if(be){const $e=new Set((p??[]).map(ut=>ut.id));let He=Es([be]);for(let ut=2;$e.has(He);ut++)He=`${Es([be])}~${ut}`;k({id:He,words:[od(be)]})}}ie(null)},onClose:Ve}),!E&&n.jsx(ns,{title:r,collapsible:i,defaultCollapsed:s,collapsed:l,onCollapsedChange:u,headerSummary:c,hasImage:on,hasColloquial:vn,contentTypes:ct,orientation:We,showOutline:qe,cutLine:ft,showDivLine:Ue,setters:{setContentTypes:rt,setOrientation:mt,setShowOutline:we,setCutLine:Ae,setShowDivLine:Be,setShowTopInfo:Me,setShowBottomInfo:je},showCutLine:(tt?et:Ge)>1,showDivLine2:st,middleSections:xn,extraSelected:Hn,onExtraSelect:_n,showPaperBands:fe,showTopInfo:ue,showBottomInfo:ze}),lt&&ot?n.jsx("div",{className:"word-table-block__pages",children:ot.map((ne,be)=>n.jsx(ba,{orientation:We,contentTypes:ct,cutLine:ft,showOutline:qe,showDivLine:Ue,count:et,items:ne,onRemoveItem:v,onReorder:A&&(($e,He)=>A($e+be*et,He+be*et)),renderCellAction:R&&(($e,He)=>R($e+be*et,He)),brand:Oe,code:m,contentRef:$e=>{Se.current[be]=$e},pageNumber:{current:be+1,total:ot.length},pageNumberPosition:dt},be))}):n.jsx(ba,{orientation:We,contentTypes:ct,cutLine:ft,showOutline:qe,showDivLine:Ue,count:Ge,items:S?void 0:p??[],editCells:S?ge:void 0,activeCell:de,onActivateCell:S||k?ie:void 0,onRemoveCell:S?Wn:void 0,onRemoveItem:S?void 0:v,onReorder:S?void 0:A,renderCellAction:S?void 0:R,brand:Oe,code:m,showFillerAdd:!!k,contentRef:Le}),!E&&!D&&(C||H!=null)&&n.jsxs("div",{className:"word-table-block__table-actions",children:[C&&n.jsx(me,{htmlType:"button",size:48,type:"bar",label:I,onClick:C}),H]}),j&&!E&&n.jsxs(Nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(Sn,{variant:"custom",label:W("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{required:!0,value:O??"",onChange:P,placeholder:M?M+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Z?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ne=>{(ne.key==="Tab"&&!ne.shiftKey||ne.key===" ")&&!(O??"").trim()&&(M??"").trim()&&(ne.preventDefault(),P?.(M??""))}})}),n.jsx(Sn,{variant:"custom",label:W("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{value:G??"",onChange:L,placeholder:$?$+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ne=>{(ne.key==="Tab"&&!ne.shiftKey||ne.key===" ")&&!(G??"").trim()&&($??"").trim()&&(ne.preventDefault(),L?.($??""))}})})]})]}),!E&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!D&&b&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:W("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:b}),!D&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:W("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:hn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[z&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:z}),!D&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:W("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:mn}),g&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:g,onClick:()=>j?Te():qt(!0),disabled:Fe,onDisabledClick:()=>{oe(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_??W("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>qt(!1),disabled:Ze,onDisabledClick:J})]})]}),n.jsx(ha,{message:it,type:Ye,onClose:Ne})]})}function sd({items:e,className:t}){const a=e.length,r=a<=3?1:2,i=Math.ceil(a/r)||1,s=r*i;return n.jsx("div",{className:_e("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:Array.from({length:s},(l,u)=>{const c=e[u];return c?n.jsx("div",{className:"word-table-thumb__cell",children:(c.words?.length?c.words:[{label:c.id}]).map((d,m)=>n.jsxs(o.Fragment,{children:[m>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:d.label})]},m))},u):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},u)})})}function Fw({items:e,name:t,description:a,createdAt:r,code:i,published:s,publishedLabel:l,shared:u,sharedLabel:c,isNew:d,publisherName:m,publishedAt:p,likeCount:f,downloadCount:b,onPublisherClick:v,selected:C,onClick:h,onMore:_,titleNode:g,className:A}){const{t:y}=xe.useTranslation(),k=g!=null,x=m!=null||p!=null||f!=null||b!=null,w=B=>{B.target===B.currentTarget&&!k&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),h?.())};return n.jsxs("div",{className:_e("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",A),role:"button",tabIndex:0,"aria-label":i?`${t} (${i})`:t,onClick:k?void 0:h,onKeyDown:w,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":y("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(sd,{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})]}),_&&!k&&n.jsx(me,{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(),_(B)}})]}),(i||r||s||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?Ii(r,y):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(s||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[s&&n.jsx(At,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:l??y("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(At,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??y("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),i&&n.jsx("span",{className:"word-table-button__code caption-1",children:i})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[m&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":y("wordTable.publisherFilter",{name:m,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),v()},children:m}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:m})),p&&n.jsx("span",{className:"training-card__date body-4",children:Ii(p,y)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[f!=null&&n.jsx(At,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(f),"aria-label":y("common.likeCount",{count:f,defaultValue:`\uC88B\uC544\uC694 ${f}`})}),b!=null&&n.jsx(At,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":y("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1070
1070
  * @license lucide-react v1.38.0 - ISC
1071
1071
  *
1072
1072
  * This source code is licensed under the ISC license.
1073
1073
  * See the LICENSE file in the root directory of this source tree.
1074
- */const zw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ww=ee("image",zw);/**
1074
+ */const Ow=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],zw=ee("image",Ow);/**
1075
1075
  * @license lucide-react v1.38.0 - ISC
1076
1076
  *
1077
1077
  * This source code is licensed under the ISC license.
1078
1078
  * See the LICENSE file in the root directory of this source tree.
1079
- */const Hw=[["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"}]],Vw=ee("circle-x",Hw);function qw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ds({icon:e,label:t,state:a,pct:r,subText:i}){const{t:s}=xe.useTranslation(),l=a==="done",u=a==="pending",c=a==="error",d=l?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${l?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:l?n.jsx(Hs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Vw,{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}),l?n.jsx(At,{variant:"sub",fill:"soft",size:"small",label:s("common.done","\uC644\uB8CC")}):c?n.jsx(At,{variant:"danger",fill:"soft",size:"small",label:s("common.failed","\uC2E4\uD328")}):(i||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[i,i&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${l?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||l||c?`${c?100:d}%`:void 0}})})]})]})}function Uw({title:e,progress:t,onDone:a,onRetry:r,onClose:i,inline:s}){const{t:l}=xe.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:m,imageDone:p,imageTotal:f,pairPercent:b}=t,v=qw(u),C=u==="done",h=!!c;function _(w){return h&&v===w?"error":v>w?"done":v===w?"active":"pending"}const g=_(1),A=_(2),y=_(3),k=u==="image-match"&&f?Math.round((p??0)/f*100):void 0,x=o.useMemo(()=>{if(A!=="done"){if(u==="image-list")return l("wordData.checkingPage",{page:m??1});if(u==="image-match"&&f)return l("wordData.imageCount",{done:uo(p),total:uo(f)})}},[A,u,m,f,p,l]);return n.jsx(Fn,{inline:s,className:"popup--word-data-update",title:e,footer:h&&r?n.jsx(pe,{htmlType:"button",size:56,variant:"main",onClick:r,children:l("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):h?n.jsx(pe,{htmlType:"button",size:56,variant:"main",onClick:i??a,children:l("common.close","\uB2EB\uAE30")}):n.jsx(pe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:l("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ds,{icon:n.jsx(Is,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?l("wordData.downloadingCount",{n:uo(d),count:d}):void 0}),n.jsx(Ds,{icon:n.jsx(Ww,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:A,pct:k,subText:x}),n.jsx(Ds,{icon:n.jsx(zs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:y,pct:y==="active"?b??0:void 0,subText:void 0})]})})}function Gw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=xe.useTranslation(),[r,i]=o.useState(null),[s,l]=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}]}),l(v),i(b)},c=o.useCallback(()=>{i(null),l(null)},[]),d=o.useCallback(()=>u("noise"),[]),m=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),f=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:m,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:f,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&s?t?.({score:s.score,contextsLength:s.contextsLength,results:s.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=v2,exports.ActionCard=$y,exports.Alert=cv,exports.AppHeader=A2,exports.AudioMeter=qo,exports.AudioPlayer=fs,exports.Avatar=gv,exports.Badge=At,exports.BarChart=l4,exports.BarChartControls=wu,exports.Board=$v,exports.BottomNav=Ol,exports.BrandIdentity=ql,exports.BrandLogo=t4,exports.Breadcrumb=vv,exports.BulkBar=Kv,exports.Button=pe,exports.CORE_VERSION=ky,exports.Calendar=D4,exports.CardStep=Yc,exports.ChartLegend=Po,exports.ChartSection=Io,exports.ChartTotal=Ka,exports.Checkbox=gu,exports.ChoiceChips=Px,exports.CircleBadge=sv,exports.CodeBox=Uv,exports.ColorPicker=kv,exports.CompanyMeta=zv,exports.ConfirmPopup=nd,exports.ConfirmStep=Uc,exports.ConfirmWithTextStep=Gc,exports.ContrastFilterPanel=hw,exports.CoreScope=Ry,exports.CountTile=Tv,exports.CouponInputPopup=gw,exports.DEFAULT_NOISE_SETTINGS=Qn,exports.DatePicker=e4,exports.DebugResultLauncher=Gw,exports.DescriptionTooltip=Kn,exports.DeviceSideTable=A4,exports.Dialog=Lv,exports.Divider=iv,exports.Dropdown=pn,exports.EffectPartyPopper=As,exports.EffectPartyPopperHost=vw,exports.EmptyState=My,exports.ErrorState=Ly,exports.FILTER_ALL_VALUE=dn,exports.FileUpload=yv,exports.FilterPanel=Dn,exports.FilterSectionInfo=Ha,exports.Footer=Ix,exports.GameIntro=d4,exports.Header=Ul,exports.Icon=at,exports.IconGridMenu=Rx,exports.IconRenderer=at,exports.InfoTooltip=Bn,exports.ItemActions=Zv,exports.LEVEL_MAX=va,exports.LINE_CHART_HOVER_DELAY_MS=Bu,exports.LandingBottomSticky=Ox,exports.LandingHeader=Fx,exports.LineChart=c4,exports.ListPopup=fw,exports.ListenStep=qc,exports.Loader=Ga,exports.MARKS=vr,exports.MARK_ICON=Wu,exports.MARK_VARIANT=Hu,exports.MediaQueryOverrideContext=Zi,exports.MenuTooltip=Oa,exports.NOISE_RATIO_MAX=Za,exports.NOISE_RATIO_STEP=gc,exports.NoisePlayerContext=ds,exports.NoiseSettingsTooltip=Pc,exports.NoticeBox=Iy,exports.OrderListStep=Kc,exports.PASS_CARD_BG_VARS=Zn,exports.POS_LABEL=Uu,exports.PROMO_BANNER_BG_COMPONENTS=El,exports.PROMO_BANNER_BG_OPTIONS=qy,exports.PROMO_BANNER_BG_VARS=Ra,exports.Page=Dr,exports.PageTitle=xw,exports.Pagination=hr,exports.Panel=Nr,exports.PanelGrid=E_,exports.PanelRow=Sn,exports.PanelRowDevice=N_,exports.PassCard=nu,exports.PassCardBg=nv,exports.PassCardBgIHAB=av,exports.PassCardBgLeftColorGrid=rv,exports.PassCardBgTwoCircle=Xl,exports.PaymentPlan=tv,exports.PersonCard=Rv,exports.PhonemeFilterPanel=mw,exports.PhonemeSelectBlock=dw,exports.Popup=Fn,exports.ProgressBar=b4,exports.ProgressIndicator=Mu,exports.PromoBanner=g2,exports.PromoBannerBgDark=ml,exports.PromoBannerBgDeep=il,exports.PromoBannerBgDiagonal=gl,exports.PromoBannerBgDots=yl,exports.PromoBannerBgInstagram=Nl,exports.PromoBannerBgMain=tl,exports.PromoBannerBgNaver=kl,exports.PromoBannerBgOutline=xl,exports.PromoBannerBgRadial=fl,exports.PromoBannerBgSoft=al,exports.PromoBannerBgSoftSub=ul,exports.PromoBannerBgSub=ol,exports.PromoBannerBgSuccess=wl,exports.PromoBannerBgWarm=dl,exports.PublicationCard=Iv,exports.Radio=su,exports.RadioGroup=lv,exports.Rating=_v,exports.ReportDocument=Nw,exports.ReportInfoPanel=Ew,exports.RingChart=m4,exports.SENTENCE_TRAINING_TYPES=is,exports.SearchSummary=mv,exports.Section=Ca,exports.SectionHeadFloat=yu,exports.SectionHeader=Ov,exports.SegmentedControl=gn,exports.ShortcutBadge=ou,exports.SideNav=Vl,exports.Slider=Du,exports.SoundCompass=ov,exports.SplashLogo=Fv,exports.StatChart=h4,exports.SummaryStrip=kw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=lu,exports.Table=Go,exports.TableFilterPanel=ns,exports.Tabs=hv,exports.TextBoxTooltip=Ar,exports.TextField=Xn,exports.Timeline=Pv,exports.Toast=ha,exports.Toggle=Cu,exports.Toolbar=Ro,exports.Tooltip=cn,exports.TooltipInfo=Bn,exports.TooltipTextBox=Ar,exports.TopBanner=b2,exports.TrainingBlock=T4,exports.TrainingBlockButton=Mo,exports.TrainingBlockGrid=M4,exports.TrainingCard=Mw,exports.TrainingCardGroup=Lw,exports.TrainingPagePopup=On,exports.TrainingPagePopupBottom=Ic,exports.TrainingPagePopupTitle=Fc,exports.TrainingResultPopup=Qc,exports.TrainingStep=ea,exports.TrainingStepAudioPlayer=fs,exports.TrainingStepBullet=Dc,exports.TrainingStepCard=Mc,exports.TrainingStepConfirm=gs,exports.TrainingStepConfirmWithText=bs,exports.TrainingStepListen=ys,exports.TrainingStepOrderList=vs,exports.TrainingStepTextBox=jc,exports.TrainingStepTitle=Tc,exports.TrainingTooltip=uu,exports.TrainingWordCard=Xo,exports.UpdateAlert=jw,exports.WAVE_A_MAX=e_,exports.WAVE_H1_PX=ms,exports.WAVE_HMAX_PX=Qx,exports.WORD_LABEL_I18N_KEYS=H4,exports.WORD_TABLE_PAPER=ga,exports.WORD_TYPE_LABEL=Gu,exports.WordDataProvider=Bw,exports.WordDataUpdatePopup=Uw,exports.WordImageTooltip=td,exports.WordSearchFilterPanel=pw,exports.WordSearchResultBlock=uw,exports.WordTable=ba,exports.WordTableBlock=Fw,exports.WordTableButton=Ow,exports.WordTablePopup=lx,exports.WordTableThumbnail=sd,exports.buildMonthChartData=a4,exports.cellKey=Cx,exports.cellLabel=fx,exports.cellsForLabels=Ex,exports.clearPassCardBgTheme=Nn,exports.clearPromoBannerBgTheme=Kt,exports.closeTrainingPopup=M_,exports.companyTypeLabel=_w,exports.createTrainingScenario=R_,exports.cx=_e,exports.deriveNoiseContexts=W_,exports.derivePassCard=Kl,exports.draftValues=Lx,exports.effectiveNoiseVolume=us,exports.effectiveSpeechVolume=yc,exports.expandSlashLabel=ts,exports.formatDuration=Dx,exports.getControlDateRange=p4,exports.getPayloadTimestamp=_s,exports.getPromoBannerBgTheme=vo,exports.getSelectedFromPayload=I_,exports.getSelectedText=F_,exports.getStepPayload=Hc,exports.getSteppedPayload=O_,exports.injectPassCardBgTheme=An,exports.injectPromoBannerBgTheme=Gt,exports.isSelectionCorrect=z_,exports.labelOfCellKey=fc,exports.labelsForSave=hx,exports.levelToPct=Wx,exports.markAfterClick=zu,exports.marksForSave=Jo,exports.mergeNoiseSettings=Jn,exports.missesByType=Bx,exports.monthKeyOf=Ya,exports.monthKeyOfDate=Fo,exports.nextFocus=vx,exports.nextMisses=wx,exports.noiseElementVolume=cs,exports.noiseRatioOf=Xa,exports.pageStartIndexes=Vu,exports.parseMonthKey=ma,exports.passCardBgIhabTheme=au,exports.passCardBgLeftColorGridTheme=ru,exports.passCardBgTwoCircleTheme=Zl,exports.pctToLevel=Hx,exports.posLabels=Ku,exports.printWordTable=F4,exports.promoBannerBgDarkTheme=pl,exports.promoBannerBgDeepTheme=sl,exports.promoBannerBgDiagonalTheme=Cl,exports.promoBannerBgDotsTheme=bl,exports.promoBannerBgInstagramTheme=Al,exports.promoBannerBgMainTheme=el,exports.promoBannerBgNaverTheme=Bl,exports.promoBannerBgOutlineTheme=vl,exports.promoBannerBgRadialTheme=hl,exports.promoBannerBgSoftSubTheme=ll,exports.promoBannerBgSoftTheme=nl,exports.promoBannerBgSubTheme=rl,exports.promoBannerBgSuccessTheme=_l,exports.promoBannerBgWarmTheme=cl,exports.recommendTables=Ax,exports.regenerateUnpinned=Mx,exports.removeItem=jx,exports.resolveTrainingItems=$_,exports.resolveTrainingPopupMeta=zc,exports.reviewCells=cx,exports.reviewMeta=mx,exports.reviewSetPlan=kx,exports.reviewTableName=px,exports.scoreKey=yr,exports.scoreSheetHeader=gx,exports.shouldConfirmDiscard=I4,exports.splitTrainingVariants=L_,exports.summarize=P4,exports.summarizeMisses=_x,exports.tableTrends=yx,exports.toDraft=Sx,exports.toTrainingText=P_,exports.togglePin=Tx,exports.uncoveredLabels=Nx,exports.useAnchoredMenu=Fa,exports.useBarChartControl=_u,exports.useCalendarMonth=bu,exports.useComboboxSuggestions=hu,exports.useDiscardGuard=Cw,exports.useFitScale=Xu,exports.useNoisePlayer=_r,exports.useSoundCompassExam=u2,exports.useToastLifecycle=Tu,exports.useWordData=ww,exports.useWordTableDisplaySettings=mc,exports.useWordTablePrint=ss,exports.waveBarPx=Br,exports.waveBarVal=kr,exports.weakItems=bx,exports.weekValueOf=Oo,exports.withStepTimes=Wc,exports.wordTypeLabels=Yu;
1079
+ */const Ww=[["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"}]],Hw=ee("circle-x",Ww);function Vw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ds({icon:e,label:t,state:a,pct:r,subText:i}){const{t:s}=xe.useTranslation(),l=a==="done",u=a==="pending",c=a==="error",d=l?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${l?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:l?n.jsx(Hs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Hw,{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}),l?n.jsx(At,{variant:"sub",fill:"soft",size:"small",label:s("common.done","\uC644\uB8CC")}):c?n.jsx(At,{variant:"danger",fill:"soft",size:"small",label:s("common.failed","\uC2E4\uD328")}):(i||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[i,i&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${l?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||l||c?`${c?100:d}%`:void 0}})})]})]})}function qw({title:e,progress:t,onDone:a,onRetry:r,onClose:i,inline:s}){const{t:l}=xe.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:m,imageDone:p,imageTotal:f,pairPercent:b}=t,v=Vw(u),C=u==="done",h=!!c;function _(w){return h&&v===w?"error":v>w?"done":v===w?"active":"pending"}const g=_(1),A=_(2),y=_(3),k=u==="image-match"&&f?Math.round((p??0)/f*100):void 0,x=o.useMemo(()=>{if(A!=="done"){if(u==="image-list")return l("wordData.checkingPage",{page:m??1});if(u==="image-match"&&f)return l("wordData.imageCount",{done:uo(p),total:uo(f)})}},[A,u,m,f,p,l]);return n.jsx(Fn,{inline:s,className:"popup--word-data-update",title:e,footer:h&&r?n.jsx(me,{htmlType:"button",size:56,variant:"main",onClick:r,children:l("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):h?n.jsx(me,{htmlType:"button",size:56,variant:"main",onClick:i??a,children:l("common.close","\uB2EB\uAE30")}):n.jsx(me,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:l("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ds,{icon:n.jsx(Is,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?l("wordData.downloadingCount",{n:uo(d),count:d}):void 0}),n.jsx(Ds,{icon:n.jsx(zw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:A,pct:k,subText:x}),n.jsx(Ds,{icon:n.jsx(zs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:l("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:y,pct:y==="active"?b??0:void 0,subText:void 0})]})})}function Uw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=xe.useTranslation(),[r,i]=o.useState(null),[s,l]=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}]}),l(v),i(b)},c=o.useCallback(()=>{i(null),l(null)},[]),d=o.useCallback(()=>u("noise"),[]),m=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),f=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:m,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:f,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&s?t?.({score:s.score,contextsLength:s.contextsLength,results:s.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=v2,exports.ActionCard=$y,exports.Alert=cv,exports.AppHeader=A2,exports.AudioMeter=qo,exports.AudioPlayer=fs,exports.Avatar=gv,exports.Badge=At,exports.BarChart=l4,exports.BarChartControls=wu,exports.Board=$v,exports.BottomNav=Ol,exports.BrandIdentity=ql,exports.BrandLogo=t4,exports.Breadcrumb=vv,exports.BulkBar=Kv,exports.Button=me,exports.CORE_VERSION=ky,exports.Calendar=D4,exports.CardStep=Yc,exports.ChartLegend=Po,exports.ChartSection=Io,exports.ChartTotal=Ka,exports.Checkbox=gu,exports.ChoiceChips=Px,exports.CircleBadge=sv,exports.CodeBox=Uv,exports.ColorPicker=kv,exports.CompanyMeta=zv,exports.ConfirmPopup=nd,exports.ConfirmStep=Uc,exports.ConfirmWithTextStep=Gc,exports.ContrastFilterPanel=mw,exports.CoreScope=Ry,exports.CountTile=Tv,exports.CouponInputPopup=Cw,exports.DEFAULT_NOISE_SETTINGS=Qn,exports.DatePicker=e4,exports.DebugResultLauncher=Uw,exports.DescriptionTooltip=Kn,exports.DeviceSideTable=A4,exports.Dialog=Lv,exports.Divider=iv,exports.Dropdown=pn,exports.EffectPartyPopper=As,exports.EffectPartyPopperHost=yw,exports.EmptyState=My,exports.ErrorState=Ly,exports.FILTER_ALL_VALUE=dn,exports.FileUpload=yv,exports.FilterPanel=Dn,exports.FilterSectionInfo=Ha,exports.Footer=Ix,exports.GameIntro=d4,exports.Header=Ul,exports.Icon=at,exports.IconGridMenu=Rx,exports.IconRenderer=at,exports.InfoTooltip=Bn,exports.ItemActions=Zv,exports.LEVEL_MAX=va,exports.LINE_CHART_HOVER_DELAY_MS=Bu,exports.LandingBottomSticky=Ox,exports.LandingHeader=Fx,exports.LineChart=c4,exports.ListPopup=hw,exports.ListenStep=qc,exports.Loader=Ga,exports.MARKS=vr,exports.MARK_ICON=Wu,exports.MARK_VARIANT=Hu,exports.MediaQueryOverrideContext=Zi,exports.MenuTooltip=Oa,exports.NOISE_RATIO_MAX=Za,exports.NOISE_RATIO_STEP=gc,exports.NoisePlayerContext=ds,exports.NoiseSettingsTooltip=Pc,exports.NoticeBox=Iy,exports.OrderListStep=Kc,exports.PASS_CARD_BG_VARS=Zn,exports.POS_LABEL=Uu,exports.PROMO_BANNER_BG_COMPONENTS=El,exports.PROMO_BANNER_BG_OPTIONS=qy,exports.PROMO_BANNER_BG_VARS=Ra,exports.Page=Dr,exports.PageTitle=vw,exports.Pagination=hr,exports.Panel=Nr,exports.PanelGrid=N_,exports.PanelRow=Sn,exports.PanelRowDevice=A_,exports.PassCard=nu,exports.PassCardBg=nv,exports.PassCardBgIHAB=av,exports.PassCardBgLeftColorGrid=rv,exports.PassCardBgTwoCircle=Xl,exports.PaymentPlan=tv,exports.PersonCard=Rv,exports.PhonemeFilterPanel=pw,exports.PhonemeSelectBlock=cw,exports.Popup=Fn,exports.ProgressBar=b4,exports.ProgressIndicator=Mu,exports.PromoBanner=g2,exports.PromoBannerBgDark=ml,exports.PromoBannerBgDeep=il,exports.PromoBannerBgDiagonal=gl,exports.PromoBannerBgDots=yl,exports.PromoBannerBgInstagram=Nl,exports.PromoBannerBgMain=tl,exports.PromoBannerBgNaver=kl,exports.PromoBannerBgOutline=xl,exports.PromoBannerBgRadial=fl,exports.PromoBannerBgSoft=al,exports.PromoBannerBgSoftSub=ul,exports.PromoBannerBgSub=ol,exports.PromoBannerBgSuccess=wl,exports.PromoBannerBgWarm=dl,exports.PublicationCard=Iv,exports.Radio=su,exports.RadioGroup=lv,exports.Rating=_v,exports.ReportDocument=Aw,exports.ReportInfoPanel=Nw,exports.RingChart=m4,exports.SENTENCE_TRAINING_TYPES=is,exports.SearchSummary=mv,exports.Section=Ca,exports.SectionHeadFloat=yu,exports.SectionHeader=Ov,exports.SegmentedControl=gn,exports.ShortcutBadge=ou,exports.SideNav=Vl,exports.Slider=Du,exports.SoundCompass=ov,exports.SplashLogo=Fv,exports.StatChart=h4,exports.SummaryStrip=Bw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=lu,exports.Table=Go,exports.TableFilterPanel=ns,exports.Tabs=hv,exports.TextBoxTooltip=Ar,exports.TextField=Xn,exports.Timeline=Pv,exports.Toast=ha,exports.Toggle=Cu,exports.Toolbar=Ro,exports.Tooltip=cn,exports.TooltipInfo=Bn,exports.TooltipTextBox=Ar,exports.TopBanner=b2,exports.TrainingBlock=T4,exports.TrainingBlockButton=Mo,exports.TrainingBlockGrid=M4,exports.TrainingCard=jw,exports.TrainingCardGroup=Mw,exports.TrainingPagePopup=On,exports.TrainingPagePopupBottom=Ic,exports.TrainingPagePopupTitle=Fc,exports.TrainingResultPopup=Qc,exports.TrainingStep=ea,exports.TrainingStepAudioPlayer=fs,exports.TrainingStepBullet=Dc,exports.TrainingStepCard=Mc,exports.TrainingStepConfirm=gs,exports.TrainingStepConfirmWithText=bs,exports.TrainingStepListen=ys,exports.TrainingStepOrderList=vs,exports.TrainingStepTextBox=jc,exports.TrainingStepTitle=Tc,exports.TrainingTooltip=uu,exports.TrainingWordCard=Xo,exports.UpdateAlert=Tw,exports.WAVE_A_MAX=e_,exports.WAVE_H1_PX=ms,exports.WAVE_HMAX_PX=Qx,exports.WORD_LABEL_I18N_KEYS=H4,exports.WORD_TABLE_PAPER=ga,exports.WORD_TYPE_LABEL=Gu,exports.WordDataProvider=ww,exports.WordDataUpdatePopup=qw,exports.WordImageTooltip=td,exports.WordSearchFilterPanel=dw,exports.WordSearchResultBlock=lw,exports.WordTable=ba,exports.WordTableBlock=Iw,exports.WordTableButton=Fw,exports.WordTablePopup=lx,exports.WordTableThumbnail=sd,exports.buildMonthChartData=a4,exports.cellKey=Cx,exports.cellLabel=fx,exports.cellsForLabels=Ex,exports.clearPassCardBgTheme=Nn,exports.clearPromoBannerBgTheme=Kt,exports.closeTrainingPopup=j_,exports.companyTypeLabel=xw,exports.createTrainingScenario=$_,exports.cx=_e,exports.deriveNoiseContexts=z_,exports.derivePassCard=Kl,exports.draftValues=Lx,exports.effectiveNoiseVolume=us,exports.effectiveSpeechVolume=yc,exports.expandSlashLabel=ts,exports.formatDuration=Dx,exports.getControlDateRange=p4,exports.getPayloadTimestamp=_s,exports.getPromoBannerBgTheme=vo,exports.getSelectedFromPayload=P_,exports.getSelectedText=I_,exports.getStepPayload=Hc,exports.getSteppedPayload=F_,exports.injectPassCardBgTheme=An,exports.injectPromoBannerBgTheme=Gt,exports.isSelectionCorrect=O_,exports.labelOfCellKey=fc,exports.labelsForSave=hx,exports.levelToPct=Wx,exports.markAfterClick=zu,exports.marksForSave=Jo,exports.mergeNoiseSettings=Jn,exports.missesByType=Bx,exports.monthKeyOf=Ya,exports.monthKeyOfDate=Fo,exports.nextFocus=vx,exports.nextMisses=wx,exports.noiseElementVolume=cs,exports.noiseRatioOf=Xa,exports.pageStartIndexes=Vu,exports.parseMonthKey=ma,exports.passCardBgIhabTheme=au,exports.passCardBgLeftColorGridTheme=ru,exports.passCardBgTwoCircleTheme=Zl,exports.pctToLevel=Hx,exports.posLabels=Ku,exports.printWordTable=F4,exports.promoBannerBgDarkTheme=pl,exports.promoBannerBgDeepTheme=sl,exports.promoBannerBgDiagonalTheme=Cl,exports.promoBannerBgDotsTheme=bl,exports.promoBannerBgInstagramTheme=Al,exports.promoBannerBgMainTheme=el,exports.promoBannerBgNaverTheme=Bl,exports.promoBannerBgOutlineTheme=vl,exports.promoBannerBgRadialTheme=hl,exports.promoBannerBgSoftSubTheme=ll,exports.promoBannerBgSoftTheme=nl,exports.promoBannerBgSubTheme=rl,exports.promoBannerBgSuccessTheme=_l,exports.promoBannerBgWarmTheme=cl,exports.recommendTables=Ax,exports.regenerateUnpinned=Mx,exports.removeItem=jx,exports.resolveTrainingItems=L_,exports.resolveTrainingPopupMeta=zc,exports.reviewCells=cx,exports.reviewMeta=mx,exports.reviewSetPlan=kx,exports.reviewTableName=px,exports.scoreKey=yr,exports.scoreSheetHeader=gx,exports.shouldConfirmDiscard=I4,exports.splitTrainingVariants=M_,exports.summarize=P4,exports.summarizeMisses=_x,exports.tableTrends=yx,exports.toDraft=Sx,exports.toTrainingText=R_,exports.togglePin=Tx,exports.uncoveredLabels=Nx,exports.useAnchoredMenu=Fa,exports.useBarChartControl=_u,exports.useCalendarMonth=bu,exports.useComboboxSuggestions=hu,exports.useDiscardGuard=fw,exports.useFitScale=Xu,exports.useNoisePlayer=_r,exports.useSoundCompassExam=u2,exports.useToastLifecycle=Tu,exports.useWordData=_w,exports.useWordTableDisplaySettings=mc,exports.useWordTablePrint=ss,exports.waveBarPx=Br,exports.waveBarVal=kr,exports.weakItems=bx,exports.weekValueOf=Oo,exports.withStepTimes=Wc,exports.wordTypeLabels=Yu;