@ihabdevteam/core 0.481.0 → 0.483.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.
- package/CHANGELOG.md +15 -0
- package/dist/components.cjs.js +15 -15
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +16 -16
- package/dist/ihabdevteam-core.d.ts +21 -11
- package/dist/packages/core/src/components/ChartSection.d.ts +3 -1
- package/dist/packages/core/src/components/ChartSection.js +1 -1
- package/dist/packages/core/src/components/PanelRow.d.ts +3 -4
- package/dist/packages/core/src/components/Popup/Popup.d.ts +4 -5
- package/dist/packages/core/src/components/Popup/Popup.js +1 -1
- package/dist/packages/core/src/components/Training/TrainingBlock.d.ts +12 -0
- package/dist/packages/core/src/components/Training/TrainingBlock.js +16 -12
- package/dist/packages/core/src/components/Training/TrainingBlockButton.css +15 -0
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
package/dist/components.cjs.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Oh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},zh=o.createContext({}),Wh=()=>o.useContext(zh),Hh=o.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:a,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:f=""}=Wh()??{},v=a??d?Number(r??h)*24/Number(t??p):r??h;return o.createElement("svg",{ref:c,...yo,width:t??p??yo.width,height:t??p??yo.height,stroke:e??m,strokeWidth:v,className:kl("lucide",f,s),...!l&&!Oh(u)&&{"aria-hidden":"true"},...u},[...i.map(([
|
|
31
|
+
*/const Oh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},zh=o.createContext({}),Wh=()=>o.useContext(zh),Hh=o.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:a,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:f=""}=Wh()??{},v=a??d?Number(r??h)*24/Number(t??p):r??h;return o.createElement("svg",{ref:c,...yo,width:t??p??yo.width,height:t??p??yo.height,stroke:e??m,strokeWidth:v,className:kl("lucide",f,s),...!l&&!Oh(u)&&{"aria-hidden":"true"},...u},[...i.map(([b,_])=>o.createElement(b,_)),...Array.isArray(l)?l:[l]])});/**
|
|
32
32
|
* @license lucide-react v1.38.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
@@ -814,8 +814,8 @@
|
|
|
814
814
|
* This source code is licensed under the ISC license.
|
|
815
815
|
* See the LICENSE file in the root directory of this source tree.
|
|
816
816
|
*/const fg=[["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"}]],Cg=oe("thumbs-up",fg),xo={"alert-triangle":Nl,"align-start-vertical":Uh,anchor:SC,armchair:MC,"arrow-down":Kh,"arrow-up":Zh,"arrow-left":Jh,"arrow-right":em,"arrow-right-left":nm,"audio-lines":am,ban:sm,bell:im,"book-marked":cm,"book-open":pm,"bow-arrow":mm,braces:Cm,bug:bm,calendar:Il,"calendar-check":vm,"calendar-days":_m,camera:Bm,car:RC,"chart-column":Am,"chart-line":Em,"chart-pie":Dm,check:El,"chevron-down":Ol,"chevron-left":jl,"chevron-right":Dl,"chevron-up":zl,circle:ig,"clipboard-list":Lm,coffee:FC,combine:Pm,copy:Im,"chevrons-left-right-ellipsis":zm,"credit-card":Hm,database:Sl,diff:Um,download:Tl,ear:Ym,edit:Xm,"edit-2":Qm,"edit-3":t0,ellipsis:Ml,eraser:a0,"external-link":s0,eye:i0,"eye-off":c0,"file-text":p0,"flip-horizontal":m0,folder:C0,"folder-open":b0,"folder-plus":v0,"folder-tree":_0,gamepad:B0,"gamepad-2":OC,clock:WC,lock:mf,"search-x":b1,"share-2":B1,tag:K1,target:VC,percent:UC,gavel:A0,"git-merge":$l,globe:j0,"grip-vertical":S0,headphones:M0,heart:L0,home:P0,inbox:KC,info:I0,"key-round":z0,landmark:H0,layers:q0,"layout-dashboard":G0,leaf:Y0,lightbulb:X0,link:Q0,"link-2":tf,"link-2-off":rf,list:of,"list-checks":lf,"list-ordered":cf,loader:pf,"log-out":Cf,mail:bf,"map-pin":vf,menu:pg,"message-circle":_f,"message-circle-question-mark":Bf,"message-square":Af,"message-square-more":ZC,"message-square-text":Ef,minus:JC,"minus-circle":Df,moon:mg,"more-horizontal":Ml,package:Tf,"party-popper":$f,pause:Rf,pencil:Ff,phone:Of,play:Wf,"play-circle":Vf,plus:Uf,printer:Kf,"refresh-cw":Zf,repeat:Jf,replace:e1,rocket:n1,"rotate-ccw":a1,"rotate-cw":s1,salad:i1,"scan-search":c1,search:m1,"circle-alert":Ll,"alert-circle":Ll,"check-circle":Rl,scissors:C1,send:v1,settings:_1,"shield-check":A1,"shopping-cart":E1,shuffle:D1,"skip-back":T1,"skip-forward":$1,sparkles:eg,square:R1,star:F1,store:O1,"sun-medium":W1,table:V1,"table-2":U1,terminal:Z1,"text-cursor-input":J1,"text-initial":eC,"thumbs-up":Cg,ticket:nC,trash:sC,triangle:cg,"trash-2":aC,"trending-up":iC,"triangle-alert":Nl,trophy:cC,type:ng,unlink:pC,upload:mC,user:vo,"user-plus":gC,"user-round":yC,"user-round-check":xC,users:wC,"users-round":kC,volume:ag,"volume-2":Pl,wrench:EC,x:Fl};Object.freeze(Object.keys(xo));function gg(e){return xo[e]??null}const Wl=new Set;function bg(e){return Yn&&!(e in xo)&&!Wl.has(e)&&(Wl.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 yg=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 vg(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(t))return null;const r=(e.split("/").pop()||"").replace(/\.svg$/,"");return r?yg(r):null}const Hl=new Map;function xg(e){const t=typeof e=="string"?vg(e):null,r=t?gg(t)??Hl.get(t)??null:null,[a,s]=o.useState(null);return o.useEffect(()=>{if(!t||r)return;let l=!1;return bg(t).then(i=>{Hl.set(t,i),l||s(i)}),()=>{l=!0}},[t,r]),r??a}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Vl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function _g(e){if(Array.isArray(e))return e}function wg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,l,i,u=[],c=!0,p=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(c=(a=l.call(r)).done)&&(u.push(a.value),u.length!==t);c=!0);}catch(h){p=!0,s=h}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(p)throw s}}return u}}function Bg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
817
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kg(e,t){return _g(e)||wg(e,t)||Ag(e,t)||Bg()}function Ag(e,t){if(e){if(typeof e=="string")return Vl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vl(e,t):void 0}}const ql=Object.entries,Ul=Object.setPrototypeOf,Ng=Object.isFrozen,Eg=Object.getPrototypeOf,jg=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Zt=Object.seal,xr=Object.create,Gl=typeof Reflect<"u"&&Reflect,_o=Gl.apply,wo=Gl.construct;Kt||(Kt=function(t){return t}),Zt||(Zt=function(t){return t}),_o||(_o=function(t,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(r,s)}),wo||(wo=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new t(...a)});const or=Ut(Array.prototype.forEach),Dg=Ut(Array.prototype.lastIndexOf),Kl=Ut(Array.prototype.pop),Wr=Ut(Array.prototype.push),Sg=Ut(Array.prototype.splice),_r=Array.isArray,Hr=Ut(String.prototype.toLowerCase),Bo=Ut(String.prototype.toString),Yl=Ut(String.prototype.match),Vr=Ut(String.prototype.replace),Zl=Ut(String.prototype.indexOf),Tg=Ut(String.prototype.trim),Mg=Ut(Number.prototype.toString),$g=Ut(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:Ut(BigInt.prototype.toString),Jl=typeof Symbol>"u"?null:Ut(Symbol.prototype.toString),hn=Ut(Object.prototype.hasOwnProperty),qr=Ut(Object.prototype.toString),nn=Ut(RegExp.prototype.test),sr=Lg(TypeError);function Ut(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return _o(e,t,a)}}function Lg(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return wo(e,r)}}function vt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hr;if(Ul&&Ul(e,null),!_r(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=r(s);l!==s&&(Ng(t)||(t[a]=l),s=l)}e[s]=!0}return e}function Rg(e){for(let t=0;t<e.length;t++)hn(e,t)||(e[t]=null);return e}function yn(e){const t=xr(null);for(const a of ql(e)){var r=kg(a,2);const s=r[0],l=r[1];hn(e,s)&&(_r(l)?t[s]=Rg(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=yn(l):t[s]=l)}return t}function Pg(e){switch(typeof e){case"string":return e;case"number":return Mg(e);case"boolean":return $g(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Jl?Jl(e):"Symbol()";case"undefined":return qr(e);case"function":case"object":{if(e===null)return qr(e);const t=e,r=Dn(t,"toString");if(typeof r=="function"){const a=r(t);return typeof a=="string"?a:qr(a)}return qr(e)}default:return qr(e)}}function Dn(e,t){for(;e!==null;){const a=jg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=Eg(e)}function r(){return null}return r}function Fg(e){try{return nn(e,""),!0}catch{return!1}}const Ql=Kt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ko=Kt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ao=Kt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ig=Kt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),No=Kt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Og=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ei=Kt(["#text"]),ti=Kt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Eo=Kt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ni=Kt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wa=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zg=Zt(/{{[\w\W]*|^[\w\W]*}}/g),Wg=Zt(/<%[\w\W]*|^[\w\W]*%>/g),Hg=Zt(/\${[\w\W]*/g),Vg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),qg=Zt(/^aria-[\-\w]+$/),ri=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ug=Zt(/^(?:\w+script|data):/i),Gg=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kg=Zt(/^html$/i),Yg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i),ai=Zt(/<[/\w!]/g),oi=Zt(/<[/\w]/g),Zg=Zt(/<\/no(script|embed|frames)/i),Xg=Zt(/\/>/i),vn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},si=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Jg=Kt(vt({},si)),Qg=(function(){const e={};return or(si,t=>{e[t]=Zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),eb=function(){return typeof window>"u"?null:window},tb=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},li=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Zn=function(t,r,a,s){return hn(t,r)&&_r(t[r])?vt(s.base?yn(s.base):{},t[r],s.transform):a},jo=function(t,r,a){const s=hn(t,r)?t[r]:void 0;return s&&typeof s=="object"?yn(s):a()};function ii(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eb();const t=ve=>ii(ve);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==vn.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,f=Dn(m,"cloneNode"),v=Dn(m,"remove"),y=Dn(m,"nextSibling"),x=Dn(m,"childNodes"),b=Dn(m,"parentNode"),_=Dn(m,"shadowRoot"),g=Dn(m,"attributes"),w=i&&i.prototype?Dn(i.prototype,"nodeType"):null,N=i&&i.prototype?Dn(i.prototype,"nodeName"):null,C=i&&i.prototype?Dn(i.prototype,"ownerDocument"):null,B=function(S){return w?w(S):S.nodeType},k=function(S){return N?N(S):S.nodeName};if(typeof l=="function"){const ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let E,A="",D,j=!1,M=0;const W=function(){if(M>0)throw sr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(S){W(),M++;try{return E.createHTML(S)}finally{M--}},G=function(S){W(),M++;try{return E.createScriptURL(S)}finally{M--}},T=function(){return j||(D=tb(d,s),j=!0),D},I=r,O=I.implementation,pe=I.createNodeIterator,se=I.createDocumentFragment,$=I.getElementsByTagName,V=a.importNode;let ne=li();t.isSupported=typeof ql=="function"&&typeof b=="function"&&O&&O.createHTMLDocument!==void 0;const te=zg,P=Wg,L=Hg,R=Vg,U=qg,Z=Ug,X=Gg,ae=Yg;let Y=ri,xe=null;const ie=vt({},[...Ql,...ko,...Ao,...No,...ei]);let J=null;const F=vt({},[...ti,...Eo,...ni,...wa]);let Q=Object.seal(xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,le=null;const re=Object.seal(xr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ue=!0,Be=!0,ke=!1,Ne=!0,Re=!1,ye=!0,_e=!1,Ae=!1,Ie=null,je=null,tt=!1,Ct=!1,Oe=!1,qe=!1,nt=!0,We=!1;const Ze="user-content-";let ot=!0,gt=!1,ht={},xt=null;const ut=vt({},["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 Gt=null;const _t=vt({},["audio","video","img","source","image","track"]);let Pt=null;const Qe=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",rt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let bt=it,Nt=!1,It=null;const ft=vt({},[De,rt,it],Bo),mt=Kt(["mi","mo","mn","ms","mtext"]);let At=vt({},mt);const Et=Kt(["annotation-xml"]);let Je=vt({},Et);const wt=vt({},["title","style","font","a","script"]);let ce=null;const Se=["application/xhtml+xml","text/html"],Pe="text/html";let Ge=null,st=null;const Ot=r.createElement("form"),ct=function(S){return S instanceof RegExp||S instanceof Function},Yt=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===S)return;(!S||typeof S!="object")&&(S={}),S=yn(S),ce=Se.indexOf(S.PARSER_MEDIA_TYPE)===-1?Pe:S.PARSER_MEDIA_TYPE,Ge=ce==="application/xhtml+xml"?Bo:Hr,xe=Zn(S,"ALLOWED_TAGS",ie,{transform:Ge}),J=Zn(S,"ALLOWED_ATTR",F,{transform:Ge}),It=Zn(S,"ALLOWED_NAMESPACES",ft,{transform:Bo}),Pt=Zn(S,"ADD_URI_SAFE_ATTR",Qe,{transform:Ge,base:Qe}),Gt=Zn(S,"ADD_DATA_URI_TAGS",_t,{transform:Ge,base:_t}),xt=Zn(S,"FORBID_CONTENTS",ut,{transform:Ge}),H=Zn(S,"FORBID_TAGS",yn({}),{transform:Ge}),le=Zn(S,"FORBID_ATTR",yn({}),{transform:Ge}),ht=hn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?yn(S.USE_PROFILES):S.USE_PROFILES:!1,ue=S.ALLOW_ARIA_ATTR!==!1,Be=S.ALLOW_DATA_ATTR!==!1,ke=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=S.SAFE_FOR_TEMPLATES||!1,ye=S.SAFE_FOR_XML!==!1,_e=S.WHOLE_DOCUMENT||!1,Ct=S.RETURN_DOM||!1,Oe=S.RETURN_DOM_FRAGMENT||!1,qe=S.RETURN_TRUSTED_TYPE||!1,tt=S.FORCE_BODY||!1,nt=S.SANITIZE_DOM!==!1,We=S.SANITIZE_NAMED_PROPS||!1,ot=S.KEEP_CONTENT!==!1,gt=S.IN_PLACE||!1,Y=Fg(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:ri,bt=typeof S.NAMESPACE=="string"?S.NAMESPACE:it,At=jo(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>vt({},mt)),Je=jo(S,"HTML_INTEGRATION_POINTS",()=>vt({},Et));const ee=jo(S,"CUSTOM_ELEMENT_HANDLING",()=>xr(null));if(Q=xr(null),hn(ee,"tagNameCheck")&&ct(ee.tagNameCheck)&&(Q.tagNameCheck=ee.tagNameCheck),hn(ee,"attributeNameCheck")&&ct(ee.attributeNameCheck)&&(Q.attributeNameCheck=ee.attributeNameCheck),hn(ee,"allowCustomizedBuiltInElements")&&typeof ee.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=ee.allowCustomizedBuiltInElements),Zt(Q),Re&&(Be=!1),Oe&&(Ct=!0),ht&&(xe=vt({},ei),J=xr(null),ht.html===!0&&(vt(xe,Ql),vt(J,ti)),ht.svg===!0&&(vt(xe,ko),vt(J,Eo),vt(J,wa)),ht.svgFilters===!0&&(vt(xe,Ao),vt(J,Eo),vt(J,wa)),ht.mathMl===!0&&(vt(xe,No),vt(J,ni),vt(J,wa))),re.tagCheck=null,re.attributeCheck=null,hn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?re.tagCheck=S.ADD_TAGS:_r(S.ADD_TAGS)&&(xe===ie&&(xe=yn(xe)),vt(xe,S.ADD_TAGS,Ge))),hn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?re.attributeCheck=S.ADD_ATTR:_r(S.ADD_ATTR)&&(J===F&&(J=yn(J)),vt(J,S.ADD_ATTR,Ge))),hn(S,"ADD_FORBID_CONTENTS")&&_r(S.ADD_FORBID_CONTENTS)&&(xt===ut&&(xt=yn(xt)),vt(xt,S.ADD_FORBID_CONTENTS,Ge)),ot&&(xe["#text"]=!0),_e&&vt(xe,["html","head","body"]),xe.table&&(vt(xe,["tbody"]),delete H.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const be=E;E=S.TRUSTED_TYPES_POLICY;try{A=z("")}catch(Fe){throw E=be,Fe}}else S.TRUSTED_TYPES_POLICY===null?(E=void 0,A=""):(E===void 0&&(E=T()),E&&typeof A=="string"&&(A=z("")));Kt&&Kt(S),st=S},$t=vt({},[...ko,...Ao,...Ig]),Ke=vt({},[...No,...Og]),K=function(S,ee,be){return ee.namespaceURI===it?S==="svg":ee.namespaceURI===De?S==="svg"&&(be==="annotation-xml"||At[be]):!!$t[S]},Ce=function(S,ee,be){return ee.namespaceURI===it?S==="math":ee.namespaceURI===rt?S==="math"&&Je[be]:!!Ke[S]},He=function(S,ee,be){return ee.namespaceURI===rt&&!Je[be]||ee.namespaceURI===De&&!At[be]?!1:!Ke[S]&&(wt[S]||!$t[S])},Ye=function(S){let ee=b(S);(!ee||!ee.tagName)&&(ee={namespaceURI:bt,tagName:"template"});const be=Hr(S.tagName),Fe=Hr(ee.tagName);return It[S.namespaceURI]?S.namespaceURI===rt?K(be,ee,Fe):S.namespaceURI===De?Ce(be,ee,Fe):S.namespaceURI===it?He(be,ee,Fe):!!(ce==="application/xhtml+xml"&&It[S.namespaceURI]):!1},at=function(S){Wr(t.removed,{element:S});try{b(S).removeChild(S)}catch{if(v(S),!b(S))throw sr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dt=function(S,ee,be){try{S.removeAttributeNode(ee)}catch{try{S.removeAttribute(be)}catch{}}},jt=function(S){an(S);const ee=x(S);if(ee){const Fe=[];or(ee,Ue=>{Wr(Fe,Ue)}),or(Fe,Ue=>{try{v(Ue)}catch{}})}const be=g(S);if(be)for(let Fe=be.length-1;Fe>=0;--Fe){const Ue=be[Fe],et=Ue&&Ue.name;typeof et=="string"&&dt(S,Ue,et)}},zt=function(S,ee,be){if(!be)try{be=ee.getAttributeNode(S)}catch{be=null}Wr(t.removed,{attribute:be||null,from:ee});try{be?ee.removeAttributeNode(be):ee.removeAttribute(S)}catch{try{ee.removeAttribute(S)}catch{}}if(S==="is")if(Ct||Oe)try{at(ee)}catch{}else try{ee.setAttribute(S,"")}catch{}},wn=function(S){const ee=g(S);if(ee)for(let be=ee.length-1;be>=0;--be){const Fe=ee[be],Ue=Fe&&Fe.name;typeof Ue!="string"||J[Ge(Ue)]||dt(S,Fe,Ue)}},an=function(S){const ee=[S];for(;ee.length>0;){const be=ee.pop();B(be)===vn.element&&wn(be);const Ue=x(be);if(Ue)for(let et=Ue.length-1;et>=0;--et)ee.push(Ue[et])}},Bn=function(S,ee){return ye?S==="patchsrc"?!0:S==="for"&&ee!=="label"&&ee!=="output":!1},dn=function(S){if(!ye)return;const ee=[S];for(;ee.length>0;){const be=ee.pop(),Fe=B(be);if(Fe===vn.processingInstruction||Fe===vn.comment&&nn(oi,be.data)){try{v(be)}catch{}continue}if(Fe===vn.element){const et=be,Bt=Ge(k(be));try{et.hasAttribute&&et.hasAttribute("patchsrc")&&et.removeAttribute("patchsrc"),et.hasAttribute&&et.hasAttribute("for")&&Bn("for",Bt)&&et.removeAttribute("for")}catch{}}const Ue=x(be);if(Ue)for(let et=Ue.length-1;et>=0;--et)ee.push(Ue[et])}},Xt=function(S){let ee=null,be=null;if(tt)S="<remove></remove>"+S;else{const et=Yl(S,/^[\r\n\t ]+/);be=et&&et[0]}ce==="application/xhtml+xml"&&bt===it&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Fe=E?z(S):S;if(bt===it)try{ee=new h().parseFromString(Fe,ce)}catch{}if(!ee||!ee.documentElement){ee=O.createDocument(bt,"template",null);try{ee.documentElement.innerHTML=Nt?A:Fe}catch{}}const Ue=ee.body||ee.documentElement;return S&&be&&Ue.insertBefore(r.createTextNode(be),Ue.childNodes[0]||null),bt===it?$.call(ee,_e?"html":"body")[0]:_e?ee.documentElement:Ue},on=function(S){const ee=C?C(S):S.ownerDocument;return pe.call(ee||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},pn=function(S){return S=Vr(S,te," "),S=Vr(S,P," "),S=Vr(S,L," "),S},Qt=function(S){var ee;S.normalize();const be=C?C(S):S.ownerDocument,Fe=pe.call(be||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ue=Fe.nextNode();for(;Ue;)Ue.data=pn(Ue.data),Ue=Fe.nextNode();const et=(ee=S.querySelectorAll)===null||ee===void 0?void 0:ee.call(S,"template");et&&or(et,Bt=>{Dt(Bt.content)&&Qt(Bt.content)})},Lt=function(S){const ee=N?N(S):null;return typeof ee!="string"||Ge(ee)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==g(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==w(S)||S.childNodes!==x(S)},Dt=function(S){if(!w||typeof S!="object"||S===null)return!1;try{return w(S)===vn.documentFragment}catch{return!1}},Wt=function(S){if(!w||typeof S!="object"||S===null)return!1;try{return typeof w(S)=="number"}catch{return!1}};function Rt(ve,S,ee){ve.length!==0&&or(ve,be=>{be.call(t,S,ee,st)})}const Pn=function(S,ee){return!!(ye&&S.hasChildNodes()&&!Wt(S.firstElementChild)&&nn(ai,S.textContent)&&nn(ai,S.innerHTML)||ye&&S.namespaceURI===it&&Jg[ee]&&(Wt(S.firstElementChild)||typeof S.textContent=="string"&&nn(Qg[ee],S.textContent))||S.nodeType===vn.processingInstruction||ye&&S.nodeType===vn.comment&&nn(oi,S.data))},En=function(S,ee){if(S instanceof RegExp)return nn(S,ee);if(S instanceof Function){for(var be=arguments.length,Fe=new Array(be>2?be-2:0),Ue=2;Ue<be;Ue++)Fe[Ue-2]=arguments[Ue];return!!S(ee,...Fe)}return!1},ar=function(S,ee,be){if(!H[ee]&&ge(ee)&&En(Q.tagNameCheck,ee))return!1;if(ot&&!xt[ee]){const Fe=b(S),Ue=x(S);if(Ue&&Fe){const et=Ue.length;for(let Bt=et-1;Bt>=0;--Bt){const St=S===be?f(Ue[Bt],!0):Ue[Bt];Fe.insertBefore(St,y(S))}}}return at(S),!0},$n=function(S,ee,be,Fe){return S.length===0?ee:ee===be||ee===Fe?yn(ee):ee},me=function(S,ee){return S===ee||b(S)!==null?!1:(gt&&an(S),!0)},Te=function(S,ee){if(Rt(ne.beforeSanitizeElements,S,null),me(S,ee))return!0;if(Lt(S))return at(S),!0;const be=Ge(k(S));if(xe=$n(ne.uponSanitizeElement,xe,ie,Ie),Rt(ne.uponSanitizeElement,S,{tagName:be,allowedTags:xe}),me(S,ee))return!0;if(Pn(S,be))return at(S),!0;if(H[be]||!(re.tagCheck instanceof Function&&re.tagCheck(be))&&!xe[be]){const Ue=ar(S,be,ee);return Ue===!1&&Rt(ne.afterSanitizeElements,S,null),Ue}if(B(S)===vn.element&&!Ye(S)||(be==="noscript"||be==="noembed"||be==="noframes")&&nn(Zg,S.innerHTML))return at(S),!0;if(Re&&S.nodeType===vn.text){const Ue=pn(S.textContent);S.textContent!==Ue&&(Wr(t.removed,{element:S.cloneNode()}),S.textContent=Ue)}return Rt(ne.afterSanitizeElements,S,null),!1},q=function(S,ee,be){if(le[ee]||Bn(ee,S)||nt&&(ee==="id"||ee==="name")&&(be in r||be in Ot))return!1;const Fe=J[ee]||re.attributeCheck instanceof Function&&re.attributeCheck(ee,S);return Be&&nn(R,ee)||ue&&nn(U,ee)?!0:Fe?Pt[ee]||nn(Y,Vr(be,X,""))||(ee==="src"||ee==="xlink:href"||ee==="href")&&S!=="script"&&Zl(be,"data:")===0&&Gt[S]||ke&&!nn(Z,Vr(be,X,""))?!0:!be:ge(S)&&En(Q.tagNameCheck,S)&&En(Q.attributeNameCheck,ee,S)||ee==="is"&&Q.allowCustomizedBuiltInElements&&En(Q.tagNameCheck,be)},he=vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ge=function(S){return!he[Hr(S)]&&nn(ae,S)},Me=function(S,ee,be,Fe){if(E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!be)switch(d.getAttributeType(S,ee)){case"TrustedHTML":return z(Fe);case"TrustedScriptURL":return G(Fe)}return Fe},Le=function(S,ee,be,Fe){try{be?S.setAttributeNS(be,ee,Fe):S.setAttribute(ee,Fe),Lt(S)?at(S):Kl(t.removed)}catch{zt(ee,S)}},Ve=function(S){Rt(ne.beforeSanitizeAttributes,S,null);const ee=S.attributes;if(!ee||Lt(S))return;J=$n(ne.uponSanitizeAttribute,J,F,je);const be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let Fe=ee.length;const Ue=Ge(S.nodeName);for(;Fe--;){const et=ee[Fe],Bt=et.name,St=et.namespaceURI,en=et.value,tn=Ge(Bt),zr=en;let $e=Bt==="value"?zr:Tg(zr);if(be.attrName=tn,be.attrValue=$e,be.keepAttr=!0,be.forceKeepAttr=void 0,Rt(ne.uponSanitizeAttribute,S,be),$e=be.attrValue,We&&(tn==="id"||tn==="name")&&Zl($e,Ze)!==0&&(zt(Bt,S,et),$e=Ze+$e),ye&&nn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$e)){zt(Bt,S,et);continue}if(tn==="attributename"&&Yl($e,"href")){zt(Bt,S,et);continue}if(!be.forceKeepAttr){if(!be.keepAttr){zt(Bt,S,et);continue}if(!Ne&&nn(Xg,$e)){zt(Bt,S,et);continue}if(Re&&($e=pn($e)),!q(Ue,tn,$e)){zt(Bt,S,et);continue}$e=Me(Ue,tn,St,$e),$e!==zr&&Le(S,Bt,St,$e)}}Rt(ne.afterSanitizeAttributes,S,null)},pt=function(S){let ee=null;const be=on(S);for(Rt(ne.beforeSanitizeShadowDOM,S,null);ee=be.nextNode();)if(Rt(ne.uponSanitizeShadowNode,ee,null),Te(ee,S),Ve(ee),Dt(ee.content)&&pt(ee.content),B(ee)===vn.element){const Fe=_(ee);Dt(Fe)&&(yt(Fe),pt(Fe))}Rt(ne.afterSanitizeShadowDOM,S,null)},yt=function(S){const ee=[{node:S,shadow:null}];for(;ee.length>0;){const be=ee.pop();if(be.shadow){pt(be.shadow);continue}const Fe=be.node,et=B(Fe)===vn.element,Bt=x(Fe);if(Bt)for(let St=Bt.length-1;St>=0;--St)ee.push({node:Bt[St],shadow:null});if(et){const St=N?N(Fe):null;if(typeof St=="string"&&Ge(St)==="template"){const en=Fe.content;Dt(en)&&ee.push({node:en,shadow:null})}}if(et){const St=_(Fe);Dt(St)&&ee.push({node:null,shadow:St},{node:St,shadow:null})}}};return t.sanitize=function(ve){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=null,be=null,Fe=null,Ue=null;if(Nt=!ve,Nt&&(ve="<!-->"),typeof ve!="string"&&!Wt(ve)&&(ve=Pg(ve),typeof ve!="string"))throw sr("dirty is not a string, aborting");if(!t.isSupported)return ve;Ae?(xe=Ie,J=je):Yt(S),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(xe=yn(xe)),ne.uponSanitizeAttribute.length>0&&(J=yn(J)),t.removed=[];const et=gt&&typeof ve!="string"&&Wt(ve);if(et){dn(ve);const en=k(ve);if(typeof en=="string"){const tn=Ge(en);if(!xe[tn]||H[tn])throw jt(ve),sr("root node is forbidden and cannot be sanitized in-place")}if(Lt(ve))throw jt(ve),sr("root node is clobbered and cannot be sanitized in-place");try{yt(ve)}catch(tn){throw jt(ve),tn}}else if(Wt(ve))ee=Xt("<!---->"),be=ee.ownerDocument.importNode(ve,!0),be.nodeType===vn.element&&be.nodeName==="BODY"||be.nodeName==="HTML"?ee=be:ee.appendChild(be),yt(be);else{if(!Ct&&!Re&&!_e&&ve.indexOf("<")===-1)return E&&qe?z(ve):ve;if(ee=Xt(ve),!ee)return Ct?null:qe?A:""}ee&&tt&&at(ee.firstChild);const Bt=et?ve:ee;try{const en=on(Bt);for(;Fe=en.nextNode();)Te(Fe,Bt),Ve(Fe),Dt(Fe.content)&&pt(Fe.content)}catch(en){throw et&&(jt(ve),or(t.removed,tn=>{tn.element&&an(tn.element)})),en}if(et)return or(t.removed,en=>{en.element&&an(en.element)}),Re&&Qt(ve),ve;if(Ct){if(Re&&Qt(ee),Oe)for(Ue=se.call(ee.ownerDocument);ee.firstChild;)Ue.appendChild(ee.firstChild);else Ue=ee;return(J.shadowroot||J.shadowrootmode)&&(Ue=V.call(a,Ue,!0)),Ue}let St=_e?ee.outerHTML:ee.innerHTML;return _e&&xe["!doctype"]&&ee.ownerDocument&&ee.ownerDocument.doctype&&ee.ownerDocument.doctype.name&&nn(Kg,ee.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+ee.ownerDocument.doctype.name+`>
|
|
818
|
-
`+St),Re&&(St=pn(St)),E&&qe?z(St):St},t.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(ve),Ae=!0,
|
|
817
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kg(e,t){return _g(e)||wg(e,t)||Ag(e,t)||Bg()}function Ag(e,t){if(e){if(typeof e=="string")return Vl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vl(e,t):void 0}}const ql=Object.entries,Ul=Object.setPrototypeOf,Ng=Object.isFrozen,Eg=Object.getPrototypeOf,jg=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Zt=Object.seal,xr=Object.create,Gl=typeof Reflect<"u"&&Reflect,_o=Gl.apply,wo=Gl.construct;Kt||(Kt=function(t){return t}),Zt||(Zt=function(t){return t}),_o||(_o=function(t,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(r,s)}),wo||(wo=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new t(...a)});const or=Ut(Array.prototype.forEach),Dg=Ut(Array.prototype.lastIndexOf),Kl=Ut(Array.prototype.pop),Wr=Ut(Array.prototype.push),Sg=Ut(Array.prototype.splice),_r=Array.isArray,Hr=Ut(String.prototype.toLowerCase),Bo=Ut(String.prototype.toString),Yl=Ut(String.prototype.match),Vr=Ut(String.prototype.replace),Zl=Ut(String.prototype.indexOf),Tg=Ut(String.prototype.trim),Mg=Ut(Number.prototype.toString),$g=Ut(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:Ut(BigInt.prototype.toString),Jl=typeof Symbol>"u"?null:Ut(Symbol.prototype.toString),hn=Ut(Object.prototype.hasOwnProperty),qr=Ut(Object.prototype.toString),nn=Ut(RegExp.prototype.test),sr=Lg(TypeError);function Ut(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return _o(e,t,a)}}function Lg(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return wo(e,r)}}function vt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hr;if(Ul&&Ul(e,null),!_r(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=r(s);l!==s&&(Ng(t)||(t[a]=l),s=l)}e[s]=!0}return e}function Rg(e){for(let t=0;t<e.length;t++)hn(e,t)||(e[t]=null);return e}function yn(e){const t=xr(null);for(const a of ql(e)){var r=kg(a,2);const s=r[0],l=r[1];hn(e,s)&&(_r(l)?t[s]=Rg(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=yn(l):t[s]=l)}return t}function Pg(e){switch(typeof e){case"string":return e;case"number":return Mg(e);case"boolean":return $g(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Jl?Jl(e):"Symbol()";case"undefined":return qr(e);case"function":case"object":{if(e===null)return qr(e);const t=e,r=Dn(t,"toString");if(typeof r=="function"){const a=r(t);return typeof a=="string"?a:qr(a)}return qr(e)}default:return qr(e)}}function Dn(e,t){for(;e!==null;){const a=jg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=Eg(e)}function r(){return null}return r}function Fg(e){try{return nn(e,""),!0}catch{return!1}}const Ql=Kt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ko=Kt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ao=Kt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ig=Kt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),No=Kt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Og=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ei=Kt(["#text"]),ti=Kt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Eo=Kt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ni=Kt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ba=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zg=Zt(/{{[\w\W]*|^[\w\W]*}}/g),Wg=Zt(/<%[\w\W]*|^[\w\W]*%>/g),Hg=Zt(/\${[\w\W]*/g),Vg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),qg=Zt(/^aria-[\-\w]+$/),ri=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ug=Zt(/^(?:\w+script|data):/i),Gg=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kg=Zt(/^html$/i),Yg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i),ai=Zt(/<[/\w!]/g),oi=Zt(/<[/\w]/g),Zg=Zt(/<\/no(script|embed|frames)/i),Xg=Zt(/\/>/i),vn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},si=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Jg=Kt(vt({},si)),Qg=(function(){const e={};return or(si,t=>{e[t]=Zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),eb=function(){return typeof window>"u"?null:window},tb=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},li=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Zn=function(t,r,a,s){return hn(t,r)&&_r(t[r])?vt(s.base?yn(s.base):{},t[r],s.transform):a},jo=function(t,r,a){const s=hn(t,r)?t[r]:void 0;return s&&typeof s=="object"?yn(s):a()};function ii(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eb();const t=ve=>ii(ve);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==vn.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,f=Dn(m,"cloneNode"),v=Dn(m,"remove"),b=Dn(m,"nextSibling"),_=Dn(m,"childNodes"),y=Dn(m,"parentNode"),x=Dn(m,"shadowRoot"),g=Dn(m,"attributes"),w=i&&i.prototype?Dn(i.prototype,"nodeType"):null,N=i&&i.prototype?Dn(i.prototype,"nodeName"):null,C=i&&i.prototype?Dn(i.prototype,"ownerDocument"):null,B=function(T){return w?w(T):T.nodeType},k=function(T){return N?N(T):T.nodeName};if(typeof l=="function"){const ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let E,A="",D,j=!1,S=0;const O=function(){if(S>0)throw sr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(T){O(),S++;try{return E.createHTML(T)}finally{S--}},G=function(T){O(),S++;try{return E.createScriptURL(T)}finally{S--}},M=function(){return j||(D=tb(d,s),j=!0),D},I=r,W=I.implementation,pe=I.createNodeIterator,se=I.createDocumentFragment,$=I.getElementsByTagName,V=a.importNode;let ne=li();t.isSupported=typeof ql=="function"&&typeof y=="function"&&W&&W.createHTMLDocument!==void 0;const te=zg,P=Wg,L=Hg,R=Vg,U=qg,Z=Ug,X=Gg,ae=Yg;let Y=ri,xe=null;const ie=vt({},[...Ql,...ko,...Ao,...No,...ei]);let J=null;const F=vt({},[...ti,...Eo,...ni,...Ba]);let Q=Object.seal(xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,le=null;const re=Object.seal(xr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,Be=!0,ke=!1,Ne=!0,Re=!1,ye=!0,_e=!1,Ae=!1,Oe=null,je=null,tt=!1,Ct=!1,Ie=!1,qe=!1,nt=!0,We=!1;const Ze="user-content-";let ot=!0,gt=!1,ht={},xt=null;const ut=vt({},["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 Gt=null;const _t=vt({},["audio","video","img","source","image","track"]);let Pt=null;const Qe=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",rt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let bt=it,Nt=!1,It=null;const ft=vt({},[De,rt,it],Bo),mt=Kt(["mi","mo","mn","ms","mtext"]);let At=vt({},mt);const Et=Kt(["annotation-xml"]);let Je=vt({},Et);const wt=vt({},["title","style","font","a","script"]);let ue=null;const Se=["application/xhtml+xml","text/html"],Pe="text/html";let Ge=null,st=null;const Ot=r.createElement("form"),ct=function(T){return T instanceof RegExp||T instanceof Function},Yt=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===T)return;(!T||typeof T!="object")&&(T={}),T=yn(T),ue=Se.indexOf(T.PARSER_MEDIA_TYPE)===-1?Pe:T.PARSER_MEDIA_TYPE,Ge=ue==="application/xhtml+xml"?Bo:Hr,xe=Zn(T,"ALLOWED_TAGS",ie,{transform:Ge}),J=Zn(T,"ALLOWED_ATTR",F,{transform:Ge}),It=Zn(T,"ALLOWED_NAMESPACES",ft,{transform:Bo}),Pt=Zn(T,"ADD_URI_SAFE_ATTR",Qe,{transform:Ge,base:Qe}),Gt=Zn(T,"ADD_DATA_URI_TAGS",_t,{transform:Ge,base:_t}),xt=Zn(T,"FORBID_CONTENTS",ut,{transform:Ge}),H=Zn(T,"FORBID_TAGS",yn({}),{transform:Ge}),le=Zn(T,"FORBID_ATTR",yn({}),{transform:Ge}),ht=hn(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?yn(T.USE_PROFILES):T.USE_PROFILES:!1,de=T.ALLOW_ARIA_ATTR!==!1,Be=T.ALLOW_DATA_ATTR!==!1,ke=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=T.SAFE_FOR_TEMPLATES||!1,ye=T.SAFE_FOR_XML!==!1,_e=T.WHOLE_DOCUMENT||!1,Ct=T.RETURN_DOM||!1,Ie=T.RETURN_DOM_FRAGMENT||!1,qe=T.RETURN_TRUSTED_TYPE||!1,tt=T.FORCE_BODY||!1,nt=T.SANITIZE_DOM!==!1,We=T.SANITIZE_NAMED_PROPS||!1,ot=T.KEEP_CONTENT!==!1,gt=T.IN_PLACE||!1,Y=Fg(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:ri,bt=typeof T.NAMESPACE=="string"?T.NAMESPACE:it,At=jo(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>vt({},mt)),Je=jo(T,"HTML_INTEGRATION_POINTS",()=>vt({},Et));const ee=jo(T,"CUSTOM_ELEMENT_HANDLING",()=>xr(null));if(Q=xr(null),hn(ee,"tagNameCheck")&&ct(ee.tagNameCheck)&&(Q.tagNameCheck=ee.tagNameCheck),hn(ee,"attributeNameCheck")&&ct(ee.attributeNameCheck)&&(Q.attributeNameCheck=ee.attributeNameCheck),hn(ee,"allowCustomizedBuiltInElements")&&typeof ee.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=ee.allowCustomizedBuiltInElements),Zt(Q),Re&&(Be=!1),Ie&&(Ct=!0),ht&&(xe=vt({},ei),J=xr(null),ht.html===!0&&(vt(xe,Ql),vt(J,ti)),ht.svg===!0&&(vt(xe,ko),vt(J,Eo),vt(J,Ba)),ht.svgFilters===!0&&(vt(xe,Ao),vt(J,Eo),vt(J,Ba)),ht.mathMl===!0&&(vt(xe,No),vt(J,ni),vt(J,Ba))),re.tagCheck=null,re.attributeCheck=null,hn(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?re.tagCheck=T.ADD_TAGS:_r(T.ADD_TAGS)&&(xe===ie&&(xe=yn(xe)),vt(xe,T.ADD_TAGS,Ge))),hn(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?re.attributeCheck=T.ADD_ATTR:_r(T.ADD_ATTR)&&(J===F&&(J=yn(J)),vt(J,T.ADD_ATTR,Ge))),hn(T,"ADD_FORBID_CONTENTS")&&_r(T.ADD_FORBID_CONTENTS)&&(xt===ut&&(xt=yn(xt)),vt(xt,T.ADD_FORBID_CONTENTS,Ge)),ot&&(xe["#text"]=!0),_e&&vt(xe,["html","head","body"]),xe.table&&(vt(xe,["tbody"]),delete H.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const be=E;E=T.TRUSTED_TYPES_POLICY;try{A=z("")}catch(Fe){throw E=be,Fe}}else T.TRUSTED_TYPES_POLICY===null?(E=void 0,A=""):(E===void 0&&(E=M()),E&&typeof A=="string"&&(A=z("")));Kt&&Kt(T),st=T},$t=vt({},[...ko,...Ao,...Ig]),Ke=vt({},[...No,...Og]),K=function(T,ee,be){return ee.namespaceURI===it?T==="svg":ee.namespaceURI===De?T==="svg"&&(be==="annotation-xml"||At[be]):!!$t[T]},Ce=function(T,ee,be){return ee.namespaceURI===it?T==="math":ee.namespaceURI===rt?T==="math"&&Je[be]:!!Ke[T]},He=function(T,ee,be){return ee.namespaceURI===rt&&!Je[be]||ee.namespaceURI===De&&!At[be]?!1:!Ke[T]&&(wt[T]||!$t[T])},Ye=function(T){let ee=y(T);(!ee||!ee.tagName)&&(ee={namespaceURI:bt,tagName:"template"});const be=Hr(T.tagName),Fe=Hr(ee.tagName);return It[T.namespaceURI]?T.namespaceURI===rt?K(be,ee,Fe):T.namespaceURI===De?Ce(be,ee,Fe):T.namespaceURI===it?He(be,ee,Fe):!!(ue==="application/xhtml+xml"&&It[T.namespaceURI]):!1},at=function(T){Wr(t.removed,{element:T});try{y(T).removeChild(T)}catch{if(v(T),!y(T))throw sr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dt=function(T,ee,be){try{T.removeAttributeNode(ee)}catch{try{T.removeAttribute(be)}catch{}}},jt=function(T){an(T);const ee=_(T);if(ee){const Fe=[];or(ee,Ue=>{Wr(Fe,Ue)}),or(Fe,Ue=>{try{v(Ue)}catch{}})}const be=g(T);if(be)for(let Fe=be.length-1;Fe>=0;--Fe){const Ue=be[Fe],et=Ue&&Ue.name;typeof et=="string"&&dt(T,Ue,et)}},zt=function(T,ee,be){if(!be)try{be=ee.getAttributeNode(T)}catch{be=null}Wr(t.removed,{attribute:be||null,from:ee});try{be?ee.removeAttributeNode(be):ee.removeAttribute(T)}catch{try{ee.removeAttribute(T)}catch{}}if(T==="is")if(Ct||Ie)try{at(ee)}catch{}else try{ee.setAttribute(T,"")}catch{}},wn=function(T){const ee=g(T);if(ee)for(let be=ee.length-1;be>=0;--be){const Fe=ee[be],Ue=Fe&&Fe.name;typeof Ue!="string"||J[Ge(Ue)]||dt(T,Fe,Ue)}},an=function(T){const ee=[T];for(;ee.length>0;){const be=ee.pop();B(be)===vn.element&&wn(be);const Ue=_(be);if(Ue)for(let et=Ue.length-1;et>=0;--et)ee.push(Ue[et])}},Bn=function(T,ee){return ye?T==="patchsrc"?!0:T==="for"&&ee!=="label"&&ee!=="output":!1},dn=function(T){if(!ye)return;const ee=[T];for(;ee.length>0;){const be=ee.pop(),Fe=B(be);if(Fe===vn.processingInstruction||Fe===vn.comment&&nn(oi,be.data)){try{v(be)}catch{}continue}if(Fe===vn.element){const et=be,Bt=Ge(k(be));try{et.hasAttribute&&et.hasAttribute("patchsrc")&&et.removeAttribute("patchsrc"),et.hasAttribute&&et.hasAttribute("for")&&Bn("for",Bt)&&et.removeAttribute("for")}catch{}}const Ue=_(be);if(Ue)for(let et=Ue.length-1;et>=0;--et)ee.push(Ue[et])}},Xt=function(T){let ee=null,be=null;if(tt)T="<remove></remove>"+T;else{const et=Yl(T,/^[\r\n\t ]+/);be=et&&et[0]}ue==="application/xhtml+xml"&&bt===it&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const Fe=E?z(T):T;if(bt===it)try{ee=new h().parseFromString(Fe,ue)}catch{}if(!ee||!ee.documentElement){ee=W.createDocument(bt,"template",null);try{ee.documentElement.innerHTML=Nt?A:Fe}catch{}}const Ue=ee.body||ee.documentElement;return T&&be&&Ue.insertBefore(r.createTextNode(be),Ue.childNodes[0]||null),bt===it?$.call(ee,_e?"html":"body")[0]:_e?ee.documentElement:Ue},on=function(T){const ee=C?C(T):T.ownerDocument;return pe.call(ee||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},pn=function(T){return T=Vr(T,te," "),T=Vr(T,P," "),T=Vr(T,L," "),T},Qt=function(T){var ee;T.normalize();const be=C?C(T):T.ownerDocument,Fe=pe.call(be||T,T,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ue=Fe.nextNode();for(;Ue;)Ue.data=pn(Ue.data),Ue=Fe.nextNode();const et=(ee=T.querySelectorAll)===null||ee===void 0?void 0:ee.call(T,"template");et&&or(et,Bt=>{Dt(Bt.content)&&Qt(Bt.content)})},Lt=function(T){const ee=N?N(T):null;return typeof ee!="string"||Ge(ee)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==g(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==_(T)},Dt=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===vn.documentFragment}catch{return!1}},Wt=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function Rt(ve,T,ee){ve.length!==0&&or(ve,be=>{be.call(t,T,ee,st)})}const Pn=function(T,ee){return!!(ye&&T.hasChildNodes()&&!Wt(T.firstElementChild)&&nn(ai,T.textContent)&&nn(ai,T.innerHTML)||ye&&T.namespaceURI===it&&Jg[ee]&&(Wt(T.firstElementChild)||typeof T.textContent=="string"&&nn(Qg[ee],T.textContent))||T.nodeType===vn.processingInstruction||ye&&T.nodeType===vn.comment&&nn(oi,T.data))},En=function(T,ee){if(T instanceof RegExp)return nn(T,ee);if(T instanceof Function){for(var be=arguments.length,Fe=new Array(be>2?be-2:0),Ue=2;Ue<be;Ue++)Fe[Ue-2]=arguments[Ue];return!!T(ee,...Fe)}return!1},ar=function(T,ee,be){if(!H[ee]&&ge(ee)&&En(Q.tagNameCheck,ee))return!1;if(ot&&!xt[ee]){const Fe=y(T),Ue=_(T);if(Ue&&Fe){const et=Ue.length;for(let Bt=et-1;Bt>=0;--Bt){const St=T===be?f(Ue[Bt],!0):Ue[Bt];Fe.insertBefore(St,b(T))}}}return at(T),!0},$n=function(T,ee,be,Fe){return T.length===0?ee:ee===be||ee===Fe?yn(ee):ee},me=function(T,ee){return T===ee||y(T)!==null?!1:(gt&&an(T),!0)},Te=function(T,ee){if(Rt(ne.beforeSanitizeElements,T,null),me(T,ee))return!0;if(Lt(T))return at(T),!0;const be=Ge(k(T));if(xe=$n(ne.uponSanitizeElement,xe,ie,Oe),Rt(ne.uponSanitizeElement,T,{tagName:be,allowedTags:xe}),me(T,ee))return!0;if(Pn(T,be))return at(T),!0;if(H[be]||!(re.tagCheck instanceof Function&&re.tagCheck(be))&&!xe[be]){const Ue=ar(T,be,ee);return Ue===!1&&Rt(ne.afterSanitizeElements,T,null),Ue}if(B(T)===vn.element&&!Ye(T)||(be==="noscript"||be==="noembed"||be==="noframes")&&nn(Zg,T.innerHTML))return at(T),!0;if(Re&&T.nodeType===vn.text){const Ue=pn(T.textContent);T.textContent!==Ue&&(Wr(t.removed,{element:T.cloneNode()}),T.textContent=Ue)}return Rt(ne.afterSanitizeElements,T,null),!1},q=function(T,ee,be){if(le[ee]||Bn(ee,T)||nt&&(ee==="id"||ee==="name")&&(be in r||be in Ot))return!1;const Fe=J[ee]||re.attributeCheck instanceof Function&&re.attributeCheck(ee,T);return Be&&nn(R,ee)||de&&nn(U,ee)?!0:Fe?Pt[ee]||nn(Y,Vr(be,X,""))||(ee==="src"||ee==="xlink:href"||ee==="href")&&T!=="script"&&Zl(be,"data:")===0&&Gt[T]||ke&&!nn(Z,Vr(be,X,""))?!0:!be:ge(T)&&En(Q.tagNameCheck,T)&&En(Q.attributeNameCheck,ee,T)||ee==="is"&&Q.allowCustomizedBuiltInElements&&En(Q.tagNameCheck,be)},he=vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ge=function(T){return!he[Hr(T)]&&nn(ae,T)},Me=function(T,ee,be,Fe){if(E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!be)switch(d.getAttributeType(T,ee)){case"TrustedHTML":return z(Fe);case"TrustedScriptURL":return G(Fe)}return Fe},Le=function(T,ee,be,Fe){try{be?T.setAttributeNS(be,ee,Fe):T.setAttribute(ee,Fe),Lt(T)?at(T):Kl(t.removed)}catch{zt(ee,T)}},Ve=function(T){Rt(ne.beforeSanitizeAttributes,T,null);const ee=T.attributes;if(!ee||Lt(T))return;J=$n(ne.uponSanitizeAttribute,J,F,je);const be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let Fe=ee.length;const Ue=Ge(T.nodeName);for(;Fe--;){const et=ee[Fe],Bt=et.name,St=et.namespaceURI,en=et.value,tn=Ge(Bt),zr=en;let $e=Bt==="value"?zr:Tg(zr);if(be.attrName=tn,be.attrValue=$e,be.keepAttr=!0,be.forceKeepAttr=void 0,Rt(ne.uponSanitizeAttribute,T,be),$e=be.attrValue,We&&(tn==="id"||tn==="name")&&Zl($e,Ze)!==0&&(zt(Bt,T,et),$e=Ze+$e),ye&&nn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$e)){zt(Bt,T,et);continue}if(tn==="attributename"&&Yl($e,"href")){zt(Bt,T,et);continue}if(!be.forceKeepAttr){if(!be.keepAttr){zt(Bt,T,et);continue}if(!Ne&&nn(Xg,$e)){zt(Bt,T,et);continue}if(Re&&($e=pn($e)),!q(Ue,tn,$e)){zt(Bt,T,et);continue}$e=Me(Ue,tn,St,$e),$e!==zr&&Le(T,Bt,St,$e)}}Rt(ne.afterSanitizeAttributes,T,null)},pt=function(T){let ee=null;const be=on(T);for(Rt(ne.beforeSanitizeShadowDOM,T,null);ee=be.nextNode();)if(Rt(ne.uponSanitizeShadowNode,ee,null),Te(ee,T),Ve(ee),Dt(ee.content)&&pt(ee.content),B(ee)===vn.element){const Fe=x(ee);Dt(Fe)&&(yt(Fe),pt(Fe))}Rt(ne.afterSanitizeShadowDOM,T,null)},yt=function(T){const ee=[{node:T,shadow:null}];for(;ee.length>0;){const be=ee.pop();if(be.shadow){pt(be.shadow);continue}const Fe=be.node,et=B(Fe)===vn.element,Bt=_(Fe);if(Bt)for(let St=Bt.length-1;St>=0;--St)ee.push({node:Bt[St],shadow:null});if(et){const St=N?N(Fe):null;if(typeof St=="string"&&Ge(St)==="template"){const en=Fe.content;Dt(en)&&ee.push({node:en,shadow:null})}}if(et){const St=x(Fe);Dt(St)&&ee.push({node:null,shadow:St},{node:St,shadow:null})}}};return t.sanitize=function(ve){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=null,be=null,Fe=null,Ue=null;if(Nt=!ve,Nt&&(ve="<!-->"),typeof ve!="string"&&!Wt(ve)&&(ve=Pg(ve),typeof ve!="string"))throw sr("dirty is not a string, aborting");if(!t.isSupported)return ve;Ae?(xe=Oe,J=je):Yt(T),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(xe=yn(xe)),ne.uponSanitizeAttribute.length>0&&(J=yn(J)),t.removed=[];const et=gt&&typeof ve!="string"&&Wt(ve);if(et){dn(ve);const en=k(ve);if(typeof en=="string"){const tn=Ge(en);if(!xe[tn]||H[tn])throw jt(ve),sr("root node is forbidden and cannot be sanitized in-place")}if(Lt(ve))throw jt(ve),sr("root node is clobbered and cannot be sanitized in-place");try{yt(ve)}catch(tn){throw jt(ve),tn}}else if(Wt(ve))ee=Xt("<!---->"),be=ee.ownerDocument.importNode(ve,!0),be.nodeType===vn.element&&be.nodeName==="BODY"||be.nodeName==="HTML"?ee=be:ee.appendChild(be),yt(be);else{if(!Ct&&!Re&&!_e&&ve.indexOf("<")===-1)return E&&qe?z(ve):ve;if(ee=Xt(ve),!ee)return Ct?null:qe?A:""}ee&&tt&&at(ee.firstChild);const Bt=et?ve:ee;try{const en=on(Bt);for(;Fe=en.nextNode();)Te(Fe,Bt),Ve(Fe),Dt(Fe.content)&&pt(Fe.content)}catch(en){throw et&&(jt(ve),or(t.removed,tn=>{tn.element&&an(tn.element)})),en}if(et)return or(t.removed,en=>{en.element&&an(en.element)}),Re&&Qt(ve),ve;if(Ct){if(Re&&Qt(ee),Ie)for(Ue=se.call(ee.ownerDocument);ee.firstChild;)Ue.appendChild(ee.firstChild);else Ue=ee;return(J.shadowroot||J.shadowrootmode)&&(Ue=V.call(a,Ue,!0)),Ue}let St=_e?ee.outerHTML:ee.innerHTML;return _e&&xe["!doctype"]&&ee.ownerDocument&&ee.ownerDocument.doctype&&ee.ownerDocument.doctype.name&&nn(Kg,ee.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+ee.ownerDocument.doctype.name+`>
|
|
818
|
+
`+St),Re&&(St=pn(St)),E&&qe?z(St):St},t.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(ve),Ae=!0,Oe=xe,je=J},t.clearConfig=function(){st=null,Ae=!1,Oe=null,je=null,E=D,A=""},t.isValidAttribute=function(ve,T,ee){st||Yt({});const be=Ge(ve),Fe=Ge(T);return q(be,Fe,ee)},t.addHook=function(ve,T){typeof T=="function"&&hn(ne,ve)&&Wr(ne[ve],T)},t.removeHook=function(ve,T){if(hn(ne,ve)){if(T!==void 0){const ee=Dg(ne[ve],T);return ee===-1?void 0:Sg(ne[ve],ee,1)[0]}return Kl(ne[ve])}},t.removeHooks=function(ve){hn(ne,ve)&&(ne[ve]=[])},t.removeAllHooks=function(){ne=li()},t}var wr=ii();let Do=null;const nb=1500;function So(){Do?.clear(),Do=null}function rb(e,{onEnd:t,rate:r=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const a=window.speechSynthesis;So();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{a.cancel()}catch{l();return}const i=()=>{So();try{a.cancel();const p=new SpeechSynthesisUtterance(e),h=a.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=r,p.onend=t?l:null,p.onerror=t?l:null,a.speak(p)}catch{l()}};let u;try{u=a.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,nb);try{a.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Do={clear:()=>{clearTimeout(c),a.removeEventListener("voiceschanged",i)}}}function To(){So(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const ab=/^(?:[a-z]+:)?\/\//i,ob="__ihab_core_asset_base_url__";function sb(){return globalThis[ob]??""}function Mo(e){const t=String(e||"").trim();if(!t)return"";if(ab.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const r=t.startsWith("/")?t:`/${t}`,a=sb();return a?`${a}${r}`:r}const ui="__ihab_core_storage_resolvers__";function Ur(){return globalThis[ui]??null}function lb(e){globalThis[ui]=e}let ci=class extends Error{constructor(t){super(`
|
|
819
819
|
[ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
|
|
820
820
|
|
|
821
821
|
\uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
|
|
@@ -834,19 +834,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
834
834
|
\uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
|
|
835
835
|
npm install @supabase/supabase-js
|
|
836
836
|
pnpm add @supabase/supabase-js
|
|
837
|
-
`),this.name="StorageNotConfiguredError"}};function ib(e){lb(e)}function di(e,t){if(!e)return null;const r=Ur();return r?.resolvePath?r.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function pi(e){if(!e)return null;const t=Ur();if(!t)throw new ci("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function hi(e){const t=Ur();if(!t)throw new ci("downloadSound");return t.download(e)}function ub(){return Ur()?.noiseBaseUrl??"/sounds/noise"}function cb(){const e=Number(Ur()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function db(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const r=new AbortController;return setTimeout(()=>r.abort(),e),r.signal}function pb(e){return e===400||e===404||e===410}const mi="__ihab_core_tts_config__";function Gr(){return globalThis[mi]?.urlResolver??null}function
|
|
838
|
-
`||r==="\r"?t+=2:t+=a<128?1:2}return t}function Ab(e){return xi(e)>90?"LMS":"SMS"}function _i(e,t=85){const r=xi(e),a=Ab(e),s=a==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:r,type:a,limit:s,over:r>s,target:l,overTarget:l!==null&&r>l}}const Nb=["onset","vowel","coda","glide"],wi="none",Eb={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},jb="\uC5C6\uC74C";function Db(e){return Nb.includes(e)}function Sb(e){const t={};for(const[r,a]of Object.entries(e)){const s=Db(r)?r:Eb[r];s&&(t[s]=a===jb?wi:a)}return t}const Tb={\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"}},Bi=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],ki=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],Mb=["","\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 Xr(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 $b(e){const t=Xr(e[0]||"");return t?Bi[t.cho]:""}function Lb(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],r=i=>Bi.includes(i),a=i=>ki.includes(i),s=t.map(i=>r(i)?"cho":a(i)?"jung":Xr(i)?"syl":"other"),l=t.map(i=>Xr(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if($b(d)!==t[h]){p=!1;break}}else if(m==="jung"){const f=Xr(d);if(!f||ki[f.jung]!==t[h]){p=!1;break}}else{const f=l[h];if(f&&f.jong===0){const v=Xr(d);if(!v||v.cho!==f.cho||v.jung!==f.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const Rb={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(Rb).map(([e,t])=>[t.join(""),Mb[Number(e)]]));const Pb="word_pair_index_v2",Fb="word_pair_index_sig_v2";let Na=null;function Ib(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const r=t;for(const a of["cho","jung","jong"])if(!Array.isArray(r[a])||!r[a].every(s=>typeof s=="string"))return!1}return!0}function Ob(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Pb),t=localStorage.getItem(Fb);if(!e||!t)return null;const r=JSON.parse(e);return Ib(r)?{index:r,sig:t}:null}catch{return null}}function zb(){if(Na)return Na;const e=Ob();return e?(Na=e.index,e.sig,Na):null}function Wb(e,t,r){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+r)/(t+r)))}function Hb(e,t){if(!(e>0))return 1;const r=Math.max(1,Math.floor(t));if(e<=r)return e;const a=Math.ceil(e/r);return Math.max(1,Math.ceil(e/a))}const Oo=/[ㄱ-ㅎ]/,Vb=/[ㅏ-ㅣ]/;function Ai(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const r=e[t],a=r.charCodeAt(0);if(a>=44032&&a<=55203||Oo.test(r)||Vb.test(r))return r}return null}function qb(e){const t=Ai(e);if(!t)return"\uAC00";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC774":"\uAC00":Oo.test(t)?"\uC774":"\uAC00"}function Ub(e){return`${e}${qb(e)}`}function Gb(e){const t=Ai(e);if(!t)return"\uB97C";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC744":"\uB97C":Oo.test(t)?"\uC744":"\uB97C"}function Kb(e){return`${e}${Gb(e)}`}function Yb(e,t,r){const a=e.slice(),[s]=a.splice(t,1);return a.splice(r,0,s),a}function Jr(e,t=Math.random){const r=e.slice();for(let a=r.length-1;a>0;a--){const s=Math.floor(t()*(a+1));[r[a],r[s]]=[r[s],r[a]]}return r}const Zb=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Mt?.t=="function"?Mt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zo(e,t){if(t===void 0&&(t=Zb()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const r=e;for(const a of[r.message,r.error_description,r.error])if(typeof a=="string"&&a)return a}return t}const Ea=e=>e.split("/").filter(t=>t!=="");function Qr(e){const t=Ea(e);return t[t.length-1]??e}function ja(e){const t=Ea(e);return t.length>1?t.slice(0,-1).join("/"):null}const Wo=(e,t)=>!!e&&(e===t||e.startsWith(t+"/"));function Ni(e){const t=new Set,r=[];for(const a of e){const s=Ea(a);for(let l=1;l<=s.length;l+=1){const i=s.slice(0,l).join("/");t.has(i)||(t.add(i),r.push(i))}}return r}function Xb(e,t){return Ni(e).filter(r=>ja(r)===t)}function Jb(e){const t=Ea(e);return t.map((r,a)=>({path:t.slice(0,a+1).join("/"),label:r}))}function Qb(e){const t=Ni(e),r=(a,s)=>t.filter(l=>ja(l)===a).flatMap(l=>[{path:l,label:Qr(l),depth:s},...r(l,s+1)]);return r(null,0)}const ey=(e,t)=>ja(e)!==t&&!(t!==null&&Wo(t,e)),ty="__ihab_core_word_pool__";function Ei(){return globalThis[ty]??null}const ji=globalThis;function Di(e,t){const r=a=>{};try{const a=t();a&&typeof a.catch=="function"&&a.catch(r)}catch(a){r(a)}}function ny(e){Di("time",()=>ji.__ihabTrainingTimeLogger?.(e))}function ry(e){Di("completion",()=>ji.__ihabTrainingCompletionLogger?.(e))}const ay="Asia/Seoul",oy=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function ea(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const r=e.trim(),a=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(r)?.[1];if(a){const l=new Date(`${a}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==a)return null}const s=oy.exec(r);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:r)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function sy(e){return ea(e)!==null}const ly=e=>ea(e);function Si(e,t){const r=t.startsWith("ko")?"ko-KR":"en-US",a=ly(e);return a?a.toLocaleDateString(r,{timeZone:ay,year:"numeric",month:"short",day:"numeric"}):""}function Ho(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function iy(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ho(r),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function uy(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ho(r),{year:"numeric",month:"short"}).format(new Date(e,t-1,1))}function Ti(e,t,r,a){return e("calendar.yearMonth",{year:r,month:a,defaultValue:""})||iy(r,a,t)}function ta(){return Vo(new Date)}function Da(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&ea(e)?.toISOString().slice(0,10)===e?e:ta()}function kr(){return dy(ta())}const cy=540*60*1e3;function Mi(e,t,r){return new Date(Date.UTC(e,t,r)-cy)}function dy(e){const[t,r,a]=e.split("-").map(Number);return new Date(t,(r||1)-1,a||1)}function Vo(e){if(e==null||e==="")return"";const t=ea(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function $i(e,t){if(!e)return"";const r=ea(e);if(!r)return"";const a=r.getTime(),s=Math.max(0,Math.floor((Date.now()-a)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),p=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Li(e,t={}){const{sep:r=".",pad:a=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=Vo(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=a?c:String(Number(c)),d=a?p:String(Number(p));return`${u}${r}${h}${r}${d}${s?".":""}`}function Sa(e){if(typeof e=="string"){const t=e.trim();return t&&sy(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function mn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function py(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 hy(e){return Array.isArray(e)?e.map((t,r)=>{const a=t??{};return{index:r,itemId:mn(a.contextCode)??mn(a.itemId)??mn(a.itemCode)??mn(a.id),question:mn(a.question)??mn(a.q)??mn(a.sentence)??mn(a.text)??mn(a.prompt)??mn(a.word)??mn(a.targetSyllable),answer:mn(a.answer),selected:mn(a.selectedText)??mn(a.selected),correct:py(a),shownAt:Sa(a.shownAt)??Sa(a.shown_at),answeredAt:Sa(a.answeredAt)??Sa(a.answered_at)}}):[]}const my=e=>!!e&&typeof e=="object"&&e.failed===!0,qo=globalThis;async function fy(){try{const e=await qo.__ihabNoiseSettingsStore?.load();return my(e)?{settings:null,failed:!0}:{settings:e??null,failed:!1}}catch{return{settings:null,failed:!0}}}function Uo(e){const t=r=>{};try{const r=qo.__ihabNoiseSettingsStore?.save(e);r&&typeof r.catch=="function"&&r.catch(t)}catch(r){t(r)}}function Ta(e){try{qo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Cy(e){if(typeof document<"u"){const t=document.activeElement;let r=null;try{if(r=document.createElement("textarea"),r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select(),r.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(r?.parentNode&&r.parentNode.removeChild(r),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function Ar(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ri(e,t){if(!e)return"-";const r=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!r)return e;const a=Number(r[1]),s=Number(r[2]),l=r[1].padStart(2,"0");return s===0?t("date.timeH",{h:a,hh:l,mm:r[2]}):t("date.timeHM",{h:a,hh:l,m:s,mm:r[2]})}function Go(e){return(e??0).toLocaleString("ko-KR")}const gy=[{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"}]}],by=[{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 Pi(){return gy}function yy(){return by}const na=e=>Array.isArray(e)?e:null;function vy(e,t){if(!t||typeof t!="object")return null;const r=t,a=na(r.items),s=r.sentences,l=na(r.questions);if(e==="LISTEN_IN_NOISE"){let i=0;return a&&a.length>0?i=a.length:Array.isArray(s)&&s.length>0?i=s.length:s&&(i=1),{n:i,unit:"sentence"}}if(e==="SHORT_STORY"){let i=1;const u=na(r.raw?.items);return a?i=a.length:u?i=u.length:l?i=l.length:Array.isArray(s)&&(i=s.length),{n:i,unit:"question"}}if(e==="LONG_STORY"){let i=1;if(a&&a.length>0){const u=a.reduce((c,p)=>{const h=p??{},d=na(h.questionItems);if(d)return c+d.length;const m=na(h.questions);return m?c+m.length:c},0);i=u>0?u:a.length}else l&&l.length>0?i=l.length:Array.isArray(s)&&s.length>0&&(i=s.length);return{n:i,unit:"question"}}if(e==="ORDERING_SENTENCE"){let i=1;return a&&a.length>0?i=a.length:Array.isArray(s)&&s.length>0&&(i=s.length),{n:i,unit:"sentence"}}return a&&a.length>0?{n:a.length,unit:"question"}:null}const xy=[],_y=[],wy=[],By=[];function ky(){return{LISTEN_IN_NOISE:xy,SHORT_STORY:_y,LONG_STORY:wy,ORDERING_SENTENCE:By}}const Ay=[{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."}],Fi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Ny(e){return Ay.map(t=>{const r=Fi[t.key];return r?{...t,label:e(`trainingType.${r}.title`),desc:e(`trainingType.${r}.desc`)}:t})}var Ey={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",add:"\uCD94\uAC00"},jy={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",weekLabelCompact:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},Dy={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"}},Sy={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Ty={selected:"\uC120\uD0DD\uB428"},My={placeholder:"\uC120\uD0DD"},$y={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Ly={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"},Ry={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"},Py={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},Fy={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Iy={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},Oy={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB09C\uC774\uB3C4",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playSoundFor:"{{name}} \uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},zy={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},Wy={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"}}}},Hy={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Vy={showN:"{{n}}\uAC1C\uC529"},qy={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."}},Uy={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Gy={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ky={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Yy={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoAgeFloor:"{{n}}\uC138: {{n}}\uC138\uBCF4\uB2E4 \uC5B4\uB9B0 \uB0B1\uB9D0\uB3C4 \uD568\uAED8 \uB4ED\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},Zy={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Xy={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"}},Jy={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},Qy={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},e2={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},t2={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
837
|
+
`),this.name="StorageNotConfiguredError"}};function ib(e){lb(e)}function di(e,t){if(!e)return null;const r=Ur();return r?.resolvePath?r.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function pi(e){if(!e)return null;const t=Ur();if(!t)throw new ci("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function hi(e){const t=Ur();if(!t)throw new ci("downloadSound");return t.download(e)}function ub(){return Ur()?.noiseBaseUrl??"/sounds/noise"}function cb(){const e=Number(Ur()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function db(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const r=new AbortController;return setTimeout(()=>r.abort(),e),r.signal}function pb(e){return e===400||e===404||e===410}const mi="__ihab_core_tts_config__";function Gr(){return globalThis[mi]?.urlResolver??null}function ka(){return globalThis[mi]?.fallbackUrlResolver??null}const hb="__ihab_core_pronunciation_resolver__";function mb(){return globalThis[hb]??null}let Xn=null;const Kr=new WeakMap,$o=new WeakMap,Lo=new WeakMap;let fi=!1;const Ci=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function fb(){if(fi||typeof document>"u")return;fi=!0;const e=()=>{try{Xn&&Xn.state!=="running"&&Xn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function gi(){if(Xn)return Xn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Xn=new e,fb(),Xn):null}catch{return null}}function Ro(){try{Xn?.resume()}catch{}}function Po(e,t){const r=Kr.get(t);if(r)return r;try{const a=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Ci($o.get(t)??t.volume),a.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Kr.set(t,i),i}catch{return null}}function Aa(e){if(!e)return Promise.resolve(null);const t=Kr.get(e);if(t)return Promise.resolve(t.analyser);const r=gi();if(!r)return Promise.resolve(null);if(r.state==="running")return Promise.resolve(Po(r,e)?.analyser??null);const a=Lo.get(e);if(a)return a;const s=Promise.resolve().then(()=>r.resume()).then(()=>r.state==="running"?Po(r,e)?.analyser??null:null).catch(()=>null).finally(()=>{Lo.delete(e)});return Lo.set(e,s),s}function Cb(e){if(!e)return null;const t=Kr.get(e);if(t)return t.analyser;const r=gi();return r?r.state==="running"?Po(r,e)?.analyser??null:(Aa(e),null):null}function Jn(e,t){const r=Ci(t);$o.set(e,r);const a=Kr.get(e);if(a){try{e.volume!==1&&(e.volume=1)}catch{}const s=a.gain.gain;try{const l=a.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(r,l,.01)}catch{try{s.value=r}catch{}}return"gain"}try{e.volume=r}catch{}return"element"}function Na(e){return $o.get(e)??e.volume}function gb(e,t){e.getFloatTimeDomainData(t);let r=0;for(let a=0;a<t.length;a++){const s=t[a];r+=s*s}return Math.sqrt(r/t.length)}const bb="__ihab_core_image_config__";function Br(){return globalThis[bb]??null}const bi="word_image_existence_map_v1",yb="ihab:image-existence-updated";let Yr=null;function vb(){Yr!==null&&(clearTimeout(Yr),Yr=null),typeof window<"u"&&window.dispatchEvent(new Event(yb))}function xb(){Yr===null&&(Yr=setTimeout(vb,200))}let lr=null,Fo=0;const Zr=new Map;function _b(){if(lr)return lr;try{const e=typeof localStorage<"u"?localStorage.getItem(bi):null,t=e?JSON.parse(e):null,r={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[a,s]of Object.entries(t))typeof s=="boolean"&&(r[a]=s);lr=r}catch{lr={}}return lr}let Io=null;function wb(){Io===null&&(Io=setTimeout(()=>{Io=null;try{typeof localStorage<"u"&&lr&&localStorage.setItem(bi,JSON.stringify(lr))}catch{}},200))}function Bb(e,t){return`${e}_${t??1}`}async function kb(e,t,r=!1){const a=_b(),s=Bb(e,t);if(!r&&s in a)return a[s];if(!r&&Zr.has(s))return Zr.get(s);const l=Br();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:db(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:pb(p.status)?!1:null,()=>null).then(p=>Zr.get(s)!==c?p??!1:(Zr.delete(s),p===null?!1:(a[s]=p,Fo++,wb(),p)));return Zr.set(s,c),c}async function yi(e,t){const r=Fo,a=await kb(e,t);return Fo!==r&&xb(),a}const vi=90;function xi(e){let t=0;for(const r of e){const a=r.codePointAt(0)??0;r===`
|
|
838
|
+
`||r==="\r"?t+=2:t+=a<128?1:2}return t}function Ab(e){return xi(e)>90?"LMS":"SMS"}function _i(e,t=85){const r=xi(e),a=Ab(e),s=a==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:r,type:a,limit:s,over:r>s,target:l,overTarget:l!==null&&r>l}}const Nb=["onset","vowel","coda","glide"],wi="none",Eb={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},jb="\uC5C6\uC74C";function Db(e){return Nb.includes(e)}function Sb(e){const t={};for(const[r,a]of Object.entries(e)){const s=Db(r)?r:Eb[r];s&&(t[s]=a===jb?wi:a)}return t}const Tb={\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"}},Bi=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],ki=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],Mb=["","\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 Xr(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 $b(e){const t=Xr(e[0]||"");return t?Bi[t.cho]:""}function Lb(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],r=i=>Bi.includes(i),a=i=>ki.includes(i),s=t.map(i=>r(i)?"cho":a(i)?"jung":Xr(i)?"syl":"other"),l=t.map(i=>Xr(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if($b(d)!==t[h]){p=!1;break}}else if(m==="jung"){const f=Xr(d);if(!f||ki[f.jung]!==t[h]){p=!1;break}}else{const f=l[h];if(f&&f.jong===0){const v=Xr(d);if(!v||v.cho!==f.cho||v.jung!==f.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const Rb={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(Rb).map(([e,t])=>[t.join(""),Mb[Number(e)]]));const Pb="word_pair_index_v2",Fb="word_pair_index_sig_v2";let Ea=null;function Ib(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const r=t;for(const a of["cho","jung","jong"])if(!Array.isArray(r[a])||!r[a].every(s=>typeof s=="string"))return!1}return!0}function Ob(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Pb),t=localStorage.getItem(Fb);if(!e||!t)return null;const r=JSON.parse(e);return Ib(r)?{index:r,sig:t}:null}catch{return null}}function zb(){if(Ea)return Ea;const e=Ob();return e?(Ea=e.index,e.sig,Ea):null}function Wb(e,t,r){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+r)/(t+r)))}function Hb(e,t){if(!(e>0))return 1;const r=Math.max(1,Math.floor(t));if(e<=r)return e;const a=Math.ceil(e/r);return Math.max(1,Math.ceil(e/a))}const Oo=/[ㄱ-ㅎ]/,Vb=/[ㅏ-ㅣ]/;function Ai(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const r=e[t],a=r.charCodeAt(0);if(a>=44032&&a<=55203||Oo.test(r)||Vb.test(r))return r}return null}function qb(e){const t=Ai(e);if(!t)return"\uAC00";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC774":"\uAC00":Oo.test(t)?"\uC774":"\uAC00"}function Ub(e){return`${e}${qb(e)}`}function Gb(e){const t=Ai(e);if(!t)return"\uB97C";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC744":"\uB97C":Oo.test(t)?"\uC744":"\uB97C"}function Kb(e){return`${e}${Gb(e)}`}function Yb(e,t,r){const a=e.slice(),[s]=a.splice(t,1);return a.splice(r,0,s),a}function Jr(e,t=Math.random){const r=e.slice();for(let a=r.length-1;a>0;a--){const s=Math.floor(t()*(a+1));[r[a],r[s]]=[r[s],r[a]]}return r}const Zb=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Mt?.t=="function"?Mt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zo(e,t){if(t===void 0&&(t=Zb()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const r=e;for(const a of[r.message,r.error_description,r.error])if(typeof a=="string"&&a)return a}return t}const ja=e=>e.split("/").filter(t=>t!=="");function Qr(e){const t=ja(e);return t[t.length-1]??e}function Da(e){const t=ja(e);return t.length>1?t.slice(0,-1).join("/"):null}const Wo=(e,t)=>!!e&&(e===t||e.startsWith(t+"/"));function Ni(e){const t=new Set,r=[];for(const a of e){const s=ja(a);for(let l=1;l<=s.length;l+=1){const i=s.slice(0,l).join("/");t.has(i)||(t.add(i),r.push(i))}}return r}function Xb(e,t){return Ni(e).filter(r=>Da(r)===t)}function Jb(e){const t=ja(e);return t.map((r,a)=>({path:t.slice(0,a+1).join("/"),label:r}))}function Qb(e){const t=Ni(e),r=(a,s)=>t.filter(l=>Da(l)===a).flatMap(l=>[{path:l,label:Qr(l),depth:s},...r(l,s+1)]);return r(null,0)}const ey=(e,t)=>Da(e)!==t&&!(t!==null&&Wo(t,e)),ty="__ihab_core_word_pool__";function Ei(){return globalThis[ty]??null}const ji=globalThis;function Di(e,t){const r=a=>{};try{const a=t();a&&typeof a.catch=="function"&&a.catch(r)}catch(a){r(a)}}function ny(e){Di("time",()=>ji.__ihabTrainingTimeLogger?.(e))}function ry(e){Di("completion",()=>ji.__ihabTrainingCompletionLogger?.(e))}const ay="Asia/Seoul",oy=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function ea(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const r=e.trim(),a=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(r)?.[1];if(a){const l=new Date(`${a}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==a)return null}const s=oy.exec(r);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:r)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function sy(e){return ea(e)!==null}const ly=e=>ea(e);function Si(e,t){const r=t.startsWith("ko")?"ko-KR":"en-US",a=ly(e);return a?a.toLocaleDateString(r,{timeZone:ay,year:"numeric",month:"short",day:"numeric"}):""}function Ho(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function iy(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ho(r),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function uy(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ho(r),{year:"numeric",month:"short"}).format(new Date(e,t-1,1))}function Ti(e,t,r,a){return e("calendar.yearMonth",{year:r,month:a,defaultValue:""})||iy(r,a,t)}function ta(){return Vo(new Date)}function Sa(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&ea(e)?.toISOString().slice(0,10)===e?e:ta()}function kr(){return dy(ta())}const cy=540*60*1e3;function Mi(e,t,r){return new Date(Date.UTC(e,t,r)-cy)}function dy(e){const[t,r,a]=e.split("-").map(Number);return new Date(t,(r||1)-1,a||1)}function Vo(e){if(e==null||e==="")return"";const t=ea(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function $i(e,t){if(!e)return"";const r=ea(e);if(!r)return"";const a=r.getTime(),s=Math.max(0,Math.floor((Date.now()-a)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),p=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Li(e,t={}){const{sep:r=".",pad:a=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=Vo(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=a?c:String(Number(c)),d=a?p:String(Number(p));return`${u}${r}${h}${r}${d}${s?".":""}`}function Ta(e){if(typeof e=="string"){const t=e.trim();return t&&sy(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function mn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function py(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 hy(e){return Array.isArray(e)?e.map((t,r)=>{const a=t??{};return{index:r,itemId:mn(a.contextCode)??mn(a.itemId)??mn(a.itemCode)??mn(a.id),question:mn(a.question)??mn(a.q)??mn(a.sentence)??mn(a.text)??mn(a.prompt)??mn(a.word)??mn(a.targetSyllable),answer:mn(a.answer),selected:mn(a.selectedText)??mn(a.selected),correct:py(a),shownAt:Ta(a.shownAt)??Ta(a.shown_at),answeredAt:Ta(a.answeredAt)??Ta(a.answered_at)}}):[]}const my=e=>!!e&&typeof e=="object"&&e.failed===!0,qo=globalThis;async function fy(){try{const e=await qo.__ihabNoiseSettingsStore?.load();return my(e)?{settings:null,failed:!0}:{settings:e??null,failed:!1}}catch{return{settings:null,failed:!0}}}function Uo(e){const t=r=>{};try{const r=qo.__ihabNoiseSettingsStore?.save(e);r&&typeof r.catch=="function"&&r.catch(t)}catch(r){t(r)}}function Ma(e){try{qo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Cy(e){if(typeof document<"u"){const t=document.activeElement;let r=null;try{if(r=document.createElement("textarea"),r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select(),r.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(r?.parentNode&&r.parentNode.removeChild(r),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function Ar(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ri(e,t){if(!e)return"-";const r=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!r)return e;const a=Number(r[1]),s=Number(r[2]),l=r[1].padStart(2,"0");return s===0?t("date.timeH",{h:a,hh:l,mm:r[2]}):t("date.timeHM",{h:a,hh:l,m:s,mm:r[2]})}function Go(e){return(e??0).toLocaleString("ko-KR")}const gy=[{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"}]}],by=[{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 Pi(){return gy}function yy(){return by}const na=e=>Array.isArray(e)?e:null;function vy(e,t){if(!t||typeof t!="object")return null;const r=t,a=na(r.items),s=r.sentences,l=na(r.questions);if(e==="LISTEN_IN_NOISE"){let i=0;return a&&a.length>0?i=a.length:Array.isArray(s)&&s.length>0?i=s.length:s&&(i=1),{n:i,unit:"sentence"}}if(e==="SHORT_STORY"){let i=1;const u=na(r.raw?.items);return a?i=a.length:u?i=u.length:l?i=l.length:Array.isArray(s)&&(i=s.length),{n:i,unit:"question"}}if(e==="LONG_STORY"){let i=1;if(a&&a.length>0){const u=a.reduce((c,p)=>{const h=p??{},d=na(h.questionItems);if(d)return c+d.length;const m=na(h.questions);return m?c+m.length:c},0);i=u>0?u:a.length}else l&&l.length>0?i=l.length:Array.isArray(s)&&s.length>0&&(i=s.length);return{n:i,unit:"question"}}if(e==="ORDERING_SENTENCE"){let i=1;return a&&a.length>0?i=a.length:Array.isArray(s)&&s.length>0&&(i=s.length),{n:i,unit:"sentence"}}return a&&a.length>0?{n:a.length,unit:"question"}:null}const xy=[],_y=[],wy=[],By=[];function ky(){return{LISTEN_IN_NOISE:xy,SHORT_STORY:_y,LONG_STORY:wy,ORDERING_SENTENCE:By}}const Ay=[{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."}],Fi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Ny(e){return Ay.map(t=>{const r=Fi[t.key];return r?{...t,label:e(`trainingType.${r}.title`),desc:e(`trainingType.${r}.desc`)}:t})}var Ey={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",add:"\uCD94\uAC00"},jy={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",weekLabelCompact:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},Dy={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"}},Sy={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Ty={selected:"\uC120\uD0DD\uB428"},My={placeholder:"\uC120\uD0DD"},$y={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Ly={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"},Ry={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"},Py={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},Fy={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Iy={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},Oy={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB09C\uC774\uB3C4",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playSoundFor:"{{name}} \uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},zy={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},Wy={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"}}}},Hy={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Vy={showN:"{{n}}\uAC1C\uC529"},qy={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."}},Uy={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Gy={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ky={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Yy={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoAgeFloor:"{{n}}\uC138: {{n}}\uC138\uBCF4\uB2E4 \uC5B4\uB9B0 \uB0B1\uB9D0\uB3C4 \uD568\uAED8 \uB4ED\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},Zy={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Xy={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"}},Jy={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},Qy={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},e2={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},t2={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
839
839
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
840
|
-
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},n2={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},r2={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"},a2={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30",showPassword:"\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"},o2={ariaLabel:"\uC120\uD0DD \uD0ED"},s2={ariaLabel:"\uD0ED"},l2={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},i2={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},u2={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},c2={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},d2={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"}},p2={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},h2={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},m2={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"},f2={viewWords:"\uB0B1\uB9D0"},C2={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},g2={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},b2={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},y2={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},v2={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},x2={clearSelection:"\uC120\uD0DD \uD574\uC81C"},_2={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},w2={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},B2={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},k2={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},A2={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},N2={list:"\uD3F4\uB354",open:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C",menu:"{{name}} \uD3F4\uB354 \uBA54\uB274",placeMenu:"{{name}} \uBA54\uB274",tree:"\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30",fold:"{{name}} \uC811\uAE30",unfold:"{{name}} \uD3BC\uCE58\uAE30",up:"\uC704\uB85C",upTo:"\uD55C \uCE35 \uC704\uB85C \u2014 {{name}}",add:{title:"\uD3F4\uB354 \uCD94\uAC00",sub:"\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uD3F4\uB354 \uC774\uB984"}},E2={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},j2={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"},D2={common:Ey,calendar:jy,passCard:Dy,rating:Sy,colorPicker:Ty,dropdown:My,accordion:$y,header:Ly,nav:Ry,settings:Py,usage:Fy,account:Iy,training:Oy,customers:zy,payment:Wy,coupons:Hy,visits:Vy,trainingType:qy,myWordTable:Uy,keyWords:Gy,wordTable:Ky,wordSearch:Yy,wordPrint:Zy,topic:Xy,device:Jy,manager:Qy,wordPairs:e2,footer:t2,date:n2,wordData:r2,textField:a2,segmentedControl:o2,tabs:s2,fileUpload:l2,avatar:i2,myHomework:u2,trainingStatus:c2,store:d2,progress:p2,trainingMiss:h2,table:m2,wordScore:f2,topBanner:C2,datePicker:g2,report:b2,tooltip:y2,phonemeProfile:v2,bulkBar:x2,debug:_2,badge:w2,loader:B2,soundCompass:k2,breadcrumb:A2,folder:N2,board:E2,promoBannerBg:j2},S2={filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoAgeFloor:"Age {{n}}: also includes words for younger ages.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"}},T2={filter:{onlyHighUsage:"High-use words only"}},M2={wordSearch:S2,wordPairs:T2};const $2="0.481.0";var Ii;const L2=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Ko="ko",R2="ihab_display_language",Yo={en:()=>Promise.resolve().then(function(){return a5})},Ma=new Set(["ko"]),Zo={},ra=e=>e.split("-")[0];function Oi(e){const t=ra(e),r=Yo[t];return!r||Ma.has(t)?Promise.resolve():Zo[t]??(Zo[t]=r().then(a=>{const s=a.default??a;Mt.addResourceBundle(t,"translation",s,!0,!1),Ma.add(t)},a=>{throw Zo[t]=void 0,a}))}function zi(){if(typeof window>"u")return Ko;try{const e=localStorage.getItem(R2);if(e&&L2.some(t=>t.code===e))return e}catch{}return Ko}function Wi(e){try{document.documentElement.lang=e}catch{}}Mt.on("languageChanged",Wi),Wi(zi());const Hi=(Ii=Mt).__ihabRawChangeLanguage??(Ii.__ihabRawChangeLanguage=Mt.changeLanguage);Mt.changeLanguage=Hi,Mt.use(Ee.initReactI18next).init({resources:{ko:{translation:D2},en:{translation:M2}},lng:zi(),fallbackLng:Ko,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Xo=Hi.bind(Mt);let Jo;Mt.changeLanguage=((e,t)=>{if(Jo=e,!e||Ma.has(ra(e))||!Yo[ra(e)])return Xo(e,t);const r=()=>Jo===e?Xo(e,t):Promise.resolve(Mt.t);return Oi(e).then(r,a=>(console.error(a),r()))});{const e=Mt.language;e&&!Ma.has(ra(e))&&Yo[ra(e)]&&Oi(e).then(()=>{Mt.language===e&&(Jo??e)===e&&Xo(e)},t=>console.error(t))}const P2=99,F2=new Map;try{Mt.store?.on?.("added",()=>F2.clear())}catch{}Array.from({length:P2},(e,t)=>t+1);let $a=null,Vi=null,qi=null;function I2(){const e=Ei();if(e&&e.entries.length>0){const t=zb();if($a&&Vi===e&&qi===t)return $a;const r=new Set,a=[];for(const s of e.entries)!s.word||r.has(s.word)||(r.add(s.word),a.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade,age:s.age??void 0}));return $a=a,Vi=e,qi=t,$a}return[]}new Proxy([],{get(e,t){const r=I2(),a=r[t];return typeof a=="function"?a.bind(r):a}});function O2(e){return e==null?!1:z2.test(zo(e))}const z2=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function W2(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 H2(e){if(typeof window>"u")return"";const t=(r,a)=>{typeof a.attrValue=="string"&&W2(a.attrValue)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function V2(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){r(null),s(null),i(null),c(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=Mo(e):/^(Logo|Symbol)/i.test(d)?m=Mo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),r(e),s(m)},[e]),o.useEffect(()=>{if(!a)return;let d=!1;async function m(){try{let f=await fetch(a);f.ok||(f=await fetch(a));const v=f.headers.get("content-type")||"";if(d)return;if(v.includes("svg")){i("mask");return}if(v.startsWith("image/")){i("img");return}const y=await fetch(a);if(!y.ok)throw new Error("not ok");const x=await y.text();if(d)return;if(/^\s*<svg[\s>]/i.test(x)){const b=H2(x);if(!b){i("none");return}c(b),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[a]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&a&&fetch(a).then(f=>{if(!f.ok)throw new Error("fetch failed");return f.blob()}).then(f=>{d||(m=URL.createObjectURL(f),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,a]),t===e?{iconToUse:a,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:r,className:a,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=a??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",f=typeof t=="string"?t:null,v=xg(f),{iconToUse:y,mode:x,svgText:b,blobUrl:_}=V2(f),g=(k,E={})=>n.jsx("span",{className:p,style:u,...E,children:k}),w=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(k,E={})=>n.jsx("img",{src:k,alt:typeof r=="string"?r:typeof r=="number"?String(r):"",className:h,...E,style:w?{...E.style,...w}:E.style});if(!t)return null;if(typeof t!="string")return g(t);if(t==="none")return g(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(v)try{return g(o.createElement(v,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(y&&y.endsWith(".svg")){if(x==="mask"){const k={"--icon-url":_?`url(${_})`:`url(${y})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return g(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return x==="img"?g(N(y,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):x==="inline"?g(n.jsx("span",{className:m,dangerouslySetInnerHTML:b?{__html:b}:void 0}),{"aria-hidden":"true"}):g(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Mo(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const C=typeof c=="number"?c:20,B=`<svg width="${C}" height="${C}" 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 g(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:B}}),{"aria-hidden":"true"})}function Ui(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||a.current)return;const i=e();if(i&&typeof i.then=="function"){a.current=!0,r(!0);const u=()=>{a.current=!1,s.current&&r(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function q2({icon:e,title:t,action:r,className:a}){const{pending:s,press:l}=Ui(r?.onClick);return n.jsxs("div",{className:we("empty-state",a),children:[e&&n.jsx(lt,{icon:e,size:40,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",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:l,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(lt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function U2({message:e,hint:t,icon:r="triangle-alert",onRetry:a,retryLabel:s,className:l}){const{t:i}=Ee.useTranslation(),{pending:u,press:c}=Ui(a);return n.jsxs("div",{className:we("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{icon:r,size:40,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(lt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function G2({icon:e,title:t,description:r,cta:a,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),m())},className:we("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:r})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:a}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function K2({as:e="div",className:t="",children:r,storage:a,...s}){a&&ib({resolveUrl:a.resolveUrl,download:a.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:a.exists,resolvePath:a.resolvePath,noiseBaseUrl:a.noiseBaseUrl,noiseFileGain:a.noiseFileGain});const l=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:r})}function Y2(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1}return!0}function La(e,t=!0){o.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const a=s=>{if(s.key!=="Tab")return;const l=Array.from(r.querySelectorAll(Sn)).filter(Y2);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===r;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return r.addEventListener("keydown",a),()=>r.removeEventListener("keydown",a)},[e,t])}const Sn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Qo=new WeakMap;function es(e,t){e&&Qo.set(e,t)}function ts(e){let t=e;for(let r=0;t&&!t.isConnected&&r<10;r++){let a=t;for(;a&&!Qo.has(a);)a=a.parentElement;if(!a)return t;t=Qo.get(a)??null}return t}function Gi(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 Ra(e,t,r){const a=e?.isConnected?e:r?.isConnected?r:null;if(Gi(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!a)return null;const s=Array.from(document.querySelectorAll(Sn)).filter(c=>!(e&&e.contains(c))&&Gi(c));let l=null,i=null;for(const c of s)a.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function Z2({title:e="",lines:t=[],notices:r=null,children:a,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Ee.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const y=h.current;y&&y.contains(document.activeElement)&&Ra(y),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),f=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(r&&Array.isArray(r)&&r.length)return n.jsxs("div",{className:m,role:"note",children:[r.map((y,x)=>n.jsxs("div",{className:"notice-box__inner",children:[y.title?n.jsx("span",{className:"notice-box__title body-3",children:y.title}):null,n.jsx("div",{className:"notice-box__body",children:y.lines&&y.lines.length?n.jsx("div",{children:y.lines.map((b,_)=>n.jsx("span",{className:"notice-box__line body-3",children:b},_))}):y.children??null})]},x)),f]});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((y,x)=>n.jsx("li",{className:"notice-box__line",children:y},x))}):a})]}):n.jsx("div",{className:"notice-box__inner",children:a});return n.jsxs("div",{ref:h,className:m,role:"note",children:[v,f]})}const ns=o.createContext(void 0);function kn(){return o.useContext(ns)}const X2={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Nr(e){const{t}=Ee.useTranslation(),{variant:r="spinner",size:a=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(r==="bar"){const c=s==null||!Number.isFinite(Number(s)),p=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof a=="number"?`${a}px`:a;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:X2,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:a,height:a,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Ki=o.createContext(null);function J2(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const Yi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Q2(e){const t=o.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const a=window.matchMedia(e);a.addEventListener?a.addEventListener("change",r):a.addListener&&a.addListener(r);let s=null,l=null;const i=()=>{r(),s===null&&typeof requestAnimationFrame<"u"&&(s=requestAnimationFrame(()=>{s=null,r()})),l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,r()},150)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{a.removeEventListener?a.removeEventListener("change",r):a.removeListener&&a.removeListener(r),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i),s!==null&&cancelAnimationFrame(s),l!==null&&clearTimeout(l)}},[e]);return wl.useSyncExternalStore(t,()=>Yi(e),()=>!1)}function ev(e){const[t,r]=o.useState(Yi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(e),s=i=>r(i.matches),l=a;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),r(a.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const tv=typeof wl.useSyncExternalStore=="function"?Q2:ev;function fn(e){const t=o.useContext(Ki),r=tv(e);return t&&typeof t.mobile=="boolean"&&J2(e)?t.mobile:r}const Er=[];let Pa=!1;function Zi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=Er[Er.length-1];t&&(e.stopPropagation(),t())}function ir(e){return Er.push(e),!Pa&&typeof document<"u"&&(document.addEventListener("keydown",Zi),Pa=!0),()=>{const t=Er.lastIndexOf(e);t>=0&&Er.splice(t,1),Er.length===0&&Pa&&typeof document<"u"&&(document.removeEventListener("keydown",Zi),Pa=!1)}}const Xi="(prefers-reduced-motion: reduce)";function nv(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Xi).matches}catch{return!1}}function Fa(){return fn(Xi)}const Ji={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function rv(e,t){const r=Object.keys(e).sort((a,s)=>s.length-a.length);for(const a of r){if(!t.startsWith(a))continue;const s=t.slice(a.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[a]+s}return null}function av(e){return rv(Ji,e)}function de(e){if(!e||Object.keys(Ji).length===0)return e;const t=[];for(const r of e.split(/\s+/)){if(!r)continue;const a=av(r);a&&t.push(a)}return t.length?`${e} ${t.join(" ")}`:e}function sn(e){const{anchorRect:t,anchorEl:r,offset:a=20,edgeMargin:s=20,prefer:l="top",onClose:i,closeOnOutsideClick:u=!0,className:c="",role:p="dialog",ariaLabel:h="",children:d,backdrop:m=!1,isMobilePopup:f=!1,useBorder:v=!0,header:y,focusOnOpen:x}=e||{},b=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,N]=o.useState(!1),[C,B]=o.useState("bottom"),[k,E]=o.useState(!1),[A,D]=o.useState(!1),j=!t&&!r,M=o.useRef(null),W=o.useCallback((V=!1,ne=!1)=>{if(A&&f)return;const te=r?r.getBoundingClientRect():t,P=ne&&M.current?M.current:te;if(!P||!b.current)return;const L=b.current,{offsetWidth:R,offsetHeight:U}=L,Z=window.innerWidth,X=window.innerHeight,ae=Z-P.right,Y=P.left,xe=P.top,ie=X-P.bottom;let J=0,F=0,Q="top";const H=xe>=U+a,le=ie>=U+a,re=l==="right"?ae>=R+a?"right":Y>=R+a?"left":null:null,ue=re?null:l==="bottom"?le?"bottom":H?"top":null:H?"top":le?"bottom":null;if(re==="right")Q="right",J=P.right+a,F=P.top;else if(re==="left")Q="left",J=P.left-a-R,F=P.top;else if(ue==="top")Q="top",F=P.top-a-U,J=P.left+P.width/2-R/2;else if(ue==="bottom")Q="bottom",F=P.bottom+a,J=P.left+P.width/2-R/2;else if(ae>=R+a)Q="right",J=P.right+a,F=P.top+P.height/2-U/2;else if(Y>=R+a)Q="left",J=P.left-a-R,F=P.top+P.height/2-U/2;else{const Re=Math.max(xe,ie,ae,Y);Re===xe?(Q="top",F=P.top-a-U,J=P.left+P.width/2-R/2):Re===ie?(Q="bottom",F=P.bottom+a,J=P.left+P.width/2-R/2):Re===ae?(Q="right",J=P.right+a,F=P.top+P.height/2-U/2):(Q="left",J=P.left-a-R,F=P.top+P.height/2-U/2)}const Be=Number.isFinite(Number(s))?Number(s):8;J=Math.min(Math.max(J,Be),Z-R-Be),F=Math.min(Math.max(F,Be),X-U-Be);const ke=Math.round(J),Ne=Math.round(F);V&&b.current?(b.current.style.left=`${ke}px`,b.current.style.top=`${Ne}px`,b.current.dataset.placement=Q):(B(Q||C),g({position:"fixed",left:ke,top:Ne}),E(!0))},[A,f,r,t,a,s,C,l]);o.useEffect(()=>()=>{M.current=null},[r,t]),o.useLayoutEffect(()=>{if(j)return;if(A&&f){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),E(!0);return}M.current===null&&(M.current=r?r.getBoundingClientRect():t??null),W(!1,!0);const V=requestAnimationFrame(()=>W(!1,!0));return()=>cancelAnimationFrame(V)},[t,r,a,d,s,j,A,f,W]),o.useEffect(()=>{if(j||A&&f||!b.current||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>{t&&W()});return V.observe(b.current),()=>V.disconnect()},[t,d,s,j,A,f,W]),o.useEffect(()=>{if(j||A&&f)return;let V=null;const ne=()=>{if(r&&(M.current=r.getBoundingClientRect()),typeof requestAnimationFrame>"u"){W(!0);return}V===null&&(V=requestAnimationFrame(()=>{V=null,W(!0)}))},te=P=>{if(!r&&i){const L=P.target;if(L&&b.current&&b.current.contains(L))return;try{if(L&&L.closest&&L.closest("[data-tooltip-ignore]"))return}catch{}O.current(!0);return}ne()};return window.addEventListener("resize",ne),document.addEventListener("scroll",te,{passive:!0,capture:!0}),()=>{V!==null&&cancelAnimationFrame(V),window.removeEventListener("resize",ne),document.removeEventListener("scroll",te,{capture:!0})}},[t,r,i,a,d,s,j,A,f,W]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const V=window.matchMedia("(max-width: 768px)"),ne=()=>D(!!V.matches);ne();try{V.addEventListener?V.addEventListener("change",ne):V.addListener(ne)}catch{try{V.addListener(ne)}catch{}}return()=>{try{V.removeEventListener?V.removeEventListener("change",ne):V.removeListener(ne)}catch{}}},[]);const z=o.useRef(!1),G=o.useRef(null),T=Fa(),I=o.useCallback((V=!1)=>{if(i&&!(w||z.current)){if(z.current=!0,V){N(!0);try{i&&i()}catch{z.current=!1,N(!1)}return}N(!0),G.current=setTimeout(()=>{G.current=null;try{i&&i()}catch{z.current=!1,N(!1)}},T?0:200)}},[w,i,N,T]);o.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),o.useEffect(()=>{if(j)return;const V=P=>{const L=b.current;if(!L)return;const R=P.target;if(R&&!L.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},ne=P=>{const L=b.current;if(!L)return;const R=P.target;if(R&&!L.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},te=P=>{if(P.key==="Tab"){const L=b.current;if(!L)return;const R=L.querySelectorAll(Sn);if(!R||R.length===0)return;const U=R[0],Z=R[R.length-1],X=document.activeElement;P.shiftKey?X===U&&(P.preventDefault(),Z.focus()):X===Z&&(P.preventDefault(),U.focus())}};return document.addEventListener("pointerdown",V,!0),document.addEventListener("click",ne,!0),document.addEventListener("keydown",te),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("click",ne,!0),document.removeEventListener("keydown",te)}},[i,u,I,j]);const O=o.useRef(I);o.useEffect(()=>{O.current=I});const pe=!!i;o.useEffect(()=>{if(!(j||!pe))return ir(()=>O.current())},[j,pe]),o.useEffect(()=>{const V=()=>{I(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",V),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",V)}},[I]);const se=o.useRef(null);o.useEffect(()=>{if(j||x===!1||!k)return;const V=b.current;if(!V)return;const ne=V.querySelector(Sn);if(ne)return se.current=document.activeElement,ne.focus({preventScroll:!0}),()=>{const te=se.current;se.current=null,te&&document.contains(te)&&te.focus({preventScroll:!0})}},[j,x,k]),o.useEffect(()=>{p==="dialog"&&!h&&kt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[p,h]);const $=n.jsxs("div",{ref:b,className:de(`tooltip__content ${j?"tooltip__content--inline":""} ${v?"tooltip__content--bordered":""} ${w?"is-closing":""} ${c} ${A&&f?"is-mobile":""}`),role:p,"aria-label":h||void 0,style:j?{}:{..._,visibility:k?"visible":"hidden"},tabIndex:-1,"data-placement":C,"data-left":j?"":_.left,"data-top":j?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[y!=null&&n.jsx("div",{className:de("tooltip__header h5"),children:y}),d]});if(j||typeof document>"u")return $;if(m||A&&f){const V=n.jsxs("div",{className:de("tooltip__portal"),children:[n.jsx("div",{className:de("tooltip__backdrop"),onClick:()=>{u&&I(!0)}}),$]});return bn.createPortal(V,document.body)}return bn.createPortal($,document.body)}function On(e){const{anchorRect:t,text:r,offset:a=8,onClose:s,className:l="",ariaLabel:i}=e||{};return r?n.jsx(sn,{anchorRect:t,offset:a,onClose:s,closeOnOutsideClick:!1,className:de(`info-tooltip ${l}`),ariaLabel:i||r,children:n.jsx("div",{className:de("info-tooltip__content body-3"),children:r})}):null}function Qn(e){const{t}=Ee.useTranslation(),{anchorRect:r,title:a,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h,prefer:d}=e||{},m=(Array.isArray(s)?s:s?[s]:[]).map(f=>typeof f=="string"?{text:f}:f);return!m.length&&!a?null:n.jsx(sn,{anchorRect:r,offset:c,...d?{prefer:d}:null,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:de("description-tooltip"),ariaLabel:a||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:de("description-tooltip__box"),children:[a&&n.jsx("span",{className:de("description-tooltip__title body-2"),children:a}),n.jsx("ol",{className:de(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:m.map((f,v)=>n.jsxs("li",{className:de(`description-tooltip__item body-3${v===l?" description-tooltip__item--active":""}`),children:[i&&m.length>1&&n.jsxs("span",{className:de("description-tooltip__index button-1"),children:[v+1,"."]}),f.color&&n.jsx("span",{className:de("description-tooltip__dot"),style:{background:f.color},"aria-hidden":"true"}),n.jsx("span",{children:f.text})]},v))})]})})}function aa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let rs=0,Qi=!1;function eu(){Qi||typeof document>"u"||(Qi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(rs=Date.now())},!0),document.addEventListener("touchstart",()=>{rs=Date.now()},{capture:!0,passive:!0}))}eu();function er(e){return!!e&&e.pointerType==="touch"}function ur(e=1e3){return eu(),Date.now()-rs<e}function Ia(e,t,r,{enabled:a=!0,fallbackOnParent:s=!1}={}){const l=aa(e),i=aa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!a||typeof document>"u")return;const h=d=>{const m=d,f=d.target,v=r.current,y=!!(f&&v&&v.contains(f));if(m.pointerType!=="touch"){y&&(u.current=null);return}if(y){u.current=l.current;return}u.current=null,l.current&&!(f&&f.closest?.(".tooltip__content"))&&i.current(!1,v)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[a,r,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??r.current),!0)},[r,i]);return o.useEffect(()=>{if(!a||!s)return;const h=r.current,d=h?.parentElement;if(!h||!d)return;let m=null;const f=x=>{const b=x.changedTouches?.[0];if(!b)return!1;const _=h.getBoundingClientRect();return b.clientX>=_.left&&b.clientX<=_.right&&b.clientY>=_.top&&b.clientY<=_.bottom},v=x=>{m=f(x)?l.current:null},y=x=>{const b=m;m=null,!(b===null||Date.now()-c.current<700||!f(x))&&(u.current=null,c.current=Date.now(),i.current(!b,h))};return d.addEventListener("touchstart",v,{passive:!0}),d.addEventListener("touchend",y),()=>{d.removeEventListener("touchstart",v),d.removeEventListener("touchend",y)}},[a,s,r,l,i]),{touchPress:p}}function ov(e,t){const{size:r,type:a,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:f,ariaLabel:v,variant:y="default",align:x="center",nowrap:b=!1,ellipsis:_=!1,selected:g,toggleable:w=!1,ariaExpanded:N,ariaControls:C,disabled:B=!1,loading:k=!1,useLabel:E=!0,labelHiddenBelow:A,useBorder:D=!0,useBG:j=!0,useDisabledCovered:M=!1,useDisabledInvisible:W=!1,useDisabledFilled:z=!1,width:G,minWidth:T,onClick:I,onDisabledClick:O,showTooltipInfo:pe=!1,tooltipInfoText:se=null,tooltipDescription:$=null,tooltipOnly:V=!1,iconSize:ne="medium",iconColor:te,shape:P="rounded",color:L,className:R,...U}=e,Z=kn(),X=r??Z??48,ae=typeof X=="string"&&isNaN(Number(X))?X.toLowerCase():String(Number(X)||48),Y=ae.match(/^\d+$/)?`button${ae}`:`button-${ae}`,xe=Number(X),ie=!isNaN(xe)&&xe<40?"button-2":"button-1",J=h??f,F=B||!!U.disabled,Q=F?M?"disabled-covered":W?"disabled-invisibled":z?"disabled-filled":"disabled":y,H=Q?`button--variant-${Q}`:"",le=x?`button--align-${x}`:"",re=b?"button--nowrap":"",ue=_?"button--ellipsis":"",Be=P?`button--shape-${P}`:"",ke=typeof te=="string"&&te.startsWith("--")?`var(${te})`:te,Ne={...G?{width:typeof G=="number"?`${G}px`:G}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...D?{}:{"--button-border":F?"0":"1px solid transparent"},...ke?{"--button-icon-color":ke}:{},...L?{"--color-main":L}:{}},Re=E===!1?"":J,ye=Array.isArray(Re)?Re.length>0:!!Re,_e=!!p,Ae=a??(ye||c||_e?"bar":"dot"),Ie=`${Y}--${Ae}`,je=o.useRef(null);o.useEffect(()=>{!Yn||s!==void 0||je.current?.closest("form")&&kt(`button-in-form:${typeof J=="string"?J:""}`,'[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 J=="string"&&J?` \uB2E8\uCD94: ${J}`:""))},[s,J]);const tt=o.useRef(t);tt.current=t;const Ct=o.useCallback(Ke=>{je.current=Ke;const K=tt.current;typeof K=="function"?K(Ke):K&&(K.current=Ke)},[]),Oe=o.useRef(F),[qe,nt]=o.useState(!!g),[We,Ze]=o.useState(!1),[ot,gt]=o.useState(null),ht=o.useCallback(()=>Ze(!1),[]),[xt,ut]=o.useState(!1),Gt=o.useId();o.useEffect(()=>{typeof g=="boolean"&&nt(g)},[g]),o.useEffect(()=>{if(Oe.current&&!F&&je.current){const Ke=je.current;let K=!1;try{K=Ke.matches(":focus:not(:focus-visible)")}catch{K=!1}K&&Ke.blur(),Ke.style.pointerEvents="none";const Ce=requestAnimationFrame(()=>{requestAnimationFrame(()=>{je.current&&(je.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ce)}Oe.current=F},[F]);const _t=typeof g=="boolean"?!!g:qe,Pt=typeof N=="boolean"?void 0:w||typeof g=="boolean"?_t?"true":"false":U["aria-pressed"],Qe=we("button",Y,Ie,H,le,re,ue,Be,_t?"is-selected":null,j?null:"button--no-bg",V?"button--tooltip-only":null,R),De=`button__icon button__icon--${ne}`,rt=Array.isArray(m)?m:m!==void 0?[m]:[],it=()=>{if(Array.isArray(Re))return Re.map((K,Ce)=>{const He=rt[Ce];return n.jsxs("span",{className:`button__label-text${He!==void 0?" button__label-text--has-sub":""}`,children:[K,He!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:He})]},Ce)});const Ke=m!==void 0;return n.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[Re,d!=null&&n.jsx("span",{className:"button__count",children:d}),Ke&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},bt=Ke=>{typeof g!="boolean"&&!w&&nt(!1),Ke.currentTarget.blur()},Nt=Ke=>{F||(typeof U.onMouseLeave=="function"&&U.onMouseLeave(Ke),bt(Ke))},It=Ke=>{if(V&&At&&Et.touchPress(Ke.currentTarget),F){At&&Et.touchPress(Ke.currentTarget),Ke.preventDefault(),O?.(Ke);return}typeof g!="boolean"&&w&&nt(K=>!K),I?.(Ke)},ft=o.useCallback(()=>{(pe||$)&&(Ze(!0),gt(je.current?.getBoundingClientRect()??null))},[pe,$]),mt=o.useCallback(()=>{(pe||$)&&(Ze(!1),gt(null))},[pe,$]),At=!!(pe||$),Et=Ia(We,Ke=>{Ke?ft():mt()},je,{enabled:At&&(F||V),fallbackOnParent:At&&F}),Je={...U};delete Je.disabled,delete Je.className,delete Je.faded,delete Je.useFaded,delete Je.loading,delete Je.onMouseLeave,delete Je.onPointerEnter,delete Je.onPointerLeave,delete Je.onPointerUp,delete Je.onFocus,delete Je.onBlur,F&&(Object.keys(Je).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof Je[Ke]=="function"&&delete Je[Ke]}),Je["aria-disabled"]="true"),k&&(Je["aria-busy"]="true");const wt=(typeof pe=="string"?pe:null)??(typeof se=="string"?se:null)??(typeof v=="string"?v:null)??(typeof J=="string"?J:null)??void 0,ce=typeof v=="string"?v:typeof J=="string"?J:ye?void 0:wt,Se=$?[$.title,...$.items??[]].filter(Boolean).join(". "):pe&&wt&&wt!==ce?wt:"",Pe=[typeof U["aria-describedby"]=="string"?U["aria-describedby"]:void 0,Se?Gt:null].filter(Boolean).join(" ")||void 0,Ge=()=>n.jsx("span",{className:`${De} button__spinner`,"aria-hidden":"true",children:n.jsx(Nr,{variant:"spinner",size:"100%"})}),st=(Ke,K)=>n.jsx(lt,{icon:Ke,label:K??ce,className:De,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Ot=Ke=>k?Ge():st(c,Ke),ct=()=>A&&A>0?n.jsx(sv,{below:A,className:`button__label ${ie}`,children:it()}):n.jsx("span",{className:`button__label ${ie}`,children:it()}),Yt=()=>Ae==="dot"?n.jsxs(n.Fragment,{children:[Ot(),ye&&ct()]}):x==="center"&&(c||k)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ot()}),ye&&ct()]}),_e&&n.jsx("span",{className:"button__right",children:st(p)})]}):n.jsxs(n.Fragment,{children:[(c||k)&&n.jsx("span",{className:"button__left",children:Ot(v??J)}),ye&&ct(),_e&&n.jsx("span",{className:"button__right",children:st(p)})]}),$t=!!l&&!F;return n.jsxs(n.Fragment,{children:[n.jsxs($t?"a":"button",{...Je,ref:Ct,...$t?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:F&&!O&&!xt},className:Qe,"aria-pressed":Pt,"aria-expanded":typeof N=="boolean"?N:U["aria-expanded"],"aria-controls":C??U["aria-controls"],"aria-label":ce,"aria-disabled":F&&($t||O||xt)?!0:void 0,"aria-describedby":Pe,style:Ne,onClick:It,onMouseLeave:Nt,onPointerEnter:Ke=>{er(Ke)||ft(),!F&&typeof U.onPointerEnter=="function"&&U.onPointerEnter(Ke)},onPointerLeave:Ke=>{er(Ke)||mt(),!F&&typeof U.onPointerLeave=="function"&&U.onPointerLeave(Ke)},onPointerUp:Ke=>{F&&At&&Et.touchPress(Ke.currentTarget),!F&&typeof U.onPointerUp=="function"&&U.onPointerUp(Ke)},onFocus:Ke=>{ut(!0),ur()||ft(),!F&&typeof U.onFocus=="function"&&U.onFocus(Ke)},onBlur:Ke=>{ut(!1),F||bt(Ke),mt(),!F&&typeof U.onBlur=="function"&&U.onBlur(Ke)},children:[Yt(),Se?n.jsx("span",{id:Gt,hidden:!0,"aria-label":Se}):null]}),We&&$?n.jsx(Qn,{anchorRect:ot,title:$.title,items:$.items,onClose:ht}):We&&wt?n.jsx(On,{anchorRect:ot,text:wt,onClose:ht}):null]})}const fe=o.forwardRef(ov);fe.displayName="Button";function sv({below:e,className:t,children:r}){const a=fn(`(max-width: ${e-.02}px)`);return n.jsx("span",{className:t,style:a?{display:"none"}:void 0,children:r})}function Ht(e,t,r){const a=o.useRef(null);return o.useLayoutEffect(()=>{const s=a.current?.parentElement??null;return t(s,e),()=>r(s)},[e,t,r]),a}const oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},as=new WeakMap;function os(e){if(e)return as.get(e)}function ln(e,t){e&&(e.style.setProperty(oa.title,t.title),e.style.setProperty(oa.description,t.description),as.set(e,t))}function un(e){e&&(e.style.removeProperty(oa.title),e.style.removeProperty(oa.description),as.delete(e))}const tu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function nu(){const e=Ht(tu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ru={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function au(){const e=Ht(ru,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ou={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function su(){const e=Ht(ou,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const lu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function iu(){const e=Ht(lu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const uu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function cu(){const e=Ht(uu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const du={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function pu(){const e=Ht(du,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const hu={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function mu(){const e=Ht(hu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const fu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Cu(){const e=Ht(fu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const gu={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function bu(){const e=Ht(gu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const yu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vu(){const e=Ht(yu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const xu={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function _u(){const e=Ht(xu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const wu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Bu(){const e=Ht(wu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const ku={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Au(){const e=Ht(ku,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Nu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Eu(){const e=Ht(Nu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const Cn=(e,t,r)=>({key:e,get label(){return Mt.t(`promoBannerBg.${e}`,t)},textTone:r}),lv=[Cn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("soft","\uC18C\uD504\uD2B8","dark"),Cn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),Cn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),Cn("warm","\uC6DC(\uAC15\uC870)","dark"),Cn("dark","\uB2E4\uD06C","light"),Cn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),Cn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),Cn("outline","\uC544\uC6C3\uB77C\uC778","dark"),Cn("success","\uC131\uACF5/\uC644\uB8CC","light"),Cn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),Cn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],ju={main:nu,soft:au,sub:su,deep:iu,softSub:cu,warm:pu,dark:mu,radial:Cu,diagonal:bu,dots:vu,outline:_u,success:Bu,naver:Au,instagram:Eu};function Du({storageKey:e="fontScale",baseFont:t=20,minScale:r=.8,maxScale:a=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=g=>Math.max(r,Math.min(a,Number(g))),u=g=>{try{const w=localStorage.getItem(g),N=w?Number(w):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=g=>{p(typeof g=="function"?w=>i(g(w)):i(g))},f=()=>m(g=>+(g+s).toFixed(6)),v=()=>m(g=>+(g-s).toFixed(6)),y=c<a-Number.EPSILON,x=c>r+Number.EPSILON,b=Math.round(t*c),_=Math.round(b*l);return{scale:c,setScale:m,increase:f,decrease:v,canIncrease:y,canDecrease:x,fontSize:b,lineHeight:_}}function Su(e,t){const r=aa(t);o.useEffect(()=>{const a=()=>r.current();try{window.addEventListener(e,a)}catch{}return()=>{try{window.removeEventListener(e,a)}catch{}}},[e,r])}const ss=" \xB7 ",Tu=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ss)?e.split(ss).pop()??e:e})(),iv=o.createContext(!1),cr=[];let Mu=null;function uv(e){const t=o.useContext(iv);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;cr.length===0&&(Mu=document.title);const r={text:Tu?`${e}${ss}${Tu}`:e};return cr.push(r),document.title=r.text,()=>{const a=cr.lastIndexOf(r);a>=0&&cr.splice(a,1),document.title=cr.length?cr[cr.length-1].text:Mu??document.title}},[e,t])}const ls=[{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"}],cv=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function xn(e,t){return cv().compare(e,t)}const Oa=new Map;function dv(e){const t=Oa.get(e);if(t)return t;const r=[],a=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=a.exec(e);l;l=a.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&r.push(e.slice(s,i)),r.push(Number(u)),s=l.index+l[0].length}return s<e.length&&r.push(e.slice(s)),Oa.size>5e3&&Oa.clear(),Oa.set(e,r),r}function pv(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 hv(e,t){const r=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),a=r(e),s=r(t);if(a===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=pv(h);return d!==null?[d]:dv(h)},i=l(e,a),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=xn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:xn(a,s)}const $u=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function za(e,t,r){const a=$u(e),s=$u(t);if(a||s)return a===s?0:a?1:-1;const l=hv(e,t);return r?l:-l}function mv(e,t,r){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(()=>{const v=r?.initialPageSize;return v&&ls.some(y=>y.value===v)?v:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>ls.map(v=>({...v,label:a("visits.showN",{n:v.value})})),[a]),d=o.useCallback(v=>{ls.some(y=>y.value===v)&&(l(v),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),f=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==f&&u(f),{pageRows:o.useMemo(()=>e.slice((f-1)*Number(s),f*Number(s)),[e,f,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:f,total:m,onChange:u},setPage:u}}function fv(e){const[t,r]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),a=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const p=a.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};a.current=h,r(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,f)=>za(p(m,h),p(f,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const Tn="\uC804\uCCB4",Cv={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"})},gv={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"})},bv={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 yv(e,t){if("place"in t)return Cv[t.place](e);const r=gv[t.vowel](e);return t.glide?`${r} \xB7 ${bv[t.glide](e)}`:r}const vv=(e,{defaultValue:t})=>t,Lu=(e,t)=>({jamos:e,phonetic:t,tooltip:yv(vv,t)}),zn=(e,t)=>t.map(r=>Lu([r],{place:e})),Jt=(e,t,r)=>Lu([...e],r?{vowel:t,glide:r}:{vowel:t}),is={cho:[zn("labial",["\u3142","\u3143","\u314D","\u3141"]),zn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),zn("alveolar",["\u3145","\u3146"]),zn("palatal",["\u3148","\u3149","\u314A"]),zn("velar",["\u3131","\u3132","\u314B"]),zn("glottal",["\u314E"])],jung:[[Jt("\u3163","frontHigh"),Jt("\u315F","frontHigh","w"),Jt("\u3162","frontHigh","velar")],[Jt("\u3161","backHighUnrounded")],[Jt("\u315C","backHighRounded"),Jt("\u3160","backHighRounded","j")],[Jt("\u3154\u3150","frontMid"),Jt("\u3156\u3152","frontMid","j"),Jt("\u3159\u315A\u315E","frontMid","w")],[Jt("\u3153","backMidUnrounded"),Jt("\u3155","backMidUnrounded","j"),Jt("\u315D","backMidUnrounded","w")],[Jt("\u3157","backMidRounded"),Jt("\u315B","backMidRounded","j")],[Jt("\u314F","low"),Jt("\u3151","low","j"),Jt("\u3158","low","w")]],jong:[zn("labial",["\u3142","\u3141"]),zn("alveolar",["\u3137","\u3134","\u3139"]),zn("velar",["\u3131","\u3147"])]},xv=e=>e===_v?[]:Array.from(e),_v="__NO_CODA__",us=e=>e.map(t=>t.map(({jamos:r,phonetic:a,tooltip:s})=>({v:r.join(""),phonetic:a,tooltip:s}))),Ru={cho:us(is.cho),jung:us(is.jung),jong:us(is.jong)};Ru.jung.flat().forEach(({v:e})=>{for(const t of xv(e));}),new Set(Ru.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(Tb).map(([e,{nucleus:t}])=>[e,t]));function wv(e,t=!0){const r=aa(e);o.useEffect(()=>{if(t)return ir(()=>{r.current?.()})},[t,r])}function Wa(){const[e,t]=o.useState(null),r=o.useCallback(l=>t(l.getBoundingClientRect()),[]),a=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:r,close:a,toggleAt:s}}function Bv(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),r(null),s(null)},[]);return{payload:t,anchorRect:a,openAfterDelay:i,close:u}}function Pu(e="warning"){const[t,r]=o.useState(""),[a,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),r(d),i(f=>f+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>r(""),[]);return{toastMessage:t,toastType:a,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function sa(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let r=e;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement){const a=parseInt(window.getComputedStyle(r).zIndex,10);!Number.isNaN(a)&&a>t&&(t=a)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function la({computeStyle:e,onScroll:t="close",onResize:r="close",ignoreOutsideClickSelector:a}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let f=p.current?.offsetHeight??0;f>0&&h();let v=0,y=null;typeof ResizeObserver<"u"&&p.current&&(y=new ResizeObserver(()=>{const B=p.current?.offsetHeight??0;if(B!==f){if(f=B,++v>4){y?.disconnect(),y=null;return}h()}}),y.observe(p.current));const x=B=>{const k=B.target;a&&k.closest?.(a)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",x),document.addEventListener("pointerdown",x);let b=null;const _=()=>{if(typeof requestAnimationFrame>"u"){h();return}b===null&&(b=requestAnimationFrame(()=>{b=null,h()}))},g=B=>{p.current?.contains(B.target)||(t==="reposition"?_():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",g,!0);const w=()=>{r==="reposition"?_():r==="close"&&l(!1)};let N=null;const C=()=>{w(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,r==="reposition"&&h()},250)};return r!=="ignore"&&(window.addEventListener("resize",w),window.addEventListener("orientationchange",C)),()=>{b!==null&&cancelAnimationFrame(b),y?.disconnect(),document.removeEventListener("mousedown",x),document.removeEventListener("pointerdown",x),t!=="ignore"&&window.removeEventListener("scroll",g,!0),r!=="ignore"&&(window.removeEventListener("resize",w),window.removeEventListener("orientationchange",C)),N&&clearTimeout(N)}},[s,h,t,r,a]),o.useEffect(()=>{if(s)return ir(()=>l(!1))},[s]);const d=o.useCallback(()=>l(f=>!f),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function kv(e,{mode:t="playback",autoStart:r=!1,onPlaySpeaker:a,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[f,v]=o.useState(null),[y,x]=o.useState([]),[b,_]=o.useState(null),[g,w]=o.useState(0),N=o.useRef(0),C=o.useCallback($=>{N.current=typeof $=="function"?$(N.current):$,w(N.current)},[]),B=o.useRef(a),k=o.useRef(s);o.useEffect(()=>{B.current=a,k.current=s},[a,s]);const E=o.useRef([]),A=()=>{E.current.forEach(clearTimeout),E.current=[]},D=($,V)=>{E.current.push(setTimeout(V,$))};o.useEffect(()=>()=>A(),[]);const j=u[p]?.id??null,M=o.useRef(null),W=o.useCallback(()=>{A(),m("playing"),x([]),_(null),C(0);let $=0;e.forEach((V,ne)=>{D($,()=>{h(ne),v(V.id),B.current?.(V)}),D($+1e3,()=>{v(null),x(te=>[...te,V.id])}),$+=1300}),D($,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,C]),z=o.useCallback(($,V)=>{if(V>=$.length){m("done"),k.current?.({score:N.current,total:$.length});return}M.current=null,h(V),_(null),m("playing"),v($[V].id),B.current?.($[V]),D(l,()=>{v(null),m("waiting")})},[l]),G=o.useCallback(()=>{A();const $=Jr(e);c($),C(0),x([]),z($,0)},[e,z,C]),T=o.useCallback(()=>{t==="playback"?(c(e),W()):G()},[t,e,W,G]),I=o.useCallback(()=>{A(),m("idle"),v(null),x([]),_(null),h(0),C(0),c([])},[C]),O=JSON.stringify(e.map($=>[$.id,$.label,$.angleDeg,$.deg,$.row,$.shortcut]));o.useEffect(()=>(r?T():I(),()=>A()),[t,O,r]);const pe=o.useCallback($=>{d!=="waiting"||t==="playback"||M.current===p||(M.current=p,_($),$===u[p]?.id&&C(V=>V+1),t==="exam"?(m("playing"),D(400,()=>z(u,p+1))):(m("feedback"),D(i,()=>z(u,p+1))))},[d,t,u,p,z,i,C]),se=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:f,playedIds:y,selectedId:b,answerId:j,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:pe},index:p,total:se,score:g,phase:d,done:d==="done",start:T,reset:I}}const cs=new Map,ds=new Map,Av=()=>()=>{},Nv=()=>!0,Ev=()=>!1;function Fu(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const r=Uint8Array.from(atob(t[2]),a=>a.charCodeAt(0));return new TextDecoder("utf-8").decode(r)}catch{return null}}function jv(e){if(typeof window>"u")return"";const t=(r,a)=>{const s=a.attrName.toLowerCase(),l=a.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(a.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(a.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function Dv(e,t){const r=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))r.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))r.add(i[1]);const a=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...r].filter(i=>a.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Sv(e){const t=ds.get(e);if(t)return t;const r=fetch(e).then(a=>a.ok?a.text():null).then(a=>(a!=null&&cs.set(e,a),a)).catch(()=>null).finally(()=>{ds.delete(e)});return ds.set(e,r),r}function Tv(e,t=!0){const r=o.useSyncExternalStore(Av,Nv,Ev)&&t&&e?Fu(e)??cs.get(e)??null:null,[a,s]=o.useState({src:e,enabled:t,svg:r});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Fu(e)??cs.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Sv(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),a.src===e&&a.enabled===t?a.svg:r}const Mv=e=>String(e);function $v(e,t=Mv){const[r,a]=o.useState(null),[s,l]=o.useState(null),i=o.useCallback(c=>({draggable:!0,onDragStart:p=>{a(c),p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",t(c))},onDragEnd:()=>{a(null),l(null)}}),[t]),u=o.useCallback((c,p)=>{const h=r!=null&&(!p||p(r));return{onDragOver:d=>{h&&(d.preventDefault(),d.dataTransfer.dropEffect="move",l(c))},onDragEnter:()=>{h&&l(c)},onDragLeave:d=>{h&&!d.currentTarget.contains(d.relatedTarget)&&l(m=>m===c?null:m)},onDrop:d=>{if(!h||r==null)return;d.preventDefault();const m=r;l(null),a(null),e(m,c)}}},[r,e]);return{dragging:r,draggingId:r==null?null:t(r),dragOverKey:s,cardProps:i,groupProps:u}}const Lv=[10,25,50,100];function Rv(e=Lv){const{t}=Ee.useTranslation(),r=e.join(",");return o.useMemo(()=>e.map(a=>({value:String(a),label:t("common.pageSizeLabel",{n:a,defaultValue:"{{n}}\uAC1C\uC529 \uBCF4\uAE30"})})),[r,t])}function Pv(e){o.useEffect(()=>{if(!e||typeof navigator>"u")return;const t=navigator.wakeLock;if(!t)return;let r=null,a=!1;const s=async()=>{if(!(a||r||document.visibilityState!=="visible"))try{const i=await t.request("screen");if(a){i.release().catch(()=>{});return}r=i,i.addEventListener("release",()=>{r===i&&(r=null)})}catch{}},l=()=>{document.visibilityState==="visible"&&s()};return s(),document.addEventListener("visibilitychange",l),()=>{a=!0,document.removeEventListener("visibilitychange",l),r&&(r.release().catch(()=>{}),r=null)}},[e])}const Iu="__ihabBackClosable",dr=[];let Ha=0,Ou=!1,Fv=1;function ps(){try{const e=window.history.state?.[Iu];return typeof e=="number"?e:void 0}catch{return}}function zu(e){try{const t=window.history.state??{};window.history.pushState({...t,[Iu]:e},"")}catch{}}function Iv(){if(Ha>0){Ha--;return}const e=dr[dr.length-1];if(e&&ps()!==e.id){if(e.onBack()===!1){zu(e.id);return}dr.pop()}}function Ov(){Ou||typeof window>"u"||(window.addEventListener("popstate",Iv),Ou=!0)}function Wu(e,t){const r=o.useRef(t);o.useEffect(()=>{r.current=t});const a=o.useRef(null);o.useEffect(()=>{if(!e||typeof window>"u")return;Ov();const s=a.current??(a.current=Fv++),l={id:s,onBack:()=>r.current()};return dr.push(l),ps()!==s&&zu(s),()=>{const i=dr.indexOf(l);if(i<0){a.current=null;return}dr.splice(i,1),setTimeout(()=>{if(!dr.some(u=>u.id===s)&&(a.current===s&&(a.current=null),ps()===s)){Ha++;try{window.history.back()}catch{Ha--}}},0)}},[e])}const Hu=260;function zv({title:e,description:t,actionLabel:r,onAction:a,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[f,v]=o.useState("main"),y=fn("(max-width: 767px)"),x=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=os(g),N=(C,B,k)=>{if(k!==void 0)g.style.setProperty(B,k),x.current[C]=!0;else if(x.current[C]){const E=w?.[C];E?g.style.setProperty(B,E):g.style.removeProperty(B),x.current[C]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=os(g);v(w?.actionVariant??"main")},[d]);const b=we("promo-banner",`promo-banner--${i}`,h),_=ju[d];return n.jsxs("div",{ref:m,className:b,role:"note",children:[n.jsx(_,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),r&&a&&n.jsx(fe,{htmlType:"button",size:40,variant:u??f,shape:"pill",useBorder:!0,onClick:a,ariaLabel:r,...y?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:r,minWidth:140}})]})}function Wv({children:e,interval:t=5e3,dotTone:r,className:a="","aria-label":s}){const{t:l}=Ee.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[f,v]=o.useState(!1),[y,x]=o.useState(!1),b=o.useRef(null),_=o.useRef(null),g=o.useRef(null),w=Fa(),N=d||f||y,C=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||w)return;const k=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,N,w]);const B=k=>{_.current!=null&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{_.current=null,x(!1)},k)};return o.useEffect(()=>()=>{_.current!=null&&window.clearTimeout(_.current)},[]),o.useEffect(()=>{if(!y)return;const k=E=>{E.pointerType==="touch"&&(g.current&&g.current.contains(E.target)||(_.current!=null&&(window.clearTimeout(_.current),_.current=null),x(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[y]),c===0?null:n.jsxs("section",{ref:g,className:we("top-banner",a),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{b.current=k.pointerType},onPointerDown:k=>{b.current=k.pointerType,k.pointerType==="touch"&&(_.current!=null&&(window.clearTimeout(_.current),_.current=null),x(!0))},onPointerUp:k=>{k.pointerType==="touch"&&B(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&B(5e3)},onMouseEnter:()=>{b.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let E=!0;try{E=k.target.matches(":focus-visible")}catch{E=!0}v(E)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||v(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${C*100}%)`},children:u.map((k,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==C,...E!==C?{inert:!0}:{},children:k},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(r?.[C]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===C?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===C,onClick:()=>h(E)},E))})]})}function Hv({title:e,body:t,open:r=!1,onToggle:a,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Ee.useTranslation();return n.jsxs("div",{className:`accordion-item ${r?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":r,"data-accordion-header":!0,onClick:a,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),a?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(lt,{icon:r?"chevron-up":"chevron-down",label:r?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),r&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Vv({items:e=[],defaultOpenIndex:t=0,size:r=72,className:a="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${r} ${a}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(Hv,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function qv(){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 Uv(){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 Gv(){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 Mn({children:e,icon:t,number:r,position:a="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:p="",variant:h,color:d,fill:m="filled"}){const{t:f}=Ee.useTranslation(),v=t===void 0||t==="check"||t==="remove"||t==="minus",y=v?t??"check":"check",x=r!==void 0,b=e!==void 0||x?"number":v?y:"icon",_=d?.startsWith("--")?`var(${d})`:d,g=!!(h||_),w={24:11,32:15,40:19}[s],N=e!==void 0?void 0:x?f("badge.nthSelected",{n:r,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):v?{check:f("badge.selected","\uC120\uD0DD\uB428"),remove:f("badge.remove","\uC81C\uAC70"),minus:f("badge.exclude","\uC81C\uC678")}[y]:void 0,C=c?void 0:u??N;return n.jsxs("span",{className:we("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${a}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",g?"circle-badge--colored":"",g&&h?`badge--${h}`:"",g&&m!=="filled"?`circle-badge--${m}`:"",p),style:_?{"--badge-color":_}:void 0,onClick:i,onKeyDown:i?B=>{B.key!=="Enter"&&B.key!==" "||(B.preventDefault(),B.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(x?r:null),e===void 0&&!x&&v&&y==="check"&&n.jsx(qv,{}),e===void 0&&!x&&v&&y==="remove"&&n.jsx(Uv,{}),e===void 0&&!x&&v&&y==="minus"&&n.jsx(Gv,{}),e===void 0&&!x&&!v&&n.jsx(lt,{icon:t,size:w})]})}function jr(e){const t=(e??"").trim().toUpperCase();return/^[A-Z]$/.test(t)?`Key${t}`:/^[0-9]$/.test(t)?`Digit${t}`:null}function Va(e){return e>=0&&e<9?String(e+1):null}function hs(e){return e.map((t,r)=>{const a=t.shortcut;return{...t,shortcut:a!==void 0?a:Va(r)}})}function Vu(e){const t=new Map;for(const r of e??[])for(const a of r?.items??[]){const s=a&&!a.disabled?jr(a.shortcut):null;s&&t.set(s,(t.get(s)??0)+1)}return[...t].filter(([,r])=>r>1).map(([r])=>r.replace(/^Key|^Digit/,""))}function tr({columns:e=[],onClose:t,className:r="",size:a="medium"}){const{t:s}=Ee.useTranslation(),l=a==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const b=[{title:null,columns:e}];let _=e;for(const g of i){const w=_?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;_=[{title:null,items:w.children}],b.push({title:w.label||null,columns:_})}return b},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(b=>b.slice(0,Math.max(0,Math.min(b.length,h)-1))),[h]),m=o.useRef(null),f=o.useRef(null),v=c.length;o.useEffect(()=>{f.current||(f.current=document.activeElement);let b=0,_=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}_++<20&&(b=requestAnimationFrame(g))};return b=requestAnimationFrame(g),()=>cancelAnimationFrame(b)},[v]),o.useEffect(()=>()=>{f.current?.focus?.({preventScroll:!0})},[]);const y=o.useCallback((b,_,g)=>{if(b){if(Array.isArray(b.children)&&b.children.length){u(w=>[...w.slice(0,h),{ci:_,ii:g}]);return}try{typeof b.onClick=="function"&&b.onClick()}catch{}try{b&&b.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);o.useEffect(()=>{const b=Vu(p.columns);b.length&&kt(`menu-shortcut-dup:${b.join(",")}:${p.columns.flatMap(_=>_.items.map(g=>g.label)).join("|")}`,`[MenuTooltip] \uD55C \uBA54\uB274 \uC548\uC5D0\uC11C \uB2E8\uCD95\uD0A4\uAC00 \uACB9\uCE69\uB2C8\uB2E4: ${b.join(", ")} \u2014 \uC55E\uC758 \uD56D\uBAA9\uB9CC \uBA39\uC2B5\uB2C8\uB2E4.`)},[p.columns]);const x=o.useRef({columns:p.columns,handleClick:y});return x.current={columns:p.columns,handleClick:y},o.useEffect(()=>{const b=_=>{if(_.defaultPrevented||_.ctrlKey||_.metaKey||_.altKey)return;const g=_.target;if(g&&g.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))return;const{columns:w,handleClick:N}=x.current;for(let C=0;C<(w?.length??0);C++){const B=w[C]?.items??[];for(let k=0;k<B.length;k++){const E=B[k];if(!(!E||E.disabled||jr(E.shortcut)!==_.code)){_.preventDefault(),N(E,C,k);return}}}};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]),n.jsxs("div",{className:de(`menu-tooltip menu-tooltip--${a} ${r}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:de("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:de("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:de("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((b,_)=>{const g=(b.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:de("menu-tooltip__column"),children:[b.title?n.jsx("div",{className:de("menu-tooltip__column-title body-3"),children:b.title}):null,n.jsx("div",{className:de("menu-tooltip__items"),children:(b.items||[]).map((w,N)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&N>0&&n.jsx("div",{className:de("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:de("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Mn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):jr(w.shortcut)?n.jsx("kbd",{className:de("menu-tooltip__shortcut caption-1"),"aria-hidden":"true",children:w.shortcut.trim().toUpperCase()}):void 0,"aria-keyshortcuts":jr(w.shortcut)?w.shortcut.trim().toUpperCase():void 0,ellipsis:jr(w.shortcut)?!0:void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>y(w,_,N),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},N))})]},_)})})]})}const qu=".content-area";function ms(e,t="Nav"){try{const r=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(qu);if(r){r.scrollTop=0;return}const a=document.scrollingElement??document.documentElement;a&&a.scrollHeight<=a.clientHeight&&kt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${qu}) \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 fs=52,qa=10,Uu=e=>e&&e>0?e:0;function Gu({items:e=[],activeKey:t,onChange:r,appMode:a,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Ee.useTranslation(),c=a==="manager"?"malgwi":"manager",p=a==="manager"?"arrow-left":"arrow-right",h=a==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,f]=o.useState(0),v=e.length;o.useEffect(()=>{const $=d.current;if(!$)return;const V=()=>{const P=typeof getComputedStyle=="function"?getComputedStyle($):null,L=$.clientWidth-(parseFloat(P?.paddingLeft??"")||0)-(parseFloat(P?.paddingRight??"")||0),R=$.querySelector(".bottom-nav__left"),U=R?.nextElementSibling,Z=(R?.offsetWidth??0)+(R&&U?.classList.contains("bottom-nav__divider")?U.offsetWidth:0);f(Math.max(0,L-Z))};if(V(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(V);ne.observe($);const te=$.querySelector(".bottom-nav__left");return te&&ne.observe(te),()=>ne.disconnect()},[s]);const y=fs+1,x=$=>Math.max(0,Math.floor(($+qa)/(fs+qa))),b=v*(fs+qa)-qa<=m,_=m<=0||l.length===0&&b?v:Math.min(v,x(m-y)),g=m>0&&_<v,w=g?_:v,N=e.slice(0,w),C=e.slice(w),B=g||l.length>0,k=o.useCallback(($,V)=>({position:"fixed",bottom:window.innerHeight-$.top+8,right:window.innerWidth-$.right,zIndex:sa(V)}),[]),E=o.useId(),{open:A,toggle:D,close:j,style:M,triggerRef:W,menuRef:z}=la({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),G=o.useCallback(($,V)=>V>0?u("nav.badgeLabel",{label:$,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):$,[u]),T=o.useCallback(($,V)=>V>0?u("nav.badgeInsideLabel",{label:$,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):$,[u]),I=o.useCallback(()=>s?.(c),[s,c]),O=o.useMemo(()=>C.find($=>!!$.key&&$.key===t)??l.find($=>$.selected||$.key&&$.key===t),[C,t,l]),pe=o.useMemo(()=>[{items:hs([...C.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:!!$.key&&$.key===t,closeOnSelect:!0,disabled:$.state==="disabled",onClick:()=>{$.state!=="disabled"&&($.key&&r&&(r($.key),ms(i,"BottomNav")),j())}})),...l.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===t),closeOnSelect:!0,onClick:()=>{$.onClick?.(),j()}}))])}],[C,l,t,r,j]),se=[...C,...l].reduce(($,V)=>$+Uu(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:I})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map(($,V)=>{const ne=Uu($.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:$.icon,ariaLabel:G($.label,ne),selected:!!$.key&&$.key===t,disabled:$.state==="disabled",className:"bottom-nav-item",onClick:()=>{$.key&&(r?.($.key),ms(i,"BottomNav"))}}),ne>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Mn,{position:"top-right",number:Math.min(ne,99),size:24})})]},$.key??`__slot-${V}`)})}),B&&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:W,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:O?.icon??"ellipsis",ariaLabel:T(O?.label??u("nav.more","\uB354\uBCF4\uAE30"),se),selected:!!O,className:"bottom-nav-item",onClick:D,"aria-expanded":A,"aria-controls":A?E:void 0}),se>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Mn,{position:"top-right",number:Math.min(se,99),size:24})}),A&&bn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:de("tooltip__content"),style:M,ref:z,children:n.jsx(tr,{columns:pe,onClose:j})}),document.body)]})})]})]})}function Ku(e){if(typeof e!="string")return!1;let t="";for(const a of e){const s=a.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=a)}if(!t)return!1;const r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return r?["http","https","mailto","tel"].includes(r[1].toLowerCase()):!0}function Yu(e,t,r){return r&&r>0?e("nav.badgeLabel",{label:t,count:r,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Kv(e){const{t}=Ee.useTranslation(),{activeKey:r,unreadCount:a,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:r==="debug"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:r==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Yu(t,t("nav.notifications","\uC54C\uB9BC"),a),onClick:l,selected:r==="notifications"}),!!a&&a>0&&n.jsx(Mn,{position:"top-right",number:Math.min(a,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:r==="settings"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:r==="feedback"}),p&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:r==="account"})]}):null}function Zu(e){const{t}=Ee.useTranslation(),{item:r,itemKey:a,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=r?.key??a??"",m=r?.label??s??"",f=r?.icon??l??"",v=r?.badge??0,y=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:f,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),x=p==="disabled",b=`side-nav__item ${i?"active":""} ${p||""} ${x?"disabled":""} ${r?.child?"side-nav__item--child":""}`,_=o.useCallback(g=>{if(x)return;const w=g.detail>0;if(w)try{g.currentTarget.blur()}catch{}u?.(d,g.currentTarget,w)},[x,d,u]);return n.jsxs("button",{type:"button",className:b,onClick:_,"aria-label":typeof m=="string"?Yu(t,m,v):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":x,children:[y,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),v>0&&n.jsx(Mn,{position:"inline",number:Math.min(v,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Xu(e){const{t}=Ee.useTranslation(),{items:r=[],activeKey:a,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f,scrollContainer:v}=e||{},y=m==="manager",x=o.useCallback(()=>f?.(y?"malgwi":"manager"),[f,y]),b=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const k=b.current;if(!k)return;let E=null;const A=()=>{const{scrollHeight:M,clientHeight:W,scrollTop:z}=k;if(M<=W+1){g(pe=>pe===null?pe:null);return}const G=Math.max(24,W/M*W),T=W-G,I=M-W,O={top:Math.round(z/I*T),height:Math.round(G)};g(pe=>pe&&pe.top===O.top&&pe.height===O.height?pe:O)},D=()=>{if(typeof requestAnimationFrame>"u"){A();return}E===null&&(E=requestAnimationFrame(()=>{E=null,A()}))};A(),k.addEventListener("scroll",D,{passive:!0});const j=typeof ResizeObserver<"u"?new ResizeObserver(D):null;j?.observe(k);for(const M of Array.from(k.children))j?.observe(M);return()=>{E!==null&&cancelAnimationFrame(E),k.removeEventListener("scroll",D),j?.disconnect()}},[r]);const w=o.useRef(null),N=o.useCallback(k=>{const E=b.current;E&&(k.preventDefault(),w.current={y:k.clientY,top:E.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),C=o.useCallback(k=>{const E=b.current,A=w.current;!E||!A||(E.scrollTop=A.top+(k.clientY-A.y)*(E.scrollHeight/E.clientHeight))},[]),B=o.useCallback(k=>{w.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[n.jsxs("div",{ref:b,className:"side-nav__menu-list",children:[_&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:_.top,height:_.height},onPointerDown:N,onPointerMove:C,onPointerUp:B,onPointerCancel:B})}),(r||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,E)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Zu,{item:k,active:!!k.key&&k.key===a,state:k.disabled?"disabled":void 0,onClick:(A,D,j)=>{if(k.disabled)return;if(k.href){if(Ku(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),j)try{D?.blur()}catch{}return}if(s?.(k.key),ms(v,"SideNav"),!j)return;try{D?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const M=document.querySelector(".header");if(M){const W=typeof M.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&W&&M.matches(":hover"))){M.classList.add("header--force-collapsed");const z=()=>{M.classList.remove("header--force-collapsed"),M.removeEventListener("mouseenter",z)};M.addEventListener("mouseenter",z)}}}})]},k.key??`side-nav__item-${E}`)),f&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),f&&n.jsx(Zu,{item:{key:"__mode-switch__",label:y?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:y?"arrow-left":"arrow-right"},onClick:x})]}),n.jsx(Kv,{activeKey:a,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var Ua='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Cs='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Yv='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 Ju({src:e,alt:t,className:r,style:a,tone:s,textColor:l}){const i=!s&&!!l,u=Tv(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:we("brand-logo","brand-logo--tone",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Dv(jv(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",r),style:a,draggable:!1})}function Qu({appMode:e}){const{t}=Ee.useTranslation(),r=e==="manager",a=r?Cs:Ua,s=Yv;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),r?n.jsx("img",{src:a,alt:t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):n.jsx(Ju,{src:a,alt:t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function ec({activeKey:e,onChange:t,items:r,malgwiItems:a,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f,scrollContainer:v}){const{t:y}=Ee.useTranslation(),x=fn("(max-width: 767px)"),b=o.useMemo(()=>(r??[]).filter(M=>!M.section&&(M.key||M.label)).map(M=>({key:M.key,label:typeof M.label=="string"?M.label:void 0,icon:M.icon,state:M.disabled?"disabled":void 0,badgeCount:M.badge})),[r]),_=o.useCallback(M=>{const W=r?.find(z=>z.key===M);if(!W?.disabled){if(W?.href){Ku(W.href)&&window.open(W.href,"_blank","noopener,noreferrer");return}t?.(M)}},[r,t]),g=o.useMemo(()=>{const M=[];return i&&M.push({key:"debug",icon:"terminal",label:y("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&M.push({key:"help",icon:"message-circle-question-mark",label:y("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&M.push({key:"notifications",icon:"bell",label:y("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&M.push({key:"settings",icon:"settings",label:y("nav.settings","\uC124\uC815"),onClick:p}),d&&M.push({key:"feedback",icon:"bug",label:y("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&M.push({key:"account",icon:"user-round",label:y("nav.account","\uACC4\uC815"),onClick:c}),M},[y,i,u,p,h,d,c,l]),w=o.useCallback((M,W)=>({position:"fixed",top:M.bottom+8,right:Math.max(8,window.innerWidth-M.right),zIndex:sa(W)}),[]),N=o.useId(),{open:C,toggle:B,close:k,style:E,triggerRef:A,menuRef:D}=la({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),j=o.useMemo(()=>[{items:g.map((M,W)=>({label:M.label,shortcut:Va(W),icon:M.icon,badgeCount:M.badgeCount,selected:M.selected??(!!M.key&&M.key===e),closeOnSelect:!0,onClick:()=>{M.onClick?.(),k()}}))}],[g,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?y("nav.badgeInsideLabel",{label:y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:B,"aria-expanded":C,"aria-controls":C?N:void 0}),!!u&&!!l&&l>0&&n.jsx(Mn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),C&&bn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":y("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:de("tooltip__content"),style:E,ref:D,children:n.jsx(tr,{columns:j,onClose:k})}),document.body)]})]}),n.jsx(Xu,{scrollContainer:v,items:r,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f}),x&&n.jsx(Gu,{items:b,activeKey:e??void 0,onChange:_,scrollContainer:v,appMode:m,onAppModeChange:f})]})}const Zv=ec;function rn(e){const{type:t="dot",size:r,className:a="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&kt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&kt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:p="default",fill:h="filled",useBg:d=!0,minWidth:m,iconLeft:f,iconRight:v,color:y}=e,x=t==="bar",b=typeof r=="number"?"medium":r??"medium",_=(x?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[b]??(x?"body-2":"body-2b"),g={small:12,medium:14,large:16}[b]??14,w=we("badge",x?"badge--bar":"",`badge--${p}`,`badge--${b}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",_,a),N=y?.startsWith("--")?`var(${y})`:y,C=m!==void 0||N?{...m!==void 0?{minWidth:typeof m=="number"?`${m}px`:m}:{},...N?{"--badge-color":N}:{}}:void 0;return n.jsxs("span",{className:w,style:C,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[f&&n.jsx(lt,{icon:f,size:g,className:"badge__icon"}),u??c,v&&n.jsx(lt,{icon:v,size:g,className:"badge__icon"})]})}const Xv=()=>Mt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tc(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return Ar(`${t.toLocaleString("ko-KR")}\uC6D0`)}return Ar(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Jv(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Qv(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const r=e.name??"",a=r.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(a)return a[1].replace(/\s+/g,"");const s=r.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:r||Xv()}function ex(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const r=Number(t[1]);return t[2].toLowerCase()==="y"?r*365:r}function nc(e){return{type:e.type??Jv(e),plan:Qv(e),label:e.label,price:tc(e.price),originalPrice:tc(e.originalPrice),discountLabel:e.discountLabel}}var tx='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>',nx='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>',rc='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const pr={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},gs=new WeakMap;function rx(e){if(e)return gs.get(e)}function Wn(e,t){e&&(e.style.setProperty(pr.text,t.text),e.style.setProperty(pr.sub,t.sub),t.copyrightColor&&e.style.setProperty(pr.copyright,t.copyrightColor),gs.set(e,t))}function Hn(e){e&&(e.style.removeProperty(pr.text),e.style.removeProperty(pr.sub),e.style.removeProperty(pr.copyright),gs.delete(e))}const ac={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function oc(e={}){const t=Ht(ac,Wn,Hn);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("${rc}")`}})]})}const sc="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",Dr=240;var ia='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 ax={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},ox=100,sx=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lc(e={}){const t=Ht(ax,Wn,Hn),r="var(--color-main)",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:sx.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*ox/Dr}) translate(${-Dr/2} ${-Dr/2})`,opacity:i,children:n.jsx("path",{d:sc,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${ia}")`}})]})}const lx={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},ix=100,ux=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cx(e={}){const t=Ht(lx,Wn,Hn),r="#ffffff",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:ux.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*ix/Dr}) translate(${-Dr/2} ${-Dr/2})`,opacity:i,children:n.jsx("path",{d:sc,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${rc}")`}})]})}const dx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function px(e={}){const t=Ht(dx,Wn,Hn);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("${ia}")`}})]})}const hx={Logo_SpeechEar_ko:{"":Ua,_mono:tx},Logo_SpeechEarManager_ko:{"":Cs,_mono:nx}};function mx(e,t){if(e)return hx[e]?.[t??""]??void 0}const fx={speechear:Ua,manager:Cs},Cx={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ic=10;function gx(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 uc(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const r=Math.floor(e/86400);if(r>0)return t("passCard.remainingDay",{n:r});const a=Math.floor(e/3600);if(a>0)return t("passCard.remainingHour",{n:a});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function bx(e,t,r){if(e==="manager"){const a=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=r==="\uC624\uD508\uD2B9\uAC00"||r===Mt.t("passCard.specialLabel");return a?n.jsx(px,{}):s?n.jsx(cx,{}):n.jsx(lc,{})}return n.jsx(oc,{})}function cc({ariaLabel:e,product:t,showPrice:r=!1,plan:a,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:f,logoSrc:v,label:y,price:x,originalPrice:b,discountLabel:_,onUse:g,onRefund:w,onDelete:N}){const{t:C}=Ee.useTranslation(),B=t?nc(t):void 0,k=s??B?.type??"speechear",E=a??B?.plan??C("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=y??B?.label,D=x??(r?B?.price:void 0),j=b??(r?B?.originalPrice:void 0),M=_??B?.discountLabel,W=o.useMemo(()=>{if(D)return null;const J=t?.durationDays??ex(t?.code);if(!J||J<=0)return i!=null?{percent:null,remainingLabel:uc(i,C)}:null;const F=J*86400;let Q;if(i!=null)Q=i;else if((c==="active"||c==="expired")&&l){const re=new Date(l).getTime();if(Number.isNaN(re))return null;const ue=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(ta()),ke=Math.round(ue&&Be?(Date.UTC(+ue[1],+ue[2]-1,+ue[3])-Date.UTC(+Be[1],+Be[2]-1,+Be[3]))/864e5:(re-Date.now())/864e5);Q=Math.max(0,u?ke+1:ke)*86400}else c==="expired"?Q=0:Q=F;const H=gx(Q),le=Math.max(0,Math.min(100,Math.floor(Math.min(H,F)/F*100)));return c==="pending"&&le>=100?null:{percent:le,remainingLabel:c==="expired"?C("passCard.expired","\uB9CC\uB8CC\uB428"):uc(Q,C)}},[D,c,l,i,u,t?.durationDays,t?.code,C]),z=o.useRef(null),[G,T]=o.useState({}),[I,O]=o.useState(null),pe=!!(g||w||N),se=o.useRef(!1),$=o.useRef(void 0),[V,ne]=o.useState(v);o.useLayoutEffect(()=>{ne(v)},[v]),o.useLayoutEffect(()=>{const J=z.current;J&&(d!==void 0&&J.style.setProperty("--pass-card-text",d),m!==void 0&&J.style.setProperty("--pass-card-sub",m),f!==void 0&&J.style.setProperty("--pass-card-copyright",f))},[d,m,f]),o.useLayoutEffect(()=>{const J=z.current;if(!J)return;const F=rx(J);if(!v){const Q=Cx[k],H=c==="expired"?"_mono":F?.logoColor??"",le=mx(Q,H);ne(le)}},[p,v,k,c]);const te=J=>{const F=z.current;if(!F)return null;const{left:Q,top:H,width:le,height:re}=F.getBoundingClientRect(),ue=(J.clientX-Q)/le-.5;return{rotateX:-((J.clientY-H)/re-.5)*ic,rotateY:ue*ic}},P=(J,F)=>{const Q=F*-.7,H=J*.7+10,le=20+(Math.abs(J)+Math.abs(F))*.4;return`${Q}px ${H}px ${le}px rgba(0, 0, 0, 0.18)`},L=o.useCallback(J=>{if(ur())return;se.current=!0,clearTimeout($.current),$.current=setTimeout(()=>{se.current=!1},200);const F=te(J);F&&T({transform:`perspective(800px) rotateX(${F.rotateX}deg) rotateY(${F.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(F.rotateX,F.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)"})},[]),R=o.useCallback(J=>{if(ur())return;const F=te(J);if(!F)return;const Q=se.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${F.rotateX}deg) rotateY(${F.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(F.rotateX,F.rotateY),transition:Q})},[]),U=o.useCallback(()=>{clearTimeout($.current),se.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),Z=o.useCallback(()=>O(null),[]),X=o.useMemo(()=>{const J=C("passCard.planSuffix","\uC774\uC6A9\uAD8C"),F=E.replace("\uC774\uC6A9\uAD8C","").replace(J==="\uC774\uC6A9\uAD8C"?"":J,"").trim(),Q=F.match(/^(.*?)(일|년)$/);return Q?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:Q[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:Q[2]==="\uB144"?C("passCard.unitYear","\uB144"):C("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:F})},[E,C]),ae=o.useMemo(()=>{const J=Ar(D);if(!J)return null;const F=J.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!F)return n.jsx("span",{className:"h1",children:J});const[,Q,H,le]=F;return n.jsxs(n.Fragment,{children:[Q&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:Q}),n.jsx("span",{className:"h1 pass-card__price-amount",children:H}),le.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:le.trim()})]})},[D]),Y=o.useCallback(()=>{pe&&O(J=>{if(J)return null;const F=z.current?.getBoundingClientRect();if(!F)return null;const Q=50;return{left:F.left,right:F.right,width:F.width,height:F.height,x:F.x,y:F.y+Q,top:F.top+Q,bottom:F.bottom+Q}})},[pe]),xe=o.useCallback(J=>{pe&&(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),Y())},[pe,Y]),ie=[{items:[...g?[{label:C("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",shortcut:"U",onClick:()=>{g(),O(null)},closeOnSelect:!0}]:[],...w?[{label:C("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",shortcut:"R",onClick:()=>{w(),O(null)},closeOnSelect:!0}]:[],...N?[{label:C("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",shortcut:"D",onClick:()=>{N(),O(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:z,className:`pass-card pass-card--${c}${pe?" pass-card--clickable":""}`,style:G,onMouseEnter:L,onMouseMove:R,onMouseLeave:U,onPointerUp:J=>{J.pointerType==="touch"&&U()},onPointerCancel:J=>{J.pointerType==="touch"&&U()},onClick:Y,onKeyDown:pe?xe:void 0,role:pe?"button":void 0,tabIndex:pe?0:void 0,"aria-label":e,"aria-haspopup":pe?"menu":void 0,"aria-expanded":pe?!!I:void 0,children:[p??bx(k,E,A),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??fx[k],className:"pass-card__logo",alt:k==="manager"?C("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):C("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:X}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?C("passCard.labeledPlan",{label:A}):C("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),D?n.jsxs("div",{className:"pass-card__price-area",children:[M&&n.jsx("span",{className:"pass-card__discount body-3",children:M}),n.jsxs("div",{className:"pass-card__price",children:[j&&n.jsx("span",{className:"pass-card__price-original body-3",children:Ar(j)}),ae]})]}):W?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:W.remainingLabel}),W.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:W.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),I&&n.jsx(sn,{anchorRect:I,onClose:Z,ariaLabel:C("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:ie,onClose:Z,size:"small"})})]})}const yx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function vx(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,r=Ht(yx,Wn,Hn);return n.jsxs("div",{ref:r,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${ia}")`}})]})}const xx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function _x(e={}){const t=Ht(xx,Wn,Hn);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("${ia}")`}})]})}function wx(e,t){if(e){if(t==="manager_pro")return n.jsx(_x,{});if(t==="manager_standard")return n.jsx(vx,{});if(t==="manager_lite")return n.jsx(lc,{})}}function Bx(e){const t=Ar(e);if(!t)return null;const r=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!r)return t;const[,a,s,l]=r;return n.jsxs(n.Fragment,{children:[a&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:a}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function kx(e){const{t}=Ee.useTranslation(),r=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),a=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u,titleLevel:c=3}=e||{},p=c?`h${c}`:"div",h=C=>!!C&&!!u?.includes(C),d=C=>C.onceOnly??/오픈\s*특가/.test(C.label??""),m=(s.tiers||[]).some(C=>d(C)&&h(C.code)),f=C=>{const B=C.prices?C.prices[i]:C.price;return B?(s.tiers||[]).some(k=>!!k.badge&&k.originals?.[i]===B):!1},v=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",y=t("payment.plan.freePrice","\uBB34\uB8CC"),x=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),b=C=>C.prices?C.prices[i]:C.price,_=(s.tiers||[]).length>0&&(s.tiers||[]).every(C=>{const B=b(C);return B==="\uBB34\uB8CC"||B===y||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),g=(s.tiers||[]).length>0&&(s.tiers||[]).every(C=>{const B=b(C);return B==="\uBB38\uC758"||B===x}),w=s.group==="org",N=w?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:v,"--plan-color":v},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(rn,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:v},children:s.quote||"\xA0"}),n.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((C,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:v}}),C]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((C,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:v}}),C]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:_?null:g?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(C=>{const B=C.label||r,k=d(C),E=k||C.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||r,D=C.prices?C.prices[i]:C.price,j=C.badge?E?`${a}
|
|
841
|
-
${C.badge}`:C.badge:void 0;if(k&&h(C.code))return null;if(!C.badge&&!m)return f(C)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${C.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:C.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:Bx(D)})})]},C.id);const M=s.tier??(w?s.title:void 0),W=n.jsx(cc,{showPrice:!0,product:{type:N,code:C.code,name:A,label:M,price:D,originalPrice:C.originals?.[i]??void 0,discountLabel:j},bg:wx(w,s.id)}),z=()=>l?.({...C,productId:s.id,productTitle:s.title,preview:W});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:z,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),z())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:W},C.id)})})})})]})}function Ax({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 bs='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 dc={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function Nx(){const e=Ht(dc,Wn,Hn);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("${bs}")`}})})}const pc={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function Ex(e={}){const t=Ht(pc,Wn,Hn);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("${ia}")`}})]})}function hc({keys:e,anchor:t="top-right",scale:r,className:a=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:we("shortcut-badge",`shortcut-badge--${t}`,a),style:r===void 0?void 0:{"--shortcut-badge-scale":String(r)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const ua=(e,t,r)=>e+(t-e)*r;function jx({speakers:e,size:t=300,viewT:r=0,activeSpeakerId:a=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:f=40,showIcon:v=!0,onCenterClick:y,centerLabel:x,centerDisabled:b=!1,centerAttention:_=!1,shortcutAnchor:g="top-right",shortcutScale:w,scaleShortcut:N=!1}){const{t:C}=Ee.useTranslation(),B=Math.max(0,Math.min(1,r)),k=t/2,E=110/300,A=.18,D=F=>t*(E+(F-1)*A),j=F=>{const Q=D(F.row??1),H=F.angleDeg*Math.PI/180;return{x:k+Q*Math.cos(H),y:k+Q*Math.sin(H)}},M=Math.max(...e.map(F=>F.row??1),1),W=t*.08,z=t*.1,G=t*.24,T=t-2*W,I=t-z-G,O=t-G/2,pe=o.useMemo(()=>[...new Set(e.map(F=>F.deg))].sort((F,Q)=>F-Q),[e]),se=pe.length,$=Math.max(68,se>1?T/(se-1):0),V=o.useMemo(()=>new Map(pe.map((F,Q)=>[F,Q])),[pe]),ne=F=>{const Q=V.get(F.deg)??0,H=k+(Q-(se-1)/2)*$,le=M>1?Math.min(68,I/(M-1)):0,re=le*(M-1),ue=z+(I-re)/2,Be=M===1?z+I*.4:ue+(M-(F.row??1))*le;return{x:H,y:Be}},te=F=>{const Q=j(F),H=ne(F);return{x:ua(Q.x,H.x,B),y:ua(Q.y,H.y,B)}},P={x:k,y:ua(k,O,B)},L=Math.round(f*1.2),R=Math.round(Math.max(16,Math.min(80,f*.7))),U=[],Z=new Map;for(const F of e){const Q=F.row??1;Z.has(Q)||Z.set(Q,[]),Z.get(Q).push(F)}for(const[F,Q]of Z.entries()){if(Q.length<2)continue;const H=[...Q].sort((je,tt)=>je.deg-tt.deg),le=H.map(je=>te(je)),re=H.map(je=>je.deg),ue=re[re.length-1]-re[0],Be=ue/(re.length-1),ke=360-ue,Ne=H.length>=3&&Be>0&&ke<=Be*1.5,Re=Math.round(D(F)*1e3)/1e3,ye=(je,tt,Ct,Oe)=>{const qe=(tt.angleDeg-je.angleDeg+540)%360-180;if(qe===0)return`L ${Oe.x} ${Oe.y}`;if(B===0)return`A ${Re} ${Re} 0 0 ${qe>0?1:0} ${Oe.x} ${Oe.y}`;const nt=(je.angleDeg+qe/2)*Math.PI/180,We={x:k+Re*Math.cos(nt),y:k+Re*Math.sin(nt)},Ze={x:(Ct.x+Oe.x)/2,y:(Ct.y+Oe.y)/2},ot={x:ua(We.x,Ze.x,B),y:ua(We.y,Ze.y,B)},gt={x:2*ot.x-Ze.x,y:2*ot.y-Ze.y};return`Q ${gt.x} ${gt.y} ${Oe.x} ${Oe.y}`},_e=Ne?[...H,H[0]]:H,Ae=Ne?[...le,le[0]]:le;let Ie=`M ${Ae[0].x} ${Ae[0].y}`;for(let je=1;je<Ae.length;je++)Ie+=" "+ye(_e[je-1],_e[je],Ae[je-1],Ae[je]);U.push({key:`arc-${F}`,d:Ie})}const X=o.useMemo(()=>new Set(s??[]),[s]),ae=F=>({idle:"",active:C("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:C("soundCompass.state.played","\uB4E4\uC74C"),correct:C("soundCompass.state.correct","\uC815\uB2F5"),wrong:C("soundCompass.state.wrong","\uC624\uB2F5")})[F],Y=(F,Q,H,le)=>{const re=F+1,ue=new RegExp(`(^|[^0-9])${re}([^0-9]|$)`).test(Q),Be=!le||ue?Q:`${re}, ${Q}`;return ae(H)?`${Be}, ${ae(H)}`:Be},xe=F=>{if(a===F.id)return"active";if(u){if(F.id===i)return"correct";if(F.id===l&&l!==i)return"wrong"}return X.has(F.id)?"played":"idle"},ie=F=>a===F.id?"loop":u?F.id===i?"loop":null:c&&F.id===l?"once":null,J=(F,Q)=>{switch(F){case"played":case"correct":return n.jsx(El,{size:Q});case"wrong":return n.jsx(Fl,{size:Q});default:return n.jsx(Pl,{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:[B===0&&e.map(F=>{const{x:Q,y:H}=te(F);return n.jsx("line",{x1:P.x,y1:P.y,x2:Q,y2:H,stroke:"#dde3ec",strokeWidth:"1"},F.id)}),U.map(F=>n.jsx("path",{d:F.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},F.key))]}),_&&!b&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:L,height:L,left:P.x-L/2,top:P.y-L/2}}),y?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${b?" sound-compass__center--disabled":""}`,style:{width:L,height:L,left:P.x,top:P.y},"aria-label":x,"aria-disabled":b||void 0,tabIndex:b?-1:0,onClick:b?void 0:y,children:n.jsx(vo,{size:R,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:L,height:L,left:P.x,top:P.y},children:n.jsx(vo,{size:R,color:"currentColor",strokeWidth:1.5})}),e.map((F,Q)=>{const{x:H,y:le}=te(F),re=xe(F),ue=ie(F),Be={...w!==void 0||N?{"--shortcut-badge-scale":String(w??Math.max(.75,Math.min(3,f/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:re!=="idle"?10:1},ke=f,Ne=Math.round(Math.max(10,Math.min(56,ke*.38))),Re=Math.round(Math.max(7,Math.min(18,ke*.2))),ye=Math.round(Math.max(10,Math.min(56,ke*.4))),_e=v==="answered"&&(re==="played"||re==="correct"||re==="wrong"),Ae=v===!0||_e,Ie=!_e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:H-ke/2,top:le-ke/2},children:[ue&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${re}`+(ue==="once"?" sound-compass__pulse--once":""),style:{width:ke,height:ke,...ue==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(F.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${re}`,style:{width:ke,height:ke},"aria-label":Y(Q,F.label,re,Ie),"aria-pressed":l!=null?F.id===l:void 0,children:[Ae&&J(re,Ne),Ie&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?Re:ye},children:Q+1})]}),F.shortcut&&n.jsx(hc,{keys:F.shortcut,anchor:g,className:"sound-compass__speaker-shortcut"})]},F.id)})]})})}function Dx({id:e,tone:t="plain",bare:r=!1,className:a,style:s,children:l}){return n.jsx("section",{id:e,className:we("landing-section",t==="line"&&"landing-section--line",a),style:s,children:r?l:n.jsx("div",{className:"landing-section__inner",children:l})})}function Sx({badge:e,badgeVariant:t="white",title:r,sub:a,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:u=!1,onBand:c=!1,align:p="left"}){const h={...u?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},m=p==="center";return n.jsxs(n.Fragment,{children:[e?n.jsx("p",{className:we(m&&"landing-title__badge--center"),style:{margin:0},children:n.jsx(rn,{size:"large",fill:t==="white"?"filled":"soft",variant:t,children:e})}):null,n.jsx("h2",{className:we("landing-title__text",u&&"landing-title__text--no-gap",m&&"landing-title__text--center"),style:h,children:r}),a?n.jsx("p",{className:we("landing-title__sub",c&&"landing-title__sub--on-band",m&&"landing-title__sub--center"),style:d,children:a}):null]})}function Tx({icon:e,title:t,desc:r,children:a,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:u=!1,align:c="left",hover:p=!0,className:h,style:d}){const m=u?"landing-card--pad-tight":"landing-card--pad",f=n.jsxs(n.Fragment,{children:[e,t?n.jsx("h3",{className:"landing-card__title",style:i,children:t}):null,r?n.jsx("p",{className:"landing-card__desc",children:r}):null]});return s==="row"?n.jsxs("div",{className:we("landing-card","landing-card--row",m,p&&"landing-card--hover",h),style:d,children:[n.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:f}),n.jsx("div",{className:"landing-card__panel",children:a})]}):n.jsxs("div",{className:we("landing-card",m,c==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[f,a]})}function Mx({href:e,tone:t="dark",arrow:r=!1,align:a="center",className:s,children:l}){return n.jsxs("a",{className:we("landing-button",t!=="dark"&&`landing-button--${t}`,a==="between"&&"landing-button--between",s),href:e,children:[l,r?n.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:n.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}function mc({href:e,current:t,onClick:r,className:a,children:s}){return n.jsx("a",{href:e,onClick:r,"aria-current":t?"page":void 0,className:we("landing-menu-link",a),children:s})}const $x=1200,Lx=.3;function Rx(e){if(typeof e!="string")return null;const t=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!t)return null;const r=Number(t[2].replace(/,/g,""));return Number.isFinite(r)?{prefix:t[1],suffix:t[3],target:r,grouped:t[2].includes(",")}:null}function Px(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Fx(e){const t=o.useRef(null),[r,a]=o.useState(1);return o.useEffect(()=>{const s=t.current;if(e||!s||typeof IntersectionObserver!="function"){a(1);return}a(0);let l=0;const i=new IntersectionObserver(u=>{if(!u.some(h=>h.isIntersecting))return;i.disconnect();const c=performance.now(),p=h=>{const d=Math.min(1,(h-c)/$x);a(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:Lx});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[t,r]}function Ix({stats:e,className:t}){const r=Fa(),[a,s]=Fx(r);return n.jsx("div",{className:"landing-stat-band-wrap",children:n.jsx("div",{ref:a,className:we("landing-stat-band",t),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const u=Rx(l.value),c=u?`${u.prefix}${u.grouped?Px(Math.round(u.target*s)):Math.round(u.target*s)}${u.suffix}`:null;return n.jsxs("div",{children:[n.jsx("p",{className:"landing-stat-band__value",children:c===null?l.value:n.jsxs(n.Fragment,{children:[n.jsx("span",{"aria-hidden":"true",children:c}),n.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),n.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function Ox({orientation:e="horizontal",label:t,className:r=""}){const a=we("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",r);return e==="vertical"?n.jsx("div",{className:a,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:a,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:a,role:"separator","aria-orientation":"horizontal"})}function fc({checked:e,onChange:t,name:r,value:a,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:r,value:a,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function zx({options:e,value:t,onChange:r,name:a,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=a??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(fc,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&r?.(h.value)}},h.value))})}const Wx={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"},Hx={info:"main",success:"success",warning:"warning",danger:"danger"};function Vx({tone:e="info",title:t,message:r,children:a,dismissible:s=!1,onDismiss:l,live:i,className:u="",variant:c="box"}){const{t:p}=Ee.useTranslation(),[h,d]=o.useState(!1),m=o.useRef(null),f=o.useCallback(()=>{const g=m.current;g&&g.contains(document.activeElement)&&Ra(g),d(!0),l?.()},[l]);if(h)return null;const v=we("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),x=y==="assertive"?"alert":y==="polite"?"status":void 0,b=!!t,_=!!(r||a);return c==="bar"?n.jsx(rn,{type:"bar",size:"medium",fill:"soft",variant:Hx[e],role:x,className:u||void 0,children:b&&_?n.jsxs(n.Fragment,{children:[t," ",r||a]}):t||r||a}):n.jsxs("div",{ref:m,className:v,role:x,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Wx[e],size:20,className:"alert__icon"}),b&&n.jsx("span",{className:"alert__title body-2",children:t}),!b&&_&&n.jsx("div",{className:"alert__message body-3",children:r||a})]}),b&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:r||a})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:f,"aria-label":p("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const qx={ready:"search",guide:"info",error:"circle-alert"};function Ux(e,t){const r=t.filter(Boolean);if(r.length===0)return e;const a=[];let s=0,l=0;for(const i of r){const u=e.indexOf(i,s);u<0||(u>s&&a.push(e.slice(s,u)),a.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&a.push(e.slice(s)),a}function Gx({status:e="guide",label:t,children:r,emphasis:a,icon:s,className:l=""}){const i=s===!1?null:s??qx[e],u=we("search-summary",`search-summary--${e}`,l),c=t??r,p=typeof c=="string"&&a&&a.length>0?Ux(c,a):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function ca({title:e,items:t}){const{t:r}=Ee.useTranslation(),{anchorRect:a,openAt:s,close:l}=Wa(),i=o.useRef(null),u=Ia(!!a,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!a,ariaLabel:r("common.info","\uC124\uBA85"),onPointerEnter:c=>{er(c)||s(c.currentTarget)},onPointerLeave:c=>{er(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ur()||s(c.currentTarget)},onBlur:l}),a&&n.jsx(Qn,{title:e,items:t,showIndex:t.length>1,anchorRect:a,onClose:l})]})}const gn=40,hr=32;function Kx({items:e=[],value:t,onChange:r,className:a="",size:s}){const l=kn(),i=s??l??gn,u=o.useId(),{t:c}=Ee.useTranslation(),p=o.useRef(null),h=e.find(b=>!b.disabled)?.key,d=e.some(b=>b.key===t)?t:h??e[0]?.key,m=e.find(b=>b.key===d&&!b.disabled)?.key??h,f=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),v=(b,_=f())=>{if(_.length===0)return;const g=(b%_.length+_.length)%_.length;_[g]?.focus(),_[g]?.click()},y=b=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(b.key))return;b.preventDefault();const _=f(),g=_.indexOf(b.currentTarget);b.key==="ArrowRight"||b.key==="ArrowDown"?v(g+1,_):b.key==="ArrowLeft"||b.key==="ArrowUp"?v(g-1,_):b.key==="Home"?v(0,_):v(_.length-1,_)},x=e.find(b=>b.key===d);return n.jsxs("div",{className:`tabs ${a}`.trim(),children:[n.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":c("tabs.ariaLabel","\uD0ED"),children:e.map(b=>n.jsx("button",{id:`tabs__tab-${u}-${b.key}`,type:"button",role:"tab","aria-selected":b.key===d,"aria-controls":b.key===d?`tabs__panel-${u}-${b.key}`:void 0,disabled:b.disabled,tabIndex:b.key===m?0:-1,className:`tabs__tab body-2${b.key===d?" tabs__tab--active":""}`,onClick:()=>{b.key!==t&&r?.(b.key)},onKeyDown:y,children:b.label},b.key))}),x&&n.jsx("div",{id:`tabs__panel-${u}-${x.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${u}-${x.key}`,tabIndex:0,className:"tabs__panel",children:x.panel},x.key)]})}const Yx={xs:12,sm:16,md:20,lg:28,xl:36};function Zx(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 Xx({src:e,name:t,size:r="md",shape:a="circle",className:s=""}){const{t:l}=Ee.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?Zx(t):"",h=!!e&&!c,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${r} avatar--${a} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:Yx[r],className:"avatar__icon"})]})}function Jx(e,t){if(!t)return!0;const r=t.split(",").map(l=>l.trim()).filter(Boolean);if(r.length===0)return!0;const a=e.name.toLowerCase(),s=e.type.toLowerCase();return r.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function Qx({onFilesSelected:e,accept:t,multiple:r=!1,disabled:a=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Ee.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,f]=o.useState([]),v=l??m,y=C=>{if(!C||C.length===0)return;const B=Array.from(C).filter(E=>Jx(E,t));if(B.length===0)return;const k=r?B:B.slice(0,1);if(l===void 0){const E=r?[...v,...k]:k;f(E),e?.(E)}else e?.(k)},x=C=>{C.preventDefault(),!a&&d(!0)},b=C=>{C.preventDefault(),d(!1)},_=C=>{C.preventDefault(),d(!1),!a&&y(C.dataTransfer.files)},g=C=>{const B=C.target;try{y(B.files)}finally{B.value=""}},w=()=>{a||p.current?.click()},N=C=>{if(!a&&(i?.(C),l===void 0)){const B=v.filter((k,E)=>E!==C);f(B),i||e?.(B)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",h&&"file-upload__dropzone--dragging",a&&"file-upload__dropzone--disabled"),role:"button",tabIndex:a?-1:0,"aria-disabled":a,onClick:w,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),w())},onDragOver:x,onDragLeave:b,onDrop:_,children:[n.jsx(lt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:a,onClick:C=>{C.stopPropagation(),w()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:r,disabled:a,onChange:g,tabIndex:-1,"aria-hidden":"true"})]}),s&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((C,B)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:C.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:C.name}),disabled:a,onClick:()=>N(B),children:n.jsx(lt,{icon:"x",size:14})})]},`${C.name}-${B}`))})]})}function Cc({items:e,size:t="small",className:r=""}){const{t:a}=Ee.useTranslation(),s=t==="medium"?"body-1":"body-3",l=t==="medium"?18:14,i=t==="medium"?"body-1b":s;return n.jsx("nav",{className:`breadcrumb breadcrumb--${t} ${r}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((u,c)=>{const p=c===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[p&&u.menu?n.jsxs("button",{type:"button",className:`breadcrumb__current breadcrumb__current--menu ${i}`,"aria-current":"page","aria-haspopup":"menu","aria-expanded":!!u.menu.expanded,"aria-label":u.menu.ariaLabel,onClick:h=>u.menu.onOpen(h.currentTarget),children:[u.label,n.jsx(lt,{icon:"chevron-down",size:l,className:"breadcrumb__menu-mark"})]}):p?n.jsx("span",{className:`breadcrumb__current ${i}`,"aria-current":"page",children:u.label}):u.href?n.jsx("a",{className:`breadcrumb__link ${s}`,href:u.href,target:u.target,rel:u.rel??(u.target==="_blank"?"noopener noreferrer":void 0),onClick:u.onClick,children:u.label}):u.onClick?n.jsx("button",{type:"button",className:`breadcrumb__link ${s}`,onClick:u.onClick,children:u.label}):n.jsx("span",{className:`breadcrumb__text ${s}`,children:u.label}),!p&&n.jsx(lt,{icon:"chevron-right",size:l,className:"breadcrumb__separator"})]},c)})})})}const Ga="\0up";function gc({folders:e,onOpen:t,dropProps:r,dropOver:a,menuItems:s,onMove:l,up:i,add:u}){const{t:c}=Ee.useTranslation(),[p,h]=o.useState(null),d=$v((g,w)=>w===Ga?i?.onFolderDrop?.(g):l?.(g,w)),m=d.dragging,f=g=>{const w=l?d.cardProps(g):{};return m===null?{...r?.(g),...w}:!l||m===g?w:{...w,...d.groupProps(g)}},v=g=>m===null?a===g:d.dragOverKey===g,y=o.useRef(null),x=()=>{h(g=>(g&&(y.current={name:g.name,at:Date.now()}),null))},b=()=>i?m===null?i.cardDropKey!=null?{...r?.(i.cardDropKey)}:{}:i.onFolderDrop?d.groupProps(Ga):{}:{},_=!!i&&(m===null?i.cardDropKey!=null&&a===i.cardDropKey:!!i.onFolderDrop&&d.dragOverKey===Ga);return e.length===0&&!i&&!u?null:n.jsxs("ul",{className:"folder-grid","aria-label":c("folder.list","\uD3F4\uB354"),children:[i&&n.jsx("li",{className:["folder-grid__cell","folder-grid__cell--up",_&&"folder-grid__cell--over"].filter(Boolean).join(" "),...b(),children:n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:_?"is-hover":void 0,icon:"arrow-up",label:c("folder.up","\uC704\uB85C"),ariaLabel:c("folder.upTo",{name:i.targetLabel,defaultValue:"\uD55C \uCE35 \uC704\uB85C \u2014 {{name}}"}),onClick:i.onOpen})},Ga),e.map(g=>{const w=g.label??g.name;return n.jsxs("li",{className:["folder-grid__cell",v(g.name)&&"folder-grid__cell--over",m===g.name&&"folder-grid__cell--dragging"].filter(Boolean).join(" "),...f(g.name),children:[n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:v(g.name)?"is-hover":void 0,icon:"folder",label:w,count:g.count,ariaLabel:c("folder.open",{name:w,count:g.count,defaultValue:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C"}),rightIcon:s?n.jsx("span",{className:"folder-grid__more-room","aria-hidden":"true"}):void 0,onClick:()=>t(g.name)}),s&&n.jsx("span",{className:"folder-grid__more",children:n.jsx(fe,{htmlType:"button",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:c("folder.menu",{name:w,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),ariaExpanded:p?.name===g.name,onClick:N=>{if(y.current?.name===g.name&&Date.now()-y.current.at<300)return;const C=N.currentTarget;h(B=>B?.name===g.name?null:{name:g.name,label:w,anchor:C})}})})]},g.name)}),u&&n.jsx("li",{className:"folder-grid__cell folder-grid__cell--add",children:n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,icon:"folder-plus",label:u.label,onClick:u.onClick})},"__add"),p&&s&&n.jsx(sn,{anchorEl:p.anchor,onClose:x,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:c("folder.menu",{name:p.label,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),children:n.jsx(tr,{columns:[{items:s(p.name)}],size:"small",onClose:x})})]})}const bc="/";function yc({anchorEl:e,onClose:t,rootLabel:r,opened:a,onPick:s,tree:l,ariaLabel:i,onMove:u,itemDropProps:c,itemDropOver:p}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(new Set),f=B=>{s(B),t()},[v,y]=o.useState(null),[x,b]=o.useState(null),_=B=>{if(v===null)return c?.(B)??{};if(!u||!ey(v,B))return{};const k=B??bc;return{onDragOver:E=>{E.preventDefault(),E.dataTransfer.dropEffect="move",x!==k&&b(k)},onDragLeave:()=>b(E=>E===k?null:E),onDrop:E=>{E.preventDefault();const A=v;y(null),b(null),u(A,B)}}},g=B=>u?{draggable:!0,onDragStart:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",B),y(B)},onDragEnd:()=>{y(null),b(null)}}:{},w=B=>m(k=>{const E=new Set(k);return E.has(B)?E.delete(B):E.add(B),E}),N=l.filter(B=>![...d].some(k=>k!==B.path&&Wo(B.path,k))),C=B=>["folder-tree-tooltip__row",...B].filter(Boolean).join(" ");return n.jsx(sn,{anchorEl:e,onClose:t,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i,children:n.jsxs("div",{className:"folder-tree-tooltip",role:"tree","aria-label":i,children:[n.jsx("div",{role:"none",..._(null),className:C([a===null&&"folder-tree-tooltip__row--here",(x===bc||v===null&&!!p?.(null))&&"folder-tree-tooltip__row--over"]),children:n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":1,"aria-current":a===null?"page":void 0,onClick:()=>f(null),children:[n.jsx(lt,{icon:"folder-open",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:r})]})}),N.map((B,k)=>{const E=l.some(j=>j.path!==B.path&&Wo(j.path,B.path)),A=d.has(B.path),D=a===B.path;return n.jsxs("div",{role:"none",...g(B.path),..._(B.path),className:C([B.depth>0&&"folder-tree-tooltip__row--nested",D&&"folder-tree-tooltip__row--here",(x===B.path||v===null&&!!p?.(B.path))&&"folder-tree-tooltip__row--over",v===B.path&&"folder-tree-tooltip__row--dragging"]),style:{"--folder-depth":B.depth+1},children:[n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":B.depth+2,"aria-posinset":k+1,"aria-current":D?"page":void 0,onClick:()=>f(B.path),children:[n.jsx(lt,{icon:D?"folder-open":"folder",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:B.label}),B.count>0&&n.jsx("span",{className:"folder-tree-tooltip__count caption-1",children:B.count})]}),E&&n.jsx("button",{type:"button",className:`folder-tree-tooltip__twist${A?"":" folder-tree-tooltip__twist--open"}`,"aria-label":A?h("folder.unfold",{name:B.label,defaultValue:"{{name}} \uD3BC\uCE58\uAE30"}):h("folder.fold",{name:B.label,defaultValue:"{{name}} \uC811\uAE30"}),"aria-expanded":!A,onClick:()=>w(B.path),children:n.jsx(lt,{icon:"chevron-right",size:16,className:"folder-tree-tooltip__twist-mark"})})]},B.path)})]})})}function vc({rootLabel:e,opened:t,onOpen:r,tree:a,onMove:s,itemDragging:l=!1,itemDropProps:i,itemDropOver:u}){const{t:c}=Ee.useTranslation(),[p,h]=o.useState(null),d=o.useRef(0),m=()=>{h(y=>(y&&(d.current=Date.now()),null))},f=c("folder.tree","\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30"),v=o.useRef(!1);return o.useEffect(()=>{!l&&v.current&&(v.current=!1,h(null))},[l]),n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"folder-tree-button",onDragEnter:l?y=>{p||(v.current=!0,h(y.currentTarget))}:void 0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"default",icon:"folder-tree",ariaLabel:f,showTooltipInfo:f,ariaExpanded:!!p,onClick:y=>{if(Date.now()-d.current<300)return;const x=y.currentTarget;h(b=>b?null:x)}})}),p&&n.jsx(yc,{anchorEl:p,onClose:m,ariaLabel:f,rootLabel:e,opened:t,onPick:r,tree:a,onMove:s,itemDropProps:i,itemDropOver:u})]})}function e4({rootLabel:e,opened:t,onOpen:r,paths:a,countOf:s,folderMenu:l,rootMenu:i,dropProps:u,dropOver:c,onMoveFolder:p,itemDragging:h,rootDropKey:d,add:m}){const{t:f}=Ee.useTranslation(),[v,y]=o.useState(null),x=o.useRef(0),b=()=>{y(E=>(E&&(x.current=Date.now()),null))},_=t?Qr(t):e,g=t?f("folder.menu",{name:_,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}):f("folder.placeMenu",{name:_,defaultValue:"{{name}} \uBA54\uB274"}),w=!!l||!!i,N=w?{label:_,menu:{onOpen:E=>{Date.now()-x.current<300||y(A=>A?null:E)},expanded:!!v,ariaLabel:g}}:{label:_},C=t?[{label:e,onClick:()=>r(null)},...Jb(t).slice(0,-1).map(E=>({label:E.label,onClick:()=>r(E.path)})),N]:[N],B=t?ja(t):null,k=Xb(a,t).map(E=>({name:E,label:Qr(E),count:s(E)}));return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"folder-head",children:[n.jsx(vc,{rootLabel:e,opened:t,onOpen:r,onMove:p,itemDragging:h,itemDropProps:u?E=>E!==null?u(E):d?u(d):{}:void 0,itemDropOver:E=>c!=null&&c===(E??d),tree:Qb(a).map(E=>({...E,count:s(E.path)}))}),n.jsx(Cc,{size:"medium",items:C})]}),n.jsx(gc,{folders:k,onOpen:r,dropProps:u,dropOver:c,menuItems:l,onMove:p,up:t?{targetLabel:B?Qr(B):e,onOpen:()=>r(B),cardDropKey:B??d,onFolderDrop:p?E=>p(E,B):void 0}:void 0,add:m}),v&&w&&n.jsx(sn,{anchorEl:v,onClose:b,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:g,children:n.jsx(tr,{columns:[{items:(t?l?.(t):i)??[]}],size:"small",onClose:b})})]})}function t4({rows:e,rowRender:t,emptySpeech:r,dropProps:a,dropOver:s=!1,className:l}){return e.length===0?r?n.jsx("p",{className:we("folder-list__empty body-3",l),...a,children:r}):null:n.jsx("div",{className:we("folder-list",s&&"folder-list--over",l),...a,children:e.map((i,u)=>t(i,u))})}const da=new Map;function An(e){const{t}=Ee.useTranslation(),{options:r=[],value:a=r.find(C=>!C.disabled)?.key??r[0]?.key,onChange:s=C=>{},className:l="",size:i,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=kn(),f=i??m??gn,v=o.useRef(null),y=r.filter(C=>!C.disabled),x=o.useId(),b=r.map(C=>C.key).join("\xB7");o.useEffect(()=>{if(!(!Yn||d!=null&&d!=="")){if(da.set(x,b||"(\uBCF4\uAE30 \uC5C6\uC74C)"),da.size>1){const C=[...da.values()].sort();kt(`segmented-control-unnamed:${C.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${da.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): ${C.join(" / ")}`)}return()=>{da.delete(x)}}},[d,b,x]);const _=C=>{if(!y.length)return;const B=Math.max(0,y.findIndex(E=>E.key===a)),k=C==="first"?y[0]:C==="last"?y[y.length-1]:y[(B+C+y.length)%y.length];k&&(s(k.key),Array.from(v.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===k.key)?.focus())},g=C=>{switch(C.key){case"ArrowRight":case"ArrowDown":_(1);break;case"ArrowLeft":case"ArrowUp":_(-1);break;case"Home":_("first");break;case"End":_("last");break;default:return}C.preventDefault()},w=C=>{const B=k=>typeof k=="string"||typeof k=="number";if(!(!B(C.label)||C.count==null||C.count===!1||!B(C.count)))return`${C.label}, ${C.count}`},N=y.some(C=>C.key===a)?a:y[0]?.key;return n.jsx("div",{ref:v,onKeyDown:g,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${f}`,p&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:r.map(C=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":C.key===a,"data-segkey":C.key,tabIndex:C.key===N?0:-1,label:C.label,count:C.count,ariaLabel:w(C),disabled:C.disabled,showTooltipInfo:C.disabled&&C.disabledReason?C.disabledReason:void 0,className:C.key===a?"is-selected":"",onClick:()=>{C.disabled||s(C.key)},size:f,shape:u,useBorder:!1,useBG:!1},C.key))})}let pa=0,xc="",ys="",ha=0;function _c(){return Bc(!1)}function wc(){return Bc(!0)}function Bc(e){const t=typeof document<"u";pa===0&&t&&(xc=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(ha===0&&(ys=document.body.style.paddingRight),ha++,document.body.style.paddingRight="0px"),pa++;let r=!1;return()=>{r||(r=!0,pa=Math.max(0,pa-1),e&&t&&(ha=Math.max(0,ha-1),ha===0&&(ys?document.body.style.paddingRight=ys:document.body.style.removeProperty("padding-right"))),pa===0&&t&&(document.body.style.overflow=xc))}}const n4=Hu;function Vn(e){const{t}=Ee.useTranslation(),{title:r,subtitle:a,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerClassName:d="",footerLayout:m="center",onClose:f,closeDisabled:v=!1,beforeClose:y,closeOnBackdrop:x=!0,backClosable:b=!0,className:_="",ariaLabel:g,useTitle:w=!0,inline:N=!1,width:C,size:B,layer:k="modal",height:E,fillBody:A=!1,resetScrollKey:D}=e||{},j=C??(B==="fullwidth"?"full":B),M=j?` popup-panel--${j==="full"?"fullwidth":j}`:"",W=E!=null&&E!=="fit",[z,G]=o.useState(!1),T=o.useRef(!1),I=o.useRef(null),O=o.useId(),pe=o.useRef(null);o.useEffect(()=>{},[N,r,g,_]),o.useEffect(()=>{D!==void 0&&pe.current&&(pe.current.scrollTop=0)},[D]);const[se,$]=o.useState(!1),[V,ne]=o.useState(!1);o.useEffect(()=>{const ue=pe.current;if(!ue)return;const Be=()=>{$(ue.scrollHeight>ue.clientHeight+1),ne(ue.scrollHeight-ue.scrollTop-ue.clientHeight>1)};Be();let ke=0;const Ne=()=>{ke||(ke=requestAnimationFrame(()=>{ke=0,Be()}))};ue.addEventListener("scroll",Ne,{passive:!0});const Re=()=>{ue.removeEventListener("scroll",Ne),ke&&cancelAnimationFrame(ke)};if(typeof ResizeObserver>"u")return Re;const ye=new ResizeObserver(Be);ye.observe(ue);const _e=ue.firstElementChild;return _e&&ye.observe(_e),()=>{ye.disconnect(),Re()}},[i,D]),o.useEffect(()=>{if(!N)return _c()},[N]);const te=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(N)return;const ue=te.current,Be=I.current;return es(Be,ue),Be&&!Be.contains(document.activeElement)&&(Be.querySelector(Sn)??Be).focus(),()=>{const ke=document.activeElement;(!ke||ke===document.body||Be&&Be.contains(ke))&&ts(ue)?.focus?.()}},[N]),La(I,!N);const P=o.useRef(!0),L=Fa(),R=o.useRef(null);o.useEffect(()=>(P.current=!0,()=>{P.current=!1,R.current&&(clearTimeout(R.current),R.current=null)}),[]);const U=o.useCallback(()=>{!P.current||!T.current||(T.current=!1,G(!1))},[]),Z=o.useCallback((ue,Be=!1)=>{if(Be&&!P.current||T.current)return;T.current=!0,G(!0);const ke=setTimeout(()=>{R.current===ke&&(R.current=null);let Ne;try{Ne=ue?ue():void 0}catch{U();return}Ne&&typeof Ne.then=="function"&&Ne.then(()=>{setTimeout(U,120)},U)},L?0:n4);Be&&(R.current=ke)},[U,L]),X=o.useCallback(()=>{v||y&&y()===!1||Z(f,!0)},[Z,f,v,y]),ae=o.useRef(X);o.useEffect(()=>{ae.current=X});const Y=!N&&!!f;o.useEffect(()=>{if(Y)return ir(()=>ae.current())},[Y]);const xe=o.useRef(y);o.useEffect(()=>{xe.current=y});const ie=o.useRef(v);o.useEffect(()=>{ie.current=v});const J=o.useRef(()=>Z(f,!0));o.useEffect(()=>{J.current=()=>Z(f,!0)}),Wu(Y&&b,()=>{if(ie.current)return!1;const ue=xe.current;return ue&&ue()===!1?!1:(J.current(),!0)});const F=Y&&x,Q=o.useRef(!1),H=ue=>{Q.current=ue.target===ue.currentTarget},le=ue=>{const Be=Q.current;Q.current=!1,Be&&ue.target===ue.currentTarget&&X()},re=n.jsx("div",{className:`popup ${N?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${z?"popup--closing":""} ${_}`,onPointerDown:F?H:void 0,onClick:F?le:void 0,onMouseDown:N?void 0:ue=>{ue.target===ue.currentTarget&&ue.preventDefault()},children:n.jsxs("div",{ref:I,className:`popup-panel${M}${E==="full"?" popup-panel--height-full":W?" popup-panel--has-height":""}${A?" popup-panel--fill-body":""}`,style:W&&E!=="full"?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:N?void 0:"dialog","aria-modal":N?void 0:!0,"aria-labelledby":!N&&w&&r?O:void 0,"aria-label":!N&&!(w&&r)?g??(typeof r=="string"?r:void 0):void 0,children:[!w&&(s||f)?n.jsxs("div",{className:"popup-close-float",children:[s,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:X,disabled:v,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):r||s||f?n.jsxs("div",{className:`popup-header${a?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[r?n.jsx("h2",{id:O,className:"popup-title popup-title--left h2",children:r}):n.jsx("span",{id:O,className:"popup-title popup-title--left h2"}),a&&n.jsx("span",{className:"popup-subtitle body-3",children:a})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(An,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(ue=>({key:ue.key,label:ue.label,disabled:ue.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:X,disabled:v,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:pe,tabIndex:se?0:void 0,"data-more-below":V&&!(p||h||u&&u.length>0||c)?"":void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:Z,closeWithAnimation:X}):i})}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${d?` ${d}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:Z,closeWithAnimation:X}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:Z,closeWithAnimation:X}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${m!=="center"?` popup-footer--${m}`:""}`,children:u.map((ue,Be)=>n.jsx(fe,{htmlType:"button",size:48,variant:ue.variant??"default",label:ue.label,disabled:ue.disabled,onClick:()=>ue.onClick?.({animateThen:Z,closeWithAnimation:X})},Be))}):c?n.jsx("div",{className:`popup-footer${m!=="center"?` popup-footer--${m}`:""}${d?` ${d}`:""}`,children:typeof c=="function"?c({animateThen:Z,closeWithAnimation:X}):c}):null]})});return N||typeof document>"u"?re:bn.createPortal(re,document.body)}function kc({checked:e,onChange:t,disabled:r=!1,label:a,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=a&&n.jsx("span",{className:"toggle__label body-3",children:a});return n.jsxs("label",{className:`toggle${r?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:r,onChange:p=>t?.(p.target.checked),"aria-label":!a&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function Nn({options:e,value:t,onChange:r,placeholder:a,disabled:s=!1,block:l=!1,size:i,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const d=kn(),m=i??d??gn,{t:f}=Ee.useTranslation(),v=a??f("dropdown.placeholder","\uC120\uD0DD"),y=o.useId(),x=o.useId(),b=o.useRef(null),_=o.useCallback((T,I)=>{const O=window.innerHeight,pe=window.innerWidth,se=typeof document<"u"?document.getElementById(y):null,$=260,V=Math.min($,Math.max(se?.offsetHeight||0,se?.scrollHeight||0)||$),ne=Math.max(T.width,se?.offsetWidth||0),te=O-T.bottom,P=T.top,L=te<V&&P>te,R=8,U=(Z,X)=>Math.min(Math.max(R,Z),Math.max(R,X));return{position:"fixed",left:U(T.left,pe-ne-R),minWidth:T.width,maxWidth:Math.max(T.width,pe-R*2),...L?{top:"auto",bottom:U(O-T.top+6,O-V-R)}:{bottom:"auto",top:U(T.bottom+6,O-V-R)},zIndex:sa(I)}},[y]),{open:g,setOpen:w,toggle:N,style:C,triggerRef:B,menuRef:k}=la({computeStyle:_}),[E,A]=o.useState(-1),D=o.useCallback(()=>A(-1),[]),j=e.find(T=>T.value===t);o.useEffect(()=>{if(g){const T=e.findIndex(I=>I.value===t);A(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const I=k.current;if(!I)return;const O=I.querySelectorAll(".dropdown__option")[T];O&&(I.scrollTop=Math.max(0,O.offsetTop-I.clientHeight/2+O.clientHeight/2))})}},[g]),o.useEffect(()=>{g&&A(T=>{if(T>=0&&T<e.length)return T;const I=e.findIndex(O=>O.value===t);return I>=0?I:e.length?0:-1})},[g,e.length]);const M=o.useCallback(()=>{s||N()},[s,N]),W=o.useCallback(T=>{T.disabled||s||(T.value!==t&&r?.(T.value),w(!1))},[r,w,s,t]);o.useEffect(()=>{s&&w(!1)},[s,w]);const z=o.useCallback(T=>{if(!s){if(!g){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),w(!0));return}if(T.key==="Escape"){T.preventDefault(),w(!1);return}T.key==="ArrowDown"?(T.preventDefault(),A(I=>{let O=I+1;for(;O<e.length&&e[O].disabled;)O++;return O<e.length?O:I})):T.key==="ArrowUp"?(T.preventDefault(),A(I=>{let O=I-1;for(;O>=0&&e[O].disabled;)O--;return O>=0?O:I})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?W(e[E]):w(!1))}},[s,g,e,E,W,w]),G=g?n.jsx("div",{ref:k,id:y,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:C,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,I)=>n.jsxs("button",{id:`${y}-option-${I}`,type:"button",role:"option","aria-selected":T.value===t,className:we("dropdown__option body-2",T.value===t?"dropdown__option--active":"",I===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:O=>O.preventDefault(),onClick:()=>W(T),onMouseEnter:()=>A(I),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:b,className:we("dropdown",`dropdown--s${m}`,g?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:z,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?y:void 0,"aria-activedescendant":g&&E>=0?`${y}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&j?x:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:M,onBlur:T=>{g&&!k.current?.contains(T.relatedTarget)&&w(!1)},children:[n.jsx("span",{id:x,className:`dropdown__trigger-label body-2${j?"":" dropdown__trigger-label--placeholder"}`,children:j?j.label:v}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&bn.createPortal(G,b.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const r4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ac(e){return e?r4[e]??null:null}function Nc(e){switch(Ac(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Ec(e,t){const r=Ac(e);return r?t(`device.type.${r}`,{defaultValue:e??""}):e??""}const Sr=e=>e==null?"":String(e).trim();function vs(e,t,r,a){const s=Sr(e),l=Sr(t),i=Sr(r);if(a&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Si(c,a);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function a4(e,t,r){const a=Sr(e);return a?`${a}-${Sr(t).padStart(2,"0")}-${Sr(r).padStart(2,"0")}`:""}function jc(e){return typeof e=="string"?e:e.label}function Dc({value:e,onChange:t,suggestions:r,openOnFocus:a=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),f=o.useMemo(()=>{if(!r.length)return[];const D=e??"";return s===!1?r:D?typeof s=="function"?s(r,D):r.filter(j=>jc(j).toLowerCase().includes(D.toLowerCase())):a?r:[]},[r,e,a,s]),[v,y]=o.useState(!1),x=o.useRef([]),b=v&&f.length===0?x.current:f;o.useEffect(()=>{b.length&&(x.current=b)},[b]);const _=o.useCallback(()=>y(!0),[]),g=o.useCallback(()=>y(!1),[]),w=i?0:-1;o.useEffect(()=>{c||d(w)},[c,w]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<b.length?h:w<b.length?w:-1,C=o.useCallback(D=>{l?l(D):t?.(jc(D)),p(!1)},[t,l]),B=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(w)},[w]),E=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(D=>{D.nativeEvent.isComposing||D.keyCode===229||(D.key==="ArrowDown"?(D.preventDefault(),p(!0),d(j=>Math.min(b.length-1,(j<b.length?j:w)+1))):D.key==="ArrowUp"?(D.preventDefault(),d(j=>Math.max(w,(j<b.length?j:b.length)-1))):D.key==="Enter"?N>=0&&C(b[N]):D.key==="Escape"&&c&&(D.preventDefault(),p(!1)))},[b,N,c,C,w]);return{listId:u,open:c,activeIdx:N,filtered:b,handleFocus:B,handleBlur:E,handleInput:k,handleKeyDown:A,handleSelect:C,handleCompositionStart:_,handleCompositionEnd:g}}const ma=typeof window<"u"?o.useLayoutEffect:o.useEffect;function qn(e){const{value:t,defaultValue:r,name:a,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:f="text",disabled:v=!1,readOnly:y=!1,error:x,status:b,helperText:_,maxLength:g,size:w,variant:N="input",fullWidth:C=!1,newline:B=!1,multiline:k=!1,rows:E=3,leftIcon:A,rightIcon:D,clearable:j=!1,list:M,showCount:W=!0,className:z="",onFocus:G,onBlur:T,onKeyDown:I,onEnter:O,inputMode:pe,autoComplete:se,autoCapitalize:$,autoCorrect:V,revealable:ne=!1,autoFocus:te,suggestions:P,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:U,openOnFocus:Z=!1}=e,X=kn(),ae=w??X??gn,Y=y||v?void 0:P,{t:xe}=Ee.useTranslation(),ie=o.useId();!i&&!u&&kt(`TextField:unnamed:${ie}`,"[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 J=`tf-${ie}`,F=`tf-helper-${ie}`,Q=o.useRef(null),H=Dc({value:t??"",onChange:l,suggestions:Y??[],openOnFocus:Z,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:U}),le=!!Y&&H.open&&H.filtered.length>0,re=o.useRef(null),[ue,Be]=o.useState(null),ke=o.useCallback(()=>{const De=re.current;if(!De||typeof window>"u")return;const rt=De.getBoundingClientRect(),it=window.innerHeight,bt=8,Nt=230,It=typeof document<"u"?document.getElementById(H.listId):null,ft=Math.min(Nt,Math.max(It?.offsetHeight||0,It?.scrollHeight||0)||Nt),mt=it-rt.bottom,At=rt.top,Et=mt<ft+bt&&At>mt,Je=(wt,ce)=>Math.min(Math.max(bt,wt),Math.max(bt,ce));Be({position:"fixed",left:rt.left,width:rt.width,...Et?{bottom:Je(it-rt.top+bt,it-ft-bt)}:{top:Je(rt.bottom+bt,it-ft-bt)},zIndex:sa(De)})},[H.listId]);ma(()=>{if(!le)return;ke();let De=null;const rt=()=>{if(typeof requestAnimationFrame>"u"){ke();return}De===null&&(De=requestAnimationFrame(()=>{De=null,ke()}))},it=bt=>{const Nt=bt.target;Nt&&Nt.nodeType===1&&Nt.closest?.(".text-field__suggestions")||rt()};return window.addEventListener("scroll",it,!0),window.addEventListener("resize",rt),()=>{De!==null&&cancelAnimationFrame(De),window.removeEventListener("scroll",it,!0),window.removeEventListener("resize",rt)}},[le,ke,H.filtered.length]);const Ne=o.useCallback(De=>{Q.current=De,typeof s=="function"?s(De):s&&(s.current=De)},[s]),Re=d?`${d}${m??xe("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,ye=f==="email"||f==="tel"||f==="password"||f==="url"||se==="username"||se==="email"||se==="one-time-code",_e=$??(ye?"none":void 0),Ae=V??(ye?"off":void 0),Ie=ne&&f==="password"&&!B&&!k,[je,tt]=o.useState(!1),Ct=Ie&&je?"text":f,Oe=t!==void 0,qe=Oe&&f==="password",[nt,We]=o.useState((r??"").length),Ze=Oe?(t??"").length:nt,ot=o.useRef(t);ma(()=>{ot.current=t}),o.useEffect(()=>{const De=Q.current;if(!qe||!De)return;const rt=t??"";De.value!==rt&&(De.value=rt)},[qe,t]),o.useEffect(()=>{if(!B||!Q.current)return;const De=Q.current;De.style.height="",De.scrollHeight>De.clientHeight&&(De.style.height=`${De.scrollHeight}px`)},[t,nt,B]);const gt=g!=null&&Ze>g,ht=ae===32?16:20,xt=we("text-field",`text-field--s${ae}`,N==="display"?"text-field--display":"",C?"text-field--full-width":"",v?"text-field--disabled":"",y?"text-field--readonly":"",x?"text-field--error":"",b?`text-field--status-${b}`:"",A?"text-field--has-left-icon":"",D||j||Ie?"text-field--has-right-icon":"",z),ut={id:J,...qe?{}:Oe?{value:t}:{defaultValue:r},ref:Ne,placeholder:Re,name:a,disabled:v,readOnly:y,autoFocus:te,maxLength:g,list:M,inputMode:pe,autoComplete:se,autoCapitalize:_e,autoCorrect:Ae,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!x||b==="error","aria-describedby":[_||x?F:null,c].filter(Boolean).join(" ")||void 0,role:Y?"combobox":void 0,"aria-autocomplete":Y?"list":void 0,"aria-haspopup":Y?"listbox":void 0,"aria-expanded":Y?le:void 0,"aria-controls":le?H.listId:void 0,"aria-activedescendant":le&&H.activeIdx>=0?`${H.listId}-option-${H.activeIdx}`:void 0,onChange:De=>{const rt=De.target;Oe||We(rt.value.length),l?.(rt.value),Y&&H.handleInput(),qe&&queueMicrotask(()=>{const it=ot.current??"";rt.value!==it&&(rt.value=it)})},onCompositionStart:Y?H.handleCompositionStart:void 0,onCompositionEnd:Y?H.handleCompositionEnd:void 0,onFocus:(De=>{G?.(De),Y&&H.handleFocus()}),onBlur:(De=>{T?.(De),Y&&H.handleBlur()}),onKeyDown:(De=>{const rt=(De.key==="Tab"&&!De.shiftKey||De.key===" ")&&!De.nativeEvent.isComposing;if(d&&rt&&!y&&!v&&!(De.currentTarget.value??"").trim()){De.preventDefault();const it=De.currentTarget;Oe||(it.value=d,We(d.length)),l?.(d);return}Y&&De.key==="Enter"&&!De.nativeEvent.isComposing&&H.activeIdx>=0?De.preventDefault():O&&De.key==="Enter"&&!De.nativeEvent.isComposing&&(De.preventDefault(),O()),I?.(De),Y&&H.handleKeyDown(De)})},Gt=j&&!v&&!y&&Ze>0,_t=()=>B?n.jsx("textarea",{...ut,className:"text-field__input text-field__input--auto body-2",rows:1}):k?n.jsx("textarea",{...ut,className:"text-field__input text-field__input--textarea body-2",rows:E}):n.jsx("input",{...ut,type:Ct,className:"text-field__input body-2"}),Pt=N==="display"&&!B&&!k&&!!Re,Qe=()=>n.jsxs(n.Fragment,{children:[_t(),Pt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:Re})]});return n.jsxs("div",{ref:re,className:xt,children:[i&&n.jsxs("label",{htmlFor:J,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[A&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:ht})}),Qe(),g!=null&&W&&n.jsxs("span",{className:`text-field__count caption-2${gt?" text-field__count--over":""}`,children:[Ze,"/",g]}),Gt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:xe("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:De=>{De.preventDefault()},onClick:()=>{!Oe&&Q.current&&(Q.current.value="",We(0)),l?.("")},tabIndex:-1}),Ie&&n.jsx(fe,{size:24,type:"dot",icon:je?"eye-off":"eye",variant:"transparent-gray",useBorder:!1,className:"text-field__reveal",ariaLabel:xe("textField.showPassword","\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"),"aria-pressed":je,htmlType:"button",disabled:v,onMouseDown:De=>{De.preventDefault()},onClick:()=>tt(De=>!De)}),D&&!Gt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:ht})})]}),!!Y&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:H.open&&(t??"").length>0&&H.filtered.length===0?xe("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),le&&(typeof document>"u"?null:bn.createPortal(n.jsx("ul",{id:H.listId,className:"text-field__suggestions",role:"listbox",style:ue??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:H.filtered.map((De,rt)=>n.jsx("li",{id:`${H.listId}-option-${rt}`,role:"option","aria-selected":rt===H.activeIdx,className:`text-field__suggestion body-2${rt===H.activeIdx?" is-active":""}`,onMouseDown:it=>it.preventDefault(),onClick:()=>{H.handleSelect(De),Q.current?.focus()},children:typeof De=="string"?De:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:De.label}),De.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:De.hint})]})},typeof De=="string"?`${De}-${rt}`:De.id))}),document.body)),(_||x)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:F,className:"text-field__helper caption-1",role:x?"alert":void 0,children:x||_})})]})}const Sc=()=>{};function cn(e){const t=o.useId(),r=kn()??gn;if(!("variant"in e)){const{label:g,sub:w,onClick:N,children:C,align:B="horizontal",icon:k,useFullWidth:E=!1,required:A=!1}=e,D=j=>{N&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),N())};return n.jsxs("div",{className:we("panel-row",B==="vertical"?"panel-row--vertical":"",E?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?D:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[k!=null&&n.jsx("div",{className:"panel-row__icon",children:k}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsxs("div",{className:"panel-row__label body-3",children:[g,A&&n.jsx("span",{className:"required-mark",children:"*"})]}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(Nr,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:s,sub:l,onClick:i,required:u,error:c,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,m=a==="button"?void 0:i;let f=null;const v=a==="toggle"?`panel-toggle-${t}`:void 0,y=c?`panel-error-${t}`:void 0,x=`panel-helper-${t}`;if(a==="toggle"){const g=e;f=n.jsx(kc,{checked:g.checked,onChange:g.onChange,id:v})}else if(a==="segmented"){const g=e;f=n.jsx(An,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??r,ariaLabel:s})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((N,C)=>n.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:n.jsx(Nn,{options:N.options,value:N.value,onChange:N.onChange,size:r,placeholder:N.placeholder,block:h,error:!!c,ariaDescribedBy:y,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},C))}):n.jsx(Nn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Sc,size:r,block:h,error:!!c,ariaLabel:s,ariaDescribedBy:y});f=c?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:c})]}):w}else if(a==="button"){const g=e;g.buttons?.length?f=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,N)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??r,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},N))}):f=n.jsx(fe,{htmlType:"button",size:g.btnSize??r,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${h?" 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${h?" panel-row__input-wrap--full":""}`,children:[n.jsx(qn,{size:r,value:g.value,onChange:g.onChange??Sc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,revealable:g.revealable,autoCapitalize:g.autoCapitalize,autoCorrect:g.autoCorrect,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:h,error:c,ariaLabel:s,required:u,ariaDescribedBy:g.helperText?x:void 0}),g.helperText&&n.jsx("div",{id:x,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(f=e.children);c&&a!=="input"&&a!=="dropdown"&&(f=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[f,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const b=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&h,_=g=>{m&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())};return n.jsxs("div",{className:we("panel-row",p==="vertical"?"panel-row--vertical":"",b?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",m?"panel-row--clickable":""),onClick:m,onKeyDown:m?_:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,children:[d!=null&&n.jsx("div",{className:"panel-row__icon",children:d}),n.jsxs("div",{className:"panel-row__left",children:[v?n.jsxs("label",{htmlFor:v,className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}function Tc(e){const t=e.productName||e.brand,r=[e.brand,e.fitType].filter(a=>!!a&&a!==t);return[...new Set(r)].join(" \xB7 ")}function o4({devices:e,onRelease:t,emptyLabel:r}){const{t:a,i18n:s}=Ee.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?a("device.direction.left","\uC88C"):a("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(rn,{size:"small",variant:Nc(i.device),fill:"soft",label:Ec(i.device,a)}),Tc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Tc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),vs(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:a("customers.device.wornSince",{date:vs(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:r??a("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Tr({title:e,titleLevel:t=2,icon:r,disc:a,actions:s,minHeight:l,maxWidth:i,className:u,scrollable:c,scrollbarGutter:p="stable",compactRows:h=!1,useBorder:d=!0,useBg:m=!0,labelWidth:f,form:v=!1,loading:y,empty:x,children:b}){const _=we("panel",v?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",m?"":"panel--no-bg",h?"panel--compact-rows":"",u),g={};l!==void 0&&(g.minHeight=l),i!==void 0&&(g.maxWidth=typeof i=="number"?`${i}px`:i),f!==void 0&&(g["--panel-label-width"]=typeof f=="number"?`${f}px`:f);const w=t?`h${t}`:"div",N=d?gn:48;return n.jsx(ns.Provider,{value:N,children:n.jsxs("div",{className:_,style:Object.keys(g).length?g:void 0,children:[(!!e||a!=null)&&n.jsxs("div",{className:we("panel__header",a!=null?"panel__header--with-disc":""),children:[r&&n.jsx(lt,{icon:r,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(w,{className:`panel__title ${a!=null?"body-3b":"h5b"}`,children:e}),a!=null&&n.jsx("p",{className:"panel__disc caption-1",children:a})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),y?n.jsx(cn,{variant:"loading"}):x!=null&&o.Children.toArray(b).length===0?n.jsx(cn,{variant:"empty",children:x}):c?n.jsx("div",{className:we("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:b}):b]})})}function s4({cols:e=2,layout:t="grid",gap:r=1,collapseAt:a,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(a===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([f])=>p(f.contentRect.width));return m.observe(d),()=>m.disconnect()},[a]);const h=a!==void 0&&c!==void 0&&c<=a;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof r=="number"?`${r}px`:r,...l},children:i})}function Ka(e){const{title:t,subtitle:r,message:a,topContent:s,details:l,children:i,confirmLabel:u,cancelLabel:c,hideCancel:p=!1,extraAction:h,confirmVariant:d="main",confirmDisabled:m=!1,onConfirm:f,closeOnConfirm:v=!0,onClose:y,inline:x,width:b,size:_,className:g,initialFocus:w="close"}=e,{t:N}=Ee.useTranslation(),C=o.useRef(null);o.useEffect(()=>{if(x||w==="close")return;const j=C.current?.closest(".popup-panel"),M=Array.from(j?.querySelectorAll(".popup-footer--buttons button")??[]),W=h&&(h.placement??"start")==="start"?1:0,z=w==="confirm"?M[M.length-1]:p?void 0:M[W];z&&!z.disabled&&z.focus()},[]);const B=o.useRef(!1),[k,E]=o.useState(!1),A=j=>{let M=!1;return{close:()=>{M=!0,j()},didClose:()=>M}},D=async j=>{if(B.current)return;B.current=!0;const M=typeof document<"u"?document.activeElement:null;E(!0);let W=!1;try{W=await j()}catch(z){typeof console<"u"&&console.error(z)}finally{W||(B.current=!1,E(!1),requestAnimationFrame(()=>{const z=document.activeElement;(!z||z===document.body)&&M?.isConnected&&M.focus()}))}};return n.jsxs(Vn,{title:t,subtitle:r,onClose:y,closeDisabled:k,inline:x,width:b??_??"small",className:we("confirm-popup",s!=null&&"confirm-popup--has-top",g),buttons:(()=>{const j=[...h?[{label:h.label,variant:h.variant??"default",disabled:h.disabled||k,onClick:async({closeWithAnimation:z})=>{await D(async()=>{const G=A(z);await h.onClick(G.close);const T=h.closeOnClick??!0;return T&&z(),T||G.didClose()})}}]:[]],M=[...p?[]:[{label:c??N("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:k,onClick:({closeWithAnimation:z})=>z()}]],W={label:u??N("common.confirm","\uD655\uC778"),variant:d,disabled:m||k,onClick:async({closeWithAnimation:z})=>{await D(async()=>{const G=A(z);return await f(G.close),v&&z(),v||G.didClose()})}};return(h?.placement??"start")==="beforeConfirm"?[...M,...j,W]:[...j,...M,W]})(),children:[s!=null&&n.jsx("div",{className:"confirm-popup__top",children:s}),l&&l.length>0&&n.jsx(Tr,{children:l.map((j,M)=>n.jsx(cn,{label:j.label,children:n.jsx("span",{className:"panel-row__text body-2",children:j.value})},M))}),n.jsx("p",{ref:C,className:"body-2 confirm-popup__message",hidden:a==null,children:a}),i]})}function l4({value:e,onChange:t,canAdd:r,error:a,onAdd:s,onClose:l,maxLength:i}){const{t:u}=Ee.useTranslation(),c=u("folder.add.placeholder","\uD3F4\uB354 \uC774\uB984");return n.jsx(Ka,{title:u("folder.add.title","\uD3F4\uB354 \uCD94\uAC00"),subtitle:u("folder.add.sub","\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),confirmLabel:u("common.add","\uCD94\uAC00"),confirmDisabled:!r,closeOnConfirm:!1,onConfirm:p=>s(p),onClose:l,children:n.jsx(Tr,{useBorder:!1,children:n.jsx(cn,{useFullWidth:!0,children:n.jsx(qn,{autoFocus:!0,value:e,onChange:t,placeholder:c,ariaLabel:c,maxLength:i,fullWidth:!0,error:a,onEnter:()=>{r&&s(l)}})})})})}function i4({path:e,title:t,message:r,onConfirm:a,onClose:s}){const{t:l}=Ee.useTranslation(),i=Qr(e);return n.jsx(Ka,{title:t(i),message:r(i),confirmLabel:l("common.delete","\uC0AD\uC81C"),confirmVariant:"danger",onConfirm:()=>a(e),onClose:s})}function Mc({title:e,count:t,titleLevel:r=3,actions:a,empty:s=!1,emptyContent:l,spread:i=!1,className:u,children:c}){const p=`h${r}`;return n.jsxs("section",{className:we("card-section",u),children:[e!=null&&n.jsxs("header",{className:"card-section__head",children:[n.jsx(p,{className:"card-section__title h5b",children:e}),t!=null&&n.jsx("span",{className:"card-section__count body-3b",children:t}),a!=null&&n.jsx("span",{className:"card-section__actions",children:a})]}),s?n.jsx("div",{className:"card-section__empty body-3",children:l}):n.jsx("div",{className:we("card-section__list",i&&"card-section__list--spread"),children:c})]})}function u4({bundles:e,noneKey:t,noneLabel:r,titleLevel:a=2,rowRender:s}){return n.jsx(n.Fragment,{children:e.filter(([,l])=>l.length>0).map(([l,i])=>n.jsx(Mc,{titleLevel:a,title:l===t?r:l.split("/").join(" \u203A "),count:i.length,children:i.map((u,c)=>s(u,c))},l))})}const $c=160;function c4({children:e,top:t,bottom:r,mode:a="top",contentFull:s=!1,closing:l=!1,onClose:i,backClosable:u=!0,beforeClose:c,className:p,"aria-label":h}){Wu(!!i&&u&&!l,()=>{if(c&&c()===!1)return!1;i?.()});const d=o.useRef(null),m=o.useRef(typeof document>"u"?null:document.activeElement);return o.useEffect(()=>{const f=m.current,v=d.current;return v&&!v.contains(document.activeElement)&&(v.querySelector(Sn)??v).focus(),()=>{f?.focus?.()}},[]),La(d),n.jsx("div",{className:we("page-popup",l&&"page-popup--closing",p),role:"dialog","aria-modal":"true","aria-label":h,children:n.jsxs("div",{className:"page-popup__panel",ref:d,tabIndex:-1,children:[t&&n.jsx("div",{className:"page-popup__top",children:t}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:we("page-popup__content",a==="center"?"page-popup__content--center":"page-popup__content--top",s&&"page-popup__content--full"),children:e})}),r&&n.jsx("div",{className:"page-popup__bottom",children:r})]})})}function d4(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(null),l=o.useCallback(()=>{a.current||(a.current=!0,r(!0),s.current=setTimeout(()=>{s.current=null;try{e()}catch(i){a.current=!1,r(!1),console.error(i)}},nv()?0:$c))},[e]);return o.useEffect(()=>wc(),[]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{closing:t,handleClose:l}}function Ya(e){return String(e)}const Za=["o","triangle","x"];function Lc(e,t){return e===t?null:t}const xs={o:"circle",triangle:"triangle",x:"x"},_s={o:"main",triangle:"warn",x:"danger"},p4=24,h4=2,ws=3.5,m4=.8;function f4(e){if(!(e>0))return ws;const t=m4*p4/e;return Math.min(ws,Math.max(h4,t))}function C4(e){let t=0,r=0,a=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?r++:l==="x"&&a++;const s=t+r+a;return{marked:s,o:t,triangle:r,x:a,rate:s===0?null:(t+r*.5)/s}}function Bs(e){const t={};for(const[r,a]of Object.entries(e))(a==="o"||a==="triangle"||a==="x")&&(t[r]=a);return t}function Rc(e){const t=[];let r=0;for(const a of e)t.push(r),r+=a;return t}function g4(e,t){return!t&&e>0}function Pc({mark:e,label:t}){return n.jsx("span",{className:"mark-icon",...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:n.jsx(Mn,{size:24,position:"inline",className:`mark-icon__badge mark-icon__badge--${_s[e]}`,children:n.jsx(lt,{icon:xs[e],size:14})})})}function b4({o:e,triangle:t,x:r,label:a,className:s}){const l=[["o",e],["triangle",t],["x",r]];return n.jsx("span",{className:we("score-mark-counts",s),children:l.map(([i,u])=>n.jsxs("span",{className:"score-mark-counts__one",children:[n.jsx(Pc,{mark:i,label:a?a(i,u):""}),n.jsx("span",{className:"score-mark-counts__num",children:u})]},i))})}function y4({children:e}){return Pv(!0),n.jsx(n.Fragment,{children:e})}var v4=Object.defineProperty,x4=(e,t,r)=>t in e?v4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fc=(e,t,r)=>x4(e,typeof t!="symbol"?t+"":t,r);let _4=class extends o.Component{constructor(){super(...arguments),Fc(this,"state",{hasError:!1}),Fc(this,"releaseHealth")}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r),console.error(t,"[ErrorBoundary]",r.componentStack)}componentDidMount(){this.releaseHealth=this.props.registerHealth?.(()=>this.state.hasError)}componentWillUnmount(){this.releaseHealth?.()}componentDidUpdate(t){if(!this.state.hasError)return;const r=t.resetKeys,a=this.props.resetKeys;!r||!a||(r.length!==a.length||r.some((s,l)=>!Object.is(s,a[l])))&&this.setState({hasError:!1,error:void 0})}render(){if(!this.state.hasError)return this.props.children;const t=this.state.error;return this.props.fallback?.({error:t,retry:()=>this.setState({hasError:!1,error:void 0}),reload:this.props.reload??(()=>{window.location.reload()}),staleChunk:O2(t)})??null}};const w4={small:14,medium:20,large:28};function B4({value:e,onChange:t,max:r=5,readOnly:a=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Ee.useTranslation(),c=a||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,f=w4[s],v=C=>{C!==e&&t?.(C)},y=C=>{c||v(C)},x=C=>{c||ur()||h(C)},b=o.useRef(null),_=C=>{const B=Math.min(r,Math.max(1,C));v(B),Array.from(b.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(B))?.focus()},g=C=>{if(!c){switch(C.key){case"ArrowRight":case"ArrowUp":_((d||0)+1);break;case"ArrowLeft":case"ArrowDown":_((d||1)-1);break;case"Home":_(1);break;case"End":_(r);break;default:return}C.preventDefault()}},w=d>=1&&d<=r?Math.round(d):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:b,onKeyDown:g,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:r}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:C=>{C.pointerType==="touch"&&N()},onPointerCancel:C=>{C.pointerType==="touch"&&N()},children:Array.from({length:r},(C,B)=>{const k=B+1,E=Math.max(0,Math.min(1,m-B)),A=E>0&&E<1,D=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:f,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${E*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:f,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:D},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===w?0:-1,onClick:()=>y(k),onMouseEnter:()=>x(k),children:D},k)})})}const k4=20,A4=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function N4({value:e,onChange:t,palette:r=A4,size:a,className:s="",ariaLabel:l}){const i=kn(),u=a??i??gn,{t:c}=Ee.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:r.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${u}`,style:{backgroundColor:p},onClick:()=>t(p),"aria-pressed":h,"aria-label":h?`${p} ${c("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&n.jsx(lt,{icon:"check",size:k4,className:"color-picker__check"})},p)})})}function Ic({icon:e,label:t,tooltip:r,wrapperStyle:a,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Ee.useTranslation(),p=u==="small",h=we("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[f,v]=o.useState(!1),y=o.useMemo(()=>{const k=a&&typeof a=="object"?{...a}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[a,s,l]),x=r||t,b=i&&!!x,[_,g]=o.useState(null);o.useLayoutEffect(()=>{f&&g(m.current?.getBoundingClientRect()??null)},[f]),o.useEffect(()=>{if(!i&&f)try{v(!1)}catch{}},[i,f]),o.useEffect(()=>{if(!f)return;const k=E=>{const A=m.current;if(!A)return;const D=E.target;D&&!A.contains(D)&&v(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[f]);const w=o.useCallback(()=>{i&&v(!0)},[i]),N=o.useCallback(()=>{i&&v(!1)},[i]),C=o.useCallback(()=>v(!1),[]),B=o.useCallback(k=>{if(k.key==="Escape"){v(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),v(E=>!E))},[]);return n.jsxs("span",{ref:m,className:we("category-icon__wrap",b&&"category-icon__wrap--interactive"),onPointerEnter:w,onPointerLeave:N,onFocus:w,onBlur:N,onKeyDown:B,role:x?"button":void 0,tabIndex:x?0:void 0,"aria-label":typeof x=="string"?c("common.descriptionFor",{name:x,defaultValue:`${x} \uC124\uBA85`}):void 0,"aria-haspopup":!!x,"aria-expanded":f,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:y,size:d}),f&&x&&n.jsx(On,{anchorRect:_,text:typeof x=="string"?x:void 0,offset:8,onClose:C,className:"category-icon__tooltip",ariaLabel:typeof x=="string"?x:void 0})]})}let nr=null;function fa(e){if(nr&&nr!==e)try{nr()}catch{}return nr=e,()=>{nr===e&&(nr=null)}}function Xa(e){if(nr===e){nr=null;try{e()}catch{}}}function Ca(e,t){let r=()=>{};const a=new Promise(u=>{r=u});if(typeof e!="string"||e.trim()===""){kt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),r(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:a}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}r(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:a}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:a}}function E4(e,t){if(!e)return{previewCodes:[],previewBucket:null};const r=e,a=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=r.sentences||r.items||[],l=a(Array.isArray(s)?s:[]);return l.length===0&&(r.contextCode||r.context_code)&&l.push(String(r.contextCode||r.context_code)),{previewCodes:l,previewBucket:null}}function j4(e,t){const[r,a]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,f]=o.useState(!1),v=o.useRef([]),{previewCodes:y,previewBucket:x}=E4(e,t),b=`${y.join(",")}|${x??""}`,_=o.useMemo(()=>i.key===b?i.urls:[],[i,b]);o.useEffect(()=>{if(!y.length)return;let w=!1;return(async()=>{const N=[],C=[];for(const B of y)try{const k=di(B,x);if(!k){N.push("");continue}let E=null;try{E=await pi(k)}catch{}if(!E)try{const A=await hi(k);A&&(E=URL.createObjectURL(A),C.push(E))}catch{}N.push(E??"")}catch{N.push("")}w?C.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}):(v.current.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}),v.current=C,u({key:b,urls:N}))})(),()=>{w=!0}},[y.join(","),x]),o.useEffect(()=>()=>{v.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),v.current=[]},[]);const g=o.useCallback(async w=>{if(w.stopPropagation(),w.preventDefault(),p.current){h.current&&Xa(h.current),p.current=!1;try{c.current?.pause()}catch{}a(!1),l(-1);return}if(!_.filter(Boolean).length)return;let N=null;const C=()=>{p.current=!1,N?.stop()};h.current=C;const B=fa(C);p.current=!0,a(!0);for(let k=0;k<_.length&&p.current;k++){const E=_[k];if(E&&(l(k),N=Ca(E),c.current=N.el,!await N.done))break}B(),h.current===C&&(h.current=null,p.current=!1,a(!1),l(-1))},[_]);return o.useEffect(()=>()=>{h.current&&Xa(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:r,playingIndex:s,previewUrls:_,previewHover:m,setPreviewHover:f,previewBtnRef:d,handlePreview:g}}const D4=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const r=e.sentences||e.items||e.questions||[];return Array.isArray(r)&&r.length>0?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(a=>typeof a=="string"&&a.trim().length>0).map(a=>a.trim()):[]};function ks(e){const{index:t,type:r,trainingData:a,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:f=!1,showTypeLabel:v=!1,onComplete:y,onSelect:x,onMore:b,countLabelOverride:_,size:g="square"}=e||{},{t:w}=Ee.useTranslation(),[N,C]=o.useState(!1),B=o.useRef(null),[k,E]=o.useState(!1);o.useEffect(()=>{B.current?.matches(":hover")&&E(!0)},[]);const{playing:A,playingIndex:D,previewUrls:j,previewHover:M,setPreviewHover:W,previewBtnRef:z,handlePreview:G}=j4(a,r?.key),T=o.useCallback(()=>{x?x():C(!0)},[x]),I=o.useCallback(()=>C(!1),[]),O=o.useCallback(()=>E(!0),[]),pe=o.useCallback(()=>E(!1),[]),se=o.useCallback(()=>W(!0),[W]),$=o.useCallback(()=>W(!1),[W]),[V,ne]=o.useState(null);o.useLayoutEffect(()=>{M&&ne(z.current?.getBoundingClientRect()??null)},[M,z]);const[te,P]=o.useState(null);o.useLayoutEffect(()=>{k&&!N&&d&&P(B.current?.getBoundingClientRect()??null)},[k,N,d]);const L=o.useCallback(We=>{We.target===We.currentTarget&&(We.key==="Enter"||We.key===" ")&&(We.preventDefault(),T())},[T]),R=a||null,U=o.useMemo(()=>{if(!d)return null;const We=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ze=We&&We.length>0?We:D4(R);return Ze&&Ze.length>0?Ze:null},[d,h,R]),Z=o.useCallback(We=>{We.stopPropagation(),m?.()},[m]),X=o.useCallback(We=>We.stopPropagation(),[]),ae=o.useCallback(We=>{typeof y=="function"&&y(We)},[y]),Y=u||(c&&a?.id!=null?c.has(String(a.id)):!1),xe=!Y&&(p!=null&&a?.id!=null?p.has(String(a.id)):!1);Su("speechear.popup.close",I);const ie=Pi(),J=`${r?.label||""} ${t+1}`,F=R?.title||R?.name||J;let Q=r?.icon,H,le="",re="";try{const We=R?.category_0||R?.category_main_code||R?.category_main,Ze=R?.category_1||R?.category_sub_code||R?.category_sub,ot=ie.find(gt=>gt.key===We);ot?.icon&&(Q=ot.icon),!H&&ot?.color&&(H={"--t-item-fg":ot.color}),!H&&R?.iconColor&&(H={"--t-item-fg":R.iconColor}),le=ot?w(`topic.${ot.key}`,{defaultValue:ot.label||""}):"";try{const gt=ot?.subs?.find(ht=>ht.key===Ze);re=gt?w(`topic.sub.${gt.key}`,{defaultValue:gt.label||""}):""}catch{}}catch{}const ue=re?`${le} / ${re}`:le||r?.label||F,Be=We=>w("training.countQuestions",{n:We,count:We}),ke=We=>w("training.countSentences",{n:We,count:We});let Ne="";try{const We=vy(r?.key,R);We&&(Ne=We.unit==="sentence"?ke(We.n):Be(We.n))}catch{}const Re=g==="row",ye=g==="list"||Re,_e=g==="compact",Ae=g==="small",Ie=Ae&&r?.key?yy().find(We=>We.key===r.key):void 0,je=Ie?Fi[Ie.key]:void 0,tt=Ie?je?w(`trainingType.${je}.title`,{defaultValue:Ie.label}):Ie.label??"":"",Ct=v&&r?.label&&r.label!==String(F)?String(r.label):Ae&&tt&&tt!==String(F)?tt:"",Oe=!!Ct,qe=_!==void 0?_:Ne,nt=[Ct,typeof F=="string"?F:"",qe].map(We=>String(We??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:B,className:`training-block-button${ye?" training-block-button--list":""}${Re?" training-block-button--row":""}${_e?" training-block-button--compact":""}${Ae?" training-block-button--small":""}${Y?" training-block-button--completed":""}${xe?" training-block-button--selected":""}${Oe&&!Ae?" training-block-button--withType":""}${Ae&&!Oe?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:O,onPointerLeave:pe,role:"button",tabIndex:0,onKeyDown:L,"aria-label":typeof s=="string"?s:nt||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
|
|
842
|
-
`):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&r?.label&&r.label!==String(F)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:r.label}),Ae&&tt&&tt!==String(F)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:tt}),n.jsx(Ic,{icon:Q,label:F,tooltip:ue,wrapperStyle:H,iconSize:Ae||_e?"small":"medium"}),!f&&(Y||xe)&&!(m&&k)&&n.jsx(Mn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":Y?w("training.completed","\uD6C8\uB828 \uC644\uB8CC"):w("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Mn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":w("common.remove","\uC81C\uAC70"),onClick:Z}),n.jsx("div",{className:`training-block-button__title ${_e?"body-3":Ae?"body-3b":"h3"}`,children:String(F)}),n.jsxs("div",{className:"training-block-button__description",children:[qe?n.jsx("div",{className:`training-block-button__count ${Ae?"caption-2":"caption-1"}`,children:qe}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:w("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:Ae?12:20})})]}),(ye&&!Re||Ae)&&j.length>0&&n.jsx("div",{ref:z,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:X,onPointerEnter:se,onPointerLeave:$,children:n.jsx(fe,{htmlType:"button",size:Ae?28:32,type:"dot",icon:A?"pause":"play",variant:Ae?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(F).trim()?A?w("training.stopFor",{name:F,defaultValue:`${F} \uC815\uC9C0`}):w("training.previewFor",{name:F,defaultValue:`${F} \uBBF8\uB9AC \uB4E3\uAE30`}):A?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:G})})]}),b&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:We=>{We.stopPropagation(),b(We)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(F).trim()?w("common.moreFor",{name:F}):w("common.more","\uB354\uBCF4\uAE30")})})]}),M&&n.jsx(On,{anchorRect:V,text:A?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:$}),k&&!N&&d&&(U?n.jsx(Qn,{anchorRect:te,items:U,activeIndex:D,onClose:pe}):R?.subTitle?n.jsx(On,{anchorRect:te,text:R.subTitle,offset:8,onClose:pe}):null),N&&i&&i({trainingData:R,typeKey:r?.key??"",onClose:I,onComplete:ae,popupTitle:String(F),popupSubTitle:r?.subTitle,depth:l!=null?String(l):void 0,popupIcon:Q,popupIconTooltip:String(ue),popupWrapperStyle:H})]})}const Oc=200;function S4(e){return e.itemId?(ky()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function zc({plan:e,groups:t,anchorRect:r,offset:a=12,onClose:s}){const{t:l}=Ee.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Ny(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(S4).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:de("training-tooltip__box"),children:n.jsx("div",{className:de("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:de("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:de("training-tooltip__section"),children:[n.jsx("div",{className:de("training-tooltip__section-header"),children:n.jsx("span",{className:de("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:de("training-tooltip__items"),children:d.map((f,v)=>n.jsx(ks,{index:v,type:h,trainingData:f,size:"compact",hideCheckBadge:!0},String(f.id??v)))})]},c)])})});return r?n.jsx(sn,{anchorRect:r,offset:a,onClose:s,closeOnOutsideClick:!1,className:de("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const T4=200;function M4({icon:e,count:t,title:r,plan:a,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!a,d=we("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[f,v]=o.useState(null),y=o.useRef(null),x=o.useRef(null),b=!!(f&&a&&s),_=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),x.current&&(clearTimeout(x.current),x.current=null)},[]),g=o.useCallback(()=>{_(),v(null)},[_]),w=o.useCallback(()=>{!s||!a||(_(),y.current=setTimeout(()=>{y.current=null,v(m.current?.getBoundingClientRect()??null)},Oc))},[s,a,_]),N=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),!x.current&&(x.current=setTimeout(()=>{x.current=null,v(null)},T4))},[]);return o.useEffect(()=>()=>{_()},[_]),o.useEffect(()=>{(!s||!a)&&g()},[s,a,g]),o.useEffect(()=>{if(!b)return;const C=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),B=k=>{C(k.target)?_():N()};return document.addEventListener("pointerover",B,!0),()=>document.removeEventListener("pointerover",B,!0)},[b,_,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?C=>{g(),u(C)}:void 0,onKeyDown:u?C=>{C.key!=="Enter"&&C.key!==" "||(C.preventDefault(),C.currentTarget.click())}:void 0,onPointerEnter:C=>{C.pointerType==="touch"||C.pointerType==="pen"?g():w()},onMouseEnter:c,onMouseLeave:C=>{N(),p?.(C)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${r} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),f&&a&&n.jsx(zc,{plan:a,anchorRect:f,onClose:g})]})}function $4(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function L4({open:e,onClose:t,ariaLabel:r,title:a,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=Ee.useTranslation(),m=o.useId(),f=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const _=document.activeElement,g=_c(),w=f.current;return es(w,_),w?.focus(),()=>{g();const N=document.activeElement;(!N||N===document.body||w&&w.contains(N))&&ts(_)?.focus?.()}},[e]);const y=o.useRef(v),x=o.useRef(u);o.useEffect(()=>{y.current=v,x.current=u}),o.useEffect(()=>{if(e)return ir(()=>{x.current&&y.current()})},[e]);const b=o.useRef(!1);return La(f,e),!e||typeof document>"u"?null:bn.createPortal(n.jsx("div",{className:we("dialog",p),onPointerDown:i?_=>{b.current=_.target===_.currentTarget}:void 0,onMouseDown:_=>{_.target===_.currentTarget&&_.preventDefault()},onClick:i?_=>{const g=b.current;b.current=!1,g&&_.target===_.currentTarget&&v()}:void 0,children:n.jsxs("div",{ref:f,role:"dialog","aria-modal":"true","aria-label":a?void 0:r,"aria-labelledby":a?m:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${l}`,h),onClick:_=>_.stopPropagation(),children:[a?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:a})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:v,children:n.jsx($4,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function R4({columns:e,rows:t,rowKey:r,title:a,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=Ee.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[a||s?n.jsxs("div",{className:"board__head",children:[a?n.jsx("h2",{className:"board__title",children:a}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:we("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(f=>n.jsx("td",{className:we("board__td",`board__cell--${f.align??"left"}`),children:f.render(d,m)},f.key))},r(d,m)))})]})]})}function P4({name:e,role:t,photo:r,media:a,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:a??(r?n.jsx("img",{src:r,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function F4({groups:e,className:t=""}){return n.jsx("div",{className:we("timeline",t),children:e.map(r=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:r.title}),n.jsx("ul",{className:"timeline__rows",children:r.entries.map((a,s)=>n.jsxs("li",{className:"timeline__row",children:[a.label?n.jsx("span",{className:"timeline__label",children:a.label}):null,n.jsx("div",{className:"timeline__items",children:a.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${a.label??""}-${s}`))})]},r.title))})}function I4({title:e,kind:t,body:r,badge:a,badgeSrc:s,footer:l,width:i,className:u=""}){const c=a??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:we("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:r}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function O4({logo:e,alt:t,onDone:r,durationMs:a=3e3}){const s=aa(r);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),a);return()=>clearTimeout(l)},[a,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${a}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function z4({eyebrow:e,eyebrowIndex:t,title:r,description:a,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,r?n.jsx(u,{className:"section-header__title",children:r}):null,a?n.jsx("div",{className:"section-header__description",children:a}):null]})}function W4({items:e,className:t=""}){return n.jsx("ul",{className:we("company-meta",t),children:e.map((r,a)=>n.jsxs("li",{className:"company-meta__item",children:[a>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,r]},r))})}function As({checked:e=!1,onChange:t,disabled:r,indeterminate:a,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!a);return d.current=!!a,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!a)}),n.jsxs("label",{className:we("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",r&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:r,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Wc(e,t){const r=()=>{if(e){const[y,x]=e.split("-");return{y:+y,m:+x-1}}const[f,v]=Da(t).split("-");return{y:+f,m:+v-1}},[a,s]=o.useState(()=>r().y),[l,i]=o.useState(()=>r().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const f=r();s(f.y),i(f.m)},[e]);const c=o.useRef({y:a,m:l});o.useEffect(()=>{c.current={y:a,m:l}},[a,l]);const p=o.useCallback(f=>{const v=c.current.y*12+c.current.m+f,y=Math.floor(v/12),x=v-y*12;c.current={y,m:x},s(y),i(x)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((f,v)=>{c.current={y:f,m:v},s(f),i(v)},[]);return{viewY:a,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function Ja(e,t){return new Date(e,t+1,0).getDate()}function H4(e,t){return new Date(e,t,1).getDay()}function ga(e,t,r){return`${e}-${String(t+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function V4(e){if(!e)return"";const[t,r,a]=e.split("-");return`${t}. ${r}. ${a}.`}function Hc(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const r=+t.slice(0,4),a=+t.slice(4,6),s=+t.slice(6,8);if(a<1||a>12||s<1||s>31)return null;const l=new Date(r,a-1,s);return l.getFullYear()!==r||l.getMonth()!==a-1||l.getDate()!==s?null:ga(r,a-1,s)}const q4=1900;function U4(e,t,r,a,s){const l=a?+a.split("-")[0]:Math.min(q4,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:r(c)});return u}function Vc(e,t,r,a){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;r&&i<r.slice(0,7)||a&&i>a.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function qc({value:e,onChange:t,size:r,min:a,max:s,disabled:l,placeholder:i,className:u,today:c,ariaLabel:p,ariaLabelledBy:h}){const d=kn(),m=r??d??gn;!p&&!h&&kt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:f,i18n:v}=Ee.useTranslation(),y=i??f("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),x=o.useMemo(()=>f("calendar.dow",{returnObjects:!0}),[f]),b=Da(c),{viewY:_,viewM:g,prevMonth:w,nextMonth:N,setViewYM:C}=Wc(e,c),B=o.useId(),k=o.useCallback((H,le)=>{const re=window.innerHeight,ue=window.innerWidth,Be=typeof document<"u"?document.getElementById(B):null,ke=Math.max(Be?.offsetHeight||0,Be?.scrollHeight||0)||300,Ne=Math.max(H.width,Be?.offsetWidth||0,260),Re=re-H.bottom,ye=H.top,_e=Re<ke&&ye>Re,Ae=8,Ie=(je,tt)=>Math.min(Math.max(Ae,je),Math.max(Ae,tt));return{position:"fixed",left:Ie(H.left,ue-Ne-Ae),width:H.width,minWidth:260,..._e?{top:"auto",bottom:Ie(re-H.top+6,re-ke-Ae)}:{bottom:"auto",top:Ie(H.bottom+6,re-ke-Ae)},zIndex:sa(le)}},[B]),{open:E,setOpen:A,toggle:D,style:j,triggerRef:M,menuRef:W}=la({computeStyle:k,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const H=W.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(Sn)??H)?.focus?.(),()=>{const le=document.activeElement;(!le||le===document.body)&&M.current?.focus?.()}},[E,W,M]);const[z,G]=o.useState(1),T=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{if(!E)return;const H=e&&e.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+b.slice(8):1;G(H)},[E]),o.useEffect(()=>{if(I.current==null)return;const H=I.current;I.current=null,T.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{G(H=>Math.min(H,Ja(_,g)))},[_,g]);const O=o.useCallback(H=>{let le=ga(H.getFullYear(),H.getMonth(),H.getDate());a&&le<a&&(le=a),s&&le>s&&(le=s);const[re,ue,Be]=le.split("-").map(Number);(re!==_||ue-1!==g)&&C(re,ue-1),G(Be),I.current=Be},[a,s,_,g,C]),pe=o.useCallback(H=>{const le=new Date(_,g,z),re=Be=>{le.setDate(le.getDate()+Be),O(le)},ue=Be=>{const ke=le.getFullYear()*12+le.getMonth()+Be,Ne=Math.floor(ke/12),Re=ke-Ne*12;O(new Date(Ne,Re,Math.min(le.getDate(),Ja(Ne,Re))))};switch(H.key){case"ArrowLeft":re(-1);break;case"ArrowRight":re(1);break;case"ArrowUp":re(-7);break;case"ArrowDown":re(7);break;case"Home":re(-le.getDay());break;case"End":re(6-le.getDay());break;case"PageUp":H.shiftKey?ue(-12):ue(-1);break;case"PageDown":H.shiftKey?ue(12):ue(1);break;default:return}H.preventDefault()},[_,g,z,O]),se=o.useCallback(H=>{l||(t(ga(_,g,H)),A(!1))},[_,g,t,A,l]);o.useEffect(()=>{l&&A(!1)},[l,A]);const $=H=>{const le=ga(_,g,H);return!!(a&&le<a||s&&le>s)},V=(()=>{const H=Ja(_,g);if(z>=1&&z<=H&&!$(z))return z;for(let le=1;le<=H;le++)if(!$(le))return le;return-1})(),ne=[];for(let H=0;H<H4(_,g);H++)ne.push(null);for(let H=1;H<=Ja(_,g);H++)ne.push(H);const te=m===64?20:m===32?14:m===40?16:18,P=Ho(v.language),L=H=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(H,0,1)),R=(H,le)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(H,le-1,1)),U=U4(_,+b.slice(0,4),L,a,s),Z=Vc(_,R,a,s),X=H=>{const le=Vc(H,R,a,s);if(le.length===0)return;const re=le.some(ue=>+ue.value===g+1);C(H,re?g:+le[0].value-1)},[ae,Y]=o.useState(null);o.useEffect(()=>{Y(null)},[e]);const xe=o.useCallback(H=>{Y(H);const le=Hc(H);if(!le||a&&le<a||s&&le>s)return;t(le);const[re,ue]=le.split("-");C(+re,+ue-1)},[a,s,t,C]),ie=(()=>{if(ae==null||ae.replace(/\D/g,"").length<8)return!1;const H=Hc(ae);return!H||!!a&&H<a||!!s&&H>s})(),J=o.useCallback(()=>{Y(null)},[]),F=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),J(),A(!1)):H.key==="Escape"?(J(),A(!1)):H.key==="ArrowDown"&&!E&&(H.preventDefault(),A(!0))},[J,A,E]),Q=E?bn.createPortal(n.jsxs("div",{ref:W,id:B,className:"date-picker__dropdown",style:j,"data-tooltip-ignore":!0,role:"dialog","aria-label":f("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:w,"aria-label":f("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(jl,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(Nn,{className:"date-picker__nav-dropdown",ariaLabel:f("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:U,value:String(_),onChange:H=>X(+H),size:40}),n.jsx(Nn,{className:"date-picker__nav-dropdown",ariaLabel:f("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:Z,value:String(g+1),onChange:H=>C(_,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":f("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Dl,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:T,onKeyDown:pe,children:[x.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),ne.map((H,le)=>{if(H===null)return n.jsx("div",{},`e${le}`);const re=ga(_,g,H),ue=re===e,Be=re===b,ke=$(H),Ne=le%7;return n.jsx("button",{type:"button",disabled:ke,"data-day":H,tabIndex:H===V?0:-1,"aria-current":Be?"date":void 0,onClick:()=>!ke&&se(H),className:we("date-picker__day caption-1",ue&&"date-picker__day--selected",Be&&!ue&&"date-picker__day--today",ke&&"date-picker__day--disabled",Ne===0&&"date-picker__day--sun",Ne===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${m}`,E&&"date-picker--open",ie&&"date-picker--invalid",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:M,type:"text",className:"date-picker__trigger body-2",value:ae??V4(e),placeholder:y,onChange:H=>xe(H.target.value),onClick:()=>!l&&!E&&D(),onKeyDown:F,onBlur:J,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,"aria-invalid":ie||void 0,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&D(),disabled:l,tabIndex:-1,"aria-label":y,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx(Il,{size:te,className:"date-picker__icon",strokeWidth:1.5})})]}),Q]})}const Uc=["personal","sensitive","marketing"];function G4({takenKinds:e,busy:t,today:r,onClose:a,onSubmit:s,className:l}){const{t:i}=Ee.useTranslation(),[u]=o.useState(()=>Da(r)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,f]=o.useState("self"),[v,y]=o.useState(u),[x,b]=o.useState(""),_=Uc.filter(w=>!e.includes(w)),g={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Vn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:a,className:l,footer:()=>n.jsx(fe,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:v||null,note:x.trim()||null})}),children:n.jsxs(Tr,{useBorder:!1,labelWidth:96,children:[n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[_.map(w=>n.jsx(As,{checked:c.includes(w),disabled:t,label:g[w],onChange:N=>p(C=>N?[...C,w]:C.filter(B=>B!==w))},w)),_.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(An,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:w=>d(String(w))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(An,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:w=>f(String(w))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(qc,{size:48,value:v,max:u,today:r,onChange:w=>y(w??"")})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(qn,{size:48,fullWidth:!0,value:x,onChange:b,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function Ns({page:e,totalPages:t,onChange:r,prevLabel:a,nextLabel:s,className:l=""}){const{t:i}=Ee.useTranslation(),u=a??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>r(Math.max(1,Math.min(p,e-1))),d=()=>r(Math.min(p,e+1));return n.jsxs("div",{className:we("pagination",l),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function Es({count:e,search:t,segment:r,filters:a,pageSize:s,pagination:l,actions:i,className:u}){const c=kn()??gn,{t:p}=Ee.useTranslation(),h=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(t||a?.length||s||l||i);return n.jsxs("div",{className:we("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[h,r&&(Array.isArray(r)?r:[r]).map((m,f)=>n.jsx(An,{size:c,...m},m.ariaLabel??f))]}),d&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(qn,{className:"toolbar__search",size:c,value:t.value,onChange:t.onChange,placeholder:t.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),a?.map((m,f)=>n.jsx(Nn,{size:c,options:m.options,value:m.value,onChange:m.onChange,ariaLabel:m.ariaLabel},f)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(Nn,{size:c,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Ns,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Gc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Gc).join(""):""}function K4(e){let t=e.replace(/\r\n/g,`
|
|
840
|
+
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},n2={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},r2={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"},a2={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30",showPassword:"\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"},o2={ariaLabel:"\uC120\uD0DD \uD0ED"},s2={ariaLabel:"\uD0ED"},l2={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},i2={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},u2={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},c2={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},d2={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"}},p2={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},h2={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},m2={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"},f2={viewWords:"\uB0B1\uB9D0"},C2={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},g2={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},b2={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},y2={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},v2={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},x2={clearSelection:"\uC120\uD0DD \uD574\uC81C"},_2={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},w2={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},B2={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},k2={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},A2={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},N2={list:"\uD3F4\uB354",open:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C",menu:"{{name}} \uD3F4\uB354 \uBA54\uB274",placeMenu:"{{name}} \uBA54\uB274",tree:"\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30",fold:"{{name}} \uC811\uAE30",unfold:"{{name}} \uD3BC\uCE58\uAE30",up:"\uC704\uB85C",upTo:"\uD55C \uCE35 \uC704\uB85C \u2014 {{name}}",add:{title:"\uD3F4\uB354 \uCD94\uAC00",sub:"\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uD3F4\uB354 \uC774\uB984"}},E2={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},j2={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"},D2={common:Ey,calendar:jy,passCard:Dy,rating:Sy,colorPicker:Ty,dropdown:My,accordion:$y,header:Ly,nav:Ry,settings:Py,usage:Fy,account:Iy,training:Oy,customers:zy,payment:Wy,coupons:Hy,visits:Vy,trainingType:qy,myWordTable:Uy,keyWords:Gy,wordTable:Ky,wordSearch:Yy,wordPrint:Zy,topic:Xy,device:Jy,manager:Qy,wordPairs:e2,footer:t2,date:n2,wordData:r2,textField:a2,segmentedControl:o2,tabs:s2,fileUpload:l2,avatar:i2,myHomework:u2,trainingStatus:c2,store:d2,progress:p2,trainingMiss:h2,table:m2,wordScore:f2,topBanner:C2,datePicker:g2,report:b2,tooltip:y2,phonemeProfile:v2,bulkBar:x2,debug:_2,badge:w2,loader:B2,soundCompass:k2,breadcrumb:A2,folder:N2,board:E2,promoBannerBg:j2},S2={filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoAgeFloor:"Age {{n}}: also includes words for younger ages.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"}},T2={filter:{onlyHighUsage:"High-use words only"}},M2={wordSearch:S2,wordPairs:T2};const $2="0.483.0";var Ii;const L2=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Ko="ko",R2="ihab_display_language",Yo={en:()=>Promise.resolve().then(function(){return a5})},$a=new Set(["ko"]),Zo={},ra=e=>e.split("-")[0];function Oi(e){const t=ra(e),r=Yo[t];return!r||$a.has(t)?Promise.resolve():Zo[t]??(Zo[t]=r().then(a=>{const s=a.default??a;Mt.addResourceBundle(t,"translation",s,!0,!1),$a.add(t)},a=>{throw Zo[t]=void 0,a}))}function zi(){if(typeof window>"u")return Ko;try{const e=localStorage.getItem(R2);if(e&&L2.some(t=>t.code===e))return e}catch{}return Ko}function Wi(e){try{document.documentElement.lang=e}catch{}}Mt.on("languageChanged",Wi),Wi(zi());const Hi=(Ii=Mt).__ihabRawChangeLanguage??(Ii.__ihabRawChangeLanguage=Mt.changeLanguage);Mt.changeLanguage=Hi,Mt.use(Ee.initReactI18next).init({resources:{ko:{translation:D2},en:{translation:M2}},lng:zi(),fallbackLng:Ko,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Xo=Hi.bind(Mt);let Jo;Mt.changeLanguage=((e,t)=>{if(Jo=e,!e||$a.has(ra(e))||!Yo[ra(e)])return Xo(e,t);const r=()=>Jo===e?Xo(e,t):Promise.resolve(Mt.t);return Oi(e).then(r,a=>(console.error(a),r()))});{const e=Mt.language;e&&!$a.has(ra(e))&&Yo[ra(e)]&&Oi(e).then(()=>{Mt.language===e&&(Jo??e)===e&&Xo(e)},t=>console.error(t))}const P2=99,F2=new Map;try{Mt.store?.on?.("added",()=>F2.clear())}catch{}Array.from({length:P2},(e,t)=>t+1);let La=null,Vi=null,qi=null;function I2(){const e=Ei();if(e&&e.entries.length>0){const t=zb();if(La&&Vi===e&&qi===t)return La;const r=new Set,a=[];for(const s of e.entries)!s.word||r.has(s.word)||(r.add(s.word),a.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade,age:s.age??void 0}));return La=a,Vi=e,qi=t,La}return[]}new Proxy([],{get(e,t){const r=I2(),a=r[t];return typeof a=="function"?a.bind(r):a}});function O2(e){return e==null?!1:z2.test(zo(e))}const z2=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function W2(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 H2(e){if(typeof window>"u")return"";const t=(r,a)=>{typeof a.attrValue=="string"&&W2(a.attrValue)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function V2(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){r(null),s(null),i(null),c(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=Mo(e):/^(Logo|Symbol)/i.test(d)?m=Mo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),r(e),s(m)},[e]),o.useEffect(()=>{if(!a)return;let d=!1;async function m(){try{let f=await fetch(a);f.ok||(f=await fetch(a));const v=f.headers.get("content-type")||"";if(d)return;if(v.includes("svg")){i("mask");return}if(v.startsWith("image/")){i("img");return}const b=await fetch(a);if(!b.ok)throw new Error("not ok");const _=await b.text();if(d)return;if(/^\s*<svg[\s>]/i.test(_)){const y=H2(_);if(!y){i("none");return}c(y),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[a]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&a&&fetch(a).then(f=>{if(!f.ok)throw new Error("fetch failed");return f.blob()}).then(f=>{d||(m=URL.createObjectURL(f),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,a]),t===e?{iconToUse:a,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:r,className:a,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=a??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",f=typeof t=="string"?t:null,v=xg(f),{iconToUse:b,mode:_,svgText:y,blobUrl:x}=V2(f),g=(k,E={})=>n.jsx("span",{className:p,style:u,...E,children:k}),w=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(k,E={})=>n.jsx("img",{src:k,alt:typeof r=="string"?r:typeof r=="number"?String(r):"",className:h,...E,style:w?{...E.style,...w}:E.style});if(!t)return null;if(typeof t!="string")return g(t);if(t==="none")return g(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(v)try{return g(o.createElement(v,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(b&&b.endsWith(".svg")){if(_==="mask"){const k={"--icon-url":x?`url(${x})`:`url(${b})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return g(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return _==="img"?g(N(b,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):_==="inline"?g(n.jsx("span",{className:m,dangerouslySetInnerHTML:y?{__html:y}:void 0}),{"aria-hidden":"true"}):g(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Mo(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const C=typeof c=="number"?c:20,B=`<svg width="${C}" height="${C}" 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 g(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:B}}),{"aria-hidden":"true"})}function Ui(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||a.current)return;const i=e();if(i&&typeof i.then=="function"){a.current=!0,r(!0);const u=()=>{a.current=!1,s.current&&r(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function q2({icon:e,title:t,action:r,className:a}){const{pending:s,press:l}=Ui(r?.onClick);return n.jsxs("div",{className:we("empty-state",a),children:[e&&n.jsx(lt,{icon:e,size:40,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",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:l,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(lt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function U2({message:e,hint:t,icon:r="triangle-alert",onRetry:a,retryLabel:s,className:l}){const{t:i}=Ee.useTranslation(),{pending:u,press:c}=Ui(a);return n.jsxs("div",{className:we("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{icon:r,size:40,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(lt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function G2({icon:e,title:t,description:r,cta:a,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),m())},className:we("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:r})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:a}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function K2({as:e="div",className:t="",children:r,storage:a,...s}){a&&ib({resolveUrl:a.resolveUrl,download:a.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:a.exists,resolvePath:a.resolvePath,noiseBaseUrl:a.noiseBaseUrl,noiseFileGain:a.noiseFileGain});const l=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:r})}function Y2(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1}return!0}function Ra(e,t=!0){o.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const a=s=>{if(s.key!=="Tab")return;const l=Array.from(r.querySelectorAll(Sn)).filter(Y2);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===r;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return r.addEventListener("keydown",a),()=>r.removeEventListener("keydown",a)},[e,t])}const Sn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Qo=new WeakMap;function es(e,t){e&&Qo.set(e,t)}function ts(e){let t=e;for(let r=0;t&&!t.isConnected&&r<10;r++){let a=t;for(;a&&!Qo.has(a);)a=a.parentElement;if(!a)return t;t=Qo.get(a)??null}return t}function Gi(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 Pa(e,t,r){const a=e?.isConnected?e:r?.isConnected?r:null;if(Gi(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!a)return null;const s=Array.from(document.querySelectorAll(Sn)).filter(c=>!(e&&e.contains(c))&&Gi(c));let l=null,i=null;for(const c of s)a.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function Z2({title:e="",lines:t=[],notices:r=null,children:a,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Ee.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const b=h.current;b&&b.contains(document.activeElement)&&Pa(b),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),f=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(r&&Array.isArray(r)&&r.length)return n.jsxs("div",{className:m,role:"note",children:[r.map((b,_)=>n.jsxs("div",{className:"notice-box__inner",children:[b.title?n.jsx("span",{className:"notice-box__title body-3",children:b.title}):null,n.jsx("div",{className:"notice-box__body",children:b.lines&&b.lines.length?n.jsx("div",{children:b.lines.map((y,x)=>n.jsx("span",{className:"notice-box__line body-3",children:y},x))}):b.children??null})]},_)),f]});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((b,_)=>n.jsx("li",{className:"notice-box__line",children:b},_))}):a})]}):n.jsx("div",{className:"notice-box__inner",children:a});return n.jsxs("div",{ref:h,className:m,role:"note",children:[v,f]})}const ns=o.createContext(void 0);function kn(){return o.useContext(ns)}const X2={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Nr(e){const{t}=Ee.useTranslation(),{variant:r="spinner",size:a=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(r==="bar"){const c=s==null||!Number.isFinite(Number(s)),p=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof a=="number"?`${a}px`:a;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:X2,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:a,height:a,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Ki=o.createContext(null);function J2(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const Yi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Q2(e){const t=o.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const a=window.matchMedia(e);a.addEventListener?a.addEventListener("change",r):a.addListener&&a.addListener(r);let s=null,l=null;const i=()=>{r(),s===null&&typeof requestAnimationFrame<"u"&&(s=requestAnimationFrame(()=>{s=null,r()})),l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,r()},150)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{a.removeEventListener?a.removeEventListener("change",r):a.removeListener&&a.removeListener(r),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i),s!==null&&cancelAnimationFrame(s),l!==null&&clearTimeout(l)}},[e]);return wl.useSyncExternalStore(t,()=>Yi(e),()=>!1)}function ev(e){const[t,r]=o.useState(Yi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(e),s=i=>r(i.matches),l=a;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),r(a.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const tv=typeof wl.useSyncExternalStore=="function"?Q2:ev;function fn(e){const t=o.useContext(Ki),r=tv(e);return t&&typeof t.mobile=="boolean"&&J2(e)?t.mobile:r}const Er=[];let Fa=!1;function Zi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=Er[Er.length-1];t&&(e.stopPropagation(),t())}function ir(e){return Er.push(e),!Fa&&typeof document<"u"&&(document.addEventListener("keydown",Zi),Fa=!0),()=>{const t=Er.lastIndexOf(e);t>=0&&Er.splice(t,1),Er.length===0&&Fa&&typeof document<"u"&&(document.removeEventListener("keydown",Zi),Fa=!1)}}const Xi="(prefers-reduced-motion: reduce)";function nv(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Xi).matches}catch{return!1}}function Ia(){return fn(Xi)}const Ji={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function rv(e,t){const r=Object.keys(e).sort((a,s)=>s.length-a.length);for(const a of r){if(!t.startsWith(a))continue;const s=t.slice(a.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[a]+s}return null}function av(e){return rv(Ji,e)}function ce(e){if(!e||Object.keys(Ji).length===0)return e;const t=[];for(const r of e.split(/\s+/)){if(!r)continue;const a=av(r);a&&t.push(a)}return t.length?`${e} ${t.join(" ")}`:e}function sn(e){const{anchorRect:t,anchorEl:r,offset:a=20,edgeMargin:s=20,prefer:l="top",onClose:i,closeOnOutsideClick:u=!0,className:c="",role:p="dialog",ariaLabel:h="",children:d,backdrop:m=!1,isMobilePopup:f=!1,useBorder:v=!0,header:b,focusOnOpen:_}=e||{},y=o.useRef(null),[x,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,N]=o.useState(!1),[C,B]=o.useState("bottom"),[k,E]=o.useState(!1),[A,D]=o.useState(!1),j=!t&&!r,S=o.useRef(null),O=o.useCallback((V=!1,ne=!1)=>{if(A&&f)return;const te=r?r.getBoundingClientRect():t,P=ne&&S.current?S.current:te;if(!P||!y.current)return;const L=y.current,{offsetWidth:R,offsetHeight:U}=L,Z=window.innerWidth,X=window.innerHeight,ae=Z-P.right,Y=P.left,xe=P.top,ie=X-P.bottom;let J=0,F=0,Q="top";const H=xe>=U+a,le=ie>=U+a,re=l==="right"?ae>=R+a?"right":Y>=R+a?"left":null:null,de=re?null:l==="bottom"?le?"bottom":H?"top":null:H?"top":le?"bottom":null;if(re==="right")Q="right",J=P.right+a,F=P.top;else if(re==="left")Q="left",J=P.left-a-R,F=P.top;else if(de==="top")Q="top",F=P.top-a-U,J=P.left+P.width/2-R/2;else if(de==="bottom")Q="bottom",F=P.bottom+a,J=P.left+P.width/2-R/2;else if(ae>=R+a)Q="right",J=P.right+a,F=P.top+P.height/2-U/2;else if(Y>=R+a)Q="left",J=P.left-a-R,F=P.top+P.height/2-U/2;else{const Re=Math.max(xe,ie,ae,Y);Re===xe?(Q="top",F=P.top-a-U,J=P.left+P.width/2-R/2):Re===ie?(Q="bottom",F=P.bottom+a,J=P.left+P.width/2-R/2):Re===ae?(Q="right",J=P.right+a,F=P.top+P.height/2-U/2):(Q="left",J=P.left-a-R,F=P.top+P.height/2-U/2)}const Be=Number.isFinite(Number(s))?Number(s):8;J=Math.min(Math.max(J,Be),Z-R-Be),F=Math.min(Math.max(F,Be),X-U-Be);const ke=Math.round(J),Ne=Math.round(F);V&&y.current?(y.current.style.left=`${ke}px`,y.current.style.top=`${Ne}px`,y.current.dataset.placement=Q):(B(Q||C),g({position:"fixed",left:ke,top:Ne}),E(!0))},[A,f,r,t,a,s,C,l]);o.useEffect(()=>()=>{S.current=null},[r,t]),o.useLayoutEffect(()=>{if(j)return;if(A&&f){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),E(!0);return}S.current===null&&(S.current=r?r.getBoundingClientRect():t??null),O(!1,!0);const V=requestAnimationFrame(()=>O(!1,!0));return()=>cancelAnimationFrame(V)},[t,r,a,d,s,j,A,f,O]),o.useEffect(()=>{if(j||A&&f||!y.current||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>{t&&O()});return V.observe(y.current),()=>V.disconnect()},[t,d,s,j,A,f,O]),o.useEffect(()=>{if(j||A&&f)return;let V=null;const ne=()=>{if(r&&(S.current=r.getBoundingClientRect()),typeof requestAnimationFrame>"u"){O(!0);return}V===null&&(V=requestAnimationFrame(()=>{V=null,O(!0)}))},te=P=>{if(!r&&i){const L=P.target;if(L&&y.current&&y.current.contains(L))return;try{if(L&&L.closest&&L.closest("[data-tooltip-ignore]"))return}catch{}W.current(!0);return}ne()};return window.addEventListener("resize",ne),document.addEventListener("scroll",te,{passive:!0,capture:!0}),()=>{V!==null&&cancelAnimationFrame(V),window.removeEventListener("resize",ne),document.removeEventListener("scroll",te,{capture:!0})}},[t,r,i,a,d,s,j,A,f,O]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const V=window.matchMedia("(max-width: 768px)"),ne=()=>D(!!V.matches);ne();try{V.addEventListener?V.addEventListener("change",ne):V.addListener(ne)}catch{try{V.addListener(ne)}catch{}}return()=>{try{V.removeEventListener?V.removeEventListener("change",ne):V.removeListener(ne)}catch{}}},[]);const z=o.useRef(!1),G=o.useRef(null),M=Ia(),I=o.useCallback((V=!1)=>{if(i&&!(w||z.current)){if(z.current=!0,V){N(!0);try{i&&i()}catch{z.current=!1,N(!1)}return}N(!0),G.current=setTimeout(()=>{G.current=null;try{i&&i()}catch{z.current=!1,N(!1)}},M?0:200)}},[w,i,N,M]);o.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),o.useEffect(()=>{if(j)return;const V=P=>{const L=y.current;if(!L)return;const R=P.target;if(R&&!L.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},ne=P=>{const L=y.current;if(!L)return;const R=P.target;if(R&&!L.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},te=P=>{if(P.key==="Tab"){const L=y.current;if(!L)return;const R=L.querySelectorAll(Sn);if(!R||R.length===0)return;const U=R[0],Z=R[R.length-1],X=document.activeElement;P.shiftKey?X===U&&(P.preventDefault(),Z.focus()):X===Z&&(P.preventDefault(),U.focus())}};return document.addEventListener("pointerdown",V,!0),document.addEventListener("click",ne,!0),document.addEventListener("keydown",te),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("click",ne,!0),document.removeEventListener("keydown",te)}},[i,u,I,j]);const W=o.useRef(I);o.useEffect(()=>{W.current=I});const pe=!!i;o.useEffect(()=>{if(!(j||!pe))return ir(()=>W.current())},[j,pe]),o.useEffect(()=>{const V=()=>{I(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",V),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",V)}},[I]);const se=o.useRef(null);o.useEffect(()=>{if(j||_===!1||!k)return;const V=y.current;if(!V)return;const ne=V.querySelector(Sn);if(ne)return se.current=document.activeElement,ne.focus({preventScroll:!0}),()=>{const te=se.current;se.current=null,te&&document.contains(te)&&te.focus({preventScroll:!0})}},[j,_,k]),o.useEffect(()=>{p==="dialog"&&!h&&kt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[p,h]);const $=n.jsxs("div",{ref:y,className:ce(`tooltip__content ${j?"tooltip__content--inline":""} ${v?"tooltip__content--bordered":""} ${w?"is-closing":""} ${c} ${A&&f?"is-mobile":""}`),role:p,"aria-label":h||void 0,style:j?{}:{...x,visibility:k?"visible":"hidden"},tabIndex:-1,"data-placement":C,"data-left":j?"":x.left,"data-top":j?"":x.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[b!=null&&n.jsx("div",{className:ce("tooltip__header h5"),children:b}),d]});if(j||typeof document>"u")return $;if(m||A&&f){const V=n.jsxs("div",{className:ce("tooltip__portal"),children:[n.jsx("div",{className:ce("tooltip__backdrop"),onClick:()=>{u&&I(!0)}}),$]});return bn.createPortal(V,document.body)}return bn.createPortal($,document.body)}function On(e){const{anchorRect:t,text:r,offset:a=8,onClose:s,className:l="",ariaLabel:i}=e||{};return r?n.jsx(sn,{anchorRect:t,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce(`info-tooltip ${l}`),ariaLabel:i||r,children:n.jsx("div",{className:ce("info-tooltip__content body-3"),children:r})}):null}function Qn(e){const{t}=Ee.useTranslation(),{anchorRect:r,title:a,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h,prefer:d}=e||{},m=(Array.isArray(s)?s:s?[s]:[]).map(f=>typeof f=="string"?{text:f}:f);return!m.length&&!a?null:n.jsx(sn,{anchorRect:r,offset:c,...d?{prefer:d}:null,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ce("description-tooltip"),ariaLabel:a||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ce("description-tooltip__box"),children:[a&&n.jsx("span",{className:ce("description-tooltip__title body-2"),children:a}),n.jsx("ol",{className:ce(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:m.map((f,v)=>n.jsxs("li",{className:ce(`description-tooltip__item body-3${v===l?" description-tooltip__item--active":""}`),children:[i&&m.length>1&&n.jsxs("span",{className:ce("description-tooltip__index button-1"),children:[v+1,"."]}),f.color&&n.jsx("span",{className:ce("description-tooltip__dot"),style:{background:f.color},"aria-hidden":"true"}),n.jsx("span",{children:f.text})]},v))})]})})}function aa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let rs=0,Qi=!1;function eu(){Qi||typeof document>"u"||(Qi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(rs=Date.now())},!0),document.addEventListener("touchstart",()=>{rs=Date.now()},{capture:!0,passive:!0}))}eu();function er(e){return!!e&&e.pointerType==="touch"}function ur(e=1e3){return eu(),Date.now()-rs<e}function Oa(e,t,r,{enabled:a=!0,fallbackOnParent:s=!1}={}){const l=aa(e),i=aa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!a||typeof document>"u")return;const h=d=>{const m=d,f=d.target,v=r.current,b=!!(f&&v&&v.contains(f));if(m.pointerType!=="touch"){b&&(u.current=null);return}if(b){u.current=l.current;return}u.current=null,l.current&&!(f&&f.closest?.(".tooltip__content"))&&i.current(!1,v)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[a,r,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??r.current),!0)},[r,i]);return o.useEffect(()=>{if(!a||!s)return;const h=r.current,d=h?.parentElement;if(!h||!d)return;let m=null;const f=_=>{const y=_.changedTouches?.[0];if(!y)return!1;const x=h.getBoundingClientRect();return y.clientX>=x.left&&y.clientX<=x.right&&y.clientY>=x.top&&y.clientY<=x.bottom},v=_=>{m=f(_)?l.current:null},b=_=>{const y=m;m=null,!(y===null||Date.now()-c.current<700||!f(_))&&(u.current=null,c.current=Date.now(),i.current(!y,h))};return d.addEventListener("touchstart",v,{passive:!0}),d.addEventListener("touchend",b),()=>{d.removeEventListener("touchstart",v),d.removeEventListener("touchend",b)}},[a,s,r,l,i]),{touchPress:p}}function ov(e,t){const{size:r,type:a,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:f,ariaLabel:v,variant:b="default",align:_="center",nowrap:y=!1,ellipsis:x=!1,selected:g,toggleable:w=!1,ariaExpanded:N,ariaControls:C,disabled:B=!1,loading:k=!1,useLabel:E=!0,labelHiddenBelow:A,useBorder:D=!0,useBG:j=!0,useDisabledCovered:S=!1,useDisabledInvisible:O=!1,useDisabledFilled:z=!1,width:G,minWidth:M,onClick:I,onDisabledClick:W,showTooltipInfo:pe=!1,tooltipInfoText:se=null,tooltipDescription:$=null,tooltipOnly:V=!1,iconSize:ne="medium",iconColor:te,shape:P="rounded",color:L,className:R,...U}=e,Z=kn(),X=r??Z??48,ae=typeof X=="string"&&isNaN(Number(X))?X.toLowerCase():String(Number(X)||48),Y=ae.match(/^\d+$/)?`button${ae}`:`button-${ae}`,xe=Number(X),ie=!isNaN(xe)&&xe<40?"button-2":"button-1",J=h??f,F=B||!!U.disabled,Q=F?S?"disabled-covered":O?"disabled-invisibled":z?"disabled-filled":"disabled":b,H=Q?`button--variant-${Q}`:"",le=_?`button--align-${_}`:"",re=y?"button--nowrap":"",de=x?"button--ellipsis":"",Be=P?`button--shape-${P}`:"",ke=typeof te=="string"&&te.startsWith("--")?`var(${te})`:te,Ne={...G?{width:typeof G=="number"?`${G}px`:G}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...D?{}:{"--button-border":F?"0":"1px solid transparent"},...ke?{"--button-icon-color":ke}:{},...L?{"--color-main":L}:{}},Re=E===!1?"":J,ye=Array.isArray(Re)?Re.length>0:!!Re,_e=!!p,Ae=a??(ye||c||_e?"bar":"dot"),Oe=`${Y}--${Ae}`,je=o.useRef(null);o.useEffect(()=>{!Yn||s!==void 0||je.current?.closest("form")&&kt(`button-in-form:${typeof J=="string"?J:""}`,'[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 J=="string"&&J?` \uB2E8\uCD94: ${J}`:""))},[s,J]);const tt=o.useRef(t);tt.current=t;const Ct=o.useCallback(Ke=>{je.current=Ke;const K=tt.current;typeof K=="function"?K(Ke):K&&(K.current=Ke)},[]),Ie=o.useRef(F),[qe,nt]=o.useState(!!g),[We,Ze]=o.useState(!1),[ot,gt]=o.useState(null),ht=o.useCallback(()=>Ze(!1),[]),[xt,ut]=o.useState(!1),Gt=o.useId();o.useEffect(()=>{typeof g=="boolean"&&nt(g)},[g]),o.useEffect(()=>{if(Ie.current&&!F&&je.current){const Ke=je.current;let K=!1;try{K=Ke.matches(":focus:not(:focus-visible)")}catch{K=!1}K&&Ke.blur(),Ke.style.pointerEvents="none";const Ce=requestAnimationFrame(()=>{requestAnimationFrame(()=>{je.current&&(je.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ce)}Ie.current=F},[F]);const _t=typeof g=="boolean"?!!g:qe,Pt=typeof N=="boolean"?void 0:w||typeof g=="boolean"?_t?"true":"false":U["aria-pressed"],Qe=we("button",Y,Oe,H,le,re,de,Be,_t?"is-selected":null,j?null:"button--no-bg",V?"button--tooltip-only":null,R),De=`button__icon button__icon--${ne}`,rt=Array.isArray(m)?m:m!==void 0?[m]:[],it=()=>{if(Array.isArray(Re))return Re.map((K,Ce)=>{const He=rt[Ce];return n.jsxs("span",{className:`button__label-text${He!==void 0?" button__label-text--has-sub":""}`,children:[K,He!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:He})]},Ce)});const Ke=m!==void 0;return n.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[Re,d!=null&&n.jsx("span",{className:"button__count",children:d}),Ke&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},bt=Ke=>{typeof g!="boolean"&&!w&&nt(!1),Ke.currentTarget.blur()},Nt=Ke=>{F||(typeof U.onMouseLeave=="function"&&U.onMouseLeave(Ke),bt(Ke))},It=Ke=>{if(V&&At&&Et.touchPress(Ke.currentTarget),F){At&&Et.touchPress(Ke.currentTarget),Ke.preventDefault(),W?.(Ke);return}typeof g!="boolean"&&w&&nt(K=>!K),I?.(Ke)},ft=o.useCallback(()=>{(pe||$)&&(Ze(!0),gt(je.current?.getBoundingClientRect()??null))},[pe,$]),mt=o.useCallback(()=>{(pe||$)&&(Ze(!1),gt(null))},[pe,$]),At=!!(pe||$),Et=Oa(We,Ke=>{Ke?ft():mt()},je,{enabled:At&&(F||V),fallbackOnParent:At&&F}),Je={...U};delete Je.disabled,delete Je.className,delete Je.faded,delete Je.useFaded,delete Je.loading,delete Je.onMouseLeave,delete Je.onPointerEnter,delete Je.onPointerLeave,delete Je.onPointerUp,delete Je.onFocus,delete Je.onBlur,F&&(Object.keys(Je).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof Je[Ke]=="function"&&delete Je[Ke]}),Je["aria-disabled"]="true"),k&&(Je["aria-busy"]="true");const wt=(typeof pe=="string"?pe:null)??(typeof se=="string"?se:null)??(typeof v=="string"?v:null)??(typeof J=="string"?J:null)??void 0,ue=typeof v=="string"?v:typeof J=="string"?J:ye?void 0:wt,Se=$?[$.title,...$.items??[]].filter(Boolean).join(". "):pe&&wt&&wt!==ue?wt:"",Pe=[typeof U["aria-describedby"]=="string"?U["aria-describedby"]:void 0,Se?Gt:null].filter(Boolean).join(" ")||void 0,Ge=()=>n.jsx("span",{className:`${De} button__spinner`,"aria-hidden":"true",children:n.jsx(Nr,{variant:"spinner",size:"100%"})}),st=(Ke,K)=>n.jsx(lt,{icon:Ke,label:K??ue,className:De,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Ot=Ke=>k?Ge():st(c,Ke),ct=()=>A&&A>0?n.jsx(sv,{below:A,className:`button__label ${ie}`,children:it()}):n.jsx("span",{className:`button__label ${ie}`,children:it()}),Yt=()=>Ae==="dot"?n.jsxs(n.Fragment,{children:[Ot(),ye&&ct()]}):_==="center"&&(c||k)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ot()}),ye&&ct()]}),_e&&n.jsx("span",{className:"button__right",children:st(p)})]}):n.jsxs(n.Fragment,{children:[(c||k)&&n.jsx("span",{className:"button__left",children:Ot(v??J)}),ye&&ct(),_e&&n.jsx("span",{className:"button__right",children:st(p)})]}),$t=!!l&&!F;return n.jsxs(n.Fragment,{children:[n.jsxs($t?"a":"button",{...Je,ref:Ct,...$t?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:F&&!W&&!xt},className:Qe,"aria-pressed":Pt,"aria-expanded":typeof N=="boolean"?N:U["aria-expanded"],"aria-controls":C??U["aria-controls"],"aria-label":ue,"aria-disabled":F&&($t||W||xt)?!0:void 0,"aria-describedby":Pe,style:Ne,onClick:It,onMouseLeave:Nt,onPointerEnter:Ke=>{er(Ke)||ft(),!F&&typeof U.onPointerEnter=="function"&&U.onPointerEnter(Ke)},onPointerLeave:Ke=>{er(Ke)||mt(),!F&&typeof U.onPointerLeave=="function"&&U.onPointerLeave(Ke)},onPointerUp:Ke=>{F&&At&&Et.touchPress(Ke.currentTarget),!F&&typeof U.onPointerUp=="function"&&U.onPointerUp(Ke)},onFocus:Ke=>{ut(!0),ur()||ft(),!F&&typeof U.onFocus=="function"&&U.onFocus(Ke)},onBlur:Ke=>{ut(!1),F||bt(Ke),mt(),!F&&typeof U.onBlur=="function"&&U.onBlur(Ke)},children:[Yt(),Se?n.jsx("span",{id:Gt,hidden:!0,"aria-label":Se}):null]}),We&&$?n.jsx(Qn,{anchorRect:ot,title:$.title,items:$.items,onClose:ht}):We&&wt?n.jsx(On,{anchorRect:ot,text:wt,onClose:ht}):null]})}const fe=o.forwardRef(ov);fe.displayName="Button";function sv({below:e,className:t,children:r}){const a=fn(`(max-width: ${e-.02}px)`);return n.jsx("span",{className:t,style:a?{display:"none"}:void 0,children:r})}function Ht(e,t,r){const a=o.useRef(null);return o.useLayoutEffect(()=>{const s=a.current?.parentElement??null;return t(s,e),()=>r(s)},[e,t,r]),a}const oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},as=new WeakMap;function os(e){if(e)return as.get(e)}function ln(e,t){e&&(e.style.setProperty(oa.title,t.title),e.style.setProperty(oa.description,t.description),as.set(e,t))}function un(e){e&&(e.style.removeProperty(oa.title),e.style.removeProperty(oa.description),as.delete(e))}const tu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function nu(){const e=Ht(tu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ru={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function au(){const e=Ht(ru,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ou={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function su(){const e=Ht(ou,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const lu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function iu(){const e=Ht(lu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const uu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function cu(){const e=Ht(uu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const du={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function pu(){const e=Ht(du,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const hu={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function mu(){const e=Ht(hu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const fu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Cu(){const e=Ht(fu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const gu={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function bu(){const e=Ht(gu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const yu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vu(){const e=Ht(yu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const xu={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function _u(){const e=Ht(xu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const wu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Bu(){const e=Ht(wu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const ku={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Au(){const e=Ht(ku,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Nu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Eu(){const e=Ht(Nu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const Cn=(e,t,r)=>({key:e,get label(){return Mt.t(`promoBannerBg.${e}`,t)},textTone:r}),lv=[Cn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("soft","\uC18C\uD504\uD2B8","dark"),Cn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),Cn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),Cn("warm","\uC6DC(\uAC15\uC870)","dark"),Cn("dark","\uB2E4\uD06C","light"),Cn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),Cn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),Cn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),Cn("outline","\uC544\uC6C3\uB77C\uC778","dark"),Cn("success","\uC131\uACF5/\uC644\uB8CC","light"),Cn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),Cn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],ju={main:nu,soft:au,sub:su,deep:iu,softSub:cu,warm:pu,dark:mu,radial:Cu,diagonal:bu,dots:vu,outline:_u,success:Bu,naver:Au,instagram:Eu};function Du({storageKey:e="fontScale",baseFont:t=20,minScale:r=.8,maxScale:a=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=g=>Math.max(r,Math.min(a,Number(g))),u=g=>{try{const w=localStorage.getItem(g),N=w?Number(w):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=g=>{p(typeof g=="function"?w=>i(g(w)):i(g))},f=()=>m(g=>+(g+s).toFixed(6)),v=()=>m(g=>+(g-s).toFixed(6)),b=c<a-Number.EPSILON,_=c>r+Number.EPSILON,y=Math.round(t*c),x=Math.round(y*l);return{scale:c,setScale:m,increase:f,decrease:v,canIncrease:b,canDecrease:_,fontSize:y,lineHeight:x}}function Su(e,t){const r=aa(t);o.useEffect(()=>{const a=()=>r.current();try{window.addEventListener(e,a)}catch{}return()=>{try{window.removeEventListener(e,a)}catch{}}},[e,r])}const ss=" \xB7 ",Tu=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ss)?e.split(ss).pop()??e:e})(),iv=o.createContext(!1),cr=[];let Mu=null;function uv(e){const t=o.useContext(iv);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;cr.length===0&&(Mu=document.title);const r={text:Tu?`${e}${ss}${Tu}`:e};return cr.push(r),document.title=r.text,()=>{const a=cr.lastIndexOf(r);a>=0&&cr.splice(a,1),document.title=cr.length?cr[cr.length-1].text:Mu??document.title}},[e,t])}const ls=[{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"}],cv=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function xn(e,t){return cv().compare(e,t)}const za=new Map;function dv(e){const t=za.get(e);if(t)return t;const r=[],a=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=a.exec(e);l;l=a.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&r.push(e.slice(s,i)),r.push(Number(u)),s=l.index+l[0].length}return s<e.length&&r.push(e.slice(s)),za.size>5e3&&za.clear(),za.set(e,r),r}function pv(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 hv(e,t){const r=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),a=r(e),s=r(t);if(a===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=pv(h);return d!==null?[d]:dv(h)},i=l(e,a),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=xn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:xn(a,s)}const $u=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function Wa(e,t,r){const a=$u(e),s=$u(t);if(a||s)return a===s?0:a?1:-1;const l=hv(e,t);return r?l:-l}function mv(e,t,r){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(()=>{const v=r?.initialPageSize;return v&&ls.some(b=>b.value===v)?v:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>ls.map(v=>({...v,label:a("visits.showN",{n:v.value})})),[a]),d=o.useCallback(v=>{ls.some(b=>b.value===v)&&(l(v),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),f=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==f&&u(f),{pageRows:o.useMemo(()=>e.slice((f-1)*Number(s),f*Number(s)),[e,f,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:f,total:m,onChange:u},setPage:u}}function fv(e){const[t,r]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),a=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const p=a.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};a.current=h,r(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,f)=>Wa(p(m,h),p(f,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const Tn="\uC804\uCCB4",Cv={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"})},gv={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"})},bv={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 yv(e,t){if("place"in t)return Cv[t.place](e);const r=gv[t.vowel](e);return t.glide?`${r} \xB7 ${bv[t.glide](e)}`:r}const vv=(e,{defaultValue:t})=>t,Lu=(e,t)=>({jamos:e,phonetic:t,tooltip:yv(vv,t)}),zn=(e,t)=>t.map(r=>Lu([r],{place:e})),Jt=(e,t,r)=>Lu([...e],r?{vowel:t,glide:r}:{vowel:t}),is={cho:[zn("labial",["\u3142","\u3143","\u314D","\u3141"]),zn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),zn("alveolar",["\u3145","\u3146"]),zn("palatal",["\u3148","\u3149","\u314A"]),zn("velar",["\u3131","\u3132","\u314B"]),zn("glottal",["\u314E"])],jung:[[Jt("\u3163","frontHigh"),Jt("\u315F","frontHigh","w"),Jt("\u3162","frontHigh","velar")],[Jt("\u3161","backHighUnrounded")],[Jt("\u315C","backHighRounded"),Jt("\u3160","backHighRounded","j")],[Jt("\u3154\u3150","frontMid"),Jt("\u3156\u3152","frontMid","j"),Jt("\u3159\u315A\u315E","frontMid","w")],[Jt("\u3153","backMidUnrounded"),Jt("\u3155","backMidUnrounded","j"),Jt("\u315D","backMidUnrounded","w")],[Jt("\u3157","backMidRounded"),Jt("\u315B","backMidRounded","j")],[Jt("\u314F","low"),Jt("\u3151","low","j"),Jt("\u3158","low","w")]],jong:[zn("labial",["\u3142","\u3141"]),zn("alveolar",["\u3137","\u3134","\u3139"]),zn("velar",["\u3131","\u3147"])]},xv=e=>e===_v?[]:Array.from(e),_v="__NO_CODA__",us=e=>e.map(t=>t.map(({jamos:r,phonetic:a,tooltip:s})=>({v:r.join(""),phonetic:a,tooltip:s}))),Ru={cho:us(is.cho),jung:us(is.jung),jong:us(is.jong)};Ru.jung.flat().forEach(({v:e})=>{for(const t of xv(e));}),new Set(Ru.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(Tb).map(([e,{nucleus:t}])=>[e,t]));function wv(e,t=!0){const r=aa(e);o.useEffect(()=>{if(t)return ir(()=>{r.current?.()})},[t,r])}function Ha(){const[e,t]=o.useState(null),r=o.useCallback(l=>t(l.getBoundingClientRect()),[]),a=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:r,close:a,toggleAt:s}}function Bv(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),r(null),s(null)},[]);return{payload:t,anchorRect:a,openAfterDelay:i,close:u}}function Pu(e="warning"){const[t,r]=o.useState(""),[a,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),r(d),i(f=>f+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>r(""),[]);return{toastMessage:t,toastType:a,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function sa(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let r=e;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement){const a=parseInt(window.getComputedStyle(r).zIndex,10);!Number.isNaN(a)&&a>t&&(t=a)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function la({computeStyle:e,onScroll:t="close",onResize:r="close",ignoreOutsideClickSelector:a}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let f=p.current?.offsetHeight??0;f>0&&h();let v=0,b=null;typeof ResizeObserver<"u"&&p.current&&(b=new ResizeObserver(()=>{const B=p.current?.offsetHeight??0;if(B!==f){if(f=B,++v>4){b?.disconnect(),b=null;return}h()}}),b.observe(p.current));const _=B=>{const k=B.target;a&&k.closest?.(a)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",_),document.addEventListener("pointerdown",_);let y=null;const x=()=>{if(typeof requestAnimationFrame>"u"){h();return}y===null&&(y=requestAnimationFrame(()=>{y=null,h()}))},g=B=>{p.current?.contains(B.target)||(t==="reposition"?x():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",g,!0);const w=()=>{r==="reposition"?x():r==="close"&&l(!1)};let N=null;const C=()=>{w(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,r==="reposition"&&h()},250)};return r!=="ignore"&&(window.addEventListener("resize",w),window.addEventListener("orientationchange",C)),()=>{y!==null&&cancelAnimationFrame(y),b?.disconnect(),document.removeEventListener("mousedown",_),document.removeEventListener("pointerdown",_),t!=="ignore"&&window.removeEventListener("scroll",g,!0),r!=="ignore"&&(window.removeEventListener("resize",w),window.removeEventListener("orientationchange",C)),N&&clearTimeout(N)}},[s,h,t,r,a]),o.useEffect(()=>{if(s)return ir(()=>l(!1))},[s]);const d=o.useCallback(()=>l(f=>!f),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function kv(e,{mode:t="playback",autoStart:r=!1,onPlaySpeaker:a,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[f,v]=o.useState(null),[b,_]=o.useState([]),[y,x]=o.useState(null),[g,w]=o.useState(0),N=o.useRef(0),C=o.useCallback($=>{N.current=typeof $=="function"?$(N.current):$,w(N.current)},[]),B=o.useRef(a),k=o.useRef(s);o.useEffect(()=>{B.current=a,k.current=s},[a,s]);const E=o.useRef([]),A=()=>{E.current.forEach(clearTimeout),E.current=[]},D=($,V)=>{E.current.push(setTimeout(V,$))};o.useEffect(()=>()=>A(),[]);const j=u[p]?.id??null,S=o.useRef(null),O=o.useCallback(()=>{A(),m("playing"),_([]),x(null),C(0);let $=0;e.forEach((V,ne)=>{D($,()=>{h(ne),v(V.id),B.current?.(V)}),D($+1e3,()=>{v(null),_(te=>[...te,V.id])}),$+=1300}),D($,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,C]),z=o.useCallback(($,V)=>{if(V>=$.length){m("done"),k.current?.({score:N.current,total:$.length});return}S.current=null,h(V),x(null),m("playing"),v($[V].id),B.current?.($[V]),D(l,()=>{v(null),m("waiting")})},[l]),G=o.useCallback(()=>{A();const $=Jr(e);c($),C(0),_([]),z($,0)},[e,z,C]),M=o.useCallback(()=>{t==="playback"?(c(e),O()):G()},[t,e,O,G]),I=o.useCallback(()=>{A(),m("idle"),v(null),_([]),x(null),h(0),C(0),c([])},[C]),W=JSON.stringify(e.map($=>[$.id,$.label,$.angleDeg,$.deg,$.row,$.shortcut]));o.useEffect(()=>(r?M():I(),()=>A()),[t,W,r]);const pe=o.useCallback($=>{d!=="waiting"||t==="playback"||S.current===p||(S.current=p,x($),$===u[p]?.id&&C(V=>V+1),t==="exam"?(m("playing"),D(400,()=>z(u,p+1))):(m("feedback"),D(i,()=>z(u,p+1))))},[d,t,u,p,z,i,C]),se=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:f,playedIds:b,selectedId:y,answerId:j,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:pe},index:p,total:se,score:g,phase:d,done:d==="done",start:M,reset:I}}const cs=new Map,ds=new Map,Av=()=>()=>{},Nv=()=>!0,Ev=()=>!1;function Fu(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const r=Uint8Array.from(atob(t[2]),a=>a.charCodeAt(0));return new TextDecoder("utf-8").decode(r)}catch{return null}}function jv(e){if(typeof window>"u")return"";const t=(r,a)=>{const s=a.attrName.toLowerCase(),l=a.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(a.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(a.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function Dv(e,t){const r=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))r.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))r.add(i[1]);const a=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...r].filter(i=>a.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Sv(e){const t=ds.get(e);if(t)return t;const r=fetch(e).then(a=>a.ok?a.text():null).then(a=>(a!=null&&cs.set(e,a),a)).catch(()=>null).finally(()=>{ds.delete(e)});return ds.set(e,r),r}function Tv(e,t=!0){const r=o.useSyncExternalStore(Av,Nv,Ev)&&t&&e?Fu(e)??cs.get(e)??null:null,[a,s]=o.useState({src:e,enabled:t,svg:r});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Fu(e)??cs.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Sv(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),a.src===e&&a.enabled===t?a.svg:r}const Mv=e=>String(e);function $v(e,t=Mv){const[r,a]=o.useState(null),[s,l]=o.useState(null),i=o.useCallback(c=>({draggable:!0,onDragStart:p=>{a(c),p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",t(c))},onDragEnd:()=>{a(null),l(null)}}),[t]),u=o.useCallback((c,p)=>{const h=r!=null&&(!p||p(r));return{onDragOver:d=>{h&&(d.preventDefault(),d.dataTransfer.dropEffect="move",l(c))},onDragEnter:()=>{h&&l(c)},onDragLeave:d=>{h&&!d.currentTarget.contains(d.relatedTarget)&&l(m=>m===c?null:m)},onDrop:d=>{if(!h||r==null)return;d.preventDefault();const m=r;l(null),a(null),e(m,c)}}},[r,e]);return{dragging:r,draggingId:r==null?null:t(r),dragOverKey:s,cardProps:i,groupProps:u}}const Lv=[10,25,50,100];function Rv(e=Lv){const{t}=Ee.useTranslation(),r=e.join(",");return o.useMemo(()=>e.map(a=>({value:String(a),label:t("common.pageSizeLabel",{n:a,defaultValue:"{{n}}\uAC1C\uC529 \uBCF4\uAE30"})})),[r,t])}function Pv(e){o.useEffect(()=>{if(!e||typeof navigator>"u")return;const t=navigator.wakeLock;if(!t)return;let r=null,a=!1;const s=async()=>{if(!(a||r||document.visibilityState!=="visible"))try{const i=await t.request("screen");if(a){i.release().catch(()=>{});return}r=i,i.addEventListener("release",()=>{r===i&&(r=null)})}catch{}},l=()=>{document.visibilityState==="visible"&&s()};return s(),document.addEventListener("visibilitychange",l),()=>{a=!0,document.removeEventListener("visibilitychange",l),r&&(r.release().catch(()=>{}),r=null)}},[e])}const Iu="__ihabBackClosable",dr=[];let Va=0,Ou=!1,Fv=1;function ps(){try{const e=window.history.state?.[Iu];return typeof e=="number"?e:void 0}catch{return}}function zu(e){try{const t=window.history.state??{};window.history.pushState({...t,[Iu]:e},"")}catch{}}function Iv(){if(Va>0){Va--;return}const e=dr[dr.length-1];if(e&&ps()!==e.id){if(e.onBack()===!1){zu(e.id);return}dr.pop()}}function Ov(){Ou||typeof window>"u"||(window.addEventListener("popstate",Iv),Ou=!0)}function Wu(e,t){const r=o.useRef(t);o.useEffect(()=>{r.current=t});const a=o.useRef(null);o.useEffect(()=>{if(!e||typeof window>"u")return;Ov();const s=a.current??(a.current=Fv++),l={id:s,onBack:()=>r.current()};return dr.push(l),ps()!==s&&zu(s),()=>{const i=dr.indexOf(l);if(i<0){a.current=null;return}dr.splice(i,1),setTimeout(()=>{if(!dr.some(u=>u.id===s)&&(a.current===s&&(a.current=null),ps()===s)){Va++;try{window.history.back()}catch{Va--}}},0)}},[e])}const Hu=260;function zv({title:e,description:t,actionLabel:r,onAction:a,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[f,v]=o.useState("main"),b=fn("(max-width: 767px)"),_=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=os(g),N=(C,B,k)=>{if(k!==void 0)g.style.setProperty(B,k),_.current[C]=!0;else if(_.current[C]){const E=w?.[C];E?g.style.setProperty(B,E):g.style.removeProperty(B),_.current[C]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=os(g);v(w?.actionVariant??"main")},[d]);const y=we("promo-banner",`promo-banner--${i}`,h),x=ju[d];return n.jsxs("div",{ref:m,className:y,role:"note",children:[n.jsx(x,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),r&&a&&n.jsx(fe,{htmlType:"button",size:40,variant:u??f,shape:"pill",useBorder:!0,onClick:a,ariaLabel:r,...b?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:r,minWidth:140}})]})}function Wv({children:e,interval:t=5e3,dotTone:r,className:a="","aria-label":s}){const{t:l}=Ee.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[f,v]=o.useState(!1),[b,_]=o.useState(!1),y=o.useRef(null),x=o.useRef(null),g=o.useRef(null),w=Ia(),N=d||f||b,C=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||w)return;const k=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,N,w]);const B=k=>{x.current!=null&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>{x.current=null,_(!1)},k)};return o.useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current)},[]),o.useEffect(()=>{if(!b)return;const k=E=>{E.pointerType==="touch"&&(g.current&&g.current.contains(E.target)||(x.current!=null&&(window.clearTimeout(x.current),x.current=null),_(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[b]),c===0?null:n.jsxs("section",{ref:g,className:we("top-banner",a),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{y.current=k.pointerType},onPointerDown:k=>{y.current=k.pointerType,k.pointerType==="touch"&&(x.current!=null&&(window.clearTimeout(x.current),x.current=null),_(!0))},onPointerUp:k=>{k.pointerType==="touch"&&B(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&B(5e3)},onMouseEnter:()=>{y.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let E=!0;try{E=k.target.matches(":focus-visible")}catch{E=!0}v(E)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||v(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${C*100}%)`},children:u.map((k,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==C,...E!==C?{inert:!0}:{},children:k},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(r?.[C]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===C?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===C,onClick:()=>h(E)},E))})]})}function Hv({title:e,body:t,open:r=!1,onToggle:a,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Ee.useTranslation();return n.jsxs("div",{className:`accordion-item ${r?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":r,"data-accordion-header":!0,onClick:a,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),a?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(lt,{icon:r?"chevron-up":"chevron-down",label:r?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),r&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Vv({items:e=[],defaultOpenIndex:t=0,size:r=72,className:a="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${r} ${a}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(Hv,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function qv(){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 Uv(){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 Gv(){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 Mn({children:e,icon:t,number:r,position:a="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:p="",variant:h,color:d,fill:m="filled"}){const{t:f}=Ee.useTranslation(),v=t===void 0||t==="check"||t==="remove"||t==="minus",b=v?t??"check":"check",_=r!==void 0,y=e!==void 0||_?"number":v?b:"icon",x=d?.startsWith("--")?`var(${d})`:d,g=!!(h||x),w={24:11,32:15,40:19}[s],N=e!==void 0?void 0:_?f("badge.nthSelected",{n:r,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):v?{check:f("badge.selected","\uC120\uD0DD\uB428"),remove:f("badge.remove","\uC81C\uAC70"),minus:f("badge.exclude","\uC81C\uC678")}[b]:void 0,C=c?void 0:u??N;return n.jsxs("span",{className:we("circle-badge",`circle-badge--${y}`,`circle-badge--${s}`,`circle-badge--${a}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",g?"circle-badge--colored":"",g&&h?`badge--${h}`:"",g&&m!=="filled"?`circle-badge--${m}`:"",p),style:x?{"--badge-color":x}:void 0,onClick:i,onKeyDown:i?B=>{B.key!=="Enter"&&B.key!==" "||(B.preventDefault(),B.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(_?r:null),e===void 0&&!_&&v&&b==="check"&&n.jsx(qv,{}),e===void 0&&!_&&v&&b==="remove"&&n.jsx(Uv,{}),e===void 0&&!_&&v&&b==="minus"&&n.jsx(Gv,{}),e===void 0&&!_&&!v&&n.jsx(lt,{icon:t,size:w})]})}function jr(e){const t=(e??"").trim().toUpperCase();return/^[A-Z]$/.test(t)?`Key${t}`:/^[0-9]$/.test(t)?`Digit${t}`:null}function qa(e){return e>=0&&e<9?String(e+1):null}function hs(e){return e.map((t,r)=>{const a=t.shortcut;return{...t,shortcut:a!==void 0?a:qa(r)}})}function Vu(e){const t=new Map;for(const r of e??[])for(const a of r?.items??[]){const s=a&&!a.disabled?jr(a.shortcut):null;s&&t.set(s,(t.get(s)??0)+1)}return[...t].filter(([,r])=>r>1).map(([r])=>r.replace(/^Key|^Digit/,""))}function tr({columns:e=[],onClose:t,className:r="",size:a="medium"}){const{t:s}=Ee.useTranslation(),l=a==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const y=[{title:null,columns:e}];let x=e;for(const g of i){const w=x?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;x=[{title:null,items:w.children}],y.push({title:w.label||null,columns:x})}return y},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(y=>y.slice(0,Math.max(0,Math.min(y.length,h)-1))),[h]),m=o.useRef(null),f=o.useRef(null),v=c.length;o.useEffect(()=>{f.current||(f.current=document.activeElement);let y=0,x=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}x++<20&&(y=requestAnimationFrame(g))};return y=requestAnimationFrame(g),()=>cancelAnimationFrame(y)},[v]),o.useEffect(()=>()=>{f.current?.focus?.({preventScroll:!0})},[]);const b=o.useCallback((y,x,g)=>{if(y){if(Array.isArray(y.children)&&y.children.length){u(w=>[...w.slice(0,h),{ci:x,ii:g}]);return}try{typeof y.onClick=="function"&&y.onClick()}catch{}try{y&&y.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);o.useEffect(()=>{const y=Vu(p.columns);y.length&&kt(`menu-shortcut-dup:${y.join(",")}:${p.columns.flatMap(x=>x.items.map(g=>g.label)).join("|")}`,`[MenuTooltip] \uD55C \uBA54\uB274 \uC548\uC5D0\uC11C \uB2E8\uCD95\uD0A4\uAC00 \uACB9\uCE69\uB2C8\uB2E4: ${y.join(", ")} \u2014 \uC55E\uC758 \uD56D\uBAA9\uB9CC \uBA39\uC2B5\uB2C8\uB2E4.`)},[p.columns]);const _=o.useRef({columns:p.columns,handleClick:b});return _.current={columns:p.columns,handleClick:b},o.useEffect(()=>{const y=x=>{if(x.defaultPrevented||x.ctrlKey||x.metaKey||x.altKey)return;const g=x.target;if(g&&g.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))return;const{columns:w,handleClick:N}=_.current;for(let C=0;C<(w?.length??0);C++){const B=w[C]?.items??[];for(let k=0;k<B.length;k++){const E=B[k];if(!(!E||E.disabled||jr(E.shortcut)!==x.code)){x.preventDefault(),N(E,C,k);return}}}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]),n.jsxs("div",{className:ce(`menu-tooltip menu-tooltip--${a} ${r}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ce("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ce("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ce("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((y,x)=>{const g=(y.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:ce("menu-tooltip__column"),children:[y.title?n.jsx("div",{className:ce("menu-tooltip__column-title body-3"),children:y.title}):null,n.jsx("div",{className:ce("menu-tooltip__items"),children:(y.items||[]).map((w,N)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&N>0&&n.jsx("div",{className:ce("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:ce("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Mn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):jr(w.shortcut)?n.jsx("kbd",{className:ce("menu-tooltip__shortcut caption-1"),"aria-hidden":"true",children:w.shortcut.trim().toUpperCase()}):void 0,"aria-keyshortcuts":jr(w.shortcut)?w.shortcut.trim().toUpperCase():void 0,ellipsis:jr(w.shortcut)?!0:void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>b(w,x,N),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},N))})]},x)})})]})}const qu=".content-area";function ms(e,t="Nav"){try{const r=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(qu);if(r){r.scrollTop=0;return}const a=document.scrollingElement??document.documentElement;a&&a.scrollHeight<=a.clientHeight&&kt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${qu}) \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 fs=52,Ua=10,Uu=e=>e&&e>0?e:0;function Gu({items:e=[],activeKey:t,onChange:r,appMode:a,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Ee.useTranslation(),c=a==="manager"?"malgwi":"manager",p=a==="manager"?"arrow-left":"arrow-right",h=a==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,f]=o.useState(0),v=e.length;o.useEffect(()=>{const $=d.current;if(!$)return;const V=()=>{const P=typeof getComputedStyle=="function"?getComputedStyle($):null,L=$.clientWidth-(parseFloat(P?.paddingLeft??"")||0)-(parseFloat(P?.paddingRight??"")||0),R=$.querySelector(".bottom-nav__left"),U=R?.nextElementSibling,Z=(R?.offsetWidth??0)+(R&&U?.classList.contains("bottom-nav__divider")?U.offsetWidth:0);f(Math.max(0,L-Z))};if(V(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(V);ne.observe($);const te=$.querySelector(".bottom-nav__left");return te&&ne.observe(te),()=>ne.disconnect()},[s]);const b=fs+1,_=$=>Math.max(0,Math.floor(($+Ua)/(fs+Ua))),y=v*(fs+Ua)-Ua<=m,x=m<=0||l.length===0&&y?v:Math.min(v,_(m-b)),g=m>0&&x<v,w=g?x:v,N=e.slice(0,w),C=e.slice(w),B=g||l.length>0,k=o.useCallback(($,V)=>({position:"fixed",bottom:window.innerHeight-$.top+8,right:window.innerWidth-$.right,zIndex:sa(V)}),[]),E=o.useId(),{open:A,toggle:D,close:j,style:S,triggerRef:O,menuRef:z}=la({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),G=o.useCallback(($,V)=>V>0?u("nav.badgeLabel",{label:$,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):$,[u]),M=o.useCallback(($,V)=>V>0?u("nav.badgeInsideLabel",{label:$,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):$,[u]),I=o.useCallback(()=>s?.(c),[s,c]),W=o.useMemo(()=>C.find($=>!!$.key&&$.key===t)??l.find($=>$.selected||$.key&&$.key===t),[C,t,l]),pe=o.useMemo(()=>[{items:hs([...C.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:!!$.key&&$.key===t,closeOnSelect:!0,disabled:$.state==="disabled",onClick:()=>{$.state!=="disabled"&&($.key&&r&&(r($.key),ms(i,"BottomNav")),j())}})),...l.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===t),closeOnSelect:!0,onClick:()=>{$.onClick?.(),j()}}))])}],[C,l,t,r,j]),se=[...C,...l].reduce(($,V)=>$+Uu(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:I})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map(($,V)=>{const ne=Uu($.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:$.icon,ariaLabel:G($.label,ne),selected:!!$.key&&$.key===t,disabled:$.state==="disabled",className:"bottom-nav-item",onClick:()=>{$.key&&(r?.($.key),ms(i,"BottomNav"))}}),ne>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Mn,{position:"top-right",number:Math.min(ne,99),size:24})})]},$.key??`__slot-${V}`)})}),B&&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:O,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:W?.icon??"ellipsis",ariaLabel:M(W?.label??u("nav.more","\uB354\uBCF4\uAE30"),se),selected:!!W,className:"bottom-nav-item",onClick:D,"aria-expanded":A,"aria-controls":A?E:void 0}),se>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Mn,{position:"top-right",number:Math.min(se,99),size:24})}),A&&bn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ce("tooltip__content"),style:S,ref:z,children:n.jsx(tr,{columns:pe,onClose:j})}),document.body)]})})]})]})}function Ku(e){if(typeof e!="string")return!1;let t="";for(const a of e){const s=a.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=a)}if(!t)return!1;const r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return r?["http","https","mailto","tel"].includes(r[1].toLowerCase()):!0}function Yu(e,t,r){return r&&r>0?e("nav.badgeLabel",{label:t,count:r,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Kv(e){const{t}=Ee.useTranslation(),{activeKey:r,unreadCount:a,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:r==="debug"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:r==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Yu(t,t("nav.notifications","\uC54C\uB9BC"),a),onClick:l,selected:r==="notifications"}),!!a&&a>0&&n.jsx(Mn,{position:"top-right",number:Math.min(a,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:r==="settings"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:r==="feedback"}),p&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:r==="account"})]}):null}function Zu(e){const{t}=Ee.useTranslation(),{item:r,itemKey:a,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=r?.key??a??"",m=r?.label??s??"",f=r?.icon??l??"",v=r?.badge??0,b=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:f,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),_=p==="disabled",y=`side-nav__item ${i?"active":""} ${p||""} ${_?"disabled":""} ${r?.child?"side-nav__item--child":""}`,x=o.useCallback(g=>{if(_)return;const w=g.detail>0;if(w)try{g.currentTarget.blur()}catch{}u?.(d,g.currentTarget,w)},[_,d,u]);return n.jsxs("button",{type:"button",className:y,onClick:x,"aria-label":typeof m=="string"?Yu(t,m,v):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":_,children:[b,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),v>0&&n.jsx(Mn,{position:"inline",number:Math.min(v,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Xu(e){const{t}=Ee.useTranslation(),{items:r=[],activeKey:a,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f,scrollContainer:v}=e||{},b=m==="manager",_=o.useCallback(()=>f?.(b?"malgwi":"manager"),[f,b]),y=o.useRef(null),[x,g]=o.useState(null);o.useEffect(()=>{const k=y.current;if(!k)return;let E=null;const A=()=>{const{scrollHeight:S,clientHeight:O,scrollTop:z}=k;if(S<=O+1){g(pe=>pe===null?pe:null);return}const G=Math.max(24,O/S*O),M=O-G,I=S-O,W={top:Math.round(z/I*M),height:Math.round(G)};g(pe=>pe&&pe.top===W.top&&pe.height===W.height?pe:W)},D=()=>{if(typeof requestAnimationFrame>"u"){A();return}E===null&&(E=requestAnimationFrame(()=>{E=null,A()}))};A(),k.addEventListener("scroll",D,{passive:!0});const j=typeof ResizeObserver<"u"?new ResizeObserver(D):null;j?.observe(k);for(const S of Array.from(k.children))j?.observe(S);return()=>{E!==null&&cancelAnimationFrame(E),k.removeEventListener("scroll",D),j?.disconnect()}},[r]);const w=o.useRef(null),N=o.useCallback(k=>{const E=y.current;E&&(k.preventDefault(),w.current={y:k.clientY,top:E.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),C=o.useCallback(k=>{const E=y.current,A=w.current;!E||!A||(E.scrollTop=A.top+(k.clientY-A.y)*(E.scrollHeight/E.clientHeight))},[]),B=o.useCallback(k=>{w.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[n.jsxs("div",{ref:y,className:"side-nav__menu-list",children:[x&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:x.top,height:x.height},onPointerDown:N,onPointerMove:C,onPointerUp:B,onPointerCancel:B})}),(r||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,E)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Zu,{item:k,active:!!k.key&&k.key===a,state:k.disabled?"disabled":void 0,onClick:(A,D,j)=>{if(k.disabled)return;if(k.href){if(Ku(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),j)try{D?.blur()}catch{}return}if(s?.(k.key),ms(v,"SideNav"),!j)return;try{D?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const S=document.querySelector(".header");if(S){const O=typeof S.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&O&&S.matches(":hover"))){S.classList.add("header--force-collapsed");const z=()=>{S.classList.remove("header--force-collapsed"),S.removeEventListener("mouseenter",z)};S.addEventListener("mouseenter",z)}}}})]},k.key??`side-nav__item-${E}`)),f&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),f&&n.jsx(Zu,{item:{key:"__mode-switch__",label:b?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:b?"arrow-left":"arrow-right"},onClick:_})]}),n.jsx(Kv,{activeKey:a,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var Ga='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Cs='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Yv='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 Ju({src:e,alt:t,className:r,style:a,tone:s,textColor:l}){const i=!s&&!!l,u=Tv(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:we("brand-logo","brand-logo--tone",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Dv(jv(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",r),style:a,draggable:!1})}function Qu({appMode:e}){const{t}=Ee.useTranslation(),r=e==="manager",a=r?Cs:Ga,s=Yv;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),r?n.jsx("img",{src:a,alt:t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):n.jsx(Ju,{src:a,alt:t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function ec({activeKey:e,onChange:t,items:r,malgwiItems:a,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f,scrollContainer:v}){const{t:b}=Ee.useTranslation(),_=fn("(max-width: 767px)"),y=o.useMemo(()=>(r??[]).filter(S=>!S.section&&(S.key||S.label)).map(S=>({key:S.key,label:typeof S.label=="string"?S.label:void 0,icon:S.icon,state:S.disabled?"disabled":void 0,badgeCount:S.badge})),[r]),x=o.useCallback(S=>{const O=r?.find(z=>z.key===S);if(!O?.disabled){if(O?.href){Ku(O.href)&&window.open(O.href,"_blank","noopener,noreferrer");return}t?.(S)}},[r,t]),g=o.useMemo(()=>{const S=[];return i&&S.push({key:"debug",icon:"terminal",label:b("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&S.push({key:"help",icon:"message-circle-question-mark",label:b("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&S.push({key:"notifications",icon:"bell",label:b("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&S.push({key:"settings",icon:"settings",label:b("nav.settings","\uC124\uC815"),onClick:p}),d&&S.push({key:"feedback",icon:"bug",label:b("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&S.push({key:"account",icon:"user-round",label:b("nav.account","\uACC4\uC815"),onClick:c}),S},[b,i,u,p,h,d,c,l]),w=o.useCallback((S,O)=>({position:"fixed",top:S.bottom+8,right:Math.max(8,window.innerWidth-S.right),zIndex:sa(O)}),[]),N=o.useId(),{open:C,toggle:B,close:k,style:E,triggerRef:A,menuRef:D}=la({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),j=o.useMemo(()=>[{items:g.map((S,O)=>({label:S.label,shortcut:qa(O),icon:S.icon,badgeCount:S.badgeCount,selected:S.selected??(!!S.key&&S.key===e),closeOnSelect:!0,onClick:()=>{S.onClick?.(),k()}}))}],[g,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?b("nav.badgeInsideLabel",{label:b("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):b("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:B,"aria-expanded":C,"aria-controls":C?N:void 0}),!!u&&!!l&&l>0&&n.jsx(Mn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),C&&bn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":b("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ce("tooltip__content"),style:E,ref:D,children:n.jsx(tr,{columns:j,onClose:k})}),document.body)]})]}),n.jsx(Xu,{scrollContainer:v,items:r,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:f}),_&&n.jsx(Gu,{items:y,activeKey:e??void 0,onChange:x,scrollContainer:v,appMode:m,onAppModeChange:f})]})}const Zv=ec;function rn(e){const{type:t="dot",size:r,className:a="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&kt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&kt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:p="default",fill:h="filled",useBg:d=!0,minWidth:m,iconLeft:f,iconRight:v,color:b}=e,_=t==="bar",y=typeof r=="number"?"medium":r??"medium",x=(_?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[y]??(_?"body-2":"body-2b"),g={small:12,medium:14,large:16}[y]??14,w=we("badge",_?"badge--bar":"",`badge--${p}`,`badge--${y}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",x,a),N=b?.startsWith("--")?`var(${b})`:b,C=m!==void 0||N?{...m!==void 0?{minWidth:typeof m=="number"?`${m}px`:m}:{},...N?{"--badge-color":N}:{}}:void 0;return n.jsxs("span",{className:w,style:C,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[f&&n.jsx(lt,{icon:f,size:g,className:"badge__icon"}),u??c,v&&n.jsx(lt,{icon:v,size:g,className:"badge__icon"})]})}const Xv=()=>Mt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tc(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return Ar(`${t.toLocaleString("ko-KR")}\uC6D0`)}return Ar(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Jv(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Qv(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const r=e.name??"",a=r.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(a)return a[1].replace(/\s+/g,"");const s=r.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:r||Xv()}function ex(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const r=Number(t[1]);return t[2].toLowerCase()==="y"?r*365:r}function nc(e){return{type:e.type??Jv(e),plan:Qv(e),label:e.label,price:tc(e.price),originalPrice:tc(e.originalPrice),discountLabel:e.discountLabel}}var tx='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>',nx='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>',rc='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const pr={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},gs=new WeakMap;function rx(e){if(e)return gs.get(e)}function Wn(e,t){e&&(e.style.setProperty(pr.text,t.text),e.style.setProperty(pr.sub,t.sub),t.copyrightColor&&e.style.setProperty(pr.copyright,t.copyrightColor),gs.set(e,t))}function Hn(e){e&&(e.style.removeProperty(pr.text),e.style.removeProperty(pr.sub),e.style.removeProperty(pr.copyright),gs.delete(e))}const ac={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function oc(e={}){const t=Ht(ac,Wn,Hn);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("${rc}")`}})]})}const sc="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",Dr=240;var ia='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 ax={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},ox=100,sx=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lc(e={}){const t=Ht(ax,Wn,Hn),r="var(--color-main)",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:sx.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*ox/Dr}) translate(${-Dr/2} ${-Dr/2})`,opacity:i,children:n.jsx("path",{d:sc,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${ia}")`}})]})}const lx={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},ix=100,ux=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cx(e={}){const t=Ht(lx,Wn,Hn),r="#ffffff",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:ux.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*ix/Dr}) translate(${-Dr/2} ${-Dr/2})`,opacity:i,children:n.jsx("path",{d:sc,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${rc}")`}})]})}const dx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function px(e={}){const t=Ht(dx,Wn,Hn);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("${ia}")`}})]})}const hx={Logo_SpeechEar_ko:{"":Ga,_mono:tx},Logo_SpeechEarManager_ko:{"":Cs,_mono:nx}};function mx(e,t){if(e)return hx[e]?.[t??""]??void 0}const fx={speechear:Ga,manager:Cs},Cx={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ic=10;function gx(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 uc(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const r=Math.floor(e/86400);if(r>0)return t("passCard.remainingDay",{n:r});const a=Math.floor(e/3600);if(a>0)return t("passCard.remainingHour",{n:a});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function bx(e,t,r){if(e==="manager"){const a=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=r==="\uC624\uD508\uD2B9\uAC00"||r===Mt.t("passCard.specialLabel");return a?n.jsx(px,{}):s?n.jsx(cx,{}):n.jsx(lc,{})}return n.jsx(oc,{})}function cc({ariaLabel:e,product:t,showPrice:r=!1,plan:a,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:f,logoSrc:v,label:b,price:_,originalPrice:y,discountLabel:x,onUse:g,onRefund:w,onDelete:N}){const{t:C}=Ee.useTranslation(),B=t?nc(t):void 0,k=s??B?.type??"speechear",E=a??B?.plan??C("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=b??B?.label,D=_??(r?B?.price:void 0),j=y??(r?B?.originalPrice:void 0),S=x??B?.discountLabel,O=o.useMemo(()=>{if(D)return null;const J=t?.durationDays??ex(t?.code);if(!J||J<=0)return i!=null?{percent:null,remainingLabel:uc(i,C)}:null;const F=J*86400;let Q;if(i!=null)Q=i;else if((c==="active"||c==="expired")&&l){const re=new Date(l).getTime();if(Number.isNaN(re))return null;const de=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(ta()),ke=Math.round(de&&Be?(Date.UTC(+de[1],+de[2]-1,+de[3])-Date.UTC(+Be[1],+Be[2]-1,+Be[3]))/864e5:(re-Date.now())/864e5);Q=Math.max(0,u?ke+1:ke)*86400}else c==="expired"?Q=0:Q=F;const H=gx(Q),le=Math.max(0,Math.min(100,Math.floor(Math.min(H,F)/F*100)));return c==="pending"&&le>=100?null:{percent:le,remainingLabel:c==="expired"?C("passCard.expired","\uB9CC\uB8CC\uB428"):uc(Q,C)}},[D,c,l,i,u,t?.durationDays,t?.code,C]),z=o.useRef(null),[G,M]=o.useState({}),[I,W]=o.useState(null),pe=!!(g||w||N),se=o.useRef(!1),$=o.useRef(void 0),[V,ne]=o.useState(v);o.useLayoutEffect(()=>{ne(v)},[v]),o.useLayoutEffect(()=>{const J=z.current;J&&(d!==void 0&&J.style.setProperty("--pass-card-text",d),m!==void 0&&J.style.setProperty("--pass-card-sub",m),f!==void 0&&J.style.setProperty("--pass-card-copyright",f))},[d,m,f]),o.useLayoutEffect(()=>{const J=z.current;if(!J)return;const F=rx(J);if(!v){const Q=Cx[k],H=c==="expired"?"_mono":F?.logoColor??"",le=mx(Q,H);ne(le)}},[p,v,k,c]);const te=J=>{const F=z.current;if(!F)return null;const{left:Q,top:H,width:le,height:re}=F.getBoundingClientRect(),de=(J.clientX-Q)/le-.5;return{rotateX:-((J.clientY-H)/re-.5)*ic,rotateY:de*ic}},P=(J,F)=>{const Q=F*-.7,H=J*.7+10,le=20+(Math.abs(J)+Math.abs(F))*.4;return`${Q}px ${H}px ${le}px rgba(0, 0, 0, 0.18)`},L=o.useCallback(J=>{if(ur())return;se.current=!0,clearTimeout($.current),$.current=setTimeout(()=>{se.current=!1},200);const F=te(J);F&&M({transform:`perspective(800px) rotateX(${F.rotateX}deg) rotateY(${F.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(F.rotateX,F.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)"})},[]),R=o.useCallback(J=>{if(ur())return;const F=te(J);if(!F)return;const Q=se.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";M({transform:`perspective(800px) rotateX(${F.rotateX}deg) rotateY(${F.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(F.rotateX,F.rotateY),transition:Q})},[]),U=o.useCallback(()=>{clearTimeout($.current),se.current=!1,M({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)"})},[]),Z=o.useCallback(()=>W(null),[]),X=o.useMemo(()=>{const J=C("passCard.planSuffix","\uC774\uC6A9\uAD8C"),F=E.replace("\uC774\uC6A9\uAD8C","").replace(J==="\uC774\uC6A9\uAD8C"?"":J,"").trim(),Q=F.match(/^(.*?)(일|년)$/);return Q?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:Q[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:Q[2]==="\uB144"?C("passCard.unitYear","\uB144"):C("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:F})},[E,C]),ae=o.useMemo(()=>{const J=Ar(D);if(!J)return null;const F=J.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!F)return n.jsx("span",{className:"h1",children:J});const[,Q,H,le]=F;return n.jsxs(n.Fragment,{children:[Q&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:Q}),n.jsx("span",{className:"h1 pass-card__price-amount",children:H}),le.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:le.trim()})]})},[D]),Y=o.useCallback(()=>{pe&&W(J=>{if(J)return null;const F=z.current?.getBoundingClientRect();if(!F)return null;const Q=50;return{left:F.left,right:F.right,width:F.width,height:F.height,x:F.x,y:F.y+Q,top:F.top+Q,bottom:F.bottom+Q}})},[pe]),xe=o.useCallback(J=>{pe&&(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),Y())},[pe,Y]),ie=[{items:[...g?[{label:C("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",shortcut:"U",onClick:()=>{g(),W(null)},closeOnSelect:!0}]:[],...w?[{label:C("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",shortcut:"R",onClick:()=>{w(),W(null)},closeOnSelect:!0}]:[],...N?[{label:C("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",shortcut:"D",onClick:()=>{N(),W(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:z,className:`pass-card pass-card--${c}${pe?" pass-card--clickable":""}`,style:G,onMouseEnter:L,onMouseMove:R,onMouseLeave:U,onPointerUp:J=>{J.pointerType==="touch"&&U()},onPointerCancel:J=>{J.pointerType==="touch"&&U()},onClick:Y,onKeyDown:pe?xe:void 0,role:pe?"button":void 0,tabIndex:pe?0:void 0,"aria-label":e,"aria-haspopup":pe?"menu":void 0,"aria-expanded":pe?!!I:void 0,children:[p??bx(k,E,A),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??fx[k],className:"pass-card__logo",alt:k==="manager"?C("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):C("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:X}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?C("passCard.labeledPlan",{label:A}):C("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),D?n.jsxs("div",{className:"pass-card__price-area",children:[S&&n.jsx("span",{className:"pass-card__discount body-3",children:S}),n.jsxs("div",{className:"pass-card__price",children:[j&&n.jsx("span",{className:"pass-card__price-original body-3",children:Ar(j)}),ae]})]}):O?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:O.remainingLabel}),O.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:O.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),I&&n.jsx(sn,{anchorRect:I,onClose:Z,ariaLabel:C("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:ie,onClose:Z,size:"small"})})]})}const yx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function vx(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,r=Ht(yx,Wn,Hn);return n.jsxs("div",{ref:r,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${ia}")`}})]})}const xx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function _x(e={}){const t=Ht(xx,Wn,Hn);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("${ia}")`}})]})}function wx(e,t){if(e){if(t==="manager_pro")return n.jsx(_x,{});if(t==="manager_standard")return n.jsx(vx,{});if(t==="manager_lite")return n.jsx(lc,{})}}function Bx(e){const t=Ar(e);if(!t)return null;const r=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!r)return t;const[,a,s,l]=r;return n.jsxs(n.Fragment,{children:[a&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:a}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function kx(e){const{t}=Ee.useTranslation(),r=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),a=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u,titleLevel:c=3}=e||{},p=c?`h${c}`:"div",h=C=>!!C&&!!u?.includes(C),d=C=>C.onceOnly??/오픈\s*특가/.test(C.label??""),m=(s.tiers||[]).some(C=>d(C)&&h(C.code)),f=C=>{const B=C.prices?C.prices[i]:C.price;return B?(s.tiers||[]).some(k=>!!k.badge&&k.originals?.[i]===B):!1},v=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),_=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),y=C=>C.prices?C.prices[i]:C.price,x=(s.tiers||[]).length>0&&(s.tiers||[]).every(C=>{const B=y(C);return B==="\uBB34\uB8CC"||B===b||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),g=(s.tiers||[]).length>0&&(s.tiers||[]).every(C=>{const B=y(C);return B==="\uBB38\uC758"||B===_}),w=s.group==="org",N=w?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:v,"--plan-color":v},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(rn,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:v},children:s.quote||"\xA0"}),n.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((C,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:v}}),C]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((C,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:v}}),C]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:x?null:g?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(C=>{const B=C.label||r,k=d(C),E=k||C.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||r,D=C.prices?C.prices[i]:C.price,j=C.badge?E?`${a}
|
|
841
|
+
${C.badge}`:C.badge:void 0;if(k&&h(C.code))return null;if(!C.badge&&!m)return f(C)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${C.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:C.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:Bx(D)})})]},C.id);const S=s.tier??(w?s.title:void 0),O=n.jsx(cc,{showPrice:!0,product:{type:N,code:C.code,name:A,label:S,price:D,originalPrice:C.originals?.[i]??void 0,discountLabel:j},bg:wx(w,s.id)}),z=()=>l?.({...C,productId:s.id,productTitle:s.title,preview:O});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:z,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),z())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:O},C.id)})})})})]})}function Ax({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 bs='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 dc={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function Nx(){const e=Ht(dc,Wn,Hn);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("${bs}")`}})})}const pc={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function Ex(e={}){const t=Ht(pc,Wn,Hn);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("${ia}")`}})]})}function hc({keys:e,anchor:t="top-right",scale:r,className:a=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:we("shortcut-badge",`shortcut-badge--${t}`,a),style:r===void 0?void 0:{"--shortcut-badge-scale":String(r)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const ua=(e,t,r)=>e+(t-e)*r;function jx({speakers:e,size:t=300,viewT:r=0,activeSpeakerId:a=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:f=40,showIcon:v=!0,onCenterClick:b,centerLabel:_,centerDisabled:y=!1,centerAttention:x=!1,shortcutAnchor:g="top-right",shortcutScale:w,scaleShortcut:N=!1}){const{t:C}=Ee.useTranslation(),B=Math.max(0,Math.min(1,r)),k=t/2,E=110/300,A=.18,D=F=>t*(E+(F-1)*A),j=F=>{const Q=D(F.row??1),H=F.angleDeg*Math.PI/180;return{x:k+Q*Math.cos(H),y:k+Q*Math.sin(H)}},S=Math.max(...e.map(F=>F.row??1),1),O=t*.08,z=t*.1,G=t*.24,M=t-2*O,I=t-z-G,W=t-G/2,pe=o.useMemo(()=>[...new Set(e.map(F=>F.deg))].sort((F,Q)=>F-Q),[e]),se=pe.length,$=Math.max(68,se>1?M/(se-1):0),V=o.useMemo(()=>new Map(pe.map((F,Q)=>[F,Q])),[pe]),ne=F=>{const Q=V.get(F.deg)??0,H=k+(Q-(se-1)/2)*$,le=S>1?Math.min(68,I/(S-1)):0,re=le*(S-1),de=z+(I-re)/2,Be=S===1?z+I*.4:de+(S-(F.row??1))*le;return{x:H,y:Be}},te=F=>{const Q=j(F),H=ne(F);return{x:ua(Q.x,H.x,B),y:ua(Q.y,H.y,B)}},P={x:k,y:ua(k,W,B)},L=Math.round(f*1.2),R=Math.round(Math.max(16,Math.min(80,f*.7))),U=[],Z=new Map;for(const F of e){const Q=F.row??1;Z.has(Q)||Z.set(Q,[]),Z.get(Q).push(F)}for(const[F,Q]of Z.entries()){if(Q.length<2)continue;const H=[...Q].sort((je,tt)=>je.deg-tt.deg),le=H.map(je=>te(je)),re=H.map(je=>je.deg),de=re[re.length-1]-re[0],Be=de/(re.length-1),ke=360-de,Ne=H.length>=3&&Be>0&&ke<=Be*1.5,Re=Math.round(D(F)*1e3)/1e3,ye=(je,tt,Ct,Ie)=>{const qe=(tt.angleDeg-je.angleDeg+540)%360-180;if(qe===0)return`L ${Ie.x} ${Ie.y}`;if(B===0)return`A ${Re} ${Re} 0 0 ${qe>0?1:0} ${Ie.x} ${Ie.y}`;const nt=(je.angleDeg+qe/2)*Math.PI/180,We={x:k+Re*Math.cos(nt),y:k+Re*Math.sin(nt)},Ze={x:(Ct.x+Ie.x)/2,y:(Ct.y+Ie.y)/2},ot={x:ua(We.x,Ze.x,B),y:ua(We.y,Ze.y,B)},gt={x:2*ot.x-Ze.x,y:2*ot.y-Ze.y};return`Q ${gt.x} ${gt.y} ${Ie.x} ${Ie.y}`},_e=Ne?[...H,H[0]]:H,Ae=Ne?[...le,le[0]]:le;let Oe=`M ${Ae[0].x} ${Ae[0].y}`;for(let je=1;je<Ae.length;je++)Oe+=" "+ye(_e[je-1],_e[je],Ae[je-1],Ae[je]);U.push({key:`arc-${F}`,d:Oe})}const X=o.useMemo(()=>new Set(s??[]),[s]),ae=F=>({idle:"",active:C("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:C("soundCompass.state.played","\uB4E4\uC74C"),correct:C("soundCompass.state.correct","\uC815\uB2F5"),wrong:C("soundCompass.state.wrong","\uC624\uB2F5")})[F],Y=(F,Q,H,le)=>{const re=F+1,de=new RegExp(`(^|[^0-9])${re}([^0-9]|$)`).test(Q),Be=!le||de?Q:`${re}, ${Q}`;return ae(H)?`${Be}, ${ae(H)}`:Be},xe=F=>{if(a===F.id)return"active";if(u){if(F.id===i)return"correct";if(F.id===l&&l!==i)return"wrong"}return X.has(F.id)?"played":"idle"},ie=F=>a===F.id?"loop":u?F.id===i?"loop":null:c&&F.id===l?"once":null,J=(F,Q)=>{switch(F){case"played":case"correct":return n.jsx(El,{size:Q});case"wrong":return n.jsx(Fl,{size:Q});default:return n.jsx(Pl,{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:[B===0&&e.map(F=>{const{x:Q,y:H}=te(F);return n.jsx("line",{x1:P.x,y1:P.y,x2:Q,y2:H,stroke:"#dde3ec",strokeWidth:"1"},F.id)}),U.map(F=>n.jsx("path",{d:F.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},F.key))]}),x&&!y&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:L,height:L,left:P.x-L/2,top:P.y-L/2}}),b?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${y?" sound-compass__center--disabled":""}`,style:{width:L,height:L,left:P.x,top:P.y},"aria-label":_,"aria-disabled":y||void 0,tabIndex:y?-1:0,onClick:y?void 0:b,children:n.jsx(vo,{size:R,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:L,height:L,left:P.x,top:P.y},children:n.jsx(vo,{size:R,color:"currentColor",strokeWidth:1.5})}),e.map((F,Q)=>{const{x:H,y:le}=te(F),re=xe(F),de=ie(F),Be={...w!==void 0||N?{"--shortcut-badge-scale":String(w??Math.max(.75,Math.min(3,f/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:re!=="idle"?10:1},ke=f,Ne=Math.round(Math.max(10,Math.min(56,ke*.38))),Re=Math.round(Math.max(7,Math.min(18,ke*.2))),ye=Math.round(Math.max(10,Math.min(56,ke*.4))),_e=v==="answered"&&(re==="played"||re==="correct"||re==="wrong"),Ae=v===!0||_e,Oe=!_e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:H-ke/2,top:le-ke/2},children:[de&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${re}`+(de==="once"?" sound-compass__pulse--once":""),style:{width:ke,height:ke,...de==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(F.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${re}`,style:{width:ke,height:ke},"aria-label":Y(Q,F.label,re,Oe),"aria-pressed":l!=null?F.id===l:void 0,children:[Ae&&J(re,Ne),Oe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?Re:ye},children:Q+1})]}),F.shortcut&&n.jsx(hc,{keys:F.shortcut,anchor:g,className:"sound-compass__speaker-shortcut"})]},F.id)})]})})}function Dx({id:e,tone:t="plain",bare:r=!1,className:a,style:s,children:l}){return n.jsx("section",{id:e,className:we("landing-section",t==="line"&&"landing-section--line",a),style:s,children:r?l:n.jsx("div",{className:"landing-section__inner",children:l})})}function Sx({badge:e,badgeVariant:t="white",title:r,sub:a,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:u=!1,onBand:c=!1,align:p="left"}){const h={...u?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},m=p==="center";return n.jsxs(n.Fragment,{children:[e?n.jsx("p",{className:we(m&&"landing-title__badge--center"),style:{margin:0},children:n.jsx(rn,{size:"large",fill:t==="white"?"filled":"soft",variant:t,children:e})}):null,n.jsx("h2",{className:we("landing-title__text",u&&"landing-title__text--no-gap",m&&"landing-title__text--center"),style:h,children:r}),a?n.jsx("p",{className:we("landing-title__sub",c&&"landing-title__sub--on-band",m&&"landing-title__sub--center"),style:d,children:a}):null]})}function Tx({icon:e,title:t,desc:r,children:a,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:u=!1,align:c="left",hover:p=!0,className:h,style:d}){const m=u?"landing-card--pad-tight":"landing-card--pad",f=n.jsxs(n.Fragment,{children:[e,t?n.jsx("h3",{className:"landing-card__title",style:i,children:t}):null,r?n.jsx("p",{className:"landing-card__desc",children:r}):null]});return s==="row"?n.jsxs("div",{className:we("landing-card","landing-card--row",m,p&&"landing-card--hover",h),style:d,children:[n.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:f}),n.jsx("div",{className:"landing-card__panel",children:a})]}):n.jsxs("div",{className:we("landing-card",m,c==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[f,a]})}function Mx({href:e,tone:t="dark",arrow:r=!1,align:a="center",className:s,children:l}){return n.jsxs("a",{className:we("landing-button",t!=="dark"&&`landing-button--${t}`,a==="between"&&"landing-button--between",s),href:e,children:[l,r?n.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:n.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}function mc({href:e,current:t,onClick:r,className:a,children:s}){return n.jsx("a",{href:e,onClick:r,"aria-current":t?"page":void 0,className:we("landing-menu-link",a),children:s})}const $x=1200,Lx=.3;function Rx(e){if(typeof e!="string")return null;const t=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!t)return null;const r=Number(t[2].replace(/,/g,""));return Number.isFinite(r)?{prefix:t[1],suffix:t[3],target:r,grouped:t[2].includes(",")}:null}function Px(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Fx(e){const t=o.useRef(null),[r,a]=o.useState(1);return o.useEffect(()=>{const s=t.current;if(e||!s||typeof IntersectionObserver!="function"){a(1);return}a(0);let l=0;const i=new IntersectionObserver(u=>{if(!u.some(h=>h.isIntersecting))return;i.disconnect();const c=performance.now(),p=h=>{const d=Math.min(1,(h-c)/$x);a(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:Lx});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[t,r]}function Ix({stats:e,className:t}){const r=Ia(),[a,s]=Fx(r);return n.jsx("div",{className:"landing-stat-band-wrap",children:n.jsx("div",{ref:a,className:we("landing-stat-band",t),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const u=Rx(l.value),c=u?`${u.prefix}${u.grouped?Px(Math.round(u.target*s)):Math.round(u.target*s)}${u.suffix}`:null;return n.jsxs("div",{children:[n.jsx("p",{className:"landing-stat-band__value",children:c===null?l.value:n.jsxs(n.Fragment,{children:[n.jsx("span",{"aria-hidden":"true",children:c}),n.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),n.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function Ox({orientation:e="horizontal",label:t,className:r=""}){const a=we("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",r);return e==="vertical"?n.jsx("div",{className:a,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:a,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:a,role:"separator","aria-orientation":"horizontal"})}function fc({checked:e,onChange:t,name:r,value:a,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:r,value:a,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function zx({options:e,value:t,onChange:r,name:a,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=a??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(fc,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&r?.(h.value)}},h.value))})}const Wx={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"},Hx={info:"main",success:"success",warning:"warning",danger:"danger"};function Vx({tone:e="info",title:t,message:r,children:a,dismissible:s=!1,onDismiss:l,live:i,className:u="",variant:c="box"}){const{t:p}=Ee.useTranslation(),[h,d]=o.useState(!1),m=o.useRef(null),f=o.useCallback(()=>{const g=m.current;g&&g.contains(document.activeElement)&&Pa(g),d(!0),l?.()},[l]);if(h)return null;const v=we("alert",`alert--${e}`,u),b=i??(e==="danger"||e==="warning"?"assertive":"polite"),_=b==="assertive"?"alert":b==="polite"?"status":void 0,y=!!t,x=!!(r||a);return c==="bar"?n.jsx(rn,{type:"bar",size:"medium",fill:"soft",variant:Hx[e],role:_,className:u||void 0,children:y&&x?n.jsxs(n.Fragment,{children:[t," ",r||a]}):t||r||a}):n.jsxs("div",{ref:m,className:v,role:_,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Wx[e],size:20,className:"alert__icon"}),y&&n.jsx("span",{className:"alert__title body-2",children:t}),!y&&x&&n.jsx("div",{className:"alert__message body-3",children:r||a})]}),y&&x&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:r||a})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:f,"aria-label":p("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const qx={ready:"search",guide:"info",error:"circle-alert"};function Ux(e,t){const r=t.filter(Boolean);if(r.length===0)return e;const a=[];let s=0,l=0;for(const i of r){const u=e.indexOf(i,s);u<0||(u>s&&a.push(e.slice(s,u)),a.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&a.push(e.slice(s)),a}function Gx({status:e="guide",label:t,children:r,emphasis:a,icon:s,className:l=""}){const i=s===!1?null:s??qx[e],u=we("search-summary",`search-summary--${e}`,l),c=t??r,p=typeof c=="string"&&a&&a.length>0?Ux(c,a):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function ca({title:e,items:t}){const{t:r}=Ee.useTranslation(),{anchorRect:a,openAt:s,close:l}=Ha(),i=o.useRef(null),u=Oa(!!a,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!a,ariaLabel:r("common.info","\uC124\uBA85"),onPointerEnter:c=>{er(c)||s(c.currentTarget)},onPointerLeave:c=>{er(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ur()||s(c.currentTarget)},onBlur:l}),a&&n.jsx(Qn,{title:e,items:t,showIndex:t.length>1,anchorRect:a,onClose:l})]})}const gn=40,hr=32;function Kx({items:e=[],value:t,onChange:r,className:a="",size:s}){const l=kn(),i=s??l??gn,u=o.useId(),{t:c}=Ee.useTranslation(),p=o.useRef(null),h=e.find(y=>!y.disabled)?.key,d=e.some(y=>y.key===t)?t:h??e[0]?.key,m=e.find(y=>y.key===d&&!y.disabled)?.key??h,f=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),v=(y,x=f())=>{if(x.length===0)return;const g=(y%x.length+x.length)%x.length;x[g]?.focus(),x[g]?.click()},b=y=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(y.key))return;y.preventDefault();const x=f(),g=x.indexOf(y.currentTarget);y.key==="ArrowRight"||y.key==="ArrowDown"?v(g+1,x):y.key==="ArrowLeft"||y.key==="ArrowUp"?v(g-1,x):y.key==="Home"?v(0,x):v(x.length-1,x)},_=e.find(y=>y.key===d);return n.jsxs("div",{className:`tabs ${a}`.trim(),children:[n.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":c("tabs.ariaLabel","\uD0ED"),children:e.map(y=>n.jsx("button",{id:`tabs__tab-${u}-${y.key}`,type:"button",role:"tab","aria-selected":y.key===d,"aria-controls":y.key===d?`tabs__panel-${u}-${y.key}`:void 0,disabled:y.disabled,tabIndex:y.key===m?0:-1,className:`tabs__tab body-2${y.key===d?" tabs__tab--active":""}`,onClick:()=>{y.key!==t&&r?.(y.key)},onKeyDown:b,children:y.label},y.key))}),_&&n.jsx("div",{id:`tabs__panel-${u}-${_.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${u}-${_.key}`,tabIndex:0,className:"tabs__panel",children:_.panel},_.key)]})}const Yx={xs:12,sm:16,md:20,lg:28,xl:36};function Zx(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 Xx({src:e,name:t,size:r="md",shape:a="circle",className:s=""}){const{t:l}=Ee.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?Zx(t):"",h=!!e&&!c,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${r} avatar--${a} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:Yx[r],className:"avatar__icon"})]})}function Jx(e,t){if(!t)return!0;const r=t.split(",").map(l=>l.trim()).filter(Boolean);if(r.length===0)return!0;const a=e.name.toLowerCase(),s=e.type.toLowerCase();return r.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function Qx({onFilesSelected:e,accept:t,multiple:r=!1,disabled:a=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Ee.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,f]=o.useState([]),v=l??m,b=C=>{if(!C||C.length===0)return;const B=Array.from(C).filter(E=>Jx(E,t));if(B.length===0)return;const k=r?B:B.slice(0,1);if(l===void 0){const E=r?[...v,...k]:k;f(E),e?.(E)}else e?.(k)},_=C=>{C.preventDefault(),!a&&d(!0)},y=C=>{C.preventDefault(),d(!1)},x=C=>{C.preventDefault(),d(!1),!a&&b(C.dataTransfer.files)},g=C=>{const B=C.target;try{b(B.files)}finally{B.value=""}},w=()=>{a||p.current?.click()},N=C=>{if(!a&&(i?.(C),l===void 0)){const B=v.filter((k,E)=>E!==C);f(B),i||e?.(B)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",h&&"file-upload__dropzone--dragging",a&&"file-upload__dropzone--disabled"),role:"button",tabIndex:a?-1:0,"aria-disabled":a,onClick:w,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),w())},onDragOver:_,onDragLeave:y,onDrop:x,children:[n.jsx(lt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:a,onClick:C=>{C.stopPropagation(),w()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:r,disabled:a,onChange:g,tabIndex:-1,"aria-hidden":"true"})]}),s&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((C,B)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:C.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:C.name}),disabled:a,onClick:()=>N(B),children:n.jsx(lt,{icon:"x",size:14})})]},`${C.name}-${B}`))})]})}function Cc({items:e,size:t="small",className:r=""}){const{t:a}=Ee.useTranslation(),s=t==="medium"?"body-1":"body-3",l=t==="medium"?18:14,i=t==="medium"?"body-1b":s;return n.jsx("nav",{className:`breadcrumb breadcrumb--${t} ${r}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((u,c)=>{const p=c===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[p&&u.menu?n.jsxs("button",{type:"button",className:`breadcrumb__current breadcrumb__current--menu ${i}`,"aria-current":"page","aria-haspopup":"menu","aria-expanded":!!u.menu.expanded,"aria-label":u.menu.ariaLabel,onClick:h=>u.menu.onOpen(h.currentTarget),children:[u.label,n.jsx(lt,{icon:"chevron-down",size:l,className:"breadcrumb__menu-mark"})]}):p?n.jsx("span",{className:`breadcrumb__current ${i}`,"aria-current":"page",children:u.label}):u.href?n.jsx("a",{className:`breadcrumb__link ${s}`,href:u.href,target:u.target,rel:u.rel??(u.target==="_blank"?"noopener noreferrer":void 0),onClick:u.onClick,children:u.label}):u.onClick?n.jsx("button",{type:"button",className:`breadcrumb__link ${s}`,onClick:u.onClick,children:u.label}):n.jsx("span",{className:`breadcrumb__text ${s}`,children:u.label}),!p&&n.jsx(lt,{icon:"chevron-right",size:l,className:"breadcrumb__separator"})]},c)})})})}const Ka="\0up";function gc({folders:e,onOpen:t,dropProps:r,dropOver:a,menuItems:s,onMove:l,up:i,add:u}){const{t:c}=Ee.useTranslation(),[p,h]=o.useState(null),d=$v((g,w)=>w===Ka?i?.onFolderDrop?.(g):l?.(g,w)),m=d.dragging,f=g=>{const w=l?d.cardProps(g):{};return m===null?{...r?.(g),...w}:!l||m===g?w:{...w,...d.groupProps(g)}},v=g=>m===null?a===g:d.dragOverKey===g,b=o.useRef(null),_=()=>{h(g=>(g&&(b.current={name:g.name,at:Date.now()}),null))},y=()=>i?m===null?i.cardDropKey!=null?{...r?.(i.cardDropKey)}:{}:i.onFolderDrop?d.groupProps(Ka):{}:{},x=!!i&&(m===null?i.cardDropKey!=null&&a===i.cardDropKey:!!i.onFolderDrop&&d.dragOverKey===Ka);return e.length===0&&!i&&!u?null:n.jsxs("ul",{className:"folder-grid","aria-label":c("folder.list","\uD3F4\uB354"),children:[i&&n.jsx("li",{className:["folder-grid__cell","folder-grid__cell--up",x&&"folder-grid__cell--over"].filter(Boolean).join(" "),...y(),children:n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:x?"is-hover":void 0,icon:"arrow-up",label:c("folder.up","\uC704\uB85C"),ariaLabel:c("folder.upTo",{name:i.targetLabel,defaultValue:"\uD55C \uCE35 \uC704\uB85C \u2014 {{name}}"}),onClick:i.onOpen})},Ka),e.map(g=>{const w=g.label??g.name;return n.jsxs("li",{className:["folder-grid__cell",v(g.name)&&"folder-grid__cell--over",m===g.name&&"folder-grid__cell--dragging"].filter(Boolean).join(" "),...f(g.name),children:[n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:v(g.name)?"is-hover":void 0,icon:"folder",label:w,count:g.count,ariaLabel:c("folder.open",{name:w,count:g.count,defaultValue:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C"}),rightIcon:s?n.jsx("span",{className:"folder-grid__more-room","aria-hidden":"true"}):void 0,onClick:()=>t(g.name)}),s&&n.jsx("span",{className:"folder-grid__more",children:n.jsx(fe,{htmlType:"button",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:c("folder.menu",{name:w,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),ariaExpanded:p?.name===g.name,onClick:N=>{if(b.current?.name===g.name&&Date.now()-b.current.at<300)return;const C=N.currentTarget;h(B=>B?.name===g.name?null:{name:g.name,label:w,anchor:C})}})})]},g.name)}),u&&n.jsx("li",{className:"folder-grid__cell folder-grid__cell--add",children:n.jsx(fe,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,icon:"folder-plus",label:u.label,onClick:u.onClick})},"__add"),p&&s&&n.jsx(sn,{anchorEl:p.anchor,onClose:_,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:c("folder.menu",{name:p.label,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),children:n.jsx(tr,{columns:[{items:s(p.name)}],size:"small",onClose:_})})]})}const bc="/";function yc({anchorEl:e,onClose:t,rootLabel:r,opened:a,onPick:s,tree:l,ariaLabel:i,onMove:u,itemDropProps:c,itemDropOver:p}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(new Set),f=B=>{s(B),t()},[v,b]=o.useState(null),[_,y]=o.useState(null),x=B=>{if(v===null)return c?.(B)??{};if(!u||!ey(v,B))return{};const k=B??bc;return{onDragOver:E=>{E.preventDefault(),E.dataTransfer.dropEffect="move",_!==k&&y(k)},onDragLeave:()=>y(E=>E===k?null:E),onDrop:E=>{E.preventDefault();const A=v;b(null),y(null),u(A,B)}}},g=B=>u?{draggable:!0,onDragStart:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",B),b(B)},onDragEnd:()=>{b(null),y(null)}}:{},w=B=>m(k=>{const E=new Set(k);return E.has(B)?E.delete(B):E.add(B),E}),N=l.filter(B=>![...d].some(k=>k!==B.path&&Wo(B.path,k))),C=B=>["folder-tree-tooltip__row",...B].filter(Boolean).join(" ");return n.jsx(sn,{anchorEl:e,onClose:t,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i,children:n.jsxs("div",{className:"folder-tree-tooltip",role:"tree","aria-label":i,children:[n.jsx("div",{role:"none",...x(null),className:C([a===null&&"folder-tree-tooltip__row--here",(_===bc||v===null&&!!p?.(null))&&"folder-tree-tooltip__row--over"]),children:n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":1,"aria-current":a===null?"page":void 0,onClick:()=>f(null),children:[n.jsx(lt,{icon:"folder-open",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:r})]})}),N.map((B,k)=>{const E=l.some(j=>j.path!==B.path&&Wo(j.path,B.path)),A=d.has(B.path),D=a===B.path;return n.jsxs("div",{role:"none",...g(B.path),...x(B.path),className:C([B.depth>0&&"folder-tree-tooltip__row--nested",D&&"folder-tree-tooltip__row--here",(_===B.path||v===null&&!!p?.(B.path))&&"folder-tree-tooltip__row--over",v===B.path&&"folder-tree-tooltip__row--dragging"]),style:{"--folder-depth":B.depth+1},children:[n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":B.depth+2,"aria-posinset":k+1,"aria-current":D?"page":void 0,onClick:()=>f(B.path),children:[n.jsx(lt,{icon:D?"folder-open":"folder",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:B.label}),B.count>0&&n.jsx("span",{className:"folder-tree-tooltip__count caption-1",children:B.count})]}),E&&n.jsx("button",{type:"button",className:`folder-tree-tooltip__twist${A?"":" folder-tree-tooltip__twist--open"}`,"aria-label":A?h("folder.unfold",{name:B.label,defaultValue:"{{name}} \uD3BC\uCE58\uAE30"}):h("folder.fold",{name:B.label,defaultValue:"{{name}} \uC811\uAE30"}),"aria-expanded":!A,onClick:()=>w(B.path),children:n.jsx(lt,{icon:"chevron-right",size:16,className:"folder-tree-tooltip__twist-mark"})})]},B.path)})]})})}function vc({rootLabel:e,opened:t,onOpen:r,tree:a,onMove:s,itemDragging:l=!1,itemDropProps:i,itemDropOver:u}){const{t:c}=Ee.useTranslation(),[p,h]=o.useState(null),d=o.useRef(0),m=()=>{h(b=>(b&&(d.current=Date.now()),null))},f=c("folder.tree","\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30"),v=o.useRef(!1);return o.useEffect(()=>{!l&&v.current&&(v.current=!1,h(null))},[l]),n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"folder-tree-button",onDragEnter:l?b=>{p||(v.current=!0,h(b.currentTarget))}:void 0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"default",icon:"folder-tree",ariaLabel:f,showTooltipInfo:f,ariaExpanded:!!p,onClick:b=>{if(Date.now()-d.current<300)return;const _=b.currentTarget;h(y=>y?null:_)}})}),p&&n.jsx(yc,{anchorEl:p,onClose:m,ariaLabel:f,rootLabel:e,opened:t,onPick:r,tree:a,onMove:s,itemDropProps:i,itemDropOver:u})]})}function e4({rootLabel:e,opened:t,onOpen:r,paths:a,countOf:s,folderMenu:l,rootMenu:i,dropProps:u,dropOver:c,onMoveFolder:p,itemDragging:h,rootDropKey:d,add:m}){const{t:f}=Ee.useTranslation(),[v,b]=o.useState(null),_=o.useRef(0),y=()=>{b(E=>(E&&(_.current=Date.now()),null))},x=t?Qr(t):e,g=t?f("folder.menu",{name:x,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}):f("folder.placeMenu",{name:x,defaultValue:"{{name}} \uBA54\uB274"}),w=!!l||!!i,N=w?{label:x,menu:{onOpen:E=>{Date.now()-_.current<300||b(A=>A?null:E)},expanded:!!v,ariaLabel:g}}:{label:x},C=t?[{label:e,onClick:()=>r(null)},...Jb(t).slice(0,-1).map(E=>({label:E.label,onClick:()=>r(E.path)})),N]:[N],B=t?Da(t):null,k=Xb(a,t).map(E=>({name:E,label:Qr(E),count:s(E)}));return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"folder-head",children:[n.jsx(vc,{rootLabel:e,opened:t,onOpen:r,onMove:p,itemDragging:h,itemDropProps:u?E=>E!==null?u(E):d?u(d):{}:void 0,itemDropOver:E=>c!=null&&c===(E??d),tree:Qb(a).map(E=>({...E,count:s(E.path)}))}),n.jsx(Cc,{size:"medium",items:C})]}),n.jsx(gc,{folders:k,onOpen:r,dropProps:u,dropOver:c,menuItems:l,onMove:p,up:t?{targetLabel:B?Qr(B):e,onOpen:()=>r(B),cardDropKey:B??d,onFolderDrop:p?E=>p(E,B):void 0}:void 0,add:m}),v&&w&&n.jsx(sn,{anchorEl:v,onClose:y,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:g,children:n.jsx(tr,{columns:[{items:(t?l?.(t):i)??[]}],size:"small",onClose:y})})]})}function t4({rows:e,rowRender:t,emptySpeech:r,dropProps:a,dropOver:s=!1,className:l}){return e.length===0?r?n.jsx("p",{className:we("folder-list__empty body-3",l),...a,children:r}):null:n.jsx("div",{className:we("folder-list",s&&"folder-list--over",l),...a,children:e.map((i,u)=>t(i,u))})}const da=new Map;function An(e){const{t}=Ee.useTranslation(),{options:r=[],value:a=r.find(C=>!C.disabled)?.key??r[0]?.key,onChange:s=C=>{},className:l="",size:i,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=kn(),f=i??m??gn,v=o.useRef(null),b=r.filter(C=>!C.disabled),_=o.useId(),y=r.map(C=>C.key).join("\xB7");o.useEffect(()=>{if(!(!Yn||d!=null&&d!=="")){if(da.set(_,y||"(\uBCF4\uAE30 \uC5C6\uC74C)"),da.size>1){const C=[...da.values()].sort();kt(`segmented-control-unnamed:${C.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${da.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): ${C.join(" / ")}`)}return()=>{da.delete(_)}}},[d,y,_]);const x=C=>{if(!b.length)return;const B=Math.max(0,b.findIndex(E=>E.key===a)),k=C==="first"?b[0]:C==="last"?b[b.length-1]:b[(B+C+b.length)%b.length];k&&(s(k.key),Array.from(v.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===k.key)?.focus())},g=C=>{switch(C.key){case"ArrowRight":case"ArrowDown":x(1);break;case"ArrowLeft":case"ArrowUp":x(-1);break;case"Home":x("first");break;case"End":x("last");break;default:return}C.preventDefault()},w=C=>{const B=k=>typeof k=="string"||typeof k=="number";if(!(!B(C.label)||C.count==null||C.count===!1||!B(C.count)))return`${C.label}, ${C.count}`},N=b.some(C=>C.key===a)?a:b[0]?.key;return n.jsx("div",{ref:v,onKeyDown:g,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${f}`,p&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:r.map(C=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":C.key===a,"data-segkey":C.key,tabIndex:C.key===N?0:-1,label:C.label,count:C.count,ariaLabel:w(C),disabled:C.disabled,showTooltipInfo:C.disabled&&C.disabledReason?C.disabledReason:void 0,className:C.key===a?"is-selected":"",onClick:()=>{C.disabled||s(C.key)},size:f,shape:u,useBorder:!1,useBG:!1},C.key))})}let pa=0,xc="",ys="",ha=0;function _c(){return Bc(!1)}function wc(){return Bc(!0)}function Bc(e){const t=typeof document<"u";pa===0&&t&&(xc=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(ha===0&&(ys=document.body.style.paddingRight),ha++,document.body.style.paddingRight="0px"),pa++;let r=!1;return()=>{r||(r=!0,pa=Math.max(0,pa-1),e&&t&&(ha=Math.max(0,ha-1),ha===0&&(ys?document.body.style.paddingRight=ys:document.body.style.removeProperty("padding-right"))),pa===0&&t&&(document.body.style.overflow=xc))}}const n4=Hu;function Vn(e){const{t}=Ee.useTranslation(),{title:r,subtitle:a,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerClassName:d="",footerLayout:m="center",onClose:f,closeDisabled:v=!1,beforeClose:b,closeOnBackdrop:_=!0,backClosable:y=!0,className:x="",ariaLabel:g,useTitle:w=!0,inline:N=!1,width:C,size:B,layer:k="modal",height:E,fillBody:A=!1,resetScrollKey:D}=e||{},j=C??(B==="fullwidth"?"full":B),S=j?` popup-panel--${j==="full"?"fullwidth":j}`:"",O=E!=null&&E!=="fit",[z,G]=o.useState(!1),M=o.useRef(!1),I=o.useRef(null),W=o.useId(),pe=o.useRef(null);o.useEffect(()=>{},[N,r,g,x]),o.useEffect(()=>{D!==void 0&&pe.current&&(pe.current.scrollTop=0)},[D]);const[se,$]=o.useState(!1),[V,ne]=o.useState(!1);o.useEffect(()=>{const de=pe.current;if(!de)return;const Be=()=>{$(de.scrollHeight>de.clientHeight+1),ne(de.scrollHeight-de.scrollTop-de.clientHeight>1)};Be();let ke=0;const Ne=()=>{ke||(ke=requestAnimationFrame(()=>{ke=0,Be()}))};de.addEventListener("scroll",Ne,{passive:!0});const Re=()=>{de.removeEventListener("scroll",Ne),ke&&cancelAnimationFrame(ke)};if(typeof ResizeObserver>"u")return Re;const ye=new ResizeObserver(Be);ye.observe(de);const _e=de.firstElementChild;return _e&&ye.observe(_e),()=>{ye.disconnect(),Re()}},[i,D]),o.useEffect(()=>{if(!N)return _c()},[N]);const te=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(N)return;const de=te.current,Be=I.current;return es(Be,de),Be&&!Be.contains(document.activeElement)&&(Be.querySelector(Sn)??Be).focus(),()=>{const ke=document.activeElement;(!ke||ke===document.body||Be&&Be.contains(ke))&&ts(de)?.focus?.()}},[N]),Ra(I,!N);const P=o.useRef(!0),L=Ia(),R=o.useRef(null);o.useEffect(()=>(P.current=!0,()=>{P.current=!1,R.current&&(clearTimeout(R.current),R.current=null)}),[]);const U=o.useCallback(()=>{!P.current||!M.current||(M.current=!1,G(!1))},[]),Z=o.useCallback((de,Be=!1)=>{if(Be&&!P.current||M.current)return;M.current=!0,G(!0);const ke=setTimeout(()=>{R.current===ke&&(R.current=null);let Ne;try{Ne=de?de():void 0}catch{U();return}Ne&&typeof Ne.then=="function"&&Ne.then(()=>{setTimeout(U,120)},U)},L?0:n4);Be&&(R.current=ke)},[U,L]),X=o.useCallback(()=>{v||b&&b()===!1||Z(f,!0)},[Z,f,v,b]),ae=o.useRef(X);o.useEffect(()=>{ae.current=X});const Y=!N&&!!f;o.useEffect(()=>{if(Y)return ir(()=>ae.current())},[Y]);const xe=o.useRef(b);o.useEffect(()=>{xe.current=b});const ie=o.useRef(v);o.useEffect(()=>{ie.current=v});const J=o.useRef(()=>Z(f,!0));o.useEffect(()=>{J.current=()=>Z(f,!0)}),Wu(Y&&y,()=>{if(ie.current)return!1;const de=xe.current;return de&&de()===!1?!1:(J.current(),!0)});const F=Y&&_,Q=o.useRef(!1),H=de=>{Q.current=de.target===de.currentTarget},le=de=>{const Be=Q.current;Q.current=!1,Be&&de.target===de.currentTarget&&X()},re=n.jsx("div",{className:`popup ${N?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${z?"popup--closing":""} ${x}`,onPointerDown:F?H:void 0,onClick:F?le:void 0,onMouseDown:N?void 0:de=>{de.target===de.currentTarget&&de.preventDefault()},children:n.jsxs("div",{ref:I,className:`popup-panel${S}${E==="full"?" popup-panel--height-full":O?" popup-panel--has-height":""}${A?" popup-panel--fill-body":""}`,style:O&&E!=="full"?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:N?void 0:"dialog","aria-modal":N?void 0:!0,"aria-labelledby":!N&&w&&r?W:void 0,"aria-label":!N&&!(w&&r)?g??(typeof r=="string"?r:void 0):void 0,children:[!w&&(s||f)?n.jsxs("div",{className:"popup-close-float",children:[s,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:X,disabled:v,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):r||s||f?n.jsxs("div",{className:`popup-header${a?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[r?n.jsx("h2",{id:W,className:"popup-title popup-title--left h2",children:r}):n.jsx("span",{id:W,className:"popup-title popup-title--left h2"}),a&&n.jsx("span",{className:"popup-subtitle body-3",children:a})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(An,{size:40,ariaLabel:l.ariaLabel,options:l.options,value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:X,disabled:v,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:pe,tabIndex:se?0:void 0,"data-more-below":V&&!(p||h||u&&u.length>0||c)?"":void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:Z,closeWithAnimation:X}):i})}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${d?` ${d}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:Z,closeWithAnimation:X}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:Z,closeWithAnimation:X}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${m!=="center"?` popup-footer--${m}`:""}`,children:u.map((de,Be)=>n.jsx(fe,{htmlType:"button",size:48,variant:de.variant??"default",label:de.label,disabled:de.disabled,onClick:()=>de.onClick?.({animateThen:Z,closeWithAnimation:X})},Be))}):c?n.jsx("div",{className:`popup-footer${m!=="center"?` popup-footer--${m}`:""}${d?` ${d}`:""}`,children:typeof c=="function"?c({animateThen:Z,closeWithAnimation:X}):c}):null]})});return N||typeof document>"u"?re:bn.createPortal(re,document.body)}function kc({checked:e,onChange:t,disabled:r=!1,label:a,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=a&&n.jsx("span",{className:"toggle__label body-3",children:a});return n.jsxs("label",{className:`toggle${r?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:r,onChange:p=>t?.(p.target.checked),"aria-label":!a&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function Nn({options:e,value:t,onChange:r,placeholder:a,disabled:s=!1,block:l=!1,size:i,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const d=kn(),m=i??d??gn,{t:f}=Ee.useTranslation(),v=a??f("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),_=o.useId(),y=o.useRef(null),x=o.useCallback((M,I)=>{const W=window.innerHeight,pe=window.innerWidth,se=typeof document<"u"?document.getElementById(b):null,$=260,V=Math.min($,Math.max(se?.offsetHeight||0,se?.scrollHeight||0)||$),ne=Math.max(M.width,se?.offsetWidth||0),te=W-M.bottom,P=M.top,L=te<V&&P>te,R=8,U=(Z,X)=>Math.min(Math.max(R,Z),Math.max(R,X));return{position:"fixed",left:U(M.left,pe-ne-R),minWidth:M.width,maxWidth:Math.max(M.width,pe-R*2),...L?{top:"auto",bottom:U(W-M.top+6,W-V-R)}:{bottom:"auto",top:U(M.bottom+6,W-V-R)},zIndex:sa(I)}},[b]),{open:g,setOpen:w,toggle:N,style:C,triggerRef:B,menuRef:k}=la({computeStyle:x}),[E,A]=o.useState(-1),D=o.useCallback(()=>A(-1),[]),j=e.find(M=>M.value===t);o.useEffect(()=>{if(g){const M=e.findIndex(I=>I.value===t);A(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const I=k.current;if(!I)return;const W=I.querySelectorAll(".dropdown__option")[M];W&&(I.scrollTop=Math.max(0,W.offsetTop-I.clientHeight/2+W.clientHeight/2))})}},[g]),o.useEffect(()=>{g&&A(M=>{if(M>=0&&M<e.length)return M;const I=e.findIndex(W=>W.value===t);return I>=0?I:e.length?0:-1})},[g,e.length]);const S=o.useCallback(()=>{s||N()},[s,N]),O=o.useCallback(M=>{M.disabled||s||(M.value!==t&&r?.(M.value),w(!1))},[r,w,s,t]);o.useEffect(()=>{s&&w(!1)},[s,w]);const z=o.useCallback(M=>{if(!s){if(!g){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),w(!0));return}if(M.key==="Escape"){M.preventDefault(),w(!1);return}M.key==="ArrowDown"?(M.preventDefault(),A(I=>{let W=I+1;for(;W<e.length&&e[W].disabled;)W++;return W<e.length?W:I})):M.key==="ArrowUp"?(M.preventDefault(),A(I=>{let W=I-1;for(;W>=0&&e[W].disabled;)W--;return W>=0?W:I})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[E]?O(e[E]):w(!1))}},[s,g,e,E,O,w]),G=g?n.jsx("div",{ref:k,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:C,onMouseLeave:D,onMouseDown:M=>M.preventDefault(),children:e.map((M,I)=>n.jsxs("button",{id:`${b}-option-${I}`,type:"button",role:"option","aria-selected":M.value===t,className:we("dropdown__option body-2",M.value===t?"dropdown__option--active":"",I===E?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:W=>W.preventDefault(),onClick:()=>O(M),onMouseEnter:()=>A(I),disabled:M.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:M.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),M.label]},M.value))}):null;return n.jsxs("div",{ref:y,className:we("dropdown",`dropdown--s${m}`,g?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:z,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?b:void 0,"aria-activedescendant":g&&E>=0?`${b}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&j?_:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:S,onBlur:M=>{g&&!k.current?.contains(M.relatedTarget)&&w(!1)},children:[n.jsx("span",{id:_,className:`dropdown__trigger-label body-2${j?"":" dropdown__trigger-label--placeholder"}`,children:j?j.label:v}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&bn.createPortal(G,y.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const r4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ac(e){return e?r4[e]??null:null}function Nc(e){switch(Ac(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Ec(e,t){const r=Ac(e);return r?t(`device.type.${r}`,{defaultValue:e??""}):e??""}const Sr=e=>e==null?"":String(e).trim();function vs(e,t,r,a){const s=Sr(e),l=Sr(t),i=Sr(r);if(a&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Si(c,a);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function a4(e,t,r){const a=Sr(e);return a?`${a}-${Sr(t).padStart(2,"0")}-${Sr(r).padStart(2,"0")}`:""}function jc(e){return typeof e=="string"?e:e.label}function Dc({value:e,onChange:t,suggestions:r,openOnFocus:a=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),f=o.useMemo(()=>{if(!r.length)return[];const D=e??"";return s===!1?r:D?typeof s=="function"?s(r,D):r.filter(j=>jc(j).toLowerCase().includes(D.toLowerCase())):a?r:[]},[r,e,a,s]),[v,b]=o.useState(!1),_=o.useRef([]),y=v&&f.length===0?_.current:f;o.useEffect(()=>{y.length&&(_.current=y)},[y]);const x=o.useCallback(()=>b(!0),[]),g=o.useCallback(()=>b(!1),[]),w=i?0:-1;o.useEffect(()=>{c||d(w)},[c,w]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<y.length?h:w<y.length?w:-1,C=o.useCallback(D=>{l?l(D):t?.(jc(D)),p(!1)},[t,l]),B=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(w)},[w]),E=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(D=>{D.nativeEvent.isComposing||D.keyCode===229||(D.key==="ArrowDown"?(D.preventDefault(),p(!0),d(j=>Math.min(y.length-1,(j<y.length?j:w)+1))):D.key==="ArrowUp"?(D.preventDefault(),d(j=>Math.max(w,(j<y.length?j:y.length)-1))):D.key==="Enter"?N>=0&&C(y[N]):D.key==="Escape"&&c&&(D.preventDefault(),p(!1)))},[y,N,c,C,w]);return{listId:u,open:c,activeIdx:N,filtered:y,handleFocus:B,handleBlur:E,handleInput:k,handleKeyDown:A,handleSelect:C,handleCompositionStart:x,handleCompositionEnd:g}}const ma=typeof window<"u"?o.useLayoutEffect:o.useEffect;function qn(e){const{value:t,defaultValue:r,name:a,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:f="text",disabled:v=!1,readOnly:b=!1,error:_,status:y,helperText:x,maxLength:g,size:w,variant:N="input",fullWidth:C=!1,newline:B=!1,multiline:k=!1,rows:E=3,leftIcon:A,rightIcon:D,clearable:j=!1,list:S,showCount:O=!0,className:z="",onFocus:G,onBlur:M,onKeyDown:I,onEnter:W,inputMode:pe,autoComplete:se,autoCapitalize:$,autoCorrect:V,revealable:ne=!1,autoFocus:te,suggestions:P,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:U,openOnFocus:Z=!1}=e,X=kn(),ae=w??X??gn,Y=b||v?void 0:P,{t:xe}=Ee.useTranslation(),ie=o.useId();!i&&!u&&kt(`TextField:unnamed:${ie}`,"[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 J=`tf-${ie}`,F=`tf-helper-${ie}`,Q=o.useRef(null),H=Dc({value:t??"",onChange:l,suggestions:Y??[],openOnFocus:Z,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:U}),le=!!Y&&H.open&&H.filtered.length>0,re=o.useRef(null),[de,Be]=o.useState(null),ke=o.useCallback(()=>{const De=re.current;if(!De||typeof window>"u")return;const rt=De.getBoundingClientRect(),it=window.innerHeight,bt=8,Nt=230,It=typeof document<"u"?document.getElementById(H.listId):null,ft=Math.min(Nt,Math.max(It?.offsetHeight||0,It?.scrollHeight||0)||Nt),mt=it-rt.bottom,At=rt.top,Et=mt<ft+bt&&At>mt,Je=(wt,ue)=>Math.min(Math.max(bt,wt),Math.max(bt,ue));Be({position:"fixed",left:rt.left,width:rt.width,...Et?{bottom:Je(it-rt.top+bt,it-ft-bt)}:{top:Je(rt.bottom+bt,it-ft-bt)},zIndex:sa(De)})},[H.listId]);ma(()=>{if(!le)return;ke();let De=null;const rt=()=>{if(typeof requestAnimationFrame>"u"){ke();return}De===null&&(De=requestAnimationFrame(()=>{De=null,ke()}))},it=bt=>{const Nt=bt.target;Nt&&Nt.nodeType===1&&Nt.closest?.(".text-field__suggestions")||rt()};return window.addEventListener("scroll",it,!0),window.addEventListener("resize",rt),()=>{De!==null&&cancelAnimationFrame(De),window.removeEventListener("scroll",it,!0),window.removeEventListener("resize",rt)}},[le,ke,H.filtered.length]);const Ne=o.useCallback(De=>{Q.current=De,typeof s=="function"?s(De):s&&(s.current=De)},[s]),Re=d?`${d}${m??xe("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,ye=f==="email"||f==="tel"||f==="password"||f==="url"||se==="username"||se==="email"||se==="one-time-code",_e=$??(ye?"none":void 0),Ae=V??(ye?"off":void 0),Oe=ne&&f==="password"&&!B&&!k,[je,tt]=o.useState(!1),Ct=Oe&&je?"text":f,Ie=t!==void 0,qe=Ie&&f==="password",[nt,We]=o.useState((r??"").length),Ze=Ie?(t??"").length:nt,ot=o.useRef(t);ma(()=>{ot.current=t}),o.useEffect(()=>{const De=Q.current;if(!qe||!De)return;const rt=t??"";De.value!==rt&&(De.value=rt)},[qe,t]),o.useEffect(()=>{if(!B||!Q.current)return;const De=Q.current;De.style.height="",De.scrollHeight>De.clientHeight&&(De.style.height=`${De.scrollHeight}px`)},[t,nt,B]);const gt=g!=null&&Ze>g,ht=ae===32?16:20,xt=we("text-field",`text-field--s${ae}`,N==="display"?"text-field--display":"",C?"text-field--full-width":"",v?"text-field--disabled":"",b?"text-field--readonly":"",_?"text-field--error":"",y?`text-field--status-${y}`:"",A?"text-field--has-left-icon":"",D||j||Oe?"text-field--has-right-icon":"",z),ut={id:J,...qe?{}:Ie?{value:t}:{defaultValue:r},ref:Ne,placeholder:Re,name:a,disabled:v,readOnly:b,autoFocus:te,maxLength:g,list:S,inputMode:pe,autoComplete:se,autoCapitalize:_e,autoCorrect:Ae,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!_||y==="error","aria-describedby":[x||_?F:null,c].filter(Boolean).join(" ")||void 0,role:Y?"combobox":void 0,"aria-autocomplete":Y?"list":void 0,"aria-haspopup":Y?"listbox":void 0,"aria-expanded":Y?le:void 0,"aria-controls":le?H.listId:void 0,"aria-activedescendant":le&&H.activeIdx>=0?`${H.listId}-option-${H.activeIdx}`:void 0,onChange:De=>{const rt=De.target;Ie||We(rt.value.length),l?.(rt.value),Y&&H.handleInput(),qe&&queueMicrotask(()=>{const it=ot.current??"";rt.value!==it&&(rt.value=it)})},onCompositionStart:Y?H.handleCompositionStart:void 0,onCompositionEnd:Y?H.handleCompositionEnd:void 0,onFocus:(De=>{G?.(De),Y&&H.handleFocus()}),onBlur:(De=>{M?.(De),Y&&H.handleBlur()}),onKeyDown:(De=>{const rt=(De.key==="Tab"&&!De.shiftKey||De.key===" ")&&!De.nativeEvent.isComposing;if(d&&rt&&!b&&!v&&!(De.currentTarget.value??"").trim()){De.preventDefault();const it=De.currentTarget;Ie||(it.value=d,We(d.length)),l?.(d);return}Y&&De.key==="Enter"&&!De.nativeEvent.isComposing&&H.activeIdx>=0?De.preventDefault():W&&De.key==="Enter"&&!De.nativeEvent.isComposing&&(De.preventDefault(),W()),I?.(De),Y&&H.handleKeyDown(De)})},Gt=j&&!v&&!b&&Ze>0,_t=()=>B?n.jsx("textarea",{...ut,className:"text-field__input text-field__input--auto body-2",rows:1}):k?n.jsx("textarea",{...ut,className:"text-field__input text-field__input--textarea body-2",rows:E}):n.jsx("input",{...ut,type:Ct,className:"text-field__input body-2"}),Pt=N==="display"&&!B&&!k&&!!Re,Qe=()=>n.jsxs(n.Fragment,{children:[_t(),Pt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:Re})]});return n.jsxs("div",{ref:re,className:xt,children:[i&&n.jsxs("label",{htmlFor:J,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[A&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:ht})}),Qe(),g!=null&&O&&n.jsxs("span",{className:`text-field__count caption-2${gt?" text-field__count--over":""}`,children:[Ze,"/",g]}),Gt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:xe("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:De=>{De.preventDefault()},onClick:()=>{!Ie&&Q.current&&(Q.current.value="",We(0)),l?.("")},tabIndex:-1}),Oe&&n.jsx(fe,{size:24,type:"dot",icon:je?"eye-off":"eye",variant:"transparent-gray",useBorder:!1,className:"text-field__reveal",ariaLabel:xe("textField.showPassword","\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"),"aria-pressed":je,htmlType:"button",disabled:v,onMouseDown:De=>{De.preventDefault()},onClick:()=>tt(De=>!De)}),D&&!Gt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:ht})})]}),!!Y&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:H.open&&(t??"").length>0&&H.filtered.length===0?xe("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),le&&(typeof document>"u"?null:bn.createPortal(n.jsx("ul",{id:H.listId,className:"text-field__suggestions",role:"listbox",style:de??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:H.filtered.map((De,rt)=>n.jsx("li",{id:`${H.listId}-option-${rt}`,role:"option","aria-selected":rt===H.activeIdx,className:`text-field__suggestion body-2${rt===H.activeIdx?" is-active":""}`,onMouseDown:it=>it.preventDefault(),onClick:()=>{H.handleSelect(De),Q.current?.focus()},children:typeof De=="string"?De:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:De.label}),De.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:De.hint})]})},typeof De=="string"?`${De}-${rt}`:De.id))}),document.body)),(x||_)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:F,className:"text-field__helper caption-1",role:_?"alert":void 0,children:_||x})})]})}const Sc=()=>{};function cn(e){const t=o.useId(),r=kn()??gn;if(!("variant"in e)){const{label:g,sub:w,onClick:N,children:C,align:B="horizontal",icon:k,useFullWidth:E=!1,required:A=!1}=e,D=j=>{N&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),N())};return n.jsxs("div",{className:we("panel-row",B==="vertical"?"panel-row--vertical":"",E?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?D:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[k!=null&&n.jsx("div",{className:"panel-row__icon",children:k}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsxs("div",{className:"panel-row__label body-3",children:[g,A&&n.jsx("span",{className:"required-mark",children:"*"})]}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(Nr,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:s,sub:l,onClick:i,required:u,error:c,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,m=a==="button"?void 0:i;let f=null;const v=a==="toggle"?`panel-toggle-${t}`:void 0,b=c?`panel-error-${t}`:void 0,_=`panel-helper-${t}`;if(a==="toggle"){const g=e;f=n.jsx(kc,{checked:g.checked,onChange:g.onChange,id:v})}else if(a==="segmented"){const g=e;f=n.jsx(An,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??r,ariaLabel:s})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((N,C)=>n.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:n.jsx(Nn,{options:N.options,value:N.value,onChange:N.onChange,size:r,placeholder:N.placeholder,block:h,error:!!c,ariaDescribedBy:b,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},C))}):n.jsx(Nn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Sc,size:r,block:h,error:!!c,ariaLabel:s,ariaDescribedBy:b});f=c?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:b,className:"caption-1 panel-row__error",role:"alert",children:c})]}):w}else if(a==="button"){const g=e;g.buttons?.length?f=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,N)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??r,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},N))}):f=n.jsx(fe,{htmlType:"button",size:g.btnSize??r,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${h?" 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${h?" panel-row__input-wrap--full":""}`,children:[n.jsx(qn,{size:r,value:g.value,onChange:g.onChange??Sc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,revealable:g.revealable,autoCapitalize:g.autoCapitalize,autoCorrect:g.autoCorrect,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:h,error:c,ariaLabel:s,required:u,ariaDescribedBy:g.helperText?_:void 0}),g.helperText&&n.jsx("div",{id:_,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(f=e.children);c&&a!=="input"&&a!=="dropdown"&&(f=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[f,n.jsx("span",{id:b,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const y=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&h,x=g=>{m&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())};return n.jsxs("div",{className:we("panel-row",p==="vertical"?"panel-row--vertical":"",y?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",m?"panel-row--clickable":""),onClick:m,onKeyDown:m?x:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,children:[d!=null&&n.jsx("div",{className:"panel-row__icon",children:d}),n.jsxs("div",{className:"panel-row__left",children:[v?n.jsxs("label",{htmlFor:v,className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}function Tc(e){const t=e.productName||e.brand,r=[e.brand,e.fitType].filter(a=>!!a&&a!==t);return[...new Set(r)].join(" \xB7 ")}function o4({devices:e,onRelease:t,emptyLabel:r}){const{t:a,i18n:s}=Ee.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?a("device.direction.left","\uC88C"):a("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(rn,{size:"small",variant:Nc(i.device),fill:"soft",label:Ec(i.device,a)}),Tc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Tc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),vs(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:a("customers.device.wornSince",{date:vs(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:r??a("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Tr({title:e,titleLevel:t=2,icon:r,disc:a,actions:s,minHeight:l,maxWidth:i,className:u,scrollable:c,scrollbarGutter:p="stable",compactRows:h=!1,useBorder:d=!0,useBg:m=!0,labelWidth:f,form:v=!1,loading:b,empty:_,children:y}){const x=we("panel",v?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",m?"":"panel--no-bg",h?"panel--compact-rows":"",u),g={};l!==void 0&&(g.minHeight=l),i!==void 0&&(g.maxWidth=typeof i=="number"?`${i}px`:i),f!==void 0&&(g["--panel-label-width"]=typeof f=="number"?`${f}px`:f);const w=t?`h${t}`:"div",N=d?gn:48;return n.jsx(ns.Provider,{value:N,children:n.jsxs("div",{className:x,style:Object.keys(g).length?g:void 0,children:[(!!e||a!=null)&&n.jsxs("div",{className:we("panel__header",a!=null?"panel__header--with-disc":""),children:[r&&n.jsx(lt,{icon:r,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(w,{className:`panel__title ${a!=null?"body-3b":"h5b"}`,children:e}),a!=null&&n.jsx("p",{className:"panel__disc caption-1",children:a})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),b?n.jsx(cn,{variant:"loading"}):_!=null&&o.Children.toArray(y).length===0?n.jsx(cn,{variant:"empty",children:_}):c?n.jsx("div",{className:we("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:y}):y]})})}function s4({cols:e=2,layout:t="grid",gap:r=1,collapseAt:a,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(a===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([f])=>p(f.contentRect.width));return m.observe(d),()=>m.disconnect()},[a]);const h=a!==void 0&&c!==void 0&&c<=a;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof r=="number"?`${r}px`:r,...l},children:i})}function Ya(e){const{title:t,subtitle:r,message:a,topContent:s,details:l,children:i,confirmLabel:u,cancelLabel:c,hideCancel:p=!1,extraAction:h,confirmVariant:d="main",confirmDisabled:m=!1,onConfirm:f,closeOnConfirm:v=!0,onClose:b,inline:_,width:y,size:x,className:g,initialFocus:w="close"}=e,{t:N}=Ee.useTranslation(),C=o.useRef(null);o.useEffect(()=>{if(_||w==="close")return;const j=C.current?.closest(".popup-panel"),S=Array.from(j?.querySelectorAll(".popup-footer--buttons button")??[]),O=h&&(h.placement??"start")==="start"?1:0,z=w==="confirm"?S[S.length-1]:p?void 0:S[O];z&&!z.disabled&&z.focus()},[]);const B=o.useRef(!1),[k,E]=o.useState(!1),A=j=>{let S=!1;return{close:()=>{S=!0,j()},didClose:()=>S}},D=async j=>{if(B.current)return;B.current=!0;const S=typeof document<"u"?document.activeElement:null;E(!0);let O=!1;try{O=await j()}catch(z){typeof console<"u"&&console.error(z)}finally{O||(B.current=!1,E(!1),requestAnimationFrame(()=>{const z=document.activeElement;(!z||z===document.body)&&S?.isConnected&&S.focus()}))}};return n.jsxs(Vn,{title:t,subtitle:r,onClose:b,closeDisabled:k,inline:_,width:y??x??"small",className:we("confirm-popup",s!=null&&"confirm-popup--has-top",g),buttons:(()=>{const j=[...h?[{label:h.label,variant:h.variant??"default",disabled:h.disabled||k,onClick:async({closeWithAnimation:z})=>{await D(async()=>{const G=A(z);await h.onClick(G.close);const M=h.closeOnClick??!0;return M&&z(),M||G.didClose()})}}]:[]],S=[...p?[]:[{label:c??N("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:k,onClick:({closeWithAnimation:z})=>z()}]],O={label:u??N("common.confirm","\uD655\uC778"),variant:d,disabled:m||k,onClick:async({closeWithAnimation:z})=>{await D(async()=>{const G=A(z);return await f(G.close),v&&z(),v||G.didClose()})}};return(h?.placement??"start")==="beforeConfirm"?[...S,...j,O]:[...j,...S,O]})(),children:[s!=null&&n.jsx("div",{className:"confirm-popup__top",children:s}),l&&l.length>0&&n.jsx(Tr,{children:l.map((j,S)=>n.jsx(cn,{label:j.label,children:n.jsx("span",{className:"panel-row__text body-2",children:j.value})},S))}),n.jsx("p",{ref:C,className:"body-2 confirm-popup__message",hidden:a==null,children:a}),i]})}function l4({value:e,onChange:t,canAdd:r,error:a,onAdd:s,onClose:l,maxLength:i}){const{t:u}=Ee.useTranslation(),c=u("folder.add.placeholder","\uD3F4\uB354 \uC774\uB984");return n.jsx(Ya,{title:u("folder.add.title","\uD3F4\uB354 \uCD94\uAC00"),subtitle:u("folder.add.sub","\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),confirmLabel:u("common.add","\uCD94\uAC00"),confirmDisabled:!r,closeOnConfirm:!1,onConfirm:p=>s(p),onClose:l,children:n.jsx(Tr,{useBorder:!1,children:n.jsx(cn,{useFullWidth:!0,children:n.jsx(qn,{autoFocus:!0,value:e,onChange:t,placeholder:c,ariaLabel:c,maxLength:i,fullWidth:!0,error:a,onEnter:()=>{r&&s(l)}})})})})}function i4({path:e,title:t,message:r,onConfirm:a,onClose:s}){const{t:l}=Ee.useTranslation(),i=Qr(e);return n.jsx(Ya,{title:t(i),message:r(i),confirmLabel:l("common.delete","\uC0AD\uC81C"),confirmVariant:"danger",onConfirm:()=>a(e),onClose:s})}function Mc({title:e,count:t,titleLevel:r=3,actions:a,empty:s=!1,emptyContent:l,spread:i=!1,className:u,children:c}){const p=`h${r}`;return n.jsxs("section",{className:we("card-section",u),children:[e!=null&&n.jsxs("header",{className:"card-section__head",children:[n.jsx(p,{className:"card-section__title h5b",children:e}),t!=null&&n.jsx("span",{className:"card-section__count body-3b",children:t}),a!=null&&n.jsx("span",{className:"card-section__actions",children:a})]}),s?n.jsx("div",{className:"card-section__empty body-3",children:l}):n.jsx("div",{className:we("card-section__list",i&&"card-section__list--spread"),children:c})]})}function u4({bundles:e,noneKey:t,noneLabel:r,titleLevel:a=2,rowRender:s}){return n.jsx(n.Fragment,{children:e.filter(([,l])=>l.length>0).map(([l,i])=>n.jsx(Mc,{titleLevel:a,title:l===t?r:l.split("/").join(" \u203A "),count:i.length,children:i.map((u,c)=>s(u,c))},l))})}const $c=160;function c4({children:e,top:t,bottom:r,mode:a="top",contentFull:s=!1,closing:l=!1,onClose:i,backClosable:u=!0,beforeClose:c,className:p,"aria-label":h}){Wu(!!i&&u&&!l,()=>{if(c&&c()===!1)return!1;i?.()});const d=o.useRef(null),m=o.useRef(typeof document>"u"?null:document.activeElement);return o.useEffect(()=>{const f=m.current,v=d.current;return v&&!v.contains(document.activeElement)&&(v.querySelector(Sn)??v).focus(),()=>{f?.focus?.()}},[]),Ra(d),n.jsx("div",{className:we("page-popup",l&&"page-popup--closing",p),role:"dialog","aria-modal":"true","aria-label":h,children:n.jsxs("div",{className:"page-popup__panel",ref:d,tabIndex:-1,children:[t&&n.jsx("div",{className:"page-popup__top",children:t}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:we("page-popup__content",a==="center"?"page-popup__content--center":"page-popup__content--top",s&&"page-popup__content--full"),children:e})}),r&&n.jsx("div",{className:"page-popup__bottom",children:r})]})})}function d4(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(null),l=o.useCallback(()=>{a.current||(a.current=!0,r(!0),s.current=setTimeout(()=>{s.current=null;try{e()}catch(i){a.current=!1,r(!1),console.error(i)}},nv()?0:$c))},[e]);return o.useEffect(()=>wc(),[]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{closing:t,handleClose:l}}function Za(e){return String(e)}const Xa=["o","triangle","x"];function Lc(e,t){return e===t?null:t}const xs={o:"circle",triangle:"triangle",x:"x"},_s={o:"main",triangle:"warn",x:"danger"},p4=24,h4=2,ws=3.5,m4=.8;function f4(e){if(!(e>0))return ws;const t=m4*p4/e;return Math.min(ws,Math.max(h4,t))}function C4(e){let t=0,r=0,a=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?r++:l==="x"&&a++;const s=t+r+a;return{marked:s,o:t,triangle:r,x:a,rate:s===0?null:(t+r*.5)/s}}function Bs(e){const t={};for(const[r,a]of Object.entries(e))(a==="o"||a==="triangle"||a==="x")&&(t[r]=a);return t}function Rc(e){const t=[];let r=0;for(const a of e)t.push(r),r+=a;return t}function g4(e,t){return!t&&e>0}function Pc({mark:e,label:t}){return n.jsx("span",{className:"mark-icon",...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:n.jsx(Mn,{size:24,position:"inline",className:`mark-icon__badge mark-icon__badge--${_s[e]}`,children:n.jsx(lt,{icon:xs[e],size:14})})})}function b4({o:e,triangle:t,x:r,label:a,className:s}){const l=[["o",e],["triangle",t],["x",r]];return n.jsx("span",{className:we("score-mark-counts",s),children:l.map(([i,u])=>n.jsxs("span",{className:"score-mark-counts__one",children:[n.jsx(Pc,{mark:i,label:a?a(i,u):""}),n.jsx("span",{className:"score-mark-counts__num",children:u})]},i))})}function y4({children:e}){return Pv(!0),n.jsx(n.Fragment,{children:e})}var v4=Object.defineProperty,x4=(e,t,r)=>t in e?v4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fc=(e,t,r)=>x4(e,typeof t!="symbol"?t+"":t,r);let _4=class extends o.Component{constructor(){super(...arguments),Fc(this,"state",{hasError:!1}),Fc(this,"releaseHealth")}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r),console.error(t,"[ErrorBoundary]",r.componentStack)}componentDidMount(){this.releaseHealth=this.props.registerHealth?.(()=>this.state.hasError)}componentWillUnmount(){this.releaseHealth?.()}componentDidUpdate(t){if(!this.state.hasError)return;const r=t.resetKeys,a=this.props.resetKeys;!r||!a||(r.length!==a.length||r.some((s,l)=>!Object.is(s,a[l])))&&this.setState({hasError:!1,error:void 0})}render(){if(!this.state.hasError)return this.props.children;const t=this.state.error;return this.props.fallback?.({error:t,retry:()=>this.setState({hasError:!1,error:void 0}),reload:this.props.reload??(()=>{window.location.reload()}),staleChunk:O2(t)})??null}};const w4={small:14,medium:20,large:28};function B4({value:e,onChange:t,max:r=5,readOnly:a=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Ee.useTranslation(),c=a||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,f=w4[s],v=C=>{C!==e&&t?.(C)},b=C=>{c||v(C)},_=C=>{c||ur()||h(C)},y=o.useRef(null),x=C=>{const B=Math.min(r,Math.max(1,C));v(B),Array.from(y.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(B))?.focus()},g=C=>{if(!c){switch(C.key){case"ArrowRight":case"ArrowUp":x((d||0)+1);break;case"ArrowLeft":case"ArrowDown":x((d||1)-1);break;case"Home":x(1);break;case"End":x(r);break;default:return}C.preventDefault()}},w=d>=1&&d<=r?Math.round(d):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:y,onKeyDown:g,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:r}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:C=>{C.pointerType==="touch"&&N()},onPointerCancel:C=>{C.pointerType==="touch"&&N()},children:Array.from({length:r},(C,B)=>{const k=B+1,E=Math.max(0,Math.min(1,m-B)),A=E>0&&E<1,D=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:f,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${E*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:f,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:D},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===w?0:-1,onClick:()=>b(k),onMouseEnter:()=>_(k),children:D},k)})})}const k4=20,A4=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function N4({value:e,onChange:t,palette:r=A4,size:a,className:s="",ariaLabel:l}){const i=kn(),u=a??i??gn,{t:c}=Ee.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:r.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${u}`,style:{backgroundColor:p},onClick:()=>t(p),"aria-pressed":h,"aria-label":h?`${p} ${c("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&n.jsx(lt,{icon:"check",size:k4,className:"color-picker__check"})},p)})})}function Ic({icon:e,label:t,tooltip:r,wrapperStyle:a,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Ee.useTranslation(),p=u==="small",h=we("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[f,v]=o.useState(!1),b=o.useMemo(()=>{const k=a&&typeof a=="object"?{...a}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[a,s,l]),_=r||t,y=i&&!!_,[x,g]=o.useState(null);o.useLayoutEffect(()=>{f&&g(m.current?.getBoundingClientRect()??null)},[f]),o.useEffect(()=>{if(!i&&f)try{v(!1)}catch{}},[i,f]),o.useEffect(()=>{if(!f)return;const k=E=>{const A=m.current;if(!A)return;const D=E.target;D&&!A.contains(D)&&v(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[f]);const w=o.useCallback(()=>{i&&v(!0)},[i]),N=o.useCallback(()=>{i&&v(!1)},[i]),C=o.useCallback(()=>v(!1),[]),B=o.useCallback(k=>{if(k.key==="Escape"){v(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),v(E=>!E))},[]);return n.jsxs("span",{ref:m,className:we("category-icon__wrap",y&&"category-icon__wrap--interactive"),onPointerEnter:w,onPointerLeave:N,onFocus:w,onBlur:N,onKeyDown:B,role:_?"button":void 0,tabIndex:_?0:void 0,"aria-label":typeof _=="string"?c("common.descriptionFor",{name:_,defaultValue:`${_} \uC124\uBA85`}):void 0,"aria-haspopup":!!_,"aria-expanded":f,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:b,size:d}),f&&_&&n.jsx(On,{anchorRect:x,text:typeof _=="string"?_:void 0,offset:8,onClose:C,className:"category-icon__tooltip",ariaLabel:typeof _=="string"?_:void 0})]})}let nr=null;function fa(e){if(nr&&nr!==e)try{nr()}catch{}return nr=e,()=>{nr===e&&(nr=null)}}function Ja(e){if(nr===e){nr=null;try{e()}catch{}}}function Ca(e,t){let r=()=>{};const a=new Promise(u=>{r=u});if(typeof e!="string"||e.trim()===""){kt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),r(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:a}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}r(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:a}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:a}}function E4(e,t){if(!e)return{previewCodes:[],previewBucket:null};const r=e,a=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=r.sentences||r.items||[],l=a(Array.isArray(s)?s:[]);return l.length===0&&(r.contextCode||r.context_code)&&l.push(String(r.contextCode||r.context_code)),{previewCodes:l,previewBucket:null}}function j4(e,t){const[r,a]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,f]=o.useState(!1),v=o.useRef([]),{previewCodes:b,previewBucket:_}=E4(e,t),y=`${b.join(",")}|${_??""}`,x=o.useMemo(()=>i.key===y?i.urls:[],[i,y]);o.useEffect(()=>{if(!b.length)return;let w=!1;return(async()=>{const N=[],C=[];for(const B of b)try{const k=di(B,_);if(!k){N.push("");continue}let E=null;try{E=await pi(k)}catch{}if(!E)try{const A=await hi(k);A&&(E=URL.createObjectURL(A),C.push(E))}catch{}N.push(E??"")}catch{N.push("")}w?C.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}):(v.current.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}),v.current=C,u({key:y,urls:N}))})(),()=>{w=!0}},[b.join(","),_]),o.useEffect(()=>()=>{v.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),v.current=[]},[]);const g=o.useCallback(async w=>{if(w.stopPropagation(),w.preventDefault(),p.current){h.current&&Ja(h.current),p.current=!1;try{c.current?.pause()}catch{}a(!1),l(-1);return}if(!x.filter(Boolean).length)return;let N=null;const C=()=>{p.current=!1,N?.stop()};h.current=C;const B=fa(C);p.current=!0,a(!0);for(let k=0;k<x.length&&p.current;k++){const E=x[k];if(E&&(l(k),N=Ca(E),c.current=N.el,!await N.done))break}B(),h.current===C&&(h.current=null,p.current=!1,a(!1),l(-1))},[x]);return o.useEffect(()=>()=>{h.current&&Ja(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:r,playingIndex:s,previewUrls:x,previewHover:m,setPreviewHover:f,previewBtnRef:d,handlePreview:g}}const D4=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const r=e.sentences||e.items||e.questions||[];return Array.isArray(r)&&r.length>0?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(a=>typeof a=="string"&&a.trim().length>0).map(a=>a.trim()):[]};function ks(e){const{index:t,type:r,trainingData:a,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:f=!1,showTypeLabel:v=!1,onComplete:b,onSelect:_,onMore:y,countLabelOverride:x,size:g="square"}=e||{},{t:w}=Ee.useTranslation(),[N,C]=o.useState(!1),B=o.useRef(null),[k,E]=o.useState(!1);o.useEffect(()=>{B.current?.matches(":hover")&&E(!0)},[]);const{playing:A,playingIndex:D,previewUrls:j,previewHover:S,setPreviewHover:O,previewBtnRef:z,handlePreview:G}=j4(a,r?.key),M=o.useCallback(()=>{_?_():C(!0)},[_]),I=o.useCallback(()=>C(!1),[]),W=o.useCallback(()=>E(!0),[]),pe=o.useCallback(()=>E(!1),[]),se=o.useCallback(()=>O(!0),[O]),$=o.useCallback(()=>O(!1),[O]),[V,ne]=o.useState(null);o.useLayoutEffect(()=>{S&&ne(z.current?.getBoundingClientRect()??null)},[S,z]);const[te,P]=o.useState(null);o.useLayoutEffect(()=>{k&&!N&&d&&P(B.current?.getBoundingClientRect()??null)},[k,N,d]);const L=o.useCallback(We=>{We.target===We.currentTarget&&(We.key==="Enter"||We.key===" ")&&(We.preventDefault(),M())},[M]),R=a||null,U=o.useMemo(()=>{if(!d)return null;const We=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ze=We&&We.length>0?We:D4(R);return Ze&&Ze.length>0?Ze:null},[d,h,R]),Z=o.useCallback(We=>{We.stopPropagation(),m?.()},[m]),X=o.useCallback(We=>We.stopPropagation(),[]),ae=o.useCallback(We=>{typeof b=="function"&&b(We)},[b]),Y=u||(c&&a?.id!=null?c.has(String(a.id)):!1),xe=!Y&&(p!=null&&a?.id!=null?p.has(String(a.id)):!1);Su("speechear.popup.close",I);const ie=Pi(),J=`${r?.label||""} ${t+1}`,F=R?.title||R?.name||J;let Q=r?.icon,H,le="",re="";try{const We=R?.category_0||R?.category_main_code||R?.category_main,Ze=R?.category_1||R?.category_sub_code||R?.category_sub,ot=ie.find(gt=>gt.key===We);ot?.icon&&(Q=ot.icon),!H&&ot?.color&&(H={"--t-item-fg":ot.color}),!H&&R?.iconColor&&(H={"--t-item-fg":R.iconColor}),le=ot?w(`topic.${ot.key}`,{defaultValue:ot.label||""}):"";try{const gt=ot?.subs?.find(ht=>ht.key===Ze);re=gt?w(`topic.sub.${gt.key}`,{defaultValue:gt.label||""}):""}catch{}}catch{}const de=re?`${le} / ${re}`:le||r?.label||F,Be=We=>w("training.countQuestions",{n:We,count:We}),ke=We=>w("training.countSentences",{n:We,count:We});let Ne="";try{const We=vy(r?.key,R);We&&(Ne=We.unit==="sentence"?ke(We.n):Be(We.n))}catch{}const Re=g==="row",ye=g==="list"||Re,_e=g==="compact",Ae=g==="small",Oe=Ae&&r?.key?yy().find(We=>We.key===r.key):void 0,je=Oe?Fi[Oe.key]:void 0,tt=Oe?je?w(`trainingType.${je}.title`,{defaultValue:Oe.label}):Oe.label??"":"",Ct=v&&r?.label&&r.label!==String(F)?String(r.label):Ae&&tt&&tt!==String(F)?tt:"",Ie=!!Ct,qe=x!==void 0?x:Ne,nt=[Ct,typeof F=="string"?F:"",qe].map(We=>String(We??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:B,className:`training-block-button${ye?" training-block-button--list":""}${Re?" training-block-button--row":""}${_e?" training-block-button--compact":""}${Ae?" training-block-button--small":""}${Y?" training-block-button--completed":""}${xe?" training-block-button--selected":""}${Ie&&!Ae?" training-block-button--withType":""}${Ae&&!Ie?" training-block-button--no-type-label":""}`,onClick:M,onPointerEnter:W,onPointerLeave:pe,role:"button",tabIndex:0,onKeyDown:L,"aria-label":typeof s=="string"?s:nt||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
|
|
842
|
+
`):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&r?.label&&r.label!==String(F)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:r.label}),Ae&&tt&&tt!==String(F)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:tt}),n.jsx(Ic,{icon:Q,label:F,tooltip:de,wrapperStyle:H,iconSize:Ae||_e?"small":"medium"}),!f&&(Y||xe)&&!(m&&k)&&n.jsx(Mn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":Y?w("training.completed","\uD6C8\uB828 \uC644\uB8CC"):w("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Mn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":w("common.remove","\uC81C\uAC70"),onClick:Z}),n.jsx("div",{className:`training-block-button__title ${_e?"body-3":Ae?"body-3b":"h3"}`,children:String(F)}),n.jsxs("div",{className:"training-block-button__description",children:[qe?n.jsx("div",{className:`training-block-button__count ${Ae?"caption-2":"caption-1"}`,children:qe}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:w("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:Ae?12:20})})]}),(ye&&!Re||Ae)&&j.length>0&&n.jsx("div",{ref:z,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:X,onPointerEnter:se,onPointerLeave:$,children:n.jsx(fe,{htmlType:"button",size:Ae?28:32,type:"dot",icon:A?"pause":"play",variant:Ae?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(F).trim()?A?w("training.stopFor",{name:F,defaultValue:`${F} \uC815\uC9C0`}):w("training.previewFor",{name:F,defaultValue:`${F} \uBBF8\uB9AC \uB4E3\uAE30`}):A?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:G})})]}),y&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:We=>{We.stopPropagation(),y(We)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(F).trim()?w("common.moreFor",{name:F}):w("common.more","\uB354\uBCF4\uAE30")})})]}),S&&n.jsx(On,{anchorRect:V,text:A?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:$}),k&&!N&&d&&(U?n.jsx(Qn,{anchorRect:te,items:U,activeIndex:D,onClose:pe}):R?.subTitle?n.jsx(On,{anchorRect:te,text:R.subTitle,offset:8,onClose:pe}):null),N&&i&&i({trainingData:R,typeKey:r?.key??"",onClose:I,onComplete:ae,popupTitle:String(F),popupSubTitle:r?.subTitle,depth:l!=null?String(l):void 0,popupIcon:Q,popupIconTooltip:String(de),popupWrapperStyle:H})]})}const Oc=200;function S4(e){return e.itemId?(ky()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function zc({plan:e,groups:t,anchorRect:r,offset:a=12,onClose:s}){const{t:l}=Ee.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Ny(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(S4).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:ce("training-tooltip__box"),children:n.jsx("div",{className:ce("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ce("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ce("training-tooltip__section"),children:[n.jsx("div",{className:ce("training-tooltip__section-header"),children:n.jsx("span",{className:ce("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ce("training-tooltip__items"),children:d.map((f,v)=>n.jsx(ks,{index:v,type:h,trainingData:f,size:"compact",hideCheckBadge:!0},String(f.id??v)))})]},c)])})});return r?n.jsx(sn,{anchorRect:r,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const T4=200;function M4({icon:e,count:t,title:r,plan:a,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!a,d=we("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[f,v]=o.useState(null),b=o.useRef(null),_=o.useRef(null),y=!!(f&&a&&s),x=o.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),_.current&&(clearTimeout(_.current),_.current=null)},[]),g=o.useCallback(()=>{x(),v(null)},[x]),w=o.useCallback(()=>{!s||!a||(x(),b.current=setTimeout(()=>{b.current=null,v(m.current?.getBoundingClientRect()??null)},Oc))},[s,a,x]),N=o.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),!_.current&&(_.current=setTimeout(()=>{_.current=null,v(null)},T4))},[]);return o.useEffect(()=>()=>{x()},[x]),o.useEffect(()=>{(!s||!a)&&g()},[s,a,g]),o.useEffect(()=>{if(!y)return;const C=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),B=k=>{C(k.target)?x():N()};return document.addEventListener("pointerover",B,!0),()=>document.removeEventListener("pointerover",B,!0)},[y,x,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?C=>{g(),u(C)}:void 0,onKeyDown:u?C=>{C.key!=="Enter"&&C.key!==" "||(C.preventDefault(),C.currentTarget.click())}:void 0,onPointerEnter:C=>{C.pointerType==="touch"||C.pointerType==="pen"?g():w()},onMouseEnter:c,onMouseLeave:C=>{N(),p?.(C)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${r} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),f&&a&&n.jsx(zc,{plan:a,anchorRect:f,onClose:g})]})}function $4(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function L4({open:e,onClose:t,ariaLabel:r,title:a,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=Ee.useTranslation(),m=o.useId(),f=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const x=document.activeElement,g=_c(),w=f.current;return es(w,x),w?.focus(),()=>{g();const N=document.activeElement;(!N||N===document.body||w&&w.contains(N))&&ts(x)?.focus?.()}},[e]);const b=o.useRef(v),_=o.useRef(u);o.useEffect(()=>{b.current=v,_.current=u}),o.useEffect(()=>{if(e)return ir(()=>{_.current&&b.current()})},[e]);const y=o.useRef(!1);return Ra(f,e),!e||typeof document>"u"?null:bn.createPortal(n.jsx("div",{className:we("dialog",p),onPointerDown:i?x=>{y.current=x.target===x.currentTarget}:void 0,onMouseDown:x=>{x.target===x.currentTarget&&x.preventDefault()},onClick:i?x=>{const g=y.current;y.current=!1,g&&x.target===x.currentTarget&&v()}:void 0,children:n.jsxs("div",{ref:f,role:"dialog","aria-modal":"true","aria-label":a?void 0:r,"aria-labelledby":a?m:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${l}`,h),onClick:x=>x.stopPropagation(),children:[a?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:a})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:v,children:n.jsx($4,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function R4({columns:e,rows:t,rowKey:r,title:a,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=Ee.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[a||s?n.jsxs("div",{className:"board__head",children:[a?n.jsx("h2",{className:"board__title",children:a}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:we("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(f=>n.jsx("td",{className:we("board__td",`board__cell--${f.align??"left"}`),children:f.render(d,m)},f.key))},r(d,m)))})]})]})}function P4({name:e,role:t,photo:r,media:a,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:a??(r?n.jsx("img",{src:r,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function F4({groups:e,className:t=""}){return n.jsx("div",{className:we("timeline",t),children:e.map(r=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:r.title}),n.jsx("ul",{className:"timeline__rows",children:r.entries.map((a,s)=>n.jsxs("li",{className:"timeline__row",children:[a.label?n.jsx("span",{className:"timeline__label",children:a.label}):null,n.jsx("div",{className:"timeline__items",children:a.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${a.label??""}-${s}`))})]},r.title))})}function I4({title:e,kind:t,body:r,badge:a,badgeSrc:s,footer:l,width:i,className:u=""}){const c=a??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:we("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:r}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function O4({logo:e,alt:t,onDone:r,durationMs:a=3e3}){const s=aa(r);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),a);return()=>clearTimeout(l)},[a,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${a}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function z4({eyebrow:e,eyebrowIndex:t,title:r,description:a,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,r?n.jsx(u,{className:"section-header__title",children:r}):null,a?n.jsx("div",{className:"section-header__description",children:a}):null]})}function W4({items:e,className:t=""}){return n.jsx("ul",{className:we("company-meta",t),children:e.map((r,a)=>n.jsxs("li",{className:"company-meta__item",children:[a>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,r]},r))})}function As({checked:e=!1,onChange:t,disabled:r,indeterminate:a,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!a);return d.current=!!a,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!a)}),n.jsxs("label",{className:we("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",r&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:r,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Wc(e,t){const r=()=>{if(e){const[b,_]=e.split("-");return{y:+b,m:+_-1}}const[f,v]=Sa(t).split("-");return{y:+f,m:+v-1}},[a,s]=o.useState(()=>r().y),[l,i]=o.useState(()=>r().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const f=r();s(f.y),i(f.m)},[e]);const c=o.useRef({y:a,m:l});o.useEffect(()=>{c.current={y:a,m:l}},[a,l]);const p=o.useCallback(f=>{const v=c.current.y*12+c.current.m+f,b=Math.floor(v/12),_=v-b*12;c.current={y:b,m:_},s(b),i(_)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((f,v)=>{c.current={y:f,m:v},s(f),i(v)},[]);return{viewY:a,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function Qa(e,t){return new Date(e,t+1,0).getDate()}function H4(e,t){return new Date(e,t,1).getDay()}function ga(e,t,r){return`${e}-${String(t+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function V4(e){if(!e)return"";const[t,r,a]=e.split("-");return`${t}. ${r}. ${a}.`}function Hc(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const r=+t.slice(0,4),a=+t.slice(4,6),s=+t.slice(6,8);if(a<1||a>12||s<1||s>31)return null;const l=new Date(r,a-1,s);return l.getFullYear()!==r||l.getMonth()!==a-1||l.getDate()!==s?null:ga(r,a-1,s)}const q4=1900;function U4(e,t,r,a,s){const l=a?+a.split("-")[0]:Math.min(q4,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:r(c)});return u}function Vc(e,t,r,a){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;r&&i<r.slice(0,7)||a&&i>a.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function qc({value:e,onChange:t,size:r,min:a,max:s,disabled:l,placeholder:i,className:u,today:c,ariaLabel:p,ariaLabelledBy:h}){const d=kn(),m=r??d??gn;!p&&!h&&kt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:f,i18n:v}=Ee.useTranslation(),b=i??f("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),_=o.useMemo(()=>f("calendar.dow",{returnObjects:!0}),[f]),y=Sa(c),{viewY:x,viewM:g,prevMonth:w,nextMonth:N,setViewYM:C}=Wc(e,c),B=o.useId(),k=o.useCallback((H,le)=>{const re=window.innerHeight,de=window.innerWidth,Be=typeof document<"u"?document.getElementById(B):null,ke=Math.max(Be?.offsetHeight||0,Be?.scrollHeight||0)||300,Ne=Math.max(H.width,Be?.offsetWidth||0,260),Re=re-H.bottom,ye=H.top,_e=Re<ke&&ye>Re,Ae=8,Oe=(je,tt)=>Math.min(Math.max(Ae,je),Math.max(Ae,tt));return{position:"fixed",left:Oe(H.left,de-Ne-Ae),width:H.width,minWidth:260,..._e?{top:"auto",bottom:Oe(re-H.top+6,re-ke-Ae)}:{bottom:"auto",top:Oe(H.bottom+6,re-ke-Ae)},zIndex:sa(le)}},[B]),{open:E,setOpen:A,toggle:D,style:j,triggerRef:S,menuRef:O}=la({computeStyle:k,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const H=O.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(Sn)??H)?.focus?.(),()=>{const le=document.activeElement;(!le||le===document.body)&&S.current?.focus?.()}},[E,O,S]);const[z,G]=o.useState(1),M=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{if(!E)return;const H=e&&e.slice(0,7)===`${x}-${String(g+1).padStart(2,"0")}`?+e.slice(8):y.slice(0,7)===`${x}-${String(g+1).padStart(2,"0")}`?+y.slice(8):1;G(H)},[E]),o.useEffect(()=>{if(I.current==null)return;const H=I.current;I.current=null,M.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{G(H=>Math.min(H,Qa(x,g)))},[x,g]);const W=o.useCallback(H=>{let le=ga(H.getFullYear(),H.getMonth(),H.getDate());a&&le<a&&(le=a),s&&le>s&&(le=s);const[re,de,Be]=le.split("-").map(Number);(re!==x||de-1!==g)&&C(re,de-1),G(Be),I.current=Be},[a,s,x,g,C]),pe=o.useCallback(H=>{const le=new Date(x,g,z),re=Be=>{le.setDate(le.getDate()+Be),W(le)},de=Be=>{const ke=le.getFullYear()*12+le.getMonth()+Be,Ne=Math.floor(ke/12),Re=ke-Ne*12;W(new Date(Ne,Re,Math.min(le.getDate(),Qa(Ne,Re))))};switch(H.key){case"ArrowLeft":re(-1);break;case"ArrowRight":re(1);break;case"ArrowUp":re(-7);break;case"ArrowDown":re(7);break;case"Home":re(-le.getDay());break;case"End":re(6-le.getDay());break;case"PageUp":H.shiftKey?de(-12):de(-1);break;case"PageDown":H.shiftKey?de(12):de(1);break;default:return}H.preventDefault()},[x,g,z,W]),se=o.useCallback(H=>{l||(t(ga(x,g,H)),A(!1))},[x,g,t,A,l]);o.useEffect(()=>{l&&A(!1)},[l,A]);const $=H=>{const le=ga(x,g,H);return!!(a&&le<a||s&&le>s)},V=(()=>{const H=Qa(x,g);if(z>=1&&z<=H&&!$(z))return z;for(let le=1;le<=H;le++)if(!$(le))return le;return-1})(),ne=[];for(let H=0;H<H4(x,g);H++)ne.push(null);for(let H=1;H<=Qa(x,g);H++)ne.push(H);const te=m===64?20:m===32?14:m===40?16:18,P=Ho(v.language),L=H=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(H,0,1)),R=(H,le)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(H,le-1,1)),U=U4(x,+y.slice(0,4),L,a,s),Z=Vc(x,R,a,s),X=H=>{const le=Vc(H,R,a,s);if(le.length===0)return;const re=le.some(de=>+de.value===g+1);C(H,re?g:+le[0].value-1)},[ae,Y]=o.useState(null);o.useEffect(()=>{Y(null)},[e]);const xe=o.useCallback(H=>{Y(H);const le=Hc(H);if(!le||a&&le<a||s&&le>s)return;t(le);const[re,de]=le.split("-");C(+re,+de-1)},[a,s,t,C]),ie=(()=>{if(ae==null||ae.replace(/\D/g,"").length<8)return!1;const H=Hc(ae);return!H||!!a&&H<a||!!s&&H>s})(),J=o.useCallback(()=>{Y(null)},[]),F=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),J(),A(!1)):H.key==="Escape"?(J(),A(!1)):H.key==="ArrowDown"&&!E&&(H.preventDefault(),A(!0))},[J,A,E]),Q=E?bn.createPortal(n.jsxs("div",{ref:O,id:B,className:"date-picker__dropdown",style:j,"data-tooltip-ignore":!0,role:"dialog","aria-label":f("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:w,"aria-label":f("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(jl,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(Nn,{className:"date-picker__nav-dropdown",ariaLabel:f("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:U,value:String(x),onChange:H=>X(+H),size:40}),n.jsx(Nn,{className:"date-picker__nav-dropdown",ariaLabel:f("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:Z,value:String(g+1),onChange:H=>C(x,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":f("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Dl,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:M,onKeyDown:pe,children:[_.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),ne.map((H,le)=>{if(H===null)return n.jsx("div",{},`e${le}`);const re=ga(x,g,H),de=re===e,Be=re===y,ke=$(H),Ne=le%7;return n.jsx("button",{type:"button",disabled:ke,"data-day":H,tabIndex:H===V?0:-1,"aria-current":Be?"date":void 0,onClick:()=>!ke&&se(H),className:we("date-picker__day caption-1",de&&"date-picker__day--selected",Be&&!de&&"date-picker__day--today",ke&&"date-picker__day--disabled",Ne===0&&"date-picker__day--sun",Ne===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${m}`,E&&"date-picker--open",ie&&"date-picker--invalid",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:S,type:"text",className:"date-picker__trigger body-2",value:ae??V4(e),placeholder:b,onChange:H=>xe(H.target.value),onClick:()=>!l&&!E&&D(),onKeyDown:F,onBlur:J,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,"aria-invalid":ie||void 0,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&D(),disabled:l,tabIndex:-1,"aria-label":b,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx(Il,{size:te,className:"date-picker__icon",strokeWidth:1.5})})]}),Q]})}const Uc=["personal","sensitive","marketing"];function G4({takenKinds:e,busy:t,today:r,onClose:a,onSubmit:s,className:l}){const{t:i}=Ee.useTranslation(),[u]=o.useState(()=>Sa(r)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,f]=o.useState("self"),[v,b]=o.useState(u),[_,y]=o.useState(""),x=Uc.filter(w=>!e.includes(w)),g={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Vn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:a,className:l,footer:()=>n.jsx(fe,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:v||null,note:_.trim()||null})}),children:n.jsxs(Tr,{useBorder:!1,labelWidth:96,children:[n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[x.map(w=>n.jsx(As,{checked:c.includes(w),disabled:t,label:g[w],onChange:N=>p(C=>N?[...C,w]:C.filter(B=>B!==w))},w)),x.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(An,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:w=>d(String(w))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(An,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:w=>f(String(w))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(qc,{size:48,value:v,max:u,today:r,onChange:w=>b(w??"")})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(qn,{size:48,fullWidth:!0,value:_,onChange:y,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function Ns({page:e,totalPages:t,onChange:r,prevLabel:a,nextLabel:s,className:l=""}){const{t:i}=Ee.useTranslation(),u=a??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>r(Math.max(1,Math.min(p,e-1))),d=()=>r(Math.min(p,e+1));return n.jsxs("div",{className:we("pagination",l),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function Es({count:e,search:t,segment:r,filters:a,pageSize:s,pagination:l,actions:i,className:u}){const c=kn()??gn,{t:p}=Ee.useTranslation(),h=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(t||a?.length||s||l||i);return n.jsxs("div",{className:we("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[h,r&&(Array.isArray(r)?r:[r]).map((m,f)=>n.jsx(An,{size:c,...m},m.ariaLabel??f))]}),d&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(qn,{className:"toolbar__search",size:c,value:t.value,onChange:t.onChange,placeholder:t.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),a?.map((m,f)=>n.jsx(Nn,{size:c,options:m.options,value:m.value,onChange:m.onChange,ariaLabel:m.ariaLabel},f)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(Nn,{size:c,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Ns,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Gc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Gc).join(""):""}function K4(e){let t=e.replace(/\r\n/g,`
|
|
843
843
|
`).replace(/\r/g,`
|
|
844
844
|
`);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const r=t.split(`
|
|
845
845
|
`).map(l=>l.replace(/\t/g," ")),a=r.filter(l=>l.trim().length>0),s=a.length>0?Math.min(...a.map(l=>l.match(/^ */)?.[0].length??0)):0;return r.map(l=>l.slice(s)).join(`
|
|
846
846
|
`)}const Y4=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Z4=/^(?: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 X4(e,t){let r=e;const a=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>a.push({type:i,content:u});for(;r.length>0;){const i=r.match(/^\s+/);if(i){l("whitespace",i[0]),r=r.slice(i[0].length);continue}if(!s&&r.startsWith("//")){const v=r.indexOf(`
|
|
847
|
-
`),
|
|
848
|
-
`),y=v===-1?r:r.slice(0,v);l("comment",y),r=r.slice(y.length);continue}const u=r.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),r=r.slice(u[0].length);continue}const c=r.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),r=r.slice(c[0].length);continue}const p=r.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),r=r.slice(p[0].length);continue}const h=r.match(Z4);if(h){l("keyword",h[0]),r=r.slice(h[0].length);continue}const d=r.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const v=d[0];l(s&&Y4.has(v)?"command":"identifier",v),r=r.slice(v.length);continue}const m=r.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),r=r.slice(m[0].length);continue}const f=r.match(/^[()[\]{};.,]/);if(f){l("punctuation",f[0]),r=r.slice(1);continue}l("other",r[0]),r=r.slice(1)}return a}function J4({children:e,language:t="bash",title:r="",showCopy:a=!0,size:s="default",className:l=""}){const{t:i}=Ee.useTranslation(),[u,c]=o.useState(!1),p=K4(Gc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Cy(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=X4(p,t),f=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",s==="small"?"code-box--small":"",l),children:[(r||a)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:r}),a&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((v,y)=>n.jsx("span",{className:`code-token ${v.type} ${f}`,children:v.content},y))})})]})}function Q4({count:e,actions:t,onClear:r,clearLabel:a,visible:s,content:l,max:i}){const u=kn()??gn,{t:c}=Ee.useTranslation(),p=s!==void 0?s:e>0,h=a??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),m=o.useRef(null),f=o.useRef(null),v=o.useRef(p);o.useLayoutEffect(()=>{const g=m.current,w=v.current;if(v.current=p,p&&!w){const N=typeof document<"u"?document.activeElement:null;f.current=N&&N!==document.body&&!g?.contains(N)?N:null}else!p&&w&&g&&g.contains(document.activeElement)&&Ra(g,f.current)},[p]);const[y,x]=o.useState(!1),b=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=d.current;if(!g)return;const w=A=>{b.current=A,x(A)},N=()=>{const A=g.firstElementChild??g,D=Array.from(A.children);if(D.length<2){w(!1);return}const j=D[0].offsetTop,M=D.some(I=>I.offsetTop!==j);if(!b.current){_.current=g.clientWidth,M&&w(!0);return}if(M)return;const W=D[0],z=D[D.length-1],G=z.offsetLeft+z.offsetWidth-W.offsetLeft,T=_.current;(T==null||G<=T)&&w(!1)};if(N(),typeof ResizeObserver>"u")return;const C=new ResizeObserver(N);C.observe(g);const B=g.parentElement;let k=B?.clientWidth??0;const E=new ResizeObserver(()=>{const A=B?.clientWidth??0;A!==k&&(k=A,_.current=null,N())});return B&&E.observe(B),()=>{C.disconnect(),E.disconnect()}},[l,e]),n.jsxs("div",{ref:m,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[n.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(rn,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:u,label:h,onClick:r}),t.map((g,w)=>n.jsx(fe,{htmlType:"button",size:u,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const e_=[{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 t_(e){const{onClose:t,className:r}=e;return n.jsx("div",{className:we("item-actions",r),children:e_.map(({key:a,icon:s,closeFirst:l})=>{const i=e[a];if(!i)return null;const u=a==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},a)})})}function n_({items:e,className:t,ariaLabel:r="\uC54C\uB9BC \uAE00",titleLevel:a=4,targetBytes:s}){const l=a?`h${a}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":r,children:e.map(i=>{const u=s===void 0?_i(i.sms):_i(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${vi}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${vi}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Kc({children:e,className:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useEffect(()=>{s(r.current?.parentElement??null)},[]),o.useEffect(()=>{const l=r.current;if(!l||!a)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?a.style.setProperty("--section-head-float-w",`${c}px`):a.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{a.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(a),()=>{u.disconnect(),a.style.removeProperty("--section-head-float-w")}},[a,e]),n.jsx("div",{ref:r,className:we("section-head-float",t),children:e})}function js({items:e,className:t}){return n.jsx("div",{className:de(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((r,a)=>n.jsxs("span",{className:de("chart-section__legend-item"),children:[n.jsx("span",{className:de("chart-section__legend-dot"),style:{background:r.color}}),r.label]},a))})}const mr=e=>`chart-section__total__num ${e?"h1":"h0"}`;function Mr({label:e,children:t}){return e?n.jsxs("div",{className:de("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:de("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:de("chart-section__total__value"),children:t})]}):n.jsx("div",{className:de("chart-section__total"),children:t})}const Yc=20,Qa=120,r_=120,a_={xSmall:Qa,small:Qa,medium:Qa*2+Yc,large:Qa*2+Yc},Zc={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},ba=e=>{const t=parseFloat(e);return Number.isFinite(t)?t:0};function o_(e){if(!e)return 0;const t=Array.from(e.children);if(!t.length)return 0;const r=ba(getComputedStyle(e).columnGap);return t.reduce((a,s)=>a+s.getBoundingClientRect().width,0)+r*(t.length-1)}function eo({type:e="chart",title:t,titleClassName:r,titleLevel:a,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:f,totalNum:v,totalUnit:y,totalMuted:x=!1,totalLabel:b,change:_,changeType:g,size:w,bodyAlign:N="bottom",subRow:C,legend:B,subRowAlign:k="start",className:E,inGrid:A=!1,fitBody:D=!1,children:j}){const M=e==="stat",W=w??(M?"small":"large"),z=W==="xSmall"&&M,[G,T]=o.useState(!0),I=W==="xSmall"?z&&G?"xSmall":"small":W,O=z&&!G,pe=I==="xSmall",se=I==="xSmall"||I==="small"||I==="medium",$=r??"h5",V=a??(M?0:3),{t:ne}=Ee.useTranslation(),te=o.useRef(null),{anchorRect:P,openAt:L,close:R}=Wa(),U=o.useCallback(()=>{f&&te.current&&L(te.current)},[f,L]),[Z,X]=o.useState(!1);ma(()=>{const Oe=te.current;if(!Oe||!c)return;const qe=We=>X(We>0&&We<h);if(qe(Oe.clientWidth),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(We=>qe(We[0].contentRect.width));return nt.observe(Oe),()=>nt.disconnect()},[c,h]);const[ae,Y]=o.useState(null),xe=o.useCallback(()=>Y(null),[]),ie=o.useCallback(Oe=>{const qe=Oe.currentTarget.getBoundingClientRect();Y(nt=>nt?null:{left:qe.left,right:qe.right,top:qe.top,bottom:qe.bottom,width:qe.width,height:qe.height,x:qe.x,y:qe.y})},[]),J=!!c&&Z;o.useEffect(()=>{J||Y(null)},[J]);const F=c?[...c.options.map((Oe,qe)=>({label:Oe.label,shortcut:Va(qe),icon:Oe.icon,selected:Oe.key===c.value,disabled:Oe.disabled,onClick:()=>c.onChange(Oe.key),closeOnSelect:!0})),...(p??[]).map((Oe,qe)=>qe===0?{...Oe,separatorBefore:!0}:Oe)]:[],Q=o.useCallback(Oe=>{if(!d)return;const qe=Oe.target;qe&&typeof qe.closest=="function"&&qe.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),H=o.useCallback(Oe=>{d&&Oe.target===Oe.currentTarget&&(Oe.key==="Enter"||Oe.key===" ")&&(Oe.preventDefault(),d())},[d]),le=typeof i=="function"?i({collapsed:J}):i,re=v!=null||b?n.jsxs(Mr,{label:b,children:[v!=null&&n.jsx("span",{className:de(mr(se)),children:v}),y&&n.jsx("span",{className:de("chart-section__total__unit body-3"),children:y})]}):null,ue=le||c?n.jsxs("div",{className:de("chart-section__head-right"),children:[c&&(J?n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??ne("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??ne("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!ae,onClick:ie}):n.jsx(An,{size:hr,ariaLabel:c.ariaLabel,options:c.options.map(Oe=>({key:Oe.key,label:Oe.label,disabled:Oe.disabled})),value:c.value,onChange:c.onChange})),le]}):null,Be=o.useRef(null),[ke,Ne]=o.useState(null);o.useLayoutEffect(()=>{const Oe=Be.current;if(!Oe){Ne(null);return}const qe=()=>{const We=Oe.getBoundingClientRect().height;Ne(Ze=>Ze!=null&&Math.abs(Ze-We)<1?Ze:We)};if(qe(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(qe);return nt.observe(Oe),()=>nt.disconnect()},[B]);const Re=o.useId(),ye=V?`h${V}`:"div",_e=typeof I=="number"?I:a_[I],Ae=g??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),Ie=_===void 0?void 0:_>0?`+${_}`:`${_}`,je=o.useRef(null),tt=o.useRef(null);ma(()=>{if(!z)return;const Oe=te.current;if(!Oe||typeof getComputedStyle!="function")return;const qe=()=>{const We=getComputedStyle(Oe),Ze=ba(We.paddingLeft)+ba(We.paddingRight)+ba(We.borderLeftWidth)+ba(We.borderRightWidth),ot=r_-Ze,gt=Math.max(je.current?.getBoundingClientRect().width??0,o_(tt.current));!(ot>0)||!(gt>0)||T(gt<=ot+.5)};if(qe(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(qe);return je.current&&nt.observe(je.current),tt.current&&nt.observe(tt.current),()=>nt.disconnect()},[z,t,v,y,Ie]);const Ct=f&&P?n.jsx(On,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:f}):null;return M?n.jsxs("div",{ref:te,className:de(["chart-section","chart-section--stat",A&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof I=="string"&&Zc[I],O&&"chart-section--span-two",d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:_e===void 0?void 0:{minHeight:_e},onClick:d?Q:void 0,onKeyDown:d?H:void 0,onPointerEnter:f?U:void 0,onPointerLeave:f?R:void 0,onFocus:f?U:void 0,onBlur:f?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,v,Ie].filter(Oe=>Oe!=null&&Oe!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?Re:void 0,children:[Ct,n.jsxs("div",{className:de("chart-section__head"),children:[n.jsx(ye,{id:Re,className:de(["chart-section__title",$].filter(Boolean).join(" ")),children:t}),z&&n.jsx("div",{ref:je,"aria-hidden":"true",className:de(["chart-section__title",$,"chart-section__title--probe"].filter(Boolean).join(" ")),children:t}),s&&!pe&&n.jsx("span",{className:de("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:de("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:tt,className:de("chart-section__sub-row"),children:[n.jsxs(Mr,{children:[n.jsx("span",{className:de([mr(!0),x&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:v}),y&&n.jsx("span",{className:de("chart-section__total__unit body-3"),children:y})]}),Ie&&n.jsx("div",{className:de(`chart-section__change chart-section__change--${Ae??"neutral"} caption-1`),children:Ie})]}),j&&n.jsx("div",{className:de("chart-section__body"),children:j})]})]}):n.jsxs("section",{ref:te,className:de(["chart-section",A&&"chart-section--grid",D&&"chart-section--fit",typeof I=="string"&&Zc[I],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:{..._e===void 0?null:D?{minHeight:_e,height:_e}:{minHeight:_e},...ke==null?null:{"--legend-h":`${ke}px`}},onClick:d?Q:void 0,onKeyDown:d?H:void 0,onPointerEnter:f?U:void 0,onPointerLeave:f?R:void 0,onFocus:f?U:void 0,onBlur:f?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?Re:void 0,children:[f&&P&&n.jsx(On,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:f}),u&&n.jsx(Kc,{children:u}),n.jsxs("div",{className:de("chart-section__head"),children:[n.jsxs("div",{className:de("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:de("chart-section__icon")}),n.jsx(ye,{id:Re,className:de(["chart-section__title",$].filter(Boolean).join(" ")),children:t})]}),ue,l&&n.jsx("div",{className:de("chart-section__disc body-3"),children:l})]}),(re||C)&&n.jsxs("div",{className:de(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[re,C]}),B&&n.jsx("div",{ref:Be,className:de("chart-section__legend-slot"),children:B}),j,ae&&n.jsx(sn,{anchorRect:ae,onClose:xe,ariaLabel:c?.ariaLabel??ne("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:[{items:F}],onClose:xe,size:"small"})})]})}const ya=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Ds=e=>ya(e.getFullYear(),e.getMonth()+1);function $r(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const r=Number(t[2]);return r>=1&&r<=12?{year:Number(t[1]),month1:r}:null}const Ss=(e,t)=>`${e}#${t}`;function Ln(e,t){const r=new Date(e,t,1).getDay();return 1+(8-(r===0?7:r))%7}function s_(){const e=kr();let t=e.getFullYear(),r=e.getMonth(),a=e.getDate();if(a<Ln(t,r)){const i=new Date(t,r,0);t=i.getFullYear(),r=i.getMonth(),a=i.getDate()}const s=Math.floor((a-Ln(t,r))/7),l=ya(t,r+1);return{monthKey:l,value:Ss(l,s)}}function l_(e){const t=kr(),r=Ds(t),a=(c,p)=>ya(c,p+1),s=new Map;s.set(r,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=a(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=$r(c);if(!h)continue;const d=h.year,m=h.month1-1,f=Ln(d,m);if(!(c===r&&t.getDate()<f)&&!p.some(x=>x.date.getDate()<f))continue;const v=new Date(d,m,0),y=a(v.getFullYear(),v.getMonth());s.has(y)||s.set(y,[])}const l=new Map;for(const[c,p]of s){const h=$r(c);if(!h)continue;const d=h.year,m=h.month1-1,f=new Date(d,m+1,0).getDate(),v=p.reduce((w,N)=>Math.max(w,N.parts?.length??0,N.partsB?.length??0),0),y=p.some(w=>w.partsB),x=new Array(f+1).fill(0),b=new Array(f+1).fill(0),_=Array.from({length:f+1},()=>new Array(v).fill(0)),g=Array.from({length:f+1},()=>new Array(v).fill(0));for(const w of p){const N=w.date.getDate();if(x[N]+=w.a,b[N]+=w.b,w.parts)for(let C=0;C<v;C++)_[N][C]+=w.parts[C]??0;if(w.partsB)for(let C=0;C<v;C++)g[N][C]+=w.partsB[C]??0}l.set(c,{year:d,month:m,daysInMonth:f,partsLen:v,hasPartsB:y,dayA:x,dayB:b,dayParts:_,dayPartsB:g})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:f,dayB:v,dayParts:y,dayPartsB:x}=p,b=h===t.getFullYear()&&d===t.getMonth(),_=t.getDate(),g=l.get(a(d===11?h+1:h,(d+1)%12)),w=p.partsLen,N=[];for(let B=1;B<=m;B++){const k=b&&B>_;N.push({label:String(B),...k&&f[B]===0&&v[B]===0?{future:!0}:{},a:k&&f[B]===0&&v[B]===0?-1:f[B],b:v[B],...w?{parts:y[B]}:{},...w&&p.hasPartsB?{partsB:x[B]}:{}})}const C=[];for(let B=Ln(h,d);B<=m;B+=7){const k=Math.max(0,B+6-m),E=k&&g?Math.max(w,g.partsLen):w,A=p.hasPartsB||!!(k&&g?.hasPartsB);let D=0,j=0;const M=new Array(E).fill(0),W=new Array(E).fill(0);for(let G=B;G<=Math.min(B+6,m);G++){D+=f[G],j+=v[G];for(let T=0;T<w;T++)M[T]+=y[G][T],W[T]+=x[G][T]}if(k&&g)for(let G=1;G<=k&&!i(g.year,g.month,G);G++){D+=g.dayA[G],j+=g.dayB[G];for(let T=0;T<g.partsLen;T++)M[T]+=g.dayParts[G][T],W[T]+=g.dayPartsB[G][T]}const z=k?`${(d+1)%12+1}/${k}`:`${B+6}`;C.push({label:`${C.length+1}\uC8FC`,sublabel:`[${B}\uC77C~${z}\uC77C]`,a:D,b:j,...E?{parts:M}:{},...E&&A?{partsB:W}:{}})}u[c]={weekly:C,daily:N}}return u}function Xc(){const e=kr(),t=e.getFullYear(),r=e.getMonth()+1,a=[];for(let s=2024;s<=t;s++){const l=s===t?r:12;for(let i=1;i<=l;i++)a.push({value:ya(s,i),year:s,month:i})}return a.reverse()}Xc();function i_(){return Xc()}function Jc(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=Array.isArray(r)&&typeof r[t]=="string"?r[t]:null;return e("calendar.weekLabel",{ord:a??String(t+1)})}function u_(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=(Array.isArray(r)&&typeof r[t]=="string"?r[t]:null)??String(t+1);return e("calendar.weekLabelCompact",{ord:a,defaultValue:""})||Jc(e,t)}function Qc(e){const{t,i18n:r}=Ee.useTranslation(),[a,s]=o.useState("week"),l=o.useMemo(()=>i_().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const D of l){const j=new Date(D.year,D.month,0).getDate(),M=Ln(D.year,D.month-1),W=Math.ceil((j-M+1)/7);for(let z=W-1;z>=0;z--)A.push({value:Ss(D.value,z),monthKey:D.value,year:D.year,month:D.month,week:z})}return A},[l]),u=o.useCallback((A,D)=>t("calendar.yearMonthCompact",{year:A,month:D,full:Ti(t,r.language,A,D),short:uy(A,D,r.language),defaultValue:"{{full}}"}),[t,r.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${u_(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>s_(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),f=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[v,y]=o.useState(""),[x,b]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===v)||y(m)},[l,v,m]),o.useEffect(()=>{i.find(A=>A.value===x)||b(f)},[i,x,f]);const _=a==="month"?p:h,g=a==="month"?v:x,w=a==="month"?y:b,N=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),C=_.findIndex(A=>A.value===g),B=o.useCallback(()=>{const A=_.findIndex(D=>D.value===g);A<_.length-1&&w(_[A+1].value)},[_,g,w]),k=o.useCallback(()=>{const A=_.findIndex(D=>D.value===g);A>0&&w(_[A-1].value)},[_,g,w]),E=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:a,setPeriod:s,range:g,setRange:w,activeOptions:_,activeIdx:C,handlePrev:B,handleNext:k,periodOptions:E,monthRange:v,weekRange:x,weekRanges:i,DOW:N}}const Ft=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Un(e,t=!0){return e.future===!0||t&&e.a===-1}function c_({data:e,colorA:t,colorB:r,labelA:a,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:f,grouped:v=!1,baseline:y,focusableBars:x=!1}){const b=!r,_=!!(d&&d.length>0),g=y,w=o.useMemo(()=>_?Math.max(0,...e.filter(L=>!Un(L,g==null)).map(L=>v?Math.max(0,...(L.parts??[]).map(Ft)):(L.parts??[]).reduce((R,U)=>R+Math.max(0,Ft(U)),0))):Math.max(0,...e.filter(L=>!Un(L,g==null)).flatMap(L=>b?[Ft(L.a)]:[Ft(L.a),Ft(L.b)])),[e,b,_,v]),N=o.useMemo(()=>{if(g==null)return 0;const L=e.filter(R=>!Un(R,g==null)).flatMap(R=>_?(R.parts??[]).map(Ft):b?[Ft(R.a)]:[Ft(R.a),Ft(R.b)]);return Math.max(0,...L.map(R=>Math.abs(R-g)))},[e,g,_,b]),C=o.useMemo(()=>{const L=g!=null?N:w;return p??(h?L>0?L:10:Math.ceil(L/10)*10||10)},[w,N,g,p,h]),B=o.useRef(null),k=o.useRef(null),[E,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const L=B.current;if(!L)return;const R=()=>{const Z=k.current,X=L.clientHeight-(Z?Z.getBoundingClientRect().height:0);X<=0||A(ae=>ae!=null&&Math.abs(ae-X)<1?ae:X)};if(R(),typeof ResizeObserver>"u")return;const U=new ResizeObserver(R);return U.observe(L),k.current&&U.observe(k.current),()=>U.disconnect()},[c]);const D=E??u,j=_?v?Math.max(1,d.length):1:b?1:2,M={"--bar-width":`${o.useMemo(()=>{const L=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(L*j)+6)))},[e.length,j,l])}px`},W={"--bar-group-gap":`${Math.max(0,i)}px`},z=o.useMemo(()=>{const L=Math.round(C/2);return g!=null?[g+C,...L!==C?[g+L]:[],g,...L!==C?[g-L]:[],g-C]:L!==C?[C,L,0]:[C,0]},[C,g]),G=L=>g!=null?1-(L-(g-C))/(2*C):1-L/C,T=14,I=o.useMemo(()=>{const L=new Set;let R=Number.NEGATIVE_INFINITY;for(const U of z.slice(0,-1)){const Z=(g!=null?1-(U-(g-C))/(2*C):1-U/C)*D;Z-R>=T&&(L.add(U),R=Z)}return L},[z,g,C,D]),[O,pe]=o.useState(null),se=o.useCallback(()=>pe(null),[]),$=o.useCallback((L,R)=>{const U=[L.label,L.sublabel].filter(Boolean).join(" ");let Z;if(_&&v&&L.rawPartsB)Z=(m??[]).map((X,ae)=>{const Y=L.rawPartsB[ae]??0;return{text:Y>0?`${X}: ${R[ae]??0}% (${L.rawParts?.[ae]??0}/${Y})`:`${X}: -`,color:(d??[])[ae]}});else if(_&&v)Z=(m??[]).map((X,ae)=>({text:`${X}: ${te(R[ae]??0)}`,color:(d??[])[ae]}));else if(_){const X=(m??[]).map((Y,xe)=>({text:`${Y}: ${R[xe]??0}`,color:(d??[])[xe]})),ae=X.filter((Y,xe)=>(R[xe]??0)>0);Z=ae.length?ae:X}else f&&!b?Z=[{text:`${a} ${Ft(L.a)}%`,color:t},{text:`${s} ${Ft(L.b)}%`,color:r}]:f&&L.rawB!==void 0?Z=[{text:`${f.total} ${L.rawB}`},{text:`${f.done} ${L.rawA??0}`,color:t}]:b?Z=[{text:`${a}: ${Ft(L.a)}`,color:t}]:Z=[{text:`${a}: ${Ft(L.a)}`,color:t},{text:`${s}: ${Ft(L.b)}`,color:r}];return{title:U,items:Z}},[_,v,m,d,f,b,a,s,t,r,g]),V=o.useCallback((L,R,U)=>{const Z=L.getBoundingClientRect(),{title:X,items:ae}=$(R,U);pe({rect:{left:Z.left,top:Z.top,right:Z.right,bottom:Z.bottom,width:Z.width,height:Z.height},title:X,items:ae})},[$]),ne=o.useCallback((L,R)=>{const{title:U,items:Z}=$(L,R);return[U,...Z.map(X=>X.text)].filter(Boolean).join(", ")},[$]),te=L=>g!=null&&L>g?`+${L}`:`${L}`,P=O!=null;return o.useEffect(()=>{if(!P)return;const L=()=>pe(null),R=U=>{const Z=U.target;Z&&typeof Z.closest=="function"&&Z.closest(".bar-chart__col")||pe(null)};return window.addEventListener("scroll",L,!0),document.addEventListener("pointerdown",R,!0),()=>{window.removeEventListener("scroll",L,!0),document.removeEventListener("pointerdown",R,!0)}},[P]),n.jsxs("div",{ref:B,className:de("bar-chart__wrap"),style:W,children:[n.jsx("div",{className:de("bar-chart__inner"),children:n.jsx("div",{className:de("bar-chart__scroll"),children:n.jsxs("div",{className:de("bar-chart__area"),children:[n.jsxs("div",{className:de("bar-chart__plot"),style:{height:D},children:[z.slice(0,-1).map((L,R)=>n.jsx("div",{className:de(`bar-chart__gridline${g!=null&&L===g?" bar-chart__gridline--baseline":""}`),style:{top:G(L)*D},children:I.has(L)&&n.jsx("span",{className:de("bar-chart__gridline__label caption-1"),children:L})},R)),e.map((L,R)=>{const U=Un(L,g==null),Z=D/2,X=ie=>g!=null?Math.min(Z,Math.abs(Ft(ie)-g)/C*Z):Math.min(D,Math.max(0,Ft(ie)/C*D)),ae=U?0:X(L.a),Y=U?0:X(L.b),xe=(L.parts??[]).map(Ft);return n.jsx("div",{className:de(`bar-chart__col${v&&_?" bar-chart__col--group":""}`),style:{cursor:U?"default":"pointer"},tabIndex:x&&!U?0:void 0,role:x&&!U?"img":void 0,"aria-label":x&&!U?ne(L,xe):void 0,onMouseEnter:U?void 0:ie=>V(ie.currentTarget,L,xe),onFocus:U||!x?void 0:ie=>V(ie.currentTarget,L,xe),onBlur:x?se:void 0,onMouseLeave:se,children:!U&&(_&&v?(d??[]).map((ie,J)=>{const F=xe[J]??0;if(g==null)return n.jsx("div",{className:de("bar-chart__bar"),style:{...M,height:X(F),background:ie}},J);const Q=Ft(F)<g;return n.jsxs("div",{className:de("bar-chart__slot"),style:M,children:[n.jsx("div",{className:de("bar-chart__slot__half bar-chart__slot__half--up"),children:!Q&&n.jsx("div",{className:de("bar-chart__bar bar-chart__bar--full"),style:{height:X(F),background:ie}})}),n.jsx("div",{className:de("bar-chart__slot__half bar-chart__slot__half--down"),children:Q&&n.jsx("div",{className:de("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:X(F),background:ie}})})]},J)}):_?n.jsx("div",{className:de("bar-chart__stack"),style:M,children:(()=>{const ie=xe.reduce((F,Q,H)=>Q>0?H:F,-1);let J=D;return xe.map((F,Q)=>{if(F<=0)return null;const H=Math.min(J,F/C*D);return J-=H,n.jsx("div",{className:de("bar-chart__stack-segment"),style:{height:H,background:(d??[])[Q],borderRadius:Q===ie?"6px 6px 0 0":void 0}},Q)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:Ft(L.a),c:t},...b?[]:[{v:Ft(L.b),c:r}]].map(({v:ie,c:J},F)=>n.jsxs("div",{className:de("bar-chart__slot"),style:M,children:[n.jsx("div",{className:de("bar-chart__slot__half bar-chart__slot__half--up"),children:ie>=g&&n.jsx("div",{className:de("bar-chart__bar bar-chart__bar--full"),style:{height:X(ie),background:J}})}),n.jsx("div",{className:de("bar-chart__slot__half bar-chart__slot__half--down"),children:ie<g&&n.jsx("div",{className:de("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:X(ie),background:J}})})]},F))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:de("bar-chart__bar"),style:{...M,height:ae,background:t}}),!b&&n.jsx("div",{className:de("bar-chart__bar"),style:{...M,height:Y,background:r}})]}))},R)})]}),n.jsx("div",{ref:k,className:de("bar-chart__x-axis"),children:e.map((L,R)=>{const U=Un(L,g==null);return n.jsxs("span",{className:de(`bar-chart__x-axis__label${U?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:de("caption-1 bar-chart__x-axis__main"),children:[L.isToday&&n.jsx("span",{className:de("bar-chart__x-axis__today-dot"),style:{background:t}}),L.label]}),L.sublabel&&n.jsx("span",{className:"caption-1",children:L.sublabel})]},R)})})]})})}),O&&n.jsx(Qn,{anchorRect:O.rect,title:O.title,items:O.items,showIndex:!1,closeOnOutsideClick:!1})]})}function ed({control:e}){const{t}=Ee.useTranslation(),{activeOptions:r,activeIdx:a,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:de("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:a===r.length-1,onClick:i}),n.jsx(Nn,{value:s,onChange:l,options:r,size:hr,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:a<=0,onClick:u}),n.jsx(An,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:f=>h(f),size:hr})]})}function Ts(e,t,r,a=!0){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Ds(u)]?.daily??[])[u.getDate()-1],p=c!=null&&Un(c,a)||u>s;return{dt:u,entry:c,isFuture:p}})}function d_(e,t,r,a=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=kr(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const y=e[l]??{weekly:[],daily:[]},x=$r(l),b=x?x.year:null,_=x?x.month1:null,g=b&&_?Ln(b,_-1):1;return y.weekly.map((w,N)=>{const C=N+1;let B=w.label,k=!1,E=!1;if(b&&_){const A=g+N*7,D=new Date(b,_-1,A+6),j=D.getMonth()+1,M=D.getDate(),W=j===_?`${M}`:`${j}/${M}`;B=r("manager.chart.weekRange",{start:A,end:W});const z=new Date(h,d-1,m).getTime();k=z>=new Date(b,_-1,A).getTime()&&z<=D.getTime(),E=b>h||b===h&&(_>d||_===d&&A>m)}return{...w,label:B,sublabel:Jc(r,C-1),isToday:k,future:w.future===!0||E||void 0,a:E?-1:w.a,b:E?0:w.b}})}const f=u.find(y=>y.value===i);if(!f)return[];const v=new Date(f.year,f.month-1,Ln(f.year,f.month-1)+f.week*7);return Ts(e,v,p,a).map(({dt:y,entry:x,isFuture:b})=>{const _=y.getMonth()+1,g=y.getDate(),w=y.getFullYear();return{label:_===f.month&&w===f.year?`${g}`:`${_}/${g}`,sublabel:c[y.getDay()]??"",future:b||void 0,a:b?-1:x&&x.a>0?x.a:0,b:b?0:x&&x.b>0?x.b:0,isToday:w===h&&_===d&&g===m,...x?.parts?{parts:b?x.parts.map(()=>0):x.parts}:{},...x?.partsB?{partsB:b?x.partsB.map(()=>0):x.partsB}:{}}})}const p_={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function h_({canvasHeight:e,fitHeight:t,focusableBars:r,size:a="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:f,totalLabelKey:v,control:y,hideControls:x=!1,rate:b=!1,rateAgg:_="dayMean",tightMax:g=!1,avgMode:w=!1,totalFormat:N,series:C,seriesMode:B="stack",loading:k=!1,onDetail:E,headExtra:A,headSegment:D,icon:j,disc:M,onClick:W,cardAriaLabel:z,cardTooltip:G,detailSize:T=hr,barGap:I,baseline:O,className:pe,inGrid:se=!1}){const{t:$}=Ee.useTranslation(),V={...p_[a],...e===void 0?null:{height:e}},ne=Qc(u),te=y??ne,P=o.useMemo(()=>d_(u,te,$,O==null),[u,te,$,O]),L=B==="group"&&!!C&&C.length>0;I!=null&&!L&&kt("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 R=o.useMemo(()=>{if(!b)return P;const F=te.period==="month"?$r(te.monthRange):null,Q=kr(),H=C?.length??0,le=re=>{const ue=[],Be=[],ke=[];for(let Ne=0;Ne<H;Ne++){let Re=0,ye=0,_e=0;for(const Ae of re){const Ie=Ft(Ae.a[Ne]),je=Ft(Ae.b[Ne]);je<=0||(Re+=Ie,ye+=je,_e+=Ie/je*100)}ue.push(_==="weighted"?ye>0?Math.round(Re/ye*100):0:re.length?Math.round(_e/re.length):0),Be.push(Re),ke.push(ye)}return{pct:ue,ra:Be,rb:ke}};return P.map((re,ue)=>{let Be=re.a===-1?-1:re.b>0?Math.round(re.a/re.b*100):0;if(F&&!Un(re)){const Ne=F.year,Re=F.month1-1,ye=Ts(u,new Date(Ne,Re,Ln(Ne,Re)+ue*7),Q).filter(_e=>!_e.isFuture);if(_==="weighted"){let _e=0,Ae=0;for(const{entry:Ie}of ye)Ie&&Ie.b>0&&(_e+=Ie.a,Ae+=Ie.b);Be=Ae>0?Math.round(_e/Ae*100):0}else Be=ye.length?Math.round(ye.reduce((_e,{entry:Ae})=>_e+(Ae&&Ae.b>0?Ae.a/Ae.b*100:0),0)/ye.length):0}let ke=null;if(L&&!Un(re)){let Ne;if(F){const ye=F.year,_e=F.month1-1;Ne=Ts(u,new Date(ye,_e,Ln(ye,_e)+ue*7),Q).filter(Ae=>!Ae.isFuture).map(({entry:Ae})=>({a:Ae?.parts??[],b:Ae?.partsB??[]}))}else Ne=[{a:re.parts??[],b:re.partsB??[]}];const Re=le(Ne);ke={parts:Re.pct,rawParts:Re.ra,rawPartsB:Re.rb}}return{...re,a:Be,b:re.a===-1?0:d&&re.parts&&re.parts[1]>0?Math.round(re.parts[0]/re.parts[1]*100):0,rawA:re.a===-1?-1:re.a,rawB:re.b,...ke??{}}})},[P,b,_,d,te.period,te.monthRange,u,L,C?.length]),U=o.useMemo(()=>{if(b||w){const Q=(te.period==="week"?P:u[te.monthRange]?.daily??[]).filter(le=>le.a!==-1);if(Q.length===0)return 0;if(b&&_==="weighted"){let le=0,re=0;for(const ue of Q)ue.b>0&&(le+=ue.a,re+=ue.b);return re>0?Math.round(le/re*100):0}const H=b?Q.reduce((le,re)=>le+(re.b>0?re.a/re.b*100:0),0):Q.reduce((le,re)=>le+(re.a>0?re.a:0),0);return Math.round(H/Q.length)}const F=te.period==="month"?u[te.monthRange]?.daily??[]:R;return O!=null?F.reduce((Q,H)=>Q+(Un(H,!1)?0:Ft(H.a)+(d?Ft(H.b):0)),0):F.reduce((Q,H)=>Q+(H.a>0?H.a:0)+(d&&H.b>0?H.b:0),0)},[R,P,b,_,w,O,d,te.period,te.monthRange,u]),Z=C&&C.length>0?C.map(F=>({color:F.color,label:F.label})):[{color:c,label:$(h)},...d?[{color:p,label:$(d)}]:[]],X=a==="small",ae=a==="large",Y=X?"medium":ae?"xLarge":"large",xe=pe||void 0,ie=l?$(l):"",J=ie?$("trainingStatus.detailFor",{name:ie,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):$("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(eo,{className:xe,size:Y,inGrid:se,icon:j,disc:M,onClick:W,ariaLabel:z,tooltip:G,headSegment:D,headMenuItems:E?[{label:J,icon:"list",shortcut:"D",onClick:E,closeOnSelect:!0}]:void 0,title:$(l),titleLevel:i,headRight:X?A??void 0:({collapsed:F})=>n.jsxs(n.Fragment,{children:[!x&&n.jsx(ed,{control:te}),A,E&&!F&&n.jsx("span",{className:de("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:J,showTooltipInfo:J,onClick:E})})]}),legend:n.jsx(js,{items:Z,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:b||w||v&&N?n.jsx(Mr,{label:X?void 0:`${$(te.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${$(v??h)}`,children:N?(N(U).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((F,Q)=>/\d/.test(F)?n.jsx("span",{className:de(mr(!ae)),children:F},Q):n.jsx("span",{className:de("chart-section__total__unit body-3"),children:F},Q)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:de(mr(!ae)),children:U}),f&&n.jsx("span",{className:de("chart-section__total__unit body-3"),children:$(f)})]})}):n.jsxs(Mr,{children:[n.jsx("span",{className:de(mr(!ae)),children:U}),n.jsx("span",{className:de("chart-section__total__unit body-3"),children:$(h)}),f&&n.jsx("span",{className:de("chart-section__total__unit body-3"),children:$(f)})]})}),children:k?n.jsx("div",{className:de("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:de("bar-chart__inner"),children:n.jsxs("div",{className:de("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:de("bar-chart__plot bar-chart__plot--loading"),style:{height:V.height},children:n.jsx(Nr,{size:32})}),n.jsx("div",{className:de("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:de("bar-chart__x-axis__label"),children:[n.jsx("span",{className:de("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),R.some(F=>!!F.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(c_,{focusableBars:r,data:R,colorA:c,colorB:d?p:void 0,labelA:$(h),labelB:d?$(d):void 0,barWidth:s??V.barWidth,barGap:I,baseline:O,height:V.height,fitHeight:t,maxOverride:b?100:void 0,tightMax:g,seriesColors:C?.map(F=>F.color),seriesLabels:C?.map(F=>F.label),rateLabels:b?{total:$("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:$("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:L})})}const td=120,m_={left:38,right:16,top:26,bottom:24};function f_({points:e=[],range:t,ticks:r=[],axisTitle:a,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[f,v]=o.useState(null);o.useEffect(()=>{if(!f)return;const T=O=>m(Math.round(O)||null);if(T(f.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const I=new ResizeObserver(([O])=>T(O.contentRect.width));return I.observe(f),()=>{I.disconnect()}},[f]);const{payload:y,anchorRect:x,openAfterDelay:b,close:_}=Bv(td),g=o.useCallback((T,I)=>{T&&b(T,I.getBoundingClientRect())},[b]),w=d??i,N=l,{left:C,right:B,top:k,bottom:E}={...m_,...u},[A,D]=t,j=T=>D===A?C:C+(w-C-B)*(T-A)/(D-A),M=T=>k+(N-k-E)*(100-T)/100,W={x:j,y:M,plot:{left:C,right:w-B,top:k,bottom:N-E,width:Math.max(0,w-C-B),height:Math.max(0,N-k-E)}},z=e.filter(T=>!T.hollow),G=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:we("line-chart",h),viewBox:`0 0 ${w} ${N}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[a&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:a}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:C,x2:w-B,y1:M(T),y2:M(T)}),n.jsxs("text",{className:"line-chart__tick",x:C-6,y:M(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(W),r.map(T=>n.jsx("text",{className:"line-chart__tick",x:j(T.x),y:N-5,textAnchor:"middle",children:T.label},T.x)),z.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:G,points:z.map(T=>`${j(T.x)},${M(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:I=>g(T.description,I.currentTarget),onPointerLeave:_,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:j(T.x),cy:M(T.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",T.hollow&&"is-hollow"),cx:j(T.x),cy:M(T.pct),r:4,stroke:G,fill:T.hollow?void 0:G})]},T.x))]}),y!=null&&n.jsx(sn,{anchorRect:x,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:y,children:y})]})}function C_({icon:e,iconSize:t=56,title:r,titleClass:a="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:we("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:we("game-intro__title",a),children:r}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const nd=(e,t,r)=>{const a=new Date(Date.UTC(e,t,r));return`${a.getUTCFullYear()}-${String(a.getUTCMonth()+1).padStart(2,"0")}-${String(a.getUTCDate()).padStart(2,"0")}`},rd=(e,t,r,a)=>({from:Mi(e,t,r),to:new Date(Mi(e,t,r+a).getTime()-1),fromYmd:nd(e,t,r),toYmd:nd(e,t,r+a-1)});function g_(e,t=0){if(e.period==="month"){const s=$r(e.monthRange),l=kr(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return rd(i,u,1,c)}const r=e.weekRanges.find(s=>s.value===e.weekRange);if(!r){const s=new Date,l=ta();return{from:s,to:s,fromYmd:l,toYmd:l}}const a=Ln(r.year,r.month-1);return rd(r.year,r.month-1,a+(r.week+t)*7,7)}const Ms={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function ad(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function od({done:e,total:t,segments:r,color:a="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const p=typeof s=="number"?s:Ms[s].diameter,h=l??(typeof s=="number"?12:Ms[s].strokeWidth),d=p/2,m=(p-h)/2,f=2*Math.PI*m;if(r&&r.length>0){const b=r.reduce((_,g)=>{const w=_.length>0?_[_.length-1].acc:0,N=Number.isFinite(g.ratio)?g.ratio:0,C=Math.max(0,Math.min(N,1-w));return _.push({color:g.color,rotate:-90+w*360,dash:f*C,acc:w+C}),_},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),b.map((_,g)=>_.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:_.color,strokeWidth:h,strokeDasharray:`${_.dash} ${f}`,strokeLinecap:"round",transform:`rotate(${_.rotate} ${d} ${d})`},g))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,y=f*v,x=f-y;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:a,strokeWidth:h,strokeDasharray:`${y} ${x}`,strokeLinecap:v<.02||v>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:ad(v)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function b_({titleKey:e,titleLevel:t,headRight:r,icon:a,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...f}){const{t:v}=Ee.useTranslation();if(!e)return n.jsx(od,{...f});const y=(f.total??0)>0?ad(Math.min((f.done??0)/f.total,1)):0,x=f.size==="small",b=typeof f.size=="number"?f.size:Ms[f.size??"medium"].diameter,_=f.size==="large",g=x?"medium":_?"xLarge":"large",w=c||void 0,N=a&&n.jsx("span",{className:de("chart-section__head-icon"),children:n.jsx(lt,{icon:a,className:de("chart-section__head-icon-inner")})});return n.jsx(eo,{className:w,size:g,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:v(e),titleLevel:t,headRight:N||(x?void 0:r),legend:i&&n.jsx(js,{items:i}),subRow:s&&n.jsxs(Mr,{label:!x&&l?v(l):void 0,children:[n.jsx("span",{className:de(mr(x)),children:y}),n.jsx("span",{className:de("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:de("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:b,height:b},"aria-busy":"true",children:n.jsx(Nr,{size:32})})}):n.jsx("div",{className:de("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(od,{...f,hideCenter:f.hideCenter??x})})})}function y_({label:e,value:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(eo,{type:"stat",title:e,totalNum:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function sd({value:e,onChange:t,min:r=0,max:a=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:p,className:h,label:d,formatValue:m,labelPos:f,labelAlign:v="right",showMinMax:y=!1,minLabel:x,maxLabel:b,showBgTick:_=!1,showFillTick:g=!1,tickStep:w,tickShape:N="dot"}){t&&!c&&kt("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 C=Math.min(a,Math.max(r,e)),B=a>r?(C-r)/(a-r):0,k=l==="vertical",E=!t,A=ne=>t?.(Number(ne.target.value)),D=typeof p=="number"?`${p}px`:p,j={"--slider-ratio":String(B),"--slider-thumb":`${i}px`,...D?k?{height:D}:{width:D}:{}},M=w??s,W=(_||g)&&M>0&&a>r?Math.floor((a-r)/M+1e-6):0;if(W>0&&W<=100){const ne=N!=="dash",te=Z=>ne?`radial-gradient(circle, ${Z} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${Z} calc(50% - 2px), ${Z} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${Z} calc(50% - 2px), ${Z} calc(50% + 2px), transparent calc(50% + 2px))`,P=ne?"2px":"4px",L=[],R=[],U=[];for(let Z=0;Z<=W;Z++){const X=Z*M/(a-r);if(X>1+1e-6)break;const ae=`${((k?1-X:X)*100).toFixed(4)}%`,Y=X<=B+1e-6;if(Y?!g:!_)continue;const xe=Y?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";L.push(te(xe)),R.push(k?`${P} var(--slider-thumb)`:`var(--slider-thumb) ${P}`),U.push(k?`center ${ae}`:`${ae} center`)}L.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),R.push("100% 100%"),U.push("0 0"),j.backgroundImage=L.join(", "),j.backgroundSize=R.join(", "),j.backgroundPosition=U.join(", "),j.backgroundRepeat="no-repeat"}const z=m?m(C):d==="percent"?`${Math.round(a>r?(C-r)/(a-r)*100:0)}%`:d==="count"?`${C} / ${a}`:C===r&&x?x:C===a&&b?b:void 0,G=n.jsx("input",{type:"range",className:we("slider",`slider--${l}`,E&&"slider--static",!d&&!y&&h),min:r,max:a,step:s,value:C,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":z,"aria-orientation":l,onChange:A,style:j});if(!d&&!y)return G;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),I=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:b??a}),O=y?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?I:T,G,k?T:I]}):G;if(!d)return O;const pe=f??(k?"bottom":"right"),se=`${Math.round(a>r?(C-r)/(a-r)*100:0)}%`,$=m?m(C):d==="percent"?se:d==="count"?`${C} / ${a}`:String(C),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:$});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${pe}`,`slider-wrap--align-${v}`,h),children:[O,V]})}const v_=.86,x_=250,$s=(e,t,r,a)=>Math.round(Math.min(a,Math.max(r,e-t))),Ls=(e,t,r,a)=>{const s=$s(e,t,r,a);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Rs({analyser:e,audioElement:t,orientation:r="horizontal",length:a,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const f=o.useRef(null),v=o.useRef(null),y=o.useRef(null),x=o.useRef(null),[b,_]=o.useState(null);o.useEffect(()=>{const C=G=>{const T=Ls(G,c,p,h);y.current&&(y.current.textContent=T);const I=f.current;I&&(I.setAttribute("aria-valuenow",String($s(G,c,p,h))),I.setAttribute("aria-valuetext",T))},B=e??Cb(t)??(b&&b.el===t?b.node:null),k=v.current;if(!B||!k){k?.style.setProperty("--meter-level","0"),C(u);let G=!1;return!e&&t&&ka(t).then(T=>{!G&&T&&_({el:t,node:T})}),()=>{G=!0}}Ro();const E=new Float32Array(B.fftSize);let A=0,D=0,j=0,M=0,W=null;const z=G=>{const T=gb(B,E);A=T>A?T:A*v_;const I=A>1e-5?20*Math.log10(A):-1/0,O=Math.max(u,I),pe=O-c,se=Math.min(1,Math.max(0,(pe-p)/(h-p)));if(k.style.setProperty("--meter-level",se.toFixed(3)),D+=O,j+=1,G-M>=x_){const $=D/j;W=W==null?$:W*.6+$*.4,C(W),D=0,j=0,M=G}x.current=requestAnimationFrame(z)};return x.current=requestAnimationFrame(z),()=>{x.current!=null&&cancelAnimationFrame(x.current),x.current=null}},[e,t,b,u,c,p,h]);const g=typeof a=="number"?`${a}px`:a,w=n.jsx("div",{className:"audio-meter__track",style:g?r==="vertical"?{height:g}:{width:g}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),N=l??(r==="vertical"?"bottom":"right");return n.jsxs("div",{ref:f,className:we("audio-meter",`audio-meter--${r}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":$s(u,c,p,h),"aria-valuetext":Ls(u,c,p,h),children:[w,s&&n.jsx("span",{ref:y,className:"audio-meter__value caption-2",children:Ls(u,c,p,h)})]})}const ld=260;function id({message:e,position:t,duration:r,onClose:a}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(a);o.useEffect(()=>{m.current=a});const f=r,v=o.useRef(null),y=o.useRef(0),x=o.useRef(0),b=o.useRef(!1),_=o.useRef(null),g=o.useRef(null),w=o.useRef(null),N=o.useRef(null),C=o.useRef(()=>{});C.current=E=>{E<0||(y.current=Date.now(),x.current=E,v.current=setTimeout(()=>{v.current=null,l(!1),_.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},ld)},E))};const B=o.useCallback(()=>{b.current||!v.current||(b.current=!0,clearTimeout(v.current),v.current=null,x.current=Math.max(0,x.current-(Date.now()-y.current)))},[]),k=o.useCallback(()=>{b.current&&(b.current=!1,C.current(x.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(v.current&&(clearTimeout(v.current),v.current=null),_.current&&(clearTimeout(_.current),_.current=null)),e){if(p.current)return f>0&&!v.current&&(b.current?x.current=f:C.current(f)),d.current=e,()=>{v.current&&(clearTimeout(v.current),v.current=null),_.current&&(clearTimeout(_.current),_.current=null)};const E=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),g.current=requestAnimationFrame(()=>{w.current=requestAnimationFrame(()=>{E(),l(!0)})})),f>0&&(b.current=!1,C.current(f))}else l(!1),_.current=setTimeout(()=>u(!1),ld);return d.current=e,()=>{v.current&&clearTimeout(v.current),_.current&&clearTimeout(_.current),g.current&&cancelAnimationFrame(g.current),w.current&&cancelAnimationFrame(w.current),N.current&&clearTimeout(N.current),v.current=null,_.current=null,g.current=null,w.current=null,N.current=null}},[e,f,t]),{mounted:i,showing:s,popupRef:h,pause:B,resume:k}}function Lr({message:e="",position:t="top",type:r="normal",onClose:a=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=id({message:e,position:t,duration:s,onClose:a}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const f=r==="notice"||r==="warning"?r:"normal",v=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:y=>{h.current=y.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${f} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?bn.createPortal(v,document.body):v}const __=24;function w_({value:e,max:t=100,size:r=8,color:a,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),f=m/d*100,v=Number.isFinite(t)&&t>0?t:0,y=u??(r>=__?"inside":"bottom"),x=y==="center"?"inside":y,b=x==="inside"&&(c==="left"?f>=15:c==="center"?f>=50:f>=85),_={};return a&&(_["--progress-bar-fill"]=a),s&&(_["--progress-bar-track"]=s),n.jsxs("div",{className:we("progress-bar",`progress-bar--${r}`,`progress-bar--label-${x}`,l&&`progress-bar--align-${c}`,l&&b&&"progress-bar--label-on-fill",h),style:_,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${v}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${f}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(f)}%`:l==="raw"?String(m):`${m} / ${v}`})]})}const ud={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},B_="rgba(255, 255, 255, 0.16)";function cd({max:e,index:t,inactiveBg:r,inactiveColor:a,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Ee.useTranslation(),p=fn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(r&&(m["--pi-inactive-bg"]=r),a&&(m["--pi-inactive-color"]=a),s&&(r||(m["--pi-inactive-bg"]=B_),a||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:ud,children:d}),Array.from({length:e}).map((v,y)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${y<h?" done":y===h?" active":""}`},y))]});const f=i?n.jsx("span",{role:"status",style:ud,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),f]}):n.jsxs(n.Fragment,{children:[f,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((v,y)=>n.jsx("span",{role:"listitem","aria-current":y===h?"step":void 0,className:`progress-indicator-dot ${y<h?" done":y===h?" active":""} body-3`,children:y+1},y))})]})}function k_(e){if(!e)return[];const t=[];let r=0,a="";for(const s of e.trim()){if(s==="("?r++:s===")"&&r--,/\s/.test(s)&&r===0){a&&(t.push(a),a="");continue}a+=s}return a&&t.push(a),t}function A_(e,t,r=0){const a=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=a.length)break;const u=dd(i.span),c=Math.min(u,a.length-l);if(c===1)a[l]=Math.max(a[l],i.width);else{const p=Math.max(0,(i.width-r*(c-1))/c);for(let h=l;h<l+c;h++)a[h]=Math.max(a[h],p)}l+=c}}return a}function dd(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function N_(e,t){const r=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return r?dd(parseInt(r[1],10)):1}function E_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(r(c)?u:0),0);return e.reduce((i,u,c)=>i+(r(c)?0:a(c)),0)>s-l}function j_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t,l=e.reduce((d,m,f)=>d+(r(f)?m:0),0),i=e.reduce((d,m,f)=>d+(r(f)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>r(m)?d:Math.max(a(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,f)=>d+(r(f)?0:m),0));if(h!==0){let d=-1;p.forEach((m,f)=>{!r(f)&&(d<0||m>p[d])&&(d=f)}),d>=0&&(p[d]=Math.max(a(d),p[d]+h))}return p}const D_=16;function S_(e,t=D_){return e.map(r=>{const a=r.sortable&&!r.sorted;return Math.max(r.declaredMin,Math.ceil(r.headWidth+(a?t:0)))})}const pd="declared";function T_({children:e,className:t,style:r,span:a,rowLabel:s,onRowClick:l}){const i=a&&a>1?{gridColumn:`span ${a}`,...r}:r;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":a&&a>1?a:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ps({variant:e="default",children:t,className:r,draggable:a,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const f=o.useCallback(v=>{s&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Nr,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:r?`table-row ${r}`:"table-row",draggable:a,onClick:s,onKeyDown:s?f:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function M_({dir:e}){return n.jsx(e==="asc"?zl:Ol,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function $_({children:e,onClick:t,className:r,sortDir:a,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,a&&n.jsx(M_,{dir:a})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:we("table-field body-3",r,a?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function hd(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Fs({fields:e=[],sort:t,sortable:r=!0,headerGroups:a,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:f,mobileGridTemplateColumns:v,resizable:y=!0,resizeMode:x="grow",resizeStorageKey:b,refitOn:_,title:g,icon:w,count:N,collapsed:C=!1,onToggleCollapse:B,headerActions:k,empty:E,loading:A,dragOver:D=!1,onDragOver:j,onDragLeave:M,onDrop:W,renderExpandedRow:z,expandedId:G}){const T=gn,{t:I}=Ee.useTranslation(),O=o.useId(),pe=`table-title-${O}`,se=`table-row-hint-${O}`,[$,V]=o.useState(null),ne=o.useCallback((K,Ce=0)=>{if(!(K==null||typeof K=="boolean")){if(typeof K=="string"||typeof K=="number")return String(K);if(!(Ce>6)){if(Array.isArray(K)){const He=K.map(Ye=>ne(Ye,Ce+1)).filter(Boolean);return He.length?He.join(""):void 0}if(o.isValidElement(K))return ne(K.props.children,Ce+1)}}},[]),te=o.useCallback((K,Ce)=>{const He=e[Ce];if(!He)return;if(He.sortValue)return He.sortValue(K);if(He.sortKey)return K[He.sortKey];const Ye=l(K)[Ce]?.content;return typeof Ye=="string"||typeof Ye=="number"?Ye:ne(Ye)},[e,l,ne]),P=!t&&r&&!e.some(K=>K.sortDir!==void 0||K.onClick),L=o.useCallback(K=>{const Ce=e[K];if(!Ce||Ce.sortable===!1)return!1;if(Ce.sortValue||Ce.sortKey)return!0;const He=s[0];return He!==void 0&&te(He,K)!==void 0},[e,s,te]);o.useEffect(()=>{if(!P||s.length===0)return;const K=e.filter((Ce,He)=>Ce.sortable!==!1&&!L(He));K.length!==0&&kt(`Table/sort-mute/${K.map(Ce=>String(Ce.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${K.map(Ce=>`'${String(Ce.label??"?")}'`).join(" \xB7 ")}`,`
|
|
849
|
-
\uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[P,e,s,L]);const R=o.useMemo(()=>t?e.map(K=>{if(!K.sortKey||K.sortDir!==void 0)return K;const Ce=t.field(String(K.label??""),K.sortKey);return{...K,sortDir:Ce.sortDir,onClick:K.onClick??Ce.onClick}}):P?e.map((K,Ce)=>L(Ce)?{...K,sortDir:$?.index===Ce?$.asc?"asc":"desc":null,onClick:()=>V(He=>He?.index===Ce?{index:Ce,asc:!He.asc}:{index:Ce,asc:!0})}:K):e,[e,t,P,$,L]),U=o.useMemo(()=>{if(!P||!$)return s;const{index:K,asc:Ce}=$;return[...s].sort((He,Ye)=>za(te(He,K),te(Ye,K),Ce))},[s,P,$,te]),Z=fn("(max-width: 767px)"),X=v&&Z?v:null,ae=y&&!Z,Y=o.useRef(ae);Y.current=ae;const xe=48,ie=40,J=o.useRef(()=>xe),F=o.useRef(null),Q=b?`table-cols:${b}`:null,H=o.useRef(null),le=o.useRef(null),re=o.useRef(null),ue=o.useRef(null),[Be,ke]=o.useState(!1),[Ne,Re]=o.useState(0),ye=o.useCallback(()=>{const K=re.current;if(!K)return;const Ce=ue.current,He=H.current;if(Ce&&(Ce.style.minWidth="",He)){const Ye=He.scrollWidth,at=Y.current?ie:0;Ce.style.minWidth=Ye>K.clientWidth+1?`${Ye+at}px`:""}ke(K.scrollWidth>K.clientWidth+1),Re(K.clientWidth),K.scrollWidth>K.clientWidth+1?K.style.setProperty("--table-visible-w",`${K.clientWidth}px`):K.style.removeProperty("--table-visible-w")},[]),_e=o.useCallback((K,Ce)=>{const He=K.current;He&&le.current&&le.current.unobserve(He),K.current=Ce,Ce?(!le.current&&typeof ResizeObserver<"u"&&(le.current=new ResizeObserver(()=>ye())),le.current?.observe(Ce)):!re.current&&!ue.current&&(le.current?.disconnect(),le.current=null),ye()},[ye]),Ae=o.useCallback(K=>_e(re,K),[_e]),Ie=o.useCallback(K=>_e(ue,K),[_e]);o.useEffect(()=>{ye()}),o.useEffect(()=>{if(typeof window>"u")return;const K=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ye()):null;return window.addEventListener("resize",ye),()=>{K!=null&&cancelAnimationFrame(K),window.removeEventListener("resize",ye)}},[ye]);const je=o.useRef(()=>!1),tt=o.useRef([]),Ct=o.useRef(null),Oe=K=>{if(!K||typeof window>"u")return null;try{const Ce=JSON.parse(window.localStorage.getItem(K)??"null");return Array.isArray(Ce)&&Ce.length>0&&Ce.every(He=>typeof He=="number"&&Number.isFinite(He)&&He>0)?Ce:null}catch{return null}},[qe,nt]=o.useState(()=>Oe(Q)),[We,Ze]=o.useState(Q),[ot,gt]=o.useState(()=>Oe(Q)!==null);if(We!==Q){Ze(Q);const K=Oe(Q);nt(K),gt(K!==null)}const ht=o.useRef(qe);o.useEffect(()=>{ht.current=qe},[qe]);const xt=o.useCallback(K=>{const Ce=Ct.current;if(!Ce)return;const He=ht.current;if(He){const Ye=[...He],at=()=>xe;if(Ce.next!=null&&Ce.startWNext!=null){const dt=K.clientX-Ce.startX,jt=Math.max(at()-Ce.startW,Math.min(Ce.startWNext-at(),dt));Ye[Ce.index]=Ce.startW+jt,Ye[Ce.next]=Ce.startWNext-jt}else Ye[Ce.index]=Math.max(at(),Ce.startW+(K.clientX-Ce.startX));ht.current=Ye,nt(Ye)}},[]),ut=o.useCallback(()=>{if(Ct.current=null,window.removeEventListener("pointermove",xt),window.removeEventListener("pointerup",ut),window.removeEventListener("pointercancel",ut),document.body.style.cursor="",document.body.style.userSelect="",Q&&ht.current)try{window.localStorage.setItem(Q,JSON.stringify(ht.current))}catch{}},[xt,Q]),Gt=o.useCallback((K,Ce)=>{Ce.preventDefault(),Ce.stopPropagation();const He=H.current;if(!He)return;const Ye=Array.from(He.children).map(dt=>dt.getBoundingClientRect().width),at=x==="fit"?R.findIndex((dt,jt)=>jt>K&&dt.resizable!==!1):-1;Ct.current=at>=0?{index:K,startX:Ce.clientX,startW:Ye[K],next:at,startWNext:Ye[at]}:{index:K,startX:Ce.clientX,startW:Ye[K]},ht.current=Ye,nt(Ye),gt(!0),window.addEventListener("pointermove",xt),window.addEventListener("pointerup",ut),window.addEventListener("pointercancel",ut),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[xt,ut,x,R]),_t=o.useCallback(()=>{const K=H.current,Ce=K?.closest(".table-wrap");if(!K||!Ce)return null;const He=Ce.style.getPropertyValue("--table-grid-cols");Ce.style.setProperty("--table-grid-cols",R.map(()=>"max-content").join(" "));const Ye=Array.from(Ce.querySelectorAll(".table-row")).filter(Lt=>!Lt.classList.contains("table-row--loading")&&!Lt.classList.contains("table-row--empty")),at=Lt=>Array.from(Lt.children).map(Dt=>{const Wt=window.getComputedStyle(Dt);return{width:Dt.getBoundingClientRect().width,span:N_(Wt.gridColumnStart,Wt.gridColumnEnd)}}),dt=parseFloat(window.getComputedStyle(K).columnGap)||0,jt=Ye.map(at),zt=at(K),wn=A_([zt,...jt],R.length,dt),an=S_(R.map((Lt,Dt)=>({declaredMin:J.current(Dt),headWidth:zt[Dt]?.width??0,sortable:Lt.sortDir!==void 0||!!Lt.onClick,sorted:!!Lt.sortDir}))),Bn=Lt=>an[Lt]??J.current(Lt);F.current=an;const dn=R.map((Lt,Dt)=>{const Wt=wn[Dt],Rt=je.current(Dt)?parseFloat(tt.current[Dt]):NaN;return Number.isFinite(Rt)&&Math.ceil(Wt)>Rt&&kt(`table-fixed-col-overflow:${Dt}:${Rt}`,`[ihabdevteam-core] Table \uC758 ${Dt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Rt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Wt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Wt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Rt)?Rt:Math.max(J.current(Dt),Math.ceil(Wt))}),Xt=window.getComputedStyle(K),on=(parseFloat(Xt.paddingLeft)||0)+(parseFloat(Xt.paddingRight)||0),pn=Ce.clientWidth-on;He?Ce.style.setProperty("--table-grid-cols",He):Ce.style.removeProperty("--table-grid-cols");const Qt={isFixed:Lt=>je.current(Lt),floorOf:Bn,containerWidth:pn};return E_(dn,Qt)?pd:j_(dn,Qt)},[R,x]),Pt=(K,Ce)=>K!==null&&K.length===Ce.length&&K.every((He,Ye)=>He===Ce[Ye]),Qe=o.useRef(_t);o.useEffect(()=>{Qe.current=_t});const[De,rt]=o.useState(0),it=U.length>0,bt=`${Q??""}|${De}|${R.length}|${Ne}|${_??""}`,Nt=!ot&&ae&&Q!==null&&!A?`${bt}|${it?1:0}`:null,It=o.useRef(null);o.useEffect(()=>{if(Nt===null||!it||It.current===bt)return;const K=Qe.current();if(K!==null){if(It.current=bt,K===pd){nt(null);return}nt(Ce=>Pt(Ce,K)?Ce:K)}},[Nt]);const ft=o.useCallback(()=>{if(Q)try{window.localStorage.removeItem(Q)}catch{}gt(!1);const K=Qe.current(),Ce=Array.isArray(K)?K:null;nt(Ce),ht.current=Ce,rt(He=>He+1)},[Q]);o.useEffect(()=>()=>{Ct.current&&(window.removeEventListener("pointermove",xt),window.removeEventListener("pointerup",ut),window.removeEventListener("pointercancel",ut),document.body.style.cursor="",document.body.style.userSelect="")},[xt,ut]);const mt=R.length>0&&R.every(K=>K.width!=null)?R.map(K=>typeof K.width=="number"?`${K.width}px`:String(K.width)).join(" "):null;R.some(K=>K.width!=null)&&!mt&&kt(`table-field-width:${R.map(K=>K.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),mt&&f&&kt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const At=f??mt??void 0,Et=k_(At),Je=Et.filter(K=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(K));Je.length>0&&kt(`table-content-track:${f}`,`[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: ${f})`);const wt=R.findIndex(K=>!!K.sortDir);R.filter(K=>!!K.sortDir).length>1&&kt("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 ce=K=>K===wt?R[K].sortDir==="asc"?"ascending":"descending":R[K].onClick?"none":void 0,Se=K=>/^\d+(\.\d+)?px$/.test(Et[K]??""),Pe=K=>{const Ce=Et[K]??"",He=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ce)??/^(\d+(?:\.\d+)?)px$/.exec(Ce);return He?parseFloat(He[1]):xe};je.current=Se,J.current=Pe,tt.current=Et;const Ge=K=>x==="fit"&&!Se(K)?"fr":"px",st=qe&&qe.length===R.length&&!Z,Ot=x==="fit"&&!ot,ct=(K,Ce)=>{if(K.resizable===!1&&Et[Ce])return Et[Ce];const He=qe[Ce];if(Ge(Ce)!=="fr"||!Ot)return`${He}${Ge(Ce)}`;const Ye=Math.min(Math.max(Pe(Ce),F.current?.[Ce]??0),He);return Ye>0?`minmax(${Ye}px, ${He}fr)`:`${He}fr`},Yt=X??(st?R.map(ct).join(" "):At),$t=Yt?{"--table-grid-cols":Yt}:void 0,Ke=g!==void 0;return n.jsx(ns.Provider,{value:gn,children:n.jsxs("div",{ref:Ae,className:`table-wrap${ae?" table-wrap--resizable":""}${D?" table-wrap--dragover":""}${C?" table-wrap--collapsed":""}`,style:$t,onDragOver:j,onDragLeave:M,onDrop:W,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof g=="string"?g:I("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:se,className:"table-row-hint",children:I("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Ie,role:"table","aria-labelledby":Ke&&typeof g=="string"?pe:void 0,className:"table body-2",children:[Ke&&n.jsxs("div",{className:we("table-header",B&&"table-header--clickable"),onClick:B,role:"caption",children:[B&&n.jsx(fe,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:C?"chevron-right":"chevron-down",ariaLabel:C?I("common.expand","\uD3BC\uCE58\uAE30"):I("common.collapse","\uC811\uAE30"),ariaExpanded:!C,className:"table-header__chevron"}),w&&n.jsx(lt,{icon:w,label:typeof g=="string"?g:void 0,className:"table-header__icon"}),n.jsx("span",{id:pe,className:"table-header__title h5b",children:g}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),k&&n.jsx("span",{className:"table-header__actions",onClick:K=>K.stopPropagation(),children:k})]}),!C&&n.jsxs(n.Fragment,{children:[a&&a.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:a.map((K,Ce)=>n.jsx("div",{role:"columnheader","aria-colspan":K.span,className:we("table-field body-3",K.className),style:{gridColumn:`span ${K.span}`},children:K.label},Ce))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",ae&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:R.map((K,Ce)=>n.jsx($_,{onClick:K.onClick,className:we(K.className,hd(K.align)),sortDir:K.sortDir,ariaSort:ce(Ce),onResizeStart:ae&&Ce<R.length-1&&K.resizable!==!1&&(x!=="fit"||R.some((He,Ye)=>Ye>Ce&&He.resizable!==!1))?He=>Gt(Ce,He):void 0,children:K.label},Ce))}),ae&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:ft})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:A?n.jsx(Ps,{variant:"loading",colSpan:R.length||void 0}):U.length===0&&E?n.jsx(Ps,{variant:"empty",colSpan:R.length||void 0,children:E}):U.map((K,Ce)=>{const He=m!=null&&K.id===m,Ye=!!i&&(u?u(K):!0),at=G!=null&&K.id!=null&&(G instanceof Set?G.has(K.id)||[...G].some(dt=>String(dt)===String(K.id)):String(K.id)===String(G));return n.jsx(Ps,{className:`${Ye?" table-row--clickable":""}${h?" table-row--draggable":""}${He?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ye?()=>i(K):void 0,colSpan:R.length||void 0,rowHasButton:l(K).some(dt=>!!dt.rowLabel),describedBy:se,onMouseEnter:c?dt=>c(K,dt):void 0,onMouseLeave:p?dt=>p(K,dt):void 0,onDragStart:h?dt=>h(K,dt):void 0,onDragEnd:d?dt=>d(K,dt):void 0,expandedContent:at&&z?z(K):void 0,children:l(K).map((dt,jt)=>n.jsx(T_,{className:we(dt.className,hd(R[jt]?.align)),style:dt.style,span:dt.span,rowLabel:Ye?dt.rowLabel:void 0,onRowClick:Ye?()=>i(K):void 0,children:dt.content},jt))},K.id!=null?`${typeof K.id}:${K.id}`:`__idx:${Ce}`)})})]})]})]})})}function md(e,t){return t!=="wornAt"?String(e[t]??""):a4(e.wornYear,e.wornMonth,e.wornDay)}function L_({rows:e,loading:t,onSelect:r,onDelete:a,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Ee.useTranslation(),p=x=>x==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=fv(),m=o.useMemo(()=>{if(!h)return e;const{key:x,asc:b}=h;return[...e].sort((_,g)=>{if(x==="worn"){const w=Number(g.worn)-Number(_.worn);return b?w:-w}return za(md(_,x),md(g,x),b)})},[e,h]),{pageRows:f,pageSizeProps:v,paginationProps:y}=mv(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Es,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:v,pagination:y,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Fs,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...a?[{label:"",resizable:!1}]:[]],items:f.map((x,b)=>({id:x.id??`${x.side}-${b}`,row:x})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${a?" 108px":""}`,renderRow:({row:x})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:b=>b.stopPropagation(),children:n.jsx(As,{checked:x.worn,disabled:x.worn?!l:!s,ariaLabel:x.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:b=>{b?s?.(x):l?.(x)}})})},{content:n.jsx("span",{children:p(x.side)})},{content:x.device?n.jsx(rn,{size:"small",variant:Nc(x.device),fill:"soft",label:Ec(x.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:x.brand})},{content:n.jsx("span",{children:x.fitType||"-"})},{content:n.jsx("span",{children:x.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:vs(x.wornYear,x.wornMonth,x.wornDay,c.language)||"-"})},...a?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:b=>{b?.stopPropagation(),a(x)}})})}]:[]],onRowClick:({row:x})=>r(x),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function fd(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:r=>{r.target===r.currentTarget&&(r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),e(r)))}}:{}}function R_(e,t){return new Date(e,t+1,0).getDate()}function P_(e,t){return new Date(e,t,1).getDay()}function F_({visits:e=[],onVisitClick:t,onVisitMove:r,onDayClick:a,today:s}){const{t:l,i18n:i}=Ee.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=Da(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[f,v]=o.useState(null),y=o.useRef(null),x=o.useMemo(()=>{const C={};return e.forEach(B=>{C[B.date]||(C[B.date]=[]),C[B.date].push(B)}),C},[e]),b=o.useMemo(()=>{const C=R_(p,d),B=P_(p,d),k=[];for(let E=0;E<B;E++)k.push(null);for(let E=1;E<=C;E++)k.push(E);for(;k.length<35;)k.push(null);return k},[p,d]),_=o.useCallback(()=>{d===0?(h(C=>C-1),m(11)):m(C=>C-1)},[d]),g=o.useCallback(()=>{d===11?(h(C=>C+1),m(0)):m(C=>C+1)},[d]),w=C=>`${p}-${String(d+1).padStart(2,"0")}-${String(C).padStart(2,"0")}`,N=C=>w(C)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:_,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Ti(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(C=>n.jsx("div",{className:"calendar-day-header body-3",children:C},C)),b.map((C,B)=>{if(C===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${B}`);const k=C,E=w(k),A=x[E]??[],D=Si(E,i.language),j=f===E;return n.jsxs("div",{className:`calendar-cell${N(k)?" today":""}${j?" drag-over":""}${a?" calendar-cell--clickable":""}`,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-label":a?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(k)?"date":void 0,onClick:a?()=>a(E):void 0,onKeyDown:a?M=>{M.target===M.currentTarget&&(M.key!=="Enter"&&M.key!==" "||(M.preventDefault(),a(E)))}:void 0,onDragOver:r?M=>{M.preventDefault(),v(E)}:void 0,onDragLeave:r?M=>{M.currentTarget.contains(M.relatedTarget)||v(null)}:void 0,onDrop:r?M=>{M.preventDefault(),y.current!=null&&(r(y.current,E),y.current=null),v(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const M=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(z=>(z.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(z=>z.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(z=>z.status==="noVisit").length}].filter(z=>z.count>0),W=M.length===1&&M[0].key==="visited"?l("calendar.visitCount",{count:A.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):M.map(z=>l("calendar.statusCount",{label:z.label,count:z.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${D} ${W}`,children:[M.map(z=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${z.key}`,"aria-hidden":"true"},z.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map((M,W)=>n.jsxs("div",{draggable:!!r,className:`calendar-visit-badge${M.status==="noVisit"?" calendar-visit-badge--no-visit":M.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${r?" calendar-visit-badge--draggable":""}`,onDragStart:r?z=>{y.current=M.id,z.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:r?()=>{y.current=null,v(null)}:void 0,onClick:t?z=>{z.stopPropagation(),t(M)}:void 0,...fd(t?()=>t(M):void 0),"aria-label":[D,M.time?Ri(M.time,l):null,M.customer,l(M.status==="noVisit"?"calendar.legend.noVisit":M.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[M.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Ri(M.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:M.customer}),M.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},M.id??W))})]},k)})]})]})}const I_={page:"h3",pagePopup:"h4",popup:"h5"};function Rr({type:e="page",title:t,headingLevel:r=2,icon:a,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=I_[e],d=t||l||s||a,m=r?`h${r}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[a&&n.jsx(lt,{icon:a,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let Is=null,Cd=!1;function gd(){if(Cd||typeof document>"u")return;Cd=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Is="keyboard")},!0);const e=()=>{Is="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}gd();function to(){return gd(),Is==="keyboard"}const no=20;function O_(e){const{t}=Ee.useTranslation(),{type:r,trainingDatas:a,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:f="page"}=e||{},[,v]=o.useState(0),y=typeof a<"u"?Array.isArray(a)?a:[]:[],x=y.length,[b,_]=o.useState(Math.min(x,no)),g=o.useMemo(()=>Array.isArray(s)?[...s,r?.label].filter(Boolean).join(" \xB7 "):[s||"",r?.label].filter(Boolean).join(" \xB7 "),[s,r?.label]);o.useEffect(()=>{_(Math.min(x,no))},[x]),Su("speechear.data.updated",()=>v(B=>B+1));const w=o.useRef(null),N=o.useRef(null);function C(){const B=document.activeElement;N.current=to()&&B&&B.closest?.(".training-block__more")?b:null,_(k=>Math.min(x,k+no))}return o.useEffect(()=>{const B=N.current;if(B==null)return;N.current=null;const k=document.activeElement;k&&k!==document.body||w.current?.querySelectorAll(".training-block-button")[B]?.focus()},[b]),n.jsxs(Rr,{type:f,title:r?.label,icon:r?.icon,disc:r?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:w,children:(y||[]).slice(0,b).map((B,k)=>{const E=B;return n.jsx(ks,{index:k,type:r,trainingData:E,depth:g,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>d(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?A=>m(E,A):void 0},E?.id!=null?`${r?.key||"t"}-${String(E.id)}`:`${r?.key||"t"}-${k}`)})}),x>no&&b<x&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:C,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function z_(e){let t=0;const r=a=>{Array.isArray(a)?a.forEach(r):a!=null&&a!==!1&&a!==!0&&a!==""&&t++};return r(e),t}function W_({gap:e=10,count:t,className:r,children:a}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??z_(a);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const f=()=>{const g=m.style.maxWidth;m.style.maxWidth="none";const w=m.clientWidth;m.style.maxWidth=g;const N=m.firstElementChild?.offsetWidth??0;i(C=>C.width===w&&C.card===N?C:{width:w,card:N})};if(f(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(f);v.observe(m);const y=m.firstElementChild;y&&v.observe(y);let x=m.parentElement;for(let g=0;g<3&&x&&x!==document.body;g++,x=x.parentElement)v.observe(x);let b=null;const _=()=>{b===null&&(b=requestAnimationFrame(()=>{b=null,f()}))};return window.addEventListener("resize",_),()=>{v.disconnect(),window.removeEventListener("resize",_),b!==null&&cancelAnimationFrame(b)}},[u,e]);const c=l.card>0?l.card:0,p=c>0?Wb(l.width,c,e):0,h=p>0?Hb(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:we("training-block-grid",h>0&&"training-block-grid--measured",r),style:d,"data-cols":h>0?h:void 0,children:a})}function Os(e){const t=o.useRef(null),r=o.useRef(e);r.current=e;const[a,s]=o.useState({url:e,loading:!!e,failed:!1}),l=a.url===e?a:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var H_='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 V_=H_,zs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:r,selectable:a=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:p=null},h){const{t:d}=Ee.useTranslation(),m=e.word||e.title||"",f=t||!m,v=e.audio??e.sound??e.audioKey,y=e.subLabel||e.pronunciation||"",x=e.colloquialLabel||"",[b,_]=o.useState({label:m,subLabel:y,colloquialLabel:x,homonum:e.homonum});m&&(b.label!==m||b.subLabel!==y||b.colloquialLabel!==x||!Object.is(b.homonum,e.homonum))&&_({label:m,subLabel:y,colloquialLabel:x,homonum:e.homonum});const g=o.useRef(null),w=fn("(max-width: 767px)"),N=fn("(max-width: 429px)"),[C,B]=o.useState(!1),[k,E]=o.useState(!1),A=`${typeof v=="string"?v:v?.src??""}\0${m}`,[D,j]=o.useState({for:"",url:""}),M=D.for===A?D.url:"",W=Ei(),z=e.textOnly??(!e.image&&!!b.label&&!!W&&W.entries.length>0&&!W.byWord.has(b.label)),G=z?"":Br()?.(b.label,b.homonum)??e.image??"",{imgRef:T,loading:I,hasImage:O,onLoad:pe,onError:se}=Os(G);o.useEffect(()=>{let Z=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){j({for:A,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const ae=v.src;if(ae){j({for:A,url:ae});return}}}const X=Gr();if(X&&m)try{const ae=await Promise.resolve(X(m));!Z&&ae&&j({for:A,url:ae})}catch{}})(),()=>{Z=!0}},[v,m,A]);const $=o.useRef(!0),V=o.useRef(null);o.useEffect(()=>($.current=!0,()=>{$.current=!1,V.current&&Xa(V.current),V.current=null;try{g.current?.pause()}catch{}g.current=null}),[]);const ne=o.useCallback(()=>new Promise(Z=>{if(typeof window<"u"&&window.speechSynthesis&&m){B(!0),window.speechSynthesis.cancel();const X=new SpeechSynthesisUtterance(m);X.lang="ko-KR",X.onend=()=>{B(!1);try{r?.()}catch{}Z()},X.onerror=()=>{B(!1),Z()},window.speechSynthesis.speak(X)}else Z()}),[m,r]),te=o.useCallback(Z=>{const X=Ca(Z,ae=>{if(B(!1),ae)try{r?.()}catch{}});return g.current=X.el,X.done},[r]),P=o.useCallback(async()=>{if(t||!$.current)return;const Z=()=>{V.current===Z&&(V.current=null);try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}B(!1)},X=fa(Z);V.current=Z;try{window.speechSynthesis?.cancel()}catch{}try{if(M&&(B(!0),await te(M)))return;const ae=Ba();if(ae&&m)try{E(!0);const Y=await Promise.resolve(ae(m));if(!$.current||V.current!==Z||(E(!1),Y&&(B(!0),await te(Y))))return}catch{}if(!$.current||V.current!==Z)return;await ne()}finally{V.current===Z&&E(!1),X(),V.current===Z&&(V.current=null)}},[t,M,m,te,ne]);o.useImperativeHandle(h,()=>({play:()=>P()}),[P]);const L=Z=>Z.stopPropagation(),R=o.useCallback(Z=>{if(Z.stopPropagation(),!t){if(C){try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}B(!1);return}P()}},[t,C,P]),U=we("training-word-card",t?"training-word-card--disabled":"",f?"training-word-card--flipped":"",a?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:U,onClick:a&&!t?l:void 0,role:a?"button":void 0,"aria-pressed":a?s:void 0,tabIndex:a&&!t?0:void 0,"aria-disabled":a&&t?!0:void 0,onKeyDown:a&&!t?Z=>{Z.target===Z.currentTarget&&(Z.key==="Enter"||Z.key===" "||Z.key==="Spacebar")&&(Z.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:f?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:L,children:n.jsx(Mn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:z?n.jsx("div",{className:"training-word-card__text-face",children:b.label}):O?n.jsxs(n.Fragment,{children:[I&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:T,className:"training-word-card__image",src:G,alt:b.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:I?0:1},onLoad:pe,onError:se})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!z&&n.jsx("div",{className:"training-word-card__word",children:b.label}),b.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",b.subLabel,"]"]}),b.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",b.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:a?L:void 0,children:n.jsx(fe,{htmlType:"button",size:N?32:w?40:48,type:w?"dot":"bar",icon:C?"pause":"play",label:w?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:C,loading:k,onClick:R,disabled:t,ariaLabel:b.label?C?d("training.stopFor",{name:b.label,defaultValue:`${b.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:b.label,defaultValue:`${b.label} \uC18C\uB9AC \uB4E3\uAE30`}):C?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${V_}")`}})})]})})}),fr={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function q_(e="landscape"){kt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:r,printH:a}=fr[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${r} !important; height: ${a} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function U_(e,t){if(e.length===0)return[[]];const r=Math.max(1,Math.floor(t)),a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}const G_={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function bd(e,t){const r=G_[e][t];if(r)return r;const a=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(a*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(a/i)):(l=s,i=Math.ceil(a/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function K_(e,t){const r=bd(e==="landscape"?"portrait":"landscape",t),a=Math.max(1,Math.ceil(t));if(a<=1)return r;const s=fr[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,f)=>Math.min(l/m/wd,i/f/Bd),c=Math.max(0,r.cols*r.rows-a),p=u(r.cols,r.rows);let h=r,d=p;for(let m=1;m<=a;m++){const f=Math.ceil(a/m);if(m*f-a>c)continue;const v=u(m,f);v>d&&(h={cols:m,rows:f},d=v)}return d>p*1.05?h:r}const Y_={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},yd={\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"},vd={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Ws={\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"},Hs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function xd(e){return Object.fromEntries(Object.entries(yd).map(([t,r])=>[t,Ws[t]?e(`wordTable.pos.${Ws[t]}`,{defaultValue:r}):r]))}function _d(e){return Object.fromEntries(Object.entries(vd).map(([t,r])=>[t,Hs[t]?e(`wordSearch.filter.type.${Hs[t]}`,{defaultValue:r}):r]))}const Z_={pos:Ws,wordType:Hs};function Vs(e,t){return e?e.split("/").map(r=>t[r]??r).join("/"):""}function qs(e,t,r,a){if(a!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<r-1;if(!i&&!u)return{};const c="#ddd",p=f=>`repeating-linear-gradient(to ${f}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const wd=280,X_=240,J_=280,Bd=400,Q_=120,ew=280;function kd(e,t){const r=o.useRef(null),[a,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=r.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:r,scale:a,offset:l}}const tw=24,nw={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},rw=400,Ad=8;function aw(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function Us({label:e,subLabel:t,colloquialLabel:r,captionLabel:a,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:f=40,wordInfo:v,outerScale:y=1}){const{t:x}=Ee.useTranslation(),b=o.useRef(null),_=o.useRef(null),g=o.useRef(null),[w,N]=o.useState(1),[C,B]=o.useState(!1),[k,E]=o.useState(!1),[A,D]=o.useState({for:"",url:""}),[j,M]=o.useState(null),W=t&&t.length>0?t:mb()?.(e,u)??"",z=Br()?.(l||e,u)??"",{imgRef:G,loading:T,failed:I,onLoad:O,onError:pe}=Os(z),se=o.useCallback(()=>M(_.current?.getBoundingClientRect()??null),[]),$=o.useCallback(()=>M(null),[]),V=Ia(!!j,ie=>{ie?se():$()},_),ne=o.useMemo(()=>{if(!v)return null;const ie=[];return v.grade&&ie.push(x("wordTable.info.grade",{n:v.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),v.syllables&&ie.push(x("wordTable.info.syllables",{n:v.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),v.pos&&ie.push(x("wordTable.info.pos",{v:Vs(v.pos,xd(x)),defaultValue:"\uD488\uC0AC: {{v}}"})),v.wordType&&ie.push(x("wordTable.info.wordType",{v:Vs(v.wordType,_d(x)),defaultValue:"\uC720\uD615: {{v}}"})),ie.length?ie:null},[v,x]),te=W||e,P=A.for===te?A.url:"";o.useEffect(()=>{const ie=Gr(),J=W||e;if(!ie||!J)return;let F=!1;return Promise.resolve().then(()=>ie(J)).catch(()=>"").then(Q=>{!F&&Q&&D({for:J,url:Q})}),()=>{F=!0}},[W,e]);const L=o.useRef(null),R=o.useRef(null);o.useEffect(()=>()=>{g.current?.pause(),R.current?.()},[]);const U=o.useRef(null);o.useEffect(()=>()=>{U.current&&(U.current.cancelled=!0)},[]);const Z=o.useCallback(ie=>{if(ie.stopPropagation(),C||k){L.current?.();return}if(!P){const F=Ba(),Q=W||e;if(!F||!Q)return;const H={cancelled:!1,stop:null};U.current=H;const le=()=>{H.cancelled=!0,H.stop?.(),E(!1),B(!1),R.current?.()};L.current=le,R.current=fa(le),E(!0),Promise.resolve().then(()=>F(Q)).then(re=>{if(H.cancelled)return;if(!re){le();return}D({for:Q,url:re});const ue=Ca(re,()=>{B(!1),R.current?.()});g.current=ue.el,H.stop=ue.stop,E(!1),B(!0)}).catch(()=>{le()});return}B(!0);const J=Ca(P,()=>{B(!1),R.current?.()});g.current=J.el,L.current=J.stop,R.current=fa(J.stop)},[C,k,P,W,e]),X=p&&!!z&&!I,ae=X&&c?wd:X?J_:X_,Y=X&&c?Bd:X?ew:Q_;o.useEffect(()=>{const ie=b.current;if(!ie||typeof ResizeObserver>"u")return;const J=new ResizeObserver(([F])=>{const{width:Q,height:H}=F.contentRect;N(Math.min(Q/ae,H/Y))});return J.observe(ie),()=>J.disconnect()},[ae,Y]);const xe=f*y<tw;return n.jsxs("div",{ref:b,className:we("word-table-cell",xe&&"word-table-cell--tap-too-small",X?"word-table-cell--with-image":""),"data-ref-w":ae,"data-ref-h":Y,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${w})`},children:[X&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:G,className:"word-table-cell__image",src:z,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:O,onError:pe})]}),m&&(s||a)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(rn,{fill:"soft",size:"small",label:s}),a&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:a})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&W&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",W,"]"]}),d&&r&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",r,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":P,children:[n.jsx("span",{"data-play-state":"play",style:{display:C?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?x("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):x("common.play","\uC7AC\uC0DD"),ariaLabel:e?x("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):x("common.play","\uC7AC\uC0DD"),onClick:Z})}),n.jsx("span",{"data-play-state":"pause",style:{display:C?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:x("common.pause","\uBA48\uCDA4"),ariaLabel:e?x("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):x("common.pause","\uBA48\uCDA4"),onClick:Z})})]}),v&&n.jsxs("div",{ref:_,className:"word-table-cell__info-button",onPointerEnter:ie=>{er(ie)||se()},onPointerLeave:ie=>{er(ie)||$()},onFocus:()=>{ur()||se()},onBlur:$,children:[n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:x("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ie=>{ie.stopPropagation(),V.touchPress()}}),j&&ne&&n.jsx(Qn,{anchorRect:j,items:ne,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:x("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?x("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):x("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:ie=>{ie.stopPropagation(),i.onPick(ie.currentTarget.getBoundingClientRect())}})})]})]})}function Pr({title:e,titleIcon:t,disc:r,className:a,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:f,activeCell:v=null,onActivateCell:y,onRemoveCell:x,onRemoveItem:b,onReorder:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,indexOffset:C=0,totalCount:B,renderCellAction:k,showFillerAdd:E=!1,fillerAdd:A="first",addableCount:D,contentRef:j,buttonSize:M=40,brand:W,code:z,pageNumber:G,pageNumberPosition:T="right",fitHeight:I=!1,scoring:O=!1,marks:pe,onMarkClick:se,scoreIndexOffset:$=0}){const V=o.useCallback((ce,Se)=>{se?.($+ce,Se)},[se,$]),ne=(ce,Se)=>{const Pe=ce.filter(Boolean).join(" / ");return Pe?Se?P("wordPrint.removePairFor",{name:Pe,defaultValue:`${Pe} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):P("wordPrint.removeWordFor",{name:Pe,defaultValue:`${Pe} \uBE7C\uAE30`}):Se?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},te=(ce,Se)=>{const Pe=pe?.[Ya($+ce)]??null;return n.jsx("div",{className:we("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:mt>1?{transform:`translateX(-50%) scale(${mt})`,transformOrigin:"bottom center"}:void 0,children:Za.map(Ge=>n.jsx("span",{className:we("word-table-cell__score-slot",Pe===Ge?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",shape:"pill",icon:xs[Ge],variant:Pe===Ge?_s[Ge]:"default",selected:Pe===Ge,useBorder:!1,...ft?{}:{tabIndex:-1,role:"img"},showTooltipInfo:P(`wordTable.scoring.markName.${Ge}`,{defaultValue:Ge}),ariaLabel:P(`wordTable.scoring.${Ge}`,{word:Se,defaultValue:`${Se} ${Ge}`}),onClick:ft?st=>{st.stopPropagation(),V(ce,Ge)}:void 0})},Ge))})},{t:P}=Ee.useTranslation(),L=m!==void 0,R=e!=null||!!t||!!r,U=fn("(max-width: 767px)"),Z=o.useRef(null),[X,ae]=o.useState(null),Y=d?.length??0,xe=B??Y,[ie,J]=o.useState(null),[F,Q]=o.useState(""),H=o.useRef(null),le=o.useRef(null),re=o.useRef(null),ue=o.useRef(null),Be=o.useCallback(ce=>{le.current=ce,typeof j=="function"?j(ce):j&&(j.current=ce)},[j]),ke=o.useCallback((ce,Se)=>{H.current=C+Se,_?.(ce,Se),Q(P("wordTable.reorder.moved",{n:C+Se+1,total:xe,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[_,P,xe,C]);o.useEffect(()=>{const ce=H.current;ce!=null&&(H.current=null,(le.current?.closest(".word-table-block__pages")??le.current)?.querySelector(`[data-wordtable-index="${ce}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{ue.current?.()},[]);const Ne=o.useCallback((ce,Se)=>{if(!_||!ce.altKey||ce.ctrlKey||ce.metaKey)return;const Pe=ce.key==="ArrowRight";if(!Pe&&ce.key!=="ArrowLeft")return;ce.preventDefault();const Ge=Se+(Pe?1:-1),st=C+Ge;st<0||st>=xe||ke(Se,Ge)},[_,xe,C,ke]),Re=o.useCallback((ce,Se)=>{if(!_||ce.pointerType==="mouse")return;const Pe=ce.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;ue.current?.();const Ge={x:ce.clientX,y:ce.clientY};let st=!1;const Ot=Ye=>{st&&Ye.cancelable&&Ye.preventDefault()};let ct=null,Yt=null;const $t=()=>{const Ye=Yt;if(!Ye)return;const at=document.elementFromPoint?.(Ye.x,Ye.y)?.closest?.("[data-wordtable-cell]"),dt=at?Number(at.dataset.wordtableCell):NaN,jt=Number.isInteger(dt)?dt:null;re.current=jt,ae(zt=>zt===jt?zt:jt)},Ke=Ye=>{if(!st){(Math.abs(Ye.clientX-Ge.x)>Ad||Math.abs(Ye.clientY-Ge.y)>Ad)&&He();return}if(Yt={x:Ye.clientX,y:Ye.clientY},typeof requestAnimationFrame>"u"){$t();return}ct===null&&(ct=requestAnimationFrame(()=>{ct=null,$t()}))},K=()=>{ct!==null&&(cancelAnimationFrame(ct),ct=null,$t());const Ye=re.current,at=st;He(),at&&Ye!=null&&Ye!==Se&&ke(Se,Ye)},Ce=setTimeout(()=>{st=!0,J(Se),re.current=Se,ae(Se),window.addEventListener("touchmove",Ot,{passive:!1})},rw);function He(){clearTimeout(Ce),window.removeEventListener("pointermove",Ke),window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K),window.removeEventListener("touchmove",Ot),st=!1,ct!==null&&(cancelAnimationFrame(ct),ct=null),re.current=null,ue.current=null,J(null),ae(null)}ue.current=He,window.addEventListener("pointermove",Ke),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)},[_,ke]),{width:ye,height:_e}=fr[s],Ae=typeof I=="number"?I:I&&typeof I=="object"?U?I.narrow:I.wide:null,{scalerRef:Ie,scale:je,offset:tt}=kd(ye,I?_e:void 0),Ct=L?m?.length??0:d?.length??0,Oe=Math.max(f??Ct,1),qe=!L&&!!i,nt=K_(s,Oe),We=bd(s,Oe),Ze=qe?nt.cols:We.cols,ot=qe?nt.rows:We.rows,gt=qe&&s==="landscape"?nt.cols*2:Ze,ht=qe&&s==="portrait"?nt.rows*2:ot,xt=ce=>({word:ce.length===0||ce.includes("word"),image:ce.length===0||ce.includes("image"),pron:ce.length===0||ce.includes("standardPron"),colloq:ce.length===0||ce.includes("colloquialPron"),caption:ce.length===0||ce.includes("caption")}),ut=xt(l),Gt=o.useMemo(()=>{const ce=(d??[]).map(Pe=>Pe.id),Se=ce.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(ce).size===ce.length;return!Se&&ce.length>0&&kt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Se?ce:null},[d]),_t=xt(u??l),Pt=L?(m??[]).some(ce=>ce!==null&&ce.length>1):(d??[]).some(ce=>(ce.words??[]).length>1),Qe=!!W?.show,De=!!W?.show&&W?.top!==!1,rt=!!W?.show&&W?.bottom!==!1,it=W?.copyright??"\xA9 IHAB, Inc. All rights reserved.",bt=de(we("word-table__content",Y_[c],p&&"word-table__content--outline",h&&Pt&&"word-table__content--div-line",!Qe&&G&&T!=="none"&&"word-table__content--page-number",De&&"word-table__content--brand-top",rt&&"word-table__content--brand-bottom")),Nt={transform:`scale(${1/je})`,transformOrigin:"center center"},It=M*Za.length+4*(Za.length-1),ft=!!se,mt=ft?Math.max(1,Math.min(1/je,ye/gt/It)):1,[At,Et]=o.useState(ws);ma(()=>{if(!O)return;const ce=le.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!ce)return;const Se=ce.getBoundingClientRect().width;Se>0&&Et(f4(Se))},[O,je,mt,M,Y]);const Je=n.jsxs("div",{ref:Ie,className:"word-table__scaler",style:{height:_e*je,"--word-table-mark-stroke":At},children:[n.jsx("div",{className:we("word-table",O&&!ft&&"word-table--score-readonly",!R&&a),style:{width:ye,height:_e,transform:`scale(${je})`,transformOrigin:"top left",marginLeft:tt},children:n.jsxs("div",{ref:Be,className:bt,style:{gridTemplateColumns:`repeat(${gt}, 1fr)`,gridTemplateRows:aw(ht)},children:[L?n.jsx(n.Fragment,{children:(m??[]).map((ce,Se)=>n.jsx("div",{className:de(we("word-table__edit-cell",ce?"word-table__edit-cell--filled":"word-table__edit-cell--empty",v===Se?"word-table__edit-cell--active":"")),style:qs(Se,gt,ht,c),children:ce?n.jsxs(n.Fragment,{children:[ce.map((Pe,Ge)=>n.jsxs(o.Fragment,{children:[Ge>0&&n.jsx("div",{className:de("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:ut.word,showImage:ut.image,showPronunciation:ut.pron,showColloquial:ut.colloq,showCaption:ut.caption,buttonSize:M})]},Ge)),O&&te(Se,ce.map(Pe=>Pe.word).join(" / ")),x&&n.jsx("div",{className:de("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ce.length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ne(ce.map(Pe=>Pe.word),ce.length>1),onClick:()=>x(Se)})})]}):y&&n.jsx("div",{className:de("word-table__card-add"),style:Nt,children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[qe&&i&&n.jsx("div",{className:de("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${nt.cols}`,gridRow:`1 / span ${nt.rows}`,...qs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ce,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("div",{className:de("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:ce.label,subLabel:ce.subLabel,colloquialLabel:ce.colloquialLabel,captionLabel:ce.captionLabel,captionBadge:ce.captionBadge,imageLabel:ce.imageLabel,pickForm:N&&ce.canPickForm?{n:null,onPick:Pe=>N(i.id,-1,Pe)}:void 0,homonum:ce.homonum,showWord:_t.word,showImage:_t.image,showPronunciation:_t.pron,showColloquial:_t.colloq,showCaption:_t.caption,buttonSize:M,wordInfo:ce.grade||ce.syllables!=null||ce.pos||ce.wordType?{grade:ce.grade,syllables:ce.syllables,pos:ce.pos,wordType:ce.wordType}:void 0})]},Se))}),(d??[]).map((ce,Se)=>n.jsxs("div",{"data-wordtable-cell":_?Se:void 0,"data-wordtable-index":_?C+Se:void 0,className:de(`word-table__card${_?" word-table__card--draggable":""}${X===Se?" word-table__card--drag-over":""}${ie===Se?" word-table__card--dragging":""}`),style:qs(Se,Ze,ot,c),draggable:!!_,onPointerDown:_?Pe=>Re(Pe,Se):void 0,onKeyDown:_?Pe=>Ne(Pe,Se):void 0,onDragStart:_?()=>{Z.current=Se}:void 0,onDragOver:_?Pe=>{Pe.preventDefault(),ae(Se)}:void 0,onDragLeave:_?()=>ae(null):void 0,onDrop:_?Pe=>{Pe.preventDefault(),Z.current!==null&&Z.current!==Se&&_(Z.current,Se),Z.current=null,ae(null)}:void 0,onDragEnd:_?()=>{Z.current=null,ae(null)}:void 0,children:[(ce.words??[]).map((Pe,Ge)=>n.jsxs(o.Fragment,{children:[Ge>0&&n.jsx("div",{className:de("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,imageLabel:Pe.imageLabel,pickForm:N&&Pe.canPickForm?{n:C+Se+1,onPick:st=>N(ce.id,C+Se,st)}:void 0,homonum:Pe.homonum,showWord:ut.word,showImage:ut.image,showPronunciation:ut.pron,showColloquial:ut.colloq,showCaption:ut.caption,buttonSize:M,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},Ge)),O&&te(Se,(ce.words??[]).map(Pe=>Pe.label).join(" / ")),(k||b||g||w||_)&&n.jsxs("div",{className:de("word-table__card-actions"),children:[b&&n.jsx("div",{className:de("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ce.words??[]).length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ne((ce.words??[]).map(Pe=>Pe.label),(ce.words??[]).length>1),onClick:()=>b(ce.id)})}),g&&n.jsx("div",{className:de("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:P("wordTable.copyItemAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>g(ce.id,C+Se)})}),w&&n.jsx("div",{className:de("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ce.words??[]).length>1?P("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):P("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ce.words??[]).length>1?P("wordTable.replacePairAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):P("wordTable.replaceItemAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>w(ce.id,C+Se)})}),k?.(Se,ce),_&&n.jsx("div",{className:de("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:P("wordTable.reorder.handle",{word:(ce.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Gt?Gt[Se]:Se)),Array.from({length:Math.max(0,Ze*ot-(d?.length??0))}).map((ce,Se)=>{const Pe=Ze*ot,Ge=D??Pe,st=(d?.length??0)+Se<Ge;return n.jsx("div",{className:de("word-table__card word-table__card--filler"),children:E&&y&&st&&(A==="every"||Se===0)&&n.jsx("div",{className:de("word-table__card-add"),style:Nt,children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y((d?.length??0)+Se)})})},`filler-${Se}`)})]}),De&&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:W?.topLogo?.src??Ua,alt:W?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ce=[W?.title&&n.jsx("span",{className:"word-table__paper-title",children:W.title},"t"),W?.owner&&n.jsx("span",{className:"word-table__owner",children:W.owner},"o"),z&&n.jsx("span",{className:"word-table__code",children:z},"c")].filter(Boolean);return ce.length===0?null:n.jsx("span",{className:"word-table__ident",children:ce.map((Se,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Pe))})})()]})}),rt&&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:[W?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:W.bottomLogo.src,alt:W.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:it})]}),n.jsxs("span",{className:"word-table__band-end",children:[W?.link&&n.jsx("span",{className:"word-table__link",children:W.link}),G&&T!=="none"&&n.jsx("span",{className:"word-table__page-count",children:P("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})]})}),!Qe&&G&&T!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:P("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})}),_&&n.jsx("span",{role:"status",style:nw,children:F})]}),wt=Ae==null?Je:n.jsx("div",{className:"word-table__frame",style:{height:Ae},children:Je});return R?n.jsx(Rr,{type:"page",icon:t,title:e,disc:r,className:we(de("word-table__section"),a),children:wt}):wt}function ow(e,t,r){const a=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=sw(s,t?.[s.label],r);i!==null&&a.push(`${l} ${i}`)}return a.join(" \xB7 ")}function sw(e,t,r){const a=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==Tn);return a.length===0?e.allOption?e.allLabel??r:null:a.map(s=>lw(e,s)).join(", ")}function lw(e,t){const r=[...e.items??[],...(e.groups??[]).flat()];for(const a of r)if(a!=null){if(typeof a=="string"){if(a===t)return a;continue}if(a.value===t)return a.displayLabel??a.labels?.join(" ")??a.value}return t}function Gn({title:e,titleLevel:t=2,headerAction:r,headerSummary:a,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:f,className:v}){const y=kn()??gn,x=(m??(f==="vertical"?"newline":"inline"))==="inline",{t:b}=Ee.useTranslation(),[_,g]=o.useState(l),w=i??_,N=()=>{const j=!w;g(j),u?.(j)},C=j=>{if(!s)return;const M=j.target;!M||typeof M.closest!="function"||M.closest(".filter-panel__collapse-toggle")||M.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},B=o.useMemo(()=>a!==void 0||!w?"":ow(p,h,b("common.all","\uC804\uCCB4")),[a,w,p,h,b]),k=a??(B?n.jsx("span",{className:"filter-panel__header-summary body-3",children:B}):null),E=e||r||a||s,A=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",v),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?A:void 0,children:[E&&n.jsxs("div",{className:"filter-panel__header",onClick:s?C:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:A,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?k:r,s&&n.jsx(fe,{htmlType:"button",size:y,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),showTooltipInfo:w?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:N})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",x?"filter-panel__sections--row":""),children:p.map(j=>{const M=h[j.label],W=M===void 0||(Array.isArray(M)?M.length===0:!1),z=(j.items??[]).filter(T=>T!=null);j.allOption&&z.some(T=>(typeof T=="string"?T:T.value)===Tn)&&kt(`filter-panel-all-value:${j.label}`,`[FilterPanel] '${j.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${Tn}' \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 G=T=>{const I=typeof T=="string"?T:T.value,O=typeof T!="string"&&!!T.disabled,pe=typeof T!="string"?T.labels:void 0,se=typeof T!="string"?T.displayLabel:void 0,$=typeof T!="string"?T.tooltip:void 0,V=typeof T!="string"?T.descriptionTooltip:void 0,ne=typeof T!="string"?T.shape:void 0,te=Array.isArray(M)?M.includes(I):M===I;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:pe??se??I,type:j.itemType??(pe?"bar":I.length===1?"dot":void 0),selected:te,disabled:O,shape:ne,showTooltipInfo:!!$,tooltipInfoText:$,tooltipDescription:V,onClick:()=>d?.(I,j.label)},I)};return n.jsxs(o.Fragment,{children:[j.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:j.groupLabel}),j.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",j.layout==="row"?"filter-panel__section--row":"",j.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:j.displayLabel??j.label}),j.labelAction??(j.labelInfo?n.jsx(ca,{...j.labelInfo}):null)]}),j.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:j.content}):j.type==="input"?n.jsx(qn,{className:"filter-panel__textfield",placeholder:j.placeholder,ariaLabel:j.displayLabel??j.label,value:h[j.label]??"",onChange:T=>d?.(T,j.label),error:j.error}):!j.multiple&&j.display==="segmented"?n.jsx(An,{ariaLabel:j.displayLabel??j.label,options:[...j.allOption?[{key:Tn,label:j.allLabel??b("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...z.map(T=>{const I=typeof T=="string"?T:T.value,O=typeof T!="string"?T.displayLabel:void 0,pe=typeof T!="string"?T.disabled:void 0;return{key:I,label:O??I,disabled:pe}})],value:W&&j.allOption?Tn:h[j.label]??"",onChange:T=>d?.(T,j.label),size:32}):!j.multiple&&j.display==="dropdown"?n.jsx(Nn,{className:"filter-panel__dropdown",ariaLabel:typeof j.label=="string"?j.label:void 0,size:y,options:[...j.allOption?[{value:Tn,label:j.allLabel??b("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...z.map(T=>{const I=typeof T=="string"?T:T.value,O=typeof T!="string"?T.displayLabel:void 0,pe=typeof T!="string"?T.disabled:void 0;return{value:I,label:O??I,disabled:pe}})],value:W&&j.allOption?Tn:h[j.label],onChange:T=>d?.(T,j.label)}):n.jsxs("div",{className:j.groups?"filter-panel__item-groups":"filter-panel__items",children:[j.allOption&&!j.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:j.allLabel??b("common.all","\uC804\uCCB4"),selected:W,disabled:j.allOptionDisabled,onClick:()=>d?.(Tn,j.label)}),j.groups?j.groups.map((T,I)=>n.jsxs("div",{className:"filter-panel__item-group",children:[I===0&&j.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:j.allLabel??b("common.all","\uC804\uCCB4"),selected:W,disabled:j.allOptionDisabled,onClick:()=>d?.(Tn,j.label)}),T.filter(O=>O!=null).map(G)]},I)):z.map(G)]})]})]},j.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const iw=[1,2,3,4,5,6,7,8,9,10,11,12],uw=[8,6,4,2,1],_n="show",Rn="hide",Nd=["image","word","caption","standardPron"];function Ed(e){return e.some(t=>(t.words??[]).some(r=>!!r.captionBadge||!!r.captionLabel))}function jd(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Dd(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 Sd(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Td(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Md(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function $d(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ld(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Rd(e,t){const r=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[r,...uw.filter(a=>a<r)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Pd(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function cw(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:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Fd(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Id(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?_n:Rn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?_n:Rn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?_n:Rn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?_n:Rn}:{}}}function Od(e,t,r,a){return r===e("wordTable.filter.composition","\uAD6C\uC131")?t===Tn?(a.setContentTypes(()=>[]),!0):(a.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):r===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(a.setOrientation(t==="landscape"?"landscape":"portrait"),!0):r===e("wordTable.filter.border","\uC678\uACFD\uC120")?(a.setShowOutline(t===_n),!0):r===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(a.setCutLine(t),!0):r===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(a.setShowDivLine(t===_n),!0):r===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(a.setShowTopInfo?.(t===_n),!0):r===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(a.setShowBottomInfo?.(t===_n),!0):!1}function dw(e){return"sections"in e}function Gs(e){const{t}=Ee.useTranslation(),{title:r,className:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(dw(e))return n.jsx(Gn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:f,orientation:v,showOutline:y,cutLine:x,showDivLine:b,setters:_,showCutLine:g=!1,showDivLine2:w=!1,middleSections:N=[],extraSelected:C={},onExtraSelect:B,showPaperBands:k=!1,showTopInfo:E=!0,showBottomInfo:A=!0}=e,D=[jd(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Dd(t),...N,Sd(t),...g?[$d(t)]:[],...w?[Ld(t)]:[],...k?[Td(t),Md(t)]:[]],j={...Id(t,{contentTypes:f,orientation:v,showOutline:y,cutLine:x,showDivLine:b,showTopInfo:E,showBottomInfo:A}),...C},M=(W,z)=>{Od(t,W,z,_)||B?.(W,z)};return n.jsx(Gn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:j,onSelect:M,...p,sectionAlign:"horizontal"})}function Ks(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function pw(e){return Ks(e).replace(/"/g,""").replace(/'/g,"'")}function Ys(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let ro=null,Fr=null;function hw(e,t,r,a="",s=""){if(e.length===0||Fr&&Fr.iframe.isConnected&&Date.now()-Fr.at<1e4)return;const l=a?Ys(a):"";ro?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),ro===i&&(ro=null)},ro=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}Fr={iframe:u,at:Date.now()},c.open(),c.write(Zs(e,t,r,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Fr?.iframe===u&&(Fr=null)},0)})}function Zs(e,t,r,a=!1,s="",l=""){s=s?Ys(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
847
|
+
`),b=v===-1?r:r.slice(0,v);l("comment",b),r=r.slice(b.length);continue}if(s&&r.startsWith("#")){const v=r.indexOf(`
|
|
848
|
+
`),b=v===-1?r:r.slice(0,v);l("comment",b),r=r.slice(b.length);continue}const u=r.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),r=r.slice(u[0].length);continue}const c=r.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),r=r.slice(c[0].length);continue}const p=r.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),r=r.slice(p[0].length);continue}const h=r.match(Z4);if(h){l("keyword",h[0]),r=r.slice(h[0].length);continue}const d=r.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const v=d[0];l(s&&Y4.has(v)?"command":"identifier",v),r=r.slice(v.length);continue}const m=r.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),r=r.slice(m[0].length);continue}const f=r.match(/^[()[\]{};.,]/);if(f){l("punctuation",f[0]),r=r.slice(1);continue}l("other",r[0]),r=r.slice(1)}return a}function J4({children:e,language:t="bash",title:r="",showCopy:a=!0,size:s="default",className:l=""}){const{t:i}=Ee.useTranslation(),[u,c]=o.useState(!1),p=K4(Gc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Cy(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=X4(p,t),f=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",s==="small"?"code-box--small":"",l),children:[(r||a)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:r}),a&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((v,b)=>n.jsx("span",{className:`code-token ${v.type} ${f}`,children:v.content},b))})})]})}function Q4({count:e,actions:t,onClear:r,clearLabel:a,visible:s,content:l,max:i}){const u=kn()??gn,{t:c}=Ee.useTranslation(),p=s!==void 0?s:e>0,h=a??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),m=o.useRef(null),f=o.useRef(null),v=o.useRef(p);o.useLayoutEffect(()=>{const g=m.current,w=v.current;if(v.current=p,p&&!w){const N=typeof document<"u"?document.activeElement:null;f.current=N&&N!==document.body&&!g?.contains(N)?N:null}else!p&&w&&g&&g.contains(document.activeElement)&&Pa(g,f.current)},[p]);const[b,_]=o.useState(!1),y=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const g=d.current;if(!g)return;const w=A=>{y.current=A,_(A)},N=()=>{const A=g.firstElementChild??g,D=Array.from(A.children);if(D.length<2){w(!1);return}const j=D[0].offsetTop,S=D.some(I=>I.offsetTop!==j);if(!y.current){x.current=g.clientWidth,S&&w(!0);return}if(S)return;const O=D[0],z=D[D.length-1],G=z.offsetLeft+z.offsetWidth-O.offsetLeft,M=x.current;(M==null||G<=M)&&w(!1)};if(N(),typeof ResizeObserver>"u")return;const C=new ResizeObserver(N);C.observe(g);const B=g.parentElement;let k=B?.clientWidth??0;const E=new ResizeObserver(()=>{const A=B?.clientWidth??0;A!==k&&(k=A,x.current=null,N())});return B&&E.observe(B),()=>{C.disconnect(),E.disconnect()}},[l,e]),n.jsxs("div",{ref:m,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[n.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(rn,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${b?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:u,label:h,onClick:r}),t.map((g,w)=>n.jsx(fe,{htmlType:"button",size:u,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const e_=[{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 t_(e){const{onClose:t,className:r}=e;return n.jsx("div",{className:we("item-actions",r),children:e_.map(({key:a,icon:s,closeFirst:l})=>{const i=e[a];if(!i)return null;const u=a==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},a)})})}function n_({items:e,className:t,ariaLabel:r="\uC54C\uB9BC \uAE00",titleLevel:a=4,targetBytes:s}){const l=a?`h${a}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":r,children:e.map(i=>{const u=s===void 0?_i(i.sms):_i(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${vi}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${vi}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Kc({children:e,className:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useEffect(()=>{s(r.current?.parentElement??null)},[]),o.useEffect(()=>{const l=r.current;if(!l||!a)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?a.style.setProperty("--section-head-float-w",`${c}px`):a.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{a.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(a),()=>{u.disconnect(),a.style.removeProperty("--section-head-float-w")}},[a,e]),n.jsx("div",{ref:r,className:we("section-head-float",t),children:e})}function js({items:e,className:t}){return n.jsx("div",{className:ce(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((r,a)=>n.jsxs("span",{className:ce("chart-section__legend-item"),children:[n.jsx("span",{className:ce("chart-section__legend-dot"),style:{background:r.color}}),r.label]},a))})}const mr=e=>`chart-section__total__num ${e?"h1":"h0"}`;function Mr({label:e,children:t}){return e?n.jsxs("div",{className:ce("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ce("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ce("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ce("chart-section__total"),children:t})}const Yc=20,eo=120,r_=120,a_={xSmall:eo,small:eo,medium:eo*2+Yc,large:eo*2+Yc},Zc={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},ba=e=>{const t=parseFloat(e);return Number.isFinite(t)?t:0};function o_(e){if(!e)return 0;const t=Array.from(e.children);if(!t.length)return 0;const r=ba(getComputedStyle(e).columnGap);return t.reduce((a,s)=>a+s.getBoundingClientRect().width,0)+r*(t.length-1)}function to({type:e="chart",title:t,titleClassName:r,titleLevel:a,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:f,totalNum:v,totalUnit:b,totalMuted:_=!1,totalLabel:y,change:x,changeType:g,size:w,bodyAlign:N="bottom",subRow:C,legend:B,subRowAlign:k="start",className:E,inGrid:A=!1,fitBody:D=!1,children:j}){const S=e==="stat",O=w??(S?"small":"large"),z=O==="xSmall"&&S,[G,M]=o.useState(!0),I=O==="xSmall"?z&&G?"xSmall":"small":O,W=z&&!G,pe=I==="xSmall",se=I==="xSmall"||I==="small"||I==="medium",$=r??"h5",V=a??(S?0:3),{t:ne}=Ee.useTranslation(),te=o.useRef(null),{anchorRect:P,openAt:L,close:R}=Ha(),U=o.useCallback(()=>{f&&te.current&&L(te.current)},[f,L]),[Z,X]=o.useState(!1);ma(()=>{const Ie=te.current;if(!Ie||!c)return;const qe=We=>X(We>0&&We<h);if(qe(Ie.clientWidth),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(We=>qe(We[0].contentRect.width));return nt.observe(Ie),()=>nt.disconnect()},[c,h]);const[ae,Y]=o.useState(null),xe=o.useCallback(()=>Y(null),[]),ie=o.useCallback(Ie=>{const qe=Ie.currentTarget.getBoundingClientRect();Y(nt=>nt?null:{left:qe.left,right:qe.right,top:qe.top,bottom:qe.bottom,width:qe.width,height:qe.height,x:qe.x,y:qe.y})},[]),J=!!c&&Z;o.useEffect(()=>{J||Y(null)},[J]);const F=c?[...c.options.map((Ie,qe)=>({label:Ie.label,shortcut:qa(qe),icon:Ie.icon,selected:Ie.key===c.value,disabled:Ie.disabled,onClick:()=>c.onChange(Ie.key),closeOnSelect:!0})),...(p??[]).map((Ie,qe)=>qe===0?{...Ie,separatorBefore:!0}:Ie)]:[],Q=o.useCallback(Ie=>{if(!d)return;const qe=Ie.target;qe&&typeof qe.closest=="function"&&qe.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),H=o.useCallback(Ie=>{d&&Ie.target===Ie.currentTarget&&(Ie.key==="Enter"||Ie.key===" ")&&(Ie.preventDefault(),d())},[d]),le=typeof i=="function"?i({collapsed:J}):i,re=v!=null||y?n.jsxs(Mr,{label:y,children:[v!=null&&n.jsx("span",{className:ce(mr(se)),children:v}),b&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:b})]}):null,de=le||c?n.jsxs("div",{className:ce("chart-section__head-right"),children:[c&&(J?n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??ne("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??ne("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!ae,onClick:ie}):n.jsx(An,{size:hr,ariaLabel:c.ariaLabel,options:c.options.map(Ie=>({key:Ie.key,label:Ie.label,disabled:Ie.disabled,disabledReason:Ie.disabledReason})),value:c.value,onChange:c.onChange})),le]}):null,Be=o.useRef(null),[ke,Ne]=o.useState(null);o.useLayoutEffect(()=>{const Ie=Be.current;if(!Ie){Ne(null);return}const qe=()=>{const We=Ie.getBoundingClientRect().height;Ne(Ze=>Ze!=null&&Math.abs(Ze-We)<1?Ze:We)};if(qe(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(qe);return nt.observe(Ie),()=>nt.disconnect()},[B]);const Re=o.useId(),ye=V?`h${V}`:"div",_e=typeof I=="number"?I:a_[I],Ae=g??(x===void 0?void 0:x>0?"up":x<0?"down":"neutral"),Oe=x===void 0?void 0:x>0?`+${x}`:`${x}`,je=o.useRef(null),tt=o.useRef(null);ma(()=>{if(!z)return;const Ie=te.current;if(!Ie||typeof getComputedStyle!="function")return;const qe=()=>{const We=getComputedStyle(Ie),Ze=ba(We.paddingLeft)+ba(We.paddingRight)+ba(We.borderLeftWidth)+ba(We.borderRightWidth),ot=r_-Ze,gt=Math.max(je.current?.getBoundingClientRect().width??0,o_(tt.current));!(ot>0)||!(gt>0)||M(gt<=ot+.5)};if(qe(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(qe);return je.current&&nt.observe(je.current),tt.current&&nt.observe(tt.current),()=>nt.disconnect()},[z,t,v,b,Oe]);const Ct=f&&P?n.jsx(On,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:f}):null;return S?n.jsxs("div",{ref:te,className:ce(["chart-section","chart-section--stat",A&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof I=="string"&&Zc[I],W&&"chart-section--span-two",d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:_e===void 0?void 0:{minHeight:_e},onClick:d?Q:void 0,onKeyDown:d?H:void 0,onPointerEnter:f?U:void 0,onPointerLeave:f?R:void 0,onFocus:f?U:void 0,onBlur:f?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,v,Oe].filter(Ie=>Ie!=null&&Ie!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?Re:void 0,children:[Ct,n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsx(ye,{id:Re,className:ce(["chart-section__title",$].filter(Boolean).join(" ")),children:t}),z&&n.jsx("div",{ref:je,"aria-hidden":"true",className:ce(["chart-section__title",$,"chart-section__title--probe"].filter(Boolean).join(" ")),children:t}),s&&!pe&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ce("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:tt,className:ce("chart-section__sub-row"),children:[n.jsxs(Mr,{children:[n.jsx("span",{className:ce([mr(!0),_&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:v}),b&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:b})]}),Oe&&n.jsx("div",{className:ce(`chart-section__change chart-section__change--${Ae??"neutral"} caption-1`),children:Oe})]}),j&&n.jsx("div",{className:ce("chart-section__body"),children:j})]})]}):n.jsxs("section",{ref:te,className:ce(["chart-section",A&&"chart-section--grid",D&&"chart-section--fit",typeof I=="string"&&Zc[I],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:{..._e===void 0?null:D?{minHeight:_e,height:_e}:{minHeight:_e},...ke==null?null:{"--legend-h":`${ke}px`}},onClick:d?Q:void 0,onKeyDown:d?H:void 0,onPointerEnter:f?U:void 0,onPointerLeave:f?R:void 0,onFocus:f?U:void 0,onBlur:f?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?Re:void 0,children:[f&&P&&n.jsx(On,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:f}),u&&n.jsx(Kc,{children:u}),n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsxs("div",{className:ce("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ce("chart-section__icon")}),n.jsx(ye,{id:Re,className:ce(["chart-section__title",$].filter(Boolean).join(" ")),children:t})]}),de,l&&n.jsx("div",{className:ce("chart-section__disc body-3"),children:l})]}),(re||C)&&n.jsxs("div",{className:ce(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[re,C]}),B&&n.jsx("div",{ref:Be,className:ce("chart-section__legend-slot"),children:B}),j,ae&&n.jsx(sn,{anchorRect:ae,onClose:xe,ariaLabel:c?.ariaLabel??ne("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:[{items:F}],onClose:xe,size:"small"})})]})}const ya=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Ds=e=>ya(e.getFullYear(),e.getMonth()+1);function $r(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const r=Number(t[2]);return r>=1&&r<=12?{year:Number(t[1]),month1:r}:null}const Ss=(e,t)=>`${e}#${t}`;function Ln(e,t){const r=new Date(e,t,1).getDay();return 1+(8-(r===0?7:r))%7}function s_(){const e=kr();let t=e.getFullYear(),r=e.getMonth(),a=e.getDate();if(a<Ln(t,r)){const i=new Date(t,r,0);t=i.getFullYear(),r=i.getMonth(),a=i.getDate()}const s=Math.floor((a-Ln(t,r))/7),l=ya(t,r+1);return{monthKey:l,value:Ss(l,s)}}function l_(e){const t=kr(),r=Ds(t),a=(c,p)=>ya(c,p+1),s=new Map;s.set(r,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=a(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=$r(c);if(!h)continue;const d=h.year,m=h.month1-1,f=Ln(d,m);if(!(c===r&&t.getDate()<f)&&!p.some(_=>_.date.getDate()<f))continue;const v=new Date(d,m,0),b=a(v.getFullYear(),v.getMonth());s.has(b)||s.set(b,[])}const l=new Map;for(const[c,p]of s){const h=$r(c);if(!h)continue;const d=h.year,m=h.month1-1,f=new Date(d,m+1,0).getDate(),v=p.reduce((w,N)=>Math.max(w,N.parts?.length??0,N.partsB?.length??0),0),b=p.some(w=>w.partsB),_=new Array(f+1).fill(0),y=new Array(f+1).fill(0),x=Array.from({length:f+1},()=>new Array(v).fill(0)),g=Array.from({length:f+1},()=>new Array(v).fill(0));for(const w of p){const N=w.date.getDate();if(_[N]+=w.a,y[N]+=w.b,w.parts)for(let C=0;C<v;C++)x[N][C]+=w.parts[C]??0;if(w.partsB)for(let C=0;C<v;C++)g[N][C]+=w.partsB[C]??0}l.set(c,{year:d,month:m,daysInMonth:f,partsLen:v,hasPartsB:b,dayA:_,dayB:y,dayParts:x,dayPartsB:g})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:f,dayB:v,dayParts:b,dayPartsB:_}=p,y=h===t.getFullYear()&&d===t.getMonth(),x=t.getDate(),g=l.get(a(d===11?h+1:h,(d+1)%12)),w=p.partsLen,N=[];for(let B=1;B<=m;B++){const k=y&&B>x;N.push({label:String(B),...k&&f[B]===0&&v[B]===0?{future:!0}:{},a:k&&f[B]===0&&v[B]===0?-1:f[B],b:v[B],...w?{parts:b[B]}:{},...w&&p.hasPartsB?{partsB:_[B]}:{}})}const C=[];for(let B=Ln(h,d);B<=m;B+=7){const k=Math.max(0,B+6-m),E=k&&g?Math.max(w,g.partsLen):w,A=p.hasPartsB||!!(k&&g?.hasPartsB);let D=0,j=0;const S=new Array(E).fill(0),O=new Array(E).fill(0);for(let G=B;G<=Math.min(B+6,m);G++){D+=f[G],j+=v[G];for(let M=0;M<w;M++)S[M]+=b[G][M],O[M]+=_[G][M]}if(k&&g)for(let G=1;G<=k&&!i(g.year,g.month,G);G++){D+=g.dayA[G],j+=g.dayB[G];for(let M=0;M<g.partsLen;M++)S[M]+=g.dayParts[G][M],O[M]+=g.dayPartsB[G][M]}const z=k?`${(d+1)%12+1}/${k}`:`${B+6}`;C.push({label:`${C.length+1}\uC8FC`,sublabel:`[${B}\uC77C~${z}\uC77C]`,a:D,b:j,...E?{parts:S}:{},...E&&A?{partsB:O}:{}})}u[c]={weekly:C,daily:N}}return u}function Xc(){const e=kr(),t=e.getFullYear(),r=e.getMonth()+1,a=[];for(let s=2024;s<=t;s++){const l=s===t?r:12;for(let i=1;i<=l;i++)a.push({value:ya(s,i),year:s,month:i})}return a.reverse()}Xc();function i_(){return Xc()}function Jc(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=Array.isArray(r)&&typeof r[t]=="string"?r[t]:null;return e("calendar.weekLabel",{ord:a??String(t+1)})}function u_(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=(Array.isArray(r)&&typeof r[t]=="string"?r[t]:null)??String(t+1);return e("calendar.weekLabelCompact",{ord:a,defaultValue:""})||Jc(e,t)}function Qc(e){const{t,i18n:r}=Ee.useTranslation(),[a,s]=o.useState("week"),l=o.useMemo(()=>i_().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const D of l){const j=new Date(D.year,D.month,0).getDate(),S=Ln(D.year,D.month-1),O=Math.ceil((j-S+1)/7);for(let z=O-1;z>=0;z--)A.push({value:Ss(D.value,z),monthKey:D.value,year:D.year,month:D.month,week:z})}return A},[l]),u=o.useCallback((A,D)=>t("calendar.yearMonthCompact",{year:A,month:D,full:Ti(t,r.language,A,D),short:uy(A,D,r.language),defaultValue:"{{full}}"}),[t,r.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${u_(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>s_(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),f=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[v,b]=o.useState(""),[_,y]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===v)||b(m)},[l,v,m]),o.useEffect(()=>{i.find(A=>A.value===_)||y(f)},[i,_,f]);const x=a==="month"?p:h,g=a==="month"?v:_,w=a==="month"?b:y,N=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),C=x.findIndex(A=>A.value===g),B=o.useCallback(()=>{const A=x.findIndex(D=>D.value===g);A<x.length-1&&w(x[A+1].value)},[x,g,w]),k=o.useCallback(()=>{const A=x.findIndex(D=>D.value===g);A>0&&w(x[A-1].value)},[x,g,w]),E=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:a,setPeriod:s,range:g,setRange:w,activeOptions:x,activeIdx:C,handlePrev:B,handleNext:k,periodOptions:E,monthRange:v,weekRange:_,weekRanges:i,DOW:N}}const Ft=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Un(e,t=!0){return e.future===!0||t&&e.a===-1}function c_({data:e,colorA:t,colorB:r,labelA:a,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:f,grouped:v=!1,baseline:b,focusableBars:_=!1}){const y=!r,x=!!(d&&d.length>0),g=b,w=o.useMemo(()=>x?Math.max(0,...e.filter(L=>!Un(L,g==null)).map(L=>v?Math.max(0,...(L.parts??[]).map(Ft)):(L.parts??[]).reduce((R,U)=>R+Math.max(0,Ft(U)),0))):Math.max(0,...e.filter(L=>!Un(L,g==null)).flatMap(L=>y?[Ft(L.a)]:[Ft(L.a),Ft(L.b)])),[e,y,x,v]),N=o.useMemo(()=>{if(g==null)return 0;const L=e.filter(R=>!Un(R,g==null)).flatMap(R=>x?(R.parts??[]).map(Ft):y?[Ft(R.a)]:[Ft(R.a),Ft(R.b)]);return Math.max(0,...L.map(R=>Math.abs(R-g)))},[e,g,x,y]),C=o.useMemo(()=>{const L=g!=null?N:w;return p??(h?L>0?L:10:Math.ceil(L/10)*10||10)},[w,N,g,p,h]),B=o.useRef(null),k=o.useRef(null),[E,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const L=B.current;if(!L)return;const R=()=>{const Z=k.current,X=L.clientHeight-(Z?Z.getBoundingClientRect().height:0);X<=0||A(ae=>ae!=null&&Math.abs(ae-X)<1?ae:X)};if(R(),typeof ResizeObserver>"u")return;const U=new ResizeObserver(R);return U.observe(L),k.current&&U.observe(k.current),()=>U.disconnect()},[c]);const D=E??u,j=x?v?Math.max(1,d.length):1:y?1:2,S={"--bar-width":`${o.useMemo(()=>{const L=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(L*j)+6)))},[e.length,j,l])}px`},O={"--bar-group-gap":`${Math.max(0,i)}px`},z=o.useMemo(()=>{const L=Math.round(C/2);return g!=null?[g+C,...L!==C?[g+L]:[],g,...L!==C?[g-L]:[],g-C]:L!==C?[C,L,0]:[C,0]},[C,g]),G=L=>g!=null?1-(L-(g-C))/(2*C):1-L/C,M=14,I=o.useMemo(()=>{const L=new Set;let R=Number.NEGATIVE_INFINITY;for(const U of z.slice(0,-1)){const Z=(g!=null?1-(U-(g-C))/(2*C):1-U/C)*D;Z-R>=M&&(L.add(U),R=Z)}return L},[z,g,C,D]),[W,pe]=o.useState(null),se=o.useCallback(()=>pe(null),[]),$=o.useCallback((L,R)=>{const U=[L.label,L.sublabel].filter(Boolean).join(" ");let Z;if(x&&v&&L.rawPartsB)Z=(m??[]).map((X,ae)=>{const Y=L.rawPartsB[ae]??0;return{text:Y>0?`${X}: ${R[ae]??0}% (${L.rawParts?.[ae]??0}/${Y})`:`${X}: -`,color:(d??[])[ae]}});else if(x&&v)Z=(m??[]).map((X,ae)=>({text:`${X}: ${te(R[ae]??0)}`,color:(d??[])[ae]}));else if(x){const X=(m??[]).map((Y,xe)=>({text:`${Y}: ${R[xe]??0}`,color:(d??[])[xe]})),ae=X.filter((Y,xe)=>(R[xe]??0)>0);Z=ae.length?ae:X}else f&&!y?Z=[{text:`${a} ${Ft(L.a)}%`,color:t},{text:`${s} ${Ft(L.b)}%`,color:r}]:f&&L.rawB!==void 0?Z=[{text:`${f.total} ${L.rawB}`},{text:`${f.done} ${L.rawA??0}`,color:t}]:y?Z=[{text:`${a}: ${Ft(L.a)}`,color:t}]:Z=[{text:`${a}: ${Ft(L.a)}`,color:t},{text:`${s}: ${Ft(L.b)}`,color:r}];return{title:U,items:Z}},[x,v,m,d,f,y,a,s,t,r,g]),V=o.useCallback((L,R,U)=>{const Z=L.getBoundingClientRect(),{title:X,items:ae}=$(R,U);pe({rect:{left:Z.left,top:Z.top,right:Z.right,bottom:Z.bottom,width:Z.width,height:Z.height},title:X,items:ae})},[$]),ne=o.useCallback((L,R)=>{const{title:U,items:Z}=$(L,R);return[U,...Z.map(X=>X.text)].filter(Boolean).join(", ")},[$]),te=L=>g!=null&&L>g?`+${L}`:`${L}`,P=W!=null;return o.useEffect(()=>{if(!P)return;const L=()=>pe(null),R=U=>{const Z=U.target;Z&&typeof Z.closest=="function"&&Z.closest(".bar-chart__col")||pe(null)};return window.addEventListener("scroll",L,!0),document.addEventListener("pointerdown",R,!0),()=>{window.removeEventListener("scroll",L,!0),document.removeEventListener("pointerdown",R,!0)}},[P]),n.jsxs("div",{ref:B,className:ce("bar-chart__wrap"),style:O,children:[n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsx("div",{className:ce("bar-chart__scroll"),children:n.jsxs("div",{className:ce("bar-chart__area"),children:[n.jsxs("div",{className:ce("bar-chart__plot"),style:{height:D},children:[z.slice(0,-1).map((L,R)=>n.jsx("div",{className:ce(`bar-chart__gridline${g!=null&&L===g?" bar-chart__gridline--baseline":""}`),style:{top:G(L)*D},children:I.has(L)&&n.jsx("span",{className:ce("bar-chart__gridline__label caption-1"),children:L})},R)),e.map((L,R)=>{const U=Un(L,g==null),Z=D/2,X=ie=>g!=null?Math.min(Z,Math.abs(Ft(ie)-g)/C*Z):Math.min(D,Math.max(0,Ft(ie)/C*D)),ae=U?0:X(L.a),Y=U?0:X(L.b),xe=(L.parts??[]).map(Ft);return n.jsx("div",{className:ce(`bar-chart__col${v&&x?" bar-chart__col--group":""}`),style:{cursor:U?"default":"pointer"},tabIndex:_&&!U?0:void 0,role:_&&!U?"img":void 0,"aria-label":_&&!U?ne(L,xe):void 0,onMouseEnter:U?void 0:ie=>V(ie.currentTarget,L,xe),onFocus:U||!_?void 0:ie=>V(ie.currentTarget,L,xe),onBlur:_?se:void 0,onMouseLeave:se,children:!U&&(x&&v?(d??[]).map((ie,J)=>{const F=xe[J]??0;if(g==null)return n.jsx("div",{className:ce("bar-chart__bar"),style:{...S,height:X(F),background:ie}},J);const Q=Ft(F)<g;return n.jsxs("div",{className:ce("bar-chart__slot"),style:S,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:!Q&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:X(F),background:ie}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:Q&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:X(F),background:ie}})})]},J)}):x?n.jsx("div",{className:ce("bar-chart__stack"),style:S,children:(()=>{const ie=xe.reduce((F,Q,H)=>Q>0?H:F,-1);let J=D;return xe.map((F,Q)=>{if(F<=0)return null;const H=Math.min(J,F/C*D);return J-=H,n.jsx("div",{className:ce("bar-chart__stack-segment"),style:{height:H,background:(d??[])[Q],borderRadius:Q===ie?"6px 6px 0 0":void 0}},Q)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:Ft(L.a),c:t},...y?[]:[{v:Ft(L.b),c:r}]].map(({v:ie,c:J},F)=>n.jsxs("div",{className:ce("bar-chart__slot"),style:S,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:ie>=g&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:X(ie),background:J}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:ie<g&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:X(ie),background:J}})})]},F))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ce("bar-chart__bar"),style:{...S,height:ae,background:t}}),!y&&n.jsx("div",{className:ce("bar-chart__bar"),style:{...S,height:Y,background:r}})]}))},R)})]}),n.jsx("div",{ref:k,className:ce("bar-chart__x-axis"),children:e.map((L,R)=>{const U=Un(L,g==null);return n.jsxs("span",{className:ce(`bar-chart__x-axis__label${U?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:[L.isToday&&n.jsx("span",{className:ce("bar-chart__x-axis__today-dot"),style:{background:t}}),L.label]}),L.sublabel&&n.jsx("span",{className:"caption-1",children:L.sublabel})]},R)})})]})})}),W&&n.jsx(Qn,{anchorRect:W.rect,title:W.title,items:W.items,showIndex:!1,closeOnOutsideClick:!1})]})}function ed({control:e}){const{t}=Ee.useTranslation(),{activeOptions:r,activeIdx:a,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ce("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:a===r.length-1,onClick:i}),n.jsx(Nn,{value:s,onChange:l,options:r,size:hr,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:hr,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:a<=0,onClick:u}),n.jsx(An,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:f=>h(f),size:hr})]})}function Ts(e,t,r,a=!0){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Ds(u)]?.daily??[])[u.getDate()-1],p=c!=null&&Un(c,a)||u>s;return{dt:u,entry:c,isFuture:p}})}function d_(e,t,r,a=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=kr(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const b=e[l]??{weekly:[],daily:[]},_=$r(l),y=_?_.year:null,x=_?_.month1:null,g=y&&x?Ln(y,x-1):1;return b.weekly.map((w,N)=>{const C=N+1;let B=w.label,k=!1,E=!1;if(y&&x){const A=g+N*7,D=new Date(y,x-1,A+6),j=D.getMonth()+1,S=D.getDate(),O=j===x?`${S}`:`${j}/${S}`;B=r("manager.chart.weekRange",{start:A,end:O});const z=new Date(h,d-1,m).getTime();k=z>=new Date(y,x-1,A).getTime()&&z<=D.getTime(),E=y>h||y===h&&(x>d||x===d&&A>m)}return{...w,label:B,sublabel:Jc(r,C-1),isToday:k,future:w.future===!0||E||void 0,a:E?-1:w.a,b:E?0:w.b}})}const f=u.find(b=>b.value===i);if(!f)return[];const v=new Date(f.year,f.month-1,Ln(f.year,f.month-1)+f.week*7);return Ts(e,v,p,a).map(({dt:b,entry:_,isFuture:y})=>{const x=b.getMonth()+1,g=b.getDate(),w=b.getFullYear();return{label:x===f.month&&w===f.year?`${g}`:`${x}/${g}`,sublabel:c[b.getDay()]??"",future:y||void 0,a:y?-1:_&&_.a>0?_.a:0,b:y?0:_&&_.b>0?_.b:0,isToday:w===h&&x===d&&g===m,..._?.parts?{parts:y?_.parts.map(()=>0):_.parts}:{},..._?.partsB?{partsB:y?_.partsB.map(()=>0):_.partsB}:{}}})}const p_={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function h_({canvasHeight:e,fitHeight:t,focusableBars:r,size:a="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:f,totalLabelKey:v,control:b,hideControls:_=!1,rate:y=!1,rateAgg:x="dayMean",tightMax:g=!1,avgMode:w=!1,totalFormat:N,series:C,seriesMode:B="stack",loading:k=!1,onDetail:E,headExtra:A,headSegment:D,icon:j,disc:S,onClick:O,cardAriaLabel:z,cardTooltip:G,detailSize:M=hr,barGap:I,baseline:W,className:pe,inGrid:se=!1}){const{t:$}=Ee.useTranslation(),V={...p_[a],...e===void 0?null:{height:e}},ne=Qc(u),te=b??ne,P=o.useMemo(()=>d_(u,te,$,W==null),[u,te,$,W]),L=B==="group"&&!!C&&C.length>0;I!=null&&!L&&kt("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 R=o.useMemo(()=>{if(!y)return P;const F=te.period==="month"?$r(te.monthRange):null,Q=kr(),H=C?.length??0,le=re=>{const de=[],Be=[],ke=[];for(let Ne=0;Ne<H;Ne++){let Re=0,ye=0,_e=0;for(const Ae of re){const Oe=Ft(Ae.a[Ne]),je=Ft(Ae.b[Ne]);je<=0||(Re+=Oe,ye+=je,_e+=Oe/je*100)}de.push(x==="weighted"?ye>0?Math.round(Re/ye*100):0:re.length?Math.round(_e/re.length):0),Be.push(Re),ke.push(ye)}return{pct:de,ra:Be,rb:ke}};return P.map((re,de)=>{let Be=re.a===-1?-1:re.b>0?Math.round(re.a/re.b*100):0;if(F&&!Un(re)){const Ne=F.year,Re=F.month1-1,ye=Ts(u,new Date(Ne,Re,Ln(Ne,Re)+de*7),Q).filter(_e=>!_e.isFuture);if(x==="weighted"){let _e=0,Ae=0;for(const{entry:Oe}of ye)Oe&&Oe.b>0&&(_e+=Oe.a,Ae+=Oe.b);Be=Ae>0?Math.round(_e/Ae*100):0}else Be=ye.length?Math.round(ye.reduce((_e,{entry:Ae})=>_e+(Ae&&Ae.b>0?Ae.a/Ae.b*100:0),0)/ye.length):0}let ke=null;if(L&&!Un(re)){let Ne;if(F){const ye=F.year,_e=F.month1-1;Ne=Ts(u,new Date(ye,_e,Ln(ye,_e)+de*7),Q).filter(Ae=>!Ae.isFuture).map(({entry:Ae})=>({a:Ae?.parts??[],b:Ae?.partsB??[]}))}else Ne=[{a:re.parts??[],b:re.partsB??[]}];const Re=le(Ne);ke={parts:Re.pct,rawParts:Re.ra,rawPartsB:Re.rb}}return{...re,a:Be,b:re.a===-1?0:d&&re.parts&&re.parts[1]>0?Math.round(re.parts[0]/re.parts[1]*100):0,rawA:re.a===-1?-1:re.a,rawB:re.b,...ke??{}}})},[P,y,x,d,te.period,te.monthRange,u,L,C?.length]),U=o.useMemo(()=>{if(y||w){const Q=(te.period==="week"?P:u[te.monthRange]?.daily??[]).filter(le=>le.a!==-1);if(Q.length===0)return 0;if(y&&x==="weighted"){let le=0,re=0;for(const de of Q)de.b>0&&(le+=de.a,re+=de.b);return re>0?Math.round(le/re*100):0}const H=y?Q.reduce((le,re)=>le+(re.b>0?re.a/re.b*100:0),0):Q.reduce((le,re)=>le+(re.a>0?re.a:0),0);return Math.round(H/Q.length)}const F=te.period==="month"?u[te.monthRange]?.daily??[]:R;return W!=null?F.reduce((Q,H)=>Q+(Un(H,!1)?0:Ft(H.a)+(d?Ft(H.b):0)),0):F.reduce((Q,H)=>Q+(H.a>0?H.a:0)+(d&&H.b>0?H.b:0),0)},[R,P,y,x,w,W,d,te.period,te.monthRange,u]),Z=C&&C.length>0?C.map(F=>({color:F.color,label:F.label})):[{color:c,label:$(h)},...d?[{color:p,label:$(d)}]:[]],X=a==="small",ae=a==="large",Y=X?"medium":ae?"xLarge":"large",xe=pe||void 0,ie=l?$(l):"",J=ie?$("trainingStatus.detailFor",{name:ie,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):$("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(to,{className:xe,size:Y,inGrid:se,icon:j,disc:S,onClick:O,ariaLabel:z,tooltip:G,headSegment:D,headMenuItems:E?[{label:J,icon:"list",shortcut:"D",onClick:E,closeOnSelect:!0}]:void 0,title:$(l),titleLevel:i,headRight:X?A??void 0:({collapsed:F})=>n.jsxs(n.Fragment,{children:[!_&&n.jsx(ed,{control:te}),A,E&&!F&&n.jsx("span",{className:ce("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"list",ariaLabel:J,showTooltipInfo:J,onClick:E})})]}),legend:n.jsx(js,{items:Z,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:y||w||v&&N?n.jsx(Mr,{label:X?void 0:`${$(te.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${$(v??h)}`,children:N?(N(U).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((F,Q)=>/\d/.test(F)?n.jsx("span",{className:ce(mr(!ae)),children:F},Q):n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:F},Q)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ce(mr(!ae)),children:U}),f&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:$(f)})]})}):n.jsxs(Mr,{children:[n.jsx("span",{className:ce(mr(!ae)),children:U}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:$(h)}),f&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:$(f)})]})}),children:k?n.jsx("div",{className:ce("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsxs("div",{className:ce("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ce("bar-chart__plot bar-chart__plot--loading"),style:{height:V.height},children:n.jsx(Nr,{size:32})}),n.jsx("div",{className:ce("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ce("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),R.some(F=>!!F.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(c_,{focusableBars:r,data:R,colorA:c,colorB:d?p:void 0,labelA:$(h),labelB:d?$(d):void 0,barWidth:s??V.barWidth,barGap:I,baseline:W,height:V.height,fitHeight:t,maxOverride:y?100:void 0,tightMax:g,seriesColors:C?.map(F=>F.color),seriesLabels:C?.map(F=>F.label),rateLabels:y?{total:$("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:$("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:L})})}const td=120,m_={left:38,right:16,top:26,bottom:24};function f_({points:e=[],range:t,ticks:r=[],axisTitle:a,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[f,v]=o.useState(null);o.useEffect(()=>{if(!f)return;const M=W=>m(Math.round(W)||null);if(M(f.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const I=new ResizeObserver(([W])=>M(W.contentRect.width));return I.observe(f),()=>{I.disconnect()}},[f]);const{payload:b,anchorRect:_,openAfterDelay:y,close:x}=Bv(td),g=o.useCallback((M,I)=>{M&&y(M,I.getBoundingClientRect())},[y]),w=d??i,N=l,{left:C,right:B,top:k,bottom:E}={...m_,...u},[A,D]=t,j=M=>D===A?C:C+(w-C-B)*(M-A)/(D-A),S=M=>k+(N-k-E)*(100-M)/100,O={x:j,y:S,plot:{left:C,right:w-B,top:k,bottom:N-E,width:Math.max(0,w-C-B),height:Math.max(0,N-k-E)}},z=e.filter(M=>!M.hollow),G=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:we("line-chart",h),viewBox:`0 0 ${w} ${N}`,role:"img","aria-label":p??e.map(M=>M.description).filter(Boolean).join(", "),children:[a&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:a}),[0,100].map(M=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:C,x2:w-B,y1:S(M),y2:S(M)}),n.jsxs("text",{className:"line-chart__tick",x:C-6,y:S(M)+4,textAnchor:"end",children:[M,"%"]})]},M)),c?.(O),r.map(M=>n.jsx("text",{className:"line-chart__tick",x:j(M.x),y:N-5,textAnchor:"middle",children:M.label},M.x)),z.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:G,points:z.map(M=>`${j(M.x)},${S(M.pct)}`).join(" ")}),e.map(M=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:I=>g(M.description,I.currentTarget),onPointerLeave:x,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:j(M.x),cy:S(M.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",M.hollow&&"is-hollow"),cx:j(M.x),cy:S(M.pct),r:4,stroke:G,fill:M.hollow?void 0:G})]},M.x))]}),b!=null&&n.jsx(sn,{anchorRect:_,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:b,children:b})]})}function C_({icon:e,iconSize:t=56,title:r,titleClass:a="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:we("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:we("game-intro__title",a),children:r}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const nd=(e,t,r)=>{const a=new Date(Date.UTC(e,t,r));return`${a.getUTCFullYear()}-${String(a.getUTCMonth()+1).padStart(2,"0")}-${String(a.getUTCDate()).padStart(2,"0")}`},rd=(e,t,r,a)=>({from:Mi(e,t,r),to:new Date(Mi(e,t,r+a).getTime()-1),fromYmd:nd(e,t,r),toYmd:nd(e,t,r+a-1)});function g_(e,t=0){if(e.period==="month"){const s=$r(e.monthRange),l=kr(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return rd(i,u,1,c)}const r=e.weekRanges.find(s=>s.value===e.weekRange);if(!r){const s=new Date,l=ta();return{from:s,to:s,fromYmd:l,toYmd:l}}const a=Ln(r.year,r.month-1);return rd(r.year,r.month-1,a+(r.week+t)*7,7)}const Ms={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function ad(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function od({done:e,total:t,segments:r,color:a="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const p=typeof s=="number"?s:Ms[s].diameter,h=l??(typeof s=="number"?12:Ms[s].strokeWidth),d=p/2,m=(p-h)/2,f=2*Math.PI*m;if(r&&r.length>0){const y=r.reduce((x,g)=>{const w=x.length>0?x[x.length-1].acc:0,N=Number.isFinite(g.ratio)?g.ratio:0,C=Math.max(0,Math.min(N,1-w));return x.push({color:g.color,rotate:-90+w*360,dash:f*C,acc:w+C}),x},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y.map((x,g)=>x.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:x.color,strokeWidth:h,strokeDasharray:`${x.dash} ${f}`,strokeLinecap:"round",transform:`rotate(${x.rotate} ${d} ${d})`},g))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,b=f*v,_=f-b;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:a,strokeWidth:h,strokeDasharray:`${b} ${_}`,strokeLinecap:v<.02||v>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:ad(v)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function b_({titleKey:e,titleLevel:t,headRight:r,icon:a,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...f}){const{t:v}=Ee.useTranslation();if(!e)return n.jsx(od,{...f});const b=(f.total??0)>0?ad(Math.min((f.done??0)/f.total,1)):0,_=f.size==="small",y=typeof f.size=="number"?f.size:Ms[f.size??"medium"].diameter,x=f.size==="large",g=_?"medium":x?"xLarge":"large",w=c||void 0,N=a&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:a,className:ce("chart-section__head-icon-inner")})});return n.jsx(to,{className:w,size:g,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:v(e),titleLevel:t,headRight:N||(_?void 0:r),legend:i&&n.jsx(js,{items:i}),subRow:s&&n.jsxs(Mr,{label:!_&&l?v(l):void 0,children:[n.jsx("span",{className:ce(mr(_)),children:b}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:y,height:y},"aria-busy":"true",children:n.jsx(Nr,{size:32})})}):n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(od,{...f,hideCenter:f.hideCenter??_})})})}function y_({label:e,value:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(to,{type:"stat",title:e,totalNum:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function sd({value:e,onChange:t,min:r=0,max:a=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:p,className:h,label:d,formatValue:m,labelPos:f,labelAlign:v="right",showMinMax:b=!1,minLabel:_,maxLabel:y,showBgTick:x=!1,showFillTick:g=!1,tickStep:w,tickShape:N="dot"}){t&&!c&&kt("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 C=Math.min(a,Math.max(r,e)),B=a>r?(C-r)/(a-r):0,k=l==="vertical",E=!t,A=ne=>t?.(Number(ne.target.value)),D=typeof p=="number"?`${p}px`:p,j={"--slider-ratio":String(B),"--slider-thumb":`${i}px`,...D?k?{height:D}:{width:D}:{}},S=w??s,O=(x||g)&&S>0&&a>r?Math.floor((a-r)/S+1e-6):0;if(O>0&&O<=100){const ne=N!=="dash",te=Z=>ne?`radial-gradient(circle, ${Z} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${Z} calc(50% - 2px), ${Z} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${Z} calc(50% - 2px), ${Z} calc(50% + 2px), transparent calc(50% + 2px))`,P=ne?"2px":"4px",L=[],R=[],U=[];for(let Z=0;Z<=O;Z++){const X=Z*S/(a-r);if(X>1+1e-6)break;const ae=`${((k?1-X:X)*100).toFixed(4)}%`,Y=X<=B+1e-6;if(Y?!g:!x)continue;const xe=Y?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";L.push(te(xe)),R.push(k?`${P} var(--slider-thumb)`:`var(--slider-thumb) ${P}`),U.push(k?`center ${ae}`:`${ae} center`)}L.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),R.push("100% 100%"),U.push("0 0"),j.backgroundImage=L.join(", "),j.backgroundSize=R.join(", "),j.backgroundPosition=U.join(", "),j.backgroundRepeat="no-repeat"}const z=m?m(C):d==="percent"?`${Math.round(a>r?(C-r)/(a-r)*100:0)}%`:d==="count"?`${C} / ${a}`:C===r&&_?_:C===a&&y?y:void 0,G=n.jsx("input",{type:"range",className:we("slider",`slider--${l}`,E&&"slider--static",!d&&!b&&h),min:r,max:a,step:s,value:C,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":z,"aria-orientation":l,onChange:A,style:j});if(!d&&!b)return G;const M=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),I=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:y??a}),W=b?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?I:M,G,k?M:I]}):G;if(!d)return W;const pe=f??(k?"bottom":"right"),se=`${Math.round(a>r?(C-r)/(a-r)*100:0)}%`,$=m?m(C):d==="percent"?se:d==="count"?`${C} / ${a}`:String(C),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:$});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${pe}`,`slider-wrap--align-${v}`,h),children:[W,V]})}const v_=.86,x_=250,$s=(e,t,r,a)=>Math.round(Math.min(a,Math.max(r,e-t))),Ls=(e,t,r,a)=>{const s=$s(e,t,r,a);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Rs({analyser:e,audioElement:t,orientation:r="horizontal",length:a,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const f=o.useRef(null),v=o.useRef(null),b=o.useRef(null),_=o.useRef(null),[y,x]=o.useState(null);o.useEffect(()=>{const C=G=>{const M=Ls(G,c,p,h);b.current&&(b.current.textContent=M);const I=f.current;I&&(I.setAttribute("aria-valuenow",String($s(G,c,p,h))),I.setAttribute("aria-valuetext",M))},B=e??Cb(t)??(y&&y.el===t?y.node:null),k=v.current;if(!B||!k){k?.style.setProperty("--meter-level","0"),C(u);let G=!1;return!e&&t&&Aa(t).then(M=>{!G&&M&&x({el:t,node:M})}),()=>{G=!0}}Ro();const E=new Float32Array(B.fftSize);let A=0,D=0,j=0,S=0,O=null;const z=G=>{const M=gb(B,E);A=M>A?M:A*v_;const I=A>1e-5?20*Math.log10(A):-1/0,W=Math.max(u,I),pe=W-c,se=Math.min(1,Math.max(0,(pe-p)/(h-p)));if(k.style.setProperty("--meter-level",se.toFixed(3)),D+=W,j+=1,G-S>=x_){const $=D/j;O=O==null?$:O*.6+$*.4,C(O),D=0,j=0,S=G}_.current=requestAnimationFrame(z)};return _.current=requestAnimationFrame(z),()=>{_.current!=null&&cancelAnimationFrame(_.current),_.current=null}},[e,t,y,u,c,p,h]);const g=typeof a=="number"?`${a}px`:a,w=n.jsx("div",{className:"audio-meter__track",style:g?r==="vertical"?{height:g}:{width:g}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),N=l??(r==="vertical"?"bottom":"right");return n.jsxs("div",{ref:f,className:we("audio-meter",`audio-meter--${r}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":$s(u,c,p,h),"aria-valuetext":Ls(u,c,p,h),children:[w,s&&n.jsx("span",{ref:b,className:"audio-meter__value caption-2",children:Ls(u,c,p,h)})]})}const ld=260;function id({message:e,position:t,duration:r,onClose:a}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(a);o.useEffect(()=>{m.current=a});const f=r,v=o.useRef(null),b=o.useRef(0),_=o.useRef(0),y=o.useRef(!1),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),N=o.useRef(null),C=o.useRef(()=>{});C.current=E=>{E<0||(b.current=Date.now(),_.current=E,v.current=setTimeout(()=>{v.current=null,l(!1),x.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},ld)},E))};const B=o.useCallback(()=>{y.current||!v.current||(y.current=!0,clearTimeout(v.current),v.current=null,_.current=Math.max(0,_.current-(Date.now()-b.current)))},[]),k=o.useCallback(()=>{y.current&&(y.current=!1,C.current(_.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(v.current&&(clearTimeout(v.current),v.current=null),x.current&&(clearTimeout(x.current),x.current=null)),e){if(p.current)return f>0&&!v.current&&(y.current?_.current=f:C.current(f)),d.current=e,()=>{v.current&&(clearTimeout(v.current),v.current=null),x.current&&(clearTimeout(x.current),x.current=null)};const E=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),g.current=requestAnimationFrame(()=>{w.current=requestAnimationFrame(()=>{E(),l(!0)})})),f>0&&(y.current=!1,C.current(f))}else l(!1),x.current=setTimeout(()=>u(!1),ld);return d.current=e,()=>{v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),g.current&&cancelAnimationFrame(g.current),w.current&&cancelAnimationFrame(w.current),N.current&&clearTimeout(N.current),v.current=null,x.current=null,g.current=null,w.current=null,N.current=null}},[e,f,t]),{mounted:i,showing:s,popupRef:h,pause:B,resume:k}}function Lr({message:e="",position:t="top",type:r="normal",onClose:a=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=id({message:e,position:t,duration:s,onClose:a}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const f=r==="notice"||r==="warning"?r:"normal",v=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:b=>{h.current=b.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${f} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?bn.createPortal(v,document.body):v}const __=24;function w_({value:e,max:t=100,size:r=8,color:a,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),f=m/d*100,v=Number.isFinite(t)&&t>0?t:0,b=u??(r>=__?"inside":"bottom"),_=b==="center"?"inside":b,y=_==="inside"&&(c==="left"?f>=15:c==="center"?f>=50:f>=85),x={};return a&&(x["--progress-bar-fill"]=a),s&&(x["--progress-bar-track"]=s),n.jsxs("div",{className:we("progress-bar",`progress-bar--${r}`,`progress-bar--label-${_}`,l&&`progress-bar--align-${c}`,l&&y&&"progress-bar--label-on-fill",h),style:x,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${v}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${f}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(f)}%`:l==="raw"?String(m):`${m} / ${v}`})]})}const ud={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},B_="rgba(255, 255, 255, 0.16)";function cd({max:e,index:t,inactiveBg:r,inactiveColor:a,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Ee.useTranslation(),p=fn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(r&&(m["--pi-inactive-bg"]=r),a&&(m["--pi-inactive-color"]=a),s&&(r||(m["--pi-inactive-bg"]=B_),a||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:ud,children:d}),Array.from({length:e}).map((v,b)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${b<h?" done":b===h?" active":""}`},b))]});const f=i?n.jsx("span",{role:"status",style:ud,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),f]}):n.jsxs(n.Fragment,{children:[f,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((v,b)=>n.jsx("span",{role:"listitem","aria-current":b===h?"step":void 0,className:`progress-indicator-dot ${b<h?" done":b===h?" active":""} body-3`,children:b+1},b))})]})}function k_(e){if(!e)return[];const t=[];let r=0,a="";for(const s of e.trim()){if(s==="("?r++:s===")"&&r--,/\s/.test(s)&&r===0){a&&(t.push(a),a="");continue}a+=s}return a&&t.push(a),t}function A_(e,t,r=0){const a=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=a.length)break;const u=dd(i.span),c=Math.min(u,a.length-l);if(c===1)a[l]=Math.max(a[l],i.width);else{const p=Math.max(0,(i.width-r*(c-1))/c);for(let h=l;h<l+c;h++)a[h]=Math.max(a[h],p)}l+=c}}return a}function dd(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function N_(e,t){const r=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return r?dd(parseInt(r[1],10)):1}function E_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(r(c)?u:0),0);return e.reduce((i,u,c)=>i+(r(c)?0:a(c)),0)>s-l}function j_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t,l=e.reduce((d,m,f)=>d+(r(f)?m:0),0),i=e.reduce((d,m,f)=>d+(r(f)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>r(m)?d:Math.max(a(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,f)=>d+(r(f)?0:m),0));if(h!==0){let d=-1;p.forEach((m,f)=>{!r(f)&&(d<0||m>p[d])&&(d=f)}),d>=0&&(p[d]=Math.max(a(d),p[d]+h))}return p}const D_=16;function S_(e,t=D_){return e.map(r=>{const a=r.sortable&&!r.sorted;return Math.max(r.declaredMin,Math.ceil(r.headWidth+(a?t:0)))})}const pd="declared";function T_({children:e,className:t,style:r,span:a,rowLabel:s,onRowClick:l}){const i=a&&a>1?{gridColumn:`span ${a}`,...r}:r;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":a&&a>1?a:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ps({variant:e="default",children:t,className:r,draggable:a,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const f=o.useCallback(v=>{s&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Nr,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:r?`table-row ${r}`:"table-row",draggable:a,onClick:s,onKeyDown:s?f:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function M_({dir:e}){return n.jsx(e==="asc"?zl:Ol,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function $_({children:e,onClick:t,className:r,sortDir:a,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,a&&n.jsx(M_,{dir:a})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:we("table-field body-3",r,a?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function hd(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Fs({fields:e=[],sort:t,sortable:r=!0,headerGroups:a,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:f,mobileGridTemplateColumns:v,resizable:b=!0,resizeMode:_="grow",resizeStorageKey:y,refitOn:x,title:g,icon:w,count:N,collapsed:C=!1,onToggleCollapse:B,headerActions:k,empty:E,loading:A,dragOver:D=!1,onDragOver:j,onDragLeave:S,onDrop:O,renderExpandedRow:z,expandedId:G}){const M=gn,{t:I}=Ee.useTranslation(),W=o.useId(),pe=`table-title-${W}`,se=`table-row-hint-${W}`,[$,V]=o.useState(null),ne=o.useCallback((K,Ce=0)=>{if(!(K==null||typeof K=="boolean")){if(typeof K=="string"||typeof K=="number")return String(K);if(!(Ce>6)){if(Array.isArray(K)){const He=K.map(Ye=>ne(Ye,Ce+1)).filter(Boolean);return He.length?He.join(""):void 0}if(o.isValidElement(K))return ne(K.props.children,Ce+1)}}},[]),te=o.useCallback((K,Ce)=>{const He=e[Ce];if(!He)return;if(He.sortValue)return He.sortValue(K);if(He.sortKey)return K[He.sortKey];const Ye=l(K)[Ce]?.content;return typeof Ye=="string"||typeof Ye=="number"?Ye:ne(Ye)},[e,l,ne]),P=!t&&r&&!e.some(K=>K.sortDir!==void 0||K.onClick),L=o.useCallback(K=>{const Ce=e[K];if(!Ce||Ce.sortable===!1)return!1;if(Ce.sortValue||Ce.sortKey)return!0;const He=s[0];return He!==void 0&&te(He,K)!==void 0},[e,s,te]);o.useEffect(()=>{if(!P||s.length===0)return;const K=e.filter((Ce,He)=>Ce.sortable!==!1&&!L(He));K.length!==0&&kt(`Table/sort-mute/${K.map(Ce=>String(Ce.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${K.map(Ce=>`'${String(Ce.label??"?")}'`).join(" \xB7 ")}`,`
|
|
849
|
+
\uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[P,e,s,L]);const R=o.useMemo(()=>t?e.map(K=>{if(!K.sortKey||K.sortDir!==void 0)return K;const Ce=t.field(String(K.label??""),K.sortKey);return{...K,sortDir:Ce.sortDir,onClick:K.onClick??Ce.onClick}}):P?e.map((K,Ce)=>L(Ce)?{...K,sortDir:$?.index===Ce?$.asc?"asc":"desc":null,onClick:()=>V(He=>He?.index===Ce?{index:Ce,asc:!He.asc}:{index:Ce,asc:!0})}:K):e,[e,t,P,$,L]),U=o.useMemo(()=>{if(!P||!$)return s;const{index:K,asc:Ce}=$;return[...s].sort((He,Ye)=>Wa(te(He,K),te(Ye,K),Ce))},[s,P,$,te]),Z=fn("(max-width: 767px)"),X=v&&Z?v:null,ae=b&&!Z,Y=o.useRef(ae);Y.current=ae;const xe=48,ie=40,J=o.useRef(()=>xe),F=o.useRef(null),Q=y?`table-cols:${y}`:null,H=o.useRef(null),le=o.useRef(null),re=o.useRef(null),de=o.useRef(null),[Be,ke]=o.useState(!1),[Ne,Re]=o.useState(0),ye=o.useCallback(()=>{const K=re.current;if(!K)return;const Ce=de.current,He=H.current;if(Ce&&(Ce.style.minWidth="",He)){const Ye=He.scrollWidth,at=Y.current?ie:0;Ce.style.minWidth=Ye>K.clientWidth+1?`${Ye+at}px`:""}ke(K.scrollWidth>K.clientWidth+1),Re(K.clientWidth),K.scrollWidth>K.clientWidth+1?K.style.setProperty("--table-visible-w",`${K.clientWidth}px`):K.style.removeProperty("--table-visible-w")},[]),_e=o.useCallback((K,Ce)=>{const He=K.current;He&&le.current&&le.current.unobserve(He),K.current=Ce,Ce?(!le.current&&typeof ResizeObserver<"u"&&(le.current=new ResizeObserver(()=>ye())),le.current?.observe(Ce)):!re.current&&!de.current&&(le.current?.disconnect(),le.current=null),ye()},[ye]),Ae=o.useCallback(K=>_e(re,K),[_e]),Oe=o.useCallback(K=>_e(de,K),[_e]);o.useEffect(()=>{ye()}),o.useEffect(()=>{if(typeof window>"u")return;const K=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ye()):null;return window.addEventListener("resize",ye),()=>{K!=null&&cancelAnimationFrame(K),window.removeEventListener("resize",ye)}},[ye]);const je=o.useRef(()=>!1),tt=o.useRef([]),Ct=o.useRef(null),Ie=K=>{if(!K||typeof window>"u")return null;try{const Ce=JSON.parse(window.localStorage.getItem(K)??"null");return Array.isArray(Ce)&&Ce.length>0&&Ce.every(He=>typeof He=="number"&&Number.isFinite(He)&&He>0)?Ce:null}catch{return null}},[qe,nt]=o.useState(()=>Ie(Q)),[We,Ze]=o.useState(Q),[ot,gt]=o.useState(()=>Ie(Q)!==null);if(We!==Q){Ze(Q);const K=Ie(Q);nt(K),gt(K!==null)}const ht=o.useRef(qe);o.useEffect(()=>{ht.current=qe},[qe]);const xt=o.useCallback(K=>{const Ce=Ct.current;if(!Ce)return;const He=ht.current;if(He){const Ye=[...He],at=()=>xe;if(Ce.next!=null&&Ce.startWNext!=null){const dt=K.clientX-Ce.startX,jt=Math.max(at()-Ce.startW,Math.min(Ce.startWNext-at(),dt));Ye[Ce.index]=Ce.startW+jt,Ye[Ce.next]=Ce.startWNext-jt}else Ye[Ce.index]=Math.max(at(),Ce.startW+(K.clientX-Ce.startX));ht.current=Ye,nt(Ye)}},[]),ut=o.useCallback(()=>{if(Ct.current=null,window.removeEventListener("pointermove",xt),window.removeEventListener("pointerup",ut),window.removeEventListener("pointercancel",ut),document.body.style.cursor="",document.body.style.userSelect="",Q&&ht.current)try{window.localStorage.setItem(Q,JSON.stringify(ht.current))}catch{}},[xt,Q]),Gt=o.useCallback((K,Ce)=>{Ce.preventDefault(),Ce.stopPropagation();const He=H.current;if(!He)return;const Ye=Array.from(He.children).map(dt=>dt.getBoundingClientRect().width),at=_==="fit"?R.findIndex((dt,jt)=>jt>K&&dt.resizable!==!1):-1;Ct.current=at>=0?{index:K,startX:Ce.clientX,startW:Ye[K],next:at,startWNext:Ye[at]}:{index:K,startX:Ce.clientX,startW:Ye[K]},ht.current=Ye,nt(Ye),gt(!0),window.addEventListener("pointermove",xt),window.addEventListener("pointerup",ut),window.addEventListener("pointercancel",ut),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[xt,ut,_,R]),_t=o.useCallback(()=>{const K=H.current,Ce=K?.closest(".table-wrap");if(!K||!Ce)return null;const He=Ce.style.getPropertyValue("--table-grid-cols");Ce.style.setProperty("--table-grid-cols",R.map(()=>"max-content").join(" "));const Ye=Array.from(Ce.querySelectorAll(".table-row")).filter(Lt=>!Lt.classList.contains("table-row--loading")&&!Lt.classList.contains("table-row--empty")),at=Lt=>Array.from(Lt.children).map(Dt=>{const Wt=window.getComputedStyle(Dt);return{width:Dt.getBoundingClientRect().width,span:N_(Wt.gridColumnStart,Wt.gridColumnEnd)}}),dt=parseFloat(window.getComputedStyle(K).columnGap)||0,jt=Ye.map(at),zt=at(K),wn=A_([zt,...jt],R.length,dt),an=S_(R.map((Lt,Dt)=>({declaredMin:J.current(Dt),headWidth:zt[Dt]?.width??0,sortable:Lt.sortDir!==void 0||!!Lt.onClick,sorted:!!Lt.sortDir}))),Bn=Lt=>an[Lt]??J.current(Lt);F.current=an;const dn=R.map((Lt,Dt)=>{const Wt=wn[Dt],Rt=je.current(Dt)?parseFloat(tt.current[Dt]):NaN;return Number.isFinite(Rt)&&Math.ceil(Wt)>Rt&&kt(`table-fixed-col-overflow:${Dt}:${Rt}`,`[ihabdevteam-core] Table \uC758 ${Dt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Rt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Wt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Wt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Rt)?Rt:Math.max(J.current(Dt),Math.ceil(Wt))}),Xt=window.getComputedStyle(K),on=(parseFloat(Xt.paddingLeft)||0)+(parseFloat(Xt.paddingRight)||0),pn=Ce.clientWidth-on;He?Ce.style.setProperty("--table-grid-cols",He):Ce.style.removeProperty("--table-grid-cols");const Qt={isFixed:Lt=>je.current(Lt),floorOf:Bn,containerWidth:pn};return E_(dn,Qt)?pd:j_(dn,Qt)},[R,_]),Pt=(K,Ce)=>K!==null&&K.length===Ce.length&&K.every((He,Ye)=>He===Ce[Ye]),Qe=o.useRef(_t);o.useEffect(()=>{Qe.current=_t});const[De,rt]=o.useState(0),it=U.length>0,bt=`${Q??""}|${De}|${R.length}|${Ne}|${x??""}`,Nt=!ot&&ae&&Q!==null&&!A?`${bt}|${it?1:0}`:null,It=o.useRef(null);o.useEffect(()=>{if(Nt===null||!it||It.current===bt)return;const K=Qe.current();if(K!==null){if(It.current=bt,K===pd){nt(null);return}nt(Ce=>Pt(Ce,K)?Ce:K)}},[Nt]);const ft=o.useCallback(()=>{if(Q)try{window.localStorage.removeItem(Q)}catch{}gt(!1);const K=Qe.current(),Ce=Array.isArray(K)?K:null;nt(Ce),ht.current=Ce,rt(He=>He+1)},[Q]);o.useEffect(()=>()=>{Ct.current&&(window.removeEventListener("pointermove",xt),window.removeEventListener("pointerup",ut),window.removeEventListener("pointercancel",ut),document.body.style.cursor="",document.body.style.userSelect="")},[xt,ut]);const mt=R.length>0&&R.every(K=>K.width!=null)?R.map(K=>typeof K.width=="number"?`${K.width}px`:String(K.width)).join(" "):null;R.some(K=>K.width!=null)&&!mt&&kt(`table-field-width:${R.map(K=>K.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),mt&&f&&kt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const At=f??mt??void 0,Et=k_(At),Je=Et.filter(K=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(K));Je.length>0&&kt(`table-content-track:${f}`,`[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: ${f})`);const wt=R.findIndex(K=>!!K.sortDir);R.filter(K=>!!K.sortDir).length>1&&kt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const ue=K=>K===wt?R[K].sortDir==="asc"?"ascending":"descending":R[K].onClick?"none":void 0,Se=K=>/^\d+(\.\d+)?px$/.test(Et[K]??""),Pe=K=>{const Ce=Et[K]??"",He=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ce)??/^(\d+(?:\.\d+)?)px$/.exec(Ce);return He?parseFloat(He[1]):xe};je.current=Se,J.current=Pe,tt.current=Et;const Ge=K=>_==="fit"&&!Se(K)?"fr":"px",st=qe&&qe.length===R.length&&!Z,Ot=_==="fit"&&!ot,ct=(K,Ce)=>{if(K.resizable===!1&&Et[Ce])return Et[Ce];const He=qe[Ce];if(Ge(Ce)!=="fr"||!Ot)return`${He}${Ge(Ce)}`;const Ye=Math.min(Math.max(Pe(Ce),F.current?.[Ce]??0),He);return Ye>0?`minmax(${Ye}px, ${He}fr)`:`${He}fr`},Yt=X??(st?R.map(ct).join(" "):At),$t=Yt?{"--table-grid-cols":Yt}:void 0,Ke=g!==void 0;return n.jsx(ns.Provider,{value:gn,children:n.jsxs("div",{ref:Ae,className:`table-wrap${ae?" table-wrap--resizable":""}${D?" table-wrap--dragover":""}${C?" table-wrap--collapsed":""}`,style:$t,onDragOver:j,onDragLeave:S,onDrop:O,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof g=="string"?g:I("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:se,className:"table-row-hint",children:I("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Oe,role:"table","aria-labelledby":Ke&&typeof g=="string"?pe:void 0,className:"table body-2",children:[Ke&&n.jsxs("div",{className:we("table-header",B&&"table-header--clickable"),onClick:B,role:"caption",children:[B&&n.jsx(fe,{htmlType:"button",size:M,type:"dot",variant:"transparent-gray",useBorder:!1,icon:C?"chevron-right":"chevron-down",ariaLabel:C?I("common.expand","\uD3BC\uCE58\uAE30"):I("common.collapse","\uC811\uAE30"),ariaExpanded:!C,className:"table-header__chevron"}),w&&n.jsx(lt,{icon:w,label:typeof g=="string"?g:void 0,className:"table-header__icon"}),n.jsx("span",{id:pe,className:"table-header__title h5b",children:g}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),k&&n.jsx("span",{className:"table-header__actions",onClick:K=>K.stopPropagation(),children:k})]}),!C&&n.jsxs(n.Fragment,{children:[a&&a.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:a.map((K,Ce)=>n.jsx("div",{role:"columnheader","aria-colspan":K.span,className:we("table-field body-3",K.className),style:{gridColumn:`span ${K.span}`},children:K.label},Ce))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",ae&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:R.map((K,Ce)=>n.jsx($_,{onClick:K.onClick,className:we(K.className,hd(K.align)),sortDir:K.sortDir,ariaSort:ue(Ce),onResizeStart:ae&&Ce<R.length-1&&K.resizable!==!1&&(_!=="fit"||R.some((He,Ye)=>Ye>Ce&&He.resizable!==!1))?He=>Gt(Ce,He):void 0,children:K.label},Ce))}),ae&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:ft})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:A?n.jsx(Ps,{variant:"loading",colSpan:R.length||void 0}):U.length===0&&E?n.jsx(Ps,{variant:"empty",colSpan:R.length||void 0,children:E}):U.map((K,Ce)=>{const He=m!=null&&K.id===m,Ye=!!i&&(u?u(K):!0),at=G!=null&&K.id!=null&&(G instanceof Set?G.has(K.id)||[...G].some(dt=>String(dt)===String(K.id)):String(K.id)===String(G));return n.jsx(Ps,{className:`${Ye?" table-row--clickable":""}${h?" table-row--draggable":""}${He?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ye?()=>i(K):void 0,colSpan:R.length||void 0,rowHasButton:l(K).some(dt=>!!dt.rowLabel),describedBy:se,onMouseEnter:c?dt=>c(K,dt):void 0,onMouseLeave:p?dt=>p(K,dt):void 0,onDragStart:h?dt=>h(K,dt):void 0,onDragEnd:d?dt=>d(K,dt):void 0,expandedContent:at&&z?z(K):void 0,children:l(K).map((dt,jt)=>n.jsx(T_,{className:we(dt.className,hd(R[jt]?.align)),style:dt.style,span:dt.span,rowLabel:Ye?dt.rowLabel:void 0,onRowClick:Ye?()=>i(K):void 0,children:dt.content},jt))},K.id!=null?`${typeof K.id}:${K.id}`:`__idx:${Ce}`)})})]})]})]})})}function md(e,t){return t!=="wornAt"?String(e[t]??""):a4(e.wornYear,e.wornMonth,e.wornDay)}function L_({rows:e,loading:t,onSelect:r,onDelete:a,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Ee.useTranslation(),p=_=>_==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=fv(),m=o.useMemo(()=>{if(!h)return e;const{key:_,asc:y}=h;return[...e].sort((x,g)=>{if(_==="worn"){const w=Number(g.worn)-Number(x.worn);return y?w:-w}return Wa(md(x,_),md(g,_),y)})},[e,h]),{pageRows:f,pageSizeProps:v,paginationProps:b}=mv(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Es,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:v,pagination:b,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Fs,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...a?[{label:"",resizable:!1}]:[]],items:f.map((_,y)=>({id:_.id??`${_.side}-${y}`,row:_})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${a?" 108px":""}`,renderRow:({row:_})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:y=>y.stopPropagation(),children:n.jsx(As,{checked:_.worn,disabled:_.worn?!l:!s,ariaLabel:_.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:y=>{y?s?.(_):l?.(_)}})})},{content:n.jsx("span",{children:p(_.side)})},{content:_.device?n.jsx(rn,{size:"small",variant:Nc(_.device),fill:"soft",label:Ec(_.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:_.brand})},{content:n.jsx("span",{children:_.fitType||"-"})},{content:n.jsx("span",{children:_.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:vs(_.wornYear,_.wornMonth,_.wornDay,c.language)||"-"})},...a?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:y=>{y?.stopPropagation(),a(_)}})})}]:[]],onRowClick:({row:_})=>r(_),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function fd(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:r=>{r.target===r.currentTarget&&(r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),e(r)))}}:{}}function R_(e,t){return new Date(e,t+1,0).getDate()}function P_(e,t){return new Date(e,t,1).getDay()}function F_({visits:e=[],onVisitClick:t,onVisitMove:r,onDayClick:a,today:s}){const{t:l,i18n:i}=Ee.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=Sa(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[f,v]=o.useState(null),b=o.useRef(null),_=o.useMemo(()=>{const C={};return e.forEach(B=>{C[B.date]||(C[B.date]=[]),C[B.date].push(B)}),C},[e]),y=o.useMemo(()=>{const C=R_(p,d),B=P_(p,d),k=[];for(let E=0;E<B;E++)k.push(null);for(let E=1;E<=C;E++)k.push(E);for(;k.length<35;)k.push(null);return k},[p,d]),x=o.useCallback(()=>{d===0?(h(C=>C-1),m(11)):m(C=>C-1)},[d]),g=o.useCallback(()=>{d===11?(h(C=>C+1),m(0)):m(C=>C+1)},[d]),w=C=>`${p}-${String(d+1).padStart(2,"0")}-${String(C).padStart(2,"0")}`,N=C=>w(C)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:x,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Ti(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(C=>n.jsx("div",{className:"calendar-day-header body-3",children:C},C)),y.map((C,B)=>{if(C===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${B}`);const k=C,E=w(k),A=_[E]??[],D=Si(E,i.language),j=f===E;return n.jsxs("div",{className:`calendar-cell${N(k)?" today":""}${j?" drag-over":""}${a?" calendar-cell--clickable":""}`,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-label":a?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(k)?"date":void 0,onClick:a?()=>a(E):void 0,onKeyDown:a?S=>{S.target===S.currentTarget&&(S.key!=="Enter"&&S.key!==" "||(S.preventDefault(),a(E)))}:void 0,onDragOver:r?S=>{S.preventDefault(),v(E)}:void 0,onDragLeave:r?S=>{S.currentTarget.contains(S.relatedTarget)||v(null)}:void 0,onDrop:r?S=>{S.preventDefault(),b.current!=null&&(r(b.current,E),b.current=null),v(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const S=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(z=>(z.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(z=>z.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(z=>z.status==="noVisit").length}].filter(z=>z.count>0),O=S.length===1&&S[0].key==="visited"?l("calendar.visitCount",{count:A.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):S.map(z=>l("calendar.statusCount",{label:z.label,count:z.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${D} ${O}`,children:[S.map(z=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${z.key}`,"aria-hidden":"true"},z.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map((S,O)=>n.jsxs("div",{draggable:!!r,className:`calendar-visit-badge${S.status==="noVisit"?" calendar-visit-badge--no-visit":S.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${r?" calendar-visit-badge--draggable":""}`,onDragStart:r?z=>{b.current=S.id,z.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:r?()=>{b.current=null,v(null)}:void 0,onClick:t?z=>{z.stopPropagation(),t(S)}:void 0,...fd(t?()=>t(S):void 0),"aria-label":[D,S.time?Ri(S.time,l):null,S.customer,l(S.status==="noVisit"?"calendar.legend.noVisit":S.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[S.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Ri(S.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:S.customer}),S.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},S.id??O))})]},k)})]})]})}const I_={page:"h3",pagePopup:"h4",popup:"h5"};function Rr({type:e="page",title:t,headingLevel:r=2,icon:a,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=I_[e],d=t||l||s||a,m=r?`h${r}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[a&&n.jsx(lt,{icon:a,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let Is=null,Cd=!1;function gd(){if(Cd||typeof document>"u")return;Cd=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Is="keyboard")},!0);const e=()=>{Is="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}gd();function no(){return gd(),Is==="keyboard"}const va=20;function O_(e){const{t}=Ee.useTranslation(),{type:r,trainingDatas:a,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:f="page",loading:v=!1,placeholderCount:b=4}=e||{},[,_]=o.useState(0),y=typeof a<"u"?Array.isArray(a)?a:[]:[],x=y.length,[g,w]=o.useState(Math.min(x,va)),N=o.useMemo(()=>Array.isArray(s)?[...s,r?.label].filter(Boolean).join(" \xB7 "):[s||"",r?.label].filter(Boolean).join(" \xB7 "),[s,r?.label]);o.useEffect(()=>{w(Math.min(x,va))},[x]),Su("speechear.data.updated",()=>_(j=>j+1));const C=o.useRef(null),B=o.useRef(null);function k(){const j=document.activeElement;B.current=no()&&j&&j.closest?.(".training-block__more")?g:null,w(S=>Math.min(x,S+va))}o.useEffect(()=>{const j=B.current;if(j==null)return;B.current=null;const S=document.activeElement;S&&S!==document.body||C.current?.querySelectorAll(".training-block-button")[j]?.focus()},[g]);const E=v&&x===0,A=E?Math.max(0,Math.min(va,Math.floor(b))):0,D=p==="small"?" training-block-button--small":p==="list"?" training-block-button--list":"";return n.jsxs(Rr,{type:f,title:r?.label,icon:r?.icon,disc:r?.desc,className:"training-block",children:[n.jsxs("div",{className:"training-list",ref:C,"aria-busy":E?!0:void 0,children:[Array.from({length:A},(j,S)=>n.jsx("div",{className:`training-block-button training-block-button--placeholder${D}`,"aria-hidden":"true"},`placeholder-${S}`)),(y||[]).slice(0,g).map((j,S)=>{const O=j;return n.jsx(ks,{index:S,type:r,trainingData:O,depth:N,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&O?.id!=null&&u.has(String(O.id))?()=>d(O):void 0,onComplete:typeof c=="function"&&O?.id!=null?()=>c(String(O.id)):void 0,onMore:typeof m=="function"?z=>m(O,z):void 0},O?.id!=null?`${r?.key||"t"}-${String(O.id)}`:`${r?.key||"t"}-${S}`)})]}),x>va&&g<x&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:k,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function z_(e){let t=0;const r=a=>{Array.isArray(a)?a.forEach(r):a!=null&&a!==!1&&a!==!0&&a!==""&&t++};return r(e),t}function W_({gap:e=10,count:t,className:r,children:a}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??z_(a);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const f=()=>{const g=m.style.maxWidth;m.style.maxWidth="none";const w=m.clientWidth;m.style.maxWidth=g;const N=m.firstElementChild?.offsetWidth??0;i(C=>C.width===w&&C.card===N?C:{width:w,card:N})};if(f(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(f);v.observe(m);const b=m.firstElementChild;b&&v.observe(b);let _=m.parentElement;for(let g=0;g<3&&_&&_!==document.body;g++,_=_.parentElement)v.observe(_);let y=null;const x=()=>{y===null&&(y=requestAnimationFrame(()=>{y=null,f()}))};return window.addEventListener("resize",x),()=>{v.disconnect(),window.removeEventListener("resize",x),y!==null&&cancelAnimationFrame(y)}},[u,e]);const c=l.card>0?l.card:0,p=c>0?Wb(l.width,c,e):0,h=p>0?Hb(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:we("training-block-grid",h>0&&"training-block-grid--measured",r),style:d,"data-cols":h>0?h:void 0,children:a})}function Os(e){const t=o.useRef(null),r=o.useRef(e);r.current=e;const[a,s]=o.useState({url:e,loading:!!e,failed:!1}),l=a.url===e?a:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var H_='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 V_=H_,zs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:r,selectable:a=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:p=null},h){const{t:d}=Ee.useTranslation(),m=e.word||e.title||"",f=t||!m,v=e.audio??e.sound??e.audioKey,b=e.subLabel||e.pronunciation||"",_=e.colloquialLabel||"",[y,x]=o.useState({label:m,subLabel:b,colloquialLabel:_,homonum:e.homonum});m&&(y.label!==m||y.subLabel!==b||y.colloquialLabel!==_||!Object.is(y.homonum,e.homonum))&&x({label:m,subLabel:b,colloquialLabel:_,homonum:e.homonum});const g=o.useRef(null),w=fn("(max-width: 767px)"),N=fn("(max-width: 429px)"),[C,B]=o.useState(!1),[k,E]=o.useState(!1),A=`${typeof v=="string"?v:v?.src??""}\0${m}`,[D,j]=o.useState({for:"",url:""}),S=D.for===A?D.url:"",O=Ei(),z=e.textOnly??(!e.image&&!!y.label&&!!O&&O.entries.length>0&&!O.byWord.has(y.label)),G=z?"":Br()?.(y.label,y.homonum)??e.image??"",{imgRef:M,loading:I,hasImage:W,onLoad:pe,onError:se}=Os(G);o.useEffect(()=>{let Z=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){j({for:A,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const ae=v.src;if(ae){j({for:A,url:ae});return}}}const X=Gr();if(X&&m)try{const ae=await Promise.resolve(X(m));!Z&&ae&&j({for:A,url:ae})}catch{}})(),()=>{Z=!0}},[v,m,A]);const $=o.useRef(!0),V=o.useRef(null);o.useEffect(()=>($.current=!0,()=>{$.current=!1,V.current&&Ja(V.current),V.current=null;try{g.current?.pause()}catch{}g.current=null}),[]);const ne=o.useCallback(()=>new Promise(Z=>{if(typeof window<"u"&&window.speechSynthesis&&m){B(!0),window.speechSynthesis.cancel();const X=new SpeechSynthesisUtterance(m);X.lang="ko-KR",X.onend=()=>{B(!1);try{r?.()}catch{}Z()},X.onerror=()=>{B(!1),Z()},window.speechSynthesis.speak(X)}else Z()}),[m,r]),te=o.useCallback(Z=>{const X=Ca(Z,ae=>{if(B(!1),ae)try{r?.()}catch{}});return g.current=X.el,X.done},[r]),P=o.useCallback(async()=>{if(t||!$.current)return;const Z=()=>{V.current===Z&&(V.current=null);try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}B(!1)},X=fa(Z);V.current=Z;try{window.speechSynthesis?.cancel()}catch{}try{if(S&&(B(!0),await te(S)))return;const ae=ka();if(ae&&m)try{E(!0);const Y=await Promise.resolve(ae(m));if(!$.current||V.current!==Z||(E(!1),Y&&(B(!0),await te(Y))))return}catch{}if(!$.current||V.current!==Z)return;await ne()}finally{V.current===Z&&E(!1),X(),V.current===Z&&(V.current=null)}},[t,S,m,te,ne]);o.useImperativeHandle(h,()=>({play:()=>P()}),[P]);const L=Z=>Z.stopPropagation(),R=o.useCallback(Z=>{if(Z.stopPropagation(),!t){if(C){try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}B(!1);return}P()}},[t,C,P]),U=we("training-word-card",t?"training-word-card--disabled":"",f?"training-word-card--flipped":"",a?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:U,onClick:a&&!t?l:void 0,role:a?"button":void 0,"aria-pressed":a?s:void 0,tabIndex:a&&!t?0:void 0,"aria-disabled":a&&t?!0:void 0,onKeyDown:a&&!t?Z=>{Z.target===Z.currentTarget&&(Z.key==="Enter"||Z.key===" "||Z.key==="Spacebar")&&(Z.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:f?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:L,children:n.jsx(Mn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:z?n.jsx("div",{className:"training-word-card__text-face",children:y.label}):W?n.jsxs(n.Fragment,{children:[I&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:M,className:"training-word-card__image",src:G,alt:y.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:I?0:1},onLoad:pe,onError:se})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!z&&n.jsx("div",{className:"training-word-card__word",children:y.label}),y.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",y.subLabel,"]"]}),y.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",y.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:a?L:void 0,children:n.jsx(fe,{htmlType:"button",size:N?32:w?40:48,type:w?"dot":"bar",icon:C?"pause":"play",label:w?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:C,loading:k,onClick:R,disabled:t,ariaLabel:y.label?C?d("training.stopFor",{name:y.label,defaultValue:`${y.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:y.label,defaultValue:`${y.label} \uC18C\uB9AC \uB4E3\uAE30`}):C?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${V_}")`}})})]})})}),fr={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function q_(e="landscape"){kt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:r,printH:a}=fr[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${r} !important; height: ${a} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function U_(e,t){if(e.length===0)return[[]];const r=Math.max(1,Math.floor(t)),a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}const G_={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function bd(e,t){const r=G_[e][t];if(r)return r;const a=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(a*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(a/i)):(l=s,i=Math.ceil(a/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function K_(e,t){const r=bd(e==="landscape"?"portrait":"landscape",t),a=Math.max(1,Math.ceil(t));if(a<=1)return r;const s=fr[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,f)=>Math.min(l/m/wd,i/f/Bd),c=Math.max(0,r.cols*r.rows-a),p=u(r.cols,r.rows);let h=r,d=p;for(let m=1;m<=a;m++){const f=Math.ceil(a/m);if(m*f-a>c)continue;const v=u(m,f);v>d&&(h={cols:m,rows:f},d=v)}return d>p*1.05?h:r}const Y_={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},yd={\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"},vd={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Ws={\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"},Hs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function xd(e){return Object.fromEntries(Object.entries(yd).map(([t,r])=>[t,Ws[t]?e(`wordTable.pos.${Ws[t]}`,{defaultValue:r}):r]))}function _d(e){return Object.fromEntries(Object.entries(vd).map(([t,r])=>[t,Hs[t]?e(`wordSearch.filter.type.${Hs[t]}`,{defaultValue:r}):r]))}const Z_={pos:Ws,wordType:Hs};function Vs(e,t){return e?e.split("/").map(r=>t[r]??r).join("/"):""}function qs(e,t,r,a){if(a!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<r-1;if(!i&&!u)return{};const c="#ddd",p=f=>`repeating-linear-gradient(to ${f}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const wd=280,X_=240,J_=280,Bd=400,Q_=120,ew=280;function kd(e,t){const r=o.useRef(null),[a,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=r.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:r,scale:a,offset:l}}const tw=24,nw={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},rw=400,Ad=8;function aw(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function Us({label:e,subLabel:t,colloquialLabel:r,captionLabel:a,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:f=40,wordInfo:v,outerScale:b=1}){const{t:_}=Ee.useTranslation(),y=o.useRef(null),x=o.useRef(null),g=o.useRef(null),[w,N]=o.useState(1),[C,B]=o.useState(!1),[k,E]=o.useState(!1),[A,D]=o.useState({for:"",url:""}),[j,S]=o.useState(null),O=t&&t.length>0?t:mb()?.(e,u)??"",z=Br()?.(l||e,u)??"",{imgRef:G,loading:M,failed:I,onLoad:W,onError:pe}=Os(z),se=o.useCallback(()=>S(x.current?.getBoundingClientRect()??null),[]),$=o.useCallback(()=>S(null),[]),V=Oa(!!j,ie=>{ie?se():$()},x),ne=o.useMemo(()=>{if(!v)return null;const ie=[];return v.grade&&ie.push(_("wordTable.info.grade",{n:v.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),v.syllables&&ie.push(_("wordTable.info.syllables",{n:v.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),v.pos&&ie.push(_("wordTable.info.pos",{v:Vs(v.pos,xd(_)),defaultValue:"\uD488\uC0AC: {{v}}"})),v.wordType&&ie.push(_("wordTable.info.wordType",{v:Vs(v.wordType,_d(_)),defaultValue:"\uC720\uD615: {{v}}"})),ie.length?ie:null},[v,_]),te=O||e,P=A.for===te?A.url:"";o.useEffect(()=>{const ie=Gr(),J=O||e;if(!ie||!J)return;let F=!1;return Promise.resolve().then(()=>ie(J)).catch(()=>"").then(Q=>{!F&&Q&&D({for:J,url:Q})}),()=>{F=!0}},[O,e]);const L=o.useRef(null),R=o.useRef(null);o.useEffect(()=>()=>{g.current?.pause(),R.current?.()},[]);const U=o.useRef(null);o.useEffect(()=>()=>{U.current&&(U.current.cancelled=!0)},[]);const Z=o.useCallback(ie=>{if(ie.stopPropagation(),C||k){L.current?.();return}if(!P){const F=ka(),Q=O||e;if(!F||!Q)return;const H={cancelled:!1,stop:null};U.current=H;const le=()=>{H.cancelled=!0,H.stop?.(),E(!1),B(!1),R.current?.()};L.current=le,R.current=fa(le),E(!0),Promise.resolve().then(()=>F(Q)).then(re=>{if(H.cancelled)return;if(!re){le();return}D({for:Q,url:re});const de=Ca(re,()=>{B(!1),R.current?.()});g.current=de.el,H.stop=de.stop,E(!1),B(!0)}).catch(()=>{le()});return}B(!0);const J=Ca(P,()=>{B(!1),R.current?.()});g.current=J.el,L.current=J.stop,R.current=fa(J.stop)},[C,k,P,O,e]),X=p&&!!z&&!I,ae=X&&c?wd:X?J_:X_,Y=X&&c?Bd:X?ew:Q_;o.useEffect(()=>{const ie=y.current;if(!ie||typeof ResizeObserver>"u")return;const J=new ResizeObserver(([F])=>{const{width:Q,height:H}=F.contentRect;N(Math.min(Q/ae,H/Y))});return J.observe(ie),()=>J.disconnect()},[ae,Y]);const xe=f*b<tw;return n.jsxs("div",{ref:y,className:we("word-table-cell",xe&&"word-table-cell--tap-too-small",X?"word-table-cell--with-image":""),"data-ref-w":ae,"data-ref-h":Y,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${w})`},children:[X&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[M&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:G,className:"word-table-cell__image",src:z,alt:e,draggable:!1,style:{opacity:M?0:1},onLoad:W,onError:pe})]}),m&&(s||a)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(rn,{fill:"soft",size:"small",label:s}),a&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:a})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&O&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",O,"]"]}),d&&r&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",r,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":P,children:[n.jsx("span",{"data-play-state":"play",style:{display:C?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?_("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):_("common.play","\uC7AC\uC0DD"),ariaLabel:e?_("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):_("common.play","\uC7AC\uC0DD"),onClick:Z})}),n.jsx("span",{"data-play-state":"pause",style:{display:C?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:_("common.pause","\uBA48\uCDA4"),ariaLabel:e?_("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):_("common.pause","\uBA48\uCDA4"),onClick:Z})})]}),v&&n.jsxs("div",{ref:x,className:"word-table-cell__info-button",onPointerEnter:ie=>{er(ie)||se()},onPointerLeave:ie=>{er(ie)||$()},onFocus:()=>{ur()||se()},onBlur:$,children:[n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:_("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ie=>{ie.stopPropagation(),V.touchPress()}}),j&&ne&&n.jsx(Qn,{anchorRect:j,items:ne,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:f,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:_("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?_("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):_("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:ie=>{ie.stopPropagation(),i.onPick(ie.currentTarget.getBoundingClientRect())}})})]})]})}function Pr({title:e,titleIcon:t,disc:r,className:a,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:f,activeCell:v=null,onActivateCell:b,onRemoveCell:_,onRemoveItem:y,onReorder:x,onCopyItem:g,onReplaceItem:w,onPickForm:N,indexOffset:C=0,totalCount:B,renderCellAction:k,showFillerAdd:E=!1,fillerAdd:A="first",addableCount:D,contentRef:j,buttonSize:S=40,brand:O,code:z,pageNumber:G,pageNumberPosition:M="right",fitHeight:I=!1,scoring:W=!1,marks:pe,onMarkClick:se,scoreIndexOffset:$=0}){const V=o.useCallback((ue,Se)=>{se?.($+ue,Se)},[se,$]),ne=(ue,Se)=>{const Pe=ue.filter(Boolean).join(" / ");return Pe?Se?P("wordPrint.removePairFor",{name:Pe,defaultValue:`${Pe} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):P("wordPrint.removeWordFor",{name:Pe,defaultValue:`${Pe} \uBE7C\uAE30`}):Se?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},te=(ue,Se)=>{const Pe=pe?.[Za($+ue)]??null;return n.jsx("div",{className:we("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:mt>1?{transform:`translateX(-50%) scale(${mt})`,transformOrigin:"bottom center"}:void 0,children:Xa.map(Ge=>n.jsx("span",{className:we("word-table-cell__score-slot",Pe===Ge?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",shape:"pill",icon:xs[Ge],variant:Pe===Ge?_s[Ge]:"default",selected:Pe===Ge,useBorder:!1,...ft?{}:{tabIndex:-1,role:"img"},showTooltipInfo:P(`wordTable.scoring.markName.${Ge}`,{defaultValue:Ge}),ariaLabel:P(`wordTable.scoring.${Ge}`,{word:Se,defaultValue:`${Se} ${Ge}`}),onClick:ft?st=>{st.stopPropagation(),V(ue,Ge)}:void 0})},Ge))})},{t:P}=Ee.useTranslation(),L=m!==void 0,R=e!=null||!!t||!!r,U=fn("(max-width: 767px)"),Z=o.useRef(null),[X,ae]=o.useState(null),Y=d?.length??0,xe=B??Y,[ie,J]=o.useState(null),[F,Q]=o.useState(""),H=o.useRef(null),le=o.useRef(null),re=o.useRef(null),de=o.useRef(null),Be=o.useCallback(ue=>{le.current=ue,typeof j=="function"?j(ue):j&&(j.current=ue)},[j]),ke=o.useCallback((ue,Se)=>{H.current=C+Se,x?.(ue,Se),Q(P("wordTable.reorder.moved",{n:C+Se+1,total:xe,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[x,P,xe,C]);o.useEffect(()=>{const ue=H.current;ue!=null&&(H.current=null,(le.current?.closest(".word-table-block__pages")??le.current)?.querySelector(`[data-wordtable-index="${ue}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{de.current?.()},[]);const Ne=o.useCallback((ue,Se)=>{if(!x||!ue.altKey||ue.ctrlKey||ue.metaKey)return;const Pe=ue.key==="ArrowRight";if(!Pe&&ue.key!=="ArrowLeft")return;ue.preventDefault();const Ge=Se+(Pe?1:-1),st=C+Ge;st<0||st>=xe||ke(Se,Ge)},[x,xe,C,ke]),Re=o.useCallback((ue,Se)=>{if(!x||ue.pointerType==="mouse")return;const Pe=ue.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;de.current?.();const Ge={x:ue.clientX,y:ue.clientY};let st=!1;const Ot=Ye=>{st&&Ye.cancelable&&Ye.preventDefault()};let ct=null,Yt=null;const $t=()=>{const Ye=Yt;if(!Ye)return;const at=document.elementFromPoint?.(Ye.x,Ye.y)?.closest?.("[data-wordtable-cell]"),dt=at?Number(at.dataset.wordtableCell):NaN,jt=Number.isInteger(dt)?dt:null;re.current=jt,ae(zt=>zt===jt?zt:jt)},Ke=Ye=>{if(!st){(Math.abs(Ye.clientX-Ge.x)>Ad||Math.abs(Ye.clientY-Ge.y)>Ad)&&He();return}if(Yt={x:Ye.clientX,y:Ye.clientY},typeof requestAnimationFrame>"u"){$t();return}ct===null&&(ct=requestAnimationFrame(()=>{ct=null,$t()}))},K=()=>{ct!==null&&(cancelAnimationFrame(ct),ct=null,$t());const Ye=re.current,at=st;He(),at&&Ye!=null&&Ye!==Se&&ke(Se,Ye)},Ce=setTimeout(()=>{st=!0,J(Se),re.current=Se,ae(Se),window.addEventListener("touchmove",Ot,{passive:!1})},rw);function He(){clearTimeout(Ce),window.removeEventListener("pointermove",Ke),window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K),window.removeEventListener("touchmove",Ot),st=!1,ct!==null&&(cancelAnimationFrame(ct),ct=null),re.current=null,de.current=null,J(null),ae(null)}de.current=He,window.addEventListener("pointermove",Ke),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)},[x,ke]),{width:ye,height:_e}=fr[s],Ae=typeof I=="number"?I:I&&typeof I=="object"?U?I.narrow:I.wide:null,{scalerRef:Oe,scale:je,offset:tt}=kd(ye,I?_e:void 0),Ct=L?m?.length??0:d?.length??0,Ie=Math.max(f??Ct,1),qe=!L&&!!i,nt=K_(s,Ie),We=bd(s,Ie),Ze=qe?nt.cols:We.cols,ot=qe?nt.rows:We.rows,gt=qe&&s==="landscape"?nt.cols*2:Ze,ht=qe&&s==="portrait"?nt.rows*2:ot,xt=ue=>({word:ue.length===0||ue.includes("word"),image:ue.length===0||ue.includes("image"),pron:ue.length===0||ue.includes("standardPron"),colloq:ue.length===0||ue.includes("colloquialPron"),caption:ue.length===0||ue.includes("caption")}),ut=xt(l),Gt=o.useMemo(()=>{const ue=(d??[]).map(Pe=>Pe.id),Se=ue.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(ue).size===ue.length;return!Se&&ue.length>0&&kt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Se?ue:null},[d]),_t=xt(u??l),Pt=L?(m??[]).some(ue=>ue!==null&&ue.length>1):(d??[]).some(ue=>(ue.words??[]).length>1),Qe=!!O?.show,De=!!O?.show&&O?.top!==!1,rt=!!O?.show&&O?.bottom!==!1,it=O?.copyright??"\xA9 IHAB, Inc. All rights reserved.",bt=ce(we("word-table__content",Y_[c],p&&"word-table__content--outline",h&&Pt&&"word-table__content--div-line",!Qe&&G&&M!=="none"&&"word-table__content--page-number",De&&"word-table__content--brand-top",rt&&"word-table__content--brand-bottom")),Nt={transform:`scale(${1/je})`,transformOrigin:"center center"},It=S*Xa.length+4*(Xa.length-1),ft=!!se,mt=ft?Math.max(1,Math.min(1/je,ye/gt/It)):1,[At,Et]=o.useState(ws);ma(()=>{if(!W)return;const ue=le.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!ue)return;const Se=ue.getBoundingClientRect().width;Se>0&&Et(f4(Se))},[W,je,mt,S,Y]);const Je=n.jsxs("div",{ref:Oe,className:"word-table__scaler",style:{height:_e*je,"--word-table-mark-stroke":At},children:[n.jsx("div",{className:we("word-table",W&&!ft&&"word-table--score-readonly",!R&&a),style:{width:ye,height:_e,transform:`scale(${je})`,transformOrigin:"top left",marginLeft:tt},children:n.jsxs("div",{ref:Be,className:bt,style:{gridTemplateColumns:`repeat(${gt}, 1fr)`,gridTemplateRows:aw(ht)},children:[L?n.jsx(n.Fragment,{children:(m??[]).map((ue,Se)=>n.jsx("div",{className:ce(we("word-table__edit-cell",ue?"word-table__edit-cell--filled":"word-table__edit-cell--empty",v===Se?"word-table__edit-cell--active":"")),style:qs(Se,gt,ht,c),children:ue?n.jsxs(n.Fragment,{children:[ue.map((Pe,Ge)=>n.jsxs(o.Fragment,{children:[Ge>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:ut.word,showImage:ut.image,showPronunciation:ut.pron,showColloquial:ut.colloq,showCaption:ut.caption,buttonSize:S})]},Ge)),W&&te(Se,ue.map(Pe=>Pe.word).join(" / ")),_&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ue.length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ne(ue.map(Pe=>Pe.word),ue.length>1),onClick:()=>_(Se)})})]}):b&&n.jsx("div",{className:ce("word-table__card-add"),style:Nt,children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[qe&&i&&n.jsx("div",{className:ce("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${nt.cols}`,gridRow:`1 / span ${nt.rows}`,...qs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ue,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:ue.label,subLabel:ue.subLabel,colloquialLabel:ue.colloquialLabel,captionLabel:ue.captionLabel,captionBadge:ue.captionBadge,imageLabel:ue.imageLabel,pickForm:N&&ue.canPickForm?{n:null,onPick:Pe=>N(i.id,-1,Pe)}:void 0,homonum:ue.homonum,showWord:_t.word,showImage:_t.image,showPronunciation:_t.pron,showColloquial:_t.colloq,showCaption:_t.caption,buttonSize:S,wordInfo:ue.grade||ue.syllables!=null||ue.pos||ue.wordType?{grade:ue.grade,syllables:ue.syllables,pos:ue.pos,wordType:ue.wordType}:void 0})]},Se))}),(d??[]).map((ue,Se)=>n.jsxs("div",{"data-wordtable-cell":x?Se:void 0,"data-wordtable-index":x?C+Se:void 0,className:ce(`word-table__card${x?" word-table__card--draggable":""}${X===Se?" word-table__card--drag-over":""}${ie===Se?" word-table__card--dragging":""}`),style:qs(Se,Ze,ot,c),draggable:!!x,onPointerDown:x?Pe=>Re(Pe,Se):void 0,onKeyDown:x?Pe=>Ne(Pe,Se):void 0,onDragStart:x?()=>{Z.current=Se}:void 0,onDragOver:x?Pe=>{Pe.preventDefault(),ae(Se)}:void 0,onDragLeave:x?()=>ae(null):void 0,onDrop:x?Pe=>{Pe.preventDefault(),Z.current!==null&&Z.current!==Se&&x(Z.current,Se),Z.current=null,ae(null)}:void 0,onDragEnd:x?()=>{Z.current=null,ae(null)}:void 0,children:[(ue.words??[]).map((Pe,Ge)=>n.jsxs(o.Fragment,{children:[Ge>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(Us,{outerScale:je,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,imageLabel:Pe.imageLabel,pickForm:N&&Pe.canPickForm?{n:C+Se+1,onPick:st=>N(ue.id,C+Se,st)}:void 0,homonum:Pe.homonum,showWord:ut.word,showImage:ut.image,showPronunciation:ut.pron,showColloquial:ut.colloq,showCaption:ut.caption,buttonSize:S,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},Ge)),W&&te(Se,(ue.words??[]).map(Pe=>Pe.label).join(" / ")),(k||y||g||w||x)&&n.jsxs("div",{className:ce("word-table__card-actions"),children:[y&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ne((ue.words??[]).map(Pe=>Pe.label),(ue.words??[]).length>1),onClick:()=>y(ue.id)})}),g&&n.jsx("div",{className:ce("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:P("wordTable.copyItemAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>g(ue.id,C+Se)})}),w&&n.jsx("div",{className:ce("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?P("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):P("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ue.words??[]).length>1?P("wordTable.replacePairAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):P("wordTable.replaceItemAria",{n:C+Se+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>w(ue.id,C+Se)})}),k?.(Se,ue),x&&n.jsx("div",{className:ce("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:P("wordTable.reorder.handle",{word:(ue.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Gt?Gt[Se]:Se)),Array.from({length:Math.max(0,Ze*ot-(d?.length??0))}).map((ue,Se)=>{const Pe=Ze*ot,Ge=D??Pe,st=(d?.length??0)+Se<Ge;return n.jsx("div",{className:ce("word-table__card word-table__card--filler"),children:E&&b&&st&&(A==="every"||Se===0)&&n.jsx("div",{className:ce("word-table__card-add"),style:Nt,children:n.jsx(fe,{htmlType:"button",size:S,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Se)})})},`filler-${Se}`)})]}),De&&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:O?.topLogo?.src??Ga,alt:O?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ue=[O?.title&&n.jsx("span",{className:"word-table__paper-title",children:O.title},"t"),O?.owner&&n.jsx("span",{className:"word-table__owner",children:O.owner},"o"),z&&n.jsx("span",{className:"word-table__code",children:z},"c")].filter(Boolean);return ue.length===0?null:n.jsx("span",{className:"word-table__ident",children:ue.map((Se,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Pe))})})()]})}),rt&&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:[O?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:O.bottomLogo.src,alt:O.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:it})]}),n.jsxs("span",{className:"word-table__band-end",children:[O?.link&&n.jsx("span",{className:"word-table__link",children:O.link}),G&&M!=="none"&&n.jsx("span",{className:"word-table__page-count",children:P("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})]})}),!Qe&&G&&M!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${M}`,children:P("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})}),x&&n.jsx("span",{role:"status",style:nw,children:F})]}),wt=Ae==null?Je:n.jsx("div",{className:"word-table__frame",style:{height:Ae},children:Je});return R?n.jsx(Rr,{type:"page",icon:t,title:e,disc:r,className:we(ce("word-table__section"),a),children:wt}):wt}function ow(e,t,r){const a=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=sw(s,t?.[s.label],r);i!==null&&a.push(`${l} ${i}`)}return a.join(" \xB7 ")}function sw(e,t,r){const a=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==Tn);return a.length===0?e.allOption?e.allLabel??r:null:a.map(s=>lw(e,s)).join(", ")}function lw(e,t){const r=[...e.items??[],...(e.groups??[]).flat()];for(const a of r)if(a!=null){if(typeof a=="string"){if(a===t)return a;continue}if(a.value===t)return a.displayLabel??a.labels?.join(" ")??a.value}return t}function Gn({title:e,titleLevel:t=2,headerAction:r,headerSummary:a,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:f,className:v}){const b=kn()??gn,_=(m??(f==="vertical"?"newline":"inline"))==="inline",{t:y}=Ee.useTranslation(),[x,g]=o.useState(l),w=i??x,N=()=>{const j=!w;g(j),u?.(j)},C=j=>{if(!s)return;const S=j.target;!S||typeof S.closest!="function"||S.closest(".filter-panel__collapse-toggle")||S.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},B=o.useMemo(()=>a!==void 0||!w?"":ow(p,h,y("common.all","\uC804\uCCB4")),[a,w,p,h,y]),k=a??(B?n.jsx("span",{className:"filter-panel__header-summary body-3",children:B}):null),E=e||r||a||s,A=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",v),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?A:void 0,children:[E&&n.jsxs("div",{className:"filter-panel__header",onClick:s?C:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:A,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?k:r,s&&n.jsx(fe,{htmlType:"button",size:b,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?y("common.expand","\uD3BC\uCE58\uAE30"):y("common.collapse","\uC811\uAE30"),showTooltipInfo:w?y("common.expand","\uD3BC\uCE58\uAE30"):y("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:N})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",_?"filter-panel__sections--row":""),children:p.map(j=>{const S=h[j.label],O=S===void 0||(Array.isArray(S)?S.length===0:!1),z=(j.items??[]).filter(M=>M!=null);j.allOption&&z.some(M=>(typeof M=="string"?M:M.value)===Tn)&&kt(`filter-panel-all-value:${j.label}`,`[FilterPanel] '${j.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${Tn}' \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 G=M=>{const I=typeof M=="string"?M:M.value,W=typeof M!="string"&&!!M.disabled,pe=typeof M!="string"?M.labels:void 0,se=typeof M!="string"?M.displayLabel:void 0,$=typeof M!="string"?M.tooltip:void 0,V=typeof M!="string"?M.descriptionTooltip:void 0,ne=typeof M!="string"?M.shape:void 0,te=Array.isArray(S)?S.includes(I):S===I;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:pe??se??I,type:j.itemType??(pe?"bar":I.length===1?"dot":void 0),selected:te,disabled:W,shape:ne,showTooltipInfo:!!$,tooltipInfoText:$,tooltipDescription:V,onClick:()=>d?.(I,j.label)},I)};return n.jsxs(o.Fragment,{children:[j.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:j.groupLabel}),j.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",j.layout==="row"?"filter-panel__section--row":"",j.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:j.displayLabel??j.label}),j.labelAction??(j.labelInfo?n.jsx(ca,{...j.labelInfo}):null)]}),j.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:j.content}):j.type==="input"?n.jsx(qn,{className:"filter-panel__textfield",placeholder:j.placeholder,ariaLabel:j.displayLabel??j.label,value:h[j.label]??"",onChange:M=>d?.(M,j.label),error:j.error}):!j.multiple&&j.display==="segmented"?n.jsx(An,{ariaLabel:j.displayLabel??j.label,options:[...j.allOption?[{key:Tn,label:j.allLabel??y("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...z.map(M=>{const I=typeof M=="string"?M:M.value,W=typeof M!="string"?M.displayLabel:void 0,pe=typeof M!="string"?M.disabled:void 0;return{key:I,label:W??I,disabled:pe}})],value:O&&j.allOption?Tn:h[j.label]??"",onChange:M=>d?.(M,j.label),size:32}):!j.multiple&&j.display==="dropdown"?n.jsx(Nn,{className:"filter-panel__dropdown",ariaLabel:typeof j.label=="string"?j.label:void 0,size:b,options:[...j.allOption?[{value:Tn,label:j.allLabel??y("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...z.map(M=>{const I=typeof M=="string"?M:M.value,W=typeof M!="string"?M.displayLabel:void 0,pe=typeof M!="string"?M.disabled:void 0;return{value:I,label:W??I,disabled:pe}})],value:O&&j.allOption?Tn:h[j.label],onChange:M=>d?.(M,j.label)}):n.jsxs("div",{className:j.groups?"filter-panel__item-groups":"filter-panel__items",children:[j.allOption&&!j.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:j.allLabel??y("common.all","\uC804\uCCB4"),selected:O,disabled:j.allOptionDisabled,onClick:()=>d?.(Tn,j.label)}),j.groups?j.groups.map((M,I)=>n.jsxs("div",{className:"filter-panel__item-group",children:[I===0&&j.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:j.allLabel??y("common.all","\uC804\uCCB4"),selected:O,disabled:j.allOptionDisabled,onClick:()=>d?.(Tn,j.label)}),M.filter(W=>W!=null).map(G)]},I)):z.map(G)]})]})]},j.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const iw=[1,2,3,4,5,6,7,8,9,10,11,12],uw=[8,6,4,2,1],_n="show",Rn="hide",Nd=["image","word","caption","standardPron"];function Ed(e){return e.some(t=>(t.words??[]).some(r=>!!r.captionBadge||!!r.captionLabel))}function jd(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Dd(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 Sd(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Td(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Md(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function $d(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ld(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Rd(e,t){const r=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[r,...uw.filter(a=>a<r)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Pd(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function cw(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:Rn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Fd(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Id(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?_n:Rn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?_n:Rn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?_n:Rn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?_n:Rn}:{}}}function Od(e,t,r,a){return r===e("wordTable.filter.composition","\uAD6C\uC131")?t===Tn?(a.setContentTypes(()=>[]),!0):(a.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):r===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(a.setOrientation(t==="landscape"?"landscape":"portrait"),!0):r===e("wordTable.filter.border","\uC678\uACFD\uC120")?(a.setShowOutline(t===_n),!0):r===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(a.setCutLine(t),!0):r===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(a.setShowDivLine(t===_n),!0):r===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(a.setShowTopInfo?.(t===_n),!0):r===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(a.setShowBottomInfo?.(t===_n),!0):!1}function dw(e){return"sections"in e}function Gs(e){const{t}=Ee.useTranslation(),{title:r,className:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(dw(e))return n.jsx(Gn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:f,orientation:v,showOutline:b,cutLine:_,showDivLine:y,setters:x,showCutLine:g=!1,showDivLine2:w=!1,middleSections:N=[],extraSelected:C={},onExtraSelect:B,showPaperBands:k=!1,showTopInfo:E=!0,showBottomInfo:A=!0}=e,D=[jd(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Dd(t),...N,Sd(t),...g?[$d(t)]:[],...w?[Ld(t)]:[],...k?[Td(t),Md(t)]:[]],j={...Id(t,{contentTypes:f,orientation:v,showOutline:b,cutLine:_,showDivLine:y,showTopInfo:E,showBottomInfo:A}),...C},S=(O,z)=>{Od(t,O,z,x)||B?.(O,z)};return n.jsx(Gn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:j,onSelect:S,...p,sectionAlign:"horizontal"})}function Ks(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function pw(e){return Ks(e).replace(/"/g,""").replace(/'/g,"'")}function Ys(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let ro=null,Fr=null;function hw(e,t,r,a="",s=""){if(e.length===0||Fr&&Fr.iframe.isConnected&&Date.now()-Fr.at<1e4)return;const l=a?Ys(a):"";ro?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),ro===i&&(ro=null)},ro=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}Fr={iframe:u,at:Date.now()},c.open(),c.write(Zs(e,t,r,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Fr?.iframe===u&&(Fr=null)},0)})}function Zs(e,t,r,a=!1,s="",l=""){s=s?Ys(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
850
850
|
`),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${Ks(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(f=>f.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(f=>f.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(f=>f.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(f=>f.remove()),m.querySelectorAll("img").forEach(f=>{f.style.opacity==="0"&&(f.setAttribute("onload","this.style.opacity=''"),f.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
|
|
851
851
|
`);return`<!DOCTYPE html>
|
|
852
852
|
<html${c?` lang="${pw(c)}"`:""} data-theme="${u}">
|
|
@@ -1056,10 +1056,10 @@ ${C.badge}`:C.badge:void 0;if(k&&h(C.code))return null;if(!C.badge&&!m)return f(
|
|
|
1056
1056
|
`:""}
|
|
1057
1057
|
<\/script>
|
|
1058
1058
|
</body>
|
|
1059
|
-
</html>`}const mw=1e3;function Xs({getElements:e,paperW:t,paperH:r,fileName:a="",onPopupBlocked:s,header:l=""}){const{t:i}=Ee.useTranslation(),u=o.useCallback(()=>{hw(e(),t,r,a,l)},[e,t,r,a,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(Zs(h,t,r,!1,a,l)),d.document.close()},[e,t,r,a,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=Zs(h,t,r,!1,a,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),f=URL.createObjectURL(m),v=(a?Ys(a):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),y=Object.assign(document.createElement("a"),{href:f,download:`${v}.html`});document.body.appendChild(y),y.click(),document.body.removeChild(y),setTimeout(()=>URL.revokeObjectURL(f),mw)},[e,t,r,a,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function zd(e,t){const{t:r}=Ee.useTranslation(),a=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...Nd]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[f,v]=o.useState(!0),[y,x]=o.useState(!0),[b,_]=o.useState(!0),[g,w]=o.useState(8),[N,C]=o.useState("right"),B=e.length,k=e.some(se=>(se.words??[]).length>1),E=e.some(se=>(se.words??[]).some($=>!!$.colloquialLabel)),A=Ed(e),D=Math.max(1,Math.min(Math.max(B,1),s??Math.max(B,1))),j=Math.min(g,D),M=o.useMemo(()=>U_(e,j),[e,j]),W=M.length>1,z=j,[G,T]=o.useState(!1);o.useEffect(()=>{let se=!1;if(!Br()){T(!1);return}return Promise.all(e.flatMap($=>($.words??[]).map(V=>yi(V.label,V.homonum)))).then($=>{se||T($.some(Boolean))},()=>{}),()=>{se=!0}},[e]);const I=o.useMemo(()=>[jd(r,{hasImage:G,hasColloquial:E,hasCaption:A}),Dd(r),...B>0?[Rd(r,{hasPairs:k,itemCount:B,max:s})]:[],Sd(r),...z>1?[$d(r)]:[],...k?[Ld(r)]:[],...a?[Td(r),Md(r)]:[]],[r,G,E,A,B,k,W,z,a,s]),O={...Id(r,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:b,showTopInfo:f,showBottomInfo:y}),...B>0?{[r(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${j}\uAC1C`}:{},...W?{[r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},pe=o.useCallback((se,$)=>{Od(r,se,$,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:_,setShowTopInfo:v,setShowBottomInfo:x})||($===r("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||$===r("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?w(Pd(parseInt(se),B)):$===r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&C(Fd(se)))},[r,B]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:b,count:z,showTopInfo:f,showBottomInfo:y},filterSections:I,filterSelected:O,handleSelect:pe,pages:M,isPaginated:W,pageNumberPosition:N}}function fw({items:e,words:t,baseItem:r,baseContentTypes:a,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:f,showSettings:v,autoPrint:y,className:x,onClose:b,scoring:_=!1,onScoreChange:g,printHeader:w,brand:N,code:C,beforeClose:B}){const{t:k}=Ee.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(F=>typeof F=="string"&&F.length>0).map((F,Q)=>({id:`${F}-${Q}`,words:[{label:F}]})),[e,t]),{settings:A,filterSections:D,filterSelected:j,handleSelect:M,pages:W,isPaginated:z,pageNumberPosition:G}=zd(E,{paperBands:!!N?.show,maxItemsPerPage:s}),T=o.useMemo(()=>Rc(W.map(F=>F.length)),[W]),[I,O]=o.useState({}),pe=o.useCallback((F,Q)=>{O(H=>({...H,[Ya(F)]:Lc(H[Ya(F)]??null,Q)}))},[]),se=o.useRef(g);o.useEffect(()=>{se.current=g});const $=o.useRef(I);o.useEffect(()=>{$.current!==I&&($.current=I,se.current?.(Bs(I)))},[I]);const V=o.useMemo(()=>Bs(I),[I]),ne=o.useRef(null),{toastMessage:te,toastKey:P,showWarning:L,clearToast:R}=Pu("warning"),U=o.useRef([]),Z=o.useCallback(()=>z?U.current.filter(F=>F!==null):ne.current?[ne.current]:[],[z]),{print:X,openNewWindow:ae}=Xs({getElements:Z,paperW:fr[A.orientation].width,paperH:fr[A.orientation].height,fileName:f??"",header:w??"",onPopupBlocked:()=>L(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."))}),Y=o.useMemo(()=>h?void 0:p?p({print:X,openNewWindow:ae}):f?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ae()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>X()},...c??[]]:c,[h,p,f,c,k,X,ae]),xe=o.useMemo(()=>h?h({print:X,openNewWindow:ae}):void 0,[h,X,ae]),ie=o.useRef(!1),J=o.useRef(X);return o.useEffect(()=>{J.current=X},[X]),o.useEffect(()=>{if(!y||ie.current)return;const F=window.setTimeout(()=>{ie.current=!0,J.current()},100);return()=>window.clearTimeout(F)},[y]),n.jsxs(Vn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,width:"large",className:we("word-table-popup",x),buttons:Y,footer:xe,footerClassName:d,footerLayout:m,beforeClose:B,onClose:b,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[v&&n.jsx(Gs,{sections:D,selected:j,onSelect:M}),z?n.jsx("div",{className:"word-table-popup__pages",children:W.map((F,Q)=>n.jsx(Pr,{items:F,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:H=>{U.current[Q]=H},pageNumber:{current:Q+1,total:W.length},pageNumberPosition:G,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:C,scoring:_,scoreIndexOffset:T[Q],marks:V,onMarkClick:pe},Q))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Pr,{items:E,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ne,fitHeight:!0,scoring:_,marks:V,onMarkClick:pe,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:C})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Lr,{message:te,position:"top",onClose:R},P)]})}const Cw=new Set(["x","triangle"]);function gw(e,t){const r=[];for(let a=0;a<e.length;a++){const s=t[String(a)];s&&Cw.has(s)&&r.push(e[a])}return r}const bw=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Wd(e){const t=e.name.trim(),r=e.reviewRound;if(typeof r=="number"&&Number.isFinite(r)&&r>=0){const l=Math.floor(r);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let a=t,s=1;for(;;){const l=bw.exec(a);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),a=a.slice(0,l.index).trim()}return{base:a,round:s}}function yw(e,t){const[,r,a]=Vo(t).split("-"),s=`${r}.${a}`,{base:l,round:i}=Wd(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function vw(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Wd(e).round}}function xw(e,t){const r={};for(const[a,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(a),i=e[l];i&&(r[a]=i)}return r}function _w(e){return e.map(t=>t.label).join(" / ")}function ww(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Hd(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function Bw(e,t,r){const a=Li(r);return[e.trim(),a,t.trim()].filter(Boolean).join(" \xB7 ")}function Vd(e,t,r){return r===0?0:(e+t*.5)/r}function kw(e){const t=new Map,r=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of r)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const a=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;a.push({label:Hd(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Vd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return a.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||xn(s.label,l.label)||xn(s.key??s.label,l.key??l.label)),a}function Aw(e){const t=new Map;for(const a of e){const s=a.tableId??`name:${a.tableName}`,l=t.get(s)??{tableName:a.tableName,tableId:a.tableId,rows:[]};l.rows.push(a),t.set(s,l)}const r=[];for(const a of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=a.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Vd(p,h,s(u))});r.push({tableName:a.tableName,tableId:a.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return r.sort((a,s)=>(s.times[s.times.length-1]??"").localeCompare(a.times[a.times.length-1]??"")),r}function Nw(e,t=8){return e.filter(r=>r.latest!=="o").slice(0,t)}function Ew(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const r=String(e),a=String(t);return+(r>a)-+(r<a)}function jw(e){const t=new Map;let r=0,a=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||Ew(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){a++;continue}r++;const c=i.itemId?.trim()||u,p=`${i.trainingType}|${c}`,h=t.get(p)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||xn(i.title,u.title)),{items:l,counted:r,skippedNoTitle:a}}function Dw(e,t=8){return e.filter(r=>!r.latestCorrect).slice(0,t)}function Sw(e){const t=new Map;for(const a of e){const s=t.get(a.trainingType)??[];s.push(a),t.set(a.trainingType,s)}const r=[...t.entries()].map(([a,s])=>({trainingType:a,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return r.sort((a,s)=>s.pending-a.pending||a.trainingType.localeCompare(s.trainingType)),r}const Js=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function Tw(e){const t=new Map;let r=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){r++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const a=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>Js.includes(l.trainingType)).sort(a),word:s.filter(l=>!Js.includes(l.trainingType)).sort(a),noSet:r}}function Mw(e,t,r=5){const a=new Set(t);if(a.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)a.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||xn(l.name,i.name)),s.slice(0,Math.max(0,r))}function $w(e,t){const r=new Set(e.flatMap(a=>a.covered));return t.filter(a=>!r.has(a))}function Lw(e,t){const r=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);r.has(i)||r.set(i,l)}const a=[];for(const s of t){const l=r.get(s);l!==void 0&&a.push(l)}return a}function Qs(e,t,r){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(r[s]))}function Rw(e,t){const r=Number.isFinite(e)?Math.round(e):0;if(!r||r<=0)return"-";const a=Math.floor(r/60),s=r%60;return t?t(a,s):a>0&&s>0?Qs(Mt.t("customers.duration.minSec",{m:a,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:a,s}):a>0?Qs(Mt.t("customers.duration.min",{m:a,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:a}):Qs(Mt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function Pw(e,t){const r=[],a=new Set;for(const s of e){const l=t(s);a.has(l)||(a.add(l),r.push({key:l,value:s,pinned:!1}))}return r}function Fw(e,t){return e.map(r=>r.key===t?{...r,pinned:!r.pinned}:r)}function Iw(e,t){return e.filter(r=>r.key!==t)}function Ow(e,t,r){const a=e.filter(p=>p.pinned),s=new Set(a.map(p=>p.key)),l=e.length-a.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=r(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function zw(e){return e.map(t=>t.value)}function Ww(e){const{category:t={},isSelected:r=!1,onClick:a}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${r?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:r?void 0:a,"aria-pressed":r,"aria-labelledby":l,children:n.jsx(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Hw(e){const{categories:t=[],selected:r,onSelect:a,size:s="medium"}=e||{},l=r!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?r:i,p=o.useRef(a);o.useEffect(()=>{p.current=a});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const f=i??d;i==null&&u(f),p.current?.(f)},[l,d]);const m=o.useCallback(f=>{const v=c===f?null:f;h.current=!0,l||u(v),a?.(v)},[c,l,a]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(f=>n.jsx(Ww,{category:f,isSelected:c===f.key,onClick:()=>m(f.key)},f.key))})}function Vw({subs:e=[],selected:t,onSelect:r,size:a="medium"}){const s=a==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${a}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>r?.(l.key)},l.key))})})}function qw({onTermsClick:e,onPrivacyClick:t,contact:r}={}){const a=r?.email??"support@ihab.co.kr",s=r?.tel??"031-380-3724",{t:l}=Ee.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
1059
|
+
</html>`}const mw=1e3;function Xs({getElements:e,paperW:t,paperH:r,fileName:a="",onPopupBlocked:s,header:l=""}){const{t:i}=Ee.useTranslation(),u=o.useCallback(()=>{hw(e(),t,r,a,l)},[e,t,r,a,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(Zs(h,t,r,!1,a,l)),d.document.close()},[e,t,r,a,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=Zs(h,t,r,!1,a,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),f=URL.createObjectURL(m),v=(a?Ys(a):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),b=Object.assign(document.createElement("a"),{href:f,download:`${v}.html`});document.body.appendChild(b),b.click(),document.body.removeChild(b),setTimeout(()=>URL.revokeObjectURL(f),mw)},[e,t,r,a,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function zd(e,t){const{t:r}=Ee.useTranslation(),a=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...Nd]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[f,v]=o.useState(!0),[b,_]=o.useState(!0),[y,x]=o.useState(!0),[g,w]=o.useState(8),[N,C]=o.useState("right"),B=e.length,k=e.some(se=>(se.words??[]).length>1),E=e.some(se=>(se.words??[]).some($=>!!$.colloquialLabel)),A=Ed(e),D=Math.max(1,Math.min(Math.max(B,1),s??Math.max(B,1))),j=Math.min(g,D),S=o.useMemo(()=>U_(e,j),[e,j]),O=S.length>1,z=j,[G,M]=o.useState(!1);o.useEffect(()=>{let se=!1;if(!Br()){M(!1);return}return Promise.all(e.flatMap($=>($.words??[]).map(V=>yi(V.label,V.homonum)))).then($=>{se||M($.some(Boolean))},()=>{}),()=>{se=!0}},[e]);const I=o.useMemo(()=>[jd(r,{hasImage:G,hasColloquial:E,hasCaption:A}),Dd(r),...B>0?[Rd(r,{hasPairs:k,itemCount:B,max:s})]:[],Sd(r),...z>1?[$d(r)]:[],...k?[Ld(r)]:[],...a?[Td(r),Md(r)]:[]],[r,G,E,A,B,k,O,z,a,s]),W={...Id(r,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:y,showTopInfo:f,showBottomInfo:b}),...B>0?{[r(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${j}\uAC1C`}:{},...O?{[r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},pe=o.useCallback((se,$)=>{Od(r,se,$,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:x,setShowTopInfo:v,setShowBottomInfo:_})||($===r("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||$===r("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?w(Pd(parseInt(se),B)):$===r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&C(Fd(se)))},[r,B]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:y,count:z,showTopInfo:f,showBottomInfo:b},filterSections:I,filterSelected:W,handleSelect:pe,pages:S,isPaginated:O,pageNumberPosition:N}}function fw({items:e,words:t,baseItem:r,baseContentTypes:a,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:f,showSettings:v,autoPrint:b,className:_,onClose:y,scoring:x=!1,onScoreChange:g,printHeader:w,brand:N,code:C,beforeClose:B}){const{t:k}=Ee.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(F=>typeof F=="string"&&F.length>0).map((F,Q)=>({id:`${F}-${Q}`,words:[{label:F}]})),[e,t]),{settings:A,filterSections:D,filterSelected:j,handleSelect:S,pages:O,isPaginated:z,pageNumberPosition:G}=zd(E,{paperBands:!!N?.show,maxItemsPerPage:s}),M=o.useMemo(()=>Rc(O.map(F=>F.length)),[O]),[I,W]=o.useState({}),pe=o.useCallback((F,Q)=>{W(H=>({...H,[Za(F)]:Lc(H[Za(F)]??null,Q)}))},[]),se=o.useRef(g);o.useEffect(()=>{se.current=g});const $=o.useRef(I);o.useEffect(()=>{$.current!==I&&($.current=I,se.current?.(Bs(I)))},[I]);const V=o.useMemo(()=>Bs(I),[I]),ne=o.useRef(null),{toastMessage:te,toastKey:P,showWarning:L,clearToast:R}=Pu("warning"),U=o.useRef([]),Z=o.useCallback(()=>z?U.current.filter(F=>F!==null):ne.current?[ne.current]:[],[z]),{print:X,openNewWindow:ae}=Xs({getElements:Z,paperW:fr[A.orientation].width,paperH:fr[A.orientation].height,fileName:f??"",header:w??"",onPopupBlocked:()=>L(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."))}),Y=o.useMemo(()=>h?void 0:p?p({print:X,openNewWindow:ae}):f?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ae()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>X()},...c??[]]:c,[h,p,f,c,k,X,ae]),xe=o.useMemo(()=>h?h({print:X,openNewWindow:ae}):void 0,[h,X,ae]),ie=o.useRef(!1),J=o.useRef(X);return o.useEffect(()=>{J.current=X},[X]),o.useEffect(()=>{if(!b||ie.current)return;const F=window.setTimeout(()=>{ie.current=!0,J.current()},100);return()=>window.clearTimeout(F)},[b]),n.jsxs(Vn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,width:"large",className:we("word-table-popup",_),buttons:Y,footer:xe,footerClassName:d,footerLayout:m,beforeClose:B,onClose:y,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[v&&n.jsx(Gs,{sections:D,selected:j,onSelect:S}),z?n.jsx("div",{className:"word-table-popup__pages",children:O.map((F,Q)=>n.jsx(Pr,{items:F,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:H=>{U.current[Q]=H},pageNumber:{current:Q+1,total:O.length},pageNumberPosition:G,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:C,scoring:x,scoreIndexOffset:M[Q],marks:V,onMarkClick:pe},Q))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Pr,{items:E,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ne,fitHeight:!0,scoring:x,marks:V,onMarkClick:pe,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:C})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Lr,{message:te,position:"top",onClose:R},P)]})}const Cw=new Set(["x","triangle"]);function gw(e,t){const r=[];for(let a=0;a<e.length;a++){const s=t[String(a)];s&&Cw.has(s)&&r.push(e[a])}return r}const bw=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Wd(e){const t=e.name.trim(),r=e.reviewRound;if(typeof r=="number"&&Number.isFinite(r)&&r>=0){const l=Math.floor(r);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let a=t,s=1;for(;;){const l=bw.exec(a);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),a=a.slice(0,l.index).trim()}return{base:a,round:s}}function yw(e,t){const[,r,a]=Vo(t).split("-"),s=`${r}.${a}`,{base:l,round:i}=Wd(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function vw(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Wd(e).round}}function xw(e,t){const r={};for(const[a,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(a),i=e[l];i&&(r[a]=i)}return r}function _w(e){return e.map(t=>t.label).join(" / ")}function ww(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Hd(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function Bw(e,t,r){const a=Li(r);return[e.trim(),a,t.trim()].filter(Boolean).join(" \xB7 ")}function Vd(e,t,r){return r===0?0:(e+t*.5)/r}function kw(e){const t=new Map,r=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of r)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const a=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;a.push({label:Hd(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Vd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return a.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||xn(s.label,l.label)||xn(s.key??s.label,l.key??l.label)),a}function Aw(e){const t=new Map;for(const a of e){const s=a.tableId??`name:${a.tableName}`,l=t.get(s)??{tableName:a.tableName,tableId:a.tableId,rows:[]};l.rows.push(a),t.set(s,l)}const r=[];for(const a of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=a.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Vd(p,h,s(u))});r.push({tableName:a.tableName,tableId:a.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return r.sort((a,s)=>(s.times[s.times.length-1]??"").localeCompare(a.times[a.times.length-1]??"")),r}function Nw(e,t=8){return e.filter(r=>r.latest!=="o").slice(0,t)}function Ew(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const r=String(e),a=String(t);return+(r>a)-+(r<a)}function jw(e){const t=new Map;let r=0,a=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||Ew(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){a++;continue}r++;const c=i.itemId?.trim()||u,p=`${i.trainingType}|${c}`,h=t.get(p)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||xn(i.title,u.title)),{items:l,counted:r,skippedNoTitle:a}}function Dw(e,t=8){return e.filter(r=>!r.latestCorrect).slice(0,t)}function Sw(e){const t=new Map;for(const a of e){const s=t.get(a.trainingType)??[];s.push(a),t.set(a.trainingType,s)}const r=[...t.entries()].map(([a,s])=>({trainingType:a,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return r.sort((a,s)=>s.pending-a.pending||a.trainingType.localeCompare(s.trainingType)),r}const Js=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function Tw(e){const t=new Map;let r=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){r++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const a=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>Js.includes(l.trainingType)).sort(a),word:s.filter(l=>!Js.includes(l.trainingType)).sort(a),noSet:r}}function Mw(e,t,r=5){const a=new Set(t);if(a.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)a.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||xn(l.name,i.name)),s.slice(0,Math.max(0,r))}function $w(e,t){const r=new Set(e.flatMap(a=>a.covered));return t.filter(a=>!r.has(a))}function Lw(e,t){const r=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);r.has(i)||r.set(i,l)}const a=[];for(const s of t){const l=r.get(s);l!==void 0&&a.push(l)}return a}function Qs(e,t,r){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(r[s]))}function Rw(e,t){const r=Number.isFinite(e)?Math.round(e):0;if(!r||r<=0)return"-";const a=Math.floor(r/60),s=r%60;return t?t(a,s):a>0&&s>0?Qs(Mt.t("customers.duration.minSec",{m:a,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:a,s}):a>0?Qs(Mt.t("customers.duration.min",{m:a,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:a}):Qs(Mt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function Pw(e,t){const r=[],a=new Set;for(const s of e){const l=t(s);a.has(l)||(a.add(l),r.push({key:l,value:s,pinned:!1}))}return r}function Fw(e,t){return e.map(r=>r.key===t?{...r,pinned:!r.pinned}:r)}function Iw(e,t){return e.filter(r=>r.key!==t)}function Ow(e,t,r){const a=e.filter(p=>p.pinned),s=new Set(a.map(p=>p.key)),l=e.length-a.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=r(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function zw(e){return e.map(t=>t.value)}function Ww(e){const{category:t={},isSelected:r=!1,onClick:a}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${r?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:r?void 0:a,"aria-pressed":r,"aria-labelledby":l,children:n.jsx(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Hw(e){const{categories:t=[],selected:r,onSelect:a,size:s="medium"}=e||{},l=r!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?r:i,p=o.useRef(a);o.useEffect(()=>{p.current=a});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const f=i??d;i==null&&u(f),p.current?.(f)},[l,d]);const m=o.useCallback(f=>{const v=c===f?null:f;h.current=!0,l||u(v),a?.(v)},[c,l,a]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(f=>n.jsx(Ww,{category:f,isSelected:c===f.key,onClick:()=>m(f.key)},f.key))})}function Vw({subs:e=[],selected:t,onSelect:r,size:a="medium"}){const s=a==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${a}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>r?.(l.key)},l.key))})})}function qw({onTermsClick:e,onPrivacyClick:t,contact:r}={}){const a=r?.email??"support@ihab.co.kr",s=r?.tel??"031-380-3724",{t:l}=Ee.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
1060
1060
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
1061
1061
|
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
|
|
1062
|
-
`).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:bs,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[a," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function Uw({logo:e,logoAlt:t="",logoHref:r,links:a=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=Ee.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),f=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!d)return;const _=ir(()=>{const N=document.getElementById(f);N&&N.contains(document.activeElement)&&v.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=N=>{N.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{_(),g?.removeEventListener?.("change",w)}},[d,f]);const y=i?`${i} landing-header__inner`:"landing-header__inner",x=(_,g)=>u?u(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label}),b=_=>u?u(_,{}):n.jsx(mc,{href:_.href,current:_.current,children:_.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:y,children:[e!=null&&(()=>{const _=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return r?n.jsx("a",{href:r,className:"landing-header__brand",children:_}):n.jsx("div",{className:"landing-header__brand",children:_})})(),a.length>0&&n.jsx("nav",{className:"landing-header__links",children:a.map((_,g)=>n.jsx("span",{children:b(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,a.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>m(_=>!_),"aria-expanded":d,"aria-controls":f,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),a.length>0&&n.jsx("nav",{id:f,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:a.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:x(_,()=>m(!1))},`${g}:${_.href}`))})})]})}function Gw({children:e,action:t,onClick:r,className:a}){const s=r?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:a?`bottom-sticky ${a}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:r,...fd(r),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function Kw({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),r=o.useRef(0),a=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const y=t.current,x=y.phase!=="sound"&&y.at>0;s.current=x?{phase:y.phase,elapsed:Math.max(0,Date.now()-y.at)}:null},[]),i=o.useCallback(()=>{const y=s.current;return s.current=null,y},[]),u=o.useCallback(()=>{r.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((y,x,b=0)=>{if(!(y>0))return Promise.resolve(!0);const _=r.current;return t.current={phase:x,at:Date.now()-Math.max(0,b)},new Promise(g=>{const w=setTimeout(()=>{a.current===w&&(a.current=null),g(!!e.current&&_===r.current)},y);a.current=w})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const y=t.current;return y.phase!=="sound"&&y.at>0},[]),m=o.useCallback(()=>r.current,[]),f=o.useCallback(y=>y===r.current,[]),v=o.useCallback(()=>{r.current+=1},[]);return o.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:f,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:v}),[d,m,f,u,c,p,h,l,i,v])}const Ir=9,Yw=e=>Math.round(Math.min(Ir,Math.max(0,e))/Ir*100),Zw=e=>e/100*Ir,va=2,qd=.1,Xw=e=>Math.min(va,Math.max(0,e)),Jw=.1,Qw=e=>Math.round(e*1e6)/1e6;function xa(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Xw(t);const r=Math.min(Ir,Math.max(0,Number(e.level)||0))/Ir,a=Number(e.mainVolume);return a>0?r>0?Qw(Math.min(va,Math.max(Jw,r/a))):0:1}const Ud=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Gd(e){return Ud(e)}function el(e){return Ud(e)*xa(e)}function tl(e,t=cb()){const r=Number.isFinite(t)&&t>0?t:1;return Math.min(1,el(e)/r)}function Cr(e,t){const r={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(r.noiseRatio=xa({level:r.level,mainVolume:r.mainVolume})),r}const gr={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},nl=o.createContext(null);function ao(){return o.useContext(nl)}const rl=e=>`${ub()}/${e}`,Kd=e=>Array.from({length:10},(t,r)=>rl(`${e}-${String(r+1).padStart(2,"0")}.mp3`)),oo={get defaultNoise(){return rl("noise1.mp3")},get street(){return Kd("noise2")},get restaurant(){return Kd("noise3")},get buzz(){return rl("noise4.mp3")}};function e8(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return oo.defaultNoise;case"street":return oo.street[t];case"restaurant":return oo.restaurant[t];case"buzz":return oo.buzz;default:return null}}function t8({noisePlayer:e,audioRef:t,playbackStateRef:r,sequencer:a}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),f=o.useRef(null),v=o.useCallback(()=>!!a?.isRunning(),[a]),y=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),f.current!==null&&(clearTimeout(f.current),f.current=null)},[]),x=o.useCallback((N,C=250)=>{const B=l.current;if(!B)return;const k=p.current;if(k){p.current=null;try{B.pause()}catch{}B.src=k,B.load()}if(!B.src)return;m.current+=1,y();try{Ro(),ka(B).then(j=>{if(l.current===B)try{s.current?.("noise",j)}catch{}})}catch{}const E=B.paused?0:Aa(B);B.paused&&Jn(B,0),B.play().catch(()=>{});const A=performance.now(),D=()=>{const j=Math.min(1,(performance.now()-A)/C);try{Jn(B,E+(N-E)*j)}catch{}j<1?d.current=requestAnimationFrame(D):d.current=null};d.current=requestAnimationFrame(D)},[y]),b=o.useCallback((N=250,C)=>{const B=l.current;if(!B||B.paused){C?.();return}const k=++m.current;y();const E=performance.now(),A=Aa(B),D=()=>{const j=Math.min(1,(performance.now()-E)/N);try{Jn(B,A*(1-j))}catch{}if(j<1)d.current=requestAnimationFrame(D);else{d.current=null,f.current!==null&&(clearTimeout(f.current),f.current=null);try{B.pause()}catch{}C?.()}};d.current=requestAnimationFrame(D),f.current=setTimeout(()=>{if(f.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{B.paused||(Jn(B,0),B.pause(),C?.())}catch{}}},N+150)},[y]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{y();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,p.current=null}},[y]);const _=e?tl(e.settings):0,g=!!e?.settings.enabled&&_>0;o.useEffect(()=>{if(!g)return;let N=0;const C=setInterval(()=>{const B=l.current;if(!B||B.paused){N=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||v()||r.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,b())},400);return()=>clearInterval(C)},[b,g,t,r,v]),o.useEffect(()=>{const N=()=>{const C=l.current;if(document.hidden){if(C&&!C.paused){y();try{C.pause()}catch{}}return}if(!C||!C.paused)return;const B=t.current,k=!!B&&!B.paused&&!B.ended||v()||r.current==="playing",E=h.current;k&&E?.enabled&&E.volume>0&&x(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[y,x,t,r,v]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:_,type:e.settings.type}:null},[e,e?.settings.enabled,_,e?.settings.type]);const w=o.useRef(null);return o.useEffect(()=>()=>{w.current?.(),w.current=null},[]),o.useEffect(()=>{const N=e?.settings,C=l.current;if(!C)return;const B=N?tl(N):0;if(!N||!N.enabled||B===0){b();return}if(c.current!==N.type){const k=e8(N.type);k&&(c.current=N.type,u(k),p.current=k,b(150,()=>{if(p.current!==k)return;p.current=null,C.src=k,C.load();const E=t.current;if(E&&!E.paused||v()){w.current?.();const A=()=>{C.removeEventListener("canplay",A),w.current===D&&(w.current=null);const j=t.current,M=h.current;(j&&!j.paused&&!j.ended||v())&&M?.enabled&&M.volume>0&&x(M.volume)},D=()=>C.removeEventListener("canplay",A);w.current=D,C.addEventListener("canplay",A)}}))}else{const k=t.current,E=!!k&&!k.paused&&!k.ended||v()||r.current==="playing";if(E&&p.current)x(B);else if(E&&C.paused&&C.src)x(B);else if(!C.paused)if(!E)b();else{y();const A=Aa(C),D=performance.now(),j=()=>{const M=Math.min(1,(performance.now()-D)/150);try{Jn(C,A+(B-A)*M)}catch{}M<1?d.current=requestAnimationFrame(j):d.current=null};d.current=requestAnimationFrame(j)}}},[e?.settings,e?.settings.enabled,_,e?.settings.type,y,x,b,t,r,h,v]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:y,fadeInNoise:x,fadeOutNoise:b}}function n8({ttsText:e,playbackRate:t,mainVolume:r,fillRef:a,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const f=o.useRef(null),v=o.useRef(0),y=o.useRef(null),x=o.useRef(0),b=o.useRef(!1);o.useEffect(()=>()=>{x.current++;try{if(y.current&&(cancelAnimationFrame(y.current),y.current=null),b.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}b.current=!1}}catch{}},[]);const _=(N,C=1)=>{try{const B=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(B*300/Math.max(.25,C)))}catch{return 1200}},g=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const C=window.speechSynthesis,B=++x.current;try{try{C.cancel()}catch{}const k=N??e,E=Array.isArray(k)?k.filter(z=>!!z):[k||""];E.length===0&&E.push("");const A=Math.max(.3,Math.min(3,t));v.current=E.reduce((z,G)=>z+_(G,A||1),0),f.current=performance.now(),l(0),i("playing"),u("playMode");const D=h.current;D?.enabled&&(D?.volume??0)>0&&c(D.volume);const j=()=>{try{const z=f.current||performance.now(),G=performance.now()-z,T=v.current||1200,I=Math.min(1,G/T);try{a.current&&(a.current.style.left=`${I*100}%`),s.current&&s.current.style.setProperty("--progress",String(I))}catch{}I<1&&(y.current=requestAnimationFrame(j))}catch{}},M=()=>{if(B===x.current)try{y.current&&(cancelAnimationFrame(y.current),y.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},W=z=>{const G=new SpeechSynthesisUtterance(E[z]);try{G.rate=A}catch{}try{G.volume=Math.max(0,Math.min(1,r))}catch{}G.onend=()=>{if(B===x.current){if(z<E.length-1){try{W(z+1)}catch{M()}return}M()}},G.onerror=()=>{M()},G.onstart=()=>{if(!(z>0))try{y.current&&(cancelAnimationFrame(y.current),y.current=null),y.current=requestAnimationFrame(j)}catch{}},b.current=!0,C.speak(G)};try{W(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,r,c,a,s,l,i,u,h,d,m]),w=o.useCallback(()=>{x.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}y.current&&(cancelAnimationFrame(y.current),y.current=null),p(),f.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:g,stopTTS:w}}const r8=.01,a8=.3;async function o8(e,t,r,a=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(a){const f=Math.floor(a8*i.sampleRate),v=Math.min(u.length,f);for(;c<v&&Math.abs(u[c])<=r8;)c++;c>=v&&(c=0)}const p=u.length-c,h=r&&r>0?Math.min(p,Math.floor(r*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((f,v)=>{const y=c+v*m,x=Math.min(y+m,c+d,u.length);let b=0;for(let _=y;_<x;_++){const g=Math.abs(u[_]);g>b&&(b=g)}return b})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Yd(e,t,r,a=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await o8(l,t,r,a)}catch(s){try{const l=zo(s)}catch{}return null}}const al=45,s8=74,l8=2;function so(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function lo(e){return so(e)/45}const i8=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Zd=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Xd({durationsSec:e,leadInMs:t=0,tailMs:r=0}){const a=Zd(t),s=Zd(r),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",a],["sound",i8(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Jd(e,t){const r=(t|0)*3;if(t<0||r+2>=e.segments.length)return null;const[a,s,l]=[e.segments[r],e.segments[r+1],e.segments[r+2]];return{lead:a,sound:s,tail:l,totalMs:a.durMs+s.durMs+l.durMs}}function u8(e,t){const r=Jd(e,t.track);if(!r||!(r.totalMs>0))return 0;const a=r[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),a.durMs);return Math.max(0,Math.min(1,(a.startMs-r.lead.startMs+s)/r.totalMs))}function c8(e,t,r){const a=Math.max(0,Math.floor(r)),s=Jd(e,t);if(!s||a===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:a,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*a),i=Math.round(s.tail.durMs/s.totalMs*a),u=Math.max(1,a-l-i),c=l+u+i-a;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function d8({currentTime:e,sources:t,index:r,audioDuration:a}){const s=r||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||a||0:a||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function p8({phase:e,phaseElapsedMs:t,currentTime:r,trackDurationSec:a,leadInMs:s,tailMs:l}){const i=Xd({durationsSec:[a],leadInMs:s,tailMs:l});return u8(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(r)?r:0)*1e3:t})}function h8({bars:e,trackDurationSec:t,leadInMs:r,tailMs:a}){return c8(Xd({durationsSec:[t],leadInMs:r,tailMs:a}),0,e)}function m8(e,t){if(!Array.isArray(e))return null;const r=t||0;return r<e.length-1?r+1:null}function f8({ended:e,completedByEnd:t}){return!!e||!!t}function C8(e){return e.map((t,r)=>({src:t.src,label:String(r+1),color:void 0,duration:t.duration||0}))}function g8(e){return e.reduce((t,r)=>t+(r.duration||0),0)}function b8(e,t,r){const a=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of a)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=r(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function y8(e,t){if(!t||e.readyState<1)return!0;const r=e.currentSrc||e.src;return r?Qd(r)!==Qd(t):!0}function Qd(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const ep=4,v8=lo(ep/al);function x8(e){const{src:t,segments:r,progress:a=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:f=0,trackDurationSec:v=0}=e,y=o.useRef(null),x=o.useRef(null),[b,_]=o.useState(null),[g,w]=o.useState(!1),[N,C]=o.useState(null),[B,k]=o.useState(2),[E,A]=o.useState(0),[D,j]=o.useState(null),[M,W]=o.useState(!1),[z,G]=o.useState(!1),T=3,I=3,O=1,pe=300,se=o.useRef(0),$=o.useCallback(()=>{const le=y.current,re=x&&x.current?x.current:le?le.closest(".audio-player__wave"):null,ue=re?re.getBoundingClientRect():le?le.getBoundingClientRect():null,Be=ue?ue.width:0,ke=ue?Math.max(100,ue.width):320,Ne=ue?ue.height:0,Re=Math.max(O,Math.min(pe,Math.floor((ke+I)/(T+I)))),ye=Re*T,_e=Math.max(0,Re-1),Ae=Math.max(0,_e>0?(ke-ye)/_e:I);return{bars:Re,gap:Ae,height:Ne,width:Be}},[]),V=o.useRef(void 0),ne=o.useRef(null),te=o.useCallback(async(le,re,{quiet:ue=!1}={})=>{const Be=++se.current,ke=()=>se.current===Be;try{if(ue||w(!1),V.current=le,!le){ke()&&_(null);return}let Ne=re;if(!Ne)try{for(let _e=0;_e<4&&!(y.current||x.current);_e++)await new Promise(Ae=>requestAnimationFrame(Ae));await new Promise(_e=>requestAnimationFrame(_e));const ye=$();ye.height>0&&A(ye.height),Ne=ye.bars,k(ye.gap)}catch{Ne=120}ne.current=Ne;const Re=await Yd(le,Ne);if(!ke())return;if(!Re){_(null),w(!1);return}_(Re),C(Ne),w(!0)}catch{if(!ke())return;_(null),w(!1)}},[w,_,A,k,C,$]);o.useEffect(()=>{const le=x.current;if(!le||typeof ResizeObserver>"u")return;let re=null;const ue=new ResizeObserver(()=>{re!==null&&cancelAnimationFrame(re),re=requestAnimationFrame(()=>{re=null;try{const Be=$();if(Be.width<=0||(Be.height>0&&A(Be.height),ne.current===null||Be.bars===ne.current))return;const ke=V.current;k(Be.gap),ke?te(ke,Be.bars,{quiet:!0}).catch(()=>{}):ne.current=Be.bars}catch{}})});return ue.observe(le),()=>{ue.disconnect(),re!==null&&cancelAnimationFrame(re)}},[$,te]),o.useEffect(()=>{const le=r&&r[0]&&r[0].src||t||r&&r.length===1&&r[0]&&r[0].src;te(typeof le=="string"?le:void 0).catch(()=>{}),G(!1)},[t,r,te]),o.useEffect(()=>{let le=!1;if(W(!1),j(null),!l||!N)return;const re=c>0?c*(u||1):void 0;return Yd(l,N,re,!0).then(ue=>{le||(j(ue),ue||W(!0))}).catch(()=>{le||(j(null),W(!0))}),()=>{le=!0}},[l,N,c,u]);const P=Math.max(0,Math.min(1,p)),L=o.useMemo(()=>b&&b.length&&Math.max(...b)||1,[b]),R=N||40,U=o.useMemo(()=>h8({bars:R,trackDurationSec:v,leadInMs:m,tailMs:f}),[R,v,m,f]),Z=o.useMemo(()=>Array.from({length:R}).map((le,re)=>{const ue=re>=U.lead&&re<U.lead+U.sound,Be=U.sound>0&&ue?Math.min(R-1,Math.round((re-U.lead)/U.sound*R)):-1,ke=ue?b&&b[Be]!=null?b[Be]:null:b?0:null,Ne=ke==null?null:Math.min(1,ke/L*P),Re=Ne!=null&&E>0&&so(Ne)<=ep,ye=Ne==null?.15:Re?0:lo(Ne),_e=Re,Ae=R>1?re/(R-1):0;return n.jsx("div",{className:_e?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":re,"--mix":Ae}},re)}),[R,b,L,P,E,U]),X={"--progress":String(Math.max(0,Math.min(1,a)))},ae=o.useMemo(()=>D&&D.length&&Math.max(...D.map(le=>Number.isFinite(le)?Math.abs(le):0))||1,[D]),Y=P*Math.max(0,i),xe=!l||!D||!D.length?1:Math.max(1,Y),ie={"--bar-gap":`${B}px`,"--wave-h":`${so(xe)}px`,"--wave-h1":`${al}px`},J=g&&(l?!!D||M:!0);o.useEffect(()=>{J&&G(!0)},[J]);const F=z?g:J;o.useEffect(()=>{h?.(F)},[F,h]);const Q=N||40,H=o.useMemo(()=>Array.from({length:Q}).map((le,re)=>{const ue=D&&D[re]!=null?D[re]:null,Be=ue==null?0:Math.abs(ue)/ae*Y,ke=Math.max(v8,lo(Be)),Ne=Q>1?re/(Q-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":ke,"--i":re,"--mix":Ne}},re)}),[Q,D,ae,Y,E]);return n.jsxs("div",{className:"audio-player__wave",ref:x,style:ie,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${J?"is-ready":""}`,"aria-hidden":"true",children:H}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${F?"is-ready":""}`,ref:y,children:Z}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${F?"is-ready":""}`,ref:s,style:X,children:Z})]})]})}const tp={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function ol(e,t){return new Promise((r,a)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),r(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?a(new Error(p)):r(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const _8=2e3;function np(e,t=_8){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function w8({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:r=2500}){const a=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(a.current=c,!c||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{a.current=!1},[]),u=o.useCallback(()=>!e&&!t||a.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),r);s.current.push(p)}),[e,t,r]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function B8(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),r=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),a=o.useCallback(()=>{r([])},[r]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:r,revokeAll:a}}function k8({offsetY:e=8}={}){const t=o.useRef(null),[r,a]=o.useState(null),s=o.useCallback(()=>a(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;a({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(r)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r,s]),{ref:t,rect:r,show:l,hide:s}}function A8(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const r=e.seekable;if(r&&r.length>0){const a=r.end(r.length-1);if(Number.isFinite(a)&&a>0)return a}}catch{}return null}const N8=400,E8=2e3,rp=5;function j8({audioRef:e,fillRef:t,waveProgressRef:r,sourcesRef:a,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let v=0;const y=()=>{if(Yn){const x=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&x-v>N8){const b=h.current===null||x-h.current>E8;if(h.current=x,b&&p.current<rp){p.current+=1;const _=p.current;let g=null;try{g=typeof document<"u"?document.visibilityState:null}catch{}kt(`progress-ticker-slow-frames#${_}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(x-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,g==="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.",_>=rp?`(${_}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${_}\uBC88\uC9F8)`)}}v=x}try{const x=e.current,b=Array.isArray(a.current)?a.current[s.current||0]:void 0,_=!!b&&Number.isFinite(b.duration)&&(b.duration??0)>0,g=_?0:A8(x),w=t.current,N=(i||0)>0||(u||0)>0,C=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(g===null&&!C)try{w&&w.style.visibility!=="hidden"&&(w.style.visibility="hidden")}catch{}else{const B=_?b.duration:g||0;Yn&&C&&!(B>0)&&kt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=N?p8({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:x&&typeof x.currentTime=="number"?x.currentTime:0,trackDurationSec:B,leadInMs:i||0,tailMs:u||0}):d8({currentTime:x&&typeof x.currentTime=="number"?x.currentTime:0,sources:a.current,index:s.current,audioDuration:g??0});try{w&&(w.style.visibility&&(w.style.visibility=""),w.style.left=`${k*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(y)};c.current=requestAnimationFrame(y)},[e,t,r,a,s,l,i,u]),f=o.useCallback(v=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${v*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(v))}catch{}},[d,t,r]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:f}}function sl({btnLabel:e,soundSrc:t,bucketPath:r,onDone:a,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=Ee.useTranslation(),m=e,f=ao(),v=o.useRef(f?.registerAnalyser);o.useEffect(()=>{v.current=f?.registerAnalyser});const y=o.useRef(null),x=o.useRef(null),b=o.useRef(null),_=B8(),g=o.useRef(null),w=o.useRef(!1),N=o.useRef(null),{ref:C,rect:B,show:k,hide:E}=k8();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[A,D]=o.useState(!1),[j,M]=o.useState("idle"),[W,z]=o.useState("stopped"),G=o.useRef("stopped");o.useEffect(()=>{G.current=W},[W]);const[T,I]=o.useState(0),[O,pe]=o.useState("active"),se=o.useRef(!1);o.useEffect(()=>{if(O!=="playMode"||!se.current)return;se.current=!1;const q=typeof document<"u"?document.activeElement:null;if(q&&q!==document.body)return;const he=b.current?.querySelectorAll("button")[1];try{he?.focus()}catch{}},[O]);const[$,V]=o.useState(null),[ne,te]=o.useState(null),[P,L]=o.useState(0),[R,U]=o.useState(!1),[Z,X]=o.useState(0),ae=f?.playbackRate??1,Y=f?.mainVolume??1,xe=f?el(f.settings):0,ie=f?Gd(f.settings):Y,[J,F]=o.useState("idle"),[Q,H]=o.useState(""),[le]=o.useState("top"),re=o.useRef(null),ue=o.useRef(0),Be=o.useRef(null),ke=o.useRef(!0),Ne=Kw({mountedRef:ke}),Re=o.useRef(null),ye=o.useRef(p),_e=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{_e.current=Math.max(0,h||0)},[h]);const{start:Ae,stop:Ie,settleTo:je}=j8({audioRef:y,fillRef:x,waveProgressRef:Be,sourcesRef:re,currentIndexRef:ue,sequencer:Ne,leadInMs:p,tailMs:h}),{onReadyChange:tt,waitForReady:Ct,markNotReady:Oe}=w8({showSoundWaveForm:u,showNoiseWaveForm:c}),qe=o.useRef(null),nt=o.useRef(s),We=o.useRef(a),Ze=o.useRef(null),ot=o.useRef(!1),[gt,ht]=o.useState(!1),xt=o.useCallback(q=>{ot.current=q,ht(q)},[]),ut=o.useRef(null),{activeNoiseUrl:Gt,noiseSettingsRef:_t,fadeInNoise:Pt,fadeOutNoise:Qe}=t8({noisePlayer:f,audioRef:y,playbackStateRef:G,sequencer:Ne}),{startTTS:De,stopTTS:rt}=n8({ttsText:l,playbackRate:ae,mainVolume:ie,fillRef:x,waveProgressRef:Be,setProgress:I,setPlaybackState:z,setStateLocal:pe,fadeInNoise:Pt,fadeOutNoise:Qe,noiseSettingsRef:_t,onDoneRef:We,handleEndRef:ut});o.useEffect(()=>{At.current=rt});const it=q=>{if(typeof window>"u"||!window.speechSynthesis){try{H(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}De(q);return}ce("tts"),De(q)},bt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Nt=(!bt||bt.length===0)&&!!l,It=Array.isArray($)&&$.length>0?$:Array.isArray(ne)&&ne.length>0?ne:null,ft=Math.max(Array.isArray(It)?It.length:0,bt.length);o.useEffect(()=>(ke.current=!0,()=>{ke.current=!1}),[]);const mt=()=>{Ne.abort()},At=o.useRef(null),Et=o.useRef(null),Je=o.useRef(null),wt=o.useRef(null);wt.current||(wt.current=()=>{Je.current=null;const q=y.current;if(Et.current==="audio"&&q&&(!q.paused||Ne.isRunning())){mt();try{q.pause()}catch{}ke.current&&(z("paused"),Ie(),Qe())}else if(Et.current==="tts")try{At.current?.()}catch{}});const ce=q=>{Et.current=q,Je.current=fa(wt.current)},Se=()=>{Je.current?.(),Je.current=null};o.useEffect(()=>()=>{wt.current&&Xa(wt.current)},[]);const Pe=o.useRef(ae);o.useEffect(()=>{Pe.current=ae||1},[ae]);const Ge=o.useCallback(q=>{const he=Pe.current||1;try{q.defaultPlaybackRate=he}catch{}try{q.playbackRate=he}catch{}},[]),st=o.useCallback((q,he)=>{if(!y8(q,he)){try{q.currentTime=0}catch{}Ge(q);return}q.src=he,Ge(q),q.load(),Ge(q)},[Ge]),Ot=o.useCallback(()=>{Ze.current&&(clearTimeout(Ze.current),Ze.current=null),F("idle")},[]),ct=o.useCallback(async(q,he=3,ge=50,Me=0)=>{Ot();const Le=Ne.generation(),Ve=!!q&&q.currentTime>0&&!q.ended,pt=Math.max(0,ye.current-Math.max(0,Me));if(pt>0&&!Ve){ce("audio"),Ae(),z("playing");const yt=_t.current;if(yt?.enabled&&(yt.volume??0)>0)try{Pt(yt.volume)}catch{}if(!await Ne.waitPad(pt,"lead",Me)||!ke.current||!Ne.isCurrent(Le))return!1}Ne.enterSound();for(let yt=0;yt<he;yt++){if(!ke.current||!Ne.isCurrent(Le))return!1;try{return ce("audio"),await q.play(),!0}catch(ve){if((ve instanceof Error||typeof ve=="object"&&ve&&"name"in ve?ve.name:void 0)==="AbortError"){if(!Ne.isCurrent(Le))return!1;await new Promise(S=>setTimeout(S,ge));continue}try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,Ae,Ne,Pt,_t,Ot]),Yt=o.useCallback(q=>{const he=Ne.generation(),ge=Math.max(0,_e.current-Math.max(0,q));Ae();const Me=_t.current;if(Me?.enabled&&(Me.volume??0)>0)try{Pt(Me.volume)}catch{}const Le=()=>{try{Re.current?.()}catch{}};if(ge<=0){Ne.leave(),Le();return}Ne.waitPad(ge,"tail",q).then(Ve=>{Ne.leave(),Ve&&Ne.isCurrent(he)&&Le()}).catch(()=>{})},[Ne,Ae,Pt,_t]),$t=o.useCallback(()=>{const q=y.current;if(!q)return;const he=()=>{z("playing"),pe("playMode"),U(!0),Ae();try{Ro(),ka(q).then(Ve=>{if(ke.current)try{v.current?.("main",Ve)}catch{}})}catch{}const Le=_t.current;Le?.enabled&&(Le?.volume??0)>0&&Pt(Le.volume)},ge=()=>{f8({ended:!!q?.ended,completedByEnd:ot.current})||(z("paused"),Ie(),Qe())},Me=()=>{const Le=()=>{try{const Ve=re.current,pt=m8(Ve,ue.current);if(pt!==null){ue.current=pt,L(pt),U(!0);const yt=Ve?.[pt]&&Ve[pt].src;if(yt&&q){st(q,yt),ct(q).catch(()=>{});return}}}catch{}z("stopped"),I(1);try{if(q)try{q.currentTime=0}catch{}}catch{}Ie(),U(!1),Qe();try{!nt.current&&ut.current&&ut.current()}catch{}};if(Re.current=Le,_e.current>0){Ae(),Ne.waitPad(_e.current,"tail").then(Ve=>{Ne.leave(),Ve&&Le()}).catch(()=>{});return}Le()};return q.addEventListener("play",he),q.addEventListener("pause",ge),q.addEventListener("ended",Me),()=>{try{q.removeEventListener("play",he),q.removeEventListener("pause",ge),q.removeEventListener("ended",Me),Ie()}catch{}}},[Pt,Qe,ct,_t,Ae,Ie,Ne]);o.useEffect(()=>$t(),[$t]),o.useEffect(()=>{nt.current=s},[s]),o.useEffect(()=>{We.current=a},[a]),o.useEffect(()=>{if(s||O!=="active")return;const q=N.current;if(!q)return;let he=null;const ge=requestAnimationFrame(()=>{try{const Me=q.getTotalLength();if(!Me)return;const Le=Me*.2;q.style.strokeDasharray=`${Me-Le} ${Le}`;const Ve="triFlow_"+Math.random().toString(36).slice(2);he=document.createElement("style"),he.textContent=`@keyframes ${Ve}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Me}}}`,document.head.appendChild(he),q.style.animation=`${Ve} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ge),he?.remove()}},[O,s]),o.useEffect(()=>{re.current=$},[$]),o.useEffect(()=>{ue.current=P},[P]),o.useEffect(()=>{const q=b.current,he=g.current;if(!q||!he)return;let ge=null;const Me=32,Le=60,Ve=()=>{try{const yt=Array.from(q.querySelectorAll(":scope > .button"));let ve=0;yt.forEach(Ue=>{if(Ue===he)return;const et=Ue.getBoundingClientRect();ve+=et.width});const S=q.getBoundingClientRect().width,ee=Math.max(0,Math.floor(S-ve-8)),be=ft;if(!be||ee<=0){Array.from(he.children).forEach(Ue=>{try{Ue.style.width=""}catch{}});return}let Fe=Math.floor(ee/be);Fe>Le&&(Fe=Le),Fe<Me&&(Fe=Math.max(Me,Math.floor(ee/be))),Array.from(he.querySelectorAll(".button")).forEach(Ue=>{try{Ue.style.width=`${Fe}px`}catch{}})}catch{}},pt=requestAnimationFrame(Ve);try{ge=new ResizeObserver(()=>{requestAnimationFrame(Ve)}),ge.observe(q),ge.observe(he),window.addEventListener("resize",Ve)}catch{}return()=>{try{cancelAnimationFrame(pt)}catch{}try{ge&&(ge.disconnect(),ge=null)}catch{}try{window.removeEventListener("resize",Ve)}catch{}}},[$,ne,ft]),o.useEffect(()=>()=>{try{qe.current&&(clearTimeout(qe.current),qe.current=null),Ze.current&&(clearTimeout(Ze.current),Ze.current=null)}catch{}},[]);const Ke=(q,he)=>{V(q),X(he),Oe(),te(C8(q)),re.current=q},K=()=>{pe("playMode"),L(0),U(!0)},Ce=async(q,he)=>{xt(!1),w.current=!1,st(q,he),await np(q),await Ct()!==!1&&(D(!1),K(),await ct(q))},He=async(q,he=!1)=>{const ge=y.current;D(!0),M("measuring_duration");try{const Me=await ol(q,{timeoutMs:1e4,rejectOnError:!0});Ke([{src:q,objectUrl:null,duration:Me}],Me),M("ready"),he&&ge&&await Ce(ge,q)}finally{w.current=!1,D(!1)}},Ye=async(q,he=!1)=>{const ge=y.current;D(!0),M("measuring_duration");try{const Me=await Promise.all(q.map(Ve=>ol(Ve,{timeoutMs:1e4})));if(!ke.current)return;const Le=q.map((Ve,pt)=>({src:Ve,objectUrl:null,duration:Me[pt]||0}));Ke(Le,g8(Le)),M("ready"),he&&ge&&Le.length>0&&await Ce(ge,Le[0].src)}finally{w.current=!1,D(!1)}},at=async(q=!1,he=!0)=>{const ge=y.current,Me=t?Array.isArray(t)?t:[t]:[];if(!Me||Me.length===0||!Me.some(Boolean))return!1;if(w.current)return null;w.current=!0,he&&D(!0),M("resolving");try{const Le=b8(t,r,di),Ve=[];let pt=0;for(const yt of Le){let ve=yt.src??null,S=null;if(!ve&&yt.resolvedPath){try{M("getting_signed_url"),ve=await pi(yt.resolvedPath)}catch{ve=null}if(!ke.current)return!1;if(!ve)try{M("downloading");const be=await hi(yt.resolvedPath);if(!ke.current)return!1;if(be){const Fe=be instanceof Blob?be:new Blob([be]);S=_.track(URL.createObjectURL(Fe)),ve=S}}catch{M("error");try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),pe("active")}catch{}}}if(!ve)continue;let ee=0;try{M("measuring_duration"),ee=await ol(ve,{timeoutMs:3e3})}catch{ee=0}if(!ke.current){if(S)try{URL.revokeObjectURL(S)}catch{}for(const be of Ve)if(be.objectUrl)try{URL.revokeObjectURL(be.objectUrl)}catch{}return!1}pt+=ee||0,Ve.push({...yt,src:ve,objectUrl:S,duration:ee})}if(Ke(Ve,pt),Ve.length>0&&q&&ge){const yt=Ve[0];xt(!1);try{_.keepOnly(Ve.map(ve=>ve.objectUrl))}catch{}if(M("ready"),w.current=!1,yt.src&&ge)try{if(st(ge,yt.src),await np(ge),await Ct()===!1)return!1;he&&D(!1),K(),ge&&await ct(ge)}catch{he&&D(!1)}else he&&D(!1);pe("playMode"),L(0),U(!0)}return Ve.length>0}finally{w.current=!1,he&&D(!1),M(Le=>Le==="ready"?"ready":"idle")}},dt=async q=>{const he=Ne.isRunning();if(q.paused&&!he){if(ot.current){await zt();return}const ge=Ne.resume();if(ge){if(z("playing"),ge.phase==="tail"){Yt(ge.elapsed);return}await ct(q,3,50,ge.elapsed);return}await ct(q),z("playing")}else Ne.pause(),mt(),q.pause(),z("paused"),he&&(Ie(),Qe())},jt=async()=>{const q=y.current;if(!(!q&&!Nt)){if(Nt){const he=window.speechSynthesis;if(O==="active"){const ge=Gr(),Me=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(ge&&Me.length>0){if(w.current)return;pe("load"),D(!0),M("synthesizing"),w.current=!0;try{const Le=await Promise.all(Me.map(Ve=>Promise.resolve(ge(Ve))));Le.length>1?await Ye(Le,!0):await He(Le[0],!0)}catch{w.current=!1,D(!1),pe("active"),it(Me.length>0?Me:void 0)}return}it(Me.length>0?Me:void 0);return}if(O==="playMode"){const ge=!!he&&(he.speaking||he.paused)&&!(q&&(q.currentSrc||q.getAttribute("src")));if(q&&!ge){await dt(q);return}try{if(he&&he.paused)try{ce("tts"),he.resume(),z("playing")}catch{}else try{he.pause(),z("paused")}catch{}}catch{}}return}if(O==="active"){if(s&&Array.isArray(re.current)&&re.current.length>0){const ge=re.current[0];try{if(ge.src&&q)try{st(q,ge.src),K(),q&&await ct(q)}catch{}K();return}catch{}}pe("load");let he;try{he=await at(!0)}catch{he=!1}if(he===!1&&ke.current){try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}pe("active")}return}if(O!=="load"&&(O==="playMode"||O==="active"))try{q&&await dt(q)}catch(he){(he instanceof Error||typeof he=="object"&&he&&"name"in he)&&he.name}}},zt=async()=>{const q=y.current;if(q)try{const he=re.current;if(Array.isArray(he)&&he.length>1){await pn(0);return}xt(!1);try{q.currentTime=0}catch{}q&&await ct(q),z("playing"),pe("playMode")}catch{}},wn=()=>{mt(),Se(),At.current?.();const q=y.current;try{if(q){try{q.pause()}catch{}try{q.currentTime=0}catch{}}}catch{}Qe(),z("stopped"),pe("active"),I(0),U(!1)},an=async(q,{sameSegment:he=!1}={})=>{mt();const ge=Ne.generation(),Me=y.current,Le=re.current?.[q]?.src;try{if(xt(!1),L(q),U(!0),ue.current=q,!Le||!Me||(he||Oe(),st(Me,Le),!he&&await Ct()===!1)||!Ne.isCurrent(ge)||(await ct(Me),!Ne.isCurrent(ge)))return;z("playing"),pe("playMode")}catch{}},Bn=async()=>{const q=re.current,he=ue.current||0;if(!q||he<=0){await zt();return}await an(he-1)},dn=async()=>{const q=re.current,he=ue.current||0;if(!q||he>=q.length-1){wn();return}await an(he+1)},Xt=()=>{if(ot.current)return;const q=200,he=340;xt(!0),mt(),Se();try{I(1)}catch{}je(1);try{F("hold")}catch{}try{const ge=y.current,Me=Nt&&!!ge?.src;if(!Nt||Me){if(ge){ge.pause();try{ge.currentTime=0}catch{}}}else rt();Qe()}catch{}try{z("stopped")}catch{}if(U(!1),!nt.current)try{Ze.current&&(clearTimeout(Ze.current),Ze.current=null),Ze.current=setTimeout(()=>{try{F("out")}catch{}Ze.current=setTimeout(()=>{try{typeof We.current=="function"&&We.current(!0)}catch{}try{F("idle")}catch{}Ze.current=null},he)},q)}catch{}};o.useEffect(()=>{ut.current=Xt});const on=o.useCallback(()=>H(""),[]),pn=async q=>{(re.current||[])[q]&&await an(q,{sameSegment:q===ue.current})},Qt=W==="playing",Lt=o.useMemo(()=>{if(!ne||ne.length<=1)return ne;const q=ne[P];return q?[q]:ne},[ne,P]),Dt=s===!0;o.useEffect(()=>{try{const q=y.current;q&&typeof q.playbackRate=="number"&&Ge(q)}catch{}},[ae,Ge]);const Wt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const q=y.current;if(!q)return;const he=Math.max(0,Math.min(1,ie)),ge=Wt.current,Me=()=>{ge.raf!==null&&(cancelAnimationFrame(ge.raf),ge.raf=null),ge.timer!==null&&(clearTimeout(ge.timer),ge.timer=null)};Me();const Le=Aa(q);if(q.paused||Math.abs(Le-he)<.001||typeof requestAnimationFrame!="function"){try{Jn(q,he)}catch{}return}const Ve=performance.now(),pt=()=>{const yt=Math.min(1,(performance.now()-Ve)/150);try{Jn(q,Le+(he-Le)*yt)}catch{}ge.raf=yt<1?requestAnimationFrame(pt):null};return ge.raf=requestAnimationFrame(pt),ge.timer=setTimeout(()=>{Me();try{Jn(q,he)}catch{}},200),Me},[ie]);const Rt=J==="hold",Pn=J==="out",En=O==="playMode"&&!A&&!gt||Rt||Pn,ar=W!=="stopped"||Rt||Pn,$n=W==="paused",me=Math.max(0,Math.min(100,(T||0)*100)),Te=we("audio-player__fill",En?"is-visible":"",ar?"is-expanded":"",$n?"is-paused":"",Pn?"is-out":"");return n.jsxs("div",{className:`audio-player ${Dt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Qt?"is-playing":""} ${A?"is-loading":""} ${O!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:tp[j]?"status":void 0,"aria-live":tp[j]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,O==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Dt,onClick:()=>{se.current=to(),E(),jt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:E,onFocus:k,onBlur:E,children:n.jsx("span",{ref:C,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,B&&n.jsx(On,{anchorRect:B,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${O==="playMode"||Qt?"is-visible":""}`,inert:!(O==="playMode"||Qt)||void 0,children:[n.jsxs("div",{ref:b,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Bn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:O!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Qt?"pause":"play",onClick:jt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Qt,width:"60px",variant:"transparent-white",disabled:O!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:wn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:O!=="playMode"}),ft>1?n.jsx("div",{ref:g,className:"audio-player__source-buttons",children:Array.from({length:ft}).map((q,he)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(he+1),onClick:()=>{try{pn(he)}catch{}},ariaLabel:d("training.sourcePlay",{n:he+1}),variant:"transparent-white",selected:R&&P===he,disabled:O!=="playMode"||!(Array.isArray($)&&$[he]),showTooltipInfo:!0},he))}):null,!Array.isArray($)||$.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:zt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:O!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:dn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:O!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Xt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:O!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Te,ref:x,style:{left:`${me}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(x8,{segments:Lt,progress:T,totalDuration:Z,waveProgressRef:Be,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:$?.[P]?.duration??0,noiseSrc:c&&f?.settings.enabled&&xe>0?Gt:null,noiseRatio:f?xa(f.settings):0,noiseSpeed:f?.settings.speed??1,mainVolume:Y,onReadyChange:tt})]})]}),n.jsx("audio",{ref:y,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Lr,{message:Q,position:le,onClose:on})]})}function io(e){const{t}=Ee.useTranslation(),{text:r,label:a,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:d,canIncrease:m,canDecrease:f,fontSize:v,lineHeight:y}=Du({storageKey:"tooltip-fontScale"}),x=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),b=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),_=Array.isArray(r)?r:typeof r>"u"||r===null?[]:[r],g={fontSize:`${v}px`,lineHeight:`${y}px`,"--tt-line-height":`${y}px`,"--tt-marker-size":"28px"},w=n.jsxs("div",{className:de(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:de("text-box-tooltip__box"),children:[a&&n.jsx("div",{className:de("text-box-tooltip__label body-2b"),children:a}),n.jsx("div",{className:de("text-box-tooltip__text body-1"),style:g,children:_.map((N,C)=>n.jsxs("div",{className:de("text-box-tooltip__line"),children:[_.length>1?n.jsx("div",{className:de("text-box-tooltip__marker"),children:n.jsx("span",{className:de("text-box-tooltip__line-number button-1"),children:C+1})}):null,n.jsx("span",{className:de("text-box-tooltip__line-text"),children:N})]},C))})]}),n.jsxs("div",{className:de("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!f}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:x,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:b,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(sn,{anchorRect:s,className:de(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:a||t("tooltip.textbox","\uBCF8\uBB38"),children:w}):n.jsx("div",{className:de(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:w})}function ap({state:e="disabled"}){const{t}=Ee.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function op(e,t,r){const a=o.useRef(t),s=o.useRef(r);o.useEffect(()=>{a.current=t,s.current=r}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=a.current(),p=c?Array.from(c.querySelectorAll(Sn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function sp({title:e,children:t,className:r="",state:a="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=Ee.useTranslation(),m=fn("(max-width: 767px)"),f=`training-step__title h4 ${u&&a==="disabled"?"training-step__title--faded":""} ${r}`.trim(),v=`training-step__title-row training-step__title-row--${a}`.trim(),y=o.useRef(null),[x,b]=o.useState(!1),[_,g]=o.useState(null),[w,N]=o.useState(null);op(x&&!!_,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let D=A.length-1;D>=0;D--)if(A[D].querySelector(".text-box-tooltip__root"))return A[D];return null},()=>y.current?.querySelector("button")??null);const C=o.useRef(l);o.useEffect(()=>{C.current=l});const B=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{b(!1),g(null),N(null)},[]);o.useEffect(()=>{if(!x)return;let A;try{typeof C.current=="function"&&(A=C.current())}catch{}if(A===!1){k();return}N(typeof A<"u"&&A!==null?A:null)},[B]);const E=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(N(typeof A<"u"&&A!==null?A:i),!y.current){b(D=>!D);return}if(x)b(!1),g(null),N(null);else{const D=y.current.getBoundingClientRect();g(D),b(!0)}}},[l,i,x]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:f,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:a==="disabled"?"disabled":"default",disabled:a==="disabled"||h,onDisabledClick:h&&a!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:y,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:x?"is-selected":void 0,"aria-expanded":x,"aria-haspopup":"dialog",variant:a==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),x&&n.jsx(io,{text:w??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:_,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ll(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function br({index:e,stepIndex:t,isLast:r=!1,title:a="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(()=>ll(e,t));o.useEffect(()=>{const C=ll(e,t);if(C!==d){const B=setTimeout(()=>m(C),0);return()=>clearTimeout(B)}},[e,t,d]);const f=o.useCallback((...C)=>{ll(e,t)==="done"||d==="done"||typeof u=="function"&&u(...C)},[e,t,d,u]),[v,y]=o.useState(!1),[x,b]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),_=o.useCallback(C=>{if(!C)return null;try{const B=C;if(typeof C=="object"&&(B.currentTarget||B.target)&&(B.nativeEvent||B.type)){const A=B.currentTarget??B.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(C instanceof DOMRect)return C;const k=C;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const E=C?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),g=o.useCallback((C,{text:B="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:A="center",alignY:D="top"}={})=>{const j=_(C);b({text:B,label:k,anchorRect:j,backdrop:E,alignX:A,alignY:D}),y(!0)},[_]),w=o.useCallback(()=>{y(!1),b(C=>({...C,anchorRect:null}))},[]),N=o.Children.map(l,C=>{if(o.isValidElement(C)){const B=C;if(typeof B.type=="string")return B;const k=B.props??{},E=typeof k.onDone=="function"?k.onDone:f,A=typeof k.disabled=="boolean";let D=d==="disabled";return A&&(D=!!k.disabled),o.cloneElement(B,{onDone:E,disabled:D,showTooltip:g,hideTooltip:w})}return C});return n.jsxs("div",{className:`training-step training-step--${d} ${r?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ap,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(sp,{state:d,title:a,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),v?n.jsx(sn,{anchorRect:x.anchorRect,backdrop:x.backdrop,onClose:w,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(io,{text:x.text,onClose:w})}):null]})}function lp({context:e,state:t="disabled",theme:r="light"}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||r}catch{return r}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(M=>M==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:f,lineHeight:v}=Du({storageKey:"textbox_fontScale"}),[y,x]=o.useState(""),b=o.useRef(null),_=o.useRef(!1),g=o.useCallback(()=>{_.current=to()&&!!b.current&&b.current.contains(document.activeElement),l("active")},[]),w=o.useCallback(()=>x(""),[]),N=M=>{try{x(M)}catch{}},C=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const M=setTimeout(()=>l(t),0);return()=>clearTimeout(M)}},[t]);const B=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,E]=o.useState(B);k!==B&&(E(B),l("disabled"));const A=t==="disabled"?s:t,D=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",j=o.useMemo(()=>({fontSize:`${f}px`,lineHeight:`${v}px`}),[f,v]);return o.useEffect(()=>{if(A==="disabled"||!_.current)return;_.current=!1;const M=document.activeElement;M&&M!==document.body||b.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:b,className:`training-text-box ${D} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:g,icon:"eye",ariaLabel:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:j,children:B})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(a("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!C&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(a("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!C&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:a("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Lr,{message:y,position:"top",onClose:w})]})}function yr(e){return e==="active"||e==="done"}function il({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:f=!1,choiceIcons:v,shuffleChoices:y=!0}){const{t:x}=Ee.useTranslation(),b=s??x("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),_=typeof e=="number"?e:-1,g=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",w=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",C=h?h.join("||"):"",[B,k]=o.useState(()=>Array.isArray(w)?y?Jr(w):w.slice():void 0);o.useEffect(()=>{Array.isArray(w)&&w.length?k(y?Jr(w):w.slice()):k(void 0)},[c,N,C,y]);const[E,A]=o.useState(null),[D,j]=o.useState(()=>new Set);o.useEffect(()=>{A(null),j(new Set)},[C,c,N]);const M=o.useRef(void 0);o.useEffect(()=>{const G=M.current;typeof G=="number"&&typeof t=="number"&&typeof e=="number"&&G>=e&&t<e&&(A(null),j(new Set)),M.current=t},[t,e]);const W=o.useCallback(G=>{if(!yr(g))return;const T=B?.[G];if(T==null)return;const I=T;if(d){const O=new Set(D);O.has(I)?O.delete(I):O.add(I),j(O),typeof u=="function"&&u({selectedValues:[...O],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...O],__ts:Date.now()})}else A(I),typeof u=="function"&&u({selectedIndex:G,selectedValue:I,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:G,selectedValue:I,__ts:Date.now()})},[B,g,d,u,D]),z=`training-step__buttons${Array.isArray(B)&&B.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:b,useTitleFaded:l,children:n.jsx("div",{className:z,children:Array.isArray(B)&&B.length>0?B.map((G,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>W(T),ariaLabel:String(G),label:G,useLabel:!0,icon:v?v[String(G)]:void 0,variant:"default",disabled:g==="disabled",selected:d?D.has(G):E===G,useDisabledCovered:f,minWidth:0},String(G))):null})})}function ul({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=Ee.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",f=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",v=u&&typeof u=="object"?u.choices:void 0,[y,x]=o.useState(c??null),b=`${String(f)}\0${JSON.stringify(v??null)}`,[_,g]=o.useState(b);_!==b&&(g(b),c==null&&x(null));const[w,N]=o.useState(c);Object.is(w,c)||(N(c),x(c??null));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&&c==null&&x(null),C.current=t},[t,e,c]);const B=o.useCallback(A=>{const D=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(D),yr(m)&&typeof l=="function"&&l(D)},[i,m,l]),k=o.useCallback(()=>{yr(m)&&(x(!1),B(!1))},[B,m]),E=o.useCallback(()=>{yr(m)&&(x(!0),B(!0))},[B,m]);return n.jsxs(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(lp,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((A,D)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{yr(m)&&(x(D),B&&B(D))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:y===D},D)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:y===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:y===!0})]})})]})}function cl({index:e,stepIndex:t,isLast:r=!1,title:a,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:f,showNoiseWaveForm:v,leadInMs:y,tailMs:x}){const{t:b}=Ee.useTranslation(),_=a??b("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),g=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(br,{index:e,stepIndex:t,isLast:r,title:_,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(sl,{soundSrc:i,ttsText:i?null:p??_,bucketPath:u,btnLabel:l||b("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:g,className:"training-step__listen-sticky",showSoundWaveForm:f,showNoiseWaveForm:v,leadInMs:y,tailMs:x},`audio-p${m??0}-s${e}`)})}const D8=[];function dl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=D8}){const{t:c}=Ee.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=te=>typeof te=="string"?te:te&&(te.context||te.sentence||te.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[f,v]=o.useState(()=>(d||[]).map((te,P)=>({id:P,text:h(te)}))),y=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),x=y!=="disabled",b=o.useRef(void 0),_=o.useRef(void 0);o.useEffect(()=>{if(b.current===u)return;b.current=u;const te=Array.isArray(u)?u:[];m(te);const P=(L=>{const R=(L||[]).map((ae,Y)=>({id:Y,text:h(ae)}));if(R.length<=1)return R;const U=(ae,Y)=>{if(ae.length!==Y.length)return!1;for(let xe=0;xe<ae.length;xe++)if(ae[xe].text!==Y[xe].text)return!1;return!0};let Z=Jr(R),X=0;for(;U(Z,R)&&X<20;)Z=Jr(R),X+=1;return Z})(te);v(P);try{if(typeof i=="function"){const L=P.filter((R,U)=>R.text===h(te[U])).length;i({shuffled:P,score:L,total:(te||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&y==="active"){const L=P.filter((R,U)=>R.text===h(te[U])).length;_.current=u,l({shuffled:P,score:L,total:(te||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(y!=="active"||_.current===u||(_.current=u,typeof l!="function"))return;const te=Array.isArray(u)?u:[],P=f.filter((L,R)=>L.text===h(te[R])).length;l({shuffled:f,score:P,total:te.length,initial:!0,__ts:Date.now()})},[y,u]);const g=(te,P)=>{const L=[...f],R=te+P;if(R<0||R>=L.length)return;const U=L[R];L[R]=L[te],L[te]=U,I(L);try{if(typeof l=="function"&&y==="active"){const Z=L.filter((X,ae)=>X.text===h(d[ae])).length;l({shuffled:L,score:Z,total:(d||[]).length,__ts:Date.now()})}}catch{}},[w,N]=o.useState(null),C=o.useRef(null),B=o.useRef(null),k=o.useRef(null),E=o.useRef(null),A=o.useRef(null),D=o.useRef({x:0,y:0}),j=o.useRef(null),M=o.useRef({dx:0,dy:0}),W=()=>{if(j.current!==null)return;const te=()=>{if(!C.current){j.current=null;return}j.current=requestAnimationFrame(te);const P=D.current,L=M.current||{dx:0,dy:0};C.current&&(C.current.style.transform=`translate3d(${P.x-L.dx}px, ${P.y-L.dy}px, 0)`)};j.current=requestAnimationFrame(te)},z=o.useRef(new Map),G=o.useRef(new Map),T=()=>{const te=new Map;return z.current.forEach((P,L)=>{P&&P.getBoundingClientRect&&te.set(L,P.getBoundingClientRect())}),te},I=te=>{const P=T();v(te);try{if(typeof i=="function"){const L=te.filter((R,U)=>R.text===h(d[U])).length;i({shuffled:te,score:L,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const L=T();te.forEach(R=>{const U=P.get(R.id),Z=L.get(R.id),X=z.current.get(R.id);if(!X||!U||!Z)return;const ae=U.top-Z.top;ae&&(X.style.transition="none",X.style.transform=`translateY(${ae}px)`,requestAnimationFrame(()=>{X.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",X.style.transform="";const Y=()=>{X.style.transition="",X.removeEventListener("transitionend",Y)};X.addEventListener("transitionend",Y)}))})})},O=(te,P)=>{try{try{P.dataTransfer?.setData("text/plain",String(te))}catch{}try{P.dataTransfer&&(P.dataTransfer.effectAllowed="move")}catch{}try{const L=document.createElement("div");L.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(L),P.dataTransfer?.setDragImage(L,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(L)}catch{}})}catch{}}catch{}N(te);try{const L=f[te],R=document.createElement("div");R.className="order-list__dragging-object order-list__dragging-object--visible",R.textContent=L&&L.text?L.text:"",document.body.appendChild(R),C.current=R;const U=z.current.get(L.id);let Z=P.clientX||0,X=P.clientY||0;try{if(U&&U.getBoundingClientRect){const F=U.getBoundingClientRect();Z=F.left+F.width/2,X=F.top+F.height/2}}catch{}const ae=R.getBoundingClientRect(),Y=ae.width/2,xe=ae.height/2;M.current={dx:Y,dy:xe},R.style.transition="none",D.current={x:Z,y:X},R.style.transform=`translate3d(${Z-Y}px, ${X-xe}px, 0)`,requestAnimationFrame(()=>{try{R.style.transition=""}catch{}W()});const ie=F=>{const Q=F;D.current={x:Q.clientX,y:Q.clientY},W()};k.current=ie,document.addEventListener("mousemove",ie);const J=F=>{const Q=F;D.current={x:Q.clientX,y:Q.clientY},W()};B.current=J,document.addEventListener("dragover",J);try{P.dataTransfer?.setData("text/plain",String(te));try{P.dataTransfer?.setData("application/json",JSON.stringify({idx:te}))}catch{}}catch{}}catch{}},pe=(te,P)=>{P.preventDefault();try{P.dataTransfer&&(P.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const L=P.currentTarget&&P.currentTarget.closest?P.currentTarget.closest(".order-list__item"):null;if(L&&E.current!==L){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{L.classList.add("drag-over")}catch{}E.current=L}}catch{}},se=(te,P)=>{P.preventDefault();const L=P.dataTransfer?.getData("text/plain")||"",R=L?parseInt(L,10):w,U=te;if(typeof R!="number"||isNaN(R)||R===U){N(null),ne(),$();return}const Z=Yb(f,R,U);I(Z),N(null),$();try{if(typeof l=="function"&&y==="active"){const X=Z.filter((ae,Y)=>ae.text===h(d[Y])).length;l({shuffled:Z,score:X,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const X=document.querySelectorAll(".order-list .order-list__item")[U];if(!X)return;const ae=X.querySelector(".order-list__slot")||X;try{ae.classList.add("pulse"),ae.offsetHeight,ae.classList.add("to-dark");const Y=()=>{ae.classList.remove("pulse","to-dark"),ae.removeEventListener("transitionend",Y)};ae.addEventListener("transitionend",Y)}catch{}})}catch{}ne()},$=()=>{if(C.current){try{document.body.removeChild(C.current)}catch{}C.current=null}B.current&&(document.removeEventListener("dragover",B.current),B.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),j.current!==null&&(cancelAnimationFrame(j.current),j.current=null)},V=()=>{N(null),ne(),$()};o.useEffect(()=>()=>$(),[]);const ne=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(te=>te.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const te=Math.max(1,(f||[]).length);f.forEach((P,L)=>{const R=G.current.get(P.id);if(!R)return;let U=50;te>1&&(U=Math.round(L/(te-1)*100));try{R.style.setProperty("--marker-pos",U+"%")}catch{}})}catch{}},[f]),o.useEffect(()=>()=>{$(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:p,children:n.jsx("div",{className:"order-list",children:f.map((te,P)=>{const L=Math.max(1,(f||[]).length),R=L>1?Math.round(P/(L-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":y==="disabled","aria-disabled":y==="disabled",children:[y!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":R+"%"},ref:U=>{const Z=G.current;U?Z.set(te.id,U):Z.delete(te.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:P+1})}):null,n.jsxs("div",{ref:U=>{const Z=z.current;U?Z.set(te.id,U):Z.delete(te.id)},className:`order-list__draggable ${w===P?"dragging":""}`,"data-disabled":y==="disabled","aria-disabled":y==="disabled",tabIndex:y==="disabled"?-1:0,draggable:x,onDragStart:x?U=>O(P,U):void 0,onDragEnter:x?U=>pe(P,U):void 0,onDragOver:x?U=>pe(P,U):void 0,onDragLeave:x?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const U=document.querySelectorAll(".order-list .order-list__item");U&&U[P]&&(U[P].classList.remove("drag-over"),E.current===U[P]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:x?U=>se(P,U):void 0,onDragEnd:x?V:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:te.text}),x?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===f.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},te.id)})})})}const S8=8e3;function T8(e,t){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.then(s,s),setTimeout(s,t)})}function ip({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:f}=Ee.useTranslation(),v=s??f("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),y=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),x=d??3,b=(y||[]).slice(0,x);(y||[]).length>x&&console.warn(`TrainingStepCard: ${y.length} items passed but only ${x} shown`);const _=typeof e=="number"?e:-1,g=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",[w,N]=o.useState(null),C=o.useRef([]),[B,k]=o.useState(!1),E=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const D=o.useMemo(()=>y.map(T=>T?.id??T?.word??"").join("|"),[y]);o.useEffect(()=>{N(null)},[D]);const j=o.useRef(void 0);o.useEffect(()=>{const T=j.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&N(null),j.current=t},[t,e]);const M=o.useCallback((T,I)=>{if(c)return;const O={item:T,index:I,__ts:Date.now()};try{typeof i=="function"&&i(O)}catch{}if(g==="active"&&typeof l=="function")try{l(O)}catch{}},[c,i,g,l]),W=o.useRef(m);o.useEffect(()=>{W.current=Math.max(0,m||0)},[m]);const z=o.useCallback(async()=>{if(B||g==="disabled")return;k(!0);let T=!1;const I=new Promise(O=>{E.current=()=>{T=!0,O()}});try{for(let O=0;O<b.length&&!(!A.current||T);O++){const pe=C.current[O];if(!pe)continue;await Promise.race([T8(pe.play(),S8),I]);const se=Math.max(0,W.current||0);se>0&&O<b.length-1&&!T&&A.current&&await Promise.race([new Promise($=>{setTimeout($,se)}),I])}}finally{E.current=null,k(!1)}},[B,g,b.length]),G=o.useCallback((T,I)=>{if(!yr(g))return;N(I);const O={selectedValue:T.word||T.title||"",selectedIndex:I,item:T,__ts:Date.now()};try{typeof i=="function"&&i(O)}catch{}if(typeof l=="function")try{l(O)}catch{}},[i,g,l]);return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:v,onDone:l,titleProps:{usePlayAllBtn:!h&&b.length>0,onPlayAll:z,playAllActive:B},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const I=E.current;if(!I)return;const O=T.target;O&&typeof O.closest=="function"&&O.closest(".training-word-card__bottom")&&I()},children:b.length===0?n.jsx("div",{className:"training-step__empty",children:f("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):b.map((T,I)=>n.jsx(zs,{ref:O=>{C.current[I]=O},item:T,disabled:g==="disabled",onPlayDone:()=>M(T,I),selectable:c,selected:c&&w===I,onSelect:c?()=>G(T,I):void 0,flipDelay:I*120,hideLabel:p,hideAudio:h},T&&T.id||I))})})}function M8(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 up(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"}]}M8(Mt.t.bind(Mt)),up(Mt.t.bind(Mt));const uo="none",$8=.5,L8=1.5,R8=.25;function pl({title:e,valueLabel:t,value:r,min:a,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(cn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(sd,{value:r,onChange:p,min:a,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:de("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:de(we("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function cp({anchorRect:e,onClose:t,hideNoiseRows:r=!1}){const{t:a}=Ee.useTranslation(),s=fn("(max-width: 767px)")?40:24,l=ao(),i=xa(l?.settings??gr),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(b=>{try{l?.setMainVolume(Math.max(0,Math.min(1,b/100)))}catch{}},[l]),f=o.useCallback(b=>{try{l?.setPlaybackRate(b)}catch{}},[l]),v=o.useCallback(b=>{const _=Math.min(va,Math.max(0,Math.round(b*10)/10));try{l?.setSettings({noiseRatio:_})}catch{}},[l]),y=o.useCallback(b=>{try{b===uo?l?.setSettings({enabled:!1}):l?.setSettings({type:b,enabled:!0})}catch{}},[l]),x=[{key:uo,label:a("training.noise.type.none","\uC5C6\uC74C")},...up(a).map(b=>({key:b.value,label:b.label}))];return n.jsx(sn,{anchorRect:e,offset:12,onClose:t,ariaLabel:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:de("noise-settings-tooltip__header"),children:[n.jsx("span",{children:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:a("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Tr,{className:de("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(pl,{title:a("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(pl,{title:a("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:$8,max:L8,step:R8,size:s,onChange:f}),!r&&n.jsxs(n.Fragment,{children:[n.jsx(cn,{variant:"custom",label:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(An,{ariaLabel:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:x,value:c?u:uo,onChange:y})}),n.jsx(pl,{title:a("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:a("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:va,step:qd,size:s,disabled:!c,onChange:v})]}),r&&n.jsx("div",{className:de("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(cn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(An,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:x,value:uo,onChange:()=>{}})})})]})})}function dp({useNoiseSettingBtn:e=!1,onSettings:t,onNext:r,onResult:a,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:p=!1}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(!1),[f,v]=o.useState(null),[y,x]=o.useState(!1),b=o.useRef(null),_=o.useRef(null),g=ao(),w=u>0,N=w&&i<u-1,C=!w||i>=u-1,B=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),v(null))},[e]);const k=o.useCallback(()=>{m(!1),v(null)},[]),E=o.useCallback(()=>{if(d){m(!1),v(null);return}const I=b?.current?.getBoundingClientRect();I&&v(I),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),v(null);return}const I=_?.current?.getBoundingClientRect();I&&v(I),t?.(),m(!0)},[d,t]),D=fn("(max-width: 767px)"),j=o.useRef(null),[M,W]=o.useState(null),z=o.useCallback(()=>{x(I=>{const O=!I;return W(O?j.current?.getBoundingClientRect()??null:null),O})},[]),G=o.useCallback(()=>{x(!1),W(null)},[]);o.useEffect(()=>{c&&(x(!1),W(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Rs,{analyser:g?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Rs,{analyser:g?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return op(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[b.current,_.current].map(I=>I?.querySelector("button")??null).find(I=>!!I&&I.getClientRects().length>0)??b.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:b,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:j,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:z,selected:y,"aria-expanded":D?y:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&y&&!D&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&y&&D&&M&&n.jsx(sn,{anchorRect:M,onClose:G,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[C&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof a=="function"?a:r,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!B}),N&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:r,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!B})]}),e&&d&&n.jsx(cp,{anchorRect:f,onClose:k,hideNoiseRows:p})]})}function pp({title:e,subtitle:t,desc:r,depth:a,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:f}=Ee.useTranslation(),v=fn("(max-width: 767px)"),y=Number.isInteger(h)?h:u||0,x=Number.isInteger(p)?p:c||0,b=d||m,_=Array.isArray(a)?v?a[a.length-1]:a.join(" / "):a,g=typeof e=="string"?e.trim():e,w=typeof t=="string"?t.trim():t,N=!!(g||w),C=N?g||w:f("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),B=_||(g?t:void 0),k=v&&typeof B=="string"&&(B.includes(" \xB7 ")||B.includes(" / "))?B.split(/\s[·/]\s/).pop():B,E=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[b?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:f("common.back","\uB4A4\uB85C"),onClick:b,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Ic,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:C}),r?n.jsx("span",{className:"pp-title__description caption-1",children:r}):null]})]}),n.jsx(cd,{max:Math.max(0,x??0),index:Math.max(0,y??0)})]})}function P8(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function F8(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(r=>r.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const hp=(e,t)=>{if(!t)return t;const r=typeof Mt?.t=="function"?Mt.t(e,{defaultValue:t}):void 0;return typeof r=="string"&&r?r:t};function mp(e,t,r){const a=e,s=a?.title||a?.name||(Array.isArray(t)?t[t.length-1]:void 0)||r||"\uD6C8\uB828",l=Pi().find(u=>u.key===(a?.category_0||a?.category_main_code)),i=l?.subs?.find(u=>u.key===(a?.category_1||a?.category_sub_code));return{title:s,label:a?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?hp(`topic.${l.key}`,l.label):void 0,i?hp(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function hl(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function fp(e,t,r){if(!e||typeof e!="object"||Array.isArray(e))return e;const a=e,s=typeof r=="number"&&r>0?r:Date.now();return{...a,...a.shownAt===void 0&&t?{shownAt:t}:{},...a.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function I8(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function O8({idPrefix:e,trainingData:t,depth:r,fallbackTitle:a="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=mp(t,r,a),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function z8(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function W8(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 H8(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 Cp(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function V8(e,t,r,a){return Cp(e,t*r+a)}function q8({payload:e,selected:t,choices:r=[],correctAnswers:a=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return a.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>a.includes(l));if(typeof s.correct=="boolean")return s.correct}if(a.length){if(typeof t=="number"&&Array.isArray(r)&&r.length)return a.some(s=>String(s)===String(r[t]));if(typeof t<"u")return a.some(s=>String(s)===String(t))}}function U8(e){return e?Array.isArray(e.items)?e.items.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.context||r.sentence||"",contextCode:r.contextCode||r.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.sentence||r.context||"",contextCode:r.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const gp=o.createContext(null);function G8(){const e=o.useContext(gp);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function K8({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Ee.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),f=JSON.stringify(l),v=l.length;o.useEffect(()=>{m(Array.from({length:v},()=>null))},[f]);const y=o.useRef(void 0);o.useEffect(()=>{const g=y.current;typeof g=="number"&&typeof t=="number"&&typeof e=="number"&&g>=e&&t<e&&m(Array.from({length:v},()=>null)),y.current=t},[t,e,v]);const x=o.useMemo(()=>d.filter(g=>g!==null).length+1,[d]),b=o.useCallback(g=>{if(!yr(h))return;const w=d;let N;if(w[g]!=null){const B=w[g];N=w.map(k=>k!==null&&k>=B?null:k)}else N=[...w],N[g]=x;m(N);const C={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(C)}catch{}if(w[g]==null&&N.length>0&&N.every(B=>B!==null))try{typeof i=="function"&&i(C)}catch{}},[h,d,x,u,i,l]),_=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:_,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((g,w)=>n.jsx(zs,{item:{word:g},disabled:h==="disabled",selectable:!0,selected:d[w]!==null,orderRank:d[w],onSelect:()=>b(w),flipDelay:w*120,hideLabel:!1,hideAudio:!0},`${g}-${w}`))})})}function co(e){return null}co.__isTrainingPage=!0;function Or(e,t){const r=G8();return{ctx:r,index:e,stepIndex:r.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:a=>r.handleStepDone(a,e),onChange:a=>r.handleStepChange(a,e)}}function bp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i}=Or(e,t);return n.jsx(cl,{...r,index:a,stepIndex:s,isLast:l,onDone:i})}function yp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(il,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function vp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(ul,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function xp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(dl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function _p({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(ip,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Y8({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(K8,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}const wp=3e4,Z8=/^(https?:|blob:|data:audio|\/|\.\/)/;function Bp(e){return typeof e=="string"&&Z8.test(e)?e:null}const X8=e=>typeof e=="string"&&e.trim()!==""?e:null,ml=Symbol("timed-out");function J8(e,t){if(t<=0)return Promise.resolve(ml);let r;return Promise.race([Promise.resolve(e),new Promise(a=>{r=setTimeout(()=>a(ml),t)})]).finally(()=>clearTimeout(r))}function Q8(e){return e?Gr()||Ba()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function eB(e,t){const r=[],a=Bp(t);a&&r.push({kind:"raw",resolve:async()=>a});const s=(e??"").trim();if(!s)return r;for(const[l,i]of[["urlResolver",Gr()],["fallbackUrlResolver",Ba()]])i&&r.push({kind:l,resolve:async u=>{let c;try{c=await J8(i(s),u)}catch(h){return kt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===ml?(kt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${wp}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):X8(c)||(kt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return r}function tB(){return Date.now()+wp}const nB=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function rB(e){kt("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 po(...e){for(const t of e)if(typeof t=="string"){const r=t.trim();if(r.length)return r}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const r=t,a=[r.text,r.label,r.value];for(const s of a){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function aB(e){return po(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function oB(e){return Bp(po(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function kp(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=po(e?.status,e?.result,e?.judge,e?.note);if(t){const r=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(a=>r.includes(a)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(a=>r.includes(a)))return!1}}function Ap(e){const{score:t,contextsLength:r,results:a=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=Ee.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=r??0;if(t!=null&&A>0&&t/A>.5){const D=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(D)}},[t,r]);const m=o.useCallback(A=>{const D=kp(A),j=po(A?.wording,A?.label);return D===!0?{variant:"main",label:j??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:D===!1?{variant:"danger",label:j??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:j??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),f=r??0,v=t??0,y=o.useMemo(()=>Array.isArray(a)?a:[],[a]),x=o.useRef(null),[b,_]=o.useState(null),g=o.useCallback(()=>{x.current?.(),x.current=null,_(null)},[]);o.useEffect(()=>g,[g]);const w=o.useRef(0),N=(A,D)=>{if(!Yn)return;const j=Math.round(performance.now()-w.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${j}ms ${A}`,D??"")},C=o.useRef(0),B=o.useCallback((A,D,j)=>{g();const M=++C.current,W=()=>C.current===M;w.current=Yn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:D,rawUrl:j}),_(A),x.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),C.current++,To()};const z=O=>{N("\uD2BC\uB2E4",O);const pe=Ca(O,se=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${se?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:W()}),se&&W()&&(x.current=null,_(null))});return x.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),C.current++,pe.stop(),To()},pe.done},G=eB(D,j);N("\uCC28\uB840",G.map(O=>O.kind));const T=G[0]?.kind==="raw",I=T?z(j):Promise.resolve(!1);(async()=>{if(await I||!W())return;const O=tB(),pe=T?G.slice(1):G;for(let se=0;se<pe.length;se++){if(!W())return;N(`${pe[se].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const $=await pe[se].resolve(nB(O,pe.length-se));if(N(`${pe[se].kind} \uAC00 \uB2F5\uD588\uB2E4`,$),!W()||$&&(await z($)||!W()))return}W()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),rB(D),x.current=()=>{C.current++,To()},N("\uB0AD\uB3C5\uD55C\uB2E4"),rb(D,{onEnd:()=>{W()&&(x.current=null,_(null))}}))})()},[g]),k=o.useMemo(()=>y.map(A=>{const D=A??{},j=aB(D)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:M,label:W}=m(D),z=Array.isArray(D.corrects)?D.corrects:[],G=z.length?z.join(", "):D.answer!=null&&D.answer!==""?String(D.answer):null,T=typeof D.selectedText=="string"?D.selectedText:null,I=kp(D)===!0,O=oB(D),pe=!!O||Q8(j);return{problem:j,variant:M,label:W,answer:G,selectedText:T,isCorrect:I,sound:O,canHear:pe}}),[y,m,p]),E=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(Vn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:D})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:D,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:v,total:f}),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:f})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,D)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(D+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:b===D?"square":"volume-2",className:"trp-row__replay",ariaLabel:b===D?p("training.result.replaySoundStop",{no:D+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:D+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>b===D?g():B(D,A.problem,A.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(rn,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},D))]})})]})})}const fl=new Set;function sB(e){o.useEffect(()=>{if(!e||fl.has(e))return;fl.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let r=null,a=null,s=0,l=0;const i=()=>{const h=Date.now();r==null&&(r=h),a==null&&(a=h)},u=()=>{a!=null&&(s+=Date.now()-a,a=null)};t()&&i();const c=()=>{if(u(),r==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,ny({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),fl.delete(e)}},[e])}function ho(e,t){return e&&e.id||`page-${t??0}`}function mo(e,t){return e&&e.key||`step-${t??0}`}function fo(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function lB(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const iB=300,uB=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Kn=Object.freeze({}),Np=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Cl(e){const t=e,r=t?.results||t?.answers||[],a=Array.isArray(r)&&r.length>0?r.length:null,s=Array.isArray(r)?r.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:r,correct:a!=null?s:null,total:a}}const cB=e=>n.jsx(Ap,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function dB(e){const{scenario:t,title:r,subTitle:a,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:f,onRoundFinished:v,onNext:y,onSettings:x,useNoiseSetting:b=!0,children:_,ariaLabel:g,label:w,buildResults:N,onResult:C,typeKey:B,entryPoint:k,dailyTotal:E,itemRef:A,renderResultPopup:D,noiseOverride:j,hideNoiseRows:M=!1,inline:W=!1,height:z}=e;sB(B&&!Np.has(B)?B:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:T}=Ee.useTranslation(),I=C,O=!!t,pe=t?.id||null,se=t?.meta||{},$=Array.isArray(t?.pages)?t.pages:[],V=Array.isArray(_)||o.isValidElement(_)&&typeof _!="function"?o.Children.toArray(_).filter(o.isValidElement):[],ne=V.length>0,te=me=>me===co||me?.__isTrainingPage===!0,P=ne&&V.some(me=>te(me.type)),L=P?V.filter(me=>te(me.type)).map((me,Te)=>{const q=me.props||{};return{id:`children-page-${Te}`,steps:o.Children.toArray(q.children).filter(o.isValidElement),pageTop:q.pageTop||q.top||null,pageBottom:q.pageBottom||q.bottom||null}}):[{id:"children-page-0",steps:V}],R=ne&&!O&&typeof _!="function",U=R?Math.max(1,L.length):0;o.useEffect(()=>{if(!W&&!(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(W||typeof document>"u"||!document.body)return;const me=document.body;return me.dataset.ihabTrainingPopupCount=String(Number(me.dataset.ihabTrainingPopupCount||"0")+1),me.classList.add("ihab-training-popup-open"),()=>{const Te=Number(me.dataset.ihabTrainingPopupCount||"1")-1;Te>0?me.dataset.ihabTrainingPopupCount=String(Te):(delete me.dataset.ihabTrainingPopupCount,me.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!W&&!(typeof document>"u"||!document.body))return wc()},[]);const[Z,X]=o.useState({...gr,enabled:!1}),ae=o.useRef(Z);o.useEffect(()=>{ae.current=Z},[Z]);const Y=o.useRef(j),xe=o.useRef(!1),ie=o.useRef(null),J=o.useRef(!1);o.useEffect(()=>{let me=!1;const Te=q=>{if(me)return;xe.current=!0;const he=q?Cr({...gr,enabled:!1},q):{...gr},ge=ie.current;ie.current=null;const Me=ge?Cr(he,ge):he;ae.current=Me,X(Me),ge&&!Y.current&&!J.current&&Uo(Me),Ta(Me);const Le=Y.current;if(Le){const Ve=typeof Le=="function"?Le(Me):Le,pt=Cr(Me,Ve);ae.current=pt,X(pt),Ta(pt)}};return fy().then(({settings:q,failed:he})=>{if(he&&(J.current=!0),me){const ge=ie.current;if(ie.current=null,ge&&!Y.current&&!he){const Me=q?Cr({...gr,enabled:!1},q):{...gr};Uo(Cr(Me,ge))}return}Te(q)}),()=>{me=!0}},[]);const[F,Q]=o.useState(null),[H,le]=o.useState(null),re=o.useCallback((me,Te)=>{me==="main"?Q(Te):le(Te)},[]),ue=o.useRef(null),Be=o.useRef(null),ke=o.useCallback(()=>{Be.current!==null&&(clearTimeout(Be.current),Be.current=null);const me=ue.current;ue.current=null,me&&!J.current&&Uo(me)},[]);o.useEffect(()=>{if(typeof window>"u")return;const me=()=>{document.visibilityState==="hidden"&&ke()};return window.addEventListener("pagehide",ke),document.addEventListener("visibilitychange",me),()=>{window.removeEventListener("pagehide",ke),document.removeEventListener("visibilitychange",me),ke()}},[ke]);const Ne=o.useCallback(me=>{const Te=Cr(ae.current,me);if(ae.current=Te,X(Te),!xe.current){ie.current={...ie.current??{},...me},Ta(Te);return}!Y.current&&!J.current&&(ue.current=Te,Be.current!==null&&clearTimeout(Be.current),Be.current=setTimeout(ke,iB)),Ta(Te)},[ke]),Re=Z.mainSpeed,ye=Z.mainVolume,_e=o.useCallback(me=>Ne({mainSpeed:me}),[Ne]),Ae=o.useCallback(me=>Ne({mainVolume:me}),[Ne]),Ie=o.useMemo(()=>({settings:Z,setSettings:Ne,registerAnalyser:re,mainAnalyser:F,noiseAnalyser:H,playbackRate:Re,setPlaybackRate:_e,mainVolume:ye,setMainVolume:Ae}),[Z,Ne,re,F,H,Re,_e,ye,Ae]),je=o.useRef(null),[tt,Ct]=o.useState(0),Oe=o.useRef([]),[qe,nt]=o.useState("center"),[We,Ze]=o.useState(!1),ot=o.useRef(!1),gt=o.useRef(null),ht=o.useCallback(me=>{ot.current||(ot.current=!0,Ze(!0),gt.current=setTimeout(()=>{try{me()}catch{ot.current=!1,Ze(!1)}},uB()?0:$c))},[]);o.useEffect(()=>()=>{gt.current&&clearTimeout(gt.current)},[]);const xt=o.useRef(m);o.useEffect(()=>{xt.current=m});const ut=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(W)return;const me=je.current,Te=ut.current;if(es(me,Te),me){const q=Array.from(me.querySelectorAll(Sn)).filter(he=>!he.closest('[aria-hidden="true"]'))[0];if(q)try{q.focus()}catch{}}return()=>{const q=document.activeElement;if(!q||q===document.body||me&&me.contains(q))try{ts(Te)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!W)return ir(()=>ht(()=>{const me=xt.current;typeof me=="function"&&me()}))},[ht,W]),La(je,!W);const[Gt,_t]=o.useState(!1),Pt=o.useRef(!1),[Qe,De]=o.useState(null),rt=o.useRef(0),it=o.useRef(0),bt=()=>{rt.current+=1,it.current+=1,De(null)},[Nt,It]=o.useState(""),[ft,mt]=o.useState(()=>fo()),At=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!O&&!R||(mt(fo()),bt())},[O,pe,R]),o.useEffect(()=>{R&&mt(me=>{const Te=Math.max(0,Math.min(me.pageIndex,Math.max(0,U-1)));return Te!==me.pageIndex?{...me,pageIndex:Te,stepIndex:0}:me})},[R,U]);const Et=R?Math.max(0,Math.min(ft.pageIndex,U-1)):0,Je=R?L[Et]:null,wt=R&&Je&&Array.isArray(Je.steps)?Je.steps:[],ce=O?ft.pageIndex:R?Et:typeof c=="number"?c:0,Se=O?$[Math.max(0,Math.min(ft.pageIndex,Math.max(0,$.length-1)))]:null,Pe=O&&Se&&Array.isArray(Se.steps)?Se.steps:[],Ge=O?Pe.length:R?wt.length:typeof d=="number"?d:0,st=O||R?Math.max(0,Math.min(ft.stepIndex,Math.max(0,Ge))):typeof h=="number"?h:0,Ot=O?$.length:R?U:typeof p=="number"?p:0;o.useEffect(()=>{if(!O&&!R)return;const me=O?ho(Se,ce):Je?.id||`children-page-${ce??0}`,Te=new Date().toISOString();for(let q=0;q<=st;q+=1){const he=O?mo(Pe[q],q):`step-${q}`,ge=Ke(me,he);$t.current.has(ge)||$t.current.set(ge,Te)}},[O,R,ce,st,Je?.id]),o.useLayoutEffect(()=>{const me=At.current;if(typeof ce=="number"&&me!==null&&ce!==me&&ce>me)try{It(T("training.problemNotice",{n:ce+1}))}catch{}At.current=typeof ce=="number"?ce:At.current},[ce,c,T]),o.useLayoutEffect(()=>{const me=je.current;if(!me)return;const Te=()=>me.querySelector(".page-popup__scroll");let q=null,he=null,ge=null;const Me=ve=>{const S=Te();if(!S)return;const ee=S.scrollHeight<=S.clientHeight;if(nt(ee?"center":"top"),ve&&!Pt.current){Pt.current=!0;try{_t(!0)}catch{}try{pt.disconnect()}catch{}}},Le=()=>{q!==null&&cancelAnimationFrame(q),q=requestAnimationFrame(()=>{he!==null&&clearTimeout(he),he=setTimeout(()=>Me(!0),60)})},Ve=()=>{ge!==null&&cancelAnimationFrame(ge),ge=requestAnimationFrame(()=>Me(!1))};Le(),window.addEventListener("resize",Ve);const pt=new MutationObserver(Le);pt.observe(me,{childList:!0,subtree:!0,attributes:!0});const yt=setTimeout(()=>{Pt.current||Me(!0)},400);return()=>{window.removeEventListener("resize",Ve),q!==null&&cancelAnimationFrame(q),he!==null&&clearTimeout(he),ge!==null&&cancelAnimationFrame(ge),clearTimeout(yt);try{pt.disconnect()}catch{}}},[je]);const ct=o.useCallback(me=>{je.current&&(je.current._childOnNext=me)},[]),Yt=o.useCallback(me=>{je.current&&(je.current._childOnResult=me)},[]),$t=o.useRef(new Map),Ke=(me,Te)=>`${me}\0${Te}`,K=o.useCallback((me,Te,q)=>{mt(he=>{const ge=he.answersByPage[me]||{},Me=ge[Te],Le=hl(q),Ve=hl(Me);if(Me&&Ve>Le)return he;const pt=fp(q,$t.current.get(Ke(me,Te)),Le);return{...he,answersByPage:{...he.answersByPage,[me]:{...ge,[Te]:pt}}}})},[mt]),Ce=o.useCallback((me,Te,q)=>{const he=ho(Se,ce),ge=mo(me,Te);K(he,ge,q)},[Se,ce,K]),He=o.useCallback((me,Te,q)=>{const he=ho(Se,ce),ge=mo(me,Te);K(he,ge,q),!q?.allowChange&&me?.autoAdvance!==!1&&mt(Me=>({...Me,stepIndex:Math.max(Me.stepIndex,Te+1)}))},[Se,ce,K,mt]),Ye=o.useCallback((me,Te)=>{const q=Je?.id||`children-page-${ce??0}`,he=typeof Te=="number"?Te:st??0,ge=`step-${he}`;K(q,ge,me),me?.allowChange||mt(Me=>({...Me,stepIndex:Math.max(Me.stepIndex,he+1)}))},[Je,ce,st,K,mt]),at=o.useCallback((me,Te)=>{const q=Je?.id||`children-page-${ce??0}`,he=`step-${typeof Te=="number"?Te:st??0}`;K(q,he,me)},[Je,ce,st,K]),dt=R?{currentPageIndex:ce??0,currentStepIndex:st??0,totalStepsInPage:wt.length,handleStepDone:Ye,handleStepChange:at}:null,jt=async()=>{const me=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:$,flowState:ft,answersByPage:ft.answersByPage})):null;return typeof I=="function"&&await Promise.resolve(I(me))||me},zt=async()=>{const me=Je?.id||`children-page-${ft.pageIndex}`,Te=ft.answersByPage[me]||{},q=P?(()=>{const Me={};let Le=0;return L.forEach(Ve=>{const pt=ft.answersByPage[Ve.id]||{},yt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let ve=0;ve<yt;ve+=1){const S=pt[`step-${ve}`];typeof S<"u"&&(Me[`step-${Le+ve}`]=S)}Le+=yt}),Me})():Te;if(typeof N=="function"){const Me=await Promise.resolve(N(q,{pageAnswers:Te,answersByPage:ft.answersByPage,pages:L,currentPageId:me}));return typeof I=="function"&&await Promise.resolve(I(Me))||Me}const he=Object.entries(Te).map(([Me,Le],Ve)=>({index:Ve,key:Me,payload:Le})),ge={results:he,answers:he,score:0};return typeof I=="function"&&await Promise.resolve(I(ge))||ge},wn=()=>{const me=++rt.current,Te=()=>me!==rt.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(O){const ge=jt();De(Kn);const Me=ge;Promise.resolve(Me).then(Le=>{Te()||De(Le||{isEmpty:!0})}).catch(Le=>{!Te()&&De({isEmpty:!0})});return}if(R){const ge=zt();De(Kn);const Me=ge;Promise.resolve(Me).then(Le=>{Te()||De(Le||{isEmpty:!0})}).catch(Le=>{!Te()&&De({isEmpty:!0})});return}const q=je.current&&je.current._childOnResult,he=ge=>{try{return ge?ge():void 0}catch{return}};if(typeof q=="function"){const ge=he(q);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}ge&&typeof ge.then!="function"?De(ge):De(ge&&typeof ge.then=="function"?Kn:{});const Me=()=>{Te()||De(Le=>Le===Kn?{}:Le)};Promise.resolve(ge).then(Le=>{Le&&!Te()?De(Le):Me()}).catch(Le=>{Me()});return}if(typeof I=="function"){const ge=he(I);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}ge&&typeof ge.then!="function"?De(ge):De(ge&&typeof ge.then=="function"?Kn:{});const Me=()=>{Te()||De(Le=>Le===Kn?{}:Le)};Promise.resolve(ge).then(Le=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}Le&&!Te()?De(Le):Me()}).catch(Le=>{console.error("viewResults external handler failed",Le),Me()});return}},an=()=>{if(O){if(typeof ce=="number"&&typeof Ot=="number"&&ce<Ot-1){mt(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return wn()}if(R){const Te=wt.length;if(typeof st=="number"&&st<Te-1){mt(q=>({...q,stepIndex:q.stepIndex+1}));return}if(typeof ce=="number"&&typeof Ot=="number"&&ce<Ot-1){mt(q=>({...q,pageIndex:q.pageIndex+1,stepIndex:0}));return}return wn()}if(typeof y=="function"){try{y()}catch{}return}const me=je.current&&je.current._childOnNext;if(typeof me=="function"){try{me()}catch{}return}},Bn=O?se.title||se.label||g||T("common.popup","\uD31D\uC5C5"):r||w||(Array.isArray(s)?s[s.length-1]:void 0)||g||T("common.popup","\uD31D\uC5C5"),dn=g||Bn,Xt=O?se.title??se.label??Bn:r??w??Bn,on=(me,Te)=>{const q=ho(Se,ce),he=mo(me,Te),ge=ft.answersByPage[q]?.[he],Me=lB(me,{page:Se,pageIndex:ce,step:me,stepIndex:Te,storedPayload:ge,answersByPage:ft.answersByPage,flowState:ft}),Le={key:he,index:Te,stepIndex:st,isLast:Te===Pe.length-1};switch(me?.type){case"listen":return n.jsx(cl,{...Le,...Me,onDone:Ve=>He(me,Te,Ve)});case"confirm":return n.jsx(il,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});case"confirmWithText":return n.jsx(ul,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});case"orderList":return n.jsx(dl,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});default:return null}},pn=o.useRef(void 0);o.useEffect(()=>{const me=pn.current;if(pn.current=ce,me===void 0||me===ce||!to())return;const Te=je.current;if(!Te)return;const q=document.activeElement;if(!(!q||q===document.body||!Te.contains(q)||q.disabled===!0))return;const he=Te.querySelector(`.training-steps ${Sn.split(", ").join(", .training-steps ")}`)??Array.from(Te.querySelectorAll(Sn)).find(ge=>!ge.closest('[aria-hidden="true"]'));try{he?.focus()}catch{}},[ce]);const Qt=O?$.length>0?n.jsx("div",{className:"training-steps",children:Pe.map((me,Te)=>on(me,Te))},`replay-${tt}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Lt=R?n.jsxs(gp.Provider,{value:dt,children:[Je?.pageTop?n.jsx("div",{className:"training-page-top",children:Je.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((me,Te)=>{const q=me;return o.cloneElement(q,{...q.props,_stepIndex:Te,_totalSteps:wt.length,_stepKey:`step-${Te}`,_pageIndex:ce})})},`replay-${tt}`),Je?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Je.pageBottom}):null]}):null,Dt=o.useRef(-1),Wt=o.useCallback(()=>{if(!B)return;const me=Qe,{results:Te,correct:q,total:he}=Cl(Qe),ge={correct:q,total:he,attempt:Oe.current.length+1,previousAttempts:[...Oe.current]};if(Dt.current===it.current)return ge;Dt.current=it.current,ry({items:hy(Te),category:Np.has(B)?"sentence":"word",trainingType:B,entryPoint:k??"sentence",itemRef:A??null,correct:q,total:he,score:typeof me?.score=="number"?me.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:E??null});try{v?.(ge)}catch{}return ge},[B,k,E,A,Qe,v]);o.useEffect(()=>{!Qe||Qe===Kn||Qe?.isEmpty||(Cl(Qe).total??0)>0&&Wt()},[Qe,Wt]);const Rt=o.useCallback(()=>{const me=Wt();bt(),ht(()=>{typeof f=="function"&&f(me),typeof m=="function"&&m()})},[f,m,Wt,De,ht]),Pn=o.useCallback(()=>It(""),[It]),En=o.useCallback(()=>{ht(()=>{typeof m=="function"&&m()})},[m,ht]),ar=n.jsxs("div",{className:`page-popup${We?" page-popup--closing":""}${W?" page-popup--inline":""}${W&&z!=null?" page-popup--has-height":""}`,role:W?"region":"dialog","aria-modal":W?void 0:"true","aria-label":dn,style:W&&z!=null?{"--page-popup-inline-height":typeof z=="number"?`${z}px`:z}:void 0,children:[n.jsxs("div",{ref:je,className:`page-popup__panel ${Gt?"":"page-popup__panel--measuring"} ${qe==="center"?"page-popup__panel--center":qe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(pp,{title:Xt,subtitle:O?se.subtitle||se.label:Array.isArray(s)?s.join(" / "):void 0,desc:O?void 0:a,depth:O?se.depth:s,icon:O?se.icon:l,wrapperStyle:O?se.wrapperStyle:i,iconTooltip:O?se.iconTooltip:u,progressMax:Ot,progressIndex:ce,pageIndex:ce,pageCount:Ot,onBack:W?void 0:En,onClose:W?void 0:En}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${qe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:R?Lt:O?Qt:typeof _=="function"?_({registerOnNext:ct,registerOnResult:Yt,panelRef:je,setResultOverlay:De}):_})}),n.jsx(dp,{onSettings:x,onNext:an,onResult:wn,useNoiseSettingBtn:!!(O?se.useNoiseSetting??!0:b),stepIndex:st,stepCount:Ge,pageIndex:ce,pageCount:Ot,resultOpen:!!(Qe&&!Qe.isEmpty),hideNoiseRows:M})]}),Qe&&!Qe.isEmpty&&(D??cB)({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!==Kn){const{correct:me,total:Te}=Cl(Qe);Oe.current.push({correct:me,total:Te})}if(bt(),Ct(me=>me+1),O){if(mt(fo()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(R){mt(fo());return}try{const me=je.current&&je.current._childOnResult;typeof me=="function"&&me({replay:!0})}catch{}},onClose:Rt,pending:Qe===Kn}),Qe?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:Rt,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Lr,{message:Nt,position:"top",onClose:Pn})]}),$n=n.jsx(nl.Provider,{value:Ie,children:ar});return W?$n:typeof document<"u"&&document.body?bn.createPortal($n,document.body):$n}const rr=dB;rr.Page=co,rr.ListenStep=bp,rr.ConfirmStep=yp,rr.ConfirmWithTextStep=vp,rr.OrderListStep=xp,rr.CardStep=_p,rr.CardOrderStep=Y8;function pB(e=[]){const t=o.useRef(null),r=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const f=Math.min(i.length,Math.ceil((m+c)/(u+c)));f<=1||(h.style.gridColumn=`span ${f}`,h.setAttribute("data-wide",""))}},[]),a=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))r(l)},[r]);return o.useLayoutEffect(()=>{a();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>a());return l.observe(s),()=>l.disconnect()},[a,...e]),t}function hB({label:e,homonum:t}){const r=Br()?.(e,t)??"",{imgRef:a,loading:s,hasImage:l,onLoad:i,onError:u}=Os(r);return l?n.jsxs("div",{className:de("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:de("word-image-tooltip__spinner")}),n.jsx("img",{ref:a,src:r,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:de("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Ep({words:e,anchorRect:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!r.current)return;const{offsetWidth:l,offsetHeight:i}=r.current,u=window.innerWidth,c=window.innerHeight,p=8,h=t.top,d=c-t.bottom,m=h>=i+p*2||h>d,f=(x,b)=>Math.min(Math.max(p,x),Math.max(p,b)),v=f(t.left+t.width/2-l/2,u-l-p),y=f(m?t.top-i-p:t.bottom+p,c-i-p);s({left:v,top:y})},[t]),!t||e.length===0?null:bn.createPortal(n.jsx("div",{ref:r,className:de("word-image-tooltip"),style:{visibility:a?"visible":"hidden",left:a?.left??0,top:a?.top??-9999},children:n.jsx("div",{className:de("word-image-tooltip__cells"),children:e.map(l=>n.jsx(hB,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function mB({titleIcon:e,resultCount:t,resultUnit:r,searchQuery:a,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:f,showEmptyText:v=!0,sectionType:y="page",disc:x}){const b=kn()??gn,{t:_,i18n:g}=Ee.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:N,openAt:C,close:B}=Wa(),[k,E]=o.useState(null),A=o.useCallback(()=>{B(),E(null)},[B]);wv(A,!!k);const D=(a??"").trim(),j=/^[^,[\]\s]+$/.test(D)?D:"",M=j.length>0,W=a===void 0&&t===void 0,z=M?"match":W?"original":"ganada",[G,T]=o.useState(()=>z),[I,O]=o.useState("50"),[pe,se]=o.useState(1),[$,V]=o.useState(M);$!==M&&(V(M),T(z));const ne=G==="match"&&!M||G==="original"&&!W?z:G,te=o.useMemo(()=>[...M?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...W?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,M,W]),P=o.useMemo(()=>["10","25","50","100"].map(ye=>({value:ye,label:_("wordSearch.pageSize",{count:Number(ye),defaultValue:`${ye}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),L=ye=>ye.words?.[0],R=o.useMemo(()=>{const ye=[...j].length,_e=Lb(j),Ae=new Map;return Ie=>{let je=Ae.get(Ie);return je===void 0&&(je=_e((Ie.words?.[0]?.label??"").slice(0,ye))?0:1,Ae.set(Ie,je)),je}},[j]),U=o.useCallback((ye,_e)=>{const Ae=tt=>L(tt)?.label??"",Ie=tt=>L(tt)?.syllables??[...Ae(tt)].length,je=tt=>(tt.words??[]).reduce((Ct,Oe)=>{const qe=parseInt(Oe.grade??"",10);return Number.isFinite(qe)&&qe<Ct?qe:Ct},999);switch(ne){case"match":return R(ye)-R(_e)||xn(Ae(ye),Ae(_e));case"ganada":return xn(Ae(ye),Ae(_e));case"ganada_desc":return xn(Ae(_e),Ae(ye));case"syllable":return Ie(ye)-Ie(_e)||xn(Ae(ye),Ae(_e));case"syllable_desc":return Ie(_e)-Ie(ye)||xn(Ae(ye),Ae(_e));case"grade":return je(ye)-je(_e)||xn(Ae(ye),Ae(_e));case"grade_desc":return je(_e)-je(ye)||xn(Ae(ye),Ae(_e));default:return 0}},[ne,R]),Z=o.useMemo(()=>s.slice().sort(U),[s,U]),X=Number(I)||10,ae=o.useMemo(()=>(l??[]).flatMap(ye=>ye.items.slice().sort(U).map(_e=>({item:_e,label:ye.label}))),[l,U]),Y=l?ae.length:Z.length,xe=Math.max(1,Math.ceil(Y/X)),ie=Math.min(pe,xe),J=o.useMemo(()=>Z.slice((ie-1)*X,ie*X),[Z,ie,X]),F=o.useId(),Q=o.useMemo(()=>{if(!l)return null;const ye=ae.slice((ie-1)*X,ie*X),_e=new Map;for(const{item:Ae,label:Ie}of ye)_e.has(Ie)||_e.set(Ie,[]),_e.get(Ie).push(Ae);return[..._e.entries()].map(([Ae,Ie])=>({label:Ae,items:Ie}))},[l,ae,ie,X]);o.useEffect(()=>{se(1)},[G,I,Y,a]);const H=Y>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(Nn,{size:b,options:te,value:ne,onChange:T,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(Nn,{size:b,options:P,value:I,onChange:O,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Ns,{page:ie,totalPages:xe,onChange:se})]}):void 0,le=ye=>{u&&u(ye)},re=t!==void 0&&r?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:w?Ub(r):r})]}):void 0,ue=t!==void 0&&t>0&&c!==void 0&&r?_("wordSearch.resultDisc",{unit:w?Kb(r):r,max:c,selected:i.length}):void 0,Be=x??ue,ke=l?l.length===0:s.length===0,Ne=pB([l,J,G,X,pe]),Re=ke&&!v&&!f;return n.jsxs(Rr,{type:y,className:we("word-search-result-block",m),children:[n.jsxs("div",{ref:Ne,className:we("word-search-result-block__inner",Re&&"word-search-result-block__inner--head-only"),children:[(re||H||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(lt,{icon:e,className:"word-search-result-block__head-icon"}),re&&n.jsx("span",{className:"word-search-result-block__title h3",children:re})]}),H&&n.jsx("div",{className:"word-search-result-block__head-actions",children:H}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),ke&&(v||f)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[v&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),f&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:f})]}),l?(Q??[]).map(ye=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${F}-${ye.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${F}-${ye.label}`,children:ye.label}),n.jsx("div",{className:"word-search-result-block__items",children:ye.items.map(_e=>{const Ae=i.includes(_e.id);return n.jsx("div",{onMouseEnter:Ie=>{C(Ie.currentTarget),E(_e.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(_e.words??[]).map(Ie=>Ie.label),subLabel:(_e.words??[]).some(Ie=>Ie.subLabel)?(_e.words??[]).map(Ie=>Ie.subLabel):void 0,selected:Ae,onClick:()=>le(_e.id),minWidth:200})},_e.id)})})]},ye.label)):n.jsx("div",{className:"word-search-result-block__items",children:J.map(ye=>{const _e=i.includes(ye.id);return n.jsx("div",{onMouseEnter:Ae=>{C(Ae.currentTarget),E(ye.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(Ae=>Ae.label),subLabel:(ye.words??[]).some(Ae=>Ae.subLabel)?(ye.words??[]).map(Ae=>Ae.subLabel):void 0,selected:_e,onClick:()=>le(ye.id),minWidth:200})},ye.id)})}),k&&N&&n.jsx(Ep,{words:k,anchorRect:N})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function fB(e,t){return t.map(r=>{const a=typeof r=="string"?r:r.label,s=typeof r=="string"?void 0:r.displayLabel;return{label:a,value:e[a]??"",displayLabel:s}})}function CB({sections:e,selectedList:t,count:r,onCountChange:a,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:f,showInfoButton:v=!0,onClearPhoneme:y,onSearch:x,onSearchEmpty:b,searchDisabled:_=!1,searchLabel:g,searchChecking:w=!1,pairMode:N=!1,sectionType:C="page",beforeSearchContent:B,beforeContent:k,afterContent:E,hideCountControl:A=!1,ordinal:D=!1}){const{t:j}=Ee.useTranslation(),M=o.useMemo(()=>j("wordPairs.infoNotes",{returnObjects:!0}),[j]),W=o.useMemo(()=>Array.from({length:s-l+1},(P,L)=>{const R=l+L;return{key:String(R),label:j("wordPairs.count",{n:R})}}),[j,s,l]),z=o.useMemo(()=>j("wordPairs.ordinals",{returnObjects:!0}),[j]),G=o.useCallback(P=>D?j("wordPairs.phonemeOrdinalLabel",{ordinal:z[P-1]??P}):r===1?j("wordPairs.phonemeSingleLabel","\uC74C\uC808"):j("wordPairs.phonemeN",{n:P}),[D,z,r,j]),T=o.useCallback(P=>D?j("wordPairs.phonemeContrastOrdinalLabel",{ordinal:z[P-1]??P}):r===1?j("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):j("wordPairs.phonemeContrast",{n:P}),[D,z,r,j]),I=o.useCallback((P,L)=>L?n.jsxs(n.Fragment,{children:[P,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):P,[]),{anchorRect:O,toggleAt:pe,close:se}=Wa(),$=o.useCallback(P=>a(Number(P)),[a]),V=fn("(max-width: 767px)"),ne=o.useCallback(P=>fB(P,e).map(({label:L,value:R,displayLabel:U})=>{const Z=!!R&&R!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",R?"":"phoneme-select-block__cell-jamo-part--empty",Z?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${R==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:R==="\uC5C6\uC74C"?"x":R||p}),Z&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:U??L})]},L)}),[e,p]),te=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:V?"dot":void 0,icon:"info",label:V?void 0:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:O?"is-selected":void 0,"aria-expanded":!!O,"aria-haspopup":"dialog",onClick:P=>pe(P.currentTarget)})}),O&&n.jsx(Qn,{title:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:M,anchorRect:O,onClose:se})]});return n.jsxs(Rr,{type:C,title:d,icon:m,disc:f,action:v?te:void 0,className:we("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(An,{options:W,value:String(r),onChange:$,size:40,ariaLabel:j("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*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:ne(R)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:G(L+1)})]},L)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:j("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*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:ne(R)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(L+1)})]},L)})})]}):t.map((P,L)=>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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:G(L+1)})]},L))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*2]??{};return n.jsx(Gn,{title:I(G(L+1),L===0),sections:u?u(R,L*2):i,selected:R,onSelect:c?.(L*2),align:"newline"},L)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*2+1]??{};return n.jsx(Gn,{title:T(L+1),sections:u?u(R,L*2+1):i,selected:R,onSelect:c?.(L*2+1),align:"newline"},L)})})]}):t.map((P,L)=>n.jsx(Gn,{title:I(G(L+1),L===0),sections:u?u(P,L):i,selected:P,onSelect:c?.(L),align:"newline"},L))})}),B&&n.jsx("div",{className:"phoneme-select-block__before-search",children:B}),(y||x||w)&&(()=>{const P=t.every(L=>{const R=Sb(L);return Object.entries(R).every(([U,Z])=>!Z||U==="coda"&&Z===wi)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:P?b:void 0,children:[y&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:j("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:P,onClick:P?void 0:y}),x?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:w?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:g??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:P||_||w,onDisabledClick:w?()=>{}:void 0,"aria-busy":w||void 0,onClick:x}):w?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:g??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function gB({title:e,sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=Ee.useTranslation();return n.jsx(Gn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function bB({title:e,headerAction:t,sections:r,selected:a,onSelect:s,collapsible:l,defaultCollapsed:i,collapsed:u,onCollapsedChange:c,headerSummary:p,className:h}){const{t:d}=Ee.useTranslation();return r.length===0?null:n.jsx(Gn,{className:h,title:e??d("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:r,selected:a,onSelect:s,collapsible:l,defaultCollapsed:i,collapsed:u,onCollapsedChange:c,headerSummary:p,align:"newline"})}function yB({title:e,mode:t,onModeChange:r,matchMode:a,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=Ee.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=x=>h("wordPairs.count",{n:x}),f=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(ca,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(ca,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(ca,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],v={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:a==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},y=(x,b)=>{b===d.searchMode?r(x===d.explicit?"explicit":x===d.pick?"pick":"include"):b===d.phonemeOrder?s(x===d.orderMatch?"ordered":"unordered"):b===d.count?i(x===m(2)?2:1):b===d.inputMode&&c(x===d.pronInput?"phoneme":"word")};return n.jsx(Gn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:f,selected:v,onSelect:y,align:"inline"})}function vB(e){const{title:t,items:r,columns:a,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:f,onClose:v,pageSizeOptions:y=[10,25,50,100],initialPageSize:x,emptyText:b,noMatchText:_,countLabel:g,topContent:w,className:N=""}=e,{t:C}=Ee.useTranslation(),B=u??C("common.search","\uAC80\uC0C9"),k=b??C("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=_??C("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,D]=o.useState(""),[j,M]=o.useState(p??a[0]?.key??""),[W,z]=o.useState(h),[G,T]=o.useState(String(x??y[0]??10)),[I,O]=o.useState(1);o.useEffect(()=>{O(1)},[A,G]);const pe=c!==null,se=o.useCallback((X,ae)=>{if(!ae)return!0;const Y=ae.toLowerCase();return a.some(xe=>{const ie=X[xe.key];return ie==null?!1:String(ie).toLowerCase().includes(Y)})},[a]),$=c??se,V=o.useMemo(()=>{const X=pe?r.filter(ae=>$(ae,A)):r;return j?[...X].sort((ae,Y)=>{const xe=ae[j],ie=Y[j];return xe===ie?0:za(xe,ie,W)}):X},[r,A,j,W,pe,$]),ne=Math.max(1,Math.ceil(V.length/Number(G)));I>ne&&O(ne);const te=Math.min(I,ne),P=V.slice((te-1)*Number(G),te*Number(G)),L=o.useCallback(X=>{j===X?z(ae=>!ae):(M(X),z(!0)),O(1)},[j]),R=o.useMemo(()=>{if(typeof g=="function"){const X=V.length,ae=g(X);if(typeof ae=="string"){const Y=ae.lastIndexOf(String(X));if(Y>=0)return{prefix:ae.slice(0,Y),suffix:ae.slice(Y+String(X).length)}}return{label:ae}}if(typeof g=="string"&&g.includes("{n}")){const[X,ae]=g.split("{n}");return{prefix:X,suffix:ae}}return{prefix:C("common.totalCountPrefix","\uCD1D "),suffix:C("common.totalCountSuffix","\uAC1C")}},[g,V.length,C]),U=o.useMemo(()=>a.map(X=>({label:X.label,onClick:X.sortable!==!1?()=>L(X.key):void 0,className:X.className,sortDir:X.sortable!==!1&&j===X.key?W?"asc":"desc":null})),[a,j,W,L]),Z=Rv(y);return n.jsxs(Vn,{className:`popup-list ${N}`,title:t,onClose:v,children:[w,"label"in R&&n.jsx("p",{className:"toolbar__count body-1",children:R.label}),n.jsx(Es,{count:"label"in R?void 0:{value:V.length,prefix:R.prefix,suffix:R.suffix},search:pe?{value:A,onChange:D,placeholder:B}:void 0,pageSize:{options:Z,value:G,onChange:T},pagination:{page:te,total:ne,onChange:O}}),n.jsx(Fs,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:U,items:P,onRowClick:f,renderRow:X=>{const ae=m!=null?X.id!=null&&m.has(X.id):d!=null&&X.id===d;return a.map(Y=>({content:Y.render?Y.render(X):X[Y.key]??"",className:we(Y.className,ae&&"popup-list__row--selected")}))},empty:pe&&A!==""&&r.length>0?E:k})]})}function jp(e,t,r={}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(Ka,{title:r.title??a("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:r.message??a("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:r.confirmLabel??a("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function xB(e,t,r={}){const a=JSON.stringify(e),[s,l]=o.useState(a),i=a!==s,u=jp(i,t,r),c=o.useRef(a);c.current=a;const p=o.useCallback(()=>l(c.current),[]);return{...u,isDirty:i,rebase:p}}function _B({onApply:e,onCancel:t}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async v=>{const y=a.trim();if(y){i(!0),c(null);try{await e(y),v()}catch(x){c(zo(x)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[a,e]),m=o.useCallback((v,y)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&d(y)},[d]),f=v=>{s(v.target.value),c(null)};return n.jsx(Vn,{className:"coupon-input-popup",title:r("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),width:"small",onClose:t,closeDisabled:l,buttons:[{label:r("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:v})=>v()},{label:r("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!a.trim()||l,onClick:({closeWithAnimation:v})=>{d(v)}}],children:({closeWithAnimation:v})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":r("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:r("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:a,onChange:f,onKeyDown:y=>m(y,v),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const Dp=["var(--color-main)","var(--color-sub)"],wB=2e3;function BB(e,t){if(!t.startsWith("var("))return t;try{const r=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(r).trim()||null}catch{return null}}function gl({active:e=!1,count:t=40,duration:r=2e3,strength:a=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const y=Math.floor(t/2),x=t-y,b=(_,g)=>Array.from({length:_}).map((w,N)=>{const C=6+Math.random()*12,B=Math.round(Math.min(18,C*Math.min(1.5,1+a*.4))),k=Dp[Math.floor(Math.random()*Dp.length)],E=Math.random()*300,A=(360+Math.random()*260)*a*1.2,D=(g==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,j=Math.cos(D)*A,M=Math.sin(D)*A*1.35,W=Math.random()*720-360,z=(1200+Math.random()*3e3)*Math.min(1.6,1+a*.3),G=Math.random()>.7?"50%":"3px";return{id:`${g}-${N}`,side:g,size:B,color:k,delay:E,vx:j,vy:M,angularVel:W,life:z,borderRadius:G}});return[...b(y,"left"),...b(x,"right")]},[t,a]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),f=()=>{if(typeof document>"u")return null;let y=document.querySelector("[data-ihab-effect-root]");return y||(y=document.createElement("div"),y.className="app-effect",y.dataset.ihabEffectRoot="",y.style.position="fixed",y.style.inset="0",y.style.pointerEvents="none",y.style.zIndex="99998",document.body.appendChild(y)),y};if(typeof document<"u"&&m.current==null&&(m.current=f()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const se=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(se)}const y=1200,x=performance.now(),b=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,_=Math.max(60,(window.innerHeight||800)*.05),g=se=>Math.max(40,(se||window.innerWidth)*.02),w=b?.width||window.innerWidth||375,N=b?.height||window.innerHeight||812,C=se=>{const $=[...se].sort((V,ne)=>V-ne);return $[Math.floor($.length/2)]||1},B=C(i.map(se=>Math.abs(se.vy))),k=C(i.map(se=>Math.abs(se.vx))),E=Math.sqrt(2*y*(N*.72+_))/B,A=B*E/y,D=w*.5/(k*A),j=(se,$,V)=>Math.min(V,Math.max($,se)),M=j(E,.8,2.4),W=j(D,.7,2.2),z=r>0?r/wB:1,G=i.map(se=>({...se,life:se.life*z,vx:se.vx*W,vy:se.vy*M,startTime:x+se.delay,ended:!1})),T=b?{x:b.left-g(b.width),y:b.top+b.height+_}:{x:-g(window.innerWidth),y:window.innerHeight+_},I=b?{x:b.left+b.width+g(b.width),y:b.top+b.height+_}:{x:window.innerWidth+g(window.innerWidth),y:window.innerHeight+_},O=se=>{let $=!1;for(const V of G){const ne=c.current[V.id];if(!ne||!ne)continue;if(se<V.startTime){ne.style.display="none",$=!0;continue}if(!V._inited){const xe=V.side==="left"?T.x:I.x,ie=V.side==="left"?T.y:I.y;ne.style.left=`${xe}px`,ne.style.top=`${ie}px`,ne.style.transform="translate3d(0px, 0px, 0)",ne.style.display="block",ne.style.zIndex="100000",typeof V.color=="string"&&V.color.startsWith("var(")&&(ne.style.background=BB(ne,V.color)??"#FF0060"),V._inited=!0}const te=(se-V.startTime)/1e3;if(te<0)continue;const P=V.life/1e3;if(te>=P){ne.style.opacity="0",ne.style.display="none",V.ended=!0;continue}$=!0;const L=V.side==="left"?T.x:I.x,R=V.side==="left"?T.y:I.y,U=L+V.vx*te,Z=R+V.vy*te+.5*y*te*te,X=(V.angularVel||0)*te,ae=U-L,Y=Z-R;ne.style.transform=`translate3d(${ae}px, ${Y}px, 0) rotate(${X}deg)`,ne.style.opacity=`${Math.max(0,1-te/P)}`}$?p.current=requestAnimationFrame(O):h.current?.()};p.current=requestAnimationFrame(O);const pe=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const se=document.createElement("div");se.className="party-container",se.style.position="fixed",se.style.inset="0",se.style.pointerEvents="none",se.style.overflow="visible",se.style.zIndex="2147483647";for(const $ of i){const V=document.createElement("span");V.className=`confetti confetti--${$.side}`,V.setAttribute("aria-hidden","true"),V.style.display="none",V.style.position="fixed",V.style.left="0px",V.style.top="0px",V.style.width=`${$.size}px`,V.style.height=`${Math.max(4,$.size*.6)}px`,V.style.background=$.color,V.style.borderRadius=$.borderRadius,V.style.transform="translate3d(0,0,0)",V.style.opacity="0",se.appendChild(V),c.current[$.id]=V}(document.body||m.current).appendChild(se),d.current=se}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(pe),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,r,l,i]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:u,children:i.map(y=>n.jsx("span",{"aria-hidden":!0,ref:x=>{c.current[y.id]=x},className:`confetti confetti--${y.side}`,style:{width:`${y.size}px`,height:`${Math.max(4,y.size*.6)}px`,background:y.color,borderRadius:y.borderRadius}},`${y.id}-${l}`))});return typeof document<"u"?bn.createPortal(v,m.current||document.body):v}const bl=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function kB({trigger:e=0,active:t=!1}){const[r,a]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};a(c=>({n:(c?.n??0)+1,count:bl(u.count),strength:bl(u.strength),duration:bl(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>a(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(gl,{active:t,trigger:e}),r&&n.jsx(gl,{active:!0,trigger:r.n,count:r.count,strength:r.strength,duration:r.duration,onComplete:s})]})}function AB({title:e,sub:t,rightAction:r,titleAction:a,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=Ee.useTranslation();uv(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(rn,{label:s,size:"small",variant:l,fill:"outline"})}),a?n.jsx("div",{className:"page-title__title-action",children:a}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),r?n.jsx("div",{className:"page-title__action",children:r}):null]})}function NB(e){return e??""}const Sp=o.createContext({words:[],loading:!1});function EB(){return o.useContext(Sp)}function jB({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,r,a,s,l,i,u,c]);return n.jsx(Sp.Provider,{value:h,children:p})}function DB({items:e,actions:t,columns:r,flat:a=!1,className:s,style:l}){const i=r??e.length;return n.jsx("section",{className:we("summary-strip",a&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const SB=(e,t)=>`${e} / ${t}`;function TB({blocks:e,sectionTitles:t,logo:r,footer:a,pageLabel:s=SB,pageWidth:l,pageHeight:i,margin:u,className:c,style:p,page:h,zoom:d,layout:m="stack",onPageCountChange:f}){const{t:v}=Ee.useTranslation(),y=o.useRef(null),x=o.useRef(null),b=o.useRef(null),_=o.useRef(null),[g,w]=o.useState(null),[N,C]=o.useState(!1);o.useEffect(()=>{const $=y.current;if(!$)return;const V=()=>C($.scrollWidth>$.clientWidth+1);if(V(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(V);return ne.observe($),()=>ne.disconnect()},[g]);const B=e.map($=>`${$.id}\0${$.section??""}\0${$.group??""}`).join(""),k=g&&g.shape===B?g.pages:null,E=k?k.length:0,A=o.useRef(f);A.current=f,o.useEffect(()=>{E>0&&A.current?.(E)},[E]);const D=h!=null&&E>0?Math.min(E,Math.max(1,Math.floor(h)))-1:null,[j,M]=o.useState(0);o.useEffect(()=>{const $=_.current;if(!$||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>M($.offsetHeight));return V.observe($),()=>V.disconnect()},[]);const[W,z]=o.useState(0);o.useEffect(()=>{const $=x.current;if(!$||typeof ResizeObserver>"u")return;let V=null;const ne=typeof requestAnimationFrame=="function"?L=>requestAnimationFrame(L):L=>setTimeout(L,16),te=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:L=>clearTimeout(L),P=new ResizeObserver(()=>{V==null&&(V=ne(()=>{V=null,z(L=>L+1)}))});return Array.from($.children).forEach(L=>P.observe(L)),()=>{P.disconnect(),V!=null&&te(V)}},[B]),o.useLayoutEffect(()=>{const $=x.current,V=_.current;if(!$||!V)return;const ne=Y=>Y.getBoundingClientRect().height||Y.offsetHeight,te=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(Y=>{te.set(Y.dataset.chromeSection??"",ne(Y))});const P=Y=>ne(V)-(te.get(Y??"")??0),L=Array.from($.children).map(Y=>ne(Y)),R=[];e.forEach((Y,xe)=>{const ie=R[R.length-1],J=ie?e[ie[0]]:void 0;J&&Y.group!=null&&J.group===Y.group&&J.section===Y.section?ie.push(xe):R.push([xe])});const U=[];let Z=[],X=0;const ae=()=>{Z.length&&U.push(Z),Z=[],X=0};R.forEach(Y=>{const xe=Y.reduce((J,F)=>J+L[F],0),ie=P(e[Y[0]].section);Z.length&&e[Z[0]].section!==e[Y[0]].section&&ae(),xe>ie?Y.forEach(J=>{Z.length&&X+L[J]>ie+.01&&ae(),Z.push(J),X+=L[J]}):(Z.length&&X+xe>ie+.01&&ae(),Y.forEach(J=>Z.push(J)),X+=xe)}),ae(),w(Y=>Y&&Y.shape===B&&JSON.stringify(Y.pages)===JSON.stringify(U)?Y:{shape:B,pages:U})},[B,j,l,i,u,W]);const G=bs,T=G,I=a??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:T,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),O=($,V,ne)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:ne!=null&&t?.[ne]||null}),r]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:I}),n.jsx("span",{className:"report-doc__page-no",children:s($,V)})]})}),pe=Array.from(new Set(e.map($=>$.section??""))),se={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d!=null&&d>0&&d!==1?{"--report-zoom":String(d)}:null,...p};return n.jsxs("div",{ref:y,className:we("report-doc",m==="spread"&&"report-doc--spread",c),style:se,tabIndex:N?0:void 0,role:N?"group":void 0,"aria-label":N?v("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:_,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:pe.map($=>{const V=O(1,1,$||void 0);return n.jsxs("div",{"data-chrome-section":$,children:[V.header,V.footer]},$)})}),n.jsx("div",{ref:x,className:"report-doc__measure-blocks",children:e.map($=>n.jsx("div",{children:$.content},$.id))})]}),k&&n.jsx("div",{className:"report-doc__pages",children:k.map(($,V)=>{const{header:ne,footer:te}=O(V+1,k.length,e[$[0]].section);return n.jsxs("section",{className:we("report-doc__page",D!=null&&D!==V&&"report-doc__page--off-screen"),children:[ne,$.map(P=>n.jsx("div",{children:e[P].content},e[P].id)),te]},V)})})]})}function MB({title:e,fields:t,columns:r=4,className:a,style:s}){return n.jsxs("div",{className:we("report-info",a),style:{"--report-info-cols":String(r),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const vr=new Map;let Co=null;const $B=12;function LB(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const r=window.getComputedStyle(t);if(r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.perspective&&r.perspective!=="none"||/paint|layout|strict|content/.test(r.contain||""))return t}return document}function go(){const e=new Map;for(const t of vr.keys()){if(!t.isConnected)continue;const r=LB(t),a=e.get(r)??[];a.push(t),e.set(r,a)}for(const t of e.values()){t.sort((a,s)=>a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let r=0;for(const a of t){r>0?a.style.setProperty("--update-alert-stack-offset",`${r}px`):a.style.removeProperty("--update-alert-stack-offset");const s=a.getBoundingClientRect().height;s>0&&(r+=s+$B)}}}function RB(e){return typeof window>"u"?()=>{}:(vr.set(e,(vr.get(e)??0)+1),vr.get(e)===1&&typeof ResizeObserver<"u"&&(Co??(Co=new ResizeObserver(()=>go())),Co.observe(e)),go(),()=>{const t=(vr.get(e)??1)-1;if(t>0){vr.set(e,t),go();return}vr.delete(e),Co?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),go()})}function PB({title:e,message:t,actionLabel:r,onAction:a,icon:s,onClose:l,className:i=""}){const{t:u}=Ee.useTranslation(),c=r??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,f=m?RB(m):null;return()=>{f?.(),h.current&&d&&d.contains(document.activeElement)&&Ra(d)}},[]),n.jsxs("div",{ref:p,className:we("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Tl,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),a&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:a,children:c})]})}function FB({title:e,titleLevel:t=3,category:r,categoryVariant:a="main",description:s,topActions:l,actions:i,children:u,footerLeft:c,footerRight:p,ariaLabel:h,onClick:d,draggable:m,onDragStart:f,onDragEnd:v,className:y}){const x=t?`h${t}`:"div",{t:b}=Ee.useTranslation(),[_,g]=o.useState(null),w=o.useCallback(()=>g(null),[]),N=o.useCallback(D=>{const j=D.currentTarget.getBoundingClientRect();g(M=>M?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})},[]),C=(i??[]).filter(Boolean),B=(C.length===1?n.jsx(fe,{htmlType:"button",type:"dot",size:40,icon:C[0].icon,ariaLabel:C[0].label,showTooltipInfo:C[0].label,selected:C[0].selected,disabled:C[0].disabled,variant:C[0].variant??"default",onClick:C[0].onClick}):C.length>1?n.jsx(fe,{htmlType:"button",type:"dot",size:40,icon:"ellipsis",ariaLabel:b("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:b("common.more","\uB354\uBCF4\uAE30"),variant:"transparent-lightGray",useBorder:!1,"aria-haspopup":"menu","aria-expanded":!!_,onClick:N}):null)??l,k=c!=null||p!=null,E=u!=null&&u!==!1,A=o.useCallback(D=>{d&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),d())},[d]);return n.jsxs("div",{className:we("training-card",d?"training-card--clickable":"",y),onClick:d,onKeyDown:d?A:void 0,role:d?"button":void 0,"aria-label":d?h??(typeof e=="string"?e:void 0):void 0,tabIndex:d?0:void 0,draggable:m,onDragStart:f,onDragEnd:v,children:[n.jsxs("div",{className:"training-card__header",children:[r!=null?n.jsx("p",{className:we("training-card__category","caption-1",a==="sub"&&"training-card__category--sub"),children:r}):n.jsx("p",{className:"training-card__category caption-1","aria-hidden":"true",children:" "}),n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(x,{className:"training-card__title h4",children:e}):e,B!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:D=>D.stopPropagation(),children:B})]}),s!=null?typeof s=="string"?n.jsx("p",{className:"training-card__description body-3",children:s}):s:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),E?n.jsx("div",{className:"training-card__body",children:u}):n.jsx("div",{className:"training-card__body training-card__body--empty","aria-hidden":"true"}),k?n.jsxs("div",{className:"training-card__footer",children:[c!=null&&n.jsx("div",{className:"training-card__footer-left",children:c}),p!=null&&n.jsx("div",{className:"training-card__meta",children:p})]}):n.jsx("div",{className:"training-card__footer training-card__footer--empty","aria-hidden":"true"}),_&&C.length>1&&n.jsx("div",{className:"training-card__menu-host",onClick:D=>D.stopPropagation(),children:n.jsx(sn,{anchorRect:_,onClose:w,ariaLabel:b("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:[{items:hs(C.map(D=>({label:D.label,icon:D.icon,selected:D.selected,disabled:D.disabled,onClick:D.onClick,shortcut:D.shortcut})))}],onClose:w,size:"small"})})})]})}function IB({title:e,titleLevel:t=3,count:r,collapsed:a=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:f,children:v,className:y}){const{t:x}=Ee.useTranslation(),b=o.useId(),_=t?`h${t}`:"span",g=s!=null,w=we("training-card-group",h&&"training-card-group--dragover",a&&"training-card-group--collapsed",g&&"training-card-group--collapsible",y);return n.jsxs("div",{className:w,onDragOver:d,onDragLeave:m,onDrop:f,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?b:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[g&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:a?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?a?x("common.expandFor",{name:e}):x("common.collapseFor",{name:e}):a?x("common.expand","\uD3BC\uCE58\uAE30"):x("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!a,onClick:s}),typeof e=="string"?n.jsx(_,{id:b,className:"training-card-group__title h5b",children:e}):e,r!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:r}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(Nn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?x("common.sortFor",{name:e}):void 0}),u]})]}),!a&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:v}))]})}const OB="speechear:saved_word_tables";function zB(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 WB(){try{const e=localStorage.getItem(OB);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(zB):[]}catch{return[]}}function Tp(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 yl(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function HB(e){const t=new Set;return e.map(r=>{let a=r.id;for(let s=2;t.has(a);s++)a=`${r.id}~${s}`;return t.add(a),a===r.id?r:{...r,id:a}})}function VB({title:e,titleIcon:t,disc:r,filterTitle:a,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:f,maxItemsPerPage:v,items:y,onSaveComplete:x,onLoad:b,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReset:C,resetLabel:B,saveButtonLabel:k,secondarySaveButtonLabel:E,onReorder:A,showCellCount:D,onAddItem:j,fillerAdd:M,className:W,renderSavePopup:z,renderWordSearch:G,hideControls:T,saveOnly:I,tableName:O,nameValue:pe,onNameChange:se,descriptionValue:$,onDescriptionChange:V,namePlaceholder:ne,descriptionPlaceholder:te,existingNames:P,editingName:L,onCancel:R,initialItemsPerPage:U,onItemsPerPageChange:Z,renderCellAction:X,actionsLeftExtra:ae}){const{t:Y}=Ee.useTranslation(),xe=B??Y("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),ie=y===void 0,J=!!se,[F,Q]=o.useState([]),H=(pe??"").trim(),le=H||(ne??"").trim(),re=($??"").trim()||(te??"").trim(),ue=(P??[]).map($e=>$e.trim().toLowerCase()),Be=[L?.trim().toLowerCase(),...F].filter($e=>!!$e),ke=[...ue];for(const $e of Be){const Xe=ke.indexOf($e);Xe!==-1&&ke.splice(Xe,1)}const Ne=H!==""&&ke.includes(H.toLowerCase()),[Re,ye]=o.useState(Array(4).fill(null)),[_e,Ae]=o.useState(4),[Ie,je]=o.useState(null),tt=Re.slice(0,_e),Ct=!!p?.show,[Oe,qe]=o.useState(!0),[nt,We]=o.useState(!0),Ze=p&&{...p,top:Oe,bottom:nt},[ot,gt]=o.useState("landscape"),[ht,xt]=o.useState([...Nd]),[ut,Gt]=o.useState("show"),[_t,Pt]=o.useState(!0),[Qe,De]=o.useState(!0),rt=o.useRef(null),it=o.useRef([]),[bt,Nt]=o.useState(U==="all"?Number.POSITIVE_INFINITY:U??8),[It,ft]=o.useState("right"),[mt,At]=o.useState(!1),[Et,Je]=o.useState(!1),{toastMessage:wt,toastType:ce,showWarning:Se,clearToast:Pe}=Pu("warning"),Ge=o.useCallback(()=>je(null),[je]);d&&ie&&kt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[st,Ot]=o.useState(()=>Math.max(y?.length??1,1)),ct=Math.max(f??0,y?.length??0,1),Yt=f!=null||!!D,$t=ie?_e:D?Math.max(st,y?.length??1,1):ct,{width:Ke,height:K}=fr[ot],Ce=!ie&&!D,He=Math.max(1,Math.min(ct,v??ct)),Ye=Math.min(bt,He),at=Ce?Ye:$t,dt=v!=null&&f!=null,jt=dt?Math.max(1,Math.min(bt,v)):Ye,zt=o.useRef(Z);o.useEffect(()=>{zt.current=Z}),o.useEffect(()=>{Ce&&zt.current?.(jt)},[Ce,jt]);const wn=Math.ceil((y?.length??0)/Math.max(1,at)),an=(y?.length??0)<ct?Math.floor((y?.length??0)/Math.max(1,at))+1:0,Bn=Ce?Math.max(1,wn,an):0,dn=Ce?Array.from({length:Bn},($e,Xe)=>(y??[]).slice(Xe*at,(Xe+1)*at)):null,Xt=!!dn&&dn.length>1,on=ie?tt.some($e=>$e!==null&&$e.length>1):(y??[]).some($e=>($e.words??[]).length>1),pn=O?.trim()||`${Li(ta())} ${on?Y("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):Y("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Qt=o.useCallback(()=>Xt?it.current.filter($e=>$e!==null):rt.current?[rt.current]:[],[Xt]),{print:Lt,openNewWindow:Dt,downloadHtml:Wt}=Xs({getElements:Qt,paperW:Ke,paperH:K,fileName:pn,onPopupBlocked:()=>{Se(Y("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."))}}),Rt=$e=>{Ae($e),ye(Xe=>Xe.length>=$e?Xe:[...Xe,...Array($e-Xe.length).fill(null)]),je(null)},Pn=$e=>{ye(Xe=>{const Tt=[...Xe];return Tt[$e]=null,Tt}),Ie===$e&&je(null)},En=$e=>{if(Ie===null)return;const Xe=Ie;ye(jn=>{const Fn=[...jn];return Fn[Xe]=$e.length>0?$e:null,Fn});const Tt=tt.findIndex((jn,Fn)=>Fn>Xe&&jn===null);je(Tt!==-1?Tt:null)},ar=ie?tt.some($e=>$e?.some(Xe=>!!Xe.colloquialPronunciation)):(y??[]).some($e=>($e.words??[]).some(Xe=>!!Xe.colloquialLabel)),$n=!ie&&Ed([...d?[d]:[],...y??[]]),me=o.useMemo(()=>Br()?ie?Re.slice(0,_e).flatMap($e=>($e??[]).map(Xe=>[Xe.word,Xe.homonum])):($e=>$e.flatMap(Xe=>(Xe.words??[]).map(Tt=>[Tt.label,Tt.homonum])))([...d?[d]:[],...y??[]]):[],[ie,Re,_e,y,d]),[Te,q]=o.useState(!1);o.useEffect(()=>{if(me.length===0)return;let $e=!1;return Promise.all(me.map(([Xe,Tt])=>yi(Xe,Tt))).then(Xe=>{$e||q(Xe.some(Boolean))},()=>{}),()=>{$e=!0}},[me]);const he=me.length>0&&Te,ge=o.useMemo(()=>[...ie||D?[{label:Y("wordTable.filter.columns","\uCE78 \uC218"),items:iw.map($e=>({value:`${$e}\uCE78`,displayLabel:Y("wordTable.filter.column",{count:$e})})),display:"segmented"}]:[],...Ce&&(y?.length??0)>0?[Rd(Y,{hasPairs:on,itemCount:dt?v:ct,max:v})]:[],...Xt?[cw(Y)]:[]],[Y,ie,D,Ce,y?.length,on,ct,v,Xt]),Me={...ie||D?{[Y("wordTable.filter.columns","\uCE78 \uC218")]:`${$t}\uCE78`}:{},...Ce&&(y?.length??0)>0?{[Y(on?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${jt}\uAC1C`}:{},...Xt?{[Y("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:It}:{}},Le=($e,Xe)=>{if(Xe===Y("wordTable.filter.columns","\uCE78 \uC218"))ie?Rt(parseInt($e)):Ot(parseInt($e));else if(Xe===Y(on?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Tt=parseInt($e);Nt(dt?Tt:Pd(Tt,ct))}else Xe===Y("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&ft(Fd($e))},Ve=ie?HB(tt.filter($e=>$e!==null&&$e.length>0).map($e=>({id:yl($e),words:$e.map(Tp)}))):y??[],pt=()=>{ie&&ye($e=>$e.length>_e?$e.slice(0,_e):$e)},yt=($e=!1)=>{if(Je($e),J&&x){const Xe=le.trim().toLowerCase();Xe&&Q(Tt=>Tt.includes(Xe)?Tt:[...Tt,Xe]),x(le,Ve,re||void 0,$e),pt();return}if(I&&x){x("",Ve,void 0,$e),pt();return}if(x){At(!0);return}Wt()},[ve,S]=o.useState(!1),[ee,be]=o.useState(""),Fe=ee.trim(),Ue=Fe!==""&&ue.includes(Fe.toLowerCase()),et=()=>{be(le?Y("wordTable.save.copyName",{name:le,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),S(!0)},Bt=()=>{!Fe||Ue||!x||(x(Fe,Ve,re||void 0,!0),pt(),S(!1))},St=Ve.length===0,en=St||J&&(le===""||Ne),tn=()=>{if(St){Se(Y("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(J&&le===""){Se(Y("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}J&&Ne&&Se(Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},zr=n.jsx(Pr,{items:Ve,orientation:ot,contentTypes:ht,baseItem:d,baseContentTypes:m,cutLine:ut,showOutline:_t,showDivLine:Qe,count:$t});return n.jsxs(n.Fragment,{children:[n.jsxs(Rr,{type:"page",icon:t,title:e,disc:r,className:we("word-table-block",W),children:[ve&&n.jsx(Vn,{width:"small",title:E??Y("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>S(!1),footer:({closeWithAnimation:$e})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:Y("common.cancel","\uCDE8\uC18C"),onClick:$e}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:Y("common.save","\uC800\uC7A5"),disabled:!Fe||Ue,onClick:Bt})]}),children:n.jsx(qn,{label:Y("wordTable.save.nameLabel","\uC774\uB984"),value:ee,onChange:be,placeholder:Y("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:Bt,error:Ue?Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),mt&&x&&z?.({defaultName:typeof e=="string"?e:Y("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:zr,previewW:Ke,previewH:K,items:Ve,existingNames:WB().map($e=>$e.name),saveAsNew:Et,onSave:($e,Xe)=>{x($e,Ve,Xe,Et),pt(),At(!1)},onCancel:()=>At(!1)}),(ie||j)&&Ie!==null&&G?.({cellIndex:Ie,onConfirm:ie?En:$e=>{if(j){const Xe=$e[0];if(Xe){const Tt=new Set((y??[]).map(Fn=>Fn.id));let jn=yl([Xe]);for(let Fn=2;Tt.has(jn);Fn++)jn=`${yl([Xe])}~${Fn}`;j({id:jn,words:[Tp(Xe)]})}}je(null)},onClose:Ge}),!T&&n.jsx(Gs,{title:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:he,hasColloquial:ar,hasCaption:$n,contentTypes:ht,orientation:ot,showOutline:_t,cutLine:ut,showDivLine:Qe,setters:{setContentTypes:xt,setOrientation:gt,setShowOutline:Pt,setCutLine:Gt,setShowDivLine:De,setShowTopInfo:qe,setShowBottomInfo:We},showCutLine:(Ce?at:$t)>1,showDivLine2:on,middleSections:ge,extraSelected:Me,onExtraSelect:Le,showPaperBands:Ct,showTopInfo:Oe,showBottomInfo:nt}),Xt&&dn?n.jsx("div",{className:"word-table-block__pages",children:dn.map(($e,Xe)=>n.jsx(Pr,{orientation:ot,contentTypes:ht,cutLine:ut,showOutline:_t,showDivLine:Qe,count:at,items:$e,baseItem:d,baseContentTypes:m,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReorder:A&&((Tt,jn)=>A(Tt+Xe*at,jn+Xe*at)),indexOffset:Xe*at,totalCount:y?.length??0,renderCellAction:X&&((Tt,jn)=>X(Tt+Xe*at,jn)),showFillerAdd:!!j,fillerAdd:M,onActivateCell:j?(Tt=>je(Tt+Xe*at)):void 0,addableCount:Yt?Math.max(0,Math.min(at,ct-Xe*at)):void 0,brand:Ze,code:h,contentRef:Tt=>{it.current[Xe]=Tt},pageNumber:{current:Xe+1,total:dn.length},pageNumberPosition:It},Xe))}):n.jsx(Pr,{orientation:ot,contentTypes:ht,cutLine:ut,showOutline:_t,showDivLine:Qe,count:at,items:ie?void 0:y??[],baseItem:ie?void 0:d,baseContentTypes:m,editCells:ie?tt:void 0,activeCell:Ie,onActivateCell:ie||j?je:void 0,onRemoveCell:ie?Pn:void 0,onRemoveItem:ie?void 0:_,onCopyItem:ie?void 0:g,onReplaceItem:ie?void 0:w,onPickForm:ie?void 0:N,onReorder:ie?void 0:A,addableCount:Yt?Ce?Math.min(at,ct):$t:void 0,renderCellAction:ie?void 0:X,brand:Ze,code:h,showFillerAdd:!!j,fillerAdd:M,contentRef:rt}),!T&&!I&&ae!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ae}),J&&!T&&n.jsxs(Tr,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[n.jsx(cn,{variant:"custom",label:Y("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(qn,{required:!0,value:pe??"",onChange:se,placeholder:ne?ne+Y("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):Y("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:Y("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Ne?Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:$e=>{($e.key==="Tab"&&!$e.shiftKey||$e.key===" ")&&!(pe??"").trim()&&(ne??"").trim()&&($e.preventDefault(),se?.(ne??""))}})}),n.jsx(cn,{variant:"custom",label:Y("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(qn,{value:$??"",onChange:V,placeholder:te?te+Y("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):Y("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:Y("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:$e=>{($e.key==="Tab"&&!$e.shiftKey||$e.key===" ")&&!($??"").trim()&&(te??"").trim()&&($e.preventDefault(),V?.(te??""))}})})]})]}),!T&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!I&&b&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:Y("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:b}),!I&&C&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:xe,onClick:C}),!I&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:Y("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Dt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[R&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:Y("common.cancel","\uCDE8\uC18C"),onClick:R}),!I&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:Y("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Lt}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>J?et():yt(!0),disabled:St,onDisabledClick:()=>{Se(Y("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??Y("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>yt(!1),disabled:en,onDisabledClick:tn})]})]}),n.jsx(Lr,{message:wt,type:ce,onClose:Pe})]})}const qB=8;function Mp({items:e,className:t,columns:r}){const{t:a}=Ee.useTranslation(),s=o.useRef(null),[l,i]=o.useState(null),u=o.useCallback(()=>i(s.current?.getBoundingClientRect()??null),[]),c=o.useCallback(()=>i(null),[]),p=Ia(!!l,w=>{w?u():c()},s),h=e.length,d=r&&r>0?Math.floor(r):h<=3?1:2,m=qB,f=h>m,v=e.slice(0,f?m-1:m),y=h-v.length,x=e.slice(v.length).map(w=>w.words?.length?w.words.map(N=>N.label).join(" / "):w.id),b=Math.min(5,Math.ceil(x.length/25)),_=Math.ceil(Math.min(h,m)/d)||1,g=d*_;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${d}, 1fr)`},children:Array.from({length:g},(w,N)=>{if(f&&N===m-1)return n.jsxs("div",{ref:s,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:y,words:x.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:B=>{er(B)||u()},onPointerLeave:B=>{er(B)||c()},onFocus:()=>{ur()||u()},onBlur:c,onClick:B=>{B.stopPropagation(),p.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:y,defaultValue:"+{{count}}"})}),l&&x.length>0&&n.jsx(Qn,{anchorRect:l,items:x,showIndex:!1,closeOnOutsideClick:!1,columns:b})]},N);const C=v[N];return C?n.jsx("div",{className:"word-table-thumb__cell",children:(C.words?.length?C.words:[{label:C.id}]).map((B,k)=>n.jsxs(o.Fragment,{children:[k>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:B.label})]},k))},N):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},N)})})}function UB({items:e,name:t,description:r,createdAt:a,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:f,onPublisherClick:v,selected:y,onClick:x,onMore:b,titleNode:_,className:g}){const{t:w}=Ee.useTranslation(),N=_!=null,C=h!=null||d!=null||m!=null||f!=null,B=k=>{k.target===k.currentTarget&&!N&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),x?.())};return n.jsxs("div",{className:we("word-table-button",y?"word-table-button--selected":"",C?"":"word-table-button--no-footer",g),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:x,onKeyDown:B,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":w("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Mp,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[_??n.jsx("div",{className:"word-table-button__title h4",children:t}),r&&n.jsx("div",{className:"word-table-button__desc body-3",children:r})]}),b&&!N&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:w("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),b(k)}})]}),(s||a||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:a?$i(a,w):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(rn,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??w("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(rn,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??w("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),C&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":w("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),v()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:$i(d,w)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(rn,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":w("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),f!=null&&n.jsx(rn,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(f),"aria-label":w("common.downloadCount",{count:f,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${f}`})})]})]})]})}/**
|
|
1062
|
+
`).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:bs,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[a," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function Uw({logo:e,logoAlt:t="",logoHref:r,links:a=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=Ee.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),f=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!d)return;const x=ir(()=>{const N=document.getElementById(f);N&&N.contains(document.activeElement)&&v.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=N=>{N.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{x(),g?.removeEventListener?.("change",w)}},[d,f]);const b=i?`${i} landing-header__inner`:"landing-header__inner",_=(x,g)=>u?u(x,{onClick:g}):n.jsx("a",{href:x.href,onClick:g,"aria-current":x.current?"page":void 0,children:x.label}),y=x=>u?u(x,{}):n.jsx(mc,{href:x.href,current:x.current,children:x.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:b,children:[e!=null&&(()=>{const x=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return r?n.jsx("a",{href:r,className:"landing-header__brand",children:x}):n.jsx("div",{className:"landing-header__brand",children:x})})(),a.length>0&&n.jsx("nav",{className:"landing-header__links",children:a.map((x,g)=>n.jsx("span",{children:y(x)},`${g}:${x.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,a.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>m(x=>!x),"aria-expanded":d,"aria-controls":f,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),a.length>0&&n.jsx("nav",{id:f,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:a.map((x,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:_(x,()=>m(!1))},`${g}:${x.href}`))})})]})}function Gw({children:e,action:t,onClick:r,className:a}){const s=r?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:a?`bottom-sticky ${a}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:r,...fd(r),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function Kw({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),r=o.useRef(0),a=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const b=t.current,_=b.phase!=="sound"&&b.at>0;s.current=_?{phase:b.phase,elapsed:Math.max(0,Date.now()-b.at)}:null},[]),i=o.useCallback(()=>{const b=s.current;return s.current=null,b},[]),u=o.useCallback(()=>{r.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((b,_,y=0)=>{if(!(b>0))return Promise.resolve(!0);const x=r.current;return t.current={phase:_,at:Date.now()-Math.max(0,y)},new Promise(g=>{const w=setTimeout(()=>{a.current===w&&(a.current=null),g(!!e.current&&x===r.current)},b);a.current=w})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const b=t.current;return b.phase!=="sound"&&b.at>0},[]),m=o.useCallback(()=>r.current,[]),f=o.useCallback(b=>b===r.current,[]),v=o.useCallback(()=>{r.current+=1},[]);return o.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:f,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:v}),[d,m,f,u,c,p,h,l,i,v])}const Ir=9,Yw=e=>Math.round(Math.min(Ir,Math.max(0,e))/Ir*100),Zw=e=>e/100*Ir,xa=2,qd=.1,Xw=e=>Math.min(xa,Math.max(0,e)),Jw=.1,Qw=e=>Math.round(e*1e6)/1e6;function _a(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Xw(t);const r=Math.min(Ir,Math.max(0,Number(e.level)||0))/Ir,a=Number(e.mainVolume);return a>0?r>0?Qw(Math.min(xa,Math.max(Jw,r/a))):0:1}const Ud=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Gd(e){return Ud(e)}function el(e){return Ud(e)*_a(e)}function tl(e,t=cb()){const r=Number.isFinite(t)&&t>0?t:1;return Math.min(1,el(e)/r)}function Cr(e,t){const r={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(r.noiseRatio=_a({level:r.level,mainVolume:r.mainVolume})),r}const gr={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},nl=o.createContext(null);function ao(){return o.useContext(nl)}const rl=e=>`${ub()}/${e}`,Kd=e=>Array.from({length:10},(t,r)=>rl(`${e}-${String(r+1).padStart(2,"0")}.mp3`)),oo={get defaultNoise(){return rl("noise1.mp3")},get street(){return Kd("noise2")},get restaurant(){return Kd("noise3")},get buzz(){return rl("noise4.mp3")}};function e8(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return oo.defaultNoise;case"street":return oo.street[t];case"restaurant":return oo.restaurant[t];case"buzz":return oo.buzz;default:return null}}function t8({noisePlayer:e,audioRef:t,playbackStateRef:r,sequencer:a}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),f=o.useRef(null),v=o.useCallback(()=>!!a?.isRunning(),[a]),b=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),f.current!==null&&(clearTimeout(f.current),f.current=null)},[]),_=o.useCallback((N,C=250)=>{const B=l.current;if(!B)return;const k=p.current;if(k){p.current=null;try{B.pause()}catch{}B.src=k,B.load()}if(!B.src)return;m.current+=1,b();try{Ro(),Aa(B).then(j=>{if(l.current===B)try{s.current?.("noise",j)}catch{}})}catch{}const E=B.paused?0:Na(B);B.paused&&Jn(B,0),B.play().catch(()=>{});const A=performance.now(),D=()=>{const j=Math.min(1,(performance.now()-A)/C);try{Jn(B,E+(N-E)*j)}catch{}j<1?d.current=requestAnimationFrame(D):d.current=null};d.current=requestAnimationFrame(D)},[b]),y=o.useCallback((N=250,C)=>{const B=l.current;if(!B||B.paused){C?.();return}const k=++m.current;b();const E=performance.now(),A=Na(B),D=()=>{const j=Math.min(1,(performance.now()-E)/N);try{Jn(B,A*(1-j))}catch{}if(j<1)d.current=requestAnimationFrame(D);else{d.current=null,f.current!==null&&(clearTimeout(f.current),f.current=null);try{B.pause()}catch{}C?.()}};d.current=requestAnimationFrame(D),f.current=setTimeout(()=>{if(f.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{B.paused||(Jn(B,0),B.pause(),C?.())}catch{}}},N+150)},[b]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{b();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,p.current=null}},[b]);const x=e?tl(e.settings):0,g=!!e?.settings.enabled&&x>0;o.useEffect(()=>{if(!g)return;let N=0;const C=setInterval(()=>{const B=l.current;if(!B||B.paused){N=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||v()||r.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,y())},400);return()=>clearInterval(C)},[y,g,t,r,v]),o.useEffect(()=>{const N=()=>{const C=l.current;if(document.hidden){if(C&&!C.paused){b();try{C.pause()}catch{}}return}if(!C||!C.paused)return;const B=t.current,k=!!B&&!B.paused&&!B.ended||v()||r.current==="playing",E=h.current;k&&E?.enabled&&E.volume>0&&_(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[b,_,t,r,v]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:x,type:e.settings.type}:null},[e,e?.settings.enabled,x,e?.settings.type]);const w=o.useRef(null);return o.useEffect(()=>()=>{w.current?.(),w.current=null},[]),o.useEffect(()=>{const N=e?.settings,C=l.current;if(!C)return;const B=N?tl(N):0;if(!N||!N.enabled||B===0){y();return}if(c.current!==N.type){const k=e8(N.type);k&&(c.current=N.type,u(k),p.current=k,y(150,()=>{if(p.current!==k)return;p.current=null,C.src=k,C.load();const E=t.current;if(E&&!E.paused||v()){w.current?.();const A=()=>{C.removeEventListener("canplay",A),w.current===D&&(w.current=null);const j=t.current,S=h.current;(j&&!j.paused&&!j.ended||v())&&S?.enabled&&S.volume>0&&_(S.volume)},D=()=>C.removeEventListener("canplay",A);w.current=D,C.addEventListener("canplay",A)}}))}else{const k=t.current,E=!!k&&!k.paused&&!k.ended||v()||r.current==="playing";if(E&&p.current)_(B);else if(E&&C.paused&&C.src)_(B);else if(!C.paused)if(!E)y();else{b();const A=Na(C),D=performance.now(),j=()=>{const S=Math.min(1,(performance.now()-D)/150);try{Jn(C,A+(B-A)*S)}catch{}S<1?d.current=requestAnimationFrame(j):d.current=null};d.current=requestAnimationFrame(j)}}},[e?.settings,e?.settings.enabled,x,e?.settings.type,b,_,y,t,r,h,v]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:b,fadeInNoise:_,fadeOutNoise:y}}function n8({ttsText:e,playbackRate:t,mainVolume:r,fillRef:a,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const f=o.useRef(null),v=o.useRef(0),b=o.useRef(null),_=o.useRef(0),y=o.useRef(!1);o.useEffect(()=>()=>{_.current++;try{if(b.current&&(cancelAnimationFrame(b.current),b.current=null),y.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}y.current=!1}}catch{}},[]);const x=(N,C=1)=>{try{const B=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(B*300/Math.max(.25,C)))}catch{return 1200}},g=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const C=window.speechSynthesis,B=++_.current;try{try{C.cancel()}catch{}const k=N??e,E=Array.isArray(k)?k.filter(z=>!!z):[k||""];E.length===0&&E.push("");const A=Math.max(.3,Math.min(3,t));v.current=E.reduce((z,G)=>z+x(G,A||1),0),f.current=performance.now(),l(0),i("playing"),u("playMode");const D=h.current;D?.enabled&&(D?.volume??0)>0&&c(D.volume);const j=()=>{try{const z=f.current||performance.now(),G=performance.now()-z,M=v.current||1200,I=Math.min(1,G/M);try{a.current&&(a.current.style.left=`${I*100}%`),s.current&&s.current.style.setProperty("--progress",String(I))}catch{}I<1&&(b.current=requestAnimationFrame(j))}catch{}},S=()=>{if(B===_.current)try{b.current&&(cancelAnimationFrame(b.current),b.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},O=z=>{const G=new SpeechSynthesisUtterance(E[z]);try{G.rate=A}catch{}try{G.volume=Math.max(0,Math.min(1,r))}catch{}G.onend=()=>{if(B===_.current){if(z<E.length-1){try{O(z+1)}catch{S()}return}S()}},G.onerror=()=>{S()},G.onstart=()=>{if(!(z>0))try{b.current&&(cancelAnimationFrame(b.current),b.current=null),b.current=requestAnimationFrame(j)}catch{}},y.current=!0,C.speak(G)};try{O(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,r,c,a,s,l,i,u,h,d,m]),w=o.useCallback(()=>{_.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}b.current&&(cancelAnimationFrame(b.current),b.current=null),p(),f.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:g,stopTTS:w}}const r8=.01,a8=.3;async function o8(e,t,r,a=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(a){const f=Math.floor(a8*i.sampleRate),v=Math.min(u.length,f);for(;c<v&&Math.abs(u[c])<=r8;)c++;c>=v&&(c=0)}const p=u.length-c,h=r&&r>0?Math.min(p,Math.floor(r*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((f,v)=>{const b=c+v*m,_=Math.min(b+m,c+d,u.length);let y=0;for(let x=b;x<_;x++){const g=Math.abs(u[x]);g>y&&(y=g)}return y})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Yd(e,t,r,a=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await o8(l,t,r,a)}catch(s){try{const l=zo(s)}catch{}return null}}const al=45,s8=74,l8=2;function so(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function lo(e){return so(e)/45}const i8=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Zd=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Xd({durationsSec:e,leadInMs:t=0,tailMs:r=0}){const a=Zd(t),s=Zd(r),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",a],["sound",i8(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Jd(e,t){const r=(t|0)*3;if(t<0||r+2>=e.segments.length)return null;const[a,s,l]=[e.segments[r],e.segments[r+1],e.segments[r+2]];return{lead:a,sound:s,tail:l,totalMs:a.durMs+s.durMs+l.durMs}}function u8(e,t){const r=Jd(e,t.track);if(!r||!(r.totalMs>0))return 0;const a=r[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),a.durMs);return Math.max(0,Math.min(1,(a.startMs-r.lead.startMs+s)/r.totalMs))}function c8(e,t,r){const a=Math.max(0,Math.floor(r)),s=Jd(e,t);if(!s||a===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:a,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*a),i=Math.round(s.tail.durMs/s.totalMs*a),u=Math.max(1,a-l-i),c=l+u+i-a;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function d8({currentTime:e,sources:t,index:r,audioDuration:a}){const s=r||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||a||0:a||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function p8({phase:e,phaseElapsedMs:t,currentTime:r,trackDurationSec:a,leadInMs:s,tailMs:l}){const i=Xd({durationsSec:[a],leadInMs:s,tailMs:l});return u8(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(r)?r:0)*1e3:t})}function h8({bars:e,trackDurationSec:t,leadInMs:r,tailMs:a}){return c8(Xd({durationsSec:[t],leadInMs:r,tailMs:a}),0,e)}function m8(e,t){if(!Array.isArray(e))return null;const r=t||0;return r<e.length-1?r+1:null}function f8({ended:e,completedByEnd:t}){return!!e||!!t}function C8(e){return e.map((t,r)=>({src:t.src,label:String(r+1),color:void 0,duration:t.duration||0}))}function g8(e){return e.reduce((t,r)=>t+(r.duration||0),0)}function b8(e,t,r){const a=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of a)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=r(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function y8(e,t){if(!t||e.readyState<1)return!0;const r=e.currentSrc||e.src;return r?Qd(r)!==Qd(t):!0}function Qd(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const ep=4,v8=lo(ep/al);function x8(e){const{src:t,segments:r,progress:a=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:f=0,trackDurationSec:v=0}=e,b=o.useRef(null),_=o.useRef(null),[y,x]=o.useState(null),[g,w]=o.useState(!1),[N,C]=o.useState(null),[B,k]=o.useState(2),[E,A]=o.useState(0),[D,j]=o.useState(null),[S,O]=o.useState(!1),[z,G]=o.useState(!1),M=3,I=3,W=1,pe=300,se=o.useRef(0),$=o.useCallback(()=>{const le=b.current,re=_&&_.current?_.current:le?le.closest(".audio-player__wave"):null,de=re?re.getBoundingClientRect():le?le.getBoundingClientRect():null,Be=de?de.width:0,ke=de?Math.max(100,de.width):320,Ne=de?de.height:0,Re=Math.max(W,Math.min(pe,Math.floor((ke+I)/(M+I)))),ye=Re*M,_e=Math.max(0,Re-1),Ae=Math.max(0,_e>0?(ke-ye)/_e:I);return{bars:Re,gap:Ae,height:Ne,width:Be}},[]),V=o.useRef(void 0),ne=o.useRef(null),te=o.useCallback(async(le,re,{quiet:de=!1}={})=>{const Be=++se.current,ke=()=>se.current===Be;try{if(de||w(!1),V.current=le,!le){ke()&&x(null);return}let Ne=re;if(!Ne)try{for(let _e=0;_e<4&&!(b.current||_.current);_e++)await new Promise(Ae=>requestAnimationFrame(Ae));await new Promise(_e=>requestAnimationFrame(_e));const ye=$();ye.height>0&&A(ye.height),Ne=ye.bars,k(ye.gap)}catch{Ne=120}ne.current=Ne;const Re=await Yd(le,Ne);if(!ke())return;if(!Re){x(null),w(!1);return}x(Re),C(Ne),w(!0)}catch{if(!ke())return;x(null),w(!1)}},[w,x,A,k,C,$]);o.useEffect(()=>{const le=_.current;if(!le||typeof ResizeObserver>"u")return;let re=null;const de=new ResizeObserver(()=>{re!==null&&cancelAnimationFrame(re),re=requestAnimationFrame(()=>{re=null;try{const Be=$();if(Be.width<=0||(Be.height>0&&A(Be.height),ne.current===null||Be.bars===ne.current))return;const ke=V.current;k(Be.gap),ke?te(ke,Be.bars,{quiet:!0}).catch(()=>{}):ne.current=Be.bars}catch{}})});return de.observe(le),()=>{de.disconnect(),re!==null&&cancelAnimationFrame(re)}},[$,te]),o.useEffect(()=>{const le=r&&r[0]&&r[0].src||t||r&&r.length===1&&r[0]&&r[0].src;te(typeof le=="string"?le:void 0).catch(()=>{}),G(!1)},[t,r,te]),o.useEffect(()=>{let le=!1;if(O(!1),j(null),!l||!N)return;const re=c>0?c*(u||1):void 0;return Yd(l,N,re,!0).then(de=>{le||(j(de),de||O(!0))}).catch(()=>{le||(j(null),O(!0))}),()=>{le=!0}},[l,N,c,u]);const P=Math.max(0,Math.min(1,p)),L=o.useMemo(()=>y&&y.length&&Math.max(...y)||1,[y]),R=N||40,U=o.useMemo(()=>h8({bars:R,trackDurationSec:v,leadInMs:m,tailMs:f}),[R,v,m,f]),Z=o.useMemo(()=>Array.from({length:R}).map((le,re)=>{const de=re>=U.lead&&re<U.lead+U.sound,Be=U.sound>0&&de?Math.min(R-1,Math.round((re-U.lead)/U.sound*R)):-1,ke=de?y&&y[Be]!=null?y[Be]:null:y?0:null,Ne=ke==null?null:Math.min(1,ke/L*P),Re=Ne!=null&&E>0&&so(Ne)<=ep,ye=Ne==null?.15:Re?0:lo(Ne),_e=Re,Ae=R>1?re/(R-1):0;return n.jsx("div",{className:_e?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":re,"--mix":Ae}},re)}),[R,y,L,P,E,U]),X={"--progress":String(Math.max(0,Math.min(1,a)))},ae=o.useMemo(()=>D&&D.length&&Math.max(...D.map(le=>Number.isFinite(le)?Math.abs(le):0))||1,[D]),Y=P*Math.max(0,i),xe=!l||!D||!D.length?1:Math.max(1,Y),ie={"--bar-gap":`${B}px`,"--wave-h":`${so(xe)}px`,"--wave-h1":`${al}px`},J=g&&(l?!!D||S:!0);o.useEffect(()=>{J&&G(!0)},[J]);const F=z?g:J;o.useEffect(()=>{h?.(F)},[F,h]);const Q=N||40,H=o.useMemo(()=>Array.from({length:Q}).map((le,re)=>{const de=D&&D[re]!=null?D[re]:null,Be=de==null?0:Math.abs(de)/ae*Y,ke=Math.max(v8,lo(Be)),Ne=Q>1?re/(Q-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":ke,"--i":re,"--mix":Ne}},re)}),[Q,D,ae,Y,E]);return n.jsxs("div",{className:"audio-player__wave",ref:_,style:ie,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${J?"is-ready":""}`,"aria-hidden":"true",children:H}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${F?"is-ready":""}`,ref:b,children:Z}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${F?"is-ready":""}`,ref:s,style:X,children:Z})]})]})}const tp={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function ol(e,t){return new Promise((r,a)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),r(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?a(new Error(p)):r(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const _8=2e3;function np(e,t=_8){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function w8({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:r=2500}){const a=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(a.current=c,!c||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{a.current=!1},[]),u=o.useCallback(()=>!e&&!t||a.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),r);s.current.push(p)}),[e,t,r]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function B8(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),r=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),a=o.useCallback(()=>{r([])},[r]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:r,revokeAll:a}}function k8({offsetY:e=8}={}){const t=o.useRef(null),[r,a]=o.useState(null),s=o.useCallback(()=>a(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;a({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(r)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r,s]),{ref:t,rect:r,show:l,hide:s}}function A8(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const r=e.seekable;if(r&&r.length>0){const a=r.end(r.length-1);if(Number.isFinite(a)&&a>0)return a}}catch{}return null}const N8=400,E8=2e3,rp=5;function j8({audioRef:e,fillRef:t,waveProgressRef:r,sourcesRef:a,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let v=0;const b=()=>{if(Yn){const _=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&_-v>N8){const y=h.current===null||_-h.current>E8;if(h.current=_,y&&p.current<rp){p.current+=1;const x=p.current;let g=null;try{g=typeof document<"u"?document.visibilityState:null}catch{}kt(`progress-ticker-slow-frames#${x}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(_-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,g==="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.",x>=rp?`(${x}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${x}\uBC88\uC9F8)`)}}v=_}try{const _=e.current,y=Array.isArray(a.current)?a.current[s.current||0]:void 0,x=!!y&&Number.isFinite(y.duration)&&(y.duration??0)>0,g=x?0:A8(_),w=t.current,N=(i||0)>0||(u||0)>0,C=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(g===null&&!C)try{w&&w.style.visibility!=="hidden"&&(w.style.visibility="hidden")}catch{}else{const B=x?y.duration:g||0;Yn&&C&&!(B>0)&&kt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=N?p8({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:_&&typeof _.currentTime=="number"?_.currentTime:0,trackDurationSec:B,leadInMs:i||0,tailMs:u||0}):d8({currentTime:_&&typeof _.currentTime=="number"?_.currentTime:0,sources:a.current,index:s.current,audioDuration:g??0});try{w&&(w.style.visibility&&(w.style.visibility=""),w.style.left=`${k*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(b)};c.current=requestAnimationFrame(b)},[e,t,r,a,s,l,i,u]),f=o.useCallback(v=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${v*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(v))}catch{}},[d,t,r]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:f}}function sl({btnLabel:e,soundSrc:t,bucketPath:r,onDone:a,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=Ee.useTranslation(),m=e,f=ao(),v=o.useRef(f?.registerAnalyser);o.useEffect(()=>{v.current=f?.registerAnalyser});const b=o.useRef(null),_=o.useRef(null),y=o.useRef(null),x=B8(),g=o.useRef(null),w=o.useRef(!1),N=o.useRef(null),{ref:C,rect:B,show:k,hide:E}=k8();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[A,D]=o.useState(!1),[j,S]=o.useState("idle"),[O,z]=o.useState("stopped"),G=o.useRef("stopped");o.useEffect(()=>{G.current=O},[O]);const[M,I]=o.useState(0),[W,pe]=o.useState("active"),se=o.useRef(!1);o.useEffect(()=>{if(W!=="playMode"||!se.current)return;se.current=!1;const q=typeof document<"u"?document.activeElement:null;if(q&&q!==document.body)return;const he=y.current?.querySelectorAll("button")[1];try{he?.focus()}catch{}},[W]);const[$,V]=o.useState(null),[ne,te]=o.useState(null),[P,L]=o.useState(0),[R,U]=o.useState(!1),[Z,X]=o.useState(0),ae=f?.playbackRate??1,Y=f?.mainVolume??1,xe=f?el(f.settings):0,ie=f?Gd(f.settings):Y,[J,F]=o.useState("idle"),[Q,H]=o.useState(""),[le]=o.useState("top"),re=o.useRef(null),de=o.useRef(0),Be=o.useRef(null),ke=o.useRef(!0),Ne=Kw({mountedRef:ke}),Re=o.useRef(null),ye=o.useRef(p),_e=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{_e.current=Math.max(0,h||0)},[h]);const{start:Ae,stop:Oe,settleTo:je}=j8({audioRef:b,fillRef:_,waveProgressRef:Be,sourcesRef:re,currentIndexRef:de,sequencer:Ne,leadInMs:p,tailMs:h}),{onReadyChange:tt,waitForReady:Ct,markNotReady:Ie}=w8({showSoundWaveForm:u,showNoiseWaveForm:c}),qe=o.useRef(null),nt=o.useRef(s),We=o.useRef(a),Ze=o.useRef(null),ot=o.useRef(!1),[gt,ht]=o.useState(!1),xt=o.useCallback(q=>{ot.current=q,ht(q)},[]),ut=o.useRef(null),{activeNoiseUrl:Gt,noiseSettingsRef:_t,fadeInNoise:Pt,fadeOutNoise:Qe}=t8({noisePlayer:f,audioRef:b,playbackStateRef:G,sequencer:Ne}),{startTTS:De,stopTTS:rt}=n8({ttsText:l,playbackRate:ae,mainVolume:ie,fillRef:_,waveProgressRef:Be,setProgress:I,setPlaybackState:z,setStateLocal:pe,fadeInNoise:Pt,fadeOutNoise:Qe,noiseSettingsRef:_t,onDoneRef:We,handleEndRef:ut});o.useEffect(()=>{At.current=rt});const it=q=>{if(typeof window>"u"||!window.speechSynthesis){try{H(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}De(q);return}ue("tts"),De(q)},bt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Nt=(!bt||bt.length===0)&&!!l,It=Array.isArray($)&&$.length>0?$:Array.isArray(ne)&&ne.length>0?ne:null,ft=Math.max(Array.isArray(It)?It.length:0,bt.length);o.useEffect(()=>(ke.current=!0,()=>{ke.current=!1}),[]);const mt=()=>{Ne.abort()},At=o.useRef(null),Et=o.useRef(null),Je=o.useRef(null),wt=o.useRef(null);wt.current||(wt.current=()=>{Je.current=null;const q=b.current;if(Et.current==="audio"&&q&&(!q.paused||Ne.isRunning())){mt();try{q.pause()}catch{}ke.current&&(z("paused"),Oe(),Qe())}else if(Et.current==="tts")try{At.current?.()}catch{}});const ue=q=>{Et.current=q,Je.current=fa(wt.current)},Se=()=>{Je.current?.(),Je.current=null};o.useEffect(()=>()=>{wt.current&&Ja(wt.current)},[]);const Pe=o.useRef(ae);o.useEffect(()=>{Pe.current=ae||1},[ae]);const Ge=o.useCallback(q=>{const he=Pe.current||1;try{q.defaultPlaybackRate=he}catch{}try{q.playbackRate=he}catch{}},[]),st=o.useCallback((q,he)=>{if(!y8(q,he)){try{q.currentTime=0}catch{}Ge(q);return}q.src=he,Ge(q),q.load(),Ge(q)},[Ge]),Ot=o.useCallback(()=>{Ze.current&&(clearTimeout(Ze.current),Ze.current=null),F("idle")},[]),ct=o.useCallback(async(q,he=3,ge=50,Me=0)=>{Ot();const Le=Ne.generation(),Ve=!!q&&q.currentTime>0&&!q.ended,pt=Math.max(0,ye.current-Math.max(0,Me));if(pt>0&&!Ve){ue("audio"),Ae(),z("playing");const yt=_t.current;if(yt?.enabled&&(yt.volume??0)>0)try{Pt(yt.volume)}catch{}if(!await Ne.waitPad(pt,"lead",Me)||!ke.current||!Ne.isCurrent(Le))return!1}Ne.enterSound();for(let yt=0;yt<he;yt++){if(!ke.current||!Ne.isCurrent(Le))return!1;try{return ue("audio"),await q.play(),!0}catch(ve){if((ve instanceof Error||typeof ve=="object"&&ve&&"name"in ve?ve.name:void 0)==="AbortError"){if(!Ne.isCurrent(Le))return!1;await new Promise(T=>setTimeout(T,ge));continue}try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,Ae,Ne,Pt,_t,Ot]),Yt=o.useCallback(q=>{const he=Ne.generation(),ge=Math.max(0,_e.current-Math.max(0,q));Ae();const Me=_t.current;if(Me?.enabled&&(Me.volume??0)>0)try{Pt(Me.volume)}catch{}const Le=()=>{try{Re.current?.()}catch{}};if(ge<=0){Ne.leave(),Le();return}Ne.waitPad(ge,"tail",q).then(Ve=>{Ne.leave(),Ve&&Ne.isCurrent(he)&&Le()}).catch(()=>{})},[Ne,Ae,Pt,_t]),$t=o.useCallback(()=>{const q=b.current;if(!q)return;const he=()=>{z("playing"),pe("playMode"),U(!0),Ae();try{Ro(),Aa(q).then(Ve=>{if(ke.current)try{v.current?.("main",Ve)}catch{}})}catch{}const Le=_t.current;Le?.enabled&&(Le?.volume??0)>0&&Pt(Le.volume)},ge=()=>{f8({ended:!!q?.ended,completedByEnd:ot.current})||(z("paused"),Oe(),Qe())},Me=()=>{const Le=()=>{try{const Ve=re.current,pt=m8(Ve,de.current);if(pt!==null){de.current=pt,L(pt),U(!0);const yt=Ve?.[pt]&&Ve[pt].src;if(yt&&q){st(q,yt),ct(q).catch(()=>{});return}}}catch{}z("stopped"),I(1);try{if(q)try{q.currentTime=0}catch{}}catch{}Oe(),U(!1),Qe();try{!nt.current&&ut.current&&ut.current()}catch{}};if(Re.current=Le,_e.current>0){Ae(),Ne.waitPad(_e.current,"tail").then(Ve=>{Ne.leave(),Ve&&Le()}).catch(()=>{});return}Le()};return q.addEventListener("play",he),q.addEventListener("pause",ge),q.addEventListener("ended",Me),()=>{try{q.removeEventListener("play",he),q.removeEventListener("pause",ge),q.removeEventListener("ended",Me),Oe()}catch{}}},[Pt,Qe,ct,_t,Ae,Oe,Ne]);o.useEffect(()=>$t(),[$t]),o.useEffect(()=>{nt.current=s},[s]),o.useEffect(()=>{We.current=a},[a]),o.useEffect(()=>{if(s||W!=="active")return;const q=N.current;if(!q)return;let he=null;const ge=requestAnimationFrame(()=>{try{const Me=q.getTotalLength();if(!Me)return;const Le=Me*.2;q.style.strokeDasharray=`${Me-Le} ${Le}`;const Ve="triFlow_"+Math.random().toString(36).slice(2);he=document.createElement("style"),he.textContent=`@keyframes ${Ve}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Me}}}`,document.head.appendChild(he),q.style.animation=`${Ve} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ge),he?.remove()}},[W,s]),o.useEffect(()=>{re.current=$},[$]),o.useEffect(()=>{de.current=P},[P]),o.useEffect(()=>{const q=y.current,he=g.current;if(!q||!he)return;let ge=null;const Me=32,Le=60,Ve=()=>{try{const yt=Array.from(q.querySelectorAll(":scope > .button"));let ve=0;yt.forEach(Ue=>{if(Ue===he)return;const et=Ue.getBoundingClientRect();ve+=et.width});const T=q.getBoundingClientRect().width,ee=Math.max(0,Math.floor(T-ve-8)),be=ft;if(!be||ee<=0){Array.from(he.children).forEach(Ue=>{try{Ue.style.width=""}catch{}});return}let Fe=Math.floor(ee/be);Fe>Le&&(Fe=Le),Fe<Me&&(Fe=Math.max(Me,Math.floor(ee/be))),Array.from(he.querySelectorAll(".button")).forEach(Ue=>{try{Ue.style.width=`${Fe}px`}catch{}})}catch{}},pt=requestAnimationFrame(Ve);try{ge=new ResizeObserver(()=>{requestAnimationFrame(Ve)}),ge.observe(q),ge.observe(he),window.addEventListener("resize",Ve)}catch{}return()=>{try{cancelAnimationFrame(pt)}catch{}try{ge&&(ge.disconnect(),ge=null)}catch{}try{window.removeEventListener("resize",Ve)}catch{}}},[$,ne,ft]),o.useEffect(()=>()=>{try{qe.current&&(clearTimeout(qe.current),qe.current=null),Ze.current&&(clearTimeout(Ze.current),Ze.current=null)}catch{}},[]);const Ke=(q,he)=>{V(q),X(he),Ie(),te(C8(q)),re.current=q},K=()=>{pe("playMode"),L(0),U(!0)},Ce=async(q,he)=>{xt(!1),w.current=!1,st(q,he),await np(q),await Ct()!==!1&&(D(!1),K(),await ct(q))},He=async(q,he=!1)=>{const ge=b.current;D(!0),S("measuring_duration");try{const Me=await ol(q,{timeoutMs:1e4,rejectOnError:!0});Ke([{src:q,objectUrl:null,duration:Me}],Me),S("ready"),he&&ge&&await Ce(ge,q)}finally{w.current=!1,D(!1)}},Ye=async(q,he=!1)=>{const ge=b.current;D(!0),S("measuring_duration");try{const Me=await Promise.all(q.map(Ve=>ol(Ve,{timeoutMs:1e4})));if(!ke.current)return;const Le=q.map((Ve,pt)=>({src:Ve,objectUrl:null,duration:Me[pt]||0}));Ke(Le,g8(Le)),S("ready"),he&&ge&&Le.length>0&&await Ce(ge,Le[0].src)}finally{w.current=!1,D(!1)}},at=async(q=!1,he=!0)=>{const ge=b.current,Me=t?Array.isArray(t)?t:[t]:[];if(!Me||Me.length===0||!Me.some(Boolean))return!1;if(w.current)return null;w.current=!0,he&&D(!0),S("resolving");try{const Le=b8(t,r,di),Ve=[];let pt=0;for(const yt of Le){let ve=yt.src??null,T=null;if(!ve&&yt.resolvedPath){try{S("getting_signed_url"),ve=await pi(yt.resolvedPath)}catch{ve=null}if(!ke.current)return!1;if(!ve)try{S("downloading");const be=await hi(yt.resolvedPath);if(!ke.current)return!1;if(be){const Fe=be instanceof Blob?be:new Blob([be]);T=x.track(URL.createObjectURL(Fe)),ve=T}}catch{S("error");try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),pe("active")}catch{}}}if(!ve)continue;let ee=0;try{S("measuring_duration"),ee=await ol(ve,{timeoutMs:3e3})}catch{ee=0}if(!ke.current){if(T)try{URL.revokeObjectURL(T)}catch{}for(const be of Ve)if(be.objectUrl)try{URL.revokeObjectURL(be.objectUrl)}catch{}return!1}pt+=ee||0,Ve.push({...yt,src:ve,objectUrl:T,duration:ee})}if(Ke(Ve,pt),Ve.length>0&&q&&ge){const yt=Ve[0];xt(!1);try{x.keepOnly(Ve.map(ve=>ve.objectUrl))}catch{}if(S("ready"),w.current=!1,yt.src&&ge)try{if(st(ge,yt.src),await np(ge),await Ct()===!1)return!1;he&&D(!1),K(),ge&&await ct(ge)}catch{he&&D(!1)}else he&&D(!1);pe("playMode"),L(0),U(!0)}return Ve.length>0}finally{w.current=!1,he&&D(!1),S(Le=>Le==="ready"?"ready":"idle")}},dt=async q=>{const he=Ne.isRunning();if(q.paused&&!he){if(ot.current){await zt();return}const ge=Ne.resume();if(ge){if(z("playing"),ge.phase==="tail"){Yt(ge.elapsed);return}await ct(q,3,50,ge.elapsed);return}await ct(q),z("playing")}else Ne.pause(),mt(),q.pause(),z("paused"),he&&(Oe(),Qe())},jt=async()=>{const q=b.current;if(!(!q&&!Nt)){if(Nt){const he=window.speechSynthesis;if(W==="active"){const ge=Gr(),Me=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(ge&&Me.length>0){if(w.current)return;pe("load"),D(!0),S("synthesizing"),w.current=!0;try{const Le=await Promise.all(Me.map(Ve=>Promise.resolve(ge(Ve))));Le.length>1?await Ye(Le,!0):await He(Le[0],!0)}catch{w.current=!1,D(!1),pe("active"),it(Me.length>0?Me:void 0)}return}it(Me.length>0?Me:void 0);return}if(W==="playMode"){const ge=!!he&&(he.speaking||he.paused)&&!(q&&(q.currentSrc||q.getAttribute("src")));if(q&&!ge){await dt(q);return}try{if(he&&he.paused)try{ue("tts"),he.resume(),z("playing")}catch{}else try{he.pause(),z("paused")}catch{}}catch{}}return}if(W==="active"){if(s&&Array.isArray(re.current)&&re.current.length>0){const ge=re.current[0];try{if(ge.src&&q)try{st(q,ge.src),K(),q&&await ct(q)}catch{}K();return}catch{}}pe("load");let he;try{he=await at(!0)}catch{he=!1}if(he===!1&&ke.current){try{H(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}pe("active")}return}if(W!=="load"&&(W==="playMode"||W==="active"))try{q&&await dt(q)}catch(he){(he instanceof Error||typeof he=="object"&&he&&"name"in he)&&he.name}}},zt=async()=>{const q=b.current;if(q)try{const he=re.current;if(Array.isArray(he)&&he.length>1){await pn(0);return}xt(!1);try{q.currentTime=0}catch{}q&&await ct(q),z("playing"),pe("playMode")}catch{}},wn=()=>{mt(),Se(),At.current?.();const q=b.current;try{if(q){try{q.pause()}catch{}try{q.currentTime=0}catch{}}}catch{}Qe(),z("stopped"),pe("active"),I(0),U(!1)},an=async(q,{sameSegment:he=!1}={})=>{mt();const ge=Ne.generation(),Me=b.current,Le=re.current?.[q]?.src;try{if(xt(!1),L(q),U(!0),de.current=q,!Le||!Me||(he||Ie(),st(Me,Le),!he&&await Ct()===!1)||!Ne.isCurrent(ge)||(await ct(Me),!Ne.isCurrent(ge)))return;z("playing"),pe("playMode")}catch{}},Bn=async()=>{const q=re.current,he=de.current||0;if(!q||he<=0){await zt();return}await an(he-1)},dn=async()=>{const q=re.current,he=de.current||0;if(!q||he>=q.length-1){wn();return}await an(he+1)},Xt=()=>{if(ot.current)return;const q=200,he=340;xt(!0),mt(),Se();try{I(1)}catch{}je(1);try{F("hold")}catch{}try{const ge=b.current,Me=Nt&&!!ge?.src;if(!Nt||Me){if(ge){ge.pause();try{ge.currentTime=0}catch{}}}else rt();Qe()}catch{}try{z("stopped")}catch{}if(U(!1),!nt.current)try{Ze.current&&(clearTimeout(Ze.current),Ze.current=null),Ze.current=setTimeout(()=>{try{F("out")}catch{}Ze.current=setTimeout(()=>{try{typeof We.current=="function"&&We.current(!0)}catch{}try{F("idle")}catch{}Ze.current=null},he)},q)}catch{}};o.useEffect(()=>{ut.current=Xt});const on=o.useCallback(()=>H(""),[]),pn=async q=>{(re.current||[])[q]&&await an(q,{sameSegment:q===de.current})},Qt=O==="playing",Lt=o.useMemo(()=>{if(!ne||ne.length<=1)return ne;const q=ne[P];return q?[q]:ne},[ne,P]),Dt=s===!0;o.useEffect(()=>{try{const q=b.current;q&&typeof q.playbackRate=="number"&&Ge(q)}catch{}},[ae,Ge]);const Wt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const q=b.current;if(!q)return;const he=Math.max(0,Math.min(1,ie)),ge=Wt.current,Me=()=>{ge.raf!==null&&(cancelAnimationFrame(ge.raf),ge.raf=null),ge.timer!==null&&(clearTimeout(ge.timer),ge.timer=null)};Me();const Le=Na(q);if(q.paused||Math.abs(Le-he)<.001||typeof requestAnimationFrame!="function"){try{Jn(q,he)}catch{}return}const Ve=performance.now(),pt=()=>{const yt=Math.min(1,(performance.now()-Ve)/150);try{Jn(q,Le+(he-Le)*yt)}catch{}ge.raf=yt<1?requestAnimationFrame(pt):null};return ge.raf=requestAnimationFrame(pt),ge.timer=setTimeout(()=>{Me();try{Jn(q,he)}catch{}},200),Me},[ie]);const Rt=J==="hold",Pn=J==="out",En=W==="playMode"&&!A&&!gt||Rt||Pn,ar=O!=="stopped"||Rt||Pn,$n=O==="paused",me=Math.max(0,Math.min(100,(M||0)*100)),Te=we("audio-player__fill",En?"is-visible":"",ar?"is-expanded":"",$n?"is-paused":"",Pn?"is-out":"");return n.jsxs("div",{className:`audio-player ${Dt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Qt?"is-playing":""} ${A?"is-loading":""} ${W!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:tp[j]?"status":void 0,"aria-live":tp[j]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,W==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Dt,onClick:()=>{se.current=no(),E(),jt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:E,onFocus:k,onBlur:E,children:n.jsx("span",{ref:C,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,B&&n.jsx(On,{anchorRect:B,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${W==="playMode"||Qt?"is-visible":""}`,inert:!(W==="playMode"||Qt)||void 0,children:[n.jsxs("div",{ref:y,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Bn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Qt?"pause":"play",onClick:jt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Qt,width:"60px",variant:"transparent-white",disabled:W!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:wn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),ft>1?n.jsx("div",{ref:g,className:"audio-player__source-buttons",children:Array.from({length:ft}).map((q,he)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(he+1),onClick:()=>{try{pn(he)}catch{}},ariaLabel:d("training.sourcePlay",{n:he+1}),variant:"transparent-white",selected:R&&P===he,disabled:W!=="playMode"||!(Array.isArray($)&&$[he]),showTooltipInfo:!0},he))}):null,!Array.isArray($)||$.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:zt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:dn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:W!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Xt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Te,ref:_,style:{left:`${me}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(x8,{segments:Lt,progress:M,totalDuration:Z,waveProgressRef:Be,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:$?.[P]?.duration??0,noiseSrc:c&&f?.settings.enabled&&xe>0?Gt:null,noiseRatio:f?_a(f.settings):0,noiseSpeed:f?.settings.speed??1,mainVolume:Y,onReadyChange:tt})]})]}),n.jsx("audio",{ref:b,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Lr,{message:Q,position:le,onClose:on})]})}function io(e){const{t}=Ee.useTranslation(),{text:r,label:a,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:d,canIncrease:m,canDecrease:f,fontSize:v,lineHeight:b}=Du({storageKey:"tooltip-fontScale"}),_=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),y=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),x=Array.isArray(r)?r:typeof r>"u"||r===null?[]:[r],g={fontSize:`${v}px`,lineHeight:`${b}px`,"--tt-line-height":`${b}px`,"--tt-marker-size":"28px"},w=n.jsxs("div",{className:ce(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ce("text-box-tooltip__box"),children:[a&&n.jsx("div",{className:ce("text-box-tooltip__label body-2b"),children:a}),n.jsx("div",{className:ce("text-box-tooltip__text body-1"),style:g,children:x.map((N,C)=>n.jsxs("div",{className:ce("text-box-tooltip__line"),children:[x.length>1?n.jsx("div",{className:ce("text-box-tooltip__marker"),children:n.jsx("span",{className:ce("text-box-tooltip__line-number button-1"),children:C+1})}):null,n.jsx("span",{className:ce("text-box-tooltip__line-text"),children:N})]},C))})]}),n.jsxs("div",{className:ce("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!f}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:_,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:y,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(sn,{anchorRect:s,className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:a||t("tooltip.textbox","\uBCF8\uBB38"),children:w}):n.jsx("div",{className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:w})}function ap({state:e="disabled"}){const{t}=Ee.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function op(e,t,r){const a=o.useRef(t),s=o.useRef(r);o.useEffect(()=>{a.current=t,s.current=r}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=a.current(),p=c?Array.from(c.querySelectorAll(Sn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function sp({title:e,children:t,className:r="",state:a="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=Ee.useTranslation(),m=fn("(max-width: 767px)"),f=`training-step__title h4 ${u&&a==="disabled"?"training-step__title--faded":""} ${r}`.trim(),v=`training-step__title-row training-step__title-row--${a}`.trim(),b=o.useRef(null),[_,y]=o.useState(!1),[x,g]=o.useState(null),[w,N]=o.useState(null);op(_&&!!x,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let D=A.length-1;D>=0;D--)if(A[D].querySelector(".text-box-tooltip__root"))return A[D];return null},()=>b.current?.querySelector("button")??null);const C=o.useRef(l);o.useEffect(()=>{C.current=l});const B=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{y(!1),g(null),N(null)},[]);o.useEffect(()=>{if(!_)return;let A;try{typeof C.current=="function"&&(A=C.current())}catch{}if(A===!1){k();return}N(typeof A<"u"&&A!==null?A:null)},[B]);const E=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(N(typeof A<"u"&&A!==null?A:i),!b.current){y(D=>!D);return}if(_)y(!1),g(null),N(null);else{const D=b.current.getBoundingClientRect();g(D),y(!0)}}},[l,i,_]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:f,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:a==="disabled"?"disabled":"default",disabled:a==="disabled"||h,onDisabledClick:h&&a!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:b,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:_?"is-selected":void 0,"aria-expanded":_,"aria-haspopup":"dialog",variant:a==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),_&&n.jsx(io,{text:w??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:x,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ll(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function br({index:e,stepIndex:t,isLast:r=!1,title:a="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(()=>ll(e,t));o.useEffect(()=>{const C=ll(e,t);if(C!==d){const B=setTimeout(()=>m(C),0);return()=>clearTimeout(B)}},[e,t,d]);const f=o.useCallback((...C)=>{ll(e,t)==="done"||d==="done"||typeof u=="function"&&u(...C)},[e,t,d,u]),[v,b]=o.useState(!1),[_,y]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),x=o.useCallback(C=>{if(!C)return null;try{const B=C;if(typeof C=="object"&&(B.currentTarget||B.target)&&(B.nativeEvent||B.type)){const A=B.currentTarget??B.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(C instanceof DOMRect)return C;const k=C;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const E=C?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),g=o.useCallback((C,{text:B="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:A="center",alignY:D="top"}={})=>{const j=x(C);y({text:B,label:k,anchorRect:j,backdrop:E,alignX:A,alignY:D}),b(!0)},[x]),w=o.useCallback(()=>{b(!1),y(C=>({...C,anchorRect:null}))},[]),N=o.Children.map(l,C=>{if(o.isValidElement(C)){const B=C;if(typeof B.type=="string")return B;const k=B.props??{},E=typeof k.onDone=="function"?k.onDone:f,A=typeof k.disabled=="boolean";let D=d==="disabled";return A&&(D=!!k.disabled),o.cloneElement(B,{onDone:E,disabled:D,showTooltip:g,hideTooltip:w})}return C});return n.jsxs("div",{className:`training-step training-step--${d} ${r?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ap,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(sp,{state:d,title:a,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),v?n.jsx(sn,{anchorRect:_.anchorRect,backdrop:_.backdrop,onClose:w,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(io,{text:_.text,onClose:w})}):null]})}function lp({context:e,state:t="disabled",theme:r="light"}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||r}catch{return r}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(S=>S==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:f,lineHeight:v}=Du({storageKey:"textbox_fontScale"}),[b,_]=o.useState(""),y=o.useRef(null),x=o.useRef(!1),g=o.useCallback(()=>{x.current=no()&&!!y.current&&y.current.contains(document.activeElement),l("active")},[]),w=o.useCallback(()=>_(""),[]),N=S=>{try{_(S)}catch{}},C=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const S=setTimeout(()=>l(t),0);return()=>clearTimeout(S)}},[t]);const B=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,E]=o.useState(B);k!==B&&(E(B),l("disabled"));const A=t==="disabled"?s:t,D=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",j=o.useMemo(()=>({fontSize:`${f}px`,lineHeight:`${v}px`}),[f,v]);return o.useEffect(()=>{if(A==="disabled"||!x.current)return;x.current=!1;const S=document.activeElement;S&&S!==document.body||y.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:y,className:`training-text-box ${D} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:g,icon:"eye",ariaLabel:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:j,children:B})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(a("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!C&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(a("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!C&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:a("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Lr,{message:b,position:"top",onClose:w})]})}function yr(e){return e==="active"||e==="done"}function il({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:f=!1,choiceIcons:v,shuffleChoices:b=!0}){const{t:_}=Ee.useTranslation(),y=s??_("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),x=typeof e=="number"?e:-1,g=typeof t!="number"?"disabled":x<t?"done":x===t?"active":"disabled",w=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",C=h?h.join("||"):"",[B,k]=o.useState(()=>Array.isArray(w)?b?Jr(w):w.slice():void 0);o.useEffect(()=>{Array.isArray(w)&&w.length?k(b?Jr(w):w.slice()):k(void 0)},[c,N,C,b]);const[E,A]=o.useState(null),[D,j]=o.useState(()=>new Set);o.useEffect(()=>{A(null),j(new Set)},[C,c,N]);const S=o.useRef(void 0);o.useEffect(()=>{const G=S.current;typeof G=="number"&&typeof t=="number"&&typeof e=="number"&&G>=e&&t<e&&(A(null),j(new Set)),S.current=t},[t,e]);const O=o.useCallback(G=>{if(!yr(g))return;const M=B?.[G];if(M==null)return;const I=M;if(d){const W=new Set(D);W.has(I)?W.delete(I):W.add(I),j(W),typeof u=="function"&&u({selectedValues:[...W],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...W],__ts:Date.now()})}else A(I),typeof u=="function"&&u({selectedIndex:G,selectedValue:I,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:G,selectedValue:I,__ts:Date.now()})},[B,g,d,u,D]),z=`training-step__buttons${Array.isArray(B)&&B.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:y,useTitleFaded:l,children:n.jsx("div",{className:z,children:Array.isArray(B)&&B.length>0?B.map((G,M)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>O(M),ariaLabel:String(G),label:G,useLabel:!0,icon:v?v[String(G)]:void 0,variant:"default",disabled:g==="disabled",selected:d?D.has(G):E===G,useDisabledCovered:f,minWidth:0},String(G))):null})})}function ul({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=Ee.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",f=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",v=u&&typeof u=="object"?u.choices:void 0,[b,_]=o.useState(c??null),y=`${String(f)}\0${JSON.stringify(v??null)}`,[x,g]=o.useState(y);x!==y&&(g(y),c==null&&_(null));const[w,N]=o.useState(c);Object.is(w,c)||(N(c),_(c??null));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&&c==null&&_(null),C.current=t},[t,e,c]);const B=o.useCallback(A=>{const D=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(D),yr(m)&&typeof l=="function"&&l(D)},[i,m,l]),k=o.useCallback(()=>{yr(m)&&(_(!1),B(!1))},[B,m]),E=o.useCallback(()=>{yr(m)&&(_(!0),B(!0))},[B,m]);return n.jsxs(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(lp,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((A,D)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{yr(m)&&(_(D),B&&B(D))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:b===D},D)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:b===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:b===!0})]})})]})}function cl({index:e,stepIndex:t,isLast:r=!1,title:a,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:f,showNoiseWaveForm:v,leadInMs:b,tailMs:_}){const{t:y}=Ee.useTranslation(),x=a??y("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),g=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(br,{index:e,stepIndex:t,isLast:r,title:x,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(sl,{soundSrc:i,ttsText:i?null:p??x,bucketPath:u,btnLabel:l||y("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:g,className:"training-step__listen-sticky",showSoundWaveForm:f,showNoiseWaveForm:v,leadInMs:b,tailMs:_},`audio-p${m??0}-s${e}`)})}const D8=[];function dl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=D8}){const{t:c}=Ee.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=te=>typeof te=="string"?te:te&&(te.context||te.sentence||te.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[f,v]=o.useState(()=>(d||[]).map((te,P)=>({id:P,text:h(te)}))),b=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),_=b!=="disabled",y=o.useRef(void 0),x=o.useRef(void 0);o.useEffect(()=>{if(y.current===u)return;y.current=u;const te=Array.isArray(u)?u:[];m(te);const P=(L=>{const R=(L||[]).map((ae,Y)=>({id:Y,text:h(ae)}));if(R.length<=1)return R;const U=(ae,Y)=>{if(ae.length!==Y.length)return!1;for(let xe=0;xe<ae.length;xe++)if(ae[xe].text!==Y[xe].text)return!1;return!0};let Z=Jr(R),X=0;for(;U(Z,R)&&X<20;)Z=Jr(R),X+=1;return Z})(te);v(P);try{if(typeof i=="function"){const L=P.filter((R,U)=>R.text===h(te[U])).length;i({shuffled:P,score:L,total:(te||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&b==="active"){const L=P.filter((R,U)=>R.text===h(te[U])).length;x.current=u,l({shuffled:P,score:L,total:(te||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(b!=="active"||x.current===u||(x.current=u,typeof l!="function"))return;const te=Array.isArray(u)?u:[],P=f.filter((L,R)=>L.text===h(te[R])).length;l({shuffled:f,score:P,total:te.length,initial:!0,__ts:Date.now()})},[b,u]);const g=(te,P)=>{const L=[...f],R=te+P;if(R<0||R>=L.length)return;const U=L[R];L[R]=L[te],L[te]=U,I(L);try{if(typeof l=="function"&&b==="active"){const Z=L.filter((X,ae)=>X.text===h(d[ae])).length;l({shuffled:L,score:Z,total:(d||[]).length,__ts:Date.now()})}}catch{}},[w,N]=o.useState(null),C=o.useRef(null),B=o.useRef(null),k=o.useRef(null),E=o.useRef(null),A=o.useRef(null),D=o.useRef({x:0,y:0}),j=o.useRef(null),S=o.useRef({dx:0,dy:0}),O=()=>{if(j.current!==null)return;const te=()=>{if(!C.current){j.current=null;return}j.current=requestAnimationFrame(te);const P=D.current,L=S.current||{dx:0,dy:0};C.current&&(C.current.style.transform=`translate3d(${P.x-L.dx}px, ${P.y-L.dy}px, 0)`)};j.current=requestAnimationFrame(te)},z=o.useRef(new Map),G=o.useRef(new Map),M=()=>{const te=new Map;return z.current.forEach((P,L)=>{P&&P.getBoundingClientRect&&te.set(L,P.getBoundingClientRect())}),te},I=te=>{const P=M();v(te);try{if(typeof i=="function"){const L=te.filter((R,U)=>R.text===h(d[U])).length;i({shuffled:te,score:L,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const L=M();te.forEach(R=>{const U=P.get(R.id),Z=L.get(R.id),X=z.current.get(R.id);if(!X||!U||!Z)return;const ae=U.top-Z.top;ae&&(X.style.transition="none",X.style.transform=`translateY(${ae}px)`,requestAnimationFrame(()=>{X.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",X.style.transform="";const Y=()=>{X.style.transition="",X.removeEventListener("transitionend",Y)};X.addEventListener("transitionend",Y)}))})})},W=(te,P)=>{try{try{P.dataTransfer?.setData("text/plain",String(te))}catch{}try{P.dataTransfer&&(P.dataTransfer.effectAllowed="move")}catch{}try{const L=document.createElement("div");L.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(L),P.dataTransfer?.setDragImage(L,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(L)}catch{}})}catch{}}catch{}N(te);try{const L=f[te],R=document.createElement("div");R.className="order-list__dragging-object order-list__dragging-object--visible",R.textContent=L&&L.text?L.text:"",document.body.appendChild(R),C.current=R;const U=z.current.get(L.id);let Z=P.clientX||0,X=P.clientY||0;try{if(U&&U.getBoundingClientRect){const F=U.getBoundingClientRect();Z=F.left+F.width/2,X=F.top+F.height/2}}catch{}const ae=R.getBoundingClientRect(),Y=ae.width/2,xe=ae.height/2;S.current={dx:Y,dy:xe},R.style.transition="none",D.current={x:Z,y:X},R.style.transform=`translate3d(${Z-Y}px, ${X-xe}px, 0)`,requestAnimationFrame(()=>{try{R.style.transition=""}catch{}O()});const ie=F=>{const Q=F;D.current={x:Q.clientX,y:Q.clientY},O()};k.current=ie,document.addEventListener("mousemove",ie);const J=F=>{const Q=F;D.current={x:Q.clientX,y:Q.clientY},O()};B.current=J,document.addEventListener("dragover",J);try{P.dataTransfer?.setData("text/plain",String(te));try{P.dataTransfer?.setData("application/json",JSON.stringify({idx:te}))}catch{}}catch{}}catch{}},pe=(te,P)=>{P.preventDefault();try{P.dataTransfer&&(P.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const L=P.currentTarget&&P.currentTarget.closest?P.currentTarget.closest(".order-list__item"):null;if(L&&E.current!==L){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{L.classList.add("drag-over")}catch{}E.current=L}}catch{}},se=(te,P)=>{P.preventDefault();const L=P.dataTransfer?.getData("text/plain")||"",R=L?parseInt(L,10):w,U=te;if(typeof R!="number"||isNaN(R)||R===U){N(null),ne(),$();return}const Z=Yb(f,R,U);I(Z),N(null),$();try{if(typeof l=="function"&&b==="active"){const X=Z.filter((ae,Y)=>ae.text===h(d[Y])).length;l({shuffled:Z,score:X,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const X=document.querySelectorAll(".order-list .order-list__item")[U];if(!X)return;const ae=X.querySelector(".order-list__slot")||X;try{ae.classList.add("pulse"),ae.offsetHeight,ae.classList.add("to-dark");const Y=()=>{ae.classList.remove("pulse","to-dark"),ae.removeEventListener("transitionend",Y)};ae.addEventListener("transitionend",Y)}catch{}})}catch{}ne()},$=()=>{if(C.current){try{document.body.removeChild(C.current)}catch{}C.current=null}B.current&&(document.removeEventListener("dragover",B.current),B.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),j.current!==null&&(cancelAnimationFrame(j.current),j.current=null)},V=()=>{N(null),ne(),$()};o.useEffect(()=>()=>$(),[]);const ne=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(te=>te.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const te=Math.max(1,(f||[]).length);f.forEach((P,L)=>{const R=G.current.get(P.id);if(!R)return;let U=50;te>1&&(U=Math.round(L/(te-1)*100));try{R.style.setProperty("--marker-pos",U+"%")}catch{}})}catch{}},[f]),o.useEffect(()=>()=>{$(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:p,children:n.jsx("div",{className:"order-list",children:f.map((te,P)=>{const L=Math.max(1,(f||[]).length),R=L>1?Math.round(P/(L-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":b==="disabled","aria-disabled":b==="disabled",children:[b!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":R+"%"},ref:U=>{const Z=G.current;U?Z.set(te.id,U):Z.delete(te.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:P+1})}):null,n.jsxs("div",{ref:U=>{const Z=z.current;U?Z.set(te.id,U):Z.delete(te.id)},className:`order-list__draggable ${w===P?"dragging":""}`,"data-disabled":b==="disabled","aria-disabled":b==="disabled",tabIndex:b==="disabled"?-1:0,draggable:_,onDragStart:_?U=>W(P,U):void 0,onDragEnter:_?U=>pe(P,U):void 0,onDragOver:_?U=>pe(P,U):void 0,onDragLeave:_?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const U=document.querySelectorAll(".order-list .order-list__item");U&&U[P]&&(U[P].classList.remove("drag-over"),E.current===U[P]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:_?U=>se(P,U):void 0,onDragEnd:_?V:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:te.text}),_?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===f.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},te.id)})})})}const S8=8e3;function T8(e,t){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.then(s,s),setTimeout(s,t)})}function ip({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:f}=Ee.useTranslation(),v=s??f("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),b=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),_=d??3,y=(b||[]).slice(0,_);(b||[]).length>_&&console.warn(`TrainingStepCard: ${b.length} items passed but only ${_} shown`);const x=typeof e=="number"?e:-1,g=typeof t!="number"?"disabled":x<t?"done":x===t?"active":"disabled",[w,N]=o.useState(null),C=o.useRef([]),[B,k]=o.useState(!1),E=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const D=o.useMemo(()=>b.map(M=>M?.id??M?.word??"").join("|"),[b]);o.useEffect(()=>{N(null)},[D]);const j=o.useRef(void 0);o.useEffect(()=>{const M=j.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&N(null),j.current=t},[t,e]);const S=o.useCallback((M,I)=>{if(c)return;const W={item:M,index:I,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(g==="active"&&typeof l=="function")try{l(W)}catch{}},[c,i,g,l]),O=o.useRef(m);o.useEffect(()=>{O.current=Math.max(0,m||0)},[m]);const z=o.useCallback(async()=>{if(B||g==="disabled")return;k(!0);let M=!1;const I=new Promise(W=>{E.current=()=>{M=!0,W()}});try{for(let W=0;W<y.length&&!(!A.current||M);W++){const pe=C.current[W];if(!pe)continue;await Promise.race([T8(pe.play(),S8),I]);const se=Math.max(0,O.current||0);se>0&&W<y.length-1&&!M&&A.current&&await Promise.race([new Promise($=>{setTimeout($,se)}),I])}}finally{E.current=null,k(!1)}},[B,g,y.length]),G=o.useCallback((M,I)=>{if(!yr(g))return;N(I);const W={selectedValue:M.word||M.title||"",selectedIndex:I,item:M,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(typeof l=="function")try{l(W)}catch{}},[i,g,l]);return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:v,onDone:l,titleProps:{usePlayAllBtn:!h&&y.length>0,onPlayAll:z,playAllActive:B},children:n.jsx("div",{className:"training-step__cards",onClickCapture:M=>{const I=E.current;if(!I)return;const W=M.target;W&&typeof W.closest=="function"&&W.closest(".training-word-card__bottom")&&I()},children:y.length===0?n.jsx("div",{className:"training-step__empty",children:f("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):y.map((M,I)=>n.jsx(zs,{ref:W=>{C.current[I]=W},item:M,disabled:g==="disabled",onPlayDone:()=>S(M,I),selectable:c,selected:c&&w===I,onSelect:c?()=>G(M,I):void 0,flipDelay:I*120,hideLabel:p,hideAudio:h},M&&M.id||I))})})}function M8(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 up(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"}]}M8(Mt.t.bind(Mt)),up(Mt.t.bind(Mt));const uo="none",$8=.5,L8=1.5,R8=.25;function pl({title:e,valueLabel:t,value:r,min:a,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(cn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(sd,{value:r,onChange:p,min:a,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ce("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ce(we("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function cp({anchorRect:e,onClose:t,hideNoiseRows:r=!1}){const{t:a}=Ee.useTranslation(),s=fn("(max-width: 767px)")?40:24,l=ao(),i=_a(l?.settings??gr),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(y=>{try{l?.setMainVolume(Math.max(0,Math.min(1,y/100)))}catch{}},[l]),f=o.useCallback(y=>{try{l?.setPlaybackRate(y)}catch{}},[l]),v=o.useCallback(y=>{const x=Math.min(xa,Math.max(0,Math.round(y*10)/10));try{l?.setSettings({noiseRatio:x})}catch{}},[l]),b=o.useCallback(y=>{try{y===uo?l?.setSettings({enabled:!1}):l?.setSettings({type:y,enabled:!0})}catch{}},[l]),_=[{key:uo,label:a("training.noise.type.none","\uC5C6\uC74C")},...up(a).map(y=>({key:y.value,label:y.label}))];return n.jsx(sn,{anchorRect:e,offset:12,onClose:t,ariaLabel:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:ce("noise-settings-tooltip__header"),children:[n.jsx("span",{children:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:a("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Tr,{className:ce("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(pl,{title:a("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(pl,{title:a("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:$8,max:L8,step:R8,size:s,onChange:f}),!r&&n.jsxs(n.Fragment,{children:[n.jsx(cn,{variant:"custom",label:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(An,{ariaLabel:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:_,value:c?u:uo,onChange:b})}),n.jsx(pl,{title:a("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:a("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:xa,step:qd,size:s,disabled:!c,onChange:v})]}),r&&n.jsx("div",{className:ce("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(cn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(An,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:_,value:uo,onChange:()=>{}})})})]})})}function dp({useNoiseSettingBtn:e=!1,onSettings:t,onNext:r,onResult:a,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:p=!1}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(!1),[f,v]=o.useState(null),[b,_]=o.useState(!1),y=o.useRef(null),x=o.useRef(null),g=ao(),w=u>0,N=w&&i<u-1,C=!w||i>=u-1,B=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),v(null))},[e]);const k=o.useCallback(()=>{m(!1),v(null)},[]),E=o.useCallback(()=>{if(d){m(!1),v(null);return}const I=y?.current?.getBoundingClientRect();I&&v(I),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),v(null);return}const I=x?.current?.getBoundingClientRect();I&&v(I),t?.(),m(!0)},[d,t]),D=fn("(max-width: 767px)"),j=o.useRef(null),[S,O]=o.useState(null),z=o.useCallback(()=>{_(I=>{const W=!I;return O(W?j.current?.getBoundingClientRect()??null:null),W})},[]),G=o.useCallback(()=>{_(!1),O(null)},[]);o.useEffect(()=>{c&&(_(!1),O(null))},[c]);const M=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Rs,{analyser:g?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Rs,{analyser:g?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return op(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[y.current,x.current].map(I=>I?.querySelector("button")??null).find(I=>!!I&&I.getClientRects().length>0)??y.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:y,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:x,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:j,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:z,selected:b,"aria-expanded":D?b:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&b&&!D&&n.jsx("div",{className:"pp-bottom__meters",children:M})]}),e&&b&&D&&S&&n.jsx(sn,{anchorRect:S,onClose:G,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:M})}),n.jsxs("div",{className:"pp-bottom__right",children:[C&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof a=="function"?a:r,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!B}),N&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:r,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!B})]}),e&&d&&n.jsx(cp,{anchorRect:f,onClose:k,hideNoiseRows:p})]})}function pp({title:e,subtitle:t,desc:r,depth:a,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:f}=Ee.useTranslation(),v=fn("(max-width: 767px)"),b=Number.isInteger(h)?h:u||0,_=Number.isInteger(p)?p:c||0,y=d||m,x=Array.isArray(a)?v?a[a.length-1]:a.join(" / "):a,g=typeof e=="string"?e.trim():e,w=typeof t=="string"?t.trim():t,N=!!(g||w),C=N?g||w:f("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),B=x||(g?t:void 0),k=v&&typeof B=="string"&&(B.includes(" \xB7 ")||B.includes(" / "))?B.split(/\s[·/]\s/).pop():B,E=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[y?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:f("common.back","\uB4A4\uB85C"),onClick:y,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Ic,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:C}),r?n.jsx("span",{className:"pp-title__description caption-1",children:r}):null]})]}),n.jsx(cd,{max:Math.max(0,_??0),index:Math.max(0,b??0)})]})}function P8(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function F8(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(r=>r.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const hp=(e,t)=>{if(!t)return t;const r=typeof Mt?.t=="function"?Mt.t(e,{defaultValue:t}):void 0;return typeof r=="string"&&r?r:t};function mp(e,t,r){const a=e,s=a?.title||a?.name||(Array.isArray(t)?t[t.length-1]:void 0)||r||"\uD6C8\uB828",l=Pi().find(u=>u.key===(a?.category_0||a?.category_main_code)),i=l?.subs?.find(u=>u.key===(a?.category_1||a?.category_sub_code));return{title:s,label:a?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?hp(`topic.${l.key}`,l.label):void 0,i?hp(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function hl(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function fp(e,t,r){if(!e||typeof e!="object"||Array.isArray(e))return e;const a=e,s=typeof r=="number"&&r>0?r:Date.now();return{...a,...a.shownAt===void 0&&t?{shownAt:t}:{},...a.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function I8(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function O8({idPrefix:e,trainingData:t,depth:r,fallbackTitle:a="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=mp(t,r,a),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function z8(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function W8(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 H8(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 Cp(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function V8(e,t,r,a){return Cp(e,t*r+a)}function q8({payload:e,selected:t,choices:r=[],correctAnswers:a=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return a.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>a.includes(l));if(typeof s.correct=="boolean")return s.correct}if(a.length){if(typeof t=="number"&&Array.isArray(r)&&r.length)return a.some(s=>String(s)===String(r[t]));if(typeof t<"u")return a.some(s=>String(s)===String(t))}}function U8(e){return e?Array.isArray(e.items)?e.items.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.context||r.sentence||"",contextCode:r.contextCode||r.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.sentence||r.context||"",contextCode:r.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const gp=o.createContext(null);function G8(){const e=o.useContext(gp);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function K8({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Ee.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),f=JSON.stringify(l),v=l.length;o.useEffect(()=>{m(Array.from({length:v},()=>null))},[f]);const b=o.useRef(void 0);o.useEffect(()=>{const g=b.current;typeof g=="number"&&typeof t=="number"&&typeof e=="number"&&g>=e&&t<e&&m(Array.from({length:v},()=>null)),b.current=t},[t,e,v]);const _=o.useMemo(()=>d.filter(g=>g!==null).length+1,[d]),y=o.useCallback(g=>{if(!yr(h))return;const w=d;let N;if(w[g]!=null){const B=w[g];N=w.map(k=>k!==null&&k>=B?null:k)}else N=[...w],N[g]=_;m(N);const C={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(C)}catch{}if(w[g]==null&&N.length>0&&N.every(B=>B!==null))try{typeof i=="function"&&i(C)}catch{}},[h,d,_,u,i,l]),x=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:x,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((g,w)=>n.jsx(zs,{item:{word:g},disabled:h==="disabled",selectable:!0,selected:d[w]!==null,orderRank:d[w],onSelect:()=>y(w),flipDelay:w*120,hideLabel:!1,hideAudio:!0},`${g}-${w}`))})})}function co(e){return null}co.__isTrainingPage=!0;function Or(e,t){const r=G8();return{ctx:r,index:e,stepIndex:r.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:a=>r.handleStepDone(a,e),onChange:a=>r.handleStepChange(a,e)}}function bp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i}=Or(e,t);return n.jsx(cl,{...r,index:a,stepIndex:s,isLast:l,onDone:i})}function yp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(il,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function vp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(ul,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function xp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(dl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function _p({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(ip,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Y8({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Or(e,t);return n.jsx(K8,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}const wp=3e4,Z8=/^(https?:|blob:|data:audio|\/|\.\/)/;function Bp(e){return typeof e=="string"&&Z8.test(e)?e:null}const X8=e=>typeof e=="string"&&e.trim()!==""?e:null,ml=Symbol("timed-out");function J8(e,t){if(t<=0)return Promise.resolve(ml);let r;return Promise.race([Promise.resolve(e),new Promise(a=>{r=setTimeout(()=>a(ml),t)})]).finally(()=>clearTimeout(r))}function Q8(e){return e?Gr()||ka()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function eB(e,t){const r=[],a=Bp(t);a&&r.push({kind:"raw",resolve:async()=>a});const s=(e??"").trim();if(!s)return r;for(const[l,i]of[["urlResolver",Gr()],["fallbackUrlResolver",ka()]])i&&r.push({kind:l,resolve:async u=>{let c;try{c=await J8(i(s),u)}catch(h){return kt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===ml?(kt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${wp}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):X8(c)||(kt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return r}function tB(){return Date.now()+wp}const nB=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function rB(e){kt("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 po(...e){for(const t of e)if(typeof t=="string"){const r=t.trim();if(r.length)return r}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const r=t,a=[r.text,r.label,r.value];for(const s of a){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function aB(e){return po(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function oB(e){return Bp(po(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function kp(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=po(e?.status,e?.result,e?.judge,e?.note);if(t){const r=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(a=>r.includes(a)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(a=>r.includes(a)))return!1}}function Ap(e){const{score:t,contextsLength:r,results:a=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=Ee.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=r??0;if(t!=null&&A>0&&t/A>.5){const D=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(D)}},[t,r]);const m=o.useCallback(A=>{const D=kp(A),j=po(A?.wording,A?.label);return D===!0?{variant:"main",label:j??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:D===!1?{variant:"danger",label:j??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:j??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),f=r??0,v=t??0,b=o.useMemo(()=>Array.isArray(a)?a:[],[a]),_=o.useRef(null),[y,x]=o.useState(null),g=o.useCallback(()=>{_.current?.(),_.current=null,x(null)},[]);o.useEffect(()=>g,[g]);const w=o.useRef(0),N=(A,D)=>{if(!Yn)return;const j=Math.round(performance.now()-w.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${j}ms ${A}`,D??"")},C=o.useRef(0),B=o.useCallback((A,D,j)=>{g();const S=++C.current,O=()=>C.current===S;w.current=Yn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:D,rawUrl:j}),x(A),_.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),C.current++,To()};const z=W=>{N("\uD2BC\uB2E4",W);const pe=Ca(W,se=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${se?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:O()}),se&&O()&&(_.current=null,x(null))});return _.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),C.current++,pe.stop(),To()},pe.done},G=eB(D,j);N("\uCC28\uB840",G.map(W=>W.kind));const M=G[0]?.kind==="raw",I=M?z(j):Promise.resolve(!1);(async()=>{if(await I||!O())return;const W=tB(),pe=M?G.slice(1):G;for(let se=0;se<pe.length;se++){if(!O())return;N(`${pe[se].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const $=await pe[se].resolve(nB(W,pe.length-se));if(N(`${pe[se].kind} \uAC00 \uB2F5\uD588\uB2E4`,$),!O()||$&&(await z($)||!O()))return}O()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),rB(D),_.current=()=>{C.current++,To()},N("\uB0AD\uB3C5\uD55C\uB2E4"),rb(D,{onEnd:()=>{O()&&(_.current=null,x(null))}}))})()},[g]),k=o.useMemo(()=>b.map(A=>{const D=A??{},j=aB(D)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:S,label:O}=m(D),z=Array.isArray(D.corrects)?D.corrects:[],G=z.length?z.join(", "):D.answer!=null&&D.answer!==""?String(D.answer):null,M=typeof D.selectedText=="string"?D.selectedText:null,I=kp(D)===!0,W=oB(D),pe=!!W||Q8(j);return{problem:j,variant:S,label:O,answer:G,selectedText:M,isCorrect:I,sound:W,canHear:pe}}),[b,m,p]),E=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(Vn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:D})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:D,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:v,total:f}),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:f})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,D)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(D+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:y===D?"square":"volume-2",className:"trp-row__replay",ariaLabel:y===D?p("training.result.replaySoundStop",{no:D+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:D+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>y===D?g():B(D,A.problem,A.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(rn,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},D))]})})]})})}const fl=new Set;function sB(e){o.useEffect(()=>{if(!e||fl.has(e))return;fl.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let r=null,a=null,s=0,l=0;const i=()=>{const h=Date.now();r==null&&(r=h),a==null&&(a=h)},u=()=>{a!=null&&(s+=Date.now()-a,a=null)};t()&&i();const c=()=>{if(u(),r==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,ny({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),fl.delete(e)}},[e])}function ho(e,t){return e&&e.id||`page-${t??0}`}function mo(e,t){return e&&e.key||`step-${t??0}`}function fo(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function lB(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const iB=300,uB=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Kn=Object.freeze({}),Np=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Cl(e){const t=e,r=t?.results||t?.answers||[],a=Array.isArray(r)&&r.length>0?r.length:null,s=Array.isArray(r)?r.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:r,correct:a!=null?s:null,total:a}}const cB=e=>n.jsx(Ap,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function dB(e){const{scenario:t,title:r,subTitle:a,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:f,onRoundFinished:v,onNext:b,onSettings:_,useNoiseSetting:y=!0,children:x,ariaLabel:g,label:w,buildResults:N,onResult:C,typeKey:B,entryPoint:k,dailyTotal:E,itemRef:A,renderResultPopup:D,noiseOverride:j,hideNoiseRows:S=!1,inline:O=!1,height:z}=e;sB(B&&!Np.has(B)?B:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:M}=Ee.useTranslation(),I=C,W=!!t,pe=t?.id||null,se=t?.meta||{},$=Array.isArray(t?.pages)?t.pages:[],V=Array.isArray(x)||o.isValidElement(x)&&typeof x!="function"?o.Children.toArray(x).filter(o.isValidElement):[],ne=V.length>0,te=me=>me===co||me?.__isTrainingPage===!0,P=ne&&V.some(me=>te(me.type)),L=P?V.filter(me=>te(me.type)).map((me,Te)=>{const q=me.props||{};return{id:`children-page-${Te}`,steps:o.Children.toArray(q.children).filter(o.isValidElement),pageTop:q.pageTop||q.top||null,pageBottom:q.pageBottom||q.bottom||null}}):[{id:"children-page-0",steps:V}],R=ne&&!W&&typeof x!="function",U=R?Math.max(1,L.length):0;o.useEffect(()=>{if(!O&&!(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(O||typeof document>"u"||!document.body)return;const me=document.body;return me.dataset.ihabTrainingPopupCount=String(Number(me.dataset.ihabTrainingPopupCount||"0")+1),me.classList.add("ihab-training-popup-open"),()=>{const Te=Number(me.dataset.ihabTrainingPopupCount||"1")-1;Te>0?me.dataset.ihabTrainingPopupCount=String(Te):(delete me.dataset.ihabTrainingPopupCount,me.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!O&&!(typeof document>"u"||!document.body))return wc()},[]);const[Z,X]=o.useState({...gr,enabled:!1}),ae=o.useRef(Z);o.useEffect(()=>{ae.current=Z},[Z]);const Y=o.useRef(j),xe=o.useRef(!1),ie=o.useRef(null),J=o.useRef(!1);o.useEffect(()=>{let me=!1;const Te=q=>{if(me)return;xe.current=!0;const he=q?Cr({...gr,enabled:!1},q):{...gr},ge=ie.current;ie.current=null;const Me=ge?Cr(he,ge):he;ae.current=Me,X(Me),ge&&!Y.current&&!J.current&&Uo(Me),Ma(Me);const Le=Y.current;if(Le){const Ve=typeof Le=="function"?Le(Me):Le,pt=Cr(Me,Ve);ae.current=pt,X(pt),Ma(pt)}};return fy().then(({settings:q,failed:he})=>{if(he&&(J.current=!0),me){const ge=ie.current;if(ie.current=null,ge&&!Y.current&&!he){const Me=q?Cr({...gr,enabled:!1},q):{...gr};Uo(Cr(Me,ge))}return}Te(q)}),()=>{me=!0}},[]);const[F,Q]=o.useState(null),[H,le]=o.useState(null),re=o.useCallback((me,Te)=>{me==="main"?Q(Te):le(Te)},[]),de=o.useRef(null),Be=o.useRef(null),ke=o.useCallback(()=>{Be.current!==null&&(clearTimeout(Be.current),Be.current=null);const me=de.current;de.current=null,me&&!J.current&&Uo(me)},[]);o.useEffect(()=>{if(typeof window>"u")return;const me=()=>{document.visibilityState==="hidden"&&ke()};return window.addEventListener("pagehide",ke),document.addEventListener("visibilitychange",me),()=>{window.removeEventListener("pagehide",ke),document.removeEventListener("visibilitychange",me),ke()}},[ke]);const Ne=o.useCallback(me=>{const Te=Cr(ae.current,me);if(ae.current=Te,X(Te),!xe.current){ie.current={...ie.current??{},...me},Ma(Te);return}!Y.current&&!J.current&&(de.current=Te,Be.current!==null&&clearTimeout(Be.current),Be.current=setTimeout(ke,iB)),Ma(Te)},[ke]),Re=Z.mainSpeed,ye=Z.mainVolume,_e=o.useCallback(me=>Ne({mainSpeed:me}),[Ne]),Ae=o.useCallback(me=>Ne({mainVolume:me}),[Ne]),Oe=o.useMemo(()=>({settings:Z,setSettings:Ne,registerAnalyser:re,mainAnalyser:F,noiseAnalyser:H,playbackRate:Re,setPlaybackRate:_e,mainVolume:ye,setMainVolume:Ae}),[Z,Ne,re,F,H,Re,_e,ye,Ae]),je=o.useRef(null),[tt,Ct]=o.useState(0),Ie=o.useRef([]),[qe,nt]=o.useState("center"),[We,Ze]=o.useState(!1),ot=o.useRef(!1),gt=o.useRef(null),ht=o.useCallback(me=>{ot.current||(ot.current=!0,Ze(!0),gt.current=setTimeout(()=>{try{me()}catch{ot.current=!1,Ze(!1)}},uB()?0:$c))},[]);o.useEffect(()=>()=>{gt.current&&clearTimeout(gt.current)},[]);const xt=o.useRef(m);o.useEffect(()=>{xt.current=m});const ut=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(O)return;const me=je.current,Te=ut.current;if(es(me,Te),me){const q=Array.from(me.querySelectorAll(Sn)).filter(he=>!he.closest('[aria-hidden="true"]'))[0];if(q)try{q.focus()}catch{}}return()=>{const q=document.activeElement;if(!q||q===document.body||me&&me.contains(q))try{ts(Te)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!O)return ir(()=>ht(()=>{const me=xt.current;typeof me=="function"&&me()}))},[ht,O]),Ra(je,!O);const[Gt,_t]=o.useState(!1),Pt=o.useRef(!1),[Qe,De]=o.useState(null),rt=o.useRef(0),it=o.useRef(0),bt=()=>{rt.current+=1,it.current+=1,De(null)},[Nt,It]=o.useState(""),[ft,mt]=o.useState(()=>fo()),At=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!W&&!R||(mt(fo()),bt())},[W,pe,R]),o.useEffect(()=>{R&&mt(me=>{const Te=Math.max(0,Math.min(me.pageIndex,Math.max(0,U-1)));return Te!==me.pageIndex?{...me,pageIndex:Te,stepIndex:0}:me})},[R,U]);const Et=R?Math.max(0,Math.min(ft.pageIndex,U-1)):0,Je=R?L[Et]:null,wt=R&&Je&&Array.isArray(Je.steps)?Je.steps:[],ue=W?ft.pageIndex:R?Et:typeof c=="number"?c:0,Se=W?$[Math.max(0,Math.min(ft.pageIndex,Math.max(0,$.length-1)))]:null,Pe=W&&Se&&Array.isArray(Se.steps)?Se.steps:[],Ge=W?Pe.length:R?wt.length:typeof d=="number"?d:0,st=W||R?Math.max(0,Math.min(ft.stepIndex,Math.max(0,Ge))):typeof h=="number"?h:0,Ot=W?$.length:R?U:typeof p=="number"?p:0;o.useEffect(()=>{if(!W&&!R)return;const me=W?ho(Se,ue):Je?.id||`children-page-${ue??0}`,Te=new Date().toISOString();for(let q=0;q<=st;q+=1){const he=W?mo(Pe[q],q):`step-${q}`,ge=Ke(me,he);$t.current.has(ge)||$t.current.set(ge,Te)}},[W,R,ue,st,Je?.id]),o.useLayoutEffect(()=>{const me=At.current;if(typeof ue=="number"&&me!==null&&ue!==me&&ue>me)try{It(M("training.problemNotice",{n:ue+1}))}catch{}At.current=typeof ue=="number"?ue:At.current},[ue,c,M]),o.useLayoutEffect(()=>{const me=je.current;if(!me)return;const Te=()=>me.querySelector(".page-popup__scroll");let q=null,he=null,ge=null;const Me=ve=>{const T=Te();if(!T)return;const ee=T.scrollHeight<=T.clientHeight;if(nt(ee?"center":"top"),ve&&!Pt.current){Pt.current=!0;try{_t(!0)}catch{}try{pt.disconnect()}catch{}}},Le=()=>{q!==null&&cancelAnimationFrame(q),q=requestAnimationFrame(()=>{he!==null&&clearTimeout(he),he=setTimeout(()=>Me(!0),60)})},Ve=()=>{ge!==null&&cancelAnimationFrame(ge),ge=requestAnimationFrame(()=>Me(!1))};Le(),window.addEventListener("resize",Ve);const pt=new MutationObserver(Le);pt.observe(me,{childList:!0,subtree:!0,attributes:!0});const yt=setTimeout(()=>{Pt.current||Me(!0)},400);return()=>{window.removeEventListener("resize",Ve),q!==null&&cancelAnimationFrame(q),he!==null&&clearTimeout(he),ge!==null&&cancelAnimationFrame(ge),clearTimeout(yt);try{pt.disconnect()}catch{}}},[je]);const ct=o.useCallback(me=>{je.current&&(je.current._childOnNext=me)},[]),Yt=o.useCallback(me=>{je.current&&(je.current._childOnResult=me)},[]),$t=o.useRef(new Map),Ke=(me,Te)=>`${me}\0${Te}`,K=o.useCallback((me,Te,q)=>{mt(he=>{const ge=he.answersByPage[me]||{},Me=ge[Te],Le=hl(q),Ve=hl(Me);if(Me&&Ve>Le)return he;const pt=fp(q,$t.current.get(Ke(me,Te)),Le);return{...he,answersByPage:{...he.answersByPage,[me]:{...ge,[Te]:pt}}}})},[mt]),Ce=o.useCallback((me,Te,q)=>{const he=ho(Se,ue),ge=mo(me,Te);K(he,ge,q)},[Se,ue,K]),He=o.useCallback((me,Te,q)=>{const he=ho(Se,ue),ge=mo(me,Te);K(he,ge,q),!q?.allowChange&&me?.autoAdvance!==!1&&mt(Me=>({...Me,stepIndex:Math.max(Me.stepIndex,Te+1)}))},[Se,ue,K,mt]),Ye=o.useCallback((me,Te)=>{const q=Je?.id||`children-page-${ue??0}`,he=typeof Te=="number"?Te:st??0,ge=`step-${he}`;K(q,ge,me),me?.allowChange||mt(Me=>({...Me,stepIndex:Math.max(Me.stepIndex,he+1)}))},[Je,ue,st,K,mt]),at=o.useCallback((me,Te)=>{const q=Je?.id||`children-page-${ue??0}`,he=`step-${typeof Te=="number"?Te:st??0}`;K(q,he,me)},[Je,ue,st,K]),dt=R?{currentPageIndex:ue??0,currentStepIndex:st??0,totalStepsInPage:wt.length,handleStepDone:Ye,handleStepChange:at}:null,jt=async()=>{const me=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:$,flowState:ft,answersByPage:ft.answersByPage})):null;return typeof I=="function"&&await Promise.resolve(I(me))||me},zt=async()=>{const me=Je?.id||`children-page-${ft.pageIndex}`,Te=ft.answersByPage[me]||{},q=P?(()=>{const Me={};let Le=0;return L.forEach(Ve=>{const pt=ft.answersByPage[Ve.id]||{},yt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let ve=0;ve<yt;ve+=1){const T=pt[`step-${ve}`];typeof T<"u"&&(Me[`step-${Le+ve}`]=T)}Le+=yt}),Me})():Te;if(typeof N=="function"){const Me=await Promise.resolve(N(q,{pageAnswers:Te,answersByPage:ft.answersByPage,pages:L,currentPageId:me}));return typeof I=="function"&&await Promise.resolve(I(Me))||Me}const he=Object.entries(Te).map(([Me,Le],Ve)=>({index:Ve,key:Me,payload:Le})),ge={results:he,answers:he,score:0};return typeof I=="function"&&await Promise.resolve(I(ge))||ge},wn=()=>{const me=++rt.current,Te=()=>me!==rt.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(W){const ge=jt();De(Kn);const Me=ge;Promise.resolve(Me).then(Le=>{Te()||De(Le||{isEmpty:!0})}).catch(Le=>{!Te()&&De({isEmpty:!0})});return}if(R){const ge=zt();De(Kn);const Me=ge;Promise.resolve(Me).then(Le=>{Te()||De(Le||{isEmpty:!0})}).catch(Le=>{!Te()&&De({isEmpty:!0})});return}const q=je.current&&je.current._childOnResult,he=ge=>{try{return ge?ge():void 0}catch{return}};if(typeof q=="function"){const ge=he(q);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}ge&&typeof ge.then!="function"?De(ge):De(ge&&typeof ge.then=="function"?Kn:{});const Me=()=>{Te()||De(Le=>Le===Kn?{}:Le)};Promise.resolve(ge).then(Le=>{Le&&!Te()?De(Le):Me()}).catch(Le=>{Me()});return}if(typeof I=="function"){const ge=he(I);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}ge&&typeof ge.then!="function"?De(ge):De(ge&&typeof ge.then=="function"?Kn:{});const Me=()=>{Te()||De(Le=>Le===Kn?{}:Le)};Promise.resolve(ge).then(Le=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:In&&In.tagName.toUpperCase()==="SCRIPT"&&In.src||new URL("components.cjs.js",document.baseURI).href}catch{}Le&&!Te()?De(Le):Me()}).catch(Le=>{console.error("viewResults external handler failed",Le),Me()});return}},an=()=>{if(W){if(typeof ue=="number"&&typeof Ot=="number"&&ue<Ot-1){mt(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return wn()}if(R){const Te=wt.length;if(typeof st=="number"&&st<Te-1){mt(q=>({...q,stepIndex:q.stepIndex+1}));return}if(typeof ue=="number"&&typeof Ot=="number"&&ue<Ot-1){mt(q=>({...q,pageIndex:q.pageIndex+1,stepIndex:0}));return}return wn()}if(typeof b=="function"){try{b()}catch{}return}const me=je.current&&je.current._childOnNext;if(typeof me=="function"){try{me()}catch{}return}},Bn=W?se.title||se.label||g||M("common.popup","\uD31D\uC5C5"):r||w||(Array.isArray(s)?s[s.length-1]:void 0)||g||M("common.popup","\uD31D\uC5C5"),dn=g||Bn,Xt=W?se.title??se.label??Bn:r??w??Bn,on=(me,Te)=>{const q=ho(Se,ue),he=mo(me,Te),ge=ft.answersByPage[q]?.[he],Me=lB(me,{page:Se,pageIndex:ue,step:me,stepIndex:Te,storedPayload:ge,answersByPage:ft.answersByPage,flowState:ft}),Le={key:he,index:Te,stepIndex:st,isLast:Te===Pe.length-1};switch(me?.type){case"listen":return n.jsx(cl,{...Le,...Me,onDone:Ve=>He(me,Te,Ve)});case"confirm":return n.jsx(il,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});case"confirmWithText":return n.jsx(ul,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});case"orderList":return n.jsx(dl,{...Le,...Me,onDone:Ve=>He(me,Te,Ve),onChange:Ve=>Ce(me,Te,Ve)});default:return null}},pn=o.useRef(void 0);o.useEffect(()=>{const me=pn.current;if(pn.current=ue,me===void 0||me===ue||!no())return;const Te=je.current;if(!Te)return;const q=document.activeElement;if(!(!q||q===document.body||!Te.contains(q)||q.disabled===!0))return;const he=Te.querySelector(`.training-steps ${Sn.split(", ").join(", .training-steps ")}`)??Array.from(Te.querySelectorAll(Sn)).find(ge=>!ge.closest('[aria-hidden="true"]'));try{he?.focus()}catch{}},[ue]);const Qt=W?$.length>0?n.jsx("div",{className:"training-steps",children:Pe.map((me,Te)=>on(me,Te))},`replay-${tt}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||M("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Lt=R?n.jsxs(gp.Provider,{value:dt,children:[Je?.pageTop?n.jsx("div",{className:"training-page-top",children:Je.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((me,Te)=>{const q=me;return o.cloneElement(q,{...q.props,_stepIndex:Te,_totalSteps:wt.length,_stepKey:`step-${Te}`,_pageIndex:ue})})},`replay-${tt}`),Je?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Je.pageBottom}):null]}):null,Dt=o.useRef(-1),Wt=o.useCallback(()=>{if(!B)return;const me=Qe,{results:Te,correct:q,total:he}=Cl(Qe),ge={correct:q,total:he,attempt:Ie.current.length+1,previousAttempts:[...Ie.current]};if(Dt.current===it.current)return ge;Dt.current=it.current,ry({items:hy(Te),category:Np.has(B)?"sentence":"word",trainingType:B,entryPoint:k??"sentence",itemRef:A??null,correct:q,total:he,score:typeof me?.score=="number"?me.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:E??null});try{v?.(ge)}catch{}return ge},[B,k,E,A,Qe,v]);o.useEffect(()=>{!Qe||Qe===Kn||Qe?.isEmpty||(Cl(Qe).total??0)>0&&Wt()},[Qe,Wt]);const Rt=o.useCallback(()=>{const me=Wt();bt(),ht(()=>{typeof f=="function"&&f(me),typeof m=="function"&&m()})},[f,m,Wt,De,ht]),Pn=o.useCallback(()=>It(""),[It]),En=o.useCallback(()=>{ht(()=>{typeof m=="function"&&m()})},[m,ht]),ar=n.jsxs("div",{className:`page-popup${We?" page-popup--closing":""}${O?" page-popup--inline":""}${O&&z!=null?" page-popup--has-height":""}`,role:O?"region":"dialog","aria-modal":O?void 0:"true","aria-label":dn,style:O&&z!=null?{"--page-popup-inline-height":typeof z=="number"?`${z}px`:z}:void 0,children:[n.jsxs("div",{ref:je,className:`page-popup__panel ${Gt?"":"page-popup__panel--measuring"} ${qe==="center"?"page-popup__panel--center":qe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(pp,{title:Xt,subtitle:W?se.subtitle||se.label:Array.isArray(s)?s.join(" / "):void 0,desc:W?void 0:a,depth:W?se.depth:s,icon:W?se.icon:l,wrapperStyle:W?se.wrapperStyle:i,iconTooltip:W?se.iconTooltip:u,progressMax:Ot,progressIndex:ue,pageIndex:ue,pageCount:Ot,onBack:O?void 0:En,onClose:O?void 0:En}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${qe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:R?Lt:W?Qt:typeof x=="function"?x({registerOnNext:ct,registerOnResult:Yt,panelRef:je,setResultOverlay:De}):x})}),n.jsx(dp,{onSettings:_,onNext:an,onResult:wn,useNoiseSettingBtn:!!(W?se.useNoiseSetting??!0:y),stepIndex:st,stepCount:Ge,pageIndex:ue,pageCount:Ot,resultOpen:!!(Qe&&!Qe.isEmpty),hideNoiseRows:S})]}),Qe&&!Qe.isEmpty&&(D??cB)({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!==Kn){const{correct:me,total:Te}=Cl(Qe);Ie.current.push({correct:me,total:Te})}if(bt(),Ct(me=>me+1),W){if(mt(fo()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(R){mt(fo());return}try{const me=je.current&&je.current._childOnResult;typeof me=="function"&&me({replay:!0})}catch{}},onClose:Rt,pending:Qe===Kn}),Qe?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:Rt,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Lr,{message:Nt,position:"top",onClose:Pn})]}),$n=n.jsx(nl.Provider,{value:Oe,children:ar});return O?$n:typeof document<"u"&&document.body?bn.createPortal($n,document.body):$n}const rr=dB;rr.Page=co,rr.ListenStep=bp,rr.ConfirmStep=yp,rr.ConfirmWithTextStep=vp,rr.OrderListStep=xp,rr.CardStep=_p,rr.CardOrderStep=Y8;function pB(e=[]){const t=o.useRef(null),r=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const f=Math.min(i.length,Math.ceil((m+c)/(u+c)));f<=1||(h.style.gridColumn=`span ${f}`,h.setAttribute("data-wide",""))}},[]),a=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))r(l)},[r]);return o.useLayoutEffect(()=>{a();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>a());return l.observe(s),()=>l.disconnect()},[a,...e]),t}function hB({label:e,homonum:t}){const r=Br()?.(e,t)??"",{imgRef:a,loading:s,hasImage:l,onLoad:i,onError:u}=Os(r);return l?n.jsxs("div",{className:ce("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ce("word-image-tooltip__spinner")}),n.jsx("img",{ref:a,src:r,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:ce("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Ep({words:e,anchorRect:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!r.current)return;const{offsetWidth:l,offsetHeight:i}=r.current,u=window.innerWidth,c=window.innerHeight,p=8,h=t.top,d=c-t.bottom,m=h>=i+p*2||h>d,f=(_,y)=>Math.min(Math.max(p,_),Math.max(p,y)),v=f(t.left+t.width/2-l/2,u-l-p),b=f(m?t.top-i-p:t.bottom+p,c-i-p);s({left:v,top:b})},[t]),!t||e.length===0?null:bn.createPortal(n.jsx("div",{ref:r,className:ce("word-image-tooltip"),style:{visibility:a?"visible":"hidden",left:a?.left??0,top:a?.top??-9999},children:n.jsx("div",{className:ce("word-image-tooltip__cells"),children:e.map(l=>n.jsx(hB,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function mB({titleIcon:e,resultCount:t,resultUnit:r,searchQuery:a,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:f,showEmptyText:v=!0,sectionType:b="page",disc:_}){const y=kn()??gn,{t:x,i18n:g}=Ee.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:N,openAt:C,close:B}=Ha(),[k,E]=o.useState(null),A=o.useCallback(()=>{B(),E(null)},[B]);wv(A,!!k);const D=(a??"").trim(),j=/^[^,[\]\s]+$/.test(D)?D:"",S=j.length>0,O=a===void 0&&t===void 0,z=S?"match":O?"original":"ganada",[G,M]=o.useState(()=>z),[I,W]=o.useState("50"),[pe,se]=o.useState(1),[$,V]=o.useState(S);$!==S&&(V(S),M(z));const ne=G==="match"&&!S||G==="original"&&!O?z:G,te=o.useMemo(()=>[...S?[{value:"match",label:x("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...O?[{value:"original",label:x("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:x("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:x("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:x("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:x("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:x("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:x("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[x,S,O]),P=o.useMemo(()=>["10","25","50","100"].map(ye=>({value:ye,label:x("wordSearch.pageSize",{count:Number(ye),defaultValue:`${ye}\uAC1C\uC529 \uBCF4\uAE30`})})),[x]),L=ye=>ye.words?.[0],R=o.useMemo(()=>{const ye=[...j].length,_e=Lb(j),Ae=new Map;return Oe=>{let je=Ae.get(Oe);return je===void 0&&(je=_e((Oe.words?.[0]?.label??"").slice(0,ye))?0:1,Ae.set(Oe,je)),je}},[j]),U=o.useCallback((ye,_e)=>{const Ae=tt=>L(tt)?.label??"",Oe=tt=>L(tt)?.syllables??[...Ae(tt)].length,je=tt=>(tt.words??[]).reduce((Ct,Ie)=>{const qe=parseInt(Ie.grade??"",10);return Number.isFinite(qe)&&qe<Ct?qe:Ct},999);switch(ne){case"match":return R(ye)-R(_e)||xn(Ae(ye),Ae(_e));case"ganada":return xn(Ae(ye),Ae(_e));case"ganada_desc":return xn(Ae(_e),Ae(ye));case"syllable":return Oe(ye)-Oe(_e)||xn(Ae(ye),Ae(_e));case"syllable_desc":return Oe(_e)-Oe(ye)||xn(Ae(ye),Ae(_e));case"grade":return je(ye)-je(_e)||xn(Ae(ye),Ae(_e));case"grade_desc":return je(_e)-je(ye)||xn(Ae(ye),Ae(_e));default:return 0}},[ne,R]),Z=o.useMemo(()=>s.slice().sort(U),[s,U]),X=Number(I)||10,ae=o.useMemo(()=>(l??[]).flatMap(ye=>ye.items.slice().sort(U).map(_e=>({item:_e,label:ye.label}))),[l,U]),Y=l?ae.length:Z.length,xe=Math.max(1,Math.ceil(Y/X)),ie=Math.min(pe,xe),J=o.useMemo(()=>Z.slice((ie-1)*X,ie*X),[Z,ie,X]),F=o.useId(),Q=o.useMemo(()=>{if(!l)return null;const ye=ae.slice((ie-1)*X,ie*X),_e=new Map;for(const{item:Ae,label:Oe}of ye)_e.has(Oe)||_e.set(Oe,[]),_e.get(Oe).push(Ae);return[..._e.entries()].map(([Ae,Oe])=>({label:Ae,items:Oe}))},[l,ae,ie,X]);o.useEffect(()=>{se(1)},[G,I,Y,a]);const H=Y>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(Nn,{size:y,options:te,value:ne,onChange:M,ariaLabel:x("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(Nn,{size:y,options:P,value:I,onChange:W,ariaLabel:x("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Ns,{page:ie,totalPages:xe,onChange:se})]}):void 0,le=ye=>{u&&u(ye)},re=t!==void 0&&r?n.jsxs(n.Fragment,{children:[x("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),x("wordSearch.resultTitleSuffix",{unit:w?Ub(r):r})]}):void 0,de=t!==void 0&&t>0&&c!==void 0&&r?x("wordSearch.resultDisc",{unit:w?Kb(r):r,max:c,selected:i.length}):void 0,Be=_??de,ke=l?l.length===0:s.length===0,Ne=pB([l,J,G,X,pe]),Re=ke&&!v&&!f;return n.jsxs(Rr,{type:b,className:we("word-search-result-block",m),children:[n.jsxs("div",{ref:Ne,className:we("word-search-result-block__inner",Re&&"word-search-result-block__inner--head-only"),children:[(re||H||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(lt,{icon:e,className:"word-search-result-block__head-icon"}),re&&n.jsx("span",{className:"word-search-result-block__title h3",children:re})]}),H&&n.jsx("div",{className:"word-search-result-block__head-actions",children:H}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),ke&&(v||f)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[v&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:x("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),f&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:f})]}),l?(Q??[]).map(ye=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${F}-${ye.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${F}-${ye.label}`,children:ye.label}),n.jsx("div",{className:"word-search-result-block__items",children:ye.items.map(_e=>{const Ae=i.includes(_e.id);return n.jsx("div",{onMouseEnter:Oe=>{C(Oe.currentTarget),E(_e.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(_e.words??[]).map(Oe=>Oe.label),subLabel:(_e.words??[]).some(Oe=>Oe.subLabel)?(_e.words??[]).map(Oe=>Oe.subLabel):void 0,selected:Ae,onClick:()=>le(_e.id),minWidth:200})},_e.id)})})]},ye.label)):n.jsx("div",{className:"word-search-result-block__items",children:J.map(ye=>{const _e=i.includes(ye.id);return n.jsx("div",{onMouseEnter:Ae=>{C(Ae.currentTarget),E(ye.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(Ae=>Ae.label),subLabel:(ye.words??[]).some(Ae=>Ae.subLabel)?(ye.words??[]).map(Ae=>Ae.subLabel):void 0,selected:_e,onClick:()=>le(ye.id),minWidth:200})},ye.id)})}),k&&N&&n.jsx(Ep,{words:k,anchorRect:N})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:x("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function fB(e,t){return t.map(r=>{const a=typeof r=="string"?r:r.label,s=typeof r=="string"?void 0:r.displayLabel;return{label:a,value:e[a]??"",displayLabel:s}})}function CB({sections:e,selectedList:t,count:r,onCountChange:a,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:f,showInfoButton:v=!0,onClearPhoneme:b,onSearch:_,onSearchEmpty:y,searchDisabled:x=!1,searchLabel:g,searchChecking:w=!1,pairMode:N=!1,sectionType:C="page",beforeSearchContent:B,beforeContent:k,afterContent:E,hideCountControl:A=!1,ordinal:D=!1}){const{t:j}=Ee.useTranslation(),S=o.useMemo(()=>j("wordPairs.infoNotes",{returnObjects:!0}),[j]),O=o.useMemo(()=>Array.from({length:s-l+1},(P,L)=>{const R=l+L;return{key:String(R),label:j("wordPairs.count",{n:R})}}),[j,s,l]),z=o.useMemo(()=>j("wordPairs.ordinals",{returnObjects:!0}),[j]),G=o.useCallback(P=>D?j("wordPairs.phonemeOrdinalLabel",{ordinal:z[P-1]??P}):r===1?j("wordPairs.phonemeSingleLabel","\uC74C\uC808"):j("wordPairs.phonemeN",{n:P}),[D,z,r,j]),M=o.useCallback(P=>D?j("wordPairs.phonemeContrastOrdinalLabel",{ordinal:z[P-1]??P}):r===1?j("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):j("wordPairs.phonemeContrast",{n:P}),[D,z,r,j]),I=o.useCallback((P,L)=>L?n.jsxs(n.Fragment,{children:[P,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):P,[]),{anchorRect:W,toggleAt:pe,close:se}=Ha(),$=o.useCallback(P=>a(Number(P)),[a]),V=fn("(max-width: 767px)"),ne=o.useCallback(P=>fB(P,e).map(({label:L,value:R,displayLabel:U})=>{const Z=!!R&&R!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",R?"":"phoneme-select-block__cell-jamo-part--empty",Z?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${R==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:R==="\uC5C6\uC74C"?"x":R||p}),Z&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:U??L})]},L)}),[e,p]),te=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:V?"dot":void 0,icon:"info",label:V?void 0:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:W?"is-selected":void 0,"aria-expanded":!!W,"aria-haspopup":"dialog",onClick:P=>pe(P.currentTarget)})}),W&&n.jsx(Qn,{title:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:S,anchorRect:W,onClose:se})]});return n.jsxs(Rr,{type:C,title:d,icon:m,disc:f,action:v?te:void 0,className:we("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(An,{options:O,value:String(r),onChange:$,size:40,ariaLabel:j("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*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:ne(R)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:G(L+1)})]},L)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:j("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*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:ne(R)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(L+1)})]},L)})})]}):t.map((P,L)=>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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:G(L+1)})]},L))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*2]??{};return n.jsx(Gn,{title:I(G(L+1),L===0),sections:u?u(R,L*2):i,selected:R,onSelect:c?.(L*2),align:"newline"},L)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,L)=>{const R=t[L*2+1]??{};return n.jsx(Gn,{title:M(L+1),sections:u?u(R,L*2+1):i,selected:R,onSelect:c?.(L*2+1),align:"newline"},L)})})]}):t.map((P,L)=>n.jsx(Gn,{title:I(G(L+1),L===0),sections:u?u(P,L):i,selected:P,onSelect:c?.(L),align:"newline"},L))})}),B&&n.jsx("div",{className:"phoneme-select-block__before-search",children:B}),(b||_||w)&&(()=>{const P=t.every(L=>{const R=Sb(L);return Object.entries(R).every(([U,Z])=>!Z||U==="coda"&&Z===wi)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:P?y:void 0,children:[b&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:j("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:P,onClick:P?void 0:b}),_?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:w?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:g??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:P||x||w,onDisabledClick:w?()=>{}:void 0,"aria-busy":w||void 0,onClick:_}):w?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:g??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function gB({title:e,sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=Ee.useTranslation();return n.jsx(Gn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function bB({title:e,headerAction:t,sections:r,selected:a,onSelect:s,collapsible:l,defaultCollapsed:i,collapsed:u,onCollapsedChange:c,headerSummary:p,className:h}){const{t:d}=Ee.useTranslation();return r.length===0?null:n.jsx(Gn,{className:h,title:e??d("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:r,selected:a,onSelect:s,collapsible:l,defaultCollapsed:i,collapsed:u,onCollapsedChange:c,headerSummary:p,align:"newline"})}function yB({title:e,mode:t,onModeChange:r,matchMode:a,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=Ee.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=_=>h("wordPairs.count",{n:_}),f=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(ca,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(ca,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(ca,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],v={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:a==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},b=(_,y)=>{y===d.searchMode?r(_===d.explicit?"explicit":_===d.pick?"pick":"include"):y===d.phonemeOrder?s(_===d.orderMatch?"ordered":"unordered"):y===d.count?i(_===m(2)?2:1):y===d.inputMode&&c(_===d.pronInput?"phoneme":"word")};return n.jsx(Gn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:f,selected:v,onSelect:b,align:"inline"})}function vB(e){const{title:t,items:r,columns:a,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:f,onClose:v,pageSizeOptions:b=[10,25,50,100],initialPageSize:_,emptyText:y,noMatchText:x,countLabel:g,topContent:w,className:N=""}=e,{t:C}=Ee.useTranslation(),B=u??C("common.search","\uAC80\uC0C9"),k=y??C("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=x??C("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,D]=o.useState(""),[j,S]=o.useState(p??a[0]?.key??""),[O,z]=o.useState(h),[G,M]=o.useState(String(_??b[0]??10)),[I,W]=o.useState(1);o.useEffect(()=>{W(1)},[A,G]);const pe=c!==null,se=o.useCallback((X,ae)=>{if(!ae)return!0;const Y=ae.toLowerCase();return a.some(xe=>{const ie=X[xe.key];return ie==null?!1:String(ie).toLowerCase().includes(Y)})},[a]),$=c??se,V=o.useMemo(()=>{const X=pe?r.filter(ae=>$(ae,A)):r;return j?[...X].sort((ae,Y)=>{const xe=ae[j],ie=Y[j];return xe===ie?0:Wa(xe,ie,O)}):X},[r,A,j,O,pe,$]),ne=Math.max(1,Math.ceil(V.length/Number(G)));I>ne&&W(ne);const te=Math.min(I,ne),P=V.slice((te-1)*Number(G),te*Number(G)),L=o.useCallback(X=>{j===X?z(ae=>!ae):(S(X),z(!0)),W(1)},[j]),R=o.useMemo(()=>{if(typeof g=="function"){const X=V.length,ae=g(X);if(typeof ae=="string"){const Y=ae.lastIndexOf(String(X));if(Y>=0)return{prefix:ae.slice(0,Y),suffix:ae.slice(Y+String(X).length)}}return{label:ae}}if(typeof g=="string"&&g.includes("{n}")){const[X,ae]=g.split("{n}");return{prefix:X,suffix:ae}}return{prefix:C("common.totalCountPrefix","\uCD1D "),suffix:C("common.totalCountSuffix","\uAC1C")}},[g,V.length,C]),U=o.useMemo(()=>a.map(X=>({label:X.label,onClick:X.sortable!==!1?()=>L(X.key):void 0,className:X.className,sortDir:X.sortable!==!1&&j===X.key?O?"asc":"desc":null})),[a,j,O,L]),Z=Rv(b);return n.jsxs(Vn,{className:`popup-list ${N}`,title:t,onClose:v,children:[w,"label"in R&&n.jsx("p",{className:"toolbar__count body-1",children:R.label}),n.jsx(Es,{count:"label"in R?void 0:{value:V.length,prefix:R.prefix,suffix:R.suffix},search:pe?{value:A,onChange:D,placeholder:B}:void 0,pageSize:{options:Z,value:G,onChange:M},pagination:{page:te,total:ne,onChange:W}}),n.jsx(Fs,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:U,items:P,onRowClick:f,renderRow:X=>{const ae=m!=null?X.id!=null&&m.has(X.id):d!=null&&X.id===d;return a.map(Y=>({content:Y.render?Y.render(X):X[Y.key]??"",className:we(Y.className,ae&&"popup-list__row--selected")}))},empty:pe&&A!==""&&r.length>0?E:k})]})}function jp(e,t,r={}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(Ya,{title:r.title??a("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:r.message??a("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:r.confirmLabel??a("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function xB(e,t,r={}){const a=JSON.stringify(e),[s,l]=o.useState(a),i=a!==s,u=jp(i,t,r),c=o.useRef(a);c.current=a;const p=o.useCallback(()=>l(c.current),[]);return{...u,isDirty:i,rebase:p}}function _B({onApply:e,onCancel:t}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async v=>{const b=a.trim();if(b){i(!0),c(null);try{await e(b),v()}catch(_){c(zo(_)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[a,e]),m=o.useCallback((v,b)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&d(b)},[d]),f=v=>{s(v.target.value),c(null)};return n.jsx(Vn,{className:"coupon-input-popup",title:r("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),width:"small",onClose:t,closeDisabled:l,buttons:[{label:r("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:v})=>v()},{label:r("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!a.trim()||l,onClick:({closeWithAnimation:v})=>{d(v)}}],children:({closeWithAnimation:v})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":r("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:r("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:a,onChange:f,onKeyDown:b=>m(b,v),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const Dp=["var(--color-main)","var(--color-sub)"],wB=2e3;function BB(e,t){if(!t.startsWith("var("))return t;try{const r=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(r).trim()||null}catch{return null}}function gl({active:e=!1,count:t=40,duration:r=2e3,strength:a=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const b=Math.floor(t/2),_=t-b,y=(x,g)=>Array.from({length:x}).map((w,N)=>{const C=6+Math.random()*12,B=Math.round(Math.min(18,C*Math.min(1.5,1+a*.4))),k=Dp[Math.floor(Math.random()*Dp.length)],E=Math.random()*300,A=(360+Math.random()*260)*a*1.2,D=(g==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,j=Math.cos(D)*A,S=Math.sin(D)*A*1.35,O=Math.random()*720-360,z=(1200+Math.random()*3e3)*Math.min(1.6,1+a*.3),G=Math.random()>.7?"50%":"3px";return{id:`${g}-${N}`,side:g,size:B,color:k,delay:E,vx:j,vy:S,angularVel:O,life:z,borderRadius:G}});return[...y(b,"left"),...y(_,"right")]},[t,a]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),f=()=>{if(typeof document>"u")return null;let b=document.querySelector("[data-ihab-effect-root]");return b||(b=document.createElement("div"),b.className="app-effect",b.dataset.ihabEffectRoot="",b.style.position="fixed",b.style.inset="0",b.style.pointerEvents="none",b.style.zIndex="99998",document.body.appendChild(b)),b};if(typeof document<"u"&&m.current==null&&(m.current=f()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const se=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(se)}const b=1200,_=performance.now(),y=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,x=Math.max(60,(window.innerHeight||800)*.05),g=se=>Math.max(40,(se||window.innerWidth)*.02),w=y?.width||window.innerWidth||375,N=y?.height||window.innerHeight||812,C=se=>{const $=[...se].sort((V,ne)=>V-ne);return $[Math.floor($.length/2)]||1},B=C(i.map(se=>Math.abs(se.vy))),k=C(i.map(se=>Math.abs(se.vx))),E=Math.sqrt(2*b*(N*.72+x))/B,A=B*E/b,D=w*.5/(k*A),j=(se,$,V)=>Math.min(V,Math.max($,se)),S=j(E,.8,2.4),O=j(D,.7,2.2),z=r>0?r/wB:1,G=i.map(se=>({...se,life:se.life*z,vx:se.vx*O,vy:se.vy*S,startTime:_+se.delay,ended:!1})),M=y?{x:y.left-g(y.width),y:y.top+y.height+x}:{x:-g(window.innerWidth),y:window.innerHeight+x},I=y?{x:y.left+y.width+g(y.width),y:y.top+y.height+x}:{x:window.innerWidth+g(window.innerWidth),y:window.innerHeight+x},W=se=>{let $=!1;for(const V of G){const ne=c.current[V.id];if(!ne||!ne)continue;if(se<V.startTime){ne.style.display="none",$=!0;continue}if(!V._inited){const xe=V.side==="left"?M.x:I.x,ie=V.side==="left"?M.y:I.y;ne.style.left=`${xe}px`,ne.style.top=`${ie}px`,ne.style.transform="translate3d(0px, 0px, 0)",ne.style.display="block",ne.style.zIndex="100000",typeof V.color=="string"&&V.color.startsWith("var(")&&(ne.style.background=BB(ne,V.color)??"#FF0060"),V._inited=!0}const te=(se-V.startTime)/1e3;if(te<0)continue;const P=V.life/1e3;if(te>=P){ne.style.opacity="0",ne.style.display="none",V.ended=!0;continue}$=!0;const L=V.side==="left"?M.x:I.x,R=V.side==="left"?M.y:I.y,U=L+V.vx*te,Z=R+V.vy*te+.5*b*te*te,X=(V.angularVel||0)*te,ae=U-L,Y=Z-R;ne.style.transform=`translate3d(${ae}px, ${Y}px, 0) rotate(${X}deg)`,ne.style.opacity=`${Math.max(0,1-te/P)}`}$?p.current=requestAnimationFrame(W):h.current?.()};p.current=requestAnimationFrame(W);const pe=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const se=document.createElement("div");se.className="party-container",se.style.position="fixed",se.style.inset="0",se.style.pointerEvents="none",se.style.overflow="visible",se.style.zIndex="2147483647";for(const $ of i){const V=document.createElement("span");V.className=`confetti confetti--${$.side}`,V.setAttribute("aria-hidden","true"),V.style.display="none",V.style.position="fixed",V.style.left="0px",V.style.top="0px",V.style.width=`${$.size}px`,V.style.height=`${Math.max(4,$.size*.6)}px`,V.style.background=$.color,V.style.borderRadius=$.borderRadius,V.style.transform="translate3d(0,0,0)",V.style.opacity="0",se.appendChild(V),c.current[$.id]=V}(document.body||m.current).appendChild(se),d.current=se}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(pe),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,r,l,i]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:u,children:i.map(b=>n.jsx("span",{"aria-hidden":!0,ref:_=>{c.current[b.id]=_},className:`confetti confetti--${b.side}`,style:{width:`${b.size}px`,height:`${Math.max(4,b.size*.6)}px`,background:b.color,borderRadius:b.borderRadius}},`${b.id}-${l}`))});return typeof document<"u"?bn.createPortal(v,m.current||document.body):v}const bl=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function kB({trigger:e=0,active:t=!1}){const[r,a]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};a(c=>({n:(c?.n??0)+1,count:bl(u.count),strength:bl(u.strength),duration:bl(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>a(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(gl,{active:t,trigger:e}),r&&n.jsx(gl,{active:!0,trigger:r.n,count:r.count,strength:r.strength,duration:r.duration,onComplete:s})]})}function AB({title:e,sub:t,rightAction:r,titleAction:a,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=Ee.useTranslation();uv(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(rn,{label:s,size:"small",variant:l,fill:"outline"})}),a?n.jsx("div",{className:"page-title__title-action",children:a}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),r?n.jsx("div",{className:"page-title__action",children:r}):null]})}function NB(e){return e??""}const Sp=o.createContext({words:[],loading:!1});function EB(){return o.useContext(Sp)}function jB({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,r,a,s,l,i,u,c]);return n.jsx(Sp.Provider,{value:h,children:p})}function DB({items:e,actions:t,columns:r,flat:a=!1,className:s,style:l}){const i=r??e.length;return n.jsx("section",{className:we("summary-strip",a&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const SB=(e,t)=>`${e} / ${t}`;function TB({blocks:e,sectionTitles:t,logo:r,footer:a,pageLabel:s=SB,pageWidth:l,pageHeight:i,margin:u,className:c,style:p,page:h,zoom:d,layout:m="stack",onPageCountChange:f}){const{t:v}=Ee.useTranslation(),b=o.useRef(null),_=o.useRef(null),y=o.useRef(null),x=o.useRef(null),[g,w]=o.useState(null),[N,C]=o.useState(!1);o.useEffect(()=>{const $=b.current;if(!$)return;const V=()=>C($.scrollWidth>$.clientWidth+1);if(V(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(V);return ne.observe($),()=>ne.disconnect()},[g]);const B=e.map($=>`${$.id}\0${$.section??""}\0${$.group??""}`).join(""),k=g&&g.shape===B?g.pages:null,E=k?k.length:0,A=o.useRef(f);A.current=f,o.useEffect(()=>{E>0&&A.current?.(E)},[E]);const D=h!=null&&E>0?Math.min(E,Math.max(1,Math.floor(h)))-1:null,[j,S]=o.useState(0);o.useEffect(()=>{const $=x.current;if(!$||typeof ResizeObserver>"u")return;const V=new ResizeObserver(()=>S($.offsetHeight));return V.observe($),()=>V.disconnect()},[]);const[O,z]=o.useState(0);o.useEffect(()=>{const $=_.current;if(!$||typeof ResizeObserver>"u")return;let V=null;const ne=typeof requestAnimationFrame=="function"?L=>requestAnimationFrame(L):L=>setTimeout(L,16),te=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:L=>clearTimeout(L),P=new ResizeObserver(()=>{V==null&&(V=ne(()=>{V=null,z(L=>L+1)}))});return Array.from($.children).forEach(L=>P.observe(L)),()=>{P.disconnect(),V!=null&&te(V)}},[B]),o.useLayoutEffect(()=>{const $=_.current,V=x.current;if(!$||!V)return;const ne=Y=>Y.getBoundingClientRect().height||Y.offsetHeight,te=new Map;y.current?.querySelectorAll("[data-chrome-section]").forEach(Y=>{te.set(Y.dataset.chromeSection??"",ne(Y))});const P=Y=>ne(V)-(te.get(Y??"")??0),L=Array.from($.children).map(Y=>ne(Y)),R=[];e.forEach((Y,xe)=>{const ie=R[R.length-1],J=ie?e[ie[0]]:void 0;J&&Y.group!=null&&J.group===Y.group&&J.section===Y.section?ie.push(xe):R.push([xe])});const U=[];let Z=[],X=0;const ae=()=>{Z.length&&U.push(Z),Z=[],X=0};R.forEach(Y=>{const xe=Y.reduce((J,F)=>J+L[F],0),ie=P(e[Y[0]].section);Z.length&&e[Z[0]].section!==e[Y[0]].section&&ae(),xe>ie?Y.forEach(J=>{Z.length&&X+L[J]>ie+.01&&ae(),Z.push(J),X+=L[J]}):(Z.length&&X+xe>ie+.01&&ae(),Y.forEach(J=>Z.push(J)),X+=xe)}),ae(),w(Y=>Y&&Y.shape===B&&JSON.stringify(Y.pages)===JSON.stringify(U)?Y:{shape:B,pages:U})},[B,j,l,i,u,O]);const G=bs,M=G,I=a??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:M,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),W=($,V,ne)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:ne!=null&&t?.[ne]||null}),r]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:I}),n.jsx("span",{className:"report-doc__page-no",children:s($,V)})]})}),pe=Array.from(new Set(e.map($=>$.section??""))),se={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d!=null&&d>0&&d!==1?{"--report-zoom":String(d)}:null,...p};return n.jsxs("div",{ref:b,className:we("report-doc",m==="spread"&&"report-doc--spread",c),style:se,tabIndex:N?0:void 0,role:N?"group":void 0,"aria-label":N?v("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:x,className:"report-doc__ruler"}),n.jsx("div",{ref:y,children:pe.map($=>{const V=W(1,1,$||void 0);return n.jsxs("div",{"data-chrome-section":$,children:[V.header,V.footer]},$)})}),n.jsx("div",{ref:_,className:"report-doc__measure-blocks",children:e.map($=>n.jsx("div",{children:$.content},$.id))})]}),k&&n.jsx("div",{className:"report-doc__pages",children:k.map(($,V)=>{const{header:ne,footer:te}=W(V+1,k.length,e[$[0]].section);return n.jsxs("section",{className:we("report-doc__page",D!=null&&D!==V&&"report-doc__page--off-screen"),children:[ne,$.map(P=>n.jsx("div",{children:e[P].content},e[P].id)),te]},V)})})]})}function MB({title:e,fields:t,columns:r=4,className:a,style:s}){return n.jsxs("div",{className:we("report-info",a),style:{"--report-info-cols":String(r),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const vr=new Map;let Co=null;const $B=12;function LB(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const r=window.getComputedStyle(t);if(r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.perspective&&r.perspective!=="none"||/paint|layout|strict|content/.test(r.contain||""))return t}return document}function go(){const e=new Map;for(const t of vr.keys()){if(!t.isConnected)continue;const r=LB(t),a=e.get(r)??[];a.push(t),e.set(r,a)}for(const t of e.values()){t.sort((a,s)=>a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let r=0;for(const a of t){r>0?a.style.setProperty("--update-alert-stack-offset",`${r}px`):a.style.removeProperty("--update-alert-stack-offset");const s=a.getBoundingClientRect().height;s>0&&(r+=s+$B)}}}function RB(e){return typeof window>"u"?()=>{}:(vr.set(e,(vr.get(e)??0)+1),vr.get(e)===1&&typeof ResizeObserver<"u"&&(Co??(Co=new ResizeObserver(()=>go())),Co.observe(e)),go(),()=>{const t=(vr.get(e)??1)-1;if(t>0){vr.set(e,t),go();return}vr.delete(e),Co?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),go()})}function PB({title:e,message:t,actionLabel:r,onAction:a,icon:s,onClose:l,className:i=""}){const{t:u}=Ee.useTranslation(),c=r??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,f=m?RB(m):null;return()=>{f?.(),h.current&&d&&d.contains(document.activeElement)&&Pa(d)}},[]),n.jsxs("div",{ref:p,className:we("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Tl,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),a&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:a,children:c})]})}function FB({title:e,titleLevel:t=3,category:r,categoryVariant:a="main",description:s,topActions:l,actions:i,children:u,footerLeft:c,footerRight:p,ariaLabel:h,onClick:d,draggable:m,onDragStart:f,onDragEnd:v,className:b}){const _=t?`h${t}`:"div",{t:y}=Ee.useTranslation(),[x,g]=o.useState(null),w=o.useCallback(()=>g(null),[]),N=o.useCallback(D=>{const j=D.currentTarget.getBoundingClientRect();g(S=>S?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})},[]),C=(i??[]).filter(Boolean),B=(C.length===1?n.jsx(fe,{htmlType:"button",type:"dot",size:40,icon:C[0].icon,ariaLabel:C[0].label,showTooltipInfo:C[0].label,selected:C[0].selected,disabled:C[0].disabled,variant:C[0].variant??"default",onClick:C[0].onClick}):C.length>1?n.jsx(fe,{htmlType:"button",type:"dot",size:40,icon:"ellipsis",ariaLabel:y("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:y("common.more","\uB354\uBCF4\uAE30"),variant:"transparent-lightGray",useBorder:!1,"aria-haspopup":"menu","aria-expanded":!!x,onClick:N}):null)??l,k=c!=null||p!=null,E=u!=null&&u!==!1,A=o.useCallback(D=>{d&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),d())},[d]);return n.jsxs("div",{className:we("training-card",d?"training-card--clickable":"",b),onClick:d,onKeyDown:d?A:void 0,role:d?"button":void 0,"aria-label":d?h??(typeof e=="string"?e:void 0):void 0,tabIndex:d?0:void 0,draggable:m,onDragStart:f,onDragEnd:v,children:[n.jsxs("div",{className:"training-card__header",children:[r!=null?n.jsx("p",{className:we("training-card__category","caption-1",a==="sub"&&"training-card__category--sub"),children:r}):n.jsx("p",{className:"training-card__category caption-1","aria-hidden":"true",children:" "}),n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(_,{className:"training-card__title h4",children:e}):e,B!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:D=>D.stopPropagation(),children:B})]}),s!=null?typeof s=="string"?n.jsx("p",{className:"training-card__description body-3",children:s}):s:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),E?n.jsx("div",{className:"training-card__body",children:u}):n.jsx("div",{className:"training-card__body training-card__body--empty","aria-hidden":"true"}),k?n.jsxs("div",{className:"training-card__footer",children:[c!=null&&n.jsx("div",{className:"training-card__footer-left",children:c}),p!=null&&n.jsx("div",{className:"training-card__meta",children:p})]}):n.jsx("div",{className:"training-card__footer training-card__footer--empty","aria-hidden":"true"}),x&&C.length>1&&n.jsx("div",{className:"training-card__menu-host",onClick:D=>D.stopPropagation(),children:n.jsx(sn,{anchorRect:x,onClose:w,ariaLabel:y("tooltip.menu","\uBA54\uB274"),children:n.jsx(tr,{columns:[{items:hs(C.map(D=>({label:D.label,icon:D.icon,selected:D.selected,disabled:D.disabled,onClick:D.onClick,shortcut:D.shortcut})))}],onClose:w,size:"small"})})})]})}function IB({title:e,titleLevel:t=3,count:r,collapsed:a=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:f,children:v,className:b}){const{t:_}=Ee.useTranslation(),y=o.useId(),x=t?`h${t}`:"span",g=s!=null,w=we("training-card-group",h&&"training-card-group--dragover",a&&"training-card-group--collapsed",g&&"training-card-group--collapsible",b);return n.jsxs("div",{className:w,onDragOver:d,onDragLeave:m,onDrop:f,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?y:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[g&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:a?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?a?_("common.expandFor",{name:e}):_("common.collapseFor",{name:e}):a?_("common.expand","\uD3BC\uCE58\uAE30"):_("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!a,onClick:s}),typeof e=="string"?n.jsx(x,{id:y,className:"training-card-group__title h5b",children:e}):e,r!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:r}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(Nn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?_("common.sortFor",{name:e}):void 0}),u]})]}),!a&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:v}))]})}const OB="speechear:saved_word_tables";function zB(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 WB(){try{const e=localStorage.getItem(OB);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(zB):[]}catch{return[]}}function Tp(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 yl(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function HB(e){const t=new Set;return e.map(r=>{let a=r.id;for(let s=2;t.has(a);s++)a=`${r.id}~${s}`;return t.add(a),a===r.id?r:{...r,id:a}})}function VB({title:e,titleIcon:t,disc:r,filterTitle:a,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:f,maxItemsPerPage:v,items:b,onSaveComplete:_,onLoad:y,onRemoveItem:x,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReset:C,resetLabel:B,saveButtonLabel:k,secondarySaveButtonLabel:E,onReorder:A,showCellCount:D,onAddItem:j,fillerAdd:S,className:O,renderSavePopup:z,renderWordSearch:G,hideControls:M,saveOnly:I,tableName:W,nameValue:pe,onNameChange:se,descriptionValue:$,onDescriptionChange:V,namePlaceholder:ne,descriptionPlaceholder:te,existingNames:P,editingName:L,onCancel:R,initialItemsPerPage:U,onItemsPerPageChange:Z,renderCellAction:X,actionsLeftExtra:ae}){const{t:Y}=Ee.useTranslation(),xe=B??Y("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),ie=b===void 0,J=!!se,[F,Q]=o.useState([]),H=(pe??"").trim(),le=H||(ne??"").trim(),re=($??"").trim()||(te??"").trim(),de=(P??[]).map($e=>$e.trim().toLowerCase()),Be=[L?.trim().toLowerCase(),...F].filter($e=>!!$e),ke=[...de];for(const $e of Be){const Xe=ke.indexOf($e);Xe!==-1&&ke.splice(Xe,1)}const Ne=H!==""&&ke.includes(H.toLowerCase()),[Re,ye]=o.useState(Array(4).fill(null)),[_e,Ae]=o.useState(4),[Oe,je]=o.useState(null),tt=Re.slice(0,_e),Ct=!!p?.show,[Ie,qe]=o.useState(!0),[nt,We]=o.useState(!0),Ze=p&&{...p,top:Ie,bottom:nt},[ot,gt]=o.useState("landscape"),[ht,xt]=o.useState([...Nd]),[ut,Gt]=o.useState("show"),[_t,Pt]=o.useState(!0),[Qe,De]=o.useState(!0),rt=o.useRef(null),it=o.useRef([]),[bt,Nt]=o.useState(U==="all"?Number.POSITIVE_INFINITY:U??8),[It,ft]=o.useState("right"),[mt,At]=o.useState(!1),[Et,Je]=o.useState(!1),{toastMessage:wt,toastType:ue,showWarning:Se,clearToast:Pe}=Pu("warning"),Ge=o.useCallback(()=>je(null),[je]);d&&ie&&kt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[st,Ot]=o.useState(()=>Math.max(b?.length??1,1)),ct=Math.max(f??0,b?.length??0,1),Yt=f!=null||!!D,$t=ie?_e:D?Math.max(st,b?.length??1,1):ct,{width:Ke,height:K}=fr[ot],Ce=!ie&&!D,He=Math.max(1,Math.min(ct,v??ct)),Ye=Math.min(bt,He),at=Ce?Ye:$t,dt=v!=null&&f!=null,jt=dt?Math.max(1,Math.min(bt,v)):Ye,zt=o.useRef(Z);o.useEffect(()=>{zt.current=Z}),o.useEffect(()=>{Ce&&zt.current?.(jt)},[Ce,jt]);const wn=Math.ceil((b?.length??0)/Math.max(1,at)),an=(b?.length??0)<ct?Math.floor((b?.length??0)/Math.max(1,at))+1:0,Bn=Ce?Math.max(1,wn,an):0,dn=Ce?Array.from({length:Bn},($e,Xe)=>(b??[]).slice(Xe*at,(Xe+1)*at)):null,Xt=!!dn&&dn.length>1,on=ie?tt.some($e=>$e!==null&&$e.length>1):(b??[]).some($e=>($e.words??[]).length>1),pn=W?.trim()||`${Li(ta())} ${on?Y("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):Y("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Qt=o.useCallback(()=>Xt?it.current.filter($e=>$e!==null):rt.current?[rt.current]:[],[Xt]),{print:Lt,openNewWindow:Dt,downloadHtml:Wt}=Xs({getElements:Qt,paperW:Ke,paperH:K,fileName:pn,onPopupBlocked:()=>{Se(Y("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."))}}),Rt=$e=>{Ae($e),ye(Xe=>Xe.length>=$e?Xe:[...Xe,...Array($e-Xe.length).fill(null)]),je(null)},Pn=$e=>{ye(Xe=>{const Tt=[...Xe];return Tt[$e]=null,Tt}),Oe===$e&&je(null)},En=$e=>{if(Oe===null)return;const Xe=Oe;ye(jn=>{const Fn=[...jn];return Fn[Xe]=$e.length>0?$e:null,Fn});const Tt=tt.findIndex((jn,Fn)=>Fn>Xe&&jn===null);je(Tt!==-1?Tt:null)},ar=ie?tt.some($e=>$e?.some(Xe=>!!Xe.colloquialPronunciation)):(b??[]).some($e=>($e.words??[]).some(Xe=>!!Xe.colloquialLabel)),$n=!ie&&Ed([...d?[d]:[],...b??[]]),me=o.useMemo(()=>Br()?ie?Re.slice(0,_e).flatMap($e=>($e??[]).map(Xe=>[Xe.word,Xe.homonum])):($e=>$e.flatMap(Xe=>(Xe.words??[]).map(Tt=>[Tt.label,Tt.homonum])))([...d?[d]:[],...b??[]]):[],[ie,Re,_e,b,d]),[Te,q]=o.useState(!1);o.useEffect(()=>{if(me.length===0)return;let $e=!1;return Promise.all(me.map(([Xe,Tt])=>yi(Xe,Tt))).then(Xe=>{$e||q(Xe.some(Boolean))},()=>{}),()=>{$e=!0}},[me]);const he=me.length>0&&Te,ge=o.useMemo(()=>[...ie||D?[{label:Y("wordTable.filter.columns","\uCE78 \uC218"),items:iw.map($e=>({value:`${$e}\uCE78`,displayLabel:Y("wordTable.filter.column",{count:$e})})),display:"segmented"}]:[],...Ce&&(b?.length??0)>0?[Rd(Y,{hasPairs:on,itemCount:dt?v:ct,max:v})]:[],...Xt?[cw(Y)]:[]],[Y,ie,D,Ce,b?.length,on,ct,v,Xt]),Me={...ie||D?{[Y("wordTable.filter.columns","\uCE78 \uC218")]:`${$t}\uCE78`}:{},...Ce&&(b?.length??0)>0?{[Y(on?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${jt}\uAC1C`}:{},...Xt?{[Y("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:It}:{}},Le=($e,Xe)=>{if(Xe===Y("wordTable.filter.columns","\uCE78 \uC218"))ie?Rt(parseInt($e)):Ot(parseInt($e));else if(Xe===Y(on?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Tt=parseInt($e);Nt(dt?Tt:Pd(Tt,ct))}else Xe===Y("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&ft(Fd($e))},Ve=ie?HB(tt.filter($e=>$e!==null&&$e.length>0).map($e=>({id:yl($e),words:$e.map(Tp)}))):b??[],pt=()=>{ie&&ye($e=>$e.length>_e?$e.slice(0,_e):$e)},yt=($e=!1)=>{if(Je($e),J&&_){const Xe=le.trim().toLowerCase();Xe&&Q(Tt=>Tt.includes(Xe)?Tt:[...Tt,Xe]),_(le,Ve,re||void 0,$e),pt();return}if(I&&_){_("",Ve,void 0,$e),pt();return}if(_){At(!0);return}Wt()},[ve,T]=o.useState(!1),[ee,be]=o.useState(""),Fe=ee.trim(),Ue=Fe!==""&&de.includes(Fe.toLowerCase()),et=()=>{be(le?Y("wordTable.save.copyName",{name:le,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),T(!0)},Bt=()=>{!Fe||Ue||!_||(_(Fe,Ve,re||void 0,!0),pt(),T(!1))},St=Ve.length===0,en=St||J&&(le===""||Ne),tn=()=>{if(St){Se(Y("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(J&&le===""){Se(Y("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}J&&Ne&&Se(Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},zr=n.jsx(Pr,{items:Ve,orientation:ot,contentTypes:ht,baseItem:d,baseContentTypes:m,cutLine:ut,showOutline:_t,showDivLine:Qe,count:$t});return n.jsxs(n.Fragment,{children:[n.jsxs(Rr,{type:"page",icon:t,title:e,disc:r,className:we("word-table-block",O),children:[ve&&n.jsx(Vn,{width:"small",title:E??Y("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>T(!1),footer:({closeWithAnimation:$e})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:Y("common.cancel","\uCDE8\uC18C"),onClick:$e}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:Y("common.save","\uC800\uC7A5"),disabled:!Fe||Ue,onClick:Bt})]}),children:n.jsx(qn,{label:Y("wordTable.save.nameLabel","\uC774\uB984"),value:ee,onChange:be,placeholder:Y("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:Bt,error:Ue?Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),mt&&_&&z?.({defaultName:typeof e=="string"?e:Y("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:zr,previewW:Ke,previewH:K,items:Ve,existingNames:WB().map($e=>$e.name),saveAsNew:Et,onSave:($e,Xe)=>{_($e,Ve,Xe,Et),pt(),At(!1)},onCancel:()=>At(!1)}),(ie||j)&&Oe!==null&&G?.({cellIndex:Oe,onConfirm:ie?En:$e=>{if(j){const Xe=$e[0];if(Xe){const Tt=new Set((b??[]).map(Fn=>Fn.id));let jn=yl([Xe]);for(let Fn=2;Tt.has(jn);Fn++)jn=`${yl([Xe])}~${Fn}`;j({id:jn,words:[Tp(Xe)]})}}je(null)},onClose:Ge}),!M&&n.jsx(Gs,{title:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:he,hasColloquial:ar,hasCaption:$n,contentTypes:ht,orientation:ot,showOutline:_t,cutLine:ut,showDivLine:Qe,setters:{setContentTypes:xt,setOrientation:gt,setShowOutline:Pt,setCutLine:Gt,setShowDivLine:De,setShowTopInfo:qe,setShowBottomInfo:We},showCutLine:(Ce?at:$t)>1,showDivLine2:on,middleSections:ge,extraSelected:Me,onExtraSelect:Le,showPaperBands:Ct,showTopInfo:Ie,showBottomInfo:nt}),Xt&&dn?n.jsx("div",{className:"word-table-block__pages",children:dn.map(($e,Xe)=>n.jsx(Pr,{orientation:ot,contentTypes:ht,cutLine:ut,showOutline:_t,showDivLine:Qe,count:at,items:$e,baseItem:d,baseContentTypes:m,onRemoveItem:x,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReorder:A&&((Tt,jn)=>A(Tt+Xe*at,jn+Xe*at)),indexOffset:Xe*at,totalCount:b?.length??0,renderCellAction:X&&((Tt,jn)=>X(Tt+Xe*at,jn)),showFillerAdd:!!j,fillerAdd:S,onActivateCell:j?(Tt=>je(Tt+Xe*at)):void 0,addableCount:Yt?Math.max(0,Math.min(at,ct-Xe*at)):void 0,brand:Ze,code:h,contentRef:Tt=>{it.current[Xe]=Tt},pageNumber:{current:Xe+1,total:dn.length},pageNumberPosition:It},Xe))}):n.jsx(Pr,{orientation:ot,contentTypes:ht,cutLine:ut,showOutline:_t,showDivLine:Qe,count:at,items:ie?void 0:b??[],baseItem:ie?void 0:d,baseContentTypes:m,editCells:ie?tt:void 0,activeCell:Oe,onActivateCell:ie||j?je:void 0,onRemoveCell:ie?Pn:void 0,onRemoveItem:ie?void 0:x,onCopyItem:ie?void 0:g,onReplaceItem:ie?void 0:w,onPickForm:ie?void 0:N,onReorder:ie?void 0:A,addableCount:Yt?Ce?Math.min(at,ct):$t:void 0,renderCellAction:ie?void 0:X,brand:Ze,code:h,showFillerAdd:!!j,fillerAdd:S,contentRef:rt}),!M&&!I&&ae!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ae}),J&&!M&&n.jsxs(Tr,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[n.jsx(cn,{variant:"custom",label:Y("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(qn,{required:!0,value:pe??"",onChange:se,placeholder:ne?ne+Y("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):Y("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:Y("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Ne?Y("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:$e=>{($e.key==="Tab"&&!$e.shiftKey||$e.key===" ")&&!(pe??"").trim()&&(ne??"").trim()&&($e.preventDefault(),se?.(ne??""))}})}),n.jsx(cn,{variant:"custom",label:Y("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(qn,{value:$??"",onChange:V,placeholder:te?te+Y("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):Y("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:Y("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:$e=>{($e.key==="Tab"&&!$e.shiftKey||$e.key===" ")&&!($??"").trim()&&(te??"").trim()&&($e.preventDefault(),V?.(te??""))}})})]})]}),!M&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!I&&y&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:Y("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:y}),!I&&C&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:xe,onClick:C}),!I&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:Y("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Dt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[R&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:Y("common.cancel","\uCDE8\uC18C"),onClick:R}),!I&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:Y("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Lt}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>J?et():yt(!0),disabled:St,onDisabledClick:()=>{Se(Y("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??Y("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>yt(!1),disabled:en,onDisabledClick:tn})]})]}),n.jsx(Lr,{message:wt,type:ue,onClose:Pe})]})}const qB=8;function Mp({items:e,className:t,columns:r}){const{t:a}=Ee.useTranslation(),s=o.useRef(null),[l,i]=o.useState(null),u=o.useCallback(()=>i(s.current?.getBoundingClientRect()??null),[]),c=o.useCallback(()=>i(null),[]),p=Oa(!!l,w=>{w?u():c()},s),h=e.length,d=r&&r>0?Math.floor(r):h<=3?1:2,m=qB,f=h>m,v=e.slice(0,f?m-1:m),b=h-v.length,_=e.slice(v.length).map(w=>w.words?.length?w.words.map(N=>N.label).join(" / "):w.id),y=Math.min(5,Math.ceil(_.length/25)),x=Math.ceil(Math.min(h,m)/d)||1,g=d*x;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${d}, 1fr)`},children:Array.from({length:g},(w,N)=>{if(f&&N===m-1)return n.jsxs("div",{ref:s,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:b,words:_.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:B=>{er(B)||u()},onPointerLeave:B=>{er(B)||c()},onFocus:()=>{ur()||u()},onBlur:c,onClick:B=>{B.stopPropagation(),p.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:b,defaultValue:"+{{count}}"})}),l&&_.length>0&&n.jsx(Qn,{anchorRect:l,items:_,showIndex:!1,closeOnOutsideClick:!1,columns:y})]},N);const C=v[N];return C?n.jsx("div",{className:"word-table-thumb__cell",children:(C.words?.length?C.words:[{label:C.id}]).map((B,k)=>n.jsxs(o.Fragment,{children:[k>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:B.label})]},k))},N):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},N)})})}function UB({items:e,name:t,description:r,createdAt:a,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:f,onPublisherClick:v,selected:b,onClick:_,onMore:y,titleNode:x,className:g}){const{t:w}=Ee.useTranslation(),N=x!=null,C=h!=null||d!=null||m!=null||f!=null,B=k=>{k.target===k.currentTarget&&!N&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),_?.())};return n.jsxs("div",{className:we("word-table-button",b?"word-table-button--selected":"",C?"":"word-table-button--no-footer",g),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:_,onKeyDown:B,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":w("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Mp,{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:[x??n.jsx("div",{className:"word-table-button__title h4",children:t}),r&&n.jsx("div",{className:"word-table-button__desc body-3",children:r})]}),y&&!N&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:w("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),y(k)}})]}),(s||a||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:a?$i(a,w):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(rn,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??w("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(rn,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??w("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),C&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":w("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),v()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:$i(d,w)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(rn,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":w("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),f!=null&&n.jsx(rn,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(f),"aria-label":w("common.downloadCount",{count:f,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${f}`})})]})]})]})}/**
|
|
1063
1063
|
* @license lucide-react v1.38.0 - ISC
|
|
1064
1064
|
*
|
|
1065
1065
|
* This source code is licensed under the ISC license.
|
|
@@ -1069,6 +1069,6 @@ ${C.badge}`:C.badge:void 0;if(k&&h(C.code))return null;if(!C.badge&&!m)return f(
|
|
|
1069
1069
|
*
|
|
1070
1070
|
* This source code is licensed under the ISC license.
|
|
1071
1071
|
* See the LICENSE file in the root directory of this source tree.
|
|
1072
|
-
*/const YB=[["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"}]],ZB=oe("circle-x",YB);function XB(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function vl({icon:e,label:t,state:r,pct:a,subText:s}){const{t:l}=Ee.useTranslation(),i=r==="done",u=r==="pending",c=r==="error",p=i?100:a??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Rl,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(ZB,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(rn,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(rn,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||a!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&a!==void 0?` \xB7 ${a}%`:a!==void 0?`${a}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${r==="active"&&a===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:a!==void 0||i||c?`${c?100:p}%`:void 0}})})]})]})}function JB({title:e,progress:t,onDone:r,onRetry:a,onClose:s,inline:l}){const{t:i}=Ee.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:f}=t,v=XB(u),y=u==="done",x=!!c;function b(B){return x&&v===B?"error":v>B?"done":v===B?"active":"pending"}const _=b(1),g=b(2),w=b(3),N=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,C=o.useMemo(()=>{if(g!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Go(d),total:Go(m)})}},[g,u,h,m,d,i]);return n.jsx(Vn,{inline:l,className:"popup--word-data-update",title:e,footer:x&&a?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:a,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):x?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??r,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!y,onClick:r,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(vl,{icon:n.jsx(Sl,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:_,subText:_==="active"?i("wordData.downloadingCount",{n:Go(p),count:p}):void 0}),n.jsx(vl,{icon:n.jsx(KB,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:g,pct:N,subText:C}),n.jsx(vl,{icon:n.jsx($l,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:w,pct:w==="active"?f??0:void 0,subText:void 0})]})})}const QB=.15;function Vt(e,t,r=0){return{animation:`hero-visual-${e} ${t}s ease-in-out ${r}s infinite backwards`}}function qt(e,t={}){return{className:`hero-visual__in hero-visual__in--${e}`,style:{transformOrigin:t.origin,"--hero-visual-turn":t.turn??0,...t.vars}}}const _a={pathLength:1,strokeDasharray:"1 1"},xl={transformBox:"fill-box",transformOrigin:"center"},ze={c1:"var(--hero-visual-1)",c2:"var(--hero-visual-2)",c3:"var(--hero-visual-3)",c4:"var(--hero-visual-4)",c5:"var(--hero-visual-5)",c6:"var(--hero-visual-6)"},_l=[ze.c1,ze.c2,ze.c3,ze.c4,ze.c5,ze.c6];function $p(e,t,r,a){return Array.from({length:a},(s,l)=>{const i=l/a*Math.PI*2;return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}})}const bo={blobs:{viewBox:"0 20 660 660",width:660,height:660,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsx("g",{...qt("bloom",{turn:0,origin:"330px 350px"}),children:n.jsxs("g",{style:Vt("blob-1",22),children:[n.jsx("circle",{cx:330,cy:350,r:240,fill:`url(#${e}-big)`}),[{stroke:"rgba(77, 205, 192, 0.45)",delay:0},{stroke:"rgba(73, 156, 223, 0.35)",delay:1.35},{stroke:"rgba(77, 205, 192, 0.25)",delay:2.7}].map(t=>n.jsx("circle",{className:"hero-visual__ring",cx:330,cy:350,r:241,fill:"none",stroke:t.stroke,strokeWidth:2,style:{...xl,animation:`hero-visual-wave 4s ease-out ${t.delay}s infinite backwards`}},t.delay))]})}),n.jsx("g",{...qt("bloom",{turn:.06,origin:"490px 490px"}),children:n.jsx("circle",{cx:490,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})},ribbon:{viewBox:"-40 140 880 294",width:880,height:294,render:e=>{const t="M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140",r="M440,250 C320,300 480,420 580,360 S740,200 840,140";return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-rib`,gradientUnits:"userSpaceOnUse",x1:"0",y1:"420",x2:"760",y2:"120",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".4",stopColor:ze.c3}),n.jsx("stop",{offset:".7",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("mask",{id:`${e}-mask`,maskUnits:"userSpaceOnUse",x:"-100",y:"-100",width:"1000",height:"800",children:[n.jsx("rect",{x:"-100",y:"-100",width:"1000",height:"800",fill:"#000"}),n.jsx("path",{d:t,fill:"none",stroke:"#fff",strokeWidth:62,strokeLinecap:"round"})]}),n.jsx("filter",{id:`${e}-blur`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:n.jsx("feGaussianBlur",{stdDeviation:"9"})})]}),n.jsxs("g",{style:Vt("floaty",7),children:[n.jsx("path",{d:t,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",..._a,...qt("draw")}),n.jsx("g",{mask:`url(#${e}-mask)`,...qt("fade",{turn:.04}),children:n.jsx("path",{d:r,fill:"none",stroke:ze.c1,strokeWidth:64,strokeLinecap:"butt",strokeDasharray:"0 130 3000",opacity:".34",filter:`url(#${e}-blur)`,transform:"translate(0,10)"})}),n.jsx("path",{d:r,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",..._a,...qt("draw",{turn:.06})})]})]})}},spheres:{viewBox:"0 -10 640 580",width:640,height:580,render:e=>{const t=[{cx:450,cy:240,r:190,fill:`url(#${e}-halo)`,opacity:.8,blur:!0,idle:Vt("breathe",9),self:!0,turn:0},{cx:275,cy:45,r:55,fill:`url(#${e}-drop)`,idle:Vt("drift",8),turn:.09},{cx:310,cy:310,r:160,fill:`url(#${e}-lime)`,idle:Vt("floaty",7),turn:.03},{cx:150,cy:430,r:150,fill:`url(#${e}-fade)`,opacity:.75,blend:!0,idle:Vt("floaty",7,2.5),turn:.06},{cx:361,cy:521,r:21,fill:`url(#${e}-bead)`,idle:Vt("drift",6,1),turn:.12}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{id:`${e}-halo`,cx:".4",cy:".4",r:".85",children:[n.jsx("stop",{offset:"0",stopColor:ze.c5}),n.jsx("stop",{offset:".55",stopColor:ze.c2}),n.jsx("stop",{offset:".72",stopColor:"#ffffff"}),n.jsx("stop",{offset:"1",stopColor:"#ffffff"})]}),n.jsxs("linearGradient",{id:`${e}-drop`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".7",stopColor:ze.c5}),n.jsx("stop",{offset:"1",stopColor:ze.c5,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-lime`,x1:".67",y1:".03",x2:".33",y2:".97",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:".45",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsxs("linearGradient",{id:`${e}-fade`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".45",stopColor:ze.c3}),n.jsx("stop",{offset:".95",stopColor:ze.c3,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-bead`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsx("filter",{id:`${e}-soft`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:n.jsx("feGaussianBlur",{stdDeviation:"34"})})]}),t.map(r=>n.jsx("g",{...qt("settle",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{className:r.blend?"hero-visual__blades":void 0,cx:r.cx,cy:r.cy,r:r.r,fill:r.fill,opacity:r.opacity,filter:r.blur?`url(#${e}-soft)`:void 0,style:r.self?{...xl,...r.idle}:r.idle})},`${r.cx},${r.cy}`))]})}},clover:{viewBox:"203.5 123.5 273 273",width:273,height:273,render:e=>{const t=[{d:"M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z",fill:`url(#${e}-p1)`,origin:"220px 140px",turn:0},{d:"M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z",fill:`url(#${e}-p3)`,origin:"460px 140px",turn:.03},{d:"M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z",fill:`url(#${e}-p4)`,origin:"460px 380px",turn:.06},{d:"M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z",fill:`url(#${e}-p2)`,origin:"220px 380px",turn:.09}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"1",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]}),n.jsxs("linearGradient",{id:`${e}-p4`,x1:"1",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]})]}),n.jsx("g",{className:"hero-visual__petals",children:t.map(r=>n.jsx("path",{d:r.d,fill:r.fill,...qt("pop",{turn:r.turn,origin:r.origin})},r.origin))})]})}},stackedPills:{viewBox:"-46.5 -88.9 493 493",width:493,height:493,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c5}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]})]}),[{cy:60,angle:-16,color:`url(#${e}-p1)`,opacity:.75},{cy:160,angle:14,color:`url(#${e}-p2)`,opacity:.85},{cy:260,angle:-14,color:`url(#${e}-p3)`,opacity:.95}].map((t,r)=>n.jsx("g",{...qt("fan",{origin:`200px ${t.cy}px`,vars:{"--dy":`${160-t.cy}px`,"--a":`${t.angle}deg`}}),children:n.jsx("rect",{x:30,y:t.cy-60,width:340,height:120,rx:60,fill:t.color,opacity:t.opacity,style:{...xl,...Vt("sway",7,r)}})},t.cy))]})},doubleRing:{viewBox:"-3.5 -78.5 777 777",width:777,height:777,render:e=>{const t=n.jsx("g",{style:{animation:"hero-visual-rove-a 19s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"290px 300px",animation:"hero-visual-revolve 26s linear infinite"},children:n.jsx("circle",{cx:290,cy:300,r:210,fill:"none",stroke:`url(#${e}-r1)`,strokeWidth:74,strokeLinecap:"round",..._a,...qt("draw")})})});return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-r1`,gradientUnits:"userSpaceOnUse",x1:"60",y1:"80",x2:"520",y2:"520",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:".5",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]}),n.jsxs("linearGradient",{id:`${e}-r2`,gradientUnits:"userSpaceOnUse",x1:"300",y1:"120",x2:"700",y2:"560",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:".55",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsxs("mask",{id:`${e}-over`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"800",height:"640",children:[n.jsx("rect",{x:"0",y:"0",width:"800",height:"640",fill:"#000"}),n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:"#fff",strokeWidth:82,style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"}}),n.jsx("rect",{x:"0",y:"323",width:"800",height:"320",fill:"#000"})]})]}),n.jsxs("g",{style:{transformOrigin:"380px 300px",...Vt("breathe",9)},children:[t,n.jsx("g",{style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"500px 340px",animation:"hero-visual-revolve-r 22s linear infinite"},children:n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:`url(#${e}-r2)`,strokeWidth:74,strokeLinecap:"round",..._a,...qt("draw",{turn:.08})})})}),n.jsx("g",{mask:`url(#${e}-over)`,children:t})]})]})}},concentric:{viewBox:"-23.5 -83.5 727 727",width:727,height:727,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-outer`,gradientUnits:"userSpaceOnUse",x1:"20",y1:"-40",x2:"660",y2:"600",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-mid`,gradientUnits:"userSpaceOnUse",x1:"120",y1:"280",x2:"560",y2:"280",children:[n.jsx("stop",{offset:"0",stopColor:ze.c2}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-inner`,gradientUnits:"userSpaceOnUse",x1:"200",y1:"420",x2:"480",y2:"140",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".5",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]})]}),[{r:54,stroke:ze.c2,opacity:1,idle:0,turn:0},{r:134,stroke:`url(#${e}-inner)`,opacity:.9,idle:.4,turn:.04},{r:214,stroke:`url(#${e}-mid)`,opacity:.8,idle:.8,turn:.08},{r:294,stroke:`url(#${e}-outer)`,opacity:.55,idle:1.2,turn:.12}].map(t=>n.jsx("g",{...qt("pop",{turn:t.turn,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:t.r,fill:"none",stroke:t.stroke,strokeWidth:52,opacity:t.opacity,style:{transformOrigin:"340px 280px",...Vt("pulse",4,t.idle)}})},t.r))]})},metaball:{viewBox:"-16 82 530 536",width:530,height:536,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("filter",{id:`${e}-goo`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:[n.jsx("feGaussianBlur",{stdDeviation:"18"}),n.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12"})]}),n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsxs("g",{filter:`url(#${e}-goo)`,children:[n.jsx("g",{...qt("meet",{vars:{"--from":"20px"}}),children:n.jsx("circle",{cx:240,cy:350,r:240,fill:`url(#${e}-big)`,style:Vt("blob-1",22)})}),n.jsx("g",{...qt("meet",{turn:.03,vars:{"--from":"-120px"}}),children:n.jsx("circle",{cx:400,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})]})},dottedRipple:{viewBox:"87.5 27.5 505 505",width:505,height:505,render:()=>n.jsxs("g",{style:{transformOrigin:"340px 280px",...Vt("breathe",6)},children:[n.jsx("g",{...qt("pop",{turn:0,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:22,fill:ze.c1})}),Array.from({length:5},(e,t)=>n.jsx("g",{...qt("pop",{turn:.03*(t+1),origin:"340px 280px"}),children:$p(340,280,50+42*t,8+8*t).map(r=>n.jsx("circle",{cx:r.x,cy:r.y,r:9-1.2*t,fill:_l[t]},`${r.x},${r.y}`))},t))]})},vesica:{viewBox:"67.5 7.5 545 545",width:545,height:545,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-cool`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]}),n.jsxs("linearGradient",{id:`${e}-warm`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]})]}),n.jsxs("g",{className:"hero-visual__lens",children:[n.jsx("g",{...qt("meet",{vars:{"--from":"70px"}}),children:n.jsx("circle",{cx:270,cy:280,r:170,fill:`url(#${e}-cool)`,opacity:".8",style:Vt("approach-r",6)})}),n.jsx("g",{...qt("meet",{vars:{"--from":"-70px"}}),children:n.jsx("circle",{cx:410,cy:280,r:170,fill:`url(#${e}-warm)`,opacity:".8",style:Vt("approach",6)})})]})]})},stackedDiscs:{viewBox:"112.5 67.5 455 455",width:455,height:455,render:()=>n.jsx("g",{className:"hero-visual__discs",children:_l.map((e,t)=>n.jsx("g",{...qt("pop",{turn:t*.025,origin:`340px ${150+58*t}px`}),children:n.jsx("ellipse",{cx:340,cy:150+58*t,rx:200-12*t,ry:46,fill:e,opacity:".8",style:Vt("floaty",7,.4*t)})},e))})},flower:{viewBox:"124 64 432 432",width:432,height:432,render:()=>n.jsx("g",{className:"hero-visual__blades",style:{transformOrigin:"340px 280px",...Vt("breathe",9)},children:$p(340,280,95,6).map((e,t)=>n.jsx("g",{...qt("unfold",{turn:t*.025,origin:"340px 280px",vars:{"--gx":`${340-e.x}px`,"--gy":`${280-e.y}px`}}),children:n.jsx("circle",{cx:e.x,cy:e.y,r:95,fill:_l[t],opacity:".6",style:Vt("gather",36)})},`${e.x},${e.y}`))})},squircles:{viewBox:"7 7 186 186",width:186,height:186,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-q1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-q2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-q3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]})]}),[{d:"M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z",fill:`url(#${e}-q1)`,opacity:.55,idle:0,turn:0},{d:"M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z",fill:`url(#${e}-q2)`,opacity:.75,idle:.5,turn:.03},{d:"M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z",fill:`url(#${e}-q3)`,opacity:1,idle:1,turn:.06}].map(t=>n.jsx("g",{...qt("bloom",{turn:t.turn,origin:"100px 100px"}),children:n.jsx("g",{style:{transformOrigin:"100px 100px",...Vt("breathe",5,t.idle)},children:n.jsx("path",{d:t.d,fill:t.fill,opacity:t.opacity})})},t.turn))]})},dotGrid:{viewBox:"14 14 172 172",width:172,height:172,render:e=>{const t=[50,100,150].flatMap((r,a)=>[50,100,150].map((s,l)=>({cx:s,cy:r,fill:`url(#${e}-${s===100&&r===100?"n3":a===2?"n2":"n1"})`,middle:s===100&&r===100,idle:(a*3+l)*.3,turn:(a*3+l)*.015})));return n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["n1",ze.c3,ze.c4],["n2",ze.c6,ze.c5],["n3",ze.c1,ze.c2]].map(([r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:s})]},r))}),t.map(r=>n.jsx("g",{...qt("pop",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{cx:r.cx,cy:r.cy,r:18,fill:r.fill,style:r.middle?void 0:Vt("blink",2.7,r.idle)})},`${r.cx},${r.cy}`))]})}},stairs:{viewBox:"13.5 18.5 175 175",width:175,height:175,render:e=>n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["t1",ze.c6,ze.c5,110],["t2",ze.c4,ze.c3,86],["t3",ze.c3,ze.c2,62],["t4",ze.c1,ze.c2,38]].map(([t,r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${t}`,gradientUnits:"userSpaceOnUse",x1:"0",y1:s,x2:"0",y2:174,children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:r})]},t))}),[{x:24,y:110,stroke:`url(#${e}-t1)`},{x:66,y:86,stroke:`url(#${e}-t2)`},{x:108,y:62,stroke:`url(#${e}-t3)`},{x:150,y:38,stroke:`url(#${e}-t4)`}].map((t,r)=>n.jsx("g",{style:Vt("floaty",3.6,r*.3),children:n.jsx("line",{x1:t.x+14,y1:160,x2:t.x+14,y2:t.y+14,stroke:t.stroke,strokeWidth:28,strokeLinecap:"round",..._a,...qt("draw",{turn:r*.03})})},t.x))]})}},e5=Object.keys(bo);function t5({variant:e,motion:t="loop",cycleMs:r=9e3,label:a,className:s,style:l,onCycleEnd:i}){const u=o.useRef(null),c=o.useRef(i);c.current=i,o.useEffect(()=>{if(t!=="once"||!c.current)return;const d=u.current;if(!d)return;let m=!1;const f=()=>{m||(m=!0,c.current?.())};let v=d.querySelectorAll(".hero-visual__in").length;const y=g=>{g.target?.classList?.contains("hero-visual__in")&&--v<=0&&f()};d.addEventListener("animationend",y);const x=typeof d.getAnimations=="function"?d.getAnimations({subtree:!0}).map(g=>Number(g.effect?.getComputedTiming().endTime??0)).filter(g=>Number.isFinite(g)&&g>0):[],b=x.length>0?Math.max(...x):r*(1+QB),_=setTimeout(f,b+120);return()=>{d.removeEventListener("animationend",y),clearTimeout(_)}},[t,e,r]);const p=`hero-visual-${o.useId().replace(/:/g,"")}`,h=bo[e]??bo.blobs;return bo[e]||kt(`HeroVisual: \uBAA8\uB974\uB294 variant '${e}' \u2014 blobs \uB85C \uC138\uC6B4\uB2E4`),n.jsx("div",{ref:u,className:we("hero-visual",`hero-visual--${e}`,t==="still"&&"hero-visual--still",t==="once"&&"hero-visual--once",s),style:{aspectRatio:`${h.width} / ${h.height}`,"--hero-visual-cycle":`${r}ms`,...l},role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,children:n.jsx("svg",{className:"hero-visual__svg",viewBox:h.viewBox,preserveAspectRatio:"xMidYMid meet",focusable:"false",children:h.render(p)})})}function n5({enabled:e=!1,renderResultPopup:t}={}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(null),[l,i]=o.useState(null),u=f=>{let v=null;f==="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}]}:f==="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}]}:f==="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}]}:f==="order"&&(v={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(v),s(f)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:r("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:r("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:r("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:r("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),a&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}var Lp={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again.",add:"Add"},Rp={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{short}}",weekLabel:"Week {{ord}}",weekLabelCompact:"W{{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Pp={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"}},Fp={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Ip={selected:"selected"},Op={placeholder:"Select"},zp={collapse:"Collapse",expand:"Expand"},Wp={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Hp={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},Vp={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},qp={couponButton:"Enter Coupon"},Up={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},Gp={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Difficulty",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playSoundFor:"Play {{name}}",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},Kp={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},Yp={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Zp={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Xp={showN:"Show {{n}}"},Jp={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."}},Qp={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},eh={title:"Key Words",empty:"No key words available."},th={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}",pickForm:"Other forms",pickFormAria:"Change the form in cell {{n}}",pickFormBaseAria:"Change the form of the base word"},nh={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoAgeFloor:"Age {{n}}: also includes words for younger ages.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},rh={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},ah={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"}},oh={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},sh={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},lh={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlyHighUsage:"High-use words only",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},ih={lead:`IHAB builds trust
|
|
1072
|
+
*/const YB=[["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"}]],ZB=oe("circle-x",YB);function XB(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function vl({icon:e,label:t,state:r,pct:a,subText:s}){const{t:l}=Ee.useTranslation(),i=r==="done",u=r==="pending",c=r==="error",p=i?100:a??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Rl,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(ZB,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(rn,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(rn,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||a!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&a!==void 0?` \xB7 ${a}%`:a!==void 0?`${a}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${r==="active"&&a===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:a!==void 0||i||c?`${c?100:p}%`:void 0}})})]})]})}function JB({title:e,progress:t,onDone:r,onRetry:a,onClose:s,inline:l}){const{t:i}=Ee.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:f}=t,v=XB(u),b=u==="done",_=!!c;function y(B){return _&&v===B?"error":v>B?"done":v===B?"active":"pending"}const x=y(1),g=y(2),w=y(3),N=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,C=o.useMemo(()=>{if(g!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Go(d),total:Go(m)})}},[g,u,h,m,d,i]);return n.jsx(Vn,{inline:l,className:"popup--word-data-update",title:e,footer:_&&a?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:a,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):_?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??r,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!b,onClick:r,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(vl,{icon:n.jsx(Sl,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:x,subText:x==="active"?i("wordData.downloadingCount",{n:Go(p),count:p}):void 0}),n.jsx(vl,{icon:n.jsx(KB,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:g,pct:N,subText:C}),n.jsx(vl,{icon:n.jsx($l,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:w,pct:w==="active"?f??0:void 0,subText:void 0})]})})}const QB=.15;function Vt(e,t,r=0){return{animation:`hero-visual-${e} ${t}s ease-in-out ${r}s infinite backwards`}}function qt(e,t={}){return{className:`hero-visual__in hero-visual__in--${e}`,style:{transformOrigin:t.origin,"--hero-visual-turn":t.turn??0,...t.vars}}}const wa={pathLength:1,strokeDasharray:"1 1"},xl={transformBox:"fill-box",transformOrigin:"center"},ze={c1:"var(--hero-visual-1)",c2:"var(--hero-visual-2)",c3:"var(--hero-visual-3)",c4:"var(--hero-visual-4)",c5:"var(--hero-visual-5)",c6:"var(--hero-visual-6)"},_l=[ze.c1,ze.c2,ze.c3,ze.c4,ze.c5,ze.c6];function $p(e,t,r,a){return Array.from({length:a},(s,l)=>{const i=l/a*Math.PI*2;return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}})}const bo={blobs:{viewBox:"0 20 660 660",width:660,height:660,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsx("g",{...qt("bloom",{turn:0,origin:"330px 350px"}),children:n.jsxs("g",{style:Vt("blob-1",22),children:[n.jsx("circle",{cx:330,cy:350,r:240,fill:`url(#${e}-big)`}),[{stroke:"rgba(77, 205, 192, 0.45)",delay:0},{stroke:"rgba(73, 156, 223, 0.35)",delay:1.35},{stroke:"rgba(77, 205, 192, 0.25)",delay:2.7}].map(t=>n.jsx("circle",{className:"hero-visual__ring",cx:330,cy:350,r:241,fill:"none",stroke:t.stroke,strokeWidth:2,style:{...xl,animation:`hero-visual-wave 4s ease-out ${t.delay}s infinite backwards`}},t.delay))]})}),n.jsx("g",{...qt("bloom",{turn:.06,origin:"490px 490px"}),children:n.jsx("circle",{cx:490,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})},ribbon:{viewBox:"-40 140 880 294",width:880,height:294,render:e=>{const t="M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140",r="M440,250 C320,300 480,420 580,360 S740,200 840,140";return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-rib`,gradientUnits:"userSpaceOnUse",x1:"0",y1:"420",x2:"760",y2:"120",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".4",stopColor:ze.c3}),n.jsx("stop",{offset:".7",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("mask",{id:`${e}-mask`,maskUnits:"userSpaceOnUse",x:"-100",y:"-100",width:"1000",height:"800",children:[n.jsx("rect",{x:"-100",y:"-100",width:"1000",height:"800",fill:"#000"}),n.jsx("path",{d:t,fill:"none",stroke:"#fff",strokeWidth:62,strokeLinecap:"round"})]}),n.jsx("filter",{id:`${e}-blur`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:n.jsx("feGaussianBlur",{stdDeviation:"9"})})]}),n.jsxs("g",{style:Vt("floaty",7),children:[n.jsx("path",{d:t,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...wa,...qt("draw")}),n.jsx("g",{mask:`url(#${e}-mask)`,...qt("fade",{turn:.04}),children:n.jsx("path",{d:r,fill:"none",stroke:ze.c1,strokeWidth:64,strokeLinecap:"butt",strokeDasharray:"0 130 3000",opacity:".34",filter:`url(#${e}-blur)`,transform:"translate(0,10)"})}),n.jsx("path",{d:r,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...wa,...qt("draw",{turn:.06})})]})]})}},spheres:{viewBox:"0 -10 640 580",width:640,height:580,render:e=>{const t=[{cx:450,cy:240,r:190,fill:`url(#${e}-halo)`,opacity:.8,blur:!0,idle:Vt("breathe",9),self:!0,turn:0},{cx:275,cy:45,r:55,fill:`url(#${e}-drop)`,idle:Vt("drift",8),turn:.09},{cx:310,cy:310,r:160,fill:`url(#${e}-lime)`,idle:Vt("floaty",7),turn:.03},{cx:150,cy:430,r:150,fill:`url(#${e}-fade)`,opacity:.75,blend:!0,idle:Vt("floaty",7,2.5),turn:.06},{cx:361,cy:521,r:21,fill:`url(#${e}-bead)`,idle:Vt("drift",6,1),turn:.12}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{id:`${e}-halo`,cx:".4",cy:".4",r:".85",children:[n.jsx("stop",{offset:"0",stopColor:ze.c5}),n.jsx("stop",{offset:".55",stopColor:ze.c2}),n.jsx("stop",{offset:".72",stopColor:"#ffffff"}),n.jsx("stop",{offset:"1",stopColor:"#ffffff"})]}),n.jsxs("linearGradient",{id:`${e}-drop`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".7",stopColor:ze.c5}),n.jsx("stop",{offset:"1",stopColor:ze.c5,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-lime`,x1:".67",y1:".03",x2:".33",y2:".97",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:".45",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsxs("linearGradient",{id:`${e}-fade`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".45",stopColor:ze.c3}),n.jsx("stop",{offset:".95",stopColor:ze.c3,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-bead`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsx("filter",{id:`${e}-soft`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:n.jsx("feGaussianBlur",{stdDeviation:"34"})})]}),t.map(r=>n.jsx("g",{...qt("settle",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{className:r.blend?"hero-visual__blades":void 0,cx:r.cx,cy:r.cy,r:r.r,fill:r.fill,opacity:r.opacity,filter:r.blur?`url(#${e}-soft)`:void 0,style:r.self?{...xl,...r.idle}:r.idle})},`${r.cx},${r.cy}`))]})}},clover:{viewBox:"203.5 123.5 273 273",width:273,height:273,render:e=>{const t=[{d:"M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z",fill:`url(#${e}-p1)`,origin:"220px 140px",turn:0},{d:"M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z",fill:`url(#${e}-p3)`,origin:"460px 140px",turn:.03},{d:"M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z",fill:`url(#${e}-p4)`,origin:"460px 380px",turn:.06},{d:"M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z",fill:`url(#${e}-p2)`,origin:"220px 380px",turn:.09}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"1",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]}),n.jsxs("linearGradient",{id:`${e}-p4`,x1:"1",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]})]}),n.jsx("g",{className:"hero-visual__petals",children:t.map(r=>n.jsx("path",{d:r.d,fill:r.fill,...qt("pop",{turn:r.turn,origin:r.origin})},r.origin))})]})}},stackedPills:{viewBox:"-46.5 -88.9 493 493",width:493,height:493,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c5}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]})]}),[{cy:60,angle:-16,color:`url(#${e}-p1)`,opacity:.75},{cy:160,angle:14,color:`url(#${e}-p2)`,opacity:.85},{cy:260,angle:-14,color:`url(#${e}-p3)`,opacity:.95}].map((t,r)=>n.jsx("g",{...qt("fan",{origin:`200px ${t.cy}px`,vars:{"--dy":`${160-t.cy}px`,"--a":`${t.angle}deg`}}),children:n.jsx("rect",{x:30,y:t.cy-60,width:340,height:120,rx:60,fill:t.color,opacity:t.opacity,style:{...xl,...Vt("sway",7,r)}})},t.cy))]})},doubleRing:{viewBox:"-3.5 -78.5 777 777",width:777,height:777,render:e=>{const t=n.jsx("g",{style:{animation:"hero-visual-rove-a 19s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"290px 300px",animation:"hero-visual-revolve 26s linear infinite"},children:n.jsx("circle",{cx:290,cy:300,r:210,fill:"none",stroke:`url(#${e}-r1)`,strokeWidth:74,strokeLinecap:"round",...wa,...qt("draw")})})});return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-r1`,gradientUnits:"userSpaceOnUse",x1:"60",y1:"80",x2:"520",y2:"520",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:".5",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]}),n.jsxs("linearGradient",{id:`${e}-r2`,gradientUnits:"userSpaceOnUse",x1:"300",y1:"120",x2:"700",y2:"560",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:".55",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c1})]}),n.jsxs("mask",{id:`${e}-over`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"800",height:"640",children:[n.jsx("rect",{x:"0",y:"0",width:"800",height:"640",fill:"#000"}),n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:"#fff",strokeWidth:82,style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"}}),n.jsx("rect",{x:"0",y:"323",width:"800",height:"320",fill:"#000"})]})]}),n.jsxs("g",{style:{transformOrigin:"380px 300px",...Vt("breathe",9)},children:[t,n.jsx("g",{style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"500px 340px",animation:"hero-visual-revolve-r 22s linear infinite"},children:n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:`url(#${e}-r2)`,strokeWidth:74,strokeLinecap:"round",...wa,...qt("draw",{turn:.08})})})}),n.jsx("g",{mask:`url(#${e}-over)`,children:t})]})]})}},concentric:{viewBox:"-23.5 -83.5 727 727",width:727,height:727,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-outer`,gradientUnits:"userSpaceOnUse",x1:"20",y1:"-40",x2:"660",y2:"600",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]}),n.jsxs("linearGradient",{id:`${e}-mid`,gradientUnits:"userSpaceOnUse",x1:"120",y1:"280",x2:"560",y2:"280",children:[n.jsx("stop",{offset:"0",stopColor:ze.c2}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-inner`,gradientUnits:"userSpaceOnUse",x1:"200",y1:"420",x2:"480",y2:"140",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:".5",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]})]}),[{r:54,stroke:ze.c2,opacity:1,idle:0,turn:0},{r:134,stroke:`url(#${e}-inner)`,opacity:.9,idle:.4,turn:.04},{r:214,stroke:`url(#${e}-mid)`,opacity:.8,idle:.8,turn:.08},{r:294,stroke:`url(#${e}-outer)`,opacity:.55,idle:1.2,turn:.12}].map(t=>n.jsx("g",{...qt("pop",{turn:t.turn,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:t.r,fill:"none",stroke:t.stroke,strokeWidth:52,opacity:t.opacity,style:{transformOrigin:"340px 280px",...Vt("pulse",4,t.idle)}})},t.r))]})},metaball:{viewBox:"-16 82 530 536",width:530,height:536,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("filter",{id:`${e}-goo`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:[n.jsx("feGaussianBlur",{stdDeviation:"18"}),n.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12"})]}),n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsxs("g",{filter:`url(#${e}-goo)`,children:[n.jsx("g",{...qt("meet",{vars:{"--from":"20px"}}),children:n.jsx("circle",{cx:240,cy:350,r:240,fill:`url(#${e}-big)`,style:Vt("blob-1",22)})}),n.jsx("g",{...qt("meet",{turn:.03,vars:{"--from":"-120px"}}),children:n.jsx("circle",{cx:400,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})]})},dottedRipple:{viewBox:"87.5 27.5 505 505",width:505,height:505,render:()=>n.jsxs("g",{style:{transformOrigin:"340px 280px",...Vt("breathe",6)},children:[n.jsx("g",{...qt("pop",{turn:0,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:22,fill:ze.c1})}),Array.from({length:5},(e,t)=>n.jsx("g",{...qt("pop",{turn:.03*(t+1),origin:"340px 280px"}),children:$p(340,280,50+42*t,8+8*t).map(r=>n.jsx("circle",{cx:r.x,cy:r.y,r:9-1.2*t,fill:_l[t]},`${r.x},${r.y}`))},t))]})},vesica:{viewBox:"67.5 7.5 545 545",width:545,height:545,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-cool`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c3})]}),n.jsxs("linearGradient",{id:`${e}-warm`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c4}),n.jsx("stop",{offset:"1",stopColor:ze.c6})]})]}),n.jsxs("g",{className:"hero-visual__lens",children:[n.jsx("g",{...qt("meet",{vars:{"--from":"70px"}}),children:n.jsx("circle",{cx:270,cy:280,r:170,fill:`url(#${e}-cool)`,opacity:".8",style:Vt("approach-r",6)})}),n.jsx("g",{...qt("meet",{vars:{"--from":"-70px"}}),children:n.jsx("circle",{cx:410,cy:280,r:170,fill:`url(#${e}-warm)`,opacity:".8",style:Vt("approach",6)})})]})]})},stackedDiscs:{viewBox:"112.5 67.5 455 455",width:455,height:455,render:()=>n.jsx("g",{className:"hero-visual__discs",children:_l.map((e,t)=>n.jsx("g",{...qt("pop",{turn:t*.025,origin:`340px ${150+58*t}px`}),children:n.jsx("ellipse",{cx:340,cy:150+58*t,rx:200-12*t,ry:46,fill:e,opacity:".8",style:Vt("floaty",7,.4*t)})},e))})},flower:{viewBox:"124 64 432 432",width:432,height:432,render:()=>n.jsx("g",{className:"hero-visual__blades",style:{transformOrigin:"340px 280px",...Vt("breathe",9)},children:$p(340,280,95,6).map((e,t)=>n.jsx("g",{...qt("unfold",{turn:t*.025,origin:"340px 280px",vars:{"--gx":`${340-e.x}px`,"--gy":`${280-e.y}px`}}),children:n.jsx("circle",{cx:e.x,cy:e.y,r:95,fill:_l[t],opacity:".6",style:Vt("gather",36)})},`${e.x},${e.y}`))})},squircles:{viewBox:"7 7 186 186",width:186,height:186,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-q1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c6}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-q2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c3}),n.jsx("stop",{offset:"1",stopColor:ze.c4})]}),n.jsxs("linearGradient",{id:`${e}-q3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:ze.c1}),n.jsx("stop",{offset:"1",stopColor:ze.c2})]})]}),[{d:"M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z",fill:`url(#${e}-q1)`,opacity:.55,idle:0,turn:0},{d:"M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z",fill:`url(#${e}-q2)`,opacity:.75,idle:.5,turn:.03},{d:"M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z",fill:`url(#${e}-q3)`,opacity:1,idle:1,turn:.06}].map(t=>n.jsx("g",{...qt("bloom",{turn:t.turn,origin:"100px 100px"}),children:n.jsx("g",{style:{transformOrigin:"100px 100px",...Vt("breathe",5,t.idle)},children:n.jsx("path",{d:t.d,fill:t.fill,opacity:t.opacity})})},t.turn))]})},dotGrid:{viewBox:"14 14 172 172",width:172,height:172,render:e=>{const t=[50,100,150].flatMap((r,a)=>[50,100,150].map((s,l)=>({cx:s,cy:r,fill:`url(#${e}-${s===100&&r===100?"n3":a===2?"n2":"n1"})`,middle:s===100&&r===100,idle:(a*3+l)*.3,turn:(a*3+l)*.015})));return n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["n1",ze.c3,ze.c4],["n2",ze.c6,ze.c5],["n3",ze.c1,ze.c2]].map(([r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:s})]},r))}),t.map(r=>n.jsx("g",{...qt("pop",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{cx:r.cx,cy:r.cy,r:18,fill:r.fill,style:r.middle?void 0:Vt("blink",2.7,r.idle)})},`${r.cx},${r.cy}`))]})}},stairs:{viewBox:"13.5 18.5 175 175",width:175,height:175,render:e=>n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["t1",ze.c6,ze.c5,110],["t2",ze.c4,ze.c3,86],["t3",ze.c3,ze.c2,62],["t4",ze.c1,ze.c2,38]].map(([t,r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${t}`,gradientUnits:"userSpaceOnUse",x1:"0",y1:s,x2:"0",y2:174,children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:r})]},t))}),[{x:24,y:110,stroke:`url(#${e}-t1)`},{x:66,y:86,stroke:`url(#${e}-t2)`},{x:108,y:62,stroke:`url(#${e}-t3)`},{x:150,y:38,stroke:`url(#${e}-t4)`}].map((t,r)=>n.jsx("g",{style:Vt("floaty",3.6,r*.3),children:n.jsx("line",{x1:t.x+14,y1:160,x2:t.x+14,y2:t.y+14,stroke:t.stroke,strokeWidth:28,strokeLinecap:"round",...wa,...qt("draw",{turn:r*.03})})},t.x))]})}},e5=Object.keys(bo);function t5({variant:e,motion:t="loop",cycleMs:r=9e3,label:a,className:s,style:l,onCycleEnd:i}){const u=o.useRef(null),c=o.useRef(i);c.current=i,o.useEffect(()=>{if(t!=="once"||!c.current)return;const d=u.current;if(!d)return;let m=!1;const f=()=>{m||(m=!0,c.current?.())};let v=d.querySelectorAll(".hero-visual__in").length;const b=g=>{g.target?.classList?.contains("hero-visual__in")&&--v<=0&&f()};d.addEventListener("animationend",b);const _=typeof d.getAnimations=="function"?d.getAnimations({subtree:!0}).map(g=>Number(g.effect?.getComputedTiming().endTime??0)).filter(g=>Number.isFinite(g)&&g>0):[],y=_.length>0?Math.max(..._):r*(1+QB),x=setTimeout(f,y+120);return()=>{d.removeEventListener("animationend",b),clearTimeout(x)}},[t,e,r]);const p=`hero-visual-${o.useId().replace(/:/g,"")}`,h=bo[e]??bo.blobs;return bo[e]||kt(`HeroVisual: \uBAA8\uB974\uB294 variant '${e}' \u2014 blobs \uB85C \uC138\uC6B4\uB2E4`),n.jsx("div",{ref:u,className:we("hero-visual",`hero-visual--${e}`,t==="still"&&"hero-visual--still",t==="once"&&"hero-visual--once",s),style:{aspectRatio:`${h.width} / ${h.height}`,"--hero-visual-cycle":`${r}ms`,...l},role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,children:n.jsx("svg",{className:"hero-visual__svg",viewBox:h.viewBox,preserveAspectRatio:"xMidYMid meet",focusable:"false",children:h.render(p)})})}function n5({enabled:e=!1,renderResultPopup:t}={}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(null),[l,i]=o.useState(null),u=f=>{let v=null;f==="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}]}:f==="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}]}:f==="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}]}:f==="order"&&(v={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(v),s(f)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:r("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:r("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:r("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:r("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),a&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}var Lp={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again.",add:"Add"},Rp={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{short}}",weekLabel:"Week {{ord}}",weekLabelCompact:"W{{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Pp={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"}},Fp={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Ip={selected:"selected"},Op={placeholder:"Select"},zp={collapse:"Collapse",expand:"Expand"},Wp={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Hp={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},Vp={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},qp={couponButton:"Enter Coupon"},Up={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},Gp={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Difficulty",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playSoundFor:"Play {{name}}",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},Kp={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},Yp={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Zp={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Xp={showN:"Show {{n}}"},Jp={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."}},Qp={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},eh={title:"Key Words",empty:"No key words available."},th={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}",pickForm:"Other forms",pickFormAria:"Change the form in cell {{n}}",pickFormBaseAria:"Change the form of the base word"},nh={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoAgeFloor:"Age {{n}}: also includes words for younger ages.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},rh={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},ah={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"}},oh={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},sh={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},lh={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlyHighUsage:"High-use words only",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},ih={lead:`IHAB builds trust
|
|
1073
1073
|
through sound
|
|
1074
|
-
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},uh={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},ch={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"},dh={clearAriaLabel:"Clear input",showPassword:"Show password"},ph={ariaLabel:"Select tab"},hh={ariaLabel:"Tabs"},mh={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},fh={ariaLabel:"User avatar"},Ch={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},gh={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},bh={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"}},yh={steps:"Step {{current}} of {{total}}"},vh={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},xh={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},_h={viewWords:"Words"},wh={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Bh={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},kh={previewRegion:"Report preview \u2014 scrollable sideways"},Ah={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Nh={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Eh={clearSelection:"Clear selection"},jh={showResult:"Show {{type}} result"},Dh={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Sh={loading:"Loading"},Th={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Mh={ariaLabel:"Breadcrumb"},$h={list:"Folders",open_one:"Open folder {{name}}, {{count}} item",open_other:"Open folder {{name}}, {{count}} items",menu:"{{name}} folder menu",placeMenu:"{{name}} menu",tree:"Show folder structure",fold:"Collapse {{name}}",unfold:"Expand {{name}}",up:"Up",upTo:"Up one level \u2014 {{name}}",add:{title:"Add Folder",sub:"Enter a name for the new folder.",placeholder:"Folder name"}},Lh={empty:"No items yet."},Rh={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"},r5={common:Lp,calendar:Rp,passCard:Pp,rating:Fp,colorPicker:Ip,dropdown:Op,accordion:zp,header:Wp,nav:Hp,settings:Vp,usage:qp,account:Up,training:Gp,customers:Kp,payment:Yp,coupons:Zp,visits:Xp,trainingType:Jp,myWordTable:Qp,keyWords:eh,wordTable:th,wordSearch:nh,wordPrint:rh,topic:ah,device:oh,manager:sh,wordPairs:lh,footer:ih,date:uh,wordData:ch,textField:dh,segmentedControl:ph,tabs:hh,fileUpload:mh,avatar:fh,myHomework:Ch,trainingStatus:gh,store:bh,progress:yh,trainingMiss:vh,table:xh,wordScore:_h,topBanner:wh,datePicker:Bh,report:kh,tooltip:Ah,phonemeProfile:Nh,bulkBar:Eh,debug:jh,badge:Dh,loader:Sh,soundCompass:Th,breadcrumb:Mh,folder:$h,board:Lh,promoBannerBg:Rh},a5=Object.freeze({__proto__:null,accordion:zp,account:Up,avatar:fh,badge:Dh,board:Lh,breadcrumb:Mh,bulkBar:Eh,calendar:Rp,colorPicker:Ip,common:Lp,coupons:Zp,customers:Kp,date:uh,datePicker:Bh,debug:jh,default:r5,device:oh,dropdown:Op,fileUpload:mh,folder:$h,footer:ih,header:Wp,keyWords:eh,loader:Sh,manager:sh,myHomework:Ch,myWordTable:Qp,nav:Hp,passCard:Pp,payment:Yp,phonemeProfile:Nh,progress:yh,promoBannerBg:Rh,rating:Fp,report:kh,segmentedControl:ph,settings:Vp,soundCompass:Th,store:bh,table:xh,tabs:hh,textField:dh,tooltip:Ah,topBanner:wh,topic:ah,training:Gp,trainingMiss:vh,trainingStatus:gh,trainingType:Jp,usage:qp,visits:Xp,wordData:ch,wordPairs:lh,wordPrint:rh,wordScore:_h,wordSearch:nh,wordTable:th});exports.Accordion=Vv,exports.ActionCard=G2,exports.Alert=Vx,exports.AppHeader=Zv,exports.AudioMeter=Rs,exports.AudioPlayer=sl,exports.Avatar=Xx,exports.Badge=rn,exports.BarChart=h_,exports.BarChartControls=ed,exports.Board=R4,exports.BottomNav=Gu,exports.BrandIdentity=Qu,exports.BrandLogo=Ju,exports.Breadcrumb=Cc,exports.BulkBar=Q4,exports.Button=fe,exports.CONSENT_KINDS=Uc,exports.CORE_VERSION=$2,exports.Calendar=F_,exports.CardSection=Mc,exports.CardStep=_p,exports.ChartLegend=js,exports.ChartSection=eo,exports.ChartTotal=Mr,exports.Checkbox=As,exports.ChoiceChips=Vw,exports.CircleBadge=Mn,exports.CodeBox=J4,exports.ColorPicker=N4,exports.CompanyMeta=W4,exports.ConfirmPopup=Ka,exports.ConfirmStep=yp,exports.ConfirmWithTextStep=vp,exports.ConsentRecordPopup=G4,exports.ContrastFilterPanel=yB,exports.CoreScope=K2,exports.CountTile=M4,exports.CouponInputPopup=_B,exports.DEFAULT_NOISE_SETTINGS=gr,exports.DatePicker=qc,exports.DebugResultLauncher=n5,exports.DescriptionTooltip=Qn,exports.DeviceSideTable=L_,exports.Dialog=L4,exports.Divider=Ox,exports.Dropdown=Nn,exports.EffectPartyPopper=gl,exports.EffectPartyPopperHost=kB,exports.EmptyState=q2,exports.ErrorBoundary=_4,exports.ErrorState=U2,exports.FILTER_ALL_VALUE=Tn,exports.FileUpload=Qx,exports.FilterPanel=Gn,exports.FilterSectionInfo=ca,exports.FolderAddPopup=l4,exports.FolderDeleteConfirmPopup=i4,exports.FolderGrid=gc,exports.FolderHead=e4,exports.FolderList=t4,exports.FolderSearchSections=u4,exports.FolderTreeButton=vc,exports.FolderTreeTooltip=yc,exports.Footer=qw,exports.GameIntro=C_,exports.HERO_VISUAL_VARIANTS=e5,exports.Header=ec,exports.HeroVisual=t5,exports.Icon=lt,exports.IconGridMenu=Hw,exports.IconRenderer=lt,exports.InfoTooltip=On,exports.ItemActions=t_,exports.KeepScreenAwake=y4,exports.LEVEL_MAX=Ir,exports.LINE_CHART_HOVER_DELAY_MS=td,exports.LandingBottomSticky=Gw,exports.LandingButton=Mx,exports.LandingCard=Tx,exports.LandingHeader=Uw,exports.LandingMenuLink=mc,exports.LandingSection=Dx,exports.LandingStatBand=Ix,exports.LandingTitle=Sx,exports.LineChart=f_,exports.ListPopup=vB,exports.ListenStep=bp,exports.Loader=Nr,exports.MARKS=Za,exports.MARK_ICON=xs,exports.MARK_VARIANT=_s,exports.MarkIcon=Pc,exports.MediaQueryOverrideContext=Ki,exports.MenuTooltip=tr,exports.NOISE_RATIO_MAX=va,exports.NOISE_RATIO_STEP=qd,exports.NoisePlayerContext=nl,exports.NoiseSettingsTooltip=cp,exports.NoticeBox=Z2,exports.NotifyTextPreview=n_,exports.OrderListStep=xp,exports.PASS_CARD_BG_VARS=pr,exports.POPUP_CLOSE_MS=Hu,exports.POS_LABEL=yd,exports.PROMO_BANNER_BG_COMPONENTS=ju,exports.PROMO_BANNER_BG_OPTIONS=lv,exports.PROMO_BANNER_BG_VARS=oa,exports.Page=co,exports.PagePopup=c4,exports.PageTitle=AB,exports.Pagination=Ns,exports.Panel=Tr,exports.PanelGrid=s4,exports.PanelRow=cn,exports.PanelRowDevice=o4,exports.PassCard=cc,exports.PassCardBg=Ax,exports.PassCardBgIHAB=Nx,exports.PassCardBgLeftColorGrid=Ex,exports.PassCardBgTwoCircle=oc,exports.PaymentPlan=kx,exports.PersonCard=P4,exports.PhonemeFilterPanel=bB,exports.PhonemeSelectBlock=CB,exports.Popup=Vn,exports.ProgressBar=w_,exports.ProgressIndicator=cd,exports.PromoBanner=zv,exports.PromoBannerBgDark=mu,exports.PromoBannerBgDeep=iu,exports.PromoBannerBgDiagonal=bu,exports.PromoBannerBgDots=vu,exports.PromoBannerBgInstagram=Eu,exports.PromoBannerBgMain=nu,exports.PromoBannerBgNaver=Au,exports.PromoBannerBgOutline=_u,exports.PromoBannerBgRadial=Cu,exports.PromoBannerBgSoft=au,exports.PromoBannerBgSoftSub=cu,exports.PromoBannerBgSub=su,exports.PromoBannerBgSuccess=Bu,exports.PromoBannerBgWarm=pu,exports.PublicationCard=I4,exports.Radio=fc,exports.RadioGroup=zx,exports.Rating=B4,exports.ReportDocument=TB,exports.ReportInfoPanel=MB,exports.RingChart=b_,exports.SENTENCE_TRAINING_TYPES=Js,exports.ScoreMarkCounts=b4,exports.SearchSummary=Gx,exports.Section=Rr,exports.SectionHeadFloat=Kc,exports.SectionHeader=z4,exports.SegmentedControl=An,exports.ShortcutBadge=hc,exports.SideNav=Xu,exports.Slider=sd,exports.SoundCompass=jx,exports.SplashLogo=O4,exports.StatChart=y_,exports.SummaryStrip=DB,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Oc,exports.Table=Fs,exports.TableFilterPanel=Gs,exports.Tabs=Kx,exports.TextBoxTooltip=io,exports.TextField=qn,exports.Timeline=F4,exports.Toast=Lr,exports.Toggle=kc,exports.Toolbar=Es,exports.Tooltip=sn,exports.TooltipInfo=On,exports.TooltipTextBox=io,exports.TopBanner=Wv,exports.TrainingBlock=O_,exports.TrainingBlockButton=ks,exports.TrainingBlockGrid=W_,exports.TrainingCard=FB,exports.TrainingCardGroup=IB,exports.TrainingPagePopup=rr,exports.TrainingPagePopupBottom=dp,exports.TrainingPagePopupTitle=pp,exports.TrainingResultPopup=Ap,exports.TrainingStep=br,exports.TrainingStepAudioPlayer=sl,exports.TrainingStepBullet=ap,exports.TrainingStepCard=ip,exports.TrainingStepConfirm=il,exports.TrainingStepConfirmWithText=ul,exports.TrainingStepListen=cl,exports.TrainingStepOrderList=dl,exports.TrainingStepTextBox=lp,exports.TrainingStepTitle=sp,exports.TrainingTooltip=zc,exports.TrainingWordCard=zs,exports.UpdateAlert=PB,exports.WAVE_A_MAX=l8,exports.WAVE_H1_PX=al,exports.WAVE_HMAX_PX=s8,exports.WORD_LABEL_I18N_KEYS=Z_,exports.WORD_TABLE_PAPER=fr,exports.WORD_TYPE_LABEL=vd,exports.WordDataProvider=jB,exports.WordDataUpdatePopup=JB,exports.WordImageTooltip=Ep,exports.WordSearchFilterPanel=gB,exports.WordSearchResultBlock=mB,exports.WordTable=Pr,exports.WordTableBlock=VB,exports.WordTableButton=UB,exports.WordTablePopup=fw,exports.WordTableThumbnail=Mp,exports.buildMonthChartData=l_,exports.cellKey=ww,exports.cellLabel=_w,exports.cellsForLabels=Lw,exports.chartTotalNumClass=mr,exports.clearPassCardBgTheme=Hn,exports.clearPromoBannerBgTheme=un,exports.closeTrainingPopup=P8,exports.companyTypeLabel=NB,exports.createTrainingScenario=O8,exports.cx=we,exports.deriveNoiseContexts=U8,exports.derivePassCard=nc,exports.draftValues=zw,exports.effectiveNoiseVolume=el,exports.effectiveSpeechVolume=Gd,exports.expandSlashLabel=Vs,exports.findDuplicateShortcuts=Vu,exports.formatDuration=Rw,exports.getControlDateRange=g_,exports.getPayloadTimestamp=hl,exports.getPromoBannerBgTheme=os,exports.getSelectedFromPayload=W8,exports.getSelectedText=H8,exports.getStepPayload=Cp,exports.getSteppedPayload=V8,exports.injectPassCardBgTheme=Wn,exports.injectPromoBannerBgTheme=ln,exports.isSelectionCorrect=q8,exports.labelOfCellKey=Hd,exports.labelsForSave=xw,exports.levelToPct=Yw,exports.markAfterClick=Lc,exports.marksForSave=Bs,exports.mergeNoiseSettings=Cr,exports.missesByType=Sw,exports.monthKeyOf=ya,exports.monthKeyOfDate=Ds,exports.nextFocus=Nw,exports.nextMisses=Dw,exports.noiseElementVolume=tl,exports.noiseRatioOf=xa,exports.orderShortcut=Va,exports.pageStartIndexes=Rc,exports.parseMonthKey=$r,exports.passCardBgIhabTheme=dc,exports.passCardBgLeftColorGridTheme=pc,exports.passCardBgTwoCircleTheme=ac,exports.pctToLevel=Zw,exports.posLabels=xd,exports.printWordTable=q_,exports.promoBannerBgDarkTheme=hu,exports.promoBannerBgDeepTheme=lu,exports.promoBannerBgDiagonalTheme=gu,exports.promoBannerBgDotsTheme=yu,exports.promoBannerBgInstagramTheme=Nu,exports.promoBannerBgMainTheme=tu,exports.promoBannerBgNaverTheme=ku,exports.promoBannerBgOutlineTheme=xu,exports.promoBannerBgRadialTheme=fu,exports.promoBannerBgSoftSubTheme=uu,exports.promoBannerBgSoftTheme=ru,exports.promoBannerBgSubTheme=ou,exports.promoBannerBgSuccessTheme=wu,exports.promoBannerBgWarmTheme=du,exports.recommendTables=Mw,exports.regenerateUnpinned=Ow,exports.removeItem=Iw,exports.resolveTrainingItems=I8,exports.resolveTrainingPopupMeta=mp,exports.reviewCells=gw,exports.reviewMeta=vw,exports.reviewSetPlan=Tw,exports.reviewTableName=yw,exports.scoreKey=Ya,exports.scoreSheetHeader=Bw,exports.shortcutCode=jr,exports.shouldConfirmDiscard=g4,exports.splitTrainingVariants=F8,exports.summarize=C4,exports.summarizeMisses=jw,exports.tableTrends=Aw,exports.toDraft=Pw,exports.toTrainingText=z8,exports.togglePin=Fw,exports.uncoveredLabels=$w,exports.useAnchoredMenu=la,exports.useBarChartControl=Qc,exports.useCalendarMonth=Wc,exports.useComboboxSuggestions=Dc,exports.useDiscardGuard=jp,exports.useFitScale=kd,exports.useNoisePlayer=ao,exports.usePagePopupClose=d4,exports.useSoundCompassExam=kv,exports.useToastLifecycle=id,exports.useValueDiscardGuard=xB,exports.useWordData=EB,exports.useWordTableDisplaySettings=zd,exports.useWordTablePrint=Xs,exports.waveBarPx=so,exports.waveBarVal=lo,exports.weakItems=kw,exports.weekValueOf=Ss,exports.withOrderShortcuts=hs,exports.withStepTimes=fp,exports.wordTypeLabels=_d;
|
|
1074
|
+
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},uh={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},ch={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"},dh={clearAriaLabel:"Clear input",showPassword:"Show password"},ph={ariaLabel:"Select tab"},hh={ariaLabel:"Tabs"},mh={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},fh={ariaLabel:"User avatar"},Ch={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},gh={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},bh={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"}},yh={steps:"Step {{current}} of {{total}}"},vh={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},xh={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},_h={viewWords:"Words"},wh={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Bh={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},kh={previewRegion:"Report preview \u2014 scrollable sideways"},Ah={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Nh={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Eh={clearSelection:"Clear selection"},jh={showResult:"Show {{type}} result"},Dh={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Sh={loading:"Loading"},Th={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Mh={ariaLabel:"Breadcrumb"},$h={list:"Folders",open_one:"Open folder {{name}}, {{count}} item",open_other:"Open folder {{name}}, {{count}} items",menu:"{{name}} folder menu",placeMenu:"{{name}} menu",tree:"Show folder structure",fold:"Collapse {{name}}",unfold:"Expand {{name}}",up:"Up",upTo:"Up one level \u2014 {{name}}",add:{title:"Add Folder",sub:"Enter a name for the new folder.",placeholder:"Folder name"}},Lh={empty:"No items yet."},Rh={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"},r5={common:Lp,calendar:Rp,passCard:Pp,rating:Fp,colorPicker:Ip,dropdown:Op,accordion:zp,header:Wp,nav:Hp,settings:Vp,usage:qp,account:Up,training:Gp,customers:Kp,payment:Yp,coupons:Zp,visits:Xp,trainingType:Jp,myWordTable:Qp,keyWords:eh,wordTable:th,wordSearch:nh,wordPrint:rh,topic:ah,device:oh,manager:sh,wordPairs:lh,footer:ih,date:uh,wordData:ch,textField:dh,segmentedControl:ph,tabs:hh,fileUpload:mh,avatar:fh,myHomework:Ch,trainingStatus:gh,store:bh,progress:yh,trainingMiss:vh,table:xh,wordScore:_h,topBanner:wh,datePicker:Bh,report:kh,tooltip:Ah,phonemeProfile:Nh,bulkBar:Eh,debug:jh,badge:Dh,loader:Sh,soundCompass:Th,breadcrumb:Mh,folder:$h,board:Lh,promoBannerBg:Rh},a5=Object.freeze({__proto__:null,accordion:zp,account:Up,avatar:fh,badge:Dh,board:Lh,breadcrumb:Mh,bulkBar:Eh,calendar:Rp,colorPicker:Ip,common:Lp,coupons:Zp,customers:Kp,date:uh,datePicker:Bh,debug:jh,default:r5,device:oh,dropdown:Op,fileUpload:mh,folder:$h,footer:ih,header:Wp,keyWords:eh,loader:Sh,manager:sh,myHomework:Ch,myWordTable:Qp,nav:Hp,passCard:Pp,payment:Yp,phonemeProfile:Nh,progress:yh,promoBannerBg:Rh,rating:Fp,report:kh,segmentedControl:ph,settings:Vp,soundCompass:Th,store:bh,table:xh,tabs:hh,textField:dh,tooltip:Ah,topBanner:wh,topic:ah,training:Gp,trainingMiss:vh,trainingStatus:gh,trainingType:Jp,usage:qp,visits:Xp,wordData:ch,wordPairs:lh,wordPrint:rh,wordScore:_h,wordSearch:nh,wordTable:th});exports.Accordion=Vv,exports.ActionCard=G2,exports.Alert=Vx,exports.AppHeader=Zv,exports.AudioMeter=Rs,exports.AudioPlayer=sl,exports.Avatar=Xx,exports.Badge=rn,exports.BarChart=h_,exports.BarChartControls=ed,exports.Board=R4,exports.BottomNav=Gu,exports.BrandIdentity=Qu,exports.BrandLogo=Ju,exports.Breadcrumb=Cc,exports.BulkBar=Q4,exports.Button=fe,exports.CONSENT_KINDS=Uc,exports.CORE_VERSION=$2,exports.Calendar=F_,exports.CardSection=Mc,exports.CardStep=_p,exports.ChartLegend=js,exports.ChartSection=to,exports.ChartTotal=Mr,exports.Checkbox=As,exports.ChoiceChips=Vw,exports.CircleBadge=Mn,exports.CodeBox=J4,exports.ColorPicker=N4,exports.CompanyMeta=W4,exports.ConfirmPopup=Ya,exports.ConfirmStep=yp,exports.ConfirmWithTextStep=vp,exports.ConsentRecordPopup=G4,exports.ContrastFilterPanel=yB,exports.CoreScope=K2,exports.CountTile=M4,exports.CouponInputPopup=_B,exports.DEFAULT_NOISE_SETTINGS=gr,exports.DatePicker=qc,exports.DebugResultLauncher=n5,exports.DescriptionTooltip=Qn,exports.DeviceSideTable=L_,exports.Dialog=L4,exports.Divider=Ox,exports.Dropdown=Nn,exports.EffectPartyPopper=gl,exports.EffectPartyPopperHost=kB,exports.EmptyState=q2,exports.ErrorBoundary=_4,exports.ErrorState=U2,exports.FILTER_ALL_VALUE=Tn,exports.FileUpload=Qx,exports.FilterPanel=Gn,exports.FilterSectionInfo=ca,exports.FolderAddPopup=l4,exports.FolderDeleteConfirmPopup=i4,exports.FolderGrid=gc,exports.FolderHead=e4,exports.FolderList=t4,exports.FolderSearchSections=u4,exports.FolderTreeButton=vc,exports.FolderTreeTooltip=yc,exports.Footer=qw,exports.GameIntro=C_,exports.HERO_VISUAL_VARIANTS=e5,exports.Header=ec,exports.HeroVisual=t5,exports.Icon=lt,exports.IconGridMenu=Hw,exports.IconRenderer=lt,exports.InfoTooltip=On,exports.ItemActions=t_,exports.KeepScreenAwake=y4,exports.LEVEL_MAX=Ir,exports.LINE_CHART_HOVER_DELAY_MS=td,exports.LandingBottomSticky=Gw,exports.LandingButton=Mx,exports.LandingCard=Tx,exports.LandingHeader=Uw,exports.LandingMenuLink=mc,exports.LandingSection=Dx,exports.LandingStatBand=Ix,exports.LandingTitle=Sx,exports.LineChart=f_,exports.ListPopup=vB,exports.ListenStep=bp,exports.Loader=Nr,exports.MARKS=Xa,exports.MARK_ICON=xs,exports.MARK_VARIANT=_s,exports.MarkIcon=Pc,exports.MediaQueryOverrideContext=Ki,exports.MenuTooltip=tr,exports.NOISE_RATIO_MAX=xa,exports.NOISE_RATIO_STEP=qd,exports.NoisePlayerContext=nl,exports.NoiseSettingsTooltip=cp,exports.NoticeBox=Z2,exports.NotifyTextPreview=n_,exports.OrderListStep=xp,exports.PASS_CARD_BG_VARS=pr,exports.POPUP_CLOSE_MS=Hu,exports.POS_LABEL=yd,exports.PROMO_BANNER_BG_COMPONENTS=ju,exports.PROMO_BANNER_BG_OPTIONS=lv,exports.PROMO_BANNER_BG_VARS=oa,exports.Page=co,exports.PagePopup=c4,exports.PageTitle=AB,exports.Pagination=Ns,exports.Panel=Tr,exports.PanelGrid=s4,exports.PanelRow=cn,exports.PanelRowDevice=o4,exports.PassCard=cc,exports.PassCardBg=Ax,exports.PassCardBgIHAB=Nx,exports.PassCardBgLeftColorGrid=Ex,exports.PassCardBgTwoCircle=oc,exports.PaymentPlan=kx,exports.PersonCard=P4,exports.PhonemeFilterPanel=bB,exports.PhonemeSelectBlock=CB,exports.Popup=Vn,exports.ProgressBar=w_,exports.ProgressIndicator=cd,exports.PromoBanner=zv,exports.PromoBannerBgDark=mu,exports.PromoBannerBgDeep=iu,exports.PromoBannerBgDiagonal=bu,exports.PromoBannerBgDots=vu,exports.PromoBannerBgInstagram=Eu,exports.PromoBannerBgMain=nu,exports.PromoBannerBgNaver=Au,exports.PromoBannerBgOutline=_u,exports.PromoBannerBgRadial=Cu,exports.PromoBannerBgSoft=au,exports.PromoBannerBgSoftSub=cu,exports.PromoBannerBgSub=su,exports.PromoBannerBgSuccess=Bu,exports.PromoBannerBgWarm=pu,exports.PublicationCard=I4,exports.Radio=fc,exports.RadioGroup=zx,exports.Rating=B4,exports.ReportDocument=TB,exports.ReportInfoPanel=MB,exports.RingChart=b_,exports.SENTENCE_TRAINING_TYPES=Js,exports.ScoreMarkCounts=b4,exports.SearchSummary=Gx,exports.Section=Rr,exports.SectionHeadFloat=Kc,exports.SectionHeader=z4,exports.SegmentedControl=An,exports.ShortcutBadge=hc,exports.SideNav=Xu,exports.Slider=sd,exports.SoundCompass=jx,exports.SplashLogo=O4,exports.StatChart=y_,exports.SummaryStrip=DB,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Oc,exports.Table=Fs,exports.TableFilterPanel=Gs,exports.Tabs=Kx,exports.TextBoxTooltip=io,exports.TextField=qn,exports.Timeline=F4,exports.Toast=Lr,exports.Toggle=kc,exports.Toolbar=Es,exports.Tooltip=sn,exports.TooltipInfo=On,exports.TooltipTextBox=io,exports.TopBanner=Wv,exports.TrainingBlock=O_,exports.TrainingBlockButton=ks,exports.TrainingBlockGrid=W_,exports.TrainingCard=FB,exports.TrainingCardGroup=IB,exports.TrainingPagePopup=rr,exports.TrainingPagePopupBottom=dp,exports.TrainingPagePopupTitle=pp,exports.TrainingResultPopup=Ap,exports.TrainingStep=br,exports.TrainingStepAudioPlayer=sl,exports.TrainingStepBullet=ap,exports.TrainingStepCard=ip,exports.TrainingStepConfirm=il,exports.TrainingStepConfirmWithText=ul,exports.TrainingStepListen=cl,exports.TrainingStepOrderList=dl,exports.TrainingStepTextBox=lp,exports.TrainingStepTitle=sp,exports.TrainingTooltip=zc,exports.TrainingWordCard=zs,exports.UpdateAlert=PB,exports.WAVE_A_MAX=l8,exports.WAVE_H1_PX=al,exports.WAVE_HMAX_PX=s8,exports.WORD_LABEL_I18N_KEYS=Z_,exports.WORD_TABLE_PAPER=fr,exports.WORD_TYPE_LABEL=vd,exports.WordDataProvider=jB,exports.WordDataUpdatePopup=JB,exports.WordImageTooltip=Ep,exports.WordSearchFilterPanel=gB,exports.WordSearchResultBlock=mB,exports.WordTable=Pr,exports.WordTableBlock=VB,exports.WordTableButton=UB,exports.WordTablePopup=fw,exports.WordTableThumbnail=Mp,exports.buildMonthChartData=l_,exports.cellKey=ww,exports.cellLabel=_w,exports.cellsForLabels=Lw,exports.chartTotalNumClass=mr,exports.clearPassCardBgTheme=Hn,exports.clearPromoBannerBgTheme=un,exports.closeTrainingPopup=P8,exports.companyTypeLabel=NB,exports.createTrainingScenario=O8,exports.cx=we,exports.deriveNoiseContexts=U8,exports.derivePassCard=nc,exports.draftValues=zw,exports.effectiveNoiseVolume=el,exports.effectiveSpeechVolume=Gd,exports.expandSlashLabel=Vs,exports.findDuplicateShortcuts=Vu,exports.formatDuration=Rw,exports.getControlDateRange=g_,exports.getPayloadTimestamp=hl,exports.getPromoBannerBgTheme=os,exports.getSelectedFromPayload=W8,exports.getSelectedText=H8,exports.getStepPayload=Cp,exports.getSteppedPayload=V8,exports.injectPassCardBgTheme=Wn,exports.injectPromoBannerBgTheme=ln,exports.isSelectionCorrect=q8,exports.labelOfCellKey=Hd,exports.labelsForSave=xw,exports.levelToPct=Yw,exports.markAfterClick=Lc,exports.marksForSave=Bs,exports.mergeNoiseSettings=Cr,exports.missesByType=Sw,exports.monthKeyOf=ya,exports.monthKeyOfDate=Ds,exports.nextFocus=Nw,exports.nextMisses=Dw,exports.noiseElementVolume=tl,exports.noiseRatioOf=_a,exports.orderShortcut=qa,exports.pageStartIndexes=Rc,exports.parseMonthKey=$r,exports.passCardBgIhabTheme=dc,exports.passCardBgLeftColorGridTheme=pc,exports.passCardBgTwoCircleTheme=ac,exports.pctToLevel=Zw,exports.posLabels=xd,exports.printWordTable=q_,exports.promoBannerBgDarkTheme=hu,exports.promoBannerBgDeepTheme=lu,exports.promoBannerBgDiagonalTheme=gu,exports.promoBannerBgDotsTheme=yu,exports.promoBannerBgInstagramTheme=Nu,exports.promoBannerBgMainTheme=tu,exports.promoBannerBgNaverTheme=ku,exports.promoBannerBgOutlineTheme=xu,exports.promoBannerBgRadialTheme=fu,exports.promoBannerBgSoftSubTheme=uu,exports.promoBannerBgSoftTheme=ru,exports.promoBannerBgSubTheme=ou,exports.promoBannerBgSuccessTheme=wu,exports.promoBannerBgWarmTheme=du,exports.recommendTables=Mw,exports.regenerateUnpinned=Ow,exports.removeItem=Iw,exports.resolveTrainingItems=I8,exports.resolveTrainingPopupMeta=mp,exports.reviewCells=gw,exports.reviewMeta=vw,exports.reviewSetPlan=Tw,exports.reviewTableName=yw,exports.scoreKey=Za,exports.scoreSheetHeader=Bw,exports.shortcutCode=jr,exports.shouldConfirmDiscard=g4,exports.splitTrainingVariants=F8,exports.summarize=C4,exports.summarizeMisses=jw,exports.tableTrends=Aw,exports.toDraft=Pw,exports.toTrainingText=z8,exports.togglePin=Fw,exports.uncoveredLabels=$w,exports.useAnchoredMenu=la,exports.useBarChartControl=Qc,exports.useCalendarMonth=Wc,exports.useComboboxSuggestions=Dc,exports.useDiscardGuard=jp,exports.useFitScale=kd,exports.useNoisePlayer=ao,exports.usePagePopupClose=d4,exports.useSoundCompassExam=kv,exports.useToastLifecycle=id,exports.useValueDiscardGuard=xB,exports.useWordData=EB,exports.useWordTableDisplaySettings=zd,exports.useWordTablePrint=Xs,exports.waveBarPx=so,exports.waveBarVal=lo,exports.weakItems=kw,exports.weekValueOf=Ss,exports.withOrderShortcuts=hs,exports.withStepTimes=fp,exports.wordTypeLabels=_d;
|