@playpilot/tpi 3.1.0-beta.2 → 3.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  (() => {
2
2
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-8w8waf{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.flip.svelte-8w8waf{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-8w8waf{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}h2.svelte-1f6ryh6{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}img.svelte-1f6ryh6{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1f6ryh6{height:40px;width:40px}}.playlinks.svelte-1f6ryh6{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1f6ryh6::-webkit-scrollbar{display:none}.list.svelte-1f6ryh6{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){height:32px;width:32px}}.playlink.svelte-1f6ryh6{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1f6ryh6:hover,.playlink.svelte-1f6ryh6:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)));text-decoration:none!important}.playlink.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){margin:0}.list.svelte-1f6ryh6 .playlink:where(.svelte-1f6ryh6){padding:8px;gap:8px}.name.svelte-1f6ryh6{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1f6ryh6{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1f6ryh6{white-space:initial;line-height:1.35}.arrow.svelte-1f6ryh6{margin-left:auto;padding:0 8px}p.svelte-fluzit,.paragraph.svelte-fluzit{display:block;margin:16px 0 0}.show-more.svelte-fluzit{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-fluzit:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}h1.svelte-urs395{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-urs395 h1:where(.svelte-urs395){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-urs395 h1:where(.svelte-urs395){margin-top:0}.content.svelte-urs395{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-urs395{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-urs395{padding:32px 0 16px}.small.svelte-urs395 .header:where(.svelte-urs395){padding-top:16px}.compact.svelte-urs395 .header:where(.svelte-urs395){padding:0 0 16px}.top.svelte-urs395{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-urs395{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow));opacity:0}.poster.loaded.svelte-urs395{opacity:1}.info.svelte-urs395{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-urs395 .info:where(.svelte-urs395){gap:8px 12px}.imdb.svelte-urs395{display:flex;align-items:center;gap:4px}.imdb.svelte-urs395 svg{margin-top:-2px}.small.svelte-urs395 .imdb:where(.svelte-urs395) svg{margin-top:0;width:12px;height:12px}.background.svelte-urs395{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-urs395:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%);z-index:1}.background.svelte-urs395 img:where(.svelte-urs395){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-urs395 img.loaded:where(.svelte-urs395){opacity:1}.background.svelte-urs395 img.blur:where(.svelte-urs395){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-urs395{opacity:.15}.capitalize.svelte-urs395{text-transform:capitalize}.truncate.svelte-urs395{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}span.svelte-6p0hvs{display:block}button.svelte-6p0hvs{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-6p0hvs:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-1riopfw{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-1riopfw{padding:32px}}.dialog.svelte-1riopfw{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-1riopfw{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-1riopfw{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-1riopfw{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-1riopfw:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.switches.svelte-14krcvc{display:flex;flex-direction:column;gap:12px}button.svelte-14krcvc{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-14krcvc:hover,button.active.svelte-14krcvc{color:var(--playpilot-text-color)}.group.svelte-14krcvc{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-14krcvc{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-14krcvc{left:calc(50% + 4px)}.label.svelte-14krcvc{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1tq7qhv{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-1lxtpkd{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1lxtpkd:hover,.item.highlighted.svelte-1lxtpkd{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1lxtpkd{outline:2px solid var(--playpilot-primary)}.header.svelte-1lxtpkd{display:flex;gap:16px;width:100%}.poster.svelte-1lxtpkd{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-1lxtpkd .poster:where(.svelte-1lxtpkd){opacity:.35}.title.svelte-1lxtpkd{font-size:14px;word-break:break-word}.sentence.svelte-1lxtpkd{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-1lxtpkd em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-1lxtpkd{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-1lxtpkd:hover{color:var(--playpilot-text-color)}.content.svelte-1lxtpkd{padding-top:8px}.inactive.svelte-1lxtpkd .info:where(.svelte-1lxtpkd){opacity:.35}.context-menu.svelte-1lxtpkd{margin:0 -4px 0 auto}.context-menu-action.svelte-1lxtpkd{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-1lxtpkd:hover{color:var(--playpilot-text-color)}.actions.svelte-1lxtpkd{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1lxtpkd{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-1lxtpkd:hover{filter:brightness(1.2)}.expanded.svelte-1lxtpkd{padding-top:16px}.type-select.svelte-1lxtpkd{margin-top:8px}.label.svelte-1lxtpkd{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1lxtpkd{margin-top:12px}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-1367ri6{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:20%;width:60%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-1367ri6:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-1367ri6:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-1367ri6:active{cursor:grabbing}.resize-handle.svelte-1367ri6:before{display:block;content:"";position:absolute;top:0;right:0;left:0;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-tbzvlp{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left;font-size:.85rem}.item.hoverable.svelte-tbzvlp{cursor:pointer}.item.hoverable.svelte-tbzvlp:hover{background:var(--playpilot-lighter)}.item.svelte-tbzvlp:last-child{border-bottom:0}.poster.svelte-tbzvlp{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-tbzvlp{color:var(--playpilot-text-color)}.meta.svelte-tbzvlp{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-tbzvlp{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-tbzvlp{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-tbzvlp:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}h2.svelte-l7tw17{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}p.svelte-l7tw17,label.svelte-l7tw17{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-l7tw17{display:block;margin-top:16px}.layout.svelte-l7tw17{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-l7tw17{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-l7tw17{margin-top:8px}.save.svelte-l7tw17{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-l7tw17:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-l7tw17{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}.ai-indicator.svelte-7ilatt{position:relative;margin:0 8px}.content.svelte-7ilatt{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.icon.svelte-7ilatt{color:var(--playpilot-green)}.border.svelte-7ilatt{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-7ilatt .border:where(.svelte-7ilatt){background:var(--playpilot-light)}@keyframes svelte-7ilatt-rotate{to{rotate:360deg}}.animator.svelte-7ilatt{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-7ilatt-rotate 2s infinite linear;filter:blur(5rem)}.button.svelte-7ilatt{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 4px;margin:4px 0 0;border:1px solid currentColor;border-radius:.25rem;background:transparent;color:var(--playpilot-green);font-family:var(--playpilot-font-family);cursor:pointer}.button.svelte-7ilatt:hover{color:#fff}@keyframes svelte-7ilatt-fake-load{0%{width:0%}2%{width:20%}70%{width:85%}to{width:90%}}.loading-bar.svelte-7ilatt{position:absolute;bottom:0;left:0;height:.15em;border-radius:0 .25rem .25rem 0;background:linear-gradient(to right,var(--playpilot-light),var(--playpilot-green));animation:svelte-7ilatt-fake-load forwards;animation-duration:20s}h1.svelte-1w9c21y{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1w9c21y{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(50vh,800px);min-height:10rem;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.panel-open.svelte-1w9c21y{overflow:hidden}.loading.svelte-1w9c21y{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handle.svelte-1w9c21y{opacity:0;transition:opacity .15s}.editor.svelte-1w9c21y:hover .handle:where(.svelte-1w9c21y){opacity:1}.header.svelte-1w9c21y{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;border:0;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1w9c21y .header:where(.svelte-1w9c21y){margin:-16px}.bubble.svelte-1w9c21y{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1w9c21y{padding-top:8px;margin-bottom:auto}.empty.svelte-1w9c21y{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1w9c21y{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);font-size:.85rem;cursor:pointer}.save.svelte-1w9c21y:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1w9c21y{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1w9c21y{margin-top:8px}.panel.svelte-1w9c21y{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533}[data-playpilot-injection-key]{position:relative}[data-playpilot-injection-key].injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-4l9ehd *{box-sizing:border-box}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
3
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const tn=!1;var fn=Array.isArray,Qr=Array.prototype.indexOf,vn=Array.from,ei=Object.defineProperty,at=Object.getOwnPropertyDescriptor,ti=Object.getOwnPropertyDescriptors,ni=Object.prototype,ri=Array.prototype,Gn=Object.getPrototypeOf;function ii(e){return typeof e=="function"}const Ye=()=>{};function ai(e){for(var t=0;t<e.length;t++)e[t]()}function Mn(e,t,n=!1){return e===void 0?n?t():t:e}const Te=2,Zn=4,St=8,qt=16,Ce=32,Et=64,nn=128,et=256,Nt=512,we=1024,Ue=2048,Bt=4096,Le=8192,dt=16384,Jn=32768,ft=65536,li=1<<17,oi=1<<19,Xn=1<<20,pt=Symbol("$state"),si=Symbol("legacy props"),ci=Symbol("");function Qn(e){return e===this.v}function er(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ui(e,t){return e!==t}function _n(e){return!er(e,this.v)}function di(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function fi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function vi(e){throw new Error("https://svelte.dev/e/effect_orphan")}function _i(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function hi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function gi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function yi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let vt=!1,wi=!1;function ki(){vt=!0}const hn=1,mn=2,tr=4,bi=8,xi=16,Si=1,Ei=2,Ti=4,Ii=8,Ai=16,Ci=1,Pi=2,Li=4,Mi=1,Di=2,_e=Symbol(),nr="http://www.w3.org/2000/svg";function ye(e,t){var n={f:0,v:e,reactions:null,equals:Qn,rv:0,wv:0};return n}function F(e){return ji(ye(e))}function rr(e,t=!1){var r;const n=ye(e);return t||(n.equals=_n),vt&&G!==null&&G.l!==null&&((r=G.l).s??(r.s=[])).push(n),n}function ji(e){return $!==null&&$.f&Te&&(Me===null?Yi([e]):Me.push(e)),e}function L(e,t){return $!==null&&At()&&$.f&(Te|qt)&&(Me===null||!Me.includes(e))&&yi(),rn(e,t)}function rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=kr(),ir(e,Ue),At()&&q!==null&&q.f&we&&!(q.f&Ce)&&(fe!==null&&fe.includes(e)?(Oe(q,Ue),Yt(q)):Ve===null?$i([e]):Ve.push(e))),t}function ir(e,t){var n=e.reactions;if(n!==null)for(var r=At(),i=n.length,a=0;a<i;a++){var l=n[a],s=l.f;s&Ue||!r&&l===q||(Oe(l,t),s&(we|et)&&(s&Te?ir(l,Bt):Yt(l)))}}let Ni=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||pt in e)return e;const r=Gn(e);if(r!==ni&&r!==ri)return e;var i=new Map,a=fn(e),l=ye(0);a&&i.set("length",ye(e.length));var s;return new Proxy(e,{defineProperty(c,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&mi();var o=i.get(f);return o===void 0?(o=ye(d.value),i.set(f,o)):L(o,Y(d.value,s)),!0},deleteProperty(c,f){var d=i.get(f);if(d===void 0)f in c&&i.set(f,ye(_e));else{if(a&&typeof f=="string"){var o=i.get("length"),v=Number(f);Number.isInteger(v)&&v<o.v&&L(o,v)}L(d,_e),Dn(l)}return!0},get(c,f,d){var g;if(f===pt)return e;var o=i.get(f),v=f in c;if(o===void 0&&(!v||(g=at(c,f))!=null&&g.writable)&&(o=ye(Y(v?c[f]:_e,s)),i.set(f,o)),o!==void 0){var m=u(o);return m===_e?void 0:m}return Reflect.get(c,f,d)},getOwnPropertyDescriptor(c,f){var d=Reflect.getOwnPropertyDescriptor(c,f);if(d&&"value"in d){var o=i.get(f);o&&(d.value=u(o))}else if(d===void 0){var v=i.get(f),m=v==null?void 0:v.v;if(v!==void 0&&m!==_e)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(c,f){var m;if(f===pt)return!0;var d=i.get(f),o=d!==void 0&&d.v!==_e||Reflect.has(c,f);if(d!==void 0||q!==null&&(!o||(m=at(c,f))!=null&&m.writable)){d===void 0&&(d=ye(o?Y(c[f],s):_e),i.set(f,d));var v=u(d);if(v===_e)return!1}return o},set(c,f,d,o){var x;var v=i.get(f),m=f in c;if(a&&f==="length")for(var g=d;g<v.v;g+=1){var h=i.get(g+"");h!==void 0?L(h,_e):g in c&&(h=ye(_e),i.set(g+"",h))}v===void 0?(!m||(x=at(c,f))!=null&&x.writable)&&(v=ye(void 0),L(v,Y(d,s)),i.set(f,v)):(m=v.v!==_e,L(v,Y(d,s)));var p=Reflect.getOwnPropertyDescriptor(c,f);if(p!=null&&p.set&&p.set.call(o,d),!m){if(a&&typeof f=="string"){var y=i.get("length"),w=Number(f);Number.isInteger(w)&&w>=y.v&&L(y,w+1)}Dn(l)}return!0},ownKeys(c){u(l);var f=Reflect.ownKeys(c).filter(v=>{var m=i.get(v);return m===void 0||m.v!==_e});for(var[d,o]of i)o.v!==_e&&!(d in c)&&f.push(d);return f},setPrototypeOf(){gi()}})}function Dn(e,t=1){L(e,e.v+t)}var ve,ar,lr;function Oi(){if(ve===void 0){ve=window;var e=Element.prototype,t=Node.prototype;ar=at(t,"firstChild").get,lr=at(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Tt(e=""){return document.createTextNode(e)}function Ze(e){return ar.call(e)}function Vt(e){return lr.call(e)}function S(e,t){return Ze(e)}function ee(e,t){{var n=Ze(e);return n instanceof Comment&&n.data===""?Vt(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=Vt(r);return r}function Ri(e){e.textContent=""}function K(e){var t=Te|Ue;q===null?t|=et:q.f|=Xn;var n=$!==null&&$.f&Te?$:null;const r={children:null,ctx:G,deps:null,equals:Qn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??q};return n!==null&&(n.children??(n.children=[])).push(r),r}function Hi(e){const t=K(e);return t.equals=_n,t}function or(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&Te?gn(r):Ie(r)}}}function Fi(e){for(var t=e.parent;t!==null;){if(!(t.f&Te))return t;t=t.parent}return null}function sr(e){var t,n=q;xe(Fi(e));try{or(e),t=br(e)}finally{xe(n)}return t}function cr(e){var t=sr(e),n=(Ge||e.f&et)&&e.deps!==null?Bt:we;Oe(e,n),e.equals(t)||(e.v=t,e.wv=kr())}function gn(e){or(e),bt(e,0),Oe(e,dt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function qi(e){q===null&&$===null&&vi(),$!==null&&$.f&et&&fi(),yn&&di()}function Bi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function _t(e,t,n,r=!0){var i=(e&Et)!==0,a=q,l={ctx:G,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Ue,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=lt;try{jn(!0),Wt(l),l.f|=Jn}catch(d){throw Ie(l),d}finally{jn(s)}}else t!==null&&Yt(l);var c=n&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&Xn)===0;if(!c&&!i&&r&&(a!==null&&Bi(l,a),$!==null&&$.f&Te)){var f=$;(f.children??(f.children=[])).push(l)}return l}function Vi(e){const t=_t(St,null,!1);return Oe(t,we),t.teardown=e,t}function Ut(e){qi();var t=q!==null&&(q.f&Ce)!==0&&G!==null&&!G.m;if(t){var n=G;(n.e??(n.e=[])).push({fn:e,effect:q,reaction:$})}else{var r=Kt(e);return r}}function Ui(e){const t=_t(Et,e,!0);return(n={})=>new Promise(r=>{n.outro?st(t,()=>{Ie(t),r(void 0)}):(Ie(t),r(void 0))})}function Kt(e){return _t(Zn,e,!1)}function ur(e){return _t(St,e,!0)}function O(e){return tt(e)}function tt(e,t=0){return _t(St|qt|t,e,!0)}function Fe(e,t=!0){return _t(St|Ce,e,!0,t)}function dr(e){var t=e.teardown;if(t!==null){const n=yn,r=$;Nn(!0),je(null);try{t.call(null)}finally{Nn(n),je(r)}}}function fr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)gn(t[n])}}function vr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;Ie(n,t),n=r}}function Ki(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ce||Ie(t),t=n}}function Ie(e,t=!0){var n=!1;if((t||e.f&oi)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Vt(r);r.remove(),r=a}n=!0}vr(e,t&&!n),fr(e),bt(e,0),Oe(e,dt);var l=e.transitions;if(l!==null)for(const c of l)c.stop();dr(e);var s=e.parent;s!==null&&s.first!==null&&_r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function _r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function st(e,t){var n=[];pn(e,n,!0),hr(n,()=>{Ie(e),t&&t()})}function hr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function pn(e,t,n){if(!(e.f&Le)){if(e.f^=Le,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&ft)!==0||(r.f&Ce)!==0;pn(r,t,a?n:!1),r=i}}}function yt(e){mr(e,!0)}function mr(e,t){if(e.f&Le){Ct(e)&&Wt(e),e.f^=Le;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ft)!==0||(n.f&Ce)!==0;mr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Ot=!1,an=[];function gr(){Ot=!1;const e=an.slice();an=[],ai(e)}function It(e){Ot||(Ot=!0,queueMicrotask(gr)),an.push(e)}function zi(){Ot&&gr()}function pr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const yr=0,Wi=1;let Mt=!1,Dt=yr,wt=!1,kt=null,lt=!1,yn=!1;function jn(e){lt=e}function Nn(e){yn=e}let $e=[],ot=0;let $=null;function je(e){$=e}let q=null;function xe(e){q=e}let Me=null;function Yi(e){Me=e}let fe=null,pe=0,Ve=null;function $i(e){Ve=e}let wr=1,ln=0,Ge=!1,G=null;function kr(){return++wr}function At(){return!vt||G!==null&&G.l===null}function Ct(e){var f;var t=e.f;if(t&Ue)return!0;if(t&Bt){var n=e.deps,r=(t&et)!==0;if(n!==null){var i,a,l=(t&Nt)!==0,s=r&&q!==null&&!Ge,c=n.length;if(l||s){for(i=0;i<c;i++)a=n[i],(l||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);l&&(e.f^=Nt)}for(i=0;i<c;i++)if(a=n[i],Ct(a)&&cr(a),a.wv>e.wv)return!0}(!r||q!==null&&!Ge)&&Oe(e,we)}return!1}function Gi(e,t){for(var n=t;n!==null;){if(n.f&nn)try{n.fn(e);return}catch{n.f^=nn}n=n.parent}throw Mt=!1,e}function Zi(e){return(e.f&dt)===0&&(e.parent===null||(e.parent.f&nn)===0)}function zt(e,t,n,r){if(Mt){if(n===null&&(Mt=!1),Zi(t))throw e;return}n!==null&&(Mt=!0);{Gi(e,t);return}}function br(e){var v;var t=fe,n=pe,r=Ve,i=$,a=Ge,l=Me,s=G,c=e.f;fe=null,pe=0,Ve=null,$=c&(Ce|Et)?null:e,Ge=!lt&&(c&et)!==0,Me=null,G=e.ctx,ln++;try{var f=(0,e.fn)(),d=e.deps;if(fe!==null){var o;if(bt(e,pe),d!==null&&pe>0)for(d.length=pe+fe.length,o=0;o<fe.length;o++)d[pe+o]=fe[o];else e.deps=d=fe;if(!Ge)for(o=pe;o<d.length;o++)((v=d[o]).reactions??(v.reactions=[])).push(e)}else d!==null&&pe<d.length&&(bt(e,pe),d.length=pe);return f}finally{fe=t,pe=n,Ve=r,$=i,Ge=a,Me=l,G=s}}function Ji(e,t){let n=t.reactions;if(n!==null){var r=Qr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&Te&&(fe===null||!fe.includes(t))&&(Oe(t,Bt),t.f&(et|Nt)||(t.f^=Nt),bt(t,0))}function bt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ji(e,n[r])}function Wt(e){var t=e.f;if(!(t&dt)){Oe(e,we);var n=q,r=G;q=e;try{t&qt?Ki(e):vr(e),fr(e),dr(e);var i=br(e);e.teardown=typeof i=="function"?i:null,e.wv=wr;var a=e.deps,l;tn&&wi&&e.f&Ue}catch(s){zt(s,e,n,r||e.ctx)}finally{q=n}}}function xr(){if(ot>1e3){ot=0;try{_i()}catch(e){if(kt!==null)zt(e,kt,null);else throw e}}ot++}function Sr(e){var t=e.length;if(t!==0){xr();var n=lt;lt=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&we||(i.f^=we);var a=[];Er(i,a),Xi(a)}}finally{lt=n}}}function Xi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(dt|Le)))try{Ct(r)&&(Wt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?_r(r):r.fn=null))}catch(i){zt(i,r,null,r.ctx)}}}function Qi(){if(wt=!1,ot>1001)return;const e=$e;$e=[],Sr(e),wt||(ot=0,kt=null)}function Yt(e){Dt===yr&&(wt||(wt=!0,queueMicrotask(Qi))),kt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Et|Ce)){if(!(n&we))return;t.f^=we}}$e.push(t)}function Er(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&Ce)!==0,l=a&&(i&we)!==0,s=n.next;if(!l&&!(i&Le))if(i&St){if(a)n.f^=we;else try{Ct(n)&&Wt(n)}catch(o){zt(o,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else i&Zn&&r.push(n);if(s===null){let o=n.parent;for(;o!==null;){if(e===o)break e;var f=o.next;if(f!==null){n=f;continue e}o=o.parent}}n=s}for(var d=0;d<r.length;d++)c=r[d],t.push(c),Er(c,t)}function Tr(e){var t=Dt,n=$e;try{xr();const i=[];Dt=Wi,$e=i,wt=!1,Sr(n);var r=e==null?void 0:e();return zi(),($e.length>0||i.length>0)&&Tr(),ot=0,kt=null,r}finally{Dt=t,$e=n}}async function On(){await Promise.resolve(),Tr()}function u(e){var d;var t=e.f,n=(t&Te)!==0;if(n&&t&dt){var r=sr(e);return gn(e),r}if($!==null){Me!==null&&Me.includes(e)&&pi();var i=$.deps;e.rv<ln&&(e.rv=ln,fe===null&&i!==null&&i[pe]===e?pe++:fe===null?fe=[e]:fe.push(e),Ve!==null&&q!==null&&q.f&we&&!(q.f&Ce)&&Ve.includes(e)&&(Oe(q,Ue),Yt(q)))}else if(n&&e.deps===null)for(var a=e,l=a.parent,s=a;l!==null;)if(l.f&Te){var c=l;s=c,l=c.parent}else{var f=l;(d=f.deriveds)!=null&&d.includes(s)||(f.deriveds??(f.deriveds=[])).push(s);break}return n&&(a=e,Ct(a)&&cr(a)),e.v}function Je(e){const t=$;try{return $=null,e()}finally{$=t}}const ea=-7169;function Oe(e,t){e.f=e.f&ea|t}function ta(e){return Ar().get(e)}function Ir(e,t){return Ar().set(e,t),t}function Ar(e){return G===null&&pr(),G.c??(G.c=new Map(na(G)||void 0))}function na(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){G={p:G,c:null,e:null,m:!1,s:e,x:null,l:null},vt&&!t&&(G.l={s:null,u:null,r1:[],r2:ye(!1)})}function ie(e){const t=G;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var n=q,r=$;t.e=null;try{for(var i=0;i<l.length;i++){var a=l[i];xe(a.effect),je(a.reaction),Kt(a.fn)}}finally{xe(n),je(r)}}G=t.p,t.m=!0}return e||{}}function ra(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const ia=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function aa(e){return ia.includes(e)}const la={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function oa(e){return e=e.toLowerCase(),la[e]??e}const sa=["touchstart","touchmove"];function ca(e){return sa.includes(e)}function ua(e,t){if(t){const n=document.body;e.autofocus=!0,It(()=>{document.activeElement===n&&e.focus()})}}let Rn=!1;function da(){Rn||(Rn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Cr(e){var t=$,n=q;je(null),xe(null);try{return e()}finally{je(t),xe(n)}}function fa(e,t,n,r=n){e.addEventListener(t,()=>Cr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),da()}const Pr=new Set,on=new Set;function Lr(e,t,n,r){function i(a){if(r.capture||gt.call(t,a),!a.cancelBubble)return Cr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?It(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function se(e,t,n,r,i){var a={capture:r,passive:i},l=Lr(e,t,n,a);(t===document.body||t===window||t===document)&&Vi(()=>{t.removeEventListener(e,l,a)})}function ue(e){for(var t=0;t<e.length;t++)Pr.add(e[t]);for(var n of on)n(e)}function gt(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,l=0,s=e.__root;if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;c<=f&&(l=c)}if(a=i[l]||e.target,a!==t){ei(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=$,o=q;je(null),xe(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+r];if(h!==void 0&&!a.disabled)if(fn(h)){var[p,...y]=h;p.apply(a,[e,...y])}else h.call(a,e)}catch(x){v?m.push(x):v=x}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let x of m)queueMicrotask(()=>{throw x});throw v}}finally{e.__root=t,delete e.currentTarget,je(d),xe(o)}}}function wn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=q;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&Mi)!==0,r=(t&Di)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=wn(a?e:"<!>"+e),n||(i=Ze(i)));var l=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var s=Ze(l),c=l.lastChild;Xe(s,c)}else Xe(l,l);return l}}function Pe(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var l=wn(i),s=Ze(l);a=Ze(s)}var c=a.cloneNode(!0);return Xe(c,c),c}}function Ke(e=""){{var t=Tt(e+"");return Xe(t,t),t}}function ze(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),Xe(t,n),e}function b(e,t){e!==null&&e.before(t)}let Rt=!0;function Hn(e){Rt=e}function z(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function kn(e,t){return va(e,t)}const rt=new Map;function va(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:l=!0}){Oi();var s=new Set,c=o=>{for(var v=0;v<o.length;v++){var m=o[v];if(!s.has(m)){s.add(m);var g=ca(m);t.addEventListener(m,gt,{passive:g});var h=rt.get(m);h===void 0?(document.addEventListener(m,gt,{passive:g}),rt.set(m,1)):rt.set(m,h+1)}}};c(vn(Pr)),on.add(c);var f=void 0,d=Ui(()=>{var o=n??t.appendChild(Tt());return Fe(()=>{if(a){re({});var v=G;v.c=a}i&&(r.$$events=i),Rt=l,f=e(o,r)||{},Rt=!0,a&&ie()}),()=>{var g;for(var v of s){t.removeEventListener(v,gt);var m=rt.get(v);--m===0?(document.removeEventListener(v,gt),rt.delete(v)):rt.set(v,m)}on.delete(c),o!==n&&((g=o.parentNode)==null||g.removeChild(o))}});return sn.set(f,d),f}let sn=new WeakMap;function Mr(e,t){const n=sn.get(e);return n?(sn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var r=e,i=null,a=null,l=_e,s=n?ft:0,c=!1;const f=(o,v=!0)=>{c=!0,d(v,o)},d=(o,v)=>{l!==(l=o)&&(l?(i?yt(i):v&&(i=Fe(()=>v(r))),a&&st(a,()=>{a=null})):(a?yt(a):v&&(a=Fe(()=>v(r))),i&&st(i,()=>{i=null})))};tt(()=>{c=!1,t(f),c||d(null,null)},s)}function Dr(e,t,n){var r=e,i=_e,a,l=At()?ui:er;tt(()=>{l(i,i=t())&&(a&&st(a),a=Fe(()=>n(r)))})}function xt(e,t){return t}function _a(e,t,n,r){for(var i=[],a=t.length,l=0;l<a;l++)pn(t[l].e,i,!0);var s=a>0&&i.length===0&&n!==null;if(s){var c=n.parentNode;Ri(c),c.append(n),r.clear(),Be(e,t[0].prev,t[a-1].next)}hr(i,()=>{for(var f=0;f<a;f++){var d=t[f];s||(r.delete(d.k),Be(e,d.prev,d.next)),Ie(d.e,!s)}})}function Qe(e,t,n,r,i,a=null){var l=e,s={flags:t,items:new Map,first:null},c=(t&tr)!==0;if(c){var f=e;l=f.appendChild(Tt())}var d=null,o=!1;tt(()=>{var v=n(),m=fn(v)?v:v==null?[]:vn(v),g=m.length;if(!(o&&g===0)){o=g===0;{var h=$;ha(m,s,l,i,t,(h.f&Le)!==0,r)}a!==null&&(g===0?d?yt(d):d=Fe(()=>a(l)):d!==null&&st(d,()=>{d=null})),n()}})}function ha(e,t,n,r,i,a,l,s){var V,U,ae,ke;var c=(i&bi)!==0,f=(i&(hn|mn))!==0,d=e.length,o=t.items,v=t.first,m=v,g,h=null,p,y=[],w=[],x,C,k,E;if(c)for(E=0;E<d;E+=1)x=e[E],C=l(x,E),k=o.get(C),k!==void 0&&((V=k.a)==null||V.measure(),(p??(p=new Set)).add(k));for(E=0;E<d;E+=1){if(x=e[E],C=l(x,E),k=o.get(C),k===void 0){var j=m?m.e.nodes_start:n;h=ga(j,t,h,h===null?t.first:h.next,x,C,E,r,i),o.set(C,h),y=[],w=[],m=h.next;continue}if(f&&ma(k,x,E,i),k.e.f&Le&&(yt(k.e),c&&((U=k.a)==null||U.unfix(),(p??(p=new Set)).delete(k))),k!==m){if(g!==void 0&&g.has(k)){if(y.length<w.length){var T=w[0],P;h=T.prev;var N=y[0],B=y[y.length-1];for(P=0;P<y.length;P+=1)Fn(y[P],T,n);for(P=0;P<w.length;P+=1)g.delete(w[P]);Be(t,N.prev,B.next),Be(t,h,N),Be(t,B,T),m=T,h=B,E-=1,y=[],w=[]}else g.delete(k),Fn(k,m,n),Be(t,k.prev,k.next),Be(t,k,h===null?t.first:h.next),Be(t,h,k),h=k;continue}for(y=[],w=[];m!==null&&m.k!==C;)(a||!(m.e.f&Le))&&(g??(g=new Set)).add(m),w.push(m),m=m.next;if(m===null)continue;k=m}y.push(k),h=k,m=k.next}if(m!==null||g!==void 0){for(var W=g===void 0?[]:vn(g);m!==null;)(a||!(m.e.f&Le))&&W.push(m),m=m.next;var X=W.length;if(X>0){var te=i&tr&&d===0?n:null;if(c){for(E=0;E<X;E+=1)(ae=W[E].a)==null||ae.measure();for(E=0;E<X;E+=1)(ke=W[E].a)==null||ke.fix()}_a(t,W,te,o)}}c&&It(()=>{var ge;if(p!==void 0)for(k of p)(ge=k.a)==null||ge.apply()}),q.first=t.first&&t.first.e,q.last=h&&h.e}function ma(e,t,n,r){r&hn&&rn(e.v,t),r&mn?rn(e.i,n):e.i=n}function ga(e,t,n,r,i,a,l,s,c,f){var d=(c&hn)!==0,o=(c&xi)===0,v=d?o?rr(i):ye(i):i,m=c&mn?ye(l):l,g={i:m,v,k:a,a:null,e:null,prev:n,next:r};try{return g.e=Fe(()=>s(e,v,m),Ni),g.e.prev=n&&n.e,g.e.next=r&&r.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),r!==null&&(r.prev=g,r.e.prev=g.e),g}finally{}}function Fn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var l=Vt(a);i.before(a),a=l}}function Be(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function pa(e,t,n,r,i){var a=e,l="",s;tt(()=>{l!==(l=t()??"")&&(s!==void 0&&(Ie(s),s=void 0),l!==""&&(s=Fe(()=>{var c=l+"",f=wn(c);Xe(Ze(f),f.lastChild),a.before(f)})))})}function ht(e,t,...n){var r=e,i=Ye,a;tt(()=>{i!==(i=t())&&(a&&(Ie(a),a=null),a=Fe(()=>i(r,...n)))},ft)}function ya(e,t,n,r,i,a){var l,s,c=null,f=e,d;tt(()=>{const o=t()||null;var v=o==="svg"?nr:null;o!==l&&(d&&(o===null?st(d,()=>{d=null,s=null}):o===s?yt(d):(Ie(d),Hn(!1))),o&&o!==s&&(d=Fe(()=>{c=v?document.createElementNS(v,o):document.createElement(o),Xe(c,c);{var m=c.appendChild(Tt());r(c,m)}q.nodes_end=c,f.before(c)})),l=o,l&&(s=l),Hn(!0))},ft)}function jr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jr(e))&&(r&&(r+=" "),r+=t);return r}function ka(e){return typeof e=="object"?wa(e):e??""}function ba(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ne(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[ci]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Nr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function xa(e,t,n,r,i=!1,a=!1,l=!1){var s=t||{},c=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=ka(n.class)),n.class=n.class?n.class+" "+r:r;var d=Nr(e),o=e.__attributes??(e.__attributes={});for(const w in n){let x=n[w];if(c&&w==="value"&&x==null){e.value=e.__value="",s[w]=x;continue}var v=s[w];if(x!==v){s[w]=x;var m=w[0]+w[1];if(m!=="$$"){if(m==="on"){const C={},k="$$"+w;let E=w.slice(2);var g=aa(E);if(ra(E)&&(E=E.slice(0,-7),C.capture=!0),!g&&v){if(x!=null)continue;e.removeEventListener(E,s[k],C),s[k]=null}if(x!=null)if(g)e[`__${E}`]=x,ue([E]);else{let j=function(T){s[w].call(this,T)};var y=j;s[k]=Lr(E,e,j,C)}else g&&(e[`__${E}`]=void 0)}else if(w==="style"&&x!=null)e.style.cssText=x+"";else if(w==="autofocus")ua(e,!!x);else if(w==="__value"||w==="value"&&x!=null)e.value=e[w]=e.__value=x;else if(w==="selected"&&c)ba(e,x);else{var h=w;i||(h=oa(h));var p=h==="defaultValue"||h==="defaultChecked";if(x==null&&!a&&!p)if(o[w]=null,h==="value"||h==="checked"){let C=e;if(h==="value"){let k=C.defaultValue;C.removeAttribute(h),C.defaultValue=k}else{let k=C.defaultChecked;C.removeAttribute(h),C.defaultChecked=k}}else e.removeAttribute(w);else p||d.includes(h)&&(a||typeof x!="string")?e[h]=x:typeof x!="function"&&ne(e,h,x)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var qn=new Map;function Nr(e){var t=qn.get(e.nodeName);if(t)return t;qn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=ti(r);for(var a in n)n[a].set&&t.push(a);r=Gn(r)}return t}function oe(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function $t(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Sa=()=>performance.now(),He={tick:e=>requestAnimationFrame(e),now:()=>Sa(),tasks:new Set};function Or(){const e=He.now();He.tasks.forEach(t=>{t.c(e)||(He.tasks.delete(t),t.f())}),He.tasks.size!==0&&He.tick(Or)}function Ea(e){let t;return He.tasks.size===0&&He.tick(Or),{promise:new Promise(n=>{He.tasks.add(t={c:e,f:n})}),abort(){He.tasks.delete(t)}}}function Pt(e,t){e.dispatchEvent(new CustomEvent(t))}function Ta(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Bn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const l=Ta(i.trim());t[l]=a.trim()}return t}const Ia=e=>e;function De(e,t,n,r){var i=(e&Ci)!==0,a=(e&Pi)!==0,l=i&&a,s=(e&Li)!==0,c=l?"both":i?"in":"out",f,d=t.inert,o,v;function m(){var w=$,x=q;je(null),xe(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:c}))}finally{je(w),xe(x)}}var g={is_global:s,in(){var w;if(t.inert=d,!i){v==null||v.abort(),(w=v==null?void 0:v.reset)==null||w.call(v);return}a||o==null||o.abort(),Pt(t,"introstart"),o=cn(t,m(),v,1,()=>{Pt(t,"introend"),o==null||o.abort(),o=f=void 0})},out(w){if(!a){w==null||w(),f=void 0;return}t.inert=!0,Pt(t,"outrostart"),v=cn(t,m(),o,0,()=>{Pt(t,"outroend"),w==null||w()})},stop:()=>{o==null||o.abort(),v==null||v.abort()}},h=q;if((h.transitions??(h.transitions=[])).push(g),i&&Rt){var p=s;if(!p){for(var y=h.parent;y&&y.f&ft;)for(;(y=y.parent)&&!(y.f&qt););p=!y||(y.f&Jn)!==0}p&&Kt(()=>{Je(()=>g.in())})}}function cn(e,t,n,r,i){var a=r===1;if(ii(t)){var l,s=!1;return It(()=>{if(!s){var p=t({direction:a?"in":"out"});l=cn(e,p,n,r,i)}}),{abort:()=>{s=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:Ye,deactivate:Ye,reset:Ye,t:()=>r};const{delay:c=0,css:f,tick:d,easing:o=Ia}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),f)){var m=Bn(f(0,1));v.push(m,m)}var g=()=>1-r,h=e.animate(v,{duration:c});return h.onfinish=()=>{var p=(n==null?void 0:n.t())??1-r;n==null||n.abort();var y=r-p,w=t.duration*Math.abs(y),x=[];if(w>0){if(f)for(var C=Math.ceil(w/16.666666666666668),k=0;k<=C;k+=1){var E=p+y*o(k/C),j=f(E,1-E);x.push(Bn(j))}g=()=>{var T=h.currentTime;return p+y*o(T/w)},d&&Ea(()=>{if(h.playState!=="running")return!1;var T=g();return d(T,1-T),!0})}h=e.animate(x,{duration:w,fill:"forwards"}),h.onfinish=()=>{g=()=>r,d==null||d(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=Ye)},deactivate:()=>{i=Ye},reset:()=>{r===0&&(d==null||d(1,0))},t:()=>g()}}function Aa(e,t,n=t){var r=At();fa(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=Xt(e)?Qt(a):a,n(a),r&&a!==(a=t())){var l=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(s,e.value.length))}}),Je(t)==null&&e.value&&n(Xt(e)?Qt(e.value):e.value),ur(()=>{var i=t();Xt(e)&&i===Qt(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Xt(e){var t=e.type;return t==="number"||t==="range"}function Qt(e){return e===""?null:+e}function Vn(e,t){return e===t||(e==null?void 0:e[pt])===t}function ct(e={},t,n,r){return Kt(()=>{var i,a;return ur(()=>{i=a,a=[],Je(()=>{e!==n(...a)&&(t(e,...a),i&&Vn(n(...i),e)&&t(null,...i))})}),()=>{It(()=>{a&&Vn(n(...a),e)&&t(null,...a)})}}),e}let Lt=!1;function Ca(e){var t=Lt;try{return Lt=!1,[e(),Lt]}finally{Lt=t}}const Pa={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function La(e,t,n){return new Proxy({props:e,exclude:t},Pa)}function Un(e){for(var t=q,n=q;t!==null&&!(t.f&(Ce|Et));)t=t.parent;try{return xe(t),e()}finally{xe(n)}}function R(e,t,n,r){var j;var i=(n&Si)!==0,a=!vt||(n&Ei)!==0,l=(n&Ii)!==0,s=(n&Ai)!==0,c=!1,f;l?[f,c]=Ca(()=>e[t]):f=e[t];var d=pt in e||si in e,o=l&&(((j=at(e,t))==null?void 0:j.set)??(d&&t in e&&(T=>e[t]=T)))||void 0,v=r,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,s?v=Je(r):v=r),v);f===void 0&&r!==void 0&&(o&&a&&hi(),f=h(),o&&o(f));var p;if(a)p=()=>{var T=e[t];return T===void 0?h():(m=!0,g=!1,T)};else{var y=Un(()=>(i?K:Hi)(()=>e[t]));y.f|=li,p=()=>{var T=u(y);return T!==void 0&&(v=void 0),T===void 0?v:T}}if(!(n&Ti))return p;if(o){var w=e.$$legacy;return function(T,P){return arguments.length>0?((!a||!P||w||c)&&o(P?p():T),T):p()}}var x=!1,C=!1,k=rr(f),E=Un(()=>K(()=>{var T=p(),P=u(k);return x?(x=!1,C=!0,P):(C=!1,k.v=T)}));return i||(E.equals=_n),function(T,P){if(arguments.length>0){const N=P?u(E):a&&l?Y(T):T;return E.equals(N)||(x=!0,L(k,N),g&&v!==void 0&&(v=N),Je(()=>u(E))),T}return u(E)}}function nt(e){G===null&&pr(),vt&&G.l!==null?Ma(G).m.push(e):Ut(()=>{const t=Je(e);if(typeof t=="function")return t})}function Ma(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Da="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Da);const Rr="https://www.playpilot.com",Gt="https://partner-api.playpilot.tech/1.0.0",Hr="EncryptedToken",ja="articleReplacementEditToken";async function Fr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=Jt();if(!n)throw new Error("No token was provided");const r=qr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(Gt+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return Na(r),!0}catch(n){console.error(n)}return!1}function qr(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(ja);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Hr}=`).pop())==null?void 0:i.split(";")[0])||""}function Na(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Hr+"="+e+";"+r+";path=/"}function Br(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Vr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),Oa={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function he(e,t=Ur()){var n;return((n=Oa[e])==null?void 0:n[t])||e}function Ur(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:_.English}const Ae=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed"}),Ra="https://insights.playpilot.net";async function Ne(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(Ra,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Ha=e=>e;function bn(e){const t=e-1;return t*t*t+1}function Kn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Kr(e,{delay:t=0,duration:n=400,easing:r=Ha}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function Zt(e,{delay:t=0,duration:n=400,easing:r=bn,x:i=0,y:a=0,opacity:l=0}={}){const s=getComputedStyle(e),c=+s.opacity,f=s.transform==="none"?"":s.transform,d=c*(1-l),[o,v]=Kn(i),[m,g]=Kn(a);return{delay:t,duration:n,easing:r,css:(h,p)=>`
3
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const tn=!1;var fn=Array.isArray,Qr=Array.prototype.indexOf,vn=Array.from,ei=Object.defineProperty,at=Object.getOwnPropertyDescriptor,ti=Object.getOwnPropertyDescriptors,ni=Object.prototype,ri=Array.prototype,Gn=Object.getPrototypeOf;function ii(e){return typeof e=="function"}const Ye=()=>{};function ai(e){for(var t=0;t<e.length;t++)e[t]()}function Mn(e,t,n=!1){return e===void 0?n?t():t:e}const Te=2,Zn=4,St=8,qt=16,Ce=32,Et=64,nn=128,et=256,Nt=512,we=1024,Ue=2048,Bt=4096,Le=8192,dt=16384,Jn=32768,ft=65536,li=1<<17,oi=1<<19,Xn=1<<20,pt=Symbol("$state"),si=Symbol("legacy props"),ci=Symbol("");function Qn(e){return e===this.v}function er(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ui(e,t){return e!==t}function _n(e){return!er(e,this.v)}function di(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function fi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function vi(e){throw new Error("https://svelte.dev/e/effect_orphan")}function _i(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function hi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function gi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function yi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let vt=!1,wi=!1;function ki(){vt=!0}const hn=1,mn=2,tr=4,bi=8,xi=16,Si=1,Ei=2,Ti=4,Ii=8,Ai=16,Ci=1,Pi=2,Li=4,Mi=1,Di=2,_e=Symbol(),nr="http://www.w3.org/2000/svg";function ye(e,t){var n={f:0,v:e,reactions:null,equals:Qn,rv:0,wv:0};return n}function F(e){return ji(ye(e))}function rr(e,t=!1){var r;const n=ye(e);return t||(n.equals=_n),vt&&G!==null&&G.l!==null&&((r=G.l).s??(r.s=[])).push(n),n}function ji(e){return $!==null&&$.f&Te&&(Me===null?Yi([e]):Me.push(e)),e}function L(e,t){return $!==null&&At()&&$.f&(Te|qt)&&(Me===null||!Me.includes(e))&&yi(),rn(e,t)}function rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=kr(),ir(e,Ue),At()&&q!==null&&q.f&we&&!(q.f&Ce)&&(fe!==null&&fe.includes(e)?(Oe(q,Ue),Yt(q)):Ve===null?$i([e]):Ve.push(e))),t}function ir(e,t){var n=e.reactions;if(n!==null)for(var r=At(),i=n.length,a=0;a<i;a++){var l=n[a],s=l.f;s&Ue||!r&&l===q||(Oe(l,t),s&(we|et)&&(s&Te?ir(l,Bt):Yt(l)))}}let Ni=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||pt in e)return e;const r=Gn(e);if(r!==ni&&r!==ri)return e;var i=new Map,a=fn(e),l=ye(0);a&&i.set("length",ye(e.length));var s;return new Proxy(e,{defineProperty(c,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&mi();var o=i.get(f);return o===void 0?(o=ye(d.value),i.set(f,o)):L(o,Y(d.value,s)),!0},deleteProperty(c,f){var d=i.get(f);if(d===void 0)f in c&&i.set(f,ye(_e));else{if(a&&typeof f=="string"){var o=i.get("length"),v=Number(f);Number.isInteger(v)&&v<o.v&&L(o,v)}L(d,_e),Dn(l)}return!0},get(c,f,d){var g;if(f===pt)return e;var o=i.get(f),v=f in c;if(o===void 0&&(!v||(g=at(c,f))!=null&&g.writable)&&(o=ye(Y(v?c[f]:_e,s)),i.set(f,o)),o!==void 0){var m=u(o);return m===_e?void 0:m}return Reflect.get(c,f,d)},getOwnPropertyDescriptor(c,f){var d=Reflect.getOwnPropertyDescriptor(c,f);if(d&&"value"in d){var o=i.get(f);o&&(d.value=u(o))}else if(d===void 0){var v=i.get(f),m=v==null?void 0:v.v;if(v!==void 0&&m!==_e)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(c,f){var m;if(f===pt)return!0;var d=i.get(f),o=d!==void 0&&d.v!==_e||Reflect.has(c,f);if(d!==void 0||q!==null&&(!o||(m=at(c,f))!=null&&m.writable)){d===void 0&&(d=ye(o?Y(c[f],s):_e),i.set(f,d));var v=u(d);if(v===_e)return!1}return o},set(c,f,d,o){var x;var v=i.get(f),m=f in c;if(a&&f==="length")for(var g=d;g<v.v;g+=1){var h=i.get(g+"");h!==void 0?L(h,_e):g in c&&(h=ye(_e),i.set(g+"",h))}v===void 0?(!m||(x=at(c,f))!=null&&x.writable)&&(v=ye(void 0),L(v,Y(d,s)),i.set(f,v)):(m=v.v!==_e,L(v,Y(d,s)));var p=Reflect.getOwnPropertyDescriptor(c,f);if(p!=null&&p.set&&p.set.call(o,d),!m){if(a&&typeof f=="string"){var y=i.get("length"),w=Number(f);Number.isInteger(w)&&w>=y.v&&L(y,w+1)}Dn(l)}return!0},ownKeys(c){u(l);var f=Reflect.ownKeys(c).filter(v=>{var m=i.get(v);return m===void 0||m.v!==_e});for(var[d,o]of i)o.v!==_e&&!(d in c)&&f.push(d);return f},setPrototypeOf(){gi()}})}function Dn(e,t=1){L(e,e.v+t)}var ve,ar,lr;function Oi(){if(ve===void 0){ve=window;var e=Element.prototype,t=Node.prototype;ar=at(t,"firstChild").get,lr=at(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Tt(e=""){return document.createTextNode(e)}function Ze(e){return ar.call(e)}function Vt(e){return lr.call(e)}function S(e,t){return Ze(e)}function ee(e,t){{var n=Ze(e);return n instanceof Comment&&n.data===""?Vt(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=Vt(r);return r}function Ri(e){e.textContent=""}function K(e){var t=Te|Ue;q===null?t|=et:q.f|=Xn;var n=$!==null&&$.f&Te?$:null;const r={children:null,ctx:G,deps:null,equals:Qn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??q};return n!==null&&(n.children??(n.children=[])).push(r),r}function Hi(e){const t=K(e);return t.equals=_n,t}function or(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&Te?gn(r):Ie(r)}}}function Fi(e){for(var t=e.parent;t!==null;){if(!(t.f&Te))return t;t=t.parent}return null}function sr(e){var t,n=q;xe(Fi(e));try{or(e),t=br(e)}finally{xe(n)}return t}function cr(e){var t=sr(e),n=(Ge||e.f&et)&&e.deps!==null?Bt:we;Oe(e,n),e.equals(t)||(e.v=t,e.wv=kr())}function gn(e){or(e),bt(e,0),Oe(e,dt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function qi(e){q===null&&$===null&&vi(),$!==null&&$.f&et&&fi(),yn&&di()}function Bi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function _t(e,t,n,r=!0){var i=(e&Et)!==0,a=q,l={ctx:G,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Ue,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=lt;try{jn(!0),Wt(l),l.f|=Jn}catch(d){throw Ie(l),d}finally{jn(s)}}else t!==null&&Yt(l);var c=n&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&Xn)===0;if(!c&&!i&&r&&(a!==null&&Bi(l,a),$!==null&&$.f&Te)){var f=$;(f.children??(f.children=[])).push(l)}return l}function Vi(e){const t=_t(St,null,!1);return Oe(t,we),t.teardown=e,t}function Ut(e){qi();var t=q!==null&&(q.f&Ce)!==0&&G!==null&&!G.m;if(t){var n=G;(n.e??(n.e=[])).push({fn:e,effect:q,reaction:$})}else{var r=Kt(e);return r}}function Ui(e){const t=_t(Et,e,!0);return(n={})=>new Promise(r=>{n.outro?st(t,()=>{Ie(t),r(void 0)}):(Ie(t),r(void 0))})}function Kt(e){return _t(Zn,e,!1)}function ur(e){return _t(St,e,!0)}function O(e){return tt(e)}function tt(e,t=0){return _t(St|qt|t,e,!0)}function Fe(e,t=!0){return _t(St|Ce,e,!0,t)}function dr(e){var t=e.teardown;if(t!==null){const n=yn,r=$;Nn(!0),je(null);try{t.call(null)}finally{Nn(n),je(r)}}}function fr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)gn(t[n])}}function vr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;Ie(n,t),n=r}}function Ki(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ce||Ie(t),t=n}}function Ie(e,t=!0){var n=!1;if((t||e.f&oi)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Vt(r);r.remove(),r=a}n=!0}vr(e,t&&!n),fr(e),bt(e,0),Oe(e,dt);var l=e.transitions;if(l!==null)for(const c of l)c.stop();dr(e);var s=e.parent;s!==null&&s.first!==null&&_r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function _r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function st(e,t){var n=[];pn(e,n,!0),hr(n,()=>{Ie(e),t&&t()})}function hr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function pn(e,t,n){if(!(e.f&Le)){if(e.f^=Le,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&ft)!==0||(r.f&Ce)!==0;pn(r,t,a?n:!1),r=i}}}function yt(e){mr(e,!0)}function mr(e,t){if(e.f&Le){Ct(e)&&Wt(e),e.f^=Le;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ft)!==0||(n.f&Ce)!==0;mr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Ot=!1,an=[];function gr(){Ot=!1;const e=an.slice();an=[],ai(e)}function It(e){Ot||(Ot=!0,queueMicrotask(gr)),an.push(e)}function zi(){Ot&&gr()}function pr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const yr=0,Wi=1;let Mt=!1,Dt=yr,wt=!1,kt=null,lt=!1,yn=!1;function jn(e){lt=e}function Nn(e){yn=e}let $e=[],ot=0;let $=null;function je(e){$=e}let q=null;function xe(e){q=e}let Me=null;function Yi(e){Me=e}let fe=null,pe=0,Ve=null;function $i(e){Ve=e}let wr=1,ln=0,Ge=!1,G=null;function kr(){return++wr}function At(){return!vt||G!==null&&G.l===null}function Ct(e){var f;var t=e.f;if(t&Ue)return!0;if(t&Bt){var n=e.deps,r=(t&et)!==0;if(n!==null){var i,a,l=(t&Nt)!==0,s=r&&q!==null&&!Ge,c=n.length;if(l||s){for(i=0;i<c;i++)a=n[i],(l||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);l&&(e.f^=Nt)}for(i=0;i<c;i++)if(a=n[i],Ct(a)&&cr(a),a.wv>e.wv)return!0}(!r||q!==null&&!Ge)&&Oe(e,we)}return!1}function Gi(e,t){for(var n=t;n!==null;){if(n.f&nn)try{n.fn(e);return}catch{n.f^=nn}n=n.parent}throw Mt=!1,e}function Zi(e){return(e.f&dt)===0&&(e.parent===null||(e.parent.f&nn)===0)}function zt(e,t,n,r){if(Mt){if(n===null&&(Mt=!1),Zi(t))throw e;return}n!==null&&(Mt=!0);{Gi(e,t);return}}function br(e){var v;var t=fe,n=pe,r=Ve,i=$,a=Ge,l=Me,s=G,c=e.f;fe=null,pe=0,Ve=null,$=c&(Ce|Et)?null:e,Ge=!lt&&(c&et)!==0,Me=null,G=e.ctx,ln++;try{var f=(0,e.fn)(),d=e.deps;if(fe!==null){var o;if(bt(e,pe),d!==null&&pe>0)for(d.length=pe+fe.length,o=0;o<fe.length;o++)d[pe+o]=fe[o];else e.deps=d=fe;if(!Ge)for(o=pe;o<d.length;o++)((v=d[o]).reactions??(v.reactions=[])).push(e)}else d!==null&&pe<d.length&&(bt(e,pe),d.length=pe);return f}finally{fe=t,pe=n,Ve=r,$=i,Ge=a,Me=l,G=s}}function Ji(e,t){let n=t.reactions;if(n!==null){var r=Qr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&Te&&(fe===null||!fe.includes(t))&&(Oe(t,Bt),t.f&(et|Nt)||(t.f^=Nt),bt(t,0))}function bt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ji(e,n[r])}function Wt(e){var t=e.f;if(!(t&dt)){Oe(e,we);var n=q,r=G;q=e;try{t&qt?Ki(e):vr(e),fr(e),dr(e);var i=br(e);e.teardown=typeof i=="function"?i:null,e.wv=wr;var a=e.deps,l;tn&&wi&&e.f&Ue}catch(s){zt(s,e,n,r||e.ctx)}finally{q=n}}}function xr(){if(ot>1e3){ot=0;try{_i()}catch(e){if(kt!==null)zt(e,kt,null);else throw e}}ot++}function Sr(e){var t=e.length;if(t!==0){xr();var n=lt;lt=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&we||(i.f^=we);var a=[];Er(i,a),Xi(a)}}finally{lt=n}}}function Xi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(dt|Le)))try{Ct(r)&&(Wt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?_r(r):r.fn=null))}catch(i){zt(i,r,null,r.ctx)}}}function Qi(){if(wt=!1,ot>1001)return;const e=$e;$e=[],Sr(e),wt||(ot=0,kt=null)}function Yt(e){Dt===yr&&(wt||(wt=!0,queueMicrotask(Qi))),kt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Et|Ce)){if(!(n&we))return;t.f^=we}}$e.push(t)}function Er(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&Ce)!==0,l=a&&(i&we)!==0,s=n.next;if(!l&&!(i&Le))if(i&St){if(a)n.f^=we;else try{Ct(n)&&Wt(n)}catch(o){zt(o,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else i&Zn&&r.push(n);if(s===null){let o=n.parent;for(;o!==null;){if(e===o)break e;var f=o.next;if(f!==null){n=f;continue e}o=o.parent}}n=s}for(var d=0;d<r.length;d++)c=r[d],t.push(c),Er(c,t)}function Tr(e){var t=Dt,n=$e;try{xr();const i=[];Dt=Wi,$e=i,wt=!1,Sr(n);var r=e==null?void 0:e();return zi(),($e.length>0||i.length>0)&&Tr(),ot=0,kt=null,r}finally{Dt=t,$e=n}}async function On(){await Promise.resolve(),Tr()}function u(e){var d;var t=e.f,n=(t&Te)!==0;if(n&&t&dt){var r=sr(e);return gn(e),r}if($!==null){Me!==null&&Me.includes(e)&&pi();var i=$.deps;e.rv<ln&&(e.rv=ln,fe===null&&i!==null&&i[pe]===e?pe++:fe===null?fe=[e]:fe.push(e),Ve!==null&&q!==null&&q.f&we&&!(q.f&Ce)&&Ve.includes(e)&&(Oe(q,Ue),Yt(q)))}else if(n&&e.deps===null)for(var a=e,l=a.parent,s=a;l!==null;)if(l.f&Te){var c=l;s=c,l=c.parent}else{var f=l;(d=f.deriveds)!=null&&d.includes(s)||(f.deriveds??(f.deriveds=[])).push(s);break}return n&&(a=e,Ct(a)&&cr(a)),e.v}function Je(e){const t=$;try{return $=null,e()}finally{$=t}}const ea=-7169;function Oe(e,t){e.f=e.f&ea|t}function ta(e){return Ar().get(e)}function Ir(e,t){return Ar().set(e,t),t}function Ar(e){return G===null&&pr(),G.c??(G.c=new Map(na(G)||void 0))}function na(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){G={p:G,c:null,e:null,m:!1,s:e,x:null,l:null},vt&&!t&&(G.l={s:null,u:null,r1:[],r2:ye(!1)})}function ie(e){const t=G;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var n=q,r=$;t.e=null;try{for(var i=0;i<l.length;i++){var a=l[i];xe(a.effect),je(a.reaction),Kt(a.fn)}}finally{xe(n),je(r)}}G=t.p,t.m=!0}return e||{}}function ra(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const ia=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function aa(e){return ia.includes(e)}const la={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function oa(e){return e=e.toLowerCase(),la[e]??e}const sa=["touchstart","touchmove"];function ca(e){return sa.includes(e)}function ua(e,t){if(t){const n=document.body;e.autofocus=!0,It(()=>{document.activeElement===n&&e.focus()})}}let Rn=!1;function da(){Rn||(Rn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Cr(e){var t=$,n=q;je(null),xe(null);try{return e()}finally{je(t),xe(n)}}function fa(e,t,n,r=n){e.addEventListener(t,()=>Cr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),da()}const Pr=new Set,on=new Set;function Lr(e,t,n,r){function i(a){if(r.capture||gt.call(t,a),!a.cancelBubble)return Cr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?It(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function se(e,t,n,r,i){var a={capture:r,passive:i},l=Lr(e,t,n,a);(t===document.body||t===window||t===document)&&Vi(()=>{t.removeEventListener(e,l,a)})}function ue(e){for(var t=0;t<e.length;t++)Pr.add(e[t]);for(var n of on)n(e)}function gt(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,l=0,s=e.__root;if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;c<=f&&(l=c)}if(a=i[l]||e.target,a!==t){ei(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=$,o=q;je(null),xe(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+r];if(h!==void 0&&!a.disabled)if(fn(h)){var[p,...y]=h;p.apply(a,[e,...y])}else h.call(a,e)}catch(x){v?m.push(x):v=x}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let x of m)queueMicrotask(()=>{throw x});throw v}}finally{e.__root=t,delete e.currentTarget,je(d),xe(o)}}}function wn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=q;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&Mi)!==0,r=(t&Di)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=wn(a?e:"<!>"+e),n||(i=Ze(i)));var l=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var s=Ze(l),c=l.lastChild;Xe(s,c)}else Xe(l,l);return l}}function Pe(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var l=wn(i),s=Ze(l);a=Ze(s)}var c=a.cloneNode(!0);return Xe(c,c),c}}function Ke(e=""){{var t=Tt(e+"");return Xe(t,t),t}}function ze(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),Xe(t,n),e}function b(e,t){e!==null&&e.before(t)}let Rt=!0;function Hn(e){Rt=e}function z(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function kn(e,t){return va(e,t)}const rt=new Map;function va(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:l=!0}){Oi();var s=new Set,c=o=>{for(var v=0;v<o.length;v++){var m=o[v];if(!s.has(m)){s.add(m);var g=ca(m);t.addEventListener(m,gt,{passive:g});var h=rt.get(m);h===void 0?(document.addEventListener(m,gt,{passive:g}),rt.set(m,1)):rt.set(m,h+1)}}};c(vn(Pr)),on.add(c);var f=void 0,d=Ui(()=>{var o=n??t.appendChild(Tt());return Fe(()=>{if(a){re({});var v=G;v.c=a}i&&(r.$$events=i),Rt=l,f=e(o,r)||{},Rt=!0,a&&ie()}),()=>{var g;for(var v of s){t.removeEventListener(v,gt);var m=rt.get(v);--m===0?(document.removeEventListener(v,gt),rt.delete(v)):rt.set(v,m)}on.delete(c),o!==n&&((g=o.parentNode)==null||g.removeChild(o))}});return sn.set(f,d),f}let sn=new WeakMap;function Mr(e,t){const n=sn.get(e);return n?(sn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var r=e,i=null,a=null,l=_e,s=n?ft:0,c=!1;const f=(o,v=!0)=>{c=!0,d(v,o)},d=(o,v)=>{l!==(l=o)&&(l?(i?yt(i):v&&(i=Fe(()=>v(r))),a&&st(a,()=>{a=null})):(a?yt(a):v&&(a=Fe(()=>v(r))),i&&st(i,()=>{i=null})))};tt(()=>{c=!1,t(f),c||d(null,null)},s)}function Dr(e,t,n){var r=e,i=_e,a,l=At()?ui:er;tt(()=>{l(i,i=t())&&(a&&st(a),a=Fe(()=>n(r)))})}function xt(e,t){return t}function _a(e,t,n,r){for(var i=[],a=t.length,l=0;l<a;l++)pn(t[l].e,i,!0);var s=a>0&&i.length===0&&n!==null;if(s){var c=n.parentNode;Ri(c),c.append(n),r.clear(),Be(e,t[0].prev,t[a-1].next)}hr(i,()=>{for(var f=0;f<a;f++){var d=t[f];s||(r.delete(d.k),Be(e,d.prev,d.next)),Ie(d.e,!s)}})}function Qe(e,t,n,r,i,a=null){var l=e,s={flags:t,items:new Map,first:null},c=(t&tr)!==0;if(c){var f=e;l=f.appendChild(Tt())}var d=null,o=!1;tt(()=>{var v=n(),m=fn(v)?v:v==null?[]:vn(v),g=m.length;if(!(o&&g===0)){o=g===0;{var h=$;ha(m,s,l,i,t,(h.f&Le)!==0,r)}a!==null&&(g===0?d?yt(d):d=Fe(()=>a(l)):d!==null&&st(d,()=>{d=null})),n()}})}function ha(e,t,n,r,i,a,l,s){var V,U,ae,ke;var c=(i&bi)!==0,f=(i&(hn|mn))!==0,d=e.length,o=t.items,v=t.first,m=v,g,h=null,p,y=[],w=[],x,C,k,E;if(c)for(E=0;E<d;E+=1)x=e[E],C=l(x,E),k=o.get(C),k!==void 0&&((V=k.a)==null||V.measure(),(p??(p=new Set)).add(k));for(E=0;E<d;E+=1){if(x=e[E],C=l(x,E),k=o.get(C),k===void 0){var j=m?m.e.nodes_start:n;h=ga(j,t,h,h===null?t.first:h.next,x,C,E,r,i),o.set(C,h),y=[],w=[],m=h.next;continue}if(f&&ma(k,x,E,i),k.e.f&Le&&(yt(k.e),c&&((U=k.a)==null||U.unfix(),(p??(p=new Set)).delete(k))),k!==m){if(g!==void 0&&g.has(k)){if(y.length<w.length){var T=w[0],P;h=T.prev;var N=y[0],B=y[y.length-1];for(P=0;P<y.length;P+=1)Fn(y[P],T,n);for(P=0;P<w.length;P+=1)g.delete(w[P]);Be(t,N.prev,B.next),Be(t,h,N),Be(t,B,T),m=T,h=B,E-=1,y=[],w=[]}else g.delete(k),Fn(k,m,n),Be(t,k.prev,k.next),Be(t,k,h===null?t.first:h.next),Be(t,h,k),h=k;continue}for(y=[],w=[];m!==null&&m.k!==C;)(a||!(m.e.f&Le))&&(g??(g=new Set)).add(m),w.push(m),m=m.next;if(m===null)continue;k=m}y.push(k),h=k,m=k.next}if(m!==null||g!==void 0){for(var W=g===void 0?[]:vn(g);m!==null;)(a||!(m.e.f&Le))&&W.push(m),m=m.next;var X=W.length;if(X>0){var te=i&tr&&d===0?n:null;if(c){for(E=0;E<X;E+=1)(ae=W[E].a)==null||ae.measure();for(E=0;E<X;E+=1)(ke=W[E].a)==null||ke.fix()}_a(t,W,te,o)}}c&&It(()=>{var ge;if(p!==void 0)for(k of p)(ge=k.a)==null||ge.apply()}),q.first=t.first&&t.first.e,q.last=h&&h.e}function ma(e,t,n,r){r&hn&&rn(e.v,t),r&mn?rn(e.i,n):e.i=n}function ga(e,t,n,r,i,a,l,s,c,f){var d=(c&hn)!==0,o=(c&xi)===0,v=d?o?rr(i):ye(i):i,m=c&mn?ye(l):l,g={i:m,v,k:a,a:null,e:null,prev:n,next:r};try{return g.e=Fe(()=>s(e,v,m),Ni),g.e.prev=n&&n.e,g.e.next=r&&r.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),r!==null&&(r.prev=g,r.e.prev=g.e),g}finally{}}function Fn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var l=Vt(a);i.before(a),a=l}}function Be(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function pa(e,t,n,r,i){var a=e,l="",s;tt(()=>{l!==(l=t()??"")&&(s!==void 0&&(Ie(s),s=void 0),l!==""&&(s=Fe(()=>{var c=l+"",f=wn(c);Xe(Ze(f),f.lastChild),a.before(f)})))})}function ht(e,t,...n){var r=e,i=Ye,a;tt(()=>{i!==(i=t())&&(a&&(Ie(a),a=null),a=Fe(()=>i(r,...n)))},ft)}function ya(e,t,n,r,i,a){var l,s,c=null,f=e,d;tt(()=>{const o=t()||null;var v=o==="svg"?nr:null;o!==l&&(d&&(o===null?st(d,()=>{d=null,s=null}):o===s?yt(d):(Ie(d),Hn(!1))),o&&o!==s&&(d=Fe(()=>{c=v?document.createElementNS(v,o):document.createElement(o),Xe(c,c);{var m=c.appendChild(Tt());r(c,m)}q.nodes_end=c,f.before(c)})),l=o,l&&(s=l),Hn(!0))},ft)}function jr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jr(e))&&(r&&(r+=" "),r+=t);return r}function ka(e){return typeof e=="object"?wa(e):e??""}function ba(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ne(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[ci]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Nr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function xa(e,t,n,r,i=!1,a=!1,l=!1){var s=t||{},c=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=ka(n.class)),n.class=n.class?n.class+" "+r:r;var d=Nr(e),o=e.__attributes??(e.__attributes={});for(const w in n){let x=n[w];if(c&&w==="value"&&x==null){e.value=e.__value="",s[w]=x;continue}var v=s[w];if(x!==v){s[w]=x;var m=w[0]+w[1];if(m!=="$$"){if(m==="on"){const C={},k="$$"+w;let E=w.slice(2);var g=aa(E);if(ra(E)&&(E=E.slice(0,-7),C.capture=!0),!g&&v){if(x!=null)continue;e.removeEventListener(E,s[k],C),s[k]=null}if(x!=null)if(g)e[`__${E}`]=x,ue([E]);else{let j=function(T){s[w].call(this,T)};var y=j;s[k]=Lr(E,e,j,C)}else g&&(e[`__${E}`]=void 0)}else if(w==="style"&&x!=null)e.style.cssText=x+"";else if(w==="autofocus")ua(e,!!x);else if(w==="__value"||w==="value"&&x!=null)e.value=e[w]=e.__value=x;else if(w==="selected"&&c)ba(e,x);else{var h=w;i||(h=oa(h));var p=h==="defaultValue"||h==="defaultChecked";if(x==null&&!a&&!p)if(o[w]=null,h==="value"||h==="checked"){let C=e;if(h==="value"){let k=C.defaultValue;C.removeAttribute(h),C.defaultValue=k}else{let k=C.defaultChecked;C.removeAttribute(h),C.defaultChecked=k}}else e.removeAttribute(w);else p||d.includes(h)&&(a||typeof x!="string")?e[h]=x:typeof x!="function"&&ne(e,h,x)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var qn=new Map;function Nr(e){var t=qn.get(e.nodeName);if(t)return t;qn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=ti(r);for(var a in n)n[a].set&&t.push(a);r=Gn(r)}return t}function oe(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function $t(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Sa=()=>performance.now(),He={tick:e=>requestAnimationFrame(e),now:()=>Sa(),tasks:new Set};function Or(){const e=He.now();He.tasks.forEach(t=>{t.c(e)||(He.tasks.delete(t),t.f())}),He.tasks.size!==0&&He.tick(Or)}function Ea(e){let t;return He.tasks.size===0&&He.tick(Or),{promise:new Promise(n=>{He.tasks.add(t={c:e,f:n})}),abort(){He.tasks.delete(t)}}}function Pt(e,t){e.dispatchEvent(new CustomEvent(t))}function Ta(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Bn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const l=Ta(i.trim());t[l]=a.trim()}return t}const Ia=e=>e;function De(e,t,n,r){var i=(e&Ci)!==0,a=(e&Pi)!==0,l=i&&a,s=(e&Li)!==0,c=l?"both":i?"in":"out",f,d=t.inert,o,v;function m(){var w=$,x=q;je(null),xe(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:c}))}finally{je(w),xe(x)}}var g={is_global:s,in(){var w;if(t.inert=d,!i){v==null||v.abort(),(w=v==null?void 0:v.reset)==null||w.call(v);return}a||o==null||o.abort(),Pt(t,"introstart"),o=cn(t,m(),v,1,()=>{Pt(t,"introend"),o==null||o.abort(),o=f=void 0})},out(w){if(!a){w==null||w(),f=void 0;return}t.inert=!0,Pt(t,"outrostart"),v=cn(t,m(),o,0,()=>{Pt(t,"outroend"),w==null||w()})},stop:()=>{o==null||o.abort(),v==null||v.abort()}},h=q;if((h.transitions??(h.transitions=[])).push(g),i&&Rt){var p=s;if(!p){for(var y=h.parent;y&&y.f&ft;)for(;(y=y.parent)&&!(y.f&qt););p=!y||(y.f&Jn)!==0}p&&Kt(()=>{Je(()=>g.in())})}}function cn(e,t,n,r,i){var a=r===1;if(ii(t)){var l,s=!1;return It(()=>{if(!s){var p=t({direction:a?"in":"out"});l=cn(e,p,n,r,i)}}),{abort:()=>{s=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:Ye,deactivate:Ye,reset:Ye,t:()=>r};const{delay:c=0,css:f,tick:d,easing:o=Ia}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),f)){var m=Bn(f(0,1));v.push(m,m)}var g=()=>1-r,h=e.animate(v,{duration:c});return h.onfinish=()=>{var p=(n==null?void 0:n.t())??1-r;n==null||n.abort();var y=r-p,w=t.duration*Math.abs(y),x=[];if(w>0){if(f)for(var C=Math.ceil(w/16.666666666666668),k=0;k<=C;k+=1){var E=p+y*o(k/C),j=f(E,1-E);x.push(Bn(j))}g=()=>{var T=h.currentTime;return p+y*o(T/w)},d&&Ea(()=>{if(h.playState!=="running")return!1;var T=g();return d(T,1-T),!0})}h=e.animate(x,{duration:w,fill:"forwards"}),h.onfinish=()=>{g=()=>r,d==null||d(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=Ye)},deactivate:()=>{i=Ye},reset:()=>{r===0&&(d==null||d(1,0))},t:()=>g()}}function Aa(e,t,n=t){var r=At();fa(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=Xt(e)?Qt(a):a,n(a),r&&a!==(a=t())){var l=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(s,e.value.length))}}),Je(t)==null&&e.value&&n(Xt(e)?Qt(e.value):e.value),ur(()=>{var i=t();Xt(e)&&i===Qt(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Xt(e){var t=e.type;return t==="number"||t==="range"}function Qt(e){return e===""?null:+e}function Vn(e,t){return e===t||(e==null?void 0:e[pt])===t}function ct(e={},t,n,r){return Kt(()=>{var i,a;return ur(()=>{i=a,a=[],Je(()=>{e!==n(...a)&&(t(e,...a),i&&Vn(n(...i),e)&&t(null,...i))})}),()=>{It(()=>{a&&Vn(n(...a),e)&&t(null,...a)})}}),e}let Lt=!1;function Ca(e){var t=Lt;try{return Lt=!1,[e(),Lt]}finally{Lt=t}}const Pa={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function La(e,t,n){return new Proxy({props:e,exclude:t},Pa)}function Un(e){for(var t=q,n=q;t!==null&&!(t.f&(Ce|Et));)t=t.parent;try{return xe(t),e()}finally{xe(n)}}function R(e,t,n,r){var j;var i=(n&Si)!==0,a=!vt||(n&Ei)!==0,l=(n&Ii)!==0,s=(n&Ai)!==0,c=!1,f;l?[f,c]=Ca(()=>e[t]):f=e[t];var d=pt in e||si in e,o=l&&(((j=at(e,t))==null?void 0:j.set)??(d&&t in e&&(T=>e[t]=T)))||void 0,v=r,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,s?v=Je(r):v=r),v);f===void 0&&r!==void 0&&(o&&a&&hi(),f=h(),o&&o(f));var p;if(a)p=()=>{var T=e[t];return T===void 0?h():(m=!0,g=!1,T)};else{var y=Un(()=>(i?K:Hi)(()=>e[t]));y.f|=li,p=()=>{var T=u(y);return T!==void 0&&(v=void 0),T===void 0?v:T}}if(!(n&Ti))return p;if(o){var w=e.$$legacy;return function(T,P){return arguments.length>0?((!a||!P||w||c)&&o(P?p():T),T):p()}}var x=!1,C=!1,k=rr(f),E=Un(()=>K(()=>{var T=p(),P=u(k);return x?(x=!1,C=!0,P):(C=!1,k.v=T)}));return i||(E.equals=_n),function(T,P){if(arguments.length>0){const N=P?u(E):a&&l?Y(T):T;return E.equals(N)||(x=!0,L(k,N),g&&v!==void 0&&(v=N),Je(()=>u(E))),T}return u(E)}}function nt(e){G===null&&pr(),vt&&G.l!==null?Ma(G).m.push(e):Ut(()=>{const t=Je(e);if(typeof t=="function")return t})}function Ma(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Da="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Da);const Rr="https://www.playpilot.com",Gt="https://partner-api-staging.playpilot.tech/1.0.0",Hr="EncryptedToken",ja="articleReplacementEditToken";async function Fr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=Jt();if(!n)throw new Error("No token was provided");const r=qr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(Gt+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return Na(r),!0}catch(n){console.error(n)}return!1}function qr(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(ja);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Hr}=`).pop())==null?void 0:i.split(";")[0])||""}function Na(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Hr+"="+e+";"+r+";path=/"}function Br(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Vr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),Oa={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function he(e,t=Ur()){var n;return((n=Oa[e])==null?void 0:n[t])||e}function Ur(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:_.English}const Ae=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed"}),Ra="https://insights.playpilot.net";async function Ne(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(Ra,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Ha=e=>e;function bn(e){const t=e-1;return t*t*t+1}function Kn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Kr(e,{delay:t=0,duration:n=400,easing:r=Ha}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function Zt(e,{delay:t=0,duration:n=400,easing:r=bn,x:i=0,y:a=0,opacity:l=0}={}){const s=getComputedStyle(e),c=+s.opacity,f=s.transform==="none"?"":s.transform,d=c*(1-l),[o,v]=Kn(i),[m,g]=Kn(a);return{delay:t,duration:n,easing:r,css:(h,p)=>`
4
4
  transform: ${f} translate(${(1-h)*o}${v}, ${(1-h)*m}${g});
5
5
  opacity: ${c-d*p}`}}function Ht(e,{delay:t=0,duration:n=400,easing:r=bn,axis:i="y"}={}){const a=getComputedStyle(e),l=+a.opacity,s=i==="y"?"height":"width",c=parseFloat(a[s]),f=i==="y"?["top","bottom"]:["left","right"],d=f.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),o=parseFloat(a[`padding${d[0]}`]),v=parseFloat(a[`padding${d[1]}`]),m=parseFloat(a[`margin${d[0]}`]),g=parseFloat(a[`margin${d[1]}`]),h=parseFloat(a[`border${d[0]}Width`]),p=parseFloat(a[`border${d[1]}Width`]);return{delay:t,duration:n,easing:r,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*l};${s}: ${y*c}px;padding-${f[0]}: ${y*o}px;padding-${f[1]}: ${y*v}px;margin-${f[0]}: ${y*m}px;margin-${f[1]}: ${y*g}px;border-${f[0]}-width: ${y*h}px;border-${f[1]}-width: ${y*p}px;min-${s}: 0`}}function Fa(e,{delay:t=0,duration:n=400,easing:r=bn,start:i=0,opacity:a=0}={}){const l=getComputedStyle(e),s=+l.opacity,c=l.transform==="none"?"":l.transform,f=1-i,d=s*(1-a);return{delay:t,duration:n,easing:r,css:(o,v)=>`
6
6
  transform: ${c} scale(${1-f*v});
7
7
  opacity: ${s-d*v}
8
- `}}var qa=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ba(e,t){re(t,!0);let n=R(t,"maxHeight",15);Ir("scope","popover");let r=F(null),i=F(!1);nt(async()=>{await On(),a(),await On(),l()});function a(){if(!u(r))return;const{top:o,right:v,bottom:m,height:g}=u(r).getBoundingClientRect(),h=s();L(i,Y(o-h<0&&window.innerHeight-m>o+g));const p=window.innerWidth-v-h;v+h>window.innerWidth&&(u(r).style.left=`${p}px`)}function l(){if(!u(r))return;const{top:o,height:v}=u(r).getBoundingClientRect(),m=s(),g=u(i)?window.innerHeight-o-m:o+v-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=qa(),f=S(c),d=S(f);ht(d,()=>t.children),ct(c,o=>L(r,o),()=>u(r)),O(()=>{oe(c,"flip",u(i)),$t(c,"--max-height",n()?n()+"px":null)}),De(3,f,()=>Zt,()=>({duration:100,y:10})),b(e,c),ie()}const Va=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];var Ua=A('<div class="genre svelte-13nhocm"> </div>'),Ka=(e,t)=>L(t,!0),za=A('<button class="genre expand svelte-13nhocm"> </button>'),Wa=A("<!> <!>",1);function Ya(e,t){re(t,!0);let n=F(!1);const r=K(()=>u(n)?t.genres:[t.genres[0]]);var i=Wa(),a=ee(i);Qe(a,17,()=>u(r),xt,(c,f)=>{var d=ze();const o=K(()=>{var g;return(g=Va.find(h=>h.slug===u(f)))==null?void 0:g.name});var v=ee(d);{var m=g=>{var h=Ua(),p=S(h);O(()=>z(p,he(u(o)))),b(g,h)};H(v,g=>{u(o)&&g(m)})}b(c,d)});var l=I(a,2);{var s=c=>{var f=za();f.__click=[Ka,n];var d=S(f);O(()=>z(d,`+${t.genres.length-1}`)),b(c,f)};H(l,c=>{!u(n)&&t.genres.length>1&&c(s)})}b(e,i),ie()}ue(["click"]);function $a(e){let t=[];for(const n of e){let r=n;const i=t.find(s=>s.name===r.name),a=i==null?void 0:i.extra_info.category,l=r.extra_info.category;(a==="RENT"&&l==="BUY"||a==="BUY"&&l==="RENT")&&(t=t.filter(s=>s.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}ki();var Ga=Pe('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Za(e){var t=Ga();b(e,t)}var Ja=(e,t,n)=>t(n()),Xa=A('<div class="arrow svelte-1f6ryh6"><!></div>'),Qa=A('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),el=A('<div class="playlink empty svelte-1f6ryh6"> </div>'),tl=A('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function nl(e,t){re(t,!0);const n=R(t,"list",3,!1),r=ta("scope")==="modal",i=K(()=>t.playlinks.filter(h=>!!h.logo_url)),a=K(()=>$a(u(i))),l={SVOD:he("Stream"),BUY:he("Buy"),RENT:he("Rent"),TVOD:he("Rent Or Buy")};function s(h){Ne(r?Ae.TitleModalPlaylinkClick:Ae.TitlePopoverPlaylinkClick,t.title,{playlink:h})}var c=tl(),f=ee(c),d=S(f);O(()=>z(d,he("Where To Stream Online")));var o=I(f,2),v=S(o);Qe(v,17,()=>u(a),xt,(h,p)=>{let y=()=>u(p).name,w=()=>u(p).url,x=()=>u(p).logo_url,C=()=>u(p).extra_info.category;var k=Qa();k.__click=[Ja,s,y];var E=S(k),j=I(E,2),T=S(j),P=S(T),N=I(T,2),B=S(N);O(()=>z(B,l[C()]||he("Stream")));var W=I(j,2);{var X=te=>{var V=Xa(),U=S(V);Za(U),b(te,V)};H(W,te=>{n()&&te(X)})}O(()=>{ne(k,"href",w()),ne(k,"data-playlink",y()),ne(E,"src",x()),z(P,y())}),b(h,k)});var m=I(v,2);{var g=h=>{var p=el(),y=S(p);O(()=>z(y,he("Title Unavailable"))),b(h,p)};H(m,h=>{t.playlinks.length||h(g)})}O(()=>oe(o,"list",n())),b(e,c),ie()}ue(["click"]);var rl=(e,t)=>L(t,!0),il=A('<button class="show-more svelte-fluzit">Show more</button>'),al=A('<p class="svelte-fluzit"> </p>'),ll=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function ol(e,t){re(t,!0);const n=R(t,"blurb",3,""),r=R(t,"limit",3,200);let i=F(!1);const a=K(()=>t.text.slice(0,r()));var l=ll(),s=S(l),c=S(s),f=I(c);{var d=h=>{var p=Ke("...");b(h,p)};H(f,h=>{!u(i)&&t.text.length>r()&&h(d)})}var o=I(f,2);{var v=h=>{var p=il();p.__click=[rl,i],b(h,p)};H(o,h=>{!u(i)&&(t.text.length>r()||n())&&h(v)})}var m=I(s,2);{var g=h=>{var p=al(),y=S(p);O(()=>z(y,n())),b(h,p)};H(m,h=>{u(i)&&h(g)})}O(()=>z(c,u(i)?t.text:u(a))),b(e,l),ie()}ue(["click"]);var sl=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),cl=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function ul(e,t){var n=cl(),r=I(ee(n),2);Qe(r,21,()=>t.participants,xt,(i,a)=>{var l=sl(),s=S(l),c=I(s),f=S(c);O(()=>{var v;return z(f,((v=u(a).character)==null?void 0:v.slice(0,20))||"")});var d=I(f);{var o=v=>{var m=Ke("...");b(v,m)};H(d,v=>{var m;(m=u(a).character)!=null&&m.length&&v(o)})}O(()=>z(s,`${u(a).name??""} `)),b(i,l)}),b(e,n)}var dl=Pe('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function zr(e){var t=dl();b(e,t)}var fl=A('<div class="top svelte-urs395"><img class="poster svelte-urs395"></div>'),vl=A("<div> </div>"),_l=A("<!> <!>",1),hl=A('<img alt="" class="svelte-urs395">'),ml=A('<div class="content svelte-urs395" data-playpilot-link-injections-title=""><header class="header svelte-urs395"><!> <h1 class="svelte-urs395"> </h1> <div class="info svelte-urs395"><div class="imdb svelte-urs395"><!> </div> <!> <div> </div> <div class="capitalize svelte-urs395"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-urs395"><!></div>',1);function Wr(e,t){re(t,!0);const n=R(t,"small",3,!1),r=R(t,"compact",3,!1);let i=F(!1),a=F(!1),l=F(!1);var s=ml(),c=ee(s),f=S(c),d=S(f);{var o=V=>{var U=fl(),ae=S(U);O(()=>{ne(ae,"src",t.title.standing_poster),ne(ae,"alt",`Movie poster for '${t.title.title??""}'`),oe(ae,"loaded",u(i))}),se("load",ae,()=>L(i,!0)),b(V,U)};H(d,V=>{r()||V(o)})}var v=I(d,2),m=S(v),g=I(v,2),h=S(g),p=S(h);zr(p);var y=I(p),w=I(h,2);Ya(w,{get genres(){return t.title.genres}});var x=I(w,2),C=S(x),k=I(x,2),E=S(k);O(()=>z(E,he(`Type: ${t.title.type}`)));var j=I(k,2);{var T=V=>{var U=vl(),ae=S(U);O(()=>z(ae,`${t.title.length??""} ${he("Minutes")??""}`)),b(V,U)};H(j,V=>{!n()&&t.title.length&&V(T)})}var P=I(f,2),N=S(P);nl(N,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var B=I(N,2);{var W=V=>{var U=_l(),ae=ee(U);ol(ae,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var ke=I(ae,2);{var ge=Re=>{ul(Re,{get participants(){return t.title.participants}})};H(ke,Re=>{var Se;(Se=t.title.participants)!=null&&Se.length&&Re(ge)})}b(V,U)};H(B,V=>{n()||V(W)})}var X=I(c,2),te=S(X);Dr(te,()=>u(l),V=>{var U=hl();O(()=>{ne(U,"src",u(l)?t.title.standing_poster:t.title.medium_poster),oe(U,"loaded",u(a)),oe(U,"blur",u(l))}),se("load",U,()=>L(a,!0)),se("error",U,()=>L(l,!0)),b(V,U)}),O(()=>{ne(c,"data-playpilot-original-title",t.title.original_title),oe(c,"small",n()),oe(c,"compact",r()),oe(v,"truncate",n()),z(m,t.title.title),z(y,` ${t.title.imdb_score??""}`),z(C,t.title.year),oe(X,"faded",r())}),b(e,s),ie()}function gl(e,t){re(t,!0);let n=F(0);Ne(Ae.TitlePopoverView,t.title),Ba(e,{get maxHeight(){return u(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=K(()=>u(n)<250);Wr(r,{get title(){return t.title},small:!0,get compact(){return u(a)}})},$$slots:{default:!0}}),ie()}var pl=(e,t,n,r)=>t(u(n).title_details,u(r)),yl=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),wl=(e,t,n,r)=>t(u(n).title_details,r()),kl=A('<!> <a target="_blank"> </a>',1),bl=A(" <!>.",1),xl=A("<!> <br>",1),Sl=A(" <br>",1),El=A('<span class="svelte-6p0hvs"><!></span>'),Tl=A("<p></p>");function Il(e,t){re(t,!0);const n=R(t,"onclickmodal",3,c=>null);function r(c,f){Ne(Ae.AfterArticlePlaylinkClick,c,{playlink:f})}function i(c,f){Ne(Ae.AfterArticleModalButtonClick,c),n()(f)}var a=ze(),l=ee(a);{var s=c=>{var f=Tl();Qe(f,21,()=>t.linkInjections,xt,(d,o)=>{var v=El();const m=K(()=>{const{key:w,title:x,title_details:C,after_article_style:k}=u(o);return{key:w,title:x,title_details:C,after_article_style:k}}),g=K(()=>{var w;return((w=u(m).title_details)==null?void 0:w.providers)||[]});var h=S(v);{var p=w=>{var x=xl(),C=ee(x);{var k=j=>{var T=yl(),P=ee(T);O(()=>z(P,`"${u(m).title??""}" ${he("Is Available To Stream")??""} `));var N=I(P),B=S(N);B.__click=[pl,i,m,o];var W=S(B);O(()=>z(W,he("View Streaming Options"))),b(j,T)},E=j=>{var T=bl(),P=ee(T);O(()=>z(P,`"${u(m).title??""}" ${he("Is Available To Stream On")??""} `));var N=I(P);Qe(N,17,()=>u(g),xt,(B,W,X)=>{let te=()=>u(W).name,V=()=>u(W).url;var U=kl(),ae=ee(U);{var ke=Se=>{var Z=Ke();O(()=>z(Z,X===u(g).length-1?`, ${he("And")}`:",")),b(Se,Z)};H(ae,Se=>{X&&Se(ke)})}var ge=I(ae,2);ge.__click=[wl,r,m,te];var Re=S(ge);O(()=>{ne(ge,"href",V()),z(Re,te())}),b(B,U)}),b(j,T)};H(C,j=>{u(m).after_article_style==="modal_button"?j(k):j(E,!1)})}b(w,x)},y=w=>{var x=Sl(),C=ee(x);O(()=>z(C,`"${u(m).title??""}" ${he("Title Unavailable Suffix")??""} `)),b(w,x)};H(h,w=>{u(g).length?w(p):w(y,!1)})}O(()=>ne(v,"data-playpilot-injection-key",u(m).key)),b(d,v)}),b(c,f)};H(l,c=>{t.linkInjections.length&&c(s)})}b(e,a),ie()}ue(["click"]);function Al(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function xn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Cl(e,t,n=[]){var a,l;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((l=i.parentNode)==null?void 0:l.nodeName)||"")););return i}function Pl(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function Ll(e,t,n,r){const i=Al(t),a=xn(t),l=e.slice(0,r),s=e.slice(r),c=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(c,"\\$&")}|${i.replace(c,"\\$&")}`),d=s.replace(f,n);return l+d}function it(e){return xn(e).toLowerCase().replace(/\s+/g,"")}function Ml(e,t,n){const i=e.indexOf(t),a=Math.floor((n-t.length)/2);let l=Math.max(0,i-a),s=l+n;s>e.length&&(s=e.length,l=Math.max(0,s-n));let c=e.slice(l,s).trim();return l>0&&(c="…"+c),s<e.length&&(c+="…"),c}function Dl(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Sn="data-playpilot-injection-key",En=`[${Sn}]`,ut={};let jt=null;function jl(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(l=>{var s;return l.nodeType===Node.TEXT_NODE&&((s=l.nodeValue)==null?void 0:s.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let l=a.length-1;l>=0;l--)n.push(a[l])}return t}function Tn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function Nl(e,t,n={aiInjections:[],manualInjections:[]}){var d;const r=Ul(n),i=e.map(o=>o.innerText).join(" "),a=zl(r),l=a.filter(o=>it(i).includes(it(o.sentence))),s={};for(const o of l){const v=e.findIndex(x=>it(x.innerText).includes(it(o.sentence))),m=e[v];if(!m)continue;const g=Cl(o.title,m,["A"]);if(!g||Pl(g))continue;const h=document.createElement("span");h.dataset.playpilotInjectionKey=o.key;const p=document.createElement("a");p.innerText=o.title,p.href=o.playpilot_url,p.dataset.playpilotOriginalTitle=(d=o.title_details)==null?void 0:d.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",h.insertAdjacentElement("beforeend",p);const y=Dl(Object.values(s).filter(x=>x.elementIndex===v).map(x=>x.to));m.innerHTML=Ll(m.innerHTML,o.title,h.outerHTML,y);const w=m.innerHTML.indexOf(h.outerHTML);s[o.key]={elementIndex:v,from:w,to:w+h.outerHTML.length}}Rl(a,t),Ol();const c=Wl(r);return c.length&&ql(e,c,t),Vl(r,s).filter(o=>o.title_details).map((o,v)=>{const m=!o.inactive&&!o.after_article&&!document.querySelector(`[${Sn}="${o.key}"]`),g=o.duplicate??(!o.manual&&Yl(o,v,r));return{...o,inactive:o.inactive??!1,duplicate:g,failed:m}})}function Ol(){const e=Array.from(document.querySelectorAll(`${En} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function Rl(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(Sn);if(!a)return;const l=e.find(s=>a===s.key);l&&Hl(r,l,t)}),Array.from(document.querySelectorAll(En)).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(l=>i===l.key);a&&(r.addEventListener("mouseenter",l=>Fl(l,a)),r.addEventListener("mouseleave",()=>Ft(a)))})}function Hl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Ft(t))}function Fl(e,t){if(ut[t.key]||window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=kn(gl,{target:n,props:{title:t.title_details}});ut[t.key]={injection:t,component:r}}function Ft(e,t=!0){const n=ut[e.key];n&&(Mr(n.component,{outro:t}),delete ut[e.key])}function ql(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),jt=kn(Il,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Bl(){var e;jt&&(Mr(jt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),jt=null)}function un(){Object.values(ut).forEach(t=>Ft(t.injection)),document.querySelectorAll(En).forEach(t=>t.outerHTML=t.textContent||""),Object.values(ut).forEach(({injection:t})=>Ft(t,!1)),Bl()}function Vl(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Ul({aiInjections:e,manualInjections:t}){return[...e,...t.map(n=>({...n,manual:!0}))]}function Kl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function In(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details}function zl(e){return Yr(e).filter(t=>t.in_text!==!1&&In(t))}function Wl(e){return Yr(e).filter(t=>t.after_article===!0&&In(t))}function Yr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&An(n,t)))}function Yl(e,t,n){return n.some((r,i)=>t!==i&&r.manual&&An(r,e))}function An(e,t){return e.title===t.title&&it(e.sentence)===it(t.sentence)}function $l(){const e=Tn();return{heading:Gl(e),modified_time:Zl(e),published_time:Jl(e)}}function Gl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Zl(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?$r(n):null}function Jl(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?$r(n):null}function $r(e){try{return new Date(e).toISOString()}catch{return null}}function Gr(){return location.protocol+"//"+location.host+location.pathname}let en=null;async function Zr(e,t,{hash:n=Vr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=Jt(),l=Br()?await Fr():!1,s=Ur(),c=$l();if(!a)throw new Error("No token was provided");const f=await fetch(Gt+`/external-pages/?api-token=${a}&include_title_details=true${l?"&editorial_mode_enabled=true":""}&language=${s}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:c,page_text:t,...r})});if(!f.ok)throw f;return await f.json()}async function zn(e,t,{requireCompletedResult:n=!1,pollInterval:r=3e3,maxTries:i=600}={}){let a=Vr(t),l=0;en&&clearTimeout(en);const s=async(c,f)=>{try{const d=await Zr(e,t,{hash:a});if(n&&d.automation_enabled&&d.ai_running)throw new Error;d.link_injections=Wn(d.link_injections||[]),d.ai_injections=Wn(d.ai_injections||[]),c(d);return}catch{if(l++,l>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),c();return}en=setTimeout(()=>s(c),r)}};return new Promise(s)}async function Xl(e,t){var l;const n=(l=window.PlayPilotLinkInjections)==null?void 0:l.selector,i=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Zr(Gr(),t,{params:{private_token:qr(),automation_enabled:!1,link_injections:i,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Ql(){const e=new Headers({"Content-Type":"application/json"}),t=Jt();if(!t)throw new Error("No token was provided");const n=await fetch(Gt+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Wn(e){return e.map(t=>({...t,key:Jr(t.sid)}))}function Jr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function Jt(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var eo=Pe('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function to(e){var t=eo();b(e,t)}function Cn(e,t){re(t,!0);const n=R(t,"size",3,"margin(2)"),r=R(t,"onclick",3,()=>null),i=La(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=ze(),l=ee(a);ya(l,()=>t.href?"a":"button",!1,(s,c)=>{let f;O(()=>{f=xa(s,f,{role:t.href?"link":"button",onclick:r(),class:"button",...i},"svelte-1qqv88o",s.namespaceURI===nr,s.nodeName.includes("-")),$t(s,"--size",n())});var d=ze(),o=ee(d);ht(o,()=>t.children??Ye),b(c,d)}),b(e,a),ie()}var no=(e,t)=>t()(),ro=A('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function io(e,t){re(t,!0);const n=R(t,"onclose",3,()=>null),r=R(t,"onscroll",3,()=>null);Ir("scope","modal"),nt(()=>{const o=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=o||""});function i(o){return window.innerWidth<600?Zt(o,{duration:250,y:window.innerHeight}):Fa(o,{duration:150,start:.85})}var a=ro();se("keydown",ve,({key:o})=>{o==="Escape"&&n()()});var l=S(a),s=S(l),c=S(s);Cn(c,{onclick:()=>n()(),children:(o,v)=>{to(o)},$$slots:{default:!0}});var f=I(s,2);ht(f,()=>t.children);var d=I(l,2);d.__click=[no,n],se("scroll",l,function(...o){var v;(v=r())==null||v.apply(this,o)}),De(3,l,()=>i),De(3,a,()=>Kr,()=>({duration:150})),b(e,a),ie()}ue(["click"]);function ao(e,t){re(t,!0),Ne(Ae.TitleModalView,t.title);let n=!1;function r(){n||(Ne(Ae.TitleModalScroll,t.title),n=!0)}io(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Wr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ie()}var lo=Pe('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function oo(e,t){const n=R(t,"expanded",3,!1);var r=lo();O(()=>oe(r,"expanded",n())),b(e,r)}function so(e,t,n){t(!t()),n()(t())}var co=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function dn(e,t){re(t,!0);let n=R(t,"active",15),r=R(t,"fullwidth",3,!1),i=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var l=co();l.__click=[so,n,a];var s=S(l),c=S(s);ht(c,()=>t.children),O(()=>{ne(l,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),oe(l,"active",n()),oe(l,"fullwidth",r())}),b(e,l),ie()}ue(["click"]);var uo=A('<input type="text" class="svelte-1vrer3i">');function Pn(e,t){let n=R(t,"value",15),r=R(t,"label",3,""),i=R(t,"name",3,""),a=R(t,"readonly",3,!1),l=R(t,"oninput",3,()=>null);var s=uo();s.__input=function(...c){var f;(f=l())==null||f.apply(this,c)},O(()=>{ne(s,"name",i()),ne(s,"aria-label",r()),ne(s,"placeholder",r()),s.readOnly=a()}),Aa(s,n),b(e,s)}ue(["input"]);var fo=Pe('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),vo=Pe('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),_o=Pe('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Yn(e,t){const n=R(t,"align",3,"bottom");var r=_o(),i=S(r);{var a=s=>{var c=fo();b(s,c)},l=s=>{var c=ze(),f=ee(c);{var d=o=>{var v=vo();b(o,v)};H(f,o=>{n()==="center"&&o(d)},!0)}b(s,c)};H(i,s=>{n()==="bottom"?s(a):s(l,!1)})}b(e,r)}var ho=A("<!> In-text Playlink",1),mo=A("<!> Bottom Playlink",1),go=(e,t)=>t().after_article_style="playlinks",po=(e,t)=>t().after_article_style="modal_button",yo=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),wo=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function ko(e,t){re(t,!0);const n=R(t,"linkInjection",7),r=K(()=>n().after_article_style==="modal_button");var i=wo(),a=ee(i),l=S(a),s=K(()=>n().in_text??!0);dn(l,{fullwidth:!0,get active(){return u(s)},onclick:v=>{n().in_text=v,n().manual=!0},label:"In-text Playlink",children:(v,m)=>{var g=ho(),h=ee(g);Yn(h,{align:"center"}),b(v,g)},$$slots:{default:!0}});var c=I(l,2),f=K(()=>n().after_article??!1);dn(c,{fullwidth:!0,get active(){return u(f)},onclick:v=>{n().after_article=v,n().manual=!0},label:"Bottom Playlink",children:(v,m)=>{var g=mo(),h=ee(g);Yn(h,{align:"bottom"}),b(v,g)},$$slots:{default:!0}});var d=I(a,2);{var o=v=>{var m=yo(),g=I(S(m),2),h=S(g);h.__click=[go,n];var p=I(h,2);p.__click=[po,n];var y=I(p,2);O(()=>{ne(g,"aria-activedescendant",`playlinks-${(u(r)?"after-article":"in-text")??""}`),ne(h,"aria-selected",!u(r)||null),oe(h,"active",!u(r)),ne(p,"aria-selected",u(r)||null),oe(p,"active",u(r)),oe(y,"right",u(r))}),De(3,m,()=>Ht,()=>({duration:100})),b(v,m)};H(d,v=>{n().after_article&&v(o)})}b(e,i),ie()}ue(["click"]);var bo=A('<div class="alert svelte-1tq7qhv"><!></div>');function Ln(e,t){re(t,!0);var n=bo(),r=S(n);ht(r,()=>t.children),b(e,n),ie()}var xo=Pe('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function So(e){var t=xo();b(e,t)}var Eo=(e,t)=>L(t,!u(t)),To=A('<div class="content svelte-1fmy0wh"><!></div>'),Io=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function Ao(e,t){re(t,!0);let n=F(!1),r=F(null);function i(d){var v;const o=d.target;o===u(r)||(v=u(r))!=null&&v.contains(o)||L(n,!1)}var a=Io();se("click",ve,i);var l=S(a);l.__click=[Eo,n];var s=S(l);So(s),ct(l,d=>L(r,d),()=>u(r));var c=I(l,2);{var f=d=>{var o=To(),v=S(o);ht(v,()=>t.children),De(1,o,()=>Zt,()=>({duration:150,y:5})),b(d,o)};H(c,d=>{u(n)&&d(f)})}O(()=>{ne(l,"aria-label",t.ariaLabel),ne(l,"aria-expanded",u(n))}),b(e,a),ie()}ue(["click"]);function Co(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var Po=(e,t)=>L(t,!u(t)),Lo=A('<button class="expand-sentence svelte-1lxtpkd"> </button>'),Mo=A('<button class="context-menu-action svelte-1lxtpkd">Remove</button>'),Do=(e,t)=>L(t,!u(t)),jo=A('<div class="actions svelte-1lxtpkd"><button class="expand svelte-1lxtpkd" aria-label="Expand"><!></button> <!></div>'),No=A('<div class="expanded svelte-1lxtpkd"><div class="label svelte-1lxtpkd">Link URL</div> <!> <div class="label offset svelte-1lxtpkd">Layout options</div> <div class="type-select svelte-1lxtpkd"><!></div></div>'),Oo=A('<div class="item svelte-1lxtpkd"><div class="header svelte-1lxtpkd"><img class="poster svelte-1lxtpkd" alt="" width="32" height="48"> <div class="info svelte-1lxtpkd"><div class="title svelte-1lxtpkd"> </div> <div class="sentence svelte-1lxtpkd"><!> <!></div></div> <div class="context-menu svelte-1lxtpkd"><!></div></div> <div class="content svelte-1lxtpkd"><!> <!></div></div>');function Ro(e,t){re(t,!0);const n=R(t,"linkInjection",15),r=R(t,"onremove",3,()=>null),i=R(t,"onhighlight",3,()=>null),a=K(()=>n()||{}),l=K(()=>u(a).key),s=K(()=>u(a).sentence),c=K(()=>u(a).title_details),f=K(()=>u(a).failed),d=K(()=>u(a).inactive),o=K(()=>u(c)),v=K(()=>Ml(n().sentence,n().title,60));let m=F(!1),g=F(!1),h=F(!1),p=F(null);nt(()=>{u(f)&&Ne(Ae.InjectionFailed,u(o),{phrase:n().title,sentence:u(s)})});function y(Z=!0){x().forEach(le=>{le.classList.toggle("injection-highlight",Z)})}function w(Z){let Q=Z.target,le=Q==null?void 0:Q.dataset.playpilotInjectionKey;Q&&!le&&(Q=Q.closest(`[data-playpilot-injection-key="${u(l)}"]`),le=Q==null?void 0:Q.dataset.playpilotInjectionKey),L(h,le===u(l)),u(p)&&u(h)&&i()(u(p))}function x(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${u(l)}"]`))}var C=Oo();se("mouseover",ve,w),C.__click=[Co,y,x];var k=S(C),E=S(k),j=I(E,2),T=S(j),P=S(T),N=I(T,2),B=S(N);pa(B,()=>(u(g)?u(s):u(v)).replace(n().title,`<em>${n().title}</em>`));var W=I(B,2);{var X=Z=>{var Q=Lo();Q.__click=[Po,g];var le=S(Q);O(()=>z(le,u(g)?"Less":"More")),b(Z,Q)};H(W,Z=>{u(v).length<u(s).length&&Z(X)})}var te=I(j,2),V=S(te);Ao(V,{ariaLabel:"More options",children:(Z,Q)=>{var le=Mo();le.__click=function(...M){var D;(D=r())==null||D.apply(this,M)},b(Z,le)},$$slots:{default:!0}});var U=I(k,2),ae=S(U);{var ke=Z=>{Ln(Z,{children:(Q,le)=>{var M=Ke("A match was found, but the link could not be injected.");b(Q,M)},$$slots:{default:!0}})},ge=Z=>{var Q=jo(),le=S(Q);le.__click=[Do,m];var M=S(le);oo(M,{get expanded(){return u(m)}});var D=I(le,2),J=K(()=>u(d)?"Inactive":"Visible"),me=K(()=>!n().inactive);dn(D,{get label(){return u(J)},get active(){return u(me)},onclick:be=>{n(n().inactive=!be,!0),n(n().manual=!0,!0)},children:(be,We)=>{var Ee=Ke();O(()=>z(Ee,u(d)?"Inactive":"Visible")),b(be,Ee)},$$slots:{default:!0}}),O(()=>ne(le,"aria-expanded",u(m))),b(Z,Q)};H(ae,Z=>{u(f)?Z(ke):Z(ge,!1)})}var Re=I(ae,2);{var Se=Z=>{var Q=No(),le=I(S(Q),2);Pn(le,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(J){n(n().playpilot_url=J,!0)}});var M=I(le,4),D=S(M);ko(D,{get linkInjection(){return n()}}),De(3,Q,()=>Ht,()=>({duration:100})),b(Z,Q)};H(Re,Z=>{u(m)&&Z(Se)})}ct(C,Z=>L(p,Z),()=>u(p)),O(()=>{oe(C,"highlighted",u(h)),oe(C,"inactive",u(d)),ne(E,"src",u(o).standing_poster),z(P,u(o).title)}),se("mouseenter",C,()=>y(!0)),se("mouseleave",C,()=>y(!1)),De(6,C,()=>Ht,()=>({duration:200})),b(e,C),ie()}ue(["click"]);var Ho=A('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Fo(e,t){re(t,!0);let n=R(t,"element",7),r=R(t,"position",23,()=>({x:0,y:0})),i=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),l=!1,s={x:0,y:0},c=r();nt(()=>{f(r().x,r().y)});function f(h,p){const y=window.innerWidth,w=window.innerHeight,x=n().clientWidth,C=n().clientHeight;h=Math.min(Math.max(h,i().x),y-x-i().x),p=Math.min(Math.max(p,i().y),w-C-i().y),n().style.right=h+"px",n().style.bottom=Math.max(p,i().y)+"px",r({x:h,y:p}),a()(r())}function d(h){var p,y;return{x:h.pageX||((p=h.touches)==null?void 0:p[0].pageX)||0,y:h.pageY||((y=h.touches)==null?void 0:y[0].pageY)||0}}function o(h){l=!0,s=d(h),c=r()}function v(h){if(!l)return;const p=d(h),y=p.x-s.x,w=p.y-s.y,x=c.x-y,C=c.y-w;f(x,C)}function m(){l&&(l=!1)}var g=Ho();se("mousemove",ve,v),se("touchmove",ve,v,void 0,!0),se("mouseup",ve,m),se("touchend",ve,m),se("resize",ve,()=>f(r().x,r().y)),g.__mousedown=o,g.__touchstart=o,b(e,g),ie()}ue(["mousedown","touchstart"]);var qo=A('<button class="resize-handle svelte-1367ri6" aria-label="Move editor"></button>');function Bo(e,t){re(t,!0);let n=R(t,"element",7),r=R(t,"height",7,200),i=R(t,"onchange",3,()=>null);const a=16;let l=!1,s=0,c=r();nt(()=>{f(r())});function f(h){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(h,m()));n().style.height=`${y}px`,r(y),i()(y)}function d(h){var p,y;l=!0,s=h.pageY||((y=(p=h.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,c=n().clientHeight}function o(h){var x,C;if(!l)return;const p=h.pageY||((C=(x=h.touches)==null?void 0:x[0])==null?void 0:C.pageY)||0,y=s-p,w=c+y;f(w)}function v(){l=!1}function m(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var g=qo();se("mousemove",ve,o),se("touchmove",ve,o,void 0,!0),se("mouseup",ve,v),se("touchend",ve,v),se("resize",ve,()=>f(r())),g.__mousedown=d,g.__touchstart=d,b(e,g),ie()}ue(["mousedown","touchstart"]);var Vo=Pe('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Uo(e){var t=Vo();b(e,t)}async function Ko(e){const t=new Headers({"Content-Type":"application/json"}),n=Jt();if(!n)throw new Error("No token was provided");const r=await fetch(Gt+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var zo=Pe('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Wo(e){var t=zo();b(e,t)}var Yo=A("<div> </div>"),$o=e=>e.stopImmediatePropagation(),Go=A('<button class="item svelte-tbzvlp"><img class="poster svelte-tbzvlp" alt="" width="28" height="42"> <div class="content"><div class="name svelte-tbzvlp"> </div> <div class="meta svelte-tbzvlp"><div class="imdb svelte-tbzvlp"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-tbzvlp"><!></a></button>');function $n(e,t){re(t,!0);const n=R(t,"hoverable",3,!0),r=R(t,"onclick",3,()=>null);var i=Go();i.__click=function(...k){var E;(E=r())==null||E.apply(this,k)};var a=S(i),l=I(a,2),s=S(l),c=S(s),f=I(s,2),d=S(f),o=S(d);zr(o);var v=I(o),m=I(d,2),g=S(m),h=I(m,2),p=S(h),y=I(h,2);{var w=k=>{var E=Yo(),j=S(E);O(()=>z(j,`${t.title.length??""} min`)),b(k,E)};H(y,k=>{t.title.length&&k(w)})}var x=I(l,2);x.__click=[$o];var C=S(x);Wo(C),O(()=>{oe(i,"hoverable",n()),ne(a,"src",t.title.standing_poster),z(c,t.title.title),z(v,` ${t.title.imdb_score??""}`),z(g,t.title.year),z(p,t.title.type),ne(x,"href",`${Rr}/${t.title.type??""}/${t.title.slug??""}`)}),b(e,i),ie()}ue(["click"]);var Zo=A('<em class="empty svelte-1olb8n0">No results found</em>'),Jo=A('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Xo=A('<div class="selected svelte-1olb8n0"><!></div>'),Qo=A('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function es(e,t){re(t,!0);let n=R(t,"onselect",3,()=>null),r=R(t,"query",15),i=F(Y([])),a=F(null),l=F(!1);Ut(()=>{r()&&s(r())});async function s(h){L(l,!0);try{L(i,Y(await Ko(h)))}finally{L(l,!1)}}function c(h){r(h.title),L(a,Y(h)),n()(h)}var f=Qo(),d=S(f);Pn(d,{oninput:()=>L(a,null),name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var o=I(d,2);{var v=h=>{var p=Jo();Qe(p,21,()=>u(i),y=>y.sid,(y,w)=>{$n(y,{get title(){return u(w)},onclick:()=>c(u(w))})},y=>{var w=ze(),x=ee(w);{var C=k=>{var E=Zo();b(k,E)};H(x,k=>{u(l)||k(C)})}b(y,w)}),b(h,p)};H(o,h=>{r()&&!u(a)&&h(v)})}var m=I(o,2);{var g=h=>{var p=Xo(),y=S(p);$n(y,{get title(){return u(a)},hoverable:!1}),b(h,p)};H(m,h=>{u(a)&&h(g)})}b(e,f),ie()}function ts(e,t,n,r,i,a){if(!u(t)||!u(n))return;const l=u(n).type==="movie"?"movie":"show",s=Rr+`/${l}/${u(n).slug}`,c={sid:u(n).sid,title:u(t),sentence:u(r),playpilot_url:s,key:Jr(u(n).sid),title_details:u(n),manual:!0};i.onsave(c),a()()}var ns=A('<div class="error svelte-l7tw17"><!></div>'),rs=A('<section class="layout svelte-l7tw17"><div class="header svelte-l7tw17"><!> <h2 class="svelte-l7tw17">Add Playlink manually</h2></div> <p class="svelte-l7tw17">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-l7tw17">Selected text</label> <!> <!> <label for="text" class="svelte-l7tw17">Paired title</label> <!> <button class="save svelte-l7tw17">Add playlink</button></section>');function is(e,t){re(t,!0);let n=R(t,"htmlString",3,""),r=R(t,"onclose",3,()=>null),i=F(""),a=F(""),l=F(null),s=F(""),c=F("");nt(f);function f(){const k=window.getSelection();if(!(k!=null&&k.anchorNode)||!Tn().contains(k.anchorNode.parentElement))return;const E=k.toString().trim();if(!E)return;if(L(s,""),L(i,Y(E)),k.anchorNode!==k.focusNode){L(s,"Selection is broken up by multiple elements. Please select the text more directly.");return}L(c,Y(u(i))),L(a,Y(d(k,E)));const j=k.getRangeAt(0).commonAncestorContainer.textContent,T=xn(n());(!j||!T.includes(j))&&L(s,"Selection was not inside of given content")}function d(k,E){const j=k.getRangeAt(0);let T=j.startContainer;for(;(T.textContent||"").length<=E.length*3&&T.parentNode;)T=T.parentNode;if(!T||!T.textContent)return"";const P=T.textContent,N=o(T,j.startContainer,j.startOffset),B=o(T,j.endContainer,j.endOffset),W=P.slice(0,N).lastIndexOf("."),X=P.slice(B).match(/[.!?]/),te=X?B+X.index:P.length,V=W===-1?0:W+1,U=te;return P.slice(V,U+1).trim()}function o(k,E,j){let T=0;const P=k,N=B=>{var W;if(B===E)return T+=j,!0;B.nodeType===Node.TEXT_NODE&&(T+=((W=B.textContent)==null?void 0:W.length)||0);for(let X=B.firstChild;X;X=X.nextSibling)if(N(X))return!0;return!1};return N(P),T}function v(k){var E,j;L(l,Y(k)),(j=(E=window.getSelection())==null?void 0:E.removeAllRanges)==null||j.call(E)}var m=rs();se("mouseup",ve,f);var g=S(m),h=S(g);Cn(h,{get onclick(){return r()},size:"24px",children:(k,E)=>{Uo(k)},$$slots:{default:!0}});var p=I(g,6);Pn(p,{get value(){return u(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var y=I(p,2);{var w=k=>{var E=ns(),j=S(E);Ln(j,{children:(T,P)=>{var N=Ke();O(()=>z(N,u(s))),b(T,N)},$$slots:{default:!0}}),b(k,E)};H(y,k=>{u(s)&&k(w)})}var x=I(y,4);Dr(x,()=>u(a)+u(i),k=>{es(k,{onselect:v,get query(){return u(c)},set query(E){L(c,Y(E))}})});var C=I(x,2);C.__click=[ts,i,l,a,t,r],O(()=>C.disabled=!u(i)||!u(l)),b(e,m),ie()}ue(["click"]);var as=Pe('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function ls(e){var t=as();b(e,t)}var os=A('AI links are currently processing. This can take several minutes.<br class="svelte-7ilatt"> You can add manual links while this is ongoing.',1),ss=(e,t,n,r)=>{t.onadd(u(n)),L(r,!0)},cs=A('AI links are ready. <strong class="svelte-7ilatt"> </strong> New links will be used next time you refresh the page, or you can insert them now. <button class="button svelte-7ilatt">Add AI links</button>',1),us=(e,t)=>L(t,!0),ds=A('AI links finished running, but no new links were found. <button class="button svelte-7ilatt">Dismiss</button>',1),fs=A('<div class="loading-bar svelte-7ilatt" data-testid="loading-bar"></div>'),vs=A('<div class="animator svelte-7ilatt"></div>'),_s=A('<div class="ai-indicator svelte-7ilatt"><div class="content svelte-7ilatt"><div class="icon svelte-7ilatt"><!></div> <div class="svelte-7ilatt"><!></div> <!></div> <div class="border svelte-7ilatt"><!></div></div>');function hs(e,t){re(t,!0);const n=R(t,"htmlString",3,""),r=K(()=>Math.min(Math.max(n().length*30,6e4),6e5));let i=F(!0),a=F(Y([])),l=F(!1);function s(o){L(i,!1),L(a,Y(o))}var c=ze(),f=ee(c);{var d=o=>{var v=_s(),m=S(v),g=S(m),h=S(g);ls(h);var p=I(g,2),y=S(p);{var w=P=>{var N=os();b(P,N)},x=P=>{var N=ze(),B=ee(N);{var W=te=>{var V=cs(),U=I(ee(V)),ae=S(U),ke=I(U,2);ke.__click=[ss,t,a,l],O(()=>z(ae,`${u(a).length??""} New ${(u(a).length>1?"links were":"link was")??""} found.`)),b(te,V)},X=te=>{var V=ds(),U=I(ee(V));U.__click=[us,l],b(te,V)};H(B,te=>{var V;(V=u(a))!=null&&V.length?te(W):te(X,!1)},!0)}b(P,N)};H(y,P=>{u(i)?P(w):P(x,!1)})}var C=I(p,2);{var k=P=>{var N=fs();O(()=>$t(N,"animation-duration",`${u(r)??""}ms`)),b(P,N)};H(C,P=>{u(i)&&P(k)})}var E=I(m,2),j=S(E);{var T=P=>{var N=vs();b(P,N)};H(j,P=>{u(i)&&P(T)})}O(()=>oe(v,"running",u(i))),b(o,v)};H(f,o=>{u(l)||o(d)})}return b(e,c),ie({notifyUserOfNewState:s})}ue(["click"]);async function ms(e,t,n,r,i,a,l){try{L(t,!0),L(n,!1),r(await Xl(r(),i())),L(a,Y(u(l)))}catch{L(n,!0)}finally{L(t,!1)}}var gs=A('<div class="handle svelte-1w9c21y"><!></div>'),ps=A('<!> <div class="handle svelte-1w9c21y"><!></div>',1),ys=A('<div class="loading svelte-1w9c21y">Loading...</div>'),ws=A('<div class="bubble svelte-1w9c21y"> </div> <!>',1),ks=A('<div class="error svelte-1w9c21y"><!></div>'),bs=A('<div class="empty svelte-1w9c21y">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),xs=A('<button class="save svelte-1w9c21y"> </button>'),Ss=A('<!> <div class="items svelte-1w9c21y"></div> <!>',1),Es=A('<div class="panel playpilot-styled-scrollbar svelte-1w9c21y"><!></div>'),Ts=A('<section class="editor playpilot-styled-scrollbar svelte-1w9c21y"><header class="header svelte-1w9c21y"><!> <h1 class="svelte-1w9c21y">Playlinks</h1> <!></header> <!> <!> <!></section>');function Is(e,t){re(t,!0);let n=R(t,"linkInjections",15),r=R(t,"htmlString",3,""),i=R(t,"loading",3,!1),a=R(t,"aiRunning",3,!1);const l="editor-position",s="editor-height";let c=F(null),f=Y(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),d=Y(parseInt(localStorage.getItem(s)||"0")),o=F(!1),v=F(!1),m=F(!1),g=F(0),h=F(""),p=F(void 0);const y=K(()=>JSON.stringify(n())),w=K(()=>u(h)!==u(y)),x=K(()=>n().filter(M=>M.title_details&&!M.removed&&!M.duplicate&&(M.manual||!M.manual&&!M.failed))),C=K(()=>k(u(x)));Ut(()=>{i()||Je(()=>{L(h,Y(u(y))),N()})});function k(M){return M.sort((D,J)=>D.failed!==J.failed?D.failed?1:-1:D.title_details.title.localeCompare(J.title_details.title))}function E(M,D){localStorage.setItem(M,D)}function j(M){const D=n().findIndex(J=>J.key===M);n(n()[D].manual=!0,!0),n(n()[D].removed=!0,!0),n([...n()])}function T(M){if(!u(c))return;const D=M.offsetTop,J=D+M.offsetHeight,me=u(c).scrollTop,be=me+u(c).clientHeight;D>=me&&J<=be||u(c).scrollTo({top:D-u(c).clientHeight/2,behavior:"smooth"})}function P(M){const D=M.target;L(g,Y(D.scrollTop))}function N(){const M={total:n().length.toString(),failed_automatic:n().filter(D=>D.failed&&!D.manual).length.toString(),failed_manual:n().filter(D=>D.failed&&D.manual).length.toString(),final_injected:u(x).length.toString()};Ne(Ae.TotalInjectionsCount,null,M)}function B(M){const D=M.filter(J=>{if(In(J))return!n().some(me=>An(J,me))});u(p).notifyUserOfNewState(D)}var W=Ts(),X=S(W),te=S(X);{var V=M=>{var D=ps(),J=ee(D);{var me=Ee=>{var ce=gs(),de=S(ce);Bo(de,{get element(){return u(c)},get height(){return d},onchange:qe=>E(s,JSON.stringify(qe))}),b(Ee,ce)};H(J,Ee=>{i()||Ee(me)})}var be=I(J,2),We=S(be);Fo(We,{get element(){return u(c)},get position(){return f},limit:{x:16,y:16},onchange:Ee=>E(l,JSON.stringify(Ee))}),b(M,D)};H(te,M=>{u(c)&&M(V)})}var U=I(te,4);{var ae=M=>{var D=ys();b(M,D)},ke=M=>{var D=ws(),J=ee(D),me=S(J),be=I(J,2);Cn(be,{onclick:()=>L(o,!0),size:"24px","aria-label":"Add manual injection",children:(We,Ee)=>{var ce=Ke("+");b(We,ce)},$$slots:{default:!0}}),O(()=>{ne(J,"aria-label",`${u(x).length??""} found playlinks`),z(me,u(x).length)}),b(M,D)};H(U,M=>{i()?M(ae):M(ke,!1)})}var ge=I(X,2);{var Re=M=>{ct(hs(M,{get htmlString(){return r()},onadd:D=>D.forEach(J=>n().push(J))}),D=>L(p,Y(D)),()=>u(p))};H(ge,M=>{!i()&&a()&&M(Re)})}var Se=I(ge,2);{var Z=M=>{var D=Ss(),J=ee(D);{var me=ce=>{var de=ks(),qe=S(de);Ln(qe,{children:(mt,Ps)=>{var Xr=Ke("Something went wrong, check your links below.");b(mt,Xr)},$$slots:{default:!0}}),De(7,de,()=>Ht,()=>({duration:150})),b(ce,de)};H(J,ce=>{u(m)&&ce(me)})}var be=I(J,2);Qe(be,21,()=>u(C),ce=>ce.key,(ce,de)=>{const qe=K(()=>n().findIndex(mt=>mt.key===u(de).key));Ro(ce,{onremove:()=>j(u(de).key),onhighlight:T,get linkInjection(){return n()[u(qe)]},set linkInjection(mt){n(n()[u(qe)]=mt,!0)}})},ce=>{var de=bs();b(ce,de)});var We=I(be,2);{var Ee=ce=>{var de=xs();de.__click=[ms,v,m,n,r,h,y];var qe=S(de);O(()=>{de.disabled=u(v),z(qe,u(v)?"Saving...":"Save links")}),De(1,de,()=>Kr,()=>({duration:100})),b(ce,de)};H(We,ce=>{u(w)&&n().length&&ce(Ee)})}b(M,D)};H(Se,M=>{i()||M(Z)})}var Q=I(Se,2);{var le=M=>{var D=Es(),J=S(D);is(J,{get htmlString(){return r()},onclose:()=>L(o,!1),onsave:me=>n().push(me)}),O(()=>$t(D,"top",`${u(g)??""}px`)),De(3,D,()=>Zt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),b(M,D)};H(Q,M=>{u(o)&&M(le)})}return ct(W,M=>L(c,M),()=>u(c)),O(()=>{oe(W,"panel-open",u(o)),oe(W,"loading",i())}),se("scroll",W,P),b(e,W),ie({requestNewAIInjections:B})}ue(["click"]);var As=A('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!></div>');function Cs(e,t){re(t,!0);const n=Tn(),r=jl(n),i=r.map(T=>T.outerHTML).join(""),a=Br();let l=F(null),s=F(null),c=F(!1),f=F(!0),d=F(Y([])),o=F(void 0);const v=K(()=>u(l)||{}),m=K(()=>Mn(u(v).ai_injections,()=>[],!0)),g=K(()=>Mn(u(v).link_injections,()=>[],!0));Ut(()=>{a&&p()}),nt(()=>(Ne(Ae.ArticlePageView),h(),()=>un()));async function h(){var N;a&&L(c,Y(await Fr()));const T=Gr();try{const B=await Ql();if(!a&&(B!=null&&B.exclude_urls_pattern)&&T.match(B.exclude_urls_pattern))return}catch(B){Ne(Ae.FetchingConfigFailed),console.error("TPI Config failed to fetch",B);return}if(L(l,Y(await zn(T,i,{maxTries:1}))),y({aiInjections:u(m),manualInjections:u(g)}),L(f,!1),!((N=u(l))!=null&&N.ai_running)||!a)return;const P=await zn(T,i,{requireCompletedResult:!0});u(o).requestNewAIInjections((P==null?void 0:P.ai_injections)||[])}function p(){un(),y(Kl(u(d)))}function y(T={aiInjections:u(m),manualInjections:u(g)}){if(!u(m).length&&!u(g).length)return;const P=Nl(r,w,T);JSON.stringify(P)!==JSON.stringify(u(d))&&L(d,Y(P))}function w(T){L(s,Y(T))}var x=As(),C=S(x);{var k=T=>{var P=K(()=>{var N,B;return((N=u(l))==null?void 0:N.ai_running)&&((B=u(l))==null?void 0:B.automation_enabled)});ct(Is(T,{htmlString:i,get loading(){return u(f)},get aiRunning(){return u(P)},get linkInjections(){return u(d)},set linkInjections(N){L(d,Y(N))}}),N=>L(o,Y(N)),()=>u(o))};H(C,T=>{a&&u(c)&&T(k)})}var E=I(C,2);{var j=T=>{ao(T,{get title(){return u(s).title_details},onclose:()=>L(s,null)})};H(E,T=>{u(s)&&u(s).title_details&&T(j)})}b(e,x),ie()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=kn(Cs,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),un()}};
8
+ `}}var qa=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ba(e,t){re(t,!0);let n=R(t,"maxHeight",15);Ir("scope","popover");let r=F(null),i=F(!1);nt(async()=>{await On(),a(),await On(),l()});function a(){if(!u(r))return;const{top:o,right:v,bottom:m,height:g}=u(r).getBoundingClientRect(),h=s();L(i,Y(o-h<0&&window.innerHeight-m>o+g));const p=window.innerWidth-v-h;v+h>window.innerWidth&&(u(r).style.left=`${p}px`)}function l(){if(!u(r))return;const{top:o,height:v}=u(r).getBoundingClientRect(),m=s(),g=u(i)?window.innerHeight-o-m:o+v-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=qa(),f=S(c),d=S(f);ht(d,()=>t.children),ct(c,o=>L(r,o),()=>u(r)),O(()=>{oe(c,"flip",u(i)),$t(c,"--max-height",n()?n()+"px":null)}),De(3,f,()=>Zt,()=>({duration:100,y:10})),b(e,c),ie()}const Va=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];var Ua=A('<div class="genre svelte-13nhocm"> </div>'),Ka=(e,t)=>L(t,!0),za=A('<button class="genre expand svelte-13nhocm"> </button>'),Wa=A("<!> <!>",1);function Ya(e,t){re(t,!0);let n=F(!1);const r=K(()=>u(n)?t.genres:[t.genres[0]]);var i=Wa(),a=ee(i);Qe(a,17,()=>u(r),xt,(c,f)=>{var d=ze();const o=K(()=>{var g;return(g=Va.find(h=>h.slug===u(f)))==null?void 0:g.name});var v=ee(d);{var m=g=>{var h=Ua(),p=S(h);O(()=>z(p,he(u(o)))),b(g,h)};H(v,g=>{u(o)&&g(m)})}b(c,d)});var l=I(a,2);{var s=c=>{var f=za();f.__click=[Ka,n];var d=S(f);O(()=>z(d,`+${t.genres.length-1}`)),b(c,f)};H(l,c=>{!u(n)&&t.genres.length>1&&c(s)})}b(e,i),ie()}ue(["click"]);function $a(e){let t=[];for(const n of e){let r=n;const i=t.find(s=>s.name===r.name),a=i==null?void 0:i.extra_info.category,l=r.extra_info.category;(a==="RENT"&&l==="BUY"||a==="BUY"&&l==="RENT")&&(t=t.filter(s=>s.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}ki();var Ga=Pe('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Za(e){var t=Ga();b(e,t)}var Ja=(e,t,n)=>t(n()),Xa=A('<div class="arrow svelte-1f6ryh6"><!></div>'),Qa=A('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),el=A('<div class="playlink empty svelte-1f6ryh6"> </div>'),tl=A('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function nl(e,t){re(t,!0);const n=R(t,"list",3,!1),r=ta("scope")==="modal",i=K(()=>t.playlinks.filter(h=>!!h.logo_url)),a=K(()=>$a(u(i))),l={SVOD:he("Stream"),BUY:he("Buy"),RENT:he("Rent"),TVOD:he("Rent Or Buy")};function s(h){Ne(r?Ae.TitleModalPlaylinkClick:Ae.TitlePopoverPlaylinkClick,t.title,{playlink:h})}var c=tl(),f=ee(c),d=S(f);O(()=>z(d,he("Where To Stream Online")));var o=I(f,2),v=S(o);Qe(v,17,()=>u(a),xt,(h,p)=>{let y=()=>u(p).name,w=()=>u(p).url,x=()=>u(p).logo_url,C=()=>u(p).extra_info.category;var k=Qa();k.__click=[Ja,s,y];var E=S(k),j=I(E,2),T=S(j),P=S(T),N=I(T,2),B=S(N);O(()=>z(B,l[C()]||he("Stream")));var W=I(j,2);{var X=te=>{var V=Xa(),U=S(V);Za(U),b(te,V)};H(W,te=>{n()&&te(X)})}O(()=>{ne(k,"href",w()),ne(k,"data-playlink",y()),ne(E,"src",x()),z(P,y())}),b(h,k)});var m=I(v,2);{var g=h=>{var p=el(),y=S(p);O(()=>z(y,he("Title Unavailable"))),b(h,p)};H(m,h=>{t.playlinks.length||h(g)})}O(()=>oe(o,"list",n())),b(e,c),ie()}ue(["click"]);var rl=(e,t)=>L(t,!0),il=A('<button class="show-more svelte-fluzit">Show more</button>'),al=A('<p class="svelte-fluzit"> </p>'),ll=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function ol(e,t){re(t,!0);const n=R(t,"blurb",3,""),r=R(t,"limit",3,200);let i=F(!1);const a=K(()=>t.text.slice(0,r()));var l=ll(),s=S(l),c=S(s),f=I(c);{var d=h=>{var p=Ke("...");b(h,p)};H(f,h=>{!u(i)&&t.text.length>r()&&h(d)})}var o=I(f,2);{var v=h=>{var p=il();p.__click=[rl,i],b(h,p)};H(o,h=>{!u(i)&&(t.text.length>r()||n())&&h(v)})}var m=I(s,2);{var g=h=>{var p=al(),y=S(p);O(()=>z(y,n())),b(h,p)};H(m,h=>{u(i)&&h(g)})}O(()=>z(c,u(i)?t.text:u(a))),b(e,l),ie()}ue(["click"]);var sl=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),cl=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function ul(e,t){var n=cl(),r=I(ee(n),2);Qe(r,21,()=>t.participants,xt,(i,a)=>{var l=sl(),s=S(l),c=I(s),f=S(c);O(()=>{var v;return z(f,((v=u(a).character)==null?void 0:v.slice(0,20))||"")});var d=I(f);{var o=v=>{var m=Ke("...");b(v,m)};H(d,v=>{var m;(m=u(a).character)!=null&&m.length&&v(o)})}O(()=>z(s,`${u(a).name??""} `)),b(i,l)}),b(e,n)}var dl=Pe('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function zr(e){var t=dl();b(e,t)}var fl=A('<div class="top svelte-urs395"><img class="poster svelte-urs395"></div>'),vl=A("<div> </div>"),_l=A("<!> <!>",1),hl=A('<img alt="" class="svelte-urs395">'),ml=A('<div class="content svelte-urs395" data-playpilot-link-injections-title=""><header class="header svelte-urs395"><!> <h1 class="svelte-urs395"> </h1> <div class="info svelte-urs395"><div class="imdb svelte-urs395"><!> </div> <!> <div> </div> <div class="capitalize svelte-urs395"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-urs395"><!></div>',1);function Wr(e,t){re(t,!0);const n=R(t,"small",3,!1),r=R(t,"compact",3,!1);let i=F(!1),a=F(!1),l=F(!1);var s=ml(),c=ee(s),f=S(c),d=S(f);{var o=V=>{var U=fl(),ae=S(U);O(()=>{ne(ae,"src",t.title.standing_poster),ne(ae,"alt",`Movie poster for '${t.title.title??""}'`),oe(ae,"loaded",u(i))}),se("load",ae,()=>L(i,!0)),b(V,U)};H(d,V=>{r()||V(o)})}var v=I(d,2),m=S(v),g=I(v,2),h=S(g),p=S(h);zr(p);var y=I(p),w=I(h,2);Ya(w,{get genres(){return t.title.genres}});var x=I(w,2),C=S(x),k=I(x,2),E=S(k);O(()=>z(E,he(`Type: ${t.title.type}`)));var j=I(k,2);{var T=V=>{var U=vl(),ae=S(U);O(()=>z(ae,`${t.title.length??""} ${he("Minutes")??""}`)),b(V,U)};H(j,V=>{!n()&&t.title.length&&V(T)})}var P=I(f,2),N=S(P);nl(N,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var B=I(N,2);{var W=V=>{var U=_l(),ae=ee(U);ol(ae,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var ke=I(ae,2);{var ge=Re=>{ul(Re,{get participants(){return t.title.participants}})};H(ke,Re=>{var Se;(Se=t.title.participants)!=null&&Se.length&&Re(ge)})}b(V,U)};H(B,V=>{n()||V(W)})}var X=I(c,2),te=S(X);Dr(te,()=>u(l),V=>{var U=hl();O(()=>{ne(U,"src",u(l)?t.title.standing_poster:t.title.medium_poster),oe(U,"loaded",u(a)),oe(U,"blur",u(l))}),se("load",U,()=>L(a,!0)),se("error",U,()=>L(l,!0)),b(V,U)}),O(()=>{ne(c,"data-playpilot-original-title",t.title.original_title),oe(c,"small",n()),oe(c,"compact",r()),oe(v,"truncate",n()),z(m,t.title.title),z(y,` ${t.title.imdb_score??""}`),z(C,t.title.year),oe(X,"faded",r())}),b(e,s),ie()}function gl(e,t){re(t,!0);let n=F(0);Ne(Ae.TitlePopoverView,t.title),Ba(e,{get maxHeight(){return u(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=K(()=>u(n)<250);Wr(r,{get title(){return t.title},small:!0,get compact(){return u(a)}})},$$slots:{default:!0}}),ie()}var pl=(e,t,n,r)=>t(u(n).title_details,u(r)),yl=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),wl=(e,t,n,r)=>t(u(n).title_details,r()),kl=A('<!> <a target="_blank"> </a>',1),bl=A(" <!>.",1),xl=A("<!> <br>",1),Sl=A(" <br>",1),El=A('<span class="svelte-6p0hvs"><!></span>'),Tl=A("<p></p>");function Il(e,t){re(t,!0);const n=R(t,"onclickmodal",3,c=>null);function r(c,f){Ne(Ae.AfterArticlePlaylinkClick,c,{playlink:f})}function i(c,f){Ne(Ae.AfterArticleModalButtonClick,c),n()(f)}var a=ze(),l=ee(a);{var s=c=>{var f=Tl();Qe(f,21,()=>t.linkInjections,xt,(d,o)=>{var v=El();const m=K(()=>{const{key:w,title:x,title_details:C,after_article_style:k}=u(o);return{key:w,title:x,title_details:C,after_article_style:k}}),g=K(()=>{var w;return((w=u(m).title_details)==null?void 0:w.providers)||[]});var h=S(v);{var p=w=>{var x=xl(),C=ee(x);{var k=j=>{var T=yl(),P=ee(T);O(()=>z(P,`"${u(m).title??""}" ${he("Is Available To Stream")??""} `));var N=I(P),B=S(N);B.__click=[pl,i,m,o];var W=S(B);O(()=>z(W,he("View Streaming Options"))),b(j,T)},E=j=>{var T=bl(),P=ee(T);O(()=>z(P,`"${u(m).title??""}" ${he("Is Available To Stream On")??""} `));var N=I(P);Qe(N,17,()=>u(g),xt,(B,W,X)=>{let te=()=>u(W).name,V=()=>u(W).url;var U=kl(),ae=ee(U);{var ke=Se=>{var Z=Ke();O(()=>z(Z,X===u(g).length-1?`, ${he("And")}`:",")),b(Se,Z)};H(ae,Se=>{X&&Se(ke)})}var ge=I(ae,2);ge.__click=[wl,r,m,te];var Re=S(ge);O(()=>{ne(ge,"href",V()),z(Re,te())}),b(B,U)}),b(j,T)};H(C,j=>{u(m).after_article_style==="modal_button"?j(k):j(E,!1)})}b(w,x)},y=w=>{var x=Sl(),C=ee(x);O(()=>z(C,`"${u(m).title??""}" ${he("Title Unavailable Suffix")??""} `)),b(w,x)};H(h,w=>{u(g).length?w(p):w(y,!1)})}O(()=>ne(v,"data-playpilot-injection-key",u(m).key)),b(d,v)}),b(c,f)};H(l,c=>{t.linkInjections.length&&c(s)})}b(e,a),ie()}ue(["click"]);function Al(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function xn(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Cl(e,t,n=[]){var a,l;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((l=i.parentNode)==null?void 0:l.nodeName)||"")););return i}function Pl(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function Ll(e,t,n,r){const i=Al(t),a=xn(t),l=e.slice(0,r),s=e.slice(r),c=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(c,"\\$&")}|${i.replace(c,"\\$&")}`),d=s.replace(f,n);return l+d}function it(e){return xn(e).toLowerCase().replace(/\s+/g,"")}function Ml(e,t,n){const i=e.indexOf(t),a=Math.floor((n-t.length)/2);let l=Math.max(0,i-a),s=l+n;s>e.length&&(s=e.length,l=Math.max(0,s-n));let c=e.slice(l,s).trim();return l>0&&(c="…"+c),s<e.length&&(c+="…"),c}function Dl(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Sn="data-playpilot-injection-key",En=`[${Sn}]`,ut={};let jt=null;function jl(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(l=>{var s;return l.nodeType===Node.TEXT_NODE&&((s=l.nodeValue)==null?void 0:s.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let l=a.length-1;l>=0;l--)n.push(a[l])}return t}function Tn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function Nl(e,t,n={aiInjections:[],manualInjections:[]}){var d;const r=Ul(n),i=e.map(o=>o.innerText).join(" "),a=zl(r),l=a.filter(o=>it(i).includes(it(o.sentence))),s={};for(const o of l){const v=e.findIndex(x=>it(x.innerText).includes(it(o.sentence))),m=e[v];if(!m)continue;const g=Cl(o.title,m,["A"]);if(!g||Pl(g))continue;const h=document.createElement("span");h.dataset.playpilotInjectionKey=o.key;const p=document.createElement("a");p.innerText=o.title,p.href=o.playpilot_url,p.dataset.playpilotOriginalTitle=(d=o.title_details)==null?void 0:d.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",h.insertAdjacentElement("beforeend",p);const y=Dl(Object.values(s).filter(x=>x.elementIndex===v).map(x=>x.to));m.innerHTML=Ll(m.innerHTML,o.title,h.outerHTML,y);const w=m.innerHTML.indexOf(h.outerHTML);s[o.key]={elementIndex:v,from:w,to:w+h.outerHTML.length}}Rl(a,t),Ol();const c=Wl(r);return c.length&&ql(e,c,t),Vl(r,s).filter(o=>o.title_details).map((o,v)=>{const m=!o.inactive&&!o.after_article&&!document.querySelector(`[${Sn}="${o.key}"]`),g=o.duplicate??(!o.manual&&Yl(o,v,r));return{...o,inactive:o.inactive??!1,duplicate:g,failed:m}})}function Ol(){const e=Array.from(document.querySelectorAll(`${En} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function Rl(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(Sn);if(!a)return;const l=e.find(s=>a===s.key);l&&Hl(r,l,t)}),Array.from(document.querySelectorAll(En)).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(l=>i===l.key);a&&(r.addEventListener("mouseenter",l=>Fl(l,a)),r.addEventListener("mouseleave",()=>Ft(a)))})}function Hl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Ft(t))}function Fl(e,t){if(ut[t.key]||window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=kn(gl,{target:n,props:{title:t.title_details}});ut[t.key]={injection:t,component:r}}function Ft(e,t=!0){const n=ut[e.key];n&&(Mr(n.component,{outro:t}),delete ut[e.key])}function ql(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),jt=kn(Il,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Bl(){var e;jt&&(Mr(jt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),jt=null)}function un(){Object.values(ut).forEach(t=>Ft(t.injection)),document.querySelectorAll(En).forEach(t=>t.outerHTML=t.textContent||""),Object.values(ut).forEach(({injection:t})=>Ft(t,!1)),Bl()}function Vl(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Ul({aiInjections:e,manualInjections:t}){return[...e,...t.map(n=>({...n,manual:!0}))]}function Kl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function In(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details}function zl(e){return Yr(e).filter(t=>t.in_text!==!1&&In(t))}function Wl(e){return Yr(e).filter(t=>t.after_article===!0&&In(t))}function Yr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&An(n,t)))}function Yl(e,t,n){return n.some((r,i)=>t!==i&&r.manual&&An(r,e))}function An(e,t){return e.title===t.title&&it(e.sentence)===it(t.sentence)}function $l(){const e=Tn();return{heading:Gl(e),modified_time:Zl(e),published_time:Jl(e)}}function Gl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Zl(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?$r(n):null}function Jl(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?$r(n):null}function $r(e){try{return new Date(e).toISOString()}catch{return null}}function Gr(){return location.protocol+"//"+location.host+location.pathname}let en=null;async function Zr(e,t,{hash:n=Vr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=Jt(),l=Br()?await Fr():!1,s=Ur(),c=$l();if(!a)throw new Error("No token was provided");const f=await fetch(Gt+`/external-pages/?api-token=${a}&include_title_details=true${l?"&editorial_mode_enabled=true":""}&language=${s}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:c,page_text:t,...r})});if(!f.ok)throw f;return await f.json()}async function zn(e,t,{requireCompletedResult:n=!1,pollInterval:r=3e3,maxTries:i=600}={}){let a=Vr(t),l=0;en&&clearTimeout(en);const s=async(c,f)=>{try{const d=await Zr(e,t,{hash:a});if(n&&d.automation_enabled&&d.ai_running)throw new Error;d.link_injections=Wn(d.link_injections||[]),d.ai_injections=Wn(d.ai_injections||[]),c(d);return}catch{if(l++,l>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),c();return}en=setTimeout(()=>s(c),r)}};return new Promise(s)}async function Xl(e,t){var l;const n=(l=window.PlayPilotLinkInjections)==null?void 0:l.selector,i=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Zr(Gr(),t,{params:{private_token:qr(),automation_enabled:!1,link_injections:i,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Ql(){const e=new Headers({"Content-Type":"application/json"}),t=Jt();if(!t)throw new Error("No token was provided");const n=await fetch(Gt+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Wn(e){return e.map(t=>({...t,key:Jr(t.sid)}))}function Jr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function Jt(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var eo=Pe('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function to(e){var t=eo();b(e,t)}function Cn(e,t){re(t,!0);const n=R(t,"size",3,"margin(2)"),r=R(t,"onclick",3,()=>null),i=La(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=ze(),l=ee(a);ya(l,()=>t.href?"a":"button",!1,(s,c)=>{let f;O(()=>{f=xa(s,f,{role:t.href?"link":"button",onclick:r(),class:"button",...i},"svelte-1qqv88o",s.namespaceURI===nr,s.nodeName.includes("-")),$t(s,"--size",n())});var d=ze(),o=ee(d);ht(o,()=>t.children??Ye),b(c,d)}),b(e,a),ie()}var no=(e,t)=>t()(),ro=A('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function io(e,t){re(t,!0);const n=R(t,"onclose",3,()=>null),r=R(t,"onscroll",3,()=>null);Ir("scope","modal"),nt(()=>{const o=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=o||""});function i(o){return window.innerWidth<600?Zt(o,{duration:250,y:window.innerHeight}):Fa(o,{duration:150,start:.85})}var a=ro();se("keydown",ve,({key:o})=>{o==="Escape"&&n()()});var l=S(a),s=S(l),c=S(s);Cn(c,{onclick:()=>n()(),children:(o,v)=>{to(o)},$$slots:{default:!0}});var f=I(s,2);ht(f,()=>t.children);var d=I(l,2);d.__click=[no,n],se("scroll",l,function(...o){var v;(v=r())==null||v.apply(this,o)}),De(3,l,()=>i),De(3,a,()=>Kr,()=>({duration:150})),b(e,a),ie()}ue(["click"]);function ao(e,t){re(t,!0),Ne(Ae.TitleModalView,t.title);let n=!1;function r(){n||(Ne(Ae.TitleModalScroll,t.title),n=!0)}io(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Wr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ie()}var lo=Pe('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function oo(e,t){const n=R(t,"expanded",3,!1);var r=lo();O(()=>oe(r,"expanded",n())),b(e,r)}function so(e,t,n){t(!t()),n()(t())}var co=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function dn(e,t){re(t,!0);let n=R(t,"active",15),r=R(t,"fullwidth",3,!1),i=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var l=co();l.__click=[so,n,a];var s=S(l),c=S(s);ht(c,()=>t.children),O(()=>{ne(l,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),oe(l,"active",n()),oe(l,"fullwidth",r())}),b(e,l),ie()}ue(["click"]);var uo=A('<input type="text" class="svelte-1vrer3i">');function Pn(e,t){let n=R(t,"value",15),r=R(t,"label",3,""),i=R(t,"name",3,""),a=R(t,"readonly",3,!1),l=R(t,"oninput",3,()=>null);var s=uo();s.__input=function(...c){var f;(f=l())==null||f.apply(this,c)},O(()=>{ne(s,"name",i()),ne(s,"aria-label",r()),ne(s,"placeholder",r()),s.readOnly=a()}),Aa(s,n),b(e,s)}ue(["input"]);var fo=Pe('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),vo=Pe('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),_o=Pe('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Yn(e,t){const n=R(t,"align",3,"bottom");var r=_o(),i=S(r);{var a=s=>{var c=fo();b(s,c)},l=s=>{var c=ze(),f=ee(c);{var d=o=>{var v=vo();b(o,v)};H(f,o=>{n()==="center"&&o(d)},!0)}b(s,c)};H(i,s=>{n()==="bottom"?s(a):s(l,!1)})}b(e,r)}var ho=A("<!> In-text Playlink",1),mo=A("<!> Bottom Playlink",1),go=(e,t)=>t().after_article_style="playlinks",po=(e,t)=>t().after_article_style="modal_button",yo=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),wo=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function ko(e,t){re(t,!0);const n=R(t,"linkInjection",7),r=K(()=>n().after_article_style==="modal_button");var i=wo(),a=ee(i),l=S(a),s=K(()=>n().in_text??!0);dn(l,{fullwidth:!0,get active(){return u(s)},onclick:v=>{n().in_text=v,n().manual=!0},label:"In-text Playlink",children:(v,m)=>{var g=ho(),h=ee(g);Yn(h,{align:"center"}),b(v,g)},$$slots:{default:!0}});var c=I(l,2),f=K(()=>n().after_article??!1);dn(c,{fullwidth:!0,get active(){return u(f)},onclick:v=>{n().after_article=v,n().manual=!0},label:"Bottom Playlink",children:(v,m)=>{var g=mo(),h=ee(g);Yn(h,{align:"bottom"}),b(v,g)},$$slots:{default:!0}});var d=I(a,2);{var o=v=>{var m=yo(),g=I(S(m),2),h=S(g);h.__click=[go,n];var p=I(h,2);p.__click=[po,n];var y=I(p,2);O(()=>{ne(g,"aria-activedescendant",`playlinks-${(u(r)?"after-article":"in-text")??""}`),ne(h,"aria-selected",!u(r)||null),oe(h,"active",!u(r)),ne(p,"aria-selected",u(r)||null),oe(p,"active",u(r)),oe(y,"right",u(r))}),De(3,m,()=>Ht,()=>({duration:100})),b(v,m)};H(d,v=>{n().after_article&&v(o)})}b(e,i),ie()}ue(["click"]);var bo=A('<div class="alert svelte-1tq7qhv"><!></div>');function Ln(e,t){re(t,!0);var n=bo(),r=S(n);ht(r,()=>t.children),b(e,n),ie()}var xo=Pe('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function So(e){var t=xo();b(e,t)}var Eo=(e,t)=>L(t,!u(t)),To=A('<div class="content svelte-1fmy0wh"><!></div>'),Io=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function Ao(e,t){re(t,!0);let n=F(!1),r=F(null);function i(d){var v;const o=d.target;o===u(r)||(v=u(r))!=null&&v.contains(o)||L(n,!1)}var a=Io();se("click",ve,i);var l=S(a);l.__click=[Eo,n];var s=S(l);So(s),ct(l,d=>L(r,d),()=>u(r));var c=I(l,2);{var f=d=>{var o=To(),v=S(o);ht(v,()=>t.children),De(1,o,()=>Zt,()=>({duration:150,y:5})),b(d,o)};H(c,d=>{u(n)&&d(f)})}O(()=>{ne(l,"aria-label",t.ariaLabel),ne(l,"aria-expanded",u(n))}),b(e,a),ie()}ue(["click"]);function Co(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var Po=(e,t)=>L(t,!u(t)),Lo=A('<button class="expand-sentence svelte-1lxtpkd"> </button>'),Mo=A('<button class="context-menu-action svelte-1lxtpkd">Remove</button>'),Do=(e,t)=>L(t,!u(t)),jo=A('<div class="actions svelte-1lxtpkd"><button class="expand svelte-1lxtpkd" aria-label="Expand"><!></button> <!></div>'),No=A('<div class="expanded svelte-1lxtpkd"><div class="label svelte-1lxtpkd">Link URL</div> <!> <div class="label offset svelte-1lxtpkd">Layout options</div> <div class="type-select svelte-1lxtpkd"><!></div></div>'),Oo=A('<div class="item svelte-1lxtpkd"><div class="header svelte-1lxtpkd"><img class="poster svelte-1lxtpkd" alt="" width="32" height="48"> <div class="info svelte-1lxtpkd"><div class="title svelte-1lxtpkd"> </div> <div class="sentence svelte-1lxtpkd"><!> <!></div></div> <div class="context-menu svelte-1lxtpkd"><!></div></div> <div class="content svelte-1lxtpkd"><!> <!></div></div>');function Ro(e,t){re(t,!0);const n=R(t,"linkInjection",15),r=R(t,"onremove",3,()=>null),i=R(t,"onhighlight",3,()=>null),a=K(()=>n()||{}),l=K(()=>u(a).key),s=K(()=>u(a).sentence),c=K(()=>u(a).title_details),f=K(()=>u(a).failed),d=K(()=>u(a).inactive),o=K(()=>u(c)),v=K(()=>Ml(n().sentence,n().title,60));let m=F(!1),g=F(!1),h=F(!1),p=F(null);nt(()=>{u(f)&&Ne(Ae.InjectionFailed,u(o),{phrase:n().title,sentence:u(s)})});function y(Z=!0){x().forEach(le=>{le.classList.toggle("injection-highlight",Z)})}function w(Z){let Q=Z.target,le=Q==null?void 0:Q.dataset.playpilotInjectionKey;Q&&!le&&(Q=Q.closest(`[data-playpilot-injection-key="${u(l)}"]`),le=Q==null?void 0:Q.dataset.playpilotInjectionKey),L(h,le===u(l)),u(p)&&u(h)&&i()(u(p))}function x(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${u(l)}"]`))}var C=Oo();se("mouseover",ve,w),C.__click=[Co,y,x];var k=S(C),E=S(k),j=I(E,2),T=S(j),P=S(T),N=I(T,2),B=S(N);pa(B,()=>(u(g)?u(s):u(v)).replace(n().title,`<em>${n().title}</em>`));var W=I(B,2);{var X=Z=>{var Q=Lo();Q.__click=[Po,g];var le=S(Q);O(()=>z(le,u(g)?"Less":"More")),b(Z,Q)};H(W,Z=>{u(v).length<u(s).length&&Z(X)})}var te=I(j,2),V=S(te);Ao(V,{ariaLabel:"More options",children:(Z,Q)=>{var le=Mo();le.__click=function(...M){var D;(D=r())==null||D.apply(this,M)},b(Z,le)},$$slots:{default:!0}});var U=I(k,2),ae=S(U);{var ke=Z=>{Ln(Z,{children:(Q,le)=>{var M=Ke("A match was found, but the link could not be injected.");b(Q,M)},$$slots:{default:!0}})},ge=Z=>{var Q=jo(),le=S(Q);le.__click=[Do,m];var M=S(le);oo(M,{get expanded(){return u(m)}});var D=I(le,2),J=K(()=>u(d)?"Inactive":"Visible"),me=K(()=>!n().inactive);dn(D,{get label(){return u(J)},get active(){return u(me)},onclick:be=>{n(n().inactive=!be,!0),n(n().manual=!0,!0)},children:(be,We)=>{var Ee=Ke();O(()=>z(Ee,u(d)?"Inactive":"Visible")),b(be,Ee)},$$slots:{default:!0}}),O(()=>ne(le,"aria-expanded",u(m))),b(Z,Q)};H(ae,Z=>{u(f)?Z(ke):Z(ge,!1)})}var Re=I(ae,2);{var Se=Z=>{var Q=No(),le=I(S(Q),2);Pn(le,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(J){n(n().playpilot_url=J,!0)}});var M=I(le,4),D=S(M);ko(D,{get linkInjection(){return n()}}),De(3,Q,()=>Ht,()=>({duration:100})),b(Z,Q)};H(Re,Z=>{u(m)&&Z(Se)})}ct(C,Z=>L(p,Z),()=>u(p)),O(()=>{oe(C,"highlighted",u(h)),oe(C,"inactive",u(d)),ne(E,"src",u(o).standing_poster),z(P,u(o).title)}),se("mouseenter",C,()=>y(!0)),se("mouseleave",C,()=>y(!1)),De(6,C,()=>Ht,()=>({duration:200})),b(e,C),ie()}ue(["click"]);var Ho=A('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Fo(e,t){re(t,!0);let n=R(t,"element",7),r=R(t,"position",23,()=>({x:0,y:0})),i=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),l=!1,s={x:0,y:0},c=r();nt(()=>{f(r().x,r().y)});function f(h,p){const y=window.innerWidth,w=window.innerHeight,x=n().clientWidth,C=n().clientHeight;h=Math.min(Math.max(h,i().x),y-x-i().x),p=Math.min(Math.max(p,i().y),w-C-i().y),n().style.right=h+"px",n().style.bottom=Math.max(p,i().y)+"px",r({x:h,y:p}),a()(r())}function d(h){var p,y;return{x:h.pageX||((p=h.touches)==null?void 0:p[0].pageX)||0,y:h.pageY||((y=h.touches)==null?void 0:y[0].pageY)||0}}function o(h){l=!0,s=d(h),c=r()}function v(h){if(!l)return;const p=d(h),y=p.x-s.x,w=p.y-s.y,x=c.x-y,C=c.y-w;f(x,C)}function m(){l&&(l=!1)}var g=Ho();se("mousemove",ve,v),se("touchmove",ve,v,void 0,!0),se("mouseup",ve,m),se("touchend",ve,m),se("resize",ve,()=>f(r().x,r().y)),g.__mousedown=o,g.__touchstart=o,b(e,g),ie()}ue(["mousedown","touchstart"]);var qo=A('<button class="resize-handle svelte-1367ri6" aria-label="Move editor"></button>');function Bo(e,t){re(t,!0);let n=R(t,"element",7),r=R(t,"height",7,200),i=R(t,"onchange",3,()=>null);const a=16;let l=!1,s=0,c=r();nt(()=>{r()&&f(r())});function f(h){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(h,m()));n().style.height=`${y}px`,r(y),i()(y)}function d(h){var p,y;l=!0,s=h.pageY||((y=(p=h.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,c=n().clientHeight}function o(h){var x,C;if(!l)return;const p=h.pageY||((C=(x=h.touches)==null?void 0:x[0])==null?void 0:C.pageY)||0,y=s-p,w=c+y;f(w)}function v(){l=!1}function m(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var g=qo();se("mousemove",ve,o),se("touchmove",ve,o,void 0,!0),se("mouseup",ve,v),se("touchend",ve,v),se("resize",ve,()=>f(r())),g.__mousedown=d,g.__touchstart=d,b(e,g),ie()}ue(["mousedown","touchstart"]);var Vo=Pe('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Uo(e){var t=Vo();b(e,t)}async function Ko(e){const t=new Headers({"Content-Type":"application/json"}),n=Jt();if(!n)throw new Error("No token was provided");const r=await fetch(Gt+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var zo=Pe('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Wo(e){var t=zo();b(e,t)}var Yo=A("<div> </div>"),$o=e=>e.stopImmediatePropagation(),Go=A('<button class="item svelte-tbzvlp"><img class="poster svelte-tbzvlp" alt="" width="28" height="42"> <div class="content"><div class="name svelte-tbzvlp"> </div> <div class="meta svelte-tbzvlp"><div class="imdb svelte-tbzvlp"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-tbzvlp"><!></a></button>');function $n(e,t){re(t,!0);const n=R(t,"hoverable",3,!0),r=R(t,"onclick",3,()=>null);var i=Go();i.__click=function(...k){var E;(E=r())==null||E.apply(this,k)};var a=S(i),l=I(a,2),s=S(l),c=S(s),f=I(s,2),d=S(f),o=S(d);zr(o);var v=I(o),m=I(d,2),g=S(m),h=I(m,2),p=S(h),y=I(h,2);{var w=k=>{var E=Yo(),j=S(E);O(()=>z(j,`${t.title.length??""} min`)),b(k,E)};H(y,k=>{t.title.length&&k(w)})}var x=I(l,2);x.__click=[$o];var C=S(x);Wo(C),O(()=>{oe(i,"hoverable",n()),ne(a,"src",t.title.standing_poster),z(c,t.title.title),z(v,` ${t.title.imdb_score??""}`),z(g,t.title.year),z(p,t.title.type),ne(x,"href",`${Rr}/${t.title.type??""}/${t.title.slug??""}`)}),b(e,i),ie()}ue(["click"]);var Zo=A('<em class="empty svelte-1olb8n0">No results found</em>'),Jo=A('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Xo=A('<div class="selected svelte-1olb8n0"><!></div>'),Qo=A('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function es(e,t){re(t,!0);let n=R(t,"onselect",3,()=>null),r=R(t,"query",15),i=F(Y([])),a=F(null),l=F(!1);Ut(()=>{r()&&s(r())});async function s(h){L(l,!0);try{L(i,Y(await Ko(h)))}finally{L(l,!1)}}function c(h){r(h.title),L(a,Y(h)),n()(h)}var f=Qo(),d=S(f);Pn(d,{oninput:()=>L(a,null),name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var o=I(d,2);{var v=h=>{var p=Jo();Qe(p,21,()=>u(i),y=>y.sid,(y,w)=>{$n(y,{get title(){return u(w)},onclick:()=>c(u(w))})},y=>{var w=ze(),x=ee(w);{var C=k=>{var E=Zo();b(k,E)};H(x,k=>{u(l)||k(C)})}b(y,w)}),b(h,p)};H(o,h=>{r()&&!u(a)&&h(v)})}var m=I(o,2);{var g=h=>{var p=Xo(),y=S(p);$n(y,{get title(){return u(a)},hoverable:!1}),b(h,p)};H(m,h=>{u(a)&&h(g)})}b(e,f),ie()}function ts(e,t,n,r,i,a){if(!u(t)||!u(n))return;const l=u(n).type==="movie"?"movie":"show",s=Rr+`/${l}/${u(n).slug}`,c={sid:u(n).sid,title:u(t),sentence:u(r),playpilot_url:s,key:Jr(u(n).sid),title_details:u(n),manual:!0};i.onsave(c),a()()}var ns=A('<div class="error svelte-l7tw17"><!></div>'),rs=A('<section class="layout svelte-l7tw17"><div class="header svelte-l7tw17"><!> <h2 class="svelte-l7tw17">Add Playlink manually</h2></div> <p class="svelte-l7tw17">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-l7tw17">Selected text</label> <!> <!> <label for="text" class="svelte-l7tw17">Paired title</label> <!> <button class="save svelte-l7tw17">Add playlink</button></section>');function is(e,t){re(t,!0);let n=R(t,"htmlString",3,""),r=R(t,"onclose",3,()=>null),i=F(""),a=F(""),l=F(null),s=F(""),c=F("");nt(f);function f(){const k=window.getSelection();if(!(k!=null&&k.anchorNode)||!Tn().contains(k.anchorNode.parentElement))return;const E=k.toString().trim();if(!E)return;if(L(s,""),L(i,Y(E)),k.anchorNode!==k.focusNode){L(s,"Selection is broken up by multiple elements. Please select the text more directly.");return}L(c,Y(u(i))),L(a,Y(d(k,E)));const j=k.getRangeAt(0).commonAncestorContainer.textContent,T=xn(n());(!j||!T.includes(j))&&L(s,"Selection was not inside of given content")}function d(k,E){const j=k.getRangeAt(0);let T=j.startContainer;for(;(T.textContent||"").length<=E.length*3&&T.parentNode;)T=T.parentNode;if(!T||!T.textContent)return"";const P=T.textContent,N=o(T,j.startContainer,j.startOffset),B=o(T,j.endContainer,j.endOffset),W=P.slice(0,N).lastIndexOf("."),X=P.slice(B).match(/[.!?]/),te=X?B+X.index:P.length,V=W===-1?0:W+1,U=te;return P.slice(V,U+1).trim()}function o(k,E,j){let T=0;const P=k,N=B=>{var W;if(B===E)return T+=j,!0;B.nodeType===Node.TEXT_NODE&&(T+=((W=B.textContent)==null?void 0:W.length)||0);for(let X=B.firstChild;X;X=X.nextSibling)if(N(X))return!0;return!1};return N(P),T}function v(k){var E,j;L(l,Y(k)),(j=(E=window.getSelection())==null?void 0:E.removeAllRanges)==null||j.call(E)}var m=rs();se("mouseup",ve,f);var g=S(m),h=S(g);Cn(h,{get onclick(){return r()},size:"24px",children:(k,E)=>{Uo(k)},$$slots:{default:!0}});var p=I(g,6);Pn(p,{get value(){return u(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var y=I(p,2);{var w=k=>{var E=ns(),j=S(E);Ln(j,{children:(T,P)=>{var N=Ke();O(()=>z(N,u(s))),b(T,N)},$$slots:{default:!0}}),b(k,E)};H(y,k=>{u(s)&&k(w)})}var x=I(y,4);Dr(x,()=>u(a)+u(i),k=>{es(k,{onselect:v,get query(){return u(c)},set query(E){L(c,Y(E))}})});var C=I(x,2);C.__click=[ts,i,l,a,t,r],O(()=>C.disabled=!u(i)||!u(l)),b(e,m),ie()}ue(["click"]);var as=Pe('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function ls(e){var t=as();b(e,t)}var os=A('AI links are currently processing. This can take several minutes.<br class="svelte-7ilatt"> You can add manual links while this is ongoing.',1),ss=(e,t,n,r)=>{t.onadd(u(n)),L(r,!0)},cs=A('AI links are ready. <strong class="svelte-7ilatt"> </strong> New links will be used next time you refresh the page, or you can insert them now. <button class="button svelte-7ilatt">Add AI links</button>',1),us=(e,t)=>L(t,!0),ds=A('AI links finished running, but no new links were found. <button class="button svelte-7ilatt">Dismiss</button>',1),fs=A('<div class="loading-bar svelte-7ilatt" data-testid="loading-bar"></div>'),vs=A('<div class="animator svelte-7ilatt"></div>'),_s=A('<div class="ai-indicator svelte-7ilatt"><div class="content svelte-7ilatt"><div class="icon svelte-7ilatt"><!></div> <div class="svelte-7ilatt"><!></div> <!></div> <div class="border svelte-7ilatt"><!></div></div>');function hs(e,t){re(t,!0);const n=R(t,"htmlString",3,""),r=K(()=>Math.min(Math.max(n().length*30,6e4),6e5));let i=F(!0),a=F(Y([])),l=F(!1);function s(o){L(i,!1),L(a,Y(o))}var c=ze(),f=ee(c);{var d=o=>{var v=_s(),m=S(v),g=S(m),h=S(g);ls(h);var p=I(g,2),y=S(p);{var w=P=>{var N=os();b(P,N)},x=P=>{var N=ze(),B=ee(N);{var W=te=>{var V=cs(),U=I(ee(V)),ae=S(U),ke=I(U,2);ke.__click=[ss,t,a,l],O(()=>z(ae,`${u(a).length??""} New ${(u(a).length>1?"links were":"link was")??""} found.`)),b(te,V)},X=te=>{var V=ds(),U=I(ee(V));U.__click=[us,l],b(te,V)};H(B,te=>{var V;(V=u(a))!=null&&V.length?te(W):te(X,!1)},!0)}b(P,N)};H(y,P=>{u(i)?P(w):P(x,!1)})}var C=I(p,2);{var k=P=>{var N=fs();O(()=>$t(N,"animation-duration",`${u(r)??""}ms`)),b(P,N)};H(C,P=>{u(i)&&P(k)})}var E=I(m,2),j=S(E);{var T=P=>{var N=vs();b(P,N)};H(j,P=>{u(i)&&P(T)})}O(()=>oe(v,"running",u(i))),b(o,v)};H(f,o=>{u(l)||o(d)})}return b(e,c),ie({notifyUserOfNewState:s})}ue(["click"]);async function ms(e,t,n,r,i,a,l){try{L(t,!0),L(n,!1),r(await Xl(r(),i())),L(a,Y(u(l)))}catch{L(n,!0)}finally{L(t,!1)}}var gs=A('<div class="handle svelte-1w9c21y"><!></div>'),ps=A('<!> <div class="handle svelte-1w9c21y"><!></div>',1),ys=A('<div class="loading svelte-1w9c21y">Loading...</div>'),ws=A('<div class="bubble svelte-1w9c21y"> </div> <!>',1),ks=A('<div class="error svelte-1w9c21y"><!></div>'),bs=A('<div class="empty svelte-1w9c21y">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),xs=A('<button class="save svelte-1w9c21y"> </button>'),Ss=A('<!> <div class="items svelte-1w9c21y"></div> <!>',1),Es=A('<div class="panel playpilot-styled-scrollbar svelte-1w9c21y"><!></div>'),Ts=A('<section class="editor playpilot-styled-scrollbar svelte-1w9c21y"><header class="header svelte-1w9c21y"><!> <h1 class="svelte-1w9c21y">Playlinks</h1> <!></header> <!> <!> <!></section>');function Is(e,t){re(t,!0);let n=R(t,"linkInjections",15),r=R(t,"htmlString",3,""),i=R(t,"loading",3,!1),a=R(t,"aiRunning",3,!1);const l="editor-position",s="editor-height";let c=F(null),f=Y(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),d=Y(parseInt(localStorage.getItem(s)||"0")),o=F(!1),v=F(!1),m=F(!1),g=F(0),h=F(""),p=F(void 0);const y=K(()=>JSON.stringify(n())),w=K(()=>u(h)!==u(y)),x=K(()=>n().filter(M=>M.title_details&&!M.removed&&!M.duplicate&&(M.manual||!M.manual&&!M.failed))),C=K(()=>k(u(x)));Ut(()=>{i()||Je(()=>{L(h,Y(u(y))),N()})});function k(M){return M.sort((D,J)=>D.failed!==J.failed?D.failed?1:-1:D.title_details.title.localeCompare(J.title_details.title))}function E(M,D){localStorage.setItem(M,D)}function j(M){const D=n().findIndex(J=>J.key===M);n(n()[D].manual=!0,!0),n(n()[D].removed=!0,!0),n([...n()])}function T(M){if(!u(c))return;const D=M.offsetTop,J=D+M.offsetHeight,me=u(c).scrollTop,be=me+u(c).clientHeight;D>=me&&J<=be||u(c).scrollTo({top:D-u(c).clientHeight/2,behavior:"smooth"})}function P(M){const D=M.target;L(g,Y(D.scrollTop))}function N(){const M={total:n().length.toString(),failed_automatic:n().filter(D=>D.failed&&!D.manual).length.toString(),failed_manual:n().filter(D=>D.failed&&D.manual).length.toString(),final_injected:u(x).length.toString()};Ne(Ae.TotalInjectionsCount,null,M)}function B(M){const D=M.filter(J=>{if(In(J))return!n().some(me=>An(J,me))});u(p).notifyUserOfNewState(D)}var W=Ts(),X=S(W),te=S(X);{var V=M=>{var D=ps(),J=ee(D);{var me=Ee=>{var ce=gs(),de=S(ce);Bo(de,{get element(){return u(c)},get height(){return d},onchange:qe=>E(s,JSON.stringify(qe))}),b(Ee,ce)};H(J,Ee=>{i()||Ee(me)})}var be=I(J,2),We=S(be);Fo(We,{get element(){return u(c)},get position(){return f},limit:{x:16,y:16},onchange:Ee=>E(l,JSON.stringify(Ee))}),b(M,D)};H(te,M=>{u(c)&&M(V)})}var U=I(te,4);{var ae=M=>{var D=ys();b(M,D)},ke=M=>{var D=ws(),J=ee(D),me=S(J),be=I(J,2);Cn(be,{onclick:()=>L(o,!0),size:"24px","aria-label":"Add manual injection",children:(We,Ee)=>{var ce=Ke("+");b(We,ce)},$$slots:{default:!0}}),O(()=>{ne(J,"aria-label",`${u(x).length??""} found playlinks`),z(me,u(x).length)}),b(M,D)};H(U,M=>{i()?M(ae):M(ke,!1)})}var ge=I(X,2);{var Re=M=>{ct(hs(M,{get htmlString(){return r()},onadd:D=>D.forEach(J=>n().push(J))}),D=>L(p,Y(D)),()=>u(p))};H(ge,M=>{!i()&&a()&&M(Re)})}var Se=I(ge,2);{var Z=M=>{var D=Ss(),J=ee(D);{var me=ce=>{var de=ks(),qe=S(de);Ln(qe,{children:(mt,Ps)=>{var Xr=Ke("Something went wrong, check your links below.");b(mt,Xr)},$$slots:{default:!0}}),De(7,de,()=>Ht,()=>({duration:150})),b(ce,de)};H(J,ce=>{u(m)&&ce(me)})}var be=I(J,2);Qe(be,21,()=>u(C),ce=>ce.key,(ce,de)=>{const qe=K(()=>n().findIndex(mt=>mt.key===u(de).key));Ro(ce,{onremove:()=>j(u(de).key),onhighlight:T,get linkInjection(){return n()[u(qe)]},set linkInjection(mt){n(n()[u(qe)]=mt,!0)}})},ce=>{var de=bs();b(ce,de)});var We=I(be,2);{var Ee=ce=>{var de=xs();de.__click=[ms,v,m,n,r,h,y];var qe=S(de);O(()=>{de.disabled=u(v),z(qe,u(v)?"Saving...":"Save links")}),De(1,de,()=>Kr,()=>({duration:100})),b(ce,de)};H(We,ce=>{u(w)&&n().length&&ce(Ee)})}b(M,D)};H(Se,M=>{i()||M(Z)})}var Q=I(Se,2);{var le=M=>{var D=Es(),J=S(D);is(J,{get htmlString(){return r()},onclose:()=>L(o,!1),onsave:me=>n().push(me)}),O(()=>$t(D,"top",`${u(g)??""}px`)),De(3,D,()=>Zt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),b(M,D)};H(Q,M=>{u(o)&&M(le)})}return ct(W,M=>L(c,M),()=>u(c)),O(()=>{oe(W,"panel-open",u(o)),oe(W,"loading",i())}),se("scroll",W,P),b(e,W),ie({requestNewAIInjections:B})}ue(["click"]);var As=A('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!></div>');function Cs(e,t){re(t,!0);const n=Tn(),r=jl(n),i=r.map(T=>T.outerHTML).join(""),a=Br();let l=F(null),s=F(null),c=F(!1),f=F(!0),d=F(Y([])),o=F(void 0);const v=K(()=>u(l)||{}),m=K(()=>Mn(u(v).ai_injections,()=>[],!0)),g=K(()=>Mn(u(v).link_injections,()=>[],!0));Ut(()=>{a&&p()}),nt(()=>(Ne(Ae.ArticlePageView),h(),()=>un()));async function h(){var N;a&&L(c,Y(await Fr()));const T=Gr();try{const B=await Ql();if(!a&&(B!=null&&B.exclude_urls_pattern)&&T.match(B.exclude_urls_pattern))return}catch(B){Ne(Ae.FetchingConfigFailed),console.error("TPI Config failed to fetch",B);return}if(L(l,Y(await zn(T,i,{maxTries:1}))),y({aiInjections:u(m),manualInjections:u(g)}),L(f,!1),!((N=u(l))!=null&&N.ai_running)||!a)return;const P=await zn(T,i,{requireCompletedResult:!0});u(o).requestNewAIInjections((P==null?void 0:P.ai_injections)||[])}function p(){un(),y(Kl(u(d)))}function y(T={aiInjections:u(m),manualInjections:u(g)}){if(!u(m).length&&!u(g).length)return;const P=Nl(r,w,T);JSON.stringify(P)!==JSON.stringify(u(d))&&L(d,Y(P))}function w(T){L(s,Y(T))}var x=As(),C=S(x);{var k=T=>{var P=K(()=>{var N,B;return((N=u(l))==null?void 0:N.ai_running)&&((B=u(l))==null?void 0:B.automation_enabled)});ct(Is(T,{htmlString:i,get loading(){return u(f)},get aiRunning(){return u(P)},get linkInjections(){return u(d)},set linkInjections(N){L(d,Y(N))}}),N=>L(o,Y(N)),()=>u(o))};H(C,T=>{a&&u(c)&&T(k)})}var E=I(C,2);{var j=T=>{ao(T,{get title(){return u(s).title_details},onclose:()=>L(s,null)})};H(E,T=>{u(s)&&u(s).title_details&&T(j)})}b(e,x),ie()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=kn(Cs,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),un()}};
9
9
 
10
10
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "3.1.0-beta.2",
3
+ "version": "3.1.0-beta.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -1,2 +1,2 @@
1
1
  export const playPilotBaseUrl = 'https://www.playpilot.com'
2
- export const apiBaseUrl = 'https://partner-api.playpilot.tech/1.0.0'
2
+ export const apiBaseUrl = 'https://partner-api-staging.playpilot.tech/1.0.0'
@@ -17,7 +17,7 @@
17
17
  let startHeight = height
18
18
 
19
19
  onMount(() => {
20
- setHeight(height)
20
+ if (height) setHeight(height)
21
21
  })
22
22
 
23
23
  function setHeight(newHeight: number): void {