1import{r as U,$ as re,j as H,d as Mr,I as Fe,h as Fr,u as Hr}from"./chunk-OIYGIGL5-gwPc8tBz.js";import{q as Le,s as Kr}from"./misc-abrRjE04.js";import{G as Ur}from"./module-DCWKsDGT.js";import{p as Wr,s as He,I as Zr,u as Vr}from"./navigation-BVMU57in.js";import{u as Pt}from"./useQuery-CX2P7KRE.js";import{t as be,u as it,T as qr}from"./trpc-tanstack-CcrFfedX.js";import{h as Ze,j as Yr,v as Gr,G as ft,J as Dt,f as Xr,d as Qr,w as Jr,K as ei,L as ti,M as ri,r as Ke,N as ii,O as Tt}from"./tooltip-BIt4K4VP.js";import{u as At,e as ke,r as Ot,d as Te,A as ni,p as ai,D as Ce,x as si,f as Nt,l as Be,m as oi,i as ze,y as nt,g as li,h as Je,G as di,H as ci,t as ui,q as et,c as ve,$ as hi,s as fi}from"./cx-JWMrrZN5.js";import{a4 as pt,a5 as pi,a6 as mi,a7 as gi,a8 as vi,V as yi,o as bi,p as xi,q as wi,r as _i,s as mt,t as Ee,u as Ie,y as ki,v as Ci,a2 as at,a9 as Si,aa as $i,ab as zi,h as gt,C as Ei,P as Lt,H as Ii,G as Ri,E as Ve,U as Pi,b as Di,D as qe,T as Ti,m as Ai,ac as Oi,K as Ni,M as Li,L as Bi,a as ji,F as Mi,N as Fi,O as Bt,Q as Hi,R as Ki,S as Ui,ad as Wi,ae as Zi,af as Vi,ag as qi}from"./Dialog-Cbo2mfOd.js";import{l as Yi}from"./bundle-mjs-BWt8Cp2A.js";import{a as st,C as Gi}from"./checkbox-COISbaUw.js";import{a as Ge}from"./index-BnGtwJ93.js";import{B as xe,L as Xi}from"./button-C-rmsvyO.js";import{i as Qi}from"./is-react-component-CT1NlcGF.js";import{u as ot}from"./useMutation-DZfcQAwJ.js";let ge=typeof document<"u"&&window.visualViewport;function Ji(){let f=At(),[t,e]=U.useState(()=>f?{width:0,height:0}:vt());return U.useEffect(()=>{let i=()=>{ge&&ge.scale>1||e(s=>{let n=vt();return n.width===s.width&&n.height===s.height?s:n})},a,r=s=>{ge&&ge.scale>1||pt(s.target)&&(a=requestAnimationFrame(()=>{(!document.activeElement||!pt(document.activeElement))&&e(n=>{let l={width:window.innerWidth,height:window.innerHeight};return l.width===n.width&&l.height===n.height?n:l})}))};return window.addEventListener("blur",r,!0),ge?ge.addEventListener("resize",i):window.addEventListener("resize",i),()=>{cancelAnimationFrame(a),window.removeEventListener("blur",r,!0),ge?ge.removeEventListener("resize",i):window.removeEventListener("resize",i)}},[]),t}function vt(){return{width:ge?ge.width*ge.scale:window.innerWidth,height:ge?ge.height*ge.scale:window.innerHeight}}function en(f,t,e){let{overlayProps:i,underlayProps:a}=pi({...f,isOpen:t.isOpen,onClose:t.close},e);return mi({isDisabled:!t.isOpen}),gi(),U.useEffect(()=>{if(t.isOpen&&e.current)return vi([e.current],{shouldUseInert:!0})},[t.isOpen,e]),{modalProps:ke(i),underlayProps:a}}const lt=new WeakMap;function tt(f,t){var e;let{id:i}=(e=lt.get(f))!==null&&e!==void 0?e:{};if(!i)throw new Error("Unknown list");return`${i}-${tn(t)}`}function tn(f){return typeof f=="string"?f.replace(/\s*/g,""):""+f}function rn(f,t,e){let{isVirtualized:i,keyboardDelegate:a,layoutDelegate:r,onAction:s,disallowTypeAhead:n,linkBehavior:l="action",keyboardNavigationBehavior:c="arrow",escapeKeyBehavior:p="clearSelection",shouldSelectOnPressUp:g}=f;!f["aria-label"]&&!f["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:b}=yi({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:e,keyboardDelegate:a,layoutDelegate:r,isVirtualized:i,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:f.shouldFocusWrap,linkBehavior:l,disallowTypeAhead:n,autoFocus:f.autoFocus,escapeKeyBehavior:p}),h=Ot(f.id);lt.set(t,{id:h,onAction:s,linkBehavior:l,keyboardNavigationBehavior:c,shouldSelectOnPressUp:g});let v=bi({selectionManager:t.selectionManager,hasItemActions:!!s}),u=xi(e,{isDisabled:t.collection.size!==0}),y=Te(f,{labelable:!0}),m=ke(y,{role:"grid",id:h,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:u?-1:0}:b,v);return i&&(m["aria-rowcount"]=t.collection.size,m["aria-colcount"]=1),wi({},t),{gridProps:m}}const yt={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function nn(f,t,e){var i,a;let{node:r,isVirtualized:s}=f,{direction:n}=Ze(),{onAction:l,linkBehavior:c,keyboardNavigationBehavior:p,shouldSelectOnPressUp:g}=lt.get(t),b=ni(),h=U.useRef(null),v=()=>{var P;e.current!==null&&(h.current!=null&&r.key!==h.current||!(!((P=e.current)===null||P===void 0)&&P.contains(document.activeElement)))&&Ce(e.current)},u={},y=f.hasChildItems,m=t.selectionManager.isLink(r.key);if(r!=null&&"expandedKeys"in t){var _,k;let P=(_=(k=t.collection).getChildren)===null||_===void 0?void 0:_.call(k,r.key);y=y||[...P??[]].length>1,l==null&&!m&&t.selectionManager.selectionMode==="none"&&y&&(l=()=>t.toggleKey(r.key));let G=y?t.expandedKeys.has(r.key):void 0,j=1;if(r.level>0&&r?.parentKey!=null){let te=t.collection.getItem(r.parentKey);
1if(te){var $,S;j=[...($=(S=t.collection).getChildren)===null||$===void 0?void 0:$.call(S,te.key)].filter(J=>J.type==="item").length}}else j=[...t.collection].filter(te=>te.level===0&&te.type==="item").length;u={"aria-expanded":G,"aria-level":r.level+1,"aria-posinset":r?.index+1,"aria-setsize":j}}let{itemProps:E,...R}=_i({selectionManager:t.selectionManager,key:r.key,ref:e,isVirtualized:s,shouldSelectOnPressUp:f.shouldSelectOnPressUp||g,onAction:l||!((i=r.props)===null||i===void 0)&&i.onAction?ai((a=r.props)===null||a===void 0?void 0:a.onAction,l?()=>l(r.key):void 0):void 0,focus:v,linkBehavior:c}),B=P=>{if(!P.currentTarget.contains(P.target)||!e.current||!document.activeElement)return;let G=mt(e.current);if(G.currentNode=document.activeElement,"expandedKeys"in t&&document.activeElement===e.current){if(P.key===yt.expand[n]&&t.selectionManager.focusedKey===r.key&&y&&!t.expandedKeys.has(r.key)){t.toggleKey(r.key),P.stopPropagation();return}else if(P.key===yt.collapse[n]&&t.selectionManager.focusedKey===r.key&&y&&t.expandedKeys.has(r.key)){t.toggleKey(r.key),P.stopPropagation();return}}switch(P.key){case"ArrowLeft":if(p==="arrow"){let te=n==="rtl"?G.nextNode():G.previousNode();if(te)P.preventDefault(),P.stopPropagation(),Ce(te),Ee(te,{containingElement:Ie(e.current)});else if(P.preventDefault(),P.stopPropagation(),n==="rtl")Ce(e.current),Ee(e.current,{containingElement:Ie(e.current)});else{G.currentNode=e.current;let O=bt(G);O&&(Ce(O),Ee(O,{containingElement:Ie(e.current)}))}}break;case"ArrowRight":if(p==="arrow"){let te=n==="rtl"?G.previousNode():G.nextNode();if(te)P.preventDefault(),P.stopPropagation(),Ce(te),Ee(te,{containingElement:Ie(e.current)});else if(P.preventDefault(),P.stopPropagation(),n==="ltr")Ce(e.current),Ee(e.current,{containingElement:Ie(e.current)});else{G.currentNode=e.current;let O=bt(G);O&&(Ce(O),Ee(O,{containingElement:Ie(e.current)}))}}break;case"ArrowUp":case"ArrowDown":if(!P.altKey&&e.current.contains(P.target)){var j;P.stopPropagation(),P.preventDefault(),(j=e.current.parentElement)===null||j===void 0||j.dispatchEvent(new KeyboardEvent(P.nativeEvent.type,P.nativeEvent))}break}},I=P=>{if(h.current=r.key,P.target!==e.current){si()||t.selectionManager.setFocusedKey(r.key);return}},M=P=>{if(!(!P.currentTarget.contains(P.target)||!e.current||!document.activeElement))switch(P.key){case"Tab":if(p==="tab"){let G=mt(e.current,{tabbable:!0});G.currentNode=document.activeElement,(P.shiftKey?G.previousNode():G.nextNode())&&P.stopPropagation()}}},Q=Yi(r.props),C=R.hasAction?Q:{},L=ke(E,C,{role:"row",onKeyDownCapture:B,onKeyDown:M,onFocus:I,"aria-label":r["aria-label"]||r.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(r.key)?t.selectionManager.isSelected(r.key):void 0,"aria-disabled":t.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":b&&(r["aria-label"]||r.textValue)?`${tt(t,r.key)} ${b}`:void 0,id:tt(t,r.key)});if(s){let{collection:P}=t,G=[...P];L["aria-rowindex"]=G.find(j=>j.type==="section")?[...P.getKeys()].filter(j=>{var te;return((te=P.getItem(j))===null||te===void 0?void 0:te.type)!=="section"}).findIndex(j=>j===r.key)+1:r.index+1}let d={role:"gridcell","aria-colindex":1};return{rowProps:{...ke(L,u)},gridCellProps:d,descriptionProps:{id:b},...R}}function bt(f){let t=null,e=null;do e=f.lastChild(),e&&(t=e);while(e);return t}function an(f,t){let{key:e}=f;const{checkboxProps:i}=ki(f,t);return{checkboxProps:{...i,"aria-labelledby":`${i.id} ${tt(t,e)}`}}}function sn(f,t,e){let{gridProps:i}=rn(f,t,e);return i.role="treegrid",{gridProps:i}}var jt={};jt={collapse:"Ø·Ù",expand:"تÙ
Ø¯ÙØ¯"};var Mt={};Mt={collapse:"Свиване",expand:"РазÑиÑÑване"};var Ft={};Ft={collapse:"Sbalit",expand:"Roztáhnout"};var Ht={};Ht={collapse:"Skjul",expand:"Udvid"};var Kt={};Kt={collapse:"Reduzieren",expand:"Erweitern"};var Ut={};Ut={collapse:"ΣÏμÏÏÏ
ξη",expand:"ÎνάÏÏÏ
ξη"};var Wt={};Wt={expand:"Expand",collapse:"Collapse"};var Zt={};Zt={collapse:"Contraer",expand:"Ampliar"};var Vt={};Vt={collapse:"Ahenda",expand:"Laienda"};var qt={};qt={collapse:"Pienennä",expand:"Laajenna"};var Yt={};Yt={collapse:"Réduire",expand:"Développer"};var Gt={};Gt={collapse:"××××¥",expand:"×ר××"};var Xt={};Xt={collapse:"Sažmi",expand:"ProÅ¡iri"};var Qt={};Qt={collapse:"Ãsszecsukás",expand:"Kibontás"};var Jt={};Jt={collapse:"Comprimi",expand:"Espandi"};var er={};er={collapse:"æãããã",expand:"å±é"};var tr={};tr={collapse:"ì 기",expand:"í¼ì¹ê¸°"};var rr={};rr={collapse:"Sutraukti",expand:"IÅ¡skleisti"};var ir={};ir={collapse:"Sakļaut",expand:"IzvÄrst"};var nr={};nr={collapse:"Skjul",expand:"Utvid"};var ar={};ar={collapse:"Samenvouwen",expand:"Uitvouwen"};var sr={};sr={collapse:"ZwiÅ",expand:"RozwiÅ"};var or={};or={collapse:"Recolher",expand:"Expandir"};var lr={};lr={collapse:"Colapsar",expand:"Expandir"};var dr={};dr={collapse:"RestrângeÈi",expand:"ExtindeÈi"};var cr={};cr={collapse:"СвеÑнÑÑÑ",expand:"РазвеÑнÑÑÑ"};var ur={};ur={collapse:"ZbaliÅ¥",expand:"RozbaliÅ¥"};var hr={};hr={collapse:"Strni",expand:"RazÅ¡iri"};var fr={};fr={collapse:" Skupi",expand:"ProÅ¡iri"};var pr={};pr={collapse:"Dölj",expand:"Expandera"};var mr={};mr={collapse:"Daralt",expand:"GeniÅlet"};var gr={};gr={collapse:"ÐгоÑнÑÑи",expand:"РозгоÑнÑÑи"};var vr={};vr={collapse:"æå ",expand:"æ©å±"};var yr={};yr={collapse:"æ¶å",expand:"å±é"};var br={};br={"ar-AE":jt,"bg-BG":Mt,"cs-CZ":Ft,"da-DK":Ht,"de-DE":Kt,"el-GR":Ut,"en-US":Wt,"es-ES":Zt,"et-EE":Vt,"fi-FI":qt,"fr-FR":Yt,"he-IL":Gt,"hr-HR":Xt,"hu-HU":Qt,"it-IT":Jt,"ja-JP":er,"ko-KR":tr,"lt-LT":rr,"lv-LV":ir,"nb-NO":nr,"nl-NL":ar,"pl-PL":sr,"pt-BR":or,"pt-PT":lr,"ro-RO":dr,"ru-RU":cr,"sk-SK":ur,"sl-SI":hr,"sr-SP":fr,"sv-SE":pr,"tr-TR":mr,"uk-UA":gr,"zh-CN":vr,"zh-TW":yr};function on(f){return f&&f.__esModule?f.default:f}function xr(f,t,e){let{node:i}=f,a=nn(f,t,e),r=a.rowProps["aria-expanded"]===!0,s=Ci(on(br),"@react-aria/tree"),n=Yr({"aria-label":r?s.format("collapse"):s.format("exp
1and"),"aria-labelledby":a.rowProps.id}),l={onPress:()=>{a.isDisabled||(t.toggleKey(i.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...n};return{...a,expandButtonProps:l}}const ln=U.createContext(null),dt=U.createContext(null),dn=U.forwardRef(function(t,e){if(U.useContext(dt))return re.createElement(xt,{...t,modalRef:e},t.children);let{isDismissable:a,isKeyboardDismissDisabled:r,isOpen:s,defaultOpen:n,onOpenChange:l,children:c,isEntering:p,isExiting:g,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:h,...v}=t;return re.createElement(wr,{isDismissable:a,isKeyboardDismissDisabled:r,isOpen:s,defaultOpen:n,onOpenChange:l,isEntering:p,isExiting:g,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:h},re.createElement(xt,{...v,modalRef:e},c))});function cn(f,t){[f,t]=Nt(f,t,ln);let e=U.useContext(at),i=Gr(f),a=f.isOpen!=null||f.defaultOpen!=null||!e?i:e,r=Be(t),s=U.useRef(null),n=ft(r,a.isOpen),l=ft(s,a.isOpen),c=n||l||f.isExiting||!1,p=At();return!a.isOpen&&!c||p?null:re.createElement(un,{...f,state:a,isExiting:c,overlayRef:r,modalRef:s})}const wr=U.forwardRef(cn);function un({UNSTABLE_portalContainer:f,...t}){let e=t.modalRef,{state:i}=t,{modalProps:a,underlayProps:r}=en(t,i,e),s=Dt(t.overlayRef)||t.isEntering||!1,n=ze({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:s,isExiting:t.isExiting,state:i}}),l=Ji(),c;if(typeof document<"u"){let g=$i(document.body)?document.body:document.scrollingElement||document.documentElement,b=g.getBoundingClientRect().height%1;c=g.scrollHeight-b}let p={...n.style,"--visual-viewport-height":l.height+"px","--page-height":c!==void 0?c+"px":void 0};return re.createElement(zi,{isExiting:t.isExiting,portalContainer:f},re.createElement("div",{...ke(Te(t,{global:!0}),r),...n,style:p,ref:t.overlayRef,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},re.createElement(nt,{values:[[dt,{modalProps:a,modalRef:e,isExiting:t.isExiting,isDismissable:t.isDismissable}],[at,i]]},n.children)))}function xt(f){let{modalProps:t,modalRef:e,isExiting:i,isDismissable:a}=U.useContext(dt),r=U.useContext(at),s=U.useMemo(()=>oi(f.modalRef,e),[f.modalRef,e]),n=Be(s),l=Dt(n),c=ze({...f,defaultClassName:"react-aria-Modal",values:{isEntering:l,isExiting:i,state:r}});return re.createElement("div",{...ke(Te(f,{global:!0}),t),...c,ref:n,"data-entering":l||void 0,"data-exiting":i||void 0},a&&re.createElement(Si,{onDismiss:r.close}),c.children)}class hn{shouldInvalidate(t,e){return t.width!==e.width||t.height!==e.height}shouldInvalidateLayoutOptions(t,e){return t!==e}update(t){}getItemRect(t){var e,i;return(i=(e=this.getLayoutInfo(t))===null||e===void 0?void 0:e.rect)!==null&&i!==void 0?i:null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}class Se{copy(){let t=new Se(this.type,this.key,this.rect.copy());return t.estimatedSize=this.estimatedSize,t.opacity=this.opacity,t.transform=this.transform,t.parentKey=this.parentKey,t.content=this.content,t.isSticky=this.isSticky,t.zIndex=this.zIndex,t.allowOverflow=this.allowOverflow,t}constructor(t,e,i){this.type=t,this.key=e,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}}class $e{copy(){return new $e(this.x,this.y)}equals(t){return this.x===t.x&&this.y===t.y}isOrigin(){return this.x===0&&this.y===0}constructor(t=0,e=0){this.x=t,this.y=e}}class he{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new $e(this.x,this.y)}get topRight(){return new $e(this.maxX,this.y)}get bottomLeft(){return new $e(this.x,this.maxY)}get bottomRight(){return new $e(this.maxX,this.maxY)}intersects(t){return this.area>0&&t.area>0&&this.x<=t.x+t.width&&t.x<=this.x+this.width&&this.y<=t.y+t.height&&t.y<=this.y+this.height}containsRect(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.maxX&&this.maxY>=t.maxY}containsPoint(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.x&&this.maxY>=t.y}
1getCornerInRect(t){for(let e of["topLeft","topRight","bottomLeft","bottomRight"])if(t.containsPoint(this[e]))return e;return null}equals(t){return t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}pointEquals(t){return this.x===t.x&&this.y===t.y}sizeEquals(t){return this.width===t.width&&this.height===t.height}union(t){let e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.maxX,t.maxX)-e,r=Math.max(this.maxY,t.maxY)-i;return new he(e,i,a,r)}intersection(t){if(!this.intersects(t))return new he(0,0,0,0);let e=Math.max(this.x,t.x),i=Math.max(this.y,t.y);return new he(e,i,Math.min(this.maxX,t.maxX)-e,Math.min(this.maxY,t.maxY)-i)}copy(){return new he(this.x,this.y,this.width,this.height)}constructor(t=0,e=0,i=0,a=0){this.x=t,this.y=e,this.width=i,this.height=a}}class De{copy(){return new De(this.width,this.height)}equals(t){return this.width===t.width&&this.height===t.height}get area(){return this.width*this.height}constructor(t=0,e=0){this.width=Math.max(t,0),this.height=Math.max(e,0)}}let fn=0;class _r{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(t){let e=this.reusableViews.get(t);return e&&e.length>0?e.shift():new mn(this.virtualizer,this,t)}reuseChild(t){t.prepareForReuse();let e=this.reusableViews.get(t.viewType);e||(e=[],this.reusableViews.set(t.viewType,e)),e.push(t)}constructor(t,e){this.virtualizer=t,this.key=++fn,this.viewType=e,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}}class pn extends _r{constructor(t){super(t,"root")}}class mn extends _r{constructor(t,e,i){super(t,i),this.parent=e}}function gn(f,t){if(f===t)return!0;if(f.size!==t.size)return!1;for(let e of f)if(!t.has(e))return!1;return!0}class vn{setVisibleRect(t){let e=performance.now()-this.startTime;e<500&&(t.x!==this.visibleRect.x&&e>0&&(this.velocity.x=(t.x-this.visibleRect.x)/e),t.y!==this.visibleRect.y&&e>0&&(this.velocity.y=(t.y-this.visibleRect.y)/e)),this.startTime=performance.now(),this.visibleRect=t}getOverscannedRect(){let t=this.visibleRect.copy(),e=this.visibleRect.height/3;if(t.height+=e,this.velocity.y<0&&(t.y-=e),this.velocity.x!==0){let i=this.visibleRect.width/3;t.width+=i,this.velocity.x<0&&(t.x-=i)}return t}constructor(){this.startTime=0,this.velocity=new $e(0,0),this.visibleRect=new he}}class yn{isPersistedKey(t){if(this.persistedKeys.has(t))return!0;for(let e of this.persistedKeys)for(;e!=null;){let i=this.layout.getLayoutInfo(e);if(!i||i.parentKey==null)break;if(e=i.parentKey,e===t)return!0}return!1}getParentView(t){return t.parentKey!=null?this._visibleViews.get(t.parentKey):this._rootView}getReusableView(t){let i=this.getParentView(t).getReusableView(t.type);return i.layoutInfo=t,this._renderView(i),i}_renderView(t){if(t.layoutInfo){let{type:e,key:i,content:a}=t.layoutInfo;t.content=a||this.collection.getItem(i),t.rendered=this._renderContent(e,t.content)}}_renderContent(t,e){let i=e!=null?this._renderedContent.get(e):null;if(i!=null)return i;let a=this.delegate.renderView(t,e);return e&&this._renderedContent.set(e,a),a}keyAtPoint(t){let e=new he(t.x,t.y,1,1),i=e.area===0?[]:this.layout.getVisibleLayoutInfos(e);for(let a of i)if(a.rect.intersects(e))return a.key;return null}relayout(t={}){this.layout.update(t),this.contentSize=this.layout.getContentSize();let e=this.visibleRect,i=t.contentChanged?0:e.x,a=t.contentChanged?0:e.y;if(i=Math.max(0,Math.min(this.contentSize.width-e.width,i)),a=Math.max(0,Math.min(this.contentSize.height-e.height,a)),i!==e.x||a!==e.y){let r=new he(i,a,e.width,e.height);this.delegate.setVisibleRect(r)}else this.updateSubviews()}getVisibleLayoutInfos(){let t;t=this._overscanManager.getOverscannedRect();let e=this.layout.getVisibleLayoutInfos(t),i=new Map;for(let a of e)i.set(a.key,a);return i}updateSubviews(){let t=this.getVisibleLayoutInfos(),e=new Set;for(let[i,a]of this._visibleViews){let r=t.get(i);(!r||a.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),a.parent.reuseChild(a),e.add(a))}for(let[i,a]of t){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(a),r.parent.children.add(r),this._visibleViews.set(i,r),e.delete(r);else{r.layoutInfo=a;let s=this.collection.getItem(a.key);r.content!==s&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r))}}for(let i of e)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of t.keys()){let a=this._visibleViews.get(i);a.parent.children.delete(a),a.parent.children.add(a)}}render(t){let e=this,i=!1,a=!1,r=!1,s=!1,n=!1,l=!1;return t.collection!==this.collection&&(e.collection=t.collection,i=!0),(t.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),t.layout.virtualizer=this,e.layout=t.layout,i=!0),t.persistedKeys&&!gn(t.persistedKeys,this.persistedKeys)&&(e.persistedKeys=t.persistedKeys,l=!0),this.visibleRect.equals(t.visibleRect)||(this._overscanManager.setVisibleRect(t.visibleRect),this.layout.shouldInvalidate(t.visibleRect,this.visibleRect)?(a=!t.visibleRect.pointEquals(this.visibleRect),r=!t.visibleRect.sizeEquals(this.visibleRect),i=!0):l=!0,e.visibleRect=t.visibleRect),t.invalidationContext!==this._invalidationContext&&(t.invali
1dationContext&&(r||(r=t.invalidationContext.sizeChanged||!1),a||(a=t.invalidationContext.offsetChanged||!1),s||(s=t.invalidationContext.itemSizeChanged||!1),n||(n=t.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&t.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(t.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions)),i||(i=s||r||a||n)),this._invalidationContext=t.invalidationContext),t.isScrolling!==this._isScrolling&&(this._isScrolling=t.isScrolling,t.isScrolling||(l=!0)),i?this.relayout({offsetChanged:a,sizeChanged:r,itemSizeChanged:s,layoutOptionsChanged:n,layoutOptions:this._invalidationContext.layoutOptions}):l&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(t){return this._visibleViews.get(t)}invalidate(t){this.delegate.invalidate(t)}updateItemSize(t,e){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(t,e)&&this.invalidate({itemSizeChanged:!0})}constructor(t){this.delegate=t.delegate,this.collection=t.collection,this.layout=t.layout,this.contentSize=new De,this.visibleRect=new he,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new pn(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new vn}}const bn=typeof document<"u"?re.useLayoutEffect:()=>{};function xn(f){let[t,e]=U.useState(new he(0,0,0,0)),[i,a]=U.useState(!1),[r,s]=U.useState({}),n=U.useRef(!1),[l]=U.useState(()=>new yn({collection:f.collection,layout:f.layout,delegate:{setVisibleRect(u){e(u),n.current=!0},renderView:f.renderView,invalidate:s}}));bn(()=>{n.current&&(n.current=!1,f.onVisibleRectChange(t))});let c=U.useMemo(()=>f.layoutOptions!=null?{...r,layoutOptions:f.layoutOptions}:r,[r,f.layoutOptions]),p=l.render({layout:f.layout,collection:f.collection,persistedKeys:f.persistedKeys,layoutOptions:f.layoutOptions,visibleRect:t,invalidationContext:c,isScrolling:i}),g=l.contentSize,b=U.useCallback(()=>{a(!0)},[]),h=U.useCallback(()=>{a(!1)},[]);return U.useMemo(()=>({virtualizer:l,visibleViews:p,setVisibleRect:e,contentSize:g,isScrolling:i,startScrolling:b,endScrolling:h}),[l,p,e,g,i,b,h])}const Re=48;class wn extends hn{get collection(){return this.virtualizer.collection}getLayoutInfo(t){var e;return this.ensureLayoutInfo(t),((e=this.layoutNodes.get(t))===null||e===void 0?void 0:e.layoutInfo)||null}getVisibleLayoutInfos(t){if(t.height>1){var e,i;let s=((i=(e=this.rowHeight)!==null&&e!==void 0?e:this.estimatedRowHeight)!==null&&i!==void 0?i:Re)+this.gap;t.y=Math.floor(t.y/s)*s,t.height=Math.ceil(t.height/s)*s}this.layoutIfNeeded(t);let a=[],r=s=>{for(let n of s)this.isVisible(n,t)&&(a.push(n.layoutInfo),n.children&&r(n.children))};return r(this.rootNodes),a}layoutIfNeeded(t){if(this.lastCollection){this.requestedRect.containsRect(t)||(this.requestedRect=this.requestedRect.union(t),this.rootNodes=this.buildCollection());for(let e of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(e))return}}ensureLayoutInfo(t){return!this.layoutNodes.has(t)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new he(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new he(0,0,this.contentSize.width,this.contentSize.height),!0):!1}isVisible(t,e){return t.layoutInfo.rect.intersects(e)||t.layoutInfo.isSticky||t.layoutInfo.type==="header"||t.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(t.layoutInfo.key)}shouldInvalidateEverything(t){let e=t.layoutOptions;var i,a,r,s,n;return t.sizeChanged||this.rowHeight!==((i=e?.rowHeight)!==null&&i!==void 0?i:this.rowHeight)||this.headingHeight!==((a=e?.headingHeight)!==null&&a!==void 0?a:this.headingHeight)||this.loaderHeight!==((r=e?.loaderHeight)!==null&&r!==void 0?r:this.loaderHeight)||this.gap!==((s=e?.gap)!==null&&s!==void 0?s:this.gap)||this.padding!==((n=e?.padding)!==null&&n!==void 0?n:this.padding)}shouldInvalidateLayoutOptions(t,e){return t.rowHeight!==e.rowHeight||t.estimatedRowHeight!==e.estimatedRowHeight||t.headingHeight!==e.headingHeight||t.estimatedHeadingHeight!==e.estimatedHeadingHeight||t.loaderHeight!==e.loaderHeight||t.dropIndicatorThickness!==e.dropIndicatorThickness||t.gap!==e.gap||t.padding!==e.padding}update(t){let e=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(t),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=t.layoutOptions;var a;this.rowHeight=(a=i?.rowHeight)!==null&&a!==void 0?a:this.rowHeight;var r;this.estimatedRowHeight=(r=i?.estimatedRowHeight)!==null&&r!==void 0?r:this.estimatedRowHeight;var s;this.headingHeight=(s=i?.headingHeight)!==null&&s!==void 0?s:this.headingHeight;var n;this.estimatedHeadingHeight=(n=i?.estimatedHeadingHeight)!==null&&n!==void 0?n:this.estimatedHeadingHeight;var l;this.loaderHeight=(l=i?.loaderHeight)!==null&&l!==void 0?l:this.loaderHeight;var c;this.dropIndicatorThickness=(c=i?.dropIndicatorThickness)!==null&&c!==void 0?c:this.dropIndicatorThickness;var p;this.gap=(p=i?.gap)!==null&&p!==void 0?p:this.gap;var g;if(this.padding=(g=i?.padding)!==null&&g!==void 0?g:this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&e!==this.lastCollection)for(let b of this.lastCollection.getKeys())e.getItem(b)||this.layoutNodes.get(b)&&this.layoutNodes.delete(b);this.lastCollection=e,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(t=this.padding){let e=this.virtualizer.collection,i=[...e],a=i.filter(c=>c.type==="loader"),r=[],s=e?.size===0;
1s&&(t=0);for(let c of i){var n,l;let p=((l=(n=this.rowHeight)!==null&&n!==void 0?n:this.estimatedRowHeight)!==null&&l!==void 0?l:Re)+this.gap;if(c.type==="item"&&t+p<this.requestedRect.y&&!this.isValid(c,t)){t+=p;continue}let g=this.buildChild(c,this.padding,t,null);if(t=g.layoutInfo.rect.maxY+this.gap,r.push(g),c.type==="loader"){let b=a.indexOf(c);a.splice(b,1)}if((c.type==="item"||c.type==="loader")&&t>this.requestedRect.maxY){let b=i.indexOf(c);for(let h of a){let v=i.indexOf(h);t+=(v-b-1)*p;let u=this.buildChild(h,this.padding,t,null);r.push(u),t=u.layoutInfo.rect.maxY,b=v}t+=(i.length-b-1)*p;break}}return t-=this.gap,t+=s?0:this.padding,this.contentSize=new De(this.virtualizer.visibleRect.width,t),r}isValid(t,e){let i=this.layoutNodes.get(t.key);return!this.invalidateEverything&&!!i&&i.node===t&&e===i.layoutInfo.rect.y&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(t,e,i,a){if(this.isValid(t,i))return this.layoutNodes.get(t.key);let r=this.buildNode(t,e,i);return r.layoutInfo.parentKey=a??null,r.layoutInfo.allowOverflow=!0,this.layoutNodes.set(t.key,r),r}buildNode(t,e,i){switch(t.type){case"section":return this.buildSection(t,e,i);case"item":return this.buildItem(t,e,i);case"header":return this.buildSectionHeader(t,e,i);case"loader":return this.buildLoader(t,e,i);case"separator":return this.buildItem(t,e,i);default:throw new Error("Unsupported node type: "+t.type)}}buildLoader(t,e,i){let a=new he(e,i,this.padding,0),r=new Se("loader",t.key,a);a.width=this.virtualizer.contentSize.width-this.padding-e;var s,n,l;return a.height=t.props.isLoading?(l=(n=(s=this.loaderHeight)!==null&&s!==void 0?s:this.rowHeight)!==null&&n!==void 0?n:this.estimatedRowHeight)!==null&&l!==void 0?l:Re:0,{layoutInfo:r,validRect:a.intersection(this.requestedRect)}}buildSection(t,e,i){let a=this.virtualizer.collection,r=this.virtualizer.visibleRect.width-this.padding,s=new he(e,i,r-e,0),n=new Se(t.type,t.key,s),l=i,c=0,p=[];for(let h of gt(t,a)){var g,b;let v=((b=(g=this.rowHeight)!==null&&g!==void 0?g:this.estimatedRowHeight)!==null&&b!==void 0?b:Re)+this.gap;if(i+v<this.requestedRect.y&&!this.isValid(t,i)){i+=v,c++;continue}let u=this.buildChild(h,e,i,n.key);if(i=u.layoutInfo.rect.maxY+this.gap,p.push(u),i>this.requestedRect.maxY){i+=([...gt(t,a)].length-(p.length+c))*v;break}}return i-=this.gap,s.height=i-l,{layoutInfo:n,children:p,validRect:n.rect.intersection(this.requestedRect),node:t}}buildSectionHeader(t,e,i){let a=this.virtualizer.visibleRect.width-this.padding,r=this.headingHeight,s=!1;if(r==null){let c=this.layoutNodes.get(t.key),p=c?.layoutInfo;if(p){let g=this.virtualizer.collection.getItem(t.key),b=this.lastCollection?this.lastCollection.getItem(t.key):null;r=p.rect.height,s=a!==p.rect.width||g!==b||p.estimatedSize}else r=t.rendered?this.estimatedHeadingHeight:0,s=!0}r==null&&(r=Re);let n=new he(e,i,a-e,r),l=new Se("header",t.key,n);return l.estimatedSize=s,{layoutInfo:l,children:[],validRect:l.rect.intersection(this.requestedRect),node:t}}buildItem(t,e,i){let a=this.virtualizer.visibleRect.width-this.padding-e,r=this.rowHeight,s=!1;if(r==null){let c=this.layoutNodes.get(t.key);c?(r=c.layoutInfo.rect.height,s=a!==c.layoutInfo.rect.width||t!==c.node||c.layoutInfo.estimatedSize):(r=this.estimatedRowHeight,s=!0)}r==null&&(r=Re);let n=new he(e,i,a,r),l=new Se(t.type,t.key,n);return l.estimatedSize=s,{layoutInfo:l,children:[],validRect:l.rect,node:t}}updateItemSize(t,e){let i=this.layoutNodes.get(t);if(!i)return!1;let a=this.virtualizer.collection,r=i.layoutInfo;if(r.estimatedSize=!1,r.rect.height!==e.height){let s=r.copy();s.rect.height=e.height,i.layoutInfo=s,this.validRect.height=Math.min(this.validRect.height,r.rect.y-this.validRect.y),this.requestedRect.height+=s.rect.height-r.rect.height,this.updateLayoutNode(t,r,s);let n=r.parentKey!=null?a.getItem(r.parentKey):null;for(;n;)this.updateLayoutNode(n.key,r,s),n=n.parentKey!=null?a.getItem(n.parentKey):null;return!0}return!1}updateLayoutNode(t,e,i){let a=this.layoutNodes.get(t);a&&(a.validRect=a.validRect.intersection(this.validRect),a.layoutInfo===e&&(a.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(t,e,i){t+=this.virtualizer.visibleRect.x,e+=this.virtualizer.visibleRect.y;let a=new he(t,Math.max(0,e-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(a),s=null,n=1/0;for(let g of r){if(!g.rect.intersects(a))continue;let b=Math.abs(g.rect.y-e),h=Math.abs(g.rect.maxY-e),v=Math.min(b,h);v<n&&(n=v,s=g.key)}if(s==null||this.virtualizer.collection.size===0)return{type:"root"};let l=this.getLayoutInfo(s);if(!l)return null;
1let c=l.rect,p={type:"item",key:l.key,dropPosition:"on"};return i(p)?e<=c.y+10&&i({...p,dropPosition:"before"})?p.dropPosition="before":e>=c.maxY-10&&i({...p,dropPosition:"after"})&&(p.dropPosition="after"):e<=c.y+c.height/2&&i({...p,dropPosition:"before"})?p.dropPosition="before":i({...p,dropPosition:"after"})&&(p.dropPosition="after"),p}getDropTargetLayoutInfo(t){let e=this.getLayoutInfo(t.key),i;if(t.dropPosition==="before")i=new he(e.rect.x,Math.max(0,e.rect.y-this.dropIndicatorThickness/2),e.rect.width,this.dropIndicatorThickness);else if(t.dropPosition==="after"){let r=this.collection.getItem(t.key);if(r){var a;let s=(a=r.level)!==null&&a!==void 0?a:0,n=this.collection.getKeyAfter(t.key);for(;n!=null;){let l=this.collection.getItem(n);if(!l||l.level<=s)break;e=this.getLayoutInfo(n)||e,n=this.collection.getKeyAfter(n)}}i=new he(e.rect.x,e.rect.maxY-this.dropIndicatorThickness/2,e.rect.width,this.dropIndicatorThickness)}else i=e.rect;return new Se("dropIndicator",t.key+":"+t.dropPosition,i)}constructor(t={}){super();var e;this.rowHeight=(e=t.rowHeight)!==null&&e!==void 0?e:null;var i;this.estimatedRowHeight=(i=t.estimatedRowHeight)!==null&&i!==void 0?i:null;var a;this.headingHeight=(a=t.headingHeight)!==null&&a!==void 0?a:null;var r;this.estimatedHeadingHeight=(r=t.estimatedHeadingHeight)!==null&&r!==void 0?r:null;var s;this.loaderHeight=(s=t.loaderHeight)!==null&&s!==void 0?s:null,this.dropIndicatorThickness=t.dropIndicatorThickness||2,this.gap=t.gap||0,this.padding=t.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=ne
1w he,this.requestedRect=new he,this.contentSize=new De}}const wt=10,_t=5;class _n{setup(t,e,i){this.delegate=t,this.state=e,this.direction=i}getDropTargetFromPoint(t,e,i){let a=this.delegate.getDropTargetFromPoint(t,e,i);return!a||a.type==="root"?a:this.resolveDropTarget(a,t,e,i)}resolveDropTarget(t,e,i,a){let r=this.pointerTracking,s=i-r.lastY,n=e-r.lastX,l=r.yDirection,c=r.xDirection;if(Math.abs(s)>_t&&(l=s>0?"down":"up",r.yDirection=l,r.lastY=i),Math.abs(n)>wt&&(c=n>0?"right":"left",r.xDirection=c,r.lastX=e),t.dropPosition==="before"){let b=this.state.collection.getKeyBefore(t.key);if(b!=null){let h={type:"item",key:b,dropPosition:"after"};a(h)&&(t=h)}}let p=this.getPotentialTargets(t,a);if(p.length===0)return{type:"root"};let g;return p.length>1?g=this.selectTarget(p,t,e,i,l,c):(g=p[0],r.boundaryContext=null),g}getPotentialTargets(t,e){if(t.dropPosition==="on")return[t];let i=t,a=this.state.collection,r=a.getItem(i.key);for(;r&&r?.type!=="item"&&r.nextKey!=null;)i.key=r.nextKey,r=a.getItem(r.nextKey);let s=[i];if(r&&r.hasChildNodes&&this.state.expandedKeys.has(r.key)&&a.getChildren&&i.dropPosition==="after"){let c=null;for(let p of a.getChildren(r.key))if(p.type==="item"){c=p;break}if(c){const p={type:"item",key:c.key,dropPosition:"before"};return e(p)?[p]:[]}}if(r?.nextKey!=null)return[t];let n=r?.parentKey,l=[];for(;n;){let c=a.getItem(n),p=c?.nextKey?a.getItem(c.nextKey):null;if(!p||p.parentKey!==n){let b={type:"item",key:n,dropPosition:"after"};if(e(b)&&l.push(b),p)break}n=c?.parentKey}if(l.length>0&&s.push(...l),s.length===1){let c=a.getKeyAfter(i.key),p=c?a.getItem(c):null;if(c!=null&&p&&r&&p.level!=null&&r.level!=null&&p.level>r.level){let g={type:"item",key:c,dropPosition:"before"};if(e(g))return[g]}}return s.filter(e)}selectTarget(t,e,i,a,r,s){if(t.length<2)return t[0];let n=this.pointerTracking,l=this.state.collection.getItem(e.key),c=l?.parentKey;if(!c)return t[0];if(!n.boundaryContext||n.boundaryContext.parentKey!==c){let v=n.yDirection==="up"?t.length-1:0;n.boundaryContext={parentKey:c,preferredTargetIndex:v,lastSwitchY:a,lastSwitchX:i}}let p=n.boundaryContext,g=Math.abs(i-p.lastSwitchX);if(Math.abs(a-p.lastSwitchY)>_t&&r){let v=p.preferredTargetIndex||0;r==="down"&&v===0?p.preferredTargetIndex=t.length-1:r==="up"&&v===t.length-1&&(p.preferredTargetIndex=0),n.xDirection=null}if(g>wt&&s){let v=p.preferredTargetIndex||0;s==="left"?this.direction==="ltr"?v<t.length-1&&(p.preferredTargetIndex=v+1,p.lastSwitchX=i):v>0&&(p.preferredTargetIndex=v-1,p.lastSwitchX=i):s==="right"&&(this.direction==="ltr"?v>0&&(p.preferredTargetIndex=v-1,p.lastSwitchX=i):v<t.length-1&&(p.preferredTargetIndex=v+1,p.lastSwitchX=i)),n.yDirection=null}let h=Math.max(0,Math.min(p.preferredTargetIndex||0,t.length-1));return t[h]}constructor(){this.delegate=null,this.state=null,this.direction="ltr",this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}}class kn{*[Symbol.iterator](){yield*this.flattenedRows}get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}getItem(t){return this.keyMap.get(t)||null}at(t){return this.flattenedRows[t]}getFirstKey(){var t;return(t=this.flattenedRows[0])===null||t===void 0?void 0:t.key}getLastKey(){var t;return(t=this.flattenedRows[this.flattenedRows.length-1])===null||t===void 0?void 0:t.key}getKeyAfter(t){var e;let i=this.flattenedRows.findIndex(a=>a.key===t);return(e=this.flattenedRows[i+1])===null||e===void 0?void 0:e.key}getKeyBefore(t){var e;let i=this.flattenedRows.findIndex(a=>a.key===t);return(e=this.flattenedRows[i-1])===null||e===void 0?void 0:e.key}getChildren(t){let e=this.keyMap;return{*[Symbol.iterator](){let i=e.get(t),a=i?.firstChildKey!=null?e.get(i.firstChildKey):null;for(;a;)yield a,a=a.nextKey!=null?e.get(a.nextKey):void 0}}}getTextValue(t){let e=this.getItem(t);return e?e.textValue:""}constructor(t){this.keyMap=new Map,this.itemCount=0;let{collection:e,expandedKeys:i}=t,{flattenedRows:a,keyMap:r,itemCount:s}=In(e,{expandedKeys:i});this.flattenedRows=a,this.keyMap=r,this.itemCount=s}}const Cn=U.createContext(null),ct=U.createContext(null),Sn=U.forwardRef(function(t,e){return[t,e]=Nt(t,e,Cn),re.createElement(Ii,{content:re.createElement(Ri,t)},i=>re.createElement($n,{props:t,collection:i,treeRef:e}))}),kt={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function $n({props:f,collection:t,treeRef:e}){const{dragAndDropHooks:i}=f;let{direction:a}=Ze(),r=Ai({usage:"search",sensitivity:"base"}),s=!!i?.useDraggableCollectionState,n=!!i?.useDroppableCollectionState,l=U.useRef(s),c=U.useRef(n);U.useEffect(()=>{l.current!==s&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),c.current!==n&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.")},[s,n]);let{selectionMode:p="none",expandedKeys:g,defaultExpandedKeys:b,onExpandedChange:h,disabledBehavior:v="all"}=f,{CollectionRoot:u,isVirtualized:y,layoutDelegate:m,dropTargetDelegate:_}=U.useContext(qe),[k,$]=Qr(g?Ct(g):void 0,b?Ct(b):new Set,h),S=U.useMemo(()=>new kn({collection:t,expandedKeys:k}),[t,k]),E=Oi({...f,selectionMode:p,expandedKeys:k,onExpandedChange:$,collection:S,children:void 0,disabledBehavior:v}),{gridProps:R}=sn({...f,isVirtualized:y,layoutDelegate:m},E,e),B,I,M,Q=!1,C=null,L=U.useRef(null);if(s&&i){B=i.useDraggableCollectionState({collection:E.collection,selectionManager:E.selectionManager,preview:i.renderDragPreview?L:void 0}),i.useDraggableCollection({},B,e);let X=i.DragPreview;C=i.renderDragPreview?re.createElement(X,{ref:L},i.renderDragPreview):null}let[d]=U.useState(()=>new _n);if(n&&i){I=i.useDroppableCollectionState({collection:E.collection,selectionManager:E.selectionManager});let X=i.dropTargetDelegate||_||new i.ListDropTargetDelegate(E.collection,e,{direction:a});d.setup(X,E,a);let Y=new Ni({collection:E.collection,collator:r,ref:e,disabledKeys:E.selectionManager.disabledKeys,disabledBehavior:E.selectionManager.disabledBehavior,direction:a,layoutDelegate:m});M=i.useDroppableCollection({keyboardDelegate:Y,dropTargetDelegate:d,onDropActivate:ae=>{if(ae.target.type==="item"){var oe;let ne=ae.target.key,se=E.collection.getItem(ne),ue=k!=="all"&&k.has(ne);se&&se.hasChildNodes&&(!ue||!(i==null||(oe=i.isVirtualDragging)===null||oe===void 0)&&oe.call(i))&&E.toggleKey(ne)}},onKeyDown:ae=>{let oe=I?.target;if(oe&&oe.type==="item"&&oe.dropPosition==="on"){let ne=E.collection.getItem(oe.key);(ae.key===kt.expand[a]&&ne?.hasChildNodes&&!E.expandedKeys.has(oe.key)||ae.key===kt.collapse[a]&&ne?.hasChildNodes&&E.expandedKeys.has(oe.key))&&E.toggleKey(oe.key)}}},I,e);let Z=I.getDropOperation;I.getDropOperation=ae=>{let{target:oe,isInternal:ne}=ae;var se;let ue=(se=B?.draggingKeys)!==null&&se!==void 0?se:new Set;if(ne&&oe.type==="item"&&ue.size>0){if(ue.has(oe.key)&&oe.dropPosition==="on")return"cancel";let ce=oe.key;for(;ce!=null;){let me=E.collection.getItem(ce),pe=me?.parentKey;if(pe!=null&&ue.has(pe))return"cancel";ce=pe??null}}return Z(ae)},Q=I.isDropTarget({type:"root"})}
1let P=!!(s&&!B?.isDisabled),{focusProps:G,isFocused:j,isFocusVisible:te}=Je(),O={isEmpty:E.collection.size===0,isFocused:j,isFocusVisible:te,isDropTarget:Q,selectionMode:E.selectionManager.selectionMode,allowsDragging:!!P,state:E},J=ze({className:f.className,style:f.style,defaultClassName:"react-aria-Tree",values:O}),D=null;if(E.collection.size===0&&f.renderEmptyState){let{isEmpty:X,...Y}=O,Z=f.renderEmptyState({...Y}),ae={"aria-level":1};D=re.createElement("div",{role:"row",style:{display:"contents"},...ae},re.createElement("div",{role:"gridcell",style:{display:"contents"}},Z))}let T=Te(f,{global:!0});return re.createElement(re.Fragment,null,re.createElement(Li,null,re.createElement("div",{...ke(T,J,R,G,M?.collectionProps),ref:e,slot:f.slot||void 0,"data-empty":E.collection.size===0||void 0,"data-focused":j||void 0,"data-drop-target":Q||void 0,"data-focus-visible":te||void 0,"data-selection-mode":E.selectionManager.selectionMode==="none"?void 0:E.selectionManager.selectionMode,"data-allows-dragging":!!P||void 0},re.createElement(nt,{values:[[ct,E],[Ve,{dragAndDropHooks:i,dragState:B,dropState:I}],[Bi,{render:Rn}]]},n&&re.createElement(Tn,null),re.createElement(ji,null,re.createElement(u,{collection:E.collection,persistedKeys:Fi(E.selectionManager,i,I),scrollRef:e,renderDropIndicator:Mi(i,I)}))),D)),C)}class kr extends Bt{}kr.type="content";const zn=Lt(kr,function(t){let e=U.useContext(Cr),i=ze({children:t.children,values:e});return re.createElement(qe.Provider,{value:Ti},i.children)}),Cr=U.createContext(null);class Sr extends Bt{}Sr.type="item";const En=Ei(Sr,(f,t,e)=>{var i;let a=U.useContext(ct);t=Be(t);let{dragAndDropHooks:r,dragState:s,dropState:n}=U.useContext(Ve),{rowProps:l,gridCellProps:c,expandButtonProps:p,descriptionProps:g,...b}=xr({node:e,shouldSelectOnPressUp:!!s},a,t),h=l["aria-expanded"]===!0,v=f.hasChildItems||((i=[...a.collection.getChildren(e.key)])===null||i===void 0?void 0:i.length)>1,u=l["aria-level"]||1,{hoverProps:y,isHovered:m}=li({isDisabled:!b.allowsSelection&&!b.hasAction,onHoverStart:f.onHoverStart,onHoverChange:f.onHoverChange,onHoverEnd:f.onHoverEnd}),{isFocusVisible:_,focusProps:k}=Je(),{isFocusVisible:$,focusProps:S}=Je({within:!0}),{checkboxProps:E}=an({key:e.key},a),R=null;s&&r&&(R=r.useDraggableItem({key:e.key,hasDragButton:!0},s));let B=null,I=U.useRef(null),M=U.useRef(null),Q=U.useRef(null),{visuallyHiddenProps:C}=st();n&&r&&(B=r.useDropIndicator({target:{type:"item",key:e.key,dropPosition:"on"},activateButtonRef:Q},n,M));let L=s&&s.isDragging(e.key),d=B?.isDropTarget,P=a.selectionManager.selectionMode,G=a.selectionManager.selectionBehavior,j=re.useMemo(()=>({...b,isHovered:m,isFocusVisible:_,isExpanded:h,hasChildItems:v,level:u,selectionMode:P,selectionBehavior:G,isFocusVisibleWithin:$,state:a,id:e.key,allowsDragging:!!s,isDragging:L,isDropTarget:d}),[b,m,_,h,v,u,$,a,e.key,s,L,d,G,P]),te=ze({...f,id:void 0,children:e.rendered,defaultClassName:"react-aria-TreeItem",defaultStyle:{"--tree-item-level":u},values:j});U.useEffect(()=>{e.textValue},[e.textValue]),U.useEffect(()=>{v&&I.current},[]);let O=U.useRef(null);U.useEffect(()=>{s&&O.current},[]);let J=Pi({items:a.collection.getChildren(e.key),children:X=>{switch(X.type){case"content":return X.render(X);case"loader":case"item":return re.createElement(re.Fragment,null);default:throw new Error("Unsupported element type in TreeRow: "+X.type)}}}),D=Ot(),T=Te(f,{global:!0});return delete T.id,delete T.onClick,re.createElement(re.Fragment,null,B&&!B.isHidden&&re.createElement("div",{role:"row","aria-level":l["aria-level"],"aria-expanded":l["aria-expanded"],"aria-label":B.dropIndicatorProps["aria-label"]},re.createElement("div",{role:"gridcell","aria-colindex":1,style:{display:"contents"}},re.createElement("div",{role:"button",...C,...B.dropIndicatorProps,ref:M}),l["aria-expanded"]!=null?re.createElement("div",{role:"button",...C,id:D,"aria-label":p["aria-label"],"aria-labelledby":`${D} ${l.id}`,tabIndex:-1,ref:Q}):null)),re.createElement("div",{...ke(T,l,k,y,S,R?.dragProps),...te,ref:t,"data-expanded":v&&h||void 0,"data-has-child-items":v||void 0,"data-level":u,"data-selected":b.isSelected||void 0,"data-disabled":b.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":_||void 0,"data-pressed":b.isPressed||void 0,"data-selection-mode":a.selectionManager.selectionMode==="none"?void 0:a.selectionManager.selectionMode,"data-allows-dragging":!!s||void 0,"data-dragging":L||void 0,"data-drop-target":d||void 0},re.createElement("div",{...c,style:{display:"contents"}},re.createElement(nt,{values:[[Xr,{slots:{selection:E}}],[di,{slots:{[ci]:{},chevron:{...p,ref:I},drag:{...R?.dragButtonProps,ref:O,style:{pointerEvents:"none"}}}}],[Cr,{...j}],[Di,{isSelected:b.isSelected}]]},J))))});
1Lt(Hi,function(t,e,i){let{isVirtualized:a}=U.useContext(qe),r=U.useContext(ct),{isLoading:s,onLoadMore:n,scrollOffset:l,...c}=t,p=U.useRef(null),g=U.useMemo(()=>({onLoadMore:n,collection:r?.collection,sentinelRef:p,scrollOffset:l}),[n,l,r?.collection]);Ki(g,p),e=Be(e);let{rowProps:b,gridCellProps:h}=xr({node:i},r,e),v=b["aria-level"]||1,u={role:"row","aria-level":b["aria-level"]},y=ze({...c,id:void 0,children:i.rendered,defaultClassName:"react-aria-TreeLoader",values:{level:v}}),m={};return a&&(m={display:"contents"}),re.createElement(re.Fragment,null,re.createElement("div",{style:{position:"relative",width:0,height:0},inert:Ui(!0)},re.createElement("div",{"data-testid":"loadMoreSentinel",ref:p,style:{position:"absolute",height:1,width:1}})),s&&y.children&&re.createElement("div",{ref:e,...ke(Te(t),u),...y,"data-level":v},re.createElement("div",{...h,style:m},y.children)))});function Ct(f){return f?f==="all"?"all":new Set(f):new Set}function In(f,t){let{expandedKeys:e=new Set}=t,i=new Map,a=[],r=0,s=new Map,n=l=>{if(l.type==="item"||l.type==="loader"){let c=l?.parentKey,p={...l};c!=null?([...f.getChildren(c)][0].type!=="item"&&(p.index=l?.index!=null?l?.index-1:0),l.type==="loader"&&(p.level=l.level+1),i.set(p.key,p)):i.set(l.key,l);let g=i.get(l.key)||l;(g.level===0||g.parentKey!=null&&e.has(g.parentKey)&&s.get(g.parentKey))&&(g.type==="item"&&r++,a.push(g),s.set(g.key,!0))}else l.type!==null&&i.set(l.key,l);for(let c of f.getChildren(l.key))n(c)};for(let l of f)n(l);return{flattenedRows:a,keyMap:i,itemCount:r}}function Rn(f,t){var e;t=Be(t);let{dragAndDropHooks:i,dropState:a}=U.useContext(Ve),r=U.useRef(null),{dropIndicatorProps:s,isHidden:n,isDropTarget:l}=i.useDropIndicator(f,a,r);if(n)return null;let c=a&&f.target.type==="item"?(((e=a.collection.getItem(f.target.key))===null||e===void 0?void 0:e.level)||0)+1:1;return re.createElement(Dn,{...f,dropIndicatorProps:s,isDropTarget:l,ref:t,buttonRef:r,level:c})}function Pn(f,t){let{dropIndicatorProps:e,isDropTarget:i,buttonRef:a,level:r,...s}=f,{visuallyHiddenProps:n}=st(),l=ze({...s,defaultClassName:"react-aria-DropIndicator",defaultStyle:{position:"relative","--tree-item-level":r},values:{isDropTarget:i}});return re.createElement("div",{...l,role:"row","aria-level":r,ref:t,"data-drop-target":i||void 0},re.createElement("div",{role:"gridcell"},re.createElement("div",{...n,role:"button",...e,ref:a}),l.children))}const Dn=U.forwardRef(Pn);function Tn(){let{dragAndDropHooks:f,dropState:t}=U.useContext(Ve),e=U.useRef(null),{dropIndicatorProps:i}=f.useDropIndicator({target:{type:"root"}},t,e),a=t.isDropTarget({type:"root"}),{visuallyHiddenProps:r}=st();return!a&&i["aria-hidden"]?null:re.createElement("div",{role:"row","aria-hidden":i["aria-hidden"],style:{position:"absolute"}},re.createElement("div",{role:"gridcell"},re.createElement("div",{role:"button",...r,...i,ref:e})))}let Pe=null;function An(f=!1){if(Pe===null||f){const t=document.createElement("div"),e=t.style;e.width="50px",e.height="50px",e.overflow="scroll",e.direction="rtl";const i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?Pe="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Pe="negative":Pe="positive-ascending"),document.body.removeChild(t),Pe}return Pe}function On(f,t){let{scrollLeft:e}=f;if(t==="rtl"){let{scrollWidth:i,clientWidth:a}=f;switch(An()){case"negative":e=-e;break;case"positive-descending":e=i-a-e;break}}return e}function Nn(f,t){let{contentSize:e,onVisibleRectChange:i,innerStyle:a,onScrollStart:r,onScrollEnd:s,scrollDirection:n="both",...l}=f,c=U.useRef({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:p}=Ze(),[g,b]=U.useState(!1),h=U.useCallback(E=>{E.target===E.currentTarget&&(f.onScroll&&f.onScroll(E),Ge.flushSync(()=>{let R=E.currentTarget.scrollTop,B=On(E.currentTarget,p);c.scrollTop=Math.max(0,Math.min(R,e.height-c.height)),c.scrollLeft=Math.max(0,Math.min(B,e.width-c.width)),i(new he(c.scrollLeft,c.scrollTop,c.width,c.height)),c.isScrolling||(c.isScrolling=!0,b(!0),window.dispatchEvent(new Event("tk.disconnect-observer")),r&&r()
1);let I=Date.now();c.scrollEndTime<=I+50&&(c.scrollEndTime=I+300,c.scrollTimeout!=null&&clearTimeout(c.scrollTimeout),c.scrollTimeout=setTimeout(()=>{c.isScrolling=!1,b(!1),c.scrollTimeout=null,window.dispatchEvent(new Event("tk.connect-observer")),s&&s()},300))}))},[f,p,c,e,i,r,s]);Wi(t,"scroll",h),U.useEffect(()=>()=>{c.scrollTimeout!=null&&clearTimeout(c.scrollTimeout),c.isScrolling&&window.dispatchEvent(new Event("tk.connect-observer"))},[]);let v=U.useRef(!1),u=U.useCallback(E=>{let R=t.current;if(!R||v.current)return;v.current=!0,Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"),Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight");let B=R.clientWidth,I=R.clientHeight,M=B,Q=I;(c.width!==M||c.height!==Q)&&(c.width=M,c.height=Q,E(()=>{i(new he(c.scrollLeft,c.scrollTop,M,Q))}),(B!==R.clientWidth||I!==R.clientHeight)&&(c.width=R.clientWidth,c.height=R.clientHeight,E(()=>{i(new he(c.scrollLeft,c.scrollTop,c.width,c.height))}))),v.current=!1},[t,c,i]),y=ui(u),m=U.useRef(null),[_,k]=U.useState({});et(()=>{if(!v.current&&(m.current==null||!e.equals(m.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){k({}),m.current=e;return}else queueMicrotask(()=>y(Ge.flushSync));m.current=e}),et(()=>{y(E=>E())},[_]);let $=U.useCallback(()=>{u(Ge.flushSync)},[u]);Jr({ref:t,box:"border-box",onResize:$});let S={padding:0,...l.style};return n==="horizontal"?(S.overflowX="auto",S.overflowY="hidden"):n==="vertical"||e.width===c.width?(S.overflowY="auto",S.overflowX="hidden"):S.overflow="auto",a={width:Number.isFinite(e.width)?e.width:void 0,height:Number.isFinite(e.height)?e.height:void 0,pointerEvents:g?"none":"auto",position:"relative",...a},{isScrolling:g,scrollViewProps:{...l,style:S},contentProps:{role:"presentation",style:a}}}function Ln(f){let{layoutInfo:t,virtualizer:e,ref:i}=f,a=t?.key,r=U.useCallback(()=>{if(a!=null&&i.current){let s=Bn(i.current);e.updateItemSize(a,s)}},[e,a,i]);return et(()=>{t?.estimatedSize&&r()}),{updateSize:r}}function Bn(f){let t=f.style.height;f.style.height="";let e=new De(f.scrollWidth,f.scrollHeight);return f.style.height=t,e}function $r(f){let{style:t,className:e,layoutInfo:i,virtualizer:a,parent:r,children:s}=f,{direction:n}=Ze(),l=U.useRef(null);return Ln({layoutInfo:i,virtualizer:a,ref:l}),re.createElement("div",{role:"presentation",ref:l,className:e,style:{...jn(i,n,r),...t}},s)}let St=new WeakMap;function jn(f,t,e){let i=t==="rtl"?"right":"left",a=St.get(f);if(a&&a[i]!=null){if(!e)return a;let l=f.rect.y-e.rect.y,c=f.rect.x-e.rect.x;if(a.top===l&&a[i]===c)return a}let r={top:f.rect.y-(e&&!(e.allowOverflow&&f.isSticky)?e.rect.y:0),[i]:f.rect.x-(e&&!(e.allowOverflow&&f.isSticky)?e.rect.x:0),width:f.rect.width,height:f.rect.height};Object.entries(r).forEach(([l,c])=>{Number.isFinite(c)||(r[l]=void 0)});var s;let n={position:f.isSticky?"sticky":"absolute",display:f.isSticky?"inline-block":void 0,overflow:f.allowOverflow?"visible":"hidden",opacity:f.opacity,zIndex:f.zIndex,transform:(s=f.transform)!==null&&s!==void 0?s:void 0,contain:"size layout style",...r};return St.set(f,n),n}const zr=U.createContext(null),Er=U.createContext(null);function Mn(f){let{children:t,layout:e,layoutOptions:i}=f,a=U.useMemo(()=>typeof e=="function"?new e:e,[e]),r=U.useMemo(()=>({isVirtualized:!0,layoutDelegate:a,dropTargetDelegate:a.getDropTargetFromPoint?a:void 0,CollectionRoot:Fn,CollectionBranch:Hn}),[a]);return re.createElement(qe.Provider,{value:r},re.createElement(Er.Provider,{value:{layout:a,layoutOptions:i}},t))}function Fn({collection:f,persistedKeys:t,scrollRef:e,renderDropIndicator:i}){var a;let{layout:r,layoutOptions:s}=U.useContext(Er),n=(a=r.useLayoutOptions)===null||a===void 0?void 0:a.call(r),l=xn({layout:r,collection:f,renderView:(p,g)=>{var b;return g==null||(b=g.render)===null||b===void 0?void 0:b.call(g,g)},onVisibleRectChange(p){let g=e?.current;g&&(g.scrollLeft=p.x,g.scrollTop=p.y)},persistedKeys:t,layoutOptions:U.useMemo(()=>s&&n?{...s,...n}:s||n,[s,n])}),{contentProps:c}=Nn({onVisibleRectChange:l.setVisibleRect,contentSize:l.contentSize,onScrollStart:l.startScrolling,onScrollEnd:l.endScrolling},e);return re.createElement("div",c,re.createElement(zr.Provider,{value:l},Ir(null,l.visibleViews,i)))}function Hn({parent:f,renderDropIndicator:t}){let i=U.useContext(zr).virtualizer.getVisibleView(f.key);return Ir(i,Array.from(i.children),t)}function Ir(f,t,e){return t.map(i=>Kn(f,i,e))}function Kn(f,t,e){let i=re.createElement($r,{key:t.key,layoutInfo:t.layoutInfo,virtualizer:t.virtualizer,parent:f?.layoutInfo},t.rendered),{collection:a,layout:r}=t.virtualizer,s=t.content;return s?.type==="item"&&e&&r.getDropTargetLayoutInfo&&(i=re.createElement(re.Fragment,{key:t.key},$t(f,t,{type:"item",key:t.content.key,dropPosition:"before"},e),i,Zi(a,s,n=>$t(f,t,n,e)))),i}function $t(f,t,e,i){let a=i(e);if(a){let r=t.virtualizer.layout.getDropTargetLayoutInfo(e);a=re.createElement($r,{layoutInfo:r,virtualizer:t.virtualizer,parent:f?.layoutInfo},a)}return a}function ja(f){return H.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:H.jsx("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ma(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M3 21h18v-6H3v6Z",fill:"currentColor"}),H.jsx("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-5-5 5m0 0-5-5m5 5V3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Fa(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M8 14.325c0-.489 0-.733.055-.963a2 2 0 0 1 .24-.579c.123-.201.296-.374.642-.72L18.5 2.5a2.121 2.121 0 0 1 3 3l-9.563 9.563c-.346.346-.519.519-.72.642a2 2 0 0 1-.579.24c-.23.055-.474.055-.963.055H8v-1.675Z",fill:"currentColor"}),H.jsx("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ha(f){return H.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:H.jsx("path",{d:"M5 9h14M5 15h14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ka(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M2 6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h3.822c.718 0 1.077 0 1.394.11a2 2 0 0 1 .747.461c.24.235.4.556.721 1.198L13 7H2v-.8Z",fill:"currentColor"}),H.jsx("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ua(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",fill:"currentColor"}),H.jsx("path",{d:"M12 16v-4m0-4h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Wa(f){return H.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:H.jsx("path",{d:"m12.707 18.364-1.414 1.414a5 5 0 1 1-7.071-7.07l1.414-1.415m12.728 1.414 1.414-1.414a5 5 0 0 0-7.07-7.071l-1.415 1.414M8.5 15.5l7-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Za(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M7.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 18.72 19 17.88 19 16.2V14l-9-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 7.28 3 8.12 3 9.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z",fill:"currentColor"}),H.jsx("path",{d:"M21 9V3m0 0h-6m6 0-8 8m-3-6H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 7.28 3 8.12 3 9.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 18.72 19 17.88 19 16.2V14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Va(f){return H.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:H.jsx("path",{d:"M12 5v14m-7-7h14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function qa(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"M17.8 10c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 8.48 21 7.92 21 6.8v-.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 10 5.08 10 6.2 10h11.6Z",fill:"currentColor"}),H.jsx("path",{d:"M17.8 10c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 8.48 21 7.92 21 6.8v-.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 10 5.08 10 6.2 10h11.6ZM17.8 21c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 14 18.92 14 17.8 14H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 15.52 3 16.08 3 17.2v.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ya(f){return H.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...f,children:[H.jsx("path",{opacity:".12",d:"m15 2 1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z",fill:"currentColor"}),H.jsx("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Un(){return Pt(be.user.getCurrent.queryOptions())}function Wn(){const{data:f}=Un();return f??void 0}
1function Rr(){return Wn()?.memberships[0]?.workspace.id}const Pr=({className:f,...t})=>H.jsx(En,{className:e=>ve("group/tree-item relative flex cursor-pointer items-center rounded-md px-2.5 py-2 transition duration-100 ease-linear","outline-focus-ring select-none focus:outline-hidden","hover:bg-primary_hover focus-visible:bg-primary_hover","data-[dragging]:bg-transparent data-[dragging]:shadow-none","focus-visible:outline-2 focus-visible:-outline-offset-2","*:data-[slot=icon]:mr-2 *:data-[slot=icon]:size-4 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:stroke-[2.25px]","href"in t?"cursor-pointer":"cursor-default",typeof f=="function"?f(e):f),...t}),Dr=({className:f,children:t,...e})=>H.jsx(zn,{...e,children:i=>H.jsxs("div",{className:ve("text-secondary relative flex w-full min-w-0 items-center text-sm font-semibold","group-hover/tree-item:text-secondary_hover group-focus-visible/tree-item:text-secondary_hover",f),children:[i.selectionMode==="multiple"&&i.selectionBehavior==="toggle"&&H.jsx(Gi,{className:"mr-2 shrink-0",slot:"selection"}),H.jsx("div",{className:ve("relative w-[calc(calc(var(--tree-item-level)-1)*calc(var(--spacing)*5.5))] shrink-0","before:absolute before:inset-0 before:-ms-1 before:bg-[repeating-linear-gradient(to_right,transparent_0,transparent_calc(var(--tree-item-level)-1px),var(--color-border-primary)_calc(var(--tree-item-level)-1px),var(--color-border-primary)_calc(var(--tree-item-level)))]")}),i.hasChildItems?H.jsx(Tr,{values:{isDisabled:i.isDisabled,isExpanded:i.isExpanded}}):H.jsx("span",{className:"mr-2 block size-4 shrink-0"}),typeof t=="function"?t(i):t]})}),Tr=({values:f})=>H.jsx(hi,{slot:"chevron",isDisabled:f.isDisabled,className:ve("mr-2 size-4 shrink-0 cursor-pointer rounded-sm transition duration-100 ease-linear","text-fg-quaternary hover:text-fg-quaternary_hover focus-visible:text-fg-quaternary_hover","outline-focus-ring focus:outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2",f.isExpanded&&"text-fg-secondary",f.isDisabled&&"text-fg-disabled cursor-not-allowed"),children:H.jsx(ei,{className:ve("size-4 stroke-[2.25px] transition-transform duration-100 ease-linear",f.isExpanded&&"rotate-90")})});Pr.displayName="TreeItem";Dr.displayName="TreeContent";Tr.displayName="TreeIndicator";const Ga=Vi,Zn=f=>H.jsx(wr,{...f,className:t=>ve("bg-overlay/70 fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center overflow-y-auto px-4 pt-4 pb-[clamp(16px,8vh,64px)] outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:p-8",t.isEntering&&"animate-in fade-in duration-300 ease-out",t.isExiting&&"animate-out fade-out duration-200 ease-in",typeof f.className=="function"?f.className(t):f.className)}),Vn=f=>H.jsx(dn,{...f,className:t=>ve("max-h-full w-full align-middle outline-hidden max-sm:overflow-y-auto max-sm:rounded-xl",t.isEntering&&"animate-in zoom-in-95 duration-300 ease-out",t.isExiting&&"animate-out zoom-out-95 duration-200 ease-in",typeof f.className=="function"?f.className(t):f.className)}),qn=f=>H.jsx(qi,{...f,className:ve("flex w-full items-center justify-center outline-hidden",f.className)});function Yn(f){const t=document.createElement("textarea");t.value=f,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function Xa(){const[f,t]=U.useState(null),e=U.useCallback(i=>{(async()=>{try{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(i),t(i);else throw new Error("writeText not supported")}catch{Yn(i),t(i)}})()},[]);return[f,e]}function Gn(f,t){const[e,i]=U.useState(f);return U.useEffect(()=>{const a=setTimeout(()=>{i(f)},t);return()=>{clearTimeout(a)}},[f,t]),e}function Qa(){const[f,t]=U.useState(!1);return U.useEffect(()=>{t(!0)},[]),f}function Xn(){return Mr("root")?.loaderData?.domainConfig?.domainKey==="notionicons"?"notion":"copy-svg"}function Ja({iconSetIdentifier:f,isAnonymous:t}){const e=Xn(),i=U.useMemo(()=>Wr.withDefault(e),[e]),[a,r]=Le("query",He.query),s=U.useDeferredValue(a),n=Gn(s,500),[l,c]=Le("searchType",He.searchType),[p,g]=Le("grouping",He.grouping),[b,h]=Le("iconName",He.iconName),[v,u]=Le("format",i);U.useEffect(()=>{n&&Ur.capture("search",{query:n,iconSet:f??"all",type:l,isAnonymous:t??!1})},[n,f,l,t]);const y=U.useCallback(m=>{r(m)},[r]);return{query:a,setQuery:y,deferredQuery:s,debouncedQuery:n,searchType:l,setSearchType:c,grouping:p,setGrouping:g,iconName:b,setIconName:h,format:v,setFormat:u}}const Qn={sm:"*:data-icon:size-4",md:"*:data-icon:size-5",lg:"*:data-icon:size-6",xl:"*:data-icon:size-7"},Xe=fi({light:{base:"rounded-full",sizes:{sm:"size-8",md:"size-10",lg:"size-12",xl:"size-14"},colors:{brand:"bg-brand-secondary text-featured-icon-light-fg-brand",gray:"bg-tertiary text-featured-icon-light-fg-gray",error:"bg-error-secondary text-featured-icon-light-fg-error",warning:"bg-warning-secondary text-featured-icon-light-fg-warning",success:"bg-success-secondary text-featured-icon-light-fg-success"}}
1,gradient:{base:"rounded-full text-fg-white before:absolute before:inset-0 before:size-full before:rounded-full before:border before:mask-b-from-0% after:absolute after:block after:rounded-full",sizes:{sm:"size-8 after:size-6 *:data-icon:size-4",md:"size-10 after:size-7 *:data-icon:size-4",lg:"size-12 after:size-8 *:data-icon:size-5",xl:"size-14 after:size-10 *:data-icon:size-5"},colors:{brand:"before:border-utility-brand-200 before:bg-utility-brand-50 after:bg-brand-solid",gray:"before:border-utility-gray-200 before:bg-utility-gray-50 after:bg-secondary-solid",error:"before:border-utility-error-200 before:bg-utility-error-50 after:bg-error-solid",warning:"before:border-utility-warning-200 before:bg-utility-warning-50 after:bg-warning-solid",success:"before:border-utility-success-200 before:bg-utility-success-50 after:bg-success-solid"}},dark:{base:"text-fg-white shadow-xs-skeumorphic before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0%",sizes:{sm:"size-8 rounded-md before:rounded-[5px]",md:"size-10 rounded-lg before:rounded-[7px]",lg:"size-12 rounded-[10px] before:rounded-[9px]",xl:"size-14 rounded-xl before:rounded-[11px]"},colors:{brand:"bg-brand-solid before:border-utility-brand-200/12",gray:"bg-secondary-solid before:border-utility-gray-200/12",error:"bg-error-solid before:border-utility-error-200/12",warning:"bg-warning-solid before:border-utility-warning-200/12",success:"bg-success-solid before:border-utility-success-200/12"}},modern:{base:"bg-primary shadow-xs-skeumorphic ring-1 ring-inset",sizes:{sm:"size-8 rounded-md",md:"size-10 rounded-lg",lg:"size-12 rounded-[10px]",xl:"size-14 rounded-xl"},colors:{brand:"",gray:"text-fg-secondary ring-primary",error:"",warning:"",success:""}},"modern-neue":{base:["bg-primary_alt ring-1 ring-inset before:absolute before:inset-1","before:shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1),0px_3px_3px_0px_rgba(0,0,0,0.09),1px_8px_5px_0px_rgba(0,0,0,0.05),2px_21px_6px_0px_rgba(0,0,0,0),0px_0px_0px_1px_rgba(0,0,0,0.08),1px_13px_5px_0px_rgba(0,0,0,0.01),0px_-2px_2px_0px_rgba(0,0,0,0.13)_inset] before:ring-1 before:ring-secondary_alt"].join(" "),sizes:{sm:"size-8 rounded-[8px] before:rounded-[4px]",md:"size-10 rounded-[10px] before:rounded-[6px]",lg:"size-12 rounded-[12px] before:rounded-[8px]",xl:"size-14 rounded-[14px] before:rounded-[10px]"},colors:{brand:"",gray:"text-fg-secondary ring-primary",error:"",warning:"",success:""}},outline:{base:"before:absolute before:rounded-full before:border-2 after:absolute after:rounded-full after:border-2",sizes:{sm:"size-4 before:size-6 after:size-8.5",md:"size-5 before:size-7 after:size-9.5",lg:"size-6 before:size-8 after:size-10.5",xl:"size-7 before:size-9 after:size-11.5"},colors:{brand:"text-fg-brand-primary before:border-fg-brand-primary/30 after:border-fg-brand-primary/10",gray:"text-fg-tertiary before:border-fg-tertiary/30 after:border-fg-tertiary/10",error:"text-fg-error-primary before:border-fg-error-primary/30 after:border-fg-error-primary/10",warning:"text-fg-warning-primary before:border-fg-warning-primary/30 after:border-fg-warning-primary/10",success:"text-fg-success-primary before:border-fg-success-primary/30 after:border-fg-success-primary/10"}}}),Jn=f=>{const{size:t="sm",theme:e="light",color:i="brand",icon:a,...r}=f;return H.jsxs("div",{...r,"data-featured-icon":!0,className:ve("relative flex shrink-0 items-center justify-center",Qn[t],Xe[e].base,Xe[e].sizes[t],Xe[e].colors[i],f.className),children:[Qi(a)&&H.jsx(a,{"data-icon":!0,className:"z-1"}),U.isValidElement(a)&&H.jsx("div",{className:"z-1",children:a}),f.children]})},ea=({className:f,hint:t,isDisabled:e,accept:i,allowsMultiple:a=!0,allowsDirectories:r=!1,maxSize:s,onDropFiles:n,onDropUnacceptedFiles:l,onSizeLimitExceed:c})=>{const p=U.useId(),g=U.useRef(null),[b,h]=U.useState(!1),[v,u]=U.useState(!1),y=$=>i?i.split(",").map(E=>E.trim()).some(E=>{if(E.startsWith("."))return`.${$.name.split(".").pop()?.toLowerCase()}`===E.toLowerCase();if(E.endsWith("/*")){const R=E.split("/")[0];return $.type.startsWith(`${R}/`)}return $.type===E}):!0,m=$=>{e||($.preventDefault(),$.stopPropagation(),u(!0))},_=$=>{e||($.preventDefault(),$.stopPropagation(),u(!1))},k=$=>{h(!1);const S=[],E=[],R=[];
1if((a?$:$.slice(0,1)).forEach(I=>{if(s&&I.size>s){R.push(I);return}y(I)?S.push(I):E.push(I)}),R.length>0&&typeof c=="function"){const I=new DataTransfer;R.forEach(M=>I.items.add(M)),h(!0),c(I.files)}if(S.length>0&&typeof n=="function"){const I=new DataTransfer;S.forEach(M=>I.items.add(M)),n(I.files)}if(E.length>0&&typeof l=="function"){const I=new DataTransfer;E.forEach(M=>I.items.add(M)),h(!0),l(I.files)}g.current&&(g.current.value="")};return H.jsxs("div",{"data-dropzone":!0,onDragOver:m,onDragEnter:m,onDragLeave:_,onDragEnd:_,onDrop:$=>{e||(_($),k(Array.from($.dataTransfer.files)))},className:ve("bg-primary text-tertiary ring-secondary relative flex flex-col items-center gap-3 rounded-xl px-6 py-4 ring-1 transition duration-100 ease-linear ring-inset",v&&"ring-brand ring-2",e&&"bg-disabled_subtle ring-disabled_subtle cursor-not-allowed",f),children:[H.jsx(Jn,{color:"gray",theme:"modern",size:"md",children:H.jsx(ti,{className:"size-5"})}),H.jsxs("div",{className:"flex flex-col gap-1 text-center",children:[H.jsxs("div",{className:"flex justify-center gap-1 text-center",children:[H.jsx("input",{ref:g,id:p,type:"file",className:"peer sr-only",disabled:e,accept:i,multiple:a,onChange:$=>k(Array.from($.target.files||[])),...r?{webkitdirectory:"",directory:""}:{}}),H.jsx("label",{htmlFor:p,className:"flex cursor-pointer",children:H.jsxs(xe,{color:"link-color",size:"md",isDisabled:e,onClick:()=>g.current?.click(),children:["Click to upload"," ",H.jsx("span",{className:"md:hidden",children:"and attach files"})]})}),H.jsx("span",{className:"text-sm max-md:hidden",children:"or drag and drop"})]}),H.jsx("p",{className:ve("text-xs transition duration-100 ease-linear",b&&"text-error-primary"),children:t||"SVG, PNG, JPG or GIF (max. 800x400px)"})]})]})},ta={DropZone:ea};function zt(f){return f.map(t=>({name:t.name,path:t.path,svg:t.content,optimizedSvg:t.optimizedContent}))}function ra(f){const t=it();return ot({...be.uploaded.create.mutationOptions(),onSuccess:e=>{Promise.all([t.invalidateQueries({queryKey:be.uploaded.pathKey()}),t.invalidateQueries({queryKey:be.iconSets.getPublicUploadedTree.queryKey()})]),f?.onSuccess?.(e)},onError:e=>{console.error("Error creating uploaded icon set:",e)}})}function ia(f){const t=it();return ot({...be.uploaded.update.mutationOptions(),onSuccess:e=>{Promise.all([t.invalidateQueries({queryKey:be.uploaded.pathKey()}),t.invalidateQueries({queryKey:be.iconSets.getPublicUploadedTree.queryKey()})]),f?.onSuccess?.(e)},onError:e=>{console.error("Error updating uploaded icon set:",e)}})}function na(f){const t=it();return ot({...be.uploaded.delete.mutationOptions(),onSuccess:(e,i)=>{t.removeQueries({queryKey:be.uploaded.getById.queryKey({id:i.id}),exact:!1}),Promise.all([t.invalidateQueries({queryKey:be.uploaded.pathKey()}),t.invalidateQueries({queryKey:be.iconSets.getPublicUploadedTree.queryKey()})]),f?.onSuccess?.()},onError:e=>{console.error("Error deleting uploaded icon set:",e)}})}function Ue(f,t){return f instanceof qr&&f.data?.code===t}function Et(f){return Ue(f,"CONFLICT")||Ue(f,"BAD_REQUEST")?f.message:Ue(f,"NOT_FOUND")?"Icon set not found":Ue(f,"UNAUTHORIZED")?"Please log in to manage icon sets":f instanceof Error?f.message:"An unexpected error occurred"}function We(f){throw new Error('Could not dynamically require "'+f+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qe={exports:{}};/*! 2 3JSZip v3.10.1 - A JavaScript class for generating and reading zip files 4<http://stuartk.com/jszip> 5 6(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> 7Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. 8 9JSZip uses the library pako released under the MIT license : 10https://github.com/nodeca/pako/blob/main/LICENSE 11*/var It;function aa(){return It||(It=1,(function(f,t){(function(e){f.exports=e()})(function(){return(function e(i,a,r){function s(c,p){if(!a[c]){if(!i[c]){var g=typeof We=="function"&&We;if(!p&&g)return g(c,!0);if(n)return n(c,!0);var b=new Error("Cannot find module '"+c+"'");throw b.code="MODULE_NOT_FOUND",b}var h=a[c]={exports:{}};i[c][0].call(h.exports,function(v){var u=i[c][1][v];return s(u||v)},h,h.exports,e,i,a,r)}return a[c].exports}for(var n=typeof We=="function"&&We,l=0;l<r.length;l++)s(r[l]);return s})({1:[function(e,i,a){var r=e("./utils"),s=e("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
11+/=";a.encode=function(l){for(var c,p,g,b,h,v,u,y=[],m=0,_=l.length,k=_,$=r.getTypeOf(l)!=="string";m<l.length;)k=_-m,g=$?(c=l[m++],p=m<_?l[m++]:0,m<_?l[m++]:0):(c=l.charCodeAt(m++),p=m<_?l.charCodeAt(m++):0,m<_?l.charCodeAt(m++):0),b=c>>2,h=(3&c)<<4|p>>4,v=1<k?(15&p)<<2|g>>6:64,u=2<k?63&g:64,y.push(n.charAt(b)+n.charAt(h)+n.charAt(v)+n.charAt(u));return y.join("")},a.decode=function(l){var c,p,g,b,h,v,u=0,y=0,m="data:";if(l.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var _,k=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&k--,l.charAt(l.length-2)===n.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(_=s.uint8array?new Uint8Array(0|k):new Array(0|k);u<l.length;)c=n.indexOf(l.charAt(u++))<<2|(b=n.indexOf(l.charAt(u++)))>>4,p=(15&b)<<4|(h=n.indexOf(l.charAt(u++)))>>2,g=(3&h)<<6|(v=n.indexOf(l.charAt(u++))),_[y++]=c,h!==64&&(_[y++]=p),v!==64&&(_[y++]=g);return _}},{"./support":30,"./utils":32}],2:[function(e,i,a){var r=e("./external"),s=e("./stream/DataWorker"),n=e("./stream/Crc32Probe"),l=e("./stream/DataLengthProbe");function c(p,g,b,h,v){this.compressedSize=p,this.uncompressedSize=g,this.crc32=b,this.compression=h,this.compressedContent=v}c.prototype={getContentWorker:function(){var p=new s(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),g=this;return p.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new s(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(p,g,b){return p.pipe(new n).pipe(new l("uncompressedSize")).pipe(g.compressWorker(b)).pipe(new l("compressedSize")).withStreamInfo("compression",g)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,i,a){var r=e("./stream/GenericWorker");a.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},a.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,i,a){var r=e("./utils"),s=(function(){for(var n,l=[],c=0;c<256;c++){n=c;for(var p=0;p<8;p++)n=1&n?3988292384^n>>>1:n>>>1;l[c]=n}return l})();i.exports=function(n,l){return n!==void 0&&n.length?r.getTypeOf(n)!=="string"?(function(c,p,g,b){var h=s,v=b+g;c^=-1;for(var u=b;u<v;u++)c=c>>>8^h[255&(c^p[u])];return-1^c})(0|l,n,n.length,0):(function(c,p,g,b){var h=s,v=b+g;c^=-1;for(var u=b;u<v;u++)c=c>>>8^h[255&(c^p.charCodeAt(u))];return-1^c})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(e,i,a){a.base64=!1,a.binary=!1,a.dir=!1,a.createFolders=!0,a.date=null,a.compression=null,a.compressionOptions=null,a.comment=null,a.unixPermissions=null,a.dosPermissions=null},{}],6:[function(e,i,a){var r=null;r=typeof Promise<"u"?Promise:e("lie"),i.exports={Promise:r}},{lie:37}],7:[function(e,i,a){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=e("pako"),n=e("./utils"),l=e("./stream/GenericWorker"),c=r?"uint8array":"array";function p(g,b){l.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=b,this.meta={}}a.magic="\b\0",n.inherits(p,l),p.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(c,g.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(b){g.push({data:b,meta:g.meta})}},a.compressWorker=function(g){return new p("Deflate",g)},a.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,i,a){function r(h,v){var u,y="";for(u=0;
vendor: 50,117 bytes, lines 11-12
11u<v;u++)y+=String.fromCharCode(255&h),h>>>=8;return y}function s(h,v,u,y,m,_){var k,$,S=h.file,E=h.compression,R=_!==c.utf8encode,B=n.transformTo("string",_(S.name)),I=n.transformTo("string",c.utf8encode(S.name)),M=S.comment,Q=n.transformTo("string",_(M)),C=n.transformTo("string",c.utf8encode(M)),L=I.length!==S.name.length,d=C.length!==M.length,P="",G="",j="",te=S.dir,O=S.date,J={crc32:0,compressedSize:0,uncompressedSize:0};v&&!u||(J.crc32=h.crc32,J.compressedSize=h.compressedSize,J.uncompressedSize=h.uncompressedSize);var D=0;v&&(D|=8),R||!L&&!d||(D|=2048);var T=0,X=0;te&&(T|=16),m==="UNIX"?(X=798,T|=(function(Z,ae){var oe=Z;return Z||(oe=ae?16893:33204),(65535&oe)<<16})(S.unixPermissions,te)):(X=20,T|=(function(Z){return 63&(Z||0)})(S.dosPermissions)),k=O.getUTCHours(),k<<=6,k|=O.getUTCMinutes(),k<<=5,k|=O.getUTCSeconds()/2,$=O.getUTCFullYear()-1980,$<<=4,$|=O.getUTCMonth()+1,$<<=5,$|=O.getUTCDate(),L&&(G=r(1,1)+r(p(B),4)+I,P+="up"+r(G.length,2)+G),d&&(j=r(1,1)+r(p(Q),4)+C,P+="uc"+r(j.length,2)+j);var Y="";return Y+=` 12\0`,Y+=r(D,2),Y+=E.magic,Y+=r(k,2),Y+=r($,2),Y+=r(J.crc32,4),Y+=r(J.compressedSize,4),Y+=r(J.uncompressedSize,4),Y+=r(B.length,2),Y+=r(P.length,2),{fileRecord:g.LOCAL_FILE_HEADER+Y+B+P,dirRecord:g.CENTRAL_FILE_HEADER+r(X,2)+Y+r(Q.length,2)+"\0\0\0\0"+r(T,4)+r(y,4)+B+P+Q}}var n=e("../utils"),l=e("../stream/GenericWorker"),c=e("../utf8"),p=e("../crc32"),g=e("../signature");function b(h,v,u,y){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=u,this.encodeFileName=y,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(b,l),b.prototype.push=function(h){var v=h.meta.percent||0,u=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,l.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:u?(v+100*(u-y-1))/u:100}}))},b.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var v=this.streamFiles&&!h.file.dir;if(v){var u=s(h,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},b.prototype.closedSource=function(h){this.accumulate=!1;var v=this.streamFiles&&!h.file.dir,u=s(h,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),v)this.push({data:(function(y){return g.DATA_DESCRIPTOR+r(y.crc32,4)+r(y.compressedSize,4)+r(y.uncompressedSize,4)})(h),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},b.prototype.flush=function(){for(var h=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var u=this.bytesWritten-h,y=(function(m,_,k,$,S){var E=n.transformTo("string",S($));return g.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(m,2)+r(m,2)+r(_,4)+r(k,4)+r(E.length,2)+E})(this.dirRecords.length,u,h,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},b.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},b.prototype.registerPrevious=function(h){this._sources.push(h);var v=this;return h.on("data",function(u){v.processChunk(u)}),h.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),h.on("error",function(u){v.error(u)}),this},b.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},b.prototype.error=function(h){var v=this._sources;if(!l.prototype.error.call(this,h))return!1;for(var u=0;u<v.length;u++)try{v[u].error(h)}catch{}return!0},b.prototype.lock=function(){l.prototype.lock.call(this);for(var h=this._sources,v=0;v<h.length;v++)h[v].lock()},i.exports=b},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,i,a){var r=e("../compressions"),s=e("./ZipFileWorker");a.generateWorker=function(n,l,c){var p=new s(l.streamFiles,c,l.platform,l.encodeFileName),g=0;try{n.forEach(function(b,h){g++;var v=(function(_,k){var $=_||k,S=r[$];if(!S)throw new Error($+" is not a valid compression method !");return S})(h.options.compression,l.compression),u=h.options.compressionOptions||l.compressionOptions||{},y=h.dir,m=h.date;h._compressWorker(v,u).withStreamInfo("file",{name:b,dir:y,date:m,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(p)}),p.entriesCount=g}catch(b){p.error(b)}return p}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,i,a){function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new r;for(var n in this)typeof this[n]!="function"&&(s[n]=this[n]);return s}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(s,n){return new r().loadAsync(s,n)},r.external=e("./external"),i.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,i,a){var r=e("./utils"),s=e("./external"),n=e("./utf8"),l=e("./zipEntries"),c=e("./stream/Crc32Probe"),p=e("./nodejsUtils");function g(b){return new s.Promise(function(h,v){var u=b.decompressed.getContentWorker().pipe(new c);u.on("error",function(y){v(y)}).on("end",function(){u.streamInfo.crc32!==b.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}i.exports=function(b,h){var v=this;return h=r.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),p.isNode&&p.isStream(b)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",b,!0,h.optimizedBinaryString,h.base64).then(function(u){var y=new l(h);return y.load(u),y}).then(function(u){var y=[s.Promise.resolve(u)],m=u.files;if(h.checkCRC32)for(var _=0;_<m.length;_++)y.push(g(m[_]));return s.Promise.all(y)}).then(function(u){for(var y=u.shift(),m=y.files,_=0;_<m.length;_++){var k=m[_],$=k.fileNameStr,S=r.resolve(k.fileNameStr);v.file(S,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:h.createFolders}),k.dir||(v.file(S).unsafeOriginalName=$)}return y.zipComment.length&&(v.comment=y.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,i,a){var r=e("../utils"),s=e("../stream/GenericWorker");function n(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}r.inherits(n,s),n.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(p){c.push({data:p,meta:{percent:0}})}).on("error",function(p){c.isPaused?this.generatedError=p:c.error(p)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},n.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,i,a){var r=e("readable-stream").Readable;function s(n,l,c){r.call(this,l),this._helper=n;var p=this;n.on("data",function(g,b){p.push(g)||p._helper.pause(),c&&c(b)}).on("error",function(g){p.emit("error",g)}).on("end",function(){p.push(null)})}e("../utils").inherits(s,r),s.prototype._read=function(){this._helper.resume()},i.exports=s},{"../utils":32,"readable-stream":16}],14:[function(e,i,a){i.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,s);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,s)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var s=new Buffer(r);return s.fill(0),s},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(e,i,a){function r(S,E,R){var B,I=n.getTypeOf(E),M=n.extend(R||{},p);M.date=M.date||new Date,M.compression!==null&&(M.compression=M.compression.toUpperCase()),typeof M.unixPermissions=="string"&&(M.unixPermissions=parseInt(M.unixPermissions,8)),M.unixPermissions&&16384&M.unixPermissions&&(M.dir=!0),M.dosPermissions&&16&M.dosPermissions&&(M.dir=!0),M.dir&&(S=m(S)),M.createFolders&&(B=y(S))&&_.call(this,B,!0);var Q=I==="string"&&M.binary===!1&&M.base64===!1;R&&R.binary!==void 0||(M.binary=!Q),(E instanceof g&&E.uncompressedSize===0||M.dir||!E||E.length===0)&&(M.base64=!1,M.binary=!0,E="",M.compression="STORE",I="string");var C=null;C=E instanceof g||E instanceof l?E:v.isNode&&v.isStream(E)?new u(S,E):n.prepareContent(S,E,M.binary,M.optimizedBinaryString,M.base64);var L=new b(S,C,M);this.files[S]=L}var s=e("./utf8"),n=e("./utils"),l=e("./stream/GenericWorker"),c=e("./stream/StreamHelper"),p=e("./defaults"),g=e("./compressedObject"),b=e("./zipObject"),h=e("./generate"),v=e("./nodejsUtils"),u=e("./nodejs/NodejsStreamInputAdapter"),y=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var E=S.lastIndexOf("/");return 0<E?S.substring(0,E):""},m=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},_=function(S,E){return E=E!==void 0?E:p.createFolders,S=m(S),this.files[S]||r.call(this,S,null,{dir:!0,createFolders:E}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var $={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var E,R,B;for(E in this.files)B=this.files[E],(R=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&S(R,B)},filter:function(S){var E=[];return this.forEach(function(R,B){S(R,B)&&E.push(B)}),E},file:function(S,E,R){if(arguments.length!==1)return S=this.root+S,r.call(this,S,E,R),this;if(k(S)){var B=S;return this.filter(function(M,Q){return!Q.dir&&B.test(M)})}var I=this.files[this.root+S];return I&&!I.dir?I:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(I,M){return M.dir&&S.test(I)});var E=this.root+S,R=_.call(this,E),B=this.clone();return B.root=R.name,B},remove:function(S){S=this.root+S;var E=this.files[S];if(E||(S.slice(-1)!=="/"&&(S+="/"),E=this.files[S]),E&&!E.dir)delete this.files[S];else for(var R=this.filter(function(I,M){return M.name.slice(0,S.length)===S}),B=0;B<R.length;B++)delete this.files[R[B].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var E,R={};try{if((R=n.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=R.type.toLowerCase(),R.compression=R.compression.toUpperCase(),R.type==="binarystring"&&(R.type="string"),!R.type)throw new Error("No output type specified.");n.checkSupport(R.type),R.platform!=="darwin"&&R.platform!=="freebsd"&&R.platform!=="linux"&&R.platform!=="sunos"||(R.platform="UNIX"),R.platform==="win32"&&(R.platform="DOS");var B=R.comment||this.comment||"";E=h.generateWorker(this,R,B)}catch(I){(E=new l("error")).error(I)}return new c(E,R.type||"string",R.mimeType)},generateAsync:function(S,E){return this.generateInternalStream(S).accumulate(E)},generateNodeStream:function(S,E){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(E)}};i.exports=$},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,i,a){i.exports=e("stream")},{stream:void 0}],17:[function(e,i,a){var r=e("./DataReader");function s(n){r.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}e("../utils").inherits(s,r),s.prototype.byteAt=function(n){return this.data[this.zero+n]},s.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),c=n.charCodeAt(1),p=n.charCodeAt(2),g=n.charCodeAt(3),b=this.length-4;0<=b;--b)if(this.data[b]===l&&this.data[b+1]===c&&this.data[b+2]===p&&this.data[b+3]===g)return b-this.zero;return-1},s.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),c=n.charCodeAt(1),p=n.charCodeAt(2),g=n.charCodeAt(3),b=this.readData(4);return l===b[0]&&c===b[1]&&p===b[2]&&g===b[3]},s.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},i.exports=s},{"../utils":32,"./DataReader":18}],18:[function(e,i,a){var r=e("../utils");function s(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,c=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=n,c},readString:function(n){return r.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},i.exports=s},{"../utils":32}],19:[function(e,i,a){var r=e("./Uint8ArrayReader");function s(n){r.call(this,n)}e("../utils").inherits(s,r),s.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},i.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,i,a){var r=e("./DataReader");function s(n){r.call(this,n)}e("../utils").inherits(s,r),s.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},s.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},s.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},s.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},i.exports=s},{"../utils":32,"./DataReader":18}],21:[function(e,i,a){var r=e("./ArrayReader");function s(n){r.call(this,n)}e("../utils").inherits(s,r),s.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},i.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(e,i,a){var r=e("../utils"),s=e("../support"),n=e("./ArrayReader"),l=e("./StringReader"),c=e("./NodeBufferReader"),p=e("./Uint8ArrayReader");i.exports=function(g){var b=r.getTypeOf(g);return r.checkSupport(b),b!=="string"||s.uint8array?b==="nodebuffer"?new c(g):s.uint8array?new p(r.transformTo("uint8array",g)):new n(r.transformTo("array",g)):new l(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,i,a){a.LOCAL_FILE_HEADER="PK��",a.CENTRAL_FILE_HEADER="PK��",a.CENTRAL_DIRECTORY_END="PK��",a.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",a.ZIP64_CENTRAL_DIRECTORY_END="PK��",a.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,i,a){var r=e("./GenericWorker"),s=e("../utils");function n(l){r.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(n,r),n.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},i.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(e,i,a){var r=e("./GenericWorker"),s=e("../crc32");function n(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(n,r),n.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,i,a){var r=e("../utils"),s=e("./GenericWorker");function n(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}r.inherits(n,s),n.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},i.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(e,i,a){var r=e("../utils"),s=e("./GenericWorker");function n(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(p){c.dataIsReady=!0,c.data=p,c.max=p&&p.length||0,c.type=r.getTypeOf(p),c.isPaused||c._tickAndRepeat()},function(p){c.error(p)})}r.inherits(n,s),n.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(e,i,a){function r(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,n){return this._listeners[s].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,n){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,n)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var n=this;return s.on("data",function(l){n.processChunk(l)}),s.on("end",function(){n.end()}),s.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,n){return this.extraStreamInfo[s]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},i.exports=r},{}],29:[function(e,i,a){var r=e("../utils"),s=e("./ConvertWorker"),n=e("./GenericWorker"),l=e("../base64"),c=e("../support"),p=e("../external"),g=null;if(c.nodestream)try{g=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function b(v,u){return new p.Promise(function(y,m){var _=[],k=v._internalType,$=v._outputType,S=v._mimeType;v.on("data",function(E,R){_.push(E),u&&u(R)}).on("error",function(E){_=[],m(E)}).on("end",function(){try{var E=(function(R,B,I){switch(R){case"blob":return r.newBlob(r.transformTo("arraybuffer",B),I);case"base64":return l.encode(B);default:return r.transformTo(R,B)}})($,(function(R,B){var I,M=0,Q=null,C=0;for(I=0;I<B.length;I++)C+=B[I].length;switch(R){case"string":return B.join("");case"array":return Array.prototype.concat.apply([],B);case"uint8array":for(Q=new Uint8Array(C),I=0;I<B.length;I++)Q.set(B[I],M),M+=B[I].length;return Q;case"nodebuffer":return Buffer.concat(B);default:throw new Error("concat : unsupported type '"+R+"'")}})(k,_),S);y(E)}catch(R){m(R)}_=[]}).resume()})}function h(v,u,y){var m=u;switch(u){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=u,this._mimeType=y,r.checkSupport(m),this._worker=v.pipe(new s(m)),v.lock()}catch(_){this._worker=new n("error"),this._worker.error(_)}}h.prototype={accumulate:function(v){return b(this,v)},on:function(v,u){var y=this;return v==="data"?this._worker.on(v,function(m){u.call(y,m.data,m.meta)}):this._worker.on(v,function(){r.delay(u,arguments,y)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new g(this,{objectMode:this._outputType!=="nodebuffer"},v)}},i.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,i,a){if(a.base64=!0,a.array=!0,a.string=!0,a.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",a.nodebuffer=typeof Buffer<"u",a.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")a.blob=!1;else{var r=new ArrayBuffer(0);try{a.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(r),a.blob=s.getBlob("application/zip").size===0}catch{a.blob=!1}}}try{a.nodestream=!!e("readable-stream").Readable}catch{a.nodestream=!1}},{"readable-stream":16}],31:[function(e,i,a){for(var r=e("./utils"),s=e("./support"),n=e("./nodejsUtils"),l=e("./stream/GenericWorker"),c=new Array(256),p=0;p<256;p++)c[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;c[254]=c[254]=1;function g(){l.call(this,"utf-8 decode"),this.leftOver=null}function b(){l.call(this,"utf-8 encode")}a.utf8encode=function(h){return s.nodebuffer?n.newBufferFrom(h,"utf-8"):(function(v){var u,y,m,_,k,$=v.length,S=0;for(_=0;_<$;_++)(64512&(y=v.charCodeAt(_)))==55296&&_+1<$&&(64512&(m=v.charCodeAt(_+1)))==56320&&(y=65536+(y-55296<<10)+(m-56320),_++),S+=y<128?1:y<2048?2:y<65536?3:4;for(u=s.uint8array?new Uint8Array(S):new Array(S),_=k=0;k<S;_++)(64512&(y=v.charCodeAt(_)))==55296&&_+1<$&&(64512&(m=v.charCodeAt(_+1)))==56320&&(y=65536+(y-55296<<10)+(m-56320),_++),y<128?u[k++]=y:(y<2048?u[k++]=192|y>>>6:(y<65536?u[k++]=224|y>>>12:(u[k++]=240|y>>>18,u[k++]=128|y>>>12&63),u[k++]=128|y>>>6&63),u[k++]=128|63&y);return u})(h)},a.utf8decode=function(h){return s.nodebuffer?r.transformTo("nodebuffer",h).toString("utf-8"):(function(v){var u,y,m,_,k=v.length,$=new Array(2*k);for(u=y=0;u<k;)if((m=v[u++])<128)$[y++]=m;else if(4<(_=c[m]))$[y++]=65533,u+=_-1;else{for(m&=_===2?31:_===3?15:7;1<_&&u<k;)m=m<<6|63&v[u++],_--;1<_?$[y++]=65533:m<65536?$[y++]=m:(m-=65536,$[y++]=55296|m>>10&1023,$[y++]=56320|1023&m)}return $.length!==y&&($.subarray?$=$.subarray(0,y):$.length=y),r.applyFromCharCode($)})(h=r.transformTo(s.uint8array?"uint8array":"array",h))},r.inherits(g,l),g.prototype.processChunk=function(h){var v=r.transformTo(s.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var u=v;(v=new Uint8Array(u.length+this.leftOver.length)).set(this.leftOver,0),v.set(u,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var y=(function(_,k){var $;for((k=k||_.length)>_.length&&(k=_.length),$=k-1;0<=$&&(192&_[$])==128;)$--;return $<0||$===0?k:$+c[_[$]]>k?$:k})(v),m=v;y!==v.length&&(s.uint8array?(m=v.subarray(0,y),this.leftOver=v.subarray(y,v.length)):(m=v.slice(0,y),this.leftOver=v.slice(y,v.length))),this.push({data:a.utf8decode(m),meta:h.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:a.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},a.Utf8DecodeWorker=g,r.inherits(b,l),b.prototype.processChunk=function(h){this.push({data:a.utf8encode(h.data),meta:h.meta})},a.Utf8EncodeWorker=b},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,i,a){var r=e("./support"),s=e("./base64"),n=e("./nodejsUtils"),l=e("./external");function c(u){return u}function p(u,y){for(var m=0;m<u.length;++m)y[m]=255&u.charCodeAt(m);return y}e("setimmediate"),a.newBlob=function(u,y){a.checkSupport("blob");try{return new Blob([u],{type:y})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(u),m.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var g={stringifyByChunk:function(u,y,m){var _=[],k=0,$=u.length;if($<=m)return String.fromCharCode.apply(null,u);for(;k<$;)y==="array"||y==="nodebuffer"?_.push(String.fromCharCode.apply(null,u.slice(k,Math.min(k+m,$)))):_.push(String.fromCharCode.apply(null,u.subarray(k,Math.min(k+m,$)))),k+=m;return _.join("")},stringifyByChar:function(u){for(var y="",m=0;m<u.length;m++)y+=String.fromCharCode(u[m]);return y},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function b(u){var y=65536,m=a.getTypeOf(u),_=!0;if(m==="uint8array"?_=g.applyCanBeUsed.uint8array:m==="nodebuffer"&&(_=g.applyCanBeUsed.nodebuffer),_)for(;1<y;)try{return g.stringifyByChunk(u,m,y)}catch{y=Math.floor(y/2)}return g.stringifyByChar(u)}function h(u,y){for(var m=0;m<u.length;m++)y[m]=u[m];return y}a.applyFromCharCode=b;var v={};v.string={string:c,array:function(u){return p(u,new Array(u.length))},arraybuffer:function(u){return v.string.uint8array(u).buffer},uint8array:function(u){return p(u,new Uint8Array(u.length))},nodebuffer:function(u){return p(u,n.allocBuffer(u.length))}},v.array={string:b,array:c,arraybuffer:function(u){return new Uint8Array(u).buffer},uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return n.newBufferFrom(u)}},v.arraybuffer={string:function(u){return b(new Uint8Array(u))},array:function(u){return h(new Uint8Array(u),new Array(u.byteLength))},arraybuffer:c,uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return n.newBufferFrom(new Uint8Array(u))}},v.uint8array={string:b,array:function(u){return h(u,new Array(u.length))},arraybuffer:function(u){return u.buffer},uint8array:c,nodebuffer:function(u){return n.newBufferFrom(u)}},v.nodebuffer={string:b,array:function(u){return h(u,new Array(u.length))},arraybuffer:function(u){return v.nodebuffer.uint8array(u).buffer},uint8array:function(u){return h(u,new Uint8Array(u.length))},nodebuffer:c},a.transformTo=function(u,y){if(y=y||"",!u)return y;a.checkSupport(u);var m=a.getTypeOf(y);return v[m][u](y)},a.resolve=function(u){for(var y=u.split("/"),m=[],_=0;_<y.length;_++){var k=y[_];k==="."||k===""&&_!==0&&_!==y.length-1||(k===".."?m.pop():m.push(k))}return m.join("/")},a.getTypeOf=function(u){return typeof u=="string"?"string":Object.prototype.toString.call(u)==="[object Array]"?"array":r.nodebuffer&&n.isBuffer(u)?"nodebuffer":r.uint8array&&u instanceof Uint8Array?"uint8array":r.arraybuffer&&u instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(u){if(!r[u.toLowerCase()])throw new Error(u+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(u){var y,m,_="";for(m=0;m<(u||"").length;m++)_+="\\x"+((y=u.charCodeAt(m))<16?"0":"")+y.toString(16).toUpperCase();return _},a.delay=function(u,y,m){setImmediate(function(){u.apply(m||null,y||[])})},a.inherits=function(u,y){function m(){}m.prototype=y.prototype,u.prototype=new m},a.extend=function(){var u,y,m={};for(u=0;u<arguments.length;u++)for(y in arguments[u])Object.prototype.hasOwnProperty.call(arguments[u],y)&&m[y]===void 0&&(m[y]=arguments[u][y]);return m},a.prepareContent=function(u,y,m,_,k){return l.Promise.resolve(y).then(function($){return r.blob&&($ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call($))!==-1)&&typeof FileReader<"u"?new l.Promise(function(S,E){var R=new FileReader;R.onload=function(B){S(B.target.result)},R.onerror=function(B){E(B.target.error)},R.readAsArrayBuffer($)}):$}).then(function($){var S=a.getTypeOf($);return S?(S==="arraybuffer"?$=a.transformTo("uint8array",$):S==="string"&&(k?$=s.decode($):m&&_!==!0&&($=(function(E){return p(E,r.uint8array?new Uint8Array(E.length):new Array(E.length))})($))),$):l.Promise.reject(new Error("Can't read the data of '"+u+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,i,a){var r=e("./reader/readerFor"),s=e("./utils"),n=e("./signature"),l=e("./zipEntry"),c=e("./support");function p(g){this.files=[],this.loadOptions=g}p.prototype={checkSignature:function(g){if(!this.reader.readAndCheckSignature(g)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(b)+", expected "+s.pretty(g)+")")}},isSignature:function(g,b){var h=this.reader.index;this.reader.setIndex(g);var v=this.reader.readString(4)===b;return this.reader.setIndex(h),v},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var g=this.reader.readData(this.zipCommentLength),b=c.uint8array?"uint8array":"array",h=s.transformTo(b,g);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var g,b,h,v=this.zip64EndOfCentralSize-44;0<v;)g=this.reader.readInt(2),b=this.reader.readInt(4),h=this.reader.readData(b),this.zip64ExtensibleData[g]={id:g,length:b,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var g,b;for(g=0;g<this.files.length;g++)b=this.files[g],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var g;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(g=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(g);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var g=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(g<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(g);var b=g;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(g=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(g),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var v=b-h;if(0<v)this.isSignature(b,n.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(g){this.reader=r(g)},load:function(g){this.prepareReader(g),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=p},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,i,a){var r=e("./reader/readerFor"),s=e("./utils"),n=e("./compressedObject"),l=e("./crc32"),c=e("./utf8"),p=e("./compressions"),g=e("./support");function b(h,v){this.options=h,this.loadOptions=v}b.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var v,u;if(h.skip(22),this.fileNameLength=h.readInt(2),u=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(u),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((v=(function(y){for(var m in p)if(Object.prototype.hasOwnProperty.call(p,m)&&p[m].magic===y)return p[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,v,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var v=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(v),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=r(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var v,u,y,m=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<m;)v=h.readInt(2),u=h.readInt(2),y=h.readData(u),this.extraFields[v]={id:v,length:u,value:y};h.setIndex(m)},handleUTF8:function(){var h=g.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var u=s.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(u)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var m=s.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var v=r(h.value);return v.readInt(1)!==1||l(this.fileName)!==v.readInt(4)?null:c.utf8decode(v.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var v=r(h.value);return v.readInt(1)!==1||l(this.fileComment)!==v.readInt(4)?null:c.utf8decode(v.readData(h.length-5))}return null}},i.exports=b},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,i,a){function r(v,u,y){this.name=v,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=u,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var s=e("./stream/StreamHelper"),n=e("./stream/DataWorker"),l=e("./utf8"),c=e("./compressedObject"),p=e("./stream/GenericWorker");r.prototype={internalStream:function(v){var u=null,y="string";try{if(!v)throw new Error("No output type specified.");var m=(y=v.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),u=this._decompressWorker();var _=!this._dataBinary;_&&!m&&(u=u.pipe(new l.Utf8EncodeWorker)),!_&&m&&(u=u.pipe(new l.Utf8DecodeWorker))}catch(k){(u=new p("error")).error(k)}return new s(u,y,"")},async:function(v,u){return this.internalStream(v).accumulate(u)},nodeStream:function(v,u){return this.internalStream(v||"nodebuffer").toNodejsStream(u)},_compressWorker:function(v,u){if(this._data instanceof c&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(y,v,u)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof p?this._data:new n(this._data)}};for(var g=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],b=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<g.length;h++)r.prototype[g[h]]=b;i.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,i,a){(function(r){var s,n,l=r.MutationObserver||r.WebKitMutationObserver;if(l){var c=0,p=new l(v),g=r.document.createTextNode("");p.observe(g,{characterData:!0}),s=function(){g.data=c=++c%2}}else if(r.setImmediate||r.MessageChannel===void 0)s="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var u=r.document.createElement("script");u.onreadystatechange=function(){v(),u.onreadystatechange=null,u.parentNode.removeChild(u),u=null},r.document.documentElement.appendChild(u)}:function(){setTimeout(v,0)};else{var b=new r.MessageChannel;b.port1.onmessage=v,s=function(){b.port2.postMessage(0)}}var h=[];function v(){var u,y;n=!0;for(var m=h.length;m;){for(y=h,h=[],u=-1;++u<m;)y[u]();m=h.length}n=!1}i.exports=function(u){h.push(u)!==1||n||s()}}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,i,a){var r=e("immediate");function s(){}var n={},l=["REJECTED"],c=["FULFILLED"],p=["PENDING"];function g(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,m!==s&&u(this,m)}function b(m,_,k){this.promise=m,typeof _=="function"&&(this.onFulfilled=_,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function h(m,_,k){r(function(){var $;try{$=_(k)}catch(S){return n.reject(m,S)}$===m?n.reject(m,new TypeError("Cannot resolve promise with itself")):n.resolve(m,$)})}function v(m){var _=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof _=="function")return function(){_.apply(m,arguments)}}function u(m,_){var k=!1;function $(R){k||(k=!0,n.reject(m,R))}function S(R){k||(k=!0,n.resolve(m,R))}var E=y(function(){_(S,$)});E.status==="error"&&$(E.value)}function y(m,_){var k={};try{k.value=m(_),k.status="success"}catch($){k.status="error",k.value=$}return k}(i.exports=g).prototype.finally=function(m){if(typeof m!="function")return this;var _=this.constructor;return this.then(function(k){return _.resolve(m()).then(function(){return k})},function(k){return _.resolve(m()).then(function(){throw k})})},g.prototype.catch=function(m){return this.then(null,m)},g.prototype.then=function(m,_){if(typeof m!="function"&&this.state===c||typeof _!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==p?h(k,this.state===c?m:_,this.outcome):this.queue.push(new b(k,m,_)),k},b.prototype.callFulfilled=function(m){n.resolve(this.promise,m)},b.prototype.otherCallFulfilled=function(m){h(this.promise,this.onFulfilled,m)},b.prototype.callRejected=function(m){n.reject(this.promise,m)},b.prototype.otherCallRejected=function(m){h(this.promise,this.onRejected,m)},n.resolve=function(m,_){var k=y(v,_);if(k.status==="error")return n.reject(m,k.value);var $=k.value;if($)u(m,$);else{m.state=c,m.outcome=_;for(var S=-1,E=m.queue.length;++S<E;)m.queue[S].callFulfilled(_)}return m},n.reject=function(m,_){m.state=l,m.outcome=_;for(var k=-1,$=m.queue.length;++k<$;)m.queue[k].callRejected(_);return m},g.resolve=function(m){return m instanceof this?m:n.resolve(new this(s),m)},g.reject=function(m){var _=new this(s);return n.reject(_,m)},g.all=function(m){var _=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=m.length,$=!1;if(!k)return this.resolve([]);for(var S=new Array(k),E=0,R=-1,B=new this(s);++R<k;)I(m[R],R);return B;function I(M,Q){_.resolve(M).then(function(C){S[Q]=C,++E!==k||$||($=!0,n.resolve(B,S))},function(C){$||($=!0,n.reject(B,C))})}},g.race=function(m){var _=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=m.length,$=!1;if(!k)return this.resolve([]);for(var S=-1,E=new this(s);++S<k;)R=m[S],_.resolve(R).then(function(B){$||($=!0,n.resolve(E,B))},function(B){$||($=!0,n.reject(E,B))});var R;return E}},{immediate:36}],38:[function(e,i,a){var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),i.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,i,a){var r=e("./zlib/deflate"),s=e("./utils/common"),n=e("./utils/strings"),l=e("./zlib/messages"),c=e("./zlib/zstream"),p=Object.prototype.toString,g=0,b=-1,h=0,v=8;function u(m){if(!(this instanceof u))return new u(m);this.options=s.assign({level:b,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},m||{});var _=this.options;_.raw&&0<_.windowBits?_.windowBits=-_.windowBits:_.gzip&&0<_.windowBits&&_.windowBits<16&&(_.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var k=r.deflateInit2(this.strm,_.level,_.method,_.windowBits,_.memLevel,_.strategy);if(k!==g)throw new Error(l[k]);if(_.header&&r.deflateSetHeader(this.strm,_.header),_.dictionary){var $;if($=typeof _.dictionary=="string"?n.string2buf(_.dictionary):p.call(_.dictionary)==="[object ArrayBuffer]"?new Uint8Array(_.dictionary):_.dictionary,(k=r.deflateSetDictionary(this.strm,$))!==g)throw new Error(l[k]);this._dict_set=!0}}function y(m,_){var k=new u(_);if(k.push(m,!0),k.err)throw k.msg||l[k.err];return k.result}u.prototype.push=function(m,_){var k,$,S=this.strm,E=this.options.chunkSize;if(this.ended)return!1;$=_===~~_?_:_===!0?4:0,typeof m=="string"?S.input=n.string2buf(m):p.call(m)==="[object ArrayBuffer]"?S.input=new Uint8Array(m):S.input=m,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new s.Buf8(E),S.next_out=0,S.avail_out=E),(k=r.deflate(S,$))!==1&&k!==g)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||$!==4&&$!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(s.shrinkBuf(S.output,S.next_out))):this.onData(s.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return $===4?(k=r.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===g):$!==2||(this.onEnd(g),!(S.avail_out=0))},u.prototype.onData=function(m){this.chunks.push(m)},u.prototype.onEnd=function(m){m===g&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},a.Deflate=u,a.deflate=y,a.deflateRaw=function(m,_){return(_=_||{}).raw=!0,y(m,_)},a.gzip=function(m,_){return(_=_||{}).gzip=!0,y(m,_)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,i,a){var r=e("./zlib/inflate"),s=e("./utils/common"),n=e("./utils/strings"),l=e("./zlib/constants"),c=e("./zlib/messages"),p=e("./zlib/zstream"),g=e("./zlib/gzheader"),b=Object.prototype.toString;function h(u){if(!(this instanceof h))return new h(u);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},u||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||u&&u.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var m=r.inflateInit2(this.strm,y.windowBits);if(m!==l.Z_OK)throw new Error(c[m]);this.header=new g,r.inflateGetHeader(this.strm,this.header)}function v(u,y){var m=new h(y);if(m.push(u,!0),m.err)throw m.msg||c[m.err];return m.result}h.prototype.push=function(u,y){var m,_,k,$,S,E,R=this.strm,B=this.options.chunkSize,I=this.options.dictionary,M=!1;if(this.ended)return!1;_=y===~~y?y:y===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof u=="string"?R.input=n.binstring2buf(u):b.call(u)==="[object ArrayBuffer]"?R.input=new Uint8Array(u):R.input=u,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new s.Buf8(B),R.next_out=0,R.avail_out=B),(m=r.inflate(R,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&I&&(E=typeof I=="string"?n.string2buf(I):b.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,m=r.inflateSetDictionary(this.strm,E)),m===l.Z_BUF_ERROR&&M===!0&&(m=l.Z_OK,M=!1),m!==l.Z_STREAM_END&&m!==l.Z_OK)return this.onEnd(m),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&m!==l.Z_STREAM_END&&(R.avail_in!==0||_!==l.Z_FINISH&&_!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=n.utf8border(R.output,R.next_out),$=R.next_out-k,S=n.buf2string(R.output,k),R.next_out=$,R.avail_out=B-$,$&&s.arraySet(R.output,R.output,k,$,0),this.onData(S)):this.onData(s.shrinkBuf(R.output,R.next_out)))),R.avail_in===0&&R.avail_out===0&&(M=!0)}while((0<R.avail_in||R.avail_out===0)&&m!==l.Z_STREAM_END);return m===l.Z_STREAM_END&&(_=l.Z_FINISH),_===l.Z_FINISH?(m=r.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===l.Z_OK):_!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(R.avail_out=0))},h.prototype.onData=function(u){this.chunks.push(u)},h.prototype.onEnd=function(u){u===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg},a.Inflate=h,a.inflate=v,a.inflateRaw=function(u,y){return(y=y||{}).raw=!0,v(u,y)},a.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,i,a){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";a.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1
vendor: 5,335 bytes, line 12
12);c.length;){var p=c.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var g in p)p.hasOwnProperty(g)&&(l[g]=p[g])}}return l},a.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,p,g,b){if(c.subarray&&l.subarray)l.set(c.subarray(p,p+g),b);else for(var h=0;h<g;h++)l[b+h]=c[p+h]},flattenChunks:function(l){var c,p,g,b,h,v;for(c=g=0,p=l.length;c<p;c++)g+=l[c].length;for(v=new Uint8Array(g),c=b=0,p=l.length;c<p;c++)h=l[c],v.set(h,b),b+=h.length;return v}},n={arraySet:function(l,c,p,g,b){for(var h=0;h<g;h++)l[b+h]=c[p+h]},flattenChunks:function(l){return[].concat.apply([],l)}};a.setTyped=function(l){l?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,s)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,n))},a.setTyped(r)},{}],42:[function(e,i,a){var r=e("./common"),s=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new r.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function p(g,b){if(b<65537&&(g.subarray&&n||!g.subarray&&s))return String.fromCharCode.apply(null,r.shrinkBuf(g,b));for(var h="",v=0;v<b;v++)h+=String.fromCharCode(g[v]);return h}l[254]=l[254]=1,a.string2buf=function(g){var b,h,v,u,y,m=g.length,_=0;for(u=0;u<m;u++)(64512&(h=g.charCodeAt(u)))==55296&&u+1<m&&(64512&(v=g.charCodeAt(u+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),u++),_+=h<128?1:h<2048?2:h<65536?3:4;for(b=new r.Buf8(_),u=y=0;y<_;u++)(64512&(h=g.charCodeAt(u)))==55296&&u+1<m&&(64512&(v=g.charCodeAt(u+1)))==56320&&(h=65536+(h-55296<<10)+(v-56320),u++),h<128?b[y++]=h:(h<2048?b[y++]=192|h>>>6:(h<65536?b[y++]=224|h>>>12:(b[y++]=240|h>>>18,b[y++]=128|h>>>12&63),b[y++]=128|h>>>6&63),b[y++]=128|63&h);return b},a.buf2binstring=function(g){return p(g,g.length)},a.binstring2buf=function(g){for(var b=new r.Buf8(g.length),h=0,v=b.length;h<v;h++)b[h]=g.charCodeAt(h);return b},a.buf2string=function(g,b){var h,v,u,y,m=b||g.length,_=new Array(2*m);for(h=v=0;h<m;)if((u=g[h++])<128)_[v++]=u;else if(4<(y=l[u]))_[v++]=65533,h+=y-1;else{for(u&=y===2?31:y===3?15:7;1<y&&h<m;)u=u<<6|63&g[h++],y--;1<y?_[v++]=65533:u<65536?_[v++]=u:(u-=65536,_[v++]=55296|u>>10&1023,_[v++]=56320|1023&u)}return p(_,v)},a.utf8border=function(g,b){var h;for((b=b||g.length)>g.length&&(b=g.length),h=b-1;0<=h&&(192&g[h])==128;)h--;return h<0||h===0?b:h+l[g[h]]>b?h:b}},{"./common":41}],43:[function(e,i,a){i.exports=function(r,s,n,l){for(var c=65535&r|0,p=r>>>16&65535|0,g=0;n!==0;){for(n-=g=2e3<n?2e3:n;p=p+(c=c+s[l++]|0)|0,--g;);c%=65521,p%=65521}return c|p<<16|0}},{}],44:[function(e,i,a){i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,i,a){var r=(function(){for(var s,n=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;n[l]=s}return n})();i.exports=function(s,n,l,c){var p=r,g=c+l;s^=-1;for(var b=c;b<g;b++)s=s>>>8^p[255&(s^n[b])];return-1^s}},{}],46:[function(e,i,a){var r,s=e("../utils/common"),n=e("./trees"),l=e("./adler32"),c=e("./crc32"),p=e("./messages"),g=0,b=4,h=0,v=-2,u=-1,y=4,m=2,_=8,k=9,$=286,S=30,E=19,R=2*$+1,B=15,I=3,M=258,Q=M+I+1,C=42,L=113,d=1,P=2,G=3,j=4;function te(o,F){return o.msg=p[F],F}function O(o){return(o<<1)-(4<o?9:0)}function J(o){for(var F=o.length;0<=--F;)o[F]=0}function D(o){var F=o.state,N=F.pending;N>o.avail_out&&(N=o.avail_out),N!==0&&(s.arraySet(o.output,F.pending_buf,F.pending_out,N,o.next_out),o.next_out+=N,F.pending_out+=N,o.total_out+=N,o.avail_out-=N,F.pending-=N,F.pending===0&&(F.pending_out=0))}function T(o,F){n._tr_flush_block(o,0<=o.block_start?o.block_start:-1,o.strstart-o.block_start,F),o.block_start=o.strstart,D(o.strm)}function X(o,F){o.pending_buf[o.pending++]=F}function Y(o,F){o.pending_buf[o.pending++]=F>>>8&255,o.pending_buf[o.pending++]=255&F}function Z(o,F){var N,w,x=o.max_chain_length,z=o.strstart,K=o.prev_length,W=o.nice_match,A=o.strstart>o.w_size-Q?o.strstart-(o.w_size-Q):0,V=o.window,ee=o.w_mask,q=o.prev,ie=o.strstart+M,de=V[z+K-1],le=V[z+K];o.prev_length>=o.good_match&&(x>>=2),W>o.lookahead&&(W=o.lookahead);do if(V[(N=F)+K]===le&&V[N+K-1]===de&&V[N]===V[z]&&V[++N]===V[z+1]){z+=2,N++;do;while(V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&V[++z]===V[++N]&&z<ie);if(w=M-(ie-z),z=ie-M,K<w){if(o.match_start=F,W<=(K=w))break;de=V[z+K-1],le=V[z+K]}}while((F=q[F&ee])>A&&--x!=0);return K<=o.lookahead?K:o.lookahead}function ae(o){var F,N,w,x,z,K,W,A,V,ee,q=o.w_size;do{if(x=o.window_size-o.lookahead-o.strstart,o.strstart>=q+(q-Q)){for(s.arraySet(o.window,o.window,q,q,0),o.match_start-=q,o.strstart-=q,o.block_start-=q,F=N=o.hash_size;w=o.head[--F],o.head[F]=q<=w?w-q:0,--N;);for(F=N=q;w=o.prev[--F],o.prev[F]=q<=w?w-q:0,--N;);x+=q}if(o.strm.avail_in===0)break;if(K=o.strm,W=o.window,A=o.strstart+o.lookahead,V=x,ee=void 0,ee=K.avail_in,V<ee&&(ee=V),N=ee===0?0:(K.avail_in-=ee,s.arraySet(W,K.input,
vendor: 35,975 bytes, line 12
12K.next_in,ee,A),K.state.wrap===1?K.adler=l(K.adler,W,ee,A):K.state.wrap===2&&(K.adler=c(K.adler,W,ee,A)),K.next_in+=ee,K.total_in+=ee,ee),o.lookahead+=N,o.lookahead+o.insert>=I)for(z=o.strstart-o.insert,o.ins_h=o.window[z],o.ins_h=(o.ins_h<<o.hash_shift^o.window[z+1])&o.hash_mask;o.insert&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[z+I-1])&o.hash_mask,o.prev[z&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=z,z++,o.insert--,!(o.lookahead+o.insert<I)););}while(o.lookahead<Q&&o.strm.avail_in!==0)}function oe(o,F){for(var N,w;;){if(o.lookahead<Q){if(ae(o),o.lookahead<Q&&F===g)return d;if(o.lookahead===0)break}if(N=0,o.lookahead>=I&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+I-1])&o.hash_mask,N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),N!==0&&o.strstart-N<=o.w_size-Q&&(o.match_length=Z(o,N)),o.match_length>=I)if(w=n._tr_tally(o,o.strstart-o.match_start,o.match_length-I),o.lookahead-=o.match_length,o.match_length<=o.max_lazy_match&&o.lookahead>=I){for(o.match_length--;o.strstart++,o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+I-1])&o.hash_mask,N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart,--o.match_length!=0;);o.strstart++}else o.strstart+=o.match_length,o.match_length=0,o.ins_h=o.window[o.strstart],o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+1])&o.hash_mask;else w=n._tr_tally(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++;if(w&&(T(o,!1),o.strm.avail_out===0))return d}return o.insert=o.strstart<I-1?o.strstart:I-1,F===b?(T(o,!0),o.strm.avail_out===0?G:j):o.last_lit&&(T(o,!1),o.strm.avail_out===0)?d:P}function ne(o,F){for(var N,w,x;;){if(o.lookahead<Q){if(ae(o),o.lookahead<Q&&F===g)return d;if(o.lookahead===0)break}if(N=0,o.lookahead>=I&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+I-1])&o.hash_mask,N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),o.prev_length=o.match_length,o.prev_match=o.match_start,o.match_length=I-1,N!==0&&o.prev_length<o.max_lazy_match&&o.strstart-N<=o.w_size-Q&&(o.match_length=Z(o,N),o.match_length<=5&&(o.strategy===1||o.match_length===I&&4096<o.strstart-o.match_start)&&(o.match_length=I-1)),o.prev_length>=I&&o.match_length<=o.prev_length){for(x=o.strstart+o.lookahead-I,w=n._tr_tally(o,o.strstart-1-o.prev_match,o.prev_length-I),o.lookahead-=o.prev_length-1,o.prev_length-=2;++o.strstart<=x&&(o.ins_h=(o.ins_h<<o.hash_shift^o.window[o.strstart+I-1])&o.hash_mask,N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),--o.prev_length!=0;);if(o.match_available=0,o.match_length=I-1,o.strstart++,w&&(T(o,!1),o.strm.avail_out===0))return d}else if(o.match_available){if((w=n._tr_tally(o,0,o.window[o.strstart-1]))&&T(o,!1),o.strstart++,o.lookahead--,o.strm.avail_out===0)return d}else o.match_available=1,o.strstart++,o.lookahead--}return o.match_available&&(w=n._tr_tally(o,0,o.window[o.strstart-1]),o.match_available=0),o.insert=o.strstart<I-1?o.strstart:I-1,F===b?(T(o,!0),o.strm.avail_out===0?G:j):o.last_lit&&(T(o,!1),o.strm.avail_out===0)?d:P}function se(o,F,N,w,x){this.good_length=o,this.max_lazy=F,this.nice_length=N,this.max_chain=w,this.func=x}function ue(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*R),this.dyn_dtree=new s.Buf16(2*(2*S+1)),this.bl_tree=new s.Buf16(2*(2*E+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(B+1),this.heap=new s.Buf16(2*$+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*$+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ce(o){var F;return o&&o.state?(o.total_in=o.total_out=0,o.data_type=m,(F=o.state).pending=0,F.pending_out=0,F.wrap<0&&(F.wrap=-F.wrap),F.status=F.wrap?C:L,o.adler=F.wrap===2?0:1,F.last_flush=g,n._tr_init(F),h):te(o,v)}function me(o){var F=ce(o);return F===h&&(function(N){N.window_size=2*N.w_size,J(N.head),N.max_lazy_match=r[N.level].max_lazy,N.good_match=r[N.level].good_length,N.nice_match=r[N.level].nice_length,N.max_chain_length=r[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=I-1,N.match_available=0,N.ins_h=0})(o.state),F}function pe(o,F,N,w,x,z){if(!o)return v;var K=1;if(F===u&&(F=6),w<0?(K=0,w=-w):15<w&&(K=2,w-=16),x<1||k<x||N!==_||w<8||15<w||F<0||9<F||z<0||y<z)return te(o,v);w===8&&(w=9);var W=new ue;return(o.state=W).strm=o,W.wrap=K,W.gzhead=null,W.w_bits=w,W.w_size=1<<W.w_bits,W.w_mask=W.w_size-1,W.hash_bits=x+7,W.hash_size=1<<W.hash_bits,W.hash_mask=W.hash_size-1,W.hash_shift=~~((W.hash_bits+I-1)/I),W.window=new s.Buf8(2*W.w_size),W.head=new s.Buf16(W.hash_size),W.prev=new s.Buf16(W.w_size),W.lit_bufsize=1<<x+6,W.pending_buf_size=4*W.lit_bufsize,W.pending_buf=new s.Buf8(W.pending_buf_size),W.d_buf=1*W.lit_bufsize,W.l_buf=3*W.lit_bufsize,W.level=F,W.strategy=z,W.method=N,me(o)}r=[new se(0,0,0,0,function(o,F){var N=65535;for(N>o.pending_buf_size-5&&(N=o.pending_buf_size-5);;){if(o.lookahead<=1){if(ae(o),o.lookahead===0&&F===g)return d;if(o.lookahead===0)break}o.strstart+=o.lookahead,o.lookahead=0;var w=o.block_start+N;if((o.strstart===0||o.strstart>=w)&&(o.lookahead=o.strstart-w,o.strstart=w,T(o,!1),o.strm.avail_out===0)||o.strstart-o.block_start>=o.w_size-Q&&(T(o,!1),o.strm.avail_out===0))return d}return o.insert=0,F===b?(T(o,!0),o.strm.avail_out===0?G:j):(o.strstart>o.block_start&&(T(o,!1),o.strm.avail_out),d)}),new se(4,4,8,4,oe),new se(4,5,16,8,oe),new se(4,6,32,32,oe),new se(4,4,16,16,ne),new se(8,16,32,32,ne),new se(8,16,128,128,ne),new se(8,32,128,256,ne),new se(32,128,258,1024,ne),new se(32,258,258,4096,ne)],a.deflateInit=function(o,F){return pe(o,F,_,15,8,0)},a.deflateInit2=pe,a.deflateReset=me,a.deflateResetKeep=ce,a.deflateSetHeader=function(o,F){return o&&o.state?o.state.wrap!==2?v:(o.state.gzhead=F,h):v},a.deflate=function(o,F){var N,w,x,z;if(!o||!o.state||5<F||F<0)return o?te(o,v):v;if(w=o.state,!o.output||!o.input&&o.avail_in!==0||w.status===666&&F!==b)return te(o,o.avail_out===0?-5:v);if(w.strm=o,N=w.last_flush,w.last_flush=F,w.status===C)if(w.wrap===2)o.adler=0,X(w,31),X(w,139),X(w,8),w.gzhead?(X(w,(w.gzhead.text?1:0)+(w.gzhead.hcrc?2:0)+(w.gzhead.extra?4:0)+(w.gzhead.name?8:0)+(w.gzhead.comment?16:0)),X(w,255&w.gzhead.time),X(w,w.gzhead.time>>8&255),X(w,w.gzhead.time>>16&255),X(w,w.gzhead.time>>24&255),X(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),X(w,255&w.gzhead.os),w.gzhead.extra&&w.gzhead.extra.length&&(X(w,255&w.gzhead.extra.length),X(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(o.adler=c(o.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=69):(X(w,0),X(w,0),X(w,0),X(w,0),X(w,0),X(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),X(w,3),w.status=L);else{var K=_+(w.w_bits-8<<4)<<8;K|=(2<=w.strategy||w.level<2?0:w.level<6?1:w.level===6?2:3)<<6,w.strstart!==0&&(K|=32),K+=31-K%31,w.status=L,Y(w,K),w.strstart!==0&&(Y(w,o.adler>>>16),Y(w,65535&o.adler)),o.adler=1}if(w.status===69)if(w.gzhead.extra){for(x=w.pending;w.gzindex<(65535&w.gzhead.extra.length)&&(w.pending!==w.pending_buf_size||(w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),D(o),x=w.pending,w.pending!==w.pending_buf_size));)X(w,255&w.gzhead.extra[w.gzindex]),w.gzindex++;w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=73)}else w.status=73;if(w.status===73)if(w.gzhead.name){x=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),D(o),x=w.pending,w.pending===w.pending_buf_size)){z=1;break}z=w.gzindex<w.gzhead.name.length?255&w.gzhead.name.charCodeAt(w.gzindex++):0,X(w,z)}while(z!==0);w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),z===0&&(w.gzindex=0,w.status=91)}else w.status=91;if(w.status===91)if(w.gzhead.comment){x=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),D(o),x=w.pending,w.pending===w.pending_buf_size)){z=1;break}z=w.gzindex<w.gzhead.comment.length?255&w.gzhead.comment.charCodeAt(w.gzindex++):0,X(w,z)}while(z!==0);w.gzhead.hcrc&&w.pending>x&&(o.adler=c(o.adler,w.pending_buf,w.pending-x,x)),z===0&&(w.status=103)}else w.status=103;if(w.status===103&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&D(o),w.pending+2<=w.pending_buf_size&&(X(w,255&o.adler),X(w,o.adler>>8&255),o.adler=0,w.status=L)):w.status=L),w.pending!==0){if(D(o),o.avail_out===0)return w.last_flush=-1,h}else if(o.avail_in===0&&O(F)<=O(N)&&F!==b)return te(o,-5);if(w.status===666&&o.avail_in!==0)return te(o,-5);if(o.avail_in!==0||w.lookahead!==0||F!==g&&w.status!==666){var W=w.strategy===2?(function(A,V){for(var ee;;){if(A.lookahead===0&&(ae(A),A.lookahead===0)){if(V===g)return d;break}if(A.match_length=0,ee=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,ee&&(T(A,!1),A.strm.avail_out===0))return d}return A.insert=0,V===b?(T(A,!0),A.strm.avail_out===0?G:j):A.last_lit&&(T(A,!1),A.strm.avail_out===0)?d:P})(w,F):w.strategy===3?(function(A,V){for(var ee,q,ie,de,le=A.window;;){if(A.lookahead<=M){if(ae(A),A.lookahead<=M&&V===g)return d;if(A.lookahead===0)break}if(A.match_length=0,A.lookahead>=I&&0<A.strstart&&(q=le[ie=A.strstart-1])===le[++ie]&&q===le[++ie]&&q===le[++ie]){de=A.strstart+M;do;while(q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&q===le[++ie]&&ie<de);A.match_length=M-(de-ie),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=I?(ee=n._tr_tally(A,1,A.match_length-I),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(ee=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),ee&&(T(A,!1),A.strm.avail_out===0))return d}return A.insert=0,V===b?(T(A,!0),A.strm.avail_out===0?G:j):A.last_lit&&(T(A,!1),A.strm.avail_out===0)?d:P})(w,F):r[w.level].func(w,F);if(W!==G&&W!==j||(w.status=666),W===d||W===G)return o.avail_out===0&&(w.last_flush=-1),h;if(W===P&&(F===1?n._tr_align(w):F!==5&&(n._tr_stored_block(w,0,0,!1),F===3&&(J(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),D(o),o.avail_out===0))return w.last_flush=-1,h}return F!==b?h:w.wrap<=0?1:(w.wrap===2?(X(w,255&o.adler),X(w,o.adler>>8&255),X(w,o.adler>>16&255),X(w,o.adler>>24&255),X(w,255&o.total_in),X(w,o.total_in>>8&255),X(w,o.total_in>>16&255),X(w,o.total_in>>24&255)):(Y(w,o.adler>>>16),Y(w,65535&o.adler)),D(o),0<w.wrap&&(w.wrap=-w.wrap),w.pending!==0?h:1)},a.deflateEnd=function(o){var F;return o&&o.state?(F=o.state.status)!==C&&F!==69&&F!==73&&F!==91&&F!==103&&F!==L&&F!==666?te(o,v):(o.state=null,F===L?te(o,-3):h):v},a.deflateSetDictionary=function(o,F){var N,w,x,z,K,W,A,V,ee=F.length;if(!o||!o.state||(z=(N=o.state).wrap)===2||z===1&&N.status!==C||N.lookahead)return v;for(z===1&&(o.adler=l(o.adler,F,ee,0)),N.wrap=0,ee>=N.w_size&&(z===0&&(J(N.head),N.strstart=0,N.block_start=0,N.insert=0),V=new s.Buf8(N.w_size),s.arraySet(V,F,ee-N.w_size,N.w_size,0),F=V,ee=N.w_size),K=o.avail_in,W=o.next_in,A=o.input,o.avail_in=ee,o.next_in=0,o.input=F,ae(N);N.lookahead>=I;){for(w=N.strstart,x=N.lookahead-(I-1);N.ins_h=(N.ins_h<<N.hash_shift^N.window[w+I-1])&N.hash_mask,N.prev[w&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=w,w++,--x;);N.strstart=w,N.lookahead=I-1,ae(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=I-1,N.match_available=0,o.next_in=W,o.input=A,o.avail_in=K,N.wrap=z,h},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,i,a){i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,i,a){i.exports=function(r,s){var n,l,c,p,g,b,h,v,u,y,m,_,k,$,S,E,R,B,I,M,Q,C,L,d,P;n=r.state,l=r.next_in,d=r.input,c=l+(r.avail_in-5),p=r.next_out,P=r.output,g=p-(s-r.avail_out),b=p+(r.avail_out-257),h=n.dmax,v=n.wsize,u=n.whave,y=n.wnext,m=n.window,_=n.hold,k=n.bits,$=n.lencode,S=n.distcode,E=(1<<n.lenbits)-1,R=(1<<n.distbits)-1;e:do{k<15&&(_+=d[l++]<<k,k+=8,_+=d[l++]<<k,k+=8),B=$[_&E];t:for(;;){if(_>>>=I=B>>>24,k-=I,(I=B>>>16&255)===0)P[p++]=65535&B;else{if(!(16&I)){if((64&I)==0){B=$[(65535&B)+(_&(1<<I)-1)];continue t}if(32&I){n.mode=12;break e}r.msg="invalid literal/length code",n.mode=30;break e}M=65535&B,(I&=15)&&(k<I&&(_+=d[l++]<<k,k+=8),M+=_&(1<<I)-1,_>>>=I,k-=I),k<15&&(_+=d[l++]<<k,k+=8,_+=d[l++]<<k,k+=8),B=S[_&R];r:for(;;){if(_>>>=I=B>>>24,k-=I,!(16&(I=B>>>16&255))){if((64&I)==0){B=S[(65535&B)+(_&(1<<I)-1)];continue r}r.msg="invalid distance code",n.mode=30;break e}if(Q=65535&B,k<(I&=15)&&(_+=d[l++]<<k,(k+=8)<I&&(_+=d[l++]<<k,k+=8)),h<(Q+=_&(1<<I)-1)){r.msg="invalid distance too far back",n.mode=30;break e}if(_>>>=I,k-=I,(I=p-g)<Q){if(u<(I=Q-I)&&n.sane){r.msg="invalid distance too far back",n.mode=30;break e}if(L=m,(C=0)===y){if(C+=v-I,I<M){for(M-=I;P[p++]=m[C++],--I;);C=p-Q,L=P}}else if(y<I){if(C+=v+y-I,(I-=y)<M){for(M-=I;P[p++]=m[C++],--I;);if(C=0,y<M){for(M-=I=y;P[p++]=m[C++],--I;);C=p-Q,L=P}}}else if(C+=y-I,I<M){for(M-=I;P[p++]=m[C++],--I;);C=p-Q,L=P}for(;2<M;)P[p++]=L[C++],P[p++]=L[C++],P[p++]=L[C++],M-=3;M&&(P[p++]=L[C++],1<M&&(P[p++]=L[C++]))}else{for(C=p-Q;P[p++]=P[C++],P[p++]=P[C++],P[p++]=P[C++],2<(M-=3););M&&(P[p++]=P[C++],1<M&&(P[p++]=P[C++]))}break}}break}}while(l<c&&p<b);l-=M=k>>3,_&=(1<<(k-=M<<3))-1,r.next_in=l,r.next_out=p,r.avail_in=l<c?c-l+5:5-(l-c),r.avail_out=p<b?b-p+257:257-(p-b),n.hold=_,n.bits=k}},{}],49:[function(e,i,a){var r=e("../utils/common"),s=e("./adler32"),n=e("./crc32"),l=e("./inffast"),c=e("./inftrees"),p=1,g=2,b=0,h=-2,v=1,u=852,y=592;function m(C){return(C>>>24&255)+(C>>>8&65280)+((65280&C)<<8)+((255&C)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(C){var L;return C&&C.state?(L=C.state,C.total_in=C.total_out=L.total=0,C.msg="",L.wrap&&(C.adler=1&L.wrap),L.mode=v,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new r.Buf32(u),L.distcode=L.distdyn=new r.Buf32(y),L.sane=1,L.back=-1,b):h}function $(C){var L;return C&&C.state?((L=C.state).wsize=0,L.whave=0,L.wnext=0,k(C)):h}function S(C,L){var d,P;return C&&C.state?(P=C.state,L<0?(d=0,L=-L):(d=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?h:(P.window!==null&&P.wbits!==L&&(P.window=null),P.wrap=d,P.wbits=L,$(C))):h}function E(C,L){var d,P;return C?(P=new _,(C.state=P).window=null,(d=S(C,L))!==b&&(C.state=null),d):h}var R,B,I=!0;function M(C){if(I){var L;for(R=new r.Buf32(512),B=new r.Buf32(32),L=0;L<144;)C.lens[L++]=8;for(;L<256;)C.lens[L++]=9;for(;L<280;)C.lens[L++]=7;for(;L<288;)C.lens[L++]=8;for(c(p,C.lens,0,288,R,0,C.work,{bits:9}),L=0;L<32;)C.lens[L++]=5;c(g,C.lens,0,32,B,0,C.work,{bits:5}),I=!1}C.lencode=R,C.lenbits=9,C.distcode=B,C.distbits=5}function Q(C,L,d,P){var G,j=C.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new r.Buf8(j.wsize)),P>=j.wsize?(r.arraySet(j.window,L,d-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(P<(G=j.wsize-j.wnext)&&(G=P),r.arraySet(j.window,L,d-P,G,j.wnext),(P-=G)?(r.arraySet(j.window,L,d-P,P,0),j.wnext=P,j.whave=j.wsize):(j.wnext+=G,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=G))),0}a.inflateReset=$,a.inflateReset2=S,a.inflateResetKeep=k,a.inflateInit=function(C){return E(C,15)},a.inflateInit2=E,a.inflate=function(C,L){var d,P,G,j,te,O,J,D,T,X,Y,Z,ae,oe,ne,se,ue,ce,me,pe,o,F,N,w,x=0,z=new r.Buf8(4),K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!C||!C.state||!C.output||!C.input&&C.avail_in!==0)return h;(d=C.state).mode===12&&(d.mode=13),te=C.next_out,G=C.output,J=C.avail_out,j=C.next_in,P=C.input,O=C.avail_in,D=d.hold,T=d.bits,X=O,Y=J,F=b;e:for(;;)switch(d.mode){case v:if(d.wrap===0){d.mode=13;break}for(;T<16;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(2&d.wrap&&D===35615){z[d.check=0]=255&D,z[1]=D>>>8&255,d.check=n(d.check,z,2,0),T=D=0,d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&D)<<8)+(D>>8))%31){C.msg="incorrect header check",d.mode=30;break}if((15&D)!=8){C.msg="unknown compression method",d.mode=30;break}if(T-=4,o=8+(15&(D>>>=4)),d.wbits===0)d.wbits=o;else if(o>d.wbits){C.msg="invalid window size",d.mode=30;break}d.dmax=1<<o,C.adler=d.check=1,d.mode=512&D?10:12,T=D=0;break;case 2:for(;T<16;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(d.flags=D,(255&d.flags)!=8){C.msg="unknown compression method",d.mode=30;break}if(57344&d.flags){C.msg="unknown header flags set",d.mode=30;break}d.head&&(d.head.text=D>>8&1),512&d.flags&&(z[0]=255&D,z[1]=D>>>8&255,d.check=n(d.check,z,2,0)),T=D=0,d.mode=3;case 3:for(;T<32;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.head&&(d.head.time=D),512&d.flags&&(z[0]=255&D,z[1]=D>>>8&255,z[2]=D>>>16&255,z[3]=D>>>24&255,d.check=n(d.check,z,4,0)),T=D=0,d.mode=4;case 4:for(;T<16;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.head&&(d.head.xflags=255&D,d.head.os=D>>8),512&d.flags&&(z[0]=255&D,z[1]=D>>>8&255,d.check=n(d.check,z,2,0)),T=D=0,d.mode=5;case 5:if(1024&d.flags){for(;T<16;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.length=D,d.head&&(d.head.extra_len=D),512&d.flags&&(z[0]=255&D,z[1]=D>>>8&255,d.check=n(d.check,z,2,0)),T=D=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(O<(Z=d.length)&&(Z=O),Z&&(d.head&&(o=d.head.extra_len-d.length,d.head.extra||(d.head.extra=new Array(d.head.extra_len)),r.arraySet(d.head.extra,P,j,Z,o)),512&d.flags&&(d.check=n(d.check,P,Z,j)),O-=Z,j+=Z,d.length-=Z),d.length))break e;d.length=0,d.mode=7;case 7:if(2048&d.flags){if(O===0)break e;for(Z=0;o=P[j+Z++],d.head&&o&&d.length<65536&&(d.head.name+=String.fromCharCode(o)),o&&Z<O;);if(512&d.flags&&(d.check=n(d.check,P,Z,j)),O-=Z,j+=Z,o)break e}else d.head&&(d.head.name=null);d.length=0,d.mode=8;case 8:if(4096&d.flags){if(O===0)break e;for(Z=0;o=P[j+Z++],d.head&&o&&d.length<65536&&(d.head.comment+=String.fromCharCode(o)),o&&Z<O;);if(512&d.flags&&(d.check=n(d.check,P,Z,j)),O-=Z,j+=Z,o)break e}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;T<16;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(D!==(65535&d.check)){C.msg="header crc mismatch",d.mode=30;break}T=D=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0),C.adler=d.check=0,d.mode=12;break;case 10:for(;T<32;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}C.adler=d.check=m(D),T=D=0,d.mode=11;case 11:if(d.havedict===0)return C.next_out=te,C.avail_out=J,C.next_in=j,C.avail_in=O,d.hold=D,d.bits=T,2;C.adler=d.check=1,d.mode=12;case 12:if(L===5||L===6)break e;case 13:if(d.last){D>>>=7&T,T-=7&T,d.mode=27;break}for(;T<3;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}switch(d.last=1&D,T-=1,3&(D>>>=1)){case 0:d.mode=14;break;case 1:if(M(d),d.mode=20,L!==6)break;D>>>=2,T-=2;break e;case 2:d.mode=17;break;case 3:C.msg="invalid block type",d.mode=30}D>>>=2,T-=2;break;case 14:for(D>>>=7&T,T-=7&T;T<32;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if((65535&D)!=(D>>>16^65535)){C.msg="invalid stored block lengths",d.mode=30;break}if(d.length=65535&D,T=D=0,d.mode=15,L===6)break e;case 15:d.mode=16;case 16:if(Z=d.length){if(O<Z&&(Z=O),J<Z&&(Z=J),Z===0)break e;r.arraySet(G,P,j,Z,te),O-=Z,j+=Z,J-=Z,te+=Z,d.length-=Z;break}d.mode=12;break;case 17:for(;T<14;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(d.nlen=257+(31&D),D>>>=5,T-=5,d.ndist=1+(31&D),D>>>=5,T-=5,d.ncode=4+(15&D),D>>>=4,T-=4,286<d.nlen||30<d.ndist){C.msg="too many length or distance symbols",d.mode=30;break}d.have=0,d.mode=18;case 18:for(;d.have<d.ncode;){for(;T<3;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.lens[K[d.have++]]=7&D,D>>>=3,T-=3}for(;d.have<19;)d.lens[K[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,N={bits:d.lenbits},F=c(0,d.lens,0,19,d.lencode,0,d.work,N),d.lenbits=N.bits,F){C.msg="invalid code lengths set",d.mode=30;break}d.have=0,d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;se=(x=d.lencode[D&(1<<d.lenbits)-1])>>>16&255,ue=65535&x,!((ne=x>>>24)<=T);){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(ue<16)D>>>=ne,T-=ne,d.lens[d.have++]=ue;else{if(ue===16){for(w=ne+2;T<w;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(D>>>=ne,T-=ne,d.have===0){C.msg="invalid bit length repeat",d.mode=30;break}o=d.lens[d.have-1],Z=3+(3&D),D>>>=2,T-=2}else if(ue===17){for(w=ne+3;T<w;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}T-=ne,o=0,Z=3+(7&(D>>>=ne)),D>>>=3,T-=3}else{for(w=ne+7;T<w;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}T-=ne,o=0,Z=11+(127&(D>>>=ne)),D>>>=7,T-=7}if(d.have+Z>d.nlen+d.ndist){C.msg="invalid bit length repeat",d.mode=30;break}for(;Z--;)d.lens[d.have++]=o}}if(d.mode===30)break;if(d.lens[256]===0){C.msg="invalid code -- missing end-of-block",d.mode=30;break}if(d.lenbits=9,N={bits:d.lenbits},F=c(p,d.lens,0,d.nlen,d.lencode,0,d.work,N),d.lenbits=N.bits,F){C.msg="invalid literal/lengths set",d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,N={bits:d.distbits},F=c(g,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,N),d.distbits=N.bits,F){C.msg="invalid distances set",d.mode=30;break}if(d.mode=20,L===6)break e;case 20:d.mode=21;case 21:if(6<=O&&258<=J){C.next_out=te,C.avail_out=J,C.next_in=j,C.avail_in=O,d.hold=D,d.bits=T,l(C,Y),te=C.next_out,G=C.output,J=C.avail_out,j=C.next_in,P=C.input,O=C.avail_in,D=d.hold,T=d.bits,d.mode===12&&(d.back=-1);break}for(d.back=0;se=(x=d.lencode[D&(1<<d.lenbits)-1])>>>16&255,ue=65535&x,!((ne=x>>>24)<=T);){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(se&&(240&se)==0){for(ce=ne,me=se,pe=ue;se=(x=d.lencode[pe+((D&(1<<ce+me)-1)>>ce)])>>>16&255,ue=65535&x,!(ce+(ne=x>>>24)<=T);){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}D>>>=ce,T-=ce,d.back+=ce}if(D>>>=ne,T-=ne,d.back+=ne,d.length=ue,se===0){d.mode=26;break}if(32&se){d.back=-1,d.mode=12;break}if(64&se){C.msg="invalid literal/length code",d.mode=30;break}d.extra=15&se,d.mode=22;case 22:if(d.extra){for(w=d.extra;T<w;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.length+=D&(1<<d.extra)-1,D>>>=d.extra,T-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=23;case 23:for(;se=(x=d.distcode[D&(1<<d.distbits)-1])>>>16&255,ue=65535&x,!((ne=x>>>24)<=T);){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if((240&se)==0){for(ce=ne,me=se,pe=ue;se=(x=d.distcode[pe+((D&(1<<ce+me)-1)>>ce)])>>>16&255,ue=65535&x,!(ce+(ne=x>>>24)<=T);){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}D>>>=ce,T-=ce,d.back+=ce}if(D>>>=ne,T-=ne,d.back+=ne,64&se){C.msg="invalid distance code",d.mode=30;break}d.offset=ue,d.extra=15&se,d.mode=24;case 24:if(d.extra){for(w=d.extra;T<w;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}d.offset+=D&(1<<d.extra)-1,D>>>=d.extra,T-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){C.msg="invalid distance too far back",d.mode=30;break}d.mode=25;case 25:if(J===0)break e;if(Z=Y-J,d.offset>Z){if((Z=d.offset-Z)>d.whave&&d.sane){C.msg="invalid distance too far back",d.mode=30;break}ae=Z>d.wnext?(Z-=d.wnext,d.wsize-Z):d.wnext-Z,Z>d.length&&(Z=d.length),oe=d.window}else oe=G,ae=te-d.offset,Z=d.length;for(J<Z&&(Z=J),J-=Z,d.length-=Z;G[te++]=oe[ae++],--Z;);d.length===0&&(d.mode=21);break;case 26:if(J===0)break e;G[te++]=d.length,J--,d.mode=21;break;case 27:if(d.wrap){for(;T<32;){if(O===0)break e;O--,D|=P[j++]<<T,T+=8}if(Y-=J,C.total_out+=Y,d.total+=Y,Y&&(C.adler=d.check=d.flags?n(d.check,G,Y,te-Y):s(d.check,G,Y,te-Y)),Y=J,(d.flags?D:m(D))!==d.check){C.msg="incorrect data check",d.mode=30;break}T=D=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;T<32;){if(O===0)break e;O--,D+=P[j++]<<T,T+=8}if(D!==(4294967295&d.total)){C.msg="incorrect length check",d.mode=30;break}T=D=0}d.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return-4;case 32:default:return h}return C.next_out=te,C.avail_out=J,C.next_in=j,C.avail_in=O,d.hold=D,d.bits=T,(d.wsize||Y!==C.avail_out&&d.mode<30&&(d.mode<27||L!==4))&&Q(C,C.output,C.next_out,Y-C.avail_out)?(d.mode=31,-4):(X-=C.avail_in,Y-=C.avail_out,C.total_in+=X,C.total_out+=Y,d.total+=Y,d.wrap&&Y&&(C.adler=d.check=d.flags?n(d.check,G,Y,C.next_out-Y):s(d.check,G,Y,C.next_out-Y)),C.data_type=d.bits+(d.last?64:0)+(d.mode===12?128:0)+(d.mode===20||d.mode===15?256:0),(X==0&&Y===0||L===4)&&F===b&&(F=-5),F)},a.inflateEnd=function(C){if(!C||!C.state)return h;var L=C.state;return L.window&&(L.window=null),C.state=null,b},a.inflateGetHeader=function(C,L){var d;return C&&C.state?(2&(d=C.state).wrap)==0?h:((d.head=L).done=!1,b):h},a.inflateSetDictionary=function(C,L){var d,P=L.length;return C&&C.state?(d=C.state).wrap!==0&&d.mode!==11?h:d.mode===11&&s(1,L,P,0)!==d.check?-3:Q(C,L,P,P)?(d.mode=31,-4):(d.havedict=1,b):h},a.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,i,a){var r=e("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=function(p,g,b,h,v,u,y,m){var _,k,$,S,E,R,B,I,M,Q=m.bits,C=0,L=0,d=0,P=0,G=0,j=0,te=0,O=0,J=0,D=0,T=null,X=0,Y=new r.Buf16(16),Z=new r.Buf16(16),ae=null,oe=0;for(C=0;C<=15;C++)Y[C]=0;for(L=0;L<h;L++)Y[g[b+L]]++;for(G=Q,P=15;1<=P&&Y[P]===0;P--);if(P<G&&(G=P),P===0)return v[u++]=20971520,v[u++]=20971520,m.bits=1,0;for(d=1;d<P&&Y[d]===0;d++);for(G<d&&(G=d),C=O=1;C<=15;C++)if(O<<=1,(O-=Y[C])<0)return-1;if(0<O&&(p===0||P!==1))return-1;for(Z[1]=0,C=1;C<15;C++)Z[C+1]=Z[C]+Y[C];for(L=0;L<h;L++)g[b+L]!==0&&(y[Z[g[b+L]]++]=L);if(R=p===0?(T=ae=y,19):p===1?(T=s,X-=257,ae=n,oe-=257,256):(T=l,ae=c,-1),C=d,E=u,te=L=D=0,$=-1,S=(J=1<<(j=G))-1,p===1&&852<J||p===2&&592<J)return 1;for(;;){for(B=C-te,M=y[L]<R?(I=0,y[L]):y[L]>R?(I=ae[oe+y[L]],T[X+y[L]]):(I=96,0),_=1<<C-te,d=k=1<<j;v[E+(D>>te)+(k-=_)]=B<<24|I<<16|M|0,k!==0;);for(_=1<<C-1;D&_;)_>>=1;if(_!==0?(D&=_-1,D+=_):D=0,L++,--Y[C]==0){if(C===P)break;C=g[b+y[L]]}if(G<C&&(D&S)!==$){for(te===0&&(te=G),E+=d,O=1<<(j=C-te);j+te<P&&!((O-=Y[j+te])<=0);)j++,O<<=1;if(J+=1<<j,p===1&&852<J||p===2&&592<J)return 1;v[$=D&S]=G<<24|j<<16|E-u|0}}return D!==0&&(v[E+D]=C-te<<24|64<<16|0),m.bits=G,0}},{"../utils/common":41}],51:[function(e,i,a){i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,i,a){var r=e("../utils/common"),s=0,n=1;function l(x){for(var z=x.length;0<=--z;)x[z]=0}var c=0,p=29,g=256,b=g+1+p,h=30,v=19,u=2*b+1,y=15,m=16,_=7,k=256,$=16,S=17,E=18,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],B=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(b+2));l(Q);var C=new Array(2*h);l(C);var L=new Array(512);l(L);var d=new Array(256);l(d);var P=new Array(p);l(P);var G,j,te,O=new Array(h);function J(x,z,K,W,A){this.static_tree=x,this.extra_bits=z,this.extra_base=K,this.elems=W,this.max_length=A,this.has_stree=x&&x.length}function D(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function T(x){return x<256?L[x]:L[256+(x>>>7)]}function X(x,z){x.pending_buf[x.pending++]=255&z,x.pending_buf[x.pending++]=z>>>8&255}function Y(x,z,K){x.bi_valid>m-K?(x.bi_buf|=z<<x.bi_valid&65535,X(x,x.bi_buf),x.bi_buf=z>>m-x.bi_valid,x.bi_valid+=K-m):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=K)}function Z(x,z,K){Y(x,K[2*z],K[2*z+1])}function ae(x,z){for(var K=0;K|=1&x,x>>>=1,K<<=1,0<--z;);return K>>>1}function oe(x,z,K){var W,A,V=new Array(y+1),ee=0;for(W=1;W<=y;W++)V[W]=ee=ee+K[W-1]<<1;for(A=0;A<=z;A++){var q=x[2*A+1];q!==0&&(x[2*A]=ae(V[q]++,q))}}function ne(x){var z;for(z=0;z<b;z++)x.dyn_ltree[2*z]=0;for(z=0;z<h;z++)x.dyn_dtree[2*z]=0;for(z=0;z<v;z++)x.bl_tree[2*z]=0;x.dyn_ltree[2*k]=1,x.opt_len=x.static_len=0,x.last_lit=x.matches=0}function se(x){8<x.bi_valid?X(x,x.bi_buf):0<x.bi_valid&&(x.pending_buf[x.pending++]=x.bi_buf),x.bi_buf=0,x.bi_valid=0}function ue(x,z,K,W){var A=2*z,V=2*K;return x[A]<x[V]||x[A]===x[V]&&W[z]<=W[K]}function ce(x,z,K){for(var W=x.heap[K],A=K<<1;A<=x.heap_len&&(A<x.heap_len&&ue(z,x.heap[A+1],x.heap[A],x.depth)&&A++,!ue(z,W,x.heap[A],x.depth));)x.heap[K]=x.heap[A],K=A,A<<=1;x.heap[K]=W}function me(x,z,K){var W,A,V,ee,q=0;if(x.last_lit!==0)for(;W=x.pending_buf[x.d_buf+2*q]<<8|x.pending_buf[x.d_buf+2*q+1],A=x.pending_buf[x.l_buf+q],q++,W===0?Z(x,A,z):(Z(x,(V=d[A])+g+1,z),(ee=R[V])!==0&&Y(x,A-=P[V],ee),Z(x,V=T(--W),K),(ee=B[V])!==0&&Y(x,W-=O[V],ee)),q<x.last_lit;);Z(x,k,z)}function pe(x,z){var K,W,A,V=z.dyn_tree,ee=z.stat_desc.static_tree,q=z.stat_desc.has_stree,ie=z.stat_desc.elems,de=-1;for(x.heap_len=0,x.heap_max=u,K=0;K<ie;K++)V[2*K]!==0?(x.heap[++x.heap_len]=de=K,x.depth[K]=0):V[2*K+1]=0;for(;x.heap_len<2;)V[2*(A=x.heap[++x.heap_len]=de<2?++de:0)]=1,x.depth[A]=0,x.opt_len--,q&&(x.static_len-=ee[2*A+1]);for(z.max_code=de,K=x.heap_len>>1;1<=K;K--)ce(x,V,K);for(A=ie;K=x.heap[1],x.heap[1]=x.heap[x.heap_len--],ce(x,V,1),W=x.heap[1],x.heap[--x.heap_max]=K,x.heap[--x.heap_max]=W,V[2*A]=V[2*K]+V[2*W],x.depth[A]=(x.depth[K]>=x.depth[W]?x.depth[K]:x.depth[W])+1,V[2*K+1]=V[2*W+1]=A,x.heap[1]=A++,ce(x,V,1),2<=x.heap_len;);x.heap[--x.heap_max]=x.heap[1],(function(le,ye){var Ae,we,Oe,fe,je,Ye,_e=ye.dyn_tree,ut=ye.max_code,Lr=ye.stat_desc.static_tree,Br=ye.stat_desc.has_stree,jr=ye.stat_desc.extra_bits,ht=ye.stat_desc.extra_base,Ne=ye.stat_desc.max_length,Me=0;for(fe=0;fe<=y;fe++)le.bl_count[fe]=0;for(_e[2*le.heap[le.heap_max]+1]=0,Ae=le.heap_max+1;Ae<u;Ae++)Ne<(fe=_e[2*_e[2*(we=le.heap[Ae])+1]+1]+1)&&(fe=Ne,Me++),_e[2*we+1]=fe,ut<we||(le.bl_count[fe]++,je=0,ht<=we&&(je=jr[we-ht]),Ye=_e[2*we],le.opt_len+=Ye*(fe+je),Br&&(le.static_len+=Ye*(Lr[2*we+1]+je)));if(Me!==0){do{for(fe=Ne-1;le.bl_count[fe]===0;)fe--;le.bl_count[fe]--,le.bl_count[fe+1]+=2,le.bl_count[Ne]--,Me-=2}while(0<Me);for(fe=Ne;fe!==0;fe--)for(we=le.bl_count[fe];we!==0;)ut<(Oe=le.heap[--Ae])||(_e[2*Oe+1]!==fe&&(le.opt_len+=(fe-_e[2*Oe+1])*_e[2*Oe],_e[2*Oe+1]=fe),we--)}})(x,z),oe(V,de,x.bl_count)}function o(x,z,K){var W,A,V=-1,ee=z[1],q=0,ie=7,de=4;for(ee===0&&(ie=138,de=3),z[2*(K+1)+1]=65535,W=0;W<=K;W++)A=ee,ee=z[2*(W+1)+1],++q<ie&&A===ee||(q<de?x.bl_tree[2*A]+=q:A!==0?(A!==V&&x.bl_tree[2*A]++,x.bl_tree[2*$]++):q<=10?x.bl_tree[2*S]++:x.bl_tree[2*E]++,V=A,de=(q=0)===ee?(ie=138,3):A===ee?(ie=6,3):(ie=7,4))}function F(x,z,K){var W,A,V=-1,ee=z[1],q=0,ie=7,de=4;for(ee===0&&(ie=138,de=3),W=0;W<=K;W++)if(A=ee,ee=z[2*(W+1)+1],!(++q<ie&&A===ee)){if(q<de)for(;Z(x,A,x.bl_tree),--q!=0;);else A!==0?(A!==V&&(Z(x,A,x.bl_tree),q--),Z(x,$,x.bl_tree),Y(x,q-3,2)):q<=10?(Z(x,S,x.bl_tree),Y(x,q-3,3)):(Z(x,E,x.bl_tree),Y(x,q-11,7));V=A,de=(q=0)===ee?(ie=138,3):A===ee?(ie=6,3):(ie=7,4)}}l(O);var N=!1;function w(x,z,K,W){Y(x,(c<<1)+(W?1:0),3),(function(A,V,ee,q){se(A),X(A,ee),X(A,~ee),r.arraySet(A.pending_buf,A.window,V,ee,A.pending),A.pending+=ee})(x,z,K)}a._tr_init=function(x){N||((function(){var z,K,W,A,V,ee=new Array(y+1);for(A=W=0;A<p-1;A++)for(P[A]=W,z=0;z<1<<R[A];z++)d[W++]=A;for(d[W-1]=A,A=V=0;A<16;A++)for(O[A]=V,z=0;z<1<<B[A];z++)L[V++]=A;for(V>>=7;A<h;A++)for(O[A]=V<<7,z=0;z<1<<B[A]-7;z++)L[256+V++]=A;for(K=0;K<=y;K++)ee[K]=0;for(z=0;z<=143;)Q[2*z+1]=8,z++,ee[8]++;for(;z<=255;)Q[2*z+1]=9,z++,ee[9]++;for(;z<=279;)Q[2*z+1]=7,z++,ee[7]++;for(;z<=287;)Q[2*z+1]=8,z++,ee[8]++;for(oe(Q,b+1,ee),z=0;z<h;z++)C[2*z+1]=5,C[2*z]=ae(z,5);G=new J(Q,R,g+1,b,y),j=new J(C,B,0,h,y),te=new J(new Array(0),I,0,v,_)})(),N=!0),x.l_desc=new D(x.dyn_ltree,G),x.d_desc=new D(x.dyn_dtree,j),x.bl_desc=new D(x.bl_tree,te),x.bi_buf=0,x.bi_valid=0,ne(x)},a._tr_stored_block=w,a._tr_flush_block=function(x,z,K,W){var A,V,ee=0;0<x.level?(x.strm.data_type===2&&(x.strm.data_type=(function(q){var ie,de=4093624447;for(ie=0;ie<=31;ie++,de>>>=1)if(1&de&&q.dyn_ltree[2*ie]!==0)return s;if(q.dyn_ltree[18]!==0||q.dyn_ltree[20]!==0||q.dyn_ltree[26]!==0)return n;for(ie=32;ie<g;ie++)if(q.dyn_ltree[2*ie]!==0)return n;return s})(x)),pe(x,x.l_desc),pe(x,x.d_desc),ee=(function(q){var ie;for(o(q,q.dyn_ltree,q.l_desc.max_code),o(q,q.dyn_dtree,q.d_desc.max_code),pe(q,q.bl_desc),ie=v-1;3<=ie&&q.bl_tree[2*M[ie]+1]===0;ie--);return q.opt_len+=3*(ie+1)+5+5+4,ie})(x),A=x.opt_len+3+7>>>3,(V=x.static_len+3+7>>>3)<=A&&(A=V)):A=V=K+5,K+4<=A&&z!==-1?w(x,z,K,W):x.strategy===4||V===A?(Y(x,2+(W?1:0),3),me(x,Q,C)):(Y(x,4+(W?1:0),3),(function(q,ie,de,le){var ye;for(Y(q,ie-257,5),Y(q,de-1,5),Y(q,le-4,4),ye=0;ye<le;ye++)Y(q,q.bl_tree[2*M[ye]+1],3);F(q,q.dyn_ltree,ie-1),F(q,q.dyn_dtree,de-1)})(x,x.l_desc.max_code+1,x.d_desc.max_code+1,ee+1),me(x,x.dyn_ltree,x.dyn_dtree)),ne(x),W&&se(x)},a._tr_tally=function(x,z,K){return x.pending_buf[x.d_buf+2*x.last_lit]=z>>>8&255,x.pending_buf[x.d_buf+2*x.last_lit+1]=255&z,x.pending_buf[x.l_buf+x.last_lit]=255&K,x.last_lit++,z===0?x.dyn_ltree[2*K]++:(x.matches++,z--,x.dyn_ltree[2*(d[K]+g+1)]++,x.dyn_dtree[2*T(z)]++),x.last_lit===x.lit_bufsize-1},a._tr_align=function(x){Y(x,2,3),Z(x,k,Q),(function(z){z.bi_valid===16?(X(z,z.bi_buf),z.bi_buf=0,z.bi_valid=0):8<=z.bi_valid&&(z.pending_buf[z.pending++]=255&z.bi_buf,z.bi_buf>>=8,z.bi_valid-=8)})(x)}},{"../utils/common":41}],53:[function(e,i,a){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,i,a){(function(r){(function(s,n){if(!s.setImmediate){var l,c,p,g,b=1,h={},v=!1,u=s.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(s);y=y&&y.setTimeout?y:s,l={}.toString.call(s.process)==="[object process]"?function($){process.nextTick(function(){_($)})}:(function(){if(s.postMessage&&!s.importScripts){var $=!0,S=s.onmessage;return s.onmessage=function(){$=!1},s.postMessage("","*"),s.onmessage=S,$}})()?(g="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function($){s.postMessage(g+$,"*")}):s.MessageChannel?((p=new MessageChannel).port1.onmessage=function($){_($.data)},function($){p.port2.postMessage($)}):u&&"onreadystatechange"in u.createElement("script")?(c=u.documentElement,function($){var S=u.createElement("script");S.onreadystatechange=function(){_($),S.onreadystatechange=null,c.removeChild(S),S=null},c.appendChild(S)}):function($){setTimeout(_,0,$)},y.setImmediate=function($){typeof $!="function"&&($=new Function(""+$));for(var S=new Array(arguments.length-1),E=0;E<S.length;E++)S[E]=arguments[E+1];var R={callback:$,args:S};return h[b]=R,l(b),b++},y.clearImmediate=m}function m($){delete h[$]}function _($){if(v)setTimeout(_,0,$);else{var S=h[$];if(S){v=!0;try{(function(E){var R=E.callback,B=E.args;switch(B.length){case 0:R();break;case 1:R(B[0]);break;case 2:R(B[0],B[1]);break;case 3:R(B[0],B[1],B[2]);break;default:R.apply(n,B)}})(S)}finally{m($),v=!1}}}}
12function k($){$.source===s&&typeof $.data=="string"&&$.data.indexOf(g)===0&&_(+$.data.slice(g.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Qe)),Qe.exports}var sa=aa();const oa=Fr(sa),Rt="currentcolor",la="currentStrokeWidth",da={multipass:!0,plugins:[{name:"inlineStyles",params:{onlyMatchedOnce:!1}},{name:"convertStyleToAttrs"},{name:"preset-default",params:{overrides:{convertColors:{currentColor:!0}}}},{name:"removeDimensions"},{name:"removeAttrs",params:{attrs:["class"]}}]};function ca(f){let t=f;const e=/(fill|stroke)="(?!none)[^"]+"/i.test(t);return(t.includes('fill="')||t.includes('stroke="'))&&(t=t.replace(/(fill|stroke)="([^"]+)"/g,(i,a,r)=>r==="none"?i:`${a}="${Rt}"`)),e||(t=t.replace(/<(path|circle|rect|line|polygon|polyline) /g,i=>`<${i.slice(1)} fill="${Rt}" `)),t=t.replace(/stroke-width="([^"]+)"/g,(i,a)=>a==="0"?i:`stroke-width="${la}"`),t}function Ar(f){try{const{data:t}=Kr(f,da);return ca(t)}catch(t){return console.error("SVGO optimization failed:",t),f}}function Or(f){return f.split("/").some(t=>t.startsWith("."))}function ua(f){const t=f.split("/");return t.length===1?t[0]||"":t.slice(0,-1).join("/")}function ha(f){const t=f.split("/");return t[t.length-1]||""}async function fa(f){const t=Array.from(f),e=[],i=[];for(const a of t)try{if(a.name.endsWith(".zip")){const r=await pa(a);e.push(...r)}else if(a.name.endsWith(".svg")){const r=await ma(a);r&&e.push(r)}}catch(r){i.push(`Failed to process ${a.name}: ${r}`)}if(i.length>0)throw new Error(i.join("; "));return e}async function pa(f){const t=[],i=await new oa().loadAsync(f),a=Object.values(i.files).filter(r=>!r.dir&&r.name.endsWith(".svg")&&!Or(r.name));for(const r of a)try{const s=await r.async("text");s.length>2e4&&console.warn(`${r.name} is large (${s.length/1e3} KB)`);const n=r.name.replace(".svg","");t.push({path:ua(n),name:ha(n),content:s,optimizedContent:Ar(s)})}catch(s){console.error(`Failed to parse ${r.name}:`,s)}return t}async function ma(f){if(f.webkitRelativePath&&Or(f.webkitRelativePath))return console.info(`Skipped hidden file: ${f.webkitRelativePath}`),null;const t=await f.text(),e=f.name.replace(".svg","");let i="";if(f.webkitRelativePath&&f.webkitRelativePath!==f.name){const r=f.webkitRelativePath.replace(".svg","").split("/");r.length>1&&(i=r.slice(0,-1).join("/"))}return{name:e,content:t,optimizedContent:Ar(t),path:i}}function ga(f){if(f.length===0)return f;let t=[...f];const e=f.map(r=>r.path).filter(Boolean);if(e.length===0)return t;let i=e.map(r=>r.split("/").filter(Boolean)),a=!0;for(;a&&i.length>0&&i[0]&&i[0].length>0;){const r=i[0][0];r&&i.every(s=>s.length>0&&s[0]===r)?(t=t.map(s=>{if(!s.path)return s;const n=s.path.split("/").filter(Boolean);return n.length>0&&n[0]===r?{...s,path:n.slice(1).join("/")}:s}),i=i.map(s=>s.slice(1))):a=!1}return t}function va(f){const t=[],e=new Map,i=new Map;return f.forEach(r=>{const s=r.path;let n=i.get(s);n||(n=[],i.set(s,n)),n.push(r)}),Array.from(i.keys()).sort().forEach(r=>{const s=r.split("/").filter(Boolean);let n=t,l="";s.forEach(p=>{l=l?`${l}/${p}`:p;let g=e.get(l);if(!g){const b=f.filter(h=>h.path.startsWith(l)).length;g={name:p,id:l,iconsCount:b,childItems:[]},e.set(l,g),n.push(g)}n=g.childItems});const c=i.get(r)||[];if(r==="")c.forEach(p=>{const g={name:p.name,id:p.name,iconsCount:1,childItems:[],icon:p,isIcon:!0};t.push(g)});else{const p=e.get(r);p&&c.forEach(g=>{const b={name:g.name,id:`${r}/${g.name}`,iconsCount:1,childItems:[],icon:g,isIcon:!0};p.childItems.push(b)})}}),t.sort((r,s)=>!r.isIcon&&s.isIcon?-1:r.isIcon&&!s.isIcon?1:r.name.localeCompare(s.name)),t}function ya(f,t){const e=[],i=a=>{a.forEach(r=>{if(f.has(r.id)){if(r.isIcon&&r.icon)e.push(r.icon);else if(!r.isIcon){const s=n=>{n.forEach(l=>{l.isIcon&&l.icon?e.push(l.icon):s(l.childItems)})};s(r.childItems)}}else i(r.childItems)})};return i(t),e}function ba(f,t){let e=0;const i=a=>{a.forEach(r=>{if(f.has(r.id)){if(r.isIcon&&r.icon)e++;else if(!r.isIcon){const s=n=>{n.forEach(l=>{l.isIcon&&l.icon?e++:s(l.childItems)})};s(r.childItems)}}else i(r.childItems)})};return i(t),e}function rt(f){return f>=1e3?`${(f/1e3).toFixed(1)}k`:f.toString()}function Nr(f){return f.reduce((t,e)=>(!e.isIcon&&e.childItems.length>0&&(t.push(e.id),t.push(...Nr(e.childItems))),t),[])}const xa=U.memo(function({tree:t,selectionState:e,onSelectionChange:i,isProcessing:a,isSaving:r}){const[s,n]=U.useState(()=>new Set(Nr(t))),l=U.useCallback(c=>{if(a||r)return;const p=new Set;for(const g of c)p.add(String(g));n(p)},[a,r]);return H.jsx(Mn,{layout:wn,layoutOptions:{rowHeight:36,estimatedRowHeight:36},children:H.jsx(Sn,{className:ve("max-h-64 min-h-0 overflow-y-auto transition-opacity duration-200",(a||r)&&"opacity-50"),"aria-label":"Icon set icons",selectionMode:e.isSelectionMode?"multiple":"none",selectedKeys:e.selectedKeys,onSelectionChange:i,expandedKeys:s,onExpandedChange:l,items:t,dependencies:[e.isSelectionMode],children:c=>H.jsx(_a,{node:c,isSelectionMode:e.isSelectionMode})})})});function wa({mode:f,uploadedId:t,initialName:e="",onClose:i,onSuccess:a,onDelete:r}){const s=Rr(),{data:n,isLoading:l}=Pt({...be.uploaded.getById.queryOptions({id:t,workspaceId:s}),enabled:f==="edit"&&!!t}),c=U.useMemo(()=>n?n.icons.map(O=>({name:O.name,path:O.path,content:O.svg,optimizedContent:O.svg})):[],[n]),p=ra({onSuccess:O=>{i(),a?.({name:O.name,id:O.id})}}),g=ia({onSuccess:O=>{i(),a?.({name:O.name,id:O.id})}}),b=na({onSuccess:()=>{i(),r?.()}}),[h,v]=U.useState(null),[u,y]=U.useState(null),[m,_]=U.useState(!1),[k,$]=U.useState({localIcons:null,isProcessing:!1,error:null}),S=k.localIcons??c,E=u??n?.name??e,R=f==="create"?p.isPending:g.isPending||b.isPending,B=R||f==="edit"&&l,I=U.useMemo(()=>va(S),[S]),[M,Q]=U.useState({isSelectionMode:!1,selectedKeys:new Set}),C=U.useCallback(()=>{k.isProcessing||R||Q(O=>O.isSelectionMode?{isSelectionMode:!1,selectedKeys:new Set}:{...O,isSelectionMode:!0})},[k.isProcessing,R]),L=U.useCallback(O=>{if(!(k.isProcessing||R))if(O==="all")Q(J=>({...J,selectedKeys:new Set}));else{const J=new Set;for(const D of O)J.add(String(D));Q(D=>({...D,selectedKeys:J}))}},[k.isProcessing,R]),d=U.useMemo(()=>ba(M.selectedKeys,I),[M.selectedKeys,I]),P=U.useCallback(()=>
12{if(M.selectedKeys.size===0)return;const O=ya(M.selectedKeys,I),J=S.filter(D=>!O.some(T=>T.name===D.name&&T.path===D.path));$(D=>({...D,localIcons:J})),Q({isSelectionMode:!1,selectedKeys:new Set})},[M.selectedKeys,I,S]),G=async O=>{if(O.length!==0){$(J=>({...J,isProcessing:!0,error:null}));try{const J=await fa(O),D=ga(J);if(!E&&f==="create"){let X="";const Y=O.find(Z=>Z.name.endsWith(".zip"));if(Y)X=Y.name.replace(".zip","");else{const Z=O.find(ae=>ae.webkitRelativePath&&ae.webkitRelativePath.includes("/"));if(Z){const ae=Z.webkitRelativePath.split("/")[0];ae&&(X=ae)}else{const ae=O.find(oe=>oe.name.endsWith(".svg"));ae&&O.length===1&&(X=ae.name.replace(".svg",""))}}X&&y(X)}const T=[...S,...D];$(X=>({...X,localIcons:T,isProcessing:!1}))}catch(J){$(D=>({...D,error:`Failed to process files: ${J}`,isProcessing:!1}))}}},j=async O=>{if(O.preventDefault(),v(null),!E.trim()){v("Icon set name is required");return}if(S.length===0){v("Please upload at least one icon");return}try{f==="create"?await p.mutateAsync({name:E.trim(),icons:zt(S)}):t&&await g.mutateAsync({id:t,name:E.trim(),icons:zt(S)})}catch(J){v(Et(J))}},te=async()=>{if(t)try{await b.mutateAsync({id:t})}catch(O){v(Et(O))}};return H.jsxs("form",{className:"bg-primary flex max-h-[80vh] w-full flex-col overflow-hidden rounded-xl",onSubmit:j,children:[H.jsxs("div",{className:"border-secondary flex items-center justify-between border-b px-6 py-4",children:[H.jsx("h2",{className:"text-primary text-lg font-semibold",children:f==="create"?"New Icon Set":"Edit Icon Set"}),H.jsx("div",{className:"flex items-center gap-2",children:f==="edit"&&!m?H.jsxs(H.Fragment,{children:[H.jsx(xe,{color:"secondary-destructive",size:"sm",onClick:()=>_(!0),type:"button",isDisabled:R,iconLeading:ri,children:"Delete"}),H.jsx(xe,{color:"secondary",size:"sm",onClick:i,type:"button",children:"Cancel"}),H.jsx(xe,{type:"submit",size:"sm",isLoading:g.isPending,isDisabled:B||k.isProcessing||S.length===0,children:"Save"})]}):f==="edit"&&m?H.jsxs(H.Fragment,{children:[H.jsx(Ke,{className:"text-secondary text-sm",children:"Delete icon set?"}),H.jsx(xe,{color:"secondary",size:"sm",onClick:()=>_(!1),type:"button",children:"Cancel"}),H.jsx(xe,{color:"primary-destructive",size:"sm",onClick:te,type:"button",isLoading:b.isPending,children:"Confirm Delete"})]}):H.jsxs(H.Fragment,{children:[H.jsx(xe,{color:"secondary",size:"sm",onClick:i,type:"button",children:"Cancel"}),H.jsx(xe,{type:"submit",size:"sm",isLoading:p.isPending,isDisabled:R||k.isProcessing||S.length===0,children:"Save"})]})})]}),H.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-hidden p-6",children:[H.jsx(Zr,{label:"Name",isRequired:!0,value:E,onChange:y,placeholder:"Icon set name","aria-label":"Icon set name",isDisabled:R||k.isProcessing}),h&&H.jsx(Ke,{className:"text-xs text-red-500",children:h}),H.jsx("div",{className:ve("flex flex-col",S.length>0?"":"flex-1"),children:H.jsx(ta.DropZone,{className:ve("flex-1 justify-center"),accept:"image/svg+xml,.svg,application/zip,application/x-zip-compressed",allowsMultiple:!0,hint:k.isProcessing?"Processing files...":R?"Saving...":"Drop .svg files, directories, or .zip archives here",isDisabled:k.isProcessing||R,onDropFiles:async O=>{await G(Array.from(O))},onDropUnacceptedFiles:()=>{$(O=>({...O,error:"Unsupported file type. Only SVG files, directories with SVG files, and ZIP archives are allowed."}))},onSizeLimitExceed:()=>{$(O=>({...O,error:"File size too large. Please select smaller files."}))}})}),k.error&&H.jsx(Ke,{className:"text-xs text-red-500",children:k.error}),S.length>0&&H.jsxs("div",{className:"flex items-center justify-between",children:[H.jsx("div",{className:"flex items-center gap-2",children:M.isSelectionMode?H.jsx(xe,{color:"link-color",size:"sm",onClick:C,isDisabled:k.isProcessing||R,children:"Cancel"}):H.jsx(xe,{color:"link-color",size:"sm",onClick:C,isDisabled:k.isProcessing||R,children:"Select"})}),H.jsx("div",{className:"flex items-center gap-2",children:M.isSelectionMode&&M.selectedKeys.size>0&&H.jsx(xe,{color:"secondary-destructive",size:"sm",onClick:P,isDisabled:M.selectedKeys.size===0||k.isProcessing||R,children:`Delete ${rt(d)} icon${d===1?"":"s"}`})})]}),f==="edit"&&l?H.jsx("div",{className:"border-secondary flex min-h-0 flex-1 items-center justify-center overflow-hidden rounded-lg border py-10",children:H.jsx(Xi,{type:"line-simple",size:"lg",label:"Loading..."})}):S.length>0?H.jsx("div",{className:"border-secondary min-h-0 flex-1 overflow-hidden rounded-lg border",children:H.jsx(xa,{tree:
12I,selectionState:M,onSelectionChange:L,isProcessing:k.isProcessing,isSaving:R},S.length)}):null,!(f==="edit"&&l)&&S.length>0&&H.jsxs(Ke,{className:"text-tertiary text-xs",children:[rt(S.length)," icon",S.length===1?"":"s"]})]})]})}const _a=U.memo(function f({node:t}){return H.jsxs(Pr,{id:t.id,textValue:t.name,children:[H.jsx(Dr,{className:"[&_[data-slot=icon]]:text-gray-500",children:({hasChildItems:e})=>H.jsxs(H.Fragment,{children:[t.isIcon&&t.icon?H.jsx(ka,{icon:t.icon}):e?H.jsx(ii,{className:"mr-2 size-5"}):H.jsx(Tt,{className:"mr-2 size-5"}),H.jsx("div",{className:"flex-1 truncate",children:t.name}),!t.isIcon&&H.jsx("span",{className:"ml-2 text-xs text-gray-500",children:rt(t.iconsCount)})]})}),t.childItems.map(e=>H.jsx(f,{node:e,isSelectionMode:!1},e.id))]},t.id)}),ka=U.memo(function({icon:t}){try{return H.jsx("div",{className:"text-fg-quaternary mr-2 size-5 flex-shrink-0 *:size-full",dangerouslySetInnerHTML:{__html:t.optimizedContent}})}catch{return H.jsx(Tt,{className:"mr-2 size-5"})}});function es({uploadedId:f,initialName:t,isOpen:e,onOpenChange:i}){const a=Hr(),r=Vr(),s=Rr();return H.jsx(Zn,{isOpen:e,onOpenChange:i,isDismissable:!0,children:H.jsx(Vn,{className:"w-full max-w-3xl",children:H.jsx(qn,{className:"p-0",children:H.jsx(wa,{mode:"edit",uploadedId:f,initialName:t,onClose:()=>i(!1),onDelete:()=>{s&&a(r(`/workspace/${s}/icon-sets`))}})})})})}export{Sn as $,ja as C,Ga as D,Ha as E,Ka as F,Ua as I,Za as L,Zn as M,Va as P,qa as R,Ya as S,Pr as T,Wn as a,Ja as b,Qa as c,es as d,Vn as e,qn as f,Jn as g,Xa as h,Fa as i,Dr as j,Xn as k,Wa as l,Ma as m,En as n,zn as o,wr as p,dn as q,wa as r,Rr as u}; 13//# sourceMappingURL=edit-icon-set-modal-C58YyZkZ.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.