@playpilot/tpi 5.2.0-beta.4 → 5.2.0
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.
package/dist/link-injections.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.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-aqwna4{z-index:2147483647;box-sizing:border-box;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-aqwna4{padding:32px}}.dialog.svelte-aqwna4{z-index:1;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-aqwna4{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-aqwna4{z-index:0;position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-aqwna4{--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-aqwna4:hover{filter:brightness(1.1)}.genre.svelte-1ebula3{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-genre-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-1ebula3:is(button:where(.svelte-1ebula3)):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)))}img.svelte-g63n1y{--size: 32px;height:var(--size);width:var(--size);border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-g63n1y{--size: 40px}}.heading.svelte-g63n1y{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}.playlinks.svelte-g63n1y{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-g63n1y::-webkit-scrollbar{display:none}.list.svelte-g63n1y{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-g63n1y img:where(.svelte-g63n1y){--size: 32px}}.playlink.svelte-g63n1y{position:relative;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)!important;text-decoration:none!important;white-space:nowrap;font-size:var(--playpilot-playlinks-font-size, 12px);line-height:1}.playlink.svelte-g63n1y:hover,.playlink.svelte-g63n1y:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.highlighted.svelte-g63n1y:before{content:"";z-index:1;display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;box-shadow:inset 0 0 0 2px currentColor;opacity:.35;pointer-events:none}.playlink.svelte-g63n1y img:where(.svelte-g63n1y){margin:0}.list.svelte-g63n1y .playlink:where(.svelte-g63n1y){padding:8px;gap:8px}.name.svelte-g63n1y{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-g63n1y{margin-top:var(--playpilot-playlinks-category-margin, 8px);font-size:var(--playpilot-playlinks-category-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-g63n1y{white-space:initial;line-height:1.35}.arrow.svelte-g63n1y{display:flex;margin-left:auto;padding:0 8px}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{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-1u3je71:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}.heading.svelte-1026zg0{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-1026zg0 .heading:where(.svelte-1026zg0){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-1026zg0 .heading:where(.svelte-1026zg0){margin-top:0}.content.svelte-1026zg0{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.svelte-1026zg0 ::view-transition-old(content),.content.svelte-1026zg0 ::view-transition-new(content){height:100%}.content.small.svelte-1026zg0{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-1026zg0{padding:32px 0 16px;background:transparent}.small.svelte-1026zg0 .header:where(.svelte-1026zg0){padding-top:16px}.compact.svelte-1026zg0 .header:where(.svelte-1026zg0){padding:0 0 16px}.top.svelte-1026zg0{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-1026zg0{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-1026zg0{opacity:1}.info.svelte-1026zg0{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-1026zg0 .info:where(.svelte-1026zg0){gap:8px 12px}.imdb.svelte-1026zg0{display:flex;align-items:center;gap:4px}.imdb.svelte-1026zg0 svg{margin-top:-2px}.small.svelte-1026zg0 .imdb:where(.svelte-1026zg0) svg{margin-top:0;width:12px;height:12px}.background.svelte-1026zg0{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-1026zg0: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-1026zg0 img:where(.svelte-1026zg0){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-1026zg0 img.loaded:where(.svelte-1026zg0){opacity:1}.background.svelte-1026zg0 img.blur:where(.svelte-1026zg0){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-1026zg0{opacity:.15}.capitalize.svelte-1026zg0{text-transform:capitalize}.truncate.svelte-1026zg0{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover.svelte-tb2xdq{--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-tb2xdq{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-tb2xdq{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;view-transition-name:playpilot-title-content}.title-popover.svelte-d86q0q{position:absolute}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-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-pfvkex: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))}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}.alert.svelte-df5n87{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px;font-family:var(--playpilot-font-family)}.alert.warning.svelte-df5n87{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.fixed.svelte-df5n87{position:fixed;bottom:1rem;right:1rem;width:80%;max-width:25rem}.alert.svelte-df5n87 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{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-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{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-1shw34x{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-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}button.svelte-zpsd2z{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-zpsd2z:hover{cursor:pointer;color:#fff}.context-menu.svelte-zpsd2z{position:relative}.content.svelte-zpsd2z{z-index:1;position:absolute;top:100%;right:0;max-width:240px;border-radius:8px;background:var(--playpilot-lighter)}select.svelte-o5qkco{background:var(--playpilot-content);padding:8px 16px;width:100%;border:0;border-radius:8px;color:var(--playpilot-text-color);font-family:inherit;font-size:13.6px}option.svelte-o5qkco:hover,option.svelte-o5qkco:active,option.svelte-o5qkco:checked{background-color:var(--playpilot-content-light);font-weight:700}.form.svelte-o5qkco{padding:32px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color)}.heading.svelte-o5qkco{font-size:20px}.info.svelte-o5qkco{margin:16px 0;font-size:13.6px;color:var(--playpilot-text-color-alt)}.info.svelte-o5qkco strong:where(.svelte-o5qkco){color:var(--playpilot-text-color)}.submit.svelte-o5qkco{margin-top:16px;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-green);box-shadow:var(--playpilot-shadow);font-family:inherit;color:var(--playpilot-text-color);font-size:13.6px;cursor:pointer}.submit[disabled].svelte-o5qkco{background:var(--playpilot-content);color:var(--playpilot-text-color-alt);box-shadow:none;opacity:.5;cursor:default}.sent.svelte-o5qkco{margin-top:16px;padding:8px 0;color:var(--playpilot-green);font-size:13.6px}.item.svelte-lo6h85{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-lo6h85:hover,.item.highlighted.svelte-lo6h85{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-lo6h85{outline:2px solid var(--playpilot-primary)}.header.svelte-lo6h85{display:flex;gap:16px;width:100%}.poster.svelte-lo6h85{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-lo6h85 .poster:where(.svelte-lo6h85){opacity:.35}.title.svelte-lo6h85{font-size:14px;word-break:break-word}.sentence.svelte-lo6h85{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-lo6h85 em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-lo6h85{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-lo6h85:hover{color:var(--playpilot-text-color)}.content.svelte-lo6h85{padding-top:8px}.inactive.svelte-lo6h85 .info:where(.svelte-lo6h85){opacity:.35}.context-menu.svelte-lo6h85{margin:0 -4px 0 auto}.context-menu-action.svelte-lo6h85{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:8px 16px;width:100%;text-align:left;font-family:inherit;white-space:nowrap;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-lo6h85:hover{color:var(--playpilot-text-color);background-color:var(--playpilot-content-light)}.context-menu-action.svelte-lo6h85:first-child{margin-top:8px}.context-menu-action.svelte-lo6h85:last-child{margin-bottom:8px}.actions.svelte-lo6h85{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-lo6h85{-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-lo6h85:hover{filter:brightness(1.2)}.expanded.svelte-lo6h85{padding-top:16px}.type-select.svelte-lo6h85{margin-top:8px}.label.svelte-lo6h85{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-lo6h85{margin-top:12px}.warning.svelte-lo6h85{margin:0 auto 0 8px}.warning.svelte-lo6h85 svg{display:block}.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-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-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:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e: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)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{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-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}p.svelte-2m2urs{margin:0 0 8px}.alert.svelte-2m2urs{margin:0 8px}.button.svelte-2m2urs{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;padding:4px;border:0;border-radius:4px;background:var(--playpilot-warning);transition:opacity .1s;font-family:inherit;color:var(--playpilot-dark);font-size:.85rem;cursor:pointer}.button.svelte-2m2urs:hover{background:#fff}a.svelte-1kpafo0{color:currentColor}p.svelte-1kpafo0{margin:0}.ai-indicator.svelte-1kpafo0{position:relative;margin:0 8px}.content.svelte-1kpafo0{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}.message.svelte-1kpafo0{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1kpafo0{color:var(--playpilot-green)}.border.svelte-1kpafo0{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-1kpafo0 .border:where(.svelte-1kpafo0){background:var(--playpilot-light)}@keyframes svelte-1kpafo0-rotate{to{rotate:360deg}}.animator.svelte-1kpafo0{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1kpafo0-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1kpafo0{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1kpafo0{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1kpafo0{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1kpafo0{text-align:right}@keyframes svelte-1kpafo0-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0){animation:svelte-1kpafo0-fade 2s infinite}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(1){animation-delay:.2s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(2){animation-delay:.4s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(3){animation-delay:.6s}.dismiss.svelte-1kpafo0{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:4px;padding:4px;border:2px solid var(--playpilot-content-light);border-radius:4px;background:var(--playpilot-light);font-family:inherit;color:var(--playpilot-text-color-alt);font-size:12px;line-height:1;cursor:pointer}.dismiss.svelte-1kpafo0:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.editor.svelte-11aj6xq{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:min(25rem,80vh);margin:0;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-11aj6xq{overflow:hidden}.loading.svelte-11aj6xq{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-11aj6xq,.header.svelte-11aj6xq{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-11aj6xq{opacity:0;transition:opacity .15s}.editor.svelte-11aj6xq:hover .handle:where(.svelte-11aj6xq){opacity:1}.header.svelte-11aj6xq{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-11aj6xq .header:where(.svelte-11aj6xq){margin:-16px}.heading.svelte-11aj6xq{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-11aj6xq{-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-11aj6xq{padding-top:8px;margin-bottom:auto}.empty.svelte-11aj6xq{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-11aj6xq{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:13.6px;cursor:pointer}.save.svelte-11aj6xq:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-11aj6xq{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-11aj6xq{margin-top:8px}.alert.svelte-11aj6xq{margin:8px 8px 0}.panel.svelte-11aj6xq{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}: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", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", 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;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-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)}h1 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h2 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h3 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h4 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h5 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]){font-weight:inherit}h1 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h2 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h3 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h4 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h5 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings]{font-weight:var(--playpilot-injection-font-weight-headings)}::view-transition-old(playpilot-title-content),::view-transition-new(playpilot-title-content){height:100%}.playpilot-link-injections.svelte-13rmd3g *{box-sizing:border-box}.playpilot-link-injections.svelte-13rmd3g svg{fill:none}.playpilot-link-injections.svelte-13rmd3g a,.playpilot-link-injections.svelte-13rmd3g button,.playpilot-link-injections.svelte-13rmd3g input{transition:outline-offset .1s}.playpilot-link-injections.svelte-13rmd3g a:focus-visible,.playpilot-link-injections.svelte-13rmd3g button:focus-visible,.playpilot-link-injections.svelte-13rmd3g input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
3
|
-
var mi=e=>{throw TypeError(e)};var pi=(e,t,n)=>t.has(e)||mi("Cannot "+n);var Cn=(e,t,n)=>(pi(e,t,"read from private field"),n?n.call(e):t.get(e)),Pn=(e,t,n)=>t.has(e)?mi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),jn=(e,t,n,i)=>(pi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const Dn=!1;var Yn=Array.isArray,sa=Array.prototype.indexOf,Zn=Array.from,ca=Object.defineProperty,nt=Object.getOwnPropertyDescriptor,Fi=Object.getOwnPropertyDescriptors,ua=Object.prototype,da=Array.prototype,Gn=Object.getPrototypeOf;function yt(e){return typeof e=="function"}const st=()=>{};function fa(e){for(var t=0;t<e.length;t++)e[t]()}function ln(e,t,n=!1){return e===void 0?n?t():t:e}const He=2,Vi=4,Wt=8,hn=16,Ve=32,Kt=64,sn=128,ht=256,cn=512,Me=1024,rt=2048,gn=4096,Ue=8192,St=16384,Ui=32768,gt=65536,va=1<<17,zi=1<<19,Wi=1<<20,ze=Symbol("$state"),Ki=Symbol("legacy props"),_a=Symbol("");function Yi(e){return e===this.v}function Xn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ha(e,t){return e!==t}function Jn(e){return!Xn(e,this.v)}function ga(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ma(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ya(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function wa(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ka(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ba(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function xa(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Sa(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Et=!1,Ea=!1;function Ta(){Et=!0}const Qn=1,$n=2,Zi=4,Ia=8,Aa=16,Ca=1,Pa=2,ja=4,Ma=8,Na=16,La=1,Oa=2,Da=4,Ra=1,qa=2,we=Symbol(),Gi="http://www.w3.org/2000/svg";function Ee(e,t){var n={f:0,v:e,reactions:null,equals:Yi,rv:0,wv:0};return n}function U(e){return Ha(Ee(e))}function Xi(e,t=!1){var i;const n=Ee(e);return t||(n.equals=Jn),Et&&ie!==null&&ie.l!==null&&((i=ie.l).s??(i.s=[])).push(n),n}function Ha(e){return $!==null&&$.f&He&&(We===null?$a([e]):We.push(e)),e}function P(e,t){return $!==null&&Yt()&&$.f&(He|hn)&&(We===null||!We.includes(e))&&Sa(),Rn(e,t)}function Rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=_r(),Ji(e,rt),Yt()&&Z!==null&&Z.f&Me&&!(Z.f&Ve)&&(me!==null&&me.includes(e)?(Ye(Z,rt),kn(Z)):it===null?eo([e]):it.push(e))),t}function Ji(e,t){var n=e.reactions;if(n!==null)for(var i=Yt(),r=n.length,a=0;a<r;a++){var o=n[a],s=o.f;s&rt||!i&&o===Z||(Ye(o,t),s&(Me|ht)&&(s&He?Ji(o,gn):kn(o)))}}let Qi=!1;function X(e,t=null,n){if(typeof e!="object"||e===null||ze in e)return e;const i=Gn(e);if(i!==ua&&i!==da)return e;var r=new Map,a=Yn(e),o=Ee(0);a&&r.set("length",Ee(e.length));var s;return new Proxy(e,{defineProperty(l,d,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ka();var f=r.get(d);return f===void 0?(f=Ee(u.value),r.set(d,f)):P(f,X(u.value,s)),!0},deleteProperty(l,d){var u=r.get(d);if(u===void 0)d in l&&r.set(d,Ee(we));else{if(a&&typeof d=="string"){var f=r.get("length"),_=Number(d);Number.isInteger(_)&&_<f.v&&P(f,_)}P(u,we),yi(o)}return!0},get(l,d,u){var g;if(d===ze)return e;var f=r.get(d),_=d in l;if(f===void 0&&(!_||(g=nt(l,d))!=null&&g.writable)&&(f=Ee(X(_?l[d]:we,s)),r.set(d,f)),f!==void 0){var m=c(f);return m===we?void 0:m}return Reflect.get(l,d,u)},getOwnPropertyDescriptor(l,d){var u=Reflect.getOwnPropertyDescriptor(l,d);if(u&&"value"in u){var f=r.get(d);f&&(u.value=c(f))}else if(u===void 0){var _=r.get(d),m=_==null?void 0:_.v;if(_!==void 0&&m!==we)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(l,d){var m;if(d===ze)return!0;var u=r.get(d),f=u!==void 0&&u.v!==we||Reflect.has(l,d);if(u!==void 0||Z!==null&&(!f||(m=nt(l,d))!=null&&m.writable)){u===void 0&&(u=Ee(f?X(l[d],s):we),r.set(d,u));var _=c(u);if(_===we)return!1}return f},set(l,d,u,f){var S;var _=r.get(d),m=d in l;if(a&&d==="length")for(var g=u;g<_.v;g+=1){var v=r.get(g+"");v!==void 0?P(v,we):g in l&&(v=Ee(we),r.set(g+"",v))}_===void 0?(!m||(S=nt(l,d))!=null&&S.writable)&&(_=Ee(void 0),P(_,X(u,s)),r.set(d,_)):(m=_.v!==we,P(_,X(u,s)));var p=Reflect.getOwnPropertyDescriptor(l,d);if(p!=null&&p.set&&p.set.call(f,u),!m){if(a&&typeof d=="string"){var y=r.get("length"),w=Number(d);Number.isInteger(w)&&w>=y.v&&P(y,w+1)}yi(o)}return!0},ownKeys(l){c(o);var d=Reflect.ownKeys(l).filter(_=>{var m=r.get(_);return m===void 0||m.v!==we});for(var[u,f]of r)f.v!==we&&!(u in l)&&d.push(u);return d},setPrototypeOf(){ba()}})}function yi(e,t=1){P(e,e.v+t)}function wi(e){return e!==null&&typeof e=="object"&&ze in e?e[ze]:e}function Ba(e,t){return Object.is(wi(e),wi(t))}var pe,$i,er;function Fa(){if(pe===void 0){pe=window;var e=Element.prototype,t=Node.prototype;$i=nt(t,"firstChild").get,er=nt(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 dt(e){return $i.call(e)}function mn(e){return er.call(e)}function b(e,t){return dt(e)}function ne(e,t){{var n=dt(e);return n instanceof Comment&&n.data===""?mn(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=mn(i);return i}function Va(e){e.textContent=""}function K(e){var t=He|rt;Z===null?t|=ht:Z.f|=Wi;var n=$!==null&&$.f&He?$:null;const i={children:null,ctx:ie,deps:null,equals:Yi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Z};return n!==null&&(n.children??(n.children=[])).push(i),i}function Ua(e){const t=K(e);return t.equals=Jn,t}function tr(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&He?ei(i):Re(i)}}}function za(e){for(var t=e.parent;t!==null;){if(!(t.f&He))return t;t=t.parent}return null}function nr(e){var t,n=Z;Ie(za(e));try{tr(e),t=hr(e)}finally{Ie(n)}return t}function ir(e){var t=nr(e),n=(tt||e.f&ht)&&e.deps!==null?gn:Me;Ye(e,n),e.equals(t)||(e.v=t,e.wv=_r())}function ei(e){tr(e),qt(e,0),Ye(e,St),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Wa(e){Z===null&&$===null&&pa(),$!==null&&$.f&ht&&ma(),ni&&ga()}function Ka(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function It(e,t,n,i=!0){var r=(e&Kt)!==0,a=Z,o={ctx:ie,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|rt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=wt;try{ki(!0),wn(o),o.f|=Ui}catch(u){throw Re(o),u}finally{ki(s)}}else t!==null&&kn(o);var l=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Wi)===0;if(!l&&!r&&i&&(a!==null&&Ka(o,a),$!==null&&$.f&He)){var d=$;(d.children??(d.children=[])).push(o)}return o}function Ya(){return $===null?!1:!tt}function Za(e){const t=It(Wt,null,!1);return Ye(t,Me),t.teardown=e,t}function pn(e){Wa();var t=Z!==null&&(Z.f&Ve)!==0&&ie!==null&&!ie.m;if(t){var n=ie;(n.e??(n.e=[])).push({fn:e,effect:Z,reaction:$})}else{var i=mt(e);return i}}function Ga(e){const t=It(Kt,e,!0);return(n={})=>new Promise(i=>{n.outro?ft(t,()=>{Re(t),i(void 0)}):(Re(t),i(void 0))})}function mt(e){return It(Vi,e,!1)}function yn(e){return It(Wt,e,!0)}function L(e){return Xe(e)}function Xe(e,t=0){return It(Wt|hn|t,e,!0)}function De(e,t=!0){return It(Wt|Ve,e,!0,t)}function rr(e){var t=e.teardown;if(t!==null){const n=ni,i=$;bi(!0),qe(null);try{t.call(null)}finally{bi(n),qe(i)}}}function ar(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)ei(t[n])}}function or(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Re(n,t),n=i}}function Xa(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ve||Re(t),t=n}}function Re(e,t=!0){var n=!1;if((t||e.f&zi)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:mn(i);i.remove(),i=a}n=!0}or(e,t&&!n),ar(e),qt(e,0),Ye(e,St);var o=e.transitions;if(o!==null)for(const l of o)l.stop();rr(e);var s=e.parent;s!==null&&s.first!==null&&lr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function lr(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function ft(e,t){var n=[];ti(e,n,!0),sr(n,()=>{Re(e),t&&t()})}function sr(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function ti(e,t,n){if(!(e.f&Ue)){if(e.f^=Ue,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f>)!==0||(i.f&Ve)!==0;ti(i,t,a?n:!1),i=r}}}function Ot(e){cr(e,!0)}function cr(e,t){if(e.f&Ue){Zt(e)&&wn(e),e.f^=Ue;for(var n=e.first;n!==null;){var i=n.next,r=(n.f>)!==0||(n.f&Ve)!==0;cr(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let un=!1,qn=[];function ur(){un=!1;const e=qn.slice();qn=[],fa(e)}function At(e){un||(un=!0,queueMicrotask(ur)),qn.push(e)}function Ja(){un&&ur()}function dr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const fr=0,Qa=1;let jt=!1,on=fr,Dt=!1,Rt=null,wt=!1,ni=!1;function ki(e){wt=e}function bi(e){ni=e}let ct=[],kt=0;let $=null;function qe(e){$=e}let Z=null;function Ie(e){Z=e}let We=null;function $a(e){We=e}let me=null,Pe=0,it=null;function eo(e){it=e}let vr=1,Hn=0,tt=!1,ie=null;function xi(e){ie=e}function _r(){return++vr}function Yt(){return!Et||ie!==null&&ie.l===null}function Zt(e){var d;var t=e.f;if(t&rt)return!0;if(t&gn){var n=e.deps,i=(t&ht)!==0;if(n!==null){var r,a,o=(t&cn)!==0,s=i&&Z!==null&&!tt,l=n.length;if(o||s){for(r=0;r<l;r++)a=n[r],(o||!((d=a==null?void 0:a.reactions)!=null&&d.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=cn)}for(r=0;r<l;r++)if(a=n[r],Zt(a)&&ir(a),a.wv>e.wv)return!0}(!i||Z!==null&&!tt)&&Ye(e,Me)}return!1}function to(e,t){for(var n=t;n!==null;){if(n.f&sn)try{n.fn(e);return}catch{n.f^=sn}n=n.parent}throw jt=!1,e}function no(e){return(e.f&St)===0&&(e.parent===null||(e.parent.f&sn)===0)}function Mn(){jt=!1}function Gt(e,t,n,i){if(jt){if(n===null&&(jt=!1),no(t))throw e;return}n!==null&&(jt=!0);{to(e,t);return}}function hr(e){var _;var t=me,n=Pe,i=it,r=$,a=tt,o=We,s=ie,l=e.f;me=null,Pe=0,it=null,$=l&(Ve|Kt)?null:e,tt=!wt&&(l&ht)!==0,We=null,ie=e.ctx,Hn++;try{var d=(0,e.fn)(),u=e.deps;if(me!==null){var f;if(qt(e,Pe),u!==null&&Pe>0)for(u.length=Pe+me.length,f=0;f<me.length;f++)u[Pe+f]=me[f];else e.deps=u=me;if(!tt)for(f=Pe;f<u.length;f++)((_=u[f]).reactions??(_.reactions=[])).push(e)}else u!==null&&Pe<u.length&&(qt(e,Pe),u.length=Pe);return d}finally{me=t,Pe=n,it=i,$=r,tt=a,We=o,ie=s}}function io(e,t){let n=t.reactions;if(n!==null){var i=sa.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&He&&(me===null||!me.includes(t))&&(Ye(t,gn),t.f&(ht|cn)||(t.f^=cn),qt(t,0))}function qt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)io(e,n[i])}function wn(e){var t=e.f;if(!(t&St)){Ye(e,Me);var n=Z,i=ie;Z=e;try{t&hn?Xa(e):or(e),ar(e),rr(e);var r=hr(e);e.teardown=typeof r=="function"?r:null,e.wv=vr;var a=e.deps,o;Dn&&Ea&&e.f&rt}catch(s){Gt(s,e,n,i||e.ctx)}finally{Z=n}}}function gr(){if(kt>1e3){kt=0;try{ya()}catch(e){if(Rt!==null)Gt(e,Rt,null);else throw e}}kt++}function mr(e){var t=e.length;if(t!==0){gr();var n=wt;wt=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&Me||(r.f^=Me);var a=[];pr(r,a),ro(a)}}finally{wt=n}}}function ro(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(St|Ue)))try{Zt(i)&&(wn(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?lr(i):i.fn=null))}catch(r){Gt(r,i,null,i.ctx)}}}function ao(){if(Dt=!1,kt>1001)return;const e=ct;ct=[],mr(e),Dt||(kt=0,Rt=null)}function kn(e){on===fr&&(Dt||(Dt=!0,queueMicrotask(ao))),Rt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Kt|Ve)){if(!(n&Me))return;t.f^=Me}}ct.push(t)}function pr(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&Ve)!==0,o=a&&(r&Me)!==0,s=n.next;if(!o&&!(r&Ue))if(r&Wt){if(a)n.f^=Me;else try{Zt(n)&&wn(n)}catch(f){Gt(f,n,null,n.ctx)}var l=n.first;if(l!==null){n=l;continue}}else r&Vi&&i.push(n);if(s===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var d=f.next;if(d!==null){n=d;continue e}f=f.parent}}n=s}for(var u=0;u<i.length;u++)l=i[u],t.push(l),pr(l,t)}function yr(e){var t=on,n=ct;try{gr();const r=[];on=Qa,ct=r,Dt=!1,mr(n);var i=e==null?void 0:e();return Ja(),(ct.length>0||r.length>0)&&yr(),kt=0,Rt=null,i}finally{on=t,ct=n}}async function Bn(){await Promise.resolve(),yr()}function c(e){var u;var t=e.f,n=(t&He)!==0;if(n&&t&St){var i=nr(e);return ei(e),i}if($!==null){We!==null&&We.includes(e)&&xa();var r=$.deps;e.rv<Hn&&(e.rv=Hn,me===null&&r!==null&&r[Pe]===e?Pe++:me===null?me=[e]:me.push(e),it!==null&&Z!==null&&Z.f&Me&&!(Z.f&Ve)&&it.includes(e)&&(Ye(Z,rt),kn(Z)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,s=a;o!==null;)if(o.f&He){var l=o;s=l,o=l.parent}else{var d=o;(u=d.deriveds)!=null&&u.includes(s)||(d.deriveds??(d.deriveds=[])).push(s);break}return n&&(a=e,Zt(a)&&ir(a)),e.v}function Ke(e){const t=$;try{return $=null,e()}finally{$=t}}const oo=-7169;function Ye(e,t){e.f=e.f&oo|t}function lo(e){return kr().get(e)}function wr(e,t){return kr().set(e,t),t}function kr(e){return ie===null&&dr(),ie.c??(ie.c=new Map(so(ie)||void 0))}function so(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){ie={p:ie,c:null,e:null,m:!1,s:e,x:null,l:null},Et&&!t&&(ie.l={s:null,u:null,r1:[],r2:Ee(!1)})}function oe(e){const t=ie;if(t!==null){const o=t.e;if(o!==null){var n=Z,i=$;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),qe(a.reaction),mt(a.fn)}}finally{Ie(n),qe(i)}}ie=t.p,t.m=!0}return{}}function co(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ze in e)Fn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&ze in n&&Fn(n)}}}function Fn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Fn(e[i],t)}catch{}const n=Gn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Fi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function uo(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const fo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function vo(e){return fo.includes(e)}const _o={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function ho(e){return e=e.toLowerCase(),_o[e]??e}const go=["touchstart","touchmove"];function mo(e){return go.includes(e)}function po(e,t){if(t){const n=document.body;e.autofocus=!0,At(()=>{document.activeElement===n&&e.focus()})}}let Si=!1;function yo(){Si||(Si=!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 br(e){var t=$,n=Z;qe(null),Ie(null);try{return e()}finally{qe(t),Ie(n)}}function xr(e,t,n,i=n){e.addEventListener(t,()=>br(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),yo()}const Sr=new Set,Vn=new Set;function ii(e,t,n,i){function r(a){if(i.capture||Pt.call(t,a),!a.cancelBubble)return br(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?At(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function wo(e,t,n,i={}){var r=ii(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function ce(e,t,n,i,r){var a={capture:i,passive:r},o=ii(e,t,n,a);(t===document.body||t===window||t===document)&&Za(()=>{t.removeEventListener(e,o,a)})}function fe(e){for(var t=0;t<e.length;t++)Sr.add(e[t]);for(var n of Vn)n(e)}function Pt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,s=e.__root;if(s){var l=r.indexOf(s);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var d=r.indexOf(t);if(d===-1)return;l<=d&&(o=l)}if(a=r[o]||e.target,a!==t){ca(e,"currentTarget",{configurable:!0,get(){return a||n}});var u=$,f=Z;qe(null),Ie(null);try{for(var _,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+i];if(v!==void 0&&!a.disabled)if(Yn(v)){var[p,...y]=v;p.apply(a,[e,...y])}else v.call(a,e)}catch(S){_?m.push(S):_=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(_){for(let S of m)queueMicrotask(()=>{throw S});throw _}}finally{e.__root=t,delete e.currentTarget,qe(u),Ie(f)}}}function ko(e){var t;t=document.head.appendChild(Tt());try{Xe(()=>e(t),zi)}finally{}}function ri(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function vt(e,t){var n=Z;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Ra)!==0,i=(t&qa)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=ri(a?e:"<!>"+e),n||(r=dt(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var s=dt(o),l=o.lastChild;vt(s,l)}else vt(o,o);return o}}function Ne(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=ri(r),s=dt(o);a=dt(s)}var l=a.cloneNode(!0);return vt(l,l),l}}function Be(e=""){{var t=Tt(e+"");return vt(t,t),t}}function Fe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),vt(t,n),e}function k(e,t){e!==null&&e.before(t)}let dn=!0;function Ei(e){dn=e}function G(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 Xt(e,t){return bo(e,t)}const pt=new Map;function bo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){Fa();var s=new Set,l=f=>{for(var _=0;_<f.length;_++){var m=f[_];if(!s.has(m)){s.add(m);var g=mo(m);t.addEventListener(m,Pt,{passive:g});var v=pt.get(m);v===void 0?(document.addEventListener(m,Pt,{passive:g}),pt.set(m,1)):pt.set(m,v+1)}}};l(Zn(Sr)),Vn.add(l);var d=void 0,u=Ga(()=>{var f=n??t.appendChild(Tt());return De(()=>{if(a){ae({});var _=ie;_.c=a}r&&(i.$$events=r),dn=o,d=e(f,i)||{},dn=!0,a&&oe()}),()=>{var g;for(var _ of s){t.removeEventListener(_,Pt);var m=pt.get(_);--m===0?(document.removeEventListener(_,Pt),pt.delete(_)):pt.set(_,m)}Vn.delete(l),f!==n&&((g=f.parentNode)==null||g.removeChild(f))}});return Un.set(d,u),d}let Un=new WeakMap;function bn(e,t){const n=Un.get(e);return n?(Un.delete(e),n(t)):Promise.resolve()}function q(e,t,n=!1){var i=e,r=null,a=null,o=we,s=n?gt:0,l=!1;const d=(f,_=!0)=>{l=!0,u(_,f)},u=(f,_)=>{o!==(o=f)&&(o?(r?Ot(r):_&&(r=De(()=>_(i))),a&&ft(a,()=>{a=null})):(a?Ot(a):_&&(a=De(()=>_(i))),r&&ft(r,()=>{r=null})))};Xe(()=>{l=!1,t(d),l||u(null,null)},s)}function Er(e,t,n){var i=e,r=we,a,o=Yt()?ha:Xn;Xe(()=>{o(r,r=t())&&(a&&ft(a),a=De(()=>n(i)))})}function bt(e,t){return t}function xo(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)ti(t[o].e,r,!0);var s=a>0&&r.length===0&&n!==null;if(s){var l=n.parentNode;Va(l),l.append(n),i.clear(),et(e,t[0].prev,t[a-1].next)}sr(r,()=>{for(var d=0;d<a;d++){var u=t[d];s||(i.delete(u.k),et(e,u.prev,u.next)),Re(u.e,!s)}})}function at(e,t,n,i,r,a=null){var o=e,s={flags:t,items:new Map,first:null},l=(t&Zi)!==0;if(l){var d=e;o=d.appendChild(Tt())}var u=null,f=!1;Xe(()=>{var _=n(),m=Yn(_)?_:_==null?[]:Zn(_),g=m.length;if(!(f&&g===0)){f=g===0;{var v=$;So(m,s,o,r,t,(v.f&Ue)!==0,i)}a!==null&&(g===0?u?Ot(u):u=De(()=>a(o)):u!==null&&ft(u,()=>{u=null})),n()}})}function So(e,t,n,i,r,a,o,s){var F,V,W,J;var l=(r&Ia)!==0,d=(r&(Qn|$n))!==0,u=e.length,f=t.items,_=t.first,m=_,g,v=null,p,y=[],w=[],S,j,x,T;if(l)for(T=0;T<u;T+=1)S=e[T],j=o(S,T),x=f.get(j),x!==void 0&&((F=x.a)==null||F.measure(),(p??(p=new Set)).add(x));for(T=0;T<u;T+=1){if(S=e[T],j=o(S,T),x=f.get(j),x===void 0){var H=m?m.e.nodes_start:n;v=To(H,t,v,v===null?t.first:v.next,S,j,T,i,r),f.set(j,v),y=[],w=[],m=v.next;continue}if(d&&Eo(x,S,T,r),x.e.f&Ue&&(Ot(x.e),l&&((V=x.a)==null||V.unfix(),(p??(p=new Set)).delete(x))),x!==m){if(g!==void 0&&g.has(x)){if(y.length<w.length){var M=w[0],C;v=M.prev;var D=y[0],A=y[y.length-1];for(C=0;C<y.length;C+=1)Ti(y[C],M,n);for(C=0;C<w.length;C+=1)g.delete(w[C]);et(t,D.prev,A.next),et(t,v,D),et(t,A,M),m=M,v=A,T-=1,y=[],w=[]}else g.delete(x),Ti(x,m,n),et(t,x.prev,x.next),et(t,x,v===null?t.first:v.next),et(t,v,x),v=x;continue}for(y=[],w=[];m!==null&&m.k!==j;)(a||!(m.e.f&Ue))&&(g??(g=new Set)).add(m),w.push(m),m=m.next;if(m===null)continue;x=m}y.push(x),v=x,m=x.next}if(m!==null||g!==void 0){for(var B=g===void 0?[]:Zn(g);m!==null;)(a||!(m.e.f&Ue))&&B.push(m),m=m.next;var O=B.length;if(O>0){var z=r&Zi&&u===0?n:null;if(l){for(T=0;T<O;T+=1)(W=B[T].a)==null||W.measure();for(T=0;T<O;T+=1)(J=B[T].a)==null||J.fix()}xo(t,B,z,f)}}l&&At(()=>{var ee;if(p!==void 0)for(x of p)(ee=x.a)==null||ee.apply()}),Z.first=t.first&&t.first.e,Z.last=v&&v.e}function Eo(e,t,n,i){i&Qn&&Rn(e.v,t),i&$n?Rn(e.i,n):e.i=n}function To(e,t,n,i,r,a,o,s,l,d){var u=(l&Qn)!==0,f=(l&Aa)===0,_=u?f?Xi(r):Ee(r):r,m=l&$n?Ee(o):o,g={i:m,v:_,k:a,a:null,e:null,prev:n,next:i};try{return g.e=De(()=>s(e,_,m),Qi),g.e.prev=n&&n.e,g.e.next=i&&i.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),i!==null&&(i.prev=g,i.e.prev=g.e),g}finally{}}function Ti(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=mn(a);r.before(a),a=o}}function et(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 Io(e,t,n,i,r){var a=e,o="",s;Xe(()=>{o!==(o=t()??"")&&(s!==void 0&&(Re(s),s=void 0),o!==""&&(s=De(()=>{var l=o+"",d=ri(l);vt(dt(d),d.lastChild),a.before(d)})))})}function Ct(e,t,...n){var i=e,r=st,a;Xe(()=>{r!==(r=t())&&(a&&(Re(a),a=null),a=De(()=>r(i,...n)))},gt)}function Ao(e,t,n,i,r,a){var o,s,l=null,d=e,u;Xe(()=>{const f=t()||null;var _=f==="svg"?Gi:null;f!==o&&(u&&(f===null?ft(u,()=>{u=null,s=null}):f===s?Ot(u):(Re(u),Ei(!1))),f&&f!==s&&(u=De(()=>{l=_?document.createElementNS(_,f):document.createElement(f),vt(l,l);{var m=l.appendChild(Tt());i(l,m)}Z.nodes_end=l,d.before(l)})),o=f,o&&(s=o),Ei(!0))},gt)}function Jt(e,t,n){mt(()=>{var i=Ke(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};yn(()=>{var o=n();co(o),r&&Xn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Tr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Tr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Co(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Tr(e))&&(i&&(i+=" "),i+=t);return i}function Po(e){return typeof e=="object"?Co(e):e??""}function jo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ue(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[_a]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ir(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Mo(e,t,n,i,r=!1,a=!1,o=!1){var s=t||{},l=e.tagName==="OPTION";for(var d in t)d in n||(n[d]=null);n.class&&(n.class=Po(n.class)),n.class=n.class?n.class+" "+i:i;var u=Ir(e),f=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(l&&w==="value"&&S==null){e.value=e.__value="",s[w]=S;continue}var _=s[w];if(S!==_){s[w]=S;var m=w[0]+w[1];if(m!=="$$"){if(m==="on"){const j={},x="$$"+w;let T=w.slice(2);var g=vo(T);if(uo(T)&&(T=T.slice(0,-7),j.capture=!0),!g&&_){if(S!=null)continue;e.removeEventListener(T,s[x],j),s[x]=null}if(S!=null)if(g)e[`__${T}`]=S,fe([T]);else{let H=function(M){s[w].call(this,M)};var y=H;s[x]=ii(T,e,H,j)}else g&&(e[`__${T}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")po(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&l)jo(e,S);else{var v=w;r||(v=ho(v));var p=v==="defaultValue"||v==="defaultChecked";if(S==null&&!a&&!p)if(f[w]=null,v==="value"||v==="checked"){let j=e;if(v==="value"){let x=j.defaultValue;j.removeAttribute(v),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(v),j.defaultChecked=x}}else e.removeAttribute(w);else p||u.includes(v)&&(a||typeof S!="string")?e[v]=S:typeof S!="function"&&ue(e,v,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var Ii=new Map;function Ir(e){var t=Ii.get(e.nodeName);if(t)return t;Ii.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Fi(i);for(var a in n)n[a].set&&t.push(a);i=Gn(i)}return t}function No(e,t,n){var i=e.__className,r=Lo(t);(i!==r||Qi)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Lo(e,t){return(e??"")+""}function se(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 xn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Oo=()=>performance.now(),Ge={tick:e=>requestAnimationFrame(e),now:()=>Oo(),tasks:new Set};function Ar(){const e=Ge.now();Ge.tasks.forEach(t=>{t.c(e)||(Ge.tasks.delete(t),t.f())}),Ge.tasks.size!==0&&Ge.tick(Ar)}function Do(e){let t;return Ge.tasks.size===0&&Ge.tick(Ar),{promise:new Promise(n=>{Ge.tasks.add(t={c:e,f:n})}),abort(){Ge.tasks.delete(t)}}}function rn(e,t){e.dispatchEvent(new CustomEvent(t))}function Ro(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 Ai(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Ro(r.trim());t[o]=a.trim()}return t}const qo=e=>e;function je(e,t,n,i){var r=(e&La)!==0,a=(e&Oa)!==0,o=r&&a,s=(e&Da)!==0,l=o?"both":r?"in":"out",d,u=t.inert,f,_;function m(){var w=$,S=Z;qe(null),Ie(null);try{return d??(d=n()(t,(i==null?void 0:i())??{},{direction:l}))}finally{qe(w),Ie(S)}}var g={is_global:s,in(){var w;if(t.inert=u,!r){_==null||_.abort(),(w=_==null?void 0:_.reset)==null||w.call(_);return}a||f==null||f.abort(),rn(t,"introstart"),f=zn(t,m(),_,1,()=>{rn(t,"introend"),f==null||f.abort(),f=d=void 0})},out(w){if(!a){w==null||w(),d=void 0;return}t.inert=!0,rn(t,"outrostart"),_=zn(t,m(),f,0,()=>{rn(t,"outroend"),w==null||w()})},stop:()=>{f==null||f.abort(),_==null||_.abort()}},v=Z;if((v.transitions??(v.transitions=[])).push(g),r&&dn){var p=s;if(!p){for(var y=v.parent;y&&y.f>)for(;(y=y.parent)&&!(y.f&hn););p=!y||(y.f&Ui)!==0}p&&mt(()=>{Ke(()=>g.in())})}}function zn(e,t,n,i,r){var a=i===1;if(yt(t)){var o,s=!1;return At(()=>{if(!s){var p=t({direction:a?"in":"out"});o=zn(e,p,n,i,r)}}),{abort:()=>{s=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:st,deactivate:st,reset:st,t:()=>i};const{delay:l=0,css:d,tick:u,easing:f=qo}=t;var _=[];if(a&&n===void 0&&(u&&u(0,1),d)){var m=Ai(d(0,1));_.push(m,m)}var g=()=>1-i,v=e.animate(_,{duration:l});return v.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(d)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var T=p+y*f(x/j),H=d(T,1-T);S.push(Ai(H))}g=()=>{var M=v.currentTime;return p+y*f(M/w)},u&&Do(()=>{if(v.playState!=="running")return!1;var M=g();return u(M,1-M),!0})}v=e.animate(S,{duration:w,fill:"forwards"}),v.onfinish=()=>{g=()=>i,u==null||u(i,1-i),r()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=st)},deactivate:()=>{r=st},reset:()=>{i===0&&(u==null||u(1,0))},t:()=>g()}}function Ho(e,t,n=t){var i=Yt();xr(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Nn(e)?Ln(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(s,e.value.length))}}),Ke(t)==null&&e.value&&n(Nn(e)?Ln(e.value):e.value),yn(()=>{var r=t();Nn(e)&&r===Ln(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Nn(e){var t=e.type;return t==="number"||t==="range"}function Ln(e){return e===""?null:+e}function Cr(e,t,n){if(e.multiple)return Vo(e,t);for(var i of e.options){var r=Mt(i);if(Ba(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Bo(e,t){mt(()=>{var n=new MutationObserver(()=>{var i=e.__value;Cr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function Fo(e,t,n=t){var i=!0;xr(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Mt);else{var s=e.querySelector(a)??e.querySelector("option:not([disabled])");o=s&&Mt(s)}n(o)}),mt(()=>{var r=t();if(Cr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=Mt(a),n(r))}e.__value=r,i=!1}),Bo(e)}function Vo(e,t){for(var n of e.options)n.selected=~t.indexOf(Mt(n))}function Mt(e){return"__value"in e?e.__value:e.value}function Ci(e,t){return e===t||(e==null?void 0:e[ze])===t}function Qt(e={},t,n,i){return mt(()=>{var r,a;return yn(()=>{r=a,a=[],Ke(()=>{e!==n(...a)&&(t(e,...a),r&&Ci(n(...r),e)&&t(null,...r))})}),()=>{At(()=>{a&&Ci(n(...a),e)&&t(null,...a)})}}),e}let an=!1;function Uo(e){var t=an;try{return an=!1,[e(),an]}finally{an=t}}const zo={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 Wo(e,t,n){return new Proxy({props:e,exclude:t},zo)}const Ko={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(yt(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];yt(r)&&(r=r());const a=nt(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(yt(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=nt(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===ze||t===Ki)return!1;for(let n of e.props)if(yt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){yt(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function Yo(...e){return new Proxy({props:e},Ko)}function Pi(e){for(var t=Z,n=Z;t!==null&&!(t.f&(Ve|Kt));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function N(e,t,n,i){var H;var r=(n&Ca)!==0,a=!Et||(n&Pa)!==0,o=(n&Ma)!==0,s=(n&Na)!==0,l=!1,d;o?[d,l]=Uo(()=>e[t]):d=e[t];var u=ze in e||Ki in e,f=o&&(((H=nt(e,t))==null?void 0:H.set)??(u&&t in e&&(M=>e[t]=M)))||void 0,_=i,m=!0,g=!1,v=()=>(g=!0,m&&(m=!1,s?_=Ke(i):_=i),_);d===void 0&&i!==void 0&&(f&&a&&wa(),d=v(),f&&f(d));var p;if(a)p=()=>{var M=e[t];return M===void 0?v():(m=!0,g=!1,M)};else{var y=Pi(()=>(r?K:Ua)(()=>e[t]));y.f|=va,p=()=>{var M=c(y);return M!==void 0&&(_=void 0),M===void 0?_:M}}if(!(n&ja))return p;if(f){var w=e.$$legacy;return function(M,C){return arguments.length>0?((!a||!C||w||l)&&f(C?p():M),M):p()}}var S=!1,j=!1,x=Xi(d),T=Pi(()=>K(()=>{var M=p(),C=c(x);return S?(S=!1,j=!0,C):(j=!1,x.v=M)}));return r||(T.equals=Jn),function(M,C){if(arguments.length>0){const D=C?c(T):a&&o?X(M):M;return T.equals(D)||(S=!0,P(x,D),g&&_!==void 0&&(_=D),Ke(()=>c(T))),M}return c(T)}}function ji(e,t){var n=Z,i=$,r=ie;Ie(e),qe(e),xi(e.ctx);try{t()}finally{Ie(n),qe(i),xi(r)}}function Zo(e,t,n){var i=e,r;Xe(()=>{var a=Z,o=!1;a.fn=s=>{var l=t.onerror;let d=t.failed;if(!l&&!d||o)throw s;var u=()=>{ft(r),ji(a,()=>{o=!1,r=De(()=>n(i)),Mn()})};l==null||l(s,u),r&&Re(r),At(()=>{ji(a,()=>{o=!0;try{r=De(()=>{d(i,()=>s,()=>u)})}catch(f){Gt(f,a,null,a.ctx)}Mn(),o=!1})})},r=De(()=>n(i)),Mn()},gt|sn)}function Je(e){ie===null&&dr(),Et&&ie.l!==null?Go(ie).m.push(e):pn(()=>{const t=Ke(e);if(typeof t=="function")return t})}function Go(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Xo="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xo);const Pr="https://www.playpilot.com",Sn="https://partner-api.playpilot.tech/1.0.0",jr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",ye=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",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",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error"});function ai(){const e=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+e}const Jo="https://insights.playpilot.net";async function be(e,t=null,n={}){var r,a;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=ai(),n.organization_sid=(r=window.PlayPilotLinkInjections)==null?void 0:r.organization_sid,n.domain_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.domain_sid,fetch(Jo,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function Qo({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const oi="EncryptedToken",Mr="articleReplacementEditToken",Nr="playpilot-editorial-mode";async function Lr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=In();if(!n)throw new Error("No token was provided");const i=li(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Sn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return $o(i),!0}catch(n){console.error(n),be(ye.AuthFailed)}finally{nl()}return!1}function li(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Mr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${oi}=`).pop())==null?void 0:r.split(";")[0])||""}function $o(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=oi+"="+e+";"+i+";path=/"}function el(){document.cookie=oi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Or(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(Nr)==="true"||!!e}function tl(){const e=new URL(window.location.href);e.searchParams.set(Nr,"true"),window.history.replaceState({},"",e)}function nl(){const e=new URL(window.location.href);e.searchParams.delete(Mr),window.history.replaceState({},"",e)}function il(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}function Dr(){return(Math.random()+1).toString(36).substring(7)}const h=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),rl={"Where To Stream Online":{[h.English]:"Where to stream online",[h.Swedish]:"Var kan man streama online",[h.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[h.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[h.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[h.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[h.English]:"An error occurred",[h.Swedish]:"Ett fel inträffade",[h.Danish]:"Der opstod en fejl"},"Title Unavailable":{[h.English]:"This title is not currently available to stream.",[h.Swedish]:"Den här titeln går inte att streama just nu.",[h.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[h.English]:"is not currently available to stream.",[h.Swedish]:"går inte att streama just nu.",[h.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[h.English]:"is available to stream on",[h.Swedish]:"finns att streama på",[h.Danish]:"kan streames på"},"Is Available To Stream":{[h.English]:"is available to stream.",[h.Swedish]:"finns att streama.",[h.Danish]:"kan streames."},"View Streaming Options":{[h.English]:"View streaming options",[h.Swedish]:"Se streamingalternativ",[h.Danish]:"Se streamingmuligheder"},And:{[h.English]:"and",[h.Swedish]:"och",[h.Danish]:"og"},Minutes:{[h.English]:"minutes",[h.Swedish]:"minuter",[h.Danish]:"minutter"},"Type: movie":{[h.English]:"Movie",[h.Swedish]:"Film",[h.Danish]:"Film"},"Type: series":{[h.English]:"Series",[h.Swedish]:"Serie",[h.Danish]:"Serie"},Stream:{[h.English]:"Stream",[h.Swedish]:"Streama",[h.Danish]:"Stream"},Buy:{[h.English]:"Buy",[h.Swedish]:"Köp",[h.Danish]:"Køb"},Rent:{[h.English]:"Rent",[h.Swedish]:"Hyra",[h.Danish]:"Lej"},"Rent Or Buy":{[h.English]:"Rent or Buy",[h.Swedish]:"Hyra",[h.Danish]:"Lej eller køb"},All:{[h.English]:"All",[h.Swedish]:"Alla",[h.Danish]:"Alle"},Unscripted:{[h.English]:"Unscripted",[h.Swedish]:"Oscripterat",[h.Danish]:"Umanuskriptet"},Independent:{[h.English]:"Independent",[h.Swedish]:"Indie",[h.Danish]:"Indie"},"Game Show":{[h.English]:"Game Show",[h.Swedish]:"Gameshow",[h.Danish]:"Quizshow"},"Film Noir":{[h.English]:"Film Noir",[h.Swedish]:"Film noir",[h.Danish]:"Film noir"},Entertainment:{[h.English]:"Entertainment",[h.Swedish]:"Underhållning",[h.Danish]:"Underholdning"},News:{[h.English]:"News",[h.Swedish]:"Nyheter",[h.Danish]:"Nyheder"},Short:{[h.English]:"Short",[h.Swedish]:"Kortfilm",[h.Danish]:"Kortfilm"},Bollywood:{[h.English]:"Bollywood",[h.Swedish]:"Bollywood",[h.Danish]:"Bollywood"},Concert:{[h.English]:"Concert",[h.Swedish]:"Konsert",[h.Danish]:"Koncert"},Arthouse:{[h.English]:"Arthouse",[h.Swedish]:"Arthouse",[h.Danish]:"Arthouse"},"Alternate Version":{[h.English]:"Alternate Version",[h.Swedish]:"Alternativ version",[h.Danish]:"Alternativ version"},"Reality TV":{[h.English]:"Reality TV",[h.Swedish]:"Reality-TV",[h.Danish]:"Reality-TV"},Culture:{[h.English]:"Culture",[h.Swedish]:"Kultur",[h.Danish]:"Kultur"},Drama:{[h.English]:"Drama",[h.Swedish]:"Drama",[h.Danish]:"Drama"},Crime:{[h.English]:"Crime",[h.Swedish]:"Kriminal",[h.Danish]:"Krimi"},Western:{[h.English]:"Western",[h.Swedish]:"Western",[h.Danish]:"Western"},Thriller:{[h.English]:"Thriller",[h.Swedish]:"Thriller",[h.Danish]:"Thriller"},Animation:{[h.English]:"Animation",[h.Swedish]:"Animerat",[h.Danish]:"Animation"},Mystery:{[h.English]:"Mystery",[h.Swedish]:"Mysterium",[h.Danish]:"Mysterium"},Science:{[h.English]:"Science",[h.Swedish]:"Vetenskap",[h.Danish]:"Videnskab"},Nature:{[h.English]:"Nature",[h.Swedish]:"Natur",[h.Danish]:"Natur"},War:{[h.English]:"War",[h.Swedish]:"Krig",[h.Danish]:"Krig"},"Sci-Fi":{[h.English]:"Sci-Fi",[h.Swedish]:"Sci-fi",[h.Danish]:"Sci-fi"},Documentary:{[h.English]:"Documentary",[h.Swedish]:"Dokumentär",[h.Danish]:"Dokumentar"},"Stand-up":{[h.English]:"Stand-up",[h.Swedish]:"Standup",[h.Danish]:"Stand-up"},"Talk Show":{[h.English]:"Talk Show",[h.Swedish]:"Talkshow",[h.Danish]:"Talkshow"},Fantasy:{[h.English]:"Fantasy",[h.Swedish]:"Fantasy",[h.Danish]:"Fantasy"},History:{[h.English]:"History",[h.Swedish]:"Historia",[h.Danish]:"Historie"},Adventure:{[h.English]:"Adventure",[h.Swedish]:"Äventyr",[h.Danish]:"Eventyr"},Action:{[h.English]:"Action",[h.Swedish]:"Action",[h.Danish]:"Action"},Horror:{[h.English]:"Horror",[h.Swedish]:"Skräck",[h.Danish]:"Gyser"},Comedy:{[h.English]:"Comedy",[h.Swedish]:"Komedi",[h.Danish]:"Komedie"},Biography:{[h.English]:"Biography",[h.Swedish]:"Biografi",[h.Danish]:"Biografi"},Music:{[h.English]:"Music",[h.Swedish]:"Musik",[h.Danish]:"Musik"},Sport:{[h.English]:"Sport",[h.Swedish]:"Sport",[h.Danish]:"Sport"},Romance:{[h.English]:"Romance",[h.Swedish]:"Romantik",[h.Danish]:"Romantik"},Kids:{[h.English]:"Kids",[h.Swedish]:"Barn",[h.Danish]:"Børn"},Lifestyle:{[h.English]:"Lifestyle",[h.Swedish]:"Livsstil",[h.Danish]:"Livsstil"},Musical:{[h.English]:"Musical",[h.Swedish]:"Musikal",[h.Danish]:"Musical"},Anime:{[h.English]:"Anime",[h.Swedish]:"Anime",[h.Danish]:"Anime"},Family:{[h.English]:"Family",[h.Swedish]:"Familj",[h.Danish]:"Familie"}};function ke(e,t=Rr()){var n;return((n=rl[e])==null?void 0:n[t])||e}function Rr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(h);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(t.includes(n))return n;const a=t.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return h.English}const al=e=>e;function si(e){const t=e-1;return t*t*t+1}function Mi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Ht(e,{delay:t=0,duration:n=400,easing:i=al}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function En(e,{delay:t=0,duration:n=400,easing:i=si,x:r=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(e),l=+s.opacity,d=s.transform==="none"?"":s.transform,u=l*(1-o),[f,_]=Mi(r),[m,g]=Mi(a);return{delay:t,duration:n,easing:i,css:(v,p)=>`
|
|
3
|
+
var mi=e=>{throw TypeError(e)};var pi=(e,t,n)=>t.has(e)||mi("Cannot "+n);var Cn=(e,t,n)=>(pi(e,t,"read from private field"),n?n.call(e):t.get(e)),Pn=(e,t,n)=>t.has(e)?mi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),jn=(e,t,n,i)=>(pi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const Dn=!1;var Yn=Array.isArray,sa=Array.prototype.indexOf,Zn=Array.from,ca=Object.defineProperty,nt=Object.getOwnPropertyDescriptor,Fi=Object.getOwnPropertyDescriptors,ua=Object.prototype,da=Array.prototype,Gn=Object.getPrototypeOf;function wt(e){return typeof e=="function"}const st=()=>{};function fa(e){for(var t=0;t<e.length;t++)e[t]()}function sn(e,t,n=!1){return e===void 0?n?t():t:e}const He=2,Vi=4,Kt=8,hn=16,Ve=32,Yt=64,cn=128,gt=256,un=512,Me=1024,rt=2048,gn=4096,Ue=8192,St=16384,Ui=32768,mt=65536,va=1<<17,zi=1<<19,Wi=1<<20,ze=Symbol("$state"),Ki=Symbol("legacy props"),_a=Symbol("");function Yi(e){return e===this.v}function Xn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ha(e,t){return e!==t}function Jn(e){return!Xn(e,this.v)}function ga(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ma(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ya(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function wa(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ka(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ba(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function xa(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Sa(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Et=!1,Ea=!1;function Ta(){Et=!0}const Qn=1,$n=2,Zi=4,Ia=8,Aa=16,Ca=1,Pa=2,ja=4,Ma=8,Na=16,La=1,Oa=2,Da=4,Ra=1,qa=2,we=Symbol(),Gi="http://www.w3.org/2000/svg";function Ee(e,t){var n={f:0,v:e,reactions:null,equals:Yi,rv:0,wv:0};return n}function U(e){return Ha(Ee(e))}function Xi(e,t=!1){var i;const n=Ee(e);return t||(n.equals=Jn),Et&&ie!==null&&ie.l!==null&&((i=ie.l).s??(i.s=[])).push(n),n}function Ha(e){return $!==null&&$.f&He&&(We===null?$a([e]):We.push(e)),e}function P(e,t){return $!==null&&Zt()&&$.f&(He|hn)&&(We===null||!We.includes(e))&&Sa(),Rn(e,t)}function Rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=_r(),Ji(e,rt),Zt()&&Z!==null&&Z.f&Me&&!(Z.f&Ve)&&(me!==null&&me.includes(e)?(Ye(Z,rt),kn(Z)):it===null?eo([e]):it.push(e))),t}function Ji(e,t){var n=e.reactions;if(n!==null)for(var i=Zt(),r=n.length,a=0;a<r;a++){var o=n[a],s=o.f;s&rt||!i&&o===Z||(Ye(o,t),s&(Me|gt)&&(s&He?Ji(o,gn):kn(o)))}}let Qi=!1;function X(e,t=null,n){if(typeof e!="object"||e===null||ze in e)return e;const i=Gn(e);if(i!==ua&&i!==da)return e;var r=new Map,a=Yn(e),o=Ee(0);a&&r.set("length",Ee(e.length));var s;return new Proxy(e,{defineProperty(l,d,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ka();var f=r.get(d);return f===void 0?(f=Ee(u.value),r.set(d,f)):P(f,X(u.value,s)),!0},deleteProperty(l,d){var u=r.get(d);if(u===void 0)d in l&&r.set(d,Ee(we));else{if(a&&typeof d=="string"){var f=r.get("length"),_=Number(d);Number.isInteger(_)&&_<f.v&&P(f,_)}P(u,we),yi(o)}return!0},get(l,d,u){var g;if(d===ze)return e;var f=r.get(d),_=d in l;if(f===void 0&&(!_||(g=nt(l,d))!=null&&g.writable)&&(f=Ee(X(_?l[d]:we,s)),r.set(d,f)),f!==void 0){var m=c(f);return m===we?void 0:m}return Reflect.get(l,d,u)},getOwnPropertyDescriptor(l,d){var u=Reflect.getOwnPropertyDescriptor(l,d);if(u&&"value"in u){var f=r.get(d);f&&(u.value=c(f))}else if(u===void 0){var _=r.get(d),m=_==null?void 0:_.v;if(_!==void 0&&m!==we)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(l,d){var m;if(d===ze)return!0;var u=r.get(d),f=u!==void 0&&u.v!==we||Reflect.has(l,d);if(u!==void 0||Z!==null&&(!f||(m=nt(l,d))!=null&&m.writable)){u===void 0&&(u=Ee(f?X(l[d],s):we),r.set(d,u));var _=c(u);if(_===we)return!1}return f},set(l,d,u,f){var S;var _=r.get(d),m=d in l;if(a&&d==="length")for(var g=u;g<_.v;g+=1){var v=r.get(g+"");v!==void 0?P(v,we):g in l&&(v=Ee(we),r.set(g+"",v))}_===void 0?(!m||(S=nt(l,d))!=null&&S.writable)&&(_=Ee(void 0),P(_,X(u,s)),r.set(d,_)):(m=_.v!==we,P(_,X(u,s)));var p=Reflect.getOwnPropertyDescriptor(l,d);if(p!=null&&p.set&&p.set.call(f,u),!m){if(a&&typeof d=="string"){var y=r.get("length"),w=Number(d);Number.isInteger(w)&&w>=y.v&&P(y,w+1)}yi(o)}return!0},ownKeys(l){c(o);var d=Reflect.ownKeys(l).filter(_=>{var m=r.get(_);return m===void 0||m.v!==we});for(var[u,f]of r)f.v!==we&&!(u in l)&&d.push(u);return d},setPrototypeOf(){ba()}})}function yi(e,t=1){P(e,e.v+t)}function wi(e){return e!==null&&typeof e=="object"&&ze in e?e[ze]:e}function Ba(e,t){return Object.is(wi(e),wi(t))}var pe,$i,er;function Fa(){if(pe===void 0){pe=window;var e=Element.prototype,t=Node.prototype;$i=nt(t,"firstChild").get,er=nt(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 ft(e){return $i.call(e)}function mn(e){return er.call(e)}function b(e,t){return ft(e)}function ne(e,t){{var n=ft(e);return n instanceof Comment&&n.data===""?mn(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=mn(i);return i}function Va(e){e.textContent=""}function K(e){var t=He|rt;Z===null?t|=gt:Z.f|=Wi;var n=$!==null&&$.f&He?$:null;const i={children:null,ctx:ie,deps:null,equals:Yi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Z};return n!==null&&(n.children??(n.children=[])).push(i),i}function Ua(e){const t=K(e);return t.equals=Jn,t}function tr(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&He?ei(i):Re(i)}}}function za(e){for(var t=e.parent;t!==null;){if(!(t.f&He))return t;t=t.parent}return null}function nr(e){var t,n=Z;Ie(za(e));try{tr(e),t=hr(e)}finally{Ie(n)}return t}function ir(e){var t=nr(e),n=(tt||e.f>)&&e.deps!==null?gn:Me;Ye(e,n),e.equals(t)||(e.v=t,e.wv=_r())}function ei(e){tr(e),Ht(e,0),Ye(e,St),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Wa(e){Z===null&&$===null&&pa(),$!==null&&$.f>&&ma(),ni&&ga()}function Ka(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function It(e,t,n,i=!0){var r=(e&Yt)!==0,a=Z,o={ctx:ie,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|rt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var s=kt;try{ki(!0),wn(o),o.f|=Ui}catch(u){throw Re(o),u}finally{ki(s)}}else t!==null&&kn(o);var l=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Wi)===0;if(!l&&!r&&i&&(a!==null&&Ka(o,a),$!==null&&$.f&He)){var d=$;(d.children??(d.children=[])).push(o)}return o}function Ya(){return $===null?!1:!tt}function Za(e){const t=It(Kt,null,!1);return Ye(t,Me),t.teardown=e,t}function pn(e){Wa();var t=Z!==null&&(Z.f&Ve)!==0&&ie!==null&&!ie.m;if(t){var n=ie;(n.e??(n.e=[])).push({fn:e,effect:Z,reaction:$})}else{var i=pt(e);return i}}function Ga(e){const t=It(Yt,e,!0);return(n={})=>new Promise(i=>{n.outro?vt(t,()=>{Re(t),i(void 0)}):(Re(t),i(void 0))})}function pt(e){return It(Vi,e,!1)}function yn(e){return It(Kt,e,!0)}function L(e){return Xe(e)}function Xe(e,t=0){return It(Kt|hn|t,e,!0)}function De(e,t=!0){return It(Kt|Ve,e,!0,t)}function rr(e){var t=e.teardown;if(t!==null){const n=ni,i=$;bi(!0),qe(null);try{t.call(null)}finally{bi(n),qe(i)}}}function ar(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)ei(t[n])}}function or(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Re(n,t),n=i}}function Xa(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ve||Re(t),t=n}}function Re(e,t=!0){var n=!1;if((t||e.f&zi)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:mn(i);i.remove(),i=a}n=!0}or(e,t&&!n),ar(e),Ht(e,0),Ye(e,St);var o=e.transitions;if(o!==null)for(const l of o)l.stop();rr(e);var s=e.parent;s!==null&&s.first!==null&&lr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function lr(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function vt(e,t){var n=[];ti(e,n,!0),sr(n,()=>{Re(e),t&&t()})}function sr(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function ti(e,t,n){if(!(e.f&Ue)){if(e.f^=Ue,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&mt)!==0||(i.f&Ve)!==0;ti(i,t,a?n:!1),i=r}}}function Dt(e){cr(e,!0)}function cr(e,t){if(e.f&Ue){Gt(e)&&wn(e),e.f^=Ue;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&mt)!==0||(n.f&Ve)!==0;cr(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let dn=!1,qn=[];function ur(){dn=!1;const e=qn.slice();qn=[],fa(e)}function At(e){dn||(dn=!0,queueMicrotask(ur)),qn.push(e)}function Ja(){dn&&ur()}function dr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const fr=0,Qa=1;let jt=!1,ln=fr,Rt=!1,qt=null,kt=!1,ni=!1;function ki(e){kt=e}function bi(e){ni=e}let ct=[],bt=0;let $=null;function qe(e){$=e}let Z=null;function Ie(e){Z=e}let We=null;function $a(e){We=e}let me=null,Pe=0,it=null;function eo(e){it=e}let vr=1,Hn=0,tt=!1,ie=null;function xi(e){ie=e}function _r(){return++vr}function Zt(){return!Et||ie!==null&&ie.l===null}function Gt(e){var d;var t=e.f;if(t&rt)return!0;if(t&gn){var n=e.deps,i=(t>)!==0;if(n!==null){var r,a,o=(t&un)!==0,s=i&&Z!==null&&!tt,l=n.length;if(o||s){for(r=0;r<l;r++)a=n[r],(o||!((d=a==null?void 0:a.reactions)!=null&&d.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=un)}for(r=0;r<l;r++)if(a=n[r],Gt(a)&&ir(a),a.wv>e.wv)return!0}(!i||Z!==null&&!tt)&&Ye(e,Me)}return!1}function to(e,t){for(var n=t;n!==null;){if(n.f&cn)try{n.fn(e);return}catch{n.f^=cn}n=n.parent}throw jt=!1,e}function no(e){return(e.f&St)===0&&(e.parent===null||(e.parent.f&cn)===0)}function Mn(){jt=!1}function Xt(e,t,n,i){if(jt){if(n===null&&(jt=!1),no(t))throw e;return}n!==null&&(jt=!0);{to(e,t);return}}function hr(e){var _;var t=me,n=Pe,i=it,r=$,a=tt,o=We,s=ie,l=e.f;me=null,Pe=0,it=null,$=l&(Ve|Yt)?null:e,tt=!kt&&(l>)!==0,We=null,ie=e.ctx,Hn++;try{var d=(0,e.fn)(),u=e.deps;if(me!==null){var f;if(Ht(e,Pe),u!==null&&Pe>0)for(u.length=Pe+me.length,f=0;f<me.length;f++)u[Pe+f]=me[f];else e.deps=u=me;if(!tt)for(f=Pe;f<u.length;f++)((_=u[f]).reactions??(_.reactions=[])).push(e)}else u!==null&&Pe<u.length&&(Ht(e,Pe),u.length=Pe);return d}finally{me=t,Pe=n,it=i,$=r,tt=a,We=o,ie=s}}function io(e,t){let n=t.reactions;if(n!==null){var i=sa.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&He&&(me===null||!me.includes(t))&&(Ye(t,gn),t.f&(gt|un)||(t.f^=un),Ht(t,0))}function Ht(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)io(e,n[i])}function wn(e){var t=e.f;if(!(t&St)){Ye(e,Me);var n=Z,i=ie;Z=e;try{t&hn?Xa(e):or(e),ar(e),rr(e);var r=hr(e);e.teardown=typeof r=="function"?r:null,e.wv=vr;var a=e.deps,o;Dn&&Ea&&e.f&rt}catch(s){Xt(s,e,n,i||e.ctx)}finally{Z=n}}}function gr(){if(bt>1e3){bt=0;try{ya()}catch(e){if(qt!==null)Xt(e,qt,null);else throw e}}bt++}function mr(e){var t=e.length;if(t!==0){gr();var n=kt;kt=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&Me||(r.f^=Me);var a=[];pr(r,a),ro(a)}}finally{kt=n}}}function ro(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(St|Ue)))try{Gt(i)&&(wn(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?lr(i):i.fn=null))}catch(r){Xt(r,i,null,i.ctx)}}}function ao(){if(Rt=!1,bt>1001)return;const e=ct;ct=[],mr(e),Rt||(bt=0,qt=null)}function kn(e){ln===fr&&(Rt||(Rt=!0,queueMicrotask(ao))),qt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Yt|Ve)){if(!(n&Me))return;t.f^=Me}}ct.push(t)}function pr(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&Ve)!==0,o=a&&(r&Me)!==0,s=n.next;if(!o&&!(r&Ue))if(r&Kt){if(a)n.f^=Me;else try{Gt(n)&&wn(n)}catch(f){Xt(f,n,null,n.ctx)}var l=n.first;if(l!==null){n=l;continue}}else r&Vi&&i.push(n);if(s===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var d=f.next;if(d!==null){n=d;continue e}f=f.parent}}n=s}for(var u=0;u<i.length;u++)l=i[u],t.push(l),pr(l,t)}function yr(e){var t=ln,n=ct;try{gr();const r=[];ln=Qa,ct=r,Rt=!1,mr(n);var i=e==null?void 0:e();return Ja(),(ct.length>0||r.length>0)&&yr(),bt=0,qt=null,i}finally{ln=t,ct=n}}async function Bn(){await Promise.resolve(),yr()}function c(e){var u;var t=e.f,n=(t&He)!==0;if(n&&t&St){var i=nr(e);return ei(e),i}if($!==null){We!==null&&We.includes(e)&&xa();var r=$.deps;e.rv<Hn&&(e.rv=Hn,me===null&&r!==null&&r[Pe]===e?Pe++:me===null?me=[e]:me.push(e),it!==null&&Z!==null&&Z.f&Me&&!(Z.f&Ve)&&it.includes(e)&&(Ye(Z,rt),kn(Z)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,s=a;o!==null;)if(o.f&He){var l=o;s=l,o=l.parent}else{var d=o;(u=d.deriveds)!=null&&u.includes(s)||(d.deriveds??(d.deriveds=[])).push(s);break}return n&&(a=e,Gt(a)&&ir(a)),e.v}function Ke(e){const t=$;try{return $=null,e()}finally{$=t}}const oo=-7169;function Ye(e,t){e.f=e.f&oo|t}function lo(e){return kr().get(e)}function wr(e,t){return kr().set(e,t),t}function kr(e){return ie===null&&dr(),ie.c??(ie.c=new Map(so(ie)||void 0))}function so(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){ie={p:ie,c:null,e:null,m:!1,s:e,x:null,l:null},Et&&!t&&(ie.l={s:null,u:null,r1:[],r2:Ee(!1)})}function oe(e){const t=ie;if(t!==null){const o=t.e;if(o!==null){var n=Z,i=$;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),qe(a.reaction),pt(a.fn)}}finally{Ie(n),qe(i)}}ie=t.p,t.m=!0}return{}}function co(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ze in e)Fn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&ze in n&&Fn(n)}}}function Fn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Fn(e[i],t)}catch{}const n=Gn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Fi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function uo(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const fo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function vo(e){return fo.includes(e)}const _o={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function ho(e){return e=e.toLowerCase(),_o[e]??e}const go=["touchstart","touchmove"];function mo(e){return go.includes(e)}function po(e,t){if(t){const n=document.body;e.autofocus=!0,At(()=>{document.activeElement===n&&e.focus()})}}let Si=!1;function yo(){Si||(Si=!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 br(e){var t=$,n=Z;qe(null),Ie(null);try{return e()}finally{qe(t),Ie(n)}}function xr(e,t,n,i=n){e.addEventListener(t,()=>br(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),yo()}const Sr=new Set,Vn=new Set;function ii(e,t,n,i){function r(a){if(i.capture||Pt.call(t,a),!a.cancelBubble)return br(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?At(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function wo(e,t,n,i={}){var r=ii(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function ce(e,t,n,i,r){var a={capture:i,passive:r},o=ii(e,t,n,a);(t===document.body||t===window||t===document)&&Za(()=>{t.removeEventListener(e,o,a)})}function fe(e){for(var t=0;t<e.length;t++)Sr.add(e[t]);for(var n of Vn)n(e)}function Pt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,s=e.__root;if(s){var l=r.indexOf(s);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var d=r.indexOf(t);if(d===-1)return;l<=d&&(o=l)}if(a=r[o]||e.target,a!==t){ca(e,"currentTarget",{configurable:!0,get(){return a||n}});var u=$,f=Z;qe(null),Ie(null);try{for(var _,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+i];if(v!==void 0&&!a.disabled)if(Yn(v)){var[p,...y]=v;p.apply(a,[e,...y])}else v.call(a,e)}catch(S){_?m.push(S):_=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(_){for(let S of m)queueMicrotask(()=>{throw S});throw _}}finally{e.__root=t,delete e.currentTarget,qe(u),Ie(f)}}}function ko(e){var t;t=document.head.appendChild(Tt());try{Xe(()=>e(t),zi)}finally{}}function ri(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function _t(e,t){var n=Z;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Ra)!==0,i=(t&qa)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=ri(a?e:"<!>"+e),n||(r=ft(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var s=ft(o),l=o.lastChild;_t(s,l)}else _t(o,o);return o}}function Ne(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=ri(r),s=ft(o);a=ft(s)}var l=a.cloneNode(!0);return _t(l,l),l}}function Be(e=""){{var t=Tt(e+"");return _t(t,t),t}}function Fe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),_t(t,n),e}function k(e,t){e!==null&&e.before(t)}let fn=!0;function Ei(e){fn=e}function G(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 Jt(e,t){return bo(e,t)}const yt=new Map;function bo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){Fa();var s=new Set,l=f=>{for(var _=0;_<f.length;_++){var m=f[_];if(!s.has(m)){s.add(m);var g=mo(m);t.addEventListener(m,Pt,{passive:g});var v=yt.get(m);v===void 0?(document.addEventListener(m,Pt,{passive:g}),yt.set(m,1)):yt.set(m,v+1)}}};l(Zn(Sr)),Vn.add(l);var d=void 0,u=Ga(()=>{var f=n??t.appendChild(Tt());return De(()=>{if(a){ae({});var _=ie;_.c=a}r&&(i.$$events=r),fn=o,d=e(f,i)||{},fn=!0,a&&oe()}),()=>{var g;for(var _ of s){t.removeEventListener(_,Pt);var m=yt.get(_);--m===0?(document.removeEventListener(_,Pt),yt.delete(_)):yt.set(_,m)}Vn.delete(l),f!==n&&((g=f.parentNode)==null||g.removeChild(f))}});return Un.set(d,u),d}let Un=new WeakMap;function bn(e,t){const n=Un.get(e);return n?(Un.delete(e),n(t)):Promise.resolve()}function q(e,t,n=!1){var i=e,r=null,a=null,o=we,s=n?mt:0,l=!1;const d=(f,_=!0)=>{l=!0,u(_,f)},u=(f,_)=>{o!==(o=f)&&(o?(r?Dt(r):_&&(r=De(()=>_(i))),a&&vt(a,()=>{a=null})):(a?Dt(a):_&&(a=De(()=>_(i))),r&&vt(r,()=>{r=null})))};Xe(()=>{l=!1,t(d),l||u(null,null)},s)}function Er(e,t,n){var i=e,r=we,a,o=Zt()?ha:Xn;Xe(()=>{o(r,r=t())&&(a&&vt(a),a=De(()=>n(i)))})}function xt(e,t){return t}function xo(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)ti(t[o].e,r,!0);var s=a>0&&r.length===0&&n!==null;if(s){var l=n.parentNode;Va(l),l.append(n),i.clear(),et(e,t[0].prev,t[a-1].next)}sr(r,()=>{for(var d=0;d<a;d++){var u=t[d];s||(i.delete(u.k),et(e,u.prev,u.next)),Re(u.e,!s)}})}function at(e,t,n,i,r,a=null){var o=e,s={flags:t,items:new Map,first:null},l=(t&Zi)!==0;if(l){var d=e;o=d.appendChild(Tt())}var u=null,f=!1;Xe(()=>{var _=n(),m=Yn(_)?_:_==null?[]:Zn(_),g=m.length;if(!(f&&g===0)){f=g===0;{var v=$;So(m,s,o,r,t,(v.f&Ue)!==0,i)}a!==null&&(g===0?u?Dt(u):u=De(()=>a(o)):u!==null&&vt(u,()=>{u=null})),n()}})}function So(e,t,n,i,r,a,o,s){var F,V,W,J;var l=(r&Ia)!==0,d=(r&(Qn|$n))!==0,u=e.length,f=t.items,_=t.first,m=_,g,v=null,p,y=[],w=[],S,j,x,T;if(l)for(T=0;T<u;T+=1)S=e[T],j=o(S,T),x=f.get(j),x!==void 0&&((F=x.a)==null||F.measure(),(p??(p=new Set)).add(x));for(T=0;T<u;T+=1){if(S=e[T],j=o(S,T),x=f.get(j),x===void 0){var H=m?m.e.nodes_start:n;v=To(H,t,v,v===null?t.first:v.next,S,j,T,i,r),f.set(j,v),y=[],w=[],m=v.next;continue}if(d&&Eo(x,S,T,r),x.e.f&Ue&&(Dt(x.e),l&&((V=x.a)==null||V.unfix(),(p??(p=new Set)).delete(x))),x!==m){if(g!==void 0&&g.has(x)){if(y.length<w.length){var M=w[0],C;v=M.prev;var D=y[0],A=y[y.length-1];for(C=0;C<y.length;C+=1)Ti(y[C],M,n);for(C=0;C<w.length;C+=1)g.delete(w[C]);et(t,D.prev,A.next),et(t,v,D),et(t,A,M),m=M,v=A,T-=1,y=[],w=[]}else g.delete(x),Ti(x,m,n),et(t,x.prev,x.next),et(t,x,v===null?t.first:v.next),et(t,v,x),v=x;continue}for(y=[],w=[];m!==null&&m.k!==j;)(a||!(m.e.f&Ue))&&(g??(g=new Set)).add(m),w.push(m),m=m.next;if(m===null)continue;x=m}y.push(x),v=x,m=x.next}if(m!==null||g!==void 0){for(var B=g===void 0?[]:Zn(g);m!==null;)(a||!(m.e.f&Ue))&&B.push(m),m=m.next;var O=B.length;if(O>0){var z=r&Zi&&u===0?n:null;if(l){for(T=0;T<O;T+=1)(W=B[T].a)==null||W.measure();for(T=0;T<O;T+=1)(J=B[T].a)==null||J.fix()}xo(t,B,z,f)}}l&&At(()=>{var ee;if(p!==void 0)for(x of p)(ee=x.a)==null||ee.apply()}),Z.first=t.first&&t.first.e,Z.last=v&&v.e}function Eo(e,t,n,i){i&Qn&&Rn(e.v,t),i&$n?Rn(e.i,n):e.i=n}function To(e,t,n,i,r,a,o,s,l,d){var u=(l&Qn)!==0,f=(l&Aa)===0,_=u?f?Xi(r):Ee(r):r,m=l&$n?Ee(o):o,g={i:m,v:_,k:a,a:null,e:null,prev:n,next:i};try{return g.e=De(()=>s(e,_,m),Qi),g.e.prev=n&&n.e,g.e.next=i&&i.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),i!==null&&(i.prev=g,i.e.prev=g.e),g}finally{}}function Ti(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=mn(a);r.before(a),a=o}}function et(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 Io(e,t,n,i,r){var a=e,o="",s;Xe(()=>{o!==(o=t()??"")&&(s!==void 0&&(Re(s),s=void 0),o!==""&&(s=De(()=>{var l=o+"",d=ri(l);_t(ft(d),d.lastChild),a.before(d)})))})}function Ct(e,t,...n){var i=e,r=st,a;Xe(()=>{r!==(r=t())&&(a&&(Re(a),a=null),a=De(()=>r(i,...n)))},mt)}function Ao(e,t,n,i,r,a){var o,s,l=null,d=e,u;Xe(()=>{const f=t()||null;var _=f==="svg"?Gi:null;f!==o&&(u&&(f===null?vt(u,()=>{u=null,s=null}):f===s?Dt(u):(Re(u),Ei(!1))),f&&f!==s&&(u=De(()=>{l=_?document.createElementNS(_,f):document.createElement(f),_t(l,l);{var m=l.appendChild(Tt());i(l,m)}Z.nodes_end=l,d.before(l)})),o=f,o&&(s=o),Ei(!0))},mt)}function Qt(e,t,n){pt(()=>{var i=Ke(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};yn(()=>{var o=n();co(o),r&&Xn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Tr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Tr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Co(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Tr(e))&&(i&&(i+=" "),i+=t);return i}function Po(e){return typeof e=="object"?Co(e):e??""}function jo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ue(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[_a]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ir(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Mo(e,t,n,i,r=!1,a=!1,o=!1){var s=t||{},l=e.tagName==="OPTION";for(var d in t)d in n||(n[d]=null);n.class&&(n.class=Po(n.class)),n.class=n.class?n.class+" "+i:i;var u=Ir(e),f=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(l&&w==="value"&&S==null){e.value=e.__value="",s[w]=S;continue}var _=s[w];if(S!==_){s[w]=S;var m=w[0]+w[1];if(m!=="$$"){if(m==="on"){const j={},x="$$"+w;let T=w.slice(2);var g=vo(T);if(uo(T)&&(T=T.slice(0,-7),j.capture=!0),!g&&_){if(S!=null)continue;e.removeEventListener(T,s[x],j),s[x]=null}if(S!=null)if(g)e[`__${T}`]=S,fe([T]);else{let H=function(M){s[w].call(this,M)};var y=H;s[x]=ii(T,e,H,j)}else g&&(e[`__${T}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")po(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&l)jo(e,S);else{var v=w;r||(v=ho(v));var p=v==="defaultValue"||v==="defaultChecked";if(S==null&&!a&&!p)if(f[w]=null,v==="value"||v==="checked"){let j=e;if(v==="value"){let x=j.defaultValue;j.removeAttribute(v),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(v),j.defaultChecked=x}}else e.removeAttribute(w);else p||u.includes(v)&&(a||typeof S!="string")?e[v]=S:typeof S!="function"&&ue(e,v,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return s}var Ii=new Map;function Ir(e){var t=Ii.get(e.nodeName);if(t)return t;Ii.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Fi(i);for(var a in n)n[a].set&&t.push(a);i=Gn(i)}return t}function No(e,t,n){var i=e.__className,r=Lo(t);(i!==r||Qi)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Lo(e,t){return(e??"")+""}function se(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 xn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Oo=()=>performance.now(),Ge={tick:e=>requestAnimationFrame(e),now:()=>Oo(),tasks:new Set};function Ar(){const e=Ge.now();Ge.tasks.forEach(t=>{t.c(e)||(Ge.tasks.delete(t),t.f())}),Ge.tasks.size!==0&&Ge.tick(Ar)}function Do(e){let t;return Ge.tasks.size===0&&Ge.tick(Ar),{promise:new Promise(n=>{Ge.tasks.add(t={c:e,f:n})}),abort(){Ge.tasks.delete(t)}}}function an(e,t){e.dispatchEvent(new CustomEvent(t))}function Ro(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 Ai(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Ro(r.trim());t[o]=a.trim()}return t}const qo=e=>e;function je(e,t,n,i){var r=(e&La)!==0,a=(e&Oa)!==0,o=r&&a,s=(e&Da)!==0,l=o?"both":r?"in":"out",d,u=t.inert,f,_;function m(){var w=$,S=Z;qe(null),Ie(null);try{return d??(d=n()(t,(i==null?void 0:i())??{},{direction:l}))}finally{qe(w),Ie(S)}}var g={is_global:s,in(){var w;if(t.inert=u,!r){_==null||_.abort(),(w=_==null?void 0:_.reset)==null||w.call(_);return}a||f==null||f.abort(),an(t,"introstart"),f=zn(t,m(),_,1,()=>{an(t,"introend"),f==null||f.abort(),f=d=void 0})},out(w){if(!a){w==null||w(),d=void 0;return}t.inert=!0,an(t,"outrostart"),_=zn(t,m(),f,0,()=>{an(t,"outroend"),w==null||w()})},stop:()=>{f==null||f.abort(),_==null||_.abort()}},v=Z;if((v.transitions??(v.transitions=[])).push(g),r&&fn){var p=s;if(!p){for(var y=v.parent;y&&y.f&mt;)for(;(y=y.parent)&&!(y.f&hn););p=!y||(y.f&Ui)!==0}p&&pt(()=>{Ke(()=>g.in())})}}function zn(e,t,n,i,r){var a=i===1;if(wt(t)){var o,s=!1;return At(()=>{if(!s){var p=t({direction:a?"in":"out"});o=zn(e,p,n,i,r)}}),{abort:()=>{s=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:st,deactivate:st,reset:st,t:()=>i};const{delay:l=0,css:d,tick:u,easing:f=qo}=t;var _=[];if(a&&n===void 0&&(u&&u(0,1),d)){var m=Ai(d(0,1));_.push(m,m)}var g=()=>1-i,v=e.animate(_,{duration:l});return v.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(d)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var T=p+y*f(x/j),H=d(T,1-T);S.push(Ai(H))}g=()=>{var M=v.currentTime;return p+y*f(M/w)},u&&Do(()=>{if(v.playState!=="running")return!1;var M=g();return u(M,1-M),!0})}v=e.animate(S,{duration:w,fill:"forwards"}),v.onfinish=()=>{g=()=>i,u==null||u(i,1-i),r()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=st)},deactivate:()=>{r=st},reset:()=>{i===0&&(u==null||u(1,0))},t:()=>g()}}function Ho(e,t,n=t){var i=Zt();xr(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Nn(e)?Ln(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd;e.value=a??"",s!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(s,e.value.length))}}),Ke(t)==null&&e.value&&n(Nn(e)?Ln(e.value):e.value),yn(()=>{var r=t();Nn(e)&&r===Ln(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Nn(e){var t=e.type;return t==="number"||t==="range"}function Ln(e){return e===""?null:+e}function Cr(e,t,n){if(e.multiple)return Vo(e,t);for(var i of e.options){var r=Mt(i);if(Ba(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Bo(e,t){pt(()=>{var n=new MutationObserver(()=>{var i=e.__value;Cr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function Fo(e,t,n=t){var i=!0;xr(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Mt);else{var s=e.querySelector(a)??e.querySelector("option:not([disabled])");o=s&&Mt(s)}n(o)}),pt(()=>{var r=t();if(Cr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=Mt(a),n(r))}e.__value=r,i=!1}),Bo(e)}function Vo(e,t){for(var n of e.options)n.selected=~t.indexOf(Mt(n))}function Mt(e){return"__value"in e?e.__value:e.value}function Ci(e,t){return e===t||(e==null?void 0:e[ze])===t}function $t(e={},t,n,i){return pt(()=>{var r,a;return yn(()=>{r=a,a=[],Ke(()=>{e!==n(...a)&&(t(e,...a),r&&Ci(n(...r),e)&&t(null,...r))})}),()=>{At(()=>{a&&Ci(n(...a),e)&&t(null,...a)})}}),e}let on=!1;function Uo(e){var t=on;try{return on=!1,[e(),on]}finally{on=t}}const zo={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 Wo(e,t,n){return new Proxy({props:e,exclude:t},zo)}const Ko={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(wt(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];wt(r)&&(r=r());const a=nt(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(wt(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=nt(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===ze||t===Ki)return!1;for(let n of e.props)if(wt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){wt(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function Yo(...e){return new Proxy({props:e},Ko)}function Pi(e){for(var t=Z,n=Z;t!==null&&!(t.f&(Ve|Yt));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function N(e,t,n,i){var H;var r=(n&Ca)!==0,a=!Et||(n&Pa)!==0,o=(n&Ma)!==0,s=(n&Na)!==0,l=!1,d;o?[d,l]=Uo(()=>e[t]):d=e[t];var u=ze in e||Ki in e,f=o&&(((H=nt(e,t))==null?void 0:H.set)??(u&&t in e&&(M=>e[t]=M)))||void 0,_=i,m=!0,g=!1,v=()=>(g=!0,m&&(m=!1,s?_=Ke(i):_=i),_);d===void 0&&i!==void 0&&(f&&a&&wa(),d=v(),f&&f(d));var p;if(a)p=()=>{var M=e[t];return M===void 0?v():(m=!0,g=!1,M)};else{var y=Pi(()=>(r?K:Ua)(()=>e[t]));y.f|=va,p=()=>{var M=c(y);return M!==void 0&&(_=void 0),M===void 0?_:M}}if(!(n&ja))return p;if(f){var w=e.$$legacy;return function(M,C){return arguments.length>0?((!a||!C||w||l)&&f(C?p():M),M):p()}}var S=!1,j=!1,x=Xi(d),T=Pi(()=>K(()=>{var M=p(),C=c(x);return S?(S=!1,j=!0,C):(j=!1,x.v=M)}));return r||(T.equals=Jn),function(M,C){if(arguments.length>0){const D=C?c(T):a&&o?X(M):M;return T.equals(D)||(S=!0,P(x,D),g&&_!==void 0&&(_=D),Ke(()=>c(T))),M}return c(T)}}function ji(e,t){var n=Z,i=$,r=ie;Ie(e),qe(e),xi(e.ctx);try{t()}finally{Ie(n),qe(i),xi(r)}}function Zo(e,t,n){var i=e,r;Xe(()=>{var a=Z,o=!1;a.fn=s=>{var l=t.onerror;let d=t.failed;if(!l&&!d||o)throw s;var u=()=>{vt(r),ji(a,()=>{o=!1,r=De(()=>n(i)),Mn()})};l==null||l(s,u),r&&Re(r),At(()=>{ji(a,()=>{o=!0;try{r=De(()=>{d(i,()=>s,()=>u)})}catch(f){Xt(f,a,null,a.ctx)}Mn(),o=!1})})},r=De(()=>n(i)),Mn()},mt|cn)}function Je(e){ie===null&&dr(),Et&&ie.l!==null?Go(ie).m.push(e):pn(()=>{const t=Ke(e);if(typeof t=="function")return t})}function Go(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Xo="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xo);const Pr="https://www.playpilot.com",Sn="https://partner-api.playpilot.tech/1.0.0",jr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",ye=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",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",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error"});function ai(){const e=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+e}const Jo="https://insights.playpilot.net";async function be(e,t=null,n={}){var r,a;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=ai(),n.organization_sid=(r=window.PlayPilotLinkInjections)==null?void 0:r.organization_sid,n.domain_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.domain_sid,fetch(Jo,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function Qo({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const oi="EncryptedToken",Mr="articleReplacementEditToken",Nr="playpilot-editorial-mode";async function Lr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=In();if(!n)throw new Error("No token was provided");const i=li(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Sn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return $o(i),!0}catch(n){console.error(n),be(ye.AuthFailed)}finally{nl()}return!1}function li(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Mr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${oi}=`).pop())==null?void 0:r.split(";")[0])||""}function $o(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=oi+"="+e+";"+i+";path=/"}function el(){document.cookie=oi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Or(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(Nr)==="true"||!!e}function tl(){const e=new URL(window.location.href);e.searchParams.set(Nr,"true"),window.history.replaceState({},"",e)}function nl(){const e=new URL(window.location.href);e.searchParams.delete(Mr),window.history.replaceState({},"",e)}function il(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}function Dr(){return(Math.random()+1).toString(36).substring(7)}const h=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),rl={"Where To Stream Online":{[h.English]:"Where to stream online",[h.Swedish]:"Var kan man streama online",[h.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[h.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[h.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[h.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[h.English]:"An error occurred",[h.Swedish]:"Ett fel inträffade",[h.Danish]:"Der opstod en fejl"},"Title Unavailable":{[h.English]:"This title is not currently available to stream.",[h.Swedish]:"Den här titeln går inte att streama just nu.",[h.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[h.English]:"is not currently available to stream.",[h.Swedish]:"går inte att streama just nu.",[h.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[h.English]:"is available to stream on",[h.Swedish]:"finns att streama på",[h.Danish]:"kan streames på"},"Is Available To Stream":{[h.English]:"is available to stream.",[h.Swedish]:"finns att streama.",[h.Danish]:"kan streames."},"View Streaming Options":{[h.English]:"View streaming options",[h.Swedish]:"Se streamingalternativ",[h.Danish]:"Se streamingmuligheder"},And:{[h.English]:"and",[h.Swedish]:"och",[h.Danish]:"og"},Minutes:{[h.English]:"minutes",[h.Swedish]:"minuter",[h.Danish]:"minutter"},"Type: movie":{[h.English]:"Movie",[h.Swedish]:"Film",[h.Danish]:"Film"},"Type: series":{[h.English]:"Series",[h.Swedish]:"Serie",[h.Danish]:"Serie"},Stream:{[h.English]:"Stream",[h.Swedish]:"Streama",[h.Danish]:"Stream"},Buy:{[h.English]:"Buy",[h.Swedish]:"Köp",[h.Danish]:"Køb"},Rent:{[h.English]:"Rent",[h.Swedish]:"Hyra",[h.Danish]:"Lej"},"Rent Or Buy":{[h.English]:"Rent or Buy",[h.Swedish]:"Hyra",[h.Danish]:"Lej eller køb"},All:{[h.English]:"All",[h.Swedish]:"Alla",[h.Danish]:"Alle"},Unscripted:{[h.English]:"Unscripted",[h.Swedish]:"Oscripterat",[h.Danish]:"Umanuskriptet"},Independent:{[h.English]:"Independent",[h.Swedish]:"Indie",[h.Danish]:"Indie"},"Game Show":{[h.English]:"Game Show",[h.Swedish]:"Gameshow",[h.Danish]:"Quizshow"},"Film Noir":{[h.English]:"Film Noir",[h.Swedish]:"Film noir",[h.Danish]:"Film noir"},Entertainment:{[h.English]:"Entertainment",[h.Swedish]:"Underhållning",[h.Danish]:"Underholdning"},News:{[h.English]:"News",[h.Swedish]:"Nyheter",[h.Danish]:"Nyheder"},Short:{[h.English]:"Short",[h.Swedish]:"Kortfilm",[h.Danish]:"Kortfilm"},Bollywood:{[h.English]:"Bollywood",[h.Swedish]:"Bollywood",[h.Danish]:"Bollywood"},Concert:{[h.English]:"Concert",[h.Swedish]:"Konsert",[h.Danish]:"Koncert"},Arthouse:{[h.English]:"Arthouse",[h.Swedish]:"Arthouse",[h.Danish]:"Arthouse"},"Alternate Version":{[h.English]:"Alternate Version",[h.Swedish]:"Alternativ version",[h.Danish]:"Alternativ version"},"Reality TV":{[h.English]:"Reality TV",[h.Swedish]:"Reality-TV",[h.Danish]:"Reality-TV"},Culture:{[h.English]:"Culture",[h.Swedish]:"Kultur",[h.Danish]:"Kultur"},Drama:{[h.English]:"Drama",[h.Swedish]:"Drama",[h.Danish]:"Drama"},Crime:{[h.English]:"Crime",[h.Swedish]:"Kriminal",[h.Danish]:"Krimi"},Western:{[h.English]:"Western",[h.Swedish]:"Western",[h.Danish]:"Western"},Thriller:{[h.English]:"Thriller",[h.Swedish]:"Thriller",[h.Danish]:"Thriller"},Animation:{[h.English]:"Animation",[h.Swedish]:"Animerat",[h.Danish]:"Animation"},Mystery:{[h.English]:"Mystery",[h.Swedish]:"Mysterium",[h.Danish]:"Mysterium"},Science:{[h.English]:"Science",[h.Swedish]:"Vetenskap",[h.Danish]:"Videnskab"},Nature:{[h.English]:"Nature",[h.Swedish]:"Natur",[h.Danish]:"Natur"},War:{[h.English]:"War",[h.Swedish]:"Krig",[h.Danish]:"Krig"},"Sci-Fi":{[h.English]:"Sci-Fi",[h.Swedish]:"Sci-fi",[h.Danish]:"Sci-fi"},Documentary:{[h.English]:"Documentary",[h.Swedish]:"Dokumentär",[h.Danish]:"Dokumentar"},"Stand-up":{[h.English]:"Stand-up",[h.Swedish]:"Standup",[h.Danish]:"Stand-up"},"Talk Show":{[h.English]:"Talk Show",[h.Swedish]:"Talkshow",[h.Danish]:"Talkshow"},Fantasy:{[h.English]:"Fantasy",[h.Swedish]:"Fantasy",[h.Danish]:"Fantasy"},History:{[h.English]:"History",[h.Swedish]:"Historia",[h.Danish]:"Historie"},Adventure:{[h.English]:"Adventure",[h.Swedish]:"Äventyr",[h.Danish]:"Eventyr"},Action:{[h.English]:"Action",[h.Swedish]:"Action",[h.Danish]:"Action"},Horror:{[h.English]:"Horror",[h.Swedish]:"Skräck",[h.Danish]:"Gyser"},Comedy:{[h.English]:"Comedy",[h.Swedish]:"Komedi",[h.Danish]:"Komedie"},Biography:{[h.English]:"Biography",[h.Swedish]:"Biografi",[h.Danish]:"Biografi"},Music:{[h.English]:"Music",[h.Swedish]:"Musik",[h.Danish]:"Musik"},Sport:{[h.English]:"Sport",[h.Swedish]:"Sport",[h.Danish]:"Sport"},Romance:{[h.English]:"Romance",[h.Swedish]:"Romantik",[h.Danish]:"Romantik"},Kids:{[h.English]:"Kids",[h.Swedish]:"Barn",[h.Danish]:"Børn"},Lifestyle:{[h.English]:"Lifestyle",[h.Swedish]:"Livsstil",[h.Danish]:"Livsstil"},Musical:{[h.English]:"Musical",[h.Swedish]:"Musikal",[h.Danish]:"Musical"},Anime:{[h.English]:"Anime",[h.Swedish]:"Anime",[h.Danish]:"Anime"},Family:{[h.English]:"Family",[h.Swedish]:"Familj",[h.Danish]:"Familie"}};function ke(e,t=Rr()){var n;return((n=rl[e])==null?void 0:n[t])||e}function Rr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(h);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(t.includes(n))return n;const a=t.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return h.English}const al=e=>e;function si(e){const t=e-1;return t*t*t+1}function Mi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Bt(e,{delay:t=0,duration:n=400,easing:i=al}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function En(e,{delay:t=0,duration:n=400,easing:i=si,x:r=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(e),l=+s.opacity,d=s.transform==="none"?"":s.transform,u=l*(1-o),[f,_]=Mi(r),[m,g]=Mi(a);return{delay:t,duration:n,easing:i,css:(v,p)=>`
|
|
4
4
|
transform: ${d} translate(${(1-v)*f}${_}, ${(1-v)*m}${g});
|
|
5
|
-
opacity: ${l-u*p}`}}function
|
|
5
|
+
opacity: ${l-u*p}`}}function Ft(e,{delay:t=0,duration:n=400,easing:i=si,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,s=r==="y"?"height":"width",l=parseFloat(a[s]),d=r==="y"?["top","bottom"]:["left","right"],u=d.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),_=parseFloat(a[`padding${u[1]}`]),m=parseFloat(a[`margin${u[0]}`]),g=parseFloat(a[`margin${u[1]}`]),v=parseFloat(a[`border${u[0]}Width`]),p=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${s}: ${y*l}px;padding-${d[0]}: ${y*f}px;padding-${d[1]}: ${y*_}px;margin-${d[0]}: ${y*m}px;margin-${d[1]}: ${y*g}px;border-${d[0]}-width: ${y*v}px;border-${d[1]}-width: ${y*p}px;min-${s}: 0`}}function ol(e,{delay:t=0,duration:n=400,easing:i=si,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),s=+o.opacity,l=o.transform==="none"?"":o.transform,d=1-r,u=s*(1-a);return{delay:t,duration:n,easing:i,css:(f,_)=>`
|
|
6
6
|
transform: ${l} scale(${1-d*_});
|
|
7
7
|
opacity: ${s-u*_}
|
|
8
|
-
`}}Ta();var ll=Ne('<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 qr(e){var t=ll();k(e,t)}function ci(e,t){ae(t,!0);const n=N(t,"size",3,"margin(2)"),i=N(t,"onclick",3,()=>null),r=Wo(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=Fe(),o=ne(a);Ao(o,()=>t.href?"a":"button",!1,(s,l)=>{let d;L(()=>{d=Mo(s,d,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",s.namespaceURI===Gi,s.nodeName.includes("-")),xn(s,"--size",n())});var u=Fe(),f=ne(u);Ct(f,()=>t.children??st),k(l,u)}),k(e,a),oe()}function sl(e){P(e,e.v+1)}function cl(e){let t=0,n=Ee(0),i;return()=>{Ya()&&(c(n),yn(()=>(t===0&&(i=Ke(()=>e(()=>sl(n)))),t+=1,()=>{Bn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var Ut,zt;class ul{constructor(t,n){Pn(this,Ut);Pn(this,zt);jn(this,Ut,t),jn(this,zt,cl(n))}get current(){return Cn(this,zt).call(this),Cn(this,Ut).call(this)}}Ut=new WeakMap,zt=new WeakMap;const dl=/\(.+\)/;class fl extends ul{constructor(t,n){let i=dl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>wo(r,"change",a))}}const ui=new fl("(prefers-reduced-motion: reduce)");var vl=(e,t)=>t()(),_l=I('<div class="modal svelte-aqwna4"><div class="dialog svelte-aqwna4" role="dialog" aria-labelledby="title" data-view-transition-new=""><div class="close svelte-aqwna4"><!></div> <!></div> <div class="backdrop svelte-aqwna4"></div></div>');function Hr(e,t){ae(t,!0);const n=N(t,"onclose",3,()=>null),i=N(t,"onscroll",3,()=>null);wr("scope","modal"),Je(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return ui.current?Ht(f,{duration:0}):window.innerWidth<600?En(f,{duration:250,y:window.innerHeight}):ol(f,{duration:150,start:.85})}var a=_l();ce("keydown",pe,({key:f})=>{f==="Escape"&&n()()});var o=b(a),s=b(o),l=b(s);ci(l,{onclick:()=>n()(),children:(f,_)=>{qr(f)},$$slots:{default:!0}});var d=E(s,2);Ct(d,()=>t.children);var u=E(o,2);u.__click=[vl,n],ce("scroll",o,function(...f){var _;(_=i())==null||_.apply(this,f)}),je(7,o,()=>r),je(7,a,()=>Ht,()=>({duration:150})),k(e,a),oe()}fe(["click"]);const hl=[{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 gl=I('<div class="genre svelte-1ebula3"> </div>'),ml=(e,t)=>P(t,!0),pl=I('<button class="genre expand svelte-1ebula3"> </button>'),yl=I("<!> <!>",1);function wl(e,t){ae(t,!0);let n=U(!1);const i=K(()=>c(n)?t.genres:[t.genres[0]]);var r=yl(),a=ne(r);at(a,17,()=>c(i),bt,(l,d)=>{var u=Fe();const f=K(()=>{var g;return(g=hl.find(v=>v.slug===c(d)))==null?void 0:g.name});var _=ne(u);{var m=g=>{var v=gl(),p=b(v);L(()=>G(p,ke(c(f)))),k(g,v)};q(_,g=>{c(f)&&g(m)})}k(l,u)});var o=E(a,2);{var s=l=>{var d=pl();d.__click=[ml,n];var u=b(d);L(()=>G(u,`+${t.genres.length-1}`)),k(l,d)};q(o,l=>{!c(n)&&t.genres.length>1&&l(s)})}k(e,r),oe()}fe(["click"]);function kl(e){let t=[];for(const n of e){let i=n;const r=t.find(s=>s.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(s=>s.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function xe(e,t=1){e.role="heading",e.ariaLevel=t.toString()}var bl=Ne('<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 xl(e){var t=bl();k(e,t)}function Ft(e){return e?e.replace("/src/img",""):null}var Sl=(e,t,n)=>t(n()),El=I('<div class="arrow svelte-g63n1y"><!></div>'),Tl=I('<a target="_blank" class="playlink svelte-g63n1y" rel="sponsored"><img alt="" height="32" width="32" class="svelte-g63n1y"> <div><span class="name svelte-g63n1y"> </span> <div class="category svelte-g63n1y"> </div></div> <!></a>'),Il=I('<div class="playlink empty svelte-g63n1y"> </div>'),Al=I('<div class="heading svelte-g63n1y"> </div> <div class="playlinks svelte-g63n1y"><!> <!></div>',1);function Cl(e,t){ae(t,!0);const n=N(t,"list",3,!1),i=lo("scope")==="modal",r=K(()=>t.playlinks.filter(v=>!!v.logo_url)),a=K(()=>kl(c(r))),o={SVOD:ke("Stream"),BUY:ke("Buy"),RENT:ke("Rent"),TVOD:ke("Rent Or Buy")};function s(v){be(i?ye.TitleModalPlaylinkClick:ye.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var l=Al(),d=ne(l),u=b(d);L(()=>G(u,ke("Where To Stream Online"))),Jt(d,(v,p)=>xe==null?void 0:xe(v,p),()=>3);var f=E(d,2),_=b(f);at(_,17,()=>c(a),bt,(v,p)=>{let y=()=>c(p).name,w=()=>c(p).url,S=()=>c(p).logo_url,j=()=>c(p).highlighted,x=()=>c(p).cta_text,T=()=>c(p).extra_info.category;var H=Tl();H.__click=[Sl,s,y];var M=b(H);L(()=>ue(M,"src",Ft(S())));var C=E(M,2),D=b(C),A=b(D),B=E(D,2),O=b(B);L(()=>G(O,x()||o[T()]||ke("Stream")));var z=E(C,2);{var F=V=>{var W=El(),J=b(W);xl(J),k(V,W)};q(z,V=>{n()&&V(F)})}L(()=>{ue(H,"href",w()),ue(H,"data-playlink",y()),se(H,"highlighted",j()&&x()),G(A,y())}),k(v,H)});var m=E(_,2);{var g=v=>{var p=Il(),y=b(p);L(()=>G(y,ke("Title Unavailable"))),k(v,p)};q(m,v=>{t.playlinks.length||v(g)})}L(()=>se(f,"list",n())),k(e,l),oe()}fe(["click"]);var Pl=(e,t)=>P(t,!0),jl=I('<button class="show-more svelte-1u3je71">Show more</button>'),Ml=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Nl=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Ll(e,t){ae(t,!0);const n=N(t,"blurb",3,""),i=N(t,"limit",3,200);let r=U(!1);const a=K(()=>t.text.slice(0,i()));var o=Nl(),s=b(o),l=b(s),d=E(l);{var u=v=>{var p=Be("...");k(v,p)};q(d,v=>{!c(r)&&t.text.length>i()&&v(u)})}var f=E(d,2);{var _=v=>{var p=jl();p.__click=[Pl,r],k(v,p)};q(f,v=>{!c(r)&&(t.text.length>i()||n())&&v(_)})}var m=E(s,2);{var g=v=>{var p=Ml(),y=b(p);L(()=>G(y,n())),k(v,p)};q(m,v=>{c(r)&&v(g)})}L(()=>G(l,c(r)?t.text:c(a))),k(e,o),oe()}fe(["click"]);var Ol=Ne('<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 Br(e){var t=Ol();k(e,t)}var Dl=I('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),Rl=I("<div> </div>"),ql=I('<img alt="" class="svelte-1026zg0">'),Hl=I('<div class="content svelte-1026zg0" data-playpilot-link-injections-title=""><div class="header svelte-1026zg0"><!> <div class="heading svelte-1026zg0" id="title"> </div> <div class="info svelte-1026zg0"><div class="imdb svelte-1026zg0"><!> </div> <!> <div> </div> <div class="capitalize svelte-1026zg0"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-1026zg0"><!></div>',1);function Fr(e,t){ae(t,!0);const n=N(t,"small",3,!1),i=N(t,"compact",3,!1);let r=U(!1),a=U(!1),o=U(!1);var s=Hl(),l=ne(s),d=b(l),u=b(d);{var f=F=>{var V=Dl(),W=b(V);L(()=>ue(W,"src",Ft(t.title.standing_poster))),L(()=>{ue(W,"alt",`Movie poster for '${t.title.title??""}'`),se(W,"loaded",c(r))}),ce("load",W,()=>P(r,!0)),k(F,V)};q(u,F=>{i()||F(f)})}var _=E(u,2),m=b(_);Jt(_,(F,V)=>xe==null?void 0:xe(F,V),()=>2);var g=E(_,2),v=b(g),p=b(v);Br(p);var y=E(p),w=E(v,2);wl(w,{get genres(){return t.title.genres}});var S=E(w,2),j=b(S),x=E(S,2),T=b(x);L(()=>G(T,ke(`Type: ${t.title.type}`)));var H=E(x,2);{var M=F=>{var V=Rl(),W=b(V);L(()=>G(W,`${t.title.length??""} ${ke("Minutes")??""}`)),k(F,V)};q(H,F=>{!n()&&t.title.length&&F(M)})}var C=E(d,2),D=b(C);Cl(D,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var A=E(D,2);{var B=F=>{Ll(F,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};q(A,F=>{n()||F(B)})}var O=E(l,2),z=b(O);Er(z,()=>c(o),F=>{var V=ql();L(()=>ue(V,"src",Ft(c(o)?t.title.standing_poster:t.title.medium_poster))),L(()=>{se(V,"loaded",c(a)),se(V,"blur",c(o))}),ce("load",V,()=>P(a,!0)),ce("error",V,()=>P(o,!0)),k(F,V)}),L(()=>{se(l,"small",n()),se(l,"compact",i()),se(_,"truncate",n()),G(m,t.title.title),G(y,` ${t.title.imdb_score??""}`),G(j,t.title.year),se(O,"faded",i())}),k(e,s),oe()}function Bl(e,t){ae(t,!0),be(ye.TitleModalView,t.title);let n=!1;function i(){n||(be(ye.TitleModalScroll,t.title),n=!0)}Hr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{Fr(r,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var Fl=I('<div class="popover svelte-tb2xdq" tabindex="-1" aria-hidden="true"><div class="dialog svelte-tb2xdq" data-view-transition-old=""><!></div></div>');function Vl(e,t){ae(t,!0);let n=N(t,"maxHeight",15);wr("scope","popover");let i=U(null),r=U(!1);Je(async()=>{await Bn(),a(),await Bn(),o()});function a(){if(!c(i))return;const{top:f,right:_,bottom:m,height:g}=c(i).getBoundingClientRect(),v=s();P(r,X(f-v<0&&window.innerHeight-m>f+g));const p=window.innerWidth-_-v;_+v>window.innerWidth&&(c(i).style.left=`${p}px`)}function o(){if(!c(i))return;const{top:f,height:_}=c(i).getBoundingClientRect(),m=s(),g=c(r)?window.innerHeight-f-m:f+_-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var l=Fl(),d=b(l),u=b(d);Ct(u,()=>t.children),Qt(l,f=>P(i,f),()=>c(i)),L(()=>{se(l,"flip",c(r)),xn(l,"--max-height",n()?n()+"px":null)}),je(7,d,()=>En,()=>({duration:ui.current?0:100,y:10})),k(e,l),oe()}var Ul=I('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function zl(e,t){ae(t,!0);let n=U(0),i=U(null);be(ye.TitlePopoverView,t.title),Je(r);function r(){const s=t.event.target;if(!(s!=null&&s.getClientRects))return;const l=Array.from(s.getClientRects()),u=l.map(_=>_.x).map(_=>Math.abs(_-t.event.clientX)),f=l[u.indexOf(Math.min(...u))];c(i).style.top=f.top+window.scrollY+"px",c(i).style.left=f.left+window.scrollX+"px",c(i).style.height=f.height+"px"}var a=Ul(),o=b(a);Vl(o,{get maxHeight(){return c(n)},set maxHeight(s){P(n,X(s))},children:(s,l)=>{var d=K(()=>!!c(n)&&c(n)<250);Fr(s,{get title(){return t.title},small:!0,get compact(){return c(d)}})},$$slots:{default:!0}}),Qt(a,s=>P(i,s),()=>c(i)),k(e,a),oe()}var Wl=e=>e.stopPropagation(),Kl=(e,t,n,i)=>t(e,c(n).title_details,c(i)),Yl=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Zl=(e,t,n,i)=>t(c(n).title_details,i()),Gl=I('<!> <a target="_blank"> </a>',1),Xl=I(" <!>.",1),Jl=I("<!> <br>",1),Ql=I(" <br>",1),$l=I('<span class="svelte-pfvkex"><!></span>'),es=I('<p class="svelte-pfvkex"></p>');function ts(e,t){ae(t,!0);const n=N(t,"onclickmodal",3,()=>null);function i(l,d){be(ye.AfterArticlePlaylinkClick,l,{playlink:d})}function r(l,d,u){be(ye.AfterArticleModalButtonClick,d),n()(l,u)}var a=Fe(),o=ne(a);{var s=l=>{var d=es();at(d,21,()=>t.linkInjections,bt,(u,f)=>{var _=$l();const m=K(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=c(f);return{key:w,title:S,title_details:j,after_article_style:x}}),g=K(()=>{var w;return((w=c(m).title_details)==null?void 0:w.providers)||[]});var v=b(_);{var p=w=>{var S=Jl(),j=ne(S);{var x=H=>{var M=Yl(),C=ne(M);L(()=>G(C,`"${c(m).title??""}" ${ke("Is Available To Stream")??""} `));var D=E(C);D.__click=[Wl];var A=b(D);A.__click=[Kl,r,m,f];var B=b(A);L(()=>G(B,ke("View Streaming Options"))),k(H,M)},T=H=>{var M=Xl(),C=ne(M);L(()=>G(C,`"${c(m).title??""}" ${ke("Is Available To Stream On")??""} `));var D=E(C);at(D,17,()=>c(g),bt,(A,B,O)=>{let z=()=>c(B).name,F=()=>c(B).url;var V=Gl(),W=ne(V);{var J=de=>{var Ae=Be();L(()=>G(Ae,O===c(g).length-1?`, ${ke("And")}`:",")),k(de,Ae)};q(W,de=>{O&&de(J)})}var ee=E(W,2);ee.__click=[Zl,i,m,z];var re=b(ee);L(()=>{ue(ee,"href",F()),G(re,z())}),k(A,V)}),k(H,M)};q(j,H=>{c(m).after_article_style==="modal_button"?H(x):H(T,!1)})}k(w,S)},y=w=>{var S=Ql(),j=ne(S);L(()=>G(j,`"${c(m).title??""}" ${ke("Title Unavailable Suffix")??""} `)),k(w,S)};q(v,w=>{c(g).length?w(p):w(y,!1)})}L(()=>ue(_,"data-playpilot-injection-key",c(m).key)),k(u,_)}),k(l,d)};q(o,l=>{t.linkInjections.length&&l(s)})}k(e,a),oe()}fe(["click"]);function ns(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function di(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ni(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function Li(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function is(e,t,n,i){const r=ns(t),a=di(t),o=e.slice(0,i),s=e.slice(i),l=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${a.replace(l,"\\$&")}|${r.replace(l,"\\$&")}`),u=s.replace(d,n);return o+u}function rs(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Te(e){return di(e).toLowerCase().replace(/\s+/g,"")}function Vr(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),s=o+n;s>e.length&&(s=e.length,o=Math.max(0,s-n));let l=e.slice(o,s).trim();return o>0&&(l="…"+l),s<e.length&&(l+="…"),l}function as(e,t,n){const i=e.nodeType===Node.TEXT_NODE&&e.parentNode?e.parentElement:e;if(!i||!e.textContent)return{before:"",after:""};const r=i.innerText.indexOf(e.textContent),a=Oi(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),s=Oi(Di(a,2)),l=Di(o,2);return{before:s,after:l}}function Oi(e){return e.split("").reverse().join("")}function Di(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function os(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function ls(e,t,n){const i=[];let r=0;for(;r<=e.length;){const a=t?e.indexOf(t,r):r;if(a===-1&&t)break;const o=t?a+t.length:a,s=n?e.indexOf(n,o):e.length;if(n&&s===-1)break;const l=e.slice(o,s);i.push({match:l,index:o}),r=n?s+n.length:e.length+1}return i}function ss(e,t,n,i){const a=ls(e,n,i).filter(({match:s})=>di(s).includes(t));return a.length?a.reduce((s,l)=>!s||l.match.length<s.match.length?l:s):null}function cs(e){var t,n;return{leadingSpaces:((t=e.match(/^\s*/))==null?void 0:t[0].length)||0,trailingSpaces:((n=e.match(/\s*$/))==null?void 0:n[0].length)||0}}function Ur(e){return e.ctrlKey||e.metaKey||e.button!==0}function us(e,t){if(!document.startViewTransition||!t){e();return}document.startViewTransition(()=>{const n=document.querySelector("[data-view-transition-old]");if(!n)return;const i=window.getComputedStyle(n).getPropertyValue("view-transition-name");n.style.viewTransitionName="none",e();const r=document.querySelector("[data-view-transition-new]");r&&(r.style.viewTransitionName=i)})}const xt="data-playpilot-injection-key",fn=`[${xt}]`;let vn=null,ut=null,Nt=null,Lt=null;function zr(e,t=""){const n=[],i=[e];for(;i.length>0;){const r=i.pop();if(n.includes(r)||t&&r.matches(t)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|H1)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(l=>{var d;return l.nodeType===Node.TEXT_NODE&&((d=l.nodeValue)==null?void 0:d.trim())!==""});if(a&&r.tagName==="LI"){const l=r.closest("ul, ol");l&&!n.includes(l)&&n.push(l);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const s=Array.from(r.children);for(let l=s.length-1;l>=0;l--)i.push(s[l])}return n}function Vt(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function ds(e,t={aiInjections:[],manualInjections:[]}){fi();const n=ys(t);if(!n)return[];const i=Te(e.map(l=>l.innerText).join(" ")),r=ws(n),a=r.filter(l=>i.includes(Te(l.sentence))),o={};for(const l of a){const d=e.findIndex(S=>Te(S.innerText).includes(Te(l.sentence))),u=e[d];if(!u)continue;const f=Ni(l.title,u,["A"]);if(!(f!=null&&f.nodeValue)||Li(f)){const S=Ni(l.title,u);if(S&&Li(S)){o[l.key]="Given text is already inside of a link.";continue}}const{injectionElement:_,linkElement:m}=fs(l),{phrase_before:g,phrase_after:v}=l;let p=-1,y=!1;if(os(Te(u.innerText),Te(l.title))===1&&(p=u.innerHTML.indexOf(l.title)),p===-1&&(g||v)){const S=[g,l.title,v].filter(Boolean).join(" ");if(p=u.innerHTML.indexOf(S),p===-1){const j=ss(u.innerHTML,l.title,g||"",v||"");if(j){const{leadingSpaces:x,trailingSpaces:T}=cs(j.match);m.innerHTML=j.match.trim();const H=j.index+x,M=j.index+j.match.length-T;u.innerHTML=rs(u.innerHTML,_.outerHTML,H,M),p=j.index,y=!0}}}if(p===-1&&(f!=null&&f.nodeValue)){const S=u.innerHTML.indexOf(f.nodeValue),j=u.innerHTML.indexOf(l.sentence);p=Math.max(S,j,0)}p!==-1&&(y||(u.innerHTML=is(u.innerHTML,l.title,_.outerHTML,p)))}_s(r),vs();const s=ks(n);return s.length&&gs(e,s),n.filter(l=>l.title_details).map((l,d)=>{const u=l.duplicate??(!l.manual&&bs(l,d,n)),f=document.querySelector(`[${xt}="${l.key}"]`),_=Tn(l)&&!l.inactive&&!l.after_article&&!f,m=!!e.find(v=>Te(v.innerText).includes(Te(l.sentence))),g=_?o[l.key]||(m?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...l,inactive:l.inactive??!1,duplicate:u,failed:_,failed_message:g}})}function fs(e){const t=document.createElement("span");t.dataset.playpilotInjectionKey=e.key;const n=document.createElement("a");return n.innerText=e.title,n.href=e.playpilot_url,n.target="_blank",n.rel="noopener nofollow noreferrer",t.insertAdjacentElement("beforeend",n),{injectionElement:t,linkElement:n}}function vs(){const e=Array.from(document.querySelectorAll(`${fn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function _s(e){window.addEventListener("click",n=>{if(Ur(n))return;const i=n.target;if(!(i!=null&&i.parentElement))return;const r=i.parentElement.getAttribute(xt);if(!r)return;const a=e.find(o=>r===o.key);a&&(n.preventDefault(),us(()=>{_n(!1),Wr(n,a)},!ui.current&&window.innerWidth>=600&&!window.matchMedia("(pointer: coarse)").matches))}),window.addEventListener("mousemove",n=>{if(!ut)return;const i=n.target;i.hasAttribute("data-playpilot-title-popover")||i.closest("[data-playpilot-title-popover]")||i.hasAttribute(xt)||i.closest(fn)||_n()}),Array.from(document.querySelectorAll(fn)).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=e.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{ut||hs(a,r)}),n.addEventListener("mouseleave",()=>vn=null))})}function Wr(e,t){Ur(e)||Lt||(e.preventDefault(),Lt=Xt(Bl,{target:Jr(),props:{title:t.title_details,onclose:Kr}}))}function Kr(e=!0){Lt&&(bn(Lt,{outro:e}),Lt=null)}function hs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;ut&&_n();const n=e.currentTarget;vn=n,setTimeout(()=>{vn===n&&(ut=Xt(zl,{target:Jr(),props:{event:e,title:t.title_details}}))},100)}function _n(e=!0){ut&&(bn(ut,{outro:e}),vn=null,ut=null)}function gs(e,t){var o,s;if(Nt||!t.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||e[e.length-1],a=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Nt=Xt(ts,{target:n,props:{linkInjections:t,onclickmodal:(l,d)=>Wr(l,d)}})}function ms(){var e;Nt&&(bn(Nt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Nt=null)}function fi(){document.querySelectorAll(fn).forEach(t=>ps(t.getAttribute(xt)||"")),ms(),Kr(!1),_n(!1)}function ps(e){var i;const t=document.querySelector(`[${xt}="${e}"]`);if(!t)return;const n=(i=t.querySelector("a"))==null?void 0:i.innerHTML;t.outerHTML=n||""}function ys({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function Yr(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function Zr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Tn(e)}function Tn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function ws(e){return Gr(e).filter(t=>t.in_text!==!1&&Zr(t))}function ks(e){return Gr(e).filter(t=>t.after_article===!0&&Zr(t))}function Gr(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)&&Xr(n,t)))}function bs(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&Xr(i,e))}function Xr(e,t){return e.title===t.title&&Te(e.sentence)===Te(t.sentence)}function Jr(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function Qr(){const e=Vt();return{content_heading:xs(e),content_modified_time:Ss(e),content_published_time:Es(e)}}function xs(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ss(e){const t=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="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?vi(n):null}function Es(e){const t=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="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?vi(n):null}function vi(e){try{return new Date(e).toISOString()}catch{return null}}let On=null;async function $t(e,{url:t=ai(),hash:n=il(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=In(),o=Or()?await Lr():!1,s=Rr();if(!a)throw new Error("No token was provided");i.metadata=Qr(),i.run_ai&&(i.hash=n,i.page_text=e);const l=await fetch(Sn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${s}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!l.ok)throw l;return await l.json()}async function Ri(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;On&&clearTimeout(On);const s=async(l,d)=>{let u;try{if(u=await $t(e),n&&(u=await Ts(e,u)),t&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=qi(u.manual_injections||[]),u.ai_injections=qi(u.ai_injections||[]),l(u);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),l();return}u&&a(u),On=setTimeout(()=>s(l),i)}};return new Promise(s)}async function Ts(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=Qr().content_modified_time,i=t.content_modified_time?vi(t.content_modified_time):null,r=n&&i===n;return t.ai_last_run&&r?t:await $t(e,{params:{run_ai:!0}})}async function Is(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,phrase_before:s.phrase_before,phrase_after:s.phrase_after,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 $t(t,{params:{private_token:li(),manual_injections:r,content_text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function As(){const e=new Headers({"Content-Type":"application/json"}),t=In();if(!t)throw new Error("No token was provided");const n=await fetch(Sn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function qi(e){return e.map(t=>({...t,key:$r(t.sid)}))}function $r(e){return e+"-"+Dr()}function In(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Cs(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Ps=Ne('<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 js(e,t){const n=N(t,"expanded",3,!1);var i=Ps();L(()=>se(i,"expanded",n())),k(e,i)}var Ms=Ne('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ns(e){var t=Ms();k(e,t)}function Ls(e,t,n){t(!t()),n()(t())}var Os=I('<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 Wn(e,t){ae(t,!0);let n=N(t,"active",15),i=N(t,"fullwidth",3,!1),r=N(t,"label",3,""),a=N(t,"onclick",3,()=>null);var o=Os();o.__click=[Ls,n,a];var s=b(o),l=b(s);Ct(l,()=>t.children),L(()=>{ue(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),se(o,"active",n()),se(o,"fullwidth",i())}),k(e,o),oe()}fe(["click"]);var Ds=I('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function _i(e,t){let n=N(t,"value",15),i=N(t,"label",3,""),r=N(t,"name",3,""),a=N(t,"readonly",3,!1),o=N(t,"oninput",3,()=>null);var s=Ds();s.__input=function(...l){var d;(d=o())==null||d.apply(this,l)},L(()=>{ue(s,"name",r()),ue(s,"aria-label",i()),ue(s,"placeholder",i()),s.readOnly=a()}),Ho(s,n),k(e,s)}fe(["input"]);var Rs=Ne('<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>'),qs=Ne('<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>'),Hs=Ne('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Hi(e,t){const n=N(t,"align",3,"bottom");var i=Hs(),r=b(i);{var a=s=>{var l=Rs();k(s,l)},o=s=>{var l=Fe(),d=ne(l);{var u=f=>{var _=qs();k(f,_)};q(d,f=>{n()==="center"&&f(u)},!0)}k(s,l)};q(r,s=>{n()==="bottom"?s(a):s(o,!1)})}k(e,i)}var Bs=I("<div><!></div>");function _t(e,t){ae(t,!0);const n=N(t,"type",3,"error"),i=N(t,"fixed",3,!1);var r=Bs(),a=b(r);Ct(a,()=>t.children),L(()=>{No(r,`alert ${n()??""} svelte-df5n87`),se(r,"fixed",i())}),k(e,r),oe()}var Fs=I("<!> In-text Playlink",1),Vs=I("<!> Bottom Playlink",1),Us=I('<div class="alert svelte-1shw34x"><!></div>'),zs=(e,t)=>t().after_article_style="playlinks",Ws=(e,t)=>t().after_article_style="modal_button",Ks=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),Ys=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function Zs(e,t){ae(t,!0);const n=N(t,"linkInjection",7),i=K(()=>n().after_article_style==="modal_button");var r=Ys(),a=ne(r),o=b(a),s=K(()=>n().in_text??!0);Wn(o,{fullwidth:!0,get active(){return c(s)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,v)=>{var p=Fs(),y=ne(p);Hi(y,{align:"center"}),k(g,p)},$$slots:{default:!0}});var l=E(o,2),d=K(()=>n().after_article??!1);Wn(l,{fullwidth:!0,get active(){return c(d)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,v)=>{var p=Vs(),y=ne(p);Hi(y,{align:"bottom"}),k(g,p)},$$slots:{default:!0}});var u=E(a,2);{var f=g=>{var v=Us(),p=b(v);_t(p,{type:"warning",children:(y,w)=>{var S=Be("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),je(3,v,()=>Bt,()=>({duration:200})),k(g,v)};q(u,g=>{Tn(n())||g(f)})}var _=E(u,2);{var m=g=>{var v=Ks(),p=E(b(v),2),y=b(p);y.__click=[zs,n];var w=E(y,2);w.__click=[Ws,n];var S=E(w,2);L(()=>{ue(p,"aria-activedescendant",`playlinks-${(c(i)?"after-article":"in-text")??""}`),ue(y,"aria-selected",!c(i)||null),se(y,"active",!c(i)),ue(w,"aria-selected",c(i)||null),se(w,"active",c(i)),se(S,"right",c(i))}),je(3,v,()=>Bt,()=>({duration:100})),k(g,v)};q(_,g=>{n().after_article&&g(m)})}k(e,r),oe()}fe(["click"]);var Gs=Ne('<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 Xs(e){var t=Gs();k(e,t)}var Js=(e,t)=>P(t,!c(t)),Qs=I('<div class="content svelte-zpsd2z"><!></div>'),$s=I('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function ec(e,t){ae(t,!0);let n=U(!1),i=U(null);function r(u){var _;const f=u.target;f===c(i)||(_=c(i))!=null&&_.contains(f)||P(n,!1)}var a=$s();ce("click",pe,r);var o=b(a);o.__click=[Js,n];var s=b(o);Xs(s),Qt(o,u=>P(i,u),()=>c(i));var l=E(o,2);{var d=u=>{var f=Qs(),_=b(f);Ct(_,()=>t.children),je(1,f,()=>En,()=>({duration:150,y:5})),k(u,f)};q(l,u=>{c(n)&&u(d)})}L(()=>{ue(o,"aria-label",t.ariaLabel),ue(o,"aria-expanded",c(n))}),k(e,a),oe()}fe(["click"]);function tc(e,t,n,i){var r,a;c(t)&&(be(ye.ManualReport,n.linkInjection.title_details,{report_reason:c(t),sid:n.linkInjection.sid,title:n.linkInjection.title,sentence:n.linkInjection.sentence,failed:(r=n.linkInjection.failed)==null?void 0:r.toString(),failed_message:n.linkInjection.failed_message,manual:(a=n.linkInjection.manual)==null?void 0:a.toString()}),P(i,!0),setTimeout(n.onclose,3e3))}var nc=(e,t,n)=>P(t,X(n())),ic=I('<option class="svelte-o5qkco"> </option>'),rc=I('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),ac=I('<button class="submit svelte-o5qkco">Send report</button>'),oc=I('<div class="form svelte-o5qkco"><div class="heading svelte-o5qkco">Report issue</div> <div class="info svelte-o5qkco"><div><strong class="svelte-o5qkco">Title</strong> </div> <div><strong class="svelte-o5qkco">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-o5qkco"><option class="svelte-o5qkco">Select an issue...</option><!></select> <div><!></div></div>');function lc(e,t){ae(t,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=U(""),r=U(!1);Hr(e,{get onclose(){return t.onclose},children:(a,o)=>{var s=oc(),l=b(s);Jt(l,(x,T)=>xe==null?void 0:xe(x,T),()=>2);var d=E(l,2),u=b(d),f=E(b(u)),_=E(u,2),m=E(b(_));L(()=>G(m,`:
|
|
9
|
-
${Vr(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var g=E(d,4),v=b(g);v.value=((v.__value="")==null,"");var p=E(v);at(p,17,()=>n,bt,(x,T)=>{let H=()=>c(T).value,M=()=>c(T).label;var C=ic(),D={};C.__click=[nc,i,H];var A=b(C);L(()=>{D!==(D=H())&&(C.value=(C.__value=H())==null?"":H()),G(A,M())}),k(x,C)});var y=E(g,2),w=b(y);{var S=x=>{var T=rc();je(1,T,()=>Ht,()=>({duration:200})),k(x,T)},j=x=>{var T=ac();T.__click=[tc,i,t,r],L(()=>T.disabled=!c(i)),k(x,T)};q(w,x=>{c(r)?x(S):x(j,!1)})}L(()=>G(f,`: ${t.linkInjection.title??""}`)),Fo(g,()=>c(i),x=>P(i,x)),k(a,s)},$$slots:{default:!0}}),oe()}fe(["click"]);function sc(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}function cc(e,t){const n=Xt(lc,{target:document.body,props:{linkInjection:t(),onclose:()=>bn(n)}})}var uc=(e,t)=>P(t,!c(t)),dc=I('<button class="expand-sentence svelte-lo6h85"> </button>'),fc=I('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),vc=(e,t)=>P(t,!c(t)),_c=I('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),hc=I('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),gc=I('<div class="expanded svelte-lo6h85"><div class="label svelte-lo6h85">Link URL</div> <!> <div class="label offset svelte-lo6h85">Layout options</div> <div class="type-select svelte-lo6h85"><!></div></div>'),mc=I('<div class="item svelte-lo6h85"><div class="header svelte-lo6h85"><img class="poster svelte-lo6h85" alt="" width="32" height="48"> <div class="info svelte-lo6h85"><div class="title svelte-lo6h85"> </div> <div class="sentence svelte-lo6h85"><!> <!></div></div> <div class="context-menu svelte-lo6h85"><!></div></div> <div class="content svelte-lo6h85"><!> <!></div></div>');function pc(e,t){ae(t,!0);const n=N(t,"linkInjection",15),i=N(t,"onremove",3,()=>null),r=N(t,"onhighlight",3,()=>null),a=K(()=>n()||{}),o=K(()=>c(a).key),s=K(()=>c(a).sentence),l=K(()=>c(a).title_details),d=K(()=>c(a).failed),u=K(()=>c(a).failed_message),f=K(()=>c(a).inactive),_=K(()=>c(l)),m=K(()=>Vr(n().sentence,n().title,60));let g=U(!1),v=U(!1),p=U(!1),y=U(null);Je(()=>{c(d)&&be(ye.InjectionFailed,c(_),{phrase:n().title,sentence:c(s)})});function w(Q=!0){j().forEach(le=>{le.classList.toggle("playpilot-injection-highlight",Q)})}function S(Q){let te=Q.target,le=te==null?void 0:te.dataset.playpilotInjectionKey;te&&!le&&(te=te.closest(`[data-playpilot-injection-key="${c(o)}"]`),le=te==null?void 0:te.dataset.playpilotInjectionKey),P(p,le===c(o)),c(y)&&c(p)&&r()(c(y))}function j(){const Q=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${c(o)}"]`));return Q.length?Q:zr(Vt()).filter(te=>Te(te.innerText).includes(Te(n().sentence)))||[]}var x=mc();ce("mouseover",pe,S),x.__click=[sc,w,j];var T=b(x),H=b(T);L(()=>ue(H,"src",Ft(c(_).standing_poster)));var M=E(H,2),C=b(M),D=b(C),A=E(C,2),B=b(A);Io(B,()=>(c(v)?c(s):c(m)).replace(n().title,`<em>${n().title}</em>`));var O=E(B,2);{var z=Q=>{var te=dc();te.__click=[uc,v];var le=b(te);L(()=>G(le,c(v)?"Less":"More")),k(Q,te)};q(O,Q=>{c(m).length<c(s).length&&Q(z)})}var F=E(M,2),V=b(F);ec(V,{ariaLabel:"More options",children:(Q,te)=>{var le=fc(),Ce=ne(le);Ce.__click=function(...ot){var R;(R=i())==null||R.apply(this,ot)};var Qe=E(Ce,2);Qe.__click=[cc,n],k(Q,le)},$$slots:{default:!0}});var W=E(T,2),J=b(W);{var ee=Q=>{_t(Q,{children:(te,le)=>{var Ce=Be();L(()=>G(Ce,c(u))),k(te,Ce)},$$slots:{default:!0}})},re=Q=>{var te=hc(),le=b(te);le.__click=[vc,g];var Ce=b(le);js(Ce,{get expanded(){return c(g)}});var Qe=E(le,2);{var ot=ve=>{var Se=_c(),Le=b(Se);Ns(Le),je(3,Se,()=>Ht,()=>({duration:100})),k(ve,Se)};q(Qe,ve=>{Tn(n())||ve(ot)})}var R=E(Qe,2),Y=K(()=>c(f)?"Inactive":"Visible"),_e=K(()=>!n().inactive);Wn(R,{get label(){return c(Y)},get active(){return c(_e)},onclick:ve=>{n(n().inactive=!ve,!0),n(n().manual=!0,!0)},children:(ve,Se)=>{var Le=Be();L(()=>G(Le,c(f)?"Inactive":"Visible")),k(ve,Le)},$$slots:{default:!0}}),L(()=>ue(le,"aria-expanded",c(g))),k(Q,te)};q(J,Q=>{c(d)?Q(ee):Q(re,!1)})}var de=E(J,2);{var Ae=Q=>{var te=gc(),le=E(b(te),2);_i(le,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ot){n(n().playpilot_url=ot,!0)}});var Ce=E(le,4),Qe=b(Ce);Zs(Qe,{get linkInjection(){return n()}}),je(3,te,()=>Bt,()=>({duration:100})),k(Q,te)};q(de,Q=>{c(g)&&Q(Ae)})}Qt(x,Q=>P(y,Q),()=>c(y)),L(()=>{se(x,"highlighted",c(p)),se(x,"inactive",c(f)),G(D,c(_).title)}),ce("mouseenter",x,()=>w(!0)),ce("mouseleave",x,()=>w(!1)),ce("error",H,({target:Q})=>Q.src=jr),je(6,x,()=>Bt,()=>({duration:200})),k(e,x),oe()}fe(["click"]);var yc=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function wc(e,t){ae(t,!0);let n=N(t,"element",7),i=N(t,"position",23,()=>({x:0,y:0})),r=N(t,"limit",19,()=>({x:0,y:0})),a=N(t,"onchange",3,()=>null),o=!1,s={x:0,y:0},l=i();Je(()=>{d(i().x,i().y)});function d(v,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;v=Math.min(Math.max(v,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=v+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:v,y:p}),a()(i())}function u(v){var p,y;return{x:v.pageX||((p=v.touches)==null?void 0:p[0].pageX)||0,y:v.pageY||((y=v.touches)==null?void 0:y[0].pageY)||0}}function f(v){o=!0,s=u(v),l=i()}function _(v){if(!o)return;const p=u(v),y=p.x-s.x,w=p.y-s.y,S=l.x-y,j=l.y-w;d(S,j)}function m(){o&&(o=!1)}var g=yc();ce("mousemove",pe,_),ce("touchmove",pe,_,void 0,!0),ce("mouseup",pe,m),ce("touchend",pe,m),ce("resize",pe,()=>d(i().x,i().y)),g.__mousedown=f,g.__touchstart=f,k(e,g),oe()}fe(["mousedown","touchstart"]);var kc=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function bc(e,t){ae(t,!0);let n=N(t,"element",7),i=N(t,"height",7,200),r=N(t,"onchange",3,()=>null);const a=16;let o=!1,s=0,l=i();Je(()=>{i()&&d(i())});function d(v){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(v,m()));n().style.height=`${y}px`,i(y),r()(y)}function u(v){var p,y;o=!0,s=v.pageY||((y=(p=v.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,l=n().clientHeight}function f(v){var S,j;if(!o)return;const p=v.pageY||((j=(S=v.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=s-p,w=l+y;d(w)}function _(){o=!1}function m(){const v=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-v,0)}var g=kc();ce("mousemove",pe,f),ce("touchmove",pe,f,void 0,!0),ce("mouseup",pe,_),ce("touchend",pe,_),ce("resize",pe,()=>{i()&&d(i())}),g.__mousedown=u,g.__touchstart=u,k(e,g),oe()}fe(["mousedown","touchstart"]);var xc=Ne('<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 Sc(e){var t=xc();k(e,t)}async function Ec(e){const t=new Headers({"Content-Type":"application/json"}),n=In();if(!n)throw new Error("No token was provided");const i=await fetch(Sn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Tc=Ne('<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 Ic(e){var t=Tc();k(e,t)}var Ac=I("<div> </div>"),Cc=e=>e.stopImmediatePropagation(),Pc=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function Bi(e,t){ae(t,!0);const n=N(t,"hoverable",3,!0),i=N(t,"onclick",3,()=>null);var r=Pc();r.__click=function(...x){var T;(T=i())==null||T.apply(this,x)};var a=b(r);L(()=>ue(a,"src",Ft(t.title.standing_poster)));var o=E(a,2),s=b(o),l=b(s),d=E(s,2),u=b(d),f=b(u);Br(f);var _=E(f),m=E(u,2),g=b(m),v=E(m,2),p=b(v),y=E(v,2);{var w=x=>{var T=Ac(),H=b(T);L(()=>G(H,`${t.title.length??""} min`)),k(x,T)};q(y,x=>{t.title.length&&x(w)})}var S=E(o,2);S.__click=[Cc];var j=b(S);Ic(j),L(()=>{se(r,"hoverable",n()),G(l,t.title.title),G(_,` ${t.title.imdb_score??""}`),G(g,t.title.year),G(p,t.title.type),ue(S,"href",`${Pr}/${t.title.type??""}/${t.title.slug??""}`)}),ce("error",a,({target:x})=>x.src=jr),k(e,r),oe()}fe(["click"]);var jc=I('<em class="empty svelte-1olb8n0">No results found</em>'),Mc=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Nc=I('<div class="selected svelte-1olb8n0"><!></div>'),Lc=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Oc(e,t){ae(t,!0);let n=N(t,"onselect",3,()=>null),i=N(t,"query",15),r=U(X([])),a=U(null),o=U(!1);pn(()=>{i()&&s(i())});async function s(v){P(o,!0);try{P(r,X(await Ec(v)))}finally{P(o,!1)}}function l(v){i(v.title),P(a,X(v)),n()(v)}var d=Lc(),u=b(d);_i(u,{oninput:()=>P(a,null),name:"search",label:"Search...",get value(){return i()},set value(v){i(v)}});var f=E(u,2);{var _=v=>{var p=Mc();at(p,21,()=>c(r),y=>y.sid,(y,w)=>{Bi(y,{get title(){return c(w)},onclick:()=>l(c(w))})},y=>{var w=Fe(),S=ne(w);{var j=x=>{var T=jc();k(x,T)};q(S,x=>{c(o)||x(j)})}k(y,w)}),k(v,p)};q(f,v=>{i()&&!c(a)&&v(_)})}var m=E(f,2);{var g=v=>{var p=Nc(),y=b(p);Bi(y,{get title(){return c(a)},hoverable:!1}),k(v,p)};q(m,v=>{c(a)&&v(g)})}k(e,d),oe()}function Dc(e,t=e.anchorNode){if(!e.anchorNode||!t)return{start:-1,end:-1};const n=e.toString().trim(),i=e.toString().search(/\S/);if(e.anchorNode===t&&t.nodeType===Node.TEXT_NODE){const d=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:d,end:d+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const s=a.toString().length+i,l=s+n.length;return{start:s,end:l}}function Rc(e,t,n,i,r,a,o,s){if(!c(t)||!c(n))return;const l=c(n).type==="movie"?"movie":"show",d=Pr+`/${l}/${c(n).slug}`,u={sid:c(n).sid,title:c(t),sentence:c(i),phrase_before:c(r),phrase_after:c(a),playpilot_url:d,key:$r(c(n).sid),title_details:c(n),manual:!0};o.onsave(u),s()()}var qc=I('<div class="error svelte-1i8p6op"><!></div>'),Hc=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Bc=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Fc(e,t){ae(t,!0);const n=N(t,"pageText",3,""),i=N(t,"onclose",3,()=>null);let r=U(""),a=U(""),o=U(null),s=U(""),l=U(""),d=U(""),u=U("");Je(f);function f(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!Vt().contains(C.anchorNode.parentElement))return;const D=C.toString().trim();if(!D)return;P(d,""),P(r,X(D));const A=C.getRangeAt(0).cloneContents();if(Array.from(A.childNodes).filter(ee=>{var re;return(re=ee.textContent)==null?void 0:re.trim()}).find(ee=>{var re;return ee.nodeName==="A"||((re=ee.querySelector)==null?void 0:re.call(ee,"a"))})){P(d,"Selection is or contains a link. Injections can not be created around already existing links.");return}P(u,X(c(r)));const{node:O,sentence:z}=_(C,D);if(!O)return;P(a,X(z));const{start:F,end:V}=Dc(C,O);(ee=>(P(l,X(ee.before)),P(s,X(ee.after))))(as(O,F,V)),z.includes(c(l))||P(l,""),z.includes(c(s))||P(s,"");const W=C.getRangeAt(0).commonAncestorContainer.textContent,J=Te(n());(!W||!J.includes(Te(W)))&&P(d,"Selection was not inside of given content")}function _(C,D){const A=C.getRangeAt(0),B=Vt();let O=A.startContainer;for(;(O.textContent||"").length<=D.length*3&&O.parentNode&&O.parentNode.textContent!==B.textContent;)O=O.parentNode;if(!O||!O.textContent)return{node:null,sentence:""};const z=O.textContent,F=m(O,A.startContainer,A.startOffset),V=m(O,A.endContainer,A.endOffset),W=z.slice(0,F).lastIndexOf("."),J=z.slice(V).match(/[.!?]/),ee=J?V+J.index:z.length,re=W===-1?0:W+1,de=ee,Ae=z.slice(re,de+1).trim();return{node:O,sentence:Ae}}function m(C,D,A){let B=0;const O=C,z=F=>{var V;if(F===D)return B+=A,!0;F.nodeType===Node.TEXT_NODE&&(B+=((V=F.textContent)==null?void 0:V.length)||0);for(let W=F.firstChild;W;W=W.nextSibling)if(z(W))return!0;return!1};return z(O),B}function g(C){var D,A;P(o,X(C)),(A=(D=window.getSelection())==null?void 0:D.removeAllRanges)==null||A.call(D)}var v=Bc();ce("mouseup",pe,f);var p=b(v),y=b(p);ci(y,{get onclick(){return i()},size:"24px",children:(C,D)=>{Sc(C)},$$slots:{default:!0}});var w=E(y,2);Jt(w,(C,D)=>xe==null?void 0:xe(C,D),()=>2);var S=E(p,6);_i(S,{get value(){return c(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var j=E(S,2);{var x=C=>{var D=qc(),A=b(D);_t(A,{children:(B,O)=>{var z=Be();L(()=>G(z,c(d))),k(B,z)},$$slots:{default:!0}}),k(C,D)};q(j,C=>{c(d)&&C(x)})}var T=E(j,2);{var H=C=>{var D=Hc(),A=E(ne(D),2);Er(A,()=>c(a)+c(r),B=>{Oc(B,{onselect:g,get query(){return c(u)},set query(O){P(u,X(O))}})}),k(C,D)};q(T,C=>{c(d)||C(H)})}var M=E(T,2);M.__click=[Rc,r,o,a,l,s,t,i],L(()=>M.disabled=!c(r)||!c(o)),k(e,v),oe()}fe(["click"]);const Kn="PlayPilotEditorialSessionId",ea=5e3,Vc=ea*2;async function Uc(e){const{ai_enabled:t,injections_enabled:n,session_id:i,session_last_ping:r}=await $t(e),a=na(i||null,r||null),o={ai_enabled:t,injections_enabled:n,session_id:i,session_last_ping:r};return a?await ta(e):o}async function ta(e){const t=ia(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a}=await $t(e,{params:i});return{ai_enabled:r,injections_enabled:a,...i}}function na(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=ia();return n-i.getTime()>Vc?!0:r===e}function ia(){return sessionStorage.getItem(Kn)||zc()}function zc(){const e=sessionStorage.getItem(Kn)||Dr();return sessionStorage.setItem(Kn,e),e}function Wc(e,t,n){ta(t()),n()()}var Kc=I('<p class="svelte-2m2urs"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-2m2urs">Take over editing</button>',1),Yc=I('<div class="alert svelte-2m2urs"><!></div>');function Zc(e,t){ae(t,!0);const n=N(t,"pageText",3,""),i=N(t,"onpoll",3,()=>null),r=N(t,"onallow",3,()=>null),a=N(t,"ondisallow",3,()=>null),o=N(t,"ontakeover",3,()=>null);let s=null,l=U(!0);Je(()=>(d(),()=>{s&&clearInterval(s)}));function d(){u(),s=setInterval(u,ea)}async function u(){const g=await Uc(n());g&&(P(l,X(na(g.session_id||null,g.session_last_ping||null))),c(l)?r()():a()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}var f=Fe(),_=ne(f);{var m=g=>{var v=Yc(),p=b(v);_t(p,{type:"warning",children:(y,w)=>{var S=Kc(),j=E(ne(S),2);j.__click=[Wc,n,o],k(y,S)},$$slots:{default:!0}}),k(g,v)};q(_,g=>{c(l)||g(m)})}k(e,f),oe()}fe(["click"]);var Gc=Ne('<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 Xc(e){var t=Gc();k(e,t)}var Jc=I('<strong class="svelte-1kpafo0">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1kpafo0">Partner Portal</a>',1),Qc=I('<span class="svelte-1kpafo0">.</span>'),$c=I(`<strong class="svelte-1kpafo0">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1kpafo0"> <span class="ellipses svelte-1kpafo0"></span></div> <div class="loading-bar svelte-1kpafo0"><div class="loading-bar-progress svelte-1kpafo0"><div class="loading-bar-fill svelte-1kpafo0" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1kpafo0"> </div></div>`,1),eu=(e,t)=>P(t,!0),tu=I('<p class="svelte-1kpafo0"><strong class="svelte-1kpafo0">AI has finished processing.</strong> <br class="svelte-1kpafo0"> <!></p> <button class="dismiss svelte-1kpafo0">Dismiss</button>',1),nu=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),iu=I('<div class="ai-indicator svelte-1kpafo0" data-testid="ai-indicator"><div class="content svelte-1kpafo0"><div class="icon svelte-1kpafo0"><!></div> <div class="svelte-1kpafo0"><!></div></div> <div class="border svelte-1kpafo0"><!></div></div>');function ru(e,t){const n=N(t,"aiRunning",3,!1),i=N(t,"aiEnabled",3,!1),r=N(t,"message",3,""),a=N(t,"percentage",3,0),o=N(t,"aiInjectionsCount",3,0),s=o();let l=U(!1);var d=Fe(),u=ne(d);{var f=_=>{var m=iu(),g=b(m),v=b(g),p=b(v);Xc(p);var y=E(v,2),w=b(y);{var S=M=>{var C=Jc();k(M,C)},j=M=>{var C=Fe(),D=ne(C);{var A=O=>{var z=$c(),F=E(ne(z),2),V=b(F),W=E(V);at(W,20,()=>({length:3}),bt,(te,le)=>{var Ce=Qc();k(te,Ce)});var J=E(F,2),ee=b(J),re=b(ee);const de=K(()=>`${Math.max(a(),3)??""}%`);L(()=>xn(re,"width",c(de)));var Ae=E(ee,2),Q=b(Ae);L(()=>G(Q,`${Math.floor(a())??""}%`)),L(()=>G(V,`${r()??""} `)),k(O,z)},B=O=>{var z=tu(),F=ne(z),V=E(b(F),4);{var W=re=>{var de=Be("No new injections where found.");k(re,de)},J=re=>{var de=Be();L(()=>G(de,`${o()??""} Injections where found and added to the page.`)),k(re,de)};q(V,re=>{s===o()?re(W):re(J,!1)})}var ee=E(F,2);ee.__click=[eu,l],k(O,z)};q(D,O=>{n()?O(A):O(B,!1)},!0)}k(M,C)};q(w,M=>{i()?M(j,!1):M(S)})}var x=E(g,2),T=b(x);{var H=M=>{var C=nu();k(M,C)};q(T,M=>{n()&&M(H)})}L(()=>se(m,"running",n())),k(_,m)};q(u,_=>{c(l)||_(f)})}k(e,d)}fe(["click"]);async function au(e,t,n,i,r,a,o){try{P(t,!0),P(n,!1),i(await Is(i(),r())),P(a,X(c(o)))}catch{P(n,!0)}finally{P(t,!1)}}var ou=I('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),lu=I('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),su=I('<div class="loading svelte-11aj6xq">Loading...</div>'),cu=I('<div class="bubble svelte-11aj6xq"> </div> <!>',1),uu=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
10
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),du=I('<div class="alert svelte-11aj6xq"><!></div>'),fu=I('<div class="error svelte-11aj6xq"><!></div>'),vu=I('<div class="empty svelte-11aj6xq">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),_u=I('<button class="save svelte-11aj6xq"> </button>'),hu=I('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),gu=I("<!> <!> <!>",1),mu=I('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),pu=I('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function yu(e,t){ae(t,!0);let n=N(t,"linkInjections",15),i=N(t,"pageText",3,""),r=N(t,"loading",3,!1),a=N(t,"injectionsEnabled",7,!1),o=N(t,"aiStatus",23,()=>({})),s=N(t,"onreinitialize",3,()=>null);const l="editor-position",d="editor-height",u=JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(d)||"0");let _=U(null),m=U(!1),g=U(!1),v=U(!1),p=U(!0),y=U(0),w=U("");const S=K(()=>
|
|
8
|
+
`}}Ta();var ll=Ne('<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 qr(e){var t=ll();k(e,t)}function ci(e,t){ae(t,!0);const n=N(t,"size",3,"margin(2)"),i=N(t,"onclick",3,()=>null),r=Wo(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=Fe(),o=ne(a);Ao(o,()=>t.href?"a":"button",!1,(s,l)=>{let d;L(()=>{d=Mo(s,d,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",s.namespaceURI===Gi,s.nodeName.includes("-")),xn(s,"--size",n())});var u=Fe(),f=ne(u);Ct(f,()=>t.children??st),k(l,u)}),k(e,a),oe()}function sl(e){P(e,e.v+1)}function cl(e){let t=0,n=Ee(0),i;return()=>{Ya()&&(c(n),yn(()=>(t===0&&(i=Ke(()=>e(()=>sl(n)))),t+=1,()=>{Bn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var zt,Wt;class ul{constructor(t,n){Pn(this,zt);Pn(this,Wt);jn(this,zt,t),jn(this,Wt,cl(n))}get current(){return Cn(this,Wt).call(this),Cn(this,zt).call(this)}}zt=new WeakMap,Wt=new WeakMap;const dl=/\(.+\)/;class fl extends ul{constructor(t,n){let i=dl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>wo(r,"change",a))}}const ui=new fl("(prefers-reduced-motion: reduce)");var vl=(e,t)=>t()(),_l=I('<div class="modal svelte-aqwna4"><div class="dialog svelte-aqwna4" role="dialog" aria-labelledby="title" data-view-transition-new=""><div class="close svelte-aqwna4"><!></div> <!></div> <div class="backdrop svelte-aqwna4"></div></div>');function Hr(e,t){ae(t,!0);const n=N(t,"onclose",3,()=>null),i=N(t,"onscroll",3,()=>null);wr("scope","modal"),Je(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return ui.current?Bt(f,{duration:0}):window.innerWidth<600?En(f,{duration:250,y:window.innerHeight}):ol(f,{duration:150,start:.85})}var a=_l();ce("keydown",pe,({key:f})=>{f==="Escape"&&n()()});var o=b(a),s=b(o),l=b(s);ci(l,{onclick:()=>n()(),children:(f,_)=>{qr(f)},$$slots:{default:!0}});var d=E(s,2);Ct(d,()=>t.children);var u=E(o,2);u.__click=[vl,n],ce("scroll",o,function(...f){var _;(_=i())==null||_.apply(this,f)}),je(7,o,()=>r),je(7,a,()=>Bt,()=>({duration:150})),k(e,a),oe()}fe(["click"]);const hl=[{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 gl=I('<div class="genre svelte-1ebula3"> </div>'),ml=(e,t)=>P(t,!0),pl=I('<button class="genre expand svelte-1ebula3"> </button>'),yl=I("<!> <!>",1);function wl(e,t){ae(t,!0);let n=U(!1);const i=K(()=>c(n)?t.genres:[t.genres[0]]);var r=yl(),a=ne(r);at(a,17,()=>c(i),xt,(l,d)=>{var u=Fe();const f=K(()=>{var g;return(g=hl.find(v=>v.slug===c(d)))==null?void 0:g.name});var _=ne(u);{var m=g=>{var v=gl(),p=b(v);L(()=>G(p,ke(c(f)))),k(g,v)};q(_,g=>{c(f)&&g(m)})}k(l,u)});var o=E(a,2);{var s=l=>{var d=pl();d.__click=[ml,n];var u=b(d);L(()=>G(u,`+${t.genres.length-1}`)),k(l,d)};q(o,l=>{!c(n)&&t.genres.length>1&&l(s)})}k(e,r),oe()}fe(["click"]);function kl(e){let t=[];for(const n of e){let i=n;const r=t.find(s=>s.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(s=>s.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function xe(e,t=1){e.role="heading",e.ariaLevel=t.toString()}var bl=Ne('<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 xl(e){var t=bl();k(e,t)}function Vt(e){return e?e.replace("/src/img",""):null}var Sl=(e,t,n)=>t(n()),El=I('<div class="arrow svelte-g63n1y"><!></div>'),Tl=I('<a target="_blank" class="playlink svelte-g63n1y" rel="sponsored"><img alt="" height="32" width="32" class="svelte-g63n1y"> <div><span class="name svelte-g63n1y"> </span> <div class="category svelte-g63n1y"> </div></div> <!></a>'),Il=I('<div class="playlink empty svelte-g63n1y"> </div>'),Al=I('<div class="heading svelte-g63n1y"> </div> <div class="playlinks svelte-g63n1y"><!> <!></div>',1);function Cl(e,t){ae(t,!0);const n=N(t,"list",3,!1),i=lo("scope")==="modal",r=K(()=>t.playlinks.filter(v=>!!v.logo_url)),a=K(()=>kl(c(r))),o={SVOD:ke("Stream"),BUY:ke("Buy"),RENT:ke("Rent"),TVOD:ke("Rent Or Buy")};function s(v){be(i?ye.TitleModalPlaylinkClick:ye.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var l=Al(),d=ne(l),u=b(d);L(()=>G(u,ke("Where To Stream Online"))),Qt(d,(v,p)=>xe==null?void 0:xe(v,p),()=>3);var f=E(d,2),_=b(f);at(_,17,()=>c(a),xt,(v,p)=>{let y=()=>c(p).name,w=()=>c(p).url,S=()=>c(p).logo_url,j=()=>c(p).highlighted,x=()=>c(p).cta_text,T=()=>c(p).extra_info.category;var H=Tl();H.__click=[Sl,s,y];var M=b(H);L(()=>ue(M,"src",Vt(S())));var C=E(M,2),D=b(C),A=b(D),B=E(D,2),O=b(B);L(()=>G(O,x()||o[T()]||ke("Stream")));var z=E(C,2);{var F=V=>{var W=El(),J=b(W);xl(J),k(V,W)};q(z,V=>{n()&&V(F)})}L(()=>{ue(H,"href",w()),ue(H,"data-playlink",y()),se(H,"highlighted",j()&&x()),G(A,y())}),k(v,H)});var m=E(_,2);{var g=v=>{var p=Il(),y=b(p);L(()=>G(y,ke("Title Unavailable"))),k(v,p)};q(m,v=>{t.playlinks.length||v(g)})}L(()=>se(f,"list",n())),k(e,l),oe()}fe(["click"]);var Pl=(e,t)=>P(t,!0),jl=I('<button class="show-more svelte-1u3je71">Show more</button>'),Ml=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Nl=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Ll(e,t){ae(t,!0);const n=N(t,"blurb",3,""),i=N(t,"limit",3,200);let r=U(!1);const a=K(()=>t.text.slice(0,i()));var o=Nl(),s=b(o),l=b(s),d=E(l);{var u=v=>{var p=Be("...");k(v,p)};q(d,v=>{!c(r)&&t.text.length>i()&&v(u)})}var f=E(d,2);{var _=v=>{var p=jl();p.__click=[Pl,r],k(v,p)};q(f,v=>{!c(r)&&(t.text.length>i()||n())&&v(_)})}var m=E(s,2);{var g=v=>{var p=Ml(),y=b(p);L(()=>G(y,n())),k(v,p)};q(m,v=>{c(r)&&v(g)})}L(()=>G(l,c(r)?t.text:c(a))),k(e,o),oe()}fe(["click"]);var Ol=Ne('<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 Br(e){var t=Ol();k(e,t)}var Dl=I('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),Rl=I("<div> </div>"),ql=I('<img alt="" class="svelte-1026zg0">'),Hl=I('<div class="content svelte-1026zg0" data-playpilot-link-injections-title=""><div class="header svelte-1026zg0"><!> <div class="heading svelte-1026zg0" id="title"> </div> <div class="info svelte-1026zg0"><div class="imdb svelte-1026zg0"><!> </div> <!> <div> </div> <div class="capitalize svelte-1026zg0"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-1026zg0"><!></div>',1);function Fr(e,t){ae(t,!0);const n=N(t,"small",3,!1),i=N(t,"compact",3,!1);let r=U(!1),a=U(!1),o=U(!1);var s=Hl(),l=ne(s),d=b(l),u=b(d);{var f=F=>{var V=Dl(),W=b(V);L(()=>ue(W,"src",Vt(t.title.standing_poster))),L(()=>{ue(W,"alt",`Movie poster for '${t.title.title??""}'`),se(W,"loaded",c(r))}),ce("load",W,()=>P(r,!0)),k(F,V)};q(u,F=>{i()||F(f)})}var _=E(u,2),m=b(_);Qt(_,(F,V)=>xe==null?void 0:xe(F,V),()=>2);var g=E(_,2),v=b(g),p=b(v);Br(p);var y=E(p),w=E(v,2);wl(w,{get genres(){return t.title.genres}});var S=E(w,2),j=b(S),x=E(S,2),T=b(x);L(()=>G(T,ke(`Type: ${t.title.type}`)));var H=E(x,2);{var M=F=>{var V=Rl(),W=b(V);L(()=>G(W,`${t.title.length??""} ${ke("Minutes")??""}`)),k(F,V)};q(H,F=>{!n()&&t.title.length&&F(M)})}var C=E(d,2),D=b(C);Cl(D,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var A=E(D,2);{var B=F=>{Ll(F,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};q(A,F=>{n()||F(B)})}var O=E(l,2),z=b(O);Er(z,()=>c(o),F=>{var V=ql();L(()=>ue(V,"src",Vt(c(o)?t.title.standing_poster:t.title.medium_poster))),L(()=>{se(V,"loaded",c(a)),se(V,"blur",c(o))}),ce("load",V,()=>P(a,!0)),ce("error",V,()=>P(o,!0)),k(F,V)}),L(()=>{se(l,"small",n()),se(l,"compact",i()),se(_,"truncate",n()),G(m,t.title.title),G(y,` ${t.title.imdb_score??""}`),G(j,t.title.year),se(O,"faded",i())}),k(e,s),oe()}function Bl(e,t){ae(t,!0),be(ye.TitleModalView,t.title);let n=!1;function i(){n||(be(ye.TitleModalScroll,t.title),n=!0)}Hr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{Fr(r,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var Fl=I('<div class="popover svelte-tb2xdq" tabindex="-1" aria-hidden="true"><div class="dialog svelte-tb2xdq" data-view-transition-old=""><!></div></div>');function Vl(e,t){ae(t,!0);let n=N(t,"maxHeight",15);wr("scope","popover");let i=U(null),r=U(!1);Je(async()=>{await Bn(),a(),await Bn(),o()});function a(){if(!c(i))return;const{top:f,right:_,bottom:m,height:g}=c(i).getBoundingClientRect(),v=s();P(r,X(f-v<0&&window.innerHeight-m>f+g));const p=window.innerWidth-_-v;_+v>window.innerWidth&&(c(i).style.left=`${p}px`)}function o(){if(!c(i))return;const{top:f,height:_}=c(i).getBoundingClientRect(),m=s(),g=c(r)?window.innerHeight-f-m:f+_-m;n(Math.min(g,window.innerHeight*.8))}function s(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var l=Fl(),d=b(l),u=b(d);Ct(u,()=>t.children),$t(l,f=>P(i,f),()=>c(i)),L(()=>{se(l,"flip",c(r)),xn(l,"--max-height",n()?n()+"px":null)}),je(7,d,()=>En,()=>({duration:ui.current?0:100,y:10})),k(e,l),oe()}var Ul=I('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function zl(e,t){ae(t,!0);let n=U(0),i=U(null);be(ye.TitlePopoverView,t.title),Je(r);function r(){const s=t.event.target;if(!(s!=null&&s.getClientRects))return;const l=Array.from(s.getClientRects()),u=l.map(_=>_.x).map(_=>Math.abs(_-t.event.clientX)),f=l[u.indexOf(Math.min(...u))];c(i).style.top=f.top+window.scrollY+"px",c(i).style.left=f.left+window.scrollX+"px",c(i).style.height=f.height+"px"}var a=Ul(),o=b(a);Vl(o,{get maxHeight(){return c(n)},set maxHeight(s){P(n,X(s))},children:(s,l)=>{var d=K(()=>!!c(n)&&c(n)<250);Fr(s,{get title(){return t.title},small:!0,get compact(){return c(d)}})},$$slots:{default:!0}}),$t(a,s=>P(i,s),()=>c(i)),k(e,a),oe()}var Wl=e=>e.stopPropagation(),Kl=(e,t,n,i)=>t(e,c(n).title_details,c(i)),Yl=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Zl=(e,t,n,i)=>t(c(n).title_details,i()),Gl=I('<!> <a target="_blank"> </a>',1),Xl=I(" <!>.",1),Jl=I("<!> <br>",1),Ql=I(" <br>",1),$l=I('<span class="svelte-pfvkex"><!></span>'),es=I('<p class="svelte-pfvkex"></p>');function ts(e,t){ae(t,!0);const n=N(t,"onclickmodal",3,()=>null);function i(l,d){be(ye.AfterArticlePlaylinkClick,l,{playlink:d})}function r(l,d,u){be(ye.AfterArticleModalButtonClick,d),n()(l,u)}var a=Fe(),o=ne(a);{var s=l=>{var d=es();at(d,21,()=>t.linkInjections,xt,(u,f)=>{var _=$l();const m=K(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=c(f);return{key:w,title:S,title_details:j,after_article_style:x}}),g=K(()=>{var w;return((w=c(m).title_details)==null?void 0:w.providers)||[]});var v=b(_);{var p=w=>{var S=Jl(),j=ne(S);{var x=H=>{var M=Yl(),C=ne(M);L(()=>G(C,`"${c(m).title??""}" ${ke("Is Available To Stream")??""} `));var D=E(C);D.__click=[Wl];var A=b(D);A.__click=[Kl,r,m,f];var B=b(A);L(()=>G(B,ke("View Streaming Options"))),k(H,M)},T=H=>{var M=Xl(),C=ne(M);L(()=>G(C,`"${c(m).title??""}" ${ke("Is Available To Stream On")??""} `));var D=E(C);at(D,17,()=>c(g),xt,(A,B,O)=>{let z=()=>c(B).name,F=()=>c(B).url;var V=Gl(),W=ne(V);{var J=de=>{var Ae=Be();L(()=>G(Ae,O===c(g).length-1?`, ${ke("And")}`:",")),k(de,Ae)};q(W,de=>{O&&de(J)})}var ee=E(W,2);ee.__click=[Zl,i,m,z];var re=b(ee);L(()=>{ue(ee,"href",F()),G(re,z())}),k(A,V)}),k(H,M)};q(j,H=>{c(m).after_article_style==="modal_button"?H(x):H(T,!1)})}k(w,S)},y=w=>{var S=Ql(),j=ne(S);L(()=>G(j,`"${c(m).title??""}" ${ke("Title Unavailable Suffix")??""} `)),k(w,S)};q(v,w=>{c(g).length?w(p):w(y,!1)})}L(()=>ue(_,"data-playpilot-injection-key",c(m).key)),k(u,_)}),k(l,d)};q(o,l=>{t.linkInjections.length&&l(s)})}k(e,a),oe()}fe(["click"]);function ns(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function di(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ni(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function Li(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function is(e,t,n,i){const r=ns(t),a=di(t),o=e.slice(0,i),s=e.slice(i),l=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${a.replace(l,"\\$&")}|${r.replace(l,"\\$&")}`),u=s.replace(d,n);return o+u}function rs(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Te(e){return di(e).toLowerCase().replace(/\s+/g,"")}function Vr(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),s=o+n;s>e.length&&(s=e.length,o=Math.max(0,s-n));let l=e.slice(o,s).trim();return o>0&&(l="…"+l),s<e.length&&(l+="…"),l}function as(e,t,n){const i=e.nodeType===Node.TEXT_NODE&&e.parentNode?e.parentElement:e;if(!i||!e.textContent)return{before:"",after:""};const r=i.innerText.indexOf(e.textContent),a=Oi(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),s=Oi(Di(a,2)),l=Di(o,2);return{before:s,after:l}}function Oi(e){return e.split("").reverse().join("")}function Di(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function os(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function ls(e,t,n){const i=[];let r=0;for(;r<=e.length;){const a=t?e.indexOf(t,r):r;if(a===-1&&t)break;const o=t?a+t.length:a,s=n?e.indexOf(n,o):e.length;if(n&&s===-1)break;const l=e.slice(o,s);i.push({match:l,index:o}),r=n?s+n.length:e.length+1}return i}function ss(e,t,n,i){const a=ls(e,n,i).filter(({match:s})=>di(s).includes(t));return a.length?a.reduce((s,l)=>!s||l.match.length<s.match.length?l:s):null}function cs(e){var t,n;return{leadingSpaces:((t=e.match(/^\s*/))==null?void 0:t[0].length)||0,trailingSpaces:((n=e.match(/\s*$/))==null?void 0:n[0].length)||0}}function Ur(e){return e.ctrlKey||e.metaKey||e.button!==0}function us(e,t){if(!document.startViewTransition||!t){e();return}document.startViewTransition(()=>{const n=document.querySelector("[data-view-transition-old]");if(!n)return;const i=window.getComputedStyle(n).getPropertyValue("view-transition-name");n.style.viewTransitionName="none",e();const r=document.querySelector("[data-view-transition-new]");r&&(r.style.viewTransitionName=i)})}const ut="data-playpilot-injection-key",Nt=`[${ut}]`;let vn=null,dt=null,Lt=null,Ot=null;function zr(e,t=""){const n=[],i=[e];for(;i.length>0;){const r=i.pop();if(n.includes(r)||t&&r.matches(t)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|H1)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(l=>{var d;return l.nodeType===Node.TEXT_NODE&&((d=l.nodeValue)==null?void 0:d.trim())!==""});if(a&&r.tagName==="LI"){const l=r.closest("ul, ol");l&&!n.includes(l)&&n.push(l);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const s=Array.from(r.children);for(let l=s.length-1;l>=0;l--)i.push(s[l])}return n}function Ut(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function ds(e,t={aiInjections:[],manualInjections:[]}){fi();const n=ys(t);if(!n)return[];const i=Te(e.map(l=>l.innerText).join(" ")),r=ws(n),a=r.filter(l=>i.includes(Te(l.sentence))),o={};for(const l of a){const d=e.findIndex(S=>Te(S.innerText).includes(Te(l.sentence))),u=e[d];if(!u)continue;const f=Ni(l.title,u,["A"]);if(!(f!=null&&f.nodeValue)||Li(f)){const S=Ni(l.title,u);if(S&&Li(S)){o[l.key]="Given text is already inside of a link.";continue}}const{injectionElement:_,linkElement:m}=fs(l),{phrase_before:g,phrase_after:v}=l;let p=-1,y=!1;if(os(Te(u.innerText),Te(l.title))===1&&(p=u.innerHTML.indexOf(l.title)),p===-1&&(g||v)){const S=[g,l.title,v].filter(Boolean).join(" ");if(p=u.innerHTML.indexOf(S),p===-1){const j=ss(u.innerHTML,l.title,g||"",v||"");if(j){const{leadingSpaces:x,trailingSpaces:T}=cs(j.match);m.innerHTML=j.match.trim();const H=j.index+x,M=j.index+j.match.length-T;u.innerHTML=rs(u.innerHTML,_.outerHTML,H,M),p=j.index,y=!0}}}if(p===-1&&(f!=null&&f.nodeValue)){const S=u.innerHTML.indexOf(f.nodeValue),j=u.innerHTML.indexOf(l.sentence);p=Math.max(S,j,0)}p!==-1&&(y||(u.innerHTML=is(u.innerHTML,l.title,_.outerHTML,p)))}_s(r),vs();const s=ks(n);return s.length&&gs(e,s),n.filter(l=>l.title_details).map((l,d)=>{const u=l.duplicate??(!l.manual&&bs(l,d,n)),f=document.querySelector(`[${ut}="${l.key}"]`),_=Tn(l)&&!l.inactive&&!l.after_article&&!f,m=!!e.find(v=>Te(v.innerText).includes(Te(l.sentence))),g=_?o[l.key]||(m?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...l,inactive:l.inactive??!1,duplicate:u,failed:_,failed_message:g}})}function fs(e){const t=document.createElement("span");t.dataset.playpilotInjectionKey=e.key;const n=document.createElement("a");return n.innerText=e.title,n.href=e.playpilot_url,n.target="_blank",n.rel="noopener nofollow noreferrer",t.insertAdjacentElement("beforeend",n),{injectionElement:t,linkElement:n}}function vs(){const e=Array.from(document.querySelectorAll(`${Nt} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function _s(e){window.addEventListener("click",n=>{if(Ur(n))return;let i=n.target;if(!i||(i.hasAttribute(ut)||(i=i.closest(Nt)),!i))return;const r=i.getAttribute(ut);if(!r)return;const a=e.find(o=>r===o.key);a&&(n.preventDefault(),us(()=>{_n(!1),Wr(n,a)},!ui.current&&window.innerWidth>=600&&!window.matchMedia("(pointer: coarse)").matches))}),window.addEventListener("mousemove",n=>{if(!dt)return;const i=n.target;i.hasAttribute("data-playpilot-title-popover")||i.closest("[data-playpilot-title-popover]")||i.hasAttribute(ut)||i.closest(Nt)||_n()}),Array.from(document.querySelectorAll(Nt)).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=e.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{dt||hs(a,r)}),n.addEventListener("mouseleave",()=>vn=null))})}function Wr(e,t){Ur(e)||Ot||(e.preventDefault(),Ot=Jt(Bl,{target:Jr(),props:{title:t.title_details,onclose:Kr}}))}function Kr(e=!0){Ot&&(bn(Ot,{outro:e}),Ot=null)}function hs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;dt&&_n();const n=e.currentTarget;vn=n,setTimeout(()=>{vn===n&&(dt=Jt(zl,{target:Jr(),props:{event:e,title:t.title_details}}))},100)}function _n(e=!0){dt&&(bn(dt,{outro:e}),vn=null,dt=null)}function gs(e,t){var o,s;if(Lt||!t.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||e[e.length-1],a=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Lt=Jt(ts,{target:n,props:{linkInjections:t,onclickmodal:(l,d)=>Wr(l,d)}})}function ms(){var e;Lt&&(bn(Lt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Lt=null)}function fi(){document.querySelectorAll(Nt).forEach(t=>ps(t.getAttribute(ut)||"")),ms(),Kr(!1),_n(!1)}function ps(e){var i;const t=document.querySelector(`[${ut}="${e}"]`);if(!t)return;const n=(i=t.querySelector("a"))==null?void 0:i.innerHTML;t.outerHTML=n||""}function ys({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function Yr(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function Zr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Tn(e)}function Tn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function ws(e){return Gr(e).filter(t=>t.in_text!==!1&&Zr(t))}function ks(e){return Gr(e).filter(t=>t.after_article===!0&&Zr(t))}function Gr(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)&&Xr(n,t)))}function bs(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&Xr(i,e))}function Xr(e,t){return e.title===t.title&&Te(e.sentence)===Te(t.sentence)}function Jr(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function Qr(){const e=Ut();return{content_heading:xs(e),content_modified_time:Ss(e),content_published_time:Es(e)}}function xs(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ss(e){const t=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="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?vi(n):null}function Es(e){const t=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="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?vi(n):null}function vi(e){try{return new Date(e).toISOString()}catch{return null}}let On=null;async function en(e,{url:t=ai(),hash:n=il(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=In(),o=Or()?await Lr():!1,s=Rr();if(!a)throw new Error("No token was provided");i.metadata=Qr(),i.run_ai&&(i.hash=n,i.page_text=e);const l=await fetch(Sn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${s}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!l.ok)throw l;return await l.json()}async function Ri(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;On&&clearTimeout(On);const s=async(l,d)=>{let u;try{if(u=await en(e),n&&(u=await Ts(e,u)),t&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=qi(u.manual_injections||[]),u.ai_injections=qi(u.ai_injections||[]),l(u);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),l();return}u&&a(u),On=setTimeout(()=>s(l),i)}};return new Promise(s)}async function Ts(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=Qr().content_modified_time,i=t.content_modified_time?vi(t.content_modified_time):null,r=n&&i===n;return t.ai_last_run&&r?t:await en(e,{params:{run_ai:!0}})}async function Is(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,phrase_before:s.phrase_before,phrase_after:s.phrase_after,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 en(t,{params:{private_token:li(),manual_injections:r,content_text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function As(){const e=new Headers({"Content-Type":"application/json"}),t=In();if(!t)throw new Error("No token was provided");const n=await fetch(Sn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function qi(e){return e.map(t=>({...t,key:$r(t.sid)}))}function $r(e){return e+"-"+Dr()}function In(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Cs(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Ps=Ne('<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 js(e,t){const n=N(t,"expanded",3,!1);var i=Ps();L(()=>se(i,"expanded",n())),k(e,i)}var Ms=Ne('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ns(e){var t=Ms();k(e,t)}function Ls(e,t,n){t(!t()),n()(t())}var Os=I('<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 Wn(e,t){ae(t,!0);let n=N(t,"active",15),i=N(t,"fullwidth",3,!1),r=N(t,"label",3,""),a=N(t,"onclick",3,()=>null);var o=Os();o.__click=[Ls,n,a];var s=b(o),l=b(s);Ct(l,()=>t.children),L(()=>{ue(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),se(o,"active",n()),se(o,"fullwidth",i())}),k(e,o),oe()}fe(["click"]);var Ds=I('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function _i(e,t){let n=N(t,"value",15),i=N(t,"label",3,""),r=N(t,"name",3,""),a=N(t,"readonly",3,!1),o=N(t,"oninput",3,()=>null);var s=Ds();s.__input=function(...l){var d;(d=o())==null||d.apply(this,l)},L(()=>{ue(s,"name",r()),ue(s,"aria-label",i()),ue(s,"placeholder",i()),s.readOnly=a()}),Ho(s,n),k(e,s)}fe(["input"]);var Rs=Ne('<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>'),qs=Ne('<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>'),Hs=Ne('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Hi(e,t){const n=N(t,"align",3,"bottom");var i=Hs(),r=b(i);{var a=s=>{var l=Rs();k(s,l)},o=s=>{var l=Fe(),d=ne(l);{var u=f=>{var _=qs();k(f,_)};q(d,f=>{n()==="center"&&f(u)},!0)}k(s,l)};q(r,s=>{n()==="bottom"?s(a):s(o,!1)})}k(e,i)}var Bs=I("<div><!></div>");function ht(e,t){ae(t,!0);const n=N(t,"type",3,"error"),i=N(t,"fixed",3,!1);var r=Bs(),a=b(r);Ct(a,()=>t.children),L(()=>{No(r,`alert ${n()??""} svelte-df5n87`),se(r,"fixed",i())}),k(e,r),oe()}var Fs=I("<!> In-text Playlink",1),Vs=I("<!> Bottom Playlink",1),Us=I('<div class="alert svelte-1shw34x"><!></div>'),zs=(e,t)=>t().after_article_style="playlinks",Ws=(e,t)=>t().after_article_style="modal_button",Ks=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),Ys=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function Zs(e,t){ae(t,!0);const n=N(t,"linkInjection",7),i=K(()=>n().after_article_style==="modal_button");var r=Ys(),a=ne(r),o=b(a),s=K(()=>n().in_text??!0);Wn(o,{fullwidth:!0,get active(){return c(s)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,v)=>{var p=Fs(),y=ne(p);Hi(y,{align:"center"}),k(g,p)},$$slots:{default:!0}});var l=E(o,2),d=K(()=>n().after_article??!1);Wn(l,{fullwidth:!0,get active(){return c(d)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,v)=>{var p=Vs(),y=ne(p);Hi(y,{align:"bottom"}),k(g,p)},$$slots:{default:!0}});var u=E(a,2);{var f=g=>{var v=Us(),p=b(v);ht(p,{type:"warning",children:(y,w)=>{var S=Be("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),je(3,v,()=>Ft,()=>({duration:200})),k(g,v)};q(u,g=>{Tn(n())||g(f)})}var _=E(u,2);{var m=g=>{var v=Ks(),p=E(b(v),2),y=b(p);y.__click=[zs,n];var w=E(y,2);w.__click=[Ws,n];var S=E(w,2);L(()=>{ue(p,"aria-activedescendant",`playlinks-${(c(i)?"after-article":"in-text")??""}`),ue(y,"aria-selected",!c(i)||null),se(y,"active",!c(i)),ue(w,"aria-selected",c(i)||null),se(w,"active",c(i)),se(S,"right",c(i))}),je(3,v,()=>Ft,()=>({duration:100})),k(g,v)};q(_,g=>{n().after_article&&g(m)})}k(e,r),oe()}fe(["click"]);var Gs=Ne('<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 Xs(e){var t=Gs();k(e,t)}var Js=(e,t)=>P(t,!c(t)),Qs=I('<div class="content svelte-zpsd2z"><!></div>'),$s=I('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function ec(e,t){ae(t,!0);let n=U(!1),i=U(null);function r(u){var _;const f=u.target;f===c(i)||(_=c(i))!=null&&_.contains(f)||P(n,!1)}var a=$s();ce("click",pe,r);var o=b(a);o.__click=[Js,n];var s=b(o);Xs(s),$t(o,u=>P(i,u),()=>c(i));var l=E(o,2);{var d=u=>{var f=Qs(),_=b(f);Ct(_,()=>t.children),je(1,f,()=>En,()=>({duration:150,y:5})),k(u,f)};q(l,u=>{c(n)&&u(d)})}L(()=>{ue(o,"aria-label",t.ariaLabel),ue(o,"aria-expanded",c(n))}),k(e,a),oe()}fe(["click"]);function tc(e,t,n,i){var r,a;c(t)&&(be(ye.ManualReport,n.linkInjection.title_details,{report_reason:c(t),sid:n.linkInjection.sid,title:n.linkInjection.title,sentence:n.linkInjection.sentence,failed:(r=n.linkInjection.failed)==null?void 0:r.toString(),failed_message:n.linkInjection.failed_message,manual:(a=n.linkInjection.manual)==null?void 0:a.toString()}),P(i,!0),setTimeout(n.onclose,3e3))}var nc=(e,t,n)=>P(t,X(n())),ic=I('<option class="svelte-o5qkco"> </option>'),rc=I('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),ac=I('<button class="submit svelte-o5qkco">Send report</button>'),oc=I('<div class="form svelte-o5qkco"><div class="heading svelte-o5qkco">Report issue</div> <div class="info svelte-o5qkco"><div><strong class="svelte-o5qkco">Title</strong> </div> <div><strong class="svelte-o5qkco">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-o5qkco"><option class="svelte-o5qkco">Select an issue...</option><!></select> <div><!></div></div>');function lc(e,t){ae(t,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=U(""),r=U(!1);Hr(e,{get onclose(){return t.onclose},children:(a,o)=>{var s=oc(),l=b(s);Qt(l,(x,T)=>xe==null?void 0:xe(x,T),()=>2);var d=E(l,2),u=b(d),f=E(b(u)),_=E(u,2),m=E(b(_));L(()=>G(m,`:
|
|
9
|
+
${Vr(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var g=E(d,4),v=b(g);v.value=((v.__value="")==null,"");var p=E(v);at(p,17,()=>n,xt,(x,T)=>{let H=()=>c(T).value,M=()=>c(T).label;var C=ic(),D={};C.__click=[nc,i,H];var A=b(C);L(()=>{D!==(D=H())&&(C.value=(C.__value=H())==null?"":H()),G(A,M())}),k(x,C)});var y=E(g,2),w=b(y);{var S=x=>{var T=rc();je(1,T,()=>Bt,()=>({duration:200})),k(x,T)},j=x=>{var T=ac();T.__click=[tc,i,t,r],L(()=>T.disabled=!c(i)),k(x,T)};q(w,x=>{c(r)?x(S):x(j,!1)})}L(()=>G(f,`: ${t.linkInjection.title??""}`)),Fo(g,()=>c(i),x=>P(i,x)),k(a,s)},$$slots:{default:!0}}),oe()}fe(["click"]);function sc(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}function cc(e,t){const n=Jt(lc,{target:document.body,props:{linkInjection:t(),onclose:()=>bn(n)}})}var uc=(e,t)=>P(t,!c(t)),dc=I('<button class="expand-sentence svelte-lo6h85"> </button>'),fc=I('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),vc=(e,t)=>P(t,!c(t)),_c=I('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),hc=I('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),gc=I('<div class="expanded svelte-lo6h85"><div class="label svelte-lo6h85">Link URL</div> <!> <div class="label offset svelte-lo6h85">Layout options</div> <div class="type-select svelte-lo6h85"><!></div></div>'),mc=I('<div class="item svelte-lo6h85"><div class="header svelte-lo6h85"><img class="poster svelte-lo6h85" alt="" width="32" height="48"> <div class="info svelte-lo6h85"><div class="title svelte-lo6h85"> </div> <div class="sentence svelte-lo6h85"><!> <!></div></div> <div class="context-menu svelte-lo6h85"><!></div></div> <div class="content svelte-lo6h85"><!> <!></div></div>');function pc(e,t){ae(t,!0);const n=N(t,"linkInjection",15),i=N(t,"onremove",3,()=>null),r=N(t,"onhighlight",3,()=>null),a=K(()=>n()||{}),o=K(()=>c(a).key),s=K(()=>c(a).sentence),l=K(()=>c(a).title_details),d=K(()=>c(a).failed),u=K(()=>c(a).failed_message),f=K(()=>c(a).inactive),_=K(()=>c(l)),m=K(()=>Vr(n().sentence,n().title,60));let g=U(!1),v=U(!1),p=U(!1),y=U(null);Je(()=>{c(d)&&be(ye.InjectionFailed,c(_),{phrase:n().title,sentence:c(s)})});function w(Q=!0){j().forEach(le=>{le.classList.toggle("playpilot-injection-highlight",Q)})}function S(Q){let te=Q.target,le=te==null?void 0:te.dataset.playpilotInjectionKey;te&&!le&&(te=te.closest(`[data-playpilot-injection-key="${c(o)}"]`),le=te==null?void 0:te.dataset.playpilotInjectionKey),P(p,le===c(o)),c(y)&&c(p)&&r()(c(y))}function j(){const Q=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${c(o)}"]`));return Q.length?Q:zr(Ut()).filter(te=>Te(te.innerText).includes(Te(n().sentence)))||[]}var x=mc();ce("mouseover",pe,S),x.__click=[sc,w,j];var T=b(x),H=b(T);L(()=>ue(H,"src",Vt(c(_).standing_poster)));var M=E(H,2),C=b(M),D=b(C),A=E(C,2),B=b(A);Io(B,()=>(c(v)?c(s):c(m)).replace(n().title,`<em>${n().title}</em>`));var O=E(B,2);{var z=Q=>{var te=dc();te.__click=[uc,v];var le=b(te);L(()=>G(le,c(v)?"Less":"More")),k(Q,te)};q(O,Q=>{c(m).length<c(s).length&&Q(z)})}var F=E(M,2),V=b(F);ec(V,{ariaLabel:"More options",children:(Q,te)=>{var le=fc(),Ce=ne(le);Ce.__click=function(...ot){var R;(R=i())==null||R.apply(this,ot)};var Qe=E(Ce,2);Qe.__click=[cc,n],k(Q,le)},$$slots:{default:!0}});var W=E(T,2),J=b(W);{var ee=Q=>{ht(Q,{children:(te,le)=>{var Ce=Be();L(()=>G(Ce,c(u))),k(te,Ce)},$$slots:{default:!0}})},re=Q=>{var te=hc(),le=b(te);le.__click=[vc,g];var Ce=b(le);js(Ce,{get expanded(){return c(g)}});var Qe=E(le,2);{var ot=ve=>{var Se=_c(),Le=b(Se);Ns(Le),je(3,Se,()=>Bt,()=>({duration:100})),k(ve,Se)};q(Qe,ve=>{Tn(n())||ve(ot)})}var R=E(Qe,2),Y=K(()=>c(f)?"Inactive":"Visible"),_e=K(()=>!n().inactive);Wn(R,{get label(){return c(Y)},get active(){return c(_e)},onclick:ve=>{n(n().inactive=!ve,!0),n(n().manual=!0,!0)},children:(ve,Se)=>{var Le=Be();L(()=>G(Le,c(f)?"Inactive":"Visible")),k(ve,Le)},$$slots:{default:!0}}),L(()=>ue(le,"aria-expanded",c(g))),k(Q,te)};q(J,Q=>{c(d)?Q(ee):Q(re,!1)})}var de=E(J,2);{var Ae=Q=>{var te=gc(),le=E(b(te),2);_i(le,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ot){n(n().playpilot_url=ot,!0)}});var Ce=E(le,4),Qe=b(Ce);Zs(Qe,{get linkInjection(){return n()}}),je(3,te,()=>Ft,()=>({duration:100})),k(Q,te)};q(de,Q=>{c(g)&&Q(Ae)})}$t(x,Q=>P(y,Q),()=>c(y)),L(()=>{se(x,"highlighted",c(p)),se(x,"inactive",c(f)),G(D,c(_).title)}),ce("mouseenter",x,()=>w(!0)),ce("mouseleave",x,()=>w(!1)),ce("error",H,({target:Q})=>Q.src=jr),je(6,x,()=>Ft,()=>({duration:200})),k(e,x),oe()}fe(["click"]);var yc=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function wc(e,t){ae(t,!0);let n=N(t,"element",7),i=N(t,"position",23,()=>({x:0,y:0})),r=N(t,"limit",19,()=>({x:0,y:0})),a=N(t,"onchange",3,()=>null),o=!1,s={x:0,y:0},l=i();Je(()=>{d(i().x,i().y)});function d(v,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;v=Math.min(Math.max(v,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=v+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:v,y:p}),a()(i())}function u(v){var p,y;return{x:v.pageX||((p=v.touches)==null?void 0:p[0].pageX)||0,y:v.pageY||((y=v.touches)==null?void 0:y[0].pageY)||0}}function f(v){o=!0,s=u(v),l=i()}function _(v){if(!o)return;const p=u(v),y=p.x-s.x,w=p.y-s.y,S=l.x-y,j=l.y-w;d(S,j)}function m(){o&&(o=!1)}var g=yc();ce("mousemove",pe,_),ce("touchmove",pe,_,void 0,!0),ce("mouseup",pe,m),ce("touchend",pe,m),ce("resize",pe,()=>d(i().x,i().y)),g.__mousedown=f,g.__touchstart=f,k(e,g),oe()}fe(["mousedown","touchstart"]);var kc=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function bc(e,t){ae(t,!0);let n=N(t,"element",7),i=N(t,"height",7,200),r=N(t,"onchange",3,()=>null);const a=16;let o=!1,s=0,l=i();Je(()=>{i()&&d(i())});function d(v){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(v,m()));n().style.height=`${y}px`,i(y),r()(y)}function u(v){var p,y;o=!0,s=v.pageY||((y=(p=v.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,l=n().clientHeight}function f(v){var S,j;if(!o)return;const p=v.pageY||((j=(S=v.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=s-p,w=l+y;d(w)}function _(){o=!1}function m(){const v=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-v,0)}var g=kc();ce("mousemove",pe,f),ce("touchmove",pe,f,void 0,!0),ce("mouseup",pe,_),ce("touchend",pe,_),ce("resize",pe,()=>{i()&&d(i())}),g.__mousedown=u,g.__touchstart=u,k(e,g),oe()}fe(["mousedown","touchstart"]);var xc=Ne('<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 Sc(e){var t=xc();k(e,t)}async function Ec(e){const t=new Headers({"Content-Type":"application/json"}),n=In();if(!n)throw new Error("No token was provided");const i=await fetch(Sn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Tc=Ne('<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 Ic(e){var t=Tc();k(e,t)}var Ac=I("<div> </div>"),Cc=e=>e.stopImmediatePropagation(),Pc=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function Bi(e,t){ae(t,!0);const n=N(t,"hoverable",3,!0),i=N(t,"onclick",3,()=>null);var r=Pc();r.__click=function(...x){var T;(T=i())==null||T.apply(this,x)};var a=b(r);L(()=>ue(a,"src",Vt(t.title.standing_poster)));var o=E(a,2),s=b(o),l=b(s),d=E(s,2),u=b(d),f=b(u);Br(f);var _=E(f),m=E(u,2),g=b(m),v=E(m,2),p=b(v),y=E(v,2);{var w=x=>{var T=Ac(),H=b(T);L(()=>G(H,`${t.title.length??""} min`)),k(x,T)};q(y,x=>{t.title.length&&x(w)})}var S=E(o,2);S.__click=[Cc];var j=b(S);Ic(j),L(()=>{se(r,"hoverable",n()),G(l,t.title.title),G(_,` ${t.title.imdb_score??""}`),G(g,t.title.year),G(p,t.title.type),ue(S,"href",`${Pr}/${t.title.type??""}/${t.title.slug??""}`)}),ce("error",a,({target:x})=>x.src=jr),k(e,r),oe()}fe(["click"]);var jc=I('<em class="empty svelte-1olb8n0">No results found</em>'),Mc=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Nc=I('<div class="selected svelte-1olb8n0"><!></div>'),Lc=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Oc(e,t){ae(t,!0);let n=N(t,"onselect",3,()=>null),i=N(t,"query",15),r=U(X([])),a=U(null),o=U(!1);pn(()=>{i()&&s(i())});async function s(v){P(o,!0);try{P(r,X(await Ec(v)))}finally{P(o,!1)}}function l(v){i(v.title),P(a,X(v)),n()(v)}var d=Lc(),u=b(d);_i(u,{oninput:()=>P(a,null),name:"search",label:"Search...",get value(){return i()},set value(v){i(v)}});var f=E(u,2);{var _=v=>{var p=Mc();at(p,21,()=>c(r),y=>y.sid,(y,w)=>{Bi(y,{get title(){return c(w)},onclick:()=>l(c(w))})},y=>{var w=Fe(),S=ne(w);{var j=x=>{var T=jc();k(x,T)};q(S,x=>{c(o)||x(j)})}k(y,w)}),k(v,p)};q(f,v=>{i()&&!c(a)&&v(_)})}var m=E(f,2);{var g=v=>{var p=Nc(),y=b(p);Bi(y,{get title(){return c(a)},hoverable:!1}),k(v,p)};q(m,v=>{c(a)&&v(g)})}k(e,d),oe()}function Dc(e,t=e.anchorNode){if(!e.anchorNode||!t)return{start:-1,end:-1};const n=e.toString().trim(),i=e.toString().search(/\S/);if(e.anchorNode===t&&t.nodeType===Node.TEXT_NODE){const d=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:d,end:d+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const s=a.toString().length+i,l=s+n.length;return{start:s,end:l}}function Rc(e,t,n,i,r,a,o,s){if(!c(t)||!c(n))return;const l=c(n).type==="movie"?"movie":"show",d=Pr+`/${l}/${c(n).slug}`,u={sid:c(n).sid,title:c(t),sentence:c(i),phrase_before:c(r),phrase_after:c(a),playpilot_url:d,key:$r(c(n).sid),title_details:c(n),manual:!0};o.onsave(u),s()()}var qc=I('<div class="error svelte-1i8p6op"><!></div>'),Hc=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Bc=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Fc(e,t){ae(t,!0);const n=N(t,"pageText",3,""),i=N(t,"onclose",3,()=>null);let r=U(""),a=U(""),o=U(null),s=U(""),l=U(""),d=U(""),u=U("");Je(f);function f(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!Ut().contains(C.anchorNode.parentElement))return;const D=C.toString().trim();if(!D)return;P(d,""),P(r,X(D));const A=C.getRangeAt(0).cloneContents();if(Array.from(A.childNodes).filter(ee=>{var re;return(re=ee.textContent)==null?void 0:re.trim()}).find(ee=>{var re;return ee.nodeName==="A"||((re=ee.querySelector)==null?void 0:re.call(ee,"a"))})){P(d,"Selection is or contains a link. Injections can not be created around already existing links.");return}P(u,X(c(r)));const{node:O,sentence:z}=_(C,D);if(!O)return;P(a,X(z));const{start:F,end:V}=Dc(C,O);(ee=>(P(l,X(ee.before)),P(s,X(ee.after))))(as(O,F,V)),z.includes(c(l))||P(l,""),z.includes(c(s))||P(s,"");const W=C.getRangeAt(0).commonAncestorContainer.textContent,J=Te(n());(!W||!J.includes(Te(W)))&&P(d,"Selection was not inside of given content")}function _(C,D){const A=C.getRangeAt(0),B=Ut();let O=A.startContainer;for(;(O.textContent||"").length<=D.length*3&&O.parentNode&&O.parentNode.textContent!==B.textContent;)O=O.parentNode;if(!O||!O.textContent)return{node:null,sentence:""};const z=O.textContent,F=m(O,A.startContainer,A.startOffset),V=m(O,A.endContainer,A.endOffset),W=z.slice(0,F).lastIndexOf("."),J=z.slice(V).match(/[.!?]/),ee=J?V+J.index:z.length,re=W===-1?0:W+1,de=ee,Ae=z.slice(re,de+1).trim();return{node:O,sentence:Ae}}function m(C,D,A){let B=0;const O=C,z=F=>{var V;if(F===D)return B+=A,!0;F.nodeType===Node.TEXT_NODE&&(B+=((V=F.textContent)==null?void 0:V.length)||0);for(let W=F.firstChild;W;W=W.nextSibling)if(z(W))return!0;return!1};return z(O),B}function g(C){var D,A;P(o,X(C)),(A=(D=window.getSelection())==null?void 0:D.removeAllRanges)==null||A.call(D)}var v=Bc();ce("mouseup",pe,f);var p=b(v),y=b(p);ci(y,{get onclick(){return i()},size:"24px",children:(C,D)=>{Sc(C)},$$slots:{default:!0}});var w=E(y,2);Qt(w,(C,D)=>xe==null?void 0:xe(C,D),()=>2);var S=E(p,6);_i(S,{get value(){return c(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var j=E(S,2);{var x=C=>{var D=qc(),A=b(D);ht(A,{children:(B,O)=>{var z=Be();L(()=>G(z,c(d))),k(B,z)},$$slots:{default:!0}}),k(C,D)};q(j,C=>{c(d)&&C(x)})}var T=E(j,2);{var H=C=>{var D=Hc(),A=E(ne(D),2);Er(A,()=>c(a)+c(r),B=>{Oc(B,{onselect:g,get query(){return c(u)},set query(O){P(u,X(O))}})}),k(C,D)};q(T,C=>{c(d)||C(H)})}var M=E(T,2);M.__click=[Rc,r,o,a,l,s,t,i],L(()=>M.disabled=!c(r)||!c(o)),k(e,v),oe()}fe(["click"]);const Kn="PlayPilotEditorialSessionId",ea=5e3,Vc=ea*2;async function Uc(e){const{ai_enabled:t,injections_enabled:n,session_id:i,session_last_ping:r}=await en(e),a=na(i||null,r||null),o={ai_enabled:t,injections_enabled:n,session_id:i,session_last_ping:r};return a?await ta(e):o}async function ta(e){const t=ia(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a}=await en(e,{params:i});return{ai_enabled:r,injections_enabled:a,...i}}function na(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=ia();return n-i.getTime()>Vc?!0:r===e}function ia(){return sessionStorage.getItem(Kn)||zc()}function zc(){const e=sessionStorage.getItem(Kn)||Dr();return sessionStorage.setItem(Kn,e),e}function Wc(e,t,n){ta(t()),n()()}var Kc=I('<p class="svelte-2m2urs"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-2m2urs">Take over editing</button>',1),Yc=I('<div class="alert svelte-2m2urs"><!></div>');function Zc(e,t){ae(t,!0);const n=N(t,"pageText",3,""),i=N(t,"onpoll",3,()=>null),r=N(t,"onallow",3,()=>null),a=N(t,"ondisallow",3,()=>null),o=N(t,"ontakeover",3,()=>null);let s=null,l=U(!0);Je(()=>(d(),()=>{s&&clearInterval(s)}));function d(){u(),s=setInterval(u,ea)}async function u(){const g=await Uc(n());g&&(P(l,X(na(g.session_id||null,g.session_last_ping||null))),c(l)?r()():a()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}var f=Fe(),_=ne(f);{var m=g=>{var v=Yc(),p=b(v);ht(p,{type:"warning",children:(y,w)=>{var S=Kc(),j=E(ne(S),2);j.__click=[Wc,n,o],k(y,S)},$$slots:{default:!0}}),k(g,v)};q(_,g=>{c(l)||g(m)})}k(e,f),oe()}fe(["click"]);var Gc=Ne('<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 Xc(e){var t=Gc();k(e,t)}var Jc=I('<strong class="svelte-1kpafo0">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1kpafo0">Partner Portal</a>',1),Qc=I('<span class="svelte-1kpafo0">.</span>'),$c=I(`<strong class="svelte-1kpafo0">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1kpafo0"> <span class="ellipses svelte-1kpafo0"></span></div> <div class="loading-bar svelte-1kpafo0"><div class="loading-bar-progress svelte-1kpafo0"><div class="loading-bar-fill svelte-1kpafo0" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1kpafo0"> </div></div>`,1),eu=(e,t)=>P(t,!0),tu=I('<p class="svelte-1kpafo0"><strong class="svelte-1kpafo0">AI has finished processing.</strong> <br class="svelte-1kpafo0"> <!></p> <button class="dismiss svelte-1kpafo0">Dismiss</button>',1),nu=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),iu=I('<div class="ai-indicator svelte-1kpafo0" data-testid="ai-indicator"><div class="content svelte-1kpafo0"><div class="icon svelte-1kpafo0"><!></div> <div class="svelte-1kpafo0"><!></div></div> <div class="border svelte-1kpafo0"><!></div></div>');function ru(e,t){const n=N(t,"aiRunning",3,!1),i=N(t,"aiEnabled",3,!1),r=N(t,"message",3,""),a=N(t,"percentage",3,0),o=N(t,"aiInjectionsCount",3,0),s=o();let l=U(!1);var d=Fe(),u=ne(d);{var f=_=>{var m=iu(),g=b(m),v=b(g),p=b(v);Xc(p);var y=E(v,2),w=b(y);{var S=M=>{var C=Jc();k(M,C)},j=M=>{var C=Fe(),D=ne(C);{var A=O=>{var z=$c(),F=E(ne(z),2),V=b(F),W=E(V);at(W,20,()=>({length:3}),xt,(te,le)=>{var Ce=Qc();k(te,Ce)});var J=E(F,2),ee=b(J),re=b(ee);const de=K(()=>`${Math.max(a(),3)??""}%`);L(()=>xn(re,"width",c(de)));var Ae=E(ee,2),Q=b(Ae);L(()=>G(Q,`${Math.floor(a())??""}%`)),L(()=>G(V,`${r()??""} `)),k(O,z)},B=O=>{var z=tu(),F=ne(z),V=E(b(F),4);{var W=re=>{var de=Be("No new injections where found.");k(re,de)},J=re=>{var de=Be();L(()=>G(de,`${o()??""} Injections where found and added to the page.`)),k(re,de)};q(V,re=>{s===o()?re(W):re(J,!1)})}var ee=E(F,2);ee.__click=[eu,l],k(O,z)};q(D,O=>{n()?O(A):O(B,!1)},!0)}k(M,C)};q(w,M=>{i()?M(j,!1):M(S)})}var x=E(g,2),T=b(x);{var H=M=>{var C=nu();k(M,C)};q(T,M=>{n()&&M(H)})}L(()=>se(m,"running",n())),k(_,m)};q(u,_=>{c(l)||_(f)})}k(e,d)}fe(["click"]);async function au(e,t,n,i,r,a,o){try{P(t,!0),P(n,!1),i(await Is(i(),r())),P(a,X(c(o)))}catch{P(n,!0)}finally{P(t,!1)}}var ou=I('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),lu=I('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),su=I('<div class="loading svelte-11aj6xq">Loading...</div>'),cu=I('<div class="bubble svelte-11aj6xq"> </div> <!>',1),uu=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
10
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),du=I('<div class="alert svelte-11aj6xq"><!></div>'),fu=I('<div class="error svelte-11aj6xq"><!></div>'),vu=I('<div class="empty svelte-11aj6xq">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),_u=I('<button class="save svelte-11aj6xq"> </button>'),hu=I('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),gu=I("<!> <!> <!>",1),mu=I('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),pu=I('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function yu(e,t){ae(t,!0);let n=N(t,"linkInjections",15),i=N(t,"pageText",3,""),r=N(t,"loading",3,!1),a=N(t,"injectionsEnabled",7,!1),o=N(t,"aiStatus",23,()=>({})),s=N(t,"onreinitialize",3,()=>null);const l="editor-position",d="editor-height",u=JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(d)||"0");let _=U(null),m=U(!1),g=U(!1),v=U(!1),p=U(!0),y=U(0),w=U("");const S=K(()=>sn(o().aiEnabled,!1)),j=K(()=>sn(o().aiRunning,!1)),x=K(()=>JSON.stringify(n())),T=K(()=>!c(j)&&c(p)),H=K(()=>c(w)&&c(w)!==c(x)),M=K(()=>n().filter(R=>R.title_details&&!R.removed&&!R.duplicate&&(R.manual||!R.manual&&!R.failed))),C=K(()=>A(c(M))),D=K(()=>!r()&&Ke(()=>o().aiRunning));pn(()=>{r()||Ke(()=>{requestAnimationFrame(()=>P(w,X(c(x)))),V()})});function A(R){return R.sort((Y,_e)=>Y.failed!==_e.failed?Y.failed?1:-1:Y.title_details.title.localeCompare(_e.title_details.title))}function B(R,Y){localStorage.setItem(R,Y)}function O(R){const Y=n().findIndex(_e=>_e.key===R);n(n()[Y].manual=!0,!0),n(n()[Y].removed=!0,!0),n([...n()])}function z(R){if(!c(_))return;const Y=R.offsetTop,_e=Y+R.offsetHeight,ve=c(_).scrollTop,Se=ve+c(_).clientHeight;Y>=ve&&_e<=Se||c(_).scrollTo({top:Y-c(_).clientHeight/2,behavior:"smooth"})}function F(R){const Y=R.target;P(y,X(Y.scrollTop))}function V(){const R={total:n().length,failed_automatic:n().filter(Y=>Y.failed&&!Y.manual).length,failed_manual:n().filter(Y=>Y.failed&&Y.manual).length,final_injected:c(M).length};be(ye.TotalInjectionsCount,null,R)}var W=pu();ko(R=>{var Y=ou();k(R,Y)});var J=b(W);{var ee=R=>{var Y=lu(),_e=b(Y),ve=b(_e);bc(ve,{get element(){return c(_)},height:f,onchange:Ze=>B(d,JSON.stringify(Ze))});var Se=E(_e,2),Le=b(Se);wc(Le,{get element(){return c(_)},position:u,limit:{x:16,y:16},onchange:Ze=>B(l,JSON.stringify(Ze))}),k(R,Y)};q(J,R=>{c(_)&&!r()&&R(ee)})}var re=E(J,2),de=b(re);Qt(de,R=>xe==null?void 0:xe(R));var Ae=E(de,2);{var Q=R=>{var Y=su();k(R,Y)},te=R=>{var Y=Fe(),_e=ne(Y);{var ve=Se=>{var Le=cu(),Ze=ne(Le),Oe=b(Ze),tn=E(Ze,2);ci(tn,{onclick:()=>P(m,!0),size:"24px","aria-label":"Add manual injection",children:(nn,hi)=>{var rn=Be("+");k(nn,rn)},$$slots:{default:!0}}),L(()=>{ue(Ze,"aria-label",`${c(M).length??""} found playlinks`),G(Oe,c(M).length)}),k(Se,Le)};q(_e,Se=>{c(T)&&Se(ve)},!0)}k(R,Y)};q(Ae,R=>{r()?R(Q):R(te,!1)})}var le=E(re,2);{var Ce=R=>{var Y=gu(),_e=ne(Y);Zc(_e,{get pageText(){return i()},onallow:()=>P(p,!0),ondisallow:()=>P(p,!1),get ontakeover(){return s()},onpoll:Oe=>{a(Oe.injectionsEnabled),o({...o(),aiEnabled:Oe.aiEnabled})}});var ve=E(_e,2);{var Se=Oe=>{ru(Oe,Yo(o,{get aiInjectionsCount(){return Yr(n()).aiInjections.length}}))};q(ve,Oe=>{c(p)&&(c(D)||!c(S))&&Oe(Se)})}var Le=E(ve,2);{var Ze=Oe=>{var tn=hu(),nn=ne(tn);{var hi=he=>{var ge=du(),$e=b(ge);ht($e,{type:"warning",children:(lt,la)=>{var An=uu();k(lt,An)},$$slots:{default:!0}}),k(he,ge)};q(nn,he=>{a()||he(hi)})}var rn=E(nn,2);{var ra=he=>{var ge=fu(),$e=b(ge);ht($e,{children:(lt,la)=>{var An=Be("Something went wrong, check your links below.");k(lt,An)},$$slots:{default:!0}}),je(7,ge,()=>Ft,()=>({duration:150})),k(he,ge)};q(rn,he=>{c(v)&&he(ra)})}var gi=E(rn,2);at(gi,21,()=>c(C),he=>he.key,(he,ge)=>{const $e=K(()=>n().findIndex(lt=>lt.key===c(ge).key));pc(he,{onremove:()=>O(c(ge).key),onhighlight:z,get linkInjection(){return n()[c($e)]},set linkInjection(lt){n(n()[c($e)]=lt,!0)}})},he=>{var ge=vu();k(he,ge)});var aa=E(gi,2);{var oa=he=>{var ge=_u();ge.__click=[au,g,v,n,i,w,x];var $e=b(ge);L(()=>{ge.disabled=c(g),G($e,c(g)?"Saving...":"Save links")}),je(1,ge,()=>Bt,()=>({duration:100})),k(he,ge)};q(aa,he=>{c(H)&&n().length&&c(p)&&he(oa)})}k(Oe,tn)};q(Le,Oe=>{c(T)&&Oe(Ze)})}k(R,Y)};q(le,R=>{r()||R(Ce)})}var Qe=E(le,2);{var ot=R=>{var Y=mu(),_e=b(Y);Fc(_e,{get pageText(){return i()},onclose:()=>P(m,!1),onsave:ve=>n().push(ve)}),L(()=>xn(Y,"top",`${c(y)??""}px`)),je(3,Y,()=>En,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(R,Y)};q(Qe,R=>{c(m)&&R(ot)})}$t(W,R=>P(_,R),()=>c(_)),L(()=>{se(W,"panel-open",c(m)),se(W,"loading",r())}),ce("scroll",W,F),k(e,W),oe()}fe(["click"]);var wu=Ne('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function ku(e){var t=wu();k(e,t)}var bu=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function xu(e,t){var n=bu(),i=b(n);i.__click=function(...s){var l;(l=t.onclick)==null||l.apply(this,s)};var r=b(i);ku(r);var a=E(i,2);a.__click=function(...s){var l;(l=t.onclose)==null||l.apply(this,s)};var o=b(a);qr(o),k(e,n)}fe(["click"]);var Su=I('<div class="playpilot-link-injections svelte-13rmd3g" data-playpilot-link-injections=""><!> <!></div>');function Eu(e,t){ae(t,!0);let n=U(null),i=U(X([])),r=U(null),a=U(X(Or())),o=U(!!li()),s=U(!1),l=U(!0),d=U(!0),u=U(X([]));const f=K(()=>c(r)||{}),_=K(()=>sn(c(f).ai_injections,()=>[],!0)),m=K(()=>sn(c(f).manual_injections,()=>[],!0)),g=K(()=>c(i).map(A=>A.innerText).join(`
|
|
11
11
|
|
|
12
|
-
`));pn(()=>{c(a)&&!c(l)&&p()}),Je(()=>{if(!Cs())return(async()=>(await v(),be(ye.ArticlePageView)))(),()=>fi()});async function v(){P(l,!0),c(a)&&P(s,X(await Lr()));try{const A=await As(),B=ai();if(P(d,!!(A!=null&&A.exclude_urls_pattern&&B.match(new RegExp(A.exclude_urls_pattern)))),c(d))return;A!=null&&A.custom_style&&x(A.custom_style||""),S((A==null?void 0:A.html_selector)||"",(A==null?void 0:A.exclude_elements_selector)||"")}catch(A){be(ye.FetchingConfigFailed),console.error("TPI Config failed to fetch",A);return}try{if(P(r,X(await Ri(c(g),{maxTries:1,runAiWhenRelevant:!0}))),P(l,!1),!c(r))return;if(Qo({organizationSid:c(r).organization_sid,domainSid:c(r).domain_sid}),!c(r).ai_running||!c(r).ai_enabled){w({aiInjections:c(_),manualInjections:c(m)});return}if(!c(a))return;P(r,X(await Ri(c(g),{requireCompletedResult:!0,onpoll:A=>P(r,X(A))}))),w({aiInjections:c(_),manualInjections:c(m)})}catch(A){console.error(A),be(ye.InjectionError,null,{message:A.message})}}function p(){w(Yr(c(u)))}function y(){P(a,!1),requestAnimationFrame(()=>{P(a,!0),v()})}function w(A={aiInjections:c(_),manualInjections:c(m)}){const B=ds(c(i),A);JSON.stringify(B)!==JSON.stringify(c(u))&&P(u,X(B));const O=B.filter(z=>!z.failed);O.length&&(c(a)||be(ye.ArticleInjected,null,{manual:O.filter(z=>z.manual).length,ai:O.filter(z=>!z.manual).length}))}function S(A,B){A&&(window.PlayPilotLinkInjections.selector=A),P(n,X(
|
|
12
|
+
`));pn(()=>{c(a)&&!c(l)&&p()}),Je(()=>{if(!Cs())return(async()=>(await v(),be(ye.ArticlePageView)))(),()=>fi()});async function v(){P(l,!0),c(a)&&P(s,X(await Lr()));try{const A=await As(),B=ai();if(P(d,!!(A!=null&&A.exclude_urls_pattern&&B.match(new RegExp(A.exclude_urls_pattern)))),c(d))return;A!=null&&A.custom_style&&x(A.custom_style||""),S((A==null?void 0:A.html_selector)||"",(A==null?void 0:A.exclude_elements_selector)||"")}catch(A){be(ye.FetchingConfigFailed),console.error("TPI Config failed to fetch",A);return}try{if(P(r,X(await Ri(c(g),{maxTries:1,runAiWhenRelevant:!0}))),P(l,!1),!c(r))return;if(Qo({organizationSid:c(r).organization_sid,domainSid:c(r).domain_sid}),!c(r).ai_running||!c(r).ai_enabled){w({aiInjections:c(_),manualInjections:c(m)});return}if(!c(a))return;P(r,X(await Ri(c(g),{requireCompletedResult:!0,onpoll:A=>P(r,X(A))}))),w({aiInjections:c(_),manualInjections:c(m)})}catch(A){console.error(A),be(ye.InjectionError,null,{message:A.message})}}function p(){w(Yr(c(u)))}function y(){P(a,!1),requestAnimationFrame(()=>{P(a,!0),v()})}function w(A={aiInjections:c(_),manualInjections:c(m)}){const B=ds(c(i),A);JSON.stringify(B)!==JSON.stringify(c(u))&&P(u,X(B));const O=B.filter(z=>!z.failed);O.length&&(c(a)||be(ye.ArticleInjected,null,{manual:O.filter(z=>z.manual).length,ai:O.filter(z=>!z.manual).length}))}function S(A,B){A&&(window.PlayPilotLinkInjections.selector=A),P(n,X(Ut())),P(i,X(zr(c(n),B)))}function j(){P(a,!0),tl(),v()}function x(A){const B="playpilot-custom-style",O=document.getElementById(B),z=O||document.createElement("style");z.textContent=`[data-playpilot-link-injections] { ${A} }`,z.id=B,O||document.body.appendChild(z)}var T=Su(),H=b(T);{var M=A=>{xu(A,{onclick:j,onclose:()=>{P(o,!1),el()}})};q(H,A=>{!c(d)&&c(o)&&!c(a)&&A(M)})}var C=E(H,2);{var D=A=>{var B=Fe(),O=ne(B);Zo(O,{onerror:F=>be(ye.EditorError,null,{message:F.message}),failed:F=>{ht(F,{fixed:!0,children:(V,W)=>{var J=Be("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");k(V,J)},$$slots:{default:!0}})}},F=>{var V=K(()=>{var J;return(J=c(r))==null?void 0:J.injections_enabled}),W=K(()=>{var J,ee,re,de,Ae;return{aiEnabled:(J=c(r))==null?void 0:J.ai_enabled,aiRunning:((ee=c(r))==null?void 0:ee.ai_running)&&((re=c(r))==null?void 0:re.ai_enabled),message:(de=c(r))==null?void 0:de.ai_progress_message,percentage:(Ae=c(r))==null?void 0:Ae.ai_progress_percentage}});yu(F,{get pageText(){return c(g)},get loading(){return c(l)},onreinitialize:y,get injectionsEnabled(){return c(V)},get aiStatus(){return c(W)},get linkInjections(){return c(u)},set linkInjections(J){P(u,X(J))}})}),k(A,B)};q(C,A=>{!c(d)&&c(a)&&c(s)&&A(D)})}k(e,T),oe()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid:null,app:null,initialize(e={token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid: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.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.organization_sid=e.organization_sid,this.domain_sid=e.domain_sid,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=Jt(Eu,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),fi()}};
|
|
13
13
|
|
|
14
14
|
})();
|
package/package.json
CHANGED
package/src/lib/linkInjection.ts
CHANGED
|
@@ -284,10 +284,13 @@ function addLinkInjectionEventListeners(injections: LinkInjection[]): void {
|
|
|
284
284
|
window.addEventListener('click', (event) => {
|
|
285
285
|
if (isHoldingSpecialKey(event)) return
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
if (!target
|
|
287
|
+
let target = event.target as HTMLElement | null
|
|
288
|
+
if (!target) return
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
if (!target.hasAttribute(keyDataAttribute)) target = target.closest(keySelector)
|
|
291
|
+
if (!target) return
|
|
292
|
+
|
|
293
|
+
const key = target.getAttribute(keyDataAttribute)
|
|
291
294
|
if (!key) return
|
|
292
295
|
|
|
293
296
|
const injection = injections.find(injection => key === injection.key)
|