@playpilot/tpi 5.4.0 → 5.5.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/README.md +10 -4
- package/dist/link-injections.js +9 -9
- package/events.md +6 -0
- package/package.json +1 -1
- package/src/lib/data/translations.ts +5 -0
- package/src/lib/enums/TrackingEvent.ts +3 -0
- package/src/lib/splitTest.ts +40 -0
- package/src/lib/tracking.ts +1 -1
- package/src/lib/types/script.d.ts +1 -0
- package/src/main.ts +5 -0
- package/src/routes/+page.svelte +4 -1
- package/src/routes/components/Playlinks.svelte +99 -47
- package/src/routes/components/Popover.svelte +1 -1
- package/src/routes/components/Title.svelte +1 -1
- package/src/routes/components/TitleModal.svelte +4 -0
- package/src/tests/lib/splitTest.test.js +88 -0
- package/src/tests/routes/+page.test.js +4 -0
- package/src/tests/routes/components/Playlinks.test.js +1 -13
package/dist/link-injections.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(() => {
|
|
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-vl7ulm{--size: 32px;height:var(--size);width:var(--size);border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-vl7ulm{--size: 40px}}.heading.svelte-vl7ulm{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-vl7ulm{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-vl7ulm::-webkit-scrollbar{display:none}.list.svelte-vl7ulm{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-vl7ulm img:where(.svelte-vl7ulm){--size: 32px}}.playlink.svelte-vl7ulm{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-vl7ulm:hover,.playlink.svelte-vl7ulm: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-vl7ulm: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-vl7ulm img:where(.svelte-vl7ulm){margin:0}.list.svelte-vl7ulm .playlink:where(.svelte-vl7ulm){padding:8px;gap:8px}.name.svelte-vl7ulm{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-vl7ulm{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)}.disclaimer.svelte-vl7ulm{margin-top:var(--playpilot-playlinks-disclaimer-margin-top, 8px);opacity:var(--playpilot-playlinks-disclaimer-opacity, .65);color:var(--playpilot-playlinks-disclaimer-text-color, var(--playpilot-text-color-alt));font-size:var(--playpilot-playlinks-disclaimer-font-size, 10px);font-style:var(--playpilot-playlinks-disclaimer-font-style, normal)}.disclaimer.svelte-vl7ulm a:where(.svelte-vl7ulm){color:inherit;font-size:inherit;font-style:inherit}.disclaimer.svelte-vl7ulm a:where(.svelte-vl7ulm):hover{color:var(--playpilot-playlinks-disclaimer-text-color-hover, var(--playpilot-text-color))}.empty.svelte-vl7ulm{white-space:initial;line-height:1.35}.arrow.svelte-vl7ulm{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}img.svelte-j7f9xl{position:absolute;width:1px;height:1px;border:0;opacity:0}: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 yi=e=>{throw TypeError(e)};var wi=(e,t,n)=>t.has(e)||yi("Cannot "+n);var Pn=(e,t,n)=>(wi(e,t,"read from private field"),n?n.call(e):t.get(e)),Cn=(e,t,n)=>t.has(e)?yi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),jn=(e,t,n,i)=>(wi(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,ca=Array.prototype.indexOf,Zn=Array.from,ua=Object.defineProperty,it=Object.getOwnPropertyDescriptor,Ui=Object.getOwnPropertyDescriptors,da=Object.prototype,fa=Array.prototype,Gn=Object.getPrototypeOf;function kt(e){return typeof e=="function"}const st=()=>{};function va(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 Be=2,zi=4,Kt=8,hn=16,Ve=32,Yt=64,cn=128,gt=256,un=512,je=1024,at=2048,mn=4096,Ue=8192,Et=16384,Wi=32768,pt=65536,_a=1<<17,Ki=1<<19,Yi=1<<20,ze=Symbol("$state"),Zi=Symbol("legacy props"),ha=Symbol("");function Gi(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 ma(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 pa(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ya(e){throw new Error("https://svelte.dev/e/effect_orphan")}function wa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ka(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ba(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function xa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sa(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ea(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Tt=!1,Ta=!1;function Ia(){Tt=!0}const Qn=1,$n=2,Xi=4,Aa=8,Pa=16,Ca=1,ja=2,Ma=4,La=8,Na=16,Oa=1,Da=2,Ra=4,qa=1,Ha=2,be=Symbol(),Ji="http://www.w3.org/2000/svg";function Ee(e,t){var n={f:0,v:e,reactions:null,equals:Gi,rv:0,wv:0};return n}function U(e){return Ba(Ee(e))}function Qi(e,t=!1){var i;const n=Ee(e);return t||(n.equals=Jn),Tt&&ne!==null&&ne.l!==null&&((i=ne.l).s??(i.s=[])).push(n),n}function Ba(e){return te!==null&&te.f&Be&&(We===null?eo([e]):We.push(e)),e}function P(e,t){return te!==null&&Zt()&&te.f&(Be|hn)&&(We===null||!We.includes(e))&&Ea(),Rn(e,t)}function Rn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=mr(),$i(e,at),Zt()&&Y!==null&&Y.f&je&&!(Y.f&Ve)&&(ye!==null&&ye.includes(e)?(Ye(Y,at),kn(Y)):rt===null?to([e]):rt.push(e))),t}function $i(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],l=o.f;l&at||!i&&o===Y||(Ye(o,t),l&(je|gt)&&(l&Be?$i(o,mn):kn(o)))}}let er=!1;function Q(e,t=null,n){if(typeof e!="object"||e===null||ze in e)return e;const i=Gn(e);if(i!==da&&i!==fa)return e;var r=new Map,a=Yn(e),o=Ee(0);a&&r.set("length",Ee(e.length));var l;return new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&ba();var f=r.get(c);return f===void 0?(f=Ee(d.value),r.set(c,f)):P(f,Q(d.value,l)),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&r.set(c,Ee(be));else{if(a&&typeof c=="string"){var f=r.get("length"),v=Number(c);Number.isInteger(v)&&v<f.v&&P(f,v)}P(d,be),ki(o)}return!0},get(s,c,d){var m;if(c===ze)return e;var f=r.get(c),v=c in s;if(f===void 0&&(!v||(m=it(s,c))!=null&&m.writable)&&(f=Ee(Q(v?s[c]:be,l)),r.set(c,f)),f!==void 0){var g=u(f);return g===be?void 0:g}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var f=r.get(c);f&&(d.value=u(f))}else if(d===void 0){var v=r.get(c),g=v==null?void 0:v.v;if(v!==void 0&&g!==be)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return d},has(s,c){var g;if(c===ze)return!0;var d=r.get(c),f=d!==void 0&&d.v!==be||Reflect.has(s,c);if(d!==void 0||Y!==null&&(!f||(g=it(s,c))!=null&&g.writable)){d===void 0&&(d=Ee(f?Q(s[c],l):be),r.set(c,d));var v=u(d);if(v===be)return!1}return f},set(s,c,d,f){var S;var v=r.get(c),g=c in s;if(a&&c==="length")for(var m=d;m<v.v;m+=1){var h=r.get(m+"");h!==void 0?P(h,be):m in s&&(h=Ee(be),r.set(m+"",h))}v===void 0?(!g||(S=it(s,c))!=null&&S.writable)&&(v=Ee(void 0),P(v,Q(d,l)),r.set(c,v)):(g=v.v!==be,P(v,Q(d,l)));var w=Reflect.getOwnPropertyDescriptor(s,c);if(w!=null&&w.set&&w.set.call(f,d),!g){if(a&&typeof c=="string"){var p=r.get("length"),y=Number(c);Number.isInteger(y)&&y>=p.v&&P(p,y+1)}ki(o)}return!0},ownKeys(s){u(o);var c=Reflect.ownKeys(s).filter(v=>{var g=r.get(v);return g===void 0||g.v!==be});for(var[d,f]of r)f.v!==be&&!(d in s)&&c.push(d);return c},setPrototypeOf(){xa()}})}function ki(e,t=1){P(e,e.v+t)}function bi(e){return e!==null&&typeof e=="object"&&ze in e?e[ze]:e}function Fa(e,t){return Object.is(bi(e),bi(t))}var ke,tr,nr;function Va(){if(ke===void 0){ke=window;var e=Element.prototype,t=Node.prototype;tr=it(t,"firstChild").get,nr=it(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 It(e=""){return document.createTextNode(e)}function ft(e){return tr.call(e)}function gn(e){return nr.call(e)}function x(e,t){return ft(e)}function ee(e,t){{var n=ft(e);return n instanceof Comment&&n.data===""?gn(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=gn(i);return i}function Ua(e){e.textContent=""}function z(e){var t=Be|at;Y===null?t|=gt:Y.f|=Yi;var n=te!==null&&te.f&Be?te:null;const i={children:null,ctx:ne,deps:null,equals:Gi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Y};return n!==null&&(n.children??(n.children=[])).push(i),i}function za(e){const t=z(e);return t.equals=Jn,t}function ir(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&Be?ei(i):Re(i)}}}function Wa(e){for(var t=e.parent;t!==null;){if(!(t.f&Be))return t;t=t.parent}return null}function rr(e){var t,n=Y;Te(Wa(e));try{ir(e),t=gr(e)}finally{Te(n)}return t}function ar(e){var t=rr(e),n=(nt||e.f>)&&e.deps!==null?mn:je;Ye(e,n),e.equals(t)||(e.v=t,e.wv=mr())}function ei(e){ir(e),Bt(e,0),Ye(e,Et),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ka(e){Y===null&&te===null&&ya(),te!==null&&te.f>&&pa(),ni&&ga()}function Ya(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function At(e,t,n,i=!0){var r=(e&Yt)!==0,a=Y,o={ctx:ne,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|at,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=bt;try{xi(!0),wn(o),o.f|=Wi}catch(d){throw Re(o),d}finally{xi(l)}}else t!==null&&kn(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&Yi)===0;if(!s&&!r&&i&&(a!==null&&Ya(o,a),te!==null&&te.f&Be)){var c=te;(c.children??(c.children=[])).push(o)}return o}function Za(){return te===null?!1:!nt}function Ga(e){const t=At(Kt,null,!1);return Ye(t,je),t.teardown=e,t}function pn(e){Ka();var t=Y!==null&&(Y.f&Ve)!==0&&ne!==null&&!ne.m;if(t){var n=ne;(n.e??(n.e=[])).push({fn:e,effect:Y,reaction:te})}else{var i=yt(e);return i}}function Xa(e){const t=At(Yt,e,!0);return(n={})=>new Promise(i=>{n.outro?vt(t,()=>{Re(t),i(void 0)}):(Re(t),i(void 0))})}function yt(e){return At(zi,e,!1)}function yn(e){return At(Kt,e,!0)}function N(e){return Qe(e)}function Qe(e,t=0){return At(Kt|hn|t,e,!0)}function De(e,t=!0){return At(Kt|Ve,e,!0,t)}function or(e){var t=e.teardown;if(t!==null){const n=ni,i=te;Si(!0),qe(null);try{t.call(null)}finally{Si(n),qe(i)}}}function lr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)ei(t[n])}}function sr(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 Ja(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&Ki)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:gn(i);i.remove(),i=a}n=!0}sr(e,t&&!n),lr(e),Bt(e,0),Ye(e,Et);var o=e.transitions;if(o!==null)for(const s of o)s.stop();or(e);var l=e.parent;l!==null&&l.first!==null&&cr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function cr(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),ur(n,()=>{Re(e),t&&t()})}function ur(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&pt)!==0||(i.f&Ve)!==0;ti(i,t,a?n:!1),i=r}}}function Rt(e){dr(e,!0)}function dr(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&pt)!==0||(n.f&Ve)!==0;dr(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 fr(){dn=!1;const e=qn.slice();qn=[],va(e)}function Pt(e){dn||(dn=!0,queueMicrotask(fr)),qn.push(e)}function Qa(){dn&&fr()}function vr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const _r=0,$a=1;let Mt=!1,ln=_r,qt=!1,Ht=null,bt=!1,ni=!1;function xi(e){bt=e}function Si(e){ni=e}let ct=[],xt=0;let te=null;function qe(e){te=e}let Y=null;function Te(e){Y=e}let We=null;function eo(e){We=e}let ye=null,Pe=0,rt=null;function to(e){rt=e}let hr=1,Hn=0,nt=!1,ne=null;function Ei(e){ne=e}function mr(){return++hr}function Zt(){return!Tt||ne!==null&&ne.l===null}function Gt(e){var c;var t=e.f;if(t&at)return!0;if(t&mn){var n=e.deps,i=(t>)!==0;if(n!==null){var r,a,o=(t&un)!==0,l=i&&Y!==null&&!nt,s=n.length;if(o||l){for(r=0;r<s;r++)a=n[r],(o||!((c=a==null?void 0:a.reactions)!=null&&c.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=un)}for(r=0;r<s;r++)if(a=n[r],Gt(a)&&ar(a),a.wv>e.wv)return!0}(!i||Y!==null&&!nt)&&Ye(e,je)}return!1}function no(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 Mt=!1,e}function io(e){return(e.f&Et)===0&&(e.parent===null||(e.parent.f&cn)===0)}function Mn(){Mt=!1}function Xt(e,t,n,i){if(Mt){if(n===null&&(Mt=!1),io(t))throw e;return}n!==null&&(Mt=!0);{no(e,t);return}}function gr(e){var v;var t=ye,n=Pe,i=rt,r=te,a=nt,o=We,l=ne,s=e.f;ye=null,Pe=0,rt=null,te=s&(Ve|Yt)?null:e,nt=!bt&&(s>)!==0,We=null,ne=e.ctx,Hn++;try{var c=(0,e.fn)(),d=e.deps;if(ye!==null){var f;if(Bt(e,Pe),d!==null&&Pe>0)for(d.length=Pe+ye.length,f=0;f<ye.length;f++)d[Pe+f]=ye[f];else e.deps=d=ye;if(!nt)for(f=Pe;f<d.length;f++)((v=d[f]).reactions??(v.reactions=[])).push(e)}else d!==null&&Pe<d.length&&(Bt(e,Pe),d.length=Pe);return c}finally{ye=t,Pe=n,rt=i,te=r,nt=a,We=o,ne=l}}function ro(e,t){let n=t.reactions;if(n!==null){var i=ca.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&Be&&(ye===null||!ye.includes(t))&&(Ye(t,mn),t.f&(gt|un)||(t.f^=un),Bt(t,0))}function Bt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)ro(e,n[i])}function wn(e){var t=e.f;if(!(t&Et)){Ye(e,je);var n=Y,i=ne;Y=e;try{t&hn?Ja(e):sr(e),lr(e),or(e);var r=gr(e);e.teardown=typeof r=="function"?r:null,e.wv=hr;var a=e.deps,o;Dn&&Ta&&e.f&at}catch(l){Xt(l,e,n,i||e.ctx)}finally{Y=n}}}function pr(){if(xt>1e3){xt=0;try{wa()}catch(e){if(Ht!==null)Xt(e,Ht,null);else throw e}}xt++}function yr(e){var t=e.length;if(t!==0){pr();var n=bt;bt=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&je||(r.f^=je);var a=[];wr(r,a),ao(a)}}finally{bt=n}}}function ao(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(Et|Ue)))try{Gt(i)&&(wn(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?cr(i):i.fn=null))}catch(r){Xt(r,i,null,i.ctx)}}}function oo(){if(qt=!1,xt>1001)return;const e=ct;ct=[],yr(e),qt||(xt=0,Ht=null)}function kn(e){ln===_r&&(qt||(qt=!0,queueMicrotask(oo))),Ht=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Yt|Ve)){if(!(n&je))return;t.f^=je}}ct.push(t)}function wr(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&Ve)!==0,o=a&&(r&je)!==0,l=n.next;if(!o&&!(r&Ue))if(r&Kt){if(a)n.f^=je;else try{Gt(n)&&wn(n)}catch(f){Xt(f,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}else r&zi&&i.push(n);if(l===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var c=f.next;if(c!==null){n=c;continue e}f=f.parent}}n=l}for(var d=0;d<i.length;d++)s=i[d],t.push(s),wr(s,t)}function kr(e){var t=ln,n=ct;try{pr();const r=[];ln=$a,ct=r,qt=!1,yr(n);var i=e==null?void 0:e();return Qa(),(ct.length>0||r.length>0)&&kr(),xt=0,Ht=null,i}finally{ln=t,ct=n}}async function Bn(){await Promise.resolve(),kr()}function u(e){var d;var t=e.f,n=(t&Be)!==0;if(n&&t&Et){var i=rr(e);return ei(e),i}if(te!==null){We!==null&&We.includes(e)&&Sa();var r=te.deps;e.rv<Hn&&(e.rv=Hn,ye===null&&r!==null&&r[Pe]===e?Pe++:ye===null?ye=[e]:ye.push(e),rt!==null&&Y!==null&&Y.f&je&&!(Y.f&Ve)&&rt.includes(e)&&(Ye(Y,at),kn(Y)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Be){var s=o;l=s,o=s.parent}else{var c=o;(d=c.deriveds)!=null&&d.includes(l)||(c.deriveds??(c.deriveds=[])).push(l);break}return n&&(a=e,Gt(a)&&ar(a)),e.v}function Ke(e){const t=te;try{return te=null,e()}finally{te=t}}const lo=-7169;function Ye(e,t){e.f=e.f&lo|t}function so(e){return xr().get(e)}function br(e,t){return xr().set(e,t),t}function xr(e){return ne===null&&vr(),ne.c??(ne.c=new Map(co(ne)||void 0))}function co(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function le(e,t=!1,n){ne={p:ne,c:null,e:null,m:!1,s:e,x:null,l:null},Tt&&!t&&(ne.l={s:null,u:null,r1:[],r2:Ee(!1)})}function se(e){const t=ne;if(t!==null){const o=t.e;if(o!==null){var n=Y,i=te;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Te(a.effect),qe(a.reaction),yt(a.fn)}}finally{Te(n),qe(i)}}ne=t.p,t.m=!0}return{}}function uo(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=Ui(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function fo(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const vo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function _o(e){return vo.includes(e)}const ho={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function mo(e){return e=e.toLowerCase(),ho[e]??e}const go=["touchstart","touchmove"];function po(e){return go.includes(e)}function yo(e,t){if(t){const n=document.body;e.autofocus=!0,Pt(()=>{document.activeElement===n&&e.focus()})}}let Ti=!1;function wo(){Ti||(Ti=!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 Sr(e){var t=te,n=Y;qe(null),Te(null);try{return e()}finally{qe(t),Te(n)}}function Er(e,t,n,i=n){e.addEventListener(t,()=>Sr(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),wo()}const Tr=new Set,Vn=new Set;function ii(e,t,n,i){function r(a){if(i.capture||jt.call(t,a),!a.cancelBubble)return Sr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Pt(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function ko(e,t,n,i={}){var r=ii(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function de(e,t,n,i,r){var a={capture:i,passive:r},o=ii(e,t,n,a);(t===document.body||t===window||t===document)&&Ga(()=>{t.removeEventListener(e,o,a)})}function fe(e){for(var t=0;t<e.length;t++)Tr.add(e[t]);for(var n of Vn)n(e)}function jt(e){var y;var t=this,n=t.ownerDocument,i=e.type,r=((y=e.composedPath)==null?void 0:y.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var s=r.indexOf(l);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var c=r.indexOf(t);if(c===-1)return;s<=c&&(o=s)}if(a=r[o]||e.target,a!==t){ua(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=te,f=Y;qe(null),Te(null);try{for(var v,g=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+i];if(h!==void 0&&!a.disabled)if(Yn(h)){var[w,...p]=h;w.apply(a,[e,...p])}else h.call(a,e)}catch(S){v?g.push(S):v=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(v){for(let S of g)queueMicrotask(()=>{throw S});throw v}}finally{e.__root=t,delete e.currentTarget,qe(d),Te(f)}}}function bo(e){var t;t=document.head.appendChild(It());try{Qe(()=>e(t),Ki)}finally{}}function ri(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function _t(e,t){var n=Y;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&qa)!==0,i=(t&Ha)!==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 l=ft(o),s=o.lastChild;_t(l,s)}else _t(o,o);return o}}function Me(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=ri(r),l=ft(o);a=ft(l)}var s=a.cloneNode(!0);return _t(s,s),s}}function Fe(e=""){{var t=It(e+"");return _t(t,t),t}}function He(){var e=document.createDocumentFragment(),t=document.createComment(""),n=It();return e.append(t,n),_t(t,n),e}function k(e,t){e!==null&&e.before(t)}let fn=!0;function Ii(e){fn=e}function Z(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function Jt(e,t){return xo(e,t)}const wt=new Map;function xo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){Va();var l=new Set,s=f=>{for(var v=0;v<f.length;v++){var g=f[v];if(!l.has(g)){l.add(g);var m=po(g);t.addEventListener(g,jt,{passive:m});var h=wt.get(g);h===void 0?(document.addEventListener(g,jt,{passive:m}),wt.set(g,1)):wt.set(g,h+1)}}};s(Zn(Tr)),Vn.add(s);var c=void 0,d=Xa(()=>{var f=n??t.appendChild(It());return De(()=>{if(a){le({});var v=ne;v.c=a}r&&(i.$$events=r),fn=o,c=e(f,i)||{},fn=!0,a&&se()}),()=>{var m;for(var v of l){t.removeEventListener(v,jt);var g=wt.get(v);--g===0?(document.removeEventListener(v,jt),wt.delete(v)):wt.set(v,g)}Vn.delete(s),f!==n&&((m=f.parentNode)==null||m.removeChild(f))}});return Un.set(c,d),c}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=be,l=n?pt:0,s=!1;const c=(f,v=!0)=>{s=!0,d(v,f)},d=(f,v)=>{o!==(o=f)&&(o?(r?Rt(r):v&&(r=De(()=>v(i))),a&&vt(a,()=>{a=null})):(a?Rt(a):v&&(a=De(()=>v(i))),r&&vt(r,()=>{r=null})))};Qe(()=>{s=!1,t(c),s||d(null,null)},l)}function Ir(e,t,n){var i=e,r=be,a,o=Zt()?ma:Xn;Qe(()=>{o(r,r=t())&&(a&&vt(a),a=De(()=>n(i)))})}function ht(e,t){return t}function So(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)ti(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var s=n.parentNode;Ua(s),s.append(n),i.clear(),tt(e,t[0].prev,t[a-1].next)}ur(r,()=>{for(var c=0;c<a;c++){var d=t[c];l||(i.delete(d.k),tt(e,d.prev,d.next)),Re(d.e,!l)}})}function Je(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},s=(t&Xi)!==0;if(s){var c=e;o=c.appendChild(It())}var d=null,f=!1;Qe(()=>{var v=n(),g=Yn(v)?v:v==null?[]:Zn(v),m=g.length;if(!(f&&m===0)){f=m===0;{var h=te;Eo(g,l,o,r,t,(h.f&Ue)!==0,i)}a!==null&&(m===0?d?Rt(d):d=De(()=>a(o)):d!==null&&vt(d,()=>{d=null})),n()}})}function Eo(e,t,n,i,r,a,o,l){var L,D,H,ie;var s=(r&Aa)!==0,c=(r&(Qn|$n))!==0,d=e.length,f=t.items,v=t.first,g=v,m,h=null,w,p=[],y=[],S,j,b,T;if(s)for(T=0;T<d;T+=1)S=e[T],j=o(S,T),b=f.get(j),b!==void 0&&((L=b.a)==null||L.measure(),(w??(w=new Set)).add(b));for(T=0;T<d;T+=1){if(S=e[T],j=o(S,T),b=f.get(j),b===void 0){var F=g?g.e.nodes_start:n;h=Io(F,t,h,h===null?t.first:h.next,S,j,T,i,r),f.set(j,h),p=[],y=[],g=h.next;continue}if(c&&To(b,S,T,r),b.e.f&Ue&&(Rt(b.e),s&&((D=b.a)==null||D.unfix(),(w??(w=new Set)).delete(b))),b!==g){if(m!==void 0&&m.has(b)){if(p.length<y.length){var M=y[0],I;h=M.prev;var R=p[0],W=p[p.length-1];for(I=0;I<p.length;I+=1)Ai(p[I],M,n);for(I=0;I<y.length;I+=1)m.delete(y[I]);tt(t,R.prev,W.next),tt(t,h,R),tt(t,W,M),g=M,h=W,T-=1,p=[],y=[]}else m.delete(b),Ai(b,g,n),tt(t,b.prev,b.next),tt(t,b,h===null?t.first:h.next),tt(t,h,b),h=b;continue}for(p=[],y=[];g!==null&&g.k!==j;)(a||!(g.e.f&Ue))&&(m??(m=new Set)).add(g),y.push(g),g=g.next;if(g===null)continue;b=g}p.push(b),h=b,g=b.next}if(g!==null||m!==void 0){for(var G=m===void 0?[]:Zn(m);g!==null;)(a||!(g.e.f&Ue))&&G.push(g),g=g.next;var V=G.length;if(V>0){var C=r&Xi&&d===0?n:null;if(s){for(T=0;T<V;T+=1)(H=G[T].a)==null||H.measure();for(T=0;T<V;T+=1)(ie=G[T].a)==null||ie.fix()}So(t,G,C,f)}}s&&Pt(()=>{var X;if(w!==void 0)for(b of w)(X=b.a)==null||X.apply()}),Y.first=t.first&&t.first.e,Y.last=h&&h.e}function To(e,t,n,i){i&Qn&&Rn(e.v,t),i&$n?Rn(e.i,n):e.i=n}function Io(e,t,n,i,r,a,o,l,s,c){var d=(s&Qn)!==0,f=(s&Pa)===0,v=d?f?Qi(r):Ee(r):r,g=s&$n?Ee(o):o,m={i:g,v,k:a,a:null,e:null,prev:n,next:i};try{return m.e=De(()=>l(e,v,g),er),m.e.prev=n&&n.e,m.e.next=i&&i.e,n===null?t.first=m:(n.next=m,n.e.next=m.e),i!==null&&(i.prev=m,i.e.prev=m.e),m}finally{}}function Ai(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=gn(a);r.before(a),a=o}}function tt(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 Ao(e,t,n,i,r){var a=e,o="",l;Qe(()=>{o!==(o=t()??"")&&(l!==void 0&&(Re(l),l=void 0),o!==""&&(l=De(()=>{var s=o+"",c=ri(s);_t(ft(c),c.lastChild),a.before(c)})))})}function Ct(e,t,...n){var i=e,r=st,a;Qe(()=>{r!==(r=t())&&(a&&(Re(a),a=null),a=De(()=>r(i,...n)))},pt)}function Po(e,t,n,i,r,a){var o,l,s=null,c=e,d;Qe(()=>{const f=t()||null;var v=f==="svg"?Ji:null;f!==o&&(d&&(f===null?vt(d,()=>{d=null,l=null}):f===l?Rt(d):(Re(d),Ii(!1))),f&&f!==l&&(d=De(()=>{s=v?document.createElementNS(v,f):document.createElement(f),_t(s,s);{var g=s.appendChild(It());i(s,g)}Y.nodes_end=s,c.before(s)})),o=f,o&&(l=o),Ii(!0))},pt)}function Qt(e,t,n){yt(()=>{var i=Ke(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};yn(()=>{var o=n();uo(o),r&&Xn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Ar(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=Ar(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=Ar(e))&&(i&&(i+=" "),i+=t);return i}function jo(e){return typeof e=="object"?Co(e):e??""}function Mo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ce(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[ha]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Pr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Lo(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},s=e.tagName==="OPTION";for(var c in t)c in n||(n[c]=null);n.class&&(n.class=jo(n.class)),n.class=n.class?n.class+" "+i:i;var d=Pr(e),f=e.__attributes??(e.__attributes={});for(const y in n){let S=n[y];if(s&&y==="value"&&S==null){e.value=e.__value="",l[y]=S;continue}var v=l[y];if(S!==v){l[y]=S;var g=y[0]+y[1];if(g!=="$$"){if(g==="on"){const j={},b="$$"+y;let T=y.slice(2);var m=_o(T);if(fo(T)&&(T=T.slice(0,-7),j.capture=!0),!m&&v){if(S!=null)continue;e.removeEventListener(T,l[b],j),l[b]=null}if(S!=null)if(m)e[`__${T}`]=S,fe([T]);else{let F=function(M){l[y].call(this,M)};var p=F;l[b]=ii(T,e,F,j)}else m&&(e[`__${T}`]=void 0)}else if(y==="style"&&S!=null)e.style.cssText=S+"";else if(y==="autofocus")yo(e,!!S);else if(y==="__value"||y==="value"&&S!=null)e.value=e[y]=e.__value=S;else if(y==="selected"&&s)Mo(e,S);else{var h=y;r||(h=mo(h));var w=h==="defaultValue"||h==="defaultChecked";if(S==null&&!a&&!w)if(f[y]=null,h==="value"||h==="checked"){let j=e;if(h==="value"){let b=j.defaultValue;j.removeAttribute(h),j.defaultValue=b}else{let b=j.defaultChecked;j.removeAttribute(h),j.defaultChecked=b}}else e.removeAttribute(y);else w||d.includes(h)&&(a||typeof S!="string")?e[h]=S:typeof S!="function"&&ce(e,h,S)}y==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var Pi=new Map;function Pr(e){var t=Pi.get(e.nodeName);if(t)return t;Pi.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Ui(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=Oo(t);(i!==r||er)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Oo(e,t){return(e??"")+""}function ue(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 Do=()=>performance.now(),Xe={tick:e=>requestAnimationFrame(e),now:()=>Do(),tasks:new Set};function Cr(){const e=Xe.now();Xe.tasks.forEach(t=>{t.c(e)||(Xe.tasks.delete(t),t.f())}),Xe.tasks.size!==0&&Xe.tick(Cr)}function Ro(e){let t;return Xe.tasks.size===0&&Xe.tick(Cr),{promise:new Promise(n=>{Xe.tasks.add(t={c:e,f:n})}),abort(){Xe.tasks.delete(t)}}}function an(e,t){e.dispatchEvent(new CustomEvent(t))}function qo(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 Ci(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=qo(r.trim());t[o]=a.trim()}return t}const Ho=e=>e;function Ce(e,t,n,i){var r=(e&Oa)!==0,a=(e&Da)!==0,o=r&&a,l=(e&Ra)!==0,s=o?"both":r?"in":"out",c,d=t.inert,f,v;function g(){var y=te,S=Y;qe(null),Te(null);try{return c??(c=n()(t,(i==null?void 0:i())??{},{direction:s}))}finally{qe(y),Te(S)}}var m={is_global:l,in(){var y;if(t.inert=d,!r){v==null||v.abort(),(y=v==null?void 0:v.reset)==null||y.call(v);return}a||f==null||f.abort(),an(t,"introstart"),f=zn(t,g(),v,1,()=>{an(t,"introend"),f==null||f.abort(),f=c=void 0})},out(y){if(!a){y==null||y(),c=void 0;return}t.inert=!0,an(t,"outrostart"),v=zn(t,g(),f,0,()=>{an(t,"outroend"),y==null||y()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},h=Y;if((h.transitions??(h.transitions=[])).push(m),r&&fn){var w=l;if(!w){for(var p=h.parent;p&&p.f&pt;)for(;(p=p.parent)&&!(p.f&hn););w=!p||(p.f&Wi)!==0}w&&yt(()=>{Ke(()=>m.in())})}}function zn(e,t,n,i,r){var a=i===1;if(kt(t)){var o,l=!1;return Pt(()=>{if(!l){var w=t({direction:a?"in":"out"});o=zn(e,w,n,i,r)}}),{abort:()=>{l=!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:s=0,css:c,tick:d,easing:f=Ho}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),c)){var g=Ci(c(0,1));v.push(g,g)}var m=()=>1-i,h=e.animate(v,{duration:s});return h.onfinish=()=>{var w=(n==null?void 0:n.t())??1-i;n==null||n.abort();var p=i-w,y=t.duration*Math.abs(p),S=[];if(y>0){if(c)for(var j=Math.ceil(y/16.666666666666668),b=0;b<=j;b+=1){var T=w+p*f(b/j),F=c(T,1-T);S.push(Ci(F))}m=()=>{var M=h.currentTime;return w+p*f(M/y)},d&&Ro(()=>{if(h.playState!=="running")return!1;var M=m();return d(M,1-M),!0})}h=e.animate(S,{duration:y,fill:"forwards"}),h.onfinish=()=>{m=()=>i,d==null||d(i,1-i),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=st)},deactivate:()=>{r=st},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>m()}}function Bo(e,t,n=t){var i=Zt();Er(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Ln(e)?Nn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),Ke(t)==null&&e.value&&n(Ln(e)?Nn(e.value):e.value),yn(()=>{var r=t();Ln(e)&&r===Nn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Ln(e){var t=e.type;return t==="number"||t==="range"}function Nn(e){return e===""?null:+e}function jr(e,t,n){if(e.multiple)return Uo(e,t);for(var i of e.options){var r=Lt(i);if(Fa(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Fo(e,t){yt(()=>{var n=new MutationObserver(()=>{var i=e.__value;jr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function Vo(e,t,n=t){var i=!0;Er(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Lt);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Lt(l)}n(o)}),yt(()=>{var r=t();if(jr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=Lt(a),n(r))}e.__value=r,i=!1}),Fo(e)}function Uo(e,t){for(var n of e.options)n.selected=~t.indexOf(Lt(n))}function Lt(e){return"__value"in e?e.__value:e.value}function ji(e,t){return e===t||(e==null?void 0:e[ze])===t}function $t(e={},t,n,i){return yt(()=>{var r,a;return yn(()=>{r=a,a=[],Ke(()=>{e!==n(...a)&&(t(e,...a),r&&ji(n(...r),e)&&t(null,...r))})}),()=>{Pt(()=>{a&&ji(n(...a),e)&&t(null,...a)})}}),e}let on=!1;function zo(e){var t=on;try{return on=!1,[e(),on]}finally{on=t}}const Wo={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 Ko(e,t,n){return new Proxy({props:e,exclude:t},Wo)}const Yo={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(kt(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];kt(r)&&(r=r());const a=it(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(kt(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=it(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===ze||t===Zi)return!1;for(let n of e.props)if(kt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){kt(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function Zo(...e){return new Proxy({props:e},Yo)}function Mi(e){for(var t=Y,n=Y;t!==null&&!(t.f&(Ve|Yt));)t=t.parent;try{return Te(t),e()}finally{Te(n)}}function O(e,t,n,i){var F;var r=(n&Ca)!==0,a=!Tt||(n&ja)!==0,o=(n&La)!==0,l=(n&Na)!==0,s=!1,c;o?[c,s]=zo(()=>e[t]):c=e[t];var d=ze in e||Zi in e,f=o&&(((F=it(e,t))==null?void 0:F.set)??(d&&t in e&&(M=>e[t]=M)))||void 0,v=i,g=!0,m=!1,h=()=>(m=!0,g&&(g=!1,l?v=Ke(i):v=i),v);c===void 0&&i!==void 0&&(f&&a&&ka(),c=h(),f&&f(c));var w;if(a)w=()=>{var M=e[t];return M===void 0?h():(g=!0,m=!1,M)};else{var p=Mi(()=>(r?z:za)(()=>e[t]));p.f|=_a,w=()=>{var M=u(p);return M!==void 0&&(v=void 0),M===void 0?v:M}}if(!(n&Ma))return w;if(f){var y=e.$$legacy;return function(M,I){return arguments.length>0?((!a||!I||y||s)&&f(I?w():M),M):w()}}var S=!1,j=!1,b=Qi(c),T=Mi(()=>z(()=>{var M=w(),I=u(b);return S?(S=!1,j=!0,I):(j=!1,b.v=M)}));return r||(T.equals=Jn),function(M,I){if(arguments.length>0){const R=I?u(T):a&&o?Q(M):M;return T.equals(R)||(S=!0,P(b,R),m&&v!==void 0&&(v=R),Ke(()=>u(T))),M}return u(T)}}function Li(e,t){var n=Y,i=te,r=ne;Te(e),qe(e),Ei(e.ctx);try{t()}finally{Te(n),qe(i),Ei(r)}}function Go(e,t,n){var i=e,r;Qe(()=>{var a=Y,o=!1;a.fn=l=>{var s=t.onerror;let c=t.failed;if(!s&&!c||o)throw l;var d=()=>{vt(r),Li(a,()=>{o=!1,r=De(()=>n(i)),Mn()})};s==null||s(l,d),r&&Re(r),Pt(()=>{Li(a,()=>{o=!0;try{r=De(()=>{c(i,()=>l,()=>d)})}catch(f){Xt(f,a,null,a.ctx)}Mn(),o=!1})})},r=De(()=>n(i)),Mn()},pt|cn)}function Ze(e){ne===null&&vr(),Tt&&ne.l!==null?Xo(ne).m.push(e):pn(()=>{const t=Ke(e);if(typeof t=="function")return t})}function Xo(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Jo="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Jo);const Mr="https://www.playpilot.com",Sn="https://partner-api.playpilot.tech/1.0.0",Lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",he=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",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 Qo="https://insights.playpilot.net";async function pe(e,t=null,n={}){var r,a,o;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,title_type:t.type,providers:[...new Set(((r=t.providers)==null?void 0:r.map(l=>l.name))||[])],...n}),n.url=ai(),n.organization_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.organization_sid,n.domain_sid=(o=window.PlayPilotLinkInjections)==null?void 0:o.domain_sid,fetch(Qo,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})}),$o({event:e,payload:n})}function $o(e){var t;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(t=window.PlayPilotLinkInjections.tracked_events)==null||t.push(e)}function el({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const oi="EncryptedToken",Nr="articleReplacementEditToken",Or="playpilot-editorial-mode";async function Dr(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 tl(i),!0}catch(n){console.error(n),pe(he.AuthFailed)}finally{rl()}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(Nr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${oi}=`).pop())==null?void 0:r.split(";")[0])||""}function tl(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 nl(){document.cookie=oi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Rr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(Or)==="true"||!!e}function il(){const e=new URL(window.location.href);e.searchParams.set(Or,"true"),window.history.replaceState({},"",e)}function rl(){const e=new URL(window.location.href);e.searchParams.delete(Nr),window.history.replaceState({},"",e)}function al(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 qr(){return(Math.random()+1).toString(36).substring(7)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),ol={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function we(e,t=Hr()){var n;return((n=ol[e])==null?void 0:n[t])||e}function Hr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(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 _.English}const ll=e=>e;function si(e){const t=e-1;return t*t*t+1}function Ni(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Ft(e,{delay:t=0,duration:n=400,easing:i=ll}={}){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 l=getComputedStyle(e),s=+l.opacity,c=l.transform==="none"?"":l.transform,d=s*(1-o),[f,v]=Ni(r),[g,m]=Ni(a);return{delay:t,duration:n,easing:i,css:(h,w)=>`
|
|
4
|
-
transform: ${
|
|
5
|
-
opacity: ${
|
|
6
|
-
transform: ${
|
|
2
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.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-1gro5q8{height:36px;width:36px;border-radius:8px;background:#00000040}.heading.svelte-1gro5q8{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-1gro5q8{box-sizing:border-box;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px}.playlinks.list.svelte-1gro5q8{grid-template-columns:1fr}@keyframes svelte-1gro5q8-sheen{0%,20%,60%,80.01%,to{background-position:-100% 0}80%{background-position:100% 0}}.playlink.svelte-1gro5q8{position:relative;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))!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-1gro5q8:hover,.playlink.svelte-1gro5q8: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-1gro5q8{grid-column:span 2}.list.svelte-1gro5q8 .playlink.highlighted:where(.svelte-1gro5q8){grid-column:1}.playlink.highlighted.svelte-1gro5q8:before{content:"";z-index:1;display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(to left,currentColor 20%,transparent 50%,currentColor 80%);background-size:200% 100%;background-position:-100% 0;opacity:.35;pointer-events:none}@media (prefers-reduced-motion: no-preference){.playlink.highlighted.svelte-1gro5q8:before{animation:svelte-1gro5q8-sheen 4s ease-in-out infinite}}.playlink.highlighted.svelte-1gro5q8:after{content:"";z-index:2;display:block;position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:inherit;background:var(--playpilot-playlink-background, var(--playpilot-lighter))}.playlink.svelte-1gro5q8 img:where(.svelte-1gro5q8){grid-area:image;margin:0}.playlink-content.svelte-1gro5q8{position:relative;z-index:5;display:grid;grid-template-areas:"image name action" "image category action";grid-template-columns:36px auto 64px;align-items:center;gap:0 12px;padding:12px}.highlighted.svelte-1gro5q8 .playlink-content:where(.svelte-1gro5q8){grid-template-areas:"image name action" "image category action" "image cta action";gap:4px 12px}.name.svelte-1gro5q8{grid-area:name;width:100%;overflow:hidden;font-weight:var(--playpilot-playlink-font-weight, 500);font-family:var(--playpilot-playlink-font-family, inherit);text-overflow:ellipsis;white-space:nowrap}.category.svelte-1gro5q8{grid-area:category;width:100%;font-size:var(--playpilot-playlinks-category-font-size, 10px);color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.cta.svelte-1gro5q8{grid-area:cta;width:100%;font-size:var(--playpilot-playlinks-cta-font-size, var(--playpilot-playlinks-category-font-size, 10px));color:var(--playpilot-playlink-cta-text-color, var(--playpilot-playlink-category-text-color, var(--playpilot-text-color)));font-weight:var(--playpilot-playlink-cta-font-weight, var(--playpilot-playlink-category-font-weight, inherit));font-family:var(--playpilot-playlink-cta-font-family, var(--playpilot-playlink-category-font-family, inherit))}.disclaimer.svelte-1gro5q8{margin-top:var(--playpilot-playlinks-disclaimer-margin-top, 8px);opacity:var(--playpilot-playlinks-disclaimer-opacity, .65);color:var(--playpilot-playlinks-disclaimer-text-color, var(--playpilot-text-color-alt));font-size:var(--playpilot-playlinks-disclaimer-font-size, 10px);font-style:var(--playpilot-playlinks-disclaimer-font-style, normal)}.disclaimer.svelte-1gro5q8 a:where(.svelte-1gro5q8){color:inherit;font-size:inherit;font-style:inherit}.disclaimer.svelte-1gro5q8 a:where(.svelte-1gro5q8):hover{color:var(--playpilot-playlinks-disclaimer-text-color-hover, var(--playpilot-text-color))}.empty.svelte-1gro5q8{white-space:initial;line-height:1.35}.action.svelte-1gro5q8{grid-area:action;margin-left:auto;padding:8px;font-weight:var(--playpilot-playlinks-action-font-weight, 500);color:var(--playpilot-playlinks-action-text-color, var(--playpilot-text-color));border:var(--playpilot-playlinks-action-border, 1px solid currentColor);border-radius:var(--playpilot-playlinks-action-border-radius, 32px)}.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-1us1507{--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-1us1507{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-1us1507{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),576px);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}img.svelte-j7f9xl{position:absolute;width:1px;height:1px;border:0;opacity:0}: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(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
3
|
+
var ya=Object.defineProperty;var Ti=e=>{throw TypeError(e)};var wa=(e,t,n)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ii=(e,t,n)=>wa(e,typeof t!="symbol"?t+"":t,n),Rn=(e,t,n)=>t.has(e)||Ti("Cannot "+n);var Fe=(e,t,n)=>(Rn(e,t,"read from private field"),n?n.call(e):t.get(e)),dt=(e,t,n)=>t.has(e)?Ti("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ot=(e,t,n,i)=>(Rn(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ai=(e,t,n)=>(Rn(e,t,"access private method"),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 Vn=!1;var ei=Array.isArray,ka=Array.prototype.indexOf,ti=Array.from,ba=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Ji=Object.getOwnPropertyDescriptors,xa=Object.prototype,Sa=Array.prototype,ni=Object.getPrototypeOf;function St(e){return typeof e=="function"}const ft=()=>{};function Ea(e){for(var t=0;t<e.length;t++)e[t]()}function _n(e,t,n=!1){return e===void 0?n?t():t:e}const Be=2,Qi=4,Qt=8,xn=16,ze=32,$t=64,hn=128,kt=256,gn=512,je=1024,lt=2048,Sn=4096,We=8192,Pt=16384,$i=32768,bt=65536,Ta=1<<17,er=1<<19,tr=1<<20,Ke=Symbol("$state"),nr=Symbol("legacy props"),Ia=Symbol("");function ir(e){return e===this.v}function ii(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Aa(e,t){return e!==t}function ri(e){return!ii(e,this.v)}function Pa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ca(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ja(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ma(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function La(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Oa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ra(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ct=!1,qa=!1;function Ha(){Ct=!0}const ai=1,oi=2,rr=4,Fa=8,Ba=16,Va=1,Ua=2,za=4,Wa=8,Ka=16,Ya=1,Za=2,Ga=4,Xa=1,Ja=2,xe=Symbol(),ar="http://www.w3.org/2000/svg";function Te(e,t){var n={f:0,v:e,reactions:null,equals:ir,rv:0,wv:0};return n}function V(e){return Qa(Te(e))}function or(e,t=!1){var i;const n=Te(e);return t||(n.equals=ri),Ct&&ie!==null&&ie.l!==null&&((i=ie.l).s??(i.s=[])).push(n),n}function Qa(e){return ne!==null&&ne.f&Be&&(Ye===null?vo([e]):Ye.push(e)),e}function C(e,t){return ne!==null&&en()&&ne.f&(Be|xn)&&(Ye===null||!Ye.includes(e))&&Ra(),Un(e,t)}function Un(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Sr(),lr(e,lt),en()&&Y!==null&&Y.f&je&&!(Y.f&ze)&&(ke!==null&&ke.includes(e)?(Ze(Y,lt),Pn(Y)):ot===null?_o([e]):ot.push(e))),t}function lr(e,t){var n=e.reactions;if(n!==null)for(var i=en(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l<||!i&&o===Y||(Ze(o,t),l&(je|kt)&&(l&Be?lr(o,Sn):Pn(o)))}}let sr=!1;function J(e,t=null,n){if(typeof e!="object"||e===null||Ke in e)return e;const i=ni(e);if(i!==xa&&i!==Sa)return e;var r=new Map,a=ei(e),o=Te(0);a&&r.set("length",Te(e.length));var l;return new Proxy(e,{defineProperty(c,u,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Na();var f=r.get(u);return f===void 0?(f=Te(d.value),r.set(u,f)):C(f,J(d.value,l)),!0},deleteProperty(c,u){var d=r.get(u);if(d===void 0)u in c&&r.set(u,Te(xe));else{if(a&&typeof u=="string"){var f=r.get("length"),v=Number(u);Number.isInteger(v)&&v<f.v&&C(f,v)}C(d,xe),Pi(o)}return!0},get(c,u,d){var g;if(u===Ke)return e;var f=r.get(u),v=u in c;if(f===void 0&&(!v||(g=at(c,u))!=null&&g.writable)&&(f=Te(J(v?c[u]:xe,l)),r.set(u,f)),f!==void 0){var m=s(f);return m===xe?void 0:m}return Reflect.get(c,u,d)},getOwnPropertyDescriptor(c,u){var d=Reflect.getOwnPropertyDescriptor(c,u);if(d&&"value"in d){var f=r.get(u);f&&(d.value=s(f))}else if(d===void 0){var v=r.get(u),m=v==null?void 0:v.v;if(v!==void 0&&m!==xe)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(c,u){var m;if(u===Ke)return!0;var d=r.get(u),f=d!==void 0&&d.v!==xe||Reflect.has(c,u);if(d!==void 0||Y!==null&&(!f||(m=at(c,u))!=null&&m.writable)){d===void 0&&(d=Te(f?J(c[u],l):xe),r.set(u,d));var v=s(d);if(v===xe)return!1}return f},set(c,u,d,f){var S;var v=r.get(u),m=u in c;if(a&&u==="length")for(var g=d;g<v.v;g+=1){var h=r.get(g+"");h!==void 0?C(h,xe):g in c&&(h=Te(xe),r.set(g+"",h))}v===void 0?(!m||(S=at(c,u))!=null&&S.writable)&&(v=Te(void 0),C(v,J(d,l)),r.set(u,v)):(m=v.v!==xe,C(v,J(d,l)));var y=Reflect.getOwnPropertyDescriptor(c,u);if(y!=null&&y.set&&y.set.call(f,d),!m){if(a&&typeof u=="string"){var w=r.get("length"),p=Number(u);Number.isInteger(p)&&p>=w.v&&C(w,p+1)}Pi(o)}return!0},ownKeys(c){s(o);var u=Reflect.ownKeys(c).filter(v=>{var m=r.get(v);return m===void 0||m.v!==xe});for(var[d,f]of r)f.v!==xe&&!(d in c)&&u.push(d);return u},setPrototypeOf(){Oa()}})}function Pi(e,t=1){C(e,e.v+t)}function Ci(e){return e!==null&&typeof e=="object"&&Ke in e?e[Ke]:e}function $a(e,t){return Object.is(Ci(e),Ci(t))}var be,cr,ur;function eo(){if(be===void 0){be=window;var e=Element.prototype,t=Node.prototype;cr=at(t,"firstChild").get,ur=at(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function jt(e=""){return document.createTextNode(e)}function gt(e){return cr.call(e)}function En(e){return ur.call(e)}function x(e,t){return gt(e)}function ee(e,t){{var n=gt(e);return n instanceof Comment&&n.data===""?En(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=En(i);return i}function to(e){e.textContent=""}function z(e){var t=Be|lt;Y===null?t|=kt:Y.f|=tr;var n=ne!==null&&ne.f&Be?ne:null;const i={children:null,ctx:ie,deps:null,equals:ir,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Y};return n!==null&&(n.children??(n.children=[])).push(i),i}function no(e){const t=z(e);return t.equals=ri,t}function dr(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&Be?li(i):De(i)}}}function io(e){for(var t=e.parent;t!==null;){if(!(t.f&Be))return t;t=t.parent}return null}function fr(e){var t,n=Y;Ie(io(e));try{dr(e),t=Er(e)}finally{Ie(n)}return t}function vr(e){var t=fr(e),n=(rt||e.f&kt)&&e.deps!==null?Sn:je;Ze(e,n),e.equals(t)||(e.v=t,e.wv=Sr())}function li(e){dr(e),Wt(e,0),Ze(e,Pt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function ro(e){Y===null&&ne===null&&ja(),ne!==null&&ne.f&kt&&Ca(),ci&&Pa()}function ao(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Mt(e,t,n,i=!0){var r=(e&$t)!==0,a=Y,o={ctx:ie,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|lt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=Et;try{ji(!0),An(o),o.f|=$i}catch(d){throw De(o),d}finally{ji(l)}}else t!==null&&Pn(o);var c=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&tr)===0;if(!c&&!r&&i&&(a!==null&&ao(o,a),ne!==null&&ne.f&Be)){var u=ne;(u.children??(u.children=[])).push(o)}return o}function oo(){return ne===null?!1:!rt}function lo(e){const t=Mt(Qt,null,!1);return Ze(t,je),t.teardown=e,t}function Tn(e){ro();var t=Y!==null&&(Y.f&ze)!==0&&ie!==null&&!ie.m;if(t){var n=ie;(n.e??(n.e=[])).push({fn:e,effect:Y,reaction:ne})}else{var i=st(e);return i}}function so(e){const t=Mt($t,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{De(t),i(void 0)}):(De(t),i(void 0))})}function st(e){return Mt(Qi,e,!1)}function In(e){return Mt(Qt,e,!0)}function L(e){return $e(e)}function $e(e,t=0){return Mt(Qt|xn|t,e,!0)}function Oe(e,t=!0){return Mt(Qt|ze,e,!0,t)}function _r(e){var t=e.teardown;if(t!==null){const n=ci,i=ne;Mi(!0),Re(null);try{t.call(null)}finally{Mi(n),Re(i)}}}function hr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)li(t[n])}}function gr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;De(n,t),n=i}}function co(e){for(var t=e.first;t!==null;){var n=t.next;t.f&ze||De(t),t=n}}function De(e,t=!0){var n=!1;if((t||e.f&er)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:En(i);i.remove(),i=a}n=!0}gr(e,t&&!n),hr(e),Wt(e,0),Ze(e,Pt);var o=e.transitions;if(o!==null)for(const c of o)c.stop();_r(e);var l=e.parent;l!==null&&l.first!==null&&mr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function mr(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 mt(e,t){var n=[];si(e,n,!0),pr(n,()=>{De(e),t&&t()})}function pr(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function si(e,t,n){if(!(e.f&We)){if(e.f^=We,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&bt)!==0||(i.f&ze)!==0;si(i,t,a?n:!1),i=r}}}function Vt(e){yr(e,!0)}function yr(e,t){if(e.f&We){tn(e)&&An(e),e.f^=We;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&bt)!==0||(n.f&ze)!==0;yr(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let mn=!1,zn=[];function wr(){mn=!1;const e=zn.slice();zn=[],Ea(e)}function Lt(e){mn||(mn=!0,queueMicrotask(wr)),zn.push(e)}function uo(){mn&&wr()}function kr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const br=0,fo=1;let Rt=!1,vn=br,Ut=!1,zt=null,Et=!1,ci=!1;function ji(e){Et=e}function Mi(e){ci=e}let vt=[],Tt=0;let ne=null;function Re(e){ne=e}let Y=null;function Ie(e){Y=e}let Ye=null;function vo(e){Ye=e}let ke=null,Pe=0,ot=null;function _o(e){ot=e}let xr=1,Wn=0,rt=!1,ie=null;function Li(e){ie=e}function Sr(){return++xr}function en(){return!Ct||ie!==null&&ie.l===null}function tn(e){var u;var t=e.f;if(t<)return!0;if(t&Sn){var n=e.deps,i=(t&kt)!==0;if(n!==null){var r,a,o=(t&gn)!==0,l=i&&Y!==null&&!rt,c=n.length;if(o||l){for(r=0;r<c;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=gn)}for(r=0;r<c;r++)if(a=n[r],tn(a)&&vr(a),a.wv>e.wv)return!0}(!i||Y!==null&&!rt)&&Ze(e,je)}return!1}function ho(e,t){for(var n=t;n!==null;){if(n.f&hn)try{n.fn(e);return}catch{n.f^=hn}n=n.parent}throw Rt=!1,e}function go(e){return(e.f&Pt)===0&&(e.parent===null||(e.parent.f&hn)===0)}function qn(){Rt=!1}function nn(e,t,n,i){if(Rt){if(n===null&&(Rt=!1),go(t))throw e;return}n!==null&&(Rt=!0);{ho(e,t);return}}function Er(e){var v;var t=ke,n=Pe,i=ot,r=ne,a=rt,o=Ye,l=ie,c=e.f;ke=null,Pe=0,ot=null,ne=c&(ze|$t)?null:e,rt=!Et&&(c&kt)!==0,Ye=null,ie=e.ctx,Wn++;try{var u=(0,e.fn)(),d=e.deps;if(ke!==null){var f;if(Wt(e,Pe),d!==null&&Pe>0)for(d.length=Pe+ke.length,f=0;f<ke.length;f++)d[Pe+f]=ke[f];else e.deps=d=ke;if(!rt)for(f=Pe;f<d.length;f++)((v=d[f]).reactions??(v.reactions=[])).push(e)}else d!==null&&Pe<d.length&&(Wt(e,Pe),d.length=Pe);return u}finally{ke=t,Pe=n,ot=i,ne=r,rt=a,Ye=o,ie=l}}function mo(e,t){let n=t.reactions;if(n!==null){var i=ka.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&Be&&(ke===null||!ke.includes(t))&&(Ze(t,Sn),t.f&(kt|gn)||(t.f^=gn),Wt(t,0))}function Wt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)mo(e,n[i])}function An(e){var t=e.f;if(!(t&Pt)){Ze(e,je);var n=Y,i=ie;Y=e;try{t&xn?co(e):gr(e),hr(e),_r(e);var r=Er(e);e.teardown=typeof r=="function"?r:null,e.wv=xr;var a=e.deps,o;Vn&&qa&&e.f<}catch(l){nn(l,e,n,i||e.ctx)}finally{Y=n}}}function Tr(){if(Tt>1e3){Tt=0;try{Ma()}catch(e){if(zt!==null)nn(e,zt,null);else throw e}}Tt++}function Ir(e){var t=e.length;if(t!==0){Tr();var n=Et;Et=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&je||(r.f^=je);var a=[];Ar(r,a),po(a)}}finally{Et=n}}}function po(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(Pt|We)))try{tn(i)&&(An(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?mr(i):i.fn=null))}catch(r){nn(r,i,null,i.ctx)}}}function yo(){if(Ut=!1,Tt>1001)return;const e=vt;vt=[],Ir(e),Ut||(Tt=0,zt=null)}function Pn(e){vn===br&&(Ut||(Ut=!0,queueMicrotask(yo))),zt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&($t|ze)){if(!(n&je))return;t.f^=je}}vt.push(t)}function Ar(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&ze)!==0,o=a&&(r&je)!==0,l=n.next;if(!o&&!(r&We))if(r&Qt){if(a)n.f^=je;else try{tn(n)&&An(n)}catch(f){nn(f,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else r&Qi&&i.push(n);if(l===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var u=f.next;if(u!==null){n=u;continue e}f=f.parent}}n=l}for(var d=0;d<i.length;d++)c=i[d],t.push(c),Ar(c,t)}function Pr(e){var t=vn,n=vt;try{Tr();const r=[];vn=fo,vt=r,Ut=!1,Ir(n);var i=e==null?void 0:e();return uo(),(vt.length>0||r.length>0)&&Pr(),Tt=0,zt=null,i}finally{vn=t,vt=n}}async function Kn(){await Promise.resolve(),Pr()}function s(e){var d;var t=e.f,n=(t&Be)!==0;if(n&&t&Pt){var i=fr(e);return li(e),i}if(ne!==null){Ye!==null&&Ye.includes(e)&&Da();var r=ne.deps;e.rv<Wn&&(e.rv=Wn,ke===null&&r!==null&&r[Pe]===e?Pe++:ke===null?ke=[e]:ke.push(e),ot!==null&&Y!==null&&Y.f&je&&!(Y.f&ze)&&ot.includes(e)&&(Ze(Y,lt),Pn(Y)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Be){var c=o;l=c,o=c.parent}else{var u=o;(d=u.deriveds)!=null&&d.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,tn(a)&&vr(a)),e.v}function Ve(e){const t=ne;try{return ne=null,e()}finally{ne=t}}const wo=-7169;function Ze(e,t){e.f=e.f&wo|t}function ko(e){return jr().get(e)}function Cr(e,t){return jr().set(e,t),t}function jr(e){return ie===null&&kr(),ie.c??(ie.c=new Map(bo(ie)||void 0))}function bo(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function le(e,t=!1,n){ie={p:ie,c:null,e:null,m:!1,s:e,x:null,l:null},Ct&&!t&&(ie.l={s:null,u:null,r1:[],r2:Te(!1)})}function se(e){const t=ie;if(t!==null){const o=t.e;if(o!==null){var n=Y,i=ne;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Re(a.reaction),st(a.fn)}}finally{Ie(n),Re(i)}}ie=t.p,t.m=!0}return{}}function xo(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Yn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Ke in n&&Yn(n)}}}function Yn(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{Yn(e[i],t)}catch{}const n=ni(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Ji(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function So(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Eo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function To(e){return Eo.includes(e)}const Io={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ao(e){return e=e.toLowerCase(),Io[e]??e}const Po=["touchstart","touchmove"];function Co(e){return Po.includes(e)}function jo(e,t){if(t){const n=document.body;e.autofocus=!0,Lt(()=>{document.activeElement===n&&e.focus()})}}let Ni=!1;function Mo(){Ni||(Ni=!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 Mr(e){var t=ne,n=Y;Re(null),Ie(null);try{return e()}finally{Re(t),Ie(n)}}function Lr(e,t,n,i=n){e.addEventListener(t,()=>Mr(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Mo()}const Nr=new Set,Zn=new Set;function ui(e,t,n,i){function r(a){if(i.capture||Dt.call(t,a),!a.cancelBubble)return Mr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Lt(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function Lo(e,t,n,i={}){var r=ui(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function de(e,t,n,i,r){var a={capture:i,passive:r},o=ui(e,t,n,a);(t===document.body||t===window||t===document)&&lo(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)Nr.add(e[t]);for(var n of Zn)n(e)}function Dt(e){var p;var t=this,n=t.ownerDocument,i=e.type,r=((p=e.composedPath)==null?void 0:p.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var c=r.indexOf(l);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;c<=u&&(o=c)}if(a=r[o]||e.target,a!==t){ba(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=ne,f=Y;Re(null),Ie(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+i];if(h!==void 0&&!a.disabled)if(ei(h)){var[y,...w]=h;y.apply(a,[e,...w])}else h.call(a,e)}catch(S){v?m.push(S):v=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let S of m)queueMicrotask(()=>{throw S});throw v}}finally{e.__root=t,delete e.currentTarget,Re(d),Ie(f)}}}function No(e){var t;t=document.head.appendChild(jt());try{$e(()=>e(t),er)}finally{}}function di(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function pt(e,t){var n=Y;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Xa)!==0,i=(t&Ja)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=di(a?e:"<!>"+e),n||(r=gt(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=gt(o),c=o.lastChild;pt(l,c)}else pt(o,o);return o}}function He(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=di(r),l=gt(o);a=gt(l)}var c=a.cloneNode(!0);return pt(c,c),c}}function Ue(e=""){{var t=jt(e+"");return pt(t,t),t}}function qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=jt();return e.append(t,n),pt(t,n),e}function k(e,t){e!==null&&e.before(t)}let pn=!0;function Oi(e){pn=e}function K(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 rn(e,t){return Oo(e,t)}const xt=new Map;function Oo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){eo();var l=new Set,c=f=>{for(var v=0;v<f.length;v++){var m=f[v];if(!l.has(m)){l.add(m);var g=Co(m);t.addEventListener(m,Dt,{passive:g});var h=xt.get(m);h===void 0?(document.addEventListener(m,Dt,{passive:g}),xt.set(m,1)):xt.set(m,h+1)}}};c(ti(Nr)),Zn.add(c);var u=void 0,d=so(()=>{var f=n??t.appendChild(jt());return Oe(()=>{if(a){le({});var v=ie;v.c=a}r&&(i.$$events=r),pn=o,u=e(f,i)||{},pn=!0,a&&se()}),()=>{var g;for(var v of l){t.removeEventListener(v,Dt);var m=xt.get(v);--m===0?(document.removeEventListener(v,Dt),xt.delete(v)):xt.set(v,m)}Zn.delete(c),f!==n&&((g=f.parentNode)==null||g.removeChild(f))}});return Gn.set(u,d),u}let Gn=new WeakMap;function Cn(e,t){const n=Gn.get(e);return n?(Gn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,o=xe,l=n?bt:0,c=!1;const u=(f,v=!0)=>{c=!0,d(v,f)},d=(f,v)=>{o!==(o=f)&&(o?(r?Vt(r):v&&(r=Oe(()=>v(i))),a&&mt(a,()=>{a=null})):(a?Vt(a):v&&(a=Oe(()=>v(i))),r&&mt(r,()=>{r=null})))};$e(()=>{c=!1,t(u),c||d(null,null)},l)}function Or(e,t,n){var i=e,r=xe,a,o=en()?Aa:ii;$e(()=>{o(r,r=t())&&(a&&mt(a),a=Oe(()=>n(i)))})}function yt(e,t){return t}function Do(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)si(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var c=n.parentNode;to(c),c.append(n),i.clear(),nt(e,t[0].prev,t[a-1].next)}pr(r,()=>{for(var u=0;u<a;u++){var d=t[u];l||(i.delete(d.k),nt(e,d.prev,d.next)),De(d.e,!l)}})}function Qe(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},c=(t&rr)!==0;if(c){var u=e;o=u.appendChild(jt())}var d=null,f=!1;$e(()=>{var v=n(),m=ei(v)?v:v==null?[]:ti(v),g=m.length;if(!(f&&g===0)){f=g===0;{var h=ne;Ro(m,l,o,r,t,(h.f&We)!==0,i)}a!==null&&(g===0?d?Vt(d):d=Oe(()=>a(o)):d!==null&&mt(d,()=>{d=null})),n()}})}function Ro(e,t,n,i,r,a,o,l){var N,R,q,ae;var c=(r&Fa)!==0,u=(r&(ai|oi))!==0,d=e.length,f=t.items,v=t.first,m=v,g,h=null,y,w=[],p=[],S,A,b,T;if(c)for(T=0;T<d;T+=1)S=e[T],A=o(S,T),b=f.get(A),b!==void 0&&((N=b.a)==null||N.measure(),(y??(y=new Set)).add(b));for(T=0;T<d;T+=1){if(S=e[T],A=o(S,T),b=f.get(A),b===void 0){var U=m?m.e.nodes_start:n;h=Ho(U,t,h,h===null?t.first:h.next,S,A,T,i,r),f.set(A,h),w=[],p=[],m=h.next;continue}if(u&&qo(b,S,T,r),b.e.f&We&&(Vt(b.e),c&&((R=b.a)==null||R.unfix(),(y??(y=new Set)).delete(b))),b!==m){if(g!==void 0&&g.has(b)){if(w.length<p.length){var M=p[0],P;h=M.prev;var D=w[0],Z=w[w.length-1];for(P=0;P<w.length;P+=1)Di(w[P],M,n);for(P=0;P<p.length;P+=1)g.delete(p[P]);nt(t,D.prev,Z.next),nt(t,h,D),nt(t,Z,M),m=M,h=Z,T-=1,w=[],p=[]}else g.delete(b),Di(b,m,n),nt(t,b.prev,b.next),nt(t,b,h===null?t.first:h.next),nt(t,h,b),h=b;continue}for(w=[],p=[];m!==null&&m.k!==A;)(a||!(m.e.f&We))&&(g??(g=new Set)).add(m),p.push(m),m=m.next;if(m===null)continue;b=m}w.push(b),h=b,m=b.next}if(m!==null||g!==void 0){for(var G=g===void 0?[]:ti(g);m!==null;)(a||!(m.e.f&We))&&G.push(m),m=m.next;var B=G.length;if(B>0){var j=r&rr&&d===0?n:null;if(c){for(T=0;T<B;T+=1)(q=G[T].a)==null||q.measure();for(T=0;T<B;T+=1)(ae=G[T].a)==null||ae.fix()}Do(t,G,j,f)}}c&&Lt(()=>{var Q;if(y!==void 0)for(b of y)(Q=b.a)==null||Q.apply()}),Y.first=t.first&&t.first.e,Y.last=h&&h.e}function qo(e,t,n,i){i&ai&&Un(e.v,t),i&oi?Un(e.i,n):e.i=n}function Ho(e,t,n,i,r,a,o,l,c,u){var d=(c&ai)!==0,f=(c&Ba)===0,v=d?f?or(r):Te(r):r,m=c&oi?Te(o):o,g={i:m,v,k:a,a:null,e:null,prev:n,next:i};try{return g.e=Oe(()=>l(e,v,m),sr),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 Di(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=En(a);r.before(a),a=o}}function nt(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 Fo(e,t,n,i,r){var a=e,o="",l;$e(()=>{o!==(o=t()??"")&&(l!==void 0&&(De(l),l=void 0),o!==""&&(l=Oe(()=>{var c=o+"",u=di(c);pt(gt(u),u.lastChild),a.before(u)})))})}function Nt(e,t,...n){var i=e,r=ft,a;$e(()=>{r!==(r=t())&&(a&&(De(a),a=null),a=Oe(()=>r(i,...n)))},bt)}function Bo(e,t,n,i,r,a){var o,l,c=null,u=e,d;$e(()=>{const f=t()||null;var v=f==="svg"?ar:null;f!==o&&(d&&(f===null?mt(d,()=>{d=null,l=null}):f===l?Vt(d):(De(d),Oi(!1))),f&&f!==l&&(d=Oe(()=>{c=v?document.createElementNS(v,f):document.createElement(f),pt(c,c);{var m=c.appendChild(jt());i(c,m)}Y.nodes_end=c,u.before(c)})),o=f,o&&(l=o),Oi(!0))},bt)}function an(e,t,n){st(()=>{var i=Ve(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};In(()=>{var o=n();xo(o),r&&ii(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Dr(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=Dr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Vo(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Dr(e))&&(i&&(i+=" "),i+=t);return i}function Uo(e){return typeof e=="object"?Vo(e):e??""}function zo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ce(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[Ia]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wo(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},c=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Uo(n.class)),n.class=n.class?n.class+" "+i:i;var d=Rr(e),f=e.__attributes??(e.__attributes={});for(const p in n){let S=n[p];if(c&&p==="value"&&S==null){e.value=e.__value="",l[p]=S;continue}var v=l[p];if(S!==v){l[p]=S;var m=p[0]+p[1];if(m!=="$$"){if(m==="on"){const A={},b="$$"+p;let T=p.slice(2);var g=To(T);if(So(T)&&(T=T.slice(0,-7),A.capture=!0),!g&&v){if(S!=null)continue;e.removeEventListener(T,l[b],A),l[b]=null}if(S!=null)if(g)e[`__${T}`]=S,ve([T]);else{let U=function(M){l[p].call(this,M)};var w=U;l[b]=ui(T,e,U,A)}else g&&(e[`__${T}`]=void 0)}else if(p==="style"&&S!=null)e.style.cssText=S+"";else if(p==="autofocus")jo(e,!!S);else if(p==="__value"||p==="value"&&S!=null)e.value=e[p]=e.__value=S;else if(p==="selected"&&c)zo(e,S);else{var h=p;r||(h=Ao(h));var y=h==="defaultValue"||h==="defaultChecked";if(S==null&&!a&&!y)if(f[p]=null,h==="value"||h==="checked"){let A=e;if(h==="value"){let b=A.defaultValue;A.removeAttribute(h),A.defaultValue=b}else{let b=A.defaultChecked;A.removeAttribute(h),A.defaultChecked=b}}else e.removeAttribute(p);else y||d.includes(h)&&(a||typeof S!="string")?e[h]=S:typeof S!="function"&&ce(e,h,S)}p==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var Ri=new Map;function Rr(e){var t=Ri.get(e.nodeName);if(t)return t;Ri.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Ji(i);for(var a in n)n[a].set&&t.push(a);i=ni(i)}return t}function Ko(e,t,n){var i=e.__className,r=Yo(t);(i!==r||sr)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Yo(e,t){return(e??"")+""}function ue(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 jn(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 Zo=()=>performance.now(),Je={tick:e=>requestAnimationFrame(e),now:()=>Zo(),tasks:new Set};function qr(){const e=Je.now();Je.tasks.forEach(t=>{t.c(e)||(Je.tasks.delete(t),t.f())}),Je.tasks.size!==0&&Je.tick(qr)}function Go(e){let t;return Je.tasks.size===0&&Je.tick(qr),{promise:new Promise(n=>{Je.tasks.add(t={c:e,f:n})}),abort(){Je.tasks.delete(t)}}}function dn(e,t){e.dispatchEvent(new CustomEvent(t))}function Xo(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 qi(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Xo(r.trim());t[o]=a.trim()}return t}const Jo=e=>e;function Ce(e,t,n,i){var r=(e&Ya)!==0,a=(e&Za)!==0,o=r&&a,l=(e&Ga)!==0,c=o?"both":r?"in":"out",u,d=t.inert,f,v;function m(){var p=ne,S=Y;Re(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:c}))}finally{Re(p),Ie(S)}}var g={is_global:l,in(){var p;if(t.inert=d,!r){v==null||v.abort(),(p=v==null?void 0:v.reset)==null||p.call(v);return}a||f==null||f.abort(),dn(t,"introstart"),f=Xn(t,m(),v,1,()=>{dn(t,"introend"),f==null||f.abort(),f=u=void 0})},out(p){if(!a){p==null||p(),u=void 0;return}t.inert=!0,dn(t,"outrostart"),v=Xn(t,m(),f,0,()=>{dn(t,"outroend"),p==null||p()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},h=Y;if((h.transitions??(h.transitions=[])).push(g),r&&pn){var y=l;if(!y){for(var w=h.parent;w&&w.f&bt;)for(;(w=w.parent)&&!(w.f&xn););y=!w||(w.f&$i)!==0}y&&st(()=>{Ve(()=>g.in())})}}function Xn(e,t,n,i,r){var a=i===1;if(St(t)){var o,l=!1;return Lt(()=>{if(!l){var y=t({direction:a?"in":"out"});o=Xn(e,y,n,i,r)}}),{abort:()=>{l=!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:ft,deactivate:ft,reset:ft,t:()=>i};const{delay:c=0,css:u,tick:d,easing:f=Jo}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),u)){var m=qi(u(0,1));v.push(m,m)}var g=()=>1-i,h=e.animate(v,{duration:c});return h.onfinish=()=>{var y=(n==null?void 0:n.t())??1-i;n==null||n.abort();var w=i-y,p=t.duration*Math.abs(w),S=[];if(p>0){if(u)for(var A=Math.ceil(p/16.666666666666668),b=0;b<=A;b+=1){var T=y+w*f(b/A),U=u(T,1-T);S.push(qi(U))}g=()=>{var M=h.currentTime;return y+w*f(M/p)},d&&Go(()=>{if(h.playState!=="running")return!1;var M=g();return d(M,1-M),!0})}h=e.animate(S,{duration:p,fill:"forwards"}),h.onfinish=()=>{g=()=>i,d==null||d(i,1-i),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ft)},deactivate:()=>{r=ft},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>g()}}function Qo(e,t,n=t){var i=en();Lr(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Hn(e)?Fn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),Ve(t)==null&&e.value&&n(Hn(e)?Fn(e.value):e.value),In(()=>{var r=t();Hn(e)&&r===Fn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Hn(e){var t=e.type;return t==="number"||t==="range"}function Fn(e){return e===""?null:+e}function Hr(e,t,n){if(e.multiple)return tl(e,t);for(var i of e.options){var r=qt(i);if($a(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function $o(e,t){st(()=>{var n=new MutationObserver(()=>{var i=e.__value;Hr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function el(e,t,n=t){var i=!0;Lr(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),qt);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&qt(l)}n(o)}),st(()=>{var r=t();if(Hr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=qt(a),n(r))}e.__value=r,i=!1}),$o(e)}function tl(e,t){for(var n of e.options)n.selected=~t.indexOf(qt(n))}function qt(e){return"__value"in e?e.__value:e.value}var it,It,Gt,kn,Fr;const bn=class bn{constructor(t){dt(this,kn);dt(this,it,new WeakMap);dt(this,It);dt(this,Gt);Ot(this,Gt,t)}observe(t,n){var i=Fe(this,it).get(t)||new Set;return i.add(n),Fe(this,it).set(t,i),Ai(this,kn,Fr).call(this).observe(t,Fe(this,Gt)),()=>{var r=Fe(this,it).get(t);r.delete(n),r.size===0&&(Fe(this,it).delete(t),Fe(this,It).unobserve(t))}}};it=new WeakMap,It=new WeakMap,Gt=new WeakMap,kn=new WeakSet,Fr=function(){return Fe(this,It)??Ot(this,It,new ResizeObserver(t=>{for(var n of t){bn.entries.set(n.target,n);for(var i of Fe(this,it).get(n.target)||[])i(n)}}))},Ii(bn,"entries",new WeakMap);let Jn=bn;var nl=new Jn({box:"border-box"});function il(e,t,n){var i=nl.observe(e,()=>n(e[t]));st(()=>(Ve(()=>n(e[t])),i))}function Hi(e,t){return e===t||(e==null?void 0:e[Ke])===t}function on(e={},t,n,i){return st(()=>{var r,a;return In(()=>{r=a,a=[],Ve(()=>{e!==n(...a)&&(t(e,...a),r&&Hi(n(...r),e)&&t(null,...r))})}),()=>{Lt(()=>{a&&Hi(n(...a),e)&&t(null,...a)})}}),e}let fn=!1;function rl(e){var t=fn;try{return fn=!1,[e(),fn]}finally{fn=t}}const al={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 ol(e,t,n){return new Proxy({props:e,exclude:t},al)}const ll={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(St(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];St(r)&&(r=r());const a=at(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(St(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=at(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Ke||t===nr)return!1;for(let n of e.props)if(St(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){St(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function sl(...e){return new Proxy({props:e},ll)}function Fi(e){for(var t=Y,n=Y;t!==null&&!(t.f&(ze|$t));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function O(e,t,n,i){var U;var r=(n&Va)!==0,a=!Ct||(n&Ua)!==0,o=(n&Wa)!==0,l=(n&Ka)!==0,c=!1,u;o?[u,c]=rl(()=>e[t]):u=e[t];var d=Ke in e||nr in e,f=o&&(((U=at(e,t))==null?void 0:U.set)??(d&&t in e&&(M=>e[t]=M)))||void 0,v=i,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,l?v=Ve(i):v=i),v);u===void 0&&i!==void 0&&(f&&a&&La(),u=h(),f&&f(u));var y;if(a)y=()=>{var M=e[t];return M===void 0?h():(m=!0,g=!1,M)};else{var w=Fi(()=>(r?z:no)(()=>e[t]));w.f|=Ta,y=()=>{var M=s(w);return M!==void 0&&(v=void 0),M===void 0?v:M}}if(!(n&za))return y;if(f){var p=e.$$legacy;return function(M,P){return arguments.length>0?((!a||!P||p||c)&&f(P?y():M),M):y()}}var S=!1,A=!1,b=or(u),T=Fi(()=>z(()=>{var M=y(),P=s(b);return S?(S=!1,A=!0,P):(A=!1,b.v=M)}));return r||(T.equals=ri),function(M,P){if(arguments.length>0){const D=P?s(T):a&&o?J(M):M;return T.equals(D)||(S=!0,C(b,D),g&&v!==void 0&&(v=D),Ve(()=>s(T))),M}return s(T)}}function Bi(e,t){var n=Y,i=ne,r=ie;Ie(e),Re(e),Li(e.ctx);try{t()}finally{Ie(n),Re(i),Li(r)}}function cl(e,t,n){var i=e,r;$e(()=>{var a=Y,o=!1;a.fn=l=>{var c=t.onerror;let u=t.failed;if(!c&&!u||o)throw l;var d=()=>{mt(r),Bi(a,()=>{o=!1,r=Oe(()=>n(i)),qn()})};c==null||c(l,d),r&&De(r),Lt(()=>{Bi(a,()=>{o=!0;try{r=Oe(()=>{u(i,()=>l,()=>d)})}catch(f){nn(f,a,null,a.ctx)}qn(),o=!1})})},r=Oe(()=>n(i)),qn()},bt|hn)}function Ge(e){ie===null&&kr(),Ct&&ie.l!==null?ul(ie).m.push(e):Tn(()=>{const t=Ve(e);if(typeof t=="function")return t})}function ul(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const dl="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(dl);const Br="https://www.playpilot.com",Mn="https://partner-api.playpilot.tech/1.0.0",Vr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",fe=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",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",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action"});function fi(){const e=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+e}const fl="https://insights.playpilot.net";async function he(e,t=null,n={}){var r,a,o;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,title_type:t.type,providers:[...new Set(((r=t.providers)==null?void 0:r.map(l=>l.name))||[])],...n}),n.url=fi(),n.organization_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.organization_sid,n.domain_sid=(o=window.PlayPilotLinkInjections)==null?void 0:o.domain_sid,fetch(fl,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})}),vl({event:e,payload:n})}function vl(e){var t;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(t=window.PlayPilotLinkInjections.tracked_events)==null||t.push(e)}function _l({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const vi="EncryptedToken",Ur="articleReplacementEditToken",zr="playpilot-editorial-mode";async function Wr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=On();if(!n)throw new Error("No token was provided");const i=_i(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Mn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return hl(i),!0}catch(n){console.error(n),he(fe.AuthFailed)}finally{pl()}return!1}function _i(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(Ur);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${vi}=`).pop())==null?void 0:r.split(";")[0])||""}function hl(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=vi+"="+e+";"+i+";path=/"}function gl(){document.cookie=vi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Kr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(zr)==="true"||!!e}function ml(){const e=new URL(window.location.href);e.searchParams.set(zr,"true"),window.history.replaceState({},"",e)}function pl(){const e=new URL(window.location.href);e.searchParams.delete(Ur),window.history.replaceState({},"",e)}function yl(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 Yr(){return(Math.random()+1).toString(36).substring(7)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),wl={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},Watch:{[_.English]:"Watch",[_.Swedish]:"Se",[_.Danish]:"Se"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function ye(e,t=Zr()){var n;return((n=wl[e])==null?void 0:n[t])||e}function Zr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(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 _.English}function kl(e){var i,r,a;const t=(r=(i=window.PlayPilotLinkInjections)==null?void 0:i.split_test_identifiers)==null?void 0:r[e];if(t)return t;(a=window.PlayPilotLinkInjections)!=null&&a.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});const n=Math.random();return window.PlayPilotLinkInjections.split_test_identifiers[e]=n,n}function Gr(e){return kl(e)>.5}function bl(e){const t=Gr(e)?1:0;he(fe.SplitTestView,null,{key:e,variant:t})}function xl(e,t){const n=Gr(e)?1:0;he(fe.SplitTestAction,null,{key:e,variant:n,action:t})}const Sl=e=>e;function hi(e){const t=e-1;return t*t*t+1}function Vi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Kt(e,{delay:t=0,duration:n=400,easing:i=Sl}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Ln(e,{delay:t=0,duration:n=400,easing:i=hi,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),c=+l.opacity,u=l.transform==="none"?"":l.transform,d=c*(1-o),[f,v]=Vi(r),[m,g]=Vi(a);return{delay:t,duration:n,easing:i,css:(h,y)=>`
|
|
4
|
+
transform: ${u} translate(${(1-h)*f}${v}, ${(1-h)*m}${g});
|
|
5
|
+
opacity: ${c-d*y}`}}function Yt(e,{delay:t=0,duration:n=400,easing:i=hi,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",c=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],d=u.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),f=parseFloat(a[`padding${d[0]}`]),v=parseFloat(a[`padding${d[1]}`]),m=parseFloat(a[`margin${d[0]}`]),g=parseFloat(a[`margin${d[1]}`]),h=parseFloat(a[`border${d[0]}Width`]),y=parseFloat(a[`border${d[1]}Width`]);return{delay:t,duration:n,easing:i,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${l}: ${w*c}px;padding-${u[0]}: ${w*f}px;padding-${u[1]}: ${w*v}px;margin-${u[0]}: ${w*m}px;margin-${u[1]}: ${w*g}px;border-${u[0]}-width: ${w*h}px;border-${u[1]}-width: ${w*y}px;min-${l}: 0`}}function El(e,{delay:t=0,duration:n=400,easing:i=hi,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),l=+o.opacity,c=o.transform==="none"?"":o.transform,u=1-r,d=l*(1-a);return{delay:t,duration:n,easing:i,css:(f,v)=>`
|
|
6
|
+
transform: ${c} scale(${1-u*v});
|
|
7
7
|
opacity: ${l-d*v}
|
|
8
|
-
`}}Ia();var cl=Me('<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 Br(e){var t=cl();k(e,t)}function ci(e,t){le(t,!0);const n=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),r=Ko(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=He(),o=ee(a);Po(o,()=>t.href?"a":"button",!1,(l,s)=>{let c;N(()=>{c=Lo(l,c,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===Ji,l.nodeName.includes("-")),xn(l,"--size",n())});var d=He(),f=ee(d);Ct(f,()=>t.children??st),k(s,d)}),k(e,a),se()}function ul(e){P(e,e.v+1)}function dl(e){let t=0,n=Ee(0),i;return()=>{Za()&&(u(n),yn(()=>(t===0&&(i=Ke(()=>e(()=>ul(n)))),t+=1,()=>{Bn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var zt,Wt;class fl{constructor(t,n){Cn(this,zt);Cn(this,Wt);jn(this,zt,t),jn(this,Wt,dl(n))}get current(){return Pn(this,Wt).call(this),Pn(this,zt).call(this)}}zt=new WeakMap,Wt=new WeakMap;const vl=/\(.+\)/;class _l extends fl{constructor(t,n){let i=vl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>ko(r,"change",a))}}const ui=new _l("(prefers-reduced-motion: reduce)");var hl=(e,t)=>t()(),ml=A('<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 Fr(e,t){le(t,!0);const n=O(t,"onclose",3,()=>null),i=O(t,"onscroll",3,()=>null);br("scope","modal"),Ze(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return ui.current?Ft(f,{duration:0}):window.innerWidth<600?En(f,{duration:250,y:window.innerHeight}):sl(f,{duration:150,start:.85})}var a=ml();de("keydown",ke,({key:f})=>{f==="Escape"&&n()()});var o=x(a),l=x(o),s=x(l);ci(s,{onclick:()=>n()(),children:(f,v)=>{Br(f)},$$slots:{default:!0}});var c=E(l,2);Ct(c,()=>t.children);var d=E(o,2);d.__click=[hl,n],de("scroll",o,function(...f){var v;(v=i())==null||v.apply(this,f)}),Ce(7,o,()=>r),Ce(7,a,()=>Ft,()=>({duration:150})),k(e,a),se()}fe(["click"]);const gl=[{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 pl=A('<div class="genre svelte-1ebula3"> </div>'),yl=(e,t)=>P(t,!0),wl=A('<button class="genre expand svelte-1ebula3"> </button>'),kl=A("<!> <!>",1);function bl(e,t){le(t,!0);let n=U(!1);const i=z(()=>u(n)?t.genres:[t.genres[0]]);var r=kl(),a=ee(r);Je(a,17,()=>u(i),ht,(s,c)=>{var d=He();const f=z(()=>{var m;return(m=gl.find(h=>h.slug===u(c)))==null?void 0:m.name});var v=ee(d);{var g=m=>{var h=pl(),w=x(h);N(()=>Z(w,we(u(f)))),k(m,h)};q(v,m=>{u(f)&&m(g)})}k(s,d)});var o=E(a,2);{var l=s=>{var c=wl();c.__click=[yl,n];var d=x(c);N(()=>Z(d,`+${t.genres.length-1}`)),k(s,c)};q(o,s=>{!u(n)&&t.genres.length>1&&s(l)})}k(e,r),se()}fe(["click"]);function xl(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.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(l=>l.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 Sl=Me('<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 El(e){var t=Sl();k(e,t)}function Ut(e){return e?e.replace("/src/img",""):null}var Tl=A('<div class="disclaimer svelte-vl7ulm" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-vl7ulm">PlayPilot.com</a></div>'),Il=(e,t,n)=>t(n()),Al=A('<div class="arrow svelte-vl7ulm"><!></div>'),Pl=A('<a target="_blank" class="playlink svelte-vl7ulm" rel="sponsored"><img alt="" height="32" width="32" class="svelte-vl7ulm"> <div><span class="name svelte-vl7ulm"> </span> <div class="category svelte-vl7ulm"> </div></div> <!></a>'),Cl=A('<div class="playlink empty svelte-vl7ulm" data-testid="playlinks-empty"> </div>'),jl=A('<div class="heading svelte-vl7ulm"> </div> <!> <div class="playlinks svelte-vl7ulm"><!> <!></div>',1);function Ml(e,t){le(t,!0);const n=O(t,"list",3,!1),i=so("scope")==="modal",r=z(()=>t.playlinks.filter(p=>!!p.logo_url)),a=z(()=>xl(u(r))),o={SVOD:we("Stream"),BUY:we("Buy"),RENT:we("Rent"),TVOD:we("Rent Or Buy")};function l(p){pe(i?he.TitleModalPlaylinkClick:he.TitlePopoverPlaylinkClick,t.title,{playlink:p})}var s=jl(),c=ee(s),d=x(c);N(()=>Z(d,we("Where To Stream Online"))),Qt(c,(p,y)=>xe==null?void 0:xe(p,y),()=>3);var f=E(c,2);{var v=p=>{var y=Tl(),S=x(y);N(()=>Z(S,`${we("Commission Disclaimer")??""} `)),k(p,y)};q(f,p=>{t.playlinks.length&&p(v)})}var g=E(f,2),m=x(g);Je(m,17,()=>u(a),ht,(p,y)=>{let S=()=>u(y).name,j=()=>u(y).url,b=()=>u(y).logo_url,T=()=>u(y).highlighted,F=()=>u(y).cta_text,M=()=>u(y).extra_info.category;var I=Pl();I.__click=[Il,l,S];var R=x(I);N(()=>ce(R,"src",Ut(b())));var W=E(R,2),G=x(W),V=x(G),C=E(G,2),L=x(C);N(()=>Z(L,F()||o[M()]||we("Stream")));var D=E(W,2);{var H=ie=>{var X=Al(),re=x(X);El(re),k(ie,X)};q(D,ie=>{n()&&ie(H)})}N(()=>{ce(I,"href",j()),ce(I,"data-playlink",S()),ue(I,"highlighted",T()&&F()),Z(V,S())}),k(p,I)});var h=E(m,2);{var w=p=>{var y=Cl(),S=x(y);N(()=>Z(S,we("Title Unavailable"))),k(p,y)};q(h,p=>{t.playlinks.length||p(w)})}N(()=>ue(g,"list",n())),k(e,s),se()}fe(["click"]);var Ll=(e,t)=>P(t,!0),Nl=A('<button class="show-more svelte-1u3je71">Show more</button>'),Ol=A('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Dl=A('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Rl(e,t){le(t,!0);const n=O(t,"blurb",3,""),i=O(t,"limit",3,200);let r=U(!1);const a=z(()=>t.text.slice(0,i()));var o=Dl(),l=x(o),s=x(l),c=E(s);{var d=h=>{var w=Fe("...");k(h,w)};q(c,h=>{!u(r)&&t.text.length>i()&&h(d)})}var f=E(c,2);{var v=h=>{var w=Nl();w.__click=[Ll,r],k(h,w)};q(f,h=>{!u(r)&&(t.text.length>i()||n())&&h(v)})}var g=E(l,2);{var m=h=>{var w=Ol(),p=x(w);N(()=>Z(p,n())),k(h,w)};q(g,h=>{u(r)&&h(m)})}N(()=>Z(s,u(r)?t.text:u(a))),k(e,o),se()}fe(["click"]);var ql=Me('<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 Vr(e){var t=ql();k(e,t)}var Hl=A('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),Bl=A("<div> </div>"),Fl=A('<img alt="" class="svelte-1026zg0">'),Vl=A('<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 Ur(e,t){le(t,!0);const n=O(t,"small",3,!1),i=O(t,"compact",3,!1);let r=U(!1),a=U(!1),o=U(!1);var l=Vl(),s=ee(l),c=x(s),d=x(c);{var f=L=>{var D=Hl(),H=x(D);N(()=>ce(H,"src",Ut(t.title.standing_poster))),N(()=>{ce(H,"alt",`Movie poster for '${t.title.title??""}'`),ue(H,"loaded",u(r))}),de("load",H,()=>P(r,!0)),k(L,D)};q(d,L=>{i()||L(f)})}var v=E(d,2),g=x(v);Qt(v,(L,D)=>xe==null?void 0:xe(L,D),()=>2);var m=E(v,2),h=x(m),w=x(h);Vr(w);var p=E(w),y=E(h,2);bl(y,{get genres(){return t.title.genres}});var S=E(y,2),j=x(S),b=E(S,2),T=x(b);N(()=>Z(T,we(`Type: ${t.title.type}`)));var F=E(b,2);{var M=L=>{var D=Bl(),H=x(D);N(()=>Z(H,`${t.title.length??""} ${we("Minutes")??""}`)),k(L,D)};q(F,L=>{!n()&&t.title.length&&L(M)})}var I=E(c,2),R=x(I);Ml(R,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var W=E(R,2);{var G=L=>{Rl(L,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};q(W,L=>{n()||L(G)})}var V=E(s,2),C=x(V);Ir(C,()=>u(o),L=>{var D=Fl();N(()=>ce(D,"src",Ut(u(o)?t.title.standing_poster:t.title.medium_poster))),N(()=>{ue(D,"loaded",u(a)),ue(D,"blur",u(o))}),de("load",D,()=>P(a,!0)),de("error",D,()=>P(o,!0)),k(L,D)}),N(()=>{ue(s,"small",n()),ue(s,"compact",i()),ue(v,"truncate",n()),Z(g,t.title.title),Z(p,` ${t.title.imdb_score??""}`),Z(j,t.title.year),ue(V,"faded",i())}),k(e,l),se()}function Ul(e,t){le(t,!0),pe(he.TitleModalView,t.title);let n=!1;Ze(()=>{const r=Date.now();return()=>pe(he.TitleModalClose,t.title,{time_spent:Date.now()-r})});function i(){n||(pe(he.TitleModalScroll,t.title),n=!0)}Fr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{Ur(r,{get title(){return t.title}})},$$slots:{default:!0}}),se()}var zl=A('<div class="popover svelte-tb2xdq" tabindex="-1" aria-hidden="true"><div class="dialog svelte-tb2xdq" data-view-transition-old=""><!></div></div>');function Wl(e,t){le(t,!0);let n=O(t,"maxHeight",15);br("scope","popover");let i=U(null),r=U(!1);Ze(async()=>{await Bn(),a(),await Bn(),o()});function a(){if(!u(i))return;const{top:f,right:v,bottom:g,height:m}=u(i).getBoundingClientRect(),h=l();P(r,Q(f-h<0&&window.innerHeight-g>f+m));const w=window.innerWidth-v-h;v+h>window.innerWidth&&(u(i).style.left=`${w}px`)}function o(){if(!u(i))return;const{top:f,height:v}=u(i).getBoundingClientRect(),g=l(),m=u(r)?window.innerHeight-f-g:f+v-g;n(Math.min(m,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var s=zl(),c=x(s),d=x(c);Ct(d,()=>t.children),$t(s,f=>P(i,f),()=>u(i)),N(()=>{ue(s,"flip",u(r)),xn(s,"--max-height",n()?n()+"px":null)}),Ce(7,c,()=>En,()=>({duration:ui.current?0:100,y:10})),k(e,s),se()}var Kl=A('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function Yl(e,t){le(t,!0);let n=U(0),i=U(null);pe(he.TitlePopoverView,t.title),Ze(()=>{r();const l=Date.now();return()=>pe(he.TitlePopoverClose,t.title,{time_spent:Date.now()-l})});function r(){const l=t.event.target;if(!(l!=null&&l.getClientRects))return;const s=Array.from(l.getClientRects()),d=s.map(v=>v.x).map(v=>Math.abs(v-t.event.clientX)),f=s[d.indexOf(Math.min(...d))];u(i).style.top=f.top+window.scrollY+"px",u(i).style.left=f.left+window.scrollX+"px",u(i).style.height=f.height+"px"}var a=Kl(),o=x(a);Wl(o,{get maxHeight(){return u(n)},set maxHeight(l){P(n,Q(l))},children:(l,s)=>{var c=z(()=>!!u(n)&&u(n)<250);Ur(l,{get title(){return t.title},small:!0,get compact(){return u(c)}})},$$slots:{default:!0}}),$t(a,l=>P(i,l),()=>u(i)),k(e,a),se()}var Zl=e=>e.stopPropagation(),Gl=(e,t,n,i)=>t(e,u(n).title_details,u(i)),Xl=A(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Jl=(e,t,n,i)=>t(u(n).title_details,i()),Ql=A('<!> <a target="_blank"> </a>',1),$l=A(" <!>.",1),es=A("<!> <br>",1),ts=A(" <br>",1),ns=A('<span class="svelte-pfvkex"><!></span>'),is=A('<p class="svelte-pfvkex"></p>');function rs(e,t){le(t,!0);const n=O(t,"onclickmodal",3,()=>null);function i(s,c){pe(he.AfterArticlePlaylinkClick,s,{playlink:c})}function r(s,c,d){pe(he.AfterArticleModalButtonClick,c),n()(s,d)}var a=He(),o=ee(a);{var l=s=>{var c=is();Je(c,21,()=>t.linkInjections,ht,(d,f)=>{var v=ns();const g=z(()=>{const{key:y,title:S,title_details:j,after_article_style:b}=u(f);return{key:y,title:S,title_details:j,after_article_style:b}}),m=z(()=>{var y;return((y=u(g).title_details)==null?void 0:y.providers)||[]});var h=x(v);{var w=y=>{var S=es(),j=ee(S);{var b=F=>{var M=Xl(),I=ee(M);N(()=>Z(I,`"${u(g).title??""}" ${we("Is Available To Stream")??""} `));var R=E(I);R.__click=[Zl];var W=x(R);W.__click=[Gl,r,g,f];var G=x(W);N(()=>Z(G,we("View Streaming Options"))),k(F,M)},T=F=>{var M=$l(),I=ee(M);N(()=>Z(I,`"${u(g).title??""}" ${we("Is Available To Stream On")??""} `));var R=E(I);Je(R,17,()=>u(m),ht,(W,G,V)=>{let C=()=>u(G).name,L=()=>u(G).url;var D=Ql(),H=ee(D);{var ie=ae=>{var Ie=Fe();N(()=>Z(Ie,V===u(m).length-1?`, ${we("And")}`:",")),k(ae,Ie)};q(H,ae=>{V&&ae(ie)})}var X=E(H,2);X.__click=[Jl,i,g,C];var re=x(X);N(()=>{ce(X,"href",L()),Z(re,C())}),k(W,D)}),k(F,M)};q(j,F=>{u(g).after_article_style==="modal_button"?F(b):F(T,!1)})}k(y,S)},p=y=>{var S=ts(),j=ee(S);N(()=>Z(j,`"${u(g).title??""}" ${we("Title Unavailable Suffix")??""} `)),k(y,S)};q(h,y=>{u(m).length?y(w):y(p,!1)})}N(()=>ce(v,"data-playpilot-injection-key",u(g).key)),k(d,v)}),k(s,c)};q(o,s=>{t.linkInjections.length&&s(l)})}k(e,a),se()}fe(["click"]);function as(e,t,n){return e.filter(i=>n.every(r=>i[r]===t[r])).length}function os(e,t){return t.some(n=>e>=n.start&&e<n.end)}function ls(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 Oi(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 Di(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function ss(e,t,n,i){const r=ls(t),a=di(t),o=e.slice(0,i),l=e.slice(i),s=/[-/\\^$*+?.()|[\]{}]/g,c=new RegExp(`${a.replace(s,"\\$&")}|${r.replace(s,"\\$&")}`),d=l.replace(c,n);return o+d}function cs(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Oe(e){return di(e).toLowerCase().replace(/\s+/g,"")}function zr(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let s=e.slice(o,l).trim();return o>0&&(s="…"+s),l<e.length&&(s+="…"),s}function us(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=Ri(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),l=Ri(qi(a,2)),s=qi(o,2);return{before:l,after:s}}function Ri(e){return e.split("").reverse().join("")}function qi(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function ds(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function fs(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,l=n?e.indexOf(n,o):e.length;if(n&&l===-1)break;const s=e.slice(o,l);i.push({match:s,index:o}),r=n?l+n.length:e.length+1}return i}function vs(e,t,n,i){const a=fs(e,n,i).filter(({match:l})=>di(l).includes(t));return a.length?a.reduce((l,s)=>!l||s.match.length<l.match.length?s:l):null}function _s(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 hs(e,t,n=0){const i=t.innerHTML,r=[],a=ms(t);let o=i.indexOf(e);for(;o!==-1;)os(o,a)&&r.push(o),o=i.indexOf(e,o+e.length);return r[n]??-1}function ms(e){const t=[],n=e.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let l=0;l<n.length;l++){const s=n[l];if(!r&&!i&&s==="<"){i=!0,a&&(t.push({start:o,end:l}),a=!1);continue}if(i&&s==='"'&&(r=!r),i&&!r&&s===">"){i=!1;continue}!i&&!r&&!a&&(o=l,a=!0)}return!t.length&&e.textContent.length&&t.push({start:o,end:e.innerHTML.length}),t}function Wr(e){return e.ctrlKey||e.metaKey||e.button!==0}function gs(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,Ot=null,Dt=null;function fi(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(s=>{var c;return s.nodeType===Node.TEXT_NODE&&((c=s.nodeValue)==null?void 0:c.trim())!==""});if(a&&r.tagName==="LI"){const s=r.closest("ul, ol");s&&!n.includes(s)&&n.push(s);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const l=Array.from(r.children);for(let s=l.length-1;s>=0;s--)i.push(l[s])}return n}function St(){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 Kr(e){return e.map(t=>t.innerText).join(`
|
|
8
|
+
`}}Ha();var Tl=He('<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 Xr(e){var t=Tl();k(e,t)}function gi(e,t){le(t,!0);const n=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),r=ol(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=qe(),o=ee(a);Bo(o,()=>t.href?"a":"button",!1,(l,c)=>{let u;L(()=>{u=Wo(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===ar,l.nodeName.includes("-")),jn(l,"--size",n())});var d=qe(),f=ee(d);Nt(f,()=>t.children??ft),k(c,d)}),k(e,a),se()}function Il(e){C(e,e.v+1)}function Al(e){let t=0,n=Te(0),i;return()=>{oo()&&(s(n),In(()=>(t===0&&(i=Ve(()=>e(()=>Il(n)))),t+=1,()=>{Kn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var Xt,Jt;class Pl{constructor(t,n){dt(this,Xt);dt(this,Jt);Ot(this,Xt,t),Ot(this,Jt,Al(n))}get current(){return Fe(this,Jt).call(this),Fe(this,Xt).call(this)}}Xt=new WeakMap,Jt=new WeakMap;const Cl=/\(.+\)/;class jl extends Pl{constructor(t,n){let i=Cl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>Lo(r,"change",a))}}const mi=new jl("(prefers-reduced-motion: reduce)");var Ml=(e,t)=>t()(),Ll=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 Jr(e,t){le(t,!0);const n=O(t,"onclose",3,()=>null),i=O(t,"onscroll",3,()=>null);Cr("scope","modal"),Ge(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return mi.current?Kt(f,{duration:0}):window.innerWidth<600?Ln(f,{duration:250,y:window.innerHeight}):El(f,{duration:150,start:.85})}var a=Ll();de("keydown",be,({key:f})=>{f==="Escape"&&n()()});var o=x(a),l=x(o),c=x(l);gi(c,{onclick:()=>n()(),children:(f,v)=>{Xr(f)},$$slots:{default:!0}});var u=E(l,2);Nt(u,()=>t.children);var d=E(o,2);d.__click=[Ml,n],de("scroll",o,function(...f){var v;(v=i())==null||v.apply(this,f)}),Ce(7,o,()=>r),Ce(7,a,()=>Kt,()=>({duration:150})),k(e,a),se()}ve(["click"]);const Nl=[{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 Ol=I('<div class="genre svelte-1ebula3"> </div>'),Dl=(e,t)=>C(t,!0),Rl=I('<button class="genre expand svelte-1ebula3"> </button>'),ql=I("<!> <!>",1);function Hl(e,t){le(t,!0);let n=V(!1);const i=z(()=>s(n)?t.genres:[t.genres[0]]);var r=ql(),a=ee(r);Qe(a,17,()=>s(i),yt,(c,u)=>{var d=qe();const f=z(()=>{var g;return(g=Nl.find(h=>h.slug===s(u)))==null?void 0:g.name});var v=ee(d);{var m=g=>{var h=Ol(),y=x(h);L(()=>K(y,ye(s(f)))),k(g,h)};H(v,g=>{s(f)&&g(m)})}k(c,d)});var o=E(a,2);{var l=c=>{var u=Rl();u.__click=[Dl,n];var d=x(u);L(()=>K(d,`+${t.genres.length-1}`)),k(c,u)};H(o,c=>{!s(n)&&t.genres.length>1&&c(l)})}k(e,r),se()}ve(["click"]);function Fl(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.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(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Se(e,t=1){e.role="heading",e.ariaLevel=t.toString()}function Zt(e){return e?e.replace("/src/img",""):null}var Bl=I('<div class="disclaimer svelte-1gro5q8" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1gro5q8">PlayPilot.com</a></div>'),Vl=(e,t,n)=>t(n()),Ul=I('<span class="cta svelte-1gro5q8"> </span>'),zl=I('<a target="_blank" class="playlink svelte-1gro5q8" rel="sponsored"><div class="playlink-content svelte-1gro5q8"><img alt="" height="36" width="36" class="svelte-1gro5q8"> <span class="name svelte-1gro5q8"> </span> <span class="category svelte-1gro5q8"> </span> <!> <div class="action svelte-1gro5q8"> </div></div></a>'),Wl=I('<div class="playlink empty svelte-1gro5q8" data-testid="playlinks-empty"> </div>'),Kl=I('<div class="heading svelte-1gro5q8"> </div> <!> <div class="playlinks svelte-1gro5q8"><!> <!></div>',1);function Yl(e,t){le(t,!0);const n=ko("scope")==="modal";let i=V(0);const r=z(()=>s(i)<500),a=z(()=>t.playlinks.filter(p=>!!p.logo_url)),o=z(()=>Fl(s(a))),l={SVOD:ye("Stream"),BUY:ye("Buy"),RENT:ye("Rent"),TVOD:ye("Rent Or Buy")};function c(p){he(n?fe.TitleModalPlaylinkClick:fe.TitlePopoverPlaylinkClick,t.title,{playlink:p})}var u=Kl(),d=ee(u),f=x(d);L(()=>K(f,ye("Where To Stream Online"))),an(d,(p,S)=>Se==null?void 0:Se(p,S),()=>3);var v=E(d,2);{var m=p=>{var S=Bl(),A=x(S);L(()=>K(A,`${ye("Commission Disclaimer")??""} `)),k(p,S)};H(v,p=>{t.playlinks.length&&p(m)})}var g=E(v,2),h=x(g);Qe(h,17,()=>s(o),yt,(p,S)=>{let A=()=>s(S).name,b=()=>s(S).url,T=()=>s(S).logo_url,U=()=>s(S).highlighted,M=()=>s(S).cta_text,P=()=>s(S).extra_info.category;var D=zl();D.__click=[Vl,c,A];var Z=x(D),G=x(Z);L(()=>ce(G,"src",Zt(T())));var B=E(G,2),j=x(B),N=E(B,2),R=x(N);L(()=>K(R,l[P()]||ye("Stream")));var q=E(N,2);{var ae=te=>{var we=Ul(),X=x(we);L(()=>K(X,M())),k(te,we)};H(q,te=>{M()&&te(ae)})}var Q=E(q,2),re=x(Q);L(()=>K(re,ye("Watch"))),L(()=>{ce(D,"href",b()),ce(D,"data-playlink",A()),ue(D,"highlighted",U()&&M()),K(j,A())}),k(p,D)});var y=E(h,2);{var w=p=>{var S=Wl(),A=x(S);L(()=>K(A,ye("Title Unavailable"))),k(p,S)};H(y,p=>{t.playlinks.length||p(w)})}L(()=>ue(g,"list",s(r))),il(g,"clientWidth",p=>C(i,p)),k(e,u),se()}ve(["click"]);var Zl=(e,t)=>C(t,!0),Gl=I('<button class="show-more svelte-1u3je71">Show more</button>'),Xl=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Jl=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Ql(e,t){le(t,!0);const n=O(t,"blurb",3,""),i=O(t,"limit",3,200);let r=V(!1);const a=z(()=>t.text.slice(0,i()));var o=Jl(),l=x(o),c=x(l),u=E(c);{var d=h=>{var y=Ue("...");k(h,y)};H(u,h=>{!s(r)&&t.text.length>i()&&h(d)})}var f=E(u,2);{var v=h=>{var y=Gl();y.__click=[Zl,r],k(h,y)};H(f,h=>{!s(r)&&(t.text.length>i()||n())&&h(v)})}var m=E(l,2);{var g=h=>{var y=Xl(),w=x(y);L(()=>K(w,n())),k(h,y)};H(m,h=>{s(r)&&h(g)})}L(()=>K(c,s(r)?t.text:s(a))),k(e,o),se()}ve(["click"]);var $l=He('<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 Qr(e){var t=$l();k(e,t)}var es=I('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),ts=I("<div> </div>"),ns=I('<img alt="" class="svelte-1026zg0">'),is=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 $r(e,t){le(t,!0);const n=O(t,"small",3,!1),i=O(t,"compact",3,!1);let r=V(!1),a=V(!1),o=V(!1);var l=is(),c=ee(l),u=x(c),d=x(u);{var f=N=>{var R=es(),q=x(R);L(()=>ce(q,"src",Zt(t.title.standing_poster))),L(()=>{ce(q,"alt",`Movie poster for '${t.title.title??""}'`),ue(q,"loaded",s(r))}),de("load",q,()=>C(r,!0)),k(N,R)};H(d,N=>{i()||N(f)})}var v=E(d,2),m=x(v);an(v,(N,R)=>Se==null?void 0:Se(N,R),()=>2);var g=E(v,2),h=x(g),y=x(h);Qr(y);var w=E(y),p=E(h,2);Hl(p,{get genres(){return t.title.genres}});var S=E(p,2),A=x(S),b=E(S,2),T=x(b);L(()=>K(T,ye(`Type: ${t.title.type}`)));var U=E(b,2);{var M=N=>{var R=ts(),q=x(R);L(()=>K(q,`${t.title.length??""} ${ye("Minutes")??""}`)),k(N,R)};H(U,N=>{!n()&&t.title.length&&N(M)})}var P=E(u,2),D=x(P);Yl(D,{get playlinks(){return t.title.providers},get title(){return t.title}});var Z=E(D,2);{var G=N=>{Ql(N,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};H(Z,N=>{n()||N(G)})}var B=E(c,2),j=x(B);Or(j,()=>s(o),N=>{var R=ns();L(()=>ce(R,"src",Zt(s(o)?t.title.standing_poster:t.title.medium_poster))),L(()=>{ue(R,"loaded",s(a)),ue(R,"blur",s(o))}),de("load",R,()=>C(a,!0)),de("error",R,()=>C(o,!0)),k(N,R)}),L(()=>{ue(c,"small",n()),ue(c,"compact",i()),ue(v,"truncate",n()),K(m,t.title.title),K(w,` ${t.title.imdb_score??""}`),K(A,t.title.year),ue(B,"faded",i())}),k(e,l),se()}function rs(e,t){le(t,!0),he(fe.TitleModalView,t.title);let n=!1;Ge(()=>{const r=Date.now();return xl("initial_test","modal"),()=>he(fe.TitleModalClose,t.title,{time_spent:Date.now()-r})});function i(){n||(he(fe.TitleModalScroll,t.title),n=!0)}Jr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{$r(r,{get title(){return t.title}})},$$slots:{default:!0}}),se()}var as=I('<div class="popover svelte-1us1507" tabindex="-1" aria-hidden="true"><div class="dialog svelte-1us1507" data-view-transition-old=""><!></div></div>');function os(e,t){le(t,!0);let n=O(t,"maxHeight",15);Cr("scope","popover");let i=V(null),r=V(!1);Ge(async()=>{await Kn(),a(),await Kn(),o()});function a(){if(!s(i))return;const{top:f,right:v,bottom:m,height:g}=s(i).getBoundingClientRect(),h=l();C(r,J(f-h<0&&window.innerHeight-m>f+g));const y=window.innerWidth-v-h;v+h>window.innerWidth&&(s(i).style.left=`${y}px`)}function o(){if(!s(i))return;const{top:f,height:v}=s(i).getBoundingClientRect(),m=l(),g=s(r)?window.innerHeight-f-m:f+v-m;n(Math.min(g,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=as(),u=x(c),d=x(u);Nt(d,()=>t.children),on(c,f=>C(i,f),()=>s(i)),L(()=>{ue(c,"flip",s(r)),jn(c,"--max-height",n()?n()+"px":null)}),Ce(7,u,()=>Ln,()=>({duration:mi.current?0:100,y:10})),k(e,c),se()}var ls=I('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function ss(e,t){le(t,!0);let n=V(0),i=V(null);he(fe.TitlePopoverView,t.title),Ge(()=>{r();const l=Date.now();return()=>he(fe.TitlePopoverClose,t.title,{time_spent:Date.now()-l})});function r(){const l=t.event.target;if(!(l!=null&&l.getClientRects))return;const c=Array.from(l.getClientRects()),d=c.map(v=>v.x).map(v=>Math.abs(v-t.event.clientX)),f=c[d.indexOf(Math.min(...d))];s(i).style.top=f.top+window.scrollY+"px",s(i).style.left=f.left+window.scrollX+"px",s(i).style.height=f.height+"px"}var a=ls(),o=x(a);os(o,{get maxHeight(){return s(n)},set maxHeight(l){C(n,J(l))},children:(l,c)=>{var u=z(()=>!!s(n)&&s(n)<250);$r(l,{get title(){return t.title},small:!0,get compact(){return s(u)}})},$$slots:{default:!0}}),on(a,l=>C(i,l),()=>s(i)),k(e,a),se()}var cs=e=>e.stopPropagation(),us=(e,t,n,i)=>t(e,s(n).title_details,s(i)),ds=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),fs=(e,t,n,i)=>t(s(n).title_details,i()),vs=I('<!> <a target="_blank"> </a>',1),_s=I(" <!>.",1),hs=I("<!> <br>",1),gs=I(" <br>",1),ms=I('<span class="svelte-pfvkex"><!></span>'),ps=I('<p class="svelte-pfvkex"></p>');function ys(e,t){le(t,!0);const n=O(t,"onclickmodal",3,()=>null);function i(c,u){he(fe.AfterArticlePlaylinkClick,c,{playlink:u})}function r(c,u,d){he(fe.AfterArticleModalButtonClick,u),n()(c,d)}var a=qe(),o=ee(a);{var l=c=>{var u=ps();Qe(u,21,()=>t.linkInjections,yt,(d,f)=>{var v=ms();const m=z(()=>{const{key:p,title:S,title_details:A,after_article_style:b}=s(f);return{key:p,title:S,title_details:A,after_article_style:b}}),g=z(()=>{var p;return((p=s(m).title_details)==null?void 0:p.providers)||[]});var h=x(v);{var y=p=>{var S=hs(),A=ee(S);{var b=U=>{var M=ds(),P=ee(M);L(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream")??""} `));var D=E(P);D.__click=[cs];var Z=x(D);Z.__click=[us,r,m,f];var G=x(Z);L(()=>K(G,ye("View Streaming Options"))),k(U,M)},T=U=>{var M=_s(),P=ee(M);L(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream On")??""} `));var D=E(P);Qe(D,17,()=>s(g),yt,(Z,G,B)=>{let j=()=>s(G).name,N=()=>s(G).url;var R=vs(),q=ee(R);{var ae=te=>{var we=Ue();L(()=>K(we,B===s(g).length-1?`, ${ye("And")}`:",")),k(te,we)};H(q,te=>{B&&te(ae)})}var Q=E(q,2);Q.__click=[fs,i,m,j];var re=x(Q);L(()=>{ce(Q,"href",N()),K(re,j())}),k(Z,R)}),k(U,M)};H(A,U=>{s(m).after_article_style==="modal_button"?U(b):U(T,!1)})}k(p,S)},w=p=>{var S=gs(),A=ee(S);L(()=>K(A,`"${s(m).title??""}" ${ye("Title Unavailable Suffix")??""} `)),k(p,S)};H(h,p=>{s(g).length?p(y):p(w,!1)})}L(()=>ce(v,"data-playpilot-injection-key",s(m).key)),k(d,v)}),k(c,u)};H(o,c=>{t.linkInjections.length&&c(l)})}k(e,a),se()}ve(["click"]);function ws(e,t,n){return e.filter(i=>n.every(r=>i[r]===t[r])).length}function ks(e,t){return t.some(n=>e>=n.start&&e<n.end)}function bs(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function pi(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ui(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 zi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function xs(e,t,n,i){const r=bs(t),a=pi(t),o=e.slice(0,i),l=e.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),d=l.replace(u,n);return o+d}function Ss(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Ne(e){return pi(e).toLowerCase().replace(/\s+/g,"")}function ea(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let c=e.slice(o,l).trim();return o>0&&(c="…"+c),l<e.length&&(c+="…"),c}function Es(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=Wi(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),l=Wi(Ki(a,2)),c=Ki(o,2);return{before:l,after:c}}function Wi(e){return e.split("").reverse().join("")}function Ki(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function Ts(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function Is(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,l=n?e.indexOf(n,o):e.length;if(n&&l===-1)break;const c=e.slice(o,l);i.push({match:c,index:o}),r=n?l+n.length:e.length+1}return i}function As(e,t,n,i){const a=Is(e,n,i).filter(({match:l})=>pi(l).includes(t));return a.length?a.reduce((l,c)=>!l||c.match.length<l.match.length?c:l):null}function Ps(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 Cs(e,t,n=0){const i=t.innerHTML,r=[],a=js(t);let o=i.indexOf(e);for(;o!==-1;)ks(o,a)&&r.push(o),o=i.indexOf(e,o+e.length);return r[n]??-1}function js(e){const t=[],n=e.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let l=0;l<n.length;l++){const c=n[l];if(!r&&!i&&c==="<"){i=!0,a&&(t.push({start:o,end:l}),a=!1);continue}if(i&&c==='"'&&(r=!r),i&&!r&&c===">"){i=!1;continue}!i&&!r&&!a&&(o=l,a=!0)}return!t.length&&e.textContent.length&&t.push({start:o,end:e.innerHTML.length}),t}function ta(e){return e.ctrlKey||e.metaKey||e.button!==0}function Ms(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 _t="data-playpilot-injection-key",Ht=`[${_t}]`;let yn=null,ht=null,Ft=null,Bt=null;function yi(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(c=>{var u;return c.nodeType===Node.TEXT_NODE&&((u=c.nodeValue)==null?void 0:u.trim())!==""});if(a&&r.tagName==="LI"){const c=r.closest("ul, ol");c&&!n.includes(c)&&n.push(c);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const l=Array.from(r.children);for(let c=l.length-1;c>=0;c--)i.push(l[c])}return n}function At(){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 na(e){return e.map(t=>t.innerText).join(`
|
|
9
9
|
|
|
10
|
-
`)}function ps(e,t={aiInjections:[],manualInjections:[]}){vi();const n=Ts(t);if(!n)return[];const i=Oe(e.map(c=>c.innerText).join(" ")),r=Is(n),a=r.filter(c=>i.includes(Oe(c.sentence))),o={};let l=-1;for(const c of a){l++;const d=e.findIndex(j=>Oe(j.innerText).includes(Oe(c.sentence))),f=e[d];if(!f)continue;const v=Oi(c.title,f,["A"]);if(!(v!=null&&v.nodeValue)||Di(v)){const j=Oi(c.title,f);if(j&&Di(j)){o[c.key]="Given text is already inside of a link.";continue}}const{injectionElement:g,linkElement:m}=ys(c),{phrase_before:h,phrase_after:w}=c;let p=-1,y=!1;if(ds(f.innerHTML,c.title)===1&&(p=f.innerHTML.indexOf(c.title)),p===-1&&(h||w)){const j=[h,c.title,w].filter(Boolean).join(" ");if(p=f.innerHTML.indexOf(j),p===-1){const b=vs(f.innerHTML,c.title,h||"",w||"");if(b){const{leadingSpaces:T,trailingSpaces:F}=_s(b.match);m.innerHTML=b.match.trim();const M=b.index+T,I=b.index+b.match.length-F;f.innerHTML=cs(f.innerHTML,g.outerHTML,M,I),p=b.index,y=!0}}}if(p===-1&&(v!=null&&v.nodeValue)){const j=f.innerHTML.indexOf(v.nodeValue),b=f.innerHTML.indexOf(c.sentence),T=as(a.slice(0,l+1),c,["title","sentence"])-1,F=hs(v.nodeValue,f,T);p=Math.max(j,F,b,0)}p!==-1&&(y||(f.innerHTML=ss(f.innerHTML,c.title,g.outerHTML,p)))}ks(r),ws();const s=As(n);return s.length&&xs(e,s),n.filter(c=>c.title_details).map((c,d)=>{const f=c.duplicate??(!c.manual&&Ps(c,d,n)),v=document.querySelector(`[${ut}="${c.key}"]`),g=Tn(c)&&!c.inactive&&!c.after_article&&!v,m=!!e.find(w=>Oe(w.innerText).includes(Oe(c.sentence))),h=g?o[c.key]||(m?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...c,inactive:c.inactive??!1,duplicate:f,failed:g,failed_message:h}})}function ys(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 ws(){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 ks(e){window.addEventListener("click",n=>{if(Wr(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(),gs(()=>{_n(!1),Yr(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||bs(a,r)}),n.addEventListener("mouseleave",()=>vn=null))})}function Yr(e,t){Wr(e)||Dt||(e.preventDefault(),Dt=Jt(Ul,{target:$r(),props:{title:t.title_details,onclose:Zr}}))}function Zr(e=!0){Dt&&(bn(Dt,{outro:e}),Dt=null)}function bs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;dt&&_n();const n=e.currentTarget;vn=n,setTimeout(()=>{vn===n&&(dt=Jt(Yl,{target:$r(),props:{event:e,title:t.title_details}}))},100)}function _n(e=!0){dt&&(bn(dt,{outro:e}),vn=null,dt=null)}function xs(e,t){var o,l;if(Ot||!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=((l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Ot=Jt(rs,{target:n,props:{linkInjections:t,onclickmodal:(s,c)=>Yr(s,c)}})}function Ss(){var e;Ot&&(bn(Ot),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Ot=null)}function vi(){document.querySelectorAll(Nt).forEach(t=>Es(t.getAttribute(ut)||"")),Ss(),Zr(!1),_n(!1)}function Es(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 Ts({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function Gr(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function Xr(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 Is(e){return Jr(e).filter(t=>t.in_text!==!1&&Xr(t))}function As(e){return Jr(e).filter(t=>t.after_article===!0&&Xr(t))}function Jr(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)&&Qr(n,t)))}function Ps(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&Qr(i,e))}function Qr(e,t){return e.title===t.title&&Oe(e.sentence)===Oe(t.sentence)}function $r(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function _i(){const e=St();return{content_heading:Cs(e),content_modified_time:js(e),content_published_time:Ms(e)}}function Cs(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function js(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?hi(n):null}function Ms(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?hi(n):null}function hi(e){try{return new Date(e).toISOString()}catch{return null}}let On=null;async function en(e,{url:t=ai(),hash:n=al(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=In(),o=Rr()?await Dr():!1,l=Hr();if(!a)throw new Error("No token was provided");i.metadata=_i(),i.run_ai&&(i.hash=n,i.page_text=e);const s=await fetch(Sn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!s.ok)throw s;const c=await s.json();return window.PlayPilotLinkInjections.last_successful_fetch=c,c}async function Hi(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;On&&clearTimeout(On);const l=async(s,c)=>{let d;try{if(d=await en(e),n&&(d=await Ls(e,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Bi(d.manual_injections||[]),d.ai_injections=Bi(d.ai_injections||[]),s(d);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),s();return}d&&a(d),On=setTimeout(()=>l(s),i)}};return new Promise(l)}async function Ls(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=_i().content_modified_time,i=t.content_modified_time?hi(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 Ns(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,phrase_before:l.phrase_before,phrase_after:l.phrase_after,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.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 Os(){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 Bi(e){return e.map(t=>({...t,key:ea(t.sid)}))}function ea(e){return e+"-"+qr()}function In(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Ds(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Rs=Me('<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 qs(e,t){const n=O(t,"expanded",3,!1);var i=Rs();N(()=>ue(i,"expanded",n())),k(e,i)}var Hs=Me('<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 Bs(e){var t=Hs();k(e,t)}function Fs(e,t,n){t(!t()),n()(t())}var Vs=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function Wn(e,t){le(t,!0);let n=O(t,"active",15),i=O(t,"fullwidth",3,!1),r=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=Vs();o.__click=[Fs,n,a];var l=x(o),s=x(l);Ct(s,()=>t.children),N(()=>{ce(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),ue(o,"active",n()),ue(o,"fullwidth",i())}),k(e,o),se()}fe(["click"]);var Us=A('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function mi(e,t){let n=O(t,"value",15),i=O(t,"label",3,""),r=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var l=Us();l.__input=function(...s){var c;(c=o())==null||c.apply(this,s)},N(()=>{ce(l,"name",r()),ce(l,"aria-label",i()),ce(l,"placeholder",i()),l.readOnly=a()}),Bo(l,n),k(e,l)}fe(["input"]);var zs=Me('<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>'),Ws=Me('<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>'),Ks=Me('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Fi(e,t){const n=O(t,"align",3,"bottom");var i=Ks(),r=x(i);{var a=l=>{var s=zs();k(l,s)},o=l=>{var s=He(),c=ee(s);{var d=f=>{var v=Ws();k(f,v)};q(c,f=>{n()==="center"&&f(d)},!0)}k(l,s)};q(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var Ys=A("<div><!></div>");function mt(e,t){le(t,!0);const n=O(t,"type",3,"error"),i=O(t,"fixed",3,!1);var r=Ys(),a=x(r);Ct(a,()=>t.children),N(()=>{No(r,`alert ${n()??""} svelte-df5n87`),ue(r,"fixed",i())}),k(e,r),se()}var Zs=A("<!> In-text Playlink",1),Gs=A("<!> Bottom Playlink",1),Xs=A('<div class="alert svelte-1shw34x"><!></div>'),Js=(e,t)=>t().after_article_style="playlinks",Qs=(e,t)=>t().after_article_style="modal_button",$s=A('<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>'),ec=A('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function tc(e,t){le(t,!0);const n=O(t,"linkInjection",7),i=z(()=>n().after_article_style==="modal_button");var r=ec(),a=ee(r),o=x(a),l=z(()=>n().in_text??!0);Wn(o,{fullwidth:!0,get active(){return u(l)},onclick:m=>{n().in_text=m,n().manual=!0},label:"In-text Playlink",children:(m,h)=>{var w=Zs(),p=ee(w);Fi(p,{align:"center"}),k(m,w)},$$slots:{default:!0}});var s=E(o,2),c=z(()=>n().after_article??!1);Wn(s,{fullwidth:!0,get active(){return u(c)},onclick:m=>{n().after_article=m,n().manual=!0},label:"Bottom Playlink",children:(m,h)=>{var w=Gs(),p=ee(w);Fi(p,{align:"bottom"}),k(m,w)},$$slots:{default:!0}});var d=E(a,2);{var f=m=>{var h=Xs(),w=x(h);mt(w,{type:"warning",children:(p,y)=>{var S=Fe("At least one layout option must be selected for the playlink to be visible.");k(p,S)},$$slots:{default:!0}}),Ce(3,h,()=>Vt,()=>({duration:200})),k(m,h)};q(d,m=>{Tn(n())||m(f)})}var v=E(d,2);{var g=m=>{var h=$s(),w=E(x(h),2),p=x(w);p.__click=[Js,n];var y=E(p,2);y.__click=[Qs,n];var S=E(y,2);N(()=>{ce(w,"aria-activedescendant",`playlinks-${(u(i)?"after-article":"in-text")??""}`),ce(p,"aria-selected",!u(i)||null),ue(p,"active",!u(i)),ce(y,"aria-selected",u(i)||null),ue(y,"active",u(i)),ue(S,"right",u(i))}),Ce(3,h,()=>Vt,()=>({duration:100})),k(m,h)};q(v,m=>{n().after_article&&m(g)})}k(e,r),se()}fe(["click"]);var nc=Me('<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 ic(e){var t=nc();k(e,t)}var rc=(e,t)=>P(t,!u(t)),ac=A('<div class="content svelte-zpsd2z"><!></div>'),oc=A('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function lc(e,t){le(t,!0);let n=U(!1),i=U(null);function r(d){var v;const f=d.target;f===u(i)||(v=u(i))!=null&&v.contains(f)||P(n,!1)}var a=oc();de("click",ke,r);var o=x(a);o.__click=[rc,n];var l=x(o);ic(l),$t(o,d=>P(i,d),()=>u(i));var s=E(o,2);{var c=d=>{var f=ac(),v=x(f);Ct(v,()=>t.children),Ce(1,f,()=>En,()=>({duration:150,y:5})),k(d,f)};q(s,d=>{u(n)&&d(c)})}N(()=>{ce(o,"aria-label",t.ariaLabel),ce(o,"aria-expanded",u(n))}),k(e,a),se()}fe(["click"]);function sc(e,t,n,i){var r,a;u(t)&&(pe(he.ManualReport,n.linkInjection.title_details,{report_reason:u(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 cc=(e,t,n)=>P(t,Q(n())),uc=A('<option class="svelte-o5qkco"> </option>'),dc=A('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),fc=A('<button class="submit svelte-o5qkco">Send report</button>'),vc=A('<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 _c(e,t){le(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);Fr(e,{get onclose(){return t.onclose},children:(a,o)=>{var l=vc(),s=x(l);Qt(s,(b,T)=>xe==null?void 0:xe(b,T),()=>2);var c=E(s,2),d=x(c),f=E(x(d)),v=E(d,2),g=E(x(v));N(()=>Z(g,`:
|
|
11
|
-
${zr(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var m=E(c,4),h=x(m);h.value=((h.__value="")==null,"");var w=E(h);Je(w,17,()=>n,ht,(b,T)=>{let F=()=>u(T).value,M=()=>u(T).label;var I=uc(),R={};I.__click=[cc,i,F];var W=x(I);N(()=>{R!==(R=F())&&(I.value=(I.__value=F())==null?"":F()),Z(W,M())}),k(b,I)});var p=E(m,2),y=x(p);{var S=b=>{var T=dc();Ce(1,T,()=>Ft,()=>({duration:200})),k(b,T)},j=b=>{var T=fc();T.__click=[sc,i,t,r],N(()=>T.disabled=!u(i)),k(b,T)};q(y,b=>{u(r)?b(S):b(j,!1)})}N(()=>Z(f,`: ${t.linkInjection.title??""}`)),Vo(m,()=>u(i),b=>P(i,b)),k(a,l)},$$slots:{default:!0}}),se()}fe(["click"]);function hc(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 mc(e,t){const n=Jt(_c,{target:document.body,props:{linkInjection:t(),onclose:()=>bn(n)}})}var gc=(e,t)=>P(t,!u(t)),pc=A('<button class="expand-sentence svelte-lo6h85"> </button>'),yc=A('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),wc=(e,t)=>P(t,!u(t)),kc=A('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),bc=A('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),xc=A('<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>'),Sc=A('<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 Ec(e,t){le(t,!0);const n=O(t,"linkInjection",15),i=O(t,"onremove",3,()=>null),r=O(t,"onhighlight",3,()=>null),a=z(()=>n()||{}),o=z(()=>u(a).key),l=z(()=>u(a).sentence),s=z(()=>u(a).title_details),c=z(()=>u(a).failed),d=z(()=>u(a).failed_message),f=z(()=>u(a).inactive),v=z(()=>u(s)),g=z(()=>zr(n().sentence,n().title,60));let m=U(!1),h=U(!1),w=U(!1),p=U(null);Ze(()=>{u(c)&&pe(he.InjectionFailed,u(v),{phrase:n().title,sentence:u(l)})});function y(J=!0){j().forEach(oe=>{oe.classList.toggle("playpilot-injection-highlight",J)})}function S(J){let $=J.target,oe=$==null?void 0:$.dataset.playpilotInjectionKey;$&&!oe&&($=$.closest(`[data-playpilot-injection-key="${u(o)}"]`),oe=$==null?void 0:$.dataset.playpilotInjectionKey),P(w,oe===u(o)),u(p)&&u(w)&&r()(u(p))}function j(){const J=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${u(o)}"]`));return J.length?J:fi(St()).filter($=>Oe($.innerText).includes(Oe(n().sentence)))||[]}var b=Sc();de("mouseover",ke,S),b.__click=[hc,y,j];var T=x(b),F=x(T);N(()=>ce(F,"src",Ut(u(v).standing_poster)));var M=E(F,2),I=x(M),R=x(I),W=E(I,2),G=x(W);Ao(G,()=>(u(h)?u(l):u(g)).replace(n().title,`<em>${n().title}</em>`));var V=E(G,2);{var C=J=>{var $=pc();$.__click=[gc,h];var oe=x($);N(()=>Z(oe,u(h)?"Less":"More")),k(J,$)};q(V,J=>{u(g).length<u(l).length&&J(C)})}var L=E(M,2),D=x(L);lc(D,{ariaLabel:"More options",children:(J,$)=>{var oe=yc(),Ae=ee(oe);Ae.__click=function(...ot){var B;(B=i())==null||B.apply(this,ot)};var $e=E(Ae,2);$e.__click=[mc,n],k(J,oe)},$$slots:{default:!0}});var H=E(T,2),ie=x(H);{var X=J=>{mt(J,{children:($,oe)=>{var Ae=Fe();N(()=>Z(Ae,u(d))),k($,Ae)},$$slots:{default:!0}})},re=J=>{var $=bc(),oe=x($);oe.__click=[wc,m];var Ae=x(oe);qs(Ae,{get expanded(){return u(m)}});var $e=E(oe,2);{var ot=ve=>{var Se=kc(),Le=x(Se);Bs(Le),Ce(3,Se,()=>Ft,()=>({duration:100})),k(ve,Se)};q($e,ve=>{Tn(n())||ve(ot)})}var B=E($e,2),K=z(()=>u(f)?"Inactive":"Visible"),_e=z(()=>!n().inactive);Wn(B,{get label(){return u(K)},get active(){return u(_e)},onclick:ve=>{n(n().inactive=!ve,!0),n(n().manual=!0,!0)},children:(ve,Se)=>{var Le=Fe();N(()=>Z(Le,u(f)?"Inactive":"Visible")),k(ve,Le)},$$slots:{default:!0}}),N(()=>ce(oe,"aria-expanded",u(m))),k(J,$)};q(ie,J=>{u(c)?J(X):J(re,!1)})}var ae=E(ie,2);{var Ie=J=>{var $=xc(),oe=E(x($),2);mi(oe,{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 Ae=E(oe,4),$e=x(Ae);tc($e,{get linkInjection(){return n()}}),Ce(3,$,()=>Vt,()=>({duration:100})),k(J,$)};q(ae,J=>{u(m)&&J(Ie)})}$t(b,J=>P(p,J),()=>u(p)),N(()=>{ue(b,"highlighted",u(w)),ue(b,"inactive",u(f)),Z(R,u(v).title)}),de("mouseenter",b,()=>y(!0)),de("mouseleave",b,()=>y(!1)),de("error",F,({target:J})=>J.src=Lr),Ce(6,b,()=>Vt,()=>({duration:200})),k(e,b),se()}fe(["click"]);var Tc=A('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Ic(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"position",23,()=>({x:0,y:0})),r=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},s=i();Ze(()=>{c(i().x,i().y)});function c(h,w){const p=window.innerWidth,y=window.innerHeight,S=n().clientWidth,j=n().clientHeight;h=Math.min(Math.max(h,r().x),p-S-r().x),w=Math.min(Math.max(w,r().y),y-j-r().y),n().style.right=h+"px",n().style.bottom=Math.max(w,r().y)+"px",i({x:h,y:w}),a()(i())}function d(h){var w,p;return{x:h.pageX||((w=h.touches)==null?void 0:w[0].pageX)||0,y:h.pageY||((p=h.touches)==null?void 0:p[0].pageY)||0}}function f(h){o=!0,l=d(h),s=i()}function v(h){if(!o)return;const w=d(h),p=w.x-l.x,y=w.y-l.y,S=s.x-p,j=s.y-y;c(S,j)}function g(){o&&(o=!1)}var m=Tc();de("mousemove",ke,v),de("touchmove",ke,v,void 0,!0),de("mouseup",ke,g),de("touchend",ke,g),de("resize",ke,()=>c(i().x,i().y)),m.__mousedown=f,m.__touchstart=f,k(e,m),se()}fe(["mousedown","touchstart"]);var Ac=A('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function Pc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"height",7,200),r=O(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,s=i();Ze(()=>{i()&&c(i())});function c(h){const w=window.getComputedStyle(n()).minHeight||"0",p=Math.max(parseInt(w),Math.min(h,g()));n().style.height=`${p}px`,i(p),r()(p)}function d(h){var w,p;o=!0,l=h.pageY||((p=(w=h.touches)==null?void 0:w[0])==null?void 0:p.pageY)||0,s=n().clientHeight}function f(h){var S,j;if(!o)return;const w=h.pageY||((j=(S=h.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,p=l-w,y=s+p;c(y)}function v(){o=!1}function g(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var m=Ac();de("mousemove",ke,f),de("touchmove",ke,f,void 0,!0),de("mouseup",ke,v),de("touchend",ke,v),de("resize",ke,()=>{i()&&c(i())}),m.__mousedown=d,m.__touchstart=d,k(e,m),se()}fe(["mousedown","touchstart"]);var Cc=Me('<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 jc(e){var t=Cc();k(e,t)}async function Mc(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 Lc=Me('<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 Nc(e){var t=Lc();k(e,t)}var Oc=A("<div> </div>"),Dc=e=>e.stopImmediatePropagation(),Rc=A('<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 Vi(e,t){le(t,!0);const n=O(t,"hoverable",3,!0),i=O(t,"onclick",3,()=>null);var r=Rc();r.__click=function(...b){var T;(T=i())==null||T.apply(this,b)};var a=x(r);N(()=>ce(a,"src",Ut(t.title.standing_poster)));var o=E(a,2),l=x(o),s=x(l),c=E(l,2),d=x(c),f=x(d);Vr(f);var v=E(f),g=E(d,2),m=x(g),h=E(g,2),w=x(h),p=E(h,2);{var y=b=>{var T=Oc(),F=x(T);N(()=>Z(F,`${t.title.length??""} min`)),k(b,T)};q(p,b=>{t.title.length&&b(y)})}var S=E(o,2);S.__click=[Dc];var j=x(S);Nc(j),N(()=>{ue(r,"hoverable",n()),Z(s,t.title.title),Z(v,` ${t.title.imdb_score??""}`),Z(m,t.title.year),Z(w,t.title.type),ce(S,"href",`${Mr}/${t.title.type??""}/${t.title.slug??""}`)}),de("error",a,({target:b})=>b.src=Lr),k(e,r),se()}fe(["click"]);var qc=A('<em class="empty svelte-1olb8n0">No results found</em>'),Hc=A('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Bc=A('<div class="selected svelte-1olb8n0"><!></div>'),Fc=A('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Vc(e,t){le(t,!0);let n=O(t,"onselect",3,()=>null),i=O(t,"query",15),r=U(Q([])),a=U(null),o=U(!1);pn(()=>{i()&&l(i())});async function l(h){P(o,!0);try{P(r,Q(await Mc(h)))}finally{P(o,!1)}}function s(h){i(h.title),P(a,Q(h)),n()(h)}var c=Fc(),d=x(c);mi(d,{oninput:()=>P(a,null),name:"search",label:"Search...",get value(){return i()},set value(h){i(h)}});var f=E(d,2);{var v=h=>{var w=Hc();Je(w,21,()=>u(r),p=>p.sid,(p,y)=>{Vi(p,{get title(){return u(y)},onclick:()=>s(u(y))})},p=>{var y=He(),S=ee(y);{var j=b=>{var T=qc();k(b,T)};q(S,b=>{u(o)||b(j)})}k(p,y)}),k(h,w)};q(f,h=>{i()&&!u(a)&&h(v)})}var g=E(f,2);{var m=h=>{var w=Bc(),p=x(w);Vi(p,{get title(){return u(a)},hoverable:!1}),k(h,w)};q(g,h=>{u(a)&&h(m)})}k(e,c),se()}function Uc(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 c=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:c,end:c+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const l=a.toString().length+i,s=l+n.length;return{start:l,end:s}}function zc(e,t,n,i,r,a,o,l){if(!u(t)||!u(n))return;const s=u(n).type==="movie"?"movie":"show",c=Mr+`/${s}/${u(n).slug}`,d={sid:u(n).sid,title:u(t),sentence:u(i),phrase_before:u(r),phrase_after:u(a),playpilot_url:c,key:ea(u(n).sid),title_details:u(n),manual:!0};o.onsave(d),l()()}var Wc=A('<div class="error svelte-1i8p6op"><!></div>'),Kc=A('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Yc=A('<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 Zc(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onclose",3,()=>null);let r=U(""),a=U(""),o=U(null),l=U(""),s=U(""),c=U(""),d=U("");Ze(f);function f(){const I=window.getSelection();if(!(I!=null&&I.anchorNode)||I.anchorNode.parentElement&&!St().contains(I.anchorNode.parentElement))return;const R=I.toString().trim();if(!R)return;P(c,""),P(r,Q(R));const W=I.getRangeAt(0).cloneContents();if(Array.from(W.childNodes).filter(X=>{var re;return(re=X.textContent)==null?void 0:re.trim()}).find(X=>{var re;return X.nodeName==="A"||((re=X.querySelector)==null?void 0:re.call(X,"a"))})){P(c,"Selection is or contains a link. Injections can not be created around already existing links.");return}P(d,Q(u(r)));const{node:V,sentence:C}=v(I,R);if(!V)return;P(a,Q(C));const{start:L,end:D}=Uc(I,V);(X=>(P(s,Q(X.before)),P(l,Q(X.after))))(us(V,L,D)),C.includes(u(s))||P(s,""),C.includes(u(l))||P(l,"");const H=I.getRangeAt(0).commonAncestorContainer.textContent,ie=Oe(n());(!H||!ie.includes(Oe(H)))&&P(c,"Selection was not inside of given content")}function v(I,R){const W=I.getRangeAt(0),G=St();let V=W.startContainer;for(;(V.textContent||"").length<=R.length*3&&V.parentNode&&V.parentNode.textContent!==G.textContent;)V=V.parentNode;if(!V||!V.textContent)return{node:null,sentence:""};const C=V.textContent,L=g(V,W.startContainer,W.startOffset),D=g(V,W.endContainer,W.endOffset),H=C.slice(0,L).lastIndexOf("."),ie=C.slice(D).match(/[.!?]/),X=ie?D+ie.index:C.length,re=H===-1?0:H+1,ae=X,Ie=C.slice(re,ae+1).trim();return{node:V,sentence:Ie}}function g(I,R,W){let G=0;const V=I,C=L=>{var D;if(L===R)return G+=W,!0;L.nodeType===Node.TEXT_NODE&&(G+=((D=L.textContent)==null?void 0:D.length)||0);for(let H=L.firstChild;H;H=H.nextSibling)if(C(H))return!0;return!1};return C(V),G}function m(I){var R,W;P(o,Q(I)),(W=(R=window.getSelection())==null?void 0:R.removeAllRanges)==null||W.call(R)}var h=Yc();de("mouseup",ke,f);var w=x(h),p=x(w);ci(p,{get onclick(){return i()},size:"24px",children:(I,R)=>{jc(I)},$$slots:{default:!0}});var y=E(p,2);Qt(y,(I,R)=>xe==null?void 0:xe(I,R),()=>2);var S=E(w,6);mi(S,{get value(){return u(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var j=E(S,2);{var b=I=>{var R=Wc(),W=x(R);mt(W,{children:(G,V)=>{var C=Fe();N(()=>Z(C,u(c))),k(G,C)},$$slots:{default:!0}}),k(I,R)};q(j,I=>{u(c)&&I(b)})}var T=E(j,2);{var F=I=>{var R=Kc(),W=E(ee(R),2);Ir(W,()=>u(a)+u(r),G=>{Vc(G,{onselect:m,get query(){return u(d)},set query(V){P(d,Q(V))}})}),k(I,R)};q(T,I=>{u(c)||I(F)})}var M=E(T,2);M.__click=[zc,r,o,a,s,l,t,i],N(()=>M.disabled=!u(r)||!u(o)),k(e,h),se()}fe(["click"]);const Kn="PlayPilotEditorialSessionId",ta=5e3,Gc=ta*2;async function Xc(e){const{ai_enabled:t,injections_enabled:n,ai_last_run:i,session_id:r,session_last_ping:a}=await en(e),o=ia(r||null,a||null),l={ai_enabled:t,ai_last_run:i,injections_enabled:n,session_id:r,session_last_ping:a};return o?await na(e):l}async function na(e){const t=ra(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a,ai_last_run:o}=await en(e,{params:i});return{ai_enabled:r,ai_last_run:o,injections_enabled:a,...i}}function ia(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=ra();return n-i.getTime()>Gc?!0:r===e}function ra(){return sessionStorage.getItem(Kn)||Jc()}function Jc(){const e=sessionStorage.getItem(Kn)||qr();return sessionStorage.setItem(Kn,e),e}function Qc(e,t,n){na(t()),n()()}var $c=A('<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),eu=A('<div class="alert svelte-2m2urs"><!></div>');function tu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onpoll",3,()=>null),r=O(t,"onallow",3,()=>null),a=O(t,"ondisallow",3,()=>null),o=O(t,"ontakeover",3,()=>null);let l=null,s=U(!0);Ze(()=>(c(),()=>{l&&clearInterval(l)}));function c(){d(),l=setInterval(d,ta)}async function d(){const m=await Xc(n());m&&(P(s,Q(ia(m.session_id||null,m.session_last_ping||null))),u(s)?r()():a()(),i()({injectionsEnabled:!!m.injections_enabled,aiEnabled:!!m.ai_enabled}))}var f=He(),v=ee(f);{var g=m=>{var h=eu(),w=x(h);mt(w,{type:"warning",children:(p,y)=>{var S=$c(),j=E(ee(S),2);j.__click=[Qc,n,o],k(p,S)},$$slots:{default:!0}}),k(m,h)};q(v,m=>{u(s)||m(g)})}k(e,f),se()}fe(["click"]);var nu=Me('<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 iu(e){var t=nu();k(e,t)}var ru=A('<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),au=A('<span class="svelte-1kpafo0">.</span>'),ou=A(`<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),lu=(e,t)=>P(t,!0),su=A('<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),cu=A('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),uu=A('<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 du(e,t){const n=O(t,"aiRunning",3,!1),i=O(t,"aiEnabled",3,!1),r=O(t,"message",3,""),a=O(t,"percentage",3,0),o=O(t,"aiInjectionsCount",3,0),l=o();let s=U(!1);var c=He(),d=ee(c);{var f=v=>{var g=uu(),m=x(g),h=x(m),w=x(h);iu(w);var p=E(h,2),y=x(p);{var S=M=>{var I=ru();k(M,I)},j=M=>{var I=He(),R=ee(I);{var W=V=>{var C=ou(),L=E(ee(C),2),D=x(L),H=E(D);Je(H,20,()=>({length:3}),ht,($,oe)=>{var Ae=au();k($,Ae)});var ie=E(L,2),X=x(ie),re=x(X);const ae=z(()=>`${Math.max(a(),3)??""}%`);N(()=>xn(re,"width",u(ae)));var Ie=E(X,2),J=x(Ie);N(()=>Z(J,`${Math.floor(a())??""}%`)),N(()=>Z(D,`${r()??""} `)),k(V,C)},G=V=>{var C=su(),L=ee(C),D=E(x(L),4);{var H=re=>{var ae=Fe("No new injections where found.");k(re,ae)},ie=re=>{var ae=Fe();N(()=>Z(ae,`${o()??""} Injections where found and added to the page.`)),k(re,ae)};q(D,re=>{l===o()?re(H):re(ie,!1)})}var X=E(L,2);X.__click=[lu,s],k(V,C)};q(R,V=>{n()?V(W):V(G,!1)},!0)}k(M,I)};q(y,M=>{i()?M(j,!1):M(S)})}var b=E(m,2),T=x(b);{var F=M=>{var I=cu();k(M,I)};q(T,M=>{n()&&M(F)})}N(()=>ue(g,"running",n())),k(v,g)};q(d,v=>{u(s)||v(f)})}k(e,c)}fe(["click"]);async function fu(e,t,n,i,r,a,o){try{P(t,!0),P(n,!1),i(await Ns(i(),r())),P(a,Q(u(o)))}catch{P(n,!0)}finally{P(t,!1)}}var vu=A('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),_u=A('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),hu=A('<div class="loading svelte-11aj6xq">Loading...</div>'),mu=A('<div class="bubble svelte-11aj6xq"> </div> <!>',1),gu=A(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),pu=A('<div class="alert svelte-11aj6xq"><!></div>'),yu=A('<div class="error svelte-11aj6xq"><!></div>'),wu=A('<div class="empty svelte-11aj6xq">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),ku=A('<button class="save svelte-11aj6xq"> </button>'),bu=A('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),xu=A("<!> <!> <!>",1),Su=A('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),Eu=A('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function Tu(e,t){le(t,!0);let n=O(t,"linkInjections",15),i=O(t,"pageText",3,""),r=O(t,"loading",3,!1),a=O(t,"injectionsEnabled",7,!1),o=O(t,"aiStatus",23,()=>({})),l=O(t,"onreinitialize",3,()=>null);const s="editor-position",c="editor-height",d=JSON.parse(localStorage.getItem(s)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(c)||"0");let v=U(null),g=U(!1),m=U(!1),h=U(!1),w=U(!0),p=U(0),y=U("");const S=z(()=>sn(o().aiEnabled,!1)),j=z(()=>sn(o().aiRunning,!1)),b=z(()=>JSON.stringify(n())),T=z(()=>!u(j)&&u(w)),F=z(()=>u(y)&&u(y)!==u(b)),M=z(()=>n().filter(B=>B.title_details&&!B.removed&&!B.duplicate&&(B.manual||!B.manual&&!B.failed))),I=z(()=>W(u(M))),R=z(()=>!r()&&Ke(()=>o().aiRunning));pn(()=>{r()||Ke(()=>{requestAnimationFrame(()=>P(y,Q(u(b)))),D()})});function W(B){return B.sort((K,_e)=>K.failed!==_e.failed?K.failed?1:-1:K.title_details.title.localeCompare(_e.title_details.title))}function G(B,K){localStorage.setItem(B,K)}function V(B){const K=n().findIndex(_e=>_e.key===B);n(n()[K].manual=!0,!0),n(n()[K].removed=!0,!0),n([...n()])}function C(B){if(!u(v))return;const K=B.offsetTop,_e=K+B.offsetHeight,ve=u(v).scrollTop,Se=ve+u(v).clientHeight;K>=ve&&_e<=Se||u(v).scrollTo({top:K-u(v).clientHeight/2,behavior:"smooth"})}function L(B){const K=B.target;P(p,Q(K.scrollTop))}function D(){const B={total:n().length,failed_automatic:n().filter(K=>K.failed&&!K.manual).length,failed_manual:n().filter(K=>K.failed&&K.manual).length,final_injected:u(M).length};pe(he.TotalInjectionsCount,null,B)}var H=Eu();bo(B=>{var K=vu();k(B,K)});var ie=x(H);{var X=B=>{var K=_u(),_e=x(K),ve=x(_e);Pc(ve,{get element(){return u(v)},height:f,onchange:Ge=>G(c,JSON.stringify(Ge))});var Se=E(_e,2),Le=x(Se);Ic(Le,{get element(){return u(v)},position:d,limit:{x:16,y:16},onchange:Ge=>G(s,JSON.stringify(Ge))}),k(B,K)};q(ie,B=>{u(v)&&!r()&&B(X)})}var re=E(ie,2),ae=x(re);Qt(ae,B=>xe==null?void 0:xe(B));var Ie=E(ae,2);{var J=B=>{var K=hu();k(B,K)},$=B=>{var K=He(),_e=ee(K);{var ve=Se=>{var Le=mu(),Ge=ee(Le),Ne=x(Ge),tn=E(Ge,2);ci(tn,{onclick:()=>P(g,!0),size:"24px","aria-label":"Add manual injection",children:(nn,gi)=>{var rn=Fe("+");k(nn,rn)},$$slots:{default:!0}}),N(()=>{ce(Ge,"aria-label",`${u(M).length??""} found playlinks`),Z(Ne,u(M).length)}),k(Se,Le)};q(_e,Se=>{u(T)&&Se(ve)},!0)}k(B,K)};q(Ie,B=>{r()?B(J):B($,!1)})}var oe=E(re,2);{var Ae=B=>{var K=xu(),_e=ee(K);tu(_e,{get pageText(){return i()},onallow:()=>P(w,!0),ondisallow:()=>P(w,!1),get ontakeover(){return l()},onpoll:Ne=>{a(Ne.injectionsEnabled),o({...o(),aiEnabled:Ne.aiEnabled})}});var ve=E(_e,2);{var Se=Ne=>{du(Ne,Zo(o,{get aiInjectionsCount(){return Gr(n()).aiInjections.length}}))};q(ve,Ne=>{u(w)&&(u(R)||!u(S))&&Ne(Se)})}var Le=E(ve,2);{var Ge=Ne=>{var tn=bu(),nn=ee(tn);{var gi=me=>{var ge=pu(),et=x(ge);mt(et,{type:"warning",children:(lt,sa)=>{var An=gu();k(lt,An)},$$slots:{default:!0}}),k(me,ge)};q(nn,me=>{a()||me(gi)})}var rn=E(nn,2);{var aa=me=>{var ge=yu(),et=x(ge);mt(et,{children:(lt,sa)=>{var An=Fe("Something went wrong, check your links below.");k(lt,An)},$$slots:{default:!0}}),Ce(7,ge,()=>Vt,()=>({duration:150})),k(me,ge)};q(rn,me=>{u(h)&&me(aa)})}var pi=E(rn,2);Je(pi,21,()=>u(I),me=>me.key,(me,ge)=>{const et=z(()=>n().findIndex(lt=>lt.key===u(ge).key));Ec(me,{onremove:()=>V(u(ge).key),onhighlight:C,get linkInjection(){return n()[u(et)]},set linkInjection(lt){n(n()[u(et)]=lt,!0)}})},me=>{var ge=wu();k(me,ge)});var oa=E(pi,2);{var la=me=>{var ge=ku();ge.__click=[fu,m,h,n,i,y,b];var et=x(ge);N(()=>{ge.disabled=u(m),Z(et,u(m)?"Saving...":"Save links")}),Ce(1,ge,()=>Ft,()=>({duration:100})),k(me,ge)};q(oa,me=>{u(F)&&n().length&&u(w)&&me(la)})}k(Ne,tn)};q(Le,Ne=>{u(T)&&Ne(Ge)})}k(B,K)};q(oe,B=>{r()||B(Ae)})}var $e=E(oe,2);{var ot=B=>{var K=Su(),_e=x(K);Zc(_e,{get pageText(){return i()},onclose:()=>P(g,!1),onsave:ve=>n().push(ve)}),N(()=>xn(K,"top",`${u(p)??""}px`)),Ce(3,K,()=>En,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(B,K)};q($e,B=>{u(g)&&B(ot)})}$t(H,B=>P(v,B),()=>u(v)),N(()=>{ue(H,"panel-open",u(g)),ue(H,"loading",r())}),de("scroll",H,L),k(e,H),se()}fe(["click"]);var Iu=Me('<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 Au(e){var t=Iu();k(e,t)}var Pu=A('<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 Cu(e,t){var n=Pu(),i=x(n);i.__click=function(...l){var s;(s=t.onclick)==null||s.apply(this,l)};var r=x(i);Au(r);var a=E(i,2);a.__click=function(...l){var s;(s=t.onclose)==null||s.apply(this,l)};var o=x(a);Br(o),k(e,n)}fe(["click"]);var ju=A('<img alt="" class="svelte-j7f9xl">');function Mu(e,t){var n=He(),i=ee(n);Je(i,17,()=>t.pixels,ht,(r,a)=>{var o=ju();N(()=>ce(o,"src",u(a))),k(r,o)}),k(e,n)}var Lu=A('<div class="playpilot-link-injections svelte-13rmd3g" data-playpilot-link-injections=""><!> <!></div> <!>',1);function Nu(e,t){le(t,!0);let n=U(null),i=U(Q([])),r=U(null),a=U(Q(Rr())),o=U(!!li()),l=U(!1),s=U(!0),c=U(!0),d=U(Q([]));const f=z(()=>u(r)||{}),v=z(()=>sn(u(f).ai_injections,()=>[],!0)),g=z(()=>sn(u(f).manual_injections,()=>[],!0)),m=z(()=>Kr(u(i)));pn(()=>{u(a)&&!u(s)&&w()}),Ze(()=>{if(!Ds())return(async()=>(await h(),pe(he.ArticlePageView)))(),()=>vi()});async function h(){P(s,!0),u(a)&&P(l,Q(await Dr()));try{const C=await Os(),L=ai();if(P(c,!!(C!=null&&C.exclude_urls_pattern&&L.match(new RegExp(C.exclude_urls_pattern)))),u(c))return;C!=null&&C.custom_style&&b(C.custom_style||""),S((C==null?void 0:C.html_selector)||"",(C==null?void 0:C.exclude_elements_selector)||"")}catch(C){pe(he.FetchingConfigFailed),console.error("TPI Config failed to fetch",C);return}try{if(P(r,Q(await Hi(u(m),{maxTries:1,runAiWhenRelevant:!0}))),P(s,!1),!u(r))return;if(el({organizationSid:u(r).organization_sid,domainSid:u(r).domain_sid}),!u(r).ai_running||!u(r).ai_enabled){y({aiInjections:u(v),manualInjections:u(g)});return}if(!u(a))return;P(r,Q(await Hi(u(m),{requireCompletedResult:!0,onpoll:C=>P(r,Q(C))}))),y({aiInjections:u(v),manualInjections:u(g)})}catch(C){console.error(C),pe(he.InjectionError,null,{message:C.message})}}function w(){y(Gr(u(d)))}function p(){P(a,!1),requestAnimationFrame(()=>{P(a,!0),h()})}function y(C={aiInjections:u(v),manualInjections:u(g)}){const L=ps(u(i),C);JSON.stringify(L)!==JSON.stringify(u(d))&&P(d,Q(L));const D=L.filter(H=>!H.failed);D.length&&(u(a)||pe(he.ArticleInjected,null,{manual:D.filter(H=>H.manual).length,ai:D.filter(H=>!H.manual).length}))}function S(C,L){C&&(window.PlayPilotLinkInjections.selector=C),P(n,Q(St())),P(i,Q(fi(u(n),L)))}function j(){P(a,!0),il(),h()}function b(C){const L="playpilot-custom-style",D=document.getElementById(L),H=D||document.createElement("style");H.textContent=`[data-playpilot-link-injections] { ${C} }`,H.id=L,D||document.body.appendChild(H)}var T=Lu(),F=ee(T),M=x(F);{var I=C=>{Cu(C,{onclick:j,onclose:()=>{P(o,!1),nl()}})};q(M,C=>{!u(c)&&u(o)&&!u(a)&&C(I)})}var R=E(M,2);{var W=C=>{var L=He(),D=ee(L);Go(D,{onerror:ie=>pe(he.EditorError,null,{message:ie.message}),failed:ie=>{mt(ie,{fixed:!0,children:(X,re)=>{var ae=Fe("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");k(X,ae)},$$slots:{default:!0}})}},ie=>{var X=z(()=>{var ae;return(ae=u(r))==null?void 0:ae.injections_enabled}),re=z(()=>{var ae,Ie,J,$,oe;return{aiEnabled:(ae=u(r))==null?void 0:ae.ai_enabled,aiRunning:((Ie=u(r))==null?void 0:Ie.ai_running)&&((J=u(r))==null?void 0:J.ai_enabled),message:($=u(r))==null?void 0:$.ai_progress_message,percentage:(oe=u(r))==null?void 0:oe.ai_progress_percentage}});Tu(ie,{get pageText(){return u(m)},get loading(){return u(s)},onreinitialize:p,get injectionsEnabled(){return u(X)},get aiStatus(){return u(re)},get linkInjections(){return u(d)},set linkInjections(ae){P(d,Q(ae))}})}),k(C,L)};q(R,C=>{!u(c)&&u(a)&&u(l)&&C(W)})}var G=E(F,2);{var V=C=>{Mu(C,{get pixels(){return u(r).pixels}})};q(G,C=>{var L,D;(D=(L=u(r))==null?void 0:L.pixels)!=null&&D.length&&C(V)})}k(e,T),se()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid:null,last_successful_fetch:null,tracked_events:[],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(Nu,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),vi()},debug(){const e=St(),t=fi(e);console.group("PlayPilot Link Injection Debug"),console.groupCollapsed("Config"),console.table(Object.entries(this)),console.groupEnd(),console.groupCollapsed("Elements"),console.log("Parent element",e),console.log("Valid elements",t),console.groupEnd(),console.groupCollapsed("Last fetch"),console.log(this.last_successful_fetch),console.groupEnd(),console.groupCollapsed("Meta"),console.log(_i()),console.groupEnd(),console.groupCollapsed("Page text"),console.log(Kr(t)),console.groupEnd(),console.groupCollapsed("Tracked events"),console.log(this.tracked_events),console.groupEnd(),console.groupEnd()}};
|
|
10
|
+
`)}function Ls(e,t={aiInjections:[],manualInjections:[]}){wi();const n=Bs(t);if(!n)return[];const i=Ne(e.map(u=>u.innerText).join(" ")),r=Vs(n),a=r.filter(u=>i.includes(Ne(u.sentence))),o={};let l=-1;for(const u of a){l++;const d=e.findIndex(A=>Ne(A.innerText).includes(Ne(u.sentence))),f=e[d];if(!f)continue;const v=Ui(u.title,f,["A"]);if(!(v!=null&&v.nodeValue)||zi(v)){const A=Ui(u.title,f);if(A&&zi(A)){o[u.key]="Given text is already inside of a link.";continue}}const{injectionElement:m,linkElement:g}=Ns(u),{phrase_before:h,phrase_after:y}=u;let w=-1,p=!1;if(Ts(f.innerHTML,u.title)===1&&(w=f.innerHTML.indexOf(u.title)),w===-1&&(h||y)){const A=[h,u.title,y].filter(Boolean).join(" ");if(w=f.innerHTML.indexOf(A),w===-1){const b=As(f.innerHTML,u.title,h||"",y||"");if(b){const{leadingSpaces:T,trailingSpaces:U}=Ps(b.match);g.innerHTML=b.match.trim();const M=b.index+T,P=b.index+b.match.length-U;f.innerHTML=Ss(f.innerHTML,m.outerHTML,M,P),w=b.index,p=!0}}}if(w===-1&&(v!=null&&v.nodeValue)){const A=f.innerHTML.indexOf(v.nodeValue),b=f.innerHTML.indexOf(u.sentence),T=ws(a.slice(0,l+1),u,["title","sentence"])-1,U=Cs(v.nodeValue,f,T);w=Math.max(A,U,b,0)}w!==-1&&(p||(f.innerHTML=xs(f.innerHTML,u.title,m.outerHTML,w)))}Ds(r),Os();const c=Us(n);return c.length&&qs(e,c),n.filter(u=>u.title_details).map((u,d)=>{const f=u.duplicate??(!u.manual&&zs(u,d,n)),v=document.querySelector(`[${_t}="${u.key}"]`),m=Nn(u)&&!u.inactive&&!u.after_article&&!v,g=!!e.find(y=>Ne(y.innerText).includes(Ne(u.sentence))),h=m?o[u.key]||(g?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...u,inactive:u.inactive??!1,duplicate:f,failed:m,failed_message:h}})}function Ns(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 Os(){const e=Array.from(document.querySelectorAll(`${Ht} 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 Ds(e){window.addEventListener("click",n=>{if(ta(n))return;let i=n.target;if(!i||(i.hasAttribute(_t)||(i=i.closest(Ht)),!i))return;const r=i.getAttribute(_t);if(!r)return;const a=e.find(o=>r===o.key);a&&(n.preventDefault(),Ms(()=>{wn(!1),ia(n,a)},!mi.current&&window.innerWidth>=600&&!window.matchMedia("(pointer: coarse)").matches))}),window.addEventListener("mousemove",n=>{if(!ht)return;const i=n.target;i.hasAttribute("data-playpilot-title-popover")||i.closest("[data-playpilot-title-popover]")||i.hasAttribute(_t)||i.closest(Ht)||wn()}),Array.from(document.querySelectorAll(Ht)).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=e.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{ht||Rs(a,r)}),n.addEventListener("mouseleave",()=>yn=null))})}function ia(e,t){ta(e)||Bt||(e.preventDefault(),Bt=rn(rs,{target:ca(),props:{title:t.title_details,onclose:ra}}))}function ra(e=!0){Bt&&(Cn(Bt,{outro:e}),Bt=null)}function Rs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;ht&&wn();const n=e.currentTarget;yn=n,setTimeout(()=>{yn===n&&(ht=rn(ss,{target:ca(),props:{event:e,title:t.title_details}}))},100)}function wn(e=!0){ht&&(Cn(ht,{outro:e}),yn=null,ht=null)}function qs(e,t){var o,l;if(Ft||!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=((l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Ft=rn(ys,{target:n,props:{linkInjections:t,onclickmodal:(c,u)=>ia(c,u)}})}function Hs(){var e;Ft&&(Cn(Ft),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Ft=null)}function wi(){document.querySelectorAll(Ht).forEach(t=>Fs(t.getAttribute(_t)||"")),Hs(),ra(!1),wn(!1)}function Fs(e){var i;const t=document.querySelector(`[${_t}="${e}"]`);if(!t)return;const n=(i=t.querySelector("a"))==null?void 0:i.innerHTML;t.outerHTML=n||""}function Bs({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function aa(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function oa(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Nn(e)}function Nn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function Vs(e){return la(e).filter(t=>t.in_text!==!1&&oa(t))}function Us(e){return la(e).filter(t=>t.after_article===!0&&oa(t))}function la(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)&&sa(n,t)))}function zs(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&sa(i,e))}function sa(e,t){return e.title===t.title&&Ne(e.sentence)===Ne(t.sentence)}function ca(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function ki(){const e=At();return{content_heading:Ws(e),content_modified_time:Ks(e),content_published_time:Ys(e)}}function Ws(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ks(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?bi(n):null}function Ys(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?bi(n):null}function bi(e){try{return new Date(e).toISOString()}catch{return null}}let Bn=null;async function ln(e,{url:t=fi(),hash:n=yl(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=On(),o=Kr()?await Wr():!1,l=Zr();if(!a)throw new Error("No token was provided");i.metadata=ki(),i.run_ai&&(i.hash=n,i.page_text=e);const c=await fetch(Mn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!c.ok)throw c;const u=await c.json();return window.PlayPilotLinkInjections.last_successful_fetch=u,u}async function Yi(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;Bn&&clearTimeout(Bn);const l=async(c,u)=>{let d;try{if(d=await ln(e),n&&(d=await Zs(e,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Zi(d.manual_injections||[]),d.ai_injections=Zi(d.ai_injections||[]),c(d);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),c();return}d&&a(d),Bn=setTimeout(()=>l(c),i)}};return new Promise(l)}async function Zs(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=ki().content_modified_time,i=t.content_modified_time?bi(t.content_modified_time):null,r=n&&i===n;return t.ai_last_run&&r?t:await ln(e,{params:{run_ai:!0}})}async function Gs(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,phrase_before:l.phrase_before,phrase_after:l.phrase_after,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await ln(t,{params:{private_token:_i(),manual_injections:r,content_text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Xs(){const e=new Headers({"Content-Type":"application/json"}),t=On();if(!t)throw new Error("No token was provided");const n=await fetch(Mn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Zi(e){return e.map(t=>({...t,key:ua(t.sid)}))}function ua(e){return e+"-"+Yr()}function On(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Js(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Qs=He('<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 $s(e,t){const n=O(t,"expanded",3,!1);var i=Qs();L(()=>ue(i,"expanded",n())),k(e,i)}var ec=He('<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 tc(e){var t=ec();k(e,t)}function nc(e,t,n){t(!t()),n()(t())}var ic=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 Qn(e,t){le(t,!0);let n=O(t,"active",15),i=O(t,"fullwidth",3,!1),r=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=ic();o.__click=[nc,n,a];var l=x(o),c=x(l);Nt(c,()=>t.children),L(()=>{ce(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),ue(o,"active",n()),ue(o,"fullwidth",i())}),k(e,o),se()}ve(["click"]);var rc=I('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function xi(e,t){let n=O(t,"value",15),i=O(t,"label",3,""),r=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var l=rc();l.__input=function(...c){var u;(u=o())==null||u.apply(this,c)},L(()=>{ce(l,"name",r()),ce(l,"aria-label",i()),ce(l,"placeholder",i()),l.readOnly=a()}),Qo(l,n),k(e,l)}ve(["input"]);var ac=He('<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>'),oc=He('<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>'),lc=He('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Gi(e,t){const n=O(t,"align",3,"bottom");var i=lc(),r=x(i);{var a=l=>{var c=ac();k(l,c)},o=l=>{var c=qe(),u=ee(c);{var d=f=>{var v=oc();k(f,v)};H(u,f=>{n()==="center"&&f(d)},!0)}k(l,c)};H(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var sc=I("<div><!></div>");function wt(e,t){le(t,!0);const n=O(t,"type",3,"error"),i=O(t,"fixed",3,!1);var r=sc(),a=x(r);Nt(a,()=>t.children),L(()=>{Ko(r,`alert ${n()??""} svelte-df5n87`),ue(r,"fixed",i())}),k(e,r),se()}var cc=I("<!> In-text Playlink",1),uc=I("<!> Bottom Playlink",1),dc=I('<div class="alert svelte-1shw34x"><!></div>'),fc=(e,t)=>t().after_article_style="playlinks",vc=(e,t)=>t().after_article_style="modal_button",_c=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>'),hc=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function gc(e,t){le(t,!0);const n=O(t,"linkInjection",7),i=z(()=>n().after_article_style==="modal_button");var r=hc(),a=ee(r),o=x(a),l=z(()=>n().in_text??!0);Qn(o,{fullwidth:!0,get active(){return s(l)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,h)=>{var y=cc(),w=ee(y);Gi(w,{align:"center"}),k(g,y)},$$slots:{default:!0}});var c=E(o,2),u=z(()=>n().after_article??!1);Qn(c,{fullwidth:!0,get active(){return s(u)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,h)=>{var y=uc(),w=ee(y);Gi(w,{align:"bottom"}),k(g,y)},$$slots:{default:!0}});var d=E(a,2);{var f=g=>{var h=dc(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=Ue("At least one layout option must be selected for the playlink to be visible.");k(w,S)},$$slots:{default:!0}}),Ce(3,h,()=>Yt,()=>({duration:200})),k(g,h)};H(d,g=>{Nn(n())||g(f)})}var v=E(d,2);{var m=g=>{var h=_c(),y=E(x(h),2),w=x(y);w.__click=[fc,n];var p=E(w,2);p.__click=[vc,n];var S=E(p,2);L(()=>{ce(y,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ce(w,"aria-selected",!s(i)||null),ue(w,"active",!s(i)),ce(p,"aria-selected",s(i)||null),ue(p,"active",s(i)),ue(S,"right",s(i))}),Ce(3,h,()=>Yt,()=>({duration:100})),k(g,h)};H(v,g=>{n().after_article&&g(m)})}k(e,r),se()}ve(["click"]);var mc=He('<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 pc(e){var t=mc();k(e,t)}var yc=(e,t)=>C(t,!s(t)),wc=I('<div class="content svelte-zpsd2z"><!></div>'),kc=I('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function bc(e,t){le(t,!0);let n=V(!1),i=V(null);function r(d){var v;const f=d.target;f===s(i)||(v=s(i))!=null&&v.contains(f)||C(n,!1)}var a=kc();de("click",be,r);var o=x(a);o.__click=[yc,n];var l=x(o);pc(l),on(o,d=>C(i,d),()=>s(i));var c=E(o,2);{var u=d=>{var f=wc(),v=x(f);Nt(v,()=>t.children),Ce(1,f,()=>Ln,()=>({duration:150,y:5})),k(d,f)};H(c,d=>{s(n)&&d(u)})}L(()=>{ce(o,"aria-label",t.ariaLabel),ce(o,"aria-expanded",s(n))}),k(e,a),se()}ve(["click"]);function xc(e,t,n,i){var r,a;s(t)&&(he(fe.ManualReport,n.linkInjection.title_details,{report_reason:s(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()}),C(i,!0),setTimeout(n.onclose,3e3))}var Sc=(e,t,n)=>C(t,J(n())),Ec=I('<option class="svelte-o5qkco"> </option>'),Tc=I('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),Ic=I('<button class="submit svelte-o5qkco">Send report</button>'),Ac=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 Pc(e,t){le(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=V(""),r=V(!1);Jr(e,{get onclose(){return t.onclose},children:(a,o)=>{var l=Ac(),c=x(l);an(c,(b,T)=>Se==null?void 0:Se(b,T),()=>2);var u=E(c,2),d=x(u),f=E(x(d)),v=E(d,2),m=E(x(v));L(()=>K(m,`:
|
|
11
|
+
${ea(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var g=E(u,4),h=x(g);h.value=((h.__value="")==null,"");var y=E(h);Qe(y,17,()=>n,yt,(b,T)=>{let U=()=>s(T).value,M=()=>s(T).label;var P=Ec(),D={};P.__click=[Sc,i,U];var Z=x(P);L(()=>{D!==(D=U())&&(P.value=(P.__value=U())==null?"":U()),K(Z,M())}),k(b,P)});var w=E(g,2),p=x(w);{var S=b=>{var T=Tc();Ce(1,T,()=>Kt,()=>({duration:200})),k(b,T)},A=b=>{var T=Ic();T.__click=[xc,i,t,r],L(()=>T.disabled=!s(i)),k(b,T)};H(p,b=>{s(r)?b(S):b(A,!1)})}L(()=>K(f,`: ${t.linkInjection.title??""}`)),el(g,()=>s(i),b=>C(i,b)),k(a,l)},$$slots:{default:!0}}),se()}ve(["click"]);function Cc(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 jc(e,t){const n=rn(Pc,{target:document.body,props:{linkInjection:t(),onclose:()=>Cn(n)}})}var Mc=(e,t)=>C(t,!s(t)),Lc=I('<button class="expand-sentence svelte-lo6h85"> </button>'),Nc=I('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),Oc=(e,t)=>C(t,!s(t)),Dc=I('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),Rc=I('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),qc=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>'),Hc=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 Fc(e,t){le(t,!0);const n=O(t,"linkInjection",15),i=O(t,"onremove",3,()=>null),r=O(t,"onhighlight",3,()=>null),a=z(()=>n()||{}),o=z(()=>s(a).key),l=z(()=>s(a).sentence),c=z(()=>s(a).title_details),u=z(()=>s(a).failed),d=z(()=>s(a).failed_message),f=z(()=>s(a).inactive),v=z(()=>s(c)),m=z(()=>ea(n().sentence,n().title,60));let g=V(!1),h=V(!1),y=V(!1),w=V(null);Ge(()=>{s(u)&&he(fe.InjectionFailed,s(v),{phrase:n().title,sentence:s(l)})});function p(X=!0){A().forEach(oe=>{oe.classList.toggle("playpilot-injection-highlight",X)})}function S(X){let $=X.target,oe=$==null?void 0:$.dataset.playpilotInjectionKey;$&&!oe&&($=$.closest(`[data-playpilot-injection-key="${s(o)}"]`),oe=$==null?void 0:$.dataset.playpilotInjectionKey),C(y,oe===s(o)),s(w)&&s(y)&&r()(s(w))}function A(){const X=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return X.length?X:yi(At()).filter($=>Ne($.innerText).includes(Ne(n().sentence)))||[]}var b=Hc();de("mouseover",be,S),b.__click=[Cc,p,A];var T=x(b),U=x(T);L(()=>ce(U,"src",Zt(s(v).standing_poster)));var M=E(U,2),P=x(M),D=x(P),Z=E(P,2),G=x(Z);Fo(G,()=>(s(h)?s(l):s(m)).replace(n().title,`<em>${n().title}</em>`));var B=E(G,2);{var j=X=>{var $=Lc();$.__click=[Mc,h];var oe=x($);L(()=>K(oe,s(h)?"Less":"More")),k(X,$)};H(B,X=>{s(m).length<s(l).length&&X(j)})}var N=E(M,2),R=x(N);bc(R,{ariaLabel:"More options",children:(X,$)=>{var oe=Nc(),Ae=ee(oe);Ae.__click=function(...ct){var F;(F=i())==null||F.apply(this,ct)};var et=E(Ae,2);et.__click=[jc,n],k(X,oe)},$$slots:{default:!0}});var q=E(T,2),ae=x(q);{var Q=X=>{wt(X,{children:($,oe)=>{var Ae=Ue();L(()=>K(Ae,s(d))),k($,Ae)},$$slots:{default:!0}})},re=X=>{var $=Rc(),oe=x($);oe.__click=[Oc,g];var Ae=x(oe);$s(Ae,{get expanded(){return s(g)}});var et=E(oe,2);{var ct=_e=>{var Ee=Dc(),Me=x(Ee);tc(Me),Ce(3,Ee,()=>Kt,()=>({duration:100})),k(_e,Ee)};H(et,_e=>{Nn(n())||_e(ct)})}var F=E(et,2),W=z(()=>s(f)?"Inactive":"Visible"),ge=z(()=>!n().inactive);Qn(F,{get label(){return s(W)},get active(){return s(ge)},onclick:_e=>{n(n().inactive=!_e,!0),n(n().manual=!0,!0)},children:(_e,Ee)=>{var Me=Ue();L(()=>K(Me,s(f)?"Inactive":"Visible")),k(_e,Me)},$$slots:{default:!0}}),L(()=>ce(oe,"aria-expanded",s(g))),k(X,$)};H(ae,X=>{s(u)?X(Q):X(re,!1)})}var te=E(ae,2);{var we=X=>{var $=qc(),oe=E(x($),2);xi(oe,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ct){n(n().playpilot_url=ct,!0)}});var Ae=E(oe,4),et=x(Ae);gc(et,{get linkInjection(){return n()}}),Ce(3,$,()=>Yt,()=>({duration:100})),k(X,$)};H(te,X=>{s(g)&&X(we)})}on(b,X=>C(w,X),()=>s(w)),L(()=>{ue(b,"highlighted",s(y)),ue(b,"inactive",s(f)),K(D,s(v).title)}),de("mouseenter",b,()=>p(!0)),de("mouseleave",b,()=>p(!1)),de("error",U,({target:X})=>X.src=Vr),Ce(6,b,()=>Yt,()=>({duration:200})),k(e,b),se()}ve(["click"]);var Bc=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Vc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"position",23,()=>({x:0,y:0})),r=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},c=i();Ge(()=>{u(i().x,i().y)});function u(h,y){const w=window.innerWidth,p=window.innerHeight,S=n().clientWidth,A=n().clientHeight;h=Math.min(Math.max(h,r().x),w-S-r().x),y=Math.min(Math.max(y,r().y),p-A-r().y),n().style.right=h+"px",n().style.bottom=Math.max(y,r().y)+"px",i({x:h,y}),a()(i())}function d(h){var y,w;return{x:h.pageX||((y=h.touches)==null?void 0:y[0].pageX)||0,y:h.pageY||((w=h.touches)==null?void 0:w[0].pageY)||0}}function f(h){o=!0,l=d(h),c=i()}function v(h){if(!o)return;const y=d(h),w=y.x-l.x,p=y.y-l.y,S=c.x-w,A=c.y-p;u(S,A)}function m(){o&&(o=!1)}var g=Bc();de("mousemove",be,v),de("touchmove",be,v,void 0,!0),de("mouseup",be,m),de("touchend",be,m),de("resize",be,()=>u(i().x,i().y)),g.__mousedown=f,g.__touchstart=f,k(e,g),se()}ve(["mousedown","touchstart"]);var Uc=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function zc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"height",7,200),r=O(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,c=i();Ge(()=>{i()&&u(i())});function u(h){const y=window.getComputedStyle(n()).minHeight||"0",w=Math.max(parseInt(y),Math.min(h,m()));n().style.height=`${w}px`,i(w),r()(w)}function d(h){var y,w;o=!0,l=h.pageY||((w=(y=h.touches)==null?void 0:y[0])==null?void 0:w.pageY)||0,c=n().clientHeight}function f(h){var S,A;if(!o)return;const y=h.pageY||((A=(S=h.touches)==null?void 0:S[0])==null?void 0:A.pageY)||0,w=l-y,p=c+w;u(p)}function v(){o=!1}function m(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var g=Uc();de("mousemove",be,f),de("touchmove",be,f,void 0,!0),de("mouseup",be,v),de("touchend",be,v),de("resize",be,()=>{i()&&u(i())}),g.__mousedown=d,g.__touchstart=d,k(e,g),se()}ve(["mousedown","touchstart"]);var Wc=He('<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 Kc(e){var t=Wc();k(e,t)}async function Yc(e){const t=new Headers({"Content-Type":"application/json"}),n=On();if(!n)throw new Error("No token was provided");const i=await fetch(Mn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Zc=He('<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 Gc(e){var t=Zc();k(e,t)}var Xc=I("<div> </div>"),Jc=e=>e.stopImmediatePropagation(),Qc=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 Xi(e,t){le(t,!0);const n=O(t,"hoverable",3,!0),i=O(t,"onclick",3,()=>null);var r=Qc();r.__click=function(...b){var T;(T=i())==null||T.apply(this,b)};var a=x(r);L(()=>ce(a,"src",Zt(t.title.standing_poster)));var o=E(a,2),l=x(o),c=x(l),u=E(l,2),d=x(u),f=x(d);Qr(f);var v=E(f),m=E(d,2),g=x(m),h=E(m,2),y=x(h),w=E(h,2);{var p=b=>{var T=Xc(),U=x(T);L(()=>K(U,`${t.title.length??""} min`)),k(b,T)};H(w,b=>{t.title.length&&b(p)})}var S=E(o,2);S.__click=[Jc];var A=x(S);Gc(A),L(()=>{ue(r,"hoverable",n()),K(c,t.title.title),K(v,` ${t.title.imdb_score??""}`),K(g,t.title.year),K(y,t.title.type),ce(S,"href",`${Br}/${t.title.type??""}/${t.title.slug??""}`)}),de("error",a,({target:b})=>b.src=Vr),k(e,r),se()}ve(["click"]);var $c=I('<em class="empty svelte-1olb8n0">No results found</em>'),eu=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),tu=I('<div class="selected svelte-1olb8n0"><!></div>'),nu=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function iu(e,t){le(t,!0);let n=O(t,"onselect",3,()=>null),i=O(t,"query",15),r=V(J([])),a=V(null),o=V(!1);Tn(()=>{i()&&l(i())});async function l(h){C(o,!0);try{C(r,J(await Yc(h)))}finally{C(o,!1)}}function c(h){i(h.title),C(a,J(h)),n()(h)}var u=nu(),d=x(u);xi(d,{oninput:()=>C(a,null),name:"search",label:"Search...",get value(){return i()},set value(h){i(h)}});var f=E(d,2);{var v=h=>{var y=eu();Qe(y,21,()=>s(r),w=>w.sid,(w,p)=>{Xi(w,{get title(){return s(p)},onclick:()=>c(s(p))})},w=>{var p=qe(),S=ee(p);{var A=b=>{var T=$c();k(b,T)};H(S,b=>{s(o)||b(A)})}k(w,p)}),k(h,y)};H(f,h=>{i()&&!s(a)&&h(v)})}var m=E(f,2);{var g=h=>{var y=tu(),w=x(y);Xi(w,{get title(){return s(a)},hoverable:!1}),k(h,y)};H(m,h=>{s(a)&&h(g)})}k(e,u),se()}function ru(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 u=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:u,end:u+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const l=a.toString().length+i,c=l+n.length;return{start:l,end:c}}function au(e,t,n,i,r,a,o,l){if(!s(t)||!s(n))return;const c=s(n).type==="movie"?"movie":"show",u=Br+`/${c}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),phrase_before:s(r),phrase_after:s(a),playpilot_url:u,key:ua(s(n).sid),title_details:s(n),manual:!0};o.onsave(d),l()()}var ou=I('<div class="error svelte-1i8p6op"><!></div>'),lu=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),su=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 cu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onclose",3,()=>null);let r=V(""),a=V(""),o=V(null),l=V(""),c=V(""),u=V(""),d=V("");Ge(f);function f(){const P=window.getSelection();if(!(P!=null&&P.anchorNode)||P.anchorNode.parentElement&&!At().contains(P.anchorNode.parentElement))return;const D=P.toString().trim();if(!D)return;C(u,""),C(r,J(D));const Z=P.getRangeAt(0).cloneContents();if(Array.from(Z.childNodes).filter(Q=>{var re;return(re=Q.textContent)==null?void 0:re.trim()}).find(Q=>{var re;return Q.nodeName==="A"||((re=Q.querySelector)==null?void 0:re.call(Q,"a"))})){C(u,"Selection is or contains a link. Injections can not be created around already existing links.");return}C(d,J(s(r)));const{node:B,sentence:j}=v(P,D);if(!B)return;C(a,J(j));const{start:N,end:R}=ru(P,B);(Q=>(C(c,J(Q.before)),C(l,J(Q.after))))(Es(B,N,R)),j.includes(s(c))||C(c,""),j.includes(s(l))||C(l,"");const q=P.getRangeAt(0).commonAncestorContainer.textContent,ae=Ne(n());(!q||!ae.includes(Ne(q)))&&C(u,"Selection was not inside of given content")}function v(P,D){const Z=P.getRangeAt(0),G=At();let B=Z.startContainer;for(;(B.textContent||"").length<=D.length*3&&B.parentNode&&B.parentNode.textContent!==G.textContent;)B=B.parentNode;if(!B||!B.textContent)return{node:null,sentence:""};const j=B.textContent,N=m(B,Z.startContainer,Z.startOffset),R=m(B,Z.endContainer,Z.endOffset),q=j.slice(0,N).lastIndexOf("."),ae=j.slice(R).match(/[.!?]/),Q=ae?R+ae.index:j.length,re=q===-1?0:q+1,te=Q,we=j.slice(re,te+1).trim();return{node:B,sentence:we}}function m(P,D,Z){let G=0;const B=P,j=N=>{var R;if(N===D)return G+=Z,!0;N.nodeType===Node.TEXT_NODE&&(G+=((R=N.textContent)==null?void 0:R.length)||0);for(let q=N.firstChild;q;q=q.nextSibling)if(j(q))return!0;return!1};return j(B),G}function g(P){var D,Z;C(o,J(P)),(Z=(D=window.getSelection())==null?void 0:D.removeAllRanges)==null||Z.call(D)}var h=su();de("mouseup",be,f);var y=x(h),w=x(y);gi(w,{get onclick(){return i()},size:"24px",children:(P,D)=>{Kc(P)},$$slots:{default:!0}});var p=E(w,2);an(p,(P,D)=>Se==null?void 0:Se(P,D),()=>2);var S=E(y,6);xi(S,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var A=E(S,2);{var b=P=>{var D=ou(),Z=x(D);wt(Z,{children:(G,B)=>{var j=Ue();L(()=>K(j,s(u))),k(G,j)},$$slots:{default:!0}}),k(P,D)};H(A,P=>{s(u)&&P(b)})}var T=E(A,2);{var U=P=>{var D=lu(),Z=E(ee(D),2);Or(Z,()=>s(a)+s(r),G=>{iu(G,{onselect:g,get query(){return s(d)},set query(B){C(d,J(B))}})}),k(P,D)};H(T,P=>{s(u)||P(U)})}var M=E(T,2);M.__click=[au,r,o,a,c,l,t,i],L(()=>M.disabled=!s(r)||!s(o)),k(e,h),se()}ve(["click"]);const $n="PlayPilotEditorialSessionId",da=5e3,uu=da*2;async function du(e){const{ai_enabled:t,injections_enabled:n,ai_last_run:i,session_id:r,session_last_ping:a}=await ln(e),o=va(r||null,a||null),l={ai_enabled:t,ai_last_run:i,injections_enabled:n,session_id:r,session_last_ping:a};return o?await fa(e):l}async function fa(e){const t=_a(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a,ai_last_run:o}=await ln(e,{params:i});return{ai_enabled:r,ai_last_run:o,injections_enabled:a,...i}}function va(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=_a();return n-i.getTime()>uu?!0:r===e}function _a(){return sessionStorage.getItem($n)||fu()}function fu(){const e=sessionStorage.getItem($n)||Yr();return sessionStorage.setItem($n,e),e}function vu(e,t,n){fa(t()),n()()}var _u=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),hu=I('<div class="alert svelte-2m2urs"><!></div>');function gu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onpoll",3,()=>null),r=O(t,"onallow",3,()=>null),a=O(t,"ondisallow",3,()=>null),o=O(t,"ontakeover",3,()=>null);let l=null,c=V(!0);Ge(()=>(u(),()=>{l&&clearInterval(l)}));function u(){d(),l=setInterval(d,da)}async function d(){const g=await du(n());g&&(C(c,J(va(g.session_id||null,g.session_last_ping||null))),s(c)?r()():a()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}var f=qe(),v=ee(f);{var m=g=>{var h=hu(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=_u(),A=E(ee(S),2);A.__click=[vu,n,o],k(w,S)},$$slots:{default:!0}}),k(g,h)};H(v,g=>{s(c)||g(m)})}k(e,f),se()}ve(["click"]);var mu=He('<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 pu(e){var t=mu();k(e,t)}var yu=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),wu=I('<span class="svelte-1kpafo0">.</span>'),ku=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),bu=(e,t)=>C(t,!0),xu=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),Su=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),Eu=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 Tu(e,t){const n=O(t,"aiRunning",3,!1),i=O(t,"aiEnabled",3,!1),r=O(t,"message",3,""),a=O(t,"percentage",3,0),o=O(t,"aiInjectionsCount",3,0),l=o();let c=V(!1);var u=qe(),d=ee(u);{var f=v=>{var m=Eu(),g=x(m),h=x(g),y=x(h);pu(y);var w=E(h,2),p=x(w);{var S=M=>{var P=yu();k(M,P)},A=M=>{var P=qe(),D=ee(P);{var Z=B=>{var j=ku(),N=E(ee(j),2),R=x(N),q=E(R);Qe(q,20,()=>({length:3}),yt,($,oe)=>{var Ae=wu();k($,Ae)});var ae=E(N,2),Q=x(ae),re=x(Q);const te=z(()=>`${Math.max(a(),3)??""}%`);L(()=>jn(re,"width",s(te)));var we=E(Q,2),X=x(we);L(()=>K(X,`${Math.floor(a())??""}%`)),L(()=>K(R,`${r()??""} `)),k(B,j)},G=B=>{var j=xu(),N=ee(j),R=E(x(N),4);{var q=re=>{var te=Ue("No new injections where found.");k(re,te)},ae=re=>{var te=Ue();L(()=>K(te,`${o()??""} Injections where found and added to the page.`)),k(re,te)};H(R,re=>{l===o()?re(q):re(ae,!1)})}var Q=E(N,2);Q.__click=[bu,c],k(B,j)};H(D,B=>{n()?B(Z):B(G,!1)},!0)}k(M,P)};H(p,M=>{i()?M(A,!1):M(S)})}var b=E(g,2),T=x(b);{var U=M=>{var P=Su();k(M,P)};H(T,M=>{n()&&M(U)})}L(()=>ue(m,"running",n())),k(v,m)};H(d,v=>{s(c)||v(f)})}k(e,u)}ve(["click"]);async function Iu(e,t,n,i,r,a,o){try{C(t,!0),C(n,!1),i(await Gs(i(),r())),C(a,J(s(o)))}catch{C(n,!0)}finally{C(t,!1)}}var Au=I('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),Pu=I('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),Cu=I('<div class="loading svelte-11aj6xq">Loading...</div>'),ju=I('<div class="bubble svelte-11aj6xq"> </div> <!>',1),Mu=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),Lu=I('<div class="alert svelte-11aj6xq"><!></div>'),Nu=I('<div class="error svelte-11aj6xq"><!></div>'),Ou=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>'),Du=I('<button class="save svelte-11aj6xq"> </button>'),Ru=I('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),qu=I("<!> <!> <!>",1),Hu=I('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),Fu=I('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function Bu(e,t){le(t,!0);let n=O(t,"linkInjections",15),i=O(t,"pageText",3,""),r=O(t,"loading",3,!1),a=O(t,"injectionsEnabled",7,!1),o=O(t,"aiStatus",23,()=>({})),l=O(t,"onreinitialize",3,()=>null);const c="editor-position",u="editor-height",d=JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(u)||"0");let v=V(null),m=V(!1),g=V(!1),h=V(!1),y=V(!0),w=V(0),p=V("");const S=z(()=>_n(o().aiEnabled,!1)),A=z(()=>_n(o().aiRunning,!1)),b=z(()=>JSON.stringify(n())),T=z(()=>!s(A)&&s(y)),U=z(()=>s(p)&&s(p)!==s(b)),M=z(()=>n().filter(F=>F.title_details&&!F.removed&&!F.duplicate&&(F.manual||!F.manual&&!F.failed))),P=z(()=>Z(s(M))),D=z(()=>!r()&&Ve(()=>o().aiRunning));Tn(()=>{r()||Ve(()=>{requestAnimationFrame(()=>C(p,J(s(b)))),R()})});function Z(F){return F.sort((W,ge)=>W.failed!==ge.failed?W.failed?1:-1:W.title_details.title.localeCompare(ge.title_details.title))}function G(F,W){localStorage.setItem(F,W)}function B(F){const W=n().findIndex(ge=>ge.key===F);n(n()[W].manual=!0,!0),n(n()[W].removed=!0,!0),n([...n()])}function j(F){if(!s(v))return;const W=F.offsetTop,ge=W+F.offsetHeight,_e=s(v).scrollTop,Ee=_e+s(v).clientHeight;W>=_e&&ge<=Ee||s(v).scrollTo({top:W-s(v).clientHeight/2,behavior:"smooth"})}function N(F){const W=F.target;C(w,J(W.scrollTop))}function R(){const F={total:n().length,failed_automatic:n().filter(W=>W.failed&&!W.manual).length,failed_manual:n().filter(W=>W.failed&&W.manual).length,final_injected:s(M).length};he(fe.TotalInjectionsCount,null,F)}var q=Fu();No(F=>{var W=Au();k(F,W)});var ae=x(q);{var Q=F=>{var W=Pu(),ge=x(W),_e=x(ge);zc(_e,{get element(){return s(v)},height:f,onchange:Xe=>G(u,JSON.stringify(Xe))});var Ee=E(ge,2),Me=x(Ee);Vc(Me,{get element(){return s(v)},position:d,limit:{x:16,y:16},onchange:Xe=>G(c,JSON.stringify(Xe))}),k(F,W)};H(ae,F=>{s(v)&&!r()&&F(Q)})}var re=E(ae,2),te=x(re);an(te,F=>Se==null?void 0:Se(F));var we=E(te,2);{var X=F=>{var W=Cu();k(F,W)},$=F=>{var W=qe(),ge=ee(W);{var _e=Ee=>{var Me=ju(),Xe=ee(Me),Le=x(Xe),sn=E(Xe,2);gi(sn,{onclick:()=>C(m,!0),size:"24px","aria-label":"Add manual injection",children:(cn,Si)=>{var un=Ue("+");k(cn,un)},$$slots:{default:!0}}),L(()=>{ce(Xe,"aria-label",`${s(M).length??""} found playlinks`),K(Le,s(M).length)}),k(Ee,Me)};H(ge,Ee=>{s(T)&&Ee(_e)},!0)}k(F,W)};H(we,F=>{r()?F(X):F($,!1)})}var oe=E(re,2);{var Ae=F=>{var W=qu(),ge=ee(W);gu(ge,{get pageText(){return i()},onallow:()=>C(y,!0),ondisallow:()=>C(y,!1),get ontakeover(){return l()},onpoll:Le=>{a(Le.injectionsEnabled),o({...o(),aiEnabled:Le.aiEnabled})}});var _e=E(ge,2);{var Ee=Le=>{Tu(Le,sl(o,{get aiInjectionsCount(){return aa(n()).aiInjections.length}}))};H(_e,Le=>{s(y)&&(s(D)||!s(S))&&Le(Ee)})}var Me=E(_e,2);{var Xe=Le=>{var sn=Ru(),cn=ee(sn);{var Si=me=>{var pe=Lu(),tt=x(pe);wt(tt,{type:"warning",children:(ut,pa)=>{var Dn=Mu();k(ut,Dn)},$$slots:{default:!0}}),k(me,pe)};H(cn,me=>{a()||me(Si)})}var un=E(cn,2);{var ha=me=>{var pe=Nu(),tt=x(pe);wt(tt,{children:(ut,pa)=>{var Dn=Ue("Something went wrong, check your links below.");k(ut,Dn)},$$slots:{default:!0}}),Ce(7,pe,()=>Yt,()=>({duration:150})),k(me,pe)};H(un,me=>{s(h)&&me(ha)})}var Ei=E(un,2);Qe(Ei,21,()=>s(P),me=>me.key,(me,pe)=>{const tt=z(()=>n().findIndex(ut=>ut.key===s(pe).key));Fc(me,{onremove:()=>B(s(pe).key),onhighlight:j,get linkInjection(){return n()[s(tt)]},set linkInjection(ut){n(n()[s(tt)]=ut,!0)}})},me=>{var pe=Ou();k(me,pe)});var ga=E(Ei,2);{var ma=me=>{var pe=Du();pe.__click=[Iu,g,h,n,i,p,b];var tt=x(pe);L(()=>{pe.disabled=s(g),K(tt,s(g)?"Saving...":"Save links")}),Ce(1,pe,()=>Kt,()=>({duration:100})),k(me,pe)};H(ga,me=>{s(U)&&n().length&&s(y)&&me(ma)})}k(Le,sn)};H(Me,Le=>{s(T)&&Le(Xe)})}k(F,W)};H(oe,F=>{r()||F(Ae)})}var et=E(oe,2);{var ct=F=>{var W=Hu(),ge=x(W);cu(ge,{get pageText(){return i()},onclose:()=>C(m,!1),onsave:_e=>n().push(_e)}),L(()=>jn(W,"top",`${s(w)??""}px`)),Ce(3,W,()=>Ln,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(F,W)};H(et,F=>{s(m)&&F(ct)})}on(q,F=>C(v,F),()=>s(v)),L(()=>{ue(q,"panel-open",s(m)),ue(q,"loading",r())}),de("scroll",q,N),k(e,q),se()}ve(["click"]);var Vu=He('<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 Uu(e){var t=Vu();k(e,t)}var zu=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 Wu(e,t){var n=zu(),i=x(n);i.__click=function(...l){var c;(c=t.onclick)==null||c.apply(this,l)};var r=x(i);Uu(r);var a=E(i,2);a.__click=function(...l){var c;(c=t.onclose)==null||c.apply(this,l)};var o=x(a);Xr(o),k(e,n)}ve(["click"]);var Ku=I('<img alt="" class="svelte-j7f9xl">');function Yu(e,t){var n=qe(),i=ee(n);Qe(i,17,()=>t.pixels,yt,(r,a)=>{var o=Ku();L(()=>ce(o,"src",s(a))),k(r,o)}),k(e,n)}var Zu=I('<div class="playpilot-link-injections svelte-13rmd3g" data-playpilot-link-injections=""><!> <!></div> <!>',1);function Gu(e,t){le(t,!0);let n=V(null),i=V(J([])),r=V(null),a=V(J(Kr())),o=V(!!_i()),l=V(!1),c=V(!0),u=V(!0),d=V(J([]));const f=z(()=>s(r)||{}),v=z(()=>_n(s(f).ai_injections,()=>[],!0)),m=z(()=>_n(s(f).manual_injections,()=>[],!0)),g=z(()=>na(s(i)));Tn(()=>{s(a)&&!s(c)&&y()}),Ge(()=>{if(!Js())return(async()=>(await h(),he(fe.ArticlePageView),bl("initial_test")))(),()=>wi()});async function h(){C(c,!0),s(a)&&C(l,J(await Wr()));try{const j=await Xs(),N=fi();if(C(u,!!(j!=null&&j.exclude_urls_pattern&&N.match(new RegExp(j.exclude_urls_pattern)))),s(u))return;j!=null&&j.custom_style&&b(j.custom_style||""),S((j==null?void 0:j.html_selector)||"",(j==null?void 0:j.exclude_elements_selector)||"")}catch(j){he(fe.FetchingConfigFailed),console.error("TPI Config failed to fetch",j);return}try{if(C(r,J(await Yi(s(g),{maxTries:1,runAiWhenRelevant:!0}))),C(c,!1),!s(r))return;if(_l({organizationSid:s(r).organization_sid,domainSid:s(r).domain_sid}),!s(r).ai_running||!s(r).ai_enabled){p({aiInjections:s(v),manualInjections:s(m)});return}if(!s(a))return;C(r,J(await Yi(s(g),{requireCompletedResult:!0,onpoll:j=>C(r,J(j))}))),p({aiInjections:s(v),manualInjections:s(m)})}catch(j){console.error(j),he(fe.InjectionError,null,{message:j.message})}}function y(){p(aa(s(d)))}function w(){C(a,!1),requestAnimationFrame(()=>{C(a,!0),h()})}function p(j={aiInjections:s(v),manualInjections:s(m)}){const N=Ls(s(i),j);JSON.stringify(N)!==JSON.stringify(s(d))&&C(d,J(N));const R=N.filter(q=>!q.failed);R.length&&(s(a)||he(fe.ArticleInjected,null,{manual:R.filter(q=>q.manual).length,ai:R.filter(q=>!q.manual).length}))}function S(j,N){j&&(window.PlayPilotLinkInjections.selector=j),C(n,J(At())),C(i,J(yi(s(n),N)))}function A(){C(a,!0),ml(),h()}function b(j){const N="playpilot-custom-style",R=document.getElementById(N),q=R||document.createElement("style");q.textContent=`[data-playpilot-link-injections] { ${j} }`,q.id=N,R||document.body.appendChild(q)}var T=Zu(),U=ee(T),M=x(U);{var P=j=>{Wu(j,{onclick:A,onclose:()=>{C(o,!1),gl()}})};H(M,j=>{!s(u)&&s(o)&&!s(a)&&j(P)})}var D=E(M,2);{var Z=j=>{var N=qe(),R=ee(N);cl(R,{onerror:ae=>he(fe.EditorError,null,{message:ae.message}),failed:ae=>{wt(ae,{fixed:!0,children:(Q,re)=>{var te=Ue("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");k(Q,te)},$$slots:{default:!0}})}},ae=>{var Q=z(()=>{var te;return(te=s(r))==null?void 0:te.injections_enabled}),re=z(()=>{var te,we,X,$,oe;return{aiEnabled:(te=s(r))==null?void 0:te.ai_enabled,aiRunning:((we=s(r))==null?void 0:we.ai_running)&&((X=s(r))==null?void 0:X.ai_enabled),message:($=s(r))==null?void 0:$.ai_progress_message,percentage:(oe=s(r))==null?void 0:oe.ai_progress_percentage}});Bu(ae,{get pageText(){return s(g)},get loading(){return s(c)},onreinitialize:w,get injectionsEnabled(){return s(Q)},get aiStatus(){return s(re)},get linkInjections(){return s(d)},set linkInjections(te){C(d,J(te))}})}),k(j,N)};H(D,j=>{!s(u)&&s(a)&&s(l)&&j(Z)})}var G=E(U,2);{var B=j=>{Yu(j,{get pixels(){return s(r).pixels}})};H(G,j=>{var N,R;(R=(N=s(r))==null?void 0:N.pixels)!=null&&R.length&&j(B)})}k(e,T),se()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid:null,last_successful_fetch:null,tracked_events:[],split_test_identifiers:{},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=rn(Gu,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),wi()},debug(){const e=At(),t=yi(e);console.group("PlayPilot Link Injection Debug"),console.groupCollapsed("Config"),console.table(Object.entries(this)),console.groupEnd(),console.groupCollapsed("Elements"),console.log("Parent element",e),console.log("Valid elements",t),console.groupEnd(),console.groupCollapsed("Last fetch"),console.log(this.last_successful_fetch),console.groupEnd(),console.groupCollapsed("Meta"),console.log(ki()),console.groupEnd(),console.groupCollapsed("Page text"),console.log(na(t)),console.groupEnd(),console.groupCollapsed("Tracked events"),console.log(this.tracked_events),console.groupEnd(),console.groupCollapsed("Split tests"),console.log(this.split_test_identifiers),console.groupEnd(),console.groupEnd()}};
|
|
13
13
|
|
|
14
14
|
})();
|