text: import{a as L}from"./chunk-H3M42MG7.js";import"./chunk-DM5NY3YK.js";import{a as o}from"./chunk-VUS6EPYV.js";import{a as B}from"./chunk-WG26DURV.js";import{a as T}from"./chunk-ZGJUBLOJ.js";import{a as S}from"./chunk-BGUCBFYN.js";import"./chunk-CQHRZYSX.js";import{a as w}from"./chunk-JJR4MJC5.js";import"./chunk-E4LGDQH2.js";import{a as d}from"./chunk-7DWVT37O.js";import"./chunk-MED54ICD.js";import"./chunk-IRVI43RT.js";import{a as C}from"./chunk-X5QSVM3M.js";import"./chunk-XKBBMJSB.js";import{a as l}from"./chunk-CAKCK4NI.js";import"./chunk-S4JGXK5I.js";import{a as u}from"./chunk-VOWLBX22.js";import{a as n}from"./chunk-GMERTW32.js";import"./chunk-IPCPLARM.js";import"./chunk-SGJW3QOZ.js";import{a as F}from"./chunk-LZ2L2TIX.js";import{a as E}from"./chunk-EUWXZKWZ.js";import"./chunk-KE767BLN.js";import"./chunk-TUVTWIHM.js";import"./chunk-RTMHI3L7.js";import{a as b}from"./chunk-TUVTX7TQ.js";import"./chunk-IWE7LPGP.js";import{b as p}from"./chunk-SBFBOIF5.js";import"./chunk-VWFYI5BK.js";import"./chunk-QVWAWWED.js";import"./chunk-4QNYZHAB.js";import"./chunk-PYHGZC4L.js";import{a as k}from"./chunk-D76XH5RX.js";import"./chunk-MA3AC62H.js";import"./chunk-IWF73C7V.js";import{a as y}from"./chunk-YJHKALOE.js";import"./chunk-ZMMQFEZR.js";import"./chunk-DTSXLBNB.js";import"./chunk-NCV3HP3S.js";import{a as v}from"./chunk-YG74QOJP.js";import"./chunk-STY5NEH4.js";import"./chunk-M7Q5FD7X.js";import{a as g}from"./chunk-K2U7JEMX.js";import"./chunk-PUAVFQTB.js";import{i as I,ua as N}from"./chunk-OHKPSLFK.js";import{a as s}from"./chunk-EJREXK3Y.js";function A(e){return e?o("-2","Worn"):""}function D(e){return o(e[0],e[1])}function h(e,t){return o("0","All")+A(t)+o("-1","Main")+k(e).map(D).join("")}var r,a,P,m=0,i,f;function H(){let e=E(N,p.lastElementChild);return s.cmd==="crafting"?e[1]:e[0]}function M(e){let t=u(),c=e[0].parentNode;n(t,c),n(f,t)}function j(){f||(f=u({className:"fshItemGrid"}),a.forEach(M),C(r.parentNode,f),w(r))}function G(e){return m!==0&&e[2]!==m}function V(e){return i.checked&&e[3]!=="Perfect"}function W(e){let t=e[0].parentNode.parentNode;S(t,G(e)||V(e))}function x(){j(),a.forEach(W)}function q(e){if(!b("fshFolder",e.target))return;let t=Number(e.target.dataset.folder);t!==m&&(m=t,x())}function Q(e){return e.equipped?-2:e.folder_id}function R(e){let t=P[e[1]];t&&e.push(Q(t),t.craft)}function _(){a.forEach(R)}function z(e){let t=r.parentNode.parentNode.previousElementSibling.children[0];return t.classList.add("fshCenter"),v(t,q),l(t,h(e,!0)),t}function J(e){if(s.cmd==="crafting"){i={checked:!1};return}let t=B({className:"fshVMid",innerHTML:'<span class="fshLink">Perfect</span> '});i=T({className:"fshVMid",type:"checkbox"}),g(i,"change",x),n(t,i),l(e," &ensp;"),n(e,t)}function K(e){if(e.items&&r){P=e.items,d(4,_);let t=z(e.folders);J(t)}}function O(e){let{tipped:t}=e.dataset,c=t.match(I);return[e,c[2]]}function U(){r=H(),a=F("img",r).map(O)}function X(){y()&&p&&(L().then(K),d(3,U))}export{X as default};
  //# sourceMappingURL=craftForge-HBI2K2YI.js.map
  