var z2=Object.defineProperty,H2=Object.defineProperties;var W2=Object.getOwnPropertyDescriptors;var vs=Object.getOwnPropertySymbols;var wp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable;var bp=(t,e,n)=>e in t?z2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hi=(t,e)=>{for(var n in e||(e={}))wp.call(e,n)&&bp(t,n,e[n]);if(vs)for(var n of vs(e))Ap.call(e,n)&&bp(t,n,e[n]);return t},Op=(t,e)=>H2(t,W2(e));var Tp=(t,e)=>{var n={};for(var r in t)wp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&vs)for(var r of vs(t))e.indexOf(r)<0&&Ap.call(t,r)&&(n[r]=t[r]);return n};import{N as Me,O as Sl,P as k2,S as oe,i as le,s as fe,e as L,c as D,a as B,d as w,g as R,J as pn,K as gn,L as _n,q as K,o as G,I as vn,C as me,k as Q,m as ee,Q as Xn,R as ke,M,T as xs,n as Dn,p as Fn,z as Ee,U as Jn,V as Y2,W as Rs,X as ha,r as ko,Y as zv,G as pa,Z as tt,_ as V2,b as E,$ as ei,a0 as Sp,l as gt,a1 as Rn,a2 as Ln,f as xn,E as Ie,w as k,x as Z,y as Y,B as V,t as re,h as ie,a3 as Qr,a4 as Yo,a5 as Vo,a6 as ti,j as _t,a7 as Ye,a8 as cn,a9 as Wt,aa as ta,ab as tr,ac as jn,ad as Xe,A as Re,ae as Ls,F as Z2,af as na,ag as X2}from"../chunks/index-68fa7044.js";import{r as J2,d as Q2,w as eO,b as dn}from"../chunks/paths-5d155410.js";function tO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ep(t){for(var e=1;e1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof e.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||n,this.shouldUpdateOnAdd=typeof e.onCacheAdd=="function",this.shouldUpdateOnChange=typeof e.onCacheChange=="function",this.shouldUpdateOnHit=typeof e.onCacheHit=="function"}return Object.defineProperty(t.prototype,"size",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return{keys:Os(this.keys),size:this.size,values:Os(this.values)}},enumerable:!0,configurable:!0}),t.prototype._getKeyIndexFromMatchingKey=function(e){var n=this.options,r=n.isMatchingKey,a=n.maxSize,s=this.keys,o=s.length;if(!o)return-1;if(r(s[0],e))return 0;if(a>1){for(var l=1;l1){for(var c=0;c1){for(var o=0;o=c&&(a.length=s.length=c)},t.prototype.updateAsyncCache=function(e){var n=this,r=this.options,a=r.onCacheChange,s=r.onCacheHit,o=this.keys[0],l=this.values[0];this.values[0]=l.then(function(c){return n.shouldUpdateOnHit&&s(n,n.options,e),n.shouldUpdateOnChange&&a(n,n.options,e),c},function(c){var h=n.getKeyIndex(o);throw h!==-1&&(n.keys.splice(h,1),n.values.splice(h,1)),c})},t}();function Wv(t,e){if(e===void 0&&(e={}),uO(t))return Wv(t.fn,Ip(t.options,e));if(typeof t!="function")throw new TypeError("You must pass a function to `memoize`.");var n=e.isEqual,r=n===void 0?oO:n,a=e.isMatchingKey,s=e.isPromise,o=s===void 0?!1:s,l=e.maxSize,c=l===void 0?1:l,h=e.onCacheAdd,g=e.onCacheChange,_=e.onCacheHit,v=e.transformKey,$=Ip({isEqual:r,isMatchingKey:a,isPromise:o,maxSize:c,onCacheAdd:h,onCacheChange:g,onCacheHit:_,transformKey:v},sO(e)),b=new lO($),O=b.keys,C=b.values,S=b.canTransformKey,F=b.shouldCloneArguments,H=b.shouldUpdateOnAdd,te=b.shouldUpdateOnChange,j=b.shouldUpdateOnHit,ue=function W(){var se=F?Os(arguments):arguments;S&&(se=v(se));var X=O.length?b.getKeyIndex(se):-1;if(X!==-1)j&&_(b,$,W),X&&(b.orderByLru(O[X],C[X],X),te&&g(b,$,W));else{var $e=t.apply(this,arguments),ce=F?se:Os(arguments);b.orderByLru(ce,$e,O.length),o&&b.updateAsyncCache(W),H&&h(b,$,W),te&&g(b,$,W)}return C[0]};return ue.cache=b,ue.fn=t,ue.isMemoized=!0,ue.options=$,ue}var fO=typeof WeakSet=="function",Pp=Object.keys;function Ds(t,e){return t===e||t!==t&&e!==e}function Mp(t){return t.constructor===Object||t.constructor==null}function xp(t){return!!t&&typeof t.then=="function"}function Rp(t){return!!(t&&t.$$typeof)}function cO(){var t=[];return{add:function(e){t.push(e)},has:function(e){return t.indexOf(e)!==-1}}}var hO=function(t){return t?function(){return new WeakSet}:cO}(fO);function kv(t){return function(n){var r=t||n;return function(s,o,l){l===void 0&&(l=hO());var c=!!s&&typeof s=="object",h=!!o&&typeof o=="object";if(c||h){var g=c&&l.has(s),_=h&&l.has(o);if(g||_)return g&&_;c&&l.add(s),h&&l.add(o)}return r(s,o,l)}}}function pO(t,e,n,r){var a=t.length;if(e.length!==a)return!1;for(;a-- >0;)if(!n(t[a],e[a],r))return!1;return!0}function gO(t,e,n,r){var a=t.size===e.size;return a&&t.size&&t.forEach(function(s,o){a&&(a=!1,e.forEach(function(l,c){!a&&n(o,c,r)&&(a=n(s,l,r))}))}),a}var _O="_owner",vO=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function Lp(t,e,n,r){var a=Pp(t),s=a.length;if(Pp(e).length!==s)return!1;if(s)for(var o=void 0;s-- >0;){if(o=a[s],o===_O){var l=Rp(t),c=Rp(e);if((l||c)&&l!==c)return!1}if(!vO(e,o)||!n(t[o],e[o],r))return!1}return!0}function dO(t,e){return t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.unicode===e.unicode&&t.sticky===e.sticky&&t.lastIndex===e.lastIndex}function $O(t,e,n,r){var a=t.size===e.size;return a&&t.size&&t.forEach(function(s){a&&(a=!1,e.forEach(function(o){a||(a=n(s,o,r))}))}),a}var mO=typeof Map=="function",yO=typeof Set=="function";function Fs(t){var e=typeof t=="function"?t(n):n;function n(r,a,s){if(r===a)return!0;if(r&&a&&typeof r=="object"&&typeof a=="object"){if(Mp(r)&&Mp(a))return Lp(r,a,e,s);var o=Array.isArray(r),l=Array.isArray(a);return o||l?o===l&&pO(r,a,e,s):(o=r instanceof Date,l=a instanceof Date,o||l?o===l&&Ds(r.getTime(),a.getTime()):(o=r instanceof RegExp,l=a instanceof RegExp,o||l?o===l&&dO(r,a):xp(r)||xp(a)?r===a:mO&&(o=r instanceof Map,l=a instanceof Map,o||l)?o===l&&gO(r,a,e,s):yO&&(o=r instanceof Set,l=a instanceof Set,o||l)?o===l&&$O(r,a,e,s):Lp(r,a,e,s)))}return r!==r&&a!==a}return n}var bO=Fs(),wO=Fs(function(){return Ds});Fs(kv());Fs(kv(Ds));function Qn(){return Qn=Object.assign||function(t){for(var e=1;e=0)&&(n[a]=t[a]);return n}var Yr={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void 0,matchesKey:void 0,maxAge:void 0,maxArgs:void 0,maxSize:1,onExpire:void 0,profileName:void 0,serializer:void 0,updateCacheForKey:void 0,transformArgs:void 0,updateExpire:!1};function Qi(){for(var t=arguments.length,e=new Array(t),n=0;nC&&(h.keys.length=C,h.values.length=C),h.keys.unshift(b),h.values.unshift(l),g.isPromise&&h.updateAsyncCache(s),_&&_(h,g,s),v&&v(h,g,s)}else{var S=h.keys[O];h.values[O]=l,O>0&&h.orderByLru(S,l,O),g.isPromise&&h.updateAsyncCache(s),typeof v=="function"&&v(h,g,s)}},s.values=function(){return s.cacheSnapshot.values}}function DO(t,e){var n=e.expirations,r=e.options,a=e.originalFunction,s=t.options;Object.defineProperties(t,{_microMemoizeOptions:{configurable:!0,get:function(){return s}},cacheSnapshot:{configurable:!0,get:function(){var c=t.cache;return{keys:c.keys.slice(0),size:c.size,values:c.values.slice(0)}}},expirations:{configurable:!0,get:function(){return n}},expirationsSnapshot:{configurable:!0,get:function(){return n.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return r}},originalFunction:{configurable:!0,get:function(){return a}}});var o=t;Ml(a,o)}function FO(t,e){return LO(t,e),DO(t,e),t}var NO=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function jO(t,e,n){var r=t(Qn({maxArgs:2,isShallowEqual:!0},n,{isReact:!1}));e.displayName||(e.displayName=e.name||"Component");function a(s,o,l){this.props=s,this.context=o,this.updater=l,this.MoizedComponent=r(e)}return a.prototype.isReactComponent={},a.prototype.render=function(){return{$$typeof:NO,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},Ml(e,a,["contextType","contextTypes"]),a.displayName="Moized("+(e.displayName||e.name||"Component")+")",Vv(a,e.name,n.profileName),a}function BO(t){return function(e){if(t>=e.length)return e;if(t===0)return[];if(t===1)return[e[0]];if(t===2)return[e[0],e[1]];if(t===3)return[e[0],e[1],e[2]];for(var n=[],r=0;r=0?r.maxAge:Yr.maxAge,maxArgs:typeof r.maxArgs=="number"&&r.maxArgs>=0?r.maxArgs:Yr.maxArgs,maxSize:typeof r.maxSize=="number"&&r.maxSize>=0?r.maxSize:Yr.maxSize,profileName:r.profileName||MO(e)}),l=[];o.matchesArg,o.isDeepEqual;var c=o.isPromise;o.isReact,o.isSerialized,o.isShallowEqual,o.matchesKey,o.maxAge,o.maxArgs;var h=o.maxSize,g=o.onCacheAdd,_=o.onCacheChange,v=o.onCacheHit;o.onExpire,o.profileName,o.serializer;var $=o.updateCacheForKey;o.transformArgs,o.updateExpire;var b=AO(o,VO),O=HO(o),C=WO(o),S=CO(l,o,O,C),F=xO(o),H=kO(o),te=Qn({},b,{isEqual:O,isMatchingKey:C,isPromise:c,maxSize:h,onCacheAdd:Do(Qi(g,S.onCacheAdd,F.onCacheAdd)),onCacheChange:Do(_),onCacheHit:Do(Qi(v,S.onCacheHit,F.onCacheHit)),transformKey:H}),j=Wv(e,te),ue=FO(j,{expirations:l,options:o,originalFunction:e});return $&&(ue=YO(ue)),Vv(ue,e.name,r.profileName),ue};_e.clearStats=Xv;_e.collectStats=EO;_e.compose=function(){return Cl.apply(void 0,arguments)||_e};_e.deep=_e({isDeepEqual:!0});_e.getStats=Pl;_e.infinite=_e({maxSize:1/0});_e.isCollectingStats=function(){return Rt.isCollectingStats};_e.isMoized=function(e){return typeof e=="function"&&!!e.isMoized};_e.matchesArg=function(t){return _e({matchesArg:t})};_e.matchesKey=function(t){return _e({matchesKey:t})};function ZO(t,e){if(e===!0)return _e({maxAge:t,updateExpire:e});if(typeof e=="object"){var n=e.onExpire,r=e.updateExpire;return _e({maxAge:t,onExpire:n,updateExpire:r})}return _e(typeof e=="function"?{maxAge:t,onExpire:e,updateExpire:!0}:{maxAge:t})}_e.maxAge=ZO;_e.maxArgs=function(t){return _e({maxArgs:t})};_e.maxSize=function(t){return _e({maxSize:t})};_e.profile=function(t){return _e({profileName:t})};_e.promise=_e({isPromise:!0,updateExpire:!0});_e.react=_e({isReact:!0});_e.serialize=_e({isSerialized:!0});_e.serializeWith=function(t){return _e({isSerialized:!0,serializer:t})};_e.shallow=_e({isShallowEqual:!0});_e.transformArgs=function(t){return _e({transformArgs:t})};_e.updateCacheForKey=function(t){return _e({updateCacheForKey:t})};Object.defineProperty(_e,"default",{configurable:!1,enumerable:!1,value:_e,writable:!1});function XO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Bp(t){for(var e=1;e0){if(++e>=jT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function KT(t){return function(){return t}}var GT=function(){try{var t=Or(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ts=GT,zT=Ts?function(t,e){return Ts(t,"toString",{configurable:!0,enumerable:!1,value:KT(e),writable:!0})}:Ll,HT=zT,WT=UT(HT),kT=WT;function YT(t,e,n,r){for(var a=t.length,s=n+(r?1:-1);r?s--:++s-1}var QT=9007199254740991,eS=/^(?:0|[1-9]\d*)$/;function Fl(t,e){var n=typeof t;return e=e==null?QT:e,!!e&&(n=="number"||n!="symbol"&&eS.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=sS}function ni(t){return t!=null&&Nl(t.length)&&!Dl(t)}function uS(t,e,n){if(!nr(n))return!1;var r=typeof e;return(r=="number"?ni(n)&&Fl(e,n.length):r=="string"&&e in n)?ga(n[e],t):!1}function oS(t){return nd(function(e,n){var r=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(a--,s):void 0,o&&uS(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++r-1}function OC(t,e){var n=this.__data__,r=js(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Bn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0&&n(l)?e>1?pd(l,e-1,n,r,a):hd(a,l):r||(a[a.length]=l)}return a}var KC=od(Object.getPrototypeOf,Object),gd=KC,GC="[object Object]",zC=Function.prototype,HC=Object.prototype,_d=zC.toString,WC=HC.hasOwnProperty,kC=_d.call(Object);function YC(t){if(!er(t)||wr(t)!=GC)return!1;var e=gd(t);if(e===null)return!0;var n=WC.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&_d.call(n)==kC}function VC(){this.__data__=new Bn,this.size=0}function ZC(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function XC(t){return this.__data__.get(t)}function JC(t){return this.__data__.has(t)}var QC=200;function eE(t,e){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!aa||r.lengthl))return!1;var h=s.get(t),g=s.get(e);if(h&&g)return h==e&&g==t;var _=-1,v=!0,$=n&EE?new sa:void 0;for(s.set(t,e),s.set(e,t);++_=yI&&(s=dd,o=!1,e=new sa(e));e:for(;++a-1&&t%1==0&&t-1&&t%1==0&&t<=SP}var Vl=CP,EP=ii,IP=Vl,PP=rr,MP="[object Arguments]",xP="[object Array]",RP="[object Boolean]",LP="[object Date]",DP="[object Error]",FP="[object Function]",NP="[object Map]",jP="[object Number]",BP="[object Object]",qP="[object RegExp]",UP="[object Set]",KP="[object String]",GP="[object WeakMap]",zP="[object ArrayBuffer]",HP="[object DataView]",WP="[object Float32Array]",kP="[object Float64Array]",YP="[object Int8Array]",VP="[object Int16Array]",ZP="[object Int32Array]",XP="[object Uint8Array]",JP="[object Uint8ClampedArray]",QP="[object Uint16Array]",e3="[object Uint32Array]",ze={};ze[WP]=ze[kP]=ze[YP]=ze[VP]=ze[ZP]=ze[XP]=ze[JP]=ze[QP]=ze[e3]=!0;ze[MP]=ze[xP]=ze[zP]=ze[RP]=ze[HP]=ze[LP]=ze[DP]=ze[FP]=ze[NP]=ze[jP]=ze[BP]=ze[qP]=ze[UP]=ze[KP]=ze[GP]=!1;function t3(t){return PP(t)&&IP(t.length)&&!!ze[EP(t)]}var n3=t3;function r3(t){return function(e){return t(e)}}var Zl=r3,oa={exports:{}};(function(t,e){var n=Sd,r=e&&!e.nodeType&&e,a=r&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===r,o=s&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=l})(oa,oa.exports);var i3=n3,a3=Zl,yg=oa.exports,bg=yg&&yg.isTypedArray,s3=bg?a3(bg):i3,xd=s3,u3=fP,o3=kl,l3=Dt,f3=ua.exports,c3=Yl,h3=xd,p3=Object.prototype,g3=p3.hasOwnProperty;function _3(t,e){var n=l3(t),r=!n&&o3(t),a=!n&&!r&&f3(t),s=!n&&!r&&!a&&h3(t),o=n||r||a||s,l=o?u3(t.length,String):[],c=l.length;for(var h in t)(e||g3.call(t,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||c3(h,c)))&&l.push(h);return l}var Rd=_3,v3=Object.prototype;function d3(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||v3;return t===n}var Xl=d3,$3=Ed,m3=$3(Object.keys,Object),y3=m3,b3=Xl,w3=y3,A3=Object.prototype,O3=A3.hasOwnProperty;function T3(t){if(!b3(t))return w3(t);var e=[];for(var n in Object(t))O3.call(t,n)&&n!="constructor"&&e.push(n);return e}var S3=T3;function C3(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tr=C3,E3=ii,I3=Tr,P3="[object AsyncFunction]",M3="[object Function]",x3="[object GeneratorFunction]",R3="[object Proxy]";function L3(t){if(!I3(t))return!1;var e=E3(t);return e==M3||e==x3||e==P3||e==R3}var Ld=L3,D3=Ld,F3=Vl;function N3(t){return t!=null&&F3(t.length)&&!D3(t)}var Us=N3,j3=Rd,B3=S3,q3=Us;function U3(t){return q3(t)?j3(t):B3(t)}var _a=U3,K3=oP,G3=_a;function z3(t,e){return t&&K3(t,e,G3)}var Dd=z3,H3=Us;function W3(t,e){return function(n,r){if(n==null)return n;if(!H3(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s-1}var _M=gM,vM=Ks;function dM(t,e){var n=this.__data__,r=vM(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $M=dM,mM=tM,yM=lM,bM=hM,wM=_M,AM=$M;function ai(t){var e=-1,n=t==null?0:t.length;for(this.clear();++el))return!1;var h=s.get(t),g=s.get(e);if(h&&g)return h==e&&g==t;var _=-1,v=!0,$=n&Dx?new Mx:void 0;for(s.set(t,e),s.set(e,t);++_a?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(a);++r0&&n(l)?e>1?i$(l,e-1,n,r,a):EN(a,l):r||(a[a.length]=l)}return a}var PN=i$,MN=PN;function xN(t){var e=t==null?0:t.length;return e?MN(t,1):[]}var RN=xN;function LN(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var DN=LN,FN=DN,i_=Math.max;function NN(t,e,n){return e=i_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=i_(r.length-e,0),o=Array(s);++a0){if(++e>=HN)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var VN=YN,ZN=zN,XN=VN,JN=XN(ZN),QN=JN,ej=RN,tj=jN,nj=QN;function rj(t){return nj(tj(t,void 0,ej),t+"")}var ij=rj,aj=ks,sj=sN,uj=yN,oj=fi,lj=da,fj=AN,cj=ij,hj=pf,pj=1,gj=2,_j=4,vj=cj(function(t,e){var n={};if(t==null)return n;var r=!1;e=aj(e,function(s){return s=oj(s,t),r||(r=s.length>1),s}),lj(t,hj(t),n),r&&(n=sj(n,pj|gj|_j,fj));for(var a=e.length;a--;)uj(n,e[a]);return n}),dj=vj;function $j(t){return t}function a$(t){var e=t;return function(){return e}}function s$(t){return Array.isArray(t)?t:Zd((""+t).split("."),function(e){return!e})}var Ne="@@updeep/placeholder";function Vs(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===Ne;)n-=1;return n}function on(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=Vs(arguments);return o>=1?t(n,a,s):e}}function sn(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=Vs(arguments,2);if(r===Ne||s===Ne||o===Ne)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===Ne?on(function(c,h,g){return t(c,r,h,g)}):t(n,r,s,o):l===1?on(function(c,h,g){return t(n,c,h,g)}):e}}function Vi(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=Vs(arguments,3);if(a===Ne||o===Ne||l===Ne)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===Ne?r===Ne?sn(function(h,g,_,v){return t(h,g,a,_,v)}):on(function(h,g,_){return t(h,r,a,g,_)}):r===Ne?on(function(h,g,_){return t(n,h,a,g,_)}):t(n,r,a,o,l):c===2?n===Ne?sn(function(h,g,_,v){return t(h,r,g,_,v)}):on(function(h,g,_){return t(n,r,h,g,_)}):c===1?sn(function(h,g,_,v){return t(n,h,g,_,v)}):e}}function mj(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=Vs(arguments,4);if(s===Ne||l===Ne||c===Ne)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===Ne?r===Ne?a===Ne?Vi(function(g,_,v,$,b){return t(g,_,v,s,$,b)}):sn(function(g,_,v,$){return t(g,_,a,s,v,$)}):a===Ne?sn(function(g,_,v,$){return t(g,r,_,s,v,$)}):on(function(g,_,v){return t(g,r,a,s,_,v)}):r===Ne?a===Ne?sn(function(g,_,v,$){return t(n,g,_,s,v,$)}):on(function(g,_,v){return t(n,g,a,s,_,v)}):a===Ne?on(function(g,_,v){return t(n,r,g,s,_,v)}):t(n,r,a,s,l,c):h===3?n===Ne?r===Ne?Vi(function(g,_,v,$,b){return t(g,_,a,v,$,b)}):sn(function(g,_,v,$){return t(g,r,a,_,v,$)}):r===Ne?sn(function(g,_,v,$){return t(n,g,a,_,v,$)}):on(function(g,_,v){return t(n,r,a,g,_,v)}):h===2?n===Ne?Vi(function(g,_,v,$,b){return t(g,r,_,v,$,b)}):sn(function(g,_,v,$){return t(n,r,g,_,v,$)}):h===1?Vi(function(g,_,v,$,b){return t(n,g,_,v,$,b)}):e}}function $a(t,e){return e===void 0&&(e=t.length),[t,on,sn,Vi,mj][e](t)}var yj=$a(function(t,e,n){for(var r=s$(t),a=n,s=0;s0)throw new Error("can't have subduxes on a dux which state is not an object");if(Object.keys(e).length===1&&e["*"])return t;const n=Nn(e,({initial:r},a)=>a==="*"?[]:r);return ct(t,n)}function Rj(t={},e={}){const n=Object.assign({},t);return Object.values(e).forEach(({actions:r})=>{!r||Object.entries(r).forEach(([a,s])=>{if(n[a]){if(n[a]===s)return;throw new Error(`trying to merge two different actions ${a}`)}n[a]=s})}),n}function Lj(t,e={},n={}){const r=Td(n,({selectors:s},o)=>s?o==="*"?{}:Nn(s,l=>c=>l(c[o])):{});let a={};for(const s in e)a[s]=o=>(...l)=>{const c=e[s](o)(...l);return rl(()=>c,Nn(n["*"].selectors,g=>()=>g(c)))};return rl({},...r,t,a)}function s_(t,e,n){let r=function(...a){const s={type:t};return e?s.payload=e(...a):a[0]!==void 0&&(s.payload=a[0]),s};if(n){const a=r;r=(...s)=>n(a(...s),s)}return r.type=t,r}function Dj(t,e,n={},r=void 0){const a=Object.keys(n).length>0?Nn(n,({upreducer:o})=>o):null,s=o=>l=>{if(!(o!=null&&o.type))throw new Error("upreducer called with a bad action");let c=l!=null?l:t;if(a)if(n["*"])c=ct.updateIn("*",n["*"].upreducer(o),c);else{const g=Nn(a,_=>_(o));c=ct(g,c)}const h=e[o.type]||e["+"];return h?h(o.payload,o)(c):c};return r?r(s):s}const Fj=(t,e)=>n=>r=>a=>t!=="*"&&a.type!==t?r(a):e(n)(r)(a),Nj=(t,e)=>n=>{const r=()=>Gl(n.getState(),t);return e(Object.assign(Object.assign({},n),{getState:r}))};function cl(t,e,n){const r=()=>t.getState(),a=s=>t.dispatch(s);return Object.assign(r,Nn(n,s=>(...o)=>{let l=s(t.getState());return typeof l=="function"?l(...o):l})),Object.assign(a,Nn(e,s=>(...o)=>t.dispatch(s(...o)))),Object.assign(Object.assign({},t),{getState:r,dispatch:a,actions:e,selectors:n})}const c$=(t,e,n)=>{let r=t,a="*";return Array.isArray(t)&&(a=t[0],r=t[1],r=Fj(a,r)),s=>r(cl(s,e,n))},jj=t=>e=>n=>t.reduceRight((r,a)=>a(e)(r),n);function Bj(t=[],e={},n={},r={},a=void 0,s=void 0){let o=Td(r,({middleware:h},g)=>g!=="*"&&h?Nj(g,h):void 0).filter(h=>h),c=[...t.map(h=>c$(h,e,n)),...o];return a&&(c=a(c,s)),jj(c)}var st=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(t,n):a?a.value=n:e.set(t,n),n},Se=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},bs,Mt,$r,Vr,mr,Zr,Zn,Xr,Zi,ws,Xi,hl,pl,gl,_l,vl;class ot{constructor(e){var n,r,a,s,o;if(bs.set(this,{}),Mt.set(this,{}),$r.set(this,{}),Vr.set(this,{}),mr.set(this,{}),Zr.set(this,[]),Zn.set(this,[]),Xr.set(this,void 0),Zi.set(this,void 0),ws.set(this,void 0),Xi.set(this,void 0),hl.set(this,_e(xj)),pl.set(this,_e(Rj)),gl.set(this,_e(Lj)),_l.set(this,_e(Dj)),vl.set(this,_e(Bj)),st(this,bs,(n=e.initial)!==null&&n!==void 0?n:{},"f"),st(this,Mt,(r=e.subduxes)!==null&&r!==void 0?r:{},"f"),e.subduxes&&st(this,Mt,Nn(e.subduxes,l=>l instanceof ot?l:new ot(l)),"f"),e.actions)for(const[l,c]of Object.entries(e.actions))if(typeof c=="function"&&c.type)Se(this,$r,"f")[l]=c;else{const h=Array.isArray(c)?c:[c];Se(this,$r,"f")[l]=s_(l,...h)}st(this,Vr,(a=e.selectors)!==null&&a!==void 0?a:{},"f"),st(this,Xr,e.mappedSelectors,"f"),st(this,mr,(s=e.mutations)!==null&&s!==void 0?s:{},"f"),Object.keys(Se(this,mr,"f")).filter(l=>l!=="+").filter(l=>!this.actions.hasOwnProperty(l)).forEach(l=>{throw new Error(`action '${l}' is not defined`)}),e.effects&&st(this,Zr,Object.entries(e.effects),"f"),st(this,Zn,(o=e.reactions)!==null&&o!==void 0?o:[],"f"),st(this,Zi,e.mappedReaction,"f"),st(this,ws,e.upreducerWrapper,"f"),st(this,Xi,e.middlewareWrapper,"f")}setMappedSelector(e,n){st(this,Xr,Object.assign(Object.assign({},Se(this,Xr,"f")),{[e]:n}),"f")}get middleware(){return Se(this,vl,"f").call(this,Se(this,Zr,"f"),this.actions,this.selectors,Se(this,Mt,"f"),Se(this,Xi,"f"),this)}setMiddlewareWrapper(e){st(this,Xi,e,"f")}get initial(){return Se(this,hl,"f").call(this,Se(this,bs,"f"),Se(this,Mt,"f"))}get actions(){return Se(this,pl,"f").call(this,Se(this,$r,"f"),Se(this,Mt,"f"))}get selectors(){return Se(this,gl,"f").call(this,Se(this,Vr,"f"),Se(this,Xr,"f"),Se(this,Mt,"f"))}get subduxes(){return Se(this,Mt,"f")}get upreducer(){return Se(this,_l,"f").call(this,this.initial,Se(this,mr,"f"),Se(this,Mt,"f"),Se(this,ws,"f"))}get reducer(){return(e,n)=>this.upreducer(n)(e)}addSubscription(e){st(this,Zn,[...Se(this,Zn,"f"),e],"f")}addReaction(e){st(this,Zn,[...Se(this,Zn,"f"),e],"f")}setAction(e,n){const r=s_(e,n);return st(this,$r,Object.assign(Object.assign({},Se(this,$r,"f")),{[e]:r}),"f"),r}setSelector(e,n){return st(this,Vr,Object.assign(Object.assign({},Se(this,Vr,"f")),{[e]:n}),"f"),n}setMutation(e,n){return typeof e=="function"&&(e=e.type),st(this,mr,Object.assign(Object.assign({},Se(this,mr,"f")),{[e]:n}),"f"),n}addEffect(e,n){return st(this,Zr,[...Se(this,Zr,"f"),[e,n]],"f"),n}augmentMiddlewareApi(e){return cl(e,this.actions,this.selectors)}splatSubscriber(e,n,r){const a={};return()=>(s,o,l)=>{const c=Object.keys(a),h=_g(Object.keys(s),c);for(const _ of h){let v=Object.assign(Object.assign({},e),{getState:()=>e.getState()[_]});a[_]=[],typeof r=="function"&&(v=Object.assign(Object.assign({},v),r(v,_)));const{unsub:$,subscriber:b,subscriberRaw:O}=n.subscribeAll(v);a[_].push({unsub:$,subscriber:b,subscriberRaw:O}),b()}const g=_g(c,Object.keys(s));for(const _ of g){for(const v of a[_])v.subscriber(),v.unsub();delete a[_]}}}subscribeTo(e,n,r=[]){const a=cl(Object.assign(Object.assign({},e),{subscribe:g=>this.subscribeTo(e,()=>g)}),this.actions,this.selectors),s=n(a,...r);let o;const l=()=>{const g=e.getState();if(g===o)return;let _=o;o=g,s(g,_,h)};let c=e.subscribe(l);const h=typeof c=="function"?c:c.unsub;return{unsub:h,subscriber:l,subscriberRaw:s}}subscribeAll(e){let n=Se(this,Zn,"f").map(r=>this.subscribeTo(e,r));for(const r in Se(this,Mt,"f"))if(r!=="*"){const a=Object.assign(Object.assign({},e),{getState:()=>Gl(e.getState(),r)});n.push(Se(this,Mt,"f")[r].subscribeAll(a))}return Se(this,Zi,"f")&&n.push(this.subscribeTo(e,this.splatSubscriber(e,Se(this,Mt,"f")["*"],Se(this,Zi,"f")))),{unsub:()=>n.forEach(({unsub:r})=>r()),subscriber:()=>n.forEach(({subscriber:r})=>r()),subscriberRaw:(...r)=>n.forEach(({subscriberRaw:a})=>a(...r))}}createStore(e,n){const r=(n!=null?n:eT)(this.middleware),a=Jv(this.reducer,e!=null?e:this.initial,r);a.actions=this.actions,a.selectors=this.selectors,rl(a.getState,Nn(this.selectors,s=>(...o)=>{let l=s(a.getState());return typeof l=="function"?l(...o):l}));for(const s in this.actions)a.dispatch[s]=(...o)=>a.dispatch(this.actions[s](...o));return this.subscribeAll(a),a}effectToMiddleware(e){return c$(e,this.actions,this.selectors)}}bs=new WeakMap,Mt=new WeakMap,$r=new WeakMap,Vr=new WeakMap,mr=new WeakMap,Zr=new WeakMap,Zn=new WeakMap,Xr=new WeakMap,Zi=new WeakMap,ws=new WeakMap,Xi=new WeakMap,hl=new WeakMap,pl=new WeakMap,gl=new WeakMap,_l=new WeakMap,vl=new WeakMap;function qj(t,e){for(var n=-1,r=t==null?0:t.length,a=0,s=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=IB}var df=PB,MB=gi,xB=df,RB=ir,LB="[object Arguments]",DB="[object Array]",FB="[object Boolean]",NB="[object Date]",jB="[object Error]",BB="[object Function]",qB="[object Map]",UB="[object Number]",KB="[object Object]",GB="[object RegExp]",zB="[object Set]",HB="[object String]",WB="[object WeakMap]",kB="[object ArrayBuffer]",YB="[object DataView]",VB="[object Float32Array]",ZB="[object Float64Array]",XB="[object Int8Array]",JB="[object Int16Array]",QB="[object Int32Array]",eq="[object Uint8Array]",tq="[object Uint8ClampedArray]",nq="[object Uint16Array]",rq="[object Uint32Array]",He={};He[VB]=He[ZB]=He[XB]=He[JB]=He[QB]=He[eq]=He[tq]=He[nq]=He[rq]=!0;He[LB]=He[DB]=He[kB]=He[FB]=He[YB]=He[NB]=He[jB]=He[BB]=He[qB]=He[UB]=He[KB]=He[GB]=He[zB]=He[HB]=He[WB]=!1;function iq(t){return RB(t)&&xB(t.length)&&!!He[MB(t)]}var aq=iq;function sq(t){return function(e){return t(e)}}var $f=sq,fa={exports:{}};(function(t,e){var n=p$,r=e&&!e.nodeType&&e,a=r&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===r,o=s&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=l})(fa,fa.exports);var uq=aq,oq=$f,c_=fa.exports,h_=c_&&c_.isTypedArray,lq=h_?oq(h_):uq,v$=lq,fq=kj,cq=_f,hq=Ft,pq=la.exports,gq=vf,_q=v$,vq=Object.prototype,dq=vq.hasOwnProperty;function $q(t,e){var n=hq(t),r=!n&&cq(t),a=!n&&!r&&pq(t),s=!n&&!r&&!a&&_q(t),o=n||r||a||s,l=o?fq(t.length,String):[],c=l.length;for(var h in t)(e||dq.call(t,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||gq(h,c)))&&l.push(h);return l}var d$=$q,mq=Object.prototype;function yq(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||mq;return t===n}var mf=yq;function bq(t,e){return function(n){return t(e(n))}}var $$=bq,wq=$$,Aq=wq(Object.keys,Object),Oq=Aq,Tq=mf,Sq=Oq,Cq=Object.prototype,Eq=Cq.hasOwnProperty;function Iq(t){if(!Tq(t))return Sq(t);var e=[];for(var n in Object(t))Eq.call(t,n)&&n!="constructor"&&e.push(n);return e}var Pq=Iq;function Mq(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Er=Mq,xq=gi,Rq=Er,Lq="[object AsyncFunction]",Dq="[object Function]",Fq="[object GeneratorFunction]",Nq="[object Proxy]";function jq(t){if(!Rq(t))return!1;var e=xq(t);return e==Dq||e==Fq||e==Lq||e==Nq}var m$=jq,Bq=m$,qq=df;function Uq(t){return t!=null&&qq(t.length)&&!Bq(t)}var Zs=Uq,Kq=d$,Gq=Pq,zq=Zs;function Hq(t){return zq(t)?Kq(t):Gq(t)}var ma=Hq,Wq=Hj,kq=ma;function Yq(t,e){return t&&Wq(t,e,kq)}var y$=Yq,Vq=Zs;function Zq(t,e){return function(n,r){if(n==null)return n;if(!Vq(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s-1}var mU=$U,yU=Xs;function bU(t,e){var n=this.__data__,r=yU(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var wU=bU,AU=aU,OU=pU,TU=vU,SU=mU,CU=wU;function _i(t){var e=-1,n=t==null?0:t.length;for(this.clear();++el))return!1;var h=s.get(t),g=s.get(e);if(h&&g)return h==e&&g==t;var _=-1,v=!0,$=n&BK?new DK:void 0;for(s.set(t,e),s.set(e,t);++_a?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(a);++r0&&n(l)?e>1?H$(l,e-1,n,r,a):GV(a,l):r||(a[a.length]=l)}return a}var HV=H$,WV=HV;function kV(t){var e=t==null?0:t.length;return e?WV(t,1):[]}var YV=kV;function VV(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var ZV=VV,XV=ZV,V_=Math.max;function JV(t,e,n){return e=V_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=V_(r.length-e,0),o=Array(s);++a0){if(++e>=sZ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var fZ=lZ,cZ=aZ,hZ=fZ,pZ=hZ(cZ),gZ=pZ,_Z=YV,vZ=QV,dZ=gZ;function $Z(t){return dZ(vZ(t,void 0,_Z),t+"")}var mZ=$Z,yZ=nu,bZ=bV,wZ=DV,AZ=yi,OZ=ba,TZ=jV,SZ=mZ,CZ=Df,EZ=1,IZ=2,PZ=4,MZ=SZ(function(t,e){var n={};if(t==null)return n;var r=!1;e=yZ(e,function(s){return s=AZ(s,t),r||(r=s.length>1),s}),OZ(t,CZ(t),n),r&&(n=bZ(n,EZ|IZ|PZ,TZ));for(var a=e.length;a--;)wZ(n,e[a]);return n}),xZ=MZ;function RZ(t){return t}function W$(t){var e=t;return function(){return e}}function k$(t){return Array.isArray(t)?t:D$((""+t).split("."),function(e){return!e})}var je="@@updeep/placeholder";function iu(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===je;)n-=1;return n}function ln(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=iu(arguments);return o>=1?t(n,a,s):e}}function un(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=iu(arguments,2);if(r===je||s===je||o===je)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===je?ln(function(c,h,g){return t(c,r,h,g)}):t(n,r,s,o):l===1?ln(function(c,h,g){return t(n,c,h,g)}):e}}function Ji(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=iu(arguments,3);if(a===je||o===je||l===je)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===je?r===je?un(function(h,g,_,v){return t(h,g,a,_,v)}):ln(function(h,g,_){return t(h,r,a,g,_)}):r===je?ln(function(h,g,_){return t(n,h,a,g,_)}):t(n,r,a,o,l):c===2?n===je?un(function(h,g,_,v){return t(h,r,g,_,v)}):ln(function(h,g,_){return t(n,r,h,g,_)}):c===1?un(function(h,g,_,v){return t(n,h,g,_,v)}):e}}function LZ(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=iu(arguments,4);if(s===je||l===je||c===je)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===je?r===je?a===je?Ji(function(g,_,v,$,b){return t(g,_,v,s,$,b)}):un(function(g,_,v,$){return t(g,_,a,s,v,$)}):a===je?un(function(g,_,v,$){return t(g,r,_,s,v,$)}):ln(function(g,_,v){return t(g,r,a,s,_,v)}):r===je?a===je?un(function(g,_,v,$){return t(n,g,_,s,v,$)}):ln(function(g,_,v){return t(n,g,a,s,_,v)}):a===je?ln(function(g,_,v){return t(n,r,g,s,_,v)}):t(n,r,a,s,l,c):h===3?n===je?r===je?Ji(function(g,_,v,$,b){return t(g,_,a,v,$,b)}):un(function(g,_,v,$){return t(g,r,a,_,v,$)}):r===je?un(function(g,_,v,$){return t(n,g,a,_,v,$)}):ln(function(g,_,v){return t(n,r,a,g,_,v)}):h===2?n===je?Ji(function(g,_,v,$,b){return t(g,r,_,v,$,b)}):un(function(g,_,v,$){return t(n,r,g,_,v,$)}):h===1?Ji(function(g,_,v,$,b){return t(n,g,_,v,$,b)}):e}}function wa(t,e){return e===void 0&&(e=t.length),[t,ln,un,Ji,LZ][e](t)}var DZ=wa(function(t,e,n){for(var r=k$(t),a=n,s=0;s-1){var h=n[c];return c>0&&(n.splice(c,1),n.unshift(h)),h.value}return Ps}function a(l,c){r(l)===Ps&&(n.unshift({key:l,value:c}),n.length>t&&n.pop())}function s(){return n}function o(){n=[]}return{get:r,put:a,getEntries:s,clear:o}}var VZ=function(e,n){return e===n};function ZZ(t){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var a=n.length,s=0;s1?e-1:0),r=1;rCe(t));jf.setMutation("setDriveReqs",t=>Ce({reqs:t}));const eX=t=>Nf([e=>e.reqs.mass,e=>e.propulsion.drive.rating,e=>e.propulsion.drive.advanced],(e,n,r)=>t.dispatch.setDriveReqs(tX(e,n,r)));function tX(t,e,n=!1){const r=Math.ceil(e*.05*t),a=r*(n?3:2);return{mass:r,cost:a}}const Bf=new ot({subduxes:{reqs:ar},initial:{type:"none"},actions:{setFtl:null,setFtlReqs:null}});Bf.setMutation("setFtl",t=>Ce({type:t}));Bf.setMutation("setFtlReqs",t=>Ce({reqs:t}));function nX(t,e){if(t==="none")return{cost:0,mass:0};const n=Math.ceil(e/10);return{mass:n,cost:n*(t==="advanced"?3:2)}}const rX=t=>Nf([e=>e.propulsion.ftl.type,e=>e.reqs.mass],(e,n)=>t.dispatch.setFtlReqs(nX(e,n))),iX=new ot({subduxes:{drive:jf,ftl:Bf}});var Ol={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(t,e){(function(){var n,r="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,g="__lodash_placeholder__",_=1,v=2,$=4,b=1,O=2,C=1,S=2,F=4,H=8,te=16,j=32,ue=64,W=128,se=256,X=512,$e=30,ce="...",Le=800,Je=16,rt=1,Nt=2,bn=3,At=1/0,Yt=9007199254740991,Aa=17976931348623157e292,sr=0/0,tn=4294967295,n1=tn-1,r1=tn>>>1,i1=[["ary",W],["bind",C],["bindKey",S],["curry",H],["curryRight",te],["flip",X],["partial",j],["partialRight",ue],["rearg",se]],xr="[object Arguments]",Oa="[object Array]",a1="[object AsyncFunction]",Ai="[object Boolean]",Oi="[object Date]",s1="[object DOMException]",Ta="[object Error]",Sa="[object Function]",zf="[object GeneratorFunction]",Vt="[object Map]",Ti="[object Number]",u1="[object Null]",wn="[object Object]",Hf="[object Promise]",o1="[object Proxy]",Si="[object RegExp]",Zt="[object Set]",Ci="[object String]",Ca="[object Symbol]",l1="[object Undefined]",Ei="[object WeakMap]",f1="[object WeakSet]",Ii="[object ArrayBuffer]",Rr="[object DataView]",cu="[object Float32Array]",hu="[object Float64Array]",pu="[object Int8Array]",gu="[object Int16Array]",_u="[object Int32Array]",vu="[object Uint8Array]",du="[object Uint8ClampedArray]",$u="[object Uint16Array]",mu="[object Uint32Array]",c1=/\b__p \+= '';/g,h1=/\b(__p \+=) '' \+/g,p1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Wf=/&(?:amp|lt|gt|quot|#39);/g,kf=/[&<>"']/g,g1=RegExp(Wf.source),_1=RegExp(kf.source),v1=/<%-([\s\S]+?)%>/g,d1=/<%([\s\S]+?)%>/g,Yf=/<%=([\s\S]+?)%>/g,$1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m1=/^\w*$/,y1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yu=/[\\^$.*+?()[\]{}|]/g,b1=RegExp(yu.source),bu=/^\s+/,w1=/\s/,A1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,O1=/\{\n\/\* \[wrapped with (.+)\] \*/,T1=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,C1=/[()=,{}\[\]\/\s]/,E1=/\\(\\)?/g,I1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vf=/\w*$/,P1=/^[-+]0x[0-9a-f]+$/i,M1=/^0b[01]+$/i,x1=/^\[object .+?Constructor\]$/,R1=/^0o[0-7]+$/i,L1=/^(?:0|[1-9]\d*)$/,D1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ea=/($^)/,F1=/['\n\r\u2028\u2029\\]/g,Ia="\\ud800-\\udfff",N1="\\u0300-\\u036f",j1="\\ufe20-\\ufe2f",B1="\\u20d0-\\u20ff",Zf=N1+j1+B1,Xf="\\u2700-\\u27bf",Jf="a-z\\xdf-\\xf6\\xf8-\\xff",q1="\\xac\\xb1\\xd7\\xf7",U1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",K1="\\u2000-\\u206f",G1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qf="A-Z\\xc0-\\xd6\\xd8-\\xde",ec="\\ufe0e\\ufe0f",tc=q1+U1+K1+G1,wu="['\u2019]",z1="["+Ia+"]",nc="["+tc+"]",Pa="["+Zf+"]",rc="\\d+",H1="["+Xf+"]",ic="["+Jf+"]",ac="[^"+Ia+tc+rc+Xf+Jf+Qf+"]",Au="\\ud83c[\\udffb-\\udfff]",W1="(?:"+Pa+"|"+Au+")",sc="[^"+Ia+"]",Ou="(?:\\ud83c[\\udde6-\\uddff]){2}",Tu="[\\ud800-\\udbff][\\udc00-\\udfff]",Lr="["+Qf+"]",uc="\\u200d",oc="(?:"+ic+"|"+ac+")",k1="(?:"+Lr+"|"+ac+")",lc="(?:"+wu+"(?:d|ll|m|re|s|t|ve))?",fc="(?:"+wu+"(?:D|LL|M|RE|S|T|VE))?",cc=W1+"?",hc="["+ec+"]?",Y1="(?:"+uc+"(?:"+[sc,Ou,Tu].join("|")+")"+hc+cc+")*",V1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pc=hc+cc+Y1,X1="(?:"+[H1,Ou,Tu].join("|")+")"+pc,J1="(?:"+[sc+Pa+"?",Pa,Ou,Tu,z1].join("|")+")",Q1=RegExp(wu,"g"),em=RegExp(Pa,"g"),Su=RegExp(Au+"(?="+Au+")|"+J1+pc,"g"),tm=RegExp([Lr+"?"+ic+"+"+lc+"(?="+[nc,Lr,"$"].join("|")+")",k1+"+"+fc+"(?="+[nc,Lr+oc,"$"].join("|")+")",Lr+"?"+oc+"+"+lc,Lr+"+"+fc,Z1,V1,rc,X1].join("|"),"g"),nm=RegExp("["+uc+Ia+Zf+ec+"]"),rm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,im=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],am=-1,Ke={};Ke[cu]=Ke[hu]=Ke[pu]=Ke[gu]=Ke[_u]=Ke[vu]=Ke[du]=Ke[$u]=Ke[mu]=!0,Ke[xr]=Ke[Oa]=Ke[Ii]=Ke[Ai]=Ke[Rr]=Ke[Oi]=Ke[Ta]=Ke[Sa]=Ke[Vt]=Ke[Ti]=Ke[wn]=Ke[Si]=Ke[Zt]=Ke[Ci]=Ke[Ei]=!1;var Be={};Be[xr]=Be[Oa]=Be[Ii]=Be[Rr]=Be[Ai]=Be[Oi]=Be[cu]=Be[hu]=Be[pu]=Be[gu]=Be[_u]=Be[Vt]=Be[Ti]=Be[wn]=Be[Si]=Be[Zt]=Be[Ci]=Be[Ca]=Be[vu]=Be[du]=Be[$u]=Be[mu]=!0,Be[Ta]=Be[Sa]=Be[Ei]=!1;var sm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},um={"&":"&","<":"<",">":">",'"':""","'":"'"},om={"&":"&","<":"<",">":">",""":'"',"'":"'"},lm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fm=parseFloat,cm=parseInt,gc=typeof xt=="object"&&xt&&xt.Object===Object&&xt,hm=typeof self=="object"&&self&&self.Object===Object&&self,lt=gc||hm||Function("return this")(),Cu=e&&!e.nodeType&&e,ur=Cu&&!0&&t&&!t.nodeType&&t,_c=ur&&ur.exports===Cu,Eu=_c&&gc.process,jt=function(){try{var I=ur&&ur.require&&ur.require("util").types;return I||Eu&&Eu.binding&&Eu.binding("util")}catch{}}(),vc=jt&&jt.isArrayBuffer,dc=jt&&jt.isDate,$c=jt&&jt.isMap,mc=jt&&jt.isRegExp,yc=jt&&jt.isSet,bc=jt&&jt.isTypedArray;function Ot(I,N,x){switch(x.length){case 0:return I.call(N);case 1:return I.call(N,x[0]);case 2:return I.call(N,x[0],x[1]);case 3:return I.call(N,x[0],x[1],x[2])}return I.apply(N,x)}function pm(I,N,x,ne){for(var ve=-1,Pe=I==null?0:I.length;++ve-1}function Iu(I,N,x){for(var ne=-1,ve=I==null?0:I.length;++ne-1;);return x}function Ic(I,N){for(var x=I.length;x--&&Dr(N,I[x],0)>-1;);return x}function wm(I,N){for(var x=I.length,ne=0;x--;)I[x]===N&&++ne;return ne}var Am=Ru(sm),Om=Ru(um);function Tm(I){return"\\"+lm[I]}function Sm(I,N){return I==null?n:I[N]}function Fr(I){return nm.test(I)}function Cm(I){return rm.test(I)}function Em(I){for(var N,x=[];!(N=I.next()).done;)x.push(N.value);return x}function Nu(I){var N=-1,x=Array(I.size);return I.forEach(function(ne,ve){x[++N]=[ve,ne]}),x}function Pc(I,N){return function(x){return I(N(x))}}function Gn(I,N){for(var x=-1,ne=I.length,ve=0,Pe=[];++x-1}function _y(i,u){var f=this.__data__,p=Ya(f,i);return p<0?(++this.size,f.push([i,u])):f[p][1]=u,this}An.prototype.clear=cy,An.prototype.delete=hy,An.prototype.get=py,An.prototype.has=gy,An.prototype.set=_y;function On(i){var u=-1,f=i==null?0:i.length;for(this.clear();++u=u?i:u)),i}function Kt(i,u,f,p,d,y){var A,T=u&_,P=u&v,q=u&$;if(f&&(A=d?f(i,p,d,y):f(i)),A!==n)return A;if(!Ve(i))return i;var U=de(i);if(U){if(A=m0(i),!T)return mt(i,A)}else{var z=pt(i),J=z==Sa||z==zf;if(Vn(i))return hh(i,T);if(z==wn||z==xr||J&&!d){if(A=P||J?{}:Mh(i),!T)return P?o0(i,My(A,i)):u0(i,Kc(A,i))}else{if(!Be[z])return d?i:{};A=y0(i,z,T)}}y||(y=new Jt);var ae=y.get(i);if(ae)return ae;y.set(i,A),sp(i)?i.forEach(function(ge){A.add(Kt(ge,u,f,ge,i,y))}):ip(i)&&i.forEach(function(ge,Ae){A.set(Ae,Kt(ge,u,f,Ae,i,y))});var pe=q?P?lo:oo:P?bt:ut,be=U?n:pe(i);return Bt(be||i,function(ge,Ae){be&&(Ae=ge,ge=i[Ae]),Fi(A,Ae,Kt(ge,u,f,Ae,i,y))}),A}function xy(i){var u=ut(i);return function(f){return Gc(f,i,u)}}function Gc(i,u,f){var p=f.length;if(i==null)return!p;for(i=Fe(i);p--;){var d=f[p],y=u[d],A=i[d];if(A===n&&!(d in i)||!y(A))return!1}return!0}function zc(i,u,f){if(typeof i!="function")throw new qt(o);return Gi(function(){i.apply(n,f)},u)}function Ni(i,u,f,p){var d=-1,y=Ma,A=!0,T=i.length,P=[],q=u.length;if(!T)return P;f&&(u=We(u,Tt(f))),p?(y=Iu,A=!1):u.length>=a&&(y=Pi,A=!1,u=new fr(u));e:for(;++dd?0:d+f),p=p===n||p>d?d:ye(p),p<0&&(p+=d),p=f>p?0:op(p);f0&&f(T)?u>1?ft(T,u-1,f,p,d):Kn(d,T):p||(d[d.length]=T)}return d}var zu=$h(),kc=$h(!0);function nn(i,u){return i&&zu(i,u,ut)}function Hu(i,u){return i&&kc(i,u,ut)}function Za(i,u){return Un(u,function(f){return In(i[f])})}function hr(i,u){u=kn(u,i);for(var f=0,p=u.length;i!=null&&fu}function Dy(i,u){return i!=null&&De.call(i,u)}function Fy(i,u){return i!=null&&u in Fe(i)}function Ny(i,u,f){return i>=ht(u,f)&&i=120&&U.length>=120)?new fr(A&&U):n}U=i[0];var z=-1,J=T[0];e:for(;++z-1;)T!==i&&Ua.call(T,P,1),Ua.call(i,P,1);return i}function ih(i,u){for(var f=i?u.length:0,p=f-1;f--;){var d=u[f];if(f==p||d!==y){var y=d;En(d)?Ua.call(i,d,1):to(i,d)}}return i}function Ju(i,u){return i+za(jc()*(u-i+1))}function Zy(i,u,f,p){for(var d=-1,y=at(Ga((u-i)/(f||1)),0),A=x(y);y--;)A[p?y:++d]=i,i+=f;return A}function Qu(i,u){var f="";if(!i||u<1||u>Yt)return f;do u%2&&(f+=i),u=za(u/2),u&&(i+=i);while(u);return f}function we(i,u){return vo(Lh(i,u,wt),i+"")}function Xy(i){return Uc(kr(i))}function Jy(i,u){var f=kr(i);return us(f,cr(u,0,f.length))}function qi(i,u,f,p){if(!Ve(i))return i;u=kn(u,i);for(var d=-1,y=u.length,A=y-1,T=i;T!=null&&++dd?0:d+u),f=f>d?d:f,f<0&&(f+=d),d=u>f?0:f-u>>>0,u>>>=0;for(var y=x(d);++p>>1,A=i[y];A!==null&&!Ct(A)&&(f?A<=u:A=a){var q=u?null:h0(i);if(q)return Ra(q);A=!1,d=Pi,P=new fr}else P=u?[]:T;e:for(;++p=p?i:Gt(i,u,f)}var ch=Gm||function(i){return lt.clearTimeout(i)};function hh(i,u){if(u)return i.slice();var f=i.length,p=Rc?Rc(f):new i.constructor(f);return i.copy(p),p}function ao(i){var u=new i.constructor(i.byteLength);return new Ba(u).set(new Ba(i)),u}function r0(i,u){var f=u?ao(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}function i0(i){var u=new i.constructor(i.source,Vf.exec(i));return u.lastIndex=i.lastIndex,u}function a0(i){return Di?Fe(Di.call(i)):{}}function ph(i,u){var f=u?ao(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function gh(i,u){if(i!==u){var f=i!==n,p=i===null,d=i===i,y=Ct(i),A=u!==n,T=u===null,P=u===u,q=Ct(u);if(!T&&!q&&!y&&i>u||y&&A&&P&&!T&&!q||p&&A&&P||!f&&P||!d)return 1;if(!p&&!y&&!q&&i=T)return P;var q=f[p];return P*(q=="desc"?-1:1)}}return i.index-u.index}function _h(i,u,f,p){for(var d=-1,y=i.length,A=f.length,T=-1,P=u.length,q=at(y-A,0),U=x(P+q),z=!p;++T1?f[d-1]:n,A=d>2?f[2]:n;for(y=i.length>3&&typeof y=="function"?(d--,y):n,A&&dt(f[0],f[1],A)&&(y=d<3?n:y,d=1),u=Fe(u);++p-1?d[y?u[A]:A]:n}}function bh(i){return Cn(function(u){var f=u.length,p=f,d=Ut.prototype.thru;for(i&&u.reverse();p--;){var y=u[p];if(typeof y!="function")throw new qt(o);if(d&&!A&&as(y)=="wrapper")var A=new Ut([],!0)}for(p=A?p:f;++p1&&Te.reverse(),U&&PT))return!1;var q=y.get(i),U=y.get(u);if(q&&U)return q==u&&U==i;var z=-1,J=!0,ae=f&O?new fr:n;for(y.set(i,u),y.set(u,i);++z1?"& ":"")+u[p],u=u.join(f>2?", ":" "),i.replace(A1,`{ /* [wrapped with `+u+`] */ `)}function w0(i){return de(i)||_r(i)||!!(Fc&&i&&i[Fc])}function En(i,u){var f=typeof i;return u=u==null?Yt:u,!!u&&(f=="number"||f!="symbol"&&L1.test(i))&&i>-1&&i%1==0&&i0){if(++u>=Le)return arguments[0]}else u=0;return i.apply(n,arguments)}}function us(i,u){var f=-1,p=i.length,d=p-1;for(u=u===n?p:u;++f1?i[u-1]:n;return f=typeof f=="function"?(i.pop(),f):n,Wh(i,f)});function kh(i){var u=m(i);return u.__chain__=!0,u}function Rb(i,u){return u(i),i}function os(i,u){return u(i)}var Lb=Cn(function(i){var u=i.length,f=u?i[0]:0,p=this.__wrapped__,d=function(y){return Gu(y,i)};return u>1||this.__actions__.length||!(p instanceof Oe)||!En(f)?this.thru(d):(p=p.slice(f,+f+(u?1:0)),p.__actions__.push({func:os,args:[d],thisArg:n}),new Ut(p,this.__chain__).thru(function(y){return u&&!y.length&&y.push(n),y}))});function Db(){return kh(this)}function Fb(){return new Ut(this.value(),this.__chain__)}function Nb(){this.__values__===n&&(this.__values__=up(this.value()));var i=this.__index__>=this.__values__.length,u=i?n:this.__values__[this.__index__++];return{done:i,value:u}}function jb(){return this}function Bb(i){for(var u,f=this;f instanceof ka;){var p=qh(f);p.__index__=0,p.__values__=n,u?d.__wrapped__=p:u=p;var d=p;f=f.__wrapped__}return d.__wrapped__=i,u}function qb(){var i=this.__wrapped__;if(i instanceof Oe){var u=i;return this.__actions__.length&&(u=new Oe(this)),u=u.reverse(),u.__actions__.push({func:os,args:[$o],thisArg:n}),new Ut(u,this.__chain__)}return this.thru($o)}function Ub(){return lh(this.__wrapped__,this.__actions__)}var Kb=es(function(i,u,f){De.call(i,f)?++i[f]:Tn(i,f,1)});function Gb(i,u,f){var p=de(i)?wc:Ry;return f&&dt(i,u,f)&&(u=n),p(i,he(u,3))}function zb(i,u){var f=de(i)?Un:Wc;return f(i,he(u,3))}var Hb=yh(Uh),Wb=yh(Kh);function kb(i,u){return ft(ls(i,u),1)}function Yb(i,u){return ft(ls(i,u),At)}function Vb(i,u,f){return f=f===n?1:ye(f),ft(ls(i,u),f)}function Yh(i,u){var f=de(i)?Bt:Hn;return f(i,he(u,3))}function Vh(i,u){var f=de(i)?gm:Hc;return f(i,he(u,3))}var Zb=es(function(i,u,f){De.call(i,f)?i[f].push(u):Tn(i,f,[u])});function Xb(i,u,f,p){i=yt(i)?i:kr(i),f=f&&!p?ye(f):0;var d=i.length;return f<0&&(f=at(d+f,0)),gs(i)?f<=d&&i.indexOf(u,f)>-1:!!d&&Dr(i,u,f)>-1}var Jb=we(function(i,u,f){var p=-1,d=typeof u=="function",y=yt(i)?x(i.length):[];return Hn(i,function(A){y[++p]=d?Ot(u,A,f):ji(A,u,f)}),y}),Qb=es(function(i,u,f){Tn(i,f,u)});function ls(i,u){var f=de(i)?We:Jc;return f(i,he(u,3))}function ew(i,u,f,p){return i==null?[]:(de(u)||(u=u==null?[]:[u]),f=p?n:f,de(f)||(f=f==null?[]:[f]),nh(i,u,f))}var tw=es(function(i,u,f){i[f?0:1].push(u)},function(){return[[],[]]});function nw(i,u,f){var p=de(i)?Pu:Sc,d=arguments.length<3;return p(i,he(u,4),f,d,Hn)}function rw(i,u,f){var p=de(i)?_m:Sc,d=arguments.length<3;return p(i,he(u,4),f,d,Hc)}function iw(i,u){var f=de(i)?Un:Wc;return f(i,hs(he(u,3)))}function aw(i){var u=de(i)?Uc:Xy;return u(i)}function sw(i,u,f){(f?dt(i,u,f):u===n)?u=1:u=ye(u);var p=de(i)?Ey:Jy;return p(i,u)}function uw(i){var u=de(i)?Iy:e0;return u(i)}function ow(i){if(i==null)return 0;if(yt(i))return gs(i)?Nr(i):i.length;var u=pt(i);return u==Vt||u==Zt?i.size:Vu(i).length}function lw(i,u,f){var p=de(i)?Mu:t0;return f&&dt(i,u,f)&&(u=n),p(i,he(u,3))}var fw=we(function(i,u){if(i==null)return[];var f=u.length;return f>1&&dt(i,u[0],u[1])?u=[]:f>2&&dt(u[0],u[1],u[2])&&(u=[u[0]]),nh(i,ft(u,1),[])}),fs=zm||function(){return lt.Date.now()};function cw(i,u){if(typeof u!="function")throw new qt(o);return i=ye(i),function(){if(--i<1)return u.apply(this,arguments)}}function Zh(i,u,f){return u=f?n:u,u=i&&u==null?i.length:u,Sn(i,W,n,n,n,n,u)}function Xh(i,u){var f;if(typeof u!="function")throw new qt(o);return i=ye(i),function(){return--i>0&&(f=u.apply(this,arguments)),i<=1&&(u=n),f}}var yo=we(function(i,u,f){var p=C;if(f.length){var d=Gn(f,Hr(yo));p|=j}return Sn(i,p,u,f,d)}),Jh=we(function(i,u,f){var p=C|S;if(f.length){var d=Gn(f,Hr(Jh));p|=j}return Sn(u,p,i,f,d)});function Qh(i,u,f){u=f?n:u;var p=Sn(i,H,n,n,n,n,n,u);return p.placeholder=Qh.placeholder,p}function ep(i,u,f){u=f?n:u;var p=Sn(i,te,n,n,n,n,n,u);return p.placeholder=ep.placeholder,p}function tp(i,u,f){var p,d,y,A,T,P,q=0,U=!1,z=!1,J=!0;if(typeof i!="function")throw new qt(o);u=Ht(u)||0,Ve(f)&&(U=!!f.leading,z="maxWait"in f,y=z?at(Ht(f.maxWait)||0,u):y,J="trailing"in f?!!f.trailing:J);function ae(et){var en=p,Mn=d;return p=d=n,q=et,A=i.apply(Mn,en),A}function pe(et){return q=et,T=Gi(Ae,u),U?ae(et):A}function be(et){var en=et-P,Mn=et-q,yp=u-en;return z?ht(yp,y-Mn):yp}function ge(et){var en=et-P,Mn=et-q;return P===n||en>=u||en<0||z&&Mn>=y}function Ae(){var et=fs();if(ge(et))return Te(et);T=Gi(Ae,be(et))}function Te(et){return T=n,J&&p?ae(et):(p=d=n,A)}function Et(){T!==n&&ch(T),q=0,p=P=d=T=n}function $t(){return T===n?A:Te(fs())}function It(){var et=fs(),en=ge(et);if(p=arguments,d=this,P=et,en){if(T===n)return pe(P);if(z)return ch(T),T=Gi(Ae,u),ae(P)}return T===n&&(T=Gi(Ae,u)),A}return It.cancel=Et,It.flush=$t,It}var hw=we(function(i,u){return zc(i,1,u)}),pw=we(function(i,u,f){return zc(i,Ht(u)||0,f)});function gw(i){return Sn(i,X)}function cs(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new qt(o);var f=function(){var p=arguments,d=u?u.apply(this,p):p[0],y=f.cache;if(y.has(d))return y.get(d);var A=i.apply(this,p);return f.cache=y.set(d,A)||y,A};return f.cache=new(cs.Cache||On),f}cs.Cache=On;function hs(i){if(typeof i!="function")throw new qt(o);return function(){var u=arguments;switch(u.length){case 0:return!i.call(this);case 1:return!i.call(this,u[0]);case 2:return!i.call(this,u[0],u[1]);case 3:return!i.call(this,u[0],u[1],u[2])}return!i.apply(this,u)}}function _w(i){return Xh(2,i)}var vw=n0(function(i,u){u=u.length==1&&de(u[0])?We(u[0],Tt(he())):We(ft(u,1),Tt(he()));var f=u.length;return we(function(p){for(var d=-1,y=ht(p.length,f);++d=u}),_r=Vc(function(){return arguments}())?Vc:function(i){return Ze(i)&&De.call(i,"callee")&&!Dc.call(i,"callee")},de=x.isArray,Mw=vc?Tt(vc):By;function yt(i){return i!=null&&ps(i.length)&&!In(i)}function Qe(i){return Ze(i)&&yt(i)}function xw(i){return i===!0||i===!1||Ze(i)&&vt(i)==Ai}var Vn=Wm||xo,Rw=dc?Tt(dc):qy;function Lw(i){return Ze(i)&&i.nodeType===1&&!zi(i)}function Dw(i){if(i==null)return!0;if(yt(i)&&(de(i)||typeof i=="string"||typeof i.splice=="function"||Vn(i)||Wr(i)||_r(i)))return!i.length;var u=pt(i);if(u==Vt||u==Zt)return!i.size;if(Ki(i))return!Vu(i).length;for(var f in i)if(De.call(i,f))return!1;return!0}function Fw(i,u){return Bi(i,u)}function Nw(i,u,f){f=typeof f=="function"?f:n;var p=f?f(i,u):n;return p===n?Bi(i,u,n,f):!!p}function wo(i){if(!Ze(i))return!1;var u=vt(i);return u==Ta||u==s1||typeof i.message=="string"&&typeof i.name=="string"&&!zi(i)}function jw(i){return typeof i=="number"&&Nc(i)}function In(i){if(!Ve(i))return!1;var u=vt(i);return u==Sa||u==zf||u==a1||u==o1}function rp(i){return typeof i=="number"&&i==ye(i)}function ps(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Yt}function Ve(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function Ze(i){return i!=null&&typeof i=="object"}var ip=$c?Tt($c):Ky;function Bw(i,u){return i===u||Yu(i,u,co(u))}function qw(i,u,f){return f=typeof f=="function"?f:n,Yu(i,u,co(u),f)}function Uw(i){return ap(i)&&i!=+i}function Kw(i){if(T0(i))throw new ve(s);return Zc(i)}function Gw(i){return i===null}function zw(i){return i==null}function ap(i){return typeof i=="number"||Ze(i)&&vt(i)==Ti}function zi(i){if(!Ze(i)||vt(i)!=wn)return!1;var u=qa(i);if(u===null)return!0;var f=De.call(u,"constructor")&&u.constructor;return typeof f=="function"&&f instanceof f&&Fa.call(f)==qm}var Ao=mc?Tt(mc):Gy;function Hw(i){return rp(i)&&i>=-Yt&&i<=Yt}var sp=yc?Tt(yc):zy;function gs(i){return typeof i=="string"||!de(i)&&Ze(i)&&vt(i)==Ci}function Ct(i){return typeof i=="symbol"||Ze(i)&&vt(i)==Ca}var Wr=bc?Tt(bc):Hy;function Ww(i){return i===n}function kw(i){return Ze(i)&&pt(i)==Ei}function Yw(i){return Ze(i)&&vt(i)==f1}var Vw=is(Zu),Zw=is(function(i,u){return i<=u});function up(i){if(!i)return[];if(yt(i))return gs(i)?Xt(i):mt(i);if(Mi&&i[Mi])return Em(i[Mi]());var u=pt(i),f=u==Vt?Nu:u==Zt?Ra:kr;return f(i)}function Pn(i){if(!i)return i===0?i:0;if(i=Ht(i),i===At||i===-At){var u=i<0?-1:1;return u*Aa}return i===i?i:0}function ye(i){var u=Pn(i),f=u%1;return u===u?f?u-f:u:0}function op(i){return i?cr(ye(i),0,tn):0}function Ht(i){if(typeof i=="number")return i;if(Ct(i))return sr;if(Ve(i)){var u=typeof i.valueOf=="function"?i.valueOf():i;i=Ve(u)?u+"":u}if(typeof i!="string")return i===0?i:+i;i=Cc(i);var f=M1.test(i);return f||R1.test(i)?cm(i.slice(2),f?2:8):P1.test(i)?sr:+i}function lp(i){return rn(i,bt(i))}function Xw(i){return i?cr(ye(i),-Yt,Yt):i===0?i:0}function xe(i){return i==null?"":St(i)}var Jw=Gr(function(i,u){if(Ki(u)||yt(u)){rn(u,ut(u),i);return}for(var f in u)De.call(u,f)&&Fi(i,f,u[f])}),fp=Gr(function(i,u){rn(u,bt(u),i)}),_s=Gr(function(i,u,f,p){rn(u,bt(u),i,p)}),Qw=Gr(function(i,u,f,p){rn(u,ut(u),i,p)}),eA=Cn(Gu);function tA(i,u){var f=Kr(i);return u==null?f:Kc(f,u)}var nA=we(function(i,u){i=Fe(i);var f=-1,p=u.length,d=p>2?u[2]:n;for(d&&dt(u[0],u[1],d)&&(p=1);++f1),y}),rn(i,lo(i),f),p&&(f=Kt(f,_|v|$,p0));for(var d=u.length;d--;)to(f,u[d]);return f});function yA(i,u){return hp(i,hs(he(u)))}var bA=Cn(function(i,u){return i==null?{}:Yy(i,u)});function hp(i,u){if(i==null)return{};var f=We(lo(i),function(p){return[p]});return u=he(u),rh(i,f,function(p,d){return u(p,d[0])})}function wA(i,u,f){u=kn(u,i);var p=-1,d=u.length;for(d||(d=1,i=n);++pu){var p=i;i=u,u=p}if(f||i%1||u%1){var d=jc();return ht(i+d*(u-i+fm("1e-"+((d+"").length-1))),u)}return Ju(i,u)}var RA=zr(function(i,u,f){return u=u.toLowerCase(),i+(f?_p(u):u)});function _p(i){return So(xe(i).toLowerCase())}function vp(i){return i=xe(i),i&&i.replace(D1,Am).replace(em,"")}function LA(i,u,f){i=xe(i),u=St(u);var p=i.length;f=f===n?p:cr(ye(f),0,p);var d=f;return f-=u.length,f>=0&&i.slice(f,d)==u}function DA(i){return i=xe(i),i&&_1.test(i)?i.replace(kf,Om):i}function FA(i){return i=xe(i),i&&b1.test(i)?i.replace(yu,"\\$&"):i}var NA=zr(function(i,u,f){return i+(f?"-":"")+u.toLowerCase()}),jA=zr(function(i,u,f){return i+(f?" ":"")+u.toLowerCase()}),BA=mh("toLowerCase");function qA(i,u,f){i=xe(i),u=ye(u);var p=u?Nr(i):0;if(!u||p>=u)return i;var d=(u-p)/2;return rs(za(d),f)+i+rs(Ga(d),f)}function UA(i,u,f){i=xe(i),u=ye(u);var p=u?Nr(i):0;return u&&p>>0,f?(i=xe(i),i&&(typeof u=="string"||u!=null&&!Ao(u))&&(u=St(u),!u&&Fr(i))?Yn(Xt(i),0,f):i.split(u,f)):[]}var YA=zr(function(i,u,f){return i+(f?" ":"")+So(u)});function VA(i,u,f){return i=xe(i),f=f==null?0:cr(ye(f),0,i.length),u=St(u),i.slice(f,f+u.length)==u}function ZA(i,u,f){var p=m.templateSettings;f&&dt(i,u,f)&&(u=n),i=xe(i),u=_s({},u,p,Sh);var d=_s({},u.imports,p.imports,Sh),y=ut(d),A=Fu(d,y),T,P,q=0,U=u.interpolate||Ea,z="__p += '",J=ju((u.escape||Ea).source+"|"+U.source+"|"+(U===Yf?I1:Ea).source+"|"+(u.evaluate||Ea).source+"|$","g"),ae="//# sourceURL="+(De.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++am+"]")+` `;i.replace(J,function(ge,Ae,Te,Et,$t,It){return Te||(Te=Et),z+=i.slice(q,It).replace(F1,Tm),Ae&&(T=!0,z+=`' + __e(`+Ae+`) + '`),$t&&(P=!0,z+=`'; `+$t+`; __p += '`),Te&&(z+=`' + ((__t = (`+Te+`)) == null ? '' : __t) + '`),q=It+ge.length,ge}),z+=`'; `;var pe=De.call(u,"variable")&&u.variable;if(!pe)z=`with (obj) { `+z+` } `;else if(C1.test(pe))throw new ve(l);z=(P?z.replace(c1,""):z).replace(h1,"$1").replace(p1,"$1;"),z="function("+(pe||"obj")+`) { `+(pe?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(T?", __e = _.escape":"")+(P?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+z+`return __p }`;var be=$p(function(){return Pe(y,ae+"return "+z).apply(n,A)});if(be.source=z,wo(be))throw be;return be}function XA(i){return xe(i).toLowerCase()}function JA(i){return xe(i).toUpperCase()}function QA(i,u,f){if(i=xe(i),i&&(f||u===n))return Cc(i);if(!i||!(u=St(u)))return i;var p=Xt(i),d=Xt(u),y=Ec(p,d),A=Ic(p,d)+1;return Yn(p,y,A).join("")}function e2(i,u,f){if(i=xe(i),i&&(f||u===n))return i.slice(0,Mc(i)+1);if(!i||!(u=St(u)))return i;var p=Xt(i),d=Ic(p,Xt(u))+1;return Yn(p,0,d).join("")}function t2(i,u,f){if(i=xe(i),i&&(f||u===n))return i.replace(bu,"");if(!i||!(u=St(u)))return i;var p=Xt(i),d=Ec(p,Xt(u));return Yn(p,d).join("")}function n2(i,u){var f=$e,p=ce;if(Ve(u)){var d="separator"in u?u.separator:d;f="length"in u?ye(u.length):f,p="omission"in u?St(u.omission):p}i=xe(i);var y=i.length;if(Fr(i)){var A=Xt(i);y=A.length}if(f>=y)return i;var T=f-Nr(p);if(T<1)return p;var P=A?Yn(A,0,T).join(""):i.slice(0,T);if(d===n)return P+p;if(A&&(T+=P.length-T),Ao(d)){if(i.slice(T).search(d)){var q,U=P;for(d.global||(d=ju(d.source,xe(Vf.exec(d))+"g")),d.lastIndex=0;q=d.exec(U);)var z=q.index;P=P.slice(0,z===n?T:z)}}else if(i.indexOf(St(d),T)!=T){var J=P.lastIndexOf(d);J>-1&&(P=P.slice(0,J))}return P+p}function r2(i){return i=xe(i),i&&g1.test(i)?i.replace(Wf,xm):i}var i2=zr(function(i,u,f){return i+(f?" ":"")+u.toUpperCase()}),So=mh("toUpperCase");function dp(i,u,f){return i=xe(i),u=f?n:u,u===n?Cm(i)?Dm(i):$m(i):i.match(u)||[]}var $p=we(function(i,u){try{return Ot(i,n,u)}catch(f){return wo(f)?f:new ve(f)}}),a2=Cn(function(i,u){return Bt(u,function(f){f=an(f),Tn(i,f,yo(i[f],i))}),i});function s2(i){var u=i==null?0:i.length,f=he();return i=u?We(i,function(p){if(typeof p[1]!="function")throw new qt(o);return[f(p[0]),p[1]]}):[],we(function(p){for(var d=-1;++dYt)return[];var f=tn,p=ht(i,tn);u=he(u),i-=tn;for(var d=Du(p,u);++f0||u<0)?new Oe(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),u!==n&&(u=ye(u),f=u<0?f.dropRight(-u):f.take(u-i)),f)},Oe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Oe.prototype.toArray=function(){return this.take(tn)},nn(Oe.prototype,function(i,u){var f=/^(?:filter|find|map|reject)|While$/.test(u),p=/^(?:head|last)$/.test(u),d=m[p?"take"+(u=="last"?"Right":""):u],y=p||/^find/.test(u);!d||(m.prototype[u]=function(){var A=this.__wrapped__,T=p?[1]:arguments,P=A instanceof Oe,q=T[0],U=P||de(A),z=function(Ae){var Te=d.apply(m,Kn([Ae],T));return p&&J?Te[0]:Te};U&&f&&typeof q=="function"&&q.length!=1&&(P=U=!1);var J=this.__chain__,ae=!!this.__actions__.length,pe=y&&!J,be=P&&!ae;if(!y&&U){A=be?A:new Oe(this);var ge=i.apply(A,T);return ge.__actions__.push({func:os,args:[z],thisArg:n}),new Ut(ge,J)}return pe&&be?i.apply(this,T):(ge=this.thru(z),pe?p?ge.value()[0]:ge.value():ge)})}),Bt(["pop","push","shift","sort","splice","unshift"],function(i){var u=La[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",p=/^(?:pop|shift)$/.test(i);m.prototype[i]=function(){var d=arguments;if(p&&!this.__chain__){var y=this.value();return u.apply(de(y)?y:[],d)}return this[f](function(A){return u.apply(de(A)?A:[],d)})}}),nn(Oe.prototype,function(i,u){var f=m[u];if(f){var p=f.name+"";De.call(Ur,p)||(Ur[p]=[]),Ur[p].push({name:u,func:f})}}),Ur[ts(n,S).name]=[{name:"wrapper",func:n}],Oe.prototype.clone=ry,Oe.prototype.reverse=iy,Oe.prototype.value=ay,m.prototype.at=Lb,m.prototype.chain=Db,m.prototype.commit=Fb,m.prototype.next=Nb,m.prototype.plant=Bb,m.prototype.reverse=qb,m.prototype.toJSON=m.prototype.valueOf=m.prototype.value=Ub,m.prototype.first=m.prototype.head,Mi&&(m.prototype[Mi]=jb),m},jr=Fm();ur?((ur.exports=jr)._=jr,Cu._=jr):lt._=jr}).call(xt)})(Ol,Ol.exports);var aX=Ol.exports;const au=new ot({subduxes:{reqs:ar},initial:{bays:0,squadrons:[]},actions:{setCarrierBays:null,setSquadronType:null}});au.setMutation("setCarrierBays",t=>Ce({bays:t,reqs:oX(t),squadrons:uX(t)}));au.setMutation("setSquadronType",({type:t,id:e})=>n=>Ce.updateIn(["squadrons",e-1],{type:t,reqs:sX(t)},n));const Ms=[{type:"standard",cost:3},{type:"fast",cost:4},{type:"heavy",cost:5},{type:"interceptor",cost:3},{type:"attack",cost:4},{type:"long range",cost:4},{type:"torpedo",cost:6}];function sX(t){var e;return{mass:6,cost:6*((e=Ms.find(n=>n.type===t))==null?void 0:e.cost)}}const uX=t=>e=>(e.length>t&&(e=e.slice(0,t)),e.length({type:Ms[0].type,reqs:{cost:6*Ms[0].cost,mass:6}}))]),e);function oX(t){return{mass:9*t,cost:18*t}}const su=new ot({actions:{setShipType:null,setShipClass:null,setCarrierBays:au.actions.setCarrierBays},initial:{shipType:"",shipClass:"",isCarrier:!1,mass:10}});su.setMutation("setShipType",t=>Ce({shipType:t}));su.setMutation("setShipClass",t=>Ce({shipClass:t}));su.setMutation("setCarrierBays",t=>Ce({isCarrier:t>0}));const qf=new ot({subduxes:{reqs:ar},initial:{rating:0,min:0,max:0},actions:{setShipMass:null,setHull:null}});qf.setMutation("setHull",t=>Ce({rating:t,reqs:{mass:t,cost:2*t}}));qf.setMutation("setShipMass",t=>e=>{let{rating:n}=e;n>t&&(n=t);const r=Math.ceil(t/10);return nCe(t));Uf.setMutation("setScreensReqs",t=>Ce({reqs:t}));const lX=t=>Nf(e=>e.reqs.mass,e=>e.structure.screens.standard,e=>e.structure.screens.advanced,(...e)=>t.dispatch.setScreensReqs(fX(...e)));function fX(t,e,n){const r=e*Math.max(3,Math.ceil(.05*t)),a=n*Math.max(4,Math.ceil(.075*t));return{mass:r+a,cost:3*r+4*a}}const J$=new ot({subduxes:{reqs:ar},initial:{space:0},actions:{setCargo:null}});J$.setMutation("setCargo",t=>Ce({space:t,reqs:{mass:t}}));const Kf=new ot({subduxes:{reqs:ar},initial:{layers:[]},actions:{setArmorLayers:null,setArmorRating:null}});Kf.setMutation("setArmorRating",({layer:t,rating:e})=>n=>{let r=[...n.layers].map((a,s)=>s===t-1?e:a);return{layers:r,reqs:Q$(r)}});Kf.setMutation("setArmorLayers",t=>e=>{let n=[...e.layers];for(tr+a,0),n=2*t.map((r,a)=>r*(a+1)).reduce((r,a)=>r+a,0);return{mass:e,cost:n}}const e1=new ot({subduxes:{reqs:ar},initial:{type:"none"},actions:{setStreamlining:null}});e1.setMutation("setStreamlining",({shipMass:t,type:e})=>Ce({type:e,reqs:cX({shipMass:t,type:e})}));function cX({shipMass:t,type:e}){const n=Math.ceil(t*(e==="none"?0:e==="partial"?5:10)/100);return{mass:n,cost:2*n}}const hX=new ot({subduxes:{hull:qf,screens:Uf,cargo:J$,streamlining:e1,armor:Kf}}),ca=[{name:"beam",type:"beam",reqs:pX,initial:{weaponClass:1}},{name:"submunition pack",type:"submunition",reqs:{mass:1,cost:3},initial:{arc:"F"}},{name:"point defence system",type:"pds",reqs:{mass:1,cost:3},initial:{}},{name:"scattergun",type:"scattergun",reqs:{mass:1,cost:4},initial:{}},{name:"needle weapon",type:"needle",reqs:{mass:2,cost:6},initial:{arc:"F"}}],uu=new ot({initial:[],actions:{addWeapon:null,removeWeapon:null,setWeapon:null}});uu.setMutation("setWeapon",n=>{var r=n,{id:t}=r,e=Tp(r,["id"]);return a=>(console.log(t,e,a),a=Ce.map(Ce.if(s=>s.id===t,s=>Op(Hi({id:t},e),{reqs:t1(e)})),a),console.log(a),a)});uu.setMutation("removeWeapon",t=>e=>[...e.filter(n=>n.id!==t)]);uu.setMutation("addWeapon",t=>e=>{const n=ca.find(r=>r.type===t).initial;return[...e,Hi({id:e.length===0?1:e[e.length-1]+1,type:t,reqs:t1(Hi({type:t},n))},n)]});function t1(t){const{reqs:e}=ca.find(n=>n.type===t.type)||{};return e?typeof e=="function"?e(t):e:{}}const X_=t=>t.length!==4?!1:!t.some(e=>e.length===1);function pX({weaponClass:t,arcs:e}){console.log({weaponClass:t,arcs:e});let n;return t===1&&(n=1),t===2&&(n=2+(e.length>3?1:0)),t==3&&(n=4,X_(e)?n+=2:n+=e.length-1),t==4&&(n=8,X_(e)?n+=4:n+=2*(e.length-1)),{mass:n,cost:3*n}}const J_={cost:0,mass:0},Gf=new ot({subduxes:{weapons:uu},initial:{firecons:{stations:0,reqs:J_},adfc:{rating:0,reqs:J_}},actions:{setADFC:null,setFirecons:null}});Gf.setMutation("setFirecons",t=>Ce({firecons:{stations:t,reqs:{cost:4*t,mass:t}}}));Gf.setMutation("setADFC",t=>Ce({adfc:{rating:t,reqs:{cost:8*t,mass:2*t}}}));const Mr=new ot({subduxes:{identification:su,propulsion:iX,structure:hX,carrier:au,weaponry:Gf},initial:{reqs:{cost:0,mass:10,usedMass:0}},actions:{setShipReqs:null}});Mr.setMutation("setShipMass",t=>Ce({reqs:{mass:t}}));Mr.setMutation("setShipReqs",t=>Ce({reqs:t}));Mr.addReaction(eX);Mr.addReaction(rX);Mr.addReaction(lX);Mr.addReaction(t=>e=>{let n=0,r=0,a=Object.values(e);for(;a.length>0;){const s=a.shift();typeof s=="object"&&(s.reqs&&(n+=s.reqs.cost,r+=s.reqs.mass),a.push(...Object.values(s)))}t.dispatch.setShipReqs({cost:n,usedMass:r})});let gX=Hv;var _X=()=>{const t=Mr.createStore(void 0,r=>gX(rO(r)));let e;const n=J2(t.getState(),r=>{t.subscribe(()=>{e!==t.getState()&&(e=t.getState(),r(e))})});return{dispatch:t.dispatch,state:n,shipMass:Q2(n,r=>r.reqs.mass)}};function ou(){const t=k2();return e=>{const n=Object.keys(t.$$.callbacks),r=[];return n.forEach(a=>r.push(Me(e,a,s=>Sl(t,s)))),{destroy:()=>{r.forEach(a=>a())}}}}const vX=t=>({}),Q_=t=>({}),dX=t=>({}),ev=t=>({});function tv(t){let e,n;const r=t[4].header,a=vn(r,t,t[3],ev);return{c(){e=L("header"),a&&a.c()},l(s){e=D(s,"HEADER",{});var o=B(e);a&&a.l(o),o.forEach(w)},m(s,o){R(s,e,o),a&&a.m(e,null),n=!0},p(s,o){a&&a.p&&(!n||o&8)&&pn(a,r,s,s[3],n?_n(r,s[3],o,dX):gn(s[3]),ev)},i(s){n||(K(a,s),n=!0)},o(s){G(a,s),n=!1},d(s){s&&w(e),a&&a.d(s)}}}function nv(t){let e,n;const r=t[4].footer,a=vn(r,t,t[3],Q_);return{c(){e=L("footer"),a&&a.c()},l(s){e=D(s,"FOOTER",{});var o=B(e);a&&a.l(o),o.forEach(w)},m(s,o){R(s,e,o),a&&a.m(e,null),n=!0},p(s,o){a&&a.p&&(!n||o&8)&&pn(a,r,s,s[3],n?_n(r,s[3],o,vX):gn(s[3]),Q_)},i(s){n||(K(a,s),n=!0)},o(s){G(a,s),n=!1},d(s){s&&w(e),a&&a.d(s)}}}function $X(t){let e,n,r,a,s,o,l=t[2].header&&tv(t);const c=t[4].default,h=vn(c,t,t[3],null);let g=t[2].footer&&nv(t),_=[t[1]],v={};for(let $=0;$<_.length;$+=1)v=me(v,_[$]);return{c(){e=L("div"),l&&l.c(),n=Q(),h&&h.c(),r=Q(),g&&g.c(),this.h()},l($){e=D($,"DIV",{});var b=B(e);l&&l.l(b),n=ee(b),h&&h.l(b),r=ee(b),g&&g.l(b),b.forEach(w),this.h()},h(){Xn(e,v),ke(e,"card",1)},m($,b){R($,e,b),l&&l.m(e,null),M(e,n),h&&h.m(e,null),M(e,r),g&&g.m(e,null),a=!0,s||(o=xs(t[0].call(null,e)),s=!0)},p($,[b]){$[2].header?l?(l.p($,b),b&4&&K(l,1)):(l=tv($),l.c(),K(l,1),l.m(e,n)):l&&(Dn(),G(l,1,1,()=>{l=null}),Fn()),h&&h.p&&(!a||b&8)&&pn(h,c,$,$[3],a?_n(c,$[3],b,null):gn($[3]),null),$[2].footer?g?(g.p($,b),b&4&&K(g,1)):(g=nv($),g.c(),K(g,1),g.m(e,null)):g&&(Dn(),G(g,1,1,()=>{g=null}),Fn()),Xn(e,v=Ee(_,[b&2&&$[1]])),ke(e,"card",1)},i($){a||(K(l),K(h,$),K(g),a=!0)},o($){G(l),G(h,$),G(g),a=!1},d($){$&&w(e),l&&l.d(),h&&h.d($),g&&g.d(),s=!1,o()}}}function mX(t,e,n){const r=[];let a=Jn(e,r),{$$slots:s={},$$scope:o}=e;const l=Y2(s),c=ou();return t.$$set=h=>{e=me(me({},e),Rs(h)),n(1,a=Jn(e,r)),"$$scope"in h&&n(3,o=h.$$scope)},[c,a,l,o,s]}class yX extends oe{constructor(e){super();le(this,e,mX,$X,fe,{})}}function bX(t){let e,n,r,a;const s=t[7].default,o=vn(s,t,t[6],null);let l=[t[3]],c={};for(let h=0;hn(5,s=$));let v=0;return ko("tabs:getid",()=>v++),ko("tabs:active",_),t.$$set=$=>{e=me(me({},e),Rs($)),n(3,a=Jn(e,r)),"active"in $&&n(4,c=$.active),"full"in $&&n(0,h=$.full),"$$scope"in $&&n(6,l=$.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(4,c=s)},[h,g,_,a,c,s,l,o]}class AX extends oe{constructor(e){super();le(this,e,wX,bX,fe,{active:4,full:0})}}function OX(t){let e,n,r,a;const s=t[8].default,o=vn(s,t,t[7],null);let l=[t[5]],c={};for(let h=0;hn(6,o=b));const v=tt("tabs:getid")(),$=()=>_.set(h===!1?v:h);return t.$$set=b=>{e=me(me({},e),Rs(b)),n(5,s=Jn(e,a)),"tabid"in b&&n(0,h=b.tabid),"$$scope"in b&&n(7,c=b.$$scope)},t.$$.update=()=>{t.$$.dirty&65&&n(1,r=o===h||o===v)},[h,r,g,_,v,s,o,c,l,$]}class Wo extends oe{constructor(e){super();le(this,e,TX,OX,fe,{tabid:0})}}function rv(t,{delay:e=0,duration:n=400,easing:r=V2}={}){const a=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*a}`}}function iv(t){let e,n,r,a,s,o,l,c,h;const g=t[4].default,_=vn(g,t,t[3],null);let v=[t[2]],$={};for(let b=0;b{o||(o=Sp(e,rv,{duration:200},!0)),o.run(1)}),l=!0)},o(b){G(_,b),o||(o=Sp(e,rv,{duration:200},!1)),o.run(0),l=!1},d(b){b&&w(e),_&&_.d(b),b&&o&&o.end(),c=!1,pa(h)}}}function SX(t){let e,n,r=t[0]&&iv(t);return{c(){r&&r.c(),e=gt()},l(a){r&&r.l(a),e=gt()},m(a,s){r&&r.m(a,s),R(a,e,s),n=!0},p(a,[s]){a[0]?r?(r.p(a,s),s&1&&K(r,1)):(r=iv(a),r.c(),K(r,1),r.m(e.parentNode,e)):r&&(Dn(),G(r,1,1,()=>{r=null}),Fn())},i(a){n||(K(r),n=!0)},o(a){G(r),n=!1},d(a){r&&r.d(a),a&&w(e)}}}function CX(t,e,n){const r=["open"];let a=Jn(e,r),{$$slots:s={},$$scope:o}=e,{open:l=!1}=e;const c=ou(),h=g=>n(0,l=!1);return t.$$set=g=>{e=me(me({},e),Rs(g)),n(2,a=Jn(e,r)),"open"in g&&n(0,l=g.open),"$$scope"in g&&n(3,o=g.$$scope)},[l,c,a,o,s,h]}class EX extends oe{constructor(e){super();le(this,e,CX,SX,fe,{open:0})}}function IX(t){let e,n,r,a,s;return{c(){e=L("a"),n=Rn("svg"),r=Rn("path"),a=Rn("path"),s=Rn("path"),this.h()},l(o){e=D(o,"A",{href:!0,class:!0,"aria-label":!0});var l=B(e);n=Ln(l,"svg",{width:!0,height:!0,viewBox:!0,style:!0,"aria-hidden":!0});var c=B(n);r=Ln(c,"path",{d:!0}),B(r).forEach(w),a=Ln(c,"path",{d:!0,fill:!0,style:!0,class:!0}),B(a).forEach(w),s=Ln(c,"path",{d:!0,fill:!0,class:!0}),B(s).forEach(w),c.forEach(w),l.forEach(w),this.h()},h(){E(r,"d","M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"),E(a,"d","M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"),E(a,"fill","currentColor"),xn(a,"transform-origin","130px 106px"),E(a,"class","octo-arm"),E(s,"d","M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"),E(s,"fill","currentColor"),E(s,"class","octo-body"),E(n,"width","80"),E(n,"height","80"),E(n,"viewBox","0 0 250 250"),xn(n,"fill","#151513"),xn(n,"color","#fff"),xn(n,"position","absolute"),xn(n,"top","0"),xn(n,"border","0"),xn(n,"right","0"),E(n,"aria-hidden","true"),E(e,"href",PX),E(e,"class","github-corner"),E(e,"aria-label","View source on GitHub")},m(o,l){R(o,e,l),M(e,n),M(n,r),M(n,a),M(n,s)},p:Ie,i:Ie,o:Ie,d(o){o&&w(e)}}}const PX="https://github.com/aotds/aotds-docks";class MX extends oe{constructor(e){super();le(this,e,null,IX,fe,{})}}function xX(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b,O,C,S,F,H,te,j,ue;return{c(){e=L("p"),n=re(`This app is a ship builder for the game `),r=L("a"),a=re("Full Thrust"),s=re(` .`),o=Q(),l=L("p"),c=re(`The contruction rules are following the `),h=L("a"),g=re("Cross Dimensions rules"),_=re(` as closely as possible.`),v=Q(),$=L("p"),b=re(`The app is mostly developed for Firefox. I also check as much as I can that I don't mess things too badly on Chrome. For the other browsers... caveat emptor.`),O=Q(),C=L("p"),S=re(`Written by `),F=L("a"),H=re("Yanick Champoux"),te=re(` . Code available on `),j=L("a"),ue=re("Github"),this.h()},l(W){e=D(W,"P",{class:!0});var se=B(e);n=ie(se,`This app is a ship builder for the game `),r=D(se,"A",{href:!0});var X=B(r);a=ie(X,"Full Thrust"),X.forEach(w),s=ie(se,` .`),se.forEach(w),o=ee(W),l=D(W,"P",{class:!0});var $e=B(l);c=ie($e,`The contruction rules are following the `),h=D($e,"A",{href:!0});var ce=B(h);g=ie(ce,"Cross Dimensions rules"),ce.forEach(w),_=ie($e,` as closely as possible.`),$e.forEach(w),v=ee(W),$=D(W,"P",{class:!0});var Le=B($);b=ie(Le,`The app is mostly developed for Firefox. I also check as much as I can that I don't mess things too badly on Chrome. For the other browsers... caveat emptor.`),Le.forEach(w),O=ee(W),C=D(W,"P",{class:!0});var Je=B(C);S=ie(Je,`Written by `),F=D(Je,"A",{href:!0});var rt=B(F);H=ie(rt,"Yanick Champoux"),rt.forEach(w),te=ie(Je,` . Code available on `),j=D(Je,"A",{href:!0});var Nt=B(j);ue=ie(Nt,"Github"),Nt.forEach(w),Je.forEach(w),this.h()},h(){E(r,"href","https://shop.groundzerogames.co.uk/rules.html"),E(e,"class","svelte-1mk8yef"),E(h,"href","http://members.ozemail.com.au/~laranzu/fullthrust/rules/"),E(l,"class","svelte-1mk8yef"),E($,"class","svelte-1mk8yef"),E(F,"href","https://twitter.com/yenzie"),E(j,"href","https://github.com/aotds/aotds-shipyard"),E(C,"class","svelte-1mk8yef")},m(W,se){R(W,e,se),M(e,n),M(e,r),M(r,a),M(e,s),R(W,o,se),R(W,l,se),M(l,c),M(l,h),M(h,g),M(l,_),R(W,v,se),R(W,$,se),M($,b),R(W,O,se),R(W,C,se),M(C,S),M(C,F),M(F,H),M(C,te),M(C,j),M(j,ue)},d(W){W&&w(e),W&&w(o),W&&w(l),W&&w(v),W&&w($),W&&w(O),W&&w(C)}}}function RX(t){let e,n;return{c(){e=L("h2"),n=re("Welcome to the docks"),this.h()},l(r){e=D(r,"H2",{slot:!0,class:!0});var a=B(e);n=ie(a,"Welcome to the docks"),a.forEach(w),this.h()},h(){E(e,"slot","header"),E(e,"class","svelte-1mk8yef")},m(r,a){R(r,e,a),M(e,n)},d(r){r&&w(e)}}}function LX(t){let e;return{c(){e=L("div"),this.h()},l(n){e=D(n,"DIV",{slot:!0}),B(e).forEach(w),this.h()},h(){E(e,"slot","footer")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function DX(t){let e,n;return e=new yX({props:{$$slots:{footer:[LX],header:[RX],default:[xX]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,[a]){const s={};a&1&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}class FX extends oe{constructor(e){super();le(this,e,null,DX,fe,{})}}function NX(t){let e;return{c(){e=re("editor")},l(n){e=ie(n,"editor")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function jX(t){let e;return{c(){e=re("json view")},l(n){e=ie(n,"json view")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function BX(t){let e;return{c(){e=re("print view")},l(n){e=ie(n,"print view")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function qX(t){let e,n,r,a,s,o;return e=new Wo({props:{tabid:"editor",$$slots:{default:[NX]},$$scope:{ctx:t}}}),r=new Wo({props:{tabid:"json",$$slots:{default:[jX]},$$scope:{ctx:t}}}),s=new Wo({props:{tabid:"print",$$slots:{default:[BX]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment),n=Q(),k(r.$$.fragment),a=Q(),k(s.$$.fragment)},l(l){Z(e.$$.fragment,l),n=ee(l),Z(r.$$.fragment,l),a=ee(l),Z(s.$$.fragment,l)},m(l,c){Y(e,l,c),R(l,n,c),Y(r,l,c),R(l,a,c),Y(s,l,c),o=!0},p(l,c){const h={};c&64&&(h.$$scope={dirty:c,ctx:l}),e.$set(h);const g={};c&64&&(g.$$scope={dirty:c,ctx:l}),r.$set(g);const _={};c&64&&(_.$$scope={dirty:c,ctx:l}),s.$set(_)},i(l){o||(K(e.$$.fragment,l),K(r.$$.fragment,l),K(s.$$.fragment,l),o=!0)},o(l){G(e.$$.fragment,l),G(r.$$.fragment,l),G(s.$$.fragment,l),o=!1},d(l){V(e,l),l&&w(n),V(r,l),l&&w(a),V(s,l)}}}function UX(t){let e,n;return e=new FX({}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function KX(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b,O,C,S,F,H,te,j,ue;function W(ce){t[3](ce)}let se={$$slots:{default:[qX]},$$scope:{ctx:t}};t[0]!==void 0&&(se.active=t[0]),O=new AX({props:se}),Qr.push(()=>Yo(O,"active",W));function X(ce){t[4](ce)}let $e={$$slots:{default:[UX]},$$scope:{ctx:t}};return t[1]!==void 0&&($e.open=t[1]),F=new EX({props:$e}),Qr.push(()=>Yo(F,"open",X)),{c(){e=L("header"),n=L("h1"),r=re("The Docks"),a=Q(),s=L("h2"),o=re("a "),l=L("a"),c=re("Full Thrust"),h=re(" ship builder"),g=Q(),_=L("a"),v=re("about the app"),$=Q(),b=L("div"),k(O.$$.fragment),S=Q(),k(F.$$.fragment),this.h()},l(ce){e=D(ce,"HEADER",{class:!0});var Le=B(e);n=D(Le,"H1",{class:!0});var Je=B(n);r=ie(Je,"The Docks"),Je.forEach(w),a=ee(Le),s=D(Le,"H2",{class:!0});var rt=B(s);o=ie(rt,"a "),l=D(rt,"A",{href:!0});var Nt=B(l);c=ie(Nt,"Full Thrust"),Nt.forEach(w),h=ie(rt," ship builder"),rt.forEach(w),g=ee(Le),_=D(Le,"A",{class:!0});var bn=B(_);v=ie(bn,"about the app"),bn.forEach(w),Le.forEach(w),$=ee(ce),b=D(ce,"DIV",{class:!0});var At=B(b);Z(O.$$.fragment,At),At.forEach(w),S=ee(ce),Z(F.$$.fragment,ce),this.h()},h(){E(n,"class","svelte-uwt8cz"),E(l,"href","https://shop.groundzerogames.co.uk/rules.html"),E(s,"class","svelte-uwt8cz"),E(_,"class","svelte-uwt8cz"),E(e,"class","svelte-uwt8cz"),E(b,"class","svelte-uwt8cz")},m(ce,Le){R(ce,e,Le),M(e,n),M(n,r),M(e,a),M(e,s),M(s,o),M(s,l),M(l,c),M(s,h),M(e,g),M(e,_),M(_,v),R(ce,$,Le),R(ce,b,Le),Y(O,b,null),R(ce,S,Le),Y(F,ce,Le),te=!0,j||(ue=Me(_,"click",zv(t[2])),j=!0)},p(ce,[Le]){const Je={};Le&64&&(Je.$$scope={dirty:Le,ctx:ce}),!C&&Le&1&&(C=!0,Je.active=ce[0],Vo(()=>C=!1)),O.$set(Je);const rt={};Le&64&&(rt.$$scope={dirty:Le,ctx:ce}),!H&&Le&2&&(H=!0,rt.open=ce[1],Vo(()=>H=!1)),F.$set(rt)},i(ce){te||(K(O.$$.fragment,ce),K(F.$$.fragment,ce),te=!0)},o(ce){G(O.$$.fragment,ce),G(F.$$.fragment,ce),te=!1},d(ce){ce&&w(e),ce&&w($),ce&&w(b),V(O),ce&&w(S),V(F,ce),j=!1,ue()}}}function GX(t,e,n){let r=!1,a="editor";const s=ti(),o=()=>n(1,r=!0);function l(h){a=h,n(0,a)}function c(h){r=h,n(1,r)}return t.$$.update=()=>{t.$$.dirty&1&&s("changeTab",a)},[a,r,o,l,c]}class zX extends oe{constructor(e){super();le(this,e,GX,KX,fe,{})}}function av(t){let e,n;return{c(){e=L("label"),n=re(t[1]),this.h()},l(r){e=D(r,"LABEL",{class:!0});var a=B(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","svelte-i3mp3j")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function HX(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{type:!0,placeholder:!0}),this.h()},h(){E(e,"type","text"),E(e,"placeholder",t[2])},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=[Me(e,"input",t[6]),Me(e,"change",t[5])],n=!0)},p(a,s){s&4&&E(e,"placeholder",a[2]),s&1&&e.value!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,pa(r)}}}function WX(t){let e,n,r,a=t[1]&&av(t);const s=t[4].default,o=vn(s,t,t[3],null),l=o||HX(t);return{c(){e=L("div"),a&&a.c(),n=Q(),l&&l.c(),this.h()},l(c){e=D(c,"DIV",{class:!0});var h=B(e);a&&a.l(h),n=ee(h),l&&l.l(h),h.forEach(w),this.h()},h(){E(e,"class","svelte-i3mp3j")},m(c,h){R(c,e,h),a&&a.m(e,null),M(e,n),l&&l.m(e,null),r=!0},p(c,[h]){c[1]?a?a.p(c,h):(a=av(c),a.c(),a.m(e,n)):a&&(a.d(1),a=null),o?o.p&&(!r||h&8)&&pn(o,s,c,c[3],r?_n(s,c[3],h,null):gn(c[3]),null):l&&l.p&&(!r||h&5)&&l.p(c,r?h:-1)},i(c){r||(K(l,c),r=!0)},o(c){G(l,c),r=!1},d(c){c&&w(e),a&&a.d(),l&&l.d(c)}}}function kX(t,e,n){let{$$slots:r={},$$scope:a}=e,{label:s=""}=e,{value:o=""}=e,{placeholder:l}=e;function c(g){Sl.call(this,t,g)}function h(){o=this.value,n(0,o)}return t.$$set=g=>{"label"in g&&n(1,s=g.label),"value"in g&&n(0,o=g.value),"placeholder"in g&&n(2,l=g.placeholder),"$$scope"in g&&n(3,a=g.$$scope)},[o,s,l,a,r,c,h]}class nt extends oe{constructor(e){super();le(this,e,kX,WX,fe,{label:1,value:0,placeholder:2})}}const YX=[{name:"Scout",mass:[0,10],abbrev:"SC"},{name:"Courier",mass:[4,10],abbrev:"SC"},{name:"Corvette",mass:[8,16],abbrev:"CT"},{name:"Frigate",mass:[14,28],abbrev:"FF"},{name:"Destroyer",mass:[24,36],abbrev:"DD"},{name:"Heavy Destroyer",mass:[30,40],abbrev:"DH"},{name:"Light Cruiser",mass:[40,60],abbrev:"CL"},{name:"Patrol",mass:[50,70],abbrev:"CE"},{name:"Escort Cruiser",mass:[50,70],abbrev:"CE"},{name:"Heavy Cruiser",mass:[60,90],abbrev:"CA"},{name:"Battlecruiser",mass:[80,110],abbrev:"BC"},{name:"Battleship",mass:[100,140],abbrev:"BB"},{name:"Heavy Battleship",mass:[120,160],abbrev:"BDN"},{name:"Dreadnought",mass:[140,180],abbrev:"DN"},{name:"Superdreadnought",mass:[160,300],abbrev:"SDN"},{name:"Escort Carrier",mass:[0,140],abbrev:"CVE",carrier:!0},{name:"Light Carrier",mass:[120,180],abbrev:"CVL",carrier:!0},{name:"Heavy Carrier",mass:[160,300],abbrev:"CVH",carrier:!0},{name:"Attack Carrier",mass:[150,300],abbrev:"CVA",carrier:!0}];function VX(t=0,e=!1){return YX.filter(n=>e==!!n.carrier).filter(n=>n.mass[0]<=t).filter(n=>n.mass[1]>=t)}function sv(t,e,n){const r=t.slice();return r[8]=e[n],r}function uv(t,e){let n,r=e[8]+"",a,s;return{key:t,first:null,c(){n=L("option"),a=re(r),this.h()},l(o){n=D(o,"OPTION",{});var l=B(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[8],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o,l&4&&r!==(r=e[8]+"")&&_t(a,r),l&4&&s!==(s=e[8])&&(n.__value=s,n.value=n.__value)},d(o){o&&w(n)}}}function ZX(t){let e,n=[],r=new Map,a,s,o=t[2];const l=c=>c[8];for(let c=0;ct[6].call(e))},m(c,h){R(c,e,h);for(let g=0;gYo(n,"value",l)),s=new nt({props:{label:"ship type",$$slots:{default:[ZX]},$$scope:{ctx:t}}}),{c(){e=L("div"),k(n.$$.fragment),a=Q(),k(s.$$.fragment),this.h()},l(h){e=D(h,"DIV",{class:!0});var g=B(e);Z(n.$$.fragment,g),a=ee(g),Z(s.$$.fragment,g),g.forEach(w),this.h()},h(){E(e,"class","svelte-fc2507")},m(h,g){R(h,e,g),Y(n,e,null),M(e,a),Y(s,e,null),o=!0},p(h,[g]){const _={};!r&&g&1&&(r=!0,_.value=h[0],Vo(()=>r=!1)),n.$set(_);const v={};g&2054&&(v.$$scope={dirty:g,ctx:h}),s.$set(v)},i(h){o||(K(n.$$.fragment,h),K(s.$$.fragment,h),o=!0)},o(h){G(n.$$.fragment,h),G(s.$$.fragment,h),o=!1},d(h){h&&w(e),V(n),V(s)}}}function JX(t,e,n){let r,{shipClass:a=""}=e,{shipType:s=""}=e,{mass:o=10}=e,{isCarrier:l=!1}=e;const c=tt("ship");function h(_){a=_,n(0,a)}function g(){s=ta(this),n(1,s),n(2,r),n(3,o),n(4,l),n(2,r),n(3,o),n(4,l)}return t.$$set=_=>{"shipClass"in _&&n(0,a=_.shipClass),"shipType"in _&&n(1,s=_.shipType),"mass"in _&&n(3,o=_.mass),"isCarrier"in _&&n(4,l=_.isCarrier)},t.$$.update=()=>{t.$$.dirty&24&&n(2,r=VX(o,l).map(({name:_})=>_)),t.$$.dirty&6&&r.length>0&&!r.includes(s)&&n(1,s=r[0]),t.$$.dirty&2&&c.dispatch.setShipType(s),t.$$.dirty&1&&c.dispatch.setShipClass(a)},[a,s,r,o,l,h,g]}class QX extends oe{constructor(e){super();le(this,e,JX,XX,fe,{shipClass:0,shipType:1,mass:3,isCarrier:4})}}function eJ(t){let e,n=-t[2]+"",r;return{c(){e=re("excessive mass: "),r=re(n)},l(a){e=ie(a,"excessive mass: "),r=ie(a,n)},m(a,s){R(a,e,s),R(a,r,s)},p(a,s){s&4&&n!==(n=-a[2]+"")&&_t(r,n)},d(a){a&&w(e),a&&w(r)}}}function tJ(t){let e,n;return{c(){e=re("mass unused: "),n=re(t[2])},l(r){e=ie(r,"mass unused: "),n=ie(r,t[2])},m(r,a){R(r,e,a),R(r,n,a)},p(r,a){a&4&&_t(n,r[2])},d(r){r&&w(e),r&&w(n)}}}function nJ(t){let e,n,r,a,s,o,l,c;function h(v,$){return v[3]?tJ:eJ}let g=h(t),_=g(t);return{c(){e=L("input"),n=Q(),r=L("img"),s=Q(),o=L("div"),_.c(),this.h()},l(v){e=D(v,"INPUT",{class:!0,type:!0,min:!0,max:!0}),n=ee(v),r=D(v,"IMG",{class:!0,src:!0,alt:!0}),s=ee(v),o=D(v,"DIV",{class:!0});var $=B(o);_.l($),$.forEach(w),this.h()},h(){E(e,"class","short svelte-apsdjz"),E(e,"type","number"),E(e,"min","10"),E(e,"max","300"),E(r,"class","mass_symbol svelte-apsdjz"),jn(r.src,a=dn+"/mass.svg")||E(r,"src",a),E(r,"alt","mass"),E(o,"class","note svelte-apsdjz"),ke(o,"warning",!t[3])},m(v,$){R(v,e,$),Ye(e,t[0]),R(v,n,$),R(v,r,$),R(v,s,$),R(v,o,$),_.m(o,null),l||(c=Me(e,"input",t[6]),l=!0)},p(v,$){$&1&&Xe(e.value)!==v[0]&&Ye(e,v[0]),g===(g=h(v))&&_?_.p(v,$):(_.d(1),_=g(v),_&&(_.c(),_.m(o,null))),$&8&&ke(o,"warning",!v[3])},d(v){v&&w(e),v&&w(n),v&&w(r),v&&w(s),v&&w(o),_.d(),l=!1,c()}}}function rJ(t){let e,n;return{c(){e=L("span"),n=re(t[1]),this.h()},l(r){e=D(r,"SPAN",{class:!0});var a=B(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","cost svelte-apsdjz")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function iJ(t){let e,n,r,a,s,o;return n=new nt({props:{label:"ship tonnage",$$slots:{default:[nJ]},$$scope:{ctx:t}}}),s=new nt({props:{label:"cost",$$slots:{default:[rJ]},$$scope:{ctx:t}}}),{c(){e=L("div"),k(n.$$.fragment),r=Q(),a=L("div"),k(s.$$.fragment),this.h()},l(l){e=D(l,"DIV",{class:!0});var c=B(e);Z(n.$$.fragment,c),c.forEach(w),r=ee(l),a=D(l,"DIV",{class:!0});var h=B(a);Z(s.$$.fragment,h),h.forEach(w),this.h()},h(){E(e,"class","mass svelte-apsdjz"),E(a,"class","cost svelte-apsdjz")},m(l,c){R(l,e,c),Y(n,e,null),R(l,r,c),R(l,a,c),Y(s,a,null),o=!0},p(l,[c]){const h={};c&141&&(h.$$scope={dirty:c,ctx:l}),n.$set(h);const g={};c&130&&(g.$$scope={dirty:c,ctx:l}),s.$set(g)},i(l){o||(K(n.$$.fragment,l),K(s.$$.fragment,l),o=!0)},o(l){G(n.$$.fragment,l),G(s.$$.fragment,l),o=!1},d(l){l&&w(e),V(n),l&&w(r),l&&w(a),V(s)}}}function aJ(t,e,n){let r,a,{ship:s=tt("ship")}=e,{mass:o=10}=e,{cost:l=10}=e,{usedMass:c=5}=e;function h(){o=Xe(this.value),n(0,o)}return t.$$set=g=>{"ship"in g&&n(4,s=g.ship),"mass"in g&&n(0,o=g.mass),"cost"in g&&n(1,l=g.cost),"usedMass"in g&&n(5,c=g.usedMass)},t.$$.update=()=>{t.$$.dirty&33&&n(2,r=o-c),t.$$.dirty&4&&n(3,a=r>=0),t.$$.dirty&17&&s.dispatch.setShipMass(o)},[o,l,r,a,s,c,h]}class sJ extends oe{constructor(e){super();le(this,e,aJ,iJ,fe,{ship:4,mass:0,cost:1,usedMass:5})}}function uJ(t){let e,n,r,a,s,o,l;const c=t[2].default,h=vn(c,t,t[1],null);return{c(){e=L("div"),n=L("h2"),r=re(t[0]),a=Q(),s=L("hr"),o=Q(),h&&h.c(),this.h()},l(g){e=D(g,"DIV",{class:!0});var _=B(e);n=D(_,"H2",{class:!0});var v=B(n);r=ie(v,t[0]),v.forEach(w),a=ee(_),s=D(_,"HR",{class:!0}),_.forEach(w),o=ee(g),h&&h.l(g),this.h()},h(){E(n,"class","svelte-1p2uzx8"),E(s,"class","svelte-1p2uzx8"),E(e,"class","svelte-1p2uzx8")},m(g,_){R(g,e,_),M(e,n),M(n,r),M(e,a),M(e,s),R(g,o,_),h&&h.m(g,_),l=!0},p(g,[_]){(!l||_&1)&&_t(r,g[0]),h&&h.p&&(!l||_&2)&&pn(h,c,g,g[1],l?_n(c,g[1],_,null):gn(g[1]),null)},i(g){l||(K(h,g),l=!0)},o(g){G(h,g),l=!1},d(g){g&&w(e),g&&w(o),h&&h.d(g)}}}function oJ(t,e,n){let{$$slots:r={},$$scope:a}=e,{label:s}=e;return t.$$set=o=>{"label"in o&&n(0,s=o.label),"$$scope"in o&&n(1,a=o.$$scope)},[s,a,r]}class lu extends oe{constructor(e){super();le(this,e,oJ,uJ,fe,{label:0})}}function lJ(t){let e,n,r,a,s,o,l,c,h,g,_,v,$;const b=t[5].default,O=vn(b,t,t[4],null);return{c(){e=L("div"),n=L("div"),O&&O.c(),r=Q(),a=L("div"),s=L("div"),o=re(t[0]),l=Q(),c=L("img"),g=Q(),_=L("div"),v=re(t[1]),this.h()},l(C){e=D(C,"DIV",{class:!0});var S=B(e);n=D(S,"DIV",{class:!0});var F=B(n);O&&O.l(F),F.forEach(w),r=ee(S),a=D(S,"DIV",{class:!0});var H=B(a);s=D(H,"DIV",{class:!0});var te=B(s);o=ie(te,t[0]),l=ee(te),c=D(te,"IMG",{src:!0,alt:!0,class:!0}),te.forEach(w),g=ee(H),_=D(H,"DIV",{class:!0});var j=B(_);v=ie(j,t[1]),j.forEach(w),H.forEach(w),S.forEach(w),this.h()},h(){E(n,"class","svelte-145f253"),jn(c.src,h=dn+"/mass.svg")||E(c,"src",h),E(c,"alt","mass"),E(c,"class","svelte-145f253"),E(s,"class","mass svelte-145f253"),E(_,"class","cost svelte-145f253"),E(a,"class","reqs svelte-145f253"),E(e,"class","ship-item svelte-145f253")},m(C,S){R(C,e,S),M(e,n),O&&O.m(n,null),M(e,r),M(e,a),M(a,s),M(s,o),M(s,l),M(s,c),t[6](s),M(a,g),M(a,_),M(_,v),t[7](_),$=!0},p(C,[S]){O&&O.p&&(!$||S&16)&&pn(O,b,C,C[4],$?_n(b,C[4],S,null):gn(C[4]),null),(!$||S&1)&&_t(o,C[0]),(!$||S&2)&&_t(v,C[1])},i(C){$||(K(O,C),$=!0)},o(C){G(O,C),$=!1},d(C){C&&w(e),O&&O.d(C),t[6](null),t[7](null)}}}function fJ(t,e,n){let{$$slots:r={},$$scope:a}=e,{mass:s}=e,{cost:o}=e,l,c;const h=async v=>{!v||(v.classList.remove("updated"),v.offsetWidth,v.classList.add("updated"))};function g(v){Qr[v?"unshift":"push"](()=>{l=v,n(2,l)})}function _(v){Qr[v?"unshift":"push"](()=>{c=v,n(3,c)})}return t.$$set=v=>{"mass"in v&&n(0,s=v.mass),"cost"in v&&n(1,o=v.cost),"$$scope"in v&&n(4,a=v.$$scope)},t.$$.update=()=>{t.$$.dirty&5&&h(l),t.$$.dirty&10&&h(c)},[s,o,l,c,a,r,g,_]}class kt extends oe{constructor(e){super();le(this,e,fJ,lJ,fe,{mass:0,cost:1})}}function cJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0,max:!0,step:!0}),this.h()},h(){E(e,"class","short svelte-1saxaj4"),E(e,"type","number"),E(e,"min","0"),E(e,"max","20"),E(e,"step","1")},m(a,s){R(a,e,s),Ye(e,t[1]),n||(r=Me(e,"input",t[3]),n=!0)},p(a,s){s&2&&Xe(e.value)!==a[1]&&Ye(e,a[1])},d(a){a&&w(e),n=!1,r()}}}function hJ(t){let e,n,r,a,s,o,l,c,h;return n=new nt({props:{label:"thrust rating",$$slots:{default:[cJ]},$$scope:{ctx:t}}}),{c(){e=L("div"),k(n.$$.fragment),r=Q(),a=L("label"),s=L("input"),o=re(" advanced"),this.h()},l(g){e=D(g,"DIV",{class:!0});var _=B(e);Z(n.$$.fragment,_),r=ee(_),a=D(_,"LABEL",{class:!0});var v=B(a);s=D(v,"INPUT",{type:!0}),o=ie(v," advanced"),v.forEach(w),_.forEach(w),this.h()},h(){E(s,"type","checkbox"),E(a,"class","svelte-1saxaj4"),E(e,"class","svelte-1saxaj4")},m(g,_){R(g,e,_),Y(n,e,null),M(e,r),M(e,a),M(a,s),s.checked=t[0],M(a,o),l=!0,c||(h=Me(s,"change",t[4]),c=!0)},p(g,_){const v={};_&66&&(v.$$scope={dirty:_,ctx:g}),n.$set(v),_&1&&(s.checked=g[0])},i(g){l||(K(n.$$.fragment,g),l=!0)},o(g){G(n.$$.fragment,g),l=!1},d(g){g&&w(e),V(n),c=!1,h()}}}function pJ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[hJ]},$$scope:{ctx:t}};for(let s=0;s{"reqs"in h&&n(2,r=h.reqs),"advanced"in h&&n(0,a=h.advanced),"rating"in h&&n(1,s=h.rating)},t.$$.update=()=>{t.$$.dirty&3&&o.dispatch.setDrive({rating:s,advanced:a})},[a,s,r,l,c]}class _J extends oe{constructor(e){super();le(this,e,gJ,pJ,fe,{reqs:2,advanced:0,rating:1})}}function ov(t,e,n){const r=t.slice();return r[6]=e[n],r}function lv(t,e){let n,r,a,s=e[6]+"",o,l,c,h;return{key:t,first:null,c(){n=L("label"),r=L("input"),a=Q(),o=re(s),l=Q(),this.h()},l(g){n=D(g,"LABEL",{class:!0});var _=B(n);r=D(_,"INPUT",{type:!0}),a=ee(_),o=ie(_,s),l=ee(_),_.forEach(w),this.h()},h(){E(r,"type","radio"),r.__value=e[6],r.value=r.__value,e[4][0].push(r),E(n,"class","svelte-9i3z5u"),this.first=n},m(g,_){R(g,n,_),M(n,r),r.checked=r.__value===e[0],M(n,a),M(n,o),M(n,l),c||(h=Me(r,"change",e[3]),c=!0)},p(g,_){e=g,_&1&&(r.checked=r.__value===e[0])},d(g){g&&w(n),e[4][0].splice(e[4][0].indexOf(r),1),c=!1,h()}}}function vJ(t){let e=[],n=new Map,r,a=t[2];const s=o=>o[6];for(let o=0;o{"reqs"in h&&n(1,a=h.reqs),"type"in h&&n(0,s=h.type)},t.$$.update=()=>{t.$$.dirty&1&&o.dispatch.setFtl(s)},[s,a,r,c,l]}class yJ extends oe{constructor(e){super();le(this,e,mJ,$J,fe,{reqs:1,type:0})}}function bJ(t){let e,n,r,a;const s=[t[0].drive];let o={};for(let h=0;h{"propulsion"in a&&n(0,r=a.propulsion)},[r]}class OJ extends oe{constructor(e){super();le(this,e,AJ,wJ,fe,{propulsion:0})}}function TJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0,max:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min",t[2]),E(e,"max",t[3])},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[4]),n=!0)},p(a,s){s&4&&E(e,"min",a[2]),s&8&&E(e,"max",a[3]),s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function SJ(t){let e,n;return e=new nt({props:{label:"hull",$$slots:{default:[TJ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&77&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function CJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[SJ]},$$scope:{ctx:t}};for(let s=0;s{"rating"in h&&n(0,r=h.rating),"reqs"in h&&n(1,a=h.reqs),"min"in h&&n(2,s=h.min),"max"in h&&n(3,o=h.max)},t.$$.update=()=>{t.$$.dirty&1&&l.dispatch.setHull(r)},[r,a,s,o,c]}class IJ extends oe{constructor(e){super();le(this,e,EJ,CJ,fe,{rating:0,reqs:1,min:2,max:3})}}function PJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-1wwwskr"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function MJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-1wwwskr"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[1]),n||(r=Me(e,"input",t[4]),n=!0)},p(a,s){s&2&&Xe(e.value)!==a[1]&&Ye(e,a[1])},d(a){a&&w(e),n=!1,r()}}}function xJ(t){let e,n,r,a,s;return n=new nt({props:{label:"screens",$$slots:{default:[PJ]},$$scope:{ctx:t}}}),a=new nt({props:{label:"advanced screens",$$slots:{default:[MJ]},$$scope:{ctx:t}}}),{c(){e=L("div"),k(n.$$.fragment),r=Q(),k(a.$$.fragment),this.h()},l(o){e=D(o,"DIV",{class:!0});var l=B(e);Z(n.$$.fragment,l),r=ee(l),Z(a.$$.fragment,l),l.forEach(w),this.h()},h(){E(e,"class","svelte-1wwwskr")},m(o,l){R(o,e,l),Y(n,e,null),M(e,r),Y(a,e,null),s=!0},p(o,l){const c={};l&65&&(c.$$scope={dirty:l,ctx:o}),n.$set(c);const h={};l&66&&(h.$$scope={dirty:l,ctx:o}),a.$set(h)},i(o){s||(K(n.$$.fragment,o),K(a.$$.fragment,o),s=!0)},o(o){G(n.$$.fragment,o),G(a.$$.fragment,o),s=!1},d(o){o&&w(e),V(n),V(a)}}}function RJ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[xJ]},$$scope:{ctx:t}};for(let s=0;s{"reqs"in h&&n(2,r=h.reqs),"standard"in h&&n(0,a=h.standard),"advanced"in h&&n(1,s=h.advanced)},t.$$.update=()=>{t.$$.dirty&3&&o.dispatch.setScreens({standard:a,advanced:s})},[a,s,r,l,c]}class DJ extends oe{constructor(e){super();le(this,e,LJ,RJ,fe,{reqs:2,standard:0,advanced:1})}}function FJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function NJ(t){let e,n;return e=new nt({props:{label:"cargo",$$slots:{default:[FJ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function jJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[NJ]},$$scope:{ctx:t}};for(let s=0;s{"ship"in l&&n(2,r=l.ship),"space"in l&&n(0,a=l.space),"reqs"in l&&n(1,s=l.reqs)},t.$$.update=()=>{t.$$.dirty&5&&r.dispatch.setCargo(a)},[a,s,r,o]}class qJ extends oe{constructor(e){super();le(this,e,BJ,jJ,fe,{ship:2,space:0,reqs:1})}}function UJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function KJ(t){let e,n;return e=new nt({props:{label:`layer ${t[1]}`,$$slots:{default:[UJ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,[a]){const s={};a&2&&(s.label=`layer ${r[1]}`),a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function GJ(t,e,n){let{layer:r=1}=e,{rating:a=0}=e;const s=tt("ship");function o(){a=Xe(this.value),n(0,a)}return t.$$set=l=>{"layer"in l&&n(1,r=l.layer),"rating"in l&&n(0,a=l.rating)},t.$$.update=()=>{t.$$.dirty&3&&s.dispatch.setArmorRating({layer:r,rating:a})},[a,r,o]}class zJ extends oe{constructor(e){super();le(this,e,GJ,KJ,fe,{layer:1,rating:0})}}function fv(t,e,n){const r=t.slice();return r[5]=e[n],r[7]=n,r}function HJ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-n2prux"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[2]),n||(r=Me(e,"input",t[3]),n=!0)},p(a,s){s&4&&Xe(e.value)!==a[2]&&Ye(e,a[2])},d(a){a&&w(e),n=!1,r()}}}function cv(t,e){let n,r,a;return r=new zJ({props:{rating:e[5],layer:e[7]+1}}),{key:t,first:null,c(){n=gt(),k(r.$$.fragment),this.h()},l(s){n=gt(),Z(r.$$.fragment,s),this.h()},h(){this.first=n},m(s,o){R(s,n,o),Y(r,s,o),a=!0},p(s,o){e=s;const l={};o&1&&(l.rating=e[5]),o&1&&(l.layer=e[7]+1),r.$set(l)},i(s){a||(K(r.$$.fragment,s),a=!0)},o(s){G(r.$$.fragment,s),a=!1},d(s){s&&w(n),V(r,s)}}}function WJ(t){let e,n,r,a,s,o=[],l=new Map,c;r=new nt({props:{label:"armour layers",$$slots:{default:[HJ]},$$scope:{ctx:t}}});let h=t[0];const g=_=>_[7];for(let _=0;_{"layers"in c&&n(0,r=c.layers),"reqs"in c&&n(1,a=c.reqs)},t.$$.update=()=>{t.$$.dirty&4&&o.setArmorLayers(s)},[r,a,s,l]}class VJ extends oe{constructor(e){super();le(this,e,YJ,kJ,fe,{layers:0,reqs:1})}}function ZJ(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b;return{c(){e=L("div"),n=L("label"),r=L("input"),a=re(` none`),s=Q(),o=L("label"),l=L("input"),c=re(` partial`),h=Q(),g=L("label"),_=L("input"),v=re(` full`),this.h()},l(O){e=D(O,"DIV",{class:!0});var C=B(e);n=D(C,"LABEL",{class:!0});var S=B(n);r=D(S,"INPUT",{type:!0}),a=ie(S,` none`),S.forEach(w),s=ee(C),o=D(C,"LABEL",{class:!0});var F=B(o);l=D(F,"INPUT",{type:!0}),c=ie(F,` partial`),F.forEach(w),h=ee(C),g=D(C,"LABEL",{class:!0});var H=B(g);_=D(H,"INPUT",{type:!0}),v=ie(H,` full`),H.forEach(w),C.forEach(w),this.h()},h(){E(r,"type","radio"),r.__value="none",r.value=r.__value,t[6][0].push(r),E(n,"class","svelte-x5copc"),E(l,"type","radio"),l.__value="partial",l.value=l.__value,t[6][0].push(l),E(o,"class","svelte-x5copc"),E(_,"type","radio"),_.__value="full",_.value=_.__value,t[6][0].push(_),E(g,"class","svelte-x5copc"),E(e,"class","svelte-x5copc")},m(O,C){R(O,e,C),M(e,n),M(n,r),r.checked=r.__value===t[0],M(n,a),M(e,s),M(e,o),M(o,l),l.checked=l.__value===t[0],M(o,c),M(e,h),M(e,g),M(g,_),_.checked=_.__value===t[0],M(g,v),$||(b=[Me(r,"change",t[5]),Me(l,"change",t[7]),Me(_,"change",t[8])],$=!0)},p(O,C){C&1&&(r.checked=r.__value===O[0]),C&1&&(l.checked=l.__value===O[0]),C&1&&(_.checked=_.__value===O[0])},d(O){O&&w(e),t[6][0].splice(t[6][0].indexOf(r),1),t[6][0].splice(t[6][0].indexOf(l),1),t[6][0].splice(t[6][0].indexOf(_),1),$=!1,pa(b)}}}function XJ(t){let e,n;return e=new nt({props:{label:"streamlining",$$slots:{default:[ZJ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&513&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function JJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[XJ]},$$scope:{ctx:t}};for(let s=0;s(a(),a=Z2(_,C=>n(4,r=C)),_);t.$$.on_destroy.push(()=>a());let{type:o="none"}=e,{reqs:l={}}=e,{dispatch:c,shipMass:h}=tt("ship"),{dispatch:g=c,shipMass:_=h}=e;s();const v=[[]];function $(){o=this.__value,n(0,o)}function b(){o=this.__value,n(0,o)}function O(){o=this.__value,n(0,o)}return t.$$set=C=>{"type"in C&&n(0,o=C.type),"reqs"in C&&n(1,l=C.reqs),"dispatch"in C&&n(3,g=C.dispatch),"shipMass"in C&&s(n(2,_=C.shipMass))},t.$$.update=()=>{t.$$.dirty&25&&g.setStreamlining({type:o,shipMass:r})},[o,l,_,g,r,$,v,b,O]}class eQ extends oe{constructor(e){super();le(this,e,QJ,JJ,fe,{type:0,reqs:1,dispatch:3,shipMass:2})}}function tQ(t){let e,n,r,a,s,o,l,c,h,g;const _=[t[0]];let v={};for(let j=0;j<_.length;j+=1)v=me(v,_[j]);e=new IJ({props:v});const $=[t[1]];let b={};for(let j=0;j<$.length;j+=1)b=me(b,$[j]);r=new DJ({props:b});const O=[t[4]];let C={};for(let j=0;j{"hull"in c&&n(0,r=c.hull),"screens"in c&&n(1,a=c.screens),"cargo"in c&&n(2,s=c.cargo),"streamlining"in c&&n(3,o=c.streamlining),"armor"in c&&n(4,l=c.armor)},[r,a,s,o,l]}class iQ extends oe{constructor(e){super();le(this,e,rQ,nQ,fe,{hull:0,screens:1,cargo:2,streamlining:3,armor:4})}}function hv(t,e,n){const r=t.slice();return r[0]=e[n],r}function pv(t,e){let n,r=e[0]+"",a,s;return{key:t,first:null,c(){n=L("option"),a=re(r),this.h()},l(o){n=D(o,"OPTION",{});var l=B(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[0],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o},d(o){o&&w(n)}}}function aQ(t){let e,n=[],r=new Map,a,s,o=t[3];const l=c=>c[0];for(let c=0;ct[5].call(e))},m(c,h){R(c,e,h);for(let g=0;gg);let{id:a=1}=e,{type:s=r[0].type}=e,{reqs:o={}}=e,{dispatch:l}=tt("ship"),{dispatch:c=l}=e;function h(){s=ta(this),n(0,s),n(3,r)}return t.$$set=g=>{"id"in g&&n(1,a=g.id),"type"in g&&n(0,s=g.type),"reqs"in g&&n(2,o=g.reqs),"dispatch"in g&&n(4,c=g.dispatch)},t.$$.update=()=>{t.$$.dirty&1&&console.log(s),t.$$.dirty&19&&c.setSquadronType({type:s,id:a})},[s,a,o,r,c,h]}class lQ extends oe{constructor(e){super();le(this,e,oQ,uQ,fe,{id:1,type:0,reqs:2,dispatch:4})}}function gv(t,e,n){const r=t.slice();return r[5]=e[n],r[7]=n,r}function fQ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-oj0ytd"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function cQ(t){let e,n;return e=new nt({props:{label:"bays",$$slots:{default:[fQ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&257&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function _v(t,e){let n,r,a;const s=[e[5],{id:e[7]+1}];let o={};for(let l=0;l_[7];for(let _=0;_{"bays"in c&&n(0,r=c.bays),"reqs"in c&&n(1,a=c.reqs),"squadrons"in c&&n(2,s=c.squadrons)},t.$$.update=()=>{t.$$.dirty&1&&o.setCarrierBays(r)},[r,a,s,l]}class _Q extends oe{constructor(e){super();le(this,e,gQ,pQ,fe,{bays:0,reqs:1,squadrons:2})}}function vQ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{type:!0,class:!0}),this.h()},h(){E(e,"type","number"),E(e,"class","short")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function dQ(t){let e,n;return e=new nt({props:{label:"firecons",$$slots:{default:[vQ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function $Q(t){let e,n;const r=[t[1]];let a={$$slots:{default:[dQ]},$$scope:{ctx:t}};for(let s=0;s{"stations"in l&&n(0,r=l.stations),"reqs"in l&&n(1,a=l.reqs)},t.$$.update=()=>{t.$$.dirty&1&&s.setFirecons(r)},[r,a,o]}class yQ extends oe{constructor(e){super();le(this,e,mQ,$Q,fe,{stations:0,reqs:1})}}function bQ(t){let e,n,r;return{c(){e=L("input"),this.h()},l(a){e=D(a,"INPUT",{type:!0,class:!0}),this.h()},h(){E(e,"type","number"),E(e,"class","short")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Me(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function wQ(t){let e,n;return e=new nt({props:{label:"ADFC",$$slots:{default:[bQ]},$$scope:{ctx:t}}}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function AQ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[wQ]},$$scope:{ctx:t}};for(let s=0;s{"rating"in l&&n(0,r=l.rating),"reqs"in l&&n(1,a=l.reqs)},t.$$.update=()=>{t.$$.dirty&1&&s.setADFC(r)},[r,a,o]}class TQ extends oe{constructor(e){super();le(this,e,OQ,AQ,fe,{rating:0,reqs:1})}}function vv(t,e,n){const r=t.slice();return r[4]=e[n],r}function dv(t,e){let n,r=e[4].name+"",a,s;return{key:t,first:null,c(){n=L("option"),a=re(r),this.h()},l(o){n=D(o,"OPTION",{});var l=B(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[4].type,n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o},d(o){o&&w(n)}}}function SQ(t){let e,n=[],r=new Map,a,s,o,l,c,h=ca;const g=_=>_[4].type;for(let _=0;_t[3].call(e)),E(s,"class","button small primary")},m(_,v){R(_,e,v);for(let $=0;$r.dispatch.addWeapon(a);function o(){a=ta(this),n(0,a)}return t.$$set=l=>{"ship"in l&&n(2,r=l.ship)},[a,s,r,o]}class IQ extends oe{constructor(e){super();le(this,e,EQ,CQ,fe,{ship:2})}}function PQ(t){let e,n,r,a;return{c(){e=Rn("g"),n=Rn("path"),this.h()},l(s){e=Ln(s,"g",{transform:!0});var o=B(e);n=Ln(o,"path",{d:!0,class:!0}),B(n).forEach(w),o.forEach(w),this.h()},h(){E(n,"d",t[1]),E(n,"class","svelte-jxsibt"),ke(n,"active",t[0]),E(e,"transform",t[2])},m(s,o){R(s,e,o),M(e,n),r||(a=Me(n,"click",t[7]),r=!0)},p(s,[o]){o&2&&E(n,"d",s[1]),o&1&&ke(n,"active",s[0]),o&4&&E(e,"transform",s[2])},i:Ie,o:Ie,d(s){s&&w(e),r=!1,a()}}}function MQ(t,e,n){let{arc:r}=e,{radius:a}=e,{active:s=!1}=e;const o={F:0,FS:300,AS:240,A:180,AP:120,FP:60};let l,c,h,g;function _(v){Sl.call(this,t,v)}return t.$$set=v=>{"arc"in v&&n(3,r=v.arc),"radius"in v&&n(4,a=v.radius),"active"in v&&n(0,s=v.active)},t.$$.update=()=>{t.$$.dirty&16&&n(5,l=Math.round(a*(1-Math.sin(60/180*Math.PI)))),t.$$.dirty&16&&n(6,c=Math.round(a*Math.cos(60/180*Math.PI))),t.$$.dirty&112&&n(1,h=`M ${a},${a} L ${a-c},${l} A ${a},${a} 0 0 1 ${a+c},${l} Z`),t.$$.dirty&24&&n(2,g=`rotate(${o[r]},${a},${a})`)},[s,h,g,r,a,l,c,_]}class xQ extends oe{constructor(e){super();le(this,e,MQ,PQ,fe,{arc:3,radius:4,active:0})}}function $v(t,e,n){const r=t.slice();return r[8]=e[n],r}function mv(t,e){let n,r,a;function s(){return e[6](e[8])}return r=new xQ({props:{arc:e[8],radius:e[1]/2,active:e[0].includes(e[8])}}),r.$on("click",s),{key:t,first:null,c(){n=gt(),k(r.$$.fragment),this.h()},l(o){n=gt(),Z(r.$$.fragment,o),this.h()},h(){this.first=n},m(o,l){R(o,n,l),Y(r,o,l),a=!0},p(o,l){e=o;const c={};l&2&&(c.radius=e[1]/2),l&1&&(c.active=e[0].includes(e[8])),r.$set(c)},i(o){a||(K(r.$$.fragment,o),a=!0)},o(o){G(r.$$.fragment,o),a=!1},d(o){o&&w(n),V(r,o)}}}function RQ(t){let e,n=[],r=new Map,a,s,o,l,c,h=t[2];const g=$=>$[8];for(let $=0;$c("click_arc",_),g=_=>h(_);return t.$$set=_=>{"selected"in _&&n(0,o=_.selected),"size"in _&&n(1,l=_.size),"$$scope"in _&&n(4,a=_.$$scope)},[o,l,s,h,a,r,g]}class fu extends oe{constructor(e){super();le(this,e,LQ,RQ,fe,{selected:0,size:1})}}function yv(t,e,n){const r=t.slice();return r[2]=e[n],r}function DQ(t){let e,n,r,a,s,o,l,c,h,g,_;return{c(){e=L("select"),n=L("option"),r=re("1"),a=L("option"),s=re("2"),o=L("option"),l=re("3"),c=L("option"),h=re("4"),this.h()},l(v){e=D(v,"SELECT",{});var $=B(e);n=D($,"OPTION",{});var b=B(n);r=ie(b,"1"),b.forEach(w),a=D($,"OPTION",{});var O=B(a);s=ie(O,"2"),O.forEach(w),o=D($,"OPTION",{});var C=B(o);l=ie(C,"3"),C.forEach(w),c=D($,"OPTION",{});var S=B(c);h=ie(S,"4"),S.forEach(w),$.forEach(w),this.h()},h(){n.__value=1,n.value=n.__value,a.__value=2,a.value=a.__value,o.__value=3,o.value=o.__value,c.__value=4,c.value=c.__value,t[0]===void 0&&ei(()=>t[6].call(e))},m(v,$){R(v,e,$),M(e,n),M(n,r),M(e,a),M(a,s),M(e,o),M(o,l),M(e,c),M(c,h),cn(e,t[0]),g||(_=Me(e,"change",t[6]),g=!0)},p(v,$){$&1&&cn(e,v[0])},d(v){v&&w(e),g=!1,_()}}}function bv(t,e){let n,r=e[2]+"",a,s;return{key:t,first:null,c(){n=L("option"),a=re(r),this.h()},l(o){n=D(o,"OPTION",{});var l=B(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[2],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o,l&1&&r!==(r=e[2]+"")&&_t(a,r),l&1&&s!==(s=e[2])&&(n.__value=s,n.value=n.__value)},d(o){o&&w(n)}}}function FQ(t){let e,n=[],r=new Map,a,s,o=t[3][t[0]]||[];const l=c=>c[2];for(let c=0;ct[7].call(e))},m(c,h){R(c,e,h);for(let g=0;gS===O);C===-1&&(C=0),n(1,o=Array.from({length:c}).map((S,F)=>a[(C+F)%a.length])),n(5,r=o.join(","))}const _=ti();function v(){s=ta(this),n(0,s)}function $(){c=ta(this),n(2,c),n(3,l),n(0,s),n(3,l),n(0,s)}const b=({detail:O})=>g(O);return t.$$set=O=>{"weaponClass"in O&&n(0,s=O.weaponClass),"arcs"in O&&n(1,o=O.arcs)},t.$$.update=()=>{t.$$.dirty&2&&n(5,r=o.join(",")),t.$$.dirty&5&&(l[s].includes(c)||(n(2,c=l[s][0]),console.log({nbrArcs:c,label:"in if"}))),t.$$.dirty&6&&o.length!==c&&g(o[0]),t.$$.dirty&2&&console.log("it changed!",o),t.$$.dirty&32&&console.log("it changed!",r),t.$$.dirty&33&&_("change",{weaponClass:s,arcs:r.split(",")})},[s,o,c,l,g,r,v,$,b]}class BQ extends oe{constructor(e){super();le(this,e,jQ,NQ,fe,{weaponClass:0,arcs:1})}}function qQ(t){let e,n,r,a,s;return a=new fu({props:{selected:[t[0]]}}),a.$on("click_arc",t[2]),{c(){e=L("label"),n=re("submunition pack"),r=Q(),k(a.$$.fragment)},l(o){e=D(o,"LABEL",{});var l=B(e);n=ie(l,"submunition pack"),l.forEach(w),r=ee(o),Z(a.$$.fragment,o)},m(o,l){R(o,e,l),M(e,n),R(o,r,l),Y(a,o,l),s=!0},p(o,[l]){const c={};l&1&&(c.selected=[o[0]]),a.$set(c)},i(o){s||(K(a.$$.fragment,o),s=!0)},o(o){G(a.$$.fragment,o),s=!1},d(o){o&&w(e),o&&w(r),V(a,o)}}}function UQ(t,e,n){let{arc:r="F"}=e;const a=ti(),s=l=>{a("change",{arc:l})},o=({detail:l})=>s(l);return t.$$set=l=>{"arc"in l&&n(0,r=l.arc)},[r,s,o]}class KQ extends oe{constructor(e){super();le(this,e,UQ,qQ,fe,{arc:0})}}function GQ(t){let e,n;return{c(){e=L("label"),n=re("point defence system")},l(r){e=D(r,"LABEL",{});var a=B(e);n=ie(a,"point defence system"),a.forEach(w)},m(r,a){R(r,e,a),M(e,n)},p:Ie,i:Ie,o:Ie,d(r){r&&w(e)}}}class zQ extends oe{constructor(e){super();le(this,e,null,GQ,fe,{})}}function HQ(t){let e,n;return{c(){e=L("label"),n=re("scattergun")},l(r){e=D(r,"LABEL",{});var a=B(e);n=ie(a,"scattergun"),a.forEach(w)},m(r,a){R(r,e,a),M(e,n)},p:Ie,i:Ie,o:Ie,d(r){r&&w(e)}}}class WQ extends oe{constructor(e){super();le(this,e,null,HQ,fe,{})}}function kQ(t){let e,n,r,a,s;return a=new fu({props:{selected:[t[0]]}}),a.$on("click_arc",t[2]),{c(){e=L("label"),n=re("needle weapon"),r=Q(),k(a.$$.fragment)},l(o){e=D(o,"LABEL",{});var l=B(e);n=ie(l,"needle weapon"),l.forEach(w),r=ee(o),Z(a.$$.fragment,o)},m(o,l){R(o,e,l),M(e,n),R(o,r,l),Y(a,o,l),s=!0},p(o,[l]){const c={};l&1&&(c.selected=[o[0]]),a.$set(c)},i(o){s||(K(a.$$.fragment,o),s=!0)},o(o){G(a.$$.fragment,o),s=!1},d(o){o&&w(e),o&&w(r),V(a,o)}}}function YQ(t,e,n){let{arc:r="F"}=e;const a=ti(),s=l=>{a("change",{arc:l})},o=({detail:l})=>s(l);return t.$$set=l=>{"arc"in l&&n(0,r=l.arc)},[r,s,o]}class VQ extends oe{constructor(e){super();le(this,e,YQ,kQ,fe,{arc:0})}}function ZQ(t){let e,n,r,a,s,o,l,c;const h=[t[0]];var g=t[3][t[1]];function _(v){let $={};for(let b=0;b{V(O,1)}),Fn()}g?(s=new g(_()),s.$on("change",v[5]),k(s.$$.fragment),K(s.$$.fragment,1),Y(s,e,null)):s=null}else g&&s.$set(b)},i(v){o||(s&&K(s.$$.fragment,v),o=!0)},o(v){s&&G(s.$$.fragment,v),o=!1},d(v){v&&w(e),s&&V(s),l=!1,c()}}}function XQ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[ZQ]},$$scope:{ctx:t}};for(let s=0;sc.dispatch.removeWeapon(l),g=({detail:_})=>{console.log({id:l,type:a}),c.dispatch.setWeapon(Hi({id:l,type:a},_))};return t.$$set=_=>{"weapon"in _&&n(0,o=_.weapon),"id"in _&&n(6,l=_.id)},t.$$.update=()=>{t.$$.dirty&1&&n(2,r=o.reqs),t.$$.dirty&1&&n(1,a=o.type)},[o,a,r,s,h,g,l]}class QQ extends oe{constructor(e){super();le(this,e,JQ,XQ,fe,{weapon:0,id:6})}}function wv(t,e,n){const r=t.slice();return r[3]=e[n],r}function Av(t,e){let n,r,a;return r=new QQ({props:{weapon:e[3],id:e[3].id}}),{key:t,first:null,c(){n=gt(),k(r.$$.fragment),this.h()},l(s){n=gt(),Z(r.$$.fragment,s),this.h()},h(){this.first=n},m(s,o){R(s,n,o),Y(r,s,o),a=!0},p(s,o){e=s;const l={};o&4&&(l.weapon=e[3]),o&4&&(l.id=e[3].id),r.$set(l)},i(s){a||(K(r.$$.fragment,s),a=!0)},o(s){G(r.$$.fragment,s),a=!1},d(s){s&&w(n),V(r,s)}}}function eee(t){let e,n,r,a,s,o,l=[],c=new Map,h,g;const _=[t[0]];let v={};for(let S=0;S<_.length;S+=1)v=me(v,_[S]);e=new yQ({props:v});const $=[t[1]];let b={};for(let S=0;S<$.length;S+=1)b=me(b,$[S]);r=new TQ({props:b}),s=new IQ({});let O=t[2];const C=S=>S[3].id;for(let S=0;S{"firecons"in o&&n(0,r=o.firecons),"adfc"in o&&n(1,a=o.adfc),"weapons"in o&&n(2,s=o.weapons)},[r,a,s]}class ree extends oe{constructor(e){super();le(this,e,nee,tee,fe,{firecons:0,adfc:1,weapons:2})}}function iee(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b;const O=[t[0].identification];let C={};for(let X=0;Xn(0,r=s)),[r,a]}class see extends oe{constructor(e){super();le(this,e,aee,iee,fe,{})}}function uee(t){let e,n,r,a,s,o,l,c,h,g,_;return{c(){e=L("div"),n=L("button"),r=re("save"),a=Q(),s=L("pre"),o=L("code"),l=re(t[0]),c=Q(),h=L("a"),this.h()},l(v){e=D(v,"DIV",{class:!0});var $=B(e);n=D($,"BUTTON",{class:!0});var b=B(n);r=ie(b,"save"),b.forEach(w),a=ee($),s=D($,"PRE",{class:!0});var O=B(s);o=D(O,"CODE",{});var C=B(o);l=ie(C,t[0]),C.forEach(w),O.forEach(w),$.forEach(w),c=ee(v),h=D(v,"A",{href:!0,download:!0}),B(h).forEach(w),this.h()},h(){E(n,"class","button primary svelte-1f6rwrs"),E(s,"class","svelte-1f6rwrs"),E(e,"class","svelte-1f6rwrs"),E(h,"href",t[3]),E(h,"download",t[2]),xn(h,"display","none",!1)},m(v,$){R(v,e,$),M(e,n),M(n,r),M(e,a),M(e,s),M(s,o),M(o,l),R(v,c,$),R(v,h,$),t[8](h),g||(_=Me(n,"click",t[5]),g=!0)},p(v,[$]){$&1&&_t(l,v[0]),$&8&&E(h,"href",v[3]),$&4&&E(h,"download",v[2])},i:Ie,o:Ie,d(v){v&&w(e),v&&w(c),v&&w(h),t[8](null),g=!1,_()}}}function oee(t,e,n){let r,a,s,{ship:o={}}=e,l;const{state:c}=tt("ship");ha(t,c,v=>n(7,s=v)),ti();let h;function g(){h==null||h.click()}function _(v){Qr[v?"unshift":"push"](()=>{h=v,n(1,h)})}return t.$$set=v=>{"ship"in v&&n(6,o=v.ship)},t.$$.update=()=>{var v,$;t.$$.dirty&64&&n(0,l=JSON.stringify(o,null,2)),t.$$.dirty&128&&n(0,l=JSON.stringify(s,null,2)),t.$$.dirty&1&&n(3,r="data:text/plain;charset=utf-8,"+encodeURIComponent(l)),t.$$.dirty&128&&n(2,a=(($=(v=s==null?void 0:s.identification)==null?void 0:v.shipClass)!=null?$:"ship")+".json")},[l,h,a,r,c,g,o,s,_]}class lee extends oe{constructor(e){super();le(this,e,oee,uee,fe,{ship:6})}}function fee(t){let e,n;return{c(){e=L("div"),n=re(t[0]),this.h()},l(r){e=D(r,"DIV",{class:!0});var a=B(e);n=ie(a,t[0]),a.forEach(w),this.h()},h(){E(e,"class","svelte-uinb9")},m(r,a){R(r,e,a),M(e,n)},p(r,[a]){a&1&&_t(n,r[0])},i:Ie,o:Ie,d(r){r&&w(e)}}}function cee(t,e,n){let{cost:r=0}=e;return t.$$set=a=>{"cost"in a&&n(0,r=a.cost)},[r]}class hee extends oe{constructor(e){super();le(this,e,cee,fee,fe,{cost:0})}}function pee(t){let e,n,r,a;return{c(){e=L("div"),n=re(t[0]),r=L("img"),this.h()},l(s){e=D(s,"DIV",{});var o=B(e);n=ie(o,t[0]),r=D(o,"IMG",{src:!0,alt:!0,class:!0}),o.forEach(w),this.h()},h(){jn(r.src,a=dn+"/mass.svg")||E(r,"src",a),E(r,"alt","mass"),E(r,"class","svelte-vmvu0j")},m(s,o){R(s,e,o),M(e,n),M(e,r)},p(s,[o]){o&1&&_t(n,s[0])},i:Ie,o:Ie,d(s){s&&w(e)}}}function gee(t,e,n){let{mass:r=0}=e;return t.$$set=a=>{"mass"in a&&n(0,r=a.mass)},[r]}class _ee extends oe{constructor(e){super();le(this,e,gee,pee,fe,{mass:0})}}function Ov(t){let e,n;return{c(){e=re(t[0]),n=re("-class,")},l(r){e=ie(r,t[0]),n=ie(r,"-class,")},m(r,a){R(r,e,a),R(r,n,a)},p(r,a){a&1&&_t(e,r[0])},d(r){r&&w(e),r&&w(n)}}}function vee(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b,O=t[0]&&Ov(t);return _=new hee({props:{cost:t[2]}}),$=new _ee({props:{mass:t[3]}}),{c(){e=L("h1"),n=re("ship name: "),r=L("div"),a=Q(),s=L("div"),o=L("h2"),O&&O.c(),l=Q(),c=re(t[1]),h=Q(),g=L("div"),k(_.$$.fragment),v=re(` \xA0 `),k($.$$.fragment),this.h()},l(C){e=D(C,"H1",{class:!0});var S=B(e);n=ie(S,"ship name: "),r=D(S,"DIV",{class:!0}),B(r).forEach(w),S.forEach(w),a=ee(C),s=D(C,"DIV",{class:!0});var F=B(s);o=D(F,"H2",{class:!0});var H=B(o);O&&O.l(H),l=ee(H),c=ie(H,t[1]),H.forEach(w),h=ee(F),g=D(F,"DIV",{class:!0});var te=B(g);Z(_.$$.fragment,te),v=ie(te,` \xA0 `),Z($.$$.fragment,te),te.forEach(w),F.forEach(w),this.h()},h(){E(r,"class","fill svelte-1v8962g"),E(e,"class","svelte-1v8962g"),E(o,"class","svelte-1v8962g"),E(g,"class","reqs svelte-1v8962g"),E(s,"class","details svelte-1v8962g")},m(C,S){R(C,e,S),M(e,n),M(e,r),R(C,a,S),R(C,s,S),M(s,o),O&&O.m(o,null),M(o,l),M(o,c),M(s,h),M(s,g),Y(_,g,null),M(g,v),Y($,g,null),b=!0},p(C,[S]){C[0]?O?O.p(C,S):(O=Ov(C),O.c(),O.m(o,l)):O&&(O.d(1),O=null),(!b||S&2)&&_t(c,C[1]);const F={};S&4&&(F.cost=C[2]),_.$set(F);const H={};S&8&&(H.mass=C[3]),$.$set(H)},i(C){b||(K(_.$$.fragment,C),K($.$$.fragment,C),b=!0)},o(C){G(_.$$.fragment,C),G($.$$.fragment,C),b=!1},d(C){C&&w(e),C&&w(a),C&&w(s),O&&O.d(),V(_),V($)}}}function dee(t,e,n){let{shipClass:r}=e,{shipType:a}=e,{cost:s=0}=e,{mass:o=0}=e;return t.$$set=l=>{"shipClass"in l&&n(0,r=l.shipClass),"shipType"in l&&n(1,a=l.shipType),"cost"in l&&n(2,s=l.cost),"mass"in l&&n(3,o=l.mass)},[r,a,s,o]}class $ee extends oe{constructor(e){super();le(this,e,dee,vee,fe,{shipClass:0,shipType:1,cost:2,mass:3})}}function Tv(t){let e,n;return{c(){e=L("img"),this.h()},l(r){e=D(r,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){E(e,"class","ftl svelte-1kuvs8v"),jn(e.src,n=dn+"/icons/ftl-drive.svg")||E(e,"src",n),E(e,"alt","ftl drive")},m(r,a){R(r,e,a)},p:Ie,d(r){r&&w(e)}}}function Sv(t){let e,n;return{c(){e=L("div"),n=re(t[1]),this.h()},l(r){e=D(r,"DIV",{class:!0,style:!0});var a=B(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","thrust svelte-1kuvs8v"),xn(e,"background-image","url("+dn+"/icons/standard-drive.svg)")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function mee(t){let e,n,r,a,s,o=t[0]!=="none"&&Tv(),l=t[1]>0&&Sv(t);return{c(){e=L("div"),o&&o.c(),n=Q(),l&&l.c(),r=Q(),a=L("img"),this.h()},l(c){e=D(c,"DIV",{class:!0});var h=B(e);o&&o.l(h),n=ee(h),l&&l.l(h),r=ee(h),a=D(h,"IMG",{class:!0,src:!0,alt:!0}),h.forEach(w),this.h()},h(){E(a,"class","internal svelte-1kuvs8v"),jn(a.src,s=dn+"/icons/internal-systems.svg")||E(a,"src",s),E(a,"alt","internal systems"),E(e,"class","main_systems svelte-1kuvs8v")},m(c,h){R(c,e,h),o&&o.m(e,null),M(e,n),l&&l.m(e,null),M(e,r),M(e,a)},p(c,[h]){c[0]!=="none"?o?o.p(c,h):(o=Tv(),o.c(),o.m(e,n)):o&&(o.d(1),o=null),c[1]>0?l?l.p(c,h):(l=Sv(c),l.c(),l.m(e,r)):l&&(l.d(1),l=null)},i:Ie,o:Ie,d(c){c&&w(e),o&&o.d(),l&&l.d()}}}function yee(t,e,n){let{ftl:r="none"}=e,{engine:a=0}=e;return t.$$set=s=>{"ftl"in s&&n(0,r=s.ftl),"engine"in s&&n(1,a=s.engine)},[r,a]}class bee extends oe{constructor(e){super();le(this,e,yee,mee,fe,{ftl:0,engine:1})}}function Cv(t,e,n){const r=t.slice();return r[7]=e[n],r[9]=n,r}function Ev(t,e,n){const r=t.slice();return r[10]=e[n],r[12]=n,r}function Iv(t){let e,n;return{c(){e=L("img"),this.h()},l(r){e=D(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){jn(e.src,n=dn+"/icons/crew-star.svg")||E(e,"src",n),E(e,"alt","crew loss threshold"),E(e,"class","svelte-1uhhjap")},m(r,a){R(r,e,a)},p:Ie,d(r){r&&w(e)}}}function Pv(t,e){let n,r=e[10]&&Iv();return{key:t,first:null,c(){n=L("div"),r&&r.c(),this.h()},l(a){n=D(a,"DIV",{class:!0});var s=B(n);r&&r.l(s),s.forEach(w),this.h()},h(){E(n,"class","cell svelte-1uhhjap"),this.first=n},m(a,s){R(a,n,s),r&&r.m(n,null)},p(a,s){e=a,e[10]?r?r.p(e,s):(r=Iv(),r.c(),r.m(n,null)):r&&(r.d(1),r=null)},d(a){a&&w(n),r&&r.d()}}}function Mv(t,e){let n,r=[],a=new Map,s,o=e[7];const l=c=>c[12];for(let c=0;co[9];for(let o=0;o{"shipMass"in g&&n(1,r=g.shipMass),"rating"in g&&n(2,a=g.rating),"advanced"in g&&n(3,s=g.advanced)},t.$$.update=()=>{t.$$.dirty&8&&n(4,o=s?3:4),t.$$.dirty&4&&n(5,l=Array(a).fill(!1)),t.$$.dirty&2&&n(6,c=Math.ceil(r/20)),t.$$.dirty&96&&n(5,l=Tl(l,c).map(g=>(g[g.length-1]=!0,g)).flat()),t.$$.dirty&48&&n(0,h=Tl(l,o))},[h,r,a,s,o,l,c]}class Oee extends oe{constructor(e){super();le(this,e,Aee,wee,fe,{shipMass:1,rating:2,advanced:3})}}function xv(t,e,n){const r=t.slice();return r[1]=e[n],r[3]=n,r}function Rv(t,e,n){const r=t.slice();return r[4]=e[n],r}function Lv(t){let e;return{c(){e=L("div"),this.h()},l(n){e=D(n,"DIV",{class:!0}),B(e).forEach(w),this.h()},h(){E(e,"class","cell svelte-86wmvt")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function Dv(t,e){let n,r,a=Array.from({length:e[1]}),s=[];for(let o=0;oo[3];for(let o=0;o{"armor"in a&&n(0,r=a.armor)},[r]}class Cee extends oe{constructor(e){super();le(this,e,See,Tee,fe,{armor:0})}}function Eee(t){let e,n,r,a,s;return n=new Cee({props:{armour:t[0].armour}}),a=new Oee({props:{rating:t[0].hull.rating,advanced:t[0].hull.advanced,ship_mass:t[1]}}),{c(){e=L("div"),k(n.$$.fragment),r=Q(),k(a.$$.fragment)},l(o){e=D(o,"DIV",{});var l=B(e);Z(n.$$.fragment,l),r=ee(l),Z(a.$$.fragment,l),l.forEach(w)},m(o,l){R(o,e,l),Y(n,e,null),M(e,r),Y(a,e,null),s=!0},p(o,[l]){const c={};l&1&&(c.armour=o[0].armour),n.$set(c);const h={};l&1&&(h.rating=o[0].hull.rating),l&1&&(h.advanced=o[0].hull.advanced),l&2&&(h.ship_mass=o[1]),a.$set(h)},i(o){s||(K(n.$$.fragment,o),K(a.$$.fragment,o),s=!0)},o(o){G(n.$$.fragment,o),G(a.$$.fragment,o),s=!1},d(o){o&&w(e),V(n),V(a)}}}function Iee(t,e,n){let{structure:r={}}=e,{ship_mass:a=0}=e;return t.$$set=s=>{"structure"in s&&n(0,r=s.structure),"ship_mass"in s&&n(1,a=s.ship_mass)},[r,a]}class Pee extends oe{constructor(e){super();le(this,e,Iee,Eee,fe,{structure:0,ship_mass:1})}}function Mee(t){let e,n;return{c(){e=Rn("text"),n=re(t[0]),this.h()},l(r){e=Ln(r,"text",{x:!0,y:!0,class:!0});var a=B(e);n=ie(a,t[0]),a.forEach(w),this.h()},h(){E(e,"x","50%"),E(e,"y","50%"),E(e,"class","svelte-1u8rlr5")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&1&&_t(n,r[0])},d(r){r&&w(e)}}}function xee(t){let e,n,r;return n=new fu({props:{selected:t[1],size:"40",$$slots:{default:[Mee]},$$scope:{ctx:t}}}),{c(){e=L("div"),k(n.$$.fragment),this.h()},l(a){e=D(a,"DIV",{class:!0});var s=B(e);Z(n.$$.fragment,s),s.forEach(w),this.h()},h(){E(e,"class","svelte-1u8rlr5")},m(a,s){R(a,e,s),Y(n,e,null),r=!0},p(a,[s]){const o={};s&2&&(o.selected=a[1]),s&5&&(o.$$scope={dirty:s,ctx:a}),n.$set(o)},i(a){r||(K(n.$$.fragment,a),r=!0)},o(a){G(n.$$.fragment,a),r=!1},d(a){a&&w(e),V(n)}}}function Ree(t,e,n){let{weaponClass:r=1}=e,{arcs:a=[]}=e;return t.$$set=s=>{"weaponClass"in s&&n(0,r=s.weaponClass),"arcs"in s&&n(1,a=s.arcs)},[r,a]}class Lee extends oe{constructor(e){super();le(this,e,Ree,xee,fe,{weaponClass:0,arcs:1})}}function Fv(t,e,n){const r=t.slice();return r[2]=e[n],r}function Nv(t){let e,n;const r=[t[2]];let a={};for(let s=0;sG(s[l],1,1,()=>{s[l]=null});return{c(){e=L("div"),n=L("div");for(let l=0;l{"weapons"in s&&n(1,r=s.weapons)},t.$$.update=()=>{t.$$.dirty&2&&n(0,a=r.filter(({type:s})=>s==="beam"))},[a,r]}class Nee extends oe{constructor(e){super();le(this,e,Fee,Dee,fe,{weapons:1})}}function Jr(t,e){return e===void 0&&(e=t,t=0),Array.from({length:1+e-t}).map((n,r)=>r+t)}function jv(t,e,n){const r=t.slice();return r[1]=e[n],r}function Bv(t){let e,n;return{c(){e=L("img"),this.h()},l(r){e=D(r,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){E(e,"class","firecon svelte-d2fjdl"),jn(e.src,n=dn+"/icons/firecon.svg")||E(e,"src",n),E(e,"alt","firecon")},m(r,a){R(r,e,a)},p:Ie,d(r){r&&w(e)}}}function jee(t){let e,n=Jr(1,t[0]),r=[];for(let a=0;a{"firecons"in a&&n(0,r=a.firecons)},[r]}class qee extends oe{constructor(e){super();le(this,e,Bee,jee,fe,{firecons:0})}}function qv(t,e,n){const r=t.slice();return r[2]=e[n],r}function Uv(t,e,n){const r=t.slice();return r[2]=e[n],r}function Kv(t){let e,n;return{c(){e=L("img"),this.h()},l(r){e=D(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){jn(e.src,n=dn+"/icons/screen.svg")||E(e,"src",n),E(e,"alt","screen"),E(e,"class","svelte-kh7po5")},m(r,a){R(r,e,a)},p:Ie,d(r){r&&w(e)}}}function Gv(t){let e,n;return{c(){e=L("img"),this.h()},l(r){e=D(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){jn(e.src,n=dn+"/icons/screen-advanced.svg")||E(e,"src",n),E(e,"alt","advanced screen"),E(e,"class","svelte-kh7po5")},m(r,a){R(r,e,a)},p:Ie,d(r){r&&w(e)}}}function Uee(t){let e,n,r=Jr(1,t[0]),a=[];for(let l=0;l{"standard"in s&&n(0,r=s.standard),"advanced"in s&&n(1,a=s.advanced)},[r,a]}class Gee extends oe{constructor(e){super();le(this,e,Kee,Uee,fe,{standard:0,advanced:1})}}function zee(t){let e,n,r,a,s;n=new qee({props:{firecons:t[0]}});const o=[t[1]];let l={};for(let c=0;c{"firecons"in s&&n(0,r=s.firecons),"screens"in s&&n(1,a=s.screens)},[r,a]}class Wee extends oe{constructor(e){super();le(this,e,Hee,zee,fe,{firecons:0,screens:1})}}function kee(t){var C,S,F,H,te,j,ue;let e,n,r,a,s,o,l,c,h,g,_,v,$,b,O;return n=new $ee({props:{shipClass:t[0].identification.shipClass,shipType:t[0].identification.shipType,cost:(C=t[0].reqs)==null?void 0:C.cost,mass:(S=t[0].reqs)==null?void 0:S.mass}}),s=new Pee({props:{structure:t[0].structure,shipMass:t[0].identification.mass}}),l=new Wee({props:{firecons:t[0].weaponry.firecons.nbr,screens:t[0].structure.screens}}),h=new Nee({props:{weapons:t[0].weaponry.weapons}}),_=new bee({props:{ftl:(H=(F=t[0])==null?void 0:F.propulsion)==null?void 0:H.ftl,engine:(ue=(j=(te=t[0])==null?void 0:te.propulsion)==null?void 0:j.drive)==null?void 0:ue.rating}}),{c(){e=L("div"),k(n.$$.fragment),r=Q(),a=L("div"),k(s.$$.fragment),o=Q(),k(l.$$.fragment),c=Q(),k(h.$$.fragment),g=Q(),k(_.$$.fragment),v=Q(),$=L("div"),b=re("Printing this page will only prints the ship sheet."),this.h()},l(W){e=D(W,"DIV",{class:!0});var se=B(e);Z(n.$$.fragment,se),r=ee(se),a=D(se,"DIV",{class:!0});var X=B(a);Z(s.$$.fragment,X),o=ee(X),Z(l.$$.fragment,X),X.forEach(w),c=ee(se),Z(h.$$.fragment,se),g=ee(se),Z(_.$$.fragment,se),se.forEach(w),v=ee(W),$=D(W,"DIV",{class:!0});var $e=B($);b=ie($e,"Printing this page will only prints the ship sheet."),$e.forEach(w),this.h()},h(){E(a,"class","section-2 svelte-184q87j"),E(e,"class","print-output svelte-184q87j"),E($,"class","notice svelte-184q87j")},m(W,se){R(W,e,se),Y(n,e,null),M(e,r),M(e,a),Y(s,a,null),M(a,o),Y(l,a,null),M(e,c),Y(h,e,null),M(e,g),Y(_,e,null),R(W,v,se),R(W,$,se),M($,b),O=!0},p(W,[se]){var rt,Nt,bn,At,Yt,Aa,sr;const X={};se&1&&(X.shipClass=W[0].identification.shipClass),se&1&&(X.shipType=W[0].identification.shipType),se&1&&(X.cost=(rt=W[0].reqs)==null?void 0:rt.cost),se&1&&(X.mass=(Nt=W[0].reqs)==null?void 0:Nt.mass),n.$set(X);const $e={};se&1&&($e.structure=W[0].structure),se&1&&($e.shipMass=W[0].identification.mass),s.$set($e);const ce={};se&1&&(ce.firecons=W[0].weaponry.firecons.nbr),se&1&&(ce.screens=W[0].structure.screens),l.$set(ce);const Le={};se&1&&(Le.weapons=W[0].weaponry.weapons),h.$set(Le);const Je={};se&1&&(Je.ftl=(At=(bn=W[0])==null?void 0:bn.propulsion)==null?void 0:At.ftl),se&1&&(Je.engine=(sr=(Aa=(Yt=W[0])==null?void 0:Yt.propulsion)==null?void 0:Aa.drive)==null?void 0:sr.rating),_.$set(Je)},i(W){O||(K(n.$$.fragment,W),K(s.$$.fragment,W),K(l.$$.fragment,W),K(h.$$.fragment,W),K(_.$$.fragment,W),O=!0)},o(W){G(n.$$.fragment,W),G(s.$$.fragment,W),G(l.$$.fragment,W),G(h.$$.fragment,W),G(_.$$.fragment,W),O=!1},d(W){W&&w(e),V(n),V(s),V(l),V(h),V(_),W&&w(v),W&&w($)}}}function Yee(t,e,n){let{ship:r={}}=e;return t.$$set=a=>{"ship"in a&&n(0,r=a.ship)},[r]}class Vee extends oe{constructor(e){super();le(this,e,Yee,kee,fe,{ship:0})}}function Zee(t){let e,n,r,a,s,o,l,c,h,g,_,v,$,b,O,C;return a=new MX({}),o=new zX({}),o.$on("changeTab",t[3]),h=new see({}),v=new lee({}),O=new Vee({props:{ship:t[1]}}),{c(){e=L("meta"),n=Q(),r=L("main"),k(a.$$.fragment),s=Q(),k(o.$$.fragment),l=Q(),c=L("div"),k(h.$$.fragment),g=Q(),_=L("div"),k(v.$$.fragment),$=Q(),b=L("div"),k(O.$$.fragment),this.h()},l(S){const F=X2('[data-svelte="svelte-wq1q9u"]',document.head);e=D(F,"META",{name:!0,content:!0}),F.forEach(w),n=ee(S),r=D(S,"MAIN",{class:!0});var H=B(r);Z(a.$$.fragment,H),s=ee(H),Z(o.$$.fragment,H),l=ee(H),c=D(H,"DIV",{class:!0});var te=B(c);Z(h.$$.fragment,te),te.forEach(w),g=ee(H),_=D(H,"DIV",{class:!0});var j=B(_);Z(v.$$.fragment,j),j.forEach(w),$=ee(H),b=D(H,"DIV",{class:!0});var ue=B(b);Z(O.$$.fragment,ue),ue.forEach(w),H.forEach(w),this.h()},h(){E(e,"name","viewport"),E(e,"content","width=960"),E(c,"class","svelte-khn038"),ke(c,"hide",t[0]!=="editor"),E(_,"class","svelte-khn038"),ke(_,"hide",t[0]!=="json"),E(b,"class","svelte-khn038"),ke(b,"hide",t[0]!=="print"),E(r,"class","svelte-khn038")},m(S,F){M(document.head,e),R(S,n,F),R(S,r,F),Y(a,r,null),M(r,s),Y(o,r,null),M(r,l),M(r,c),Y(h,c,null),M(r,g),M(r,_),Y(v,_,null),M(r,$),M(r,b),Y(O,b,null),C=!0},p(S,[F]){F&1&&ke(c,"hide",S[0]!=="editor"),F&1&&ke(_,"hide",S[0]!=="json");const H={};F&2&&(H.ship=S[1]),O.$set(H),F&1&&ke(b,"hide",S[0]!=="print")},i(S){C||(K(a.$$.fragment,S),K(o.$$.fragment,S),K(h.$$.fragment,S),K(v.$$.fragment,S),K(O.$$.fragment,S),C=!0)},o(S){G(a.$$.fragment,S),G(o.$$.fragment,S),G(h.$$.fragment,S),G(v.$$.fragment,S),G(O.$$.fragment,S),C=!1},d(S){w(e),S&&w(n),S&&w(r),V(a),V(o),V(h),V(v),V(O)}}}function Xee(t,e,n){let r,a="editor";const{state:s}=tt("ship");ha(t,s,l=>n(1,r=l));const o=({detail:l})=>n(0,a=l);return t.$$.update=()=>{t.$$.dirty&1&&console.log(a)},[a,r,s,o]}class Jee extends oe{constructor(e){super();le(this,e,Xee,Zee,fe,{})}}function Qee(t){let e,n;return e=new Jee({}),{c(){k(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,a){Y(e,r,a),n=!0},p:Ie,i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ete(t){return ko("ship",_X()),[]}class ite extends oe{constructor(e){super();le(this,e,ete,Qee,fe,{})}}export{ite as default};