From 25731dcfd1d654535ba76b2cb9508786305f0b31 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Wed, 6 Apr 2022 21:13:02 -0400 Subject: [PATCH] pages release --- ...3edfd478.css => index.svelte-455f749d.css} | 2 +- docs/_app/chunks/index-3711c71a.js | 4 + docs/_app/chunks/index-68fa7044.js | 4 - .../{paths-5d155410.js => paths-5193a87e.js} | 2 +- ...e-7544dc29.js => error.svelte-a52588a9.js} | 2 +- ...-a7c34f1e.js => layout.svelte-4620a56f.js} | 2 +- docs/_app/manifest.json | 32 +- docs/_app/pages/index.svelte-87b4df47.js | 406 ++++++++++++++++++ docs/_app/pages/index.svelte-bdd7f07b.js | 56 --- .../{start-c91a3eca.js => start-91f194db.js} | 2 +- docs/_app/version.json | 2 +- docs/index.html | 8 +- src/lib/store/ship.js.orig | 53 +++ svelte.config.js.orig | 37 ++ 14 files changed, 526 insertions(+), 86 deletions(-) rename docs/_app/assets/pages/{index.svelte-3edfd478.css => index.svelte-455f749d.css} (98%) create mode 100644 docs/_app/chunks/index-3711c71a.js delete mode 100644 docs/_app/chunks/index-68fa7044.js rename docs/_app/chunks/{paths-5d155410.js => paths-5193a87e.js} (92%) rename docs/_app/{error.svelte-7544dc29.js => error.svelte-a52588a9.js} (95%) rename docs/_app/{layout.svelte-a7c34f1e.js => layout.svelte-4620a56f.js} (88%) create mode 100644 docs/_app/pages/index.svelte-87b4df47.js delete mode 100644 docs/_app/pages/index.svelte-bdd7f07b.js rename docs/_app/{start-c91a3eca.js => start-91f194db.js} (97%) create mode 100644 src/lib/store/ship.js.orig create mode 100644 svelte.config.js.orig diff --git a/docs/_app/assets/pages/index.svelte-3edfd478.css b/docs/_app/assets/pages/index.svelte-455f749d.css similarity index 98% rename from docs/_app/assets/pages/index.svelte-3edfd478.css rename to docs/_app/assets/pages/index.svelte-455f749d.css index 9d5608e..f94fcc5 100644 --- a/docs/_app/assets/pages/index.svelte-3edfd478.css +++ b/docs/_app/assets/pages/index.svelte-455f749d.css @@ -1 +1 @@ -@font-face{font-family:Faktos;font-style:normal;src:url(/aotds-docks/_app/assets/Faktos-34d5460e.ttf) format("truetype")}@font-face{font-family:Dosis;src:url(/aotds-docks/_app/assets/Dosis-VariableFont_wght-994868c0.ttf) format("truetype")}:root{--oxford-blue: hsla(226, 60%, 10%, 1);--royal-blue-dark: hsla(218, 100%, 16%, 1);--indigo-dye: hsla(209, 95%, 24%, 1);--cg-blue: hsla(193, 80%, 35%, 1);--white: hsla(20, 60%, 99%, 1);--main-width: 60em}small{font-size:var(--font-scale-9)}h1{margin:0;padding:0;font-size:var(--font-scale-14)}h2{font-size:var(--font-scale-12)}html,body{position:relative;width:100%;height:100%}body{background-color:var(--white);color:#333;margin:0;padding:8px;box-sizing:border-box;font-family:Dosis,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}a{color:#0064c8;text-decoration:none}a:hover{text-decoration:underline}a:visited{color:#0050a0}label{display:block}input,button,select,textarea{font-family:inherit;font-size:inherit;padding:.4em;margin:0 0 .5em;box-sizing:border-box;border:1px solid #ccc;border-radius:2px}input:disabled{color:#ccc}input[type=range]{height:0}input,select{border:0px;border-bottom:1px solid var(--indigo-dye)}input:focus,select:focus{border:1px solid var(--indigo-dye)}input.short{width:5em}/*! chota.css v0.7.2 | MIT License | github.com/jenil/chota */:root{--bg-color:#fff;--bg-secondary-color:#f3f3f6;--color-primary:#14854f;--color-lightGrey:#d2d6dd;--color-grey:#747681;--color-darkGrey:#3f4144;--color-error:#d43939;--color-success:#28bd14;--grid-maxWidth:120rem;--grid-gutter:2rem;--font-size:1.6rem;--font-color:#333;--font-family-sans:-apple-system,BlinkMacSystemFont,Avenir,"Avenir Next","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--font-family-mono:monaco,"Consolas","Lucida Console",monospace}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:62.5%;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}body{background-color:var(--bg-color);line-height:1.6;font-size:var(--font-size);color:var(--font-color);font-family:Segoe UI,Helvetica Neue,sans-serif;font-family:var(--font-family-sans);margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-weight:500;margin:.35em 0 .7em}h1{font-size:2em}h2{font-size:1.75em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.85em}a{color:var(--color-primary);text-decoration:none}a:hover:not(.button){opacity:.75}button{font-family:inherit}p{margin-top:0}blockquote{background-color:var(--bg-secondary-color);padding:1.5rem 2rem;border-left:3px solid var(--color-lightGrey)}dl dt{font-weight:700}hr{background-color:var(--color-lightGrey);height:1px;margin:1rem 0}hr,table{border:none}table{width:100%;border-collapse:collapse;border-spacing:0;text-align:left}table.striped tr:nth-of-type(2n){background-color:var(--bg-secondary-color)}td,th{vertical-align:middle;padding:1.2rem .4rem}thead{border-bottom:2px solid var(--color-lightGrey)}tfoot{border-top:2px solid var(--color-lightGrey)}code,kbd,pre,samp,tt{font-family:var(--font-family-mono)}code,kbd{font-size:90%;white-space:pre-wrap;border-radius:4px;padding:.2em .4em;color:var(--color-error)}code,kbd,pre{background-color:var(--bg-secondary-color)}pre{font-size:1em;padding:1rem;overflow-x:auto}pre code{background:none;padding:0}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}img{max-width:100%}fieldset{border:1px solid var(--color-lightGrey)}iframe{border:0}.container{max-width:var(--grid-maxWidth);margin:0 auto;width:96%;padding:0 calc(var(--grid-gutter)/2)}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-left:calc(var(--grid-gutter)/-2);margin-right:calc(var(--grid-gutter)/-2)}.row,.row.reverse{-webkit-box-orient:horizontal}.row.reverse{-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col{-webkit-box-flex:1;-ms-flex:1;flex:1}.col,[class*=" col-"],[class^=col-]{margin:0 calc(var(--grid-gutter)/2) calc(var(--grid-gutter)/2)}.col-1{-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-1,.col-2{-webkit-box-flex:0}.col-2{-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3{-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-3,.col-4{-webkit-box-flex:0}.col-4{-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5{-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-5,.col-6{-webkit-box-flex:0}.col-6{-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7{-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-7,.col-8{-webkit-box-flex:0}.col-8{-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9{-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-9,.col-10{-webkit-box-flex:0}.col-10{-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11{-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-11,.col-12{-webkit-box-flex:0}.col-12{-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}@media screen and (max-width:599px){.container{width:100%}.col,[class*=col-],[class^=col-]{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;max-width:100%}}@media screen and (min-width:900px){.col-1-md{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-md{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-md{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-md{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-md{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-md{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-md{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-md{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-md{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-md{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-md{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-md{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}@media screen and (min-width:1200px){.col-1-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}fieldset{padding:.5rem 2rem}legend{text-transform:uppercase;font-size:.8em;letter-spacing:.1rem}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),select,textarea,textarea[type=text]{font-family:inherit;padding:.8rem 1rem;border-radius:4px;border:1px solid var(--color-lightGrey);font-size:1em;-webkit-transition:all .2s ease;transition:all .2s ease;display:block;width:100%}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):not(:disabled):hover,select:hover,textarea:hover,textarea[type=text]:hover{border-color:var(--color-grey)}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,select:focus,textarea:focus,textarea[type=text]:focus{outline:none;border-color:var(--color-primary);-webkit-box-shadow:0 0 1px var(--color-primary);box-shadow:0 0 1px var(--color-primary)}input.error:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.error{border-color:var(--color-error)}input.success:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.success{border-color:var(--color-success)}select{-webkit-appearance:none;background:#f3f3f6 no-repeat 100%;background-size:1ex;background-origin:content-box;background-image:url("data:image/svg+xml;utf8,")}[type=checkbox],[type=radio]{width:1.6rem;height:1.6rem}.button,[type=button],[type=reset],[type=submit],button{padding:1rem 2.5rem;color:var(--color-darkGrey);background:var(--color-lightGrey);border-radius:4px;border:1px solid transparent;font-size:var(--font-size);line-height:1;text-align:center;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;text-decoration:none;-webkit-transform:scale(1);transform:scale(1);display:inline-block;cursor:pointer}.grouped{display:-webkit-box;display:-ms-flexbox;display:flex}.grouped>:not(:last-child){margin-right:16px}.grouped.gapless>*{margin:0 0 0 -1px!important;border-radius:0!important}.grouped.gapless>:first-child{margin:0!important;border-radius:4px 0 0 4px!important}.grouped.gapless>:last-child{border-radius:0 4px 4px 0!important}.button+.button{margin-left:1rem}.button:hover,[type=button]:hover,[type=reset]:hover,[type=submit]:hover,button:hover{opacity:.8}.button:active,[type=button]:active,[type=reset]:active,[type=submit]:active,button:active{-webkit-transform:scale(.98);transform:scale(.98)}button:disabled,button:disabled:hover,input:disabled,input:disabled:hover{opacity:.4;cursor:not-allowed}.button.dark,.button.error,.button.primary,.button.secondary,.button.success,[type=submit]{color:#fff;z-index:1;background-color:#000;background-color:var(--color-primary)}.button.secondary{background-color:var(--color-grey)}.button.dark{background-color:var(--color-darkGrey)}.button.error{background-color:var(--color-error)}.button.success{background-color:var(--color-success)}.button.outline{background-color:transparent;border-color:var(--color-lightGrey)}.button.outline.primary{border-color:var(--color-primary);color:var(--color-primary)}.button.outline.secondary{border-color:var(--color-grey);color:var(--color-grey)}.button.outline.dark{border-color:var(--color-darkGrey);color:var(--color-darkGrey)}.button.clear{background-color:transparent;border-color:transparent;color:var(--color-primary)}.button.icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.button.icon>img{margin-left:2px}.button.icon-only{padding:1rem}::-webkit-input-placeholder{color:#bdbfc4}::-moz-placeholder{color:#bdbfc4}:-ms-input-placeholder{color:#bdbfc4}::-ms-input-placeholder{color:#bdbfc4}::placeholder{color:#bdbfc4}.nav{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:5rem;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.nav img{max-height:3rem}.nav-center,.nav-left,.nav-right,.nav>.container{display:-webkit-box;display:-ms-flexbox;display:flex}.nav-center,.nav-left,.nav-right{-webkit-box-flex:1;-ms-flex:1;flex:1}.nav-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.nav-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.nav-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:480px){.nav,.nav>.container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.nav-center,.nav-left,.nav-right{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.nav .brand,.nav a{text-decoration:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1rem 2rem;color:var(--color-darkGrey)}.nav .active:not(.button){color:#000;color:var(--color-primary)}.nav .brand{font-size:1.75em;padding-top:0;padding-bottom:0}.nav .brand img{padding-right:1rem}.nav .button{margin:auto 1rem}.card{padding:1rem 2rem;border-radius:4px;background:var(--bg-color);-webkit-box-shadow:0 1px 3px var(--color-grey);box-shadow:0 1px 3px var(--color-grey)}.card p:last-child{margin:0}.card header>*{margin-top:0;margin-bottom:1rem}.tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.tabs a{text-decoration:none}.tabs>.dropdown>summary,.tabs>a{padding:1rem 2rem;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;color:var(--color-darkGrey);border-bottom:2px solid var(--color-lightGrey);text-align:center}.tabs>a.active,.tabs>a:hover{opacity:1;border-bottom:2px solid var(--color-darkGrey)}.tabs>a.active{border-color:var(--color-primary)}.tabs.is-full a{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.tag{display:inline-block;border:1px solid var(--color-lightGrey);text-transform:uppercase;color:var(--color-grey);padding:.5rem;line-height:1;letter-spacing:.5px}.tag.is-small{padding:.4rem;font-size:.75em}.tag.is-large{padding:.7rem;font-size:1.125em}.tag+.tag{margin-left:1rem}details.dropdown{position:relative;display:inline-block}details.dropdown>:last-child{position:absolute;left:0;white-space:nowrap}.bg-primary{background-color:var(--color-primary)!important}.bg-light{background-color:var(--color-lightGrey)!important}.bg-dark{background-color:var(--color-darkGrey)!important}.bg-grey{background-color:var(--color-grey)!important}.bg-error{background-color:var(--color-error)!important}.bg-success{background-color:var(--color-success)!important}.bd-primary{border:1px solid var(--color-primary)!important}.bd-light{border:1px solid var(--color-lightGrey)!important}.bd-dark{border:1px solid var(--color-darkGrey)!important}.bd-grey{border:1px solid var(--color-grey)!important}.bd-error{border:1px solid var(--color-error)!important}.bd-success{border:1px solid var(--color-success)!important}.text-primary{color:var(--color-primary)!important}.text-light{color:var(--color-lightGrey)!important}.text-dark{color:var(--color-darkGrey)!important}.text-grey{color:var(--color-grey)!important}.text-error{color:var(--color-error)!important}.text-success{color:var(--color-success)!important}.text-white{color:#fff!important}.pull-right{float:right!important}.pull-left{float:left!important}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-justify{text-align:justify}.text-uppercase{text-transform:uppercase}.text-lowercase{text-transform:lowercase}.text-capitalize{text-transform:capitalize}.is-full-screen{width:100%;min-height:100vh}.is-full-width{width:100%!important}.is-vertical-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-center,.is-horizontal-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.is-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.is-left,.is-right{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.is-fixed{position:fixed;width:100%}.is-paddingless{padding:0!important}.is-marginless{margin:0!important}.is-pointer{cursor:pointer!important}.is-rounded{border-radius:100%}.clearfix{content:"";display:table;clear:both}.is-hidden{display:none!important}@media screen and (max-width:599px){.hide-xs{display:none!important}}@media screen and (min-width:600px) and (max-width:899px){.hide-sm{display:none!important}}@media screen and (min-width:900px) and (max-width:1199px){.hide-md{display:none!important}}@media screen and (min-width:1200px){.hide-lg{display:none!important}}@media print{.hide-pr{display:none!important}}:root{--main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;--font-scale-9: .75rem;--font-scale-10: 1em;--font-scale-11: 1.333rem;--font-scale-12: 1.777rem;--font-scale-13: 2.369rem;--font-scale-14: 3.157rem;--font-scale-15: 4.209rem}input.short{width:5em!important}nav.svelte-a8gbht{width:100%;flex-direction:row}.nav-left{justify-content:flex-start}.nav-right{justify-content:flex-end}@keyframes svelte-1q4wean-spin{to{transform:rotate(360deg)}}@keyframes svelte-1q4wean-spin-inverse{to{transform:rotate(-360deg)}}svg.svelte-1q4wean.svelte-1q4wean{vertical-align:middle}span.svelte-1q4wean.svelte-1q4wean{display:inline-block;line-height:1}span.svelte-1q4wean img.svelte-1q4wean{padding:0;margin:0;vertical-align:middle}.spinCW.svelte-1q4wean.svelte-1q4wean{animation:svelte-1q4wean-spin linear 2s infinite;transform-origin:center}.spinCCW.svelte-1q4wean.svelte-1q4wean{animation:svelte-1q4wean-spin-inverse linear 2s infinite;transform-origin:center}@keyframes svelte-1o5ccdl-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading.svelte-1o5ccdl.svelte-1o5ccdl{color:transparent!important;min-height:.8rem;pointer-events:none;position:relative}.loading.svelte-1o5ccdl.svelte-1o5ccdl:after{animation:svelte-1o5ccdl-loading .5s infinite linear;border:.2rem solid #FFFFFF;border-radius:50%;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:.8rem;left:50%;margin-left:-.4rem;margin-top:-.4rem;position:absolute;top:50%;width:.8rem;z-index:1}.icon.svelte-1o5ccdl>.lefticon.svelte-1o5ccdl{margin:-10px 10px -10px 0}.icon.svelte-1o5ccdl>.righticon.svelte-1o5ccdl{margin:-10px 0 -10px 10px}.icon-only.svelte-1o5ccdl.svelte-1o5ccdl{padding:.5rem .65rem}summary.svelte-1o5ccdl.svelte-1o5ccdl,button.svelte-1o5ccdl.svelte-1o5ccdl{white-space:nowrap}summary.svelte-1o5ccdl.svelte-1o5ccdl::-webkit-details-marker{display:none}span.svelte-3bldsl{padding:1rem 2rem;flex:0 1 auto;color:var(--color-darkGrey);border-bottom:2px solid var(--color-lightGrey);text-align:center;cursor:pointer}span.active.svelte-3bldsl{opacity:1;border-bottom:2px solid var(--color-darkGrey);border-color:var(--color-primary)}.tabs.is-full span.svelte-3bldsl{flex:1 1 auto}summary.svelte-4ixea4{cursor:pointer}input[type=range].svelte-ovucoa::-moz-range-track,input[type=range].svelte-ovucoa::-webkit-slider-runnable-track{background-color:var(--color-primary)}p.svelte-3n5xjn{margin:0;padding:0}.message.svelte-3n5xjn{font-size:smaller}.grouped.svelte-3n5xjn:not(.gapless){overflow-x:auto}.container.svelte-4lwi8h{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:10000}.background.svelte-4lwi8h{position:fixed;top:0px;left:0px;width:100vw;height:100vh;background-color:#000;opacity:.5}.modal.svelte-4lwi8h{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-width:400px;background-color:#fff}h2.svelte-1mk8yef{margin-bottom:1em;font-size:var(--font-scale-14);font-family:Faktos}p.svelte-1mk8yef{margin-left:2em}header.svelte-uwt8cz.svelte-uwt8cz{display:flex;align-items:baseline;width:var(--main-width);margin-left:auto;margin-right:auto;margin-bottom:1em}h1.svelte-uwt8cz.svelte-uwt8cz,h2.svelte-uwt8cz.svelte-uwt8cz{text-align:left;font-family:Faktos;padding:0;margin:0}h1.svelte-uwt8cz.svelte-uwt8cz{font-size:var(--font-scale-15)}h2.svelte-uwt8cz.svelte-uwt8cz{flex:1;padding-left:1em;font-size:var(--font-scale-13)}header.svelte-uwt8cz>a.svelte-uwt8cz{margin:0 2em;font-size:var(--font-scale-10)}div.svelte-uwt8cz nav{margin-left:2em;margin-bottom:2em}div.svelte-uwt8cz nav span{font-weight:700;font-family:var(--main-font-family);font-size:var(--font-scale-12);margin-right:1em;padding-bottom:.125em!important}div.svelte-i3mp3j.svelte-i3mp3j{font-family:var(--main-font-family)}div.svelte-i3mp3j>*{margin-left:1em}div.svelte-i3mp3j>label.svelte-i3mp3j{margin-left:0}label.svelte-i3mp3j.svelte-i3mp3j{font-size:var(--font-scale-8);font-weight:lighter;font-family:Dosis;color:var(--indigo-dye)}div.svelte-fc2507{display:flex;align-items:end;gap:2em}input.svelte-apsdjz{width:5em;display:inline!important}.mass_symbol.svelte-apsdjz{width:.75em;display:inline-block;margin-left:.5em}.warning.svelte-apsdjz{color:red}.note.svelte-apsdjz{font-size:smaller}.mass.svelte-apsdjz,div.cost.svelte-apsdjz{padding:0 2em;justify-self:right}.mass.svelte-apsdjz{width:15em}div.cost.svelte-apsdjz{grid-column:3}span.cost.svelte-apsdjz:after{content:"\a4";margin-left:.5em}div.svelte-1p2uzx8{display:flex;grid-column:1 / span 3!important;align-items:baseline;gap:1em}h2.svelte-1p2uzx8{font-weight:700}hr.svelte-1p2uzx8{flex:1;background:#333}div.svelte-145f253.svelte-145f253{margin-bottom:1em}.cost.svelte-145f253.svelte-145f253,.mass.svelte-145f253.svelte-145f253{width:4em;padding:0 .5em;text-align:right}.ship-item.svelte-145f253.svelte-145f253{display:flex}.ship-item.svelte-145f253>*{flex:1}img.svelte-145f253.svelte-145f253{width:.75em}.cost.svelte-145f253.svelte-145f253:after{content:"\a4";margin-left:.5em}.mass.svelte-145f253 img.svelte-145f253{width:.75em;display:inline-block;margin-left:.5em}.updated{animation-name:svelte-145f253-update;animation-duration:1.5s;animation-fill-mode:forwards}@keyframes svelte-145f253-update{0%{color:inherit;font-weight:inherit}20%{color:red;font-weight:700}80%{color:red;font-weight:700}to{color:inherit;font-weight:inherit}}.ship-item.svelte-145f253.svelte-145f253{display:flex}.reqs.svelte-145f253.svelte-145f253{flex:0;width:10em;display:flex}div.svelte-1saxaj4{display:flex;align-items:end}label.svelte-1saxaj4{font-family:var(--main-font-family);margin-left:2em}input[type=number].svelte-1saxaj4{width:5em}label.svelte-9i3z5u{display:inline;margin-right:1em}input.svelte-1wwwskr{width:3em}div.svelte-1wwwskr{display:flex;gap:2em}input.svelte-ytqr7l{width:5em}.layers.svelte-n2prux{display:flex}input.svelte-n2prux{width:5em}div.svelte-x5copc{display:flex}label.svelte-x5copc{margin-left:1em}select.svelte-14clsel{width:inherit}input.svelte-oj0ytd{width:5em}select.svelte-e6kwbl{width:inherit;display:inline-block}path.svelte-jxsibt{fill:#d3d3d3;stroke:#fff;stroke-width:2px}path.svelte-jxsibt:hover{fill:pink}path.active.svelte-jxsibt:hover{fill:pink}path.active.svelte-jxsibt{fill:#313131}circle.svelte-1rig4e6{fill:#fff}.weapon_row.svelte-1y8jrjk{display:flex;align-items:center}.weapon_row.svelte-1y8jrjk>*{margin-right:2em}.identification-row.svelte-1xmntps{display:flex}.identification-row.svelte-1xmntps>*:first-child{flex:1}main.svelte-1xmntps{width:var(--main-width);margin-left:auto;margin-right:auto}div.svelte-1f6rwrs{position:relative}button.svelte-1f6rwrs{position:absolute;right:2em;top:1em}pre.svelte-1f6rwrs{font-family:monospace;font-size:var(--font-scale-10);overflow:scroll;height:90%}div.svelte-uinb9:after{content:"\a4";margin-left:.5em}img.svelte-vmvu0j{width:.75em;display:inline-block;margin-left:.5em}h1.svelte-1v8962g{width:100%;display:flex;font-size:var(--font-scale-8)}h2.svelte-1v8962g{font-size:var(--font-scale-7);flex:1}.fill.svelte-1v8962g{margin-left:.5em;display:inline-block;flex:1;border-bottom:1px solid black}.details.svelte-1v8962g{display:flex;align-items:baseline}.reqs.svelte-1v8962g{display:flex}.thrust.svelte-1kuvs8v{width:2em;background-size:2em;background-repeat:no-repeat;height:2em;line-height:2em;text-align:center}.main_systems.svelte-1kuvs8v{display:flex;align-items:center;gap:1em;justify-content:space-evenly;margin-top:1em}img.ftl.svelte-1kuvs8v,img.internal.svelte-1kuvs8v{height:2em}.row.svelte-1uhhjap{margin-bottom:.5em}.cell.svelte-1uhhjap{display:inline-block;margin-right:.5em;width:1.5em;height:1.5em;border:1px solid black}img.svelte-1uhhjap{width:1em;margin-left:.2em}.cell.svelte-86wmvt{display:inline-block;margin-right:.5em;width:1em;height:1em;border:1px solid black;border-radius:.5em}.layers.svelte-86wmvt{display:flex;flex-direction:column-reverse}div.svelte-1u8rlr5 path:hover{fill:#fff}div.svelte-1u8rlr5 path.active:hover{fill:#000}text.svelte-1u8rlr5{text-anchor:middle;dominant-baseline:central;font-size:var(--font-scale-10)}div.svelte-18nuiwu{margin-bottom:2em}.beams.svelte-18nuiwu{display:flex;justify-content:space-evenly}div.svelte-d2fjdl{display:flex;gap:.5em}img.firecon.svelte-d2fjdl,img.svelte-kh7po5{width:1em}div.svelte-kh7po5{display:flex;gap:.5em}div.svelte-pscno5{text-align:center;flex:1;display:flex;flex-direction:column;align-items:center}div.svelte-pscno5>*{margin-bottom:1em}.print-output.svelte-184q87j{width:4.25in;height:5.5in;border:1px solid black;padding:1em;margin:0 auto}.section-2.svelte-184q87j{display:flex;align-items:start;margin-right:2em;margin-left:2em}.notice.svelte-184q87j{font-style:italic;margin-top:1em;text-align:right}@media print{body>*{visibility:hidden}.print-output.svelte-184q87j{visibility:visible}}.hide.svelte-khn038{display:none}main.svelte-khn038{width:var(--main-width);margin-right:auto;margin-left:auto} +@font-face{font-family:Faktos;font-style:normal;src:url(/aotds-docks/_app/assets/Faktos-34d5460e.ttf) format("truetype")}@font-face{font-family:Dosis;src:url(/aotds-docks/_app/assets/Dosis-VariableFont_wght-994868c0.ttf) format("truetype")}:root{--oxford-blue: hsla(226, 60%, 10%, 1);--royal-blue-dark: hsla(218, 100%, 16%, 1);--indigo-dye: hsla(209, 95%, 24%, 1);--cg-blue: hsla(193, 80%, 35%, 1);--white: hsla(20, 60%, 99%, 1);--main-width: 60em}small{font-size:var(--font-scale-9)}h1{margin:0;padding:0;font-size:var(--font-scale-14)}h2{font-size:var(--font-scale-12)}html,body{position:relative;width:100%;height:100%}body{background-color:var(--white);color:#333;margin:0;padding:8px;box-sizing:border-box;font-family:Dosis,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}a{color:#0064c8;text-decoration:none}a:hover{text-decoration:underline}a:visited{color:#0050a0}label{display:block}input,button,select,textarea{font-family:inherit;font-size:inherit;padding:.4em;margin:0 0 .5em;box-sizing:border-box;border:1px solid #ccc;border-radius:2px}input:disabled{color:#ccc}input[type=range]{height:0}input,select{border:0px;border-bottom:1px solid var(--indigo-dye)}input:focus,select:focus{border:1px solid var(--indigo-dye)}input.short{width:5em}/*! chota.css v0.7.2 | MIT License | github.com/jenil/chota */:root{--bg-color:#fff;--bg-secondary-color:#f3f3f6;--color-primary:#14854f;--color-lightGrey:#d2d6dd;--color-grey:#747681;--color-darkGrey:#3f4144;--color-error:#d43939;--color-success:#28bd14;--grid-maxWidth:120rem;--grid-gutter:2rem;--font-size:1.6rem;--font-color:#333;--font-family-sans:-apple-system,BlinkMacSystemFont,Avenir,"Avenir Next","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--font-family-mono:monaco,"Consolas","Lucida Console",monospace}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:62.5%;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}body{background-color:var(--bg-color);line-height:1.6;font-size:var(--font-size);color:var(--font-color);font-family:Segoe UI,Helvetica Neue,sans-serif;font-family:var(--font-family-sans);margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-weight:500;margin:.35em 0 .7em}h1{font-size:2em}h2{font-size:1.75em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.85em}a{color:var(--color-primary);text-decoration:none}a:hover:not(.button){opacity:.75}button{font-family:inherit}p{margin-top:0}blockquote{background-color:var(--bg-secondary-color);padding:1.5rem 2rem;border-left:3px solid var(--color-lightGrey)}dl dt{font-weight:700}hr{background-color:var(--color-lightGrey);height:1px;margin:1rem 0}hr,table{border:none}table{width:100%;border-collapse:collapse;border-spacing:0;text-align:left}table.striped tr:nth-of-type(2n){background-color:var(--bg-secondary-color)}td,th{vertical-align:middle;padding:1.2rem .4rem}thead{border-bottom:2px solid var(--color-lightGrey)}tfoot{border-top:2px solid var(--color-lightGrey)}code,kbd,pre,samp,tt{font-family:var(--font-family-mono)}code,kbd{font-size:90%;white-space:pre-wrap;border-radius:4px;padding:.2em .4em;color:var(--color-error)}code,kbd,pre{background-color:var(--bg-secondary-color)}pre{font-size:1em;padding:1rem;overflow-x:auto}pre code{background:none;padding:0}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}img{max-width:100%}fieldset{border:1px solid var(--color-lightGrey)}iframe{border:0}.container{max-width:var(--grid-maxWidth);margin:0 auto;width:96%;padding:0 calc(var(--grid-gutter)/2)}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-left:calc(var(--grid-gutter)/-2);margin-right:calc(var(--grid-gutter)/-2)}.row,.row.reverse{-webkit-box-orient:horizontal}.row.reverse{-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col{-webkit-box-flex:1;-ms-flex:1;flex:1}.col,[class*=" col-"],[class^=col-]{margin:0 calc(var(--grid-gutter)/2) calc(var(--grid-gutter)/2)}.col-1{-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-1,.col-2{-webkit-box-flex:0}.col-2{-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3{-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-3,.col-4{-webkit-box-flex:0}.col-4{-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5{-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-5,.col-6{-webkit-box-flex:0}.col-6{-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7{-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-7,.col-8{-webkit-box-flex:0}.col-8{-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9{-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-9,.col-10{-webkit-box-flex:0}.col-10{-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11{-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-11,.col-12{-webkit-box-flex:0}.col-12{-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}@media screen and (max-width:599px){.container{width:100%}.col,[class*=col-],[class^=col-]{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;max-width:100%}}@media screen and (min-width:900px){.col-1-md{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-md{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-md{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-md{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-md{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-md{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-md{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-md{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-md{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-md{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-md{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-md{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}@media screen and (min-width:1200px){.col-1-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}fieldset{padding:.5rem 2rem}legend{text-transform:uppercase;font-size:.8em;letter-spacing:.1rem}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),select,textarea,textarea[type=text]{font-family:inherit;padding:.8rem 1rem;border-radius:4px;border:1px solid var(--color-lightGrey);font-size:1em;-webkit-transition:all .2s ease;transition:all .2s ease;display:block;width:100%}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):not(:disabled):hover,select:hover,textarea:hover,textarea[type=text]:hover{border-color:var(--color-grey)}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,select:focus,textarea:focus,textarea[type=text]:focus{outline:none;border-color:var(--color-primary);-webkit-box-shadow:0 0 1px var(--color-primary);box-shadow:0 0 1px var(--color-primary)}input.error:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.error{border-color:var(--color-error)}input.success:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.success{border-color:var(--color-success)}select{-webkit-appearance:none;background:#f3f3f6 no-repeat 100%;background-size:1ex;background-origin:content-box;background-image:url("data:image/svg+xml;utf8,")}[type=checkbox],[type=radio]{width:1.6rem;height:1.6rem}.button,[type=button],[type=reset],[type=submit],button{padding:1rem 2.5rem;color:var(--color-darkGrey);background:var(--color-lightGrey);border-radius:4px;border:1px solid transparent;font-size:var(--font-size);line-height:1;text-align:center;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;text-decoration:none;-webkit-transform:scale(1);transform:scale(1);display:inline-block;cursor:pointer}.grouped{display:-webkit-box;display:-ms-flexbox;display:flex}.grouped>:not(:last-child){margin-right:16px}.grouped.gapless>*{margin:0 0 0 -1px!important;border-radius:0!important}.grouped.gapless>:first-child{margin:0!important;border-radius:4px 0 0 4px!important}.grouped.gapless>:last-child{border-radius:0 4px 4px 0!important}.button+.button{margin-left:1rem}.button:hover,[type=button]:hover,[type=reset]:hover,[type=submit]:hover,button:hover{opacity:.8}.button:active,[type=button]:active,[type=reset]:active,[type=submit]:active,button:active{-webkit-transform:scale(.98);transform:scale(.98)}button:disabled,button:disabled:hover,input:disabled,input:disabled:hover{opacity:.4;cursor:not-allowed}.button.dark,.button.error,.button.primary,.button.secondary,.button.success,[type=submit]{color:#fff;z-index:1;background-color:#000;background-color:var(--color-primary)}.button.secondary{background-color:var(--color-grey)}.button.dark{background-color:var(--color-darkGrey)}.button.error{background-color:var(--color-error)}.button.success{background-color:var(--color-success)}.button.outline{background-color:transparent;border-color:var(--color-lightGrey)}.button.outline.primary{border-color:var(--color-primary);color:var(--color-primary)}.button.outline.secondary{border-color:var(--color-grey);color:var(--color-grey)}.button.outline.dark{border-color:var(--color-darkGrey);color:var(--color-darkGrey)}.button.clear{background-color:transparent;border-color:transparent;color:var(--color-primary)}.button.icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.button.icon>img{margin-left:2px}.button.icon-only{padding:1rem}::-webkit-input-placeholder{color:#bdbfc4}::-moz-placeholder{color:#bdbfc4}:-ms-input-placeholder{color:#bdbfc4}::-ms-input-placeholder{color:#bdbfc4}::placeholder{color:#bdbfc4}.nav{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:5rem;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.nav img{max-height:3rem}.nav-center,.nav-left,.nav-right,.nav>.container{display:-webkit-box;display:-ms-flexbox;display:flex}.nav-center,.nav-left,.nav-right{-webkit-box-flex:1;-ms-flex:1;flex:1}.nav-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.nav-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.nav-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:480px){.nav,.nav>.container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.nav-center,.nav-left,.nav-right{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.nav .brand,.nav a{text-decoration:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1rem 2rem;color:var(--color-darkGrey)}.nav .active:not(.button){color:#000;color:var(--color-primary)}.nav .brand{font-size:1.75em;padding-top:0;padding-bottom:0}.nav .brand img{padding-right:1rem}.nav .button{margin:auto 1rem}.card{padding:1rem 2rem;border-radius:4px;background:var(--bg-color);-webkit-box-shadow:0 1px 3px var(--color-grey);box-shadow:0 1px 3px var(--color-grey)}.card p:last-child{margin:0}.card header>*{margin-top:0;margin-bottom:1rem}.tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.tabs a{text-decoration:none}.tabs>.dropdown>summary,.tabs>a{padding:1rem 2rem;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;color:var(--color-darkGrey);border-bottom:2px solid var(--color-lightGrey);text-align:center}.tabs>a.active,.tabs>a:hover{opacity:1;border-bottom:2px solid var(--color-darkGrey)}.tabs>a.active{border-color:var(--color-primary)}.tabs.is-full a{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.tag{display:inline-block;border:1px solid var(--color-lightGrey);text-transform:uppercase;color:var(--color-grey);padding:.5rem;line-height:1;letter-spacing:.5px}.tag.is-small{padding:.4rem;font-size:.75em}.tag.is-large{padding:.7rem;font-size:1.125em}.tag+.tag{margin-left:1rem}details.dropdown{position:relative;display:inline-block}details.dropdown>:last-child{position:absolute;left:0;white-space:nowrap}.bg-primary{background-color:var(--color-primary)!important}.bg-light{background-color:var(--color-lightGrey)!important}.bg-dark{background-color:var(--color-darkGrey)!important}.bg-grey{background-color:var(--color-grey)!important}.bg-error{background-color:var(--color-error)!important}.bg-success{background-color:var(--color-success)!important}.bd-primary{border:1px solid var(--color-primary)!important}.bd-light{border:1px solid var(--color-lightGrey)!important}.bd-dark{border:1px solid var(--color-darkGrey)!important}.bd-grey{border:1px solid var(--color-grey)!important}.bd-error{border:1px solid var(--color-error)!important}.bd-success{border:1px solid var(--color-success)!important}.text-primary{color:var(--color-primary)!important}.text-light{color:var(--color-lightGrey)!important}.text-dark{color:var(--color-darkGrey)!important}.text-grey{color:var(--color-grey)!important}.text-error{color:var(--color-error)!important}.text-success{color:var(--color-success)!important}.text-white{color:#fff!important}.pull-right{float:right!important}.pull-left{float:left!important}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-justify{text-align:justify}.text-uppercase{text-transform:uppercase}.text-lowercase{text-transform:lowercase}.text-capitalize{text-transform:capitalize}.is-full-screen{width:100%;min-height:100vh}.is-full-width{width:100%!important}.is-vertical-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-center,.is-horizontal-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.is-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.is-left,.is-right{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.is-fixed{position:fixed;width:100%}.is-paddingless{padding:0!important}.is-marginless{margin:0!important}.is-pointer{cursor:pointer!important}.is-rounded{border-radius:100%}.clearfix{content:"";display:table;clear:both}.is-hidden{display:none!important}@media screen and (max-width:599px){.hide-xs{display:none!important}}@media screen and (min-width:600px) and (max-width:899px){.hide-sm{display:none!important}}@media screen and (min-width:900px) and (max-width:1199px){.hide-md{display:none!important}}@media screen and (min-width:1200px){.hide-lg{display:none!important}}@media print{.hide-pr{display:none!important}}:root{--main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;--font-scale-9: .75rem;--font-scale-10: 1em;--font-scale-11: 1.333rem;--font-scale-12: 1.777rem;--font-scale-13: 2.369rem;--font-scale-14: 3.157rem;--font-scale-15: 4.209rem}input.short{width:5em!important}nav.svelte-a8gbht{width:100%;flex-direction:row}.nav-left{justify-content:flex-start}.nav-right{justify-content:flex-end}@keyframes svelte-1q4wean-spin{to{transform:rotate(360deg)}}@keyframes svelte-1q4wean-spin-inverse{to{transform:rotate(-360deg)}}svg.svelte-1q4wean.svelte-1q4wean{vertical-align:middle}span.svelte-1q4wean.svelte-1q4wean{display:inline-block;line-height:1}span.svelte-1q4wean img.svelte-1q4wean{padding:0;margin:0;vertical-align:middle}.spinCW.svelte-1q4wean.svelte-1q4wean{animation:svelte-1q4wean-spin linear 2s infinite;transform-origin:center}.spinCCW.svelte-1q4wean.svelte-1q4wean{animation:svelte-1q4wean-spin-inverse linear 2s infinite;transform-origin:center}@keyframes svelte-1o5ccdl-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading.svelte-1o5ccdl.svelte-1o5ccdl{color:transparent!important;min-height:.8rem;pointer-events:none;position:relative}.loading.svelte-1o5ccdl.svelte-1o5ccdl:after{animation:svelte-1o5ccdl-loading .5s infinite linear;border:.2rem solid #FFFFFF;border-radius:50%;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:.8rem;left:50%;margin-left:-.4rem;margin-top:-.4rem;position:absolute;top:50%;width:.8rem;z-index:1}.icon.svelte-1o5ccdl>.lefticon.svelte-1o5ccdl{margin:-10px 10px -10px 0}.icon.svelte-1o5ccdl>.righticon.svelte-1o5ccdl{margin:-10px 0 -10px 10px}.icon-only.svelte-1o5ccdl.svelte-1o5ccdl{padding:.5rem .65rem}summary.svelte-1o5ccdl.svelte-1o5ccdl,button.svelte-1o5ccdl.svelte-1o5ccdl{white-space:nowrap}summary.svelte-1o5ccdl.svelte-1o5ccdl::-webkit-details-marker{display:none}span.svelte-3bldsl{padding:1rem 2rem;flex:0 1 auto;color:var(--color-darkGrey);border-bottom:2px solid var(--color-lightGrey);text-align:center;cursor:pointer}span.active.svelte-3bldsl{opacity:1;border-bottom:2px solid var(--color-darkGrey);border-color:var(--color-primary)}.tabs.is-full span.svelte-3bldsl{flex:1 1 auto}summary.svelte-4ixea4{cursor:pointer}input[type=range].svelte-ovucoa::-moz-range-track,input[type=range].svelte-ovucoa::-webkit-slider-runnable-track{background-color:var(--color-primary)}p.svelte-3n5xjn{margin:0;padding:0}.message.svelte-3n5xjn{font-size:smaller}.grouped.svelte-3n5xjn:not(.gapless){overflow-x:auto}.container.svelte-4lwi8h{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:10000}.background.svelte-4lwi8h{position:fixed;top:0px;left:0px;width:100vw;height:100vh;background-color:#000;opacity:.5}.modal.svelte-4lwi8h{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-width:400px;background-color:#fff}h2.svelte-1mk8yef{margin-bottom:1em;font-size:var(--font-scale-14);font-family:Faktos}p.svelte-1mk8yef{margin-left:2em}header.svelte-uwt8cz.svelte-uwt8cz{display:flex;align-items:baseline;width:var(--main-width);margin-left:auto;margin-right:auto;margin-bottom:1em}h1.svelte-uwt8cz.svelte-uwt8cz,h2.svelte-uwt8cz.svelte-uwt8cz{text-align:left;font-family:Faktos;padding:0;margin:0}h1.svelte-uwt8cz.svelte-uwt8cz{font-size:var(--font-scale-15)}h2.svelte-uwt8cz.svelte-uwt8cz{flex:1;padding-left:1em;font-size:var(--font-scale-13)}header.svelte-uwt8cz>a.svelte-uwt8cz{margin:0 2em;font-size:var(--font-scale-10)}div.svelte-uwt8cz nav{margin-left:2em;margin-bottom:2em}div.svelte-uwt8cz nav span{font-weight:700;font-family:var(--main-font-family);font-size:var(--font-scale-12);margin-right:1em;padding-bottom:.125em!important}div.svelte-i3mp3j.svelte-i3mp3j{font-family:var(--main-font-family)}div.svelte-i3mp3j>*{margin-left:1em}div.svelte-i3mp3j>label.svelte-i3mp3j{margin-left:0}label.svelte-i3mp3j.svelte-i3mp3j{font-size:var(--font-scale-8);font-weight:lighter;font-family:Dosis;color:var(--indigo-dye)}div.svelte-fc2507{display:flex;align-items:end;gap:2em}input.svelte-apsdjz{width:5em;display:inline!important}.mass_symbol.svelte-apsdjz{width:.75em;display:inline-block;margin-left:.5em}.warning.svelte-apsdjz{color:red}.note.svelte-apsdjz{font-size:smaller}.mass.svelte-apsdjz,div.cost.svelte-apsdjz{padding:0 2em;justify-self:right}.mass.svelte-apsdjz{width:15em}div.cost.svelte-apsdjz{grid-column:3}span.cost.svelte-apsdjz:after{content:"\a4";margin-left:.5em}div.svelte-1p2uzx8{display:flex;grid-column:1 / span 3!important;align-items:baseline;gap:1em}h2.svelte-1p2uzx8{font-weight:700}hr.svelte-1p2uzx8{flex:1;background:#333}div.svelte-145f253.svelte-145f253{margin-bottom:1em}.cost.svelte-145f253.svelte-145f253,.mass.svelte-145f253.svelte-145f253{width:4em;padding:0 .5em;text-align:right}.ship-item.svelte-145f253.svelte-145f253{display:flex}.ship-item.svelte-145f253>*{flex:1}img.svelte-145f253.svelte-145f253{width:.75em}.cost.svelte-145f253.svelte-145f253:after{content:"\a4";margin-left:.5em}.mass.svelte-145f253 img.svelte-145f253{width:.75em;display:inline-block;margin-left:.5em}.updated{animation-name:svelte-145f253-update;animation-duration:1.5s;animation-fill-mode:forwards}@keyframes svelte-145f253-update{0%{color:inherit;font-weight:inherit}20%{color:red;font-weight:700}80%{color:red;font-weight:700}to{color:inherit;font-weight:inherit}}.ship-item.svelte-145f253.svelte-145f253{display:flex}.reqs.svelte-145f253.svelte-145f253{flex:0;width:10em;display:flex}div.svelte-1saxaj4{display:flex;align-items:end}label.svelte-1saxaj4{font-family:var(--main-font-family);margin-left:2em}input[type=number].svelte-1saxaj4{width:5em}label.svelte-9i3z5u{display:inline;margin-right:1em}input.svelte-1wwwskr{width:3em}div.svelte-1wwwskr{display:flex;gap:2em}input.svelte-ytqr7l{width:5em}.layers.svelte-n2prux{display:flex}input.svelte-n2prux{width:5em}div.svelte-x5copc{display:flex}label.svelte-x5copc{margin-left:1em}select.svelte-14clsel{width:inherit}input.svelte-oj0ytd{width:5em}select.svelte-e6kwbl{width:inherit;display:inline-block}path.svelte-jxsibt{fill:#d3d3d3;stroke:#fff;stroke-width:2px}path.svelte-jxsibt:hover{fill:pink}path.active.svelte-jxsibt:hover{fill:pink}path.active.svelte-jxsibt{fill:#313131}circle.svelte-1rig4e6{fill:#fff}.weapon_row.svelte-1y8jrjk{display:flex;align-items:center}.weapon_row.svelte-1y8jrjk>*{margin-right:2em}.identification-row.svelte-1xmntps{display:flex}.identification-row.svelte-1xmntps>*:first-child{flex:1}main.svelte-1xmntps{width:var(--main-width);margin-left:auto;margin-right:auto}div.svelte-1f6rwrs{position:relative}button.svelte-1f6rwrs{position:absolute;right:2em;top:1em}pre.svelte-1f6rwrs{font-family:monospace;font-size:var(--font-scale-10);overflow:scroll;height:90%}div.svelte-uinb9:after{content:"\a4";margin-left:.5em}img.svelte-vmvu0j{width:.75em;display:inline-block;margin-left:.5em}h1.svelte-1v8962g{width:100%;display:flex;font-size:var(--font-scale-8)}h2.svelte-1v8962g{font-size:var(--font-scale-7);flex:1}.fill.svelte-1v8962g{margin-left:.5em;display:inline-block;flex:1;border-bottom:1px solid black}.details.svelte-1v8962g{display:flex;align-items:baseline}.reqs.svelte-1v8962g{display:flex}.thrust.svelte-1kuvs8v{width:2em;background-size:2em;background-repeat:no-repeat;height:2em;line-height:2em;text-align:center}.main_systems.svelte-1kuvs8v{display:flex;align-items:center;gap:1em;justify-content:space-evenly;margin-top:1em}img.ftl.svelte-1kuvs8v,img.internal.svelte-1kuvs8v{height:2em}.row.svelte-1uhhjap{margin-bottom:.5em}.cell.svelte-1uhhjap{display:inline-block;margin-right:.5em;width:1.5em;height:1.5em;border:1px solid black}img.svelte-1uhhjap{width:1em;margin-left:.2em}.cell.svelte-86wmvt{display:inline-block;margin-right:.5em;width:1em;height:1em;border:1px solid black;border-radius:.5em}.layers.svelte-86wmvt{display:flex;flex-direction:column-reverse}div.svelte-1u8rlr5 path:hover{fill:#fff}div.svelte-1u8rlr5 path.active:hover{fill:#000}text.svelte-1u8rlr5{text-anchor:middle;dominant-baseline:central;font-size:var(--font-scale-10)}div.svelte-18nuiwu{margin-bottom:2em}.beams.svelte-18nuiwu{display:flex;justify-content:space-evenly}div.svelte-d2fjdl{display:flex;gap:.5em}img.firecon.svelte-d2fjdl,img.svelte-kh7po5{width:1em}div.svelte-kh7po5{display:flex;gap:.5em}div.svelte-pscno5{text-align:center;flex:1;display:flex;flex-direction:column;align-items:center}div.svelte-pscno5>*{margin-bottom:1em}.print-output.svelte-ow56hf{width:4.25in;height:5.5in;border:1px solid black;padding:1em;margin:0 auto}.section-2.svelte-ow56hf{display:flex;align-items:start;margin-right:2em;margin-left:2em}.notice.svelte-ow56hf{font-style:italic;margin-top:1em;text-align:right}@media print{body>*{visibility:hidden}.print-output.svelte-ow56hf{visibility:visible}}.hide.svelte-khn038{display:none}main.svelte-khn038{width:var(--main-width);margin-right:auto;margin-left:auto} diff --git a/docs/_app/chunks/index-3711c71a.js b/docs/_app/chunks/index-3711c71a.js new file mode 100644 index 0000000..14d5944 --- /dev/null +++ b/docs/_app/chunks/index-3711c71a.js @@ -0,0 +1,4 @@ +function S(){}const _t=t=>t;function dt(t,e){for(const n in e)t[n]=e[n];return t}function Z(t){return t()}function V(){return Object.create(null)}function A(t){t.forEach(Z)}function J(t){return typeof t=="function"}function Ht(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let O;function Ut(t,e){return O||(O=document.createElement("a")),O.href=e,t===O.href}function ht(t){return Object.keys(t).length===0}function mt(t,...e){if(t==null)return S;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Wt(t,e,n){t.$$.on_destroy.push(mt(e,n))}function Gt(t,e,n,i){if(t){const r=tt(t,e,n,i);return t[0](r)}}function tt(t,e,n,i){return t[1]&&i?dt(n.ctx.slice(),t[1](i(e))):n.ctx}function Jt(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const l=[],s=Math.max(e.dirty.length,r.length);for(let o=0;o32){const e=[],n=t.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),K=et?t=>requestAnimationFrame(t):S;const E=new Set;function nt(t){E.forEach(e=>{e.c(t)||(E.delete(e),e.f())}),E.size!==0&&K(nt)}function yt(t){let e;return E.size===0&&K(nt),{promise:new Promise(n=>{E.add(e={c:t,f:n})}),abort(){E.delete(e)}}}let F=!1;function gt(){F=!0}function bt(){F=!1}function $t(t,e,n,i){for(;t>1);n(r)<=i?t=r+1:e=r}return t}function xt(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const c=[];for(let a=0;a0&&e[n[r]].claim_order<=a?r+1:$t(1,r,u=>e[n[u]].claim_order,a))-1;i[c]=n[d]+1;const f=d+1;n[f]=c,r=Math.max(f,r)}const l=[],s=[];let o=e.length-1;for(let c=n[r]+1;c!=0;c=i[c-1]){for(l.push(e[c-1]);o>=c;o--)s.push(e[o]);o--}for(;o>=0;o--)s.push(e[o]);l.reverse(),s.sort((c,a)=>c.claim_order-a.claim_order);for(let c=0,a=0;c=l[a].claim_order;)a++;const d=at.removeEventListener(e,n,i)}function re(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Nt(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ce(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set?t[i]=e[i]:Nt(t,i,e[i])}function oe(t){return t===""?null:+t}function jt(t){return Array.from(t.childNodes)}function Ct(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function rt(t,e,n,i,r=!1){Ct(t);const l=(()=>{for(let s=t.claim_info.last_index;s=0;s--){const o=t[s];if(e(o)){const c=n(o);return c===void 0?t.splice(s,1):t[s]=c,r?c===void 0&&t.claim_info.last_index--:t.claim_info.last_index=s,o}}return i()})();return l.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,l}function ct(t,e,n,i){return rt(t,r=>r.nodeName===e,r=>{const l=[];for(let s=0;sr.removeAttribute(s))},()=>i(e))}function le(t,e,n){return ct(t,e,n,st)}function ae(t,e,n){return ct(t,e,n,At)}function Mt(t,e){return rt(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>Q(e),!0)}function ue(t){return Mt(t," ")}function fe(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _e(t,e){t.value=e==null?"":e}function de(t,e,n,i){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function he(t,e){for(let n=0;n>>0}function qt(t,e){const n={stylesheet:vt(e),rules:{}};return L.set(t,n),n}function X(t,e,n,i,r,l,s,o=0){const c=16.666/i;let a=`{ +`;for(let p=0;p<=1;p+=c){const g=e+(n-e)*l(p);a+=p*100+`%{${s(g,1-g)}} +`}const d=a+`100% {${s(n,1-n)}} +}`,f=`__svelte_${Dt(d)}_${o}`,u=it(t),{stylesheet:h,rules:_}=L.get(u)||qt(u,t);_[f]||(_[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${f} ${i}ms linear ${r}ms 1 both`,z+=1,f}function Ot(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),z-=r,z||Pt())}function Pt(){K(()=>{z||(L.forEach(t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}}),L.clear())})}let M;function C(t){M=t}function k(){if(!M)throw new Error("Function called outside component initialization");return M}function ge(t){k().$$.before_update.push(t)}function be(t){k().$$.on_mount.push(t)}function $e(t){k().$$.after_update.push(t)}function xe(t){k().$$.on_destroy.push(t)}function we(){const t=k();return(e,n)=>{const i=t.$$.callbacks[e];if(i){const r=ot(e,n);i.slice().forEach(l=>{l.call(t,r)})}}}function ve(t,e){k().$$.context.set(t,e)}function ke(t){return k().$$.context.get(t)}function Ee(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const j=[],Y=[],R=[],W=[],lt=Promise.resolve();let G=!1;function at(){G||(G=!0,lt.then(ut))}function Se(){return at(),lt}function B(t){R.push(t)}function Ae(t){W.push(t)}const H=new Set;let P=0;function ut(){const t=M;do{for(;P{N=null})),N}function U(t,e,n){t.dispatchEvent(ot(`${e?"intro":"outro"}${n}`))}const T=new Set;let x;function Ne(){x={r:0,c:[],p:x}}function je(){x.r||A(x.c),x=x.p}function ft(t,e){t&&t.i&&(T.delete(t),t.i(e))}function Lt(t,e,n,i){if(t&&t.o){if(T.has(t))return;T.add(t),x.c.push(()=>{T.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}const zt={duration:0};function Ce(t,e,n,i){let r=e(t,n),l=i?0:1,s=null,o=null,c=null;function a(){c&&Ot(t,c)}function d(u,h){const _=u.b-l;return h*=Math.abs(_),{a:l,b:u.b,d:_,duration:h,start:u.start,end:u.start+h,group:u.group}}function f(u){const{delay:h=0,duration:_=300,easing:y=_t,tick:p=S,css:g}=r||zt,w={start:pt()+h,b:u};u||(w.group=x,x.r+=1),s||o?o=w:(g&&(a(),c=X(t,l,u,_,h,y,g)),u&&p(0,1),s=d(w,_),B(()=>U(t,u,"start")),yt(v=>{if(o&&v>o.start&&(s=d(o,_),o=null,U(t,s.b,"start"),g&&(a(),c=X(t,l,s.b,s.duration,0,y,r.css))),s){if(v>=s.end)p(l=s.b,1-l),U(t,s.b,"end"),o||(s.b?a():--s.group.r||A(s.group.c)),s=null;else if(v>=s.start){const D=v-s.start;l=s.a+s.d*y(D/s.duration),p(l,1-l)}}return!!(s||o)}))}return{run(u){J(r)?Tt().then(()=>{r=r(),f(u)}):f(u)},end(){a(),s=o=null}}}function Me(t,e){t.d(1),e.delete(t.key)}function De(t,e){Lt(t,1,1,()=>{e.delete(t.key)})}function qe(t,e,n,i,r,l,s,o,c,a,d,f){let u=t.length,h=l.length,_=u;const y={};for(;_--;)y[t[_].key]=_;const p=[],g=new Map,w=new Map;for(_=h;_--;){const m=f(r,l,_),b=n(m);let $=s.get(b);$?i&&$.p(m,e):($=a(b,m),$.c()),g.set(b,p[_]=$),b in y&&w.set(b,Math.abs(_-y[b]))}const v=new Set,D=new Set;function I(m){ft(m,1),m.m(o,d),s.set(m.key,m),d=m.first,h--}for(;u&&h;){const m=p[h-1],b=t[u-1],$=m.key,q=b.key;m===b?(d=m.first,u--,h--):g.has(q)?!s.has($)||v.has($)?I(m):D.has(q)?u--:w.get($)>w.get(q)?(D.add($),I(m)):(v.add(q),u--):(c(b,s),u--)}for(;u--;){const m=t[u];g.has(m.key)||c(m,s)}for(;h;)I(p[h-1]);return p}function Oe(t,e){const n={},i={},r={$$scope:1};let l=t.length;for(;l--;){const s=t[l],o=e[l];if(o){for(const c in s)c in o||(i[c]=1);for(const c in o)r[c]||(n[c]=o[c],r[c]=1);t[l]=o}else for(const c in s)r[c]=1}for(const s in i)s in n||(n[s]=void 0);return n}function Pe(t){return typeof t=="object"&&t!==null?t:{}}function Re(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Te(t){t&&t.c()}function Le(t,e){t&&t.l(e)}function Bt(t,e,n,i){const{fragment:r,on_mount:l,on_destroy:s,after_update:o}=t.$$;r&&r.m(e,n),i||B(()=>{const c=l.map(Z).filter(J);s?s.push(...c):A(c),t.$$.on_mount=[]}),o.forEach(B)}function Ft(t,e){const n=t.$$;n.fragment!==null&&(A(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function It(t,e){t.$$.dirty[0]===-1&&(j.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const _=h.length?h[0]:u;return a.ctx&&r(a.ctx[f],a.ctx[f]=_)&&(!a.skip_bound&&a.bound[f]&&a.bound[f](_),d&&It(t,f)),u}):[],a.update(),d=!0,A(a.before_update),a.fragment=i?i(a.ctx):!1,e.target){if(e.hydrate){gt();const f=jt(e.target);a.fragment&&a.fragment.l(f),f.forEach(St)}else a.fragment&&a.fragment.c();e.intro&&ft(t.$$.fragment),Bt(t,e.target,e.anchor,e.customElement),bt(),ut()}C(c)}class Be{$destroy(){Ft(this,1),this.$destroy=S}$on(e,n){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!ht(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}export{B as $,Pe as A,Ft as B,dt as C,Se as D,S as E,mt as F,A as G,J as H,Gt as I,Kt as J,Qt as K,Jt as L,Et as M,se as N,Ee as O,k as P,ce as Q,pe as R,Be as S,Zt as T,Xt as U,Yt as V,Vt as W,Wt as X,re as Y,ke as Z,_t as _,jt as a,Ce as a0,At as a1,ae as a2,Y as a3,Re as a4,Ae as a5,we as a6,_e as a7,he as a8,qe as a9,me as aa,Me as ab,Ut as ac,oe as ad,De as ae,ge as af,xe as ag,ee as ah,ye as ai,Nt as b,le as c,St as d,st as e,de as f,te as g,Mt as h,ze as i,fe as j,ne as k,ie as l,ue as m,Ne as n,Lt as o,je as p,ft as q,ve as r,Ht as s,Q as t,$e as u,be as v,Te as w,Le as x,Bt as y,Oe as z}; diff --git a/docs/_app/chunks/index-68fa7044.js b/docs/_app/chunks/index-68fa7044.js deleted file mode 100644 index a04f11f..0000000 --- a/docs/_app/chunks/index-68fa7044.js +++ /dev/null @@ -1,4 +0,0 @@ -function E(){}const _t=t=>t;function dt(t,e){for(const n in e)t[n]=e[n];return t}function Z(t){return t()}function V(){return Object.create(null)}function S(t){t.forEach(Z)}function K(t){return typeof t=="function"}function Ht(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let O;function Wt(t,e){return O||(O=document.createElement("a")),O.href=e,t===O.href}function ht(t){return Object.keys(t).length===0}function mt(t,...e){if(t==null)return E;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Gt(t,e,n){t.$$.on_destroy.push(mt(e,n))}function Jt(t,e,n,i){if(t){const r=tt(t,e,n,i);return t[0](r)}}function tt(t,e,n,i){return t[1]&&i?dt(n.ctx.slice(),t[1](i(e))):n.ctx}function Kt(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const l=[],s=Math.max(e.dirty.length,r.length);for(let o=0;o32){const e=[],n=t.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),Q=et?t=>requestAnimationFrame(t):E;const k=new Set;function nt(t){k.forEach(e=>{e.c(t)||(k.delete(e),e.f())}),k.size!==0&&Q(nt)}function yt(t){let e;return k.size===0&&Q(nt),{promise:new Promise(n=>{k.add(e={c:t,f:n})}),abort(){k.delete(e)}}}let F=!1;function gt(){F=!0}function bt(){F=!1}function xt(t,e,n,i){for(;t>1);n(r)<=i?t=r+1:e=r}return t}function $t(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const c=[];for(let u=0;u0&&e[n[r]].claim_order<=u?r+1:xt(1,r,a=>e[n[a]].claim_order,u))-1;i[c]=n[d]+1;const f=d+1;n[f]=c,r=Math.max(f,r)}const l=[],s=[];let o=e.length-1;for(let c=n[r]+1;c!=0;c=i[c-1]){for(l.push(e[c-1]);o>=c;o--)s.push(e[o]);o--}for(;o>=0;o--)s.push(e[o]);l.reverse(),s.sort((c,u)=>c.claim_order-u.claim_order);for(let c=0,u=0;c=l[u].claim_order;)u++;const d=ut.removeEventListener(e,n,i)}function re(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Nt(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ce(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set?t[i]=e[i]:Nt(t,i,e[i])}function oe(t){return t===""?null:+t}function jt(t){return Array.from(t.childNodes)}function Ct(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function rt(t,e,n,i,r=!1){Ct(t);const l=(()=>{for(let s=t.claim_info.last_index;s=0;s--){const o=t[s];if(e(o)){const c=n(o);return c===void 0?t.splice(s,1):t[s]=c,r?c===void 0&&t.claim_info.last_index--:t.claim_info.last_index=s,o}}return i()})();return l.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,l}function ct(t,e,n,i){return rt(t,r=>r.nodeName===e,r=>{const l=[];for(let s=0;sr.removeAttribute(s))},()=>i(e))}function le(t,e,n){return ct(t,e,n,st)}function ue(t,e,n){return ct(t,e,n,At)}function Mt(t,e){return rt(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>U(e),!0)}function ae(t){return Mt(t," ")}function fe(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _e(t,e){t.value=e==null?"":e}function de(t,e,n,i){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function he(t,e){for(let n=0;n>>0}function Dt(t,e){const n={stylesheet:vt(e),rules:{}};return L.set(t,n),n}function X(t,e,n,i,r,l,s,o=0){const c=16.666/i;let u=`{ -`;for(let p=0;p<=1;p+=c){const g=e+(n-e)*l(p);u+=p*100+`%{${s(g,1-g)}} -`}const d=u+`100% {${s(n,1-n)}} -}`,f=`__svelte_${qt(d)}_${o}`,a=it(t),{stylesheet:h,rules:_}=L.get(a)||Dt(a,t);_[f]||(_[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${f} ${i}ms linear ${r}ms 1 both`,z+=1,f}function Ot(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),z-=r,z||Pt())}function Pt(){Q(()=>{z||(L.forEach(t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}}),L.clear())})}let C;function j(t){C=t}function M(){if(!C)throw new Error("Function called outside component initialization");return C}function ge(t){M().$$.on_mount.push(t)}function be(t){M().$$.after_update.push(t)}function xe(){const t=M();return(e,n)=>{const i=t.$$.callbacks[e];if(i){const r=ot(e,n);i.slice().forEach(l=>{l.call(t,r)})}}}function $e(t,e){M().$$.context.set(t,e)}function we(t){return M().$$.context.get(t)}function ve(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const N=[],Y=[],R=[],G=[],lt=Promise.resolve();let J=!1;function ut(){J||(J=!0,lt.then(at))}function ke(){return ut(),lt}function B(t){R.push(t)}function Ee(t){G.push(t)}const H=new Set;let P=0;function at(){const t=C;do{for(;P{A=null})),A}function W(t,e,n){t.dispatchEvent(ot(`${e?"intro":"outro"}${n}`))}const T=new Set;let $;function Se(){$={r:0,c:[],p:$}}function Ae(){$.r||S($.c),$=$.p}function ft(t,e){t&&t.i&&(T.delete(t),t.i(e))}function Lt(t,e,n,i){if(t&&t.o){if(T.has(t))return;T.add(t),$.c.push(()=>{T.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}const zt={duration:0};function Ne(t,e,n,i){let r=e(t,n),l=i?0:1,s=null,o=null,c=null;function u(){c&&Ot(t,c)}function d(a,h){const _=a.b-l;return h*=Math.abs(_),{a:l,b:a.b,d:_,duration:h,start:a.start,end:a.start+h,group:a.group}}function f(a){const{delay:h=0,duration:_=300,easing:y=_t,tick:p=E,css:g}=r||zt,w={start:pt()+h,b:a};a||(w.group=$,$.r+=1),s||o?o=w:(g&&(u(),c=X(t,l,a,_,h,y,g)),a&&p(0,1),s=d(w,_),B(()=>W(t,a,"start")),yt(v=>{if(o&&v>o.start&&(s=d(o,_),o=null,W(t,s.b,"start"),g&&(u(),c=X(t,l,s.b,s.duration,0,y,r.css))),s){if(v>=s.end)p(l=s.b,1-l),W(t,s.b,"end"),o||(s.b?u():--s.group.r||S(s.group.c)),s=null;else if(v>=s.start){const q=v-s.start;l=s.a+s.d*y(q/s.duration),p(l,1-l)}}return!!(s||o)}))}return{run(a){K(r)?Tt().then(()=>{r=r(),f(a)}):f(a)},end(){u(),s=o=null}}}function je(t,e){t.d(1),e.delete(t.key)}function Ce(t,e){Lt(t,1,1,()=>{e.delete(t.key)})}function Me(t,e,n,i,r,l,s,o,c,u,d,f){let a=t.length,h=l.length,_=a;const y={};for(;_--;)y[t[_].key]=_;const p=[],g=new Map,w=new Map;for(_=h;_--;){const m=f(r,l,_),b=n(m);let x=s.get(b);x?i&&x.p(m,e):(x=u(b,m),x.c()),g.set(b,p[_]=x),b in y&&w.set(b,Math.abs(_-y[b]))}const v=new Set,q=new Set;function I(m){ft(m,1),m.m(o,d),s.set(m.key,m),d=m.first,h--}for(;a&&h;){const m=p[h-1],b=t[a-1],x=m.key,D=b.key;m===b?(d=m.first,a--,h--):g.has(D)?!s.has(x)||v.has(x)?I(m):q.has(D)?a--:w.get(x)>w.get(D)?(q.add(x),I(m)):(v.add(D),a--):(c(b,s),a--)}for(;a--;){const m=t[a];g.has(m.key)||c(m,s)}for(;h;)I(p[h-1]);return p}function qe(t,e){const n={},i={},r={$$scope:1};let l=t.length;for(;l--;){const s=t[l],o=e[l];if(o){for(const c in s)c in o||(i[c]=1);for(const c in o)r[c]||(n[c]=o[c],r[c]=1);t[l]=o}else for(const c in s)r[c]=1}for(const s in i)s in n||(n[s]=void 0);return n}function De(t){return typeof t=="object"&&t!==null?t:{}}function Oe(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Pe(t){t&&t.c()}function Re(t,e){t&&t.l(e)}function Bt(t,e,n,i){const{fragment:r,on_mount:l,on_destroy:s,after_update:o}=t.$$;r&&r.m(e,n),i||B(()=>{const c=l.map(Z).filter(K);s?s.push(...c):S(c),t.$$.on_mount=[]}),o.forEach(B)}function Ft(t,e){const n=t.$$;n.fragment!==null&&(S(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function It(t,e){t.$$.dirty[0]===-1&&(N.push(t),ut(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const _=h.length?h[0]:a;return u.ctx&&r(u.ctx[f],u.ctx[f]=_)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](_),d&&It(t,f)),a}):[],u.update(),d=!0,S(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){gt();const f=jt(e.target);u.fragment&&u.fragment.l(f),f.forEach(St)}else u.fragment&&u.fragment.c();e.intro&&ft(t.$$.fragment),Bt(t,e.target,e.anchor,e.customElement),bt(),at()}j(c)}class Le{$destroy(){Ft(this,1),this.$destroy=E}$on(e,n){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!ht(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}export{B as $,De as A,Ft as B,dt as C,ke as D,E,mt as F,S as G,K as H,Jt as I,Qt as J,Ut as K,Kt as L,Et as M,se as N,ve as O,M as P,ce as Q,pe as R,Le as S,Zt as T,Xt as U,Yt as V,Vt as W,Gt as X,re as Y,we as Z,_t as _,jt as a,Ne as a0,At as a1,ue as a2,Y as a3,Oe as a4,Ee as a5,xe as a6,_e as a7,he as a8,Me as a9,me as aa,je as ab,Wt as ac,oe as ad,Ce as ae,ee as af,ye as ag,Nt as b,le as c,St as d,st as e,de as f,te as g,Mt as h,Te as i,fe as j,ne as k,ie as l,ae as m,Se as n,Lt as o,Ae as p,ft as q,$e as r,Ht as s,U as t,be as u,ge as v,Pe as w,Re as x,Bt as y,qe as z}; diff --git a/docs/_app/chunks/paths-5d155410.js b/docs/_app/chunks/paths-5193a87e.js similarity index 92% rename from docs/_app/chunks/paths-5d155410.js rename to docs/_app/chunks/paths-5193a87e.js index 9dece97..3b375c3 100644 --- a/docs/_app/chunks/paths-5d155410.js +++ b/docs/_app/chunks/paths-5193a87e.js @@ -1 +1 @@ -import{E as b,s as m,F as q,G as w,H as z}from"./index-68fa7044.js";const o=[];function A(s,i){return{subscribe:x(s,i).subscribe}}function x(s,i=b){let u;const n=new Set;function a(t){if(m(s,t)&&(s=t,u)){const r=!o.length;for(const e of n)e[1](),o.push(e,s);if(r){for(let e=0;e{n.delete(e),n.size===0&&(u(),u=null)}}return{set:a,update:l,subscribe:f}}function G(s,i,u){const n=!Array.isArray(s),a=n?[s]:s,l=i.length<2;return A(u,f=>{let t=!1;const r=[];let e=0,d=b;const _=()=>{if(e)return;d();const c=i(n?r[0]:r,f);l?f(c):d=z(c)?c:b},h=a.map((c,p)=>q(c,y=>{r[p]=y,e&=~(1<{e|=1<{n.delete(e),n.size===0&&(u(),u=null)}}return{set:a,update:l,subscribe:f}}function G(s,i,u){const n=!Array.isArray(s),a=n?[s]:s,l=i.length<2;return A(u,f=>{let t=!1;const r=[];let e=0,d=b;const _=()=>{if(e)return;d();const c=i(n?r[0]:r,f);l?f(c):d=z(c)?c:b},h=a.map((c,p)=>q(c,y=>{r[p]=y,e&=~(1<{e|=1<{"status"in s&&t(0,a=s.status),"error"in s&&t(1,f=s.error)},[a,f]}class G extends w{constructor(l){super();y(this,l,B,A,z,{status:0,error:1})}}export{G as default,F as load}; +import{S as w,i as y,s as z,e as E,t as v,c as d,a as b,h as P,d as o,g as u,M as R,j as N,k as S,l as C,m as j,E as H}from"./chunks/index-3711c71a.js";function M(r){let l,t=r[1].frame+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].frame+"")&&N(a,t)},d(f){f&&o(l)}}}function h(r){let l,t=r[1].stack+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].stack+"")&&N(a,t)},d(f){f&&o(l)}}}function A(r){let l,t,a,f,s=r[1].message+"",c,k,n,p,i=r[1].frame&&M(r),_=r[1].stack&&h(r);return{c(){l=E("h1"),t=v(r[0]),a=S(),f=E("pre"),c=v(s),k=S(),i&&i.c(),n=S(),_&&_.c(),p=C()},l(e){l=d(e,"H1",{});var m=b(l);t=P(m,r[0]),m.forEach(o),a=j(e),f=d(e,"PRE",{});var q=b(f);c=P(q,s),q.forEach(o),k=j(e),i&&i.l(e),n=j(e),_&&_.l(e),p=C()},m(e,m){u(e,l,m),R(l,t),u(e,a,m),u(e,f,m),R(f,c),u(e,k,m),i&&i.m(e,m),u(e,n,m),_&&_.m(e,m),u(e,p,m)},p(e,[m]){m&1&&N(t,e[0]),m&2&&s!==(s=e[1].message+"")&&N(c,s),e[1].frame?i?i.p(e,m):(i=M(e),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),e[1].stack?_?_.p(e,m):(_=h(e),_.c(),_.m(p.parentNode,p)):_&&(_.d(1),_=null)},i:H,o:H,d(e){e&&o(l),e&&o(a),e&&o(f),e&&o(k),i&&i.d(e),e&&o(n),_&&_.d(e),e&&o(p)}}}function F({error:r,status:l}){return{props:{error:r,status:l}}}function B(r,l,t){let{status:a}=l,{error:f}=l;return r.$$set=s=>{"status"in s&&t(0,a=s.status),"error"in s&&t(1,f=s.error)},[a,f]}class G extends w{constructor(l){super();y(this,l,B,A,z,{status:0,error:1})}}export{G as default,F as load}; diff --git a/docs/_app/layout.svelte-a7c34f1e.js b/docs/_app/layout.svelte-4620a56f.js similarity index 88% rename from docs/_app/layout.svelte-a7c34f1e.js rename to docs/_app/layout.svelte-4620a56f.js index 15421f8..751358c 100644 --- a/docs/_app/layout.svelte-a7c34f1e.js +++ b/docs/_app/layout.svelte-4620a56f.js @@ -1 +1 @@ -import{S as l,i,s as r,I as u,J as f,K as _,L as c,q as p,o as d}from"./chunks/index-68fa7044.js";function m(n){let s;const o=n[1].default,e=u(o,n,n[0],null);return{c(){e&&e.c()},l(t){e&&e.l(t)},m(t,a){e&&e.m(t,a),s=!0},p(t,[a]){e&&e.p&&(!s||a&1)&&f(e,o,t,t[0],s?c(o,t[0],a,null):_(t[0]),null)},i(t){s||(p(e,t),s=!0)},o(t){d(e,t),s=!1},d(t){e&&e.d(t)}}}function $(n,s,o){let{$$slots:e={},$$scope:t}=s;return n.$$set=a=>{"$$scope"in a&&o(0,t=a.$$scope)},[t,e]}class h extends l{constructor(s){super();i(this,s,$,m,r,{})}}export{h as default}; +import{S as l,i,s as r,I as u,J as f,K as _,L as c,q as p,o as d}from"./chunks/index-3711c71a.js";function m(n){let s;const o=n[1].default,e=u(o,n,n[0],null);return{c(){e&&e.c()},l(t){e&&e.l(t)},m(t,a){e&&e.m(t,a),s=!0},p(t,[a]){e&&e.p&&(!s||a&1)&&f(e,o,t,t[0],s?c(o,t[0],a,null):_(t[0]),null)},i(t){s||(p(e,t),s=!0)},o(t){d(e,t),s=!1},d(t){e&&e.d(t)}}}function $(n,s,o){let{$$slots:e={},$$scope:t}=s;return n.$$set=a=>{"$$scope"in a&&o(0,t=a.$$scope)},[t,e]}class h extends l{constructor(s){super();i(this,s,$,m,r,{})}}export{h as default}; diff --git a/docs/_app/manifest.json b/docs/_app/manifest.json index 9429440..e33c5a9 100644 --- a/docs/_app/manifest.json +++ b/docs/_app/manifest.json @@ -1,11 +1,11 @@ { ".svelte-kit/runtime/client/start.js": { - "file": "start-c91a3eca.js", + "file": "start-91f194db.js", "src": ".svelte-kit/runtime/client/start.js", "isEntry": true, "imports": [ - "_index-68fa7044.js", - "_paths-5d155410.js" + "_index-3711c71a.js", + "_paths-5193a87e.js" ], "dynamicImports": [ ".svelte-kit/runtime/components/layout.svelte", @@ -14,47 +14,47 @@ ] }, ".svelte-kit/runtime/components/layout.svelte": { - "file": "layout.svelte-a7c34f1e.js", + "file": "layout.svelte-4620a56f.js", "src": ".svelte-kit/runtime/components/layout.svelte", "isEntry": true, "isDynamicEntry": true, "imports": [ - "_index-68fa7044.js" + "_index-3711c71a.js" ] }, ".svelte-kit/runtime/components/error.svelte": { - "file": "error.svelte-7544dc29.js", + "file": "error.svelte-a52588a9.js", "src": ".svelte-kit/runtime/components/error.svelte", "isEntry": true, "isDynamicEntry": true, "imports": [ - "_index-68fa7044.js" + "_index-3711c71a.js" ] }, "src/routes/index.svelte": { - "file": "pages/index.svelte-bdd7f07b.js", + "file": "pages/index.svelte-87b4df47.js", "src": "src/routes/index.svelte", "isEntry": true, "isDynamicEntry": true, "imports": [ - "_index-68fa7044.js", - "_paths-5d155410.js" + "_index-3711c71a.js", + "_paths-5193a87e.js" ], "css": [ - "assets/pages/index.svelte-3edfd478.css" + "assets/pages/index.svelte-455f749d.css" ], "assets": [ "assets/Faktos-34d5460e.ttf", "assets/Dosis-VariableFont_wght-994868c0.ttf" ] }, - "_index-68fa7044.js": { - "file": "chunks/index-68fa7044.js" + "_index-3711c71a.js": { + "file": "chunks/index-3711c71a.js" }, - "_paths-5d155410.js": { - "file": "chunks/paths-5d155410.js", + "_paths-5193a87e.js": { + "file": "chunks/paths-5193a87e.js", "imports": [ - "_index-68fa7044.js" + "_index-3711c71a.js" ] } } \ No newline at end of file diff --git a/docs/_app/pages/index.svelte-87b4df47.js b/docs/_app/pages/index.svelte-87b4df47.js new file mode 100644 index 0000000..6dfac80 --- /dev/null +++ b/docs/_app/pages/index.svelte-87b4df47.js @@ -0,0 +1,406 @@ +var SM=Object.defineProperty,EM=Object.defineProperties;var CM=Object.getOwnPropertyDescriptors;var hu=Object.getOwnPropertySymbols;var i0=Object.prototype.hasOwnProperty,s0=Object.prototype.propertyIsEnumerable;var a0=(e,t,r)=>t in e?SM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wi=(e,t)=>{for(var r in t||(t={}))i0.call(t,r)&&a0(e,r,t[r]);if(hu)for(var r of hu(t))s0.call(t,r)&&a0(e,r,t[r]);return e},tc=(e,t)=>EM(e,CM(t));var o0=(e,t)=>{var r={};for(var n in e)i0.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hu)for(var n of hu(e))t.indexOf(n)<0&&s0.call(e,n)&&(r[n]=e[n]);return r};import{N as ae,O as Fh,P as OM,S as Ct,i as Ot,s as At,e as k,c as H,a as V,d as M,g as q,J as _n,K as mn,L as $n,q as W,o as X,I as bn,C as Bt,k as ht,m as pt,Q as la,R as Me,M as j,T as Hu,n as pr,p as vr,z as ne,U as ca,V as AM,W as Li,X as ao,r as Mc,Y as p$,G as io,Z as Ne,_ as TM,b as F,$ as Ni,a0 as u0,l as je,a1 as Fn,a2 as zn,f as Ln,E as se,w as st,x as ft,y as ot,B as ut,t as mt,h as $t,a3 as Nn,a4 as Pc,a5 as xc,a6 as Wa,j as er,a7 as xe,a8 as vn,a9 as Hr,aa as js,ab as $a,ac as kn,ad as Be,A as ue,ae as Wu,F as MM,af as PM,v as xM,ag as IM,D as DM,ah as qs,ai as RM}from"../chunks/index-3711c71a.js";import{r as BM,d as LM,w as FM,b as yn}from"../chunks/paths-5193a87e.js";function zM(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function l0(e){for(var t=1;t1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof t.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||r,this.shouldUpdateOnAdd=typeof t.onCacheAdd=="function",this.shouldUpdateOnChange=typeof t.onCacheChange=="function",this.shouldUpdateOnHit=typeof t.onCacheHit=="function"}return Object.defineProperty(e.prototype,"size",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapshot",{get:function(){return{keys:Du(this.keys),size:this.size,values:Du(this.values)}},enumerable:!0,configurable:!0}),e.prototype._getKeyIndexFromMatchingKey=function(t){var r=this.options,n=r.isMatchingKey,a=r.maxSize,i=this.keys,s=i.length;if(!s)return-1;if(n(i[0],t))return 0;if(a>1){for(var u=1;u1){for(var f=0;f1){for(var s=0;s=f&&(a.length=i.length=f)},e.prototype.updateAsyncCache=function(t){var r=this,n=this.options,a=n.onCacheChange,i=n.onCacheHit,s=this.keys[0],u=this.values[0];this.values[0]=u.then(function(f){return r.shouldUpdateOnHit&&i(r,r.options,t),r.shouldUpdateOnChange&&a(r,r.options,t),f},function(f){var c=r.getKeyIndex(s);throw c!==-1&&(r.keys.splice(c,1),r.values.splice(c,1)),f})},e}();function d$(e,t){if(t===void 0&&(t={}),kM(e))return d$(e.fn,c0(e.options,t));if(typeof e!="function")throw new TypeError("You must pass a function to `memoize`.");var r=t.isEqual,n=r===void 0?HM:r,a=t.isMatchingKey,i=t.isPromise,s=i===void 0?!1:i,u=t.maxSize,f=u===void 0?1:u,c=t.onCacheAdd,h=t.onCacheChange,p=t.onCacheHit,v=t.transformKey,g=c0({isEqual:n,isMatchingKey:a,isPromise:s,maxSize:f,onCacheAdd:c,onCacheChange:h,onCacheHit:p,transformKey:v},UM(t)),_=new WM(g),m=_.keys,b=_.values,y=_.canTransformKey,w=_.shouldCloneArguments,C=_.shouldUpdateOnAdd,T=_.shouldUpdateOnChange,A=_.shouldUpdateOnHit,x=function I(){var B=w?Du(arguments):arguments;y&&(B=v(B));var P=m.length?_.getKeyIndex(B):-1;if(P!==-1)A&&p(_,g,I),P&&(_.orderByLru(m[P],b[P],P),T&&h(_,g,I));else{var L=e.apply(this,arguments),G=w?B:Du(arguments);_.orderByLru(G,L,m.length),s&&_.updateAsyncCache(I),C&&c(_,g,I),T&&h(_,g,I)}return b[0]};return x.cache=_,x.fn=e,x.isMemoized=!0,x.options=g,x}var KM=typeof WeakSet=="function",h0=Object.keys;function Ku(e,t){return e===t||e!==e&&t!==t}function p0(e){return e.constructor===Object||e.constructor==null}function v0(e){return!!e&&typeof e.then=="function"}function d0(e){return!!(e&&e.$$typeof)}function YM(){var e=[];return{add:function(t){e.push(t)},has:function(t){return e.indexOf(t)!==-1}}}var XM=function(e){return e?function(){return new WeakSet}:YM}(KM);function g$(e){return function(r){var n=e||r;return function(i,s,u){u===void 0&&(u=XM());var f=!!i&&typeof i=="object",c=!!s&&typeof s=="object";if(f||c){var h=f&&u.has(i),p=c&&u.has(s);if(h||p)return h&&p;f&&u.add(i),c&&u.add(s)}return n(i,s,u)}}}function VM(e,t,r,n){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!r(e[a],t[a],n))return!1;return!0}function ZM(e,t,r,n){var a=e.size===t.size;return a&&e.size&&e.forEach(function(i,s){a&&(a=!1,t.forEach(function(u,f){!a&&r(s,f,n)&&(a=r(i,u,n))}))}),a}var JM="_owner",QM=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function g0(e,t,r,n){var a=h0(e),i=a.length;if(h0(t).length!==i)return!1;if(i)for(var s=void 0;i-- >0;){if(s=a[i],s===JM){var u=d0(e),f=d0(t);if((u||f)&&u!==f)return!1}if(!QM(t,s)||!r(e[s],t[s],n))return!1}return!0}function tP(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}function eP(e,t,r,n){var a=e.size===t.size;return a&&e.size&&e.forEach(function(i){a&&(a=!1,t.forEach(function(s){a||(a=r(i,s,n))}))}),a}var rP=typeof Map=="function",nP=typeof Set=="function";function Yu(e){var t=typeof e=="function"?e(r):r;function r(n,a,i){if(n===a)return!0;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(p0(n)&&p0(a))return g0(n,a,t,i);var s=Array.isArray(n),u=Array.isArray(a);return s||u?s===u&&VM(n,a,t,i):(s=n instanceof Date,u=a instanceof Date,s||u?s===u&&Ku(n.getTime(),a.getTime()):(s=n instanceof RegExp,u=a instanceof RegExp,s||u?s===u&&tP(n,a):v0(n)||v0(a)?n===a:rP&&(s=n instanceof Map,u=a instanceof Map,s||u)?s===u&&ZM(n,a,t,i):nP&&(s=n instanceof Set,u=a instanceof Set,s||u)?s===u&&eP(n,a,t,i):g0(n,a,t,i)))}return n!==n&&a!==a}return r}var aP=Yu(),iP=Yu(function(){return Ku});Yu(g$());Yu(g$(Ku));function ha(){return ha=Object.assign||function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}var Ei={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 Ls(){for(var e=arguments.length,t=new Array(e),r=0;rb&&(c.keys.length=b,c.values.length=b),c.keys.unshift(_),c.values.unshift(u),h.isPromise&&c.updateAsyncCache(i),p&&p(c,h,i),v&&v(c,h,i)}else{var y=c.keys[m];c.values[m]=u,m>0&&c.orderByLru(y,u,m),h.isPromise&&c.updateAsyncCache(i),typeof v=="function"&&v(c,h,i)}},i.values=function(){return i.cacheSnapshot.values}}function mP(e,t){var r=t.expirations,n=t.options,a=t.originalFunction,i=e.options;Object.defineProperties(e,{_microMemoizeOptions:{configurable:!0,get:function(){return i}},cacheSnapshot:{configurable:!0,get:function(){var f=e.cache;return{keys:f.keys.slice(0),size:f.size,values:f.values.slice(0)}}},expirations:{configurable:!0,get:function(){return r}},expirationsSnapshot:{configurable:!0,get:function(){return r.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return n}},originalFunction:{configurable:!0,get:function(){return a}}});var s=e;qh(a,s)}function $P(e,t){return _P(e,t),mP(e,t),e}var bP=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function yP(e,t,r){var n=e(ha({maxArgs:2,isShallowEqual:!0},r,{isReact:!1}));t.displayName||(t.displayName=t.name||"Component");function a(i,s,u){this.props=i,this.context=s,this.updater=u,this.MoizedComponent=n(t)}return a.prototype.isReactComponent={},a.prototype.render=function(){return{$$typeof:bP,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},qh(t,a,["contextType","contextTypes"]),a.displayName="Moized("+(t.displayName||t.name||"Component")+")",m$(a,t.name,r.profileName),a}function wP(e){return function(t){if(e>=t.length)return t;if(e===0)return[];if(e===1)return[t[0]];if(e===2)return[t[0],t[1]];if(e===3)return[t[0],t[1],t[2]];for(var r=[],n=0;n=0?n.maxAge:Ei.maxAge,maxArgs:typeof n.maxArgs=="number"&&n.maxArgs>=0?n.maxArgs:Ei.maxArgs,maxSize:typeof n.maxSize=="number"&&n.maxSize>=0?n.maxSize:Ei.maxSize,profileName:n.profileName||vP(t)}),u=[];s.matchesArg,s.isDeepEqual;var f=s.isPromise;s.isReact,s.isSerialized,s.isShallowEqual,s.matchesKey,s.maxAge,s.maxArgs;var c=s.maxSize,h=s.onCacheAdd,p=s.onCacheChange,v=s.onCacheHit;s.onExpire,s.profileName,s.serializer;var g=s.updateCacheForKey;s.transformArgs,s.updateExpire;var _=sP(s,IP),m=TP(s),b=MP(s),y=lP(u,s,m,b),w=dP(s),C=PP(s),T=ha({},_,{isEqual:m,isMatchingKey:b,isPromise:f,maxSize:c,onCacheAdd:nc(Ls(h,y.onCacheAdd,w.onCacheAdd)),onCacheChange:nc(p),onCacheHit:nc(Ls(v,y.onCacheHit,w.onCacheHit)),transformKey:C}),A=d$(t,T),x=$P(A,{expirations:u,options:s,originalFunction:t});return g&&(x=xP(x)),m$(x,t.name,n.profileName),x};It.clearStats=b$;It.collectStats=cP;It.compose=function(){return zh.apply(void 0,arguments)||It};It.deep=It({isDeepEqual:!0});It.getStats=jh;It.infinite=It({maxSize:1/0});It.isCollectingStats=function(){return Ar.isCollectingStats};It.isMoized=function(t){return typeof t=="function"&&!!t.isMoized};It.matchesArg=function(e){return It({matchesArg:e})};It.matchesKey=function(e){return It({matchesKey:e})};function DP(e,t){if(t===!0)return It({maxAge:e,updateExpire:t});if(typeof t=="object"){var r=t.onExpire,n=t.updateExpire;return It({maxAge:e,onExpire:r,updateExpire:n})}return It(typeof t=="function"?{maxAge:e,onExpire:t,updateExpire:!0}:{maxAge:e})}It.maxAge=DP;It.maxArgs=function(e){return It({maxArgs:e})};It.maxSize=function(e){return It({maxSize:e})};It.profile=function(e){return It({profileName:e})};It.promise=It({isPromise:!0,updateExpire:!0});It.react=It({isReact:!0});It.serialize=It({isSerialized:!0});It.serializeWith=function(e){return It({isSerialized:!0,serializer:e})};It.shallow=It({isShallowEqual:!0});It.transformArgs=function(e){return It({transformArgs:e})};It.updateCacheForKey=function(e){return It({updateCacheForKey:e})};Object.defineProperty(It,"default",{configurable:!1,enumerable:!1,value:It,writable:!1});function RP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function y0(e){for(var t=1;t0){if(++t>=yx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cx(e){return function(){return e}}var Ox=function(){try{var e=Xa(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ru=Ox,Ax=Ru?function(e,t){return Ru(e,"toString",{configurable:!0,enumerable:!1,value:Cx(t),writable:!0})}:Hh,Tx=Ax,Mx=Ex(Tx),Px=Mx;function xx(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i-1}var Lx=9007199254740991,Fx=/^(?:0|[1-9]\d*)$/;function Kh(e,t){var r=typeof e;return t=t==null?Lx:t,!!t&&(r=="number"||r!="symbol"&&Fx.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Ux}function ji(e){return e!=null&&Yh(e.length)&&!Wh(e)}function kx(e,t,r){if(!ba(r))return!1;var n=typeof t;return(n=="number"?ji(r)&&Kh(t,r.length):n=="string"&&t in r)?so(r[t],e):!1}function Hx(e){return C$(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&kx(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n-1}function oD(e,t){var r=this.__data__,n=Vu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Hn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(u)?t>1?L$(u,t-1,r,n,a):B$(a,u):n||(a[a.length]=u)}return a}var CD=x$(Object.getPrototypeOf,Object),F$=CD,OD="[object Object]",AD=Function.prototype,TD=Object.prototype,z$=AD.toString,MD=TD.hasOwnProperty,PD=z$.call(Object);function xD(e){if(!pa(e)||Ka(e)!=OD)return!1;var t=F$(e);if(t===null)return!0;var r=MD.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&z$.call(r)==PD}function ID(){this.__data__=new Hn,this.size=0}function DD(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function RD(e){return this.__data__.get(e)}function BD(e){return this.__data__.has(e)}var LD=200;function FD(e,t){var r=this.__data__;if(r instanceof Hn){var n=r.__data__;if(!Hs||n.lengthu))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var p=-1,v=!0,g=r&c3?new Ws:void 0;for(i.set(e,t),i.set(t,e);++p=nR&&(i=N$,s=!1,t=new Ws(t));t:for(;++a-1&&e%1==0&&e-1&&e%1==0&&e<=f4}var sp=l4,c4=Ui,h4=sp,p4=ya,v4="[object Arguments]",d4="[object Array]",g4="[object Boolean]",_4="[object Date]",m4="[object Error]",$4="[object Function]",b4="[object Map]",y4="[object Number]",w4="[object Object]",S4="[object RegExp]",E4="[object Set]",C4="[object String]",O4="[object WeakMap]",A4="[object ArrayBuffer]",T4="[object DataView]",M4="[object Float32Array]",P4="[object Float64Array]",x4="[object Int8Array]",I4="[object Int16Array]",D4="[object Int32Array]",R4="[object Uint8Array]",B4="[object Uint8ClampedArray]",L4="[object Uint16Array]",F4="[object Uint32Array]",Se={};Se[M4]=Se[P4]=Se[x4]=Se[I4]=Se[D4]=Se[R4]=Se[B4]=Se[L4]=Se[F4]=!0;Se[v4]=Se[d4]=Se[A4]=Se[g4]=Se[T4]=Se[_4]=Se[m4]=Se[$4]=Se[b4]=Se[y4]=Se[w4]=Se[S4]=Se[E4]=Se[C4]=Se[O4]=!1;function z4(e){return p4(e)&&h4(e.length)&&!!Se[c4(e)]}var G4=z4;function N4(e){return function(t){return e(t)}}var op=N4,Ys={exports:{}};(function(e,t){var r=X$,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var f=a&&a.require&&a.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(Ys,Ys.exports);var j4=G4,q4=op,r1=Ys.exports,n1=r1&&r1.isTypedArray,U4=n1?q4(n1):j4,eb=U4,k4=KR,H4=ap,W4=xr,K4=Ks.exports,Y4=ip,X4=eb,V4=Object.prototype,Z4=V4.hasOwnProperty;function J4(e,t){var r=W4(e),n=!r&&H4(e),a=!r&&!n&&K4(e),i=!r&&!n&&!a&&X4(e),s=r||n||a||i,u=s?k4(e.length,String):[],f=u.length;for(var c in e)(t||Z4.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Y4(c,f)))&&u.push(c);return u}var rb=J4,Q4=Object.prototype;function tB(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Q4;return e===r}var up=tB,eB=Z$,rB=eB(Object.keys,Object),nB=rB,aB=up,iB=nB,sB=Object.prototype,oB=sB.hasOwnProperty;function uB(e){if(!aB(e))return iB(e);var t=[];for(var r in Object(e))oB.call(e,r)&&r!="constructor"&&t.push(r);return t}var fB=uB;function lB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Va=lB,cB=Ui,hB=Va,pB="[object AsyncFunction]",vB="[object Function]",dB="[object GeneratorFunction]",gB="[object Proxy]";function _B(e){if(!hB(e))return!1;var t=cB(e);return t==vB||t==dB||t==pB||t==gB}var nb=_B,mB=nb,$B=sp;function bB(e){return e!=null&&$B(e.length)&&!mB(e)}var Qu=bB,yB=rb,wB=fB,SB=Qu;function EB(e){return SB(e)?yB(e):wB(e)}var oo=EB,CB=HR,OB=oo;function AB(e,t){return e&&CB(e,t,OB)}var ab=AB,TB=Qu;function MB(e,t){return function(r,n){if(r==null)return r;if(!TB(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i-1}var JB=ZB,QB=tf;function tL(e,t){var r=this.__data__,n=QB(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eL=tL,rL=zB,nL=WB,aL=XB,iL=JB,sL=eL;function ki(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tu))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var p=-1,v=!0,g=r&mz?new vz:void 0;for(i.set(e,t),i.set(t,e);++pa?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0&&r(u)?t>1?Ab(u,t-1,r,n,a):cU(a,u):n||(a[a.length]=u)}return a}var pU=Ab,vU=pU;function dU(e){var t=e==null?0:e.length;return t?vU(e,1):[]}var gU=dU;function _U(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var mU=_U,$U=mU,N1=Math.max;function bU(e,t,r){return t=N1(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=N1(n.length-t,0),s=Array(i);++a0){if(++t>=TU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var IU=xU,DU=AU,RU=IU,BU=RU(DU),LU=BU,FU=gU,zU=yU,GU=LU;function NU(e){return GU(zU(e,void 0,FU),e+"")}var jU=NU,qU=sf,UU=U8,kU=nU,HU=Xi,WU=fo,KU=sU,YU=jU,XU=Sp,VU=1,ZU=2,JU=4,QU=YU(function(e,t){var r={};if(e==null)return r;var n=!1;t=qU(t,function(i){return i=HU(i,e),n||(n=i.length>1),i}),WU(e,XU(e),r),n&&(r=UU(r,VU|ZU|JU,KU));for(var a=t.length;a--;)kU(r,t[a]);return r}),tk=QU;function ek(e){return e}function Tb(e){var t=e;return function(){return t}}function Mb(e){return Array.isArray(e)?e:$b((""+e).split("."),function(t){return!t})}var ce="@@updeep/placeholder";function uf(e,t){var r=e.length;for(r>t&&(r=t);e[r-1]===ce;)r-=1;return r}function ln(e){return function t(r){var n=[].slice.call(arguments,1),a=n[0],i=n[1],s=uf(arguments);return s>=1?e(r,a,i):t}}function un(e){return function t(r,n){var a=[].slice.call(arguments,2),i=a[0],s=a[1],u=uf(arguments,2);if(n===ce||i===ce||s===ce)throw new Error("Can only use placeholder on first argument of this function.");return u>=2?r===ce?ln(function(f,c,h){return e(f,n,c,h)}):e(r,n,i,s):u===1?ln(function(f,c,h){return e(r,f,c,h)}):t}}function Ms(e){return function t(r,n,a){var i=[].slice.call(arguments,3),s=i[0],u=i[1],f=uf(arguments,3);if(a===ce||s===ce||u===ce)throw new Error("Can only use placeholder on first or second argument of this function.");return f>=3?r===ce?n===ce?un(function(c,h,p,v){return e(c,h,a,p,v)}):ln(function(c,h,p){return e(c,n,a,h,p)}):n===ce?ln(function(c,h,p){return e(r,c,a,h,p)}):e(r,n,a,s,u):f===2?r===ce?un(function(c,h,p,v){return e(c,n,h,p,v)}):ln(function(c,h,p){return e(r,n,c,h,p)}):f===1?un(function(c,h,p,v){return e(r,c,h,p,v)}):t}}function rk(e){return function t(r,n,a,i){var s=[].slice.call(arguments,4),u=s[0],f=s[1],c=uf(arguments,4);if(i===ce||u===ce||f===ce)throw new Error("Can only use placeholder on first, second or third argument of this function.");return c>=4?r===ce?n===ce?a===ce?Ms(function(h,p,v,g,_){return e(h,p,v,i,g,_)}):un(function(h,p,v,g){return e(h,p,a,i,v,g)}):a===ce?un(function(h,p,v,g){return e(h,n,p,i,v,g)}):ln(function(h,p,v){return e(h,n,a,i,p,v)}):n===ce?a===ce?un(function(h,p,v,g){return e(r,h,p,i,v,g)}):ln(function(h,p,v){return e(r,h,a,i,p,v)}):a===ce?ln(function(h,p,v){return e(r,n,h,i,p,v)}):e(r,n,a,i,u,f):c===3?r===ce?n===ce?Ms(function(h,p,v,g,_){return e(h,p,a,v,g,_)}):un(function(h,p,v,g){return e(h,n,a,p,v,g)}):n===ce?un(function(h,p,v,g){return e(r,h,a,p,v,g)}):ln(function(h,p,v){return e(r,n,a,h,p,v)}):c===2?r===ce?Ms(function(h,p,v,g,_){return e(h,n,p,v,g,_)}):un(function(h,p,v,g){return e(r,n,h,p,v,g)}):c===1?Ms(function(h,p,v,g,_){return e(r,h,p,v,g,_)}):t}}function lo(e,t){return t===void 0&&(t=e.length),[e,ln,un,Ms,rk][t](e)}var nk=lo(function(e,t,r){for(var n=Mb(e),a=r,i=0;i0)throw new Error("can't have subduxes on a dux which state is not an object");if(Object.keys(t).length===1&&t["*"])return e;const r=qn(t,({initial:n},a)=>a==="*"?[]:n);return Ve(e,r)}function gk(e={},t={}){const r=Object.assign({},e);return Object.values(t).forEach(({actions:n})=>{!n||Object.entries(n).forEach(([a,i])=>{if(r[a]){if(r[a]===i)return;throw new Error(`trying to merge two different actions ${a}`)}r[a]=i})}),r}function _k(e,t={},r={}){const n=Y$(r,({selectors:i},s)=>i?s==="*"?{}:qn(i,u=>f=>u(f[s])):{});let a={};for(const i in t)a[i]=s=>(...u)=>{const f=t[i](s)(...u);return Gc(()=>f,qn(r["*"].selectors,h=>()=>h(f)))};return Gc({},...n,e,a)}function q1(e,t,r){let n=function(...a){const i={type:e};return t?i.payload=t(...a):a[0]!==void 0&&(i.payload=a[0]),i};if(r){const a=n;n=(...i)=>r(a(...i),i)}return n.type=e,n}function mk(e,t,r={},n=void 0){const a=Object.keys(r).length>0?qn(r,({upreducer:s})=>s):null,i=s=>u=>{if(!(s!=null&&s.type))throw new Error("upreducer called with a bad action");let f=u!=null?u:e;if(a)if(r["*"])f=Ve.updateIn("*",r["*"].upreducer(s),f);else{const h=qn(a,p=>p(s));f=Ve(h,f)}const c=t[s.type]||t["+"];return c?c(s.payload,s)(f):f};return n?n(i):i}const $k=(e,t)=>r=>n=>a=>e!=="*"&&a.type!==e?n(a):t(r)(n)(a),bk=(e,t)=>r=>{const n=()=>tp(r.getState(),e);return t(Object.assign(Object.assign({},r),{getState:n}))};function Kc(e,t,r){const n=()=>e.getState(),a=i=>e.dispatch(i);return Object.assign(n,qn(r,i=>(...s)=>{let u=i(e.getState());return typeof u=="function"?u(...s):u})),Object.assign(a,qn(t,i=>(...s)=>e.dispatch(i(...s)))),Object.assign(Object.assign({},e),{getState:n,dispatch:a,actions:t,selectors:r})}const Rb=(e,t,r)=>{let n=e,a="*";return Array.isArray(e)&&(a=e[0],n=e[1],n=$k(a,n)),i=>n(Kc(i,t,r))},yk=e=>t=>r=>e.reduceRight((n,a)=>a(t)(n),r);function wk(e=[],t={},r={},n={},a=void 0,i=void 0){let s=Y$(n,({middleware:c},h)=>h!=="*"&&c?bk(h,c):void 0).filter(c=>c),f=[...e.map(c=>Rb(c,t,r)),...s];return a&&(f=a(f,i)),yk(f)}var He=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r},te=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Au,Er,Fa,Ci,za,Oi,sa,Ai,Ps,Tu,xs,Yc,Xc,Vc,Zc,Jc;class Ke{constructor(t){var r,n,a,i,s;if(Au.set(this,{}),Er.set(this,{}),Fa.set(this,{}),Ci.set(this,{}),za.set(this,{}),Oi.set(this,[]),sa.set(this,[]),Ai.set(this,void 0),Ps.set(this,void 0),Tu.set(this,void 0),xs.set(this,void 0),Yc.set(this,It(dk)),Xc.set(this,It(gk)),Vc.set(this,It(_k)),Zc.set(this,It(mk)),Jc.set(this,It(wk)),He(this,Au,(r=t.initial)!==null&&r!==void 0?r:{},"f"),He(this,Er,(n=t.subduxes)!==null&&n!==void 0?n:{},"f"),t.subduxes&&He(this,Er,qn(t.subduxes,u=>u instanceof Ke?u:new Ke(u)),"f"),t.actions)for(const[u,f]of Object.entries(t.actions))if(typeof f=="function"&&f.type)te(this,Fa,"f")[u]=f;else{const c=Array.isArray(f)?f:[f];te(this,Fa,"f")[u]=q1(u,...c)}He(this,Ci,(a=t.selectors)!==null&&a!==void 0?a:{},"f"),He(this,Ai,t.mappedSelectors,"f"),He(this,za,(i=t.mutations)!==null&&i!==void 0?i:{},"f"),Object.keys(te(this,za,"f")).filter(u=>u!=="+").filter(u=>!this.actions.hasOwnProperty(u)).forEach(u=>{throw new Error(`action '${u}' is not defined`)}),t.effects&&He(this,Oi,Object.entries(t.effects),"f"),He(this,sa,(s=t.reactions)!==null&&s!==void 0?s:[],"f"),He(this,Ps,t.mappedReaction,"f"),He(this,Tu,t.upreducerWrapper,"f"),He(this,xs,t.middlewareWrapper,"f")}setMappedSelector(t,r){He(this,Ai,Object.assign(Object.assign({},te(this,Ai,"f")),{[t]:r}),"f")}get middleware(){return te(this,Jc,"f").call(this,te(this,Oi,"f"),this.actions,this.selectors,te(this,Er,"f"),te(this,xs,"f"),this)}setMiddlewareWrapper(t){He(this,xs,t,"f")}get initial(){return te(this,Yc,"f").call(this,te(this,Au,"f"),te(this,Er,"f"))}get actions(){return te(this,Xc,"f").call(this,te(this,Fa,"f"),te(this,Er,"f"))}get selectors(){return te(this,Vc,"f").call(this,te(this,Ci,"f"),te(this,Ai,"f"),te(this,Er,"f"))}get subduxes(){return te(this,Er,"f")}get upreducer(){return te(this,Zc,"f").call(this,this.initial,te(this,za,"f"),te(this,Er,"f"),te(this,Tu,"f"))}get reducer(){return(t,r)=>this.upreducer(r)(t)}addSubscription(t){He(this,sa,[...te(this,sa,"f"),t],"f")}addReaction(t){He(this,sa,[...te(this,sa,"f"),t],"f")}setAction(t,r){const n=q1(t,r);return He(this,Fa,Object.assign(Object.assign({},te(this,Fa,"f")),{[t]:n}),"f"),n}setSelector(t,r){return He(this,Ci,Object.assign(Object.assign({},te(this,Ci,"f")),{[t]:r}),"f"),r}setMutation(t,r){return typeof t=="function"&&(t=t.type),He(this,za,Object.assign(Object.assign({},te(this,za,"f")),{[t]:r}),"f"),r}addEffect(t,r){return He(this,Oi,[...te(this,Oi,"f"),[t,r]],"f"),r}augmentMiddlewareApi(t){return Kc(t,this.actions,this.selectors)}splatSubscriber(t,r,n){const a={};return()=>(i,s,u)=>{const f=Object.keys(a),c=Z0(Object.keys(i),f);for(const p of c){let v=Object.assign(Object.assign({},t),{getState:()=>t.getState()[p]});a[p]=[],typeof n=="function"&&(v=Object.assign(Object.assign({},v),n(v,p)));const{unsub:g,subscriber:_,subscriberRaw:m}=r.subscribeAll(v);a[p].push({unsub:g,subscriber:_,subscriberRaw:m}),_()}const h=Z0(f,Object.keys(i));for(const p of h){for(const v of a[p])v.subscriber(),v.unsub();delete a[p]}}}subscribeTo(t,r,n=[]){const a=Kc(Object.assign(Object.assign({},t),{subscribe:h=>this.subscribeTo(t,()=>h)}),this.actions,this.selectors),i=r(a,...n);let s;const u=()=>{const h=t.getState();if(h===s)return;let p=s;s=h,i(h,p,c)};let f=t.subscribe(u);const c=typeof f=="function"?f:f.unsub;return{unsub:c,subscriber:u,subscriberRaw:i}}subscribeAll(t){let r=te(this,sa,"f").map(n=>this.subscribeTo(t,n));for(const n in te(this,Er,"f"))if(n!=="*"){const a=Object.assign(Object.assign({},t),{getState:()=>tp(t.getState(),n)});r.push(te(this,Er,"f")[n].subscribeAll(a))}return te(this,Ps,"f")&&r.push(this.subscribeTo(t,this.splatSubscriber(t,te(this,Er,"f")["*"],te(this,Ps,"f")))),{unsub:()=>r.forEach(({unsub:n})=>n()),subscriber:()=>r.forEach(({subscriber:n})=>n()),subscriberRaw:(...n)=>r.forEach(({subscriberRaw:a})=>a(...n))}}createStore(t,r){const n=(r!=null?r:FP)(this.middleware),a=y$(this.reducer,t!=null?t:this.initial,n);a.actions=this.actions,a.selectors=this.selectors,Gc(a.getState,qn(this.selectors,i=>(...s)=>{let u=i(a.getState());return typeof u=="function"?u(...s):u}));for(const i in this.actions)a.dispatch[i]=(...s)=>a.dispatch(this.actions[i](...s));return this.subscribeAll(a),a}effectToMiddleware(t){return Rb(t,this.actions,this.selectors)}}Au=new WeakMap,Er=new WeakMap,Fa=new WeakMap,Ci=new WeakMap,za=new WeakMap,Oi=new WeakMap,sa=new WeakMap,Ai=new WeakMap,Ps=new WeakMap,Tu=new WeakMap,xs=new WeakMap,Yc=new WeakMap,Xc=new WeakMap,Vc=new WeakMap,Zc=new WeakMap,Jc=new WeakMap;function Sk(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=hH}var Ap=pH,vH=Qi,dH=Ap,gH=wa,_H="[object Arguments]",mH="[object Array]",$H="[object Boolean]",bH="[object Date]",yH="[object Error]",wH="[object Function]",SH="[object Map]",EH="[object Number]",CH="[object Object]",OH="[object RegExp]",AH="[object Set]",TH="[object String]",MH="[object WeakMap]",PH="[object ArrayBuffer]",xH="[object DataView]",IH="[object Float32Array]",DH="[object Float64Array]",RH="[object Int8Array]",BH="[object Int16Array]",LH="[object Int32Array]",FH="[object Uint8Array]",zH="[object Uint8ClampedArray]",GH="[object Uint16Array]",NH="[object Uint32Array]",Ee={};Ee[IH]=Ee[DH]=Ee[RH]=Ee[BH]=Ee[LH]=Ee[FH]=Ee[zH]=Ee[GH]=Ee[NH]=!0;Ee[_H]=Ee[mH]=Ee[PH]=Ee[$H]=Ee[xH]=Ee[bH]=Ee[yH]=Ee[wH]=Ee[SH]=Ee[EH]=Ee[CH]=Ee[OH]=Ee[AH]=Ee[TH]=Ee[MH]=!1;function jH(e){return gH(e)&&dH(e.length)&&!!Ee[vH(e)]}var qH=jH;function UH(e){return function(t){return e(t)}}var Tp=UH,Vs={exports:{}};(function(e,t){var r=Lb,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var f=a&&a.require&&a.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(Vs,Vs.exports);var kH=qH,HH=Tp,K1=Vs.exports,Y1=K1&&K1.isTypedArray,WH=Y1?HH(Y1):kH,Gb=WH,KH=Pk,YH=Cp,XH=Ir,VH=Xs.exports,ZH=Op,JH=Gb,QH=Object.prototype,tW=QH.hasOwnProperty;function eW(e,t){var r=XH(e),n=!r&&YH(e),a=!r&&!n&&VH(e),i=!r&&!n&&!a&&JH(e),s=r||n||a||i,u=s?KH(e.length,String):[],f=u.length;for(var c in e)(t||tW.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ZH(c,f)))&&u.push(c);return u}var Nb=eW,rW=Object.prototype;function nW(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||rW;return e===r}var Mp=nW;function aW(e,t){return function(r){return e(t(r))}}var jb=aW,iW=jb,sW=iW(Object.keys,Object),oW=sW,uW=Mp,fW=oW,lW=Object.prototype,cW=lW.hasOwnProperty;function hW(e){if(!uW(e))return fW(e);var t=[];for(var r in Object(e))cW.call(e,r)&&r!="constructor"&&t.push(r);return t}var pW=hW;function vW(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Qa=vW,dW=Qi,gW=Qa,_W="[object AsyncFunction]",mW="[object Function]",$W="[object GeneratorFunction]",bW="[object Proxy]";function yW(e){if(!gW(e))return!1;var t=dW(e);return t==mW||t==$W||t==_W||t==bW}var qb=yW,wW=qb,SW=Ap;function EW(e){return e!=null&&SW(e.length)&&!wW(e)}var ff=EW,CW=Nb,OW=pW,AW=ff;function TW(e){return AW(e)?CW(e):OW(e)}var co=TW,MW=Tk,PW=co;function xW(e,t){return e&&MW(e,t,PW)}var Ub=xW,IW=ff;function DW(e,t){return function(r,n){if(r==null)return r;if(!IW(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i-1}var r7=e7,n7=lf;function a7(e,t){var r=this.__data__,n=n7(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i7=a7,s7=qW,o7=VW,u7=QW,f7=r7,l7=i7;function ts(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tu))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var p=-1,v=!0,g=r&wY?new mY:void 0;for(i.set(e,t),i.set(t,e);++pa?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0&&r(u)?t>1?vy(u,t-1,r,n,a):Tet(a,u):n||(a[a.length]=u)}return a}var Pet=vy,xet=Pet;function Iet(e){var t=e==null?0:e.length;return t?xet(e,1):[]}var Det=Iet;function Ret(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Bet=Ret,Let=Bet,x_=Math.max;function Fet(e,t,r){return t=x_(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=x_(n.length-t,0),s=Array(i);++a0){if(++t>=Het)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Xet=Yet,Vet=ket,Zet=Xet,Jet=Zet(Vet),Qet=Jet,trt=Det,ert=zet,rrt=Qet;function nrt(e){return rrt(ert(e,void 0,trt),e+"")}var art=nrt,irt=df,srt=aet,ort=$et,urt=is,frt=po,lrt=wet,crt=art,hrt=Hp,prt=1,vrt=2,drt=4,grt=crt(function(e,t){var r={};if(e==null)return r;var n=!1;t=irt(t,function(i){return i=urt(i,e),n||(n=i.length>1),i}),frt(e,hrt(e),r),n&&(r=srt(r,prt|vrt|drt,lrt));for(var a=t.length;a--;)ort(r,t[a]);return r}),_rt=grt;function mrt(e){return e}function dy(e){var t=e;return function(){return t}}function gy(e){return Array.isArray(e)?e:ay((""+e).split("."),function(t){return!t})}var he="@@updeep/placeholder";function _f(e,t){var r=e.length;for(r>t&&(r=t);e[r-1]===he;)r-=1;return r}function cn(e){return function t(r){var n=[].slice.call(arguments,1),a=n[0],i=n[1],s=_f(arguments);return s>=1?e(r,a,i):t}}function fn(e){return function t(r,n){var a=[].slice.call(arguments,2),i=a[0],s=a[1],u=_f(arguments,2);if(n===he||i===he||s===he)throw new Error("Can only use placeholder on first argument of this function.");return u>=2?r===he?cn(function(f,c,h){return e(f,n,c,h)}):e(r,n,i,s):u===1?cn(function(f,c,h){return e(r,f,c,h)}):t}}function Is(e){return function t(r,n,a){var i=[].slice.call(arguments,3),s=i[0],u=i[1],f=_f(arguments,3);if(a===he||s===he||u===he)throw new Error("Can only use placeholder on first or second argument of this function.");return f>=3?r===he?n===he?fn(function(c,h,p,v){return e(c,h,a,p,v)}):cn(function(c,h,p){return e(c,n,a,h,p)}):n===he?cn(function(c,h,p){return e(r,c,a,h,p)}):e(r,n,a,s,u):f===2?r===he?fn(function(c,h,p,v){return e(c,n,h,p,v)}):cn(function(c,h,p){return e(r,n,c,h,p)}):f===1?fn(function(c,h,p,v){return e(r,c,h,p,v)}):t}}function $rt(e){return function t(r,n,a,i){var s=[].slice.call(arguments,4),u=s[0],f=s[1],c=_f(arguments,4);if(i===he||u===he||f===he)throw new Error("Can only use placeholder on first, second or third argument of this function.");return c>=4?r===he?n===he?a===he?Is(function(h,p,v,g,_){return e(h,p,v,i,g,_)}):fn(function(h,p,v,g){return e(h,p,a,i,v,g)}):a===he?fn(function(h,p,v,g){return e(h,n,p,i,v,g)}):cn(function(h,p,v){return e(h,n,a,i,p,v)}):n===he?a===he?fn(function(h,p,v,g){return e(r,h,p,i,v,g)}):cn(function(h,p,v){return e(r,h,a,i,p,v)}):a===he?cn(function(h,p,v){return e(r,n,h,i,p,v)}):e(r,n,a,i,u,f):c===3?r===he?n===he?Is(function(h,p,v,g,_){return e(h,p,a,v,g,_)}):fn(function(h,p,v,g){return e(h,n,a,p,v,g)}):n===he?fn(function(h,p,v,g){return e(r,h,a,p,v,g)}):cn(function(h,p,v){return e(r,n,a,h,p,v)}):c===2?r===he?Is(function(h,p,v,g,_){return e(h,n,p,v,g,_)}):fn(function(h,p,v,g){return e(r,n,h,p,v,g)}):c===1?Is(function(h,p,v,g,_){return e(r,h,p,v,g,_)}):t}}function vo(e,t){return t===void 0&&(t=e.length),[e,cn,fn,Is,$rt][t](e)}var brt=vo(function(e,t,r){for(var n=gy(e),a=r,i=0;i-1){var c=r[f];return f>0&&(r.splice(f,1),r.unshift(c)),c.value}return Gu}function a(u,f){n(u)===Gu&&(r.unshift({key:u,value:f}),r.length>e&&r.pop())}function i(){return r}function s(){r=[]}return{get:n,put:a,getEntries:i,clear:s}}var Rrt=function(t,r){return t===r};function Brt(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var a=r.length,i=0;i1?t-1:0),n=1;nee(e));Yp.setMutation("setDriveReqs",e=>ee({reqs:e}));const Grt=e=>Kp([t=>t.reqs.mass,t=>t.propulsion.drive.rating,t=>t.propulsion.drive.advanced],(t,r,n)=>e.dispatch.setDriveReqs(Nrt(t,r,n)));function Nrt(e,t,r=!1){const n=Math.ceil(t*.05*e),a=n*(r?3:2);return{mass:n,cost:a}}const Xp=new Ke({subduxes:{reqs:Sa},initial:{type:"none"},actions:{setFtl:null,setFtlReqs:null}});Xp.setMutation("setFtl",e=>ee({type:e}));Xp.setMutation("setFtlReqs",e=>ee({reqs:e}));function jrt(e,t){if(e==="none")return{cost:0,mass:0};const r=Math.ceil(t/10);return{mass:r,cost:r*(e==="advanced"?3:2)}}const qrt=e=>Kp([t=>t.propulsion.ftl.type,t=>t.reqs.mass],(t,r)=>e.dispatch.setFtlReqs(jrt(t,r))),Urt=new Ke({subduxes:{drive:Yp,ftl:Xp}});var sh={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(e,t){(function(){var r,n="4.17.21",a=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",c=500,h="__lodash_placeholder__",p=1,v=2,g=4,_=1,m=2,b=1,y=2,w=4,C=8,T=16,A=32,x=64,I=128,B=256,P=512,L=30,G="...",K=800,at=16,et=1,rt=2,gt=3,Z=1/0,it=9007199254740991,ct=17976931348623157e292,lt=0/0,dt=4294967295,Ut=dt-1,Lt=dt>>>1,ve=[["ary",I],["bind",b],["bindKey",y],["curry",C],["curryRight",T],["flip",P],["partial",A],["partialRight",x],["rearg",B]],bt="[object Arguments]",Nt="[object Array]",de="[object AsyncFunction]",Jt="[object Boolean]",Tt="[object Date]",Ie="[object DOMException]",Oe="[object Error]",ge="[object Function]",Kt="[object GeneratorFunction]",wt="[object Map]",St="[object Number]",Ae="[object Null]",be="[object Object]",jt="[object Promise]",Ft="[object Proxy]",Le="[object RegExp]",Fe="[object Set]",Kr="[object String]",Dr="[object Symbol]",Kn="[object Undefined]",gr="[object WeakMap]",Ea="[object WeakSet]",Ca="[object ArrayBuffer]",Yn="[object DataView]",Xn="[object Float32Array]",si="[object Float64Array]",fs="[object Int8Array]",oi="[object Int16Array]",Ff="[object Int32Array]",zf="[object Uint8Array]",Gf="[object Uint8ClampedArray]",Nf="[object Uint16Array]",jf="[object Uint32Array]",kw=/\b__p \+= '';/g,Hw=/\b(__p \+=) '' \+/g,Ww=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mv=/&(?:amp|lt|gt|quot|#39);/g,Pv=/[&<>"']/g,Kw=RegExp(Mv.source),Yw=RegExp(Pv.source),Xw=/<%-([\s\S]+?)%>/g,Vw=/<%([\s\S]+?)%>/g,xv=/<%=([\s\S]+?)%>/g,Zw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jw=/^\w*$/,Qw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qf=/[\\^$.*+?()[\]{}|]/g,tS=RegExp(qf.source),Uf=/^\s+/,eS=/\s/,rS=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nS=/\{\n\/\* \[wrapped with (.+)\] \*/,aS=/,? & /,iS=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sS=/[()=,{}\[\]\/\s]/,oS=/\\(\\)?/g,uS=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Iv=/\w*$/,fS=/^[-+]0x[0-9a-f]+$/i,lS=/^0b[01]+$/i,cS=/^\[object .+?Constructor\]$/,hS=/^0o[0-7]+$/i,pS=/^(?:0|[1-9]\d*)$/,vS=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Eo=/($^)/,dS=/['\n\r\u2028\u2029\\]/g,Co="\\ud800-\\udfff",gS="\\u0300-\\u036f",_S="\\ufe20-\\ufe2f",mS="\\u20d0-\\u20ff",Dv=gS+_S+mS,Rv="\\u2700-\\u27bf",Bv="a-z\\xdf-\\xf6\\xf8-\\xff",$S="\\xac\\xb1\\xd7\\xf7",bS="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yS="\\u2000-\\u206f",wS=" \\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",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",zv=$S+bS+yS+wS,kf="['\u2019]",SS="["+Co+"]",Gv="["+zv+"]",Oo="["+Dv+"]",Nv="\\d+",ES="["+Rv+"]",jv="["+Bv+"]",qv="[^"+Co+zv+Nv+Rv+Bv+Lv+"]",Hf="\\ud83c[\\udffb-\\udfff]",CS="(?:"+Oo+"|"+Hf+")",Uv="[^"+Co+"]",Wf="(?:\\ud83c[\\udde6-\\uddff]){2}",Kf="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Lv+"]",kv="\\u200d",Hv="(?:"+jv+"|"+qv+")",OS="(?:"+ui+"|"+qv+")",Wv="(?:"+kf+"(?:d|ll|m|re|s|t|ve))?",Kv="(?:"+kf+"(?:D|LL|M|RE|S|T|VE))?",Yv=CS+"?",Xv="["+Fv+"]?",AS="(?:"+kv+"(?:"+[Uv,Wf,Kf].join("|")+")"+Xv+Yv+")*",TS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",MS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vv=Xv+Yv+AS,PS="(?:"+[ES,Wf,Kf].join("|")+")"+Vv,xS="(?:"+[Uv+Oo+"?",Oo,Wf,Kf,SS].join("|")+")",IS=RegExp(kf,"g"),DS=RegExp(Oo,"g"),Yf=RegExp(Hf+"(?="+Hf+")|"+xS+Vv,"g"),RS=RegExp([ui+"?"+jv+"+"+Wv+"(?="+[Gv,ui,"$"].join("|")+")",OS+"+"+Kv+"(?="+[Gv,ui+Hv,"$"].join("|")+")",ui+"?"+Hv+"+"+Wv,ui+"+"+Kv,MS,TS,Nv,PS].join("|"),"g"),BS=RegExp("["+kv+Co+Dv+Fv+"]"),LS=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,FS=["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"],zS=-1,ye={};ye[Xn]=ye[si]=ye[fs]=ye[oi]=ye[Ff]=ye[zf]=ye[Gf]=ye[Nf]=ye[jf]=!0,ye[bt]=ye[Nt]=ye[Ca]=ye[Jt]=ye[Yn]=ye[Tt]=ye[Oe]=ye[ge]=ye[wt]=ye[St]=ye[be]=ye[Le]=ye[Fe]=ye[Kr]=ye[gr]=!1;var _e={};_e[bt]=_e[Nt]=_e[Ca]=_e[Yn]=_e[Jt]=_e[Tt]=_e[Xn]=_e[si]=_e[fs]=_e[oi]=_e[Ff]=_e[wt]=_e[St]=_e[be]=_e[Le]=_e[Fe]=_e[Kr]=_e[Dr]=_e[zf]=_e[Gf]=_e[Nf]=_e[jf]=!0,_e[Oe]=_e[ge]=_e[gr]=!1;var GS={\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"},NS={"&":"&","<":"<",">":">",'"':""","'":"'"},jS={"&":"&","<":"<",">":">",""":'"',"'":"'"},qS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},US=parseFloat,kS=parseInt,Zv=typeof Cr=="object"&&Cr&&Cr.Object===Object&&Cr,HS=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Zv||HS||Function("return this")(),Xf=t&&!t.nodeType&&t,Oa=Xf&&!0&&e&&!e.nodeType&&e,Jv=Oa&&Oa.exports===Xf,Vf=Jv&&Zv.process,Rr=function(){try{var z=Oa&&Oa.require&&Oa.require("util").types;return z||Vf&&Vf.binding&&Vf.binding("util")}catch{}}(),Qv=Rr&&Rr.isArrayBuffer,td=Rr&&Rr.isDate,ed=Rr&&Rr.isMap,rd=Rr&&Rr.isRegExp,nd=Rr&&Rr.isSet,ad=Rr&&Rr.isTypedArray;function _r(z,Y,U){switch(U.length){case 0:return z.call(Y);case 1:return z.call(Y,U[0]);case 2:return z.call(Y,U[0],U[1]);case 3:return z.call(Y,U[0],U[1],U[2])}return z.apply(Y,U)}function WS(z,Y,U,_t){for(var Dt=-1,ie=z==null?0:z.length;++Dt-1}function Zf(z,Y,U){for(var _t=-1,Dt=z==null?0:z.length;++_t-1;);return U}function hd(z,Y){for(var U=z.length;U--&&fi(Y,z[U],0)>-1;);return U}function eE(z,Y){for(var U=z.length,_t=0;U--;)z[U]===Y&&++_t;return _t}var rE=el(GS),nE=el(NS);function aE(z){return"\\"+qS[z]}function iE(z,Y){return z==null?r:z[Y]}function li(z){return BS.test(z)}function sE(z){return LS.test(z)}function oE(z){for(var Y,U=[];!(Y=z.next()).done;)U.push(Y.value);return U}function il(z){var Y=-1,U=Array(z.size);return z.forEach(function(_t,Dt){U[++Y]=[Dt,_t]}),U}function pd(z,Y){return function(U){return z(Y(U))}}function Jn(z,Y){for(var U=-1,_t=z.length,Dt=0,ie=[];++U<_t;){var Ue=z[U];(Ue===Y||Ue===h)&&(z[U]=h,ie[Dt++]=U)}return ie}function Mo(z){var Y=-1,U=Array(z.size);return z.forEach(function(_t){U[++Y]=_t}),U}function uE(z){var Y=-1,U=Array(z.size);return z.forEach(function(_t){U[++Y]=[_t,_t]}),U}function fE(z,Y,U){for(var _t=U-1,Dt=z.length;++_t-1}function YE(o,l){var d=this.__data__,$=ko(d,o);return $<0?(++this.size,d.push([o,l])):d[$][1]=l,this}An.prototype.clear=kE,An.prototype.delete=HE,An.prototype.get=WE,An.prototype.has=KE,An.prototype.set=YE;function Tn(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l=l?o:l)),o}function zr(o,l,d,$,S,O){var D,R=l&p,N=l&v,J=l&g;if(d&&(D=S?d(o,$,S,O):d(o)),D!==r)return D;if(!De(o))return o;var tt=zt(o);if(tt){if(D=JC(o),!R)return ur(o,D)}else{var nt=tr(o),vt=nt==ge||nt==Kt;if(aa(o))return Xd(o,R);if(nt==be||nt==bt||vt&&!S){if(D=N||vt?{}:vg(o),!R)return N?jC(o,lC(D,o)):NC(o,Cd(D,o))}else{if(!_e[nt])return S?o:{};D=QC(o,nt,R)}}O||(O=new Xr);var yt=O.get(o);if(yt)return yt;O.set(o,D),Ug(o)?o.forEach(function(xt){D.add(zr(xt,l,d,xt,o,O))}):jg(o)&&o.forEach(function(xt,Yt){D.set(Yt,zr(xt,l,d,Yt,o,O))});var Pt=J?N?xl:Pl:N?lr:We,kt=tt?r:Pt(o);return Br(kt||o,function(xt,Yt){kt&&(Yt=xt,xt=o[Yt]),gs(D,Yt,zr(xt,l,d,Yt,o,O))}),D}function cC(o){var l=We(o);return function(d){return Od(d,o,l)}}function Od(o,l,d){var $=d.length;if(o==null)return!$;for(o=le(o);$--;){var S=d[$],O=l[S],D=o[S];if(D===r&&!(S in o)||!O(D))return!1}return!0}function Ad(o,l,d){if(typeof o!="function")throw new Lr(s);return Ss(function(){o.apply(r,d)},l)}function _s(o,l,d,$){var S=-1,O=Ao,D=!0,R=o.length,N=[],J=l.length;if(!R)return N;d&&(l=Te(l,mr(d))),$?(O=Zf,D=!1):l.length>=a&&(O=ls,D=!1,l=new Ma(l));t:for(;++SS?0:S+d),$=$===r||$>S?S:qt($),$<0&&($+=S),$=d>$?0:Hg($);d<$;)o[d++]=l;return o}function Md(o,l){var d=[];return ta(o,function($,S,O){l($,S,O)&&d.push($)}),d}function Xe(o,l,d,$,S){var O=-1,D=o.length;for(d||(d=eO),S||(S=[]);++O0&&d(R)?l>1?Xe(R,l-1,d,$,S):Zn(S,R):$||(S[S.length]=R)}return S}var hl=eg(),Pd=eg(!0);function an(o,l){return o&&hl(o,l,We)}function pl(o,l){return o&&Pd(o,l,We)}function Wo(o,l){return Vn(l,function(d){return Dn(o[d])})}function xa(o,l){l=ra(l,o);for(var d=0,$=l.length;o!=null&&d<$;)o=o[on(l[d++])];return d&&d==$?o:r}function xd(o,l,d){var $=l(o);return zt(o)?$:Zn($,d(o))}function rr(o){return o==null?o===r?Kn:Ae:Aa&&Aa in le(o)?XC(o):uO(o)}function vl(o,l){return o>l}function vC(o,l){return o!=null&&fe.call(o,l)}function dC(o,l){return o!=null&&l in le(o)}function gC(o,l,d){return o>=Qe(l,d)&&o=120&&tt.length>=120)?new Ma(D&&tt):r}tt=o[0];var nt=-1,vt=R[0];t:for(;++nt-1;)R!==o&&Fo.call(R,N,1),Fo.call(o,N,1);return o}function jd(o,l){for(var d=o?l.length:0,$=d-1;d--;){var S=l[d];if(d==$||S!==O){var O=S;In(S)?Fo.call(o,S,1):Sl(o,S)}}return o}function bl(o,l){return o+No(yd()*(l-o+1))}function MC(o,l,d,$){for(var S=-1,O=ke(Go((l-o)/(d||1)),0),D=U(O);O--;)D[$?O:++S]=o,o+=d;return D}function yl(o,l){var d="";if(!o||l<1||l>it)return d;do l%2&&(d+=o),l=No(l/2),l&&(o+=o);while(l);return d}function Wt(o,l){return zl(_g(o,l,cr),o+"")}function PC(o){return Ed(yi(o))}function xC(o,l){var d=yi(o);return nu(d,Pa(l,0,d.length))}function bs(o,l,d,$){if(!De(o))return o;l=ra(l,o);for(var S=-1,O=l.length,D=O-1,R=o;R!=null&&++SS?0:S+l),d=d>S?S:d,d<0&&(d+=S),S=l>d?0:d-l>>>0,l>>>=0;for(var O=U(S);++$>>1,D=o[O];D!==null&&!br(D)&&(d?D<=l:D=a){var J=l?null:HC(o);if(J)return Mo(J);D=!1,S=ls,N=new Ma}else N=l?[]:R;t:for(;++$=$?o:Gr(o,l,d)}var Yd=wE||function(o){return Ye.clearTimeout(o)};function Xd(o,l){if(l)return o.slice();var d=o.length,$=gd?gd(d):new o.constructor(d);return o.copy($),$}function Al(o){var l=new o.constructor(o.byteLength);return new Bo(l).set(new Bo(o)),l}function LC(o,l){var d=l?Al(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.byteLength)}function FC(o){var l=new o.constructor(o.source,Iv.exec(o));return l.lastIndex=o.lastIndex,l}function zC(o){return ds?le(ds.call(o)):{}}function Vd(o,l){var d=l?Al(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.length)}function Zd(o,l){if(o!==l){var d=o!==r,$=o===null,S=o===o,O=br(o),D=l!==r,R=l===null,N=l===l,J=br(l);if(!R&&!J&&!O&&o>l||O&&D&&N&&!R&&!J||$&&D&&N||!d&&N||!S)return 1;if(!$&&!O&&!J&&o=R)return N;var J=d[$];return N*(J=="desc"?-1:1)}}return o.index-l.index}function Jd(o,l,d,$){for(var S=-1,O=o.length,D=d.length,R=-1,N=l.length,J=ke(O-D,0),tt=U(N+J),nt=!$;++R1?d[S-1]:r,D=S>2?d[2]:r;for(O=o.length>3&&typeof O=="function"?(S--,O):r,D&&nr(d[0],d[1],D)&&(O=S<3?r:O,S=1),l=le(l);++$-1?S[O?l[D]:D]:r}}function ag(o){return xn(function(l){var d=l.length,$=d,S=Fr.prototype.thru;for(o&&l.reverse();$--;){var O=l[$];if(typeof O!="function")throw new Lr(s);if(S&&!D&&eu(O)=="wrapper")var D=new Fr([],!0)}for($=D?$:d;++$1&&Qt.reverse(),tt&&NR))return!1;var J=O.get(o),tt=O.get(l);if(J&&tt)return J==l&&tt==o;var nt=-1,vt=!0,yt=d&m?new Ma:r;for(O.set(o,l),O.set(l,o);++nt1?"& ":"")+l[$],l=l.join(d>2?", ":" "),o.replace(rS,`{ +/* [wrapped with `+l+`] */ +`)}function eO(o){return zt(o)||Ra(o)||!!($d&&o&&o[$d])}function In(o,l){var d=typeof o;return l=l==null?it:l,!!l&&(d=="number"||d!="symbol"&&pS.test(o))&&o>-1&&o%1==0&&o0){if(++l>=K)return arguments[0]}else l=0;return o.apply(r,arguments)}}function nu(o,l){var d=-1,$=o.length,S=$-1;for(l=l===r?$:l;++d1?o[l-1]:r;return d=typeof d=="function"?(o.pop(),d):r,Mg(o,d)});function Pg(o){var l=E(o);return l.__chain__=!0,l}function hA(o,l){return l(o),o}function au(o,l){return l(o)}var pA=xn(function(o){var l=o.length,d=l?o[0]:0,$=this.__wrapped__,S=function(O){return cl(O,o)};return l>1||this.__actions__.length||!($ instanceof Xt)||!In(d)?this.thru(S):($=$.slice(d,+d+(l?1:0)),$.__actions__.push({func:au,args:[S],thisArg:r}),new Fr($,this.__chain__).thru(function(O){return l&&!O.length&&O.push(r),O}))});function vA(){return Pg(this)}function dA(){return new Fr(this.value(),this.__chain__)}function gA(){this.__values__===r&&(this.__values__=kg(this.value()));var o=this.__index__>=this.__values__.length,l=o?r:this.__values__[this.__index__++];return{done:o,value:l}}function _A(){return this}function mA(o){for(var l,d=this;d instanceof Uo;){var $=Sg(d);$.__index__=0,$.__values__=r,l?S.__wrapped__=$:l=$;var S=$;d=d.__wrapped__}return S.__wrapped__=o,l}function $A(){var o=this.__wrapped__;if(o instanceof Xt){var l=o;return this.__actions__.length&&(l=new Xt(this)),l=l.reverse(),l.__actions__.push({func:au,args:[Gl],thisArg:r}),new Fr(l,this.__chain__)}return this.thru(Gl)}function bA(){return Wd(this.__wrapped__,this.__actions__)}var yA=Vo(function(o,l,d){fe.call(o,d)?++o[d]:Mn(o,d,1)});function wA(o,l,d){var $=zt(o)?id:hC;return d&&nr(o,l,d)&&(l=r),$(o,Mt(l,3))}function SA(o,l){var d=zt(o)?Vn:Md;return d(o,Mt(l,3))}var EA=ng(Eg),CA=ng(Cg);function OA(o,l){return Xe(iu(o,l),1)}function AA(o,l){return Xe(iu(o,l),Z)}function TA(o,l,d){return d=d===r?1:qt(d),Xe(iu(o,l),d)}function xg(o,l){var d=zt(o)?Br:ta;return d(o,Mt(l,3))}function Ig(o,l){var d=zt(o)?KS:Td;return d(o,Mt(l,3))}var MA=Vo(function(o,l,d){fe.call(o,d)?o[d].push(l):Mn(o,d,[l])});function PA(o,l,d,$){o=fr(o)?o:yi(o),d=d&&!$?qt(d):0;var S=o.length;return d<0&&(d=ke(S+d,0)),lu(o)?d<=S&&o.indexOf(l,d)>-1:!!S&&fi(o,l,d)>-1}var xA=Wt(function(o,l,d){var $=-1,S=typeof l=="function",O=fr(o)?U(o.length):[];return ta(o,function(D){O[++$]=S?_r(l,D,d):ms(D,l,d)}),O}),IA=Vo(function(o,l,d){Mn(o,d,l)});function iu(o,l){var d=zt(o)?Te:Bd;return d(o,Mt(l,3))}function DA(o,l,d,$){return o==null?[]:(zt(l)||(l=l==null?[]:[l]),d=$?r:d,zt(d)||(d=d==null?[]:[d]),Gd(o,l,d))}var RA=Vo(function(o,l,d){o[d?0:1].push(l)},function(){return[[],[]]});function BA(o,l,d){var $=zt(o)?Jf:fd,S=arguments.length<3;return $(o,Mt(l,4),d,S,ta)}function LA(o,l,d){var $=zt(o)?YS:fd,S=arguments.length<3;return $(o,Mt(l,4),d,S,Td)}function FA(o,l){var d=zt(o)?Vn:Md;return d(o,uu(Mt(l,3)))}function zA(o){var l=zt(o)?Ed:PC;return l(o)}function GA(o,l,d){(d?nr(o,l,d):l===r)?l=1:l=qt(l);var $=zt(o)?oC:xC;return $(o,l)}function NA(o){var l=zt(o)?uC:DC;return l(o)}function jA(o){if(o==null)return 0;if(fr(o))return lu(o)?ci(o):o.length;var l=tr(o);return l==wt||l==Fe?o.size:_l(o).length}function qA(o,l,d){var $=zt(o)?Qf:RC;return d&&nr(o,l,d)&&(l=r),$(o,Mt(l,3))}var UA=Wt(function(o,l){if(o==null)return[];var d=l.length;return d>1&&nr(o,l[0],l[1])?l=[]:d>2&&nr(l[0],l[1],l[2])&&(l=[l[0]]),Gd(o,Xe(l,1),[])}),su=SE||function(){return Ye.Date.now()};function kA(o,l){if(typeof l!="function")throw new Lr(s);return o=qt(o),function(){if(--o<1)return l.apply(this,arguments)}}function Dg(o,l,d){return l=d?r:l,l=o&&l==null?o.length:l,Pn(o,I,r,r,r,r,l)}function Rg(o,l){var d;if(typeof l!="function")throw new Lr(s);return o=qt(o),function(){return--o>0&&(d=l.apply(this,arguments)),o<=1&&(l=r),d}}var jl=Wt(function(o,l,d){var $=b;if(d.length){var S=Jn(d,$i(jl));$|=A}return Pn(o,$,l,d,S)}),Bg=Wt(function(o,l,d){var $=b|y;if(d.length){var S=Jn(d,$i(Bg));$|=A}return Pn(l,$,o,d,S)});function Lg(o,l,d){l=d?r:l;var $=Pn(o,C,r,r,r,r,r,l);return $.placeholder=Lg.placeholder,$}function Fg(o,l,d){l=d?r:l;var $=Pn(o,T,r,r,r,r,r,l);return $.placeholder=Fg.placeholder,$}function zg(o,l,d){var $,S,O,D,R,N,J=0,tt=!1,nt=!1,vt=!0;if(typeof o!="function")throw new Lr(s);l=jr(l)||0,De(d)&&(tt=!!d.leading,nt="maxWait"in d,O=nt?ke(jr(d.maxWait)||0,l):O,vt="trailing"in d?!!d.trailing:vt);function yt(Ge){var Zr=$,Bn=S;return $=S=r,J=Ge,D=o.apply(Bn,Zr),D}function Pt(Ge){return J=Ge,R=Ss(Yt,l),tt?yt(Ge):D}function kt(Ge){var Zr=Ge-N,Bn=Ge-J,n0=l-Zr;return nt?Qe(n0,O-Bn):n0}function xt(Ge){var Zr=Ge-N,Bn=Ge-J;return N===r||Zr>=l||Zr<0||nt&&Bn>=O}function Yt(){var Ge=su();if(xt(Ge))return Qt(Ge);R=Ss(Yt,kt(Ge))}function Qt(Ge){return R=r,vt&&$?yt(Ge):($=S=r,D)}function yr(){R!==r&&Yd(R),J=0,$=N=S=R=r}function ar(){return R===r?D:Qt(su())}function wr(){var Ge=su(),Zr=xt(Ge);if($=arguments,S=this,N=Ge,Zr){if(R===r)return Pt(N);if(nt)return Yd(R),R=Ss(Yt,l),yt(N)}return R===r&&(R=Ss(Yt,l)),D}return wr.cancel=yr,wr.flush=ar,wr}var HA=Wt(function(o,l){return Ad(o,1,l)}),WA=Wt(function(o,l,d){return Ad(o,jr(l)||0,d)});function KA(o){return Pn(o,P)}function ou(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new Lr(s);var d=function(){var $=arguments,S=l?l.apply(this,$):$[0],O=d.cache;if(O.has(S))return O.get(S);var D=o.apply(this,$);return d.cache=O.set(S,D)||O,D};return d.cache=new(ou.Cache||Tn),d}ou.Cache=Tn;function uu(o){if(typeof o!="function")throw new Lr(s);return function(){var l=arguments;switch(l.length){case 0:return!o.call(this);case 1:return!o.call(this,l[0]);case 2:return!o.call(this,l[0],l[1]);case 3:return!o.call(this,l[0],l[1],l[2])}return!o.apply(this,l)}}function YA(o){return Rg(2,o)}var XA=BC(function(o,l){l=l.length==1&&zt(l[0])?Te(l[0],mr(Mt())):Te(Xe(l,1),mr(Mt()));var d=l.length;return Wt(function($){for(var S=-1,O=Qe($.length,d);++S=l}),Ra=Id(function(){return arguments}())?Id:function(o){return Re(o)&&fe.call(o,"callee")&&!md.call(o,"callee")},zt=U.isArray,l2=Qv?mr(Qv):mC;function fr(o){return o!=null&&fu(o.length)&&!Dn(o)}function ze(o){return Re(o)&&fr(o)}function c2(o){return o===!0||o===!1||Re(o)&&rr(o)==Jt}var aa=CE||Ql,h2=td?mr(td):$C;function p2(o){return Re(o)&&o.nodeType===1&&!Es(o)}function v2(o){if(o==null)return!0;if(fr(o)&&(zt(o)||typeof o=="string"||typeof o.splice=="function"||aa(o)||bi(o)||Ra(o)))return!o.length;var l=tr(o);if(l==wt||l==Fe)return!o.size;if(ws(o))return!_l(o).length;for(var d in o)if(fe.call(o,d))return!1;return!0}function d2(o,l){return $s(o,l)}function g2(o,l,d){d=typeof d=="function"?d:r;var $=d?d(o,l):r;return $===r?$s(o,l,r,d):!!$}function Ul(o){if(!Re(o))return!1;var l=rr(o);return l==Oe||l==Ie||typeof o.message=="string"&&typeof o.name=="string"&&!Es(o)}function _2(o){return typeof o=="number"&&bd(o)}function Dn(o){if(!De(o))return!1;var l=rr(o);return l==ge||l==Kt||l==de||l==Ft}function Ng(o){return typeof o=="number"&&o==qt(o)}function fu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=it}function De(o){var l=typeof o;return o!=null&&(l=="object"||l=="function")}function Re(o){return o!=null&&typeof o=="object"}var jg=ed?mr(ed):yC;function m2(o,l){return o===l||gl(o,l,Dl(l))}function $2(o,l,d){return d=typeof d=="function"?d:r,gl(o,l,Dl(l),d)}function b2(o){return qg(o)&&o!=+o}function y2(o){if(aO(o))throw new Dt(i);return Dd(o)}function w2(o){return o===null}function S2(o){return o==null}function qg(o){return typeof o=="number"||Re(o)&&rr(o)==St}function Es(o){if(!Re(o)||rr(o)!=be)return!1;var l=Lo(o);if(l===null)return!0;var d=fe.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Io.call(d)==$E}var kl=rd?mr(rd):wC;function E2(o){return Ng(o)&&o>=-it&&o<=it}var Ug=nd?mr(nd):SC;function lu(o){return typeof o=="string"||!zt(o)&&Re(o)&&rr(o)==Kr}function br(o){return typeof o=="symbol"||Re(o)&&rr(o)==Dr}var bi=ad?mr(ad):EC;function C2(o){return o===r}function O2(o){return Re(o)&&tr(o)==gr}function A2(o){return Re(o)&&rr(o)==Ea}var T2=tu(ml),M2=tu(function(o,l){return o<=l});function kg(o){if(!o)return[];if(fr(o))return lu(o)?Yr(o):ur(o);if(cs&&o[cs])return oE(o[cs]());var l=tr(o),d=l==wt?il:l==Fe?Mo:yi;return d(o)}function Rn(o){if(!o)return o===0?o:0;if(o=jr(o),o===Z||o===-Z){var l=o<0?-1:1;return l*ct}return o===o?o:0}function qt(o){var l=Rn(o),d=l%1;return l===l?d?l-d:l:0}function Hg(o){return o?Pa(qt(o),0,dt):0}function jr(o){if(typeof o=="number")return o;if(br(o))return lt;if(De(o)){var l=typeof o.valueOf=="function"?o.valueOf():o;o=De(l)?l+"":l}if(typeof o!="string")return o===0?o:+o;o=ld(o);var d=lS.test(o);return d||hS.test(o)?kS(o.slice(2),d?2:8):fS.test(o)?lt:+o}function Wg(o){return sn(o,lr(o))}function P2(o){return o?Pa(qt(o),-it,it):o===0?o:0}function oe(o){return o==null?"":$r(o)}var x2=_i(function(o,l){if(ws(l)||fr(l)){sn(l,We(l),o);return}for(var d in l)fe.call(l,d)&&gs(o,d,l[d])}),Kg=_i(function(o,l){sn(l,lr(l),o)}),cu=_i(function(o,l,d,$){sn(l,lr(l),o,$)}),I2=_i(function(o,l,d,$){sn(l,We(l),o,$)}),D2=xn(cl);function R2(o,l){var d=gi(o);return l==null?d:Cd(d,l)}var B2=Wt(function(o,l){o=le(o);var d=-1,$=l.length,S=$>2?l[2]:r;for(S&&nr(l[0],l[1],S)&&($=1);++d<$;)for(var O=l[d],D=lr(O),R=-1,N=D.length;++R1),O}),sn(o,xl(o),d),$&&(d=zr(d,p|v|g,WC));for(var S=l.length;S--;)Sl(d,l[S]);return d});function Q2(o,l){return Xg(o,uu(Mt(l)))}var tT=xn(function(o,l){return o==null?{}:AC(o,l)});function Xg(o,l){if(o==null)return{};var d=Te(xl(o),function($){return[$]});return l=Mt(l),Nd(o,d,function($,S){return l($,S[0])})}function eT(o,l,d){l=ra(l,o);var $=-1,S=l.length;for(S||(S=1,o=r);++$l){var $=o;o=l,l=$}if(d||o%1||l%1){var S=yd();return Qe(o+S*(l-o+US("1e-"+((S+"").length-1))),l)}return bl(o,l)}var hT=mi(function(o,l,d){return l=l.toLowerCase(),o+(d?Jg(l):l)});function Jg(o){return Kl(oe(o).toLowerCase())}function Qg(o){return o=oe(o),o&&o.replace(vS,rE).replace(DS,"")}function pT(o,l,d){o=oe(o),l=$r(l);var $=o.length;d=d===r?$:Pa(qt(d),0,$);var S=d;return d-=l.length,d>=0&&o.slice(d,S)==l}function vT(o){return o=oe(o),o&&Yw.test(o)?o.replace(Pv,nE):o}function dT(o){return o=oe(o),o&&tS.test(o)?o.replace(qf,"\\$&"):o}var gT=mi(function(o,l,d){return o+(d?"-":"")+l.toLowerCase()}),_T=mi(function(o,l,d){return o+(d?" ":"")+l.toLowerCase()}),mT=rg("toLowerCase");function $T(o,l,d){o=oe(o),l=qt(l);var $=l?ci(o):0;if(!l||$>=l)return o;var S=(l-$)/2;return Qo(No(S),d)+o+Qo(Go(S),d)}function bT(o,l,d){o=oe(o),l=qt(l);var $=l?ci(o):0;return l&&$>>0,d?(o=oe(o),o&&(typeof l=="string"||l!=null&&!kl(l))&&(l=$r(l),!l&&li(o))?na(Yr(o),0,d):o.split(l,d)):[]}var AT=mi(function(o,l,d){return o+(d?" ":"")+Kl(l)});function TT(o,l,d){return o=oe(o),d=d==null?0:Pa(qt(d),0,o.length),l=$r(l),o.slice(d,d+l.length)==l}function MT(o,l,d){var $=E.templateSettings;d&&nr(o,l,d)&&(l=r),o=oe(o),l=cu({},l,$,fg);var S=cu({},l.imports,$.imports,fg),O=We(S),D=al(S,O),R,N,J=0,tt=l.interpolate||Eo,nt="__p += '",vt=sl((l.escape||Eo).source+"|"+tt.source+"|"+(tt===xv?uS:Eo).source+"|"+(l.evaluate||Eo).source+"|$","g"),yt="//# sourceURL="+(fe.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zS+"]")+` +`;o.replace(vt,function(xt,Yt,Qt,yr,ar,wr){return Qt||(Qt=yr),nt+=o.slice(J,wr).replace(dS,aE),Yt&&(R=!0,nt+=`' + +__e(`+Yt+`) + +'`),ar&&(N=!0,nt+=`'; +`+ar+`; +__p += '`),Qt&&(nt+=`' + +((__t = (`+Qt+`)) == null ? '' : __t) + +'`),J=wr+xt.length,xt}),nt+=`'; +`;var Pt=fe.call(l,"variable")&&l.variable;if(!Pt)nt=`with (obj) { +`+nt+` +} +`;else if(sS.test(Pt))throw new Dt(u);nt=(N?nt.replace(kw,""):nt).replace(Hw,"$1").replace(Ww,"$1;"),nt="function("+(Pt||"obj")+`) { +`+(Pt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(N?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+nt+`return __p +}`;var kt=e0(function(){return ie(O,yt+"return "+nt).apply(r,D)});if(kt.source=nt,Ul(kt))throw kt;return kt}function PT(o){return oe(o).toLowerCase()}function xT(o){return oe(o).toUpperCase()}function IT(o,l,d){if(o=oe(o),o&&(d||l===r))return ld(o);if(!o||!(l=$r(l)))return o;var $=Yr(o),S=Yr(l),O=cd($,S),D=hd($,S)+1;return na($,O,D).join("")}function DT(o,l,d){if(o=oe(o),o&&(d||l===r))return o.slice(0,vd(o)+1);if(!o||!(l=$r(l)))return o;var $=Yr(o),S=hd($,Yr(l))+1;return na($,0,S).join("")}function RT(o,l,d){if(o=oe(o),o&&(d||l===r))return o.replace(Uf,"");if(!o||!(l=$r(l)))return o;var $=Yr(o),S=cd($,Yr(l));return na($,S).join("")}function BT(o,l){var d=L,$=G;if(De(l)){var S="separator"in l?l.separator:S;d="length"in l?qt(l.length):d,$="omission"in l?$r(l.omission):$}o=oe(o);var O=o.length;if(li(o)){var D=Yr(o);O=D.length}if(d>=O)return o;var R=d-ci($);if(R<1)return $;var N=D?na(D,0,R).join(""):o.slice(0,R);if(S===r)return N+$;if(D&&(R+=N.length-R),kl(S)){if(o.slice(R).search(S)){var J,tt=N;for(S.global||(S=sl(S.source,oe(Iv.exec(S))+"g")),S.lastIndex=0;J=S.exec(tt);)var nt=J.index;N=N.slice(0,nt===r?R:nt)}}else if(o.indexOf($r(S),R)!=R){var vt=N.lastIndexOf(S);vt>-1&&(N=N.slice(0,vt))}return N+$}function LT(o){return o=oe(o),o&&Kw.test(o)?o.replace(Mv,cE):o}var FT=mi(function(o,l,d){return o+(d?" ":"")+l.toUpperCase()}),Kl=rg("toUpperCase");function t0(o,l,d){return o=oe(o),l=d?r:l,l===r?sE(o)?vE(o):ZS(o):o.match(l)||[]}var e0=Wt(function(o,l){try{return _r(o,r,l)}catch(d){return Ul(d)?d:new Dt(d)}}),zT=xn(function(o,l){return Br(l,function(d){d=on(d),Mn(o,d,jl(o[d],o))}),o});function GT(o){var l=o==null?0:o.length,d=Mt();return o=l?Te(o,function($){if(typeof $[1]!="function")throw new Lr(s);return[d($[0]),$[1]]}):[],Wt(function($){for(var S=-1;++Sit)return[];var d=dt,$=Qe(o,dt);l=Mt(l),o-=dt;for(var S=nl($,l);++d0||l<0)?new Xt(d):(o<0?d=d.takeRight(-o):o&&(d=d.drop(o)),l!==r&&(l=qt(l),d=l<0?d.dropRight(-l):d.take(l-o)),d)},Xt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Xt.prototype.toArray=function(){return this.take(dt)},an(Xt.prototype,function(o,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),$=/^(?:head|last)$/.test(l),S=E[$?"take"+(l=="last"?"Right":""):l],O=$||/^find/.test(l);!S||(E.prototype[l]=function(){var D=this.__wrapped__,R=$?[1]:arguments,N=D instanceof Xt,J=R[0],tt=N||zt(D),nt=function(Yt){var Qt=S.apply(E,Zn([Yt],R));return $&&vt?Qt[0]:Qt};tt&&d&&typeof J=="function"&&J.length!=1&&(N=tt=!1);var vt=this.__chain__,yt=!!this.__actions__.length,Pt=O&&!vt,kt=N&&!yt;if(!O&&tt){D=kt?D:new Xt(this);var xt=o.apply(D,R);return xt.__actions__.push({func:au,args:[nt],thisArg:r}),new Fr(xt,vt)}return Pt&&kt?o.apply(this,R):(xt=this.thru(nt),Pt?$?xt.value()[0]:xt.value():xt)})}),Br(["pop","push","shift","sort","splice","unshift"],function(o){var l=Po[o],d=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",$=/^(?:pop|shift)$/.test(o);E.prototype[o]=function(){var S=arguments;if($&&!this.__chain__){var O=this.value();return l.apply(zt(O)?O:[],S)}return this[d](function(D){return l.apply(zt(D)?D:[],S)})}}),an(Xt.prototype,function(o,l){var d=E[l];if(d){var $=d.name+"";fe.call(di,$)||(di[$]=[]),di[$].push({name:l,func:d})}}),di[Zo(r,y).name]=[{name:"wrapper",func:r}],Xt.prototype.clone=LE,Xt.prototype.reverse=FE,Xt.prototype.value=zE,E.prototype.at=pA,E.prototype.chain=vA,E.prototype.commit=dA,E.prototype.next=gA,E.prototype.plant=mA,E.prototype.reverse=$A,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=bA,E.prototype.first=E.prototype.head,cs&&(E.prototype[cs]=_A),E},hi=dE();Oa?((Oa.exports=hi)._=hi,Xf._=hi):Ye._=hi}).call(Cr)})(sh,sh.exports);var krt=sh.exports;const mf=new Ke({subduxes:{reqs:Sa},initial:{bays:0,squadrons:[]},actions:{setCarrierBays:null,setSquadronType:null}});mf.setMutation("setCarrierBays",e=>ee({bays:e,reqs:Krt(e),squadrons:Wrt(e)}));mf.setMutation("setSquadronType",({type:e,id:t})=>r=>ee.updateIn(["squadrons",t-1],{type:e,reqs:Hrt(e)},r));const Nu=[{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 Hrt(e){var t;return{mass:6,cost:6*((t=Nu.find(r=>r.type===e))==null?void 0:t.cost)}}const Wrt=e=>t=>(t.length>e&&(t=t.slice(0,e)),t.length({type:Nu[0].type,reqs:{cost:6*Nu[0].cost,mass:6}}))]),t);function Krt(e){return{mass:9*e,cost:18*e}}const $f=new Ke({actions:{setShipType:null,setShipClass:null,setCarrierBays:mf.actions.setCarrierBays},initial:{shipType:"",shipClass:"",isCarrier:!1,mass:10}});$f.setMutation("setShipType",e=>ee({shipType:e}));$f.setMutation("setShipClass",e=>ee({shipClass:e}));$f.setMutation("setCarrierBays",e=>ee({isCarrier:e>0}));const Vp=new Ke({subduxes:{reqs:Sa},initial:{rating:0,min:0,max:0},actions:{setShipMass:null,setHull:null}});Vp.setMutation("setHull",e=>ee({rating:e,reqs:{mass:e,cost:2*e}}));Vp.setMutation("setShipMass",e=>t=>{let{rating:r}=t;r>e&&(r=e);const n=Math.ceil(e/10);return ree(e));Zp.setMutation("setScreensReqs",e=>ee({reqs:e}));const Yrt=e=>Kp(t=>t.reqs.mass,t=>t.structure.screens.standard,t=>t.structure.screens.advanced,(...t)=>e.dispatch.setScreensReqs(Xrt(...t)));function Xrt(e,t,r){const n=t*Math.max(3,Math.ceil(.05*e)),a=r*Math.max(4,Math.ceil(.075*e));return{mass:n+a,cost:3*n+4*a}}const yy=new Ke({subduxes:{reqs:Sa},initial:{space:0},actions:{setCargo:null}});yy.setMutation("setCargo",e=>ee({space:e,reqs:{mass:e}}));const Jp=new Ke({subduxes:{reqs:Sa},initial:{layers:[]},actions:{setArmorLayers:null,setArmorRating:null}});Jp.setMutation("setArmorRating",({layer:e,rating:t})=>r=>{let n=[...r.layers].map((a,i)=>i===e-1?t:a);return{layers:n,reqs:wy(n)}});Jp.setMutation("setArmorLayers",e=>t=>{let r=[...t.layers];for(en+a,0),r=2*e.map((n,a)=>n*(a+1)).reduce((n,a)=>n+a,0);return{mass:t,cost:r}}const Sy=new Ke({subduxes:{reqs:Sa},initial:{type:"none"},actions:{setStreamlining:null}});Sy.setMutation("setStreamlining",({shipMass:e,type:t})=>ee({type:t,reqs:Vrt({shipMass:e,type:t})}));function Vrt({shipMass:e,type:t}){const r=Math.ceil(e*(t==="none"?0:t==="partial"?5:10)/100);return{mass:r,cost:2*r}}const Zrt=new Ke({subduxes:{hull:Vp,screens:Zp,cargo:yy,streamlining:Sy,armor:Jp}}),Zs=[{name:"beam",type:"beam",reqs:Jrt,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"}}],bf=new Ke({initial:[],actions:{addWeapon:null,removeWeapon:null,setWeapon:null}});bf.setMutation("setWeapon",r=>{var n=r,{id:e}=n,t=o0(n,["id"]);return a=>(console.log(e,t,a),a=ee.map(ee.if(i=>i.id===e,i=>tc(wi({id:e},t),{reqs:Ey(t)})),a),console.log(a),a)});bf.setMutation("removeWeapon",e=>t=>[...t.filter(r=>r.id!==e)]);bf.setMutation("addWeapon",e=>t=>{const r=Zs.find(n=>n.type===e).initial;return[...t,wi({id:t.length===0?1:t[t.length-1]+1,type:e,reqs:Ey(wi({type:e},r))},r)]});function Ey(e){const{reqs:t}=Zs.find(r=>r.type===e.type)||{};return t?typeof t=="function"?t(e):t:{}}const D_=e=>e.length!==4?!1:!e.some(t=>t.length===1);function Jrt({weaponClass:e,arcs:t}){console.log({weaponClass:e,arcs:t});let r;return e===1&&(r=1),e===2&&(r=2+(t.length>3?1:0)),e==3&&(r=4,D_(t)?r+=2:r+=t.length-1),e==4&&(r=8,D_(t)?r+=4:r+=2*(t.length-1)),{mass:r,cost:3*r}}const R_={cost:0,mass:0},Qp=new Ke({subduxes:{weapons:bf},initial:{firecons:{stations:0,reqs:R_},adfc:{rating:0,reqs:R_}},actions:{setADFC:null,setFirecons:null}});Qp.setMutation("setFirecons",e=>ee({firecons:{stations:e,reqs:{cost:4*e,mass:e}}}));Qp.setMutation("setADFC",e=>ee({adfc:{rating:e,reqs:{cost:8*e,mass:2*e}}}));const ri=new Ke({subduxes:{identification:$f,propulsion:Urt,structure:Zrt,carrier:mf,weaponry:Qp},initial:{reqs:{cost:0,mass:10,usedMass:0}},actions:{setShipReqs:null}});ri.setMutation("setShipMass",e=>ee({reqs:{mass:e}}));ri.setMutation("setShipReqs",e=>ee({reqs:e}));ri.addReaction(Grt);ri.addReaction(qrt);ri.addReaction(Yrt);ri.addReaction(e=>t=>{let r=0,n=0,a=Object.values(t);for(;a.length>0;){const i=a.shift();typeof i=="object"&&(i.reqs&&(r+=i.reqs.cost,n+=i.reqs.mass),a.push(...Object.values(i)))}e.dispatch.setShipReqs({cost:r,usedMass:n})});let Qrt=v$;var tnt=()=>{let e;localStorage.getItem("ship")&&(e=JSON.parse(localStorage.getItem("ship")));const t=ri.createStore(e,a=>Qrt(NM(a)));let r;const n=BM(t.getState(),a=>{t.subscribe(()=>{r!==t.getState()&&(r=t.getState(),a(r),localStorage.setItem("ship",JSON.stringify(r)))})});return{dispatch:t.dispatch,state:n,shipMass:LM(n,a=>a.reqs.mass)}};function yf(){const e=OM();return t=>{const r=Object.keys(e.$$.callbacks),n=[];return r.forEach(a=>n.push(ae(t,a,i=>Fh(e,i)))),{destroy:()=>{n.forEach(a=>a())}}}}const ent=e=>({}),B_=e=>({}),rnt=e=>({}),L_=e=>({});function F_(e){let t,r;const n=e[4].header,a=bn(n,e,e[3],L_);return{c(){t=k("header"),a&&a.c()},l(i){t=H(i,"HEADER",{});var s=V(t);a&&a.l(s),s.forEach(M)},m(i,s){q(i,t,s),a&&a.m(t,null),r=!0},p(i,s){a&&a.p&&(!r||s&8)&&_n(a,n,i,i[3],r?$n(n,i[3],s,rnt):mn(i[3]),L_)},i(i){r||(W(a,i),r=!0)},o(i){X(a,i),r=!1},d(i){i&&M(t),a&&a.d(i)}}}function z_(e){let t,r;const n=e[4].footer,a=bn(n,e,e[3],B_);return{c(){t=k("footer"),a&&a.c()},l(i){t=H(i,"FOOTER",{});var s=V(t);a&&a.l(s),s.forEach(M)},m(i,s){q(i,t,s),a&&a.m(t,null),r=!0},p(i,s){a&&a.p&&(!r||s&8)&&_n(a,n,i,i[3],r?$n(n,i[3],s,ent):mn(i[3]),B_)},i(i){r||(W(a,i),r=!0)},o(i){X(a,i),r=!1},d(i){i&&M(t),a&&a.d(i)}}}function nnt(e){let t,r,n,a,i,s,u=e[2].header&&F_(e);const f=e[4].default,c=bn(f,e,e[3],null);let h=e[2].footer&&z_(e),p=[e[1]],v={};for(let g=0;g{u=null}),vr()),c&&c.p&&(!a||_&8)&&_n(c,f,g,g[3],a?$n(f,g[3],_,null):mn(g[3]),null),g[2].footer?h?(h.p(g,_),_&4&&W(h,1)):(h=z_(g),h.c(),W(h,1),h.m(t,null)):h&&(pr(),X(h,1,1,()=>{h=null}),vr()),la(t,v=ne(p,[_&2&&g[1]])),Me(t,"card",1)},i(g){a||(W(u),W(c,g),W(h),a=!0)},o(g){X(u),X(c,g),X(h),a=!1},d(g){g&&M(t),u&&u.d(),c&&c.d(g),h&&h.d(),i=!1,s()}}}function ant(e,t,r){const n=[];let a=ca(t,n),{$$slots:i={},$$scope:s}=t;const u=AM(i),f=yf();return e.$$set=c=>{t=Bt(Bt({},t),Li(c)),r(1,a=ca(t,n)),"$$scope"in c&&r(3,s=c.$$scope)},[f,a,u,s,i]}class int extends Ct{constructor(t){super();Ot(this,t,ant,nnt,At,{})}}function snt(e){let t,r,n,a;const i=e[7].default,s=bn(i,e,e[6],null);let u=[e[3]],f={};for(let c=0;cr(5,i=g));let v=0;return Mc("tabs:getid",()=>v++),Mc("tabs:active",p),e.$$set=g=>{t=Bt(Bt({},t),Li(g)),r(3,a=ca(t,n)),"active"in g&&r(4,f=g.active),"full"in g&&r(0,c=g.full),"$$scope"in g&&r(6,u=g.$$scope)},e.$$.update=()=>{e.$$.dirty&32&&r(4,f=i)},[c,h,p,a,f,i,u,s]}class unt extends Ct{constructor(t){super();Ot(this,t,ont,snt,At,{active:4,full:0})}}function fnt(e){let t,r,n,a;const i=e[8].default,s=bn(i,e,e[7],null);let u=[e[5]],f={};for(let c=0;cr(6,s=_));const v=Ne("tabs:getid")(),g=()=>p.set(c===!1?v:c);return e.$$set=_=>{t=Bt(Bt({},t),Li(_)),r(5,i=ca(t,a)),"tabid"in _&&r(0,c=_.tabid),"$$scope"in _&&r(7,f=_.$$scope)},e.$$.update=()=>{e.$$.dirty&65&&r(1,n=s===c||s===v)},[c,n,h,p,v,i,s,f,u,g]}class vc extends Ct{constructor(t){super();Ot(this,t,lnt,fnt,At,{tabid:0})}}function G_(e,{delay:t=0,duration:r=400,easing:n=TM}={}){const a=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:i=>`opacity: ${i*a}`}}function N_(e){let t,r,n,a,i,s,u,f,c;const h=e[4].default,p=bn(h,e,e[3],null);let v=[e[2]],g={};for(let _=0;_{s||(s=u0(t,G_,{duration:200},!0)),s.run(1)}),u=!0)},o(_){X(p,_),s||(s=u0(t,G_,{duration:200},!1)),s.run(0),u=!1},d(_){_&&M(t),p&&p.d(_),_&&s&&s.end(),f=!1,io(c)}}}function cnt(e){let t,r,n=e[0]&&N_(e);return{c(){n&&n.c(),t=je()},l(a){n&&n.l(a),t=je()},m(a,i){n&&n.m(a,i),q(a,t,i),r=!0},p(a,[i]){a[0]?n?(n.p(a,i),i&1&&W(n,1)):(n=N_(a),n.c(),W(n,1),n.m(t.parentNode,t)):n&&(pr(),X(n,1,1,()=>{n=null}),vr())},i(a){r||(W(n),r=!0)},o(a){X(n),r=!1},d(a){n&&n.d(a),a&&M(t)}}}function hnt(e,t,r){const n=["open"];let a=ca(t,n),{$$slots:i={},$$scope:s}=t,{open:u=!1}=t;const f=yf(),c=h=>r(0,u=!1);return e.$$set=h=>{t=Bt(Bt({},t),Li(h)),r(2,a=ca(t,n)),"open"in h&&r(0,u=h.open),"$$scope"in h&&r(3,s=h.$$scope)},[u,f,a,s,i,c]}class pnt extends Ct{constructor(t){super();Ot(this,t,hnt,cnt,At,{open:0})}}function vnt(e){let t,r,n,a,i;return{c(){t=k("a"),r=Fn("svg"),n=Fn("path"),a=Fn("path"),i=Fn("path"),this.h()},l(s){t=H(s,"A",{href:!0,class:!0,"aria-label":!0});var u=V(t);r=zn(u,"svg",{width:!0,height:!0,viewBox:!0,style:!0,"aria-hidden":!0});var f=V(r);n=zn(f,"path",{d:!0}),V(n).forEach(M),a=zn(f,"path",{d:!0,fill:!0,style:!0,class:!0}),V(a).forEach(M),i=zn(f,"path",{d:!0,fill:!0,class:!0}),V(i).forEach(M),f.forEach(M),u.forEach(M),this.h()},h(){F(n,"d","M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"),F(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"),F(a,"fill","currentColor"),Ln(a,"transform-origin","130px 106px"),F(a,"class","octo-arm"),F(i,"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"),F(i,"fill","currentColor"),F(i,"class","octo-body"),F(r,"width","80"),F(r,"height","80"),F(r,"viewBox","0 0 250 250"),Ln(r,"fill","#151513"),Ln(r,"color","#fff"),Ln(r,"position","absolute"),Ln(r,"top","0"),Ln(r,"border","0"),Ln(r,"right","0"),F(r,"aria-hidden","true"),F(t,"href",dnt),F(t,"class","github-corner"),F(t,"aria-label","View source on GitHub")},m(s,u){q(s,t,u),j(t,r),j(r,n),j(r,a),j(r,i)},p:se,i:se,o:se,d(s){s&&M(t)}}}const dnt="https://github.com/aotds/aotds-docks";class gnt extends Ct{constructor(t){super();Ot(this,t,null,vnt,At,{})}}function _nt(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_,m,b,y,w,C,T,A,x;return{c(){t=k("p"),r=mt(`This app is a ship builder for the game + `),n=k("a"),a=mt("Full Thrust"),i=mt(` + .`),s=ht(),u=k("p"),f=mt(`The contruction rules are following the + `),c=k("a"),h=mt("Cross Dimensions rules"),p=mt(` + as closely as possible.`),v=ht(),g=k("p"),_=mt(`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.`),m=ht(),b=k("p"),y=mt(`Written by + `),w=k("a"),C=mt("Yanick Champoux"),T=mt(` + . Code available on + `),A=k("a"),x=mt("Github"),this.h()},l(I){t=H(I,"P",{class:!0});var B=V(t);r=$t(B,`This app is a ship builder for the game + `),n=H(B,"A",{href:!0});var P=V(n);a=$t(P,"Full Thrust"),P.forEach(M),i=$t(B,` + .`),B.forEach(M),s=pt(I),u=H(I,"P",{class:!0});var L=V(u);f=$t(L,`The contruction rules are following the + `),c=H(L,"A",{href:!0});var G=V(c);h=$t(G,"Cross Dimensions rules"),G.forEach(M),p=$t(L,` + as closely as possible.`),L.forEach(M),v=pt(I),g=H(I,"P",{class:!0});var K=V(g);_=$t(K,`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.`),K.forEach(M),m=pt(I),b=H(I,"P",{class:!0});var at=V(b);y=$t(at,`Written by + `),w=H(at,"A",{href:!0});var et=V(w);C=$t(et,"Yanick Champoux"),et.forEach(M),T=$t(at,` + . Code available on + `),A=H(at,"A",{href:!0});var rt=V(A);x=$t(rt,"Github"),rt.forEach(M),at.forEach(M),this.h()},h(){F(n,"href","https://shop.groundzerogames.co.uk/rules.html"),F(t,"class","svelte-1mk8yef"),F(c,"href","http://members.ozemail.com.au/~laranzu/fullthrust/rules/"),F(u,"class","svelte-1mk8yef"),F(g,"class","svelte-1mk8yef"),F(w,"href","https://twitter.com/yenzie"),F(A,"href","https://github.com/aotds/aotds-shipyard"),F(b,"class","svelte-1mk8yef")},m(I,B){q(I,t,B),j(t,r),j(t,n),j(n,a),j(t,i),q(I,s,B),q(I,u,B),j(u,f),j(u,c),j(c,h),j(u,p),q(I,v,B),q(I,g,B),j(g,_),q(I,m,B),q(I,b,B),j(b,y),j(b,w),j(w,C),j(b,T),j(b,A),j(A,x)},d(I){I&&M(t),I&&M(s),I&&M(u),I&&M(v),I&&M(g),I&&M(m),I&&M(b)}}}function mnt(e){let t,r;return{c(){t=k("h2"),r=mt("Welcome to the docks"),this.h()},l(n){t=H(n,"H2",{slot:!0,class:!0});var a=V(t);r=$t(a,"Welcome to the docks"),a.forEach(M),this.h()},h(){F(t,"slot","header"),F(t,"class","svelte-1mk8yef")},m(n,a){q(n,t,a),j(t,r)},d(n){n&&M(t)}}}function $nt(e){let t;return{c(){t=k("div"),this.h()},l(r){t=H(r,"DIV",{slot:!0}),V(t).forEach(M),this.h()},h(){F(t,"slot","footer")},m(r,n){q(r,t,n)},d(r){r&&M(t)}}}function bnt(e){let t,r;return t=new int({props:{$$slots:{footer:[$nt],header:[mnt],default:[_nt]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&1&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}class ynt extends Ct{constructor(t){super();Ot(this,t,null,bnt,At,{})}}function wnt(e){let t;return{c(){t=mt("editor")},l(r){t=$t(r,"editor")},m(r,n){q(r,t,n)},d(r){r&&M(t)}}}function Snt(e){let t;return{c(){t=mt("json view")},l(r){t=$t(r,"json view")},m(r,n){q(r,t,n)},d(r){r&&M(t)}}}function Ent(e){let t;return{c(){t=mt("print view")},l(r){t=$t(r,"print view")},m(r,n){q(r,t,n)},d(r){r&&M(t)}}}function Cnt(e){let t,r,n,a,i,s;return t=new vc({props:{tabid:"editor",$$slots:{default:[wnt]},$$scope:{ctx:e}}}),n=new vc({props:{tabid:"json",$$slots:{default:[Snt]},$$scope:{ctx:e}}}),i=new vc({props:{tabid:"print",$$slots:{default:[Ent]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment),r=ht(),st(n.$$.fragment),a=ht(),st(i.$$.fragment)},l(u){ft(t.$$.fragment,u),r=pt(u),ft(n.$$.fragment,u),a=pt(u),ft(i.$$.fragment,u)},m(u,f){ot(t,u,f),q(u,r,f),ot(n,u,f),q(u,a,f),ot(i,u,f),s=!0},p(u,f){const c={};f&64&&(c.$$scope={dirty:f,ctx:u}),t.$set(c);const h={};f&64&&(h.$$scope={dirty:f,ctx:u}),n.$set(h);const p={};f&64&&(p.$$scope={dirty:f,ctx:u}),i.$set(p)},i(u){s||(W(t.$$.fragment,u),W(n.$$.fragment,u),W(i.$$.fragment,u),s=!0)},o(u){X(t.$$.fragment,u),X(n.$$.fragment,u),X(i.$$.fragment,u),s=!1},d(u){ut(t,u),u&&M(r),ut(n,u),u&&M(a),ut(i,u)}}}function Ont(e){let t,r;return t=new ynt({}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Ant(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_,m,b,y,w,C,T,A,x;function I(G){e[3](G)}let B={$$slots:{default:[Cnt]},$$scope:{ctx:e}};e[0]!==void 0&&(B.active=e[0]),m=new unt({props:B}),Nn.push(()=>Pc(m,"active",I));function P(G){e[4](G)}let L={$$slots:{default:[Ont]},$$scope:{ctx:e}};return e[1]!==void 0&&(L.open=e[1]),w=new pnt({props:L}),Nn.push(()=>Pc(w,"open",P)),{c(){t=k("header"),r=k("h1"),n=mt("The Docks"),a=ht(),i=k("h2"),s=mt("a "),u=k("a"),f=mt("Full Thrust"),c=mt(" ship builder"),h=ht(),p=k("a"),v=mt("about the app"),g=ht(),_=k("div"),st(m.$$.fragment),y=ht(),st(w.$$.fragment),this.h()},l(G){t=H(G,"HEADER",{class:!0});var K=V(t);r=H(K,"H1",{class:!0});var at=V(r);n=$t(at,"The Docks"),at.forEach(M),a=pt(K),i=H(K,"H2",{class:!0});var et=V(i);s=$t(et,"a "),u=H(et,"A",{href:!0});var rt=V(u);f=$t(rt,"Full Thrust"),rt.forEach(M),c=$t(et," ship builder"),et.forEach(M),h=pt(K),p=H(K,"A",{class:!0});var gt=V(p);v=$t(gt,"about the app"),gt.forEach(M),K.forEach(M),g=pt(G),_=H(G,"DIV",{class:!0});var Z=V(_);ft(m.$$.fragment,Z),Z.forEach(M),y=pt(G),ft(w.$$.fragment,G),this.h()},h(){F(r,"class","svelte-uwt8cz"),F(u,"href","https://shop.groundzerogames.co.uk/rules.html"),F(i,"class","svelte-uwt8cz"),F(p,"class","svelte-uwt8cz"),F(t,"class","svelte-uwt8cz"),F(_,"class","svelte-uwt8cz")},m(G,K){q(G,t,K),j(t,r),j(r,n),j(t,a),j(t,i),j(i,s),j(i,u),j(u,f),j(i,c),j(t,h),j(t,p),j(p,v),q(G,g,K),q(G,_,K),ot(m,_,null),q(G,y,K),ot(w,G,K),T=!0,A||(x=ae(p,"click",p$(e[2])),A=!0)},p(G,[K]){const at={};K&64&&(at.$$scope={dirty:K,ctx:G}),!b&&K&1&&(b=!0,at.active=G[0],xc(()=>b=!1)),m.$set(at);const et={};K&64&&(et.$$scope={dirty:K,ctx:G}),!C&&K&2&&(C=!0,et.open=G[1],xc(()=>C=!1)),w.$set(et)},i(G){T||(W(m.$$.fragment,G),W(w.$$.fragment,G),T=!0)},o(G){X(m.$$.fragment,G),X(w.$$.fragment,G),T=!1},d(G){G&&M(t),G&&M(g),G&&M(_),ut(m),G&&M(y),ut(w,G),A=!1,x()}}}function Tnt(e,t,r){let n=!1,a="editor";const i=Wa(),s=()=>r(1,n=!0);function u(c){a=c,r(0,a)}function f(c){n=c,r(1,n)}return e.$$.update=()=>{e.$$.dirty&1&&i("changeTab",a)},[a,n,s,u,f]}class Mnt extends Ct{constructor(t){super();Ot(this,t,Tnt,Ant,At,{})}}function j_(e){let t,r;return{c(){t=k("label"),r=mt(e[1]),this.h()},l(n){t=H(n,"LABEL",{class:!0});var a=V(t);r=$t(a,e[1]),a.forEach(M),this.h()},h(){F(t,"class","svelte-i3mp3j")},m(n,a){q(n,t,a),j(t,r)},p(n,a){a&2&&er(r,n[1])},d(n){n&&M(t)}}}function Pnt(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,placeholder:!0}),this.h()},h(){F(t,"type","text"),F(t,"placeholder",e[2])},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=[ae(t,"input",e[6]),ae(t,"change",e[5])],r=!0)},p(a,i){i&4&&F(t,"placeholder",a[2]),i&1&&t.value!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,io(n)}}}function xnt(e){let t,r,n,a=e[1]&&j_(e);const i=e[4].default,s=bn(i,e,e[3],null),u=s||Pnt(e);return{c(){t=k("div"),a&&a.c(),r=ht(),u&&u.c(),this.h()},l(f){t=H(f,"DIV",{class:!0});var c=V(t);a&&a.l(c),r=pt(c),u&&u.l(c),c.forEach(M),this.h()},h(){F(t,"class","svelte-i3mp3j")},m(f,c){q(f,t,c),a&&a.m(t,null),j(t,r),u&&u.m(t,null),n=!0},p(f,[c]){f[1]?a?a.p(f,c):(a=j_(f),a.c(),a.m(t,r)):a&&(a.d(1),a=null),s?s.p&&(!n||c&8)&&_n(s,i,f,f[3],n?$n(i,f[3],c,null):mn(f[3]),null):u&&u.p&&(!n||c&5)&&u.p(f,n?c:-1)},i(f){n||(W(u,f),n=!0)},o(f){X(u,f),n=!1},d(f){f&&M(t),a&&a.d(),u&&u.d(f)}}}function Int(e,t,r){let{$$slots:n={},$$scope:a}=t,{label:i=""}=t,{value:s=""}=t,{placeholder:u}=t;function f(h){Fh.call(this,e,h)}function c(){s=this.value,r(0,s)}return e.$$set=h=>{"label"in h&&r(1,i=h.label),"value"in h&&r(0,s=h.value),"placeholder"in h&&r(2,u=h.placeholder),"$$scope"in h&&r(3,a=h.$$scope)},[s,i,u,a,n,f,c]}class qe extends Ct{constructor(t){super();Ot(this,t,Int,xnt,At,{label:1,value:0,placeholder:2})}}const Dnt=[{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 Rnt(e=0,t=!1){return Dnt.filter(r=>t==!!r.carrier).filter(r=>r.mass[0]<=e).filter(r=>r.mass[1]>=e)}function q_(e,t,r){const n=e.slice();return n[8]=t[r],n}function U_(e,t){let r,n=t[8]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=mt(n),this.h()},l(s){r=H(s,"OPTION",{});var u=V(r);a=$t(u,n),u.forEach(M),this.h()},h(){r.__value=i=t[8],r.value=r.__value,this.first=r},m(s,u){q(s,r,u),j(r,a)},p(s,u){t=s,u&4&&n!==(n=t[8]+"")&&er(a,n),u&4&&i!==(i=t[8])&&(r.__value=i,r.value=r.__value)},d(s){s&&M(r)}}}function Bnt(e){let t,r=[],n=new Map,a,i,s=e[2];const u=f=>f[8];for(let f=0;fe[6].call(t))},m(f,c){q(f,t,c);for(let h=0;hPc(r,"value",u)),i=new qe({props:{label:"ship type",$$slots:{default:[Bnt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),a=ht(),st(i.$$.fragment),this.h()},l(c){t=H(c,"DIV",{class:!0});var h=V(t);ft(r.$$.fragment,h),a=pt(h),ft(i.$$.fragment,h),h.forEach(M),this.h()},h(){F(t,"class","svelte-fc2507")},m(c,h){q(c,t,h),ot(r,t,null),j(t,a),ot(i,t,null),s=!0},p(c,[h]){const p={};!n&&h&1&&(n=!0,p.value=c[0],xc(()=>n=!1)),r.$set(p);const v={};h&2054&&(v.$$scope={dirty:h,ctx:c}),i.$set(v)},i(c){s||(W(r.$$.fragment,c),W(i.$$.fragment,c),s=!0)},o(c){X(r.$$.fragment,c),X(i.$$.fragment,c),s=!1},d(c){c&&M(t),ut(r),ut(i)}}}function Fnt(e,t,r){let n,{shipClass:a=""}=t,{shipType:i=""}=t,{mass:s=10}=t,{isCarrier:u=!1}=t;const f=Ne("ship");function c(p){a=p,r(0,a)}function h(){i=js(this),r(1,i),r(2,n),r(3,s),r(4,u),r(2,n),r(3,s),r(4,u)}return e.$$set=p=>{"shipClass"in p&&r(0,a=p.shipClass),"shipType"in p&&r(1,i=p.shipType),"mass"in p&&r(3,s=p.mass),"isCarrier"in p&&r(4,u=p.isCarrier)},e.$$.update=()=>{e.$$.dirty&24&&r(2,n=Rnt(s,u).map(({name:p})=>p)),e.$$.dirty&6&&n.length>0&&!n.includes(i)&&r(1,i=n[0]),e.$$.dirty&2&&f.dispatch.setShipType(i),e.$$.dirty&1&&f.dispatch.setShipClass(a)},[a,i,n,s,u,c,h]}class znt extends Ct{constructor(t){super();Ot(this,t,Fnt,Lnt,At,{shipClass:0,shipType:1,mass:3,isCarrier:4})}}function Gnt(e){let t,r=-e[2]+"",n;return{c(){t=mt("excessive mass: "),n=mt(r)},l(a){t=$t(a,"excessive mass: "),n=$t(a,r)},m(a,i){q(a,t,i),q(a,n,i)},p(a,i){i&4&&r!==(r=-a[2]+"")&&er(n,r)},d(a){a&&M(t),a&&M(n)}}}function Nnt(e){let t,r;return{c(){t=mt("mass unused: "),r=mt(e[2])},l(n){t=$t(n,"mass unused: "),r=$t(n,e[2])},m(n,a){q(n,t,a),q(n,r,a)},p(n,a){a&4&&er(r,n[2])},d(n){n&&M(t),n&&M(r)}}}function jnt(e){let t,r,n,a,i,s,u,f;function c(v,g){return v[3]?Nnt:Gnt}let h=c(e),p=h(e);return{c(){t=k("input"),r=ht(),n=k("img"),i=ht(),s=k("div"),p.c(),this.h()},l(v){t=H(v,"INPUT",{class:!0,type:!0,min:!0,max:!0}),r=pt(v),n=H(v,"IMG",{class:!0,src:!0,alt:!0}),i=pt(v),s=H(v,"DIV",{class:!0});var g=V(s);p.l(g),g.forEach(M),this.h()},h(){F(t,"class","short svelte-apsdjz"),F(t,"type","number"),F(t,"min","10"),F(t,"max","300"),F(n,"class","mass_symbol svelte-apsdjz"),kn(n.src,a=yn+"/mass.svg")||F(n,"src",a),F(n,"alt","mass"),F(s,"class","note svelte-apsdjz"),Me(s,"warning",!e[3])},m(v,g){q(v,t,g),xe(t,e[0]),q(v,r,g),q(v,n,g),q(v,i,g),q(v,s,g),p.m(s,null),u||(f=ae(t,"input",e[6]),u=!0)},p(v,g){g&1&&Be(t.value)!==v[0]&&xe(t,v[0]),h===(h=c(v))&&p?p.p(v,g):(p.d(1),p=h(v),p&&(p.c(),p.m(s,null))),g&8&&Me(s,"warning",!v[3])},d(v){v&&M(t),v&&M(r),v&&M(n),v&&M(i),v&&M(s),p.d(),u=!1,f()}}}function qnt(e){let t,r;return{c(){t=k("span"),r=mt(e[1]),this.h()},l(n){t=H(n,"SPAN",{class:!0});var a=V(t);r=$t(a,e[1]),a.forEach(M),this.h()},h(){F(t,"class","cost svelte-apsdjz")},m(n,a){q(n,t,a),j(t,r)},p(n,a){a&2&&er(r,n[1])},d(n){n&&M(t)}}}function Unt(e){let t,r,n,a,i,s;return r=new qe({props:{label:"ship tonnage",$$slots:{default:[jnt]},$$scope:{ctx:e}}}),i=new qe({props:{label:"cost",$$slots:{default:[qnt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),a=k("div"),st(i.$$.fragment),this.h()},l(u){t=H(u,"DIV",{class:!0});var f=V(t);ft(r.$$.fragment,f),f.forEach(M),n=pt(u),a=H(u,"DIV",{class:!0});var c=V(a);ft(i.$$.fragment,c),c.forEach(M),this.h()},h(){F(t,"class","mass svelte-apsdjz"),F(a,"class","cost svelte-apsdjz")},m(u,f){q(u,t,f),ot(r,t,null),q(u,n,f),q(u,a,f),ot(i,a,null),s=!0},p(u,[f]){const c={};f&141&&(c.$$scope={dirty:f,ctx:u}),r.$set(c);const h={};f&130&&(h.$$scope={dirty:f,ctx:u}),i.$set(h)},i(u){s||(W(r.$$.fragment,u),W(i.$$.fragment,u),s=!0)},o(u){X(r.$$.fragment,u),X(i.$$.fragment,u),s=!1},d(u){u&&M(t),ut(r),u&&M(n),u&&M(a),ut(i)}}}function knt(e,t,r){let n,a,{ship:i=Ne("ship")}=t,{mass:s=10}=t,{cost:u=10}=t,{usedMass:f=5}=t;function c(){s=Be(this.value),r(0,s)}return e.$$set=h=>{"ship"in h&&r(4,i=h.ship),"mass"in h&&r(0,s=h.mass),"cost"in h&&r(1,u=h.cost),"usedMass"in h&&r(5,f=h.usedMass)},e.$$.update=()=>{e.$$.dirty&33&&r(2,n=s-f),e.$$.dirty&4&&r(3,a=n>=0),e.$$.dirty&17&&i.dispatch.setShipMass(s)},[s,u,n,a,i,f,c]}class Hnt extends Ct{constructor(t){super();Ot(this,t,knt,Unt,At,{ship:4,mass:0,cost:1,usedMass:5})}}function Wnt(e){let t,r,n,a,i,s,u;const f=e[2].default,c=bn(f,e,e[1],null);return{c(){t=k("div"),r=k("h2"),n=mt(e[0]),a=ht(),i=k("hr"),s=ht(),c&&c.c(),this.h()},l(h){t=H(h,"DIV",{class:!0});var p=V(t);r=H(p,"H2",{class:!0});var v=V(r);n=$t(v,e[0]),v.forEach(M),a=pt(p),i=H(p,"HR",{class:!0}),p.forEach(M),s=pt(h),c&&c.l(h),this.h()},h(){F(r,"class","svelte-1p2uzx8"),F(i,"class","svelte-1p2uzx8"),F(t,"class","svelte-1p2uzx8")},m(h,p){q(h,t,p),j(t,r),j(r,n),j(t,a),j(t,i),q(h,s,p),c&&c.m(h,p),u=!0},p(h,[p]){(!u||p&1)&&er(n,h[0]),c&&c.p&&(!u||p&2)&&_n(c,f,h,h[1],u?$n(f,h[1],p,null):mn(h[1]),null)},i(h){u||(W(c,h),u=!0)},o(h){X(c,h),u=!1},d(h){h&&M(t),h&&M(s),c&&c.d(h)}}}function Knt(e,t,r){let{$$slots:n={},$$scope:a}=t,{label:i}=t;return e.$$set=s=>{"label"in s&&r(0,i=s.label),"$$scope"in s&&r(1,a=s.$$scope)},[i,a,n]}class wf extends Ct{constructor(t){super();Ot(this,t,Knt,Wnt,At,{label:0})}}function Ynt(e){let t,r,n,a,i,s,u,f,c,h,p,v,g;const _=e[5].default,m=bn(_,e,e[4],null);return{c(){t=k("div"),r=k("div"),m&&m.c(),n=ht(),a=k("div"),i=k("div"),s=mt(e[0]),u=ht(),f=k("img"),h=ht(),p=k("div"),v=mt(e[1]),this.h()},l(b){t=H(b,"DIV",{class:!0});var y=V(t);r=H(y,"DIV",{class:!0});var w=V(r);m&&m.l(w),w.forEach(M),n=pt(y),a=H(y,"DIV",{class:!0});var C=V(a);i=H(C,"DIV",{class:!0});var T=V(i);s=$t(T,e[0]),u=pt(T),f=H(T,"IMG",{src:!0,alt:!0,class:!0}),T.forEach(M),h=pt(C),p=H(C,"DIV",{class:!0});var A=V(p);v=$t(A,e[1]),A.forEach(M),C.forEach(M),y.forEach(M),this.h()},h(){F(r,"class","svelte-145f253"),kn(f.src,c=yn+"/mass.svg")||F(f,"src",c),F(f,"alt","mass"),F(f,"class","svelte-145f253"),F(i,"class","mass svelte-145f253"),F(p,"class","cost svelte-145f253"),F(a,"class","reqs svelte-145f253"),F(t,"class","ship-item svelte-145f253")},m(b,y){q(b,t,y),j(t,r),m&&m.m(r,null),j(t,n),j(t,a),j(a,i),j(i,s),j(i,u),j(i,f),e[6](i),j(a,h),j(a,p),j(p,v),e[7](p),g=!0},p(b,[y]){m&&m.p&&(!g||y&16)&&_n(m,_,b,b[4],g?$n(_,b[4],y,null):mn(b[4]),null),(!g||y&1)&&er(s,b[0]),(!g||y&2)&&er(v,b[1])},i(b){g||(W(m,b),g=!0)},o(b){X(m,b),g=!1},d(b){b&&M(t),m&&m.d(b),e[6](null),e[7](null)}}}function Xnt(e,t,r){let{$$slots:n={},$$scope:a}=t,{mass:i}=t,{cost:s}=t,u,f;const c=async v=>{!v||(v.classList.remove("updated"),v.offsetWidth,v.classList.add("updated"))};function h(v){Nn[v?"unshift":"push"](()=>{u=v,r(2,u)})}function p(v){Nn[v?"unshift":"push"](()=>{f=v,r(3,f)})}return e.$$set=v=>{"mass"in v&&r(0,i=v.mass),"cost"in v&&r(1,s=v.cost),"$$scope"in v&&r(4,a=v.$$scope)},e.$$.update=()=>{e.$$.dirty&5&&c(u),e.$$.dirty&10&&c(f)},[i,s,u,f,a,n,h,p]}class Wr extends Ct{constructor(t){super();Ot(this,t,Xnt,Ynt,At,{mass:0,cost:1})}}function Vnt(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0,max:!0,step:!0}),this.h()},h(){F(t,"class","short svelte-1saxaj4"),F(t,"type","number"),F(t,"min","0"),F(t,"max","20"),F(t,"step","1")},m(a,i){q(a,t,i),xe(t,e[1]),r||(n=ae(t,"input",e[3]),r=!0)},p(a,i){i&2&&Be(t.value)!==a[1]&&xe(t,a[1])},d(a){a&&M(t),r=!1,n()}}}function Znt(e){let t,r,n,a,i,s,u,f,c;return r=new qe({props:{label:"thrust rating",$$slots:{default:[Vnt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),a=k("label"),i=k("input"),s=mt(" advanced"),this.h()},l(h){t=H(h,"DIV",{class:!0});var p=V(t);ft(r.$$.fragment,p),n=pt(p),a=H(p,"LABEL",{class:!0});var v=V(a);i=H(v,"INPUT",{type:!0}),s=$t(v," advanced"),v.forEach(M),p.forEach(M),this.h()},h(){F(i,"type","checkbox"),F(a,"class","svelte-1saxaj4"),F(t,"class","svelte-1saxaj4")},m(h,p){q(h,t,p),ot(r,t,null),j(t,n),j(t,a),j(a,i),i.checked=e[0],j(a,s),u=!0,f||(c=ae(i,"change",e[4]),f=!0)},p(h,p){const v={};p&66&&(v.$$scope={dirty:p,ctx:h}),r.$set(v),p&1&&(i.checked=h[0])},i(h){u||(W(r.$$.fragment,h),u=!0)},o(h){X(r.$$.fragment,h),u=!1},d(h){h&&M(t),ut(r),f=!1,c()}}}function Jnt(e){let t,r;const n=[e[2]];let a={$$slots:{default:[Znt]},$$scope:{ctx:e}};for(let i=0;i{"reqs"in c&&r(2,n=c.reqs),"advanced"in c&&r(0,a=c.advanced),"rating"in c&&r(1,i=c.rating)},e.$$.update=()=>{e.$$.dirty&3&&s.dispatch.setDrive({rating:i,advanced:a})},[a,i,n,u,f]}class tat extends Ct{constructor(t){super();Ot(this,t,Qnt,Jnt,At,{reqs:2,advanced:0,rating:1})}}function k_(e,t,r){const n=e.slice();return n[6]=t[r],n}function H_(e,t){let r,n,a,i=t[6]+"",s,u,f,c;return{key:e,first:null,c(){r=k("label"),n=k("input"),a=ht(),s=mt(i),u=ht(),this.h()},l(h){r=H(h,"LABEL",{class:!0});var p=V(r);n=H(p,"INPUT",{type:!0}),a=pt(p),s=$t(p,i),u=pt(p),p.forEach(M),this.h()},h(){F(n,"type","radio"),n.__value=t[6],n.value=n.__value,t[4][0].push(n),F(r,"class","svelte-9i3z5u"),this.first=r},m(h,p){q(h,r,p),j(r,n),n.checked=n.__value===t[0],j(r,a),j(r,s),j(r,u),f||(c=ae(n,"change",t[3]),f=!0)},p(h,p){t=h,p&1&&(n.checked=n.__value===t[0])},d(h){h&&M(r),t[4][0].splice(t[4][0].indexOf(n),1),f=!1,c()}}}function eat(e){let t=[],r=new Map,n,a=e[2];const i=s=>s[6];for(let s=0;s{"reqs"in c&&r(1,a=c.reqs),"type"in c&&r(0,i=c.type)},e.$$.update=()=>{e.$$.dirty&1&&s.dispatch.setFtl(i)},[i,a,n,f,u]}class iat extends Ct{constructor(t){super();Ot(this,t,aat,nat,At,{reqs:1,type:0})}}function sat(e){let t,r,n,a;const i=[e[0].drive];let s={};for(let c=0;c{"propulsion"in a&&r(0,n=a.propulsion)},[n]}class fat extends Ct{constructor(t){super();Ot(this,t,uat,oat,At,{propulsion:0})}}function lat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0,max:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min",e[2]),F(t,"max",e[3])},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[4]),r=!0)},p(a,i){i&4&&F(t,"min",a[2]),i&8&&F(t,"max",a[3]),i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function cat(e){let t,r;return t=new qe({props:{label:"hull",$$slots:{default:[lat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&77&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function hat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[cat]},$$scope:{ctx:e}};for(let i=0;i{"rating"in c&&r(0,n=c.rating),"reqs"in c&&r(1,a=c.reqs),"min"in c&&r(2,i=c.min),"max"in c&&r(3,s=c.max)},e.$$.update=()=>{e.$$.dirty&1&&u.dispatch.setHull(n)},[n,a,i,s,f]}class vat extends Ct{constructor(t){super();Ot(this,t,pat,hat,At,{rating:0,reqs:1,min:2,max:3})}}function dat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-1wwwskr"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[3]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function gat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-1wwwskr"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[1]),r||(n=ae(t,"input",e[4]),r=!0)},p(a,i){i&2&&Be(t.value)!==a[1]&&xe(t,a[1])},d(a){a&&M(t),r=!1,n()}}}function _at(e){let t,r,n,a,i;return r=new qe({props:{label:"screens",$$slots:{default:[dat]},$$scope:{ctx:e}}}),a=new qe({props:{label:"advanced screens",$$slots:{default:[gat]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),st(a.$$.fragment),this.h()},l(s){t=H(s,"DIV",{class:!0});var u=V(t);ft(r.$$.fragment,u),n=pt(u),ft(a.$$.fragment,u),u.forEach(M),this.h()},h(){F(t,"class","svelte-1wwwskr")},m(s,u){q(s,t,u),ot(r,t,null),j(t,n),ot(a,t,null),i=!0},p(s,u){const f={};u&65&&(f.$$scope={dirty:u,ctx:s}),r.$set(f);const c={};u&66&&(c.$$scope={dirty:u,ctx:s}),a.$set(c)},i(s){i||(W(r.$$.fragment,s),W(a.$$.fragment,s),i=!0)},o(s){X(r.$$.fragment,s),X(a.$$.fragment,s),i=!1},d(s){s&&M(t),ut(r),ut(a)}}}function mat(e){let t,r;const n=[e[2]];let a={$$slots:{default:[_at]},$$scope:{ctx:e}};for(let i=0;i{"reqs"in c&&r(2,n=c.reqs),"standard"in c&&r(0,a=c.standard),"advanced"in c&&r(1,i=c.advanced)},e.$$.update=()=>{e.$$.dirty&3&&s.dispatch.setScreens({standard:a,advanced:i})},[a,i,n,u,f]}class bat extends Ct{constructor(t){super();Ot(this,t,$at,mat,At,{reqs:2,standard:0,advanced:1})}}function yat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[3]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function wat(e){let t,r;return t=new qe({props:{label:"cargo",$$slots:{default:[yat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Sat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[wat]},$$scope:{ctx:e}};for(let i=0;i{"ship"in u&&r(2,n=u.ship),"space"in u&&r(0,a=u.space),"reqs"in u&&r(1,i=u.reqs)},e.$$.update=()=>{e.$$.dirty&5&&n.dispatch.setCargo(a)},[a,i,n,s]}class Cat extends Ct{constructor(t){super();Ot(this,t,Eat,Sat,At,{ship:2,space:0,reqs:1})}}function Oat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[2]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function Aat(e){let t,r;return t=new qe({props:{label:`layer ${e[1]}`,$$slots:{default:[Oat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&2&&(i.label=`layer ${n[1]}`),a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Tat(e,t,r){let{layer:n=1}=t,{rating:a=0}=t;const i=Ne("ship");function s(){a=Be(this.value),r(0,a)}return e.$$set=u=>{"layer"in u&&r(1,n=u.layer),"rating"in u&&r(0,a=u.rating)},e.$$.update=()=>{e.$$.dirty&3&&i.dispatch.setArmorRating({layer:n,rating:a})},[a,n,s]}class Mat extends Ct{constructor(t){super();Ot(this,t,Tat,Aat,At,{layer:1,rating:0})}}function W_(e,t,r){const n=e.slice();return n[5]=t[r],n[7]=r,n}function Pat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-n2prux"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[2]),r||(n=ae(t,"input",e[3]),r=!0)},p(a,i){i&4&&Be(t.value)!==a[2]&&xe(t,a[2])},d(a){a&&M(t),r=!1,n()}}}function K_(e,t){let r,n,a;return n=new Mat({props:{rating:t[5],layer:t[7]+1}}),{key:e,first:null,c(){r=je(),st(n.$$.fragment),this.h()},l(i){r=je(),ft(n.$$.fragment,i),this.h()},h(){this.first=r},m(i,s){q(i,r,s),ot(n,i,s),a=!0},p(i,s){t=i;const u={};s&1&&(u.rating=t[5]),s&1&&(u.layer=t[7]+1),n.$set(u)},i(i){a||(W(n.$$.fragment,i),a=!0)},o(i){X(n.$$.fragment,i),a=!1},d(i){i&&M(r),ut(n,i)}}}function xat(e){let t,r,n,a,i,s=[],u=new Map,f;n=new qe({props:{label:"armour layers",$$slots:{default:[Pat]},$$scope:{ctx:e}}});let c=e[0];const h=p=>p[7];for(let p=0;p{"layers"in f&&r(0,n=f.layers),"reqs"in f&&r(1,a=f.reqs)},e.$$.update=()=>{e.$$.dirty&4&&s.setArmorLayers(i)},[n,a,i,u]}class Rat extends Ct{constructor(t){super();Ot(this,t,Dat,Iat,At,{layers:0,reqs:1})}}function Bat(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_;return{c(){t=k("div"),r=k("label"),n=k("input"),a=mt(` + none`),i=ht(),s=k("label"),u=k("input"),f=mt(` + partial`),c=ht(),h=k("label"),p=k("input"),v=mt(` + full`),this.h()},l(m){t=H(m,"DIV",{class:!0});var b=V(t);r=H(b,"LABEL",{class:!0});var y=V(r);n=H(y,"INPUT",{type:!0}),a=$t(y,` + none`),y.forEach(M),i=pt(b),s=H(b,"LABEL",{class:!0});var w=V(s);u=H(w,"INPUT",{type:!0}),f=$t(w,` + partial`),w.forEach(M),c=pt(b),h=H(b,"LABEL",{class:!0});var C=V(h);p=H(C,"INPUT",{type:!0}),v=$t(C,` + full`),C.forEach(M),b.forEach(M),this.h()},h(){F(n,"type","radio"),n.__value="none",n.value=n.__value,e[6][0].push(n),F(r,"class","svelte-x5copc"),F(u,"type","radio"),u.__value="partial",u.value=u.__value,e[6][0].push(u),F(s,"class","svelte-x5copc"),F(p,"type","radio"),p.__value="full",p.value=p.__value,e[6][0].push(p),F(h,"class","svelte-x5copc"),F(t,"class","svelte-x5copc")},m(m,b){q(m,t,b),j(t,r),j(r,n),n.checked=n.__value===e[0],j(r,a),j(t,i),j(t,s),j(s,u),u.checked=u.__value===e[0],j(s,f),j(t,c),j(t,h),j(h,p),p.checked=p.__value===e[0],j(h,v),g||(_=[ae(n,"change",e[5]),ae(u,"change",e[7]),ae(p,"change",e[8])],g=!0)},p(m,b){b&1&&(n.checked=n.__value===m[0]),b&1&&(u.checked=u.__value===m[0]),b&1&&(p.checked=p.__value===m[0])},d(m){m&&M(t),e[6][0].splice(e[6][0].indexOf(n),1),e[6][0].splice(e[6][0].indexOf(u),1),e[6][0].splice(e[6][0].indexOf(p),1),g=!1,io(_)}}}function Lat(e){let t,r;return t=new qe({props:{label:"streamlining",$$slots:{default:[Bat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&513&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Fat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[Lat]},$$scope:{ctx:e}};for(let i=0;i(a(),a=MM(p,b=>r(4,n=b)),p);e.$$.on_destroy.push(()=>a());let{type:s="none"}=t,{reqs:u={}}=t,{dispatch:f,shipMass:c}=Ne("ship"),{dispatch:h=f,shipMass:p=c}=t;i();const v=[[]];function g(){s=this.__value,r(0,s)}function _(){s=this.__value,r(0,s)}function m(){s=this.__value,r(0,s)}return e.$$set=b=>{"type"in b&&r(0,s=b.type),"reqs"in b&&r(1,u=b.reqs),"dispatch"in b&&r(3,h=b.dispatch),"shipMass"in b&&i(r(2,p=b.shipMass))},e.$$.update=()=>{e.$$.dirty&25&&h.setStreamlining({type:s,shipMass:n})},[s,u,p,h,n,g,v,_,m]}class Gat extends Ct{constructor(t){super();Ot(this,t,zat,Fat,At,{type:0,reqs:1,dispatch:3,shipMass:2})}}function Nat(e){let t,r,n,a,i,s,u,f,c,h;const p=[e[0]];let v={};for(let A=0;A{"hull"in f&&r(0,n=f.hull),"screens"in f&&r(1,a=f.screens),"cargo"in f&&r(2,i=f.cargo),"streamlining"in f&&r(3,s=f.streamlining),"armor"in f&&r(4,u=f.armor)},[n,a,i,s,u]}class Uat extends Ct{constructor(t){super();Ot(this,t,qat,jat,At,{hull:0,screens:1,cargo:2,streamlining:3,armor:4})}}function Y_(e,t,r){const n=e.slice();return n[0]=t[r],n}function X_(e,t){let r,n=t[0]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=mt(n),this.h()},l(s){r=H(s,"OPTION",{});var u=V(r);a=$t(u,n),u.forEach(M),this.h()},h(){r.__value=i=t[0],r.value=r.__value,this.first=r},m(s,u){q(s,r,u),j(r,a)},p(s,u){t=s},d(s){s&&M(r)}}}function kat(e){let t,r=[],n=new Map,a,i,s=e[3];const u=f=>f[0];for(let f=0;fe[5].call(t))},m(f,c){q(f,t,c);for(let h=0;hh);let{id:a=1}=t,{type:i=n[0].type}=t,{reqs:s={}}=t,{dispatch:u}=Ne("ship"),{dispatch:f=u}=t;function c(){i=js(this),r(0,i),r(3,n)}return e.$$set=h=>{"id"in h&&r(1,a=h.id),"type"in h&&r(0,i=h.type),"reqs"in h&&r(2,s=h.reqs),"dispatch"in h&&r(4,f=h.dispatch)},e.$$.update=()=>{e.$$.dirty&1&&console.log(i),e.$$.dirty&19&&f.setSquadronType({type:i,id:a})},[i,a,s,n,f,c]}class Yat extends Ct{constructor(t){super();Ot(this,t,Kat,Wat,At,{id:1,type:0,reqs:2,dispatch:4})}}function V_(e,t,r){const n=e.slice();return n[5]=t[r],n[7]=r,n}function Xat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-oj0ytd"),F(t,"type","number"),F(t,"min","0")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[3]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function Vat(e){let t,r;return t=new qe({props:{label:"bays",$$slots:{default:[Xat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&257&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Z_(e,t){let r,n,a;const i=[t[5],{id:t[7]+1}];let s={};for(let u=0;up[7];for(let p=0;p{"bays"in f&&r(0,n=f.bays),"reqs"in f&&r(1,a=f.reqs),"squadrons"in f&&r(2,i=f.squadrons)},e.$$.update=()=>{e.$$.dirty&1&&s.setCarrierBays(n)},[n,a,i,u]}class tit extends Ct{constructor(t){super();Ot(this,t,Qat,Jat,At,{bays:0,reqs:1,squadrons:2})}}function eit(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,class:!0}),this.h()},h(){F(t,"type","number"),F(t,"class","short")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[2]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function rit(e){let t,r;return t=new qe({props:{label:"firecons",$$slots:{default:[eit]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function nit(e){let t,r;const n=[e[1]];let a={$$slots:{default:[rit]},$$scope:{ctx:e}};for(let i=0;i{"stations"in u&&r(0,n=u.stations),"reqs"in u&&r(1,a=u.reqs)},e.$$.update=()=>{e.$$.dirty&1&&i.setFirecons(n)},[n,a,s]}class iit extends Ct{constructor(t){super();Ot(this,t,ait,nit,At,{stations:0,reqs:1})}}function sit(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,class:!0}),this.h()},h(){F(t,"type","number"),F(t,"class","short")},m(a,i){q(a,t,i),xe(t,e[0]),r||(n=ae(t,"input",e[2]),r=!0)},p(a,i){i&1&&Be(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&M(t),r=!1,n()}}}function oit(e){let t,r;return t=new qe({props:{label:"ADFC",$$slots:{default:[sit]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function uit(e){let t,r;const n=[e[1]];let a={$$slots:{default:[oit]},$$scope:{ctx:e}};for(let i=0;i{"rating"in u&&r(0,n=u.rating),"reqs"in u&&r(1,a=u.reqs)},e.$$.update=()=>{e.$$.dirty&1&&i.setADFC(n)},[n,a,s]}class lit extends Ct{constructor(t){super();Ot(this,t,fit,uit,At,{rating:0,reqs:1})}}function J_(e,t,r){const n=e.slice();return n[4]=t[r],n}function Q_(e,t){let r,n=t[4].name+"",a,i;return{key:e,first:null,c(){r=k("option"),a=mt(n),this.h()},l(s){r=H(s,"OPTION",{});var u=V(r);a=$t(u,n),u.forEach(M),this.h()},h(){r.__value=i=t[4].type,r.value=r.__value,this.first=r},m(s,u){q(s,r,u),j(r,a)},p(s,u){t=s},d(s){s&&M(r)}}}function cit(e){let t,r=[],n=new Map,a,i,s,u,f,c=Zs;const h=p=>p[4].type;for(let p=0;pe[3].call(t)),F(i,"class","button small primary")},m(p,v){q(p,t,v);for(let g=0;gn.dispatch.addWeapon(a);function s(){a=js(this),r(0,a)}return e.$$set=u=>{"ship"in u&&r(2,n=u.ship)},[a,i,n,s]}class vit extends Ct{constructor(t){super();Ot(this,t,pit,hit,At,{ship:2})}}function dit(e){let t,r,n,a;return{c(){t=Fn("g"),r=Fn("path"),this.h()},l(i){t=zn(i,"g",{transform:!0});var s=V(t);r=zn(s,"path",{d:!0,class:!0}),V(r).forEach(M),s.forEach(M),this.h()},h(){F(r,"d",e[1]),F(r,"class","svelte-jxsibt"),Me(r,"active",e[0]),F(t,"transform",e[2])},m(i,s){q(i,t,s),j(t,r),n||(a=ae(r,"click",e[7]),n=!0)},p(i,[s]){s&2&&F(r,"d",i[1]),s&1&&Me(r,"active",i[0]),s&4&&F(t,"transform",i[2])},i:se,o:se,d(i){i&&M(t),n=!1,a()}}}function git(e,t,r){let{arc:n}=t,{radius:a}=t,{active:i=!1}=t;const s={F:0,FS:300,AS:240,A:180,AP:120,FP:60};let u,f,c,h;function p(v){Fh.call(this,e,v)}return e.$$set=v=>{"arc"in v&&r(3,n=v.arc),"radius"in v&&r(4,a=v.radius),"active"in v&&r(0,i=v.active)},e.$$.update=()=>{e.$$.dirty&16&&r(5,u=Math.round(a*(1-Math.sin(60/180*Math.PI)))),e.$$.dirty&16&&r(6,f=Math.round(a*Math.cos(60/180*Math.PI))),e.$$.dirty&112&&r(1,c=`M ${a},${a} L ${a-f},${u} A ${a},${a} 0 0 1 ${a+f},${u} Z`),e.$$.dirty&24&&r(2,h=`rotate(${s[n]},${a},${a})`)},[i,c,h,n,a,u,f,p]}class _it extends Ct{constructor(t){super();Ot(this,t,git,dit,At,{arc:3,radius:4,active:0})}}function tm(e,t,r){const n=e.slice();return n[8]=t[r],n}function em(e,t){let r,n,a;function i(){return t[6](t[8])}return n=new _it({props:{arc:t[8],radius:t[1]/2,active:t[0].includes(t[8])}}),n.$on("click",i),{key:e,first:null,c(){r=je(),st(n.$$.fragment),this.h()},l(s){r=je(),ft(n.$$.fragment,s),this.h()},h(){this.first=r},m(s,u){q(s,r,u),ot(n,s,u),a=!0},p(s,u){t=s;const f={};u&2&&(f.radius=t[1]/2),u&1&&(f.active=t[0].includes(t[8])),n.$set(f)},i(s){a||(W(n.$$.fragment,s),a=!0)},o(s){X(n.$$.fragment,s),a=!1},d(s){s&&M(r),ut(n,s)}}}function mit(e){let t,r=[],n=new Map,a,i,s,u,f,c=e[2];const h=g=>g[8];for(let g=0;gf("click_arc",p),h=p=>c(p);return e.$$set=p=>{"selected"in p&&r(0,s=p.selected),"size"in p&&r(1,u=p.size),"$$scope"in p&&r(4,a=p.$$scope)},[s,u,i,c,a,n,h]}class Sf extends Ct{constructor(t){super();Ot(this,t,$it,mit,At,{selected:0,size:1})}}function rm(e,t,r){const n=e.slice();return n[2]=t[r],n}function bit(e){let t,r,n,a,i,s,u,f,c,h,p;return{c(){t=k("select"),r=k("option"),n=mt("1"),a=k("option"),i=mt("2"),s=k("option"),u=mt("3"),f=k("option"),c=mt("4"),this.h()},l(v){t=H(v,"SELECT",{});var g=V(t);r=H(g,"OPTION",{});var _=V(r);n=$t(_,"1"),_.forEach(M),a=H(g,"OPTION",{});var m=V(a);i=$t(m,"2"),m.forEach(M),s=H(g,"OPTION",{});var b=V(s);u=$t(b,"3"),b.forEach(M),f=H(g,"OPTION",{});var y=V(f);c=$t(y,"4"),y.forEach(M),g.forEach(M),this.h()},h(){r.__value=1,r.value=r.__value,a.__value=2,a.value=a.__value,s.__value=3,s.value=s.__value,f.__value=4,f.value=f.__value,e[0]===void 0&&Ni(()=>e[6].call(t))},m(v,g){q(v,t,g),j(t,r),j(r,n),j(t,a),j(a,i),j(t,s),j(s,u),j(t,f),j(f,c),vn(t,e[0]),h||(p=ae(t,"change",e[6]),h=!0)},p(v,g){g&1&&vn(t,v[0])},d(v){v&&M(t),h=!1,p()}}}function nm(e,t){let r,n=t[2]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=mt(n),this.h()},l(s){r=H(s,"OPTION",{});var u=V(r);a=$t(u,n),u.forEach(M),this.h()},h(){r.__value=i=t[2],r.value=r.__value,this.first=r},m(s,u){q(s,r,u),j(r,a)},p(s,u){t=s,u&1&&n!==(n=t[2]+"")&&er(a,n),u&1&&i!==(i=t[2])&&(r.__value=i,r.value=r.__value)},d(s){s&&M(r)}}}function yit(e){let t,r=[],n=new Map,a,i,s=e[3][e[0]]||[];const u=f=>f[2];for(let f=0;fe[7].call(t))},m(f,c){q(f,t,c);for(let h=0;hy===m);b===-1&&(b=0),r(1,s=Array.from({length:f}).map((y,w)=>a[(b+w)%a.length])),r(5,n=s.join(","))}const p=Wa();function v(){i=js(this),r(0,i)}function g(){f=js(this),r(2,f),r(3,u),r(0,i),r(3,u),r(0,i)}const _=({detail:m})=>h(m);return e.$$set=m=>{"weaponClass"in m&&r(0,i=m.weaponClass),"arcs"in m&&r(1,s=m.arcs)},e.$$.update=()=>{e.$$.dirty&2&&r(5,n=s.join(",")),e.$$.dirty&5&&(u[i].includes(f)||(r(2,f=u[i][0]),console.log({nbrArcs:f,label:"in if"}))),e.$$.dirty&6&&s.length!==f&&h(s[0]),e.$$.dirty&2&&console.log("it changed!",s),e.$$.dirty&32&&console.log("it changed!",n),e.$$.dirty&33&&p("change",{weaponClass:i,arcs:n.split(",")})},[i,s,f,u,h,n,v,g,_]}class Eit extends Ct{constructor(t){super();Ot(this,t,Sit,wit,At,{weaponClass:0,arcs:1})}}function Cit(e){let t,r,n,a,i;return a=new Sf({props:{selected:[e[0]]}}),a.$on("click_arc",e[2]),{c(){t=k("label"),r=mt("submunition pack"),n=ht(),st(a.$$.fragment)},l(s){t=H(s,"LABEL",{});var u=V(t);r=$t(u,"submunition pack"),u.forEach(M),n=pt(s),ft(a.$$.fragment,s)},m(s,u){q(s,t,u),j(t,r),q(s,n,u),ot(a,s,u),i=!0},p(s,[u]){const f={};u&1&&(f.selected=[s[0]]),a.$set(f)},i(s){i||(W(a.$$.fragment,s),i=!0)},o(s){X(a.$$.fragment,s),i=!1},d(s){s&&M(t),s&&M(n),ut(a,s)}}}function Oit(e,t,r){let{arc:n="F"}=t;const a=Wa(),i=u=>{a("change",{arc:u})},s=({detail:u})=>i(u);return e.$$set=u=>{"arc"in u&&r(0,n=u.arc)},[n,i,s]}class Ait extends Ct{constructor(t){super();Ot(this,t,Oit,Cit,At,{arc:0})}}function Tit(e){let t,r;return{c(){t=k("label"),r=mt("point defence system")},l(n){t=H(n,"LABEL",{});var a=V(t);r=$t(a,"point defence system"),a.forEach(M)},m(n,a){q(n,t,a),j(t,r)},p:se,i:se,o:se,d(n){n&&M(t)}}}class Mit extends Ct{constructor(t){super();Ot(this,t,null,Tit,At,{})}}function Pit(e){let t,r;return{c(){t=k("label"),r=mt("scattergun")},l(n){t=H(n,"LABEL",{});var a=V(t);r=$t(a,"scattergun"),a.forEach(M)},m(n,a){q(n,t,a),j(t,r)},p:se,i:se,o:se,d(n){n&&M(t)}}}class xit extends Ct{constructor(t){super();Ot(this,t,null,Pit,At,{})}}function Iit(e){let t,r,n,a,i;return a=new Sf({props:{selected:[e[0]]}}),a.$on("click_arc",e[2]),{c(){t=k("label"),r=mt("needle weapon"),n=ht(),st(a.$$.fragment)},l(s){t=H(s,"LABEL",{});var u=V(t);r=$t(u,"needle weapon"),u.forEach(M),n=pt(s),ft(a.$$.fragment,s)},m(s,u){q(s,t,u),j(t,r),q(s,n,u),ot(a,s,u),i=!0},p(s,[u]){const f={};u&1&&(f.selected=[s[0]]),a.$set(f)},i(s){i||(W(a.$$.fragment,s),i=!0)},o(s){X(a.$$.fragment,s),i=!1},d(s){s&&M(t),s&&M(n),ut(a,s)}}}function Dit(e,t,r){let{arc:n="F"}=t;const a=Wa(),i=u=>{a("change",{arc:u})},s=({detail:u})=>i(u);return e.$$set=u=>{"arc"in u&&r(0,n=u.arc)},[n,i,s]}class Rit extends Ct{constructor(t){super();Ot(this,t,Dit,Iit,At,{arc:0})}}function Bit(e){let t,r,n,a,i,s,u,f;const c=[e[0]];var h=e[3][e[1]];function p(v){let g={};for(let _=0;_{ut(m,1)}),vr()}h?(i=new h(p()),i.$on("change",v[5]),st(i.$$.fragment),W(i.$$.fragment,1),ot(i,t,null)):i=null}else h&&i.$set(_)},i(v){s||(i&&W(i.$$.fragment,v),s=!0)},o(v){i&&X(i.$$.fragment,v),s=!1},d(v){v&&M(t),i&&ut(i),u=!1,f()}}}function Lit(e){let t,r;const n=[e[2]];let a={$$slots:{default:[Bit]},$$scope:{ctx:e}};for(let i=0;if.dispatch.removeWeapon(u),h=({detail:p})=>{console.log({id:u,type:a}),f.dispatch.setWeapon(wi({id:u,type:a},p))};return e.$$set=p=>{"weapon"in p&&r(0,s=p.weapon),"id"in p&&r(6,u=p.id)},e.$$.update=()=>{e.$$.dirty&1&&r(2,n=s.reqs),e.$$.dirty&1&&r(1,a=s.type)},[s,a,n,i,c,h,u]}class zit extends Ct{constructor(t){super();Ot(this,t,Fit,Lit,At,{weapon:0,id:6})}}function am(e,t,r){const n=e.slice();return n[3]=t[r],n}function im(e,t){let r,n,a;return n=new zit({props:{weapon:t[3],id:t[3].id}}),{key:e,first:null,c(){r=je(),st(n.$$.fragment),this.h()},l(i){r=je(),ft(n.$$.fragment,i),this.h()},h(){this.first=r},m(i,s){q(i,r,s),ot(n,i,s),a=!0},p(i,s){t=i;const u={};s&4&&(u.weapon=t[3]),s&4&&(u.id=t[3].id),n.$set(u)},i(i){a||(W(n.$$.fragment,i),a=!0)},o(i){X(n.$$.fragment,i),a=!1},d(i){i&&M(r),ut(n,i)}}}function Git(e){let t,r,n,a,i,s,u=[],f=new Map,c,h;const p=[e[0]];let v={};for(let y=0;yy[3].id;for(let y=0;y{"firecons"in s&&r(0,n=s.firecons),"adfc"in s&&r(1,a=s.adfc),"weapons"in s&&r(2,i=s.weapons)},[n,a,i]}class qit extends Ct{constructor(t){super();Ot(this,t,jit,Nit,At,{firecons:0,adfc:1,weapons:2})}}function Uit(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_;const m=[e[0].identification];let b={};for(let P=0;Pr(0,n=i)),[n,a]}class Hit extends Ct{constructor(t){super();Ot(this,t,kit,Uit,At,{})}}function Wit(e){let t,r,n,a,i,s,u,f,c,h,p;return{c(){t=k("div"),r=k("button"),n=mt("save"),a=ht(),i=k("pre"),s=k("code"),u=mt(e[0]),f=ht(),c=k("a"),this.h()},l(v){t=H(v,"DIV",{class:!0});var g=V(t);r=H(g,"BUTTON",{class:!0});var _=V(r);n=$t(_,"save"),_.forEach(M),a=pt(g),i=H(g,"PRE",{class:!0});var m=V(i);s=H(m,"CODE",{});var b=V(s);u=$t(b,e[0]),b.forEach(M),m.forEach(M),g.forEach(M),f=pt(v),c=H(v,"A",{href:!0,download:!0}),V(c).forEach(M),this.h()},h(){F(r,"class","button primary svelte-1f6rwrs"),F(i,"class","svelte-1f6rwrs"),F(t,"class","svelte-1f6rwrs"),F(c,"href",e[3]),F(c,"download",e[2]),Ln(c,"display","none",!1)},m(v,g){q(v,t,g),j(t,r),j(r,n),j(t,a),j(t,i),j(i,s),j(s,u),q(v,f,g),q(v,c,g),e[8](c),h||(p=ae(r,"click",e[5]),h=!0)},p(v,[g]){g&1&&er(u,v[0]),g&8&&F(c,"href",v[3]),g&4&&F(c,"download",v[2])},i:se,o:se,d(v){v&&M(t),v&&M(f),v&&M(c),e[8](null),h=!1,p()}}}function Kit(e,t,r){let n,a,i,{ship:s={}}=t,u;const{state:f}=Ne("ship");ao(e,f,v=>r(7,i=v)),Wa();let c;function h(){c==null||c.click()}function p(v){Nn[v?"unshift":"push"](()=>{c=v,r(1,c)})}return e.$$set=v=>{"ship"in v&&r(6,s=v.ship)},e.$$.update=()=>{var v,g;e.$$.dirty&64&&r(0,u=JSON.stringify(s,null,2)),e.$$.dirty&128&&r(0,u=JSON.stringify(i,null,2)),e.$$.dirty&1&&r(3,n="data:text/plain;charset=utf-8,"+encodeURIComponent(u)),e.$$.dirty&128&&r(2,a=((g=(v=i==null?void 0:i.identification)==null?void 0:v.shipClass)!=null?g:"ship")+".json")},[u,c,a,n,f,h,s,i,p]}class Yit extends Ct{constructor(t){super();Ot(this,t,Kit,Wit,At,{ship:6})}}function Xit(e){let t,r;return{c(){t=k("div"),r=mt(e[0]),this.h()},l(n){t=H(n,"DIV",{class:!0});var a=V(t);r=$t(a,e[0]),a.forEach(M),this.h()},h(){F(t,"class","svelte-uinb9")},m(n,a){q(n,t,a),j(t,r)},p(n,[a]){a&1&&er(r,n[0])},i:se,o:se,d(n){n&&M(t)}}}function Vit(e,t,r){let{cost:n=0}=t;return e.$$set=a=>{"cost"in a&&r(0,n=a.cost)},[n]}class Zit extends Ct{constructor(t){super();Ot(this,t,Vit,Xit,At,{cost:0})}}function Jit(e){let t,r,n,a;return{c(){t=k("div"),r=mt(e[0]),n=k("img"),this.h()},l(i){t=H(i,"DIV",{});var s=V(t);r=$t(s,e[0]),n=H(s,"IMG",{src:!0,alt:!0,class:!0}),s.forEach(M),this.h()},h(){kn(n.src,a=yn+"/mass.svg")||F(n,"src",a),F(n,"alt","mass"),F(n,"class","svelte-vmvu0j")},m(i,s){q(i,t,s),j(t,r),j(t,n)},p(i,[s]){s&1&&er(r,i[0])},i:se,o:se,d(i){i&&M(t)}}}function Qit(e,t,r){let{mass:n=0}=t;return e.$$set=a=>{"mass"in a&&r(0,n=a.mass)},[n]}class tst extends Ct{constructor(t){super();Ot(this,t,Qit,Jit,At,{mass:0})}}function sm(e){let t,r;return{c(){t=mt(e[0]),r=mt("-class,")},l(n){t=$t(n,e[0]),r=$t(n,"-class,")},m(n,a){q(n,t,a),q(n,r,a)},p(n,a){a&1&&er(t,n[0])},d(n){n&&M(t),n&&M(r)}}}function est(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_,m=e[0]&&sm(e);return p=new Zit({props:{cost:e[2]}}),g=new tst({props:{mass:e[3]}}),{c(){t=k("h1"),r=mt("ship name: "),n=k("div"),a=ht(),i=k("div"),s=k("h2"),m&&m.c(),u=ht(),f=mt(e[1]),c=ht(),h=k("div"),st(p.$$.fragment),v=mt(` + \xA0 + `),st(g.$$.fragment),this.h()},l(b){t=H(b,"H1",{class:!0});var y=V(t);r=$t(y,"ship name: "),n=H(y,"DIV",{class:!0}),V(n).forEach(M),y.forEach(M),a=pt(b),i=H(b,"DIV",{class:!0});var w=V(i);s=H(w,"H2",{class:!0});var C=V(s);m&&m.l(C),u=pt(C),f=$t(C,e[1]),C.forEach(M),c=pt(w),h=H(w,"DIV",{class:!0});var T=V(h);ft(p.$$.fragment,T),v=$t(T,` + \xA0 + `),ft(g.$$.fragment,T),T.forEach(M),w.forEach(M),this.h()},h(){F(n,"class","fill svelte-1v8962g"),F(t,"class","svelte-1v8962g"),F(s,"class","svelte-1v8962g"),F(h,"class","reqs svelte-1v8962g"),F(i,"class","details svelte-1v8962g")},m(b,y){q(b,t,y),j(t,r),j(t,n),q(b,a,y),q(b,i,y),j(i,s),m&&m.m(s,null),j(s,u),j(s,f),j(i,c),j(i,h),ot(p,h,null),j(h,v),ot(g,h,null),_=!0},p(b,[y]){b[0]?m?m.p(b,y):(m=sm(b),m.c(),m.m(s,u)):m&&(m.d(1),m=null),(!_||y&2)&&er(f,b[1]);const w={};y&4&&(w.cost=b[2]),p.$set(w);const C={};y&8&&(C.mass=b[3]),g.$set(C)},i(b){_||(W(p.$$.fragment,b),W(g.$$.fragment,b),_=!0)},o(b){X(p.$$.fragment,b),X(g.$$.fragment,b),_=!1},d(b){b&&M(t),b&&M(a),b&&M(i),m&&m.d(),ut(p),ut(g)}}}function rst(e,t,r){let{shipClass:n}=t,{shipType:a}=t,{cost:i=0}=t,{mass:s=0}=t;return e.$$set=u=>{"shipClass"in u&&r(0,n=u.shipClass),"shipType"in u&&r(1,a=u.shipType),"cost"in u&&r(2,i=u.cost),"mass"in u&&r(3,s=u.mass)},[n,a,i,s]}class nst extends Ct{constructor(t){super();Ot(this,t,rst,est,At,{shipClass:0,shipType:1,cost:2,mass:3})}}function ast(e){for(var t=[],r=1;r-1?e[n]:r}var rv=function(){var e=Js(),t=Ay&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return t?t.bind(window):function(r){var n=Js(),a=window.setTimeout(function(){r(n-e)},1e3/60);return a}}(),Sst=function(){var e=Ay&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(t){clearTimeout(t)}}();function Iy(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in t)t.push(r);return t}function Ze(e,t){var r=go(e),n=r.value,a=r.unit;if(va(t)){var i=t[a];if(i){if(Ty(i))return i(n);if(gu[a])return gu[a](n,i)}}else if(a==="%")return n*t/100;return gu[a]?gu[a](n):n}function Est(e,t,r){return Math.max(t,Math.min(e,r))}function um(e,t,r){return[[re(t[0],Or),re(t[0]*e[1]/e[0],Or)],[re(t[1]*e[0]/e[1],Or),re(t[1],Or)]].filter(function(n){return n.every(function(a,i){return r?a<=t[i]:a>=t[i]})})[0]||e}function Cst(e,t,r,n){if(!n)return e.map(function(v,g){return Est(v,t[g],r[g])});var a=e[0],i=e[1],s=um(e,t,!1),u=s[0],f=s[1],c=um(e,r,!0),h=c[0],p=c[1];return ah||i>p)&&(a=h,i=p),[a,i]}function Ost(e){for(var t=e.length,r=0,n=t-1;n>=0;--n)r+=e[n];return r}function Qs(e){for(var t=e.length,r=0,n=t-1;n>=0;--n)r+=e[n];return t?r/t:0}function Ce(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=Math.atan2(n,r);return a>=0?a:a+Math.PI*2}function Ast(e){return[0,1].map(function(t){return Qs(e.map(function(r){return r[t]}))})}function uh(e){var t=Ast(e),r=Ce(t,e[0]),n=Ce(t,e[1]);return rn&&n-r<-Math.PI?1:-1}function Gn(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function re(e,t){return t?Math.round(e/t)*t:e}function fm(e,t){return e.forEach(function(r,n){e[n]=re(e[n],t)}),e}function tn(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function Tst(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Mst(e,t){if(e.classList)e.classList.remove(t);else{var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")}}function Jr(e,t,r,n){e.addEventListener(t,r,n)}function hr(e,t,r,n){e.removeEventListener(t,r,n)}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */var fh=function(e,t){return fh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},fh(e,t)};function ai(e,t){fh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var oa=function(){return oa=Object.assign||function(t){for(var r,n=1,a=arguments.length;n0}function Pu(e,t,r){r===void 0&&(r=t.__REACT_COMPAT__);var n=!!r;return r||(r=new Ly(t)),Gst(r,e?[e]:[]),n||(t.__REACT_COMPAT__=r),r}function vm(e,t,r){var n=t.__REACT_COMPAT__;e&&!n&&(t.innerHTML=""),Pu(e,t,n),r&&r()}function qst(e,t){return Ur(zst,{element:e,container:t})}var Ust="simple-1.1.0";function ov(e,t){for(var r=e.length,n=0;n-1||nn(b,function(y){return y[1]===a})>-1)||m.filter(function(y){return y[0]>n}).length%2&&b.filter(function(y){return y[1]>a}).length%2)}function zs(e,t){var r=e[0],n=e[1],a=t[0],i=t[1];if(r===a&&n===i)return[0,0,0];if(r===a)return[1,0,-r];if(n===i)return[0,1,-n];var s=(a-r)/(n-i),u=-r-s*n;return[1,s,u]}function gh(e,t){var r=e[0],n=e[1],a=e[2],i=t[0],s=t[1],u=t[2],f=r===0&&i===0,c=n===0&&s===0;if(f&&c)return[];if(f){var h=-a/n,p=-u/s;return h!==p?[]:[[-1/0,h],[1/0,h]]}else if(c){var v=-a/r,g=-u/i;return v!==g?[]:[[v,-1/0],[v,1/0]]}else if(r===0){var _=-a/n,m=-(s*_+u)/i;return[[m,_]]}else if(i===0){var _=-u/s,m=-(n*_+a)/r;return[[m,_]]}else if(n===0){var m=-a/r,_=-(i*m+u)/s;return[[m,_]]}else if(s===0){var m=-u/i,_=-(r*m+a)/n;return[[m,_]]}else{var m=(n*u-s*a)/(s*r-n*i),_=-(r*m+a)/n;return[[m,_]]}}function _h(e,t){var r=t.map(function(h){return[0,1].map(function(p){return[Math.min(h[0][p],h[1][p]),Math.max(h[0][p],h[1][p])]})});if(e.length===2){var n=e[0],a=n[0],i=n[1];if(a===e[1][0]){var s=Math.max.apply(Math,r.map(function(h){return h[1][0]})),u=Math.min.apply(Math,r.map(function(h){return h[1][1]}));return s>u?[]:[[a,s],[a,u]]}else if(i===e[1][1]){var f=Math.max.apply(Math,r.map(function(h){return h[0][0]})),c=Math.min.apply(Math,r.map(function(h){return h[0][1]}));return f>c?[]:[[f,i],[c,i]]}}return e.filter(function(h){return r.every(function(p){return p[0][0]<=h[0]&&h[0]<=p[0][1]&&p[1][0]<=h[1]&&h[1]<=p[1][1]})})}function mh(e){return pot(e.slice(1),[e[0]]).map(function(t,r){return[e[r],t]})}function vot(e,t){var r=e.slice(),n=t.slice();uh(r)===-1&&r.reverse(),uh(n)===-1&&n.reverse();var a=mh(r),i=mh(n),s=a.map(function(p){return zs(p[0],p[1])}),u=i.map(function(p){return zs(p[0],p[1])}),f=[];s.forEach(function(p,v){var g=a[v],_=[];u.forEach(function(m,b){var y=gh(p,m),w=_h(y,[g,i[b]]);_.push.apply(_,w.map(function(C){return{index1:v,index2:b,pos:C}}))}),_.sort(function(m,b){return Gn(g[0],m.pos)-Gn(g[0],b.pos)}),f.push.apply(f,_),dh(g[1],n)&&f.push({index1:v,index2:-1,pos:g[1]})}),i.forEach(function(p,v){if(dh(p[1],r)){var g=!1,_=nn(f,function(m){var b=m.index2;return b===v?(g=!0,!1):!!g});_===-1&&(g=!1,_=nn(f,function(m){var b=m.index1,y=m.index2;return b===-1&&y+1===v?(g=!0,!1):!!g})),_===-1?f.push({index1:-1,index2:v,pos:p[1]}):f.splice(_,0,{index1:-1,index2:v,pos:p[1]})}});var c=f.map(function(p){var v=p.pos;return v}),h={};return c.filter(function(p){var v=p[0]+"x"+p[1];return h[v]?!1:(h[v]=!0,!0)})}function dot(e,t){var r=vot(e,t);return Ky(r)}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var $h=function(){return $h=Object.assign||function(t){for(var r,n=1,a=arguments.length;n-1&&i.splice(s,1)}}return this},t.once=function(r,n){var a=this;return n&&this._addEvent(r,n,{once:!0}),new Promise(function(i){a._addEvent(r,i,{once:!0})})},t.emit=function(r,n){var a=this;n===void 0&&(n={});var i=this._events[r];if(!r||!i)return!0;var s=!1;return n.eventType=r,n.stop=function(){s=!0},n.currentTarget=this,got(i).forEach(function(u){u.listener(n),u.once&&a.off(r,u.listener)}),!s},t.trigger=function(r,n){return n===void 0&&(n={}),this.emit(r,n)},t._addEvent=function(r,n,a){var i=this._events;i[r]=i[r]||[];var s=i[r];s.push($h({listener:n},a))},e}(),Yy=_ot;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */var bh=function(e,t){return bh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},bh(e,t)};function mot(e,t){bh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Mi=function(){return Mi=Object.assign||function(t){for(var r,n=1,a=arguments.length;ns-f?(p[1]>h.top||sp[1])&&(v[1]=1),h.left>i-f?(p[0]>h.left||ip[0])&&(v[0]=1),clearTimeout(this._timer),!v[0]&&!v[1]?!1:this._continueDrag(Mi(Mi({},a),{direction:v,inputEvent:n,isDrag:!0}))},r.checkScroll=function(n){var a=this;if(this._isWait)return!1;var i=n.prevScrollPos,s=i===void 0?this._prevScrollPos:i,u=n.direction,f=n.throttleTime,c=f===void 0?0:f,h=n.inputEvent,p=n.isDrag,v=this._getScrollPosition(u||[0,0],n),g=v[0]-s[0],_=v[1]-s[1],m=u||[g?Math.abs(g)/g:0,_?Math.abs(_)/_:0];return this._prevScrollPos=v,!g&&!_?!1:(this.trigger("move",{offsetX:m[0]?g:0,offsetY:m[1]?_:0,inputEvent:h}),c&&p&&(this._timer=window.setTimeout(function(){a._continueDrag(n)},c)),!0)},r.dragEnd=function(){clearTimeout(this._timer)},r._getScrollPosition=function(n,a){var i=a.container,s=a.getScrollPosition,u=s===void 0?$ot:s;return u({container:i,direction:n})},r._continueDrag=function(n){var a=this,i=n.container,s=n.direction,u=n.throttleTime,f=n.useScroll,c=n.isDrag,h=n.inputEvent;if(!(c&&this._isWait)){var p=Js(),v=Math.max(u+this._prevTime-p,0);if(v>0)return this._timer=window.setTimeout(function(){a._continueDrag(n)},v),!1;this._prevTime=p;var g=this._getScrollPosition(s,n);return this._prevScrollPos=g,c&&(this._isWait=!0),this.trigger("scroll",{container:i,direction:s,inputEvent:h}),this._isWait=!1,f||this.checkScroll(Mi(Mi({},n),{prevScrollPos:g,direction:s,inputEvent:h}))}},t}(Yy),yot=bot;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */var yh=function(e,t){return yh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},yh(e,t)};function wot(e,t){yh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qr=function(){return qr=Object.assign||function(t){for(var r,n=1,a=arguments.length;n=0?a:a+Math.PI*2}function mc(e){return Sot([e[0].clientX,e[0].clientY],[e[1].clientX,e[1].clientY])/Math.PI*180}function Eot(e){return e.touches&&e.touches.length>=2}function $c(e){return e.touches?Cot(e.touches):[Xy(e)]}function _m(e,t,r){var n=r.length,a=Gs(e,n),i=a.clientX,s=a.clientY,u=a.originalClientX,f=a.originalClientY,c=Gs(t,n),h=c.clientX,p=c.clientY,v=Gs(r,n),g=v.clientX,_=v.clientY,m=i-h,b=s-p,y=i-g,w=s-_;return{clientX:u,clientY:f,deltaX:m,deltaY:b,distX:y,distY:w}}function bc(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function Cot(e){for(var t=Math.min(e.length,2),r=[],n=0;n-1,L=I.isContentEditable;if(P||L){if(C||x===I||x&&L&&x.isContentEditable&&x.contains(I))return!1}else if((w||v.type==="touchstart")&&x){var G=x.tagName;(x.isContentEditable||$m.indexOf(G)>-1)&&x.blur()}if(i.clientStores=[new mm($c(v))],i.flag=!0,i.isDrag=!1,i._dragFlag=!0,i.datas={},y&&(v.which===3||v.button===2))return i.initDrag(),!1;i.doubleFlag=Js()-i.prevTime<200;var K=i.emit("dragStart",qr({datas:i.datas,inputEvent:v,isTrusted:g,isDouble:i.doubleFlag},i.getCurrentStore().getPosition(),{preventDefault:function(){v.preventDefault()},preventDrag:function(){i._dragFlag=!1}}));K===!1&&i.initDrag(),i.flag&&w&&v.preventDefault()}if(!i.flag)return!1;var at=0;if(A&&T&&b&&(at=setTimeout(function(){Jr(m,"touchstart",i.onDragStart,{passive:!1})})),!A&&T&&b&&hr(m,"touchstart",i.onDragStart),i.flag&&Eot(v)){if(clearTimeout(at),A&&v.touches.length!==v.changedTouches.length)return;i.pinchFlag||i.onPinchStart(v)}}},i.onDrag=function(v,g){if(!!i.flag){var _=$c(v),m=i.moveClients(_,v,!1);if(i._dragFlag){if(i.pinchFlag||m.deltaX||m.deltaY){var b=i.emit("drag",qr({},m,{isScroll:!!g,inputEvent:v}));if(b===!1){i.stop();return}}i.pinchFlag&&i.onPinch(v,_)}i.getCurrentStore().getPosition(_,!0)}},i.onDragEnd=function(v){if(!!i.flag){var g=i.options,_=g.pinchOutside,m=g.container;i.isTouch&&_&&hr(m,"touchstart",i.onDragStart),i.flag=!1;var b=i._getPosition(),y=Js(),w=!i.isDrag&&i.doubleFlag;i.prevTime=i.isDrag||w?0:y,i.emit("dragEnd",qr({datas:i.datas,isDouble:w,isDrag:i.isDrag,isClick:!i.isDrag,inputEvent:v},b)),i.pinchFlag&&i.onPinchEnd(v),i.clientStores=[]}},i.onBlur=function(){i.onDragEnd()};var s=[].concat(n);i.options=qr({checkInput:!1,container:s.length>1?window:s[0],preventRightClick:!0,preventDefault:!0,checkWindowBlur:!1,pinchThreshold:0,events:["touch","mouse"]},a);var u=i.options,f=u.container,c=u.events,h=u.checkWindowBlur;if(i.isTouch=c.indexOf("touch")>-1,i.isMouse=c.indexOf("mouse")>-1,i.targets=s,i.isMouse&&(s.forEach(function(v){Jr(v,"mousedown",i.onDragStart)}),Jr(f,"mousemove",i.onDrag),Jr(f,"mouseup",i.onDragEnd),Jr(f,"contextmenu",i.onDragEnd)),h&&Jr(window,"blur",i.onBlur),i.isTouch){var p={passive:!1};s.forEach(function(v){Jr(v,"touchstart",i.onDragStart,p)}),Jr(f,"touchmove",i.onDrag,p),Jr(f,"touchend",i.onDragEnd,p),Jr(f,"touchcancel",i.onDragEnd,p)}return i}var r=t.prototype;return r.stop=function(){this.isDrag=!1,this.flag=!1,this.clientStores=[],this.datas={}},r.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(a,i){return a+i.movement},0)},r.isDragging=function(){return this.isDrag},r.isFlag=function(){return this.flag},r.isPinchFlag=function(){return this.pinchFlag},r.isDoubleFlag=function(){return this.doubleFlag},r.isPinching=function(){return this.isPinch},r.scrollBy=function(n,a,i,s){s===void 0&&(s=!0),this.flag&&(this.clientStores[0].move(n,a),s&&this.onDrag(i,!0))},r.move=function(n,a){var i=n[0],s=n[1],u=this.getCurrentStore(),f=u.prevClients;return this.moveClients(f.map(function(c){var h=c.clientX,p=c.clientY;return{clientX:h+i,clientY:p+s,originalClientX:h,originalClientY:p}}),a,!0)},r.triggerDragStart=function(n){this.onDragStart(n,!1)},r.setEventDatas=function(n){var a=this.datas;for(var i in n)a[i]=n[i];return this},r.getCurrentEvent=function(n){return qr({datas:this.datas},this._getPosition(),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},r.getEventDatas=function(){return this.datas},r.unset=function(){var n=this,a=this.targets,i=this.options.container;this.off(),hr(window,"blur",this.onBlur),this.isMouse&&(a.forEach(function(s){hr(s,"mousedown",n.onDragStart)}),hr(i,"mousemove",this.onDrag),hr(i,"mouseup",this.onDragEnd),hr(i,"contextmenu",this.onDragEnd)),this.isTouch&&(a.forEach(function(s){hr(s,"touchstart",n.onDragStart)}),hr(i,"touchstart",this.onDragStart),hr(i,"touchmove",this.onDrag),hr(i,"touchend",this.onDragEnd),hr(i,"touchcancel",this.onDragEnd))},r.onPinchStart=function(n){var a=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>a)){var i=new mm($c(n));this.pinchFlag=!0,this.clientStores.splice(0,0,i);var s=this.emit("pinchStart",qr({datas:this.datas,angle:i.getAngle(),touches:this.getCurrentStore().getPositions()},i.getPosition(),{inputEvent:n}));s===!1&&(this.pinchFlag=!1)}},r.onPinch=function(n,a){if(!(!this.flag||!this.pinchFlag||a.length<2)){var i=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",qr({datas:this.datas,movement:this.getMovement(a),angle:i.getAngle(a),rotation:i.getRotation(a),touches:i.getPositions(a),scale:i.getScale(a),distance:i.getDistance(a)},i.getPosition(a),{inputEvent:n}))}},r.onPinchEnd=function(n){if(!!this.pinchFlag){var a=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var i=this.getCurrentStore();this.emit("pinchEnd",qr({datas:this.datas,isPinch:a,touches:i.getPositions()},i.getPosition(),{inputEvent:n})),this.isPinch=!1,this.pinchFlag=!1}},r.initDrag=function(){this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1},r.getCurrentStore=function(){return this.clientStores[0]},r.moveClients=function(n,a,i){var s=this._getPosition(n,i);return(s.deltaX||s.deltaY)&&(this.isDrag=!0),qr({datas:this.datas},s,{movement:this.getMovement(n),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:a})},r._getPosition=function(n,a){var i=this.getCurrentStore(),s=i.getPosition(n,a),u=this.clientStores.slice(1).reduce(function(h,p){var v=p.getPosition();return h.distX+=v.distX,h.distY+=v.distY,h},s),f=u.distX,c=u.distY;return qr({},s,{distX:f,distY:c})},t}(Yy),Aot=Oot;function Tot(e){for(var t=5381,r=e.length;r;)t=t*33^e.charCodeAt(--r);return t>>>0}var Mot=Tot;function Pot(e){return Mot(e).toString(36)}function xot(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}function Iot(e,t,r){return r.original?t:t.replace(/([^};{\s}][^};{]*|^\s*){/mg,function(n,a){var i=a.trim();return(i?Ua(i):[""]).map(function(s){var u=s.trim();return u.indexOf("@")===0?u:u.indexOf(":global")>-1?u.replace(/\:global/g,""):u.indexOf(":host")>-1?""+u.replace(/\:host/g,"."+e):u?"."+e+" "+u:"."+e}).join(", ")+" {"})}function Dot(e,t,r,n){var a=document.createElement("style");return a.setAttribute("type","text/css"),a.setAttribute("data-styled-id",e),r.nonce&&a.setAttribute("nonce",r.nonce),a.innerHTML=Iot(e,t,r),(n||document.head||document.body).appendChild(a),a}function Rot(e){var t="rCS"+Pot(e),r=0,n;return{className:t,inject:function(a,i){i===void 0&&(i={});var s=xot(a),u=r===0,f;return(s||u)&&(f=Dot(t,e,i,s)),u&&(n=f),s||++r,{destroy:function(){s?(a.removeChild(f),f=null):(r>0&&--r,r===0&&n&&(n.parentNode.removeChild(n),n=null))}}}}}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */var wh=function(e,t){return wh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},wh(e,t)};function Vy(e,t){wh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Sh=function(){return Sh=Object.assign||function(t){for(var r,n=1,a=arguments.length;n-1&&s&&(h={portalContainer:s}),Ur(c,Sh({ref:pn(this,"element"),"data-styled-id":f,className:i+" "+f},h,u))},r.componentDidMount=function(){this.injectResult=this.injector.inject(this.element,{nonce:this.props.cspNonce})},r.componentWillUnmount=function(){this.injectResult.destroy(),this.injectResult=null},r.getElement=function(){return this.element},t}(iv);function Zy(e,t){var r=Rot(t);return function(n){Vy(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.injector=r,i.tag=e,i}return a}(Lot)}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Eh=function(e,t){return Eh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Eh(e,t)};function bo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Eh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Q=function(){return Q=Object.assign||function(t){for(var r,n=1,a=arguments.length;n=0;u--)(s=e[u])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function Rt(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n'}function Not(e){var t=Got(1,e),r=Math.round(e/45)*45%180,n="ns-resize";return r===135?n="nwse-resize":r===45?n="nesw-resize":r===90&&(n="ew-resize"),"cursor:"+n+";cursor: url('"+t+"') 16 16, "+n+";"}var jot=Xst(),Jy=jot.browser.webkit,Qy=Jy&&function(){var e=typeof window=="undefined"?{userAgent:""}:window.navigator,t=/applewebkit\/([^\s]+)/g.exec(e.userAgent.toLowerCase());return t?parseFloat(t[1])<605:!1}(),lv="moveable-",qot=` +{ + position: absolute; + width: 1px; + height: 1px; + left: 0; + top: 0; + z-index: 3000; + --moveable-color: #4af; + --zoom: 1; + --zoompx: 1px; + will-change: transform; +} +.control-box { + z-index: 0; +} +.line, .control { + position: absolute; + left: 0; + top: 0; + will-change: transform; +} +.control { + width: 14px; + height: 14px; + border-radius: 50%; + border: 2px solid #fff; + box-sizing: border-box; + background: #4af; + background: var(--moveable-color); + margin-top: -7px; + margin-left: -7px; + border: 2px solid #fff; + z-index: 10; +} +.padding { + position: absolute; + top: 0px; + left: 0px; + width: 100px; + height: 100px; + transform-origin: 0 0; +} +.line { + width: 1px; + height: 1px; + background: #4af; + background: var(--moveable-color); + transform-origin: 0px 50%; +} +.line.dashed { + box-sizing: border-box; + background: transparent; +} +.line.dashed.horizontal { + border-top: 1px dashed #4af; + border-top-color: #4af; + border-top-color: var(--moveable-color); +} +.line.dashed.vertical { + border-left: 1px dashed #4af; + border-left-color: #4af; + border-left-color: var(--moveable-color); +} +.line.vertical { + transform: translateX(-50%); +} +.line.horizontal { + transform: translateY(-50%); +} +.line.vertical.bold { + width: 2px; +} +.line.horizontal.bold { + height: 2px; +} + +.control.origin { + border-color: #f55; + background: #fff; + width: 12px; + height: 12px; + margin-top: -6px; + margin-left: -6px; + pointer-events: none; +} +`+[0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return` +.direction[data-rotation="`+e+`"] { + `+Not(e)+` +} +`}).join(` +`)+` +.group { + z-index: -1; +} +.area { + position: absolute; +} +.area-pieces { + position: absolute; + top: 0; + left: 0; + display: none; +} +.area.avoid, .area.pass { + pointer-events: none; +} +.area.avoid+.area-pieces { + display: block; +} +.area-piece { + position: absolute; +} + +`+(Qy?`:global svg *:before { + content:""; + transform-origin: inherit; +}`:"")+` +`,Uot=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],kot=1e-4,Mr=1e-7,$u=1e-9,Ds=Math.pow(10,10),bm=-Ds,tw=["n","w","s","e","nw","ne","sw","se"],Hot={n:[0,1],s:[2,3],w:[2,0],e:[1,3],nw:[0],ne:[1],sw:[2],se:[3]},Wot={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},ew=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate"];function Kot(e,t){return[e[0]*t[0],e[1]*t[1]]}function Ht(){for(var e=[],t=0;t9),(t?"matrix3d":"matrix")+"("+ky(e,!t).join(",")+")"}function hv(e){var t=e.clientWidth,r=e.clientHeight;if(!e)return{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:r};var n=e.viewBox,a=n&&n.baseVal||{x:0,y:0,width:0,height:0};return{x:a.x,y:a.y,width:a.width||t,height:a.height||r,clientWidth:t,clientHeight:r}}function tut(e,t){var r=hv(e),n=r.width,a=r.height,i=r.clientWidth,s=r.clientHeight,u=i/n,f=s/a,c=e.preserveAspectRatio.baseVal,h=c.align,p=c.meetOrSlice,v=[0,0],g=[u,f],_=[0,0];if(h!==1){var m=(h-2)%3,b=Math.floor((h-2)/3);v[0]=n*m/2,v[1]=a*b/2;var y=p===2?Math.max(f,u):Math.min(u,f);g[0]=y,g[1]=y,_[0]=(i-n)/2*m,_[1]=(s-a)/2*b}var w=Hy(g,t);return w[t*(t-1)]=_[0],w[t*(t-1)+1]=_[1],cv(w,t,v)}function eut(e,t){if(!e.getBBox)return[0,0];var r=e.getBBox(),n=hv(e.ownerSVGElement),a=r.x-n.x,i=r.y-n.y;return[a,i,t[0]-a,t[1]-i]}function Je(e,t,r){return sr(e,$o(t,r),r)}function wo(e,t,r,n){return[[0,0],[t,0],[0,r],[t,r]].map(function(a){return Je(e,a,n)})}function kr(e){var t=e.map(function(c){return c[0]}),r=e.map(function(c){return c[1]}),n=Math.min.apply(Math,t),a=Math.min.apply(Math,r),i=Math.max.apply(Math,t),s=Math.max.apply(Math,r),u=i-n,f=s-a;return{left:n,top:a,right:i,bottom:s,width:u,height:f}}function wm(e,t,r,n){var a=wo(e,t,r,n);return kr(a)}function rut(e,t,r,n,a){var i,s=e.target,u=e.origin,f=t.matrix,c=iw(s,void 0,!0),h=c[0],p=c[1],v=r.getBoundingClientRect(),g=[0,0];r===document.body&&(g=rw(s,!0));for(var _=s.getBoundingClientRect(),m=_.left-v.left+r.scrollLeft-(r.clientLeft||0)+g[0],b=_.top-v.top+r.scrollTop-(r.clientTop||0)+g[1],y=_.width,w=_.height,C=ph(n,a,f),T=wm(C,h,p,n),A=T.left,x=T.top,I=T.width,B=T.height,P=Je(C,u,n),L=Gt(P,[A,x]),G=[m+L[0]*y/I,b+L[1]*w/B],K=[0,0],at=0;++at<10;){var et=gn(a,n);i=Gt(Je(et,G,n),Je(et,P,n)),K[0]=i[0],K[1]=i[1];var rt=ph(n,a,eo(K,n),f),gt=wm(rt,h,p,n),Z=gt.left,it=gt.top,ct=Z-m,lt=it-b;if(Math.abs(ct)<2&&Math.abs(lt)<2)break;G[0]-=ct,G[1]-=lt}return K.map(function(dt){return Math.round(dt)})}function qu(e,t,r,n){var a=e.length===16,i=a?4:3,s=wo(e,r,n,i),u=s[0],f=u[0],c=u[1],h=s[1],p=h[0],v=h[1],g=s[2],_=g[0],m=g[1],b=s[3],y=b[0],w=b[1],C=Je(e,t,i),T=C[0],A=C[1],x=Math.min(f,p,_,y),I=Math.min(c,v,m,w),B=Math.max(f,p,_,y),P=Math.max(c,v,m,w);f=f-x||0,p=p-x||0,_=_-x||0,y=y-x||0,c=c-I||0,v=v-I||0,m=m-I||0,w=w-I||0,T=T-x||0,A=A-I||0;var L=uh(s);return{left:x,top:I,right:B,bottom:P,origin:[T,A],pos1:[f,c],pos2:[p,v],pos3:[_,m],pos4:[y,w],direction:L}}function en(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function nw(e,t){return en([t[0]-e[0],t[1]-e[1]])}function Rs(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=Ce(e,t));var a=nw(e,t);return{transform:"translateY(-50%) translate("+e[0]+"px, "+e[1]+"px) rotate("+n+"rad) scaleY("+r+")",width:a+"px"}}function aw(e,t){for(var r=[],n=2;n0?e[0]:e[1],t>0?e[1]:e[0])}function Ah(e,t,r,n,a){var i=1,s=[0,0],u=yc(),f=yc(),c=yc(),h=Jot(t,r,a,!1);if(t){var p=h.is3d?4:3,v=qu(h.offsetMatrix,Vt(h.transformOrigin,tot(h.targetMatrix,p)),h.width,h.height);i=v.direction,s=Vt(v.origin,[v.left-h.left,v.top-h.top]),u=xu(t),f=xu(ju(n,n,!0).offsetParent||document.body,!0),e&&(c=xu(e))}return Q({targetClientRect:u,containerClientRect:f,moveableClientRect:c,beforeDirection:i,beforeOrigin:s,originalBeforeOrigin:s,target:t},h)}function yc(){return{left:0,right:0,top:0,bottom:0,width:0,height:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0}}function xu(e,t){var r=0,n=0,a=0,i=0;if(e===document.body||e===document.documentElement)a=window.innerWidth,i=window.innerHeight,r=-(document.documentElement.scrollLeft||document.body.scrollLeft),n=-(document.documentElement.scrollTop||document.body.scrollTop);else{var s=e.getBoundingClientRect();r=s.left,n=s.top,a=s.width,i=s.height}var u={left:r,right:r+a,top:n,bottom:n+i,width:a,height:i};return t&&(u.clientLeft=e.clientLeft,u.clientTop=e.clientTop,u.clientWidth=e.clientWidth,u.clientHeight=e.clientHeight,u.scrollWidth=e.scrollWidth,u.scrollHeight=e.scrollHeight,u.overflow=dr(e).overflow!=="visible"),u}function pv(e){if(!!e){var t=e.getAttribute("data-direction");if(!!t){var r=[0,0];return t.indexOf("w")>-1&&(r[0]=-1),t.indexOf("e")>-1&&(r[0]=1),t.indexOf("n")>-1&&(r[1]=-1),t.indexOf("s")>-1&&(r[1]=1),r}}}function vv(e,t){return[Vt(t,e[0]),Vt(t,e[1]),Vt(t,e[2]),Vt(t,e[3])]}function Cn(e){var t=e.left,r=e.top,n=e.pos1,a=e.pos2,i=e.pos3,s=e.pos4;return vv([n,a,i,s],[t,r])}function aut(e){return Math.round(e%1===-.5?e-1:e)}function Pi(e,t){var r;(r=e[t])===null||r===void 0||r.unset(),e[t]=null}function Zt(e,t,r){var n=t.datas;n.datas||(n.datas={});var a=Q(Q({},r),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:n.datas});return n.isStartEvent?n.lastEvent=a:n.isStartEvent=!0,a}function Pr(e,t,r){var n=t.datas,a="isDrag"in r?r.isDrag:t.isDrag;return n.datas||(n.datas={}),Q(Q({isDrag:a},r),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:n.lastEvent,isDouble:t.isDouble,datas:n.datas})}function Et(e,t,r,n){return e.triggerEvent(t,r,n)}function dr(e,t){return window.getComputedStyle(e,t)}function bu(e,t,r){var n={},a={};return e.filter(function(i){var s=i.name;if(n[s]||!t.some(function(u){return i[u]}))return!1;if(!r&&i.ableGroup){if(a[i.ableGroup])return!1;a[i.ableGroup]=!0}return n[s]=!0,!0})}function Th(e,t){return e===t||e==null&&t==null}function iut(){for(var e=[],t=0;t-1&&(u[v][0]=r[0]),g.indexOf(h)>-1&&(u[v][1]=r[1]))}),c&&(u[1][0]=r[0]/2,u[5][0]=r[0]/2),h&&(u[3][1]=r[1]/2,u[7][1]=r[1]/2)}else i&&!s?f.forEach(function(p){var v=p==="n"||p==="s";e.forEach(function(g,_){var m=g.direction,b=g.horizontal,y=g.vertical;!m||m.indexOf(p)===-1||(u[_]=[v||!b?0:r[0],!v||!y?0:r[1]])})}):u[t]=r;return u}function xi(e){return Math.abs(e)<=Mr?0:e}function ro(e,t){return t.isRequest?t.requestAble==="resizable"||t.requestAble==="scalable"?t.parentDirection:!1:tn(t.inputEvent.target,Ht("direction"))}function lut(e){var t={};for(var r in e)t[e[r]]=r;return t}function cut(e,t){var r=e.slice(0,t<0?void 0:t),n=e.slice(0,t<0?void 0:t+1),a=e[t]||"",i=t<0?[]:e.slice(t),s=t<0?[]:e.slice(t+1),u=Na(r),f=Na(n),c=Na([a]),h=Na(i),p=Na(s),v=Ti(u),g=Ti(f),_=Ti(h),m=Ti(p),b=pe(v,_,4);return{transforms:e,beforeFunctionMatrix:v,beforeFunctionMatrix2:g,targetFunctionMatrix:Ti(c),afterFunctionMatrix:_,afterFunctionMatrix2:m,allFunctionMatrix:b,beforeFunctions:u,beforeFunctions2:f,targetFunction:c[0],afterFunctions:h,afterFunctions2:p,beforeFunctionTexts:r,beforeFunctionTexts2:n,targetFunctionText:a,afterFunctionTexts:i,afterFunctionTexts2:s}}function hut(e){return!e||!va(e)?!1:ni(e)||"length"in e}function Af(e,t){return e?rn(e)?t?document.querySelector(e):e:Ty(e)?e():"current"in e?e.current:e:null}function uw(e,t){if(!e)return[];var r=hut(e)?[].slice.call(e):[e];return r.reduce(function(n,a){return rn(a)&&t?Rt(Rt([],n),[].slice.call(document.querySelectorAll(a))):(n.push(Af(a,t)),n)},[])}function put(e,t){var r=[];return e.forEach(function(n){if(!!n){if(rn(n)){t[n]&&r.push.apply(r,t[n]);return}r.push(n)}}),r}function vut(e,t,r){var n=Ce(e,t)/Math.PI*180;return n=r>=0?n:180-n,n=n>=0?n:360+n,n}function Sm(e,t){var r=e.rootMatrix,n=e.is3d,a=n?4:3,i=gn(r,a);return n||(i=Un(i,3,4)),i[12]=0,i[13]=0,i[14]=0,uot(i,t)}var dut=yo("pinchable",{events:{onPinchStart:"pinchStart",onPinch:"pinch",onPinchEnd:"pinchEnd",onPinchGroupStart:"pinchGroupStart",onPinchGroup:"pinchGroup",onPinchGroupEnd:"pinchGroupEnd"},dragStart:function(){return!0},pinchStart:function(e,t){var r=t.datas,n=t.targets,a=t.angle,i=t.originalDatas,s=e.props,u=s.pinchable,f=s.ables;if(!u)return!1;var c="onPinch"+(n?"Group":"")+"Start",h="drag"+(n?"Group":"")+"ControlStart",p=(u===!0?e.controlAbles:f.filter(function(m){return u.indexOf(m.name)>-1})).filter(function(m){return m.canPinch&&m[h]}),v=Zt(e,t,{});n&&(v.targets=n);var g=Et(e,c,v);r.isPinch=g!==!1,r.ables=p;var _=r.isPinch;return _?(p.forEach(function(m){if(i[m.name]=i[m.name]||{},!!m[h]){var b=Q(Q({},t),{datas:i[m.name],parentRotate:a,isPinch:!0});m[h](e,b)}}),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},_):!1},pinch:function(e,t){var r=t.datas,n=t.scale,a=t.distance,i=t.originalDatas,s=t.inputEvent,u=t.targets,f=t.angle;if(!!r.isPinch){var c=a*(1-1/n),h=Zt(e,t,{});u&&(h.targets=u);var p="onPinch"+(u?"Group":"");Et(e,p,h);var v=r.ables,g="drag"+(u?"Group":"")+"Control";return v.forEach(function(_){!_[g]||_[g](e,Q(Q({},t),{datas:i[_.name],inputEvent:s,parentDistance:c,parentRotate:f,isPinch:!0}))}),h}},pinchEnd:function(e,t){var r=t.datas,n=t.isPinch,a=t.inputEvent,i=t.targets,s=t.originalDatas;if(!!r.isPinch){var u="onPinch"+(i?"Group":"")+"End",f=Pr(e,t,{isDrag:n});i&&(f.targets=i),Et(e,u,f);var c=r.ables,h="drag"+(i?"Group":"")+"ControlEnd";return c.forEach(function(p){!p[h]||p[h](e,Q(Q({},t),{isDrag:n,datas:s[p.name],inputEvent:a,isPinch:!0}))}),n}},pinchGroupStart:function(e,t){return this.pinchStart(e,Q(Q({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,Q(Q({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,Q(Q({},t),{targets:e.props.targets}))}});function Tf(e,t,r,n,a){var i=t.gesto.move(r,e.inputEvent),s=i.originalDatas||i.datas,u=s.draggable||(s.draggable={});return Q(Q({},a?ow(t,i):i),{isDrag:!0,isPinch:!!n,parentEvent:!0,datas:u,originalDatas:e.originalDatas})}var So=function(){function e(){this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}}}var t=e.prototype;return t.dragStart=function(r,n){this.isDrag=!1,this.isFlag=!1;var a=n.originalDatas;return this.datas=a,a.draggable||(a.draggable={}),Q(Q({},this.move(r,n.inputEvent)),{type:"dragstart"})},t.drag=function(r,n){return this.move([r[0]-this.prevX,r[1]-this.prevY],n)},t.move=function(r,n){var a,i;return this.isFlag?(a=this.prevX+r[0],i=this.prevY+r[1],this.isDrag=!0):(this.prevX=r[0],this.prevY=r[1],this.startX=r[0],this.startY=r[1],a=r[0],i=r[1],this.isFlag=!0),this.prevX=a,this.prevY=i,{type:"drag",clientX:a,clientY:i,inputEvent:n,isDrag:this.isDrag,distX:a-this.startX,distY:i-this.startY,deltaX:r[0],deltaY:r[1],datas:this.datas.draggable,originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function ga(e,t,r){var n=r.originalDatas;n.groupable=n.groupable||{};var a=n.groupable;a.childDatas=a.childDatas||[];var i=a.childDatas;return e.moveables.map(function(s,u){return i[u]=i[u]||{},i[u][t]=i[u][t]||{},Q(Q({},r),{datas:i[u][t],originalDatas:i[u]})})}function wc(e,t,r,n,a,i){var s=!!r.match(/Start$/g),u=!!r.match(/End$/g),f=a.isPinch,c=a.datas,h=ga(e,t.name,a),p=e.moveables,v=h.map(function(g,_){var m=p[_],b=g;s?b=new So().dragStart(n,g):(m.state.gesto||(m.state.gesto=c.childGestos[_]),b=Tf(g,m.state,n,f,i));var y=t[r](m,Q(Q({},b),{parentFlag:!0}));return u&&(m.state.gesto=null),y});return s&&(c.childGestos=p.map(function(g){return g.state.gesto})),v}function jn(e,t,r,n,a,i){a===void 0&&(a=function(h,p){return p});var s=!!r.match(/End$/g),u=ga(e,t.name,n),f=e.moveables,c=u.map(function(h,p){var v=f[p],g=h;g=a(v,h);var _=t[r](v,Q(Q({},g),{parentFlag:!0}));return _&&i&&i(v,h,_,p),s&&(v.state.gesto=null),_});return c}function fw(e,t){var r=t.clientX,n=t.clientY,a=t.datas,i=e.state,s=i.moveableClientRect,u=i.rootMatrix,f=i.is3d,c=i.pos1,h=s.left,p=s.top,v=f?4:3,g=Gt(Ri(u,[r-h,n-p],v),c),_=g[0],m=g[1],b=On({datas:a,distX:_,distY:m}),y=b[0],w=b[1];return[y,w]}function ii(e,t){var r=t.datas,n=e.state,a=n.allMatrix,i=n.beforeMatrix,s=n.is3d,u=n.left,f=n.top,c=n.origin,h=n.offsetMatrix,p=n.targetMatrix,v=n.transformOrigin,g=s?4:3;r.is3d=s,r.matrix=a,r.targetMatrix=p,r.beforeMatrix=i,r.offsetMatrix=h,r.transformOrigin=v,r.inverseMatrix=gn(a,g),r.inverseBeforeMatrix=gn(i,g),r.absoluteOrigin=$o(Vt([u,f],c),g),r.startDragBeforeDist=sr(r.inverseBeforeMatrix,r.absoluteOrigin,g),r.startDragDist=sr(r.inverseMatrix,r.absoluteOrigin,g)}function gut(e){return qu(e.datas.beforeTransform,[50,50],100,100).direction}function Mf(e,t){var r=e.datas,n=e.originalDatas.beforeRenderable,a=r.transformIndex,i=n.nextTransforms,s=n.nextTransformAppendedIndexes,u=0;a===-1?(u=i.length,r.transformIndex=u):u=a+s.filter(function(p){return p=0&&(e[0]>=0&&t.push(3),e[0]<=0&&t.push(2)),e[1]<=0&&(e[0]>=0&&t.push(1),e[0]<=0&&t.push(0)),t}function pw(e,t){return hw(t).map(function(r){return e[r]})}function or(e,t){var r=pw(e,t);return[Qs(r.map(function(n){return n[0]})),Qs(r.map(function(n){return n[1]}))]}function but(e,t){return or(e,t.map(function(r){return-r}))}function yut(e,t,r,n,a,i){var s=wo(t,r,n,a),u=or(s,i),f=e[0]-u[0],c=e[1]-u[1];return[f,c]}function xf(e,t,r,n){return pe(e,cv(t,n,r),n)}function wut(e,t,r){var n=e.transformOrigin,a=e.offsetMatrix,i=e.is3d,s=t.beforeTransform,u=t.afterTransform,f=i?4:3,c=oot([r]);return xf(a,Un(pe(pe(s,c,4),u,4),4,f),n,f)}function Sut(e,t){var r=e.transformOrigin,n=e.offsetMatrix,a=e.is3d,i=e.targetMatrix,s=a?4:3;return xf(n,pe(i,Hy(t,s),s),r,s)}function If(e){var t=e.originalDatas.beforeRenderable;return{setTransform:function(r,n){n===void 0&&(n=-1),t.startTransforms=ni(r)?r:da(r),Mh(e,n)},setTransformIndex:function(r){Mh(e,r)}}}function Df(e,t){var r=e.originalDatas.beforeRenderable,n=r.startTransforms;Mh(e,nn(n,function(a){return a.indexOf(t+"(")===0}))}function Mh(e,t){var r=e.originalDatas.beforeRenderable,n=e.datas;if(n.transformIndex=t,t!==-1){var a=r.startTransforms[t];if(!!a){var i=Na([a]);n.startValue=i[0].functionValue}}}function dv(e,t){var r=e.originalDatas.beforeRenderable;r.nextTransforms=da(t)}function Em(e){var t=e.originalDatas.beforeRenderable;return t.nextTransforms.join(" ")}function vw(e,t,r,n,a){return dv(a,t),{transform:t,drag:ir.drag(e,Tf(a,e.state,r,n,!1))}}function dw(e,t,r,n,a){var i=e.state,s=i.left,u=i.top,f=e.props.groupable,c=wut(e.state,a,t),h=f?s:0,p=f?u:0,v=_w(e,r,c),g=Gt(n,v);return Gt(g,[h,p])}function Eut(e,t,r,n,a){return dw(e,"scale("+t.join(", ")+")",r,n,a)}function gw(e){var t=e.state,r=t.width,n=t.height,a=t.transformOrigin;return[-1+a[0]/(r/2),-1+a[1]/(n/2)]}function _w(e,t,r){r===void 0&&(r=e.state.allMatrix);var n=e.state,a=n.width,i=n.height,s=n.is3d,u=s?4:3,f=[a/2*(1+t[0]),i/2*(1+t[1])];return Je(r,f,u)}function Cut(e,t,r,n){var a=gw(e);return dw(e,"rotate("+t+"deg)",a,r,n)}function Out(e,t,r,n,a,i){var s=e.props.groupable,u=e.state,f=u.transformOrigin,c=u.targetMatrix,h=u.offsetMatrix,p=u.is3d,v=u.width,g=u.height,_=u.left,m=u.top,b=p?4:3,y=$ut(i,t,r,v,g,f),w=s?_:0,C=s?m:0,T=xf(h,c,y,b),A=yut(a,T,t,r,b,n);return Gt(A,[w,C])}function Bi(e,t){return or(Cn(e.state),t)}var Aut=["left","right","center"],Tut=["top","bottom","middle"],_a={start:"left",end:"right",center:"center"},ma={start:"top",end:"bottom",center:"middle"};function us(e,t){var r=e.props,n=r.snappable,a=r.bounds,i=r.innerBounds,s=r.verticalGuidelines,u=r.horizontalGuidelines,f=r.snapGridWidth,c=r.snapGridHeight,h=e.state,p=h.guidelines,v=h.enableSnap;return!n||!v||t&&n!==!0&&n.indexOf(t)<0?!1:!!(f||c||a||i||p&&p.length||s&&s.length||u&&u.length)}function gv(e){return e===!1?{}:e===!0||!e?{left:!0,right:!0,top:!0,bottom:!0}:e}function Mut(e,t){var r=gv(e),n={};for(var a in r)a in t&&r[a]&&(n[a]=t[a]);return n}function _v(e,t){var r=Mut(e,t),n=Tut.filter(function(i){return i in r}),a=Aut.filter(function(i){return i in r});return{horizontal:n.map(function(i){return r[i]}),vertical:a.map(function(i){return r[i]})}}function Put(e,t,r){var n=e.state.elementRects,a=[];return[["vertical",_a,ma],["horizontal",ma,_a]].forEach(function(i){var s=i[0],u=i[1],f=i[2],c=t[u.start],h=t[u.end],p=t[u.center],v=t[f.start],g=t[f.end];function _(y){var w=y.rect;return w[u.end]g||w[f.end]0}).sort(function(y,w){return _(y)-_(w)}),b=[];m.forEach(function(y){m.forEach(function(w){if(y!==w){var C=y.rect,T=w.rect,A=C[f.start],x=C[f.end],I=T[f.start],B=T[f.end];A>B||I>x||b.push([y,w])}})}),b.forEach(function(y){var w=y[0],C=y[1],T=w.rect,A=C.rect,x=T[u.start],I=T[u.end],B=A[u.start],P=A[u.end],L=0,G=0,K=!1,at=!1,et=!1;if(I<=c&&h<=B){if(at=!0,L=(B-I-(h-c))/2,G=I+L+(h-c)/2,Math.abs(G-p)>r)return}else if(Ir)return}else if(Ir)return}else return;!L||a.push({type:s,pos:s==="vertical"?[G,0]:[0,G],element:C.element,size:0,className:C.className,isStart:K,isCenter:at,isEnd:et,gap:L,hide:!0,gapRects:[w,C]})})}),a}function mw(e,t,r,n,a,i,s){a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s={left:0,top:0,right:0,bottom:0});var u=[],f=s.left,c=s.top,h=s.bottom,p=s.right,v=r+p-f,g=n+h-c;return e&&e.forEach(function(_){u.push({type:"horizontal",pos:[f,re(_-i+c,.1)],size:v})}),t&&t.forEach(function(_){u.push({type:"vertical",pos:[re(_-a+f,.1),c],size:g})}),u}function xut(e,t,r){var n=Je(e,[t.clientLeft,t.clientTop],r);return[t.left+n[0],t.top+n[1]]}function Iut(e,t){if(!t.length)return[];var r=e.state,n=r.containerClientRect,a=r.targetClientRect,i=a.top,s=a.left,u=r.rootMatrix,f=r.is3d,c=f?4:3,h=xut(u,n,c),p=h[0],v=h[1],g=Cn(r),_=Cf(g),m=_.minX,b=_.minY,y=Gt([m,b],Ri(u,[s-p,i-v],c)).map(function(T){return aut(T)}),w=y[0],C=y[1];return t.map(function(T){var A=T.element.getBoundingClientRect(),x=A.left-p,I=A.top-v,B=I+A.height,P=x+A.width,L=Ri(u,[x,I],c),G=L[0],K=L[1],at=Ri(u,[P,B],c),et=at[0],rt=at[1];return Q(Q({},T),{rect:{left:G+w,right:et+w,top:K+C,bottom:rt+C,center:(G+et)/2+w,middle:(K+rt)/2+C}})})}function Dut(e){var t=e.state,r=e.props.elementGuidelines,n=r===void 0?[]:r;if(!n.length)return t.elementRects=[],[];var a=(t.elementRects||[]).filter(function(v){return!v.refresh}),i=n.map(function(v){return va(v)&&"element"in v?v:{element:Af(v,!0)}}).filter(function(v){return v.element}),s=cot(a.map(function(v){return v.element}),i.map(function(v){return v.element})),u=s.maintained,f=s.added,c=[];u.forEach(function(v){var g=v[0],_=v[1];c[_]=a[g]}),Iut(e,f.map(function(v){return i[v]})).map(function(v,g){c[f[g]]=v}),t.elementRects=c;var h=gv(e.props.elementSnapDirections),p=[];return c.forEach(function(v){var g=v.element,_=v.top,m=_===void 0?h.top:_,b=v.left,y=b===void 0?h.left:b,w=v.right,C=w===void 0?h.right:w,T=v.bottom,A=T===void 0?h.bottom:T,x=v.center,I=x===void 0?h.center:x,B=v.middle,P=B===void 0?h.middle:B,L=v.className,G=v.rect,K=_v({top:m,right:C,left:y,bottom:A,center:I,middle:P},G),at=K.horizontal,et=K.vertical,rt=G.top,gt=G.left,Z=G.right-gt,it=G.bottom-rt,ct=[Z,it];et.forEach(function(lt){p.push({type:"vertical",element:g,pos:[re(lt,.1),rt],size:it,sizes:ct,className:L,elementRect:v})}),at.forEach(function(lt){p.push({type:"horizontal",element:g,pos:[gt,re(lt,.1)],size:Z,sizes:ct,className:L,elementRect:v})})}),p}function Ph(e){var t=e.state,r=t.snapOffset,n=t.containerClientRect,a=n.overflow,i=n.scrollHeight,s=n.scrollWidth,u=n.clientHeight,f=n.clientWidth,c=n.clientLeft,h=n.clientTop,p=e.props,v=p.snapGap,g=v===void 0?!0:v,_=p.verticalGuidelines,m=p.horizontalGuidelines,b=p.snapThreshold,y=b===void 0?5:b,w=p.snapGridWidth,C=w===void 0?0:w,T=p.snapGridHeight,A=T===void 0?0:T,x=Dut(e),I=Rt([],x);if(g){var B=kr(Cn(e.state)),P=B.top,L=B.left,G=B.bottom,K=B.right;I.push.apply(I,Put(e,{top:P,left:L,bottom:G,right:K,center:(L+K)/2,middle:(P+G)/2},y))}return I.push.apply(I,Rut(C,A,a?s:f,a?i:u,c,h)),I.push.apply(I,mw(m||!1,_||!1,a?s:f,a?i:u,c,h,r)),I}function Rut(e,t,r,n,a,i){a===void 0&&(a=0),i===void 0&&(i=0);var s=[];if(t)for(var u=0;u<=n;u+=t)s.push({type:"horizontal",pos:[0,re(u-i,.1)],size:r,hide:!0});if(e)for(var u=0;u<=r;u+=e)s.push({type:"vertical",pos:[re(u-a,.1),0],size:n,hide:!0});return s}function Rf(e,t,r,n){var a=e.props,i=iut(n,a.snapThreshold,5);return $w(e.state.guidelines,t,r,i)}function $w(e,t,r,n){return{vertical:Om(e,"vertical",t,n),horizontal:Om(e,"horizontal",r,n)}}function But(e,t,r){var n=r[0],a=r[1],i=t[0],s=t[1],u=Gt(r,t),f=u[0],c=u[1],h=c>0,p=f>0;f=xi(f),c=xi(c);var v={isSnap:!1,offset:0,pos:0},g={isSnap:!1,offset:0,pos:0};if(f===0&&c===0)return{vertical:v,horizontal:g};var _=Rf(e,f?[n]:[],c?[a]:[]),m=_.vertical,b=_.horizontal;m.posInfos.filter(function(et){var rt=et.pos;return p?rt>=i:rt<=i}),b.posInfos.filter(function(et){var rt=et.pos;return h?rt>=s:rt<=s}),m.isSnap=m.posInfos.length>0,b.isSnap=b.posInfos.length>0;var y=xh(m),w=y.isSnap,C=y.guideline,T=xh(b),A=T.isSnap,x=T.guideline,I=A?x.pos[1]:0,B=w?C.pos[0]:0;if(f===0)A&&(g.isSnap=!0,g.pos=x.pos[1],g.offset=a-g.pos);else if(c===0)w&&(v.isSnap=!0,v.pos=B,v.offset=n-B);else{var P=c/f,L=r[1]-P*n,G=0,K=0,at=!1;w?(K=B,G=P*K+L,at=!0):A&&(G=I,K=(G-L)/P,at=!0),at&&(v.isSnap=!0,v.pos=K,v.offset=n-K,g.isSnap=!0,g.pos=G,g.offset=a-G)}return{vertical:v,horizontal:g}}function Cm(e,t,r){var n=_v(e.props.snapDirections,t);return Rf(e,n.vertical,n.horizontal,r)}function xh(e){var t=e.isSnap;if(!t)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var r=e.posInfos[0],n=r.guidelineInfos[0],a=n.offset,i=n.dist,s=n.guideline;return{isSnap:t,offset:a,dist:i,pos:r.pos,guideline:s}}function Om(e,t,r,n){if(!e||!e.length)return{isSnap:!1,index:-1,posInfos:[]};var a=t==="vertical",i=a?0:1,s=r.map(function(f,c){var h=e.map(function(p){var v=p.pos,g=f-v[i];return{offset:g,dist:Math.abs(g),guideline:p}}).filter(function(p){var v=p.guideline,g=p.dist,_=v.type;return!(_!==t||g>n)}).sort(function(p,v){return p.dist-v.dist});return{pos:f,index:c,guidelineInfos:h}}).filter(function(f){return f.guidelineInfos.length>0}).sort(function(f,c){return f.guidelineInfos[0].dist-c.guidelineInfos[0].dist}),u=s.length>0;return{isSnap:u,index:u?s[0].index:-1,posInfos:s}}function Lut(e,t,r){var n=[];if(r[0]&&r[1])n=[r,[-r[0],r[1]],[r[0],-r[1]]].map(function(s){return or(t,s)});else if(!r[0]&&!r[1])for(var a=[t[0],t[1],t[3],t[2],t[0]],i=0;i<4;++i)n.push(a[i]),n.push([(a[i][0]+a[i+1][0])/2,(a[i][1]+a[i+1][1])/2]);else e.props.keepRatio?n=[[-1,-1],[-1,1],[1,-1],[1,1],r].map(function(s){return or(t,s)}):(n=pw(t,r),n.length>1&&n.push([(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]));return Rf(e,n.map(function(s){return s[0]}),n.map(function(s){return s[1]}),1)}function bw(e,t){var r=Math.abs(e.offset),n=Math.abs(t.offset);return e.isBound&&t.isBound?n-r:e.isBound?-1:t.isBound?1:e.isSnap&&t.isSnap?n-r:e.isSnap?-1:t.isSnap||r0,_=p>0,m={isBound:!1,offset:0,pos:0},b={isBound:!1,offset:0,pos:0};if(p===0&&v===0)return{vertical:m,horizontal:b};if(p===0)g?uc&&(b.pos=i,b.offset=c-i);else if(v===0)_?sf&&(m.pos=a,m.offset=f-a);else{var y=v/p,w=r[1]-y*f,C=0,T=0,A=!1;_&&s<=f?(C=y*s+w,T=s,A=!0):!_&&f<=a&&(C=y*a+w,T=a,A=!0),A&&(Cu)&&(A=!1),A||(g&&u<=c?(C=u,T=(C-w)/y,A=!0):!g&&c<=i&&(C=i,T=(C-w)/y,A=!0)),A&&(m.isBound=!0,m.pos=T,m.offset=f-T,b.isBound=!0,b.pos=C,b.offset=c-C)}return{vertical:m,horizontal:b}}function Pm(e,t,r){var n=e[r?"left":"top"],a=e[r?"right":"bottom"],i=Math.min.apply(Math,t),s=Math.max.apply(Math,t),u=[];return n+1>i&&u.push({isBound:!0,offset:i-n,pos:n}),a-1.1||a[0]>t.right&&Math.abs(a[0]-t.right)>.1||a[1].1||a[1]>t.bottom&&Math.abs(a[1]-t.bottom)>.1})}function Wut(e,t,r){var n=en(e),a=Math.sqrt(n*n-t*t)||0;return[a,-a].sort(function(i,s){return Math.abs(i-e[r?0:1])-Math.abs(s-e[r?0:1])}).map(function(i){return Ce([0,0],r?[i,t]:[t,i])})}function Kut(e,t,r,n,a){if(!e.props.bounds)return[];var i=a*Math.PI/180,s=Bf(e),u=s.left,f=s.top,c=s.right,h=s.bottom,p=u-n[0],v=c-n[0],g=f-n[1],_=h-n[1],m={left:p,top:g,right:v,bottom:_};if(!xm(r,m,0))return[];var b=[];return[[p,0],[v,0],[g,1],[_,1]].forEach(function(y){var w=y[0],C=y[1];r.forEach(function(T){var A=Ce([0,0],T);b.push.apply(b,Wut(T,w,C).map(function(x){return i+x-A}).filter(function(x){return!xm(t,m,x)}).map(function(x){return re(x*180/Math.PI,Mr)}))})}),b}function Yut(e,t){var r,n=e.direction,a=e.classNames,i=e.size,s=e.pos,u=e.zoom,f=e.key,c=n==="horizontal",h=c?"Y":"X";return t.createElement("div",{key:f,className:a.join(" "),style:(r={},r[c?"width":"height"]=""+i,r.transform="translate("+s[0]+", "+s[1]+") translate"+h+"(-50%) scale"+h+"("+u+")",r)})}function $v(e,t){return Yut(Q(Q({},e),{classNames:Rt([Ht("line","guideline",e.direction)],e.classNames).filter(function(r){return r}),size:e.size||e.sizeValue+"px",pos:e.pos||e.posValue.map(function(r){return re(r,.1)+"px"})}),t)}function Im(e,t,r,n,a,i,s,u){var f=e.props.zoom;return r.map(function(c,h){var p=c.type,v=c.pos,g=[0,0];return g[s]=n,g[s?0:1]=-a+v,$v({key:t+"TargetGuideline"+h,classNames:[Ht("target","bold",p)],posValue:g,sizeValue:i,zoom:f,direction:t},u)})}function Dm(e,t,r,n,a,i){var s=e.props,u=s.zoom,f=s.isDisplayInnerSnapDigit,c=t==="horizontal"?_a:ma,h=a[c.start],p=a[c.end];return r.filter(function(v){var g=v.hide,_=v.elementRect;if(g)return!1;if(f&&_){var m=_.rect;if(m[c.start]<=h&&p<=m[c.end])return!1}return!0}).map(function(v,g){var _=v.pos,m=v.size,b=v.element,y=[-n[0]+_[0],-n[1]+_[1]];return $v({key:t+"-default-guideline-"+g,classNames:b?[Ht("bold")]:[],direction:t,posValue:y,sizeValue:m,zoom:u},i)})}function Bs(e,t,r,n,a,i,s,u){var f,c=e.props,h=c.snapDigit,p=h===void 0?0:h,v=c.isDisplaySnapDigit,g=v===void 0?!0:v,_=c.snapDistFormat,m=_===void 0?function(A){return A}:_,b=c.zoom,y=t==="horizontal"?"X":"Y",w=t==="vertical"?"height":"width",C=Math.abs(a),T=g?parseFloat(C.toFixed(p)):0;return u.createElement("div",{key:t+"-"+r+"-guideline-"+n,className:Ht("guideline-group",t),style:(f={left:i[0]+"px",top:i[1]+"px"},f[w]=C+"px",f)},$v({direction:t,classNames:[Ht(r),s],size:"100%",posValue:[0,0],sizeValue:C,zoom:b},u),u.createElement("div",{className:Ht("size-value","gap"),style:{transform:"translate"+y+"(-50%) scale("+b+")"}},T>0?m(T):""))}function Xut(e,t,r,n){var a=e==="vertical"?0:1,i=e==="vertical"?1:0,s=a?_a:ma,u=r[s.start],f=r[s.end];return sut(t,function(c){return c.pos[a]}).map(function(c){var h=[],p=[],v=[];return c.forEach(function(g){var _,m,b=g.element,y=g.elementRect.rect;if(y[s.end]0){var L=[0,0];L[c]=r[c]+x[v.start]-_-P,L[h]=A,s.push(Bs(e,u,"dashed",s.length,P,L,I.className,a))}x=B}),x=n,C.forEach(function(I){var B=I.elementRect.rect,P=B[v.start]-x[v.end];if(P>0){var L=[0,0];L[c]=r[c]+x[v.end]-_,L[h]=A,s.push(Bs(e,u,"dashed",s.length,P,L,I.className,a))}x=B}),T.forEach(function(I){var B=I.elementRect.rect,P=_-B[v.start],L=B[v.end]-m,G=[0,0],K=[0,0];G[c]=r[c]-P,G[h]=A,K[c]=r[c]+m-_,K[h]=A,s.push(Bs(e,u,"dashed",s.length,P,G,I.className,a)),s.push(Bs(e,u,"dashed",s.length,L,K,I.className,a))})})}),s}function Zut(e,t,r,n,a){var i=[];return["horizontal","vertical"].forEach(function(s){var u=t.filter(function(b){return b.type===s}),f=s==="vertical"?0:1,c=f?0:1,h=f?ma:_a,p=f?_a:ma,v=n[h.start],g=n[h.end],_=n[p.start],m=n[p.end];u.forEach(function(b){var y=b.gap,w=b.gapRects,C=b.className,T=Math.max.apply(Math,Rt([_],w.map(function(I){var B=I.rect;return B[p.start]}))),A=Math.min.apply(Math,Rt([m],w.map(function(I){var B=I.rect;return B[p.end]}))),x=(T+A)/2;T===A||x===(_+m)/2||w.forEach(function(I){var B=I.rect,P=[r[0],r[1]];if(B[h.end]s||f>s,h=On({datas:a,distX:i[0],distY:i[1]}),p=h[0],v=h[1];return{offset:[p,v],isOutside:c}}function ku(e,t){return e.isBound?e.offset:t.isSnap?xh(t).offset:0}function Qut(e,t,r,n,a){var i=t[0],s=t[1],u=r[0],f=r[1],c=n[0],h=n[1],p=a[0],v=a[1],g=-p,_=-v;if(e&&i&&s){g=0,_=0;var m=[];if(u&&f?m.push([0,v],[p,0]):u?m.push([p,0]):f?m.push([0,v]):c&&h?m.push([0,v],[p,0]):c?m.push([p,0]):h&&m.push([0,v]),m.length){m.sort(function(C,T){return en(Gt([i,s],C))-en(Gt([i,s],T))});var b=m[0];if(b[0]&&Math.abs(i)>Or)g=-b[0],_=s*Math.abs(i+g)/Math.abs(i)-s;else if(b[1]&&Math.abs(s)>Or){var y=s;_=-b[1],g=i*Math.abs(s+_)/Math.abs(y)-i}if(e&&f&&u)if(Math.abs(g)>Or&&Math.abs(g)Or&&Math.abs(_)177,m=g>87&&g<93;return v-1||t.push(a)})}),t}function Fm(e,t,r,n,a,i){var s=mv(Bf(e,i),t,r),u=s.vertical,f=s.horizontal;u.forEach(function(v){v.isBound&&n.push({type:"bounds",pos:v.pos})}),f.forEach(function(v){v.isBound&&a.push({type:"bounds",pos:v.pos})});var c=kut(e),h=c.vertical,p=c.horizontal;h.forEach(function(v){nn(n,function(g){var _=g.type,m=g.pos;return _==="bounds"&&m===v})>=0||n.push({type:"bounds",pos:v})}),p.forEach(function(v){nn(a,function(g){var _=g.type,m=g.pos;return _==="bounds"&&m===v})>=0||a.push({type:"bounds",pos:v})})}var lft={name:"snappable",dragRelation:"strong",props:{snappable:[Boolean,Array],snapContainer:Object,snapDirections:[Boolean,Object],elementSnapDirections:[Boolean,Object],snapGap:Boolean,snapGridWidth:Number,snapGridHeight:Number,isDisplaySnapDigit:Boolean,isDisplayInnerSnapDigit:Boolean,snapDigit:Number,snapThreshold:Number,horizontalGuidelines:Array,verticalGuidelines:Array,elementGuidelines:Array,bounds:Object,innerBounds:Object,snapDistFormat:Function},events:{onSnap:"snap"},css:[`:host { + --bounds-color: #d66; +} +.guideline { + pointer-events: none; + z-index: 2; +} +.guideline.bounds { + background: #d66; + background: var(--bounds-color); +} +.guideline-group { + position: absolute; + top: 0; + left: 0; +} +.guideline-group .size-value { + position: absolute; + color: #f55; + font-size: 12px; + font-weight: bold; +} +.guideline-group.horizontal .size-value { + transform-origin: 50% 100%; + transform: translateX(-50%); + left: 50%; + bottom: 5px; +} +.guideline-group.vertical .size-value { + transform-origin: 0% 50%; + top: 50%; + transform: translateY(-50%); + left: 5px; +} +.guideline.gap { + background: #f55; +} +.size-value.gap { + color: #f55; +} +`],render:function(e,t){var r=e.state,n=r.top,a=r.left,i=r.pos1,s=r.pos2,u=r.pos3,f=r.pos4,c=r.snapRenderInfo;if(!c||!us(e,""))return[];r.guidelines=Ph(e);var h=Math.min(i[0],s[0],u[0],f[0]),p=Math.min(i[1],s[1],u[1],f[1]),v=c.externalPoses||[],g=Cn(e.state),_=[],m=[],b=[],y=[],w=[],C=kr(g),T=C.width,A=C.height,x=C.top,I=C.left,B=C.bottom,P=C.right,L={left:I,right:P,top:x,bottom:B,center:(I+P)/2,middle:(x+B)/2},G=v.length>0,K=G?kr(v):{};if(!c.request){if(c.direction&&w.push(Lut(e,g,c.direction)),c.snap){var at=kr(g);c.center&&(at.middle=(at.top+at.bottom)/2,at.center=(at.left+at.right)/2),w.push(Cm(e,at,1))}G&&(c.center&&(K.middle=(K.top+K.bottom)/2,K.center=(K.left+K.right)/2),w.push(Cm(e,K,1))),w.forEach(function(Z){var it=Z.vertical.posInfos,ct=Z.horizontal.posInfos;_.push.apply(_,it.filter(function(lt){var dt=lt.guidelineInfos;return dt.some(function(Ut){var Lt=Ut.guideline;return!Lt.hide})}).map(function(lt){return{type:"snap",pos:lt.pos}})),m.push.apply(m,ct.filter(function(lt){var dt=lt.guidelineInfos;return dt.some(function(Ut){var Lt=Ut.guideline;return!Lt.hide})}).map(function(lt){return{type:"snap",pos:lt.pos}})),b.push.apply(b,Lm(it)),y.push.apply(y,Lm(ct))})}Fm(e,[I,P],[x,B],_,m),G&&Fm(e,[K.left,K.right],[K.top,K.bottom],_,m,c.externalBounds);var et=Rt(Rt([],b),y),rt=et.filter(function(Z){return Z.element&&!Z.gapRects}),gt=et.filter(function(Z){return Z.gapRects});return Et(e,"onSnap",{guidelines:et.filter(function(Z){var it=Z.element;return!it}),elements:rt,gaps:gt},!0),Rt(Rt(Rt(Rt(Rt(Rt([],Vut(e,rt,[h,p],L,t)),Zut(e,gt,[h,p],L,t)),Dm(e,"horizontal",y,[a,n],L,t)),Dm(e,"vertical",b,[a,n],L,t)),Im(e,"horizontal",m,h,n,T,0,t)),Im(e,"vertical",_,p,a,A,1,t))},dragStart:function(e,t){e.state.snapRenderInfo={request:t.isRequest,snap:!0,center:!0},Sc(e)},drag:function(e){var t=e.state;t.guidelines=Ph(e)},pinchStart:function(e){this.unset(e)},dragEnd:function(e){this.unset(e)},dragControlCondition:function(e,t){if(ro(e,t)||Dh(e,t))return!0;if(!t.isRequest&&t.inputEvent)return tn(t.inputEvent.target,Ht("snap-control"))},dragControlStart:function(e){e.state.snapRenderInfo=null,Sc(e)},dragControl:function(e){this.drag(e)},dragControlEnd:function(e){this.unset(e)},dragGroupStart:function(e,t){this.dragStart(e,t)},dragGroup:function(e){this.drag(e)},dragGroupEnd:function(e){this.unset(e)},dragGroupControlStart:function(e){e.state.snapRenderInfo=null,Sc(e)},dragGroupControl:function(e){this.drag(e)},dragGroupControlEnd:function(e){this.unset(e)},unset:function(e){var t=e.state;t.enableSnap=!1,t.guidelines=[],t.snapRenderInfo=null,t.elementRects=[]}},ir={name:"draggable",props:{draggable:Boolean,throttleDrag:Number,throttleDragRotate:Number,startDragRotate:Number,edgeDraggable:Boolean},events:{onDragStart:"dragStart",onDrag:"drag",onDragEnd:"dragEnd",onDragGroupStart:"dragGroupStart",onDragGroup:"dragGroup",onDragGroupEnd:"dragGroupEnd"},render:function(e,t){var r=e.props,n=r.throttleDragRotate,a=r.zoom,i=e.state,s=i.dragInfo,u=i.beforeOrigin;if(!n||!s)return[];var f=s.dist;if(!f[0]&&!f[1])return[];var c=en(f),h=Ce(f,[0,0]);return[t.createElement("div",{className:Ht("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:c+"px",transform:"translate("+u[0]+"px, "+u[1]+"px) rotate("+h+"rad) scaleY("+a+")"}})]},dragStart:function(e,t){var r=t.datas,n=t.parentEvent,a=t.parentGesto,i=e.state,s=i.target,u=i.gesto;if(u)return!1;i.gesto=a||e.targetGesto;var f=dr(s);r.datas={},r.left=parseFloat(f.left||"")||0,r.top=parseFloat(f.top||"")||0,r.bottom=parseFloat(f.bottom||"")||0,r.right=parseFloat(f.right||"")||0,r.startValue=[0,0],ii(e,t),Df(t,"translate"),fft(e,r),r.prevDist=[0,0],r.prevBeforeDist=[0,0],r.isDrag=!1,r.deltaOffset=[0,0],r.distOffset=[0,0];var c=Zt(e,t,Q({set:function(p){r.startValue=p}},If(t))),h=n||Et(e,"onDragStart",c);return h!==!1?(r.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}):(i.gesto=null,r.isPinch=!1),r.isDrag?c:!1},drag:function(e,t){if(!!t){Mf(t,"translate");var r=t.datas,n=t.parentEvent,a=t.parentFlag,i=t.isPinch,s=t.isRequest,u=t.distX,f=t.distY,c=r.isDrag,h=r.prevDist,p=r.prevBeforeDist,v=r.startValue,g=r.distOffset;if(!!c){u+=g[0],f+=g[1];var _=e.props,m=_.parentMoveable,b=n?0:_.throttleDrag||0,y=n?0:_.throttleDragRotate||0,w=!1,C=0;if(!n&&y>0&&(u||f)){var T=_.startDragRotate||0,A=re(T+Ce([0,0],[u,f])*180/Math.PI,y)-T,x=f*Math.abs(Math.cos((A-90)/180*Math.PI)),I=u*Math.abs(Math.cos(A/180*Math.PI)),B=en([I,x]);C=A*Math.PI/180,u=B*Math.cos(C),f=B*Math.sin(C)}if(!i&&!n&&!a&&(!y||u||f)){var P=tft(e,u,f,y,s,r),L=P[0],G=P[1],K=L.isSnap,at=L.isBound,et=L.offset,rt=G.isSnap,gt=G.isBound,Z=G.offset;w=K||rt||at||gt,u+=et,f+=Z}var it=Vt(cw({datas:r,distX:u,distY:f}),v),ct=Vt(_ut({datas:r,distX:u,distY:f}),v);!y&&!w&&(fm(ct,b),fm(it,b));var lt=Gt(it,v),dt=Gt(ct,v),Ut=Gt(dt,h),Lt=Gt(lt,p);r.prevDist=dt,r.prevBeforeDist=lt,r.passDelta=Ut,r.passDist=dt;var ve=r.left+lt[0],bt=r.top+lt[1],Nt=r.right-lt[0],de=r.bottom-lt[1],Jt=Pf(r,"translate("+ct[0]+"px, "+ct[1]+"px)","translate("+dt[0]+"px, "+dt[1]+"px)");if(dv(t,Jt),e.state.dragInfo.dist=n?[0,0]:dt,!(!n&&!m&&Ut.every(function(Kt){return!Kt})&&Lt.some(function(Kt){return!Kt}))){var Tt=e.state,Ie=Tt.width,Oe=Tt.height,ge=Zt(e,t,{transform:Jt,dist:dt,delta:Ut,translate:ct,beforeDist:lt,beforeDelta:Lt,beforeTranslate:it,left:ve,top:bt,right:Nt,bottom:de,width:Ie,height:Oe,isPinch:i});return!n&&Et(e,"onDrag",ge),ge}}}},dragAfter:function(e,t){var r=t.datas,n=t.datas,a=n.deltaOffset,i=n.distOffset;return a[0]||a[1]?(r.deltaOffset=[0,0],i[0]=a[0],i[1]=a[1],this.drag(e,t)):!1},dragEnd:function(e,t){var r=t.parentEvent,n=t.datas;if(e.state.gesto=null,e.state.dragInfo=null,!!n.isDrag){n.isDrag=!1;var a=Pr(e,t,{});return!r&&Et(e,"onDragEnd",a),a}},dragGroupStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=this.dragStart(e,t);if(!i)return!1;var s=wc(e,this,"dragStart",[n||0,a||0],t,!1),u=Q(Q({},i),{targets:e.props.targets,events:s}),f=Et(e,"onDragGroupStart",u);return r.isDrag=f!==!1,r.isDrag?i:!1},dragGroup:function(e,t){var r=t.datas;if(!!r.isDrag){var n=this.drag(e,t),a=t.datas.passDelta,i=wc(e,this,"drag",a,t,!1);if(!!n){var s=Q({targets:e.props.targets,events:i},n);return Et(e,"onDragGroup",s),s}}},dragGroupEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isDrag){this.dragEnd(e,t);var a=wc(e,this,"dragEnd",[0,0],t,!1);return Et(e,"onDragGroupEnd",Pr(e,t,{targets:e.props.targets,events:a})),r}},request:function(e){var t={},r=e.getRect(),n=0,a=0;return{isControl:!1,requestStart:function(){return{datas:t}},request:function(i){return"x"in i?n=i.x-r.left:"deltaX"in i&&(n+=i.deltaX),"y"in i?a=i.y-r.top:"deltaY"in i&&(a+=i.deltaY),{datas:t,distX:n,distY:a}},requestEnd:function(){return{datas:t,isDrag:!0}}}},unset:function(e){e.state.dragInfo=null}};function bv(e,t,r,n){n===void 0&&(n="");var a=e.state,i=a.renderPoses,s=a.rotation,u=a.direction,f=e.props,c=f.renderDirections,h=c===void 0?t:c,p=f.zoom,v={};if(!h)return[];var g=u>0?1:-1,_=h===!0?tw:h,m=s/Math.PI*180;return _.forEach(function(b){v[b]=!0}),_.map(function(b){var y=Hot[b];if(!y||!v[b])return null;var w=(re(m,15)+g*Wot[b]+720)%180;return r.createElement("div",{className:Ht("control","direction",b,n),"data-rotation":w,"data-direction":b,key:"direction-"+b,style:aw.apply(void 0,Rt([s,p],y.map(function(C){return i[C]})))})})}function Ii(e,t,r,n,a,i){for(var s=[],u=6;un&&f>270&&n<90?++r.loop:f270&&--r.loop;var v=r.loop,g=p*360+c-h+i,_=v*360+n-h+i;r.prevDeg=_-v*360+h-i,_=re(_,s);var m=a*(_-i);u&&(m=Aw(e,t,r.origin,m),_=m/a+i),r.prevSnapDeg=_-v*360+h-i;var b=a*(_-g);return[b,m,i+m]}function Oc(e,t,r,n,a,i,s,u){return Iu(e,t,r,Ce(r.startAbsoluteOrigin,[a,i])/Math.PI*180,n,s,u,!0)}function cft(e,t,r){var n=t[0],a=t[1],i=t[2],s=t[3];if(e!=="none"){var u=(e||"top").split("-"),f=u[0],c=u[1],h=[n,a];f==="left"?h=[i,n]:f==="right"?h=[a,s]:f==="bottom"&&(h=[s,i]);var p=[(h[0][0]+h[1][0])/2,(h[0][1]+h[1][1])/2],v=sw(h,r);if(c){var g=c==="top"||c==="left",_=f==="bottom"||f==="left";p=h[g&&!_||!g&&_?0:1]}return[p,v]}}function Dh(e,t){if(t.isRequest)return t.requestAble==="rotatable";var r=t.inputEvent.target;if(tn(r,Ht("rotation-control")))return!0;var n=e.props.rotationTarget;return n?uw(n,!0).some(function(a){return a?r===a||r.contains(a):!1}):!1}var hft={name:"rotatable",canPinch:!0,props:{rotatable:Boolean,rotationPosition:String,throttleRotate:Number,renderDirections:Object,rotationTarget:Object},events:{onRotateStart:"rotateStart",onRotate:"rotate",onRotateEnd:"rotateEnd",onRotateGroupStart:"rotateGroupStart",onRotateGroup:"rotateGroup",onRotateGroupEnd:"rotateGroupEnd"},css:[`.rotation { + position: absolute; + height: 40px; + width: 1px; + transform-origin: 50% 100%; + height: calc(40px * var(--zoom)); + top: auto; + left: 0; + bottom: 100%; + will-change: transform; + } + .rotation .rotation-line { + display: block; + width: 100%; + height: 100%; + transform-origin: 50% 50%; + } + .rotation .rotation-control { + border-color: #4af; + border-color: var(--moveable-color); + background:#fff; + cursor: alias; + }`],render:function(e,t){var r=e.props,n=r.rotatable,a=r.rotationPosition,i=r.zoom,s=r.renderDirections,u=e.state,f=u.renderPoses,c=u.direction;if(!n)return null;var h=cft(a,f,c),p=[];if(h){var v=h[0],g=h[1];p.push(t.createElement("div",{key:"rotation",className:Ht("rotation"),style:{transform:"translate(-50%) translate("+v[0]+"px, "+v[1]+"px) rotate("+g+"rad)"}},t.createElement("div",{className:Ht("line rotation-line"),style:{transform:"scaleX("+i+")"}}),t.createElement("div",{className:Ht("control rotation-control"),style:{transform:"translate(0.5px) scale("+i+")"}})))}return s&&p.push.apply(p,bv(e,[],t)),p},dragControlCondition:Dh,dragControlStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=t.parentRotate,s=t.parentFlag,u=t.isPinch,f=t.isRequest,c=e.state,h=c.target,p=c.left,v=c.top,g=c.origin,_=c.beforeOrigin,m=c.direction,b=c.beforeDirection,y=c.targetTransform,w=c.moveableClientRect;if(!f&&!h)return!1;var C=e.getRect();if(r.rect=C,r.transform=y,r.left=p,r.top=v,r.fixedPosition=_w(e,gw(e)),r.absoluteInfo={origin:C.origin,startValue:C.rotation},Ec(e,r.absoluteInfo,n,a,g,w),f||u||s){var T=i||0;r.beforeInfo={origin:C.beforeOrigin,prevDeg:T,startDeg:T,prevSnapDeg:T,loop:0},r.afterInfo={origin:C.origin,prevDeg:T,startDeg:T,prevSnapDeg:T,loop:0}}else r.beforeInfo={origin:C.beforeOrigin},r.afterInfo={origin:C.origin},Ec(e,r.beforeInfo,n,a,_,w),Ec(e,r.afterInfo,n,a,g,w);r.direction=m,r.beforeDirection=b,r.startValue=0,r.datas={},Df(t,"rotate");var A=Zt(e,t,Q(Q({set:function(I){r.startValue=I*Math.PI/180}},If(t)),{dragStart:ir.dragStart(e,new So().dragStart([0,0],t))})),x=Et(e,"onRotateStart",A);return r.isRotate=x!==!1,e.state.snapRenderInfo={request:t.isRequest},r.isRotate?A:!1},dragControl:function(e,t){var r,n,a,i,s,u,f,c,h,p=t.datas,v=t.clientX,g=t.clientY,_=t.parentRotate,m=t.parentFlag,b=t.isPinch,y=t.groupDelta,w=p.beforeDirection,C=p.beforeInfo,T=p.afterInfo,A=p.absoluteInfo,x=p.isRotate,I=p.startValue,B=p.rect;if(!!x){Mf(t,"rotate");var P=gut(t),L=w*P,G=e.props,K=G.throttleRotate,at=K===void 0?0:K,et=G.parentMoveable,rt,gt,Z,it,ct,lt,dt,Ut,Lt,ve=180/Math.PI*I,bt=A.startValue;if(!m&&"parentDist"in t){var Nt=t.parentDist;r=Cc(e,B,T,Nt,L,ve),rt=r[0],gt=r[1],Z=r[2],n=Cc(e,B,C,Nt,w,ve),it=n[0],ct=n[1],lt=n[2],a=Cc(e,B,A,Nt,L,bt),dt=a[0],Ut=a[1],Lt=a[2]}else b||m?(i=Iu(e,B,T,_,L,ve,at),rt=i[0],gt=i[1],Z=i[2],s=Iu(e,B,C,_,w,ve,at),it=s[0],ct=s[1],lt=s[2],u=Iu(e,B,A,_,L,bt,at),dt=u[0],Ut=u[1],Lt=u[2]):(f=Oc(e,B,T,L,v,g,ve,at),rt=f[0],gt=f[1],Z=f[2],c=Oc(e,B,C,w,v,g,ve,at),it=c[0],ct=c[1],lt=c[2],h=Oc(e,B,A,L,v,g,bt,at),dt=h[0],Ut=h[1],Lt=h[2]);if(!(!dt&&!rt&&!it&&!et)){var de=Pf(p,"rotate("+Z+"deg)","rotate("+gt+"deg)"),Jt=Cut(e,gt,p.fixedPosition,p),Tt=Gt(Vt(y||[0,0],Jt),p.prevInverseDist||[0,0]);p.prevInverseDist=Jt;var Ie=Zt(e,t,Q({delta:rt,dist:gt,rotate:Z,beforeDist:ct,beforeDelta:it,beforeRotate:lt,absoluteDist:Ut,absoluteDelta:dt,absoluteRotate:Lt,isPinch:!!b},vw(e,de,Tt,b,t)));return Et(e,"onRotate",Ie),Ie}}},dragControlEnd:function(e,t){var r=t.datas;if(!!r.isRotate){r.isRotate=!1;var n=Pr(e,t,{});return Et(e,"onRotateEnd",n),n}},dragGroupControlCondition:Dh,dragGroupControlStart:function(e,t){var r=t.datas,n=e.state,a=n.left,i=n.top,s=n.beforeOrigin,u=this.dragControlStart(e,t);if(!u)return!1;u.set(r.beforeDirection*e.rotation);var f=jn(e,this,"dragControlStart",t,function(p,v){var g=p.state,_=g.left,m=g.top,b=g.beforeOrigin,y=Vt(Gt([_,m],[a,i]),Gt(b,s));return v.datas.groupClient=y,Q(Q({},v),{parentRotate:0})}),c=Q(Q({},u),{targets:e.props.targets,events:f}),h=Et(e,"onRotateGroupStart",c);return r.isRotate=h!==!1,r.isRotate?u:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isRotate){var n=this.dragControl(e,t);if(!!n){var a=r.beforeDirection,i=n.beforeDist,s=n.beforeDelta,u=s/180*Math.PI,f=jn(e,this,"dragControl",t,function(h,p){var v=p.datas.groupClient,g=v[0],_=v[1],m=ua([g,_],u*a),b=m[0],y=m[1],w=[b-g,y-_];return p.datas.groupClient=[b,y],Q(Q({},p),{parentRotate:i,groupDelta:w})});e.rotation=a*n.beforeRotate;var c=Q({targets:e.props.targets,events:f,set:function(h){e.rotation=h}},n);return Et(e,"onRotateGroup",c),c}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isRotate){this.dragControlEnd(e,t);var a=jn(e,this,"dragControlEnd",t),i=Pr(e,t,{targets:e.props.targets,events:a});return Et(e,"onRotateGroupEnd",i),r}},request:function(e){var t={},r=0,n=e.getRotation();return{isControl:!0,requestStart:function(){return{datas:t}},request:function(a){return"deltaRotate"in a?r+=a.deltaRotate:"rotate"in a&&(r=a.rotate-n),{datas:t,parentDist:r}},requestEnd:function(){return{datas:t,isDrag:!0}}}}},pft={name:"resizable",ableGroup:"size",canPinch:!0,props:{resizable:Boolean,throttleResize:Number,renderDirections:Array,keepRatio:Boolean},events:{onResizeStart:"resizeStart",onResize:"resize",onResizeEnd:"resizeEnd",onResizeGroupStart:"resizeGroupStart",onResizeGroup:"resizeGroup",onResizeGroupEnd:"resizeGroupEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.edge;if(n)return a?Tw(e,t):yv(e,t)},dragControlCondition:ro,dragControlStart:function(e,t){var r,n=t.inputEvent,a=t.isPinch,i=t.parentDirection,s=t.datas,u=t.parentFlag,f=i||(a?[0,0]:pv(n.target)),c=e.state,h=c.target,p=c.width,v=c.height;if(!f||!h)return!1;!a&&ii(e,t),s.datas={},s.direction=f,s.startOffsetWidth=p,s.startOffsetHeight=v,s.prevWidth=0,s.prevHeight=0,r=nut(h),s.startWidth=r[0],s.startHeight=r[1];var g=[Math.max(0,p-s.startWidth),Math.max(0,v-s.startHeight)];if(s.minSize=g,s.maxSize=[1/0,1/0],!u){var _=dr(h),m=_.position,b=_.minWidth,y=_.minHeight,w=_.maxWidth,C=_.maxHeight,T=m==="static"||m==="relative",A=T?h.parentElement:h.offsetParent,x=p,I=v;if(A&&(x=A.clientWidth,I=A.clientHeight,T)){var B=dr(A);x-=parseFloat(B.paddingLeft)||0,I-=parseFloat(B.paddingTop)||0}s.minSize=Vt([Ze(b,x)||0,Ze(y,I)||0],g),s.maxSize=Vt([Ze(w,x)||1/0,Ze(C,I)||1/0],g)}var P=e.props.transformOrigin||"% %";s.transformOrigin=P&&rn(P)?P.split(" "):P,s.isWidth=!f[0]&&!f[1]||f[0]||!f[1];function L(et){s.ratio=et&&isFinite(et)?et:0}function G(et){s.fixedDirection=et,s.fixedPosition=Bi(e,et)}L(p/v),G([-f[0],-f[1]]);var K=Zt(e,t,{direction:f,set:function(et){var rt=et[0],gt=et[1];s.startWidth=rt,s.startHeight=gt},setMin:function(et){s.minSize=et},setMax:function(et){s.maxSize=[et[0]||1/0,et[1]||1/0]},setRatio:L,setFixedDirection:G,setOrigin:function(et){s.transformOrigin=et},dragStart:ir.dragStart(e,new So().dragStart([0,0],t))}),at=Et(e,"onResizeStart",K);return at!==!1&&(s.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:f}),s.isResize?K:!1},dragControl:function(e,t){var r,n=t.datas,a=t.distX,i=t.distY,s=t.parentFlag,u=t.isPinch,f=t.parentDistance,c=t.parentScale,h=t.parentKeepRatio,p=t.dragClient,v=t.parentDist,g=t.isRequest,_=n.isResize,m=n.transformOrigin,b=n.fixedDirection,y=n.startWidth,w=n.startHeight,C=n.prevWidth,T=n.prevHeight,A=n.minSize,x=n.maxSize,I=n.ratio,B=n.isWidth,P=n.startOffsetWidth,L=n.startOffsetHeight;if(!!_){var G=e.props,K=G.throttleResize,at=K===void 0?0:K,et=G.parentMoveable,rt=G.snapThreshold,gt=rt===void 0?5:rt,Z=n.direction,it=Z,ct=0,lt=0;!Z[0]&&!Z[1]&&(it=[1,1]);var dt=I&&(e.props.keepRatio||h),Ut=p;if(p||(!s&&u?Ut=Bi(e,[0,0]):Ut=n.fixedPosition),v)ct=v[0],lt=v[1],dt&&(ct?lt||(lt=ct/I):ct=lt*I);else if(c)ct=(c[0]-1)*P,lt=(c[1]-1)*L;else if(u)f&&(ct=f,lt=f*L/P);else{var Lt=On({datas:n,distX:a,distY:i});if(ct=it[0]*Lt[0],lt=it[1]*Lt[1],dt&&P&&L){var ve=Ce([0,0],Lt),bt=Ce([0,0],it),Nt=en([ct,lt]),de=Math.cos(ve-bt)*Nt;if(!it[0])lt=de,ct=lt/I;else if(!it[1])ct=de,lt=ct*I;else{var Jt=it[0]*2*P,Tt=it[1]*2*L,Ie=en([Jt+Lt[0],Tt+Lt[1]])-en([Jt,Tt]),Oe=Ce([0,0],[I,1]);ct=Math.cos(Oe)*Ie,lt=Math.sin(Oe)*Ie}}else if(!dt){var ge=Rt([],Z);P||(Lt[0]<0?ge[0]=-1:Lt[0]>0&&(ge[0]=1)),L||(Lt[1]<0?ge[1]=-1:Lt[1]>0&&(ge[1]=1)),Z=ge,it=ge,ct=it[0]*Lt[0],lt=it[1]*Lt[1]}}var Kt=it[0]||dt?Math.max(P+ct,Mr):P,wt=it[1]||dt?Math.max(L+lt,Mr):L;dt&&P&&L&&(B?wt=Kt/I:Kt=wt*I);var St=[0,0];if(u||(St=oft(e,Kt,wt,Z,Ut,g,n)),v&&(!v[0]&&(St[0]=0),!v[1]&&(St[1]=0)),dt){it[0]&&it[1]&&St[0]&&St[1]&&(Math.abs(St[0])>Math.abs(St[1])?St[1]=0:St[0]=0);var Ae=!St[0]&&!St[1];Ae&&(B?Kt=re(Kt,at):wt=re(wt,at)),it[0]&&!it[1]||St[0]&&!St[1]||Ae&&B?(Kt+=St[0],wt=Kt/I):(!it[0]&&it[1]||!St[0]&&St[1]||Ae&&!B)&&(wt+=St[1],Kt=wt*I)}else P+ct<-gt&&(St[0]=0),P+lt<-gt&&(St[1]=0),Kt+=St[0],wt+=St[1],St[0]||(Kt=re(Kt,at)),St[1]||(wt=re(wt,at));r=Cst([Kt,wt],A,x,dt),Kt=r[0],wt=r[1],Kt=Math.round(Kt),wt=Math.round(wt),ct=Kt-P,lt=wt-L;var be=[ct-C,lt-T];n.prevWidth=ct,n.prevHeight=lt;var jt=Out(e,Kt,wt,b,Ut,m);if(!(!et&&be.every(function(Le){return!Le})&&jt.every(function(Le){return!Le}))){var Ft=Zt(e,t,{width:y+ct,height:w+lt,offsetWidth:Kt,offsetHeight:wt,direction:Z,dist:[ct,lt],delta:be,isPinch:!!u,drag:ir.drag(e,Tf(t,e.state,jt,!!u,!1))});return Et(e,"onResize",Ft),Ft}}},dragControlAfter:function(e,t){var r=t.datas,n=r.isResize,a=r.startOffsetWidth,i=r.startOffsetHeight,s=r.prevWidth,u=r.prevHeight;if(!!n){var f=e.state,c=f.width,h=f.height,p=c-(a+s),v=h-(i+u),g=Math.abs(p)>3,_=Math.abs(v)>3;if(g&&(r.startWidth+=p,r.startOffsetWidth+=p,r.prevWidth+=p),_&&(r.startHeight+=v,r.startOffsetHeight+=v,r.prevHeight+=v),g||_)return this.dragControl(e,t)}},dragControlEnd:function(e,t){var r=t.datas;if(!!r.isResize){r.isResize=!1;var n=Pr(e,t,{});return Et(e,"onResizeEnd",n),n}},dragGroupControlCondition:ro,dragGroupControlStart:function(e,t){var r=t.datas,n=this.dragControlStart(e,t);if(!n)return!1;var a=ga(e,"resizable",t);function i(c,h){var p=r.fixedDirection,v=r.fixedPosition,g=Bi(c,p),_=sr(Fi(-e.rotation/180*Math.PI,3),[g[0]-v[0],g[1]-v[1],1],3),m=_[0],b=_[1];return h.datas.originalX=m,h.datas.originalY=b,h}var s=jn(e,this,"dragControlStart",t,function(c,h){return i(c,h)}),u=Q(Q({},n),{targets:e.props.targets,events:s,setFixedDirection:function(c){n.setFixedDirection(c),s.forEach(function(h,p){h.setFixedDirection(c),i(e.moveables[p],a[p])})}}),f=Et(e,"onResizeGroupStart",u);return r.isResize=f!==!1,r.isResize?n:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isResize){var n=this.dragControl(e,t);if(!!n){var a=n.offsetWidth,i=n.offsetHeight,s=n.dist,u=e.props.keepRatio,f=[a/(a-s[0]),i/(i-s[1])],c=r.fixedPosition,h=jn(e,this,"dragControl",t,function(v,g){var _=sr(Fi(e.rotation/180*Math.PI,3),[g.datas.originalX*f[0],g.datas.originalY*f[1],1],3),m=_[0],b=_[1];return Q(Q({},g),{parentDist:null,parentScale:f,dragClient:Vt(c,[m,b]),parentKeepRatio:u})}),p=Q({targets:e.props.targets,events:h},n);return Et(e,"onResizeGroup",p),p}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isResize){this.dragControlEnd(e,t);var a=jn(e,this,"dragControlEnd",t),i=Pr(e,t,{targets:e.props.targets,events:a});return Et(e,"onResizeGroupEnd",i),r}},request:function(e){var t={},r=0,n=0,a=e.getRect();return{isControl:!0,requestStart:function(i){return{datas:t,parentDirection:i.direction||[1,1]}},request:function(i){return"offsetWidth"in i?r=i.offsetWidth-a.offsetWidth:"deltaWidth"in i&&(r+=i.deltaWidth),"offsetHeight"in i?n=i.offsetHeight-a.offsetHeight:"deltaHeight"in i&&(n+=i.deltaHeight),{datas:t,parentDist:[r,n]}},requestEnd:function(){return{datas:t,isDrag:!0}}}}},vft={name:"scalable",ableGroup:"size",canPinch:!0,props:{scalable:Boolean,throttleScale:Number,renderDirections:String,keepRatio:Boolean},events:{onScaleStart:"scaleStart",onScale:"scale",onScaleEnd:"scaleEnd",onScaleGroupStart:"scaleGroupStart",onScaleGroup:"scaleGroup",onScaleGroupEnd:"scaleGroupEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.scalable,i=r.edge;if(!n&&a)return i?Tw(e,t):yv(e,t)},dragControlCondition:ro,dragControlStart:function(e,t){var r=t.datas,n=t.isPinch,a=t.inputEvent,i=t.parentDirection,s=i||(n?[0,0]:pv(a.target)),u=e.state,f=u.width,c=u.height,h=u.targetTransform,p=u.target,v=u.pos1,g=u.pos2,_=u.pos4;if(!s||!p)return!1;n||ii(e,t),r.datas={},r.transform=h,r.prevDist=[1,1],r.direction=s,r.width=f,r.height=c,r.startValue=[1,1];var m=Gn(v,g),b=Gn(g,_),y=!s[0]&&!s[1]||s[0]||!s[1];r.scaleWidth=m,r.scaleHeight=b,r.scaleXRatio=m/f,r.scaleYRatio=b/c,Df(t,"scale"),r.isWidth=y;function w(x){r.ratio=x&&isFinite(x)?x:0}function C(x){r.fixedDirection=x,r.fixedPosition=Bi(e,x)}w(Gn(v,g)/Gn(g,_)),C([-s[0],-s[1]]);var T=Zt(e,t,Q(Q({direction:s,set:function(x){r.startValue=x},setRatio:w,setFixedDirection:C},If(t)),{dragStart:ir.dragStart(e,new So().dragStart([0,0],t))})),A=Et(e,"onScaleStart",T);return A!==!1&&(r.isScale=!0,e.state.snapRenderInfo={request:t.isRequest,direction:s}),r.isScale?T:!1},dragControl:function(e,t){Mf(t,"scale");var r=t.datas,n=t.distX,a=t.distY,i=t.parentScale,s=t.parentDistance,u=t.parentKeepRatio,f=t.parentFlag,c=t.isPinch,h=t.dragClient,p=t.parentDist,v=t.isRequest,g=r.prevDist,_=r.direction,m=r.width,b=r.height,y=r.isScale,w=r.startValue,C=r.isWidth,T=r.ratio,A=r.fixedDirection,x=r.scaleXRatio,I=r.scaleYRatio;if(!y)return!1;var B=e.props,P=B.throttleScale,L=B.parentMoveable,G=_;!_[0]&&!_[1]&&(G=[1,1]);var K=T&&(e.props.keepRatio||u),at=e.state,et=1,rt=1,gt=h;if(h||(!f&&c?gt=Bi(e,[0,0]):gt=r.fixedPosition),p)et=(m+p[0])/m,rt=(b+p[1])/b;else if(i)et=i[0],rt=i[1];else if(c)s&&(et=(m+s)/m,rt=(b+s*b/m)/b);else{var Z=On({datas:r,distX:n,distY:a}),it=G[0]*Z[0]*x,ct=G[1]*Z[1]*I;if(K&&m&&b)if(!G[0])it=ct*T;else if(!G[1])ct=it/T;else{var lt=en([it,ct]),dt=Ce([0,0],Z),Ut=Ce([0,0],G),Lt=Math.cos(dt-Ut)*lt,ve=Ce([0,0],[T,1]);it=Math.cos(ve)*Lt,ct=Math.sin(ve)*Lt}et=(m+it/x)/m,rt=(b+ct/I)/b}et=G[0]||K?et*w[0]:w[0],rt=G[1]||K?rt*w[1]:w[1],et===0&&(et=(g[0]>0?1:-1)*$u),rt===0&&(rt=(g[1]>0?1:-1)*$u);var bt=[et/w[0],rt/w[1]],Nt=[et,rt];if(!c&&e.props.groupable){var de=at.snapRenderInfo||{},Jt=de.direction;ni(Jt)&&(Jt[0]||Jt[1])&&(at.snapRenderInfo={direction:_,request:t.isRequest})}var Tt=[0,0];if(c||(Tt=uft(e,bt,_,v,r)),K){G[0]&&G[1]&&Tt[0]&&Tt[1]&&(Math.abs(Tt[0]*m)>Math.abs(Tt[1]*b)?Tt[1]=0:Tt[0]=0);var Ie=!Tt[0]&&!Tt[1];if(Ie&&(C?bt[0]=re(bt[0]*w[0],P)/w[0]:bt[1]=re(bt[1]*w[1],P)/w[1]),G[0]&&!G[1]||Tt[0]&&!Tt[1]||Ie&&C){bt[0]+=Tt[0];var Oe=m*bt[0]*w[0]/T;bt[1]=Oe/b/w[1]}else if(!G[0]&&G[1]||!Tt[0]&&Tt[1]||Ie&&!C){bt[1]+=Tt[1];var ge=b*bt[1]*w[1]*T;bt[0]=ge/m/w[0]}}else bt[0]+=Tt[0],bt[1]+=Tt[1],Tt[0]||(bt[0]=re(bt[0]*w[0],P)/w[0]),Tt[1]||(bt[1]=re(bt[1]*w[1],P)/w[1]);bt[0]===0&&(bt[0]=(g[0]>0?1:-1)*$u),bt[1]===0&&(bt[1]=(g[1]>0?1:-1)*$u);var Kt=[bt[0]/g[0],bt[1]/g[1]];Nt=Kot(bt,w);var wt=Eut(e,bt,A,gt,r),St=Gt(wt,r.prevInverseDist||[0,0]);if(r.prevDist=bt,r.prevInverseDist=wt,et===g[0]&&rt===g[1]&&St.every(function(jt){return!jt})&&!L)return!1;var Ae=Pf(r,"scale("+Nt.join(", ")+")","scale("+bt.join(", ")+")"),be=Zt(e,t,Q({offsetWidth:m,offsetHeight:b,direction:_,scale:Nt,dist:bt,delta:Kt,isPinch:!!c},vw(e,Ae,St,c,t)));return Et(e,"onScale",be),be},dragControlEnd:function(e,t){var r=t.datas,n=t.isDrag;return r.isScale?(r.isScale=!1,Et(e,"onScaleEnd",Pr(e,t,{})),n):!1},dragGroupControlCondition:ro,dragGroupControlStart:function(e,t){var r=t.datas,n=this.dragControlStart(e,t);if(!n)return!1;var a=ga(e,"resizable",t);function i(c,h){var p=r.fixedDirection,v=r.fixedPosition,g=Bi(c,p),_=sr(Fi(-e.rotation/180*Math.PI,3),[g[0]-v[0],g[1]-v[1],1],3),m=_[0],b=_[1];return h.datas.originalX=m,h.datas.originalY=b,h}r.moveableScale=e.scale;var s=jn(e,this,"dragControlStart",t,function(c,h){return i(c,h)}),u=Q(Q({},n),{targets:e.props.targets,events:s,setFixedDirection:function(c){n.setFixedDirection(c),s.forEach(function(h,p){h.setFixedDirection(c),i(e.moveables[p],a[p])})}}),f=Et(e,"onScaleGroupStart",u);return r.isScale=f!==!1,r.isScale?u:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isScale){var n=this.dragControl(e,t);if(!!n){var a=r.moveableScale;e.scale=[n.scale[0]*a[0],n.scale[1]*a[1]];var i=e.props.keepRatio,s=n.dist,u=n.scale,f=r.fixedPosition,c=jn(e,this,"dragControl",t,function(p,v){var g=sr(Fi(e.rotation/180*Math.PI,3),[v.datas.originalX*s[0],v.datas.originalY*s[1],1],3),_=g[0],m=g[1];return Q(Q({},v),{parentDist:null,parentScale:u,parentKeepRatio:i,dragClient:Vt(f,[_,m])})}),h=Q({targets:e.props.targets,events:c},n);return Et(e,"onScaleGroup",h),h}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isScale){this.dragControlEnd(e,t);var a=jn(e,this,"dragControlEnd",t),i=Pr(e,t,{targets:e.props.targets,events:a});return Et(e,"onScaleGroupEnd",i),r}},request:function(){var e={},t=0,r=0;return{isControl:!0,requestStart:function(n){return{datas:e,parentDirection:n.direction||[1,1]}},request:function(n){return t+=n.deltaWidth,r+=n.deltaHeight,{datas:e,parentDist:[t,r]}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function ia(e,t){return e.map(function(r,n){return $st(r,t[n],1,2)})}function zm(e,t,r){var n=Ce(e,t),a=Ce(e,r),i=a-n;return i>=0?i:i+2*Math.PI}function dft(e,t){var r=zm(e[0],e[1],e[2]),n=zm(t[0],t[1],t[2]),a=Math.PI;return!(r>=a&&n<=a||r<=a&&n>=a)}var gft={name:"warpable",ableGroup:"size",props:{warpable:Boolean,renderDirections:Array},events:{onWarpStart:"warpStart",onWarp:"warp",onWarpEnd:"warpEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.scalable,i=r.warpable,s=r.zoom;if(n||a||!i)return[];var u=e.state,f=u.pos1,c=u.pos2,h=u.pos3,p=u.pos4,v=ia(f,c),g=ia(c,f),_=ia(f,h),m=ia(h,f),b=ia(h,p),y=ia(p,h),w=ia(c,p),C=ia(p,c);return Rt([t.createElement("div",{className:Ht("line"),key:"middeLine1",style:Rs(v,b,s)}),t.createElement("div",{className:Ht("line"),key:"middeLine2",style:Rs(g,y,s)}),t.createElement("div",{className:Ht("line"),key:"middeLine3",style:Rs(_,w,s)}),t.createElement("div",{className:Ht("line"),key:"middeLine4",style:Rs(m,C,s)})],yv(e,t))},dragControlCondition:function(e,t){return t.isRequest?!1:tn(t.inputEvent.target,Ht("direction"))},dragControlStart:function(e,t){var r=t.datas,n=t.inputEvent,a=e.props.target,i=n.target,s=pv(i);if(!s||!a)return!1;var u=e.state,f=u.transformOrigin,c=u.is3d,h=u.targetTransform,p=u.targetMatrix,v=u.width,g=u.height,_=u.left,m=u.top;r.datas={},r.targetTransform=h,r.warpTargetMatrix=c?p:Un(p,3,4),r.targetInverseMatrix=Uy(gn(r.warpTargetMatrix,4),3,4),r.direction=s,r.left=_,r.top=m,r.poses=[[0,0],[v,0],[0,g],[v,g]].map(function(w){return Gt(w,f)}),r.nextPoses=r.poses.map(function(w){var C=w[0],T=w[1];return sr(r.warpTargetMatrix,[C,T,0,1],4)}),r.startValue=Pe(4),r.prevMatrix=Pe(4),r.absolutePoses=Cn(u),r.posIndexes=hw(s),ii(e,t),Df(t,"matrix3d"),u.snapRenderInfo={request:t.isRequest,direction:s};var b=Zt(e,t,Q({set:function(w){r.startValue=w}},If(t))),y=Et(e,"onWarpStart",b);return y!==!1&&(r.isWarp=!0),r.isWarp},dragControl:function(e,t){var r=t.datas,n=t.isRequest,a=t.distX,i=t.distY,s=r.targetInverseMatrix,u=r.prevMatrix,f=r.isWarp,c=r.startValue,h=r.poses,p=r.posIndexes,v=r.absolutePoses;if(!f)return!1;if(Mf(t,"matrix3d"),us(e,"warpable")){var g=p.map(function(P){return v[P]});g.length>1&&g.push([(g[0][0]+g[1][0])/2,(g[0][1]+g[1][1])/2]);var _=Lf(e,n,{horizontal:g.map(function(P){return P[1]+i}),vertical:g.map(function(P){return P[0]+a})}),m=_.horizontal,b=_.vertical;i-=m.offset,a-=b.offset}var y=On({datas:r,distX:a,distY:i},!0),w=r.nextPoses.slice();if(p.forEach(function(P){w[P]=Vt(w[P],y)}),!Uot.every(function(P){return dft(P.map(function(L){return h[L]}),P.map(function(L){return w[L]}))}))return!1;var C=fv(h[0],h[2],h[1],h[3],w[0],w[2],w[1],w[3]);if(!C.length)return!1;var T=pe(s,C,4),A=lw(r,T,!0),x=pe(gn(u,4),A,4);r.prevMatrix=A;var I=pe(c,A,4),B=Pf(r,"matrix3d("+I.join(", ")+")","matrix3d("+A.join(", ")+")");return dv(t,B),Et(e,"onWarp",Zt(e,t,{delta:x,matrix:I,dist:A,multiply:pe,transform:B})),!0},dragControlEnd:function(e,t){var r=t.datas,n=t.isDrag;return r.isWarp?(r.isWarp=!1,Et(e,"onWarpEnd",Pr(e,t,{})),n):!1}},_ft=Ht("area-pieces"),wu=Ht("area-piece"),Mw=Ht("avoid");function Ac(e){var t=e.areaElement,r=e.state,n=r.width,a=r.height;Mst(t,Mw),t.style.cssText+="left: 0px; top: 0px; width: "+n+"px; height: "+a+"px"}function Gm(e){return e.createElement("div",{key:"area_pieces",className:_ft},e.createElement("div",{className:wu}),e.createElement("div",{className:wu}),e.createElement("div",{className:wu}),e.createElement("div",{className:wu}))}var Pw={name:"dragArea",props:{dragArea:Boolean,passDragArea:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},render:function(e,t){var r=e.props,n=r.target,a=r.dragArea,i=r.groupable,s=r.passDragArea,u=e.state,f=u.width,c=u.height,h=u.renderPoses,p=s?Ht("area","pass"):Ht("area");if(i)return[t.createElement("div",{key:"area",ref:pn(e,"areaElement"),className:p}),Gm(t)];if(!n||!a)return[];var v=fv([0,0],[f,0],[0,c],[f,c],h[0],h[1],h[2],h[3]),g=v.length?Of(v,!0):"none";return[t.createElement("div",{key:"area",ref:pn(e,"areaElement"),className:p,style:{top:"0px",left:"0px",width:f+"px",height:c+"px",transformOrigin:"0 0",transform:g}}),Gm(t)]},dragStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=t.inputEvent;if(!i)return!1;r.isDragArea=!1;var s=e.areaElement,u=e.state,f=u.moveableClientRect,c=u.renderPoses,h=u.rootMatrix,p=u.is3d,v=f.left,g=f.top,_=kr(c),m=_.left,b=_.top,y=_.width,w=_.height,C=p?4:3,T=Ri(h,[n-v,a-g],C),A=T[0],x=T[1];A-=m,x-=b;var I=[{left:m,top:b,width:y,height:x-10},{left:m,top:b,width:A-10,height:w},{left:m,top:b+x+10,width:y,height:w-x-10},{left:m+A+10,top:b,width:y-A-10,height:w}],B=[].slice.call(s.nextElementSibling.children);I.forEach(function(P,L){B[L].style.cssText="left: "+P.left+"px;top: "+P.top+"px; width: "+P.width+"px; height: "+P.height+"px;"}),Tst(s,Mw),u.disableNativeEvent=!0},drag:function(e,t){var r=t.datas,n=t.inputEvent;if(this.enableNativeEvent(e),!n)return!1;r.isDragArea||(r.isDragArea=!0,Ac(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var r=t.inputEvent,n=t.datas;if(!r)return!1;n.isDragArea||Ac(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){Ac(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&rv(function(){t.disableNativeEvent=!1})}},mft=yo("origin",{render:function(e,t){var r=e.props.zoom,n=e.state,a=n.beforeOrigin,i=n.rotation;return[t.createElement("div",{className:Ht("control","origin"),style:aw(i,r,a),key:"beforeOrigin"})]}});function $ft(e){var t=e.scrollContainer;return[t.scrollLeft,t.scrollTop]}var bft={name:"scrollable",canPinch:!0,props:{scrollable:Boolean,scrollContainer:Object,scrollThreshold:Number,getScrollPosition:Function},events:{onScroll:"scroll",onScrollGroup:"scrollGroup"},dragRelation:"strong",dragStart:function(e,t){var r=e.props,n=r.scrollContainer,a=n===void 0?e.getContainer():n,i=new yot,s=Af(a,!0);t.datas.dragScroll=i;var u=t.isControl?"controlGesto":"targetGesto",f=t.targets;i.on("scroll",function(c){var h=c.container,p=c.direction,v=Zt(e,t,{scrollContainer:h,direction:p}),g=f?"onScrollGroup":"onScroll";f&&(v.targets=f),Et(e,g,v)}).on("move",function(c){var h=c.offsetX,p=c.offsetY;e[u].scrollBy(h,p,t.inputEvent,!1)}),i.dragStart(t,{container:s})},checkScroll:function(e,t){var r=t.datas.dragScroll;if(!!r){var n=e.props,a=n.scrollContainer,i=a===void 0?e.getContainer():a,s=n.scrollThreshold,u=s===void 0?0:s,f=n.getScrollPosition,c=f===void 0?$ft:f;return r.drag(t,{container:i,threshold:u,getScrollPosition:function(h){return c({scrollContainer:h.container,direction:h.direction})}}),!0}},drag:function(e,t){return this.checkScroll(e,t)},dragEnd:function(e,t){t.datas.dragScroll.dragEnd(),t.datas.dragScroll=null},dragControlStart:function(e,t){return this.dragStart(e,Q(Q({},t),{isControl:!0}))},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupStart:function(e,t){return this.dragStart(e,Q(Q({},t),{targets:e.props.targets}))},dragGroup:function(e,t){return this.drag(e,Q(Q({},t),{targets:e.props.targets}))},dragGroupEnd:function(e,t){return this.dragEnd(e,Q(Q({},t),{targets:e.props.targets}))},dragGroupControlStart:function(e,t){return this.dragStart(e,Q(Q({},t),{targets:e.props.targets,isControl:!0}))},dragGroupContro:function(e,t){return this.drag(e,Q(Q({},t),{targets:e.props.targets}))},dragGroupControEnd:function(e,t){return this.dragEnd(e,Q(Q({},t),{targets:e.props.targets}))}},xw={name:"",props:{target:Object,dragTarget:Object,container:Object,portalContainer:Object,rootContainer:Object,useResizeObserver:Boolean,zoom:Number,transformOrigin:Array,edge:Boolean,ables:Array,className:String,pinchThreshold:Number,pinchOutside:Boolean,triggerAblesSimultaneously:Boolean,checkInput:Boolean,cspNonce:String,translateZ:Number,hideDefaultLines:Boolean,props:Object},events:{}},yft=yo("padding",{render:function(e,t){var r=e.props;if(r.dragArea)return[];var n=r.padding||{},a=n.left,i=a===void 0?0:a,s=n.top,u=s===void 0?0:s,f=n.right,c=f===void 0?0:f,h=n.bottom,p=h===void 0?0:h,v=e.state,g=v.renderPoses,_=v.pos1,m=v.pos2,b=v.pos3,y=v.pos4,w=[_,m,b,y],C=[];return i>0&&C.push([0,2]),u>0&&C.push([0,1]),c>0&&C.push([1,3]),p>0&&C.push([2,3]),C.map(function(T,A){var x=T[0],I=T[1],B=w[x],P=w[I],L=g[x],G=g[I],K=fv([0,0],[100,0],[0,100],[100,100],B,P,L,G);if(!!K.length)return t.createElement("div",{key:"padding"+A,className:Ht("padding"),style:{transform:Of(K,!0)}})})}}),Nm=["nw","ne","se","sw"];function Su(e,t){var r=e[0]+e[1],n=r>t?t/r:1;return e[0]*=n,e[1]=t-e[1]*n,e}var wft=[1,2,5,6],Sft=[0,3,4,7],ja=[1,-1,-1,1],qa=[1,1,-1,-1];function wv(e,t,r,n,a,i,s,u,f){i===void 0&&(i=0),s===void 0&&(s=0),u===void 0&&(u=n),f===void 0&&(f=a);var c=[],h=!1,p=e.map(function(v,g){var _=t[g],m=_.horizontal,b=_.vertical;if(b&&!h&&(h=!0,c.push("/")),h){var y=Math.max(0,b===1?v[1]-s:f-v[1]);return c.push(Qr(y,a,r)),y}else{var y=Math.max(0,m===1?v[0]-i:u-v[0]);return c.push(Qr(y,n,r)),y}});return{styles:c,raws:p}}function Iw(e){for(var t=[0,0],r=[0,0],n=e.length,a=0;a-1?e.slice(0,h):e).length,v=e.slice(0,p),g=e.slice(p+1),_=v[0],m=_===void 0?"0px":_,b=v[1],y=b===void 0?m:b,w=v[2],C=w===void 0?m:w,T=v[3],A=T===void 0?y:T,x=g[0],I=x===void 0?m:x,B=g[1],P=B===void 0?I:B,L=g[2],G=L===void 0?I:L,K=g[3],at=K===void 0?P:K,et=[m,y,C,A].map(function(lt){return Ze(lt,t)}),rt=[I,P,G,at].map(function(lt){return Ze(lt,r)}),gt=et.slice(),Z=rt.slice();s=Su([gt[0],gt[1]],t),gt[0]=s[0],gt[1]=s[1],u=Su([gt[3],gt[2]],t),gt[3]=u[0],gt[2]=u[1],f=Su([Z[0],Z[3]],r),Z[0]=f[0],Z[3]=f[1],c=Su([Z[1],Z[2]],r),Z[1]=c[0],Z[2]=c[1];var it=gt.slice(0,Math.max(i[0],v.length)),ct=Z.slice(0,Math.max(i[1],g.length));return Rt(Rt([],it.map(function(lt,dt){var Ut=Nm[dt];return{horizontal:ja[dt],vertical:0,pos:[n+lt,a+(qa[dt]===-1?r:0)],sub:!0,raw:et[dt],direction:Ut}})),ct.map(function(lt,dt){var Ut=Nm[dt];return{horizontal:0,vertical:qa[dt],pos:[n+(ja[dt]===-1?t:0),a+lt],sub:!0,raw:rt[dt],direction:Ut}}))}function Rw(e,t,r,n,a){a===void 0&&(a=t.length);var i=Iw(e.slice(n)),s=i.horizontalRange,u=i.verticalRange,f=r-n,c=0;if(f===0)c=a;else if(f>0&&f=u[0])c=u[0]+u[1]-f;else return;e.splice(r,c),t.splice(r,c)}function Bw(e,t,r,n,a,i,s,u,f,c,h){c===void 0&&(c=0),h===void 0&&(h=0);var p=Iw(e.slice(r)),v=p.horizontalRange,g=p.verticalRange;if(n>-1)for(var _=ja[n]===1?i-c:u-i,m=v[1];m<=n;++m){var b=qa[m]===1?h:f,y=0;if(n===m?y=i:m===0?y=c+_:ja[m]===-1&&(y=u-(t[r][0]-c)),e.splice(r+m,0,{horizontal:ja[m],vertical:0,pos:[y,b]}),t.splice(r+m,0,[y,b]),m===0)break}else if(a>-1){var w=qa[a]===1?s-h:f-s;if(v[1]===0&&g[1]===0){var C=[c+w,h];e.push({horizontal:ja[0],vertical:0,pos:C}),t.push(C)}for(var T=g[0],m=g[1];m<=a;++m){var y=ja[m]===1?c:u,b=0;if(a===m?b=s:m===0?b=h+w:qa[m]===1?b=t[r+T][1]:qa[m]===-1&&(b=f-(t[r+T][1]-h)),e.push({horizontal:0,vertical:qa[m],pos:[y,b]}),t.push([y,b]),m===0)break}}}function Lw(e,t){t===void 0&&(t=e.map(function(a){return a.raw}));var r=e.map(function(a,i){return a.horizontal?t[i]:null}).filter(function(a){return a!=null}),n=e.map(function(a,i){return a.vertical?t[i]:null}).filter(function(a){return a!=null});return{horizontals:r,verticals:n}}var Eft=[[0,-1,"n"],[1,0,"e"]],Cft=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function Sv(e,t,r){var n=e.props.clipRelative,a=e.state,i=a.width,s=a.height,u=t,f=u.type,c=u.poses,h=f==="rect",p=f==="circle";if(f==="polygon")return r.map(function(x){return Qr(x[0],i,n)+" "+Qr(x[1],s,n)});if(h||f==="inset"){var v=r[1][1],g=r[3][0],_=r[7][0],m=r[5][1];if(h)return[v,g,m,_].map(function(x){return x+"px"});var b=[v,i-g,s-m,_].map(function(x,I){return Qr(x,I%2?i:s,n)});if(r.length>8){var y=Gt(r[4],r[0]),w=y[0],C=y[1];b.push.apply(b,Rt(["round"],wv(r.slice(8),c.slice(8),n,w,C,_,v,g,m).styles))}return b}else if(p||f==="ellipse"){var T=r[0],A=Qr(Math.abs(r[1][1]-T[1]),p?Math.sqrt((i*i+s*s)/2):s,n),b=p?[A]:[Qr(Math.abs(r[2][0]-T[0]),i,n),A];return b.push("at",Qr(T[0],i,n),Qr(T[1],s,n)),b}}function jm(e,t,r,n){var a=[n,(n+t)/2,t],i=[e,(e+r)/2,r];return Cft.map(function(s){var u=s[0],f=s[1],c=s[2],h=a[u+1],p=i[f+1];return{vertical:Math.abs(f),horizontal:Math.abs(u),direction:c,pos:[h,p]}})}function qm(e,t,r,n,a){var i,s,u,f,c,h,p,v=a;if(!v){var g=dr(e),_=g.clipPath;v=_!=="none"?_:g.clip}if(!((!v||v==="none"||v==="auto")&&(v=n,!v))){var m=ev(v),b=m.prefix,y=b===void 0?v:b,w=m.value,C=w===void 0?"":w,T=y==="circle",A=" ";if(y==="polygon"){var x=Ua(C||"0% 0%, 100% 0%, 100% 100%, 0% 100%");A=",";var I=x.map(function(be){var jt=be.split(" "),Ft=jt[0],Le=jt[1];return{vertical:1,horizontal:1,pos:[Ze(Ft,t),Ze(Le,r)]}});return{type:y,clipText:v,poses:I,splitter:A}}else if(T||y==="ellipse"){var B="",P="",L=0,G=0,x=da(C);if(T){var K="";i=x[0],K=i===void 0?"50%":i,s=x[2],B=s===void 0?"50%":s,u=x[3],P=u===void 0?"50%":u,L=Ze(K,Math.sqrt((t*t+r*r)/2)),G=L}else{var at="",et="";f=x[0],at=f===void 0?"50%":f,c=x[1],et=c===void 0?"50%":c,h=x[3],B=h===void 0?"50%":h,p=x[4],P=p===void 0?"50%":p,L=Ze(at,t),G=Ze(et,r)}var rt=[Ze(B,t),Ze(P,r)],I=Rt([{vertical:1,horizontal:1,pos:rt,direction:"nesw"}],Eft.slice(0,T?1:2).map(function(Ft){return{vertical:Math.abs(Ft[1]),horizontal:Ft[0],direction:Ft[2],sub:!0,pos:[rt[0]+Ft[0]*L,rt[1]+Ft[1]*G]}}));return{type:y,clipText:v,radiusX:L,radiusY:G,left:rt[0]-L,top:rt[1]-G,poses:I,splitter:A}}else if(y==="inset"){var x=da(C||"0 0 0 0"),gt=x.indexOf("round"),Z=(gt>-1?x.slice(0,gt):x).length,it=x.slice(Z+1),ct=x.slice(0,Z),lt=ct[0],dt=ct[1],Ut=dt===void 0?lt:dt,Lt=ct[2],ve=Lt===void 0?lt:Lt,bt=ct[3],Nt=bt===void 0?Ut:bt,de=[lt,ve].map(function(Ft){return Ze(Ft,r)}),Jt=de[0],Tt=de[1],Ie=[Nt,Ut].map(function(Ft){return Ze(Ft,t)}),Oe=Ie[0],ge=Ie[1],Kt=t-ge,wt=r-Tt,St=Dw(it,Kt-Oe,wt-Jt,Oe,Jt),I=Rt(Rt([],jm(Jt,Kt,wt,Oe)),St);return{type:"inset",clipText:v,poses:I,top:Jt,left:Oe,right:Kt,bottom:wt,radius:it,splitter:A}}else if(y==="rect"){var x=Ua(C||"0px, "+t+"px, "+r+"px, 0px");A=",";var Ae=x.map(function(Dr){var Kn=go(Dr).value;return Kn}),Jt=Ae[0],ge=Ae[1],Tt=Ae[2],Oe=Ae[3],I=jm(Jt,ge,Tt,Oe);return{type:"rect",clipText:v,poses:I,top:Jt,right:ge,bottom:Tt,left:Oe,values:x,splitter:A}}}}function Oft(e,t){var r=fw(e,t),n=r[0],a=r[1],i=t.datas,s=i.clipPath,u=i.index,f=s,c=f.type,h=f.poses,p=f.splitter,v=h.map(function(y){return y.pos});if(c==="polygon")v.splice(u,0,[n,a]);else if(c==="inset"){var g=wft.indexOf(u),_=Sft.indexOf(u),m=h.length;if(Bw(h,v,8,g,_,n,a,v[4][0],v[4][1],v[0][0],v[0][1]),m===h.length)return}else return;var b=Sv(e,s,v);Et(e,"onClip",Zt(e,t,{clipEventType:"added",clipType:c,poses:v,clipStyles:b,clipStyle:c+"("+b.join(p)+")",distX:0,distY:0}))}function Aft(e,t){var r=t.datas,n=r.clipPath,a=r.index,i=n,s=i.type,u=i.poses,f=i.splitter,c=u.map(function(v){return v.pos}),h=c.length;if(s==="polygon")u.splice(a,1),c.splice(a,1);else if(s==="inset"){if(a<8||(Rw(u,c,a,8,h),h===u.length))return}else return;var p=Sv(e,n,c);Et(e,"onClip",Zt(e,t,{clipEventType:"removed",clipType:s,poses:c,clipStyles:p,clipStyle:s+"("+p.join(f)+")",distX:0,distY:0}))}var Tft={name:"clippable",props:{clippable:Boolean,defaultClipPath:String,customClipPath:String,clipRelative:Boolean,clipArea:Boolean,dragWithClip:Boolean,clipTargetBounds:Boolean,clipVerticalGuidelines:Array,clipHorizontalGuidelines:Array,clipSnapThreshold:Boolean},events:{onClipStart:"clipStart",onClip:"clip",onClipEnd:"clipEnd"},css:[`.control.clip-control { + background: #6d6; + cursor: pointer; +} +.control.clip-control.clip-radius { + background: #d66; +} +.line.clip-line { + background: #6e6; + cursor: move; + z-index: 1; +} +.clip-area { + position: absolute; + top: 0; + left: 0; +} +.clip-ellipse { + position: absolute; + cursor: move; + border: 1px solid #6d6; + border: var(--zoompx) solid #6d6; + border-radius: 50%; + transform-origin: 0px 0px; +}`,`:host { + --bounds-color: #d66; +}`,`.guideline { + pointer-events: none; + z-index: 2; +}`,`.line.guideline.bounds { + background: #d66; + background: var(--bounds-color); +}`],render:function(e,t){var r=e.props,n=r.customClipPath,a=r.defaultClipPath,i=r.clipArea,s=r.zoom,u=e.state,f=u.target,c=u.width,h=u.height,p=u.allMatrix,v=u.is3d,g=u.left,_=u.top,m=u.pos1,b=u.pos2,y=u.pos3,w=u.pos4,C=u.clipPathState,T=u.snapBoundInfos,A=u.rotation;if(!f)return[];var x=qm(f,c,h,a||"inset",C||n);if(!x)return[];var I=v?4:3,B=x.type,P=x.poses,L=P.map(function(wt){var St=Je(p,wt.pos,I);return[St[0]-g,St[1]-_]}),G=[],K=[],at=B==="rect",et=B==="inset",rt=B==="polygon";if(at||et||rt){var gt=et?L.slice(0,8):L;K=gt.map(function(wt,St){var Ae=St===0?gt[gt.length-1]:gt[St-1],be=Ce(Ae,wt),jt=nw(Ae,wt);return t.createElement("div",{key:"clipLine"+St,className:Ht("line","clip-line","snap-control"),"data-clip-index":St,style:{width:jt+"px",transform:"translate("+Ae[0]+"px, "+Ae[1]+"px) rotate("+be+"rad) scaleY("+s+")"}})})}if(G=L.map(function(wt,St){return t.createElement("div",{key:"clipControl"+St,className:Ht("control","clip-control","snap-control"),"data-clip-index":St,style:{transform:"translate("+wt[0]+"px, "+wt[1]+"px) rotate("+A+"rad) scale("+s+")"}})}),et&&G.push.apply(G,L.slice(8).map(function(wt,St){return t.createElement("div",{key:"clipRadiusControl"+St,className:Ht("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+St,style:{transform:"translate("+wt[0]+"px, "+wt[1]+"px) rotate("+A+"rad) scale("+s+")"}})})),B==="circle"||B==="ellipse"){var Z=x.left,it=x.top,ct=x.radiusX,lt=x.radiusY,dt=Gt(Je(p,[Z,it],I),Je(p,[0,0],I)),Ut=dt[0],Lt=dt[1],ve="none";if(!i){for(var bt=Math.max(10,ct/5,lt/5),Nt=[],de=0;de<=bt;++de){var Jt=Math.PI*2/bt*de;Nt.push([ct+(ct-s)*Math.cos(Jt),lt+(lt-s)*Math.sin(Jt)])}Nt.push([ct,-2]),Nt.push([-2,-2]),Nt.push([-2,lt*2+2]),Nt.push([ct*2+2,lt*2+2]),Nt.push([ct*2+2,-2]),Nt.push([ct,-2]),ve="polygon("+Nt.map(function(wt){return wt[0]+"px "+wt[1]+"px"}).join(", ")+")"}G.push(t.createElement("div",{key:"clipEllipse",className:Ht("clip-ellipse","snap-control"),style:{width:ct*2+"px",height:lt*2+"px",clipPath:ve,transform:"translate("+(-g+Ut)+"px, "+(-_+Lt)+"px) "+Of(p)}}))}if(i){var Tt=kr(Rt([m,b,y,w],L)),Ie=Tt.width,Oe=Tt.height,ge=Tt.left,Kt=Tt.top;if(rt||at||et){var Nt=et?L.slice(0,8):L;G.push(t.createElement("div",{key:"clipArea",className:Ht("clip-area","snap-control"),style:{width:Ie+"px",height:Oe+"px",transform:"translate("+ge+"px, "+Kt+"px)",clipPath:"polygon("+Nt.map(function(St){return St[0]-ge+"px "+(St[1]-Kt)+"px"}).join(", ")+")"}}))}}return T&&["vertical","horizontal"].forEach(function(wt){var St=T[wt],Ae=wt==="horizontal";St.isSnap&&K.push.apply(K,St.snap.posInfos.map(function(be,jt){var Ft=be.pos,Le=Gt(Je(p,Ae?[0,Ft]:[Ft,0],I),[g,_]),Fe=Gt(Je(p,Ae?[c,Ft]:[Ft,h],I),[g,_]);return Ii(t,"",Le,Fe,s,"clip"+wt+"snap"+jt,"guideline")})),St.isBound&&K.push.apply(K,St.bounds.map(function(be,jt){var Ft=be.pos,Le=Gt(Je(p,Ae?[0,Ft]:[Ft,0],I),[g,_]),Fe=Gt(Je(p,Ae?[c,Ft]:[Ft,h],I),[g,_]);return Ii(t,"",Le,Fe,s,"clip"+wt+"bounds"+jt,"guideline","bounds","bold")}))}),Rt(Rt([],G),K)},dragControlCondition:function(e,t){return t.inputEvent&&(t.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(e,t){var r=e.props,n=r.dragWithClip,a=n===void 0?!0:n;return a?!1:this.dragControlStart(e,t)},drag:function(e,t){return this.dragControl(e,t)},dragEnd:function(e,t){return this.dragControlEnd(e,t)},dragControlStart:function(e,t){var r=e.state,n=e.props,a=n.defaultClipPath,i=n.customClipPath,s=r.target,u=r.width,f=r.height,c=t.inputEvent?t.inputEvent.target:null,h=c&&c.getAttribute("class")||"",p=t.datas,v=qm(s,u,f,a||"inset",i);if(!v)return!1;var g=v.clipText,_=v.type,m=v.poses,b=Et(e,"onClipStart",Zt(e,t,{clipType:_,clipStyle:g,poses:m.map(function(y){return y.pos})}));return b===!1?(p.isClipStart=!1,!1):(p.isControl=h&&h.indexOf("clip-control")>-1,p.isLine=h.indexOf("clip-line")>-1,p.isArea=h.indexOf("clip-area")>-1||h.indexOf("clip-ellipse")>-1,p.index=c?parseInt(c.getAttribute("data-clip-index"),10):-1,p.clipPath=v,p.isClipStart=!0,r.clipPathState=g,ii(e,t),!0)},dragControl:function(e,t){var r,n=t.datas,a=t.originalDatas;if(!n.isClipStart)return!1;var i=n,s=i.isControl,u=i.isLine,f=i.isArea,c=i.index,h=i.clipPath;if(!h)return!1;var p=On(t),v=p[0],g=p[1],_=e.props,m=e.state,b=m.width,y=m.height,w=!f&&!s&&!u,C=h.type,T=h.poses,A=h.splitter,x=T.map(function(jt){return jt.pos});w&&(v=-v,g=-g);var I=!s||T[c].direction==="nesw",B=C==="inset"||C==="rect",P=T.map(function(){return[0,0]});if(s&&!I){var L=T[c],G=L.horizontal,K=L.vertical,at=[v*Math.abs(G),g*Math.abs(K)];P=fut(T,c,at,B)}else I&&(P=x.map(function(){return[v,g]}));var et=x.map(function(jt,Ft){return Vt(jt,P[Ft])}),rt=Rt([],et);m.snapBoundInfos=null;var gt=h.type==="circle",Z=h.type==="ellipse";if(gt||Z){var it=kr(et),ct=Math.abs(it.bottom-it.top),lt=Math.abs(Z?it.right-it.left:ct),dt=et[0][1]+ct,Ut=et[0][0]-lt,Lt=et[0][0]+lt;gt&&(rt.push([Lt,it.bottom]),P.push([1,0])),rt.push([it.left,dt]),P.push([0,1]),rt.push([Ut,it.bottom]),P.push([1,0])}var ve=mw((_.clipHorizontalGuidelines||[]).map(function(jt){return Ze(""+jt,y)}),(_.clipVerticalGuidelines||[]).map(function(jt){return Ze(""+jt,b)}),b,y),bt=[],Nt=[];if(gt||Z)bt=[rt[4][0],rt[2][0]],Nt=[rt[1][1],rt[3][1]];else if(B){var de=[rt[0],rt[2],rt[4],rt[6]],Jt=[P[0],P[2],P[4],P[6]];bt=de.filter(function(jt,Ft){return Jt[Ft][0]}).map(function(jt){return jt[0]}),Nt=de.filter(function(jt,Ft){return Jt[Ft][1]}).map(function(jt){return jt[1]})}else bt=rt.filter(function(jt,Ft){return P[Ft][0]}).map(function(jt){return jt[0]}),Nt=rt.filter(function(jt,Ft){return P[Ft][1]}).map(function(jt){return jt[1]});for(var Tt=[0,0],Ie=function(jt){var Ft=Rm(ve,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},bt,Nt,5),Le=Ft.horizontal,Fe=Ft.vertical,Kr=Le.offset,Dr=Fe.offset;if(Le.isBound&&(Tt[1]+=Kr),Fe.isBound&&(Tt[0]+=Dr),(Z||gt)&&P[0][0]===0&&P[0][1]===0){var Kn=kr(et),gr=Kn.bottom-Kn.top,Ea=Z?Kn.right-Kn.left:gr,Ca=Fe.isBound?Math.abs(Dr):Fe.snapIndex===0?-Dr:Dr,Yn=Le.isBound?Math.abs(Kr):Le.snapIndex===0?-Kr:Kr;Ea-=Ca,gr-=Yn,gt&&(gr=bw(Fe,Le)>0?gr:Ea,Ea=gr);var Xn=rt[0];rt[1][1]=Xn[1]-gr,rt[2][0]=Xn[0]+Ea,rt[3][1]=Xn[1]+gr,rt[4][0]=Xn[0]-Ea}else return rt.forEach(function(si,fs){var oi=P[fs];oi[0]&&(si[0]-=Dr),oi[1]&&(si[1]-=Kr)}),"break"},Oe=0;Oe<2;++Oe){var ge=Ie();if(ge==="break")break}var Kt=Sv(e,h,et),wt=C+"("+Kt.join(A)+")";if(m.clipPathState=wt,gt||Z)bt=[rt[4][0],rt[2][0]],Nt=[rt[1][1],rt[3][1]];else if(B){var de=[rt[0],rt[2],rt[4],rt[6]];bt=de.map(function(Ft){return Ft[0]}),Nt=de.map(function(Ft){return Ft[1]})}else bt=rt.map(function(jt){return jt[0]}),Nt=rt.map(function(jt){return jt[1]});if(m.snapBoundInfos=Rm(ve,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},bt,Nt,1),a.draggable){var St=m.is3d,Ae=m.allMatrix,be=St?4:3;r=pe(Ae,[Tt[0],Tt[1],0,0],be),Tt[0]=r[0],Tt[1]=r[1],a.draggable.deltaOffset=Tt}return Et(e,"onClip",Zt(e,t,{clipEventType:"changed",clipType:C,poses:et,clipStyle:wt,clipStyles:Kt,distX:v,distY:g})),!0},dragControlEnd:function(e,t){this.unset(e);var r=t.isDrag,n=t.datas,a=t.isDouble,i=n.isLine,s=n.isClipStart,u=n.isControl;return s?(Et(e,"onClipEnd",Pr(e,t,{})),a&&(u?Aft(e,t):i&&Oft(e,t)),a||r):!1},unset:function(e){e.state.clipPathState="",e.state.snapBoundInfos=null}},Mft={name:"originDraggable",props:{originDraggable:Boolean,originRelative:Boolean},events:{onDragOriginStart:"dragOriginStart",onDragOrigin:"dragOrigin",onDragOriginEnd:"dragOriginEnd"},css:[`:host[data-able-origindraggable] .control.origin { + pointer-events: auto; +}`],dragControlCondition:function(e,t){return t.isRequest?t.requestAble==="originDraggable":tn(t.inputEvent.target,Ht("origin"))},dragControlStart:function(e,t){var r=t.datas;ii(e,t);var n=Zt(e,t,{dragStart:ir.dragStart(e,new So().dragStart([0,0],t))}),a=Et(e,"onDragOriginStart",n);return r.startOrigin=e.state.transformOrigin,r.startTargetOrigin=e.state.targetOrigin,r.prevOrigin=[0,0],r.isDragOrigin=!0,a===!1?(r.isDragOrigin=!1,!1):n},dragControl:function(e,t){var r=t.datas,n=t.isPinch,a=t.isRequest;if(!r.isDragOrigin)return!1;var i=On(t),s=i[0],u=i[1],f=e.state,c=f.width,h=f.height,p=f.offsetMatrix,v=f.targetMatrix,g=f.is3d,_=e.props.originRelative,m=_===void 0?!0:_,b=g?4:3,y=[s,u];if(a){var w=t.distOrigin;(w[0]||w[1])&&(y=w)}var C=Vt(r.startOrigin,y),T=Vt(r.startTargetOrigin,y),A=Gt(y,r.prevOrigin),x=xf(p,v,C,b),I=e.getRect(),B=kr(wo(x,c,h,b)),P=[I.left-B.left,I.top-B.top];r.prevOrigin=y;var L=[Qr(T[0],c,m),Qr(T[1],h,m)].join(" "),G=Zt(e,t,{width:c,height:h,origin:C,dist:y,delta:A,transformOrigin:L,drag:ir.drag(e,Tf(t,e.state,P,!!n,!1))});return Et(e,"onDragOrigin",G),G},dragControlEnd:function(e,t){var r=t.datas;return r.isDragOrigin?(Et(e,"onDragOriginEnd",Pr(e,t,{})),!0):!1},dragGroupControlCondition:function(e,t){return this.dragControlCondition(e,t)},dragGroupControlStart:function(e,t){var r=this.dragControlStart(e,t);return!!r},dragGroupControl:function(e,t){var r=this.dragControl(e,t);return r?(e.transformOrigin=r.transformOrigin,!0):!1},request:function(e){var t={},r=e.getRect(),n=0,a=0,i=r.transformOrigin,s=[0,0];return{isControl:!0,requestStart:function(){return{datas:t}},request:function(u){return"deltaOrigin"in u?(s[0]+=u.deltaOrigin[0],s[1]+=u.deltaOrigin[1]):"origin"in u?(s[0]=u.origin[0]-i[0],s[1]=u.origin[1]-i[1]):("x"in u?n=u.x-r.left:"deltaX"in u&&(n+=u.deltaX),"y"in u?a=u.y-r.top:"deltaY"in u&&(a+=u.deltaY)),{datas:t,distX:n,distY:a,distOrigin:s}},requestEnd:function(){return{datas:t,isDrag:!0}}}}};function Pft(e,t,r,n,a,i,s){var u=Lw(e),f=u.horizontals,c=u.verticals,h=f.length,p=c.length,v=-1,g=-1;r===0?h===0?v=0:h===1&&(v=1):r===3&&(h<=2?v=2:h<=3&&(v=3)),r===2?p===0?g=0:p<4&&(g=3):r===1&&(p<=1?g=1:p<=2&&(g=2)),Bw(e,t,0,v,g,n,a,i,s)}function Um(e,t,r,n,a){n===void 0&&(n=[0,0]);var i,s=[];if(a)i=a;else{var u=dr(e);i=u&&u.borderRadius||""}return!i||!a&&i==="0px"?s=[]:s=da(i),Dw(s,t,r,0,0,n)}function km(e,t,r,n,a,i){var s=e.state,u=s.width,f=s.height,c=wv(i,a,e.props.roundRelative,u,f),h=c.raws,p=c.styles,v=Lw(a,h),g=v.horizontals,_=v.verticals,m=p.join(" ");s.borderRadiusState=m,Et(e,"onRound",Zt(e,t,{horizontals:g,verticals:_,borderRadius:m,width:u,height:f,delta:n,dist:r}))}var xft={name:"roundable",props:{roundable:Boolean,roundRelative:Boolean,minRoundControls:Array,maxRoundControls:Array,roundClickable:Boolean},events:{onRoundStart:"roundStart",onRound:"round",onRoundEnd:"roundEnd"},css:[`.control.border-radius { + background: #d66; + cursor: pointer; +}`,`:host[data-able-roundable] .line.direction { + cursor: pointer; +}`],render:function(e,t){var r=e.state,n=r.target,a=r.width,i=r.height,s=r.allMatrix,u=r.is3d,f=r.left,c=r.top,h=r.borderRadiusState,p=e.props,v=p.minRoundControls,g=v===void 0?[0,0]:v,_=p.maxRoundControls,m=_===void 0?[4,4]:_,b=p.zoom;if(!n)return null;var y=u?4:3,w=Um(n,a,i,g,h);if(!w)return null;var C=0,T=0;return w.map(function(A,x){T+=Math.abs(A.horizontal),C+=Math.abs(A.vertical);var I=Gt(Je(s,A.pos,y),[f,c]),B=A.vertical?C<=m[1]:T<=m[0];return t.createElement("div",{key:"borderRadiusControl"+x,className:Ht("control","border-radius"),"data-radius-index":x,style:{display:B?"block":"none",transform:"translate("+I[0]+"px, "+I[1]+"px) scale("+b+")"}})})},dragControlCondition:function(e,t){if(!t.inputEvent||t.isRequest)return!1;var r=t.inputEvent.target.getAttribute("class")||"";return r.indexOf("border-radius")>-1||r.indexOf("moveable-line")>-1&&r.indexOf("moveable-direction")>-1},dragControlStart:function(e,t){var r=t.inputEvent,n=t.datas,a=r.target,i=a.getAttribute("class")||"",s=i.indexOf("border-radius")>-1,u=i.indexOf("moveable-line")>-1&&i.indexOf("moveable-direction")>-1,f=s?parseInt(a.getAttribute("data-radius-index"),10):-1,c=u?parseInt(a.getAttribute("data-line-index"),10):-1;if(!s&&!u)return!1;var h=Et(e,"onRoundStart",Zt(e,t,{}));if(h===!1)return!1;n.lineIndex=c,n.controlIndex=f,n.isControl=s,n.isLine=u,ii(e,t);var p=e.props,v=p.roundRelative,g=p.minRoundControls,_=g===void 0?[0,0]:g,m=e.state,b=m.target,y=m.width,w=m.height;n.isRound=!0,n.prevDist=[0,0];var C=Um(b,y,w,_)||[];return n.controlPoses=C,m.borderRadiusState=wv(C.map(function(T){return T.pos}),C,v,y,w).styles.join(" "),!0},dragControl:function(e,t){var r=t.datas;if(!r.isRound||!r.isControl||!r.controlPoses.length)return!1;var n=r.controlIndex,a=r.controlPoses,i=On(t),s=i[0],u=i[1],f=[s,u],c=Gt(f,r.prevDist),h=e.props.maxRoundControls,p=h===void 0?[4,4]:h,v=e.state,g=v.width,_=v.height,m=a[n],b=m.vertical,y=m.horizontal,w=a.map(function(T){var A=T.horizontal,x=T.vertical,I=[A*y*f[0],x*b*f[1]];if(A){if(p[0]===1)return I;if(p[0]<4&&A!==y)return I}else{if(p[1]===0)return I[1]=x*y*f[0]/g*_,I;if(b){if(p[1]===1)return I;if(p[1]<4&&x!==b)return I}}return[0,0]});w[n]=f;var C=a.map(function(T,A){return Vt(T.pos,w[A])});return r.prevDist=[s,u],km(e,t,f,c,a,C),!0},dragControlEnd:function(e,t){var r=e.state;r.borderRadiusState="";var n=t.datas,a=t.isDouble;if(!n.isRound)return!1;var i=r.width,s=r.height,u=n.isControl,f=n.controlIndex,c=n.isLine,h=n.lineIndex,p=n.controlPoses,v=p.map(function(C){return C.pos}),g=v.length,_=e.props.roundClickable,m=_===void 0?!0:_;if(a&&m){if(u)Rw(p,v,f,0);else if(c){var b=fw(e,t),y=b[0],w=b[1];Pft(p,v,h,y,w,i,s)}g!==p.length&&km(e,t,[0,0],[0,0],p,v)}return Et(e,"onRoundEnd",Pr(e,t,{})),r.borderRadiusState="",!0},unset:function(e){e.state.borderRadiusState=""}};function Ift(e,t){var r=t?"matrix3d("+Pe(4):"matrix("+Pe(3)+")";return e===r||e==="matrix(1,0,0,1,0,0)"}var Fw={isPinch:!0,name:"beforeRenderable",props:{},events:{onBeforeRenderStart:"beforeRenderStart",onBeforeRender:"beforeRender",onBeforeRenderEnd:"beforeRenderEnd",onBeforeRenderGroupStart:"beforeRenderGroupStart",onBeforeRenderGroup:"beforeRenderGroup",onBeforeRenderGroupEnd:"beforeRenderGroupEnd"},dragRelation:"weak",setTransform:function(e,t){var r=e.state,n=r.is3d,a=r.target,i=r.targetMatrix,s=a==null?void 0:a.style.transform,u=n?"matrix3d("+i.join(",")+")":"matrix("+ky(i,!0)+")",f=!s||s==="none"?u:s;t.datas.startTransforms=Ift(f,n)?[]:da(f)},resetTransform:function(e){e.datas.nextTransforms=e.datas.startTransforms,e.datas.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return Zt(e,t,{setTransform:function(r){t.datas.startTransforms=ni(r)?r:da(r)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),Et(e,"onBeforeRenderStart",this.fillDragStartParams(e,t))},drag:function(e,t){this.resetTransform(t),Et(e,"onBeforeRender",Zt(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){Et(e,"onBeforeRenderEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var r=this;this.dragStart(e,t);var n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.setTransform(f,s),r.fillDragStartParams(f,s)});Et(e,"onBeforeRenderGroupStart",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:i}))},dragGroup:function(e,t){var r=this;this.drag(e,t);var n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.resetTransform(s),r.fillDragParams(f,s)});Et(e,"onBeforeRenderGroup",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:i}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),Et(e,"onBeforeRenderGroupEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},zw={name:"renderable",props:{},events:{onRenderStart:"renderStart",onRender:"render",onRenderEnd:"renderEnd",onRenderGroupStart:"renderGroupStart",onRenderGroup:"renderGroup",onRenderGroupEnd:"renderGroupEnd"},dragRelation:"weak",dragStart:function(e,t){Et(e,"onRenderStart",Zt(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){Et(e,"onRender",this.fillDragParams(e,t))},dragAfter:function(e,t){if(t.resultCount)return this.drag(e,t)},dragEnd:function(e,t){Et(e,"onRenderEnd",this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){Et(e,"onRenderGroupStart",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var r=this,n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragParams(f,s)});Et(e,"onRenderGroup",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,transform:Em(t),events:i}))},dragGroupEnd:function(e,t){var r=this,n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragEndParams(f,s)});Et(e,"onRenderGroupEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:i}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch,transform:Em(t)})},fillDragEndParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag})}};function Ns(e,t,r,n,a,i,s){var u=a==="Start",f=e.state.target,c=i.isRequest;if(!f||u&&n.indexOf("Control")>-1&&!c&&e.areaElement===i.inputEvent.target)return!1;var h=""+r+n+a,p=""+r+n+"Condition",v=a==="End",g=a==="After",_=u&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());_&&e.updateRect(a,!0,!1),a===""&&!c&&ow(e.state,i);var m=Rt([],e[t]);if(c){var b=i.requestAble;m.some(function(P){return P.name===b})||m.push.apply(m,e.props.ables.filter(function(P){return P.name===b}))}if(!m.length)return!1;var y=Rt(Rt([Fw],m),[zw]).filter(function(P){return P[h]}),w=i.datas;_&&y.forEach(function(P){P.unset&&P.unset(e)});var C=i.inputEvent,T;v&&C&&(T=document.elementFromPoint(i.clientX,i.clientY)||C.target);var A=0,x=y.filter(function(P){var L=P.name,G=w[L]||(w[L]={});if(u&&(G.isEventStart=!P[p]||P[p](e,i)),G.isEventStart){var K=P[h](e,Q(Q({},i),{resultCount:A,datas:G,originalDatas:w,inputTarget:T}));return u&&K===!1&&(G.isEventStart=!1),A+=K?1:0,K}return!1}),I=x.length,B=!1;return u&&y.length&&!I&&(B=y.filter(function(P){var L=P.name,G=w[L];return G.isEventStart?P.dragRelation==="strong"?(G.isEventStart=!1,!1):!0:!1}).length===0),(v||B)&&(e.state.gesto=null,e.moveables&&e.moveables.forEach(function(P){P.state.gesto=null})),_&&B&&y.forEach(function(P){P.unset&&P.unset(e)}),u&&!c&&I&&(i==null||i.preventDefault()),e.isUnmounted||B?!1:((!u&&I&&!s||v)&&(e.updateRect(v?a:"",!0,!1),e.forceUpdate()),!u&&!v&&!g&&I&&!s&&Ns(e,t,r,n,a+"After",i),!0)}function Gw(e,t,r){var n=e.controlBox.getElement(),a=[];a.push(n),(!e.props.dragArea||e.props.dragTarget)&&a.push(t);var i=function(s){var u=s.inputEvent.target,f=e.areaElement;return u===f||!e.isMoveableElement(u)&&!e.controlBox.getElement().contains(u)||tn(u,"moveable-area")||tn(u,"moveable-padding")};return Ev(e,a,"targetAbles",r,{dragStart:i,pinchStart:i})}function Ev(e,t,r,n,a){a===void 0&&(a={});var i=e.props,s=i.pinchOutside,u=i.pinchThreshold,f={preventDefault:!1,container:window,pinchThreshold:u,pinchOutside:s},c=new Aot(t,f);return["drag","pinch"].forEach(function(h){["Start","","End"].forEach(function(p){c.on(""+h+p,function(v){var g=v.eventType;if(a[g]&&!a[g](v)){v.stop();return}var _=Ns(e,r,h,n,p,v);_||v.stop()})})}),c}var Dft=function(){function e(r,n,a){var i=this;this.target=r,this.moveable=n,this.eventName=a,this.ables=[],this.onEvent=function(s){var u=i.eventName,f=i.moveable;f.state.disableNativeEvent||i.ables.forEach(function(c){c[u](f,{inputEvent:s})})},this.target.addEventListener(this.eventName.toLowerCase(),this.onEvent)}var t=e.prototype;return t.setAbles=function(r){this.ables=r},t.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this.onEvent),this.target=null,this.moveable=null},e}(),Gi=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state=Q({container:null,gesto:null,renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1},Ah(null)),n.enabledAbles=[],n.targetAbles=[],n.controlAbles=[],n.rotation=0,n.scale=[1,1],n.isUnmounted=!1,n.events={mouseEnter:null,mouseLeave:null},n._prevTarget=null,n._prevDragArea=!1,n._observer=null,n._observerId=0,n.onPreventClick=function(a){a.stopPropagation(),hr(window,"click",n.onPreventClick,!0)},n.checkUpdateRect=function(){if(!n.isDragging()){var a=n.props.parentMoveable;if(a){a.checkUpdateRect();return}Sst(n._observerId),n._observerId=rv(function(){n.isDragging()||n.updateRect()})}},n}var r=t.prototype;return r.render=function(){var n=this.props,a=this.state,i=n.parentPosition,s=n.className,u=n.target,f=n.zoom,c=n.cspNonce,h=n.translateZ,p=n.cssStyled,v=n.portalContainer;this.checkUpdate(),this.updateRenderPoses();var g=i||{left:0,top:0},_=g.left,m=g.top,b=a.left,y=a.top,w=a.target,C=a.direction,T=n.targets,A=(T&&T.length||u)&&w,x=this.isDragging(),I={};return this.getEnabledAbles().forEach(function(B){I["data-able-"+B.name.toLowerCase()]=!0}),Ur(p,Q({cspNonce:c,ref:pn(this,"controlBox"),className:Ht("control-box",C===-1?"reverse":"",x?"dragging":"")+" "+s},I,{onClick:this.onPreventClick,portalContainer:v,style:{position:"absolute",display:A?"block":"none",transform:"translate3d("+(b-_)+"px, "+(y-m)+"px, "+h+")","--zoom":f,"--zoompx":f+"px"}}),this.renderAbles(),this._renderLines())},r.componentDidMount=function(){this.controlBox.getElement();var n=this.props,a=n.parentMoveable,i=n.container,s=n.wrapperMoveable;this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),!i&&!a&&!s&&this.updateRect("",!1,!0),this.updateCheckInput(),this._updateObserver(this.props)},r.componentDidUpdate=function(n){this._updateNativeEvents(),this._updateEvents(),this._updateTargets(),this.updateCheckInput(),this._updateObserver(n)},r.componentWillUnmount=function(){this.isUnmounted=!0,Pi(this,"targetGesto"),Pi(this,"controlGesto");var n=this.events;for(var a in n){var i=n[a];i&&i.destroy()}},r.getContainer=function(){var n=this.props,a=n.parentMoveable,i=n.wrapperMoveable,s=n.container;return s||i&&i.getContainer()||a&&a.getContainer()||this.controlBox.getElement().parentElement},r.isMoveableElement=function(n){return n&&(n.getAttribute("class")||"").indexOf(lv)>-1},r.dragStart=function(n){return this.targetGesto&&this.targetGesto.triggerDragStart(n),this},r.hitTest=function(n){var a=this.state,i=a.target,s=a.pos1,u=a.pos2,f=a.pos3,c=a.pos4,h=a.targetClientRect;if(!i)return 0;var p;if(n instanceof Element){var v=n.getBoundingClientRect();p={left:v.left,top:v.top,width:v.width,height:v.height}}else p=Q({width:0,height:0},n);var g=p.left,_=p.top,m=p.width,b=p.height,y=gm([s,u,c,f],h),w=dot(y,[[g,_],[g+m,_],[g+m,_+b],[g,_+b]]),C=Ky(y);return!w||!C?0:Math.min(100,w/C*100)},r.isInside=function(n,a){var i=this.state,s=i.target,u=i.pos1,f=i.pos2,c=i.pos3,h=i.pos4,p=i.targetClientRect;return s?dh([n,a],gm([u,f,h,c],p)):!1},r.updateRect=function(n,a,i){i===void 0&&(i=!0);var s=this.props,u=s.parentMoveable,f=this.state,c=f.target||this.props.target,h=this.getContainer(),p=u?u.props.rootContainer:s.rootContainer;this.updateState(Ah(this.controlBox&&this.controlBox.getElement(),c,h,h,p||h),u?!1:i)},r.isDragging=function(){return(this.targetGesto?this.targetGesto.isFlag():!1)||(this.controlGesto?this.controlGesto.isFlag():!1)},r.updateTarget=function(n){this.updateRect(n,!0)},r.getRect=function(){var n=this.state,a=Cn(this.state),i=a[0],s=a[1],u=a[2],f=a[3],c=kr(a),h=n.width,p=n.height,v=c.width,g=c.height,_=c.left,m=c.top,b=[n.left,n.top],y=Vt(b,n.origin),w=Vt(b,n.beforeOrigin),C=n.transformOrigin;return{width:v,height:g,left:_,top:m,pos1:i,pos2:s,pos3:u,pos4:f,offsetWidth:h,offsetHeight:p,beforeOrigin:w,origin:y,transformOrigin:C,rotation:this.getRotation()}},r.getManager=function(){return this},r.getRotation=function(){var n=this.state,a=n.pos1,i=n.pos2,s=n.direction;return vut(a,i,s)},r.request=function(n,a,i){a===void 0&&(a={});var s=this.props,u=s.ables,f=s.groupable,c=u.filter(function(b){return b.name===n})[0];if(this.isDragging()||!c||!c.request)return{request:function(){return this},requestEnd:function(){return this}};var h=this,p=c.request(this),v=i||a.isInstant,g=p.isControl?"controlAbles":"targetAbles",_=(f?"Group":"")+(p.isControl?"Control":""),m={request:function(b){return Ns(h,g,"drag",_,"",Q(Q({},p.request(b)),{requestAble:n,isRequest:!0}),v),this},requestEnd:function(){return Ns(h,g,"drag",_,"End",Q(Q({},p.requestEnd()),{requestAble:n,isRequest:!0}),v),this}};return Ns(h,g,"drag",_,"Start",Q(Q({},p.requestStart(a)),{requestAble:n,isRequest:!0}),v),v?m.request(a).requestEnd():m},r.destroy=function(){this.componentWillUnmount()},r.updateRenderPoses=function(){var n=this.state,a=this.props,i=n.originalBeforeOrigin,s=n.transformOrigin,u=n.allMatrix,f=n.is3d,c=n.pos1,h=n.pos2,p=n.pos3,v=n.pos4,g=n.left,_=n.top,m=a.padding||{},b=m.left,y=b===void 0?0:b,w=m.top,C=w===void 0?0:w,T=m.bottom,A=T===void 0?0:T,x=m.right,I=x===void 0?0:x,B=f?4:3,P=a.groupable?i:Vt(i,[g,_]);n.renderPoses=[Vt(c,yu(u,[-y,-C],s,P,B)),Vt(h,yu(u,[I,-C],s,P,B)),Vt(p,yu(u,[-y,A],s,P,B)),Vt(v,yu(u,[I,A],s,P,B))]},r.checkUpdate=function(){var n=this.props,a=n.target,i=n.container,s=n.parentMoveable,u=this.state,f=u.target,c=u.container;if(!(!f&&!a)){this.updateAbles();var h=!Th(f,a)||!Th(c,i);if(!!h){var p=i||this.controlBox;p&&this.unsetAbles(),this.updateState({target:a,container:i}),!s&&p&&this.updateRect("End",!1,!1)}}},r.triggerEvent=function(n,a){var i=this.props[n];return i&&i(a)},r.useCSS=function(n,a){var i=this.props.customStyledMap,s=n+a;return i[s]||(i[s]=Zy(n,a)),i[s]},r.unsetAbles=function(){var n=this;this.targetAbles.forEach(function(a){a.unset&&a.unset(n)})},r.updateAbles=function(n,a){n===void 0&&(n=this.props.ables),a===void 0&&(a="");var i=this.props,s=i.triggerAblesSimultaneously,u=n.filter(function(g){return g&&(g.always&&i[g.name]!==!1||i[g.name])}),f="drag"+a+"Start",c="pinch"+a+"Start",h="drag"+a+"ControlStart",p=bu(u,[f,c],s),v=bu(u,[h],s);this.enabledAbles=u,this.targetAbles=p,this.controlAbles=v},r.updateState=function(n,a){if(a)this.setState(n);else{var i=this.state;for(var s in n)i[s]=n[s]}},r.getEnabledAbles=function(){var n=this.props,a=n.ables;return a.filter(function(i){return i&&n[i.name]})},r.renderAbles=function(){var n=this,a=this.props,i=a.triggerAblesSimultaneously,s={createElement:Ur};return out(uut(bu(this.getEnabledAbles(),["render"],i).map(function(u){var f=u.render;return f(n,s)||[]})).filter(function(u){return u}),function(u){var f=u.key;return f}).map(function(u){return u[0]})},r.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},r._updateObserver=function(n){var a,i=this.props,s=i.target;if(!window.ResizeObserver||!s||!i.useResizeObserver){(a=this._observer)===null||a===void 0||a.disconnect();return}if(!(n.target===s&&this._observer)){var u=new ResizeObserver(this.checkUpdateRect);u.observe(s,{box:"border-box"}),this._observer=u}},r._updateEvents=function(){var n=this.controlBox.getElement(),a=this.targetAbles.length,i=this.controlAbles.length,s=this.props,u=s.dragTarget||s.target,f=!a&&this.targetGesto||this._isTargetChanged(!0);f&&(Pi(this,"targetGesto"),this.updateState({gesto:null})),i||Pi(this,"controlGesto"),u&&a&&!this.targetGesto&&(this.targetGesto=Gw(this,u,"")),!this.controlGesto&&i&&(this.controlGesto=Ev(this,n,"controlAbles","Control"))},r._updateTargets=function(){var n=this.props;this._prevTarget=n.dragTarget||n.target,this._prevDragArea=n.dragArea},r._renderLines=function(){var n=this.props,a=n.edge,i=n.zoom,s=n.hideDefaultLines;if(s)return[];var u=this.state.renderPoses,f={createElement:Ur};return[Ii(f,a?"n":"",u[0],u[1],i,0),Ii(f,a?"e":"",u[1],u[3],i,1),Ii(f,a?"w":"",u[0],u[2],i,2),Ii(f,a?"s":"",u[2],u[3],i,3)]},r._isTargetChanged=function(n){var a=this.props,i=a.dragTarget||a.target,s=this._prevTarget,u=this._prevDragArea,f=a.dragArea,c=!f&&s!==i,h=(n||f)&&u!==f;return c||h},r._updateNativeEvents=function(){var n=this,a=this.props,i=a.dragArea?this.areaElement:this.state.target,s=this.events,u=Iy(s);if(this._isTargetChanged())for(var f in s){var c=s[f];c&&c.destroy(),s[f]=null}if(!!i){var h=this.enabledAbles;u.forEach(function(p){var v=bu(h,[p]),g=v.length>0,_=s[p];if(!g){_&&(_.destroy(),s[p]=null);return}_||(_=new Dft(i,n,p),s[p]=_),_.setAbles(v)})}},t.defaultProps={target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,edge:!1,parentMoveable:null,wrapperMoveable:null,parentPosition:null,portalContainer:null,useResizeObserver:!1,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{}},t}(sv),Cv={name:"groupable",props:{defaultGroupRotate:Number,defaultGroupOrigin:String,groupable:Boolean},events:{},render:function(e,t){var r=e.props.targets||[];e.moveables=[];var n=e.state,a=n.left,i=n.top,s={left:a,top:i},u=e.props;return r.map(function(f,c){return t.createElement(Gi,{key:"moveable"+c,ref:Cy(e,"moveables",c),target:f,origin:!1,cssStyled:u.cssStyled,customStyledMap:u.customStyledMap,useResizeObserver:u.useResizeObserver,parentMoveable:e,parentPosition:s})})}},Rft=yo("clickable",{props:{clickable:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},always:!0,dragRelation:"weak",dragStart:function(e,t){t.isRequest||Jr(window,"click",e.onPreventClick,!0)},dragControlStart:function(e,t){this.dragStart(e,t)},dragGroupStart:function(e,t){this.dragStart(e,t),t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){this.endEvent(e);var r=e.state.target,n=t.inputEvent,a=t.inputTarget,i=e.isMoveableElement(a),s=!i&&e.controlBox.getElement().contains(a);if((!t.isDrag||s)&&this.unset(e),!(!n||!a||t.isDrag||e.isMoveableElement(a)||s)){var u=r.contains(a);Et(e,"onClick",Zt(e,t,{isDouble:t.isDouble,inputTarget:a,isTarget:r===a,containsTarget:u}))}},dragGroupEnd:function(e,t){this.endEvent(e);var r=t.inputEvent,n=t.inputTarget;if(!(!r||!n||t.isDrag||e.isMoveableElement(n)||t.datas.inputTarget===n)){var a=e.props.targets,i=a.indexOf(n),s=i>-1,u=!1;i===-1&&(i=nn(a,function(f){return f.contains(n)}),u=i>-1),Et(e,"onClickGroup",Zt(e,t,{isDouble:t.isDouble,targets:a,inputTarget:n,targetIndex:i,isTarget:s,containsTarget:u}))}},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)},endEvent:function(e){var t=this;rv(function(){t.unset(e)})},unset:function(e){hr(window,"click",e.onPreventClick,!0)}});function Si(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),Q(Q({},e),{datas:t})}var Bft=yo("edgeDraggable",{dragControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return tn(r,Ht("direction"))&&tn(r,Ht("line"))},dragControlStart:function(e,t){return ir.dragStart(e,Si(t))},dragControl:function(e,t){return ir.drag(e,Si(t))},dragControlEnd:function(e,t){return ir.dragEnd(e,Si(t))},dragGroupControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return tn(r,Ht("direction"))&&tn(r,Ht("line"))},dragGroupControlStart:function(e,t){return ir.dragGroupStart(e,Si(t))},dragGroupControl:function(e,t){return ir.dragGroup(e,Si(t))},dragGroupControlEnd:function(e,t){return ir.dragGroupEnd(e,Si(t))},unset:function(e){return ir.unset(e)}}),Nw={name:"individualGroupable",props:{individualGroupable:Boolean},events:{}},Ov=[Fw,xw,lft,dut,ir,Bft,hft,pft,vft,gft,bft,yft,mft,Mft,Tft,xft,Cv,Nw,Rft,Pw,zw],Lft=Ov.reduce(function(e,t){return Q(Q({},e),"events"in t?t.events:{})},{}),Fft=Ov.reduce(function(e,t){return Q(Q({},e),t.props)},{}),zft=lut(Lft),Gft=Object.keys(zft),Nft=Object.keys(Fft);function Eu(e,t){return Math.max.apply(Math,e.map(function(r){var n=r[0],a=r[1],i=r[2],s=r[3];return Math.max(n[t],a[t],i[t],s[t])}))}function Cu(e,t){return Math.min.apply(Math,e.map(function(r){var n=r[0],a=r[1],i=r[2],s=r[3];return Math.min(n[t],a[t],i[t],s[t])}))}function jft(e,t){if(!e.length)return[0,0,0,0];var r=e.map(function(m){var b=m.state;return Cn(b)}),n=Ds,a=Ds,i=0,s=0,u=re(t,Mr);if(u%90){var f=u/180*Math.PI,c=Math.tan(f),h=-1/c,p=[bm,Ds],v=[bm,Ds];r.forEach(function(m){m.forEach(function(b){var y=b[1]-c*b[0],w=b[1]-h*b[0];p[0]=Math.max(p[0],y),p[1]=Math.min(p[1],y),v[0]=Math.max(v[0],w),v[1]=Math.min(v[1],w)})}),p.forEach(function(m){v.forEach(function(b){var y=(b-m)/(c-h),w=c*y+m;n=Math.min(n,y),a=Math.min(a,w)})});var g=r.map(function(m){var b=m[0],y=m[1],w=m[2],C=m[3];return[ua(b,-f),ua(y,-f),ua(w,-f),ua(C,-f)]});i=Eu(g,0)-Cu(g,0),s=Eu(g,1)-Cu(g,1)}else if(n=Cu(r,0),a=Cu(r,1),i=Eu(r,0)-n,s=Eu(r,1)-a,u%180){var _=i;i=s,s=_}return[n,a,i,s]}var qft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.differ=new hot,n.moveables=[],n.transformOrigin="50% 50%",n}var r=t.prototype;return r.checkUpdate=function(){this.updateAbles()},r.updateRect=function(n,a,i){if(i===void 0&&(i=!0),!!this.controlBox){this.moveables.forEach(function(at){at.updateRect(n,!1,!1)});var s=this.state,u=this.props,f=s.target||u.target;(!a||n!==""&&u.updateGroup)&&(this.rotation=u.defaultGroupRotate,this.transformOrigin=u.defaultGroupOrigin||"50% 50%",this.scale=[1,1]);var c=this.rotation,h=this.scale,p=jft(this.moveables,c),v=p[0],g=p[1],_=p[2],m=p[3],b="rotate("+c+"deg) scale("+(h[0]>=0?1:-1)+", "+(h[1]>=0?1:-1)+")";f.style.cssText+="left:0px;top:0px; transform-origin: "+this.transformOrigin+"; width:"+_+"px; height:"+m+"px;"+("transform:"+b),s.width=_,s.height=m;var y=this.getContainer(),w=Ah(this.controlBox.getElement(),f,this.controlBox.getElement(),this.getContainer(),this.props.rootContainer||y),C=[w.left,w.top],T=Cn(w),A=T[0],x=T[1],I=T[2],B=T[3],P=Cf([A,x,I,B]),L=[P.minX,P.minY];w.pos1=Gt(A,L),w.pos2=Gt(x,L),w.pos3=Gt(I,L),w.pos4=Gt(B,L),w.left=v-w.left+L[0],w.top=g-w.top+L[1],w.origin=Gt(Vt(C,w.origin),L),w.beforeOrigin=Gt(Vt(C,w.beforeOrigin),L),w.originalBeforeOrigin=Vt(C,w.originalBeforeOrigin);var G=w.targetClientRect,K=h[0]*h[1]>0?1:-1;G.top+=w.top-s.top,G.left+=w.left-s.left,f.style.transform="translate("+-L[0]+"px, "+-L[1]+"px) "+b,this.updateState(Q(Q({},w),{direction:K,beforeDirection:K}),i)}},r.getRect=function(){return Q(Q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},r.triggerEvent=function(n,a,i){if(i||n.indexOf("Group")>-1)return e.prototype.triggerEvent.call(this,n,a)},r.updateAbles=function(){e.prototype.updateAbles.call(this,Rt(Rt([],this.props.ables),[Cv]),"Group")},r._updateTargets=function(){e.prototype._updateTargets.call(this),this._prevTarget=this.props.dragTarget||this.areaElement},r._updateEvents=function(){var n=this.state,a=this.props,i=this._prevTarget,s=a.dragTarget||this.areaElement;i!==s&&(Pi(this,"targetGesto"),Pi(this,"controlGesto"),n.target=null),n.target||(n.target=this.areaElement,this.controlBox.getElement().style.display="block",this.targetGesto=Gw(this,s,"Group"),this.controlGesto=Ev(this,this.controlBox.getElement(),"controlAbles","GroupControl"));var u=!Th(n.container,a.container);u&&(n.container=a.container);var f=this.differ.update(a.targets),c=f.added,h=f.changed,p=f.removed;(u||c.length||h.length||p.length)&&this.updateRect()},r._updateObserver=function(){},t.defaultProps=Q(Q({},Gi.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(Gi),Uft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.moveables=[],n}var r=t.prototype;return r.render=function(){var n=this,a=this.props,i=a.cspNonce,s=a.cssStyled,u=a.targets;return Ur(s,{cspNonce:i,ref:pn(this,"controlBox"),className:Ht("control-box")},u.map(function(f,c){return Ur(Gi,Q({key:"moveable"+c,ref:Cy(n,"moveables",c)},n.props,{target:f,wrapperMoveable:n}))}))},r.componentDidUpdate=function(){},r.updateRect=function(n,a,i){i===void 0&&(i=!0),this.moveables.forEach(function(s){s.updateRect(n,a,i)})},r.getRect=function(){return Q(Q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},r.request=function(){return{request:function(){return this},requestEnd:function(){return this}}},r.dragStart=function(){return this},r.hitTest=function(){return 0},r.isInside=function(){return!1},r.isDragging=function(){return!1},r.updateRenderPoses=function(){},r.checkUpdate=function(){},r.triggerEvent=function(){},r.updateAbles=function(){},r._updateEvents=function(){},r._updateObserver=function(){},t}(Gi),kft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.refTargets=[],n.selectorMap={},n}var r=t.prototype;return t.makeStyled=function(){var n={},a=this.getTotalAbles();a.forEach(function(s){var u=s.css;!u||u.forEach(function(f){n[f]=!0})});var i=Iy(n).join(` +`);this.defaultStyled=Zy("div",ist(lv,qot+i))},t.getTotalAbles=function(){return Rt([xw,Cv,Nw,Pw],this.defaultAbles)},r.render=function(){var n=this.constructor;n.defaultStyled||n.makeStyled();var a=this.props,i=a.ables,s=a.props,u=Fot(a,["ables","props"]),f=this._updateRefs(!0),c=put(f,this.selectorMap),h=c.length>1,p=n.getTotalAbles(),v=Rt(Rt([],p),i||[]),g=Q(Q(Q({},u),s||{}),{ables:v,cssStyled:n.defaultStyled,customStyledMap:n.customStyledMap});return h?u.individualGroupable?Ur(Uft,Q({key:"individual-group",ref:pn(this,"moveable")},g,{target:null,targets:c})):Ur(qft,Q({key:"group",ref:pn(this,"moveable")},g,{target:null,targets:c})):Ur(Gi,Q({key:"single",ref:pn(this,"moveable")},g,{target:c[0]}))},r.componentDidMount=function(){this._updateRefs()},r.componentDidUpdate=function(){this._updateRefs()},r.getManager=function(){return this.moveable},r._updateRefs=function(n){var a=this.refTargets,i=uw(this.props.target||this.props.targets),s=typeof document!="undefined",u=a.length!==i.length||a.some(function(h,p){var v=i[p];return!h&&!v?!1:h!==v}),f=this.selectorMap,c={};return this.refTargets.forEach(function(h){rn(h)&&(!f[h]&&s?(u=!0,c[h]=[].slice.call(document.querySelectorAll(h))):c[h]=f[h])}),this.refTargets=i,this.selectorMap=c,!n&&u&&this.forceUpdate(),i},t.defaultAbles=[],t.customStyledMap={},t.defaultStyled=null,zot([sst(ew)],t.prototype,"moveable",void 0),t}(sv),Hft=function(e){bo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.defaultAbles=Ov,t}(kft);/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Rh=function(e,t){return Rh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},Rh(e,t)};function Av(e,t){Rh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var no=function(){return no=Object.assign||function(t){for(var r,n=1,a=arguments.length;n=0;u--)(s=e[u])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}var Kft=function(e){Av(t,e);function t(n){var a=e.call(this,n)||this;return a.state={},a.state=a.props,a}var r=t.prototype;return r.render=function(){return qst(Ur(Hft,no({ref:pn(this,"moveable")},this.state)),this.state.parentElement)},t}(iv),jw=Nft,qw=ew,Uw=Gft;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Bh=function(){return Bh=Object.assign||function(t){for(var r,n=1,a=arguments.length;n-1&&i.splice(s,1)}}return this},t.once=function(r,n){var a=this;return n&&this._addEvent(r,n,{once:!0}),new Promise(function(i){a._addEvent(r,i,{once:!0})})},t.emit=function(r,n){var a=this;n===void 0&&(n={});var i=this._events[r];if(!r||!i)return!0;var s=!1;return n.eventType=r,n.stop=function(){s=!0},n.currentTarget=this,Yft(i).forEach(function(u){u.listener(n),u.once&&a.off(r,u.listener)}),!s},t.trigger=function(r,n){return n===void 0&&(n={}),this.emit(r,n)},t._addEvent=function(r,n,a){var i=this._events;i[r]=i[r]||[];var s=i[r];s.push(Bh({listener:n},a))},e}(),Vft=function(e){Av(t,e);function t(n,a){a===void 0&&(a={});var i=e.call(this)||this;i.tempElement=document.createElement("div");var s=no({},a),u={};Uw.forEach(function(c){u[xy("on "+c)]=function(h){return i.trigger(c,h)}}),vm(Ur(Kft,no({ref:pn(i,"innerMoveable"),parentElement:n},s,u)),i.tempElement);var f=s.target;return ni(f)&&f.length>1&&i.updateRect(),i}var r=t.prototype;return r.setState=function(n,a){this.innerMoveable.setState(n,a)},r.destroy=function(){vm(null,this.tempElement),this.off(),this.tempElement=null,this.innerMoveable=null},r.getMoveable=function(){return this.innerMoveable.moveable},t=Wft([om(qw,function(n,a){n[a]||(n[a]=function(){for(var i=[],s=0;s{const f=t;a={},jw.forEach(c=>{c in f&&(a[c]=f[c])}),i=a.container||t.container||document.body,s&&DM().then(()=>{s.setState(tc(wi({},a),{container:i,parentElement:i}))})}),xM(()=>{s=new Zft(i||document.body,a),Uw.forEach(f=>{const c=xy(`on ${f}`);s.on(f,h=>{const p=t[c]&&t[c](h),v=n(f,h);return Ha(p)?Ha(v)?void 0:v:p})})}),IM(()=>{s&&s.destroy()});function u(){return s}return e.$$set=f=>{r(5,t=Bt(Bt({},t),Li(f)))},t=Li(t),[u]}class Tc extends Ct{constructor(t){super();Ot(this,t,Jft,null,At,{getInstance:0})}get getInstance(){return this.$$.ctx[0]}}var Qft=(()=>{const e=Tc.prototype;return e&&qw.forEach(t=>{e[t]=function(...r){const n=this.getInstance(),a=n[t](...r);return a===n?this:a}}),Tc})();function tlt(e){let t,r;return t=new Qft({props:{target:e[0],originDraggable:!0,originRelative:!0,draggable:!0,throttleDrag:0,zoom:1,origin:!1,padding:{left:0,top:0,right:0,bottom:0}}}),t.$on("dragOriginStart",e[2]),t.$on("dragOrigin",e[3]),t.$on("dragStart",e[4]),t.$on("drag",e[5]),t.$on("render",e[6]),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&1&&(i.target=n[0]),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function elt(e,t,r){let{target:n}=t,a={translate:[0,0],rotate:0,transformOrigin:"50% 50%"};const i=({detail:h})=>{h.dragStart&&h.dragStart.set(a.translate)},s=({detail:h})=>{r(1,a.translate=h.drag.beforeTranslate,a),r(1,a.transformOrigin=h.transformOrigin,a)},u=({detail:h})=>{h.set(a.translate)},f=({detail:h})=>{r(1,a.translate=h.beforeTranslate,a)},c=({detail:h})=>{const{translate:p,rotate:v,transformOrigin:g}=a;h.target.style.transformOrigin=g,h.target.style.transform=`translate(${p[0]}px, ${p[1]}px) rotate(${v}deg)`};return e.$$set=h=>{"target"in h&&r(0,n=h.target)},[n,a,i,s,u,f,c]}class Tv extends Ct{constructor(t){super();Ot(this,t,elt,tlt,At,{target:0})}}function Hm(e){let t,r,n,a,i,s=e[2]&&Wm(e);return{c(){t=k("img"),n=ht(),s&&s.c(),a=je(),this.h()},l(u){t=H(u,"IMG",{class:!0,src:!0,alt:!0}),n=pt(u),s&&s.l(u),a=je(),this.h()},h(){F(t,"class","ftl svelte-1kuvs8v"),kn(t.src,r=yn+"/icons/ftl-drive.svg")||F(t,"src",r),F(t,"alt","ftl drive")},m(u,f){q(u,t,f),e[6](t),q(u,n,f),s&&s.m(u,f),q(u,a,f),i=!0},p(u,f){u[2]?s?(s.p(u,f),f&4&&W(s,1)):(s=Wm(u),s.c(),W(s,1),s.m(a.parentNode,a)):s&&(pr(),X(s,1,1,()=>{s=null}),vr())},i(u){i||(W(s),i=!0)},o(u){X(s),i=!1},d(u){u&&M(t),e[6](null),u&&M(n),s&&s.d(u),u&&M(a)}}}function Wm(e){let t,r;return t=new Tv({props:{target:e[3]}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&8&&(i.target=n[3]),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Km(e){let t,r,n,a,i,s=e[2]&&Ym(e);return{c(){t=k("div"),r=mt(e[1]),n=ht(),s&&s.c(),a=je(),this.h()},l(u){t=H(u,"DIV",{class:!0,style:!0});var f=V(t);r=$t(f,e[1]),f.forEach(M),n=pt(u),s&&s.l(u),a=je(),this.h()},h(){F(t,"class","thrust svelte-1kuvs8v"),Ln(t,"background-image","url("+yn+"/icons/standard-drive.svg)")},m(u,f){q(u,t,f),j(t,r),e[7](t),q(u,n,f),s&&s.m(u,f),q(u,a,f),i=!0},p(u,f){(!i||f&2)&&er(r,u[1]),u[2]?s?(s.p(u,f),f&4&&W(s,1)):(s=Ym(u),s.c(),W(s,1),s.m(a.parentNode,a)):s&&(pr(),X(s,1,1,()=>{s=null}),vr())},i(u){i||(W(s),i=!0)},o(u){X(s),i=!1},d(u){u&&M(t),e[7](null),u&&M(n),s&&s.d(u),u&&M(a)}}}function Ym(e){let t,r;return t=new Tv({props:{target:e[5]}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&32&&(i.target=n[5]),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Xm(e){let t,r;return t=new Tv({props:{target:e[4]}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&16&&(i.target=n[4]),t.$set(i)},i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function rlt(e){let t,r,n,a,i,s,u,f=e[0]!=="none"&&Hm(e),c=e[1]>0&&Km(e),h=e[2]&&Xm(e);return{c(){t=k("div"),f&&f.c(),r=ht(),c&&c.c(),n=ht(),a=k("img"),s=ht(),h&&h.c(),this.h()},l(p){t=H(p,"DIV",{class:!0});var v=V(t);f&&f.l(v),r=pt(v),c&&c.l(v),n=pt(v),a=H(v,"IMG",{class:!0,src:!0,alt:!0}),s=pt(v),h&&h.l(v),v.forEach(M),this.h()},h(){F(a,"class","internal svelte-1kuvs8v"),kn(a.src,i=yn+"/icons/internal-systems.svg")||F(a,"src",i),F(a,"alt","internal systems"),F(t,"class","main_systems svelte-1kuvs8v")},m(p,v){q(p,t,v),f&&f.m(t,null),j(t,r),c&&c.m(t,null),j(t,n),j(t,a),e[8](a),j(t,s),h&&h.m(t,null),u=!0},p(p,[v]){p[0]!=="none"?f?(f.p(p,v),v&1&&W(f,1)):(f=Hm(p),f.c(),W(f,1),f.m(t,r)):f&&(pr(),X(f,1,1,()=>{f=null}),vr()),p[1]>0?c?(c.p(p,v),v&2&&W(c,1)):(c=Km(p),c.c(),W(c,1),c.m(t,n)):c&&(pr(),X(c,1,1,()=>{c=null}),vr()),p[2]?h?(h.p(p,v),v&4&&W(h,1)):(h=Xm(p),h.c(),W(h,1),h.m(t,null)):h&&(pr(),X(h,1,1,()=>{h=null}),vr())},i(p){u||(W(f),W(c),W(h),u=!0)},o(p){X(f),X(c),X(h),u=!1},d(p){p&&M(t),f&&f.d(),c&&c.d(),e[8](null),h&&h.d()}}}function nlt(e,t,r){let{ftl:n="none"}=t,{engine:a=0}=t,{movable:i=!1}=t,s,u,f;function c(v){Nn[v?"unshift":"push"](()=>{s=v,r(3,s)})}function h(v){Nn[v?"unshift":"push"](()=>{f=v,r(5,f)})}function p(v){Nn[v?"unshift":"push"](()=>{u=v,r(4,u)})}return e.$$set=v=>{"ftl"in v&&r(0,n=v.ftl),"engine"in v&&r(1,a=v.engine),"movable"in v&&r(2,i=v.movable)},[n,a,i,s,u,f,c,h,p]}class alt extends Ct{constructor(t){super();Ot(this,t,nlt,rlt,At,{ftl:0,engine:1,movable:2})}}function Vm(e,t,r){const n=e.slice();return n[7]=t[r],n[9]=r,n}function Zm(e,t,r){const n=e.slice();return n[10]=t[r],n[12]=r,n}function Jm(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){kn(t.src,r=yn+"/icons/crew-star.svg")||F(t,"src",r),F(t,"alt","crew loss threshold"),F(t,"class","svelte-1uhhjap")},m(n,a){q(n,t,a)},p:se,d(n){n&&M(t)}}}function Qm(e,t){let r,n=t[10]&&Jm();return{key:e,first:null,c(){r=k("div"),n&&n.c(),this.h()},l(a){r=H(a,"DIV",{class:!0});var i=V(r);n&&n.l(i),i.forEach(M),this.h()},h(){F(r,"class","cell svelte-1uhhjap"),this.first=r},m(a,i){q(a,r,i),n&&n.m(r,null)},p(a,i){t=a,t[10]?n?n.p(t,i):(n=Jm(),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},d(a){a&&M(r),n&&n.d()}}}function t$(e,t){let r,n=[],a=new Map,i,s=t[7];const u=f=>f[12];for(let f=0;fs[9];for(let s=0;s{"shipMass"in h&&r(1,n=h.shipMass),"rating"in h&&r(2,a=h.rating),"advanced"in h&&r(3,i=h.advanced)},e.$$.update=()=>{e.$$.dirty&8&&r(4,s=i?3:4),e.$$.dirty&4&&r(5,u=Array(a).fill(!1)),e.$$.dirty&2&&r(6,f=Math.ceil(n/20)),e.$$.dirty&96&&r(5,u=Lh(u,f).map(h=>(h[h.length-1]=!0,h)).flat()),e.$$.dirty&48&&r(0,c=Lh(u,s))},[c,n,a,i,s,u,f]}class olt extends Ct{constructor(t){super();Ot(this,t,slt,ilt,At,{shipMass:1,rating:2,advanced:3})}}function e$(e,t,r){const n=e.slice();return n[1]=t[r],n[3]=r,n}function r$(e,t,r){const n=e.slice();return n[4]=t[r],n}function n$(e){let t;return{c(){t=k("div"),this.h()},l(r){t=H(r,"DIV",{class:!0}),V(t).forEach(M),this.h()},h(){F(t,"class","cell svelte-86wmvt")},m(r,n){q(r,t,n)},d(r){r&&M(t)}}}function a$(e,t){let r,n,a=Array.from({length:t[1]}),i=[];for(let s=0;ss[3];for(let s=0;s{"armor"in a&&r(0,n=a.armor)},[n]}class llt extends Ct{constructor(t){super();Ot(this,t,flt,ult,At,{armor:0})}}function clt(e){let t,r,n,a,i;return r=new llt({props:{armour:e[0].armour}}),a=new olt({props:{rating:e[0].hull.rating,advanced:e[0].hull.advanced,ship_mass:e[1]}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),st(a.$$.fragment)},l(s){t=H(s,"DIV",{});var u=V(t);ft(r.$$.fragment,u),n=pt(u),ft(a.$$.fragment,u),u.forEach(M)},m(s,u){q(s,t,u),ot(r,t,null),j(t,n),ot(a,t,null),i=!0},p(s,[u]){const f={};u&1&&(f.armour=s[0].armour),r.$set(f);const c={};u&1&&(c.rating=s[0].hull.rating),u&1&&(c.advanced=s[0].hull.advanced),u&2&&(c.ship_mass=s[1]),a.$set(c)},i(s){i||(W(r.$$.fragment,s),W(a.$$.fragment,s),i=!0)},o(s){X(r.$$.fragment,s),X(a.$$.fragment,s),i=!1},d(s){s&&M(t),ut(r),ut(a)}}}function hlt(e,t,r){let{structure:n={}}=t,{ship_mass:a=0}=t;return e.$$set=i=>{"structure"in i&&r(0,n=i.structure),"ship_mass"in i&&r(1,a=i.ship_mass)},[n,a]}class plt extends Ct{constructor(t){super();Ot(this,t,hlt,clt,At,{structure:0,ship_mass:1})}}function vlt(e){let t,r;return{c(){t=Fn("text"),r=mt(e[0]),this.h()},l(n){t=zn(n,"text",{x:!0,y:!0,class:!0});var a=V(t);r=$t(a,e[0]),a.forEach(M),this.h()},h(){F(t,"x","50%"),F(t,"y","50%"),F(t,"class","svelte-1u8rlr5")},m(n,a){q(n,t,a),j(t,r)},p(n,a){a&1&&er(r,n[0])},d(n){n&&M(t)}}}function dlt(e){let t,r,n;return r=new Sf({props:{selected:e[1],size:"40",$$slots:{default:[vlt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),this.h()},l(a){t=H(a,"DIV",{class:!0});var i=V(t);ft(r.$$.fragment,i),i.forEach(M),this.h()},h(){F(t,"class","svelte-1u8rlr5")},m(a,i){q(a,t,i),ot(r,t,null),n=!0},p(a,[i]){const s={};i&2&&(s.selected=a[1]),i&5&&(s.$$scope={dirty:i,ctx:a}),r.$set(s)},i(a){n||(W(r.$$.fragment,a),n=!0)},o(a){X(r.$$.fragment,a),n=!1},d(a){a&&M(t),ut(r)}}}function glt(e,t,r){let{weaponClass:n=1}=t,{arcs:a=[]}=t;return e.$$set=i=>{"weaponClass"in i&&r(0,n=i.weaponClass),"arcs"in i&&r(1,a=i.arcs)},[n,a]}class _lt extends Ct{constructor(t){super();Ot(this,t,glt,dlt,At,{weaponClass:0,arcs:1})}}function i$(e,t,r){const n=e.slice();return n[2]=t[r],n}function s$(e){let t,r;const n=[e[2]];let a={};for(let i=0;iX(i[u],1,1,()=>{i[u]=null});return{c(){t=k("div"),r=k("div");for(let u=0;u{"weapons"in i&&r(1,n=i.weapons)},e.$$.update=()=>{e.$$.dirty&2&&r(0,a=n.filter(({type:i})=>i==="beam"))},[a,n]}class blt extends Ct{constructor(t){super();Ot(this,t,$lt,mlt,At,{weapons:1})}}function Di(e,t){return t===void 0&&(t=e,e=0),Array.from({length:1+t-e}).map((r,n)=>n+e)}function o$(e,t,r){const n=e.slice();return n[1]=t[r],n}function u$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){F(t,"class","firecon svelte-d2fjdl"),kn(t.src,r=yn+"/icons/firecon.svg")||F(t,"src",r),F(t,"alt","firecon")},m(n,a){q(n,t,a)},p:se,d(n){n&&M(t)}}}function ylt(e){let t,r=Di(1,e[0]),n=[];for(let a=0;a{"firecons"in a&&r(0,n=a.firecons)},[n]}class Slt extends Ct{constructor(t){super();Ot(this,t,wlt,ylt,At,{firecons:0})}}function f$(e,t,r){const n=e.slice();return n[2]=t[r],n}function l$(e,t,r){const n=e.slice();return n[2]=t[r],n}function c$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){kn(t.src,r=yn+"/icons/screen.svg")||F(t,"src",r),F(t,"alt","screen"),F(t,"class","svelte-kh7po5")},m(n,a){q(n,t,a)},p:se,d(n){n&&M(t)}}}function h$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){kn(t.src,r=yn+"/icons/screen-advanced.svg")||F(t,"src",r),F(t,"alt","advanced screen"),F(t,"class","svelte-kh7po5")},m(n,a){q(n,t,a)},p:se,d(n){n&&M(t)}}}function Elt(e){let t,r,n=Di(1,e[0]),a=[];for(let u=0;u{"standard"in i&&r(0,n=i.standard),"advanced"in i&&r(1,a=i.advanced)},[n,a]}class Olt extends Ct{constructor(t){super();Ot(this,t,Clt,Elt,At,{standard:0,advanced:1})}}function Alt(e){let t,r,n,a,i;r=new Slt({props:{firecons:e[0]}});const s=[e[1]];let u={};for(let f=0;f{"firecons"in i&&r(0,n=i.firecons),"screens"in i&&r(1,a=i.screens)},[n,a]}class Mlt extends Ct{constructor(t){super();Ot(this,t,Tlt,Alt,At,{firecons:0,screens:1})}}function Plt(e){var L,G,K,at,et,rt,gt;let t,r,n,a,i,s,u,f,c,h,p,v,g,_,m,b,y,w,C,T,A,x,I,B,P;return h=new nst({props:{shipClass:e[0].identification.shipClass,shipType:e[0].identification.shipType,cost:(L=e[0].reqs)==null?void 0:L.cost,mass:(G=e[0].reqs)==null?void 0:G.mass}}),g=new plt({props:{structure:e[0].structure,shipMass:e[0].identification.mass}}),m=new Mlt({props:{firecons:e[0].weaponry.firecons.nbr,screens:e[0].structure.screens}}),y=new blt({props:{weapons:e[0].weaponry.weapons}}),C=new alt({props:{movable:e[1],ftl:(at=(K=e[0])==null?void 0:K.propulsion)==null?void 0:at.ftl,engine:(gt=(rt=(et=e[0])==null?void 0:et.propulsion)==null?void 0:rt.drive)==null?void 0:gt.rating}}),{c(){t=k("div"),r=k("label"),n=k("input"),a=mt(" enable wiggletron ("),i=k("i"),s=mt("alpha feature"),u=mt(")"),f=ht(),c=k("div"),st(h.$$.fragment),p=ht(),v=k("div"),st(g.$$.fragment),_=ht(),st(m.$$.fragment),b=ht(),st(y.$$.fragment),w=ht(),st(C.$$.fragment),T=ht(),A=k("div"),x=mt("Printing this page will only prints the ship sheet."),this.h()},l(Z){t=H(Z,"DIV",{class:!0});var it=V(t);r=H(it,"LABEL",{});var ct=V(r);n=H(ct,"INPUT",{type:!0}),a=$t(ct," enable wiggletron ("),i=H(ct,"I",{});var lt=V(i);s=$t(lt,"alpha feature"),lt.forEach(M),u=$t(ct,")"),ct.forEach(M),it.forEach(M),f=pt(Z),c=H(Z,"DIV",{class:!0});var dt=V(c);ft(h.$$.fragment,dt),p=pt(dt),v=H(dt,"DIV",{class:!0});var Ut=V(v);ft(g.$$.fragment,Ut),_=pt(Ut),ft(m.$$.fragment,Ut),Ut.forEach(M),b=pt(dt),ft(y.$$.fragment,dt),w=pt(dt),ft(C.$$.fragment,dt),dt.forEach(M),T=pt(Z),A=H(Z,"DIV",{class:!0});var Lt=V(A);x=$t(Lt,"Printing this page will only prints the ship sheet."),Lt.forEach(M),this.h()},h(){F(n,"type","checkbox"),F(t,"class","notice svelte-ow56hf"),F(v,"class","section-2 svelte-ow56hf"),F(c,"class","print-output svelte-ow56hf"),F(A,"class","notice svelte-ow56hf")},m(Z,it){q(Z,t,it),j(t,r),j(r,n),n.checked=e[1],j(r,a),j(r,i),j(i,s),j(r,u),q(Z,f,it),q(Z,c,it),ot(h,c,null),j(c,p),j(c,v),ot(g,v,null),j(v,_),ot(m,v,null),j(c,b),ot(y,c,null),j(c,w),ot(C,c,null),q(Z,T,it),q(Z,A,it),j(A,x),I=!0,B||(P=ae(n,"change",e[2]),B=!0)},p(Z,[it]){var ve,bt,Nt,de,Jt,Tt,Ie;it&2&&(n.checked=Z[1]);const ct={};it&1&&(ct.shipClass=Z[0].identification.shipClass),it&1&&(ct.shipType=Z[0].identification.shipType),it&1&&(ct.cost=(ve=Z[0].reqs)==null?void 0:ve.cost),it&1&&(ct.mass=(bt=Z[0].reqs)==null?void 0:bt.mass),h.$set(ct);const lt={};it&1&&(lt.structure=Z[0].structure),it&1&&(lt.shipMass=Z[0].identification.mass),g.$set(lt);const dt={};it&1&&(dt.firecons=Z[0].weaponry.firecons.nbr),it&1&&(dt.screens=Z[0].structure.screens),m.$set(dt);const Ut={};it&1&&(Ut.weapons=Z[0].weaponry.weapons),y.$set(Ut);const Lt={};it&2&&(Lt.movable=Z[1]),it&1&&(Lt.ftl=(de=(Nt=Z[0])==null?void 0:Nt.propulsion)==null?void 0:de.ftl),it&1&&(Lt.engine=(Ie=(Tt=(Jt=Z[0])==null?void 0:Jt.propulsion)==null?void 0:Tt.drive)==null?void 0:Ie.rating),C.$set(Lt)},i(Z){I||(W(h.$$.fragment,Z),W(g.$$.fragment,Z),W(m.$$.fragment,Z),W(y.$$.fragment,Z),W(C.$$.fragment,Z),I=!0)},o(Z){X(h.$$.fragment,Z),X(g.$$.fragment,Z),X(m.$$.fragment,Z),X(y.$$.fragment,Z),X(C.$$.fragment,Z),I=!1},d(Z){Z&&M(t),Z&&M(f),Z&&M(c),ut(h),ut(g),ut(m),ut(y),ut(C),Z&&M(T),Z&&M(A),B=!1,P()}}}function xlt(e,t,r){let{ship:n={}}=t,a=!1;function i(){a=this.checked,r(1,a)}return e.$$set=s=>{"ship"in s&&r(0,n=s.ship)},[n,a,i]}class Ilt extends Ct{constructor(t){super();Ot(this,t,xlt,Plt,At,{ship:0})}}function Dlt(e){let t,r,n,a,i,s,u,f,c,h,p,v,g,_,m,b;return a=new gnt({}),s=new Mnt({}),s.$on("changeTab",e[3]),c=new Hit({}),v=new Yit({}),m=new Ilt({props:{ship:e[1]}}),{c(){t=k("meta"),r=ht(),n=k("main"),st(a.$$.fragment),i=ht(),st(s.$$.fragment),u=ht(),f=k("div"),st(c.$$.fragment),h=ht(),p=k("div"),st(v.$$.fragment),g=ht(),_=k("div"),st(m.$$.fragment),this.h()},l(y){const w=RM('[data-svelte="svelte-wq1q9u"]',document.head);t=H(w,"META",{name:!0,content:!0}),w.forEach(M),r=pt(y),n=H(y,"MAIN",{class:!0});var C=V(n);ft(a.$$.fragment,C),i=pt(C),ft(s.$$.fragment,C),u=pt(C),f=H(C,"DIV",{class:!0});var T=V(f);ft(c.$$.fragment,T),T.forEach(M),h=pt(C),p=H(C,"DIV",{class:!0});var A=V(p);ft(v.$$.fragment,A),A.forEach(M),g=pt(C),_=H(C,"DIV",{class:!0});var x=V(_);ft(m.$$.fragment,x),x.forEach(M),C.forEach(M),this.h()},h(){F(t,"name","viewport"),F(t,"content","width=960"),F(f,"class","svelte-khn038"),Me(f,"hide",e[0]!=="editor"),F(p,"class","svelte-khn038"),Me(p,"hide",e[0]!=="json"),F(_,"class","svelte-khn038"),Me(_,"hide",e[0]!=="print"),F(n,"class","svelte-khn038")},m(y,w){j(document.head,t),q(y,r,w),q(y,n,w),ot(a,n,null),j(n,i),ot(s,n,null),j(n,u),j(n,f),ot(c,f,null),j(n,h),j(n,p),ot(v,p,null),j(n,g),j(n,_),ot(m,_,null),b=!0},p(y,[w]){w&1&&Me(f,"hide",y[0]!=="editor"),w&1&&Me(p,"hide",y[0]!=="json");const C={};w&2&&(C.ship=y[1]),m.$set(C),w&1&&Me(_,"hide",y[0]!=="print")},i(y){b||(W(a.$$.fragment,y),W(s.$$.fragment,y),W(c.$$.fragment,y),W(v.$$.fragment,y),W(m.$$.fragment,y),b=!0)},o(y){X(a.$$.fragment,y),X(s.$$.fragment,y),X(c.$$.fragment,y),X(v.$$.fragment,y),X(m.$$.fragment,y),b=!1},d(y){M(t),y&&M(r),y&&M(n),ut(a),ut(s),ut(c),ut(v),ut(m)}}}function Rlt(e,t,r){let n,a="editor";const{state:i}=Ne("ship");ao(e,i,u=>r(1,n=u));const s=({detail:u})=>r(0,a=u);return e.$$.update=()=>{e.$$.dirty&1&&console.log(a)},[a,n,i,s]}class Blt extends Ct{constructor(t){super();Ot(this,t,Rlt,Dlt,At,{})}}function Llt(e){let t,r;return t=new Blt({}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p:se,i(n){r||(W(t.$$.fragment,n),r=!0)},o(n){X(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Flt(e){return Mc("ship",tnt()),[]}class jlt extends Ct{constructor(t){super();Ot(this,t,Flt,Llt,At,{})}}export{jlt as default}; diff --git a/docs/_app/pages/index.svelte-bdd7f07b.js b/docs/_app/pages/index.svelte-bdd7f07b.js deleted file mode 100644 index 6a9851c..0000000 --- a/docs/_app/pages/index.svelte-bdd7f07b.js +++ /dev/null @@ -1,56 +0,0 @@ -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}; diff --git a/docs/_app/start-c91a3eca.js b/docs/_app/start-91f194db.js similarity index 97% rename from docs/_app/start-c91a3eca.js rename to docs/_app/start-91f194db.js index 3c58e8b..d2e6417 100644 --- a/docs/_app/start-c91a3eca.js +++ b/docs/_app/start-91f194db.js @@ -1 +1 @@ -var et=Object.defineProperty,tt=Object.defineProperties;var nt=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var Ve=(r,e,t)=>e in r?et(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,A=(r,e)=>{for(var t in e||(e={}))qe.call(e,t)&&Ve(r,t,e[t]);if(le)for(var t of le(e))ze.call(e,t)&&Ve(r,t,e[t]);return r},ne=(r,e)=>tt(r,nt(e));var Je=(r,e)=>{var t={};for(var s in r)qe.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&le)for(var s of le(r))e.indexOf(s)<0&&ze.call(r,s)&&(t[s]=r[s]);return t};import{S as rt,i as st,s as at,e as it,c as ot,a as ct,d as I,b as we,f as K,g as D,t as lt,h as ft,j as ut,k as dt,l as P,m as pt,n as Y,o as x,p as M,q as C,r as _t,u as ht,v as $e,w as V,x as se,y as q,z as ae,A as ie,B as z,C as oe,D as Ke}from"./chunks/index-68fa7044.js";import{s as mt,w as fe,a as gt}from"./chunks/paths-5d155410.js";function wt(r){let e,t,s;const l=[r[1]||{}];var o=r[0][0];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function bt(r){let e,t,s;const l=[r[1]||{}];var o=r[0][0];function f(n){let a={$$slots:{default:[kt]},$$scope:{ctx:n}};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f(n)),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function yt(r){let e,t,s;const l=[r[2]||{}];var o=r[0][1];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function vt(r){let e,t,s;const l=[r[2]||{}];var o=r[0][1];function f(n){let a={$$slots:{default:[$t]},$$scope:{ctx:n}};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f(n)),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function $t(r){let e,t,s;const l=[r[3]||{}];var o=r[0][2];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function kt(r){let e,t,s,l;const o=[vt,yt],f=[];function n(a,i){return a[0][2]?0:1}return e=n(r),t=f[e]=o[e](r),{c(){t.c(),s=P()},l(a){t.l(a),s=P()},m(a,i){f[e].m(a,i),D(a,s,i),l=!0},p(a,i){let d=e;e=n(a),e===d?f[e].p(a,i):(Y(),x(f[d],1,1,()=>{f[d]=null}),M(),t=f[e],t?t.p(a,i):(t=f[e]=o[e](a),t.c()),C(t,1),t.m(s.parentNode,s))},i(a){l||(C(t),l=!0)},o(a){x(t),l=!1},d(a){f[e].d(a),a&&I(s)}}}function Be(r){let e,t=r[5]&&We(r);return{c(){e=it("div"),t&&t.c(),this.h()},l(s){e=ot(s,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=ct(e);t&&t.l(l),l.forEach(I),this.h()},h(){we(e,"id","svelte-announcer"),we(e,"aria-live","assertive"),we(e,"aria-atomic","true"),K(e,"position","absolute"),K(e,"left","0"),K(e,"top","0"),K(e,"clip","rect(0 0 0 0)"),K(e,"clip-path","inset(50%)"),K(e,"overflow","hidden"),K(e,"white-space","nowrap"),K(e,"width","1px"),K(e,"height","1px")},m(s,l){D(s,e,l),t&&t.m(e,null)},p(s,l){s[5]?t?t.p(s,l):(t=We(s),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(s){s&&I(e),t&&t.d()}}}function We(r){let e;return{c(){e=lt(r[6])},l(t){e=ft(t,r[6])},m(t,s){D(t,e,s)},p(t,s){s&64&&ut(e,t[6])},d(t){t&&I(e)}}}function Et(r){let e,t,s,l,o;const f=[bt,wt],n=[];function a(d,R){return d[0][1]?0:1}e=a(r),t=n[e]=f[e](r);let i=r[4]&&Be(r);return{c(){t.c(),s=dt(),i&&i.c(),l=P()},l(d){t.l(d),s=pt(d),i&&i.l(d),l=P()},m(d,R){n[e].m(d,R),D(d,s,R),i&&i.m(d,R),D(d,l,R),o=!0},p(d,[R]){let v=e;e=a(d),e===v?n[e].p(d,R):(Y(),x(n[v],1,1,()=>{n[v]=null}),M(),t=n[e],t?t.p(d,R):(t=n[e]=f[e](d),t.c()),C(t,1),t.m(s.parentNode,s)),d[4]?i?i.p(d,R):(i=Be(d),i.c(),i.m(l.parentNode,l)):i&&(i.d(1),i=null)},i(d){o||(C(t),o=!0)},o(d){x(t),o=!1},d(d){n[e].d(d),d&&I(s),i&&i.d(d),d&&I(l)}}}function Rt(r,e,t){let{stores:s}=e,{page:l}=e,{components:o}=e,{props_0:f=null}=e,{props_1:n=null}=e,{props_2:a=null}=e;_t("__svelte__",s),ht(s.page.notify);let i=!1,d=!1,R=null;return $e(()=>{const v=s.page.subscribe(()=>{i&&(t(5,d=!0),t(6,R=document.title||"untitled page"))});return t(4,i=!0),v}),r.$$set=v=>{"stores"in v&&t(7,s=v.stores),"page"in v&&t(8,l=v.page),"components"in v&&t(0,o=v.components),"props_0"in v&&t(1,f=v.props_0),"props_1"in v&&t(2,n=v.props_1),"props_2"in v&&t(3,a=v.props_2)},r.$$.update=()=>{r.$$.dirty&384&&s.page.set(l)},[o,f,n,a,i,d,R,s,l]}class St extends rt{constructor(e){super();st(this,e,Rt,Et,at,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const Lt="modulepreload",Ye={},Ut="/aotds-docks/_app/",be=function(e,t){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=`${Ut}${s}`,s in Ye)return;Ye[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${o}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":Lt,l||(f.as="script",f.crossOrigin=""),f.href=s,document.head.appendChild(f),l)return new Promise((n,a)=>{f.addEventListener("load",n),f.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},Nt={},Ee=[()=>be(()=>import("./layout.svelte-a7c34f1e.js"),["layout.svelte-a7c34f1e.js","chunks/index-68fa7044.js"]),()=>be(()=>import("./error.svelte-7544dc29.js"),["error.svelte-7544dc29.js","chunks/index-68fa7044.js"]),()=>be(()=>import("./pages/index.svelte-bdd7f07b.js"),["pages/index.svelte-bdd7f07b.js","assets/pages/index.svelte-3edfd478.css","chunks/index-68fa7044.js","chunks/paths-5d155410.js"])],Ot={"":[[0,2],[1]]};function Me(r){return r instanceof Error||r&&r.name&&r.message?r:new Error(JSON.stringify(r))}function Fe(r){const e=r.status&&r.status>=400&&r.status<=599&&!r.redirect;if(r.error||e){const t=r.status;if(!r.error&&e)return{status:t||500,error:new Error};const s=typeof r.error=="string"?new Error(r.error):r.error;return s instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:s}):{status:t,error:s}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof s}"`)}}if(r.redirect){if(!r.status||Math.floor(r.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof r.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(r.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return r}function At(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&/\/[^./]+$/.test(r)?r+"/":r}function Pt(r){let e=5381,t=r.length;if(typeof r=="string")for(;t;)e=e*33^r.charCodeAt(--t);else for(;t;)e=e*33^r[--t];return(e>>>0).toString(36)}function Ge(r){let e=r.baseURI;if(!e){const t=r.getElementsByTagName("base");e=t.length?t[0].href:r.URL}return e}function ke(){return{x:pageXOffset,y:pageYOffset}}function Xe(r){return r.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function He(r){return r instanceof SVGAElement?new URL(r.href.baseVal,document.baseURI):new URL(r.href)}function Qe(r){const e=fe(r);let t=!0;function s(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function o(f){let n;return e.subscribe(a=>{(n===void 0||t&&a!==n)&&f(n=a)})}return{notify:s,set:l,subscribe:o}}function xt(){const{set:r,subscribe:e}=fe(!1),t="1649256192683";let s;async function l(){clearTimeout(s);const f=await fetch(`${gt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:n}=await f.json(),a=n!==t;return a&&(r(!0),clearTimeout(s)),a}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Ct(r,e){let s=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof r=="string"?r:r.url)}]`;e&&typeof e.body=="string"&&(s+=`[sveltekit\\:data-body="${Pt(e.body)}"]`);const l=document.querySelector(s);if(l&&l.textContent){const o=JSON.parse(l.textContent),{body:f}=o,n=Je(o,["body"]);return Promise.resolve(new Response(f,n))}return fetch(r,e)}const jt=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function It(r){const e=[],t=[];let s=!0;return{pattern:r===""?/^\/$/:new RegExp(`^${decodeURIComponent(r).split("/").map((o,f,n)=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(o);if(a)return e.push(a[1]),t.push(a[2]),"(?:/(.*))?";const i=f===n.length-1;return"/"+o.split(/\[(.+?)\]/).map((d,R)=>{if(R%2){const[,v,H,F]=jt.exec(d);return e.push(H),t.push(F),v?"(.*?)":"([^/]+?)"}return i&&d.includes(".")&&(s=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${s?"/?":""}$`),names:e,types:t}}function Tt(r,e,t,s){const l={};for(let o=0;o{const{pattern:a,names:i,types:d}=It(l);return{id:l,exec:R=>{const v=a.exec(R);if(v)return Tt(v,i,d,t)},a:o.map(R=>r[R]),b:f.map(R=>r[R]),has_shadow:!!n}})}const Ze="sveltekit:scroll",B="sveltekit:index",ye=Dt(Ee,Ot,Nt),Vt=Ee[0](),qt=Ee[1]();let re={};try{re=JSON.parse(sessionStorage[Ze])}catch{}function ve(r){re[r]=ke()}function zt({target:r,session:e,base:t,trailing_slash:s}){var je,Ie;const l=new Map,o=new Set,f={url:Qe({}),page:Qe({}),navigating:fe(null),session:fe(e),updated:xt()},n={id:null,promise:null},a={before_navigate:[],after_navigate:[]};let i={url:null,session_id:0,branch:[]},d=!1,R=!0,v=!1,H=1,F=null,Re,Se,Le=!1;f.session.subscribe(async c=>{Se=c,Le&&(H+=1,he(new URL(location.href),[],!0))}),Le=!0;let ue=0,G=!0,T=(Ie=(je=history.state)==null?void 0:je[B])!=null?Ie:0;T===0&&history.replaceState(ne(A({},history.state),{[B]:0}),"",location.href);const de=re[T];de&&scrollTo(de.x,de.y);let pe=!1,_e,Ue,Ne;async function Oe(c,{noscroll:_=!1,replaceState:b=!1,keepfocus:u=!1,state:h={}},w){const m=new URL(c,Ge(document));if(G)return ge({url:m,scroll:_?ke():null,keepfocus:u,redirect_chain:w,details:{state:h,replaceState:b},accepted:()=>{},blocked:()=>{}});await ee(m)}async function Ae(c){const _=Ce(c);if(!_)throw new Error("Attempted to prefetch a URL that does not belong to this app");return n.promise=xe(_,!1),n.id=_.id,n.promise}async function he(c,_,b,u){var g,k,S;const h=Ce(c),w=Ue={};let m=h&&await xe(h,b);if(!m&&c.origin===location.origin&&c.pathname===location.pathname&&(m=await Z({status:404,error:new Error(`Not found: ${c.pathname}`),url:c,routeId:null})),!m){await ee(c);return}if(Ue!==w)return;if(o.clear(),m.redirect)if(_.length>10||_.includes(c.pathname))m=await Z({status:500,error:new Error("Redirect loop"),url:c,routeId:null});else{G?Oe(new URL(m.redirect,c).href,{},[..._,c.pathname]):await ee(new URL(m.redirect,location.href));return}else((k=(g=m.props)==null?void 0:g.page)==null?void 0:k.status)>=400&&await f.updated.check()&&await ee(c);if(v=!0,u&&u.details){const{details:y}=u,L=y.replaceState?0:1;y.state[B]=T+=L,history[y.replaceState?"replaceState":"pushState"](y.state,"",c)}if(d?(i=m.state,Re.$set(m.props)):Pe(m),u){const{scroll:y,keepfocus:L}=u;if(!L){const p=document.body,E=p.getAttribute("tabindex");(S=getSelection())==null||S.removeAllRanges(),p.tabIndex=-1,p.focus(),E!==null?p.setAttribute("tabindex",E):p.removeAttribute("tabindex")}if(await Ke(),R){const p=c.hash&&document.getElementById(c.hash.slice(1));y?scrollTo(y.x,y.y):p?p.scrollIntoView():scrollTo(0,0)}}else await Ke();n.promise=null,n.id=null,R=!0,v=!1,m.props.page&&(_e=m.props.page);const $=m.state.branch[m.state.branch.length-1];G=($==null?void 0:$.module.router)!==!1}function Pe(c){i=c.state;const _=document.querySelector("style[data-svelte]");if(_&&_.remove(),_e=c.props.page,Re=new St({target:r,props:ne(A({},c.props),{stores:f}),hydrate:!0}),d=!0,G){const b={from:null,to:new URL(location.href)};a.after_navigate.forEach(u=>u(b))}}async function me({url:c,params:_,stuff:b,branch:u,status:h,error:w,routeId:m}){var L;const $=u.filter(Boolean),g=$.find(p=>{var E;return(E=p.loaded)==null?void 0:E.redirect}),k={redirect:(L=g==null?void 0:g.loaded)==null?void 0:L.redirect,state:{url:c,params:_,branch:u,session_id:H},props:{components:$.map(p=>p.module.default)}};for(let p=0;p<$.length;p+=1){const E=$[p].loaded;k.props[`props_${p}`]=E?await E.props:null}if(!i.url||c.href!==i.url.href){k.props.page={error:w,params:_,routeId:m,status:h,stuff:b,url:c};const p=(E,J)=>{Object.defineProperty(k.props.page,E,{get:()=>{throw new Error(`$page.${E} has been replaced by $page.url.${J}`)}})};p("origin","origin"),p("path","pathname"),p("query","searchParams")}const S=$[$.length-1],y=S.loaded&&S.loaded.maxage;if(y){const p=c.pathname+c.search;let E=!1;const J=()=>{l.get(p)===k&&l.delete(p),U(),clearTimeout(X)},X=setTimeout(J,y*1e3),U=f.session.subscribe(()=>{E&&J()});E=!0,l.set(p,k)}return k}async function Q({status:c,error:_,module:b,url:u,params:h,stuff:w,props:m,routeId:$}){const g={module:b,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:w};m&&g.uses.dependencies.add(u.href);const k={};for(const y in h)Object.defineProperty(k,y,{get(){return g.uses.params.add(y),h[y]},enumerable:!0});const S=Se;if(b.load){const y={routeId:$,params:k,props:m||{},get url(){return g.uses.url=!0,u},get session(){return g.uses.session=!0,S},get stuff(){return g.uses.stuff=!0,A({},w)},fetch(p,E){const J=typeof p=="string"?p:p.url,{href:X}=new URL(J,u);return g.uses.dependencies.add(X),d?fetch(p,E):Ct(p,E)}};_&&(y.status=c,y.error=_);const L=await b.load.call(null,y);if(!L)throw new Error("load function must return a value");g.loaded=Fe(L),g.loaded.stuff&&(g.stuff=g.loaded.stuff)}else m&&(g.loaded=Fe({props:m}));return g}async function xe({id:c,url:_,params:b,route:u},h){var E,J,X;if(n.id===c&&n.promise)return n.promise;if(!h){const U=l.get(c);if(U)return U}const{a:w,b:m,has_shadow:$}=u,g=i.url&&{url:c!==i.url.pathname+i.url.search,params:Object.keys(b).filter(U=>i.params[U]!==b[U]),session:H!==i.session_id};let k=[],S={},y=!1,L=200,p;w.forEach(U=>U());e:for(let U=0;Uj.uses.params.has(W))||g.session&&j.uses.session||Array.from(j.uses.dependencies).some(W=>o.has(W))||y&&j.uses.stuff){let W={};const Te=$&&U===w.length-1;if(Te){const te=await fetch(`${_.pathname}${_.pathname.endsWith("/")?"":"/"}__data.json${_.search}`,{headers:{"x-sveltekit-load":"true"}});if(te.ok){const De=te.headers.get("x-sveltekit-location");if(De)return{redirect:De,props:{},state:i};W=te.status===204?{}:await te.json()}else L=te.status,p=new Error("Failed to load data")}if(p||(N=await Q({module:O,url:_,params:b,props:W,stuff:S,routeId:u.id})),N&&(Te&&(N.uses.url=!0),N.loaded)){if(N.loaded.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if(N.loaded.error&&(L=N.loaded.status,p=N.loaded.error),N.loaded.redirect)return{redirect:N.loaded.redirect,props:{},state:i};N.loaded.stuff&&(y=!0)}}else N=j}catch(O){L=500,p=Me(O)}if(p){for(;U--;)if(m[U]){let O,j,ce=U;for(;!(j=k[ce]);)ce-=1;try{if(O=await Q({status:L,error:p,module:await m[U](),url:_,params:b,stuff:j.stuff,routeId:u.id}),(E=O==null?void 0:O.loaded)!=null&&E.error)continue;(J=O==null?void 0:O.loaded)!=null&&J.stuff&&(S=A(A({},S),O.loaded.stuff)),k=k.slice(0,ce+1).concat(O);break e}catch{continue}}return await Z({status:L,error:p,url:_,routeId:u.id})}else(X=N==null?void 0:N.loaded)!=null&&X.stuff&&(S=A(A({},S),N.loaded.stuff)),k.push(N)}return await me({url:_,params:b,stuff:S,branch:k,status:L,error:p,routeId:u.id})}async function Z({status:c,error:_,url:b,routeId:u}){var $,g;const h={},w=await Q({module:await Vt,url:b,params:h,stuff:{},routeId:u}),m=await Q({status:c,error:_,module:await qt,url:b,params:h,stuff:w&&w.loaded&&w.loaded.stuff||{},routeId:u});return await me({url:b,params:h,stuff:A(A({},($=w==null?void 0:w.loaded)==null?void 0:$.stuff),(g=m==null?void 0:m.loaded)==null?void 0:g.stuff),branch:[w,m],status:c,error:_,routeId:u})}function Ce(c){if(c.origin!==location.origin||!c.pathname.startsWith(t))return;const _=decodeURI(c.pathname.slice(t.length)||"/");for(const b of ye){const u=b.exec(_);if(u)return{id:c.pathname+c.search,route:b,params:u,url:c}}}async function ge({url:c,scroll:_,keepfocus:b,redirect_chain:u,details:h,accepted:w,blocked:m}){const $=i.url;let g=!1;const k={from:$,to:c,cancel:()=>g=!0};if(a.before_navigate.forEach(p=>p(k)),g){m();return}const S=At(c.pathname,s),y=new URL(c.origin+S+c.search+c.hash);ve(T),w(),ue++;const L=Ne={};if(d&&f.navigating.set({from:i.url,to:y}),await he(y,u,!1,{scroll:_,keepfocus:b,details:h}),ue--,Ne===L&&!ue){const p={from:$,to:y};a.after_navigate.forEach(E=>E(p)),f.navigating.set(null)}}function ee(c){return location.href=c.href,new Promise(()=>{})}return{after_navigate:c=>{$e(()=>(a.after_navigate.push(c),()=>{const _=a.after_navigate.indexOf(c);a.after_navigate.splice(_,1)}))},before_navigate:c=>{$e(()=>(a.before_navigate.push(c),()=>{const _=a.before_navigate.indexOf(c);a.before_navigate.splice(_,1)}))},disable_scroll_handling:()=>{(v||!d)&&(R=!1)},goto:(c,_={})=>Oe(c,_,[]),invalidate:c=>{const{href:_}=new URL(c,location.href);return o.add(_),F||(F=Promise.resolve().then(async()=>{await he(new URL(location.href),[],!0),F=null})),F},prefetch:async c=>{const _=new URL(c,Ge(document));await Ae(_)},prefetch_routes:async c=>{const b=(c?ye.filter(u=>c.some(h=>u.exec(h))):ye).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(b)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const w={from:i.url,to:null,cancel:()=>h=!0};a.before_navigate.forEach(m=>m(w)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ve(T);try{sessionStorage[Ze]=JSON.stringify(re)}catch{}}});const c=u=>{const h=Xe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ae(He(h))};let _;const b=u=>{clearTimeout(_),_=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",c),addEventListener("mousemove",b),addEventListener("sveltekit:trigger_prefetch",c),addEventListener("click",u=>{if(!G||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=Xe(u);if(!h||!h.href)return;const w=h instanceof SVGAElement,m=He(h);if(!w&&m.origin==="null")return;const $=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||$.includes("external")||(w?h.target.baseVal:h.target))return;if(m.href===location.href){location.hash||u.preventDefault();return}const[g,k]=m.href.split("#");if(k!==void 0&&g===location.href.split("#")[0]){pe=!0,ve(T),f.page.set(ne(A({},_e),{url:m})),f.page.notify();return}ge({url:m,scroll:h.hasAttribute("sveltekit:noscroll")?ke():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&G){if(u.state[B]===T)return;ge({url:new URL(location.href),scroll:re[u.state[B]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{T=u.state[B]},blocked:()=>{const h=T-u.state[B];history.go(h)}})}}),addEventListener("hashchange",()=>{pe&&(pe=!1,history.replaceState(ne(A({},history.state),{[B]:++T}),"",location.href))})},_hydrate:async({status:c,error:_,nodes:b,params:u,routeId:h})=>{const w=new URL(location.href),m=[];let $={},g,k;try{for(let S=0;Se in r?et(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,A=(r,e)=>{for(var t in e||(e={}))qe.call(e,t)&&Ve(r,t,e[t]);if(le)for(var t of le(e))ze.call(e,t)&&Ve(r,t,e[t]);return r},ne=(r,e)=>tt(r,nt(e));var Je=(r,e)=>{var t={};for(var s in r)qe.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&le)for(var s of le(r))e.indexOf(s)<0&&ze.call(r,s)&&(t[s]=r[s]);return t};import{S as rt,i as st,s as at,e as it,c as ot,a as ct,d as I,b as we,f as K,g as D,t as lt,h as ft,j as ut,k as dt,l as P,m as pt,n as Y,o as x,p as M,q as C,r as _t,u as ht,v as $e,w as V,x as se,y as q,z as ae,A as ie,B as z,C as oe,D as Ke}from"./chunks/index-3711c71a.js";import{s as mt,w as fe,a as gt}from"./chunks/paths-5193a87e.js";function wt(r){let e,t,s;const l=[r[1]||{}];var o=r[0][0];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function bt(r){let e,t,s;const l=[r[1]||{}];var o=r[0][0];function f(n){let a={$$slots:{default:[kt]},$$scope:{ctx:n}};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f(n)),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function yt(r){let e,t,s;const l=[r[2]||{}];var o=r[0][1];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function vt(r){let e,t,s;const l=[r[2]||{}];var o=r[0][1];function f(n){let a={$$slots:{default:[$t]},$$scope:{ctx:n}};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f(n)),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function $t(r){let e,t,s;const l=[r[3]||{}];var o=r[0][2];function f(n){let a={};for(let i=0;i{z(d,1)}),M()}o?(e=new o(f()),V(e.$$.fragment),C(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else o&&e.$set(i)},i(n){s||(e&&C(e.$$.fragment,n),s=!0)},o(n){e&&x(e.$$.fragment,n),s=!1},d(n){n&&I(t),e&&z(e,n)}}}function kt(r){let e,t,s,l;const o=[vt,yt],f=[];function n(a,i){return a[0][2]?0:1}return e=n(r),t=f[e]=o[e](r),{c(){t.c(),s=P()},l(a){t.l(a),s=P()},m(a,i){f[e].m(a,i),D(a,s,i),l=!0},p(a,i){let d=e;e=n(a),e===d?f[e].p(a,i):(Y(),x(f[d],1,1,()=>{f[d]=null}),M(),t=f[e],t?t.p(a,i):(t=f[e]=o[e](a),t.c()),C(t,1),t.m(s.parentNode,s))},i(a){l||(C(t),l=!0)},o(a){x(t),l=!1},d(a){f[e].d(a),a&&I(s)}}}function Be(r){let e,t=r[5]&&We(r);return{c(){e=it("div"),t&&t.c(),this.h()},l(s){e=ot(s,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=ct(e);t&&t.l(l),l.forEach(I),this.h()},h(){we(e,"id","svelte-announcer"),we(e,"aria-live","assertive"),we(e,"aria-atomic","true"),K(e,"position","absolute"),K(e,"left","0"),K(e,"top","0"),K(e,"clip","rect(0 0 0 0)"),K(e,"clip-path","inset(50%)"),K(e,"overflow","hidden"),K(e,"white-space","nowrap"),K(e,"width","1px"),K(e,"height","1px")},m(s,l){D(s,e,l),t&&t.m(e,null)},p(s,l){s[5]?t?t.p(s,l):(t=We(s),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(s){s&&I(e),t&&t.d()}}}function We(r){let e;return{c(){e=lt(r[6])},l(t){e=ft(t,r[6])},m(t,s){D(t,e,s)},p(t,s){s&64&&ut(e,t[6])},d(t){t&&I(e)}}}function Et(r){let e,t,s,l,o;const f=[bt,wt],n=[];function a(d,R){return d[0][1]?0:1}e=a(r),t=n[e]=f[e](r);let i=r[4]&&Be(r);return{c(){t.c(),s=dt(),i&&i.c(),l=P()},l(d){t.l(d),s=pt(d),i&&i.l(d),l=P()},m(d,R){n[e].m(d,R),D(d,s,R),i&&i.m(d,R),D(d,l,R),o=!0},p(d,[R]){let v=e;e=a(d),e===v?n[e].p(d,R):(Y(),x(n[v],1,1,()=>{n[v]=null}),M(),t=n[e],t?t.p(d,R):(t=n[e]=f[e](d),t.c()),C(t,1),t.m(s.parentNode,s)),d[4]?i?i.p(d,R):(i=Be(d),i.c(),i.m(l.parentNode,l)):i&&(i.d(1),i=null)},i(d){o||(C(t),o=!0)},o(d){x(t),o=!1},d(d){n[e].d(d),d&&I(s),i&&i.d(d),d&&I(l)}}}function Rt(r,e,t){let{stores:s}=e,{page:l}=e,{components:o}=e,{props_0:f=null}=e,{props_1:n=null}=e,{props_2:a=null}=e;_t("__svelte__",s),ht(s.page.notify);let i=!1,d=!1,R=null;return $e(()=>{const v=s.page.subscribe(()=>{i&&(t(5,d=!0),t(6,R=document.title||"untitled page"))});return t(4,i=!0),v}),r.$$set=v=>{"stores"in v&&t(7,s=v.stores),"page"in v&&t(8,l=v.page),"components"in v&&t(0,o=v.components),"props_0"in v&&t(1,f=v.props_0),"props_1"in v&&t(2,n=v.props_1),"props_2"in v&&t(3,a=v.props_2)},r.$$.update=()=>{r.$$.dirty&384&&s.page.set(l)},[o,f,n,a,i,d,R,s,l]}class St extends rt{constructor(e){super();st(this,e,Rt,Et,at,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const Lt="modulepreload",Ye={},Ut="/aotds-docks/_app/",be=function(e,t){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=`${Ut}${s}`,s in Ye)return;Ye[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${o}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":Lt,l||(f.as="script",f.crossOrigin=""),f.href=s,document.head.appendChild(f),l)return new Promise((n,a)=>{f.addEventListener("load",n),f.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},Nt={},Ee=[()=>be(()=>import("./layout.svelte-4620a56f.js"),["layout.svelte-4620a56f.js","chunks/index-3711c71a.js"]),()=>be(()=>import("./error.svelte-a52588a9.js"),["error.svelte-a52588a9.js","chunks/index-3711c71a.js"]),()=>be(()=>import("./pages/index.svelte-87b4df47.js"),["pages/index.svelte-87b4df47.js","assets/pages/index.svelte-455f749d.css","chunks/index-3711c71a.js","chunks/paths-5193a87e.js"])],Ot={"":[[0,2],[1]]};function Me(r){return r instanceof Error||r&&r.name&&r.message?r:new Error(JSON.stringify(r))}function Fe(r){const e=r.status&&r.status>=400&&r.status<=599&&!r.redirect;if(r.error||e){const t=r.status;if(!r.error&&e)return{status:t||500,error:new Error};const s=typeof r.error=="string"?new Error(r.error):r.error;return s instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:s}):{status:t,error:s}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof s}"`)}}if(r.redirect){if(!r.status||Math.floor(r.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof r.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(r.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return r}function At(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&/\/[^./]+$/.test(r)?r+"/":r}function Pt(r){let e=5381,t=r.length;if(typeof r=="string")for(;t;)e=e*33^r.charCodeAt(--t);else for(;t;)e=e*33^r[--t];return(e>>>0).toString(36)}function Ge(r){let e=r.baseURI;if(!e){const t=r.getElementsByTagName("base");e=t.length?t[0].href:r.URL}return e}function ke(){return{x:pageXOffset,y:pageYOffset}}function Xe(r){return r.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function He(r){return r instanceof SVGAElement?new URL(r.href.baseVal,document.baseURI):new URL(r.href)}function Qe(r){const e=fe(r);let t=!0;function s(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function o(f){let n;return e.subscribe(a=>{(n===void 0||t&&a!==n)&&f(n=a)})}return{notify:s,set:l,subscribe:o}}function xt(){const{set:r,subscribe:e}=fe(!1),t="1649293948524";let s;async function l(){clearTimeout(s);const f=await fetch(`${gt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:n}=await f.json(),a=n!==t;return a&&(r(!0),clearTimeout(s)),a}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Ct(r,e){let s=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof r=="string"?r:r.url)}]`;e&&typeof e.body=="string"&&(s+=`[sveltekit\\:data-body="${Pt(e.body)}"]`);const l=document.querySelector(s);if(l&&l.textContent){const o=JSON.parse(l.textContent),{body:f}=o,n=Je(o,["body"]);return Promise.resolve(new Response(f,n))}return fetch(r,e)}const jt=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function It(r){const e=[],t=[];let s=!0;return{pattern:r===""?/^\/$/:new RegExp(`^${decodeURIComponent(r).split("/").map((o,f,n)=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(o);if(a)return e.push(a[1]),t.push(a[2]),"(?:/(.*))?";const i=f===n.length-1;return"/"+o.split(/\[(.+?)\]/).map((d,R)=>{if(R%2){const[,v,H,F]=jt.exec(d);return e.push(H),t.push(F),v?"(.*?)":"([^/]+?)"}return i&&d.includes(".")&&(s=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${s?"/?":""}$`),names:e,types:t}}function Tt(r,e,t,s){const l={};for(let o=0;o{const{pattern:a,names:i,types:d}=It(l);return{id:l,exec:R=>{const v=a.exec(R);if(v)return Tt(v,i,d,t)},a:o.map(R=>r[R]),b:f.map(R=>r[R]),has_shadow:!!n}})}const Ze="sveltekit:scroll",B="sveltekit:index",ye=Dt(Ee,Ot,Nt),Vt=Ee[0](),qt=Ee[1]();let re={};try{re=JSON.parse(sessionStorage[Ze])}catch{}function ve(r){re[r]=ke()}function zt({target:r,session:e,base:t,trailing_slash:s}){var je,Ie;const l=new Map,o=new Set,f={url:Qe({}),page:Qe({}),navigating:fe(null),session:fe(e),updated:xt()},n={id:null,promise:null},a={before_navigate:[],after_navigate:[]};let i={url:null,session_id:0,branch:[]},d=!1,R=!0,v=!1,H=1,F=null,Re,Se,Le=!1;f.session.subscribe(async c=>{Se=c,Le&&(H+=1,he(new URL(location.href),[],!0))}),Le=!0;let ue=0,G=!0,T=(Ie=(je=history.state)==null?void 0:je[B])!=null?Ie:0;T===0&&history.replaceState(ne(A({},history.state),{[B]:0}),"",location.href);const de=re[T];de&&scrollTo(de.x,de.y);let pe=!1,_e,Ue,Ne;async function Oe(c,{noscroll:_=!1,replaceState:b=!1,keepfocus:u=!1,state:h={}},w){const m=new URL(c,Ge(document));if(G)return ge({url:m,scroll:_?ke():null,keepfocus:u,redirect_chain:w,details:{state:h,replaceState:b},accepted:()=>{},blocked:()=>{}});await ee(m)}async function Ae(c){const _=Ce(c);if(!_)throw new Error("Attempted to prefetch a URL that does not belong to this app");return n.promise=xe(_,!1),n.id=_.id,n.promise}async function he(c,_,b,u){var g,k,S;const h=Ce(c),w=Ue={};let m=h&&await xe(h,b);if(!m&&c.origin===location.origin&&c.pathname===location.pathname&&(m=await Z({status:404,error:new Error(`Not found: ${c.pathname}`),url:c,routeId:null})),!m){await ee(c);return}if(Ue!==w)return;if(o.clear(),m.redirect)if(_.length>10||_.includes(c.pathname))m=await Z({status:500,error:new Error("Redirect loop"),url:c,routeId:null});else{G?Oe(new URL(m.redirect,c).href,{},[..._,c.pathname]):await ee(new URL(m.redirect,location.href));return}else((k=(g=m.props)==null?void 0:g.page)==null?void 0:k.status)>=400&&await f.updated.check()&&await ee(c);if(v=!0,u&&u.details){const{details:y}=u,L=y.replaceState?0:1;y.state[B]=T+=L,history[y.replaceState?"replaceState":"pushState"](y.state,"",c)}if(d?(i=m.state,Re.$set(m.props)):Pe(m),u){const{scroll:y,keepfocus:L}=u;if(!L){const p=document.body,E=p.getAttribute("tabindex");(S=getSelection())==null||S.removeAllRanges(),p.tabIndex=-1,p.focus(),E!==null?p.setAttribute("tabindex",E):p.removeAttribute("tabindex")}if(await Ke(),R){const p=c.hash&&document.getElementById(c.hash.slice(1));y?scrollTo(y.x,y.y):p?p.scrollIntoView():scrollTo(0,0)}}else await Ke();n.promise=null,n.id=null,R=!0,v=!1,m.props.page&&(_e=m.props.page);const $=m.state.branch[m.state.branch.length-1];G=($==null?void 0:$.module.router)!==!1}function Pe(c){i=c.state;const _=document.querySelector("style[data-svelte]");if(_&&_.remove(),_e=c.props.page,Re=new St({target:r,props:ne(A({},c.props),{stores:f}),hydrate:!0}),d=!0,G){const b={from:null,to:new URL(location.href)};a.after_navigate.forEach(u=>u(b))}}async function me({url:c,params:_,stuff:b,branch:u,status:h,error:w,routeId:m}){var L;const $=u.filter(Boolean),g=$.find(p=>{var E;return(E=p.loaded)==null?void 0:E.redirect}),k={redirect:(L=g==null?void 0:g.loaded)==null?void 0:L.redirect,state:{url:c,params:_,branch:u,session_id:H},props:{components:$.map(p=>p.module.default)}};for(let p=0;p<$.length;p+=1){const E=$[p].loaded;k.props[`props_${p}`]=E?await E.props:null}if(!i.url||c.href!==i.url.href){k.props.page={error:w,params:_,routeId:m,status:h,stuff:b,url:c};const p=(E,J)=>{Object.defineProperty(k.props.page,E,{get:()=>{throw new Error(`$page.${E} has been replaced by $page.url.${J}`)}})};p("origin","origin"),p("path","pathname"),p("query","searchParams")}const S=$[$.length-1],y=S.loaded&&S.loaded.maxage;if(y){const p=c.pathname+c.search;let E=!1;const J=()=>{l.get(p)===k&&l.delete(p),U(),clearTimeout(X)},X=setTimeout(J,y*1e3),U=f.session.subscribe(()=>{E&&J()});E=!0,l.set(p,k)}return k}async function Q({status:c,error:_,module:b,url:u,params:h,stuff:w,props:m,routeId:$}){const g={module:b,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:w};m&&g.uses.dependencies.add(u.href);const k={};for(const y in h)Object.defineProperty(k,y,{get(){return g.uses.params.add(y),h[y]},enumerable:!0});const S=Se;if(b.load){const y={routeId:$,params:k,props:m||{},get url(){return g.uses.url=!0,u},get session(){return g.uses.session=!0,S},get stuff(){return g.uses.stuff=!0,A({},w)},fetch(p,E){const J=typeof p=="string"?p:p.url,{href:X}=new URL(J,u);return g.uses.dependencies.add(X),d?fetch(p,E):Ct(p,E)}};_&&(y.status=c,y.error=_);const L=await b.load.call(null,y);if(!L)throw new Error("load function must return a value");g.loaded=Fe(L),g.loaded.stuff&&(g.stuff=g.loaded.stuff)}else m&&(g.loaded=Fe({props:m}));return g}async function xe({id:c,url:_,params:b,route:u},h){var E,J,X;if(n.id===c&&n.promise)return n.promise;if(!h){const U=l.get(c);if(U)return U}const{a:w,b:m,has_shadow:$}=u,g=i.url&&{url:c!==i.url.pathname+i.url.search,params:Object.keys(b).filter(U=>i.params[U]!==b[U]),session:H!==i.session_id};let k=[],S={},y=!1,L=200,p;w.forEach(U=>U());e:for(let U=0;Uj.uses.params.has(W))||g.session&&j.uses.session||Array.from(j.uses.dependencies).some(W=>o.has(W))||y&&j.uses.stuff){let W={};const Te=$&&U===w.length-1;if(Te){const te=await fetch(`${_.pathname}${_.pathname.endsWith("/")?"":"/"}__data.json${_.search}`,{headers:{"x-sveltekit-load":"true"}});if(te.ok){const De=te.headers.get("x-sveltekit-location");if(De)return{redirect:De,props:{},state:i};W=te.status===204?{}:await te.json()}else L=te.status,p=new Error("Failed to load data")}if(p||(N=await Q({module:O,url:_,params:b,props:W,stuff:S,routeId:u.id})),N&&(Te&&(N.uses.url=!0),N.loaded)){if(N.loaded.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if(N.loaded.error&&(L=N.loaded.status,p=N.loaded.error),N.loaded.redirect)return{redirect:N.loaded.redirect,props:{},state:i};N.loaded.stuff&&(y=!0)}}else N=j}catch(O){L=500,p=Me(O)}if(p){for(;U--;)if(m[U]){let O,j,ce=U;for(;!(j=k[ce]);)ce-=1;try{if(O=await Q({status:L,error:p,module:await m[U](),url:_,params:b,stuff:j.stuff,routeId:u.id}),(E=O==null?void 0:O.loaded)!=null&&E.error)continue;(J=O==null?void 0:O.loaded)!=null&&J.stuff&&(S=A(A({},S),O.loaded.stuff)),k=k.slice(0,ce+1).concat(O);break e}catch{continue}}return await Z({status:L,error:p,url:_,routeId:u.id})}else(X=N==null?void 0:N.loaded)!=null&&X.stuff&&(S=A(A({},S),N.loaded.stuff)),k.push(N)}return await me({url:_,params:b,stuff:S,branch:k,status:L,error:p,routeId:u.id})}async function Z({status:c,error:_,url:b,routeId:u}){var $,g;const h={},w=await Q({module:await Vt,url:b,params:h,stuff:{},routeId:u}),m=await Q({status:c,error:_,module:await qt,url:b,params:h,stuff:w&&w.loaded&&w.loaded.stuff||{},routeId:u});return await me({url:b,params:h,stuff:A(A({},($=w==null?void 0:w.loaded)==null?void 0:$.stuff),(g=m==null?void 0:m.loaded)==null?void 0:g.stuff),branch:[w,m],status:c,error:_,routeId:u})}function Ce(c){if(c.origin!==location.origin||!c.pathname.startsWith(t))return;const _=decodeURI(c.pathname.slice(t.length)||"/");for(const b of ye){const u=b.exec(_);if(u)return{id:c.pathname+c.search,route:b,params:u,url:c}}}async function ge({url:c,scroll:_,keepfocus:b,redirect_chain:u,details:h,accepted:w,blocked:m}){const $=i.url;let g=!1;const k={from:$,to:c,cancel:()=>g=!0};if(a.before_navigate.forEach(p=>p(k)),g){m();return}const S=At(c.pathname,s),y=new URL(c.origin+S+c.search+c.hash);ve(T),w(),ue++;const L=Ne={};if(d&&f.navigating.set({from:i.url,to:y}),await he(y,u,!1,{scroll:_,keepfocus:b,details:h}),ue--,Ne===L&&!ue){const p={from:$,to:y};a.after_navigate.forEach(E=>E(p)),f.navigating.set(null)}}function ee(c){return location.href=c.href,new Promise(()=>{})}return{after_navigate:c=>{$e(()=>(a.after_navigate.push(c),()=>{const _=a.after_navigate.indexOf(c);a.after_navigate.splice(_,1)}))},before_navigate:c=>{$e(()=>(a.before_navigate.push(c),()=>{const _=a.before_navigate.indexOf(c);a.before_navigate.splice(_,1)}))},disable_scroll_handling:()=>{(v||!d)&&(R=!1)},goto:(c,_={})=>Oe(c,_,[]),invalidate:c=>{const{href:_}=new URL(c,location.href);return o.add(_),F||(F=Promise.resolve().then(async()=>{await he(new URL(location.href),[],!0),F=null})),F},prefetch:async c=>{const _=new URL(c,Ge(document));await Ae(_)},prefetch_routes:async c=>{const b=(c?ye.filter(u=>c.some(h=>u.exec(h))):ye).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(b)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const w={from:i.url,to:null,cancel:()=>h=!0};a.before_navigate.forEach(m=>m(w)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ve(T);try{sessionStorage[Ze]=JSON.stringify(re)}catch{}}});const c=u=>{const h=Xe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ae(He(h))};let _;const b=u=>{clearTimeout(_),_=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",c),addEventListener("mousemove",b),addEventListener("sveltekit:trigger_prefetch",c),addEventListener("click",u=>{if(!G||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=Xe(u);if(!h||!h.href)return;const w=h instanceof SVGAElement,m=He(h);if(!w&&m.origin==="null")return;const $=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||$.includes("external")||(w?h.target.baseVal:h.target))return;if(m.href===location.href){location.hash||u.preventDefault();return}const[g,k]=m.href.split("#");if(k!==void 0&&g===location.href.split("#")[0]){pe=!0,ve(T),f.page.set(ne(A({},_e),{url:m})),f.page.notify();return}ge({url:m,scroll:h.hasAttribute("sveltekit:noscroll")?ke():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&G){if(u.state[B]===T)return;ge({url:new URL(location.href),scroll:re[u.state[B]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{T=u.state[B]},blocked:()=>{const h=T-u.state[B];history.go(h)}})}}),addEventListener("hashchange",()=>{pe&&(pe=!1,history.replaceState(ne(A({},history.state),{[B]:++T}),"",location.href))})},_hydrate:async({status:c,error:_,nodes:b,params:u,routeId:h})=>{const w=new URL(location.href),m=[];let $={},g,k;try{for(let S=0;S