@zeniai/web-app-ui 5.1.57-prod → 5.1.58-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-Jvk5ZIh7.js +1 -0
- package/dist/assets/AddressScreen-BrRyijJp.js +9 -0
- package/dist/assets/AiCfoScreen-CicMJAHj.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CDu2EgPZ.js +1 -0
- package/dist/assets/BillPayRoutes-qpaKIKLh.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-NuRsHlJi.js +9 -0
- package/dist/assets/ChargeCardRoutes-DGkxpdY7.js +71 -0
- package/dist/assets/CompanyPassportScreen-CG5-5eoy.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bn_8LVY-.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Bgpl9puf.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BWH4fb9z.js +23 -0
- package/dist/assets/DashboardRoutes-9HsT8T2z.js +20 -0
- package/dist/assets/DefaultTenantHome-CwgycKYc.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Dd35H5gU.js +18 -0
- package/dist/assets/DrawerScreen-C5n2KCQV.js +1 -0
- package/dist/assets/EntityDetailRoutes-DLIsh6TE.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C0zzACQj.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BeSvOfyq.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-QEO5L34X.js +1 -0
- package/dist/assets/MagicLinkRoutes-CWoYIOYU.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-D_t_Me45.js +12 -0
- package/dist/assets/MobileAppDrawer-BG5P4V6f.js +1 -0
- package/dist/assets/NotFoundScreen-DcBza--g.js +1 -0
- package/dist/assets/NotificationRoutes-CQ3pB1c-.js +1 -0
- package/dist/assets/OAuthConsentScreen-rh4Splr8.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C321jz-9.js +1 -0
- package/dist/assets/PeopleRoutes-tz6kKz-A.js +22 -0
- package/dist/assets/PerformanceRoutes-CeebcaT1.js +1 -0
- package/dist/assets/Preview-Dw6WgJ9D.js +1 -0
- package/dist/assets/QBOConnectionScreen-DmBrRYj5.js +100 -0
- package/dist/assets/ReferralListScreen-Lnl80ls5.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-U1jW3SNW.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-C7v9N8Xz.js +1 -0
- package/dist/assets/ReimbursementRoutes-CrSmjoHG.js +68 -0
- package/dist/assets/ReportsRoutes-CVQ3KrxC.js +1 -0
- package/dist/assets/RewardsRoutes-CuXw1sC8.js +1 -0
- package/dist/assets/ScreenRoutes-Bm5EazfY.js +2 -0
- package/dist/assets/SettingsRoutes-BdwvZMwv.js +57 -0
- package/dist/assets/SetupPagesScreen-DPjCUjqg.js +29 -0
- package/dist/assets/SignInScreen-C1EKfqaQ.js +1 -0
- package/dist/assets/SignOutScreen-DK40OwVP.js +9 -0
- package/dist/assets/TaskListScreen-d8fI83l2.js +9 -0
- package/dist/assets/TaskRoutes-jKlcwy0X.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CCDdwe13.js +1 -0
- package/dist/assets/TransactionDetailScreen-DmE69GP7.js +5 -0
- package/dist/assets/TransactionListRoutes-BU6W03tb.js +1 -0
- package/dist/assets/TreasuryRoutes-Bm8WTWLC.js +37 -0
- package/dist/assets/VendorsRoutes-B1U9Gev2.js +112 -0
- package/dist/assets/WiseConfirmationScreen-BsEe1BHV.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DjEDHzor.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-Cu_59prd.js +9 -0
- package/dist/assets/accountMappingHelper-JvNPAAYV.js +1 -0
- package/dist/assets/analytics-wiEk3GGD.js +68 -0
- package/dist/assets/analyticsHelper-CScMfb2z.js +1 -0
- package/dist/assets/core-DUPexJ3H.js +12 -0
- package/dist/assets/decodeURIComponentSafe-jbE9T9Sc.js +1 -0
- package/dist/assets/dnd-O-LDWVRl.js +6 -0
- package/dist/assets/empty-B5snx4g9.js +1 -0
- package/dist/assets/empty-DtHXOIj5.js +1 -0
- package/dist/assets/emptyVideoElement-6tVV7Q67.js +1 -0
- package/dist/assets/epic-DdqgmVvM.js +2 -0
- package/dist/assets/favicon-D56XvgAH.ico +0 -0
- package/dist/assets/getLocaleForTenant-BQer3J3i.js +1 -0
- package/dist/assets/index-B_Z_hpYg.js +75478 -0
- package/dist/assets/index-BhL3T4qt.js +1 -0
- package/dist/assets/index-C4rqoBpF.js +1 -0
- package/dist/assets/index-CFjZqjGQ.js +3385 -0
- package/dist/assets/index-D9U_bKAc.js +1 -0
- package/dist/assets/index-R3FzVapp.js +2 -0
- package/dist/assets/index-R6GjjTB3.css +1 -0
- package/dist/assets/index-fhWfMdvB.js +2 -0
- package/dist/assets/index-iv31G9Nr.js +1 -0
- package/dist/assets/lexical-D7D3BWIv.js +21 -0
- package/dist/assets/liveblocks-CpSeBLzv.js +54 -0
- package/dist/assets/logo192-CqcTe-t4.png +0 -0
- package/dist/assets/lottie-BpJoufaA.js +2 -0
- package/dist/assets/manifest-icT4lOF5.json +49 -0
- package/dist/assets/mui-BYcLUAn-.js +109 -0
- package/dist/assets/pathToGoBack-DOYIxcIl.js +1 -0
- package/dist/assets/pdf--1Oee4-D.js +13 -0
- package/dist/assets/pdf-lib-DIbgSioz.js +39 -0
- package/dist/assets/plaid-DSCHiplf.js +2 -0
- package/dist/assets/pusher-DWPsZ62H.js +1 -0
- package/dist/assets/react-B3g-qTY7.js +22 -0
- package/dist/assets/react-BQJ3WCCJ.js +34 -0
- package/dist/assets/react-BYOk0YaM.js +21 -0
- package/dist/assets/react-C2LzYoMn.js +19 -0
- package/dist/assets/react-CA9dc_Y6.js +17 -0
- package/dist/assets/react-CD_enKrG.js +19 -0
- package/dist/assets/recharts-Dp6Vlg5X.js +65 -0
- package/dist/assets/routePaths-DpeDFIQv.js +1 -0
- package/dist/assets/sentry-BxlhxHUi.js +500 -0
- package/dist/assets/stripe-DMRn4zHo.js +1 -0
- package/dist/assets/url-Cto2mSPb.js +1 -0
- package/dist/assets/url-DLyO75wK.js +6 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BK9arDN4.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-D8UKtiUm.js +1 -0
- package/dist/assets/useDeviceId-6JqjTKKJ.js +13 -0
- package/dist/assets/useInitialThreadRequest-hFu4tb2i.js +1 -0
- package/dist/assets/utils-BI-ymB94.js +36 -0
- package/dist/assets/web-vitals-D_vxw1oG.js +1 -0
- package/dist/assets/withTransactionSidePanel-DXm_Rajk.js +21 -0
- package/dist/assets/zeni-epic-state-DP595dtC.js +13 -0
- package/dist/index.html +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as O,c as x,b as g}from"./sentry-BxlhxHUi.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new n.Error().stack;r&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[r]="98d1b1d5-c052-499a-8aaa-8303e6d33533",n._sentryDebugIdIdentifier="sentry-dbid-98d1b1d5-c052-499a-8aaa-8303e6d33533")}catch{}})();function k(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),e.push.apply(e,t)}return e}function y(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?k(Object(e),!0).forEach(function(t){I(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):k(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function I(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function w(n,r){return function(e){if(Array.isArray(e))return e}(n)||function(e,t){var l=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(l!=null){var o,i,u=[],a=!0,d=!1;try{for(l=l.call(e);!(a=(o=l.next()).done)&&(u.push(o.value),!t||u.length!==t);a=!0);}catch(c){d=!0,i=c}finally{try{a||l.return==null||l.return()}finally{if(d)throw i}}return u}}(n,r)||function(e,t){if(e){if(typeof e=="string")return S(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);if(l==="Object"&&e.constructor&&(l=e.constructor.name),l==="Map"||l==="Set")return Array.from(e);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return S(e,t)}}(n,r)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function S(n,r){(r==null||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:x!==void 0?x:typeof self<"u"?self:{};function T(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function D(n,r){return n(r={exports:{}},r.exports),r.exports}var v=D(function(n,r){var e=b&&b.__rest||function(o,i){var u={};for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.indexOf(a)<0&&(u[a]=o[a]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var d=0;for(a=Object.getOwnPropertySymbols(o);d<a.length;d++)i.indexOf(a[d])<0&&Object.prototype.propertyIsEnumerable.call(o,a[d])&&(u[a[d]]=o[a[d]])}return u};Object.defineProperty(r,"__esModule",{value:!0}),r.scripts=void 0,r.scripts={};var t=function(o){var i=document.querySelector('script[src="'+o+'"]');if(i)return r.scripts[o]={loading:!1,error:null,scriptEl:i}};r.default=function(o){var i=o.src,u=o.checkForExisting,a=u!==void 0&&u,d=e(o,["src","checkForExisting"]),c=i?r.scripts[i]:void 0;!c&&a&&i&&l&&(c=t(i));var p=(0,g.useState)(c?c.loading:!!i),E=p[0],A=p[1],m=(0,g.useState)(c?c.error:null),h=m[0],C=m[1];return(0,g.useEffect)(function(){if(l&&i&&E&&!h){var s;!(c=r.scripts[i])&&a&&(c=t(i)),c?s=c.scriptEl:((s=document.createElement("script")).src=i,Object.keys(d).forEach(function(f){s[f]===void 0?s.setAttribute(f,d[f]):s[f]=d[f]}),c=r.scripts[i]={loading:!0,error:null,scriptEl:s});var j=function(){c&&(c.loading=!1),A(!1)},P=function(f){c&&(c.error=f),C(f)};return s.addEventListener("load",j),s.addEventListener("error",P),document.body.appendChild(s),function(){s.removeEventListener("load",j),s.removeEventListener("error",P)}}},[i]),[E,h]};var l=typeof window<"u"&&window.document!==void 0});T(v),v.scripts;var L=D(function(n,r){var e=b&&b.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.scripts=r.default=void 0,Object.defineProperty(r,"default",{enumerable:!0,get:function(){return e(v).default}}),Object.defineProperty(r,"scripts",{enumerable:!0,get:function(){return v.scripts}})}),N=T(L);L.scripts;var _,F=function(n){var r={plaid:null,open:!1,onExitCallback:null};if(typeof window>"u"||!window.Plaid)throw new Error("Plaid not loaded");var e,t,l,o,i=(e=n,t="publicKey",l="key",o={},delete Object.assign(o,e,I({},l,e[t]))[t],o);return r.plaid=window.Plaid.create(y(y({},i),{},{onExit:function(u,a){r.open=!1,i.onExit&&i.onExit(u,a),r.onExitCallback&&r.onExitCallback()}})),{open:function(){r.plaid&&(r.open=!0,r.onExitCallback=null,r.plaid.open())},exit:function(u,a){r.open&&r.plaid?(r.onExitCallback=a,r.plaid.exit(u),u&&u.force&&(r.open=!1)):a&&a()},destroy:function(){r.plaid&&(r.plaid.destroy(),r.plaid=null)}}},R=function(){},K=function(n){var r=w(N({src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",checkForExisting:!0}),2),e=r[0],t=r[1],l=w(O.useState(null),2),o=l[0],i=l[1],u=w(O.useState(!1),2),a=u[0],d=u[1],c=(n.product||[]).slice().sort().join(",");return O.useEffect(function(){if(!e&&(n.token||n.publicKey)){if(!t&&window.Plaid){o?.exit({force:!0},function(){return o.destroy()});var p=F(y(y({},n),{},{onLoad:function(){d(!0),n.onLoad&&n.onLoad()}}));return i(p),function(){return p.exit({force:!0},function(){return p.destroy()})}}console.error("Error loading Plaid",t)}},[e,t,n.publicKey,n.token,c]),{error:t,ready:o!=null&&(!e||a),exit:o?o.exit:R,open:o?o.open:function(){n.token||console.warn("react-plaid-link: You cannot call open() without a valid token supplied to usePlaidLink. This is a no-op.")}}};(function(n){n.OPEN="OPEN",n.EXIT="EXIT",n.HANDOFF="HANDOFF",n.SELECT_INSTITUTION="SELECT_INSTITUTION",n.ERROR="ERROR"})(_||(_={}));export{K as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./sentry-BxlhxHUi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="7747574b-b419-4fe0-9547-9ada7b4cc335",e._sentryDebugIdIdentifier="sentry-dbid-7747574b-b419-4fe0-9547-9ada7b4cc335")}catch{}})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{b as $}from"./sentry-BxlhxHUi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3f026519-7935-40e5-9915-4f17ccdcef1d",e._sentryDebugIdIdentifier="sentry-dbid-3f026519-7935-40e5-9915-4f17ccdcef1d")}catch{}})();const _=/open\.spotify\.com\/(\w+)\/(\w+)/i;function M(e,t={}){return`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
min-width: 160px;
|
|
6
|
+
min-height: 80px;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
iframe {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
:host(:not([controls])) {
|
|
18
|
+
display: none !important;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
<iframe${function(i){let o="";for(const l in i){const a=i[l];o+=a===""?` ${l}`:` ${l}="${a}"`}return o}({src:I(e,t),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"})}></iframe>
|
|
22
|
+
`}function I(e,t){var i,o,l;if(!e.src)return;const a=e.src.match(_),w=a&&a[1],E=a&&a[2],n={t:(i=t.config)==null?void 0:i.startAt,theme:((o=t.config)==null?void 0:o.theme)==="dark"?"0":null};return`https://open.spotify.com/embed/${w}/${E}${(l=t.config)!=null&&l.preferVideo?"/video":""}?${function(v){return String(new URLSearchParams(function(f){let h={};for(let p in f){let d=f[p];d===!0||d===""?h[p]=1:d===!1?h[p]=0:d!=null&&(h[p]=d)}return h}(v)))}(n)}`}class S extends(globalThis.HTMLElement??class{}){static getTemplateHTML=M;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new N;#r;#a;#l;#t=!1;#e=!1;#i=!0;#n=0;#s=NaN;#o=!1;#d=null;constructor(){super(),this.#u("config")}async load(){var t,i,o;if(this.#r)return;this.#a&&(this.loadComplete=new N),this.#a=!0,await(this.#r=Promise.resolve()),this.#r=null,this.#t=!1,this.#e=!1,this.#n=0,this.#s=NaN,this.#o=!1,this.dispatchEvent(new Event("emptied"));let l=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const a={t:(t=this.config)==null?void 0:t.startAt,theme:((i=this.config)==null?void 0:i.theme)==="dark"?"0":null,preferVideo:(o=this.config)==null?void 0:o.preferVideo};if(this.#l)this.api=l,this.api.iframeElement.src=I(k(this.attributes),this);else{this.#l=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=M(k(this.attributes),this));let w=this.shadowRoot.querySelector("iframe");const E=await async function(n,v,f){return C[n]?C[n]:self[v]?Promise.resolve(self[v]):C[n]=new Promise(function(h,p){const d=document.createElement("script");d.src=n;const c=b=>h(b);self[f]=c,d.onload=()=>!f,d.onerror=p,document.head.append(d)})}("https://open.spotify.com/embed-podcast/iframe-api/v1","SpotifyIframeApi","onSpotifyIframeApiReady");this.api=await new Promise(n=>E.createController(w,a,n)),this.api.iframeElement=w,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",n=>this.#e&&this.#i&&(n.data.isBuffering||!n.data.isPaused)?(this.#e=!1,void(this.currentTime=1)):(n.data.duration/1e3!==this.#s&&(this.#e=!1,this.#s=n.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),n.data.position/1e3!==this.#n&&(this.#o=!1,this.#e=!1,this.#n=n.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),this.#t||this.#i||!n.data.isPaused?!this.#i||!n.data.isBuffering&&n.data.isPaused?this.#t&&!n.data.isPaused?(this.#t=!1,void this.dispatchEvent(new Event("playing"))):!this.paused&&!this.seeking&&!this.#e&&Math.ceil(this.currentTime)>=this.duration?(this.#e=!0,this.loop?void(this.currentTime=1):void(this.continuous||(this.pause(),this.dispatchEvent(new Event("ended"))))):void 0:(this.#i=!1,this.dispatchEvent(new Event("play")),this.#t=n.data.isBuffering,void(this.#t?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing")))):(this.#i=!0,void this.dispatchEvent(new Event("pause")))))}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,i,o){i!==o&&(t!=="src"||this.load())}async play(){var t;return this.#i=!1,this.#t=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,(t=this.api)==null?void 0:t.resume()}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pause()}get config(){return this.#d}set config(t){this.#d=t}get paused(){return this.#i??!0}get muted(){return!1}set muted(t){}get volume(){return 1}set volume(t){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return this.#o}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return this.#n}set currentTime(t){if(this.currentTime==t)return;this.#o=!0;let i=this.#n;this.#n=t,this.dispatchEvent(new Event("timeupdate")),this.#n=i,this.loadComplete.then(()=>{var o;(o=this.api)==null||o.seek(t)})}get duration(){return this.#s}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}#u(t){if(Object.prototype.hasOwnProperty.call(this,t)){const i=this[t];delete this[t],this[t]=i}}}function k(e){let t={};for(let i of e)t[i.name]=i.value;return t}const C={};class N extends Promise{constructor(t=()=>{}){let i,o;super((l,a)=>{t(l,a),i=l,o=a}),this.resolve=i,this.reject=o}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",S);var O=S,x=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),j={className:"class",htmlFor:"for"};function P(e){return e.toLowerCase()}function R(e){return typeof e=="boolean"?e?"":void 0:typeof e=="function"||typeof e=="object"&&e!==null?void 0:e}function H(e,t,i){var o;e[t]=i,i==null&&t in(((o=globalThis.HTMLElement)==null?void 0:o.prototype)??{})&&e.removeAttribute(t)}var D=function({react:e,tagName:t,elementClass:i,events:o,displayName:l,defaultProps:a,toAttributeName:w=P,toAttributeValue:E=R}){const n=Number.parseInt(e.version)>=19,v=e.forwardRef((f,h)=>{var p,d;const c=e.useRef(null),b=e.useRef(new Map),L={},A={},g={},T={};for(const[s,r]of Object.entries(f)){if(x.has(s)){g[s]=r;continue}const u=w(j[s]??s);if(i.prototype&&s in i.prototype&&!(s in(((p=globalThis.HTMLElement)==null?void 0:p.prototype)??{}))&&!((d=i.observedAttributes)!=null&&d.some(y=>y===u))){T[s]=r;continue}if(s.startsWith("on")){L[s]=r;continue}const m=E(r);if(u&&m!=null&&(A[u]=String(m),n||(g[u]=m)),u&&n){const y=R(r);g[u]=m!==y?m:r}}if(typeof window<"u"){for(const s in L){const r=L[s],u=s.endsWith("Capture"),m=(o?.[s]??s.slice(2).toLowerCase()).slice(0,u?-7:void 0);e.useLayoutEffect(()=>{const y=c?.current;if(y&&typeof r=="function")return y.addEventListener(m,r,u),()=>{y.removeEventListener(m,r,u)}},[c?.current,r])}e.useLayoutEffect(()=>{if(c.current===null)return;const s=new Map;for(const r in T)H(c.current,r,T[r]),b.current.delete(r),s.set(r,T[r]);for(const[r,u]of b.current)H(c.current,r,void 0);b.current=s})}if(typeof window>"u"&&i?.getTemplateHTML&&i?.shadowRootOptions){const{mode:s,delegatesFocus:r}=i.shadowRootOptions,u=e.createElement("template",{shadowrootmode:s,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(A,f)},key:"ce-la-react-ssr-template-shadow-root"});g.children=[u,g.children]}return e.createElement(t,{...a,...g,ref:e.useCallback(s=>{c.current=s,typeof h=="function"?h(s):h!==null&&(h.current=s)},[h])},g.children)});return v.displayName=l??i.name,v}({react:$,tagName:"spotify-audio",elementClass:O,toAttributeName:e=>e==="muted"?"":e==="defaultMuted"?"muted":P(e)});export{D as default};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{b as $}from"./sentry-BxlhxHUi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="c2e9a849-5489-4b54-8a96-5046acbf703c",e._sentryDebugIdIdentifier="sentry-dbid-c2e9a849-5489-4b54-8a96-5046acbf703c")}catch{}})();const B=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],T=globalThis.document?.createElement("template");T&&(T.innerHTML=`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
line-height: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
video,
|
|
9
|
+
audio {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
max-height: 100%;
|
|
12
|
+
min-width: 100%;
|
|
13
|
+
min-height: 100%;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
<slot></slot>
|
|
17
|
+
`);const I=(e,{tag:s,is:o})=>{const d=globalThis.document?.createElement(s,{is:o}),p=d?N(d):[];return class w extends e{static Events=B;static template=T;static skipAttributes=[];static#i;static get observedAttributes(){return w.#r(),[...d?.constructor?.observedAttributes??[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}static#r(){if(this.#i)return;this.#i=!0;const t=new Set(this.observedAttributes);t.delete("muted");for(let n of p)if(!(n in this.prototype))if(typeof d[n]=="function")this.prototype[n]=function(...a){this.#t();const i=()=>this.call?this.call(n,...a):this.nativeEl[n].apply(this.nativeEl,a);return this.loadComplete&&!this.isLoaded?this.loadComplete.then(i):i()};else{let a={get(){this.#t();let i=n.toLowerCase();if(t.has(i)){const u=this.getAttribute(i);return u!==null&&(u===""||u)}return this.get?.(n)??this.nativeEl?.[n]??this.#s[n]}};n!==n.toUpperCase()&&(a.set=async function(i){this.#t();let u=n.toLowerCase();t.has(u)?i===!0||i===!1||i==null?this.toggleAttribute(u,!!i):this.setAttribute(u,i):(this.loadComplete&&!this.isLoaded&&await this.loadComplete,this.set?this.set(n,i):this.nativeEl[n]=i)}),Object.defineProperty(this.prototype,n,a)}}#o;#n;#a=!1;#e=!1;#l;#s;constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.load!==w.prototype.load&&(this.loadComplete=new O)}get loadComplete(){return this.#n}set loadComplete(t){this.#e=!1,this.#n=t,t?.then(()=>{this.#e=!0})}get isLoaded(){return this.#e}get nativeEl(){return this.#l??this.shadowRoot.querySelector(s)??this.querySelector(s)}set nativeEl(t){this.#l=t}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",!!t)}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(t){this.setAttribute("preload",`${t}`)}async#t(){if(this.#o)return;this.#o=!0,this.#c(),this.#u();for(let a of p)this.#d(a);const t=new Map,n=this.shadowRoot.querySelector("slot:not([name])");n?.addEventListener("slotchange",()=>{const a=new Map(t);n.assignedElements().filter(i=>["track","source"].includes(i.localName)).forEach(async i=>{a.delete(i);let u=t.get(i);u||(u=i.cloneNode(),t.set(i,u)),this.loadComplete&&!this.isLoaded&&await this.loadComplete,this.nativeEl.append?.(u)}),a.forEach(i=>i.remove())});for(let a of this.constructor.Events)this.shadowRoot.addEventListener?.(a,i=>{i.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(i.type,{detail:i.detail}))},!0)}#d(t){if(Object.prototype.hasOwnProperty.call(this,t)){const n=this[t];delete this[t],this[t]=n}}#c(){const t=document.createElement(s,{is:o});t.muted=this.hasAttribute("muted");for(let{name:n,value:a}of this.attributes)t.setAttribute(n,a);this.#s={};for(let n of N(t))this.#s[n]=t[n];t.removeAttribute("src"),t.load()}async#u(){if(this.loadComplete&&!this.isLoaded&&await this.loadComplete,!this.nativeEl){const t=document.createElement(s,{is:o});t.part=s,this.shadowRoot.append(t)}this.nativeEl.muted=this.hasAttribute("muted")}attributeChangedCallback(t,n,a){this.#t(),t==="src"&&this.load!==w.prototype.load&&this.#h(),this.#p(t,n,a)}async#h(){this.#a&&(this.loadComplete=new O),this.#a=!0,await Promise.resolve(),await this.load(),this.loadComplete?.resolve(),await this.loadComplete}async#p(t,n,a){this.loadComplete&&!this.isLoaded&&await this.loadComplete,["id","class",...this.constructor.skipAttributes].includes(t)||(a===null?this.nativeEl.removeAttribute?.(t):this.nativeEl.setAttribute?.(t,a))}connectedCallback(){this.#t()}}};function N(e){let s=[];for(let o=Object.getPrototypeOf(e);o&&o!==HTMLElement.prototype;o=Object.getPrototypeOf(o))s.push(...Object.getOwnPropertyNames(o));return s}class O extends Promise{constructor(s=()=>{}){let o,d;super((p,c)=>{s(p,c),o=p,d=c}),this.resolve=o,this.reject=d}}const W=globalThis.document?I(HTMLElement,{tag:"video"}):class{};var R,S;globalThis.document&&I(HTMLElement,{tag:"audio"});const A=(R=globalThis.document)==null?void 0:R.createElement("template");A&&(A.innerHTML=`
|
|
18
|
+
<div class="wistia_embed"></div>
|
|
19
|
+
`);const k=(S=globalThis.document)==null?void 0:S.createElement("template");k&&(k.innerHTML=`
|
|
20
|
+
<style>
|
|
21
|
+
:host {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
min-width: 300px;
|
|
24
|
+
min-height: 150px;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
::slotted(.wistia_embed) {
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
33
|
+
<slot></slot>
|
|
34
|
+
`);class q extends W{static template=k;static skipAttributes=["src"];get nativeEl(){var s;return((s=this.api)==null?void 0:s.elem())??this.querySelector("video")}async load(){var s;if((s=this.querySelector(".wistia_embed"))==null||s.remove(),!this.src)return;await new Promise(c=>setTimeout(c,50));const o=this.src.match(/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/i)[1],d={autoPlay:this.autoplay,preload:this.preload??"metadata",playsinline:this.playsInline,endVideoBehavior:this.loop&&"loop",chromeless:!this.controls,playButton:this.controls,muted:this.defaultMuted};this.append(A.content.cloneNode(!0));const p=this.querySelector(".wistia_embed");p.id||(p.id=function(c){const t=++D;return`${c}${t}`}(o)),p.classList.add(`wistia_async_${o}`),await async function(c,t){return L[c]?L[c]:self[t]?self[t]:L[c]=new Promise((n,a)=>{const i=document.createElement("script");i.defer=!0,i.src=c,i.onload=()=>n(self[t]),i.onerror=a,document.head.append(i)})}("https://fast.wistia.com/assets/external/E-v1.js","Wistia"),this.api=await new Promise(c=>{globalThis._wq.push({id:p.id,onReady:c,options:d})})}async attributeChangedCallback(s,o,d){s!=="controls"?super.attributeChangedCallback(s,o,d):(await this.loadComplete,s==="controls"&&(this.api.bigPlayButtonEnabled(this.controls),this.controls?this.api.releaseChromeless():this.api.requestChromeless()))}get duration(){var s;return(s=this.api)==null?void 0:s.duration()}async play(){return await this.loadComplete,this.api.play(),new Promise(s=>this.addEventListener("playing",s))}}const L={};let D=0;globalThis.customElements&&!globalThis.customElements.get("wistia-video")&&globalThis.customElements.define("wistia-video",q);var F=q,V=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),z={className:"class",htmlFor:"for"};function _(e){return e.toLowerCase()}function j(e){return typeof e=="boolean"?e?"":void 0:typeof e=="function"||typeof e=="object"&&e!==null?void 0:e}function x(e,s,o){var d;e[s]=o,o==null&&s in(((d=globalThis.HTMLElement)==null?void 0:d.prototype)??{})&&e.removeAttribute(s)}var G=function({react:e,tagName:s,elementClass:o,events:d,displayName:p,defaultProps:c,toAttributeName:t=_,toAttributeValue:n=j}){const a=Number.parseInt(e.version)>=19,i=e.forwardRef((u,g)=>{var M,P;const m=e.useRef(null),E=e.useRef(new Map),C={},H={},b={},v={};for(const[l,r]of Object.entries(u)){if(V.has(l)){b[l]=r;continue}const h=t(z[l]??l);if(o.prototype&&l in o.prototype&&!(l in(((M=globalThis.HTMLElement)==null?void 0:M.prototype)??{}))&&!((P=o.observedAttributes)!=null&&P.some(y=>y===h))){v[l]=r;continue}if(l.startsWith("on")){C[l]=r;continue}const f=n(r);if(h&&f!=null&&(H[h]=String(f),a||(b[h]=f)),h&&a){const y=j(r);b[h]=f!==y?f:r}}if(typeof window<"u"){for(const l in C){const r=C[l],h=l.endsWith("Capture"),f=(d?.[l]??l.slice(2).toLowerCase()).slice(0,h?-7:void 0);e.useLayoutEffect(()=>{const y=m?.current;if(y&&typeof r=="function")return y.addEventListener(f,r,h),()=>{y.removeEventListener(f,r,h)}},[m?.current,r])}e.useLayoutEffect(()=>{if(m.current===null)return;const l=new Map;for(const r in v)x(m.current,r,v[r]),E.current.delete(r),l.set(r,v[r]);for(const[r,h]of E.current)x(m.current,r,void 0);E.current=l})}if(typeof window>"u"&&o?.getTemplateHTML&&o?.shadowRootOptions){const{mode:l,delegatesFocus:r}=o.shadowRootOptions,h=e.createElement("template",{shadowrootmode:l,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:o.getTemplateHTML(H,u)},key:"ce-la-react-ssr-template-shadow-root"});b.children=[h,b.children]}return e.createElement(s,{...c,...b,ref:e.useCallback(l=>{m.current=l,typeof g=="function"?g(l):g!==null&&(g.current=l)},[g])},b.children)});return i.displayName=p??o.name,i}({react:$,tagName:"wistia-video",elementClass:F,toAttributeName:e=>e==="muted"?"":e==="defaultMuted"?"muted":_(e)});export{G as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{b as P}from"./sentry-BxlhxHUi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4eceecad-2fcb-4b2b-884c-ed0680c02168",e._sentryDebugIdIdentifier="sentry-dbid-4eceecad-2fcb-4b2b-884c-ed0680c02168")}catch{}})();const L="https://player.twitch.tv",W=/(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/,_=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,j="Idle",B="Ended",D=2,z=3,q=4,F=10,J=11;function k(e,t={}){const n={src:x(e,t),frameborder:"0",width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;",sandbox:"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",scrolling:"no"};return t.config&&(n["data-config"]=JSON.stringify(t.config)),`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
min-width: 300px;
|
|
6
|
+
min-height: 150px;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
iframe {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
:host(:not([controls])) {
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
<iframe${function(s){let i="";for(const l in s){const a=s[l];i+=a===""?` ${A(l)}`:` ${A(l)}="${A(`${a}`)}"`}return i}(n)}></iframe>
|
|
21
|
+
`}function x(e,t){var n;if(!e.src)return;const s=e.src.match(W),i=e.src.match(_),l={parent:(n=globalThis.location)==null?void 0:n.hostname,controls:e.controls===""&&null,autoplay:e.autoplay===""&&null,muted:e.muted,preload:e.preload,...t.config};if(s){const a=s[1];return`${L}/?video=v${a}&${C(l)}`}if(i){const a=i[1];return`${L}/?channel=${a}&${C(l)}`}return""}class O extends(globalThis.HTMLElement??class{}){static getTemplateHTML=k;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","loop","muted","playsinline","preload","src"];loadComplete=new $;#o;#r;#e;#t={};#h=0;#a=!1;#l=1;#u=!this.autoplay;#s=!1;#i=0;#c=null;constructor(){super(),this.#p("config")}get config(){return this.#c}set config(t){this.#c=t}async load(){if(this.#o)return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!this.#r;if(this.#r&&(this.loadComplete=new $),this.#r=!0,await(this.#o=Promise.resolve()),this.#o=null,this.#i=0,this.dispatchEvent(new Event("emptied")),!this.src)return this.shadowRoot.innerHTML="",void globalThis.removeEventListener("message",this.#d);this.dispatchEvent(new Event("loadstart"));let n=this.shadowRoot.querySelector("iframe");const s=function(i){let l={};for(let a of i)l[a.name]=a.value;return l}(this.attributes);t&&n&&(this.#c=JSON.parse(n.getAttribute("data-config")||"{}")),n?.src&&n.src===x(s,this)||(this.shadowRoot.innerHTML=k(s,this),n=this.shadowRoot.querySelector("iframe")),this.#e=n,globalThis.addEventListener("message",this.#d)}attributeChangedCallback(t,n,s){if(n!==s)switch(t){case"src":case"controls":this.load()}}getVideoPlaybackQuality(){return this.#t.stats.videoStats}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t)}get readyState(){return this.#i}get seeking(){return this.#s}get buffered(){var t,n;return function(s,i){return Array.isArray(s)?S(s):i==null||i===0?S([[0,0]]):S([[s,i]])}(0,((n=(t=this.#t.stats)==null?void 0:t.videoStats)==null?void 0:n.bufferSize)??0)}get paused(){return this.#t.playback?this.#t.playback===j:this.#u}get ended(){return!!this.#t.playback&&this.#t.playback===B}get duration(){return this.#t.duration??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){return this.#t.currentTime?this.#t.currentTime:this.#h}set currentTime(t){this.#h=t,this.loadComplete.then(()=>{this.#n(q,t)})}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",!!t)}get loop(){return this.hasAttribute("loop")}set loop(t){this.toggleAttribute("loop",!!t)}get muted(){return this.#a}set muted(t){this.#a=t,this.loadComplete.then(()=>{this.#n(F,t)})}get volume(){return this.#l}set volume(t){this.#l=t,this.loadComplete.then(()=>{this.#n(J,t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.toggleAttribute("playsinline",!!t)}play(){this.#u=!1,this.#n(z)}pause(){this.#u=!0,this.#n(D)}#d=async t=>{var n,s,i,l;if(!this.#e.contentWindow)return;const{data:a,source:b}=t;if(b===this.#e.contentWindow){if(a.namespace==="twitch-embed")await new Promise(m=>setTimeout(m,10)),a.eventName==="ready"?(this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve(),this.#i=1,this.dispatchEvent(new Event("loadedmetadata"))):a.eventName==="seek"?(this.#s=!0,this.dispatchEvent(new Event("seeking"))):a.eventName==="playing"?(this.#s&&(this.#s=!1,this.dispatchEvent(new Event("seeked"))),this.#i=3,this.dispatchEvent(new Event("playing"))):this.dispatchEvent(new Event(a.eventName));else if(a.namespace==="twitch-embed-player-proxy"&&a.eventName==="UPDATE_STATE"){const m=this.#t.duration,v=this.#t.currentTime,g=this.#t.volume,d=this.#t.muted,w=(s=(n=this.#t.stats)==null?void 0:n.videoStats)==null?void 0:s.bufferSize;this.#t={...this.#t,...a.params},m!==this.#t.duration&&this.dispatchEvent(new Event("durationchange")),v!==this.#t.currentTime&&this.dispatchEvent(new Event("timeupdate")),g===this.#t.volume&&d===this.#t.muted||(this.#t.volume!==void 0&&(this.#l=this.#t.volume),this.#t.muted!==void 0&&(this.#a=this.#t.muted),this.dispatchEvent(new Event("volumechange"))),w!==((l=(i=this.#t.stats)==null?void 0:i.videoStats)==null?void 0:l.bufferSize)&&this.dispatchEvent(new Event("progress"))}}};#n(t,n){if(!this.#e.contentWindow)return;const s={eventName:t,params:n,namespace:"twitch-embed-player-proxy"};this.#e.contentWindow.postMessage(s,L)}#p(t){if(Object.prototype.hasOwnProperty.call(this,t)){const n=this[t];delete this[t],this[t]=n}}}function A(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}function C(e){return String(new URLSearchParams(function(t){let n={};for(let s in t){let i=t[s];i===!0||i===""?n[s]=!0:i===!1?n[s]=!1:i!=null&&(n[s]=i)}return n}(e)))}class $ extends Promise{constructor(t=()=>{}){let n,s;super((i,l)=>{t(i,l),n=i,s=l}),this.resolve=n,this.reject=s}}function S(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("twitch-video")&&globalThis.customElements.define("twitch-video",O);var U=O,V=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),Q={className:"class",htmlFor:"for"};function R(e){return e.toLowerCase()}function H(e){return typeof e=="boolean"?e?"":void 0:typeof e=="function"||typeof e=="object"&&e!==null?void 0:e}function I(e,t,n){var s;e[t]=n,n==null&&t in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&e.removeAttribute(t)}var G=function({react:e,tagName:t,elementClass:n,events:s,displayName:i,defaultProps:l,toAttributeName:a=R,toAttributeValue:b=H}){const m=Number.parseInt(e.version)>=19,v=e.forwardRef((g,d)=>{var w,N;const c=e.useRef(null),E=e.useRef(new Map),T={},M={},p={},y={};for(const[o,r]of Object.entries(g)){if(V.has(o)){p[o]=r;continue}const u=a(Q[o]??o);if(n.prototype&&o in n.prototype&&!(o in(((w=globalThis.HTMLElement)==null?void 0:w.prototype)??{}))&&!((N=n.observedAttributes)!=null&&N.some(f=>f===u))){y[o]=r;continue}if(o.startsWith("on")){T[o]=r;continue}const h=b(r);if(u&&h!=null&&(M[u]=String(h),m||(p[u]=h)),u&&m){const f=H(r);p[u]=h!==f?h:r}}if(typeof window<"u"){for(const o in T){const r=T[o],u=o.endsWith("Capture"),h=(s?.[o]??o.slice(2).toLowerCase()).slice(0,u?-7:void 0);e.useLayoutEffect(()=>{const f=c?.current;if(f&&typeof r=="function")return f.addEventListener(h,r,u),()=>{f.removeEventListener(h,r,u)}},[c?.current,r])}e.useLayoutEffect(()=>{if(c.current===null)return;const o=new Map;for(const r in y)I(c.current,r,y[r]),E.current.delete(r),o.set(r,y[r]);for(const[r,u]of E.current)I(c.current,r,void 0);E.current=o})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:o,delegatesFocus:r}=n.shadowRootOptions,u=e.createElement("template",{shadowrootmode:o,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(M,g)},key:"ce-la-react-ssr-template-shadow-root"});p.children=[u,p.children]}return e.createElement(t,{...l,...p,ref:e.useCallback(o=>{c.current=o,typeof d=="function"?d(o):d!==null&&(d.current=o)},[d])},p.children)});return v.displayName=i??n.name,v}({react:P,tagName:"twitch-video",elementClass:U,toAttributeName:e=>e==="muted"?"":e==="defaultMuted"?"muted":R(e)});export{G as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{b as P}from"./sentry-BxlhxHUi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dafb4366-bd09-4758-a9ea-7aa580e8481b",e._sentryDebugIdIdentifier="sentry-dbid-dafb4366-bd09-4758-a9ea-7aa580e8481b")}catch{}})();const O=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,h={INIT:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3},x={[h.INIT]:"emptied",[h.PAUSED]:"pause",[h.ENDED]:"ended",[h.PLAYING]:"play",[h.BUFFERING]:"waiting"};function M(e,t={}){const n={src:H(e,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; autoplay; fullscreen; encrypted-media; gyroscope; picture-in-picture"};return t.config&&(n["data-config"]=JSON.stringify(t.config)),`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display:inline-block;
|
|
5
|
+
min-width: 300px;
|
|
6
|
+
min-height: 150px;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
iframe {
|
|
10
|
+
position:absolute;
|
|
11
|
+
top:0;
|
|
12
|
+
left:0;
|
|
13
|
+
width:100%;
|
|
14
|
+
height:100%;
|
|
15
|
+
border:0;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
<iframe ${function(o){let r="";for(const a in o){const u=o[a];r+=u===""?` ${E(a)}`:` ${E(a)}="${E(`${u}`)}"`}return r}(n)} title="TikTok video"></iframe>
|
|
19
|
+
`}function H(e,t={}){if(!e.src)return;const n=e.src.match(O);return`https://www.tiktok.com/player/v1/${n&&n[1]}?${function(o){return String(new URLSearchParams(function(r){let a={};for(let u in r){let p=r[u];p===!0||p===""?a[u]=1:p===!1?a[u]=0:p!=null&&(a[u]=p)}return a}(o)))}({controls:e.controls===""?null:0,autoplay:e.autoplay,muted:e.muted,loop:e.loop,rel:0,...t.config})}`}class y extends(globalThis.HTMLElement??class{}){static getTemplateHTML=M;static shadowRootOptions={mode:"open"};static get observedAttributes(){return["src","controls","loop","autoplay","muted"]}loadComplete=new A;#s;#i;#e=!1;#r=0;#a=!0;#l=null;#n=100;#u=0;#o;constructor(){super(),this.#f("config")}async load(){if(this.#s)return;this.shadowRoot||this.attachShadow(y.shadowRootOptions);const t=!this.#i;if(this.#i&&(this.loadComplete=new A),this.#i=!0,await(this.#s=Promise.resolve()),this.#s=null,this.#r=0,this.#e=!1,this.#a=!0,!this.src)return this.shadowRoot.innerHTML="",void globalThis.removeEventListener("message",this.#c);let n=this.shadowRoot.querySelector("iframe");const o=function(r){let a={};for(let u of r)a[u.name]=u.value;return a}(this.attributes);t&&n&&(this.#l=JSON.parse(n.getAttribute("data-config")||"{}")),n?.src&&n.src===H(o,this)||(this.shadowRoot.innerHTML=M(o,this),n=this.shadowRoot.querySelector("iframe")),this.#o=n,globalThis.addEventListener("message",this.#c)}async attributeChangedCallback(t,n,o){if(n!==o)switch(t){case"muted":await this.loadComplete,this.muted=o!=null;break;case"autoplay":case"controls":case"loop":case"src":return void this.load()}}get config(){return this.#l}set config(t){this.#l=t}#c=t=>{var n;if(t.source!==((n=this.#o)==null?void 0:n.contentWindow))return;const o=t.data;if(o?.["x-tiktok-player"])switch(o.type){case"onPlayerReady":this.loadComplete.resolve();break;case"onStateChange":{this.#a=[h.INIT,h.PAUSED,h.ENDED].includes(o.value);const r=x[o.value];r&&this.dispatchEvent(new Event(r));break}case"onCurrentTime":this.#r=o.value.currentTime,this.#u=o.value.duration,this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("timeupdate"));break;case"onVolumeChange":this.#n=o.value,this.dispatchEvent(new Event("volumechange"));break;case"onMute":this.#e=!!o.value,this.#n=o.value?0:this.#n,this.dispatchEvent(new Event("volumechange"));break;case"onError":this.dispatchEvent(new Event("error"));break;default:console.warn("Unhandled TikTok player message:",o)}};#t(t,n){var o;if(!((o=this.#o)!=null&&o.contentWindow))return;const r={"x-tiktok-player":!0,type:t,...n!==void 0?{value:n}:{}};this.#o.contentWindow.postMessage(r,"*")}async play(){await this.loadComplete,this.#t("play")}async pause(){await this.loadComplete,this.#t("pause")}async#d(t){await this.loadComplete,this.#t("seekTo",Number(t))}async#h(){await this.loadComplete,this.#t("mute")}async#p(){await this.loadComplete,this.#t("unMute")}get volume(){return this.#n/100}set volume(t){console.warn("Volume control is not supported for TikTok videos.")}get currentTime(){return this.#r}set currentTime(t){this.#d(t)}get muted(){return this.#e}set muted(t){this.#e=t,t?this.#h():this.#p()}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",!!t)}get paused(){return this.#a}get duration(){return this.#u}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t??"")}#f(t){if(Object.prototype.hasOwnProperty.call(this,t)){const n=this[t];delete this[t],this[t]=n}}}class A extends Promise{constructor(t=()=>{}){let n,o;super((r,a)=>{t(r,a),n=r,o=a}),this.resolve=n,this.reject=o}}function E(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}globalThis.customElements&&!globalThis.customElements.get("tiktok-video")&&globalThis.customElements.define("tiktok-video",y);var U=y,W=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),$={className:"class",htmlFor:"for"};function R(e){return e.toLowerCase()}function S(e){return typeof e=="boolean"?e?"":void 0:typeof e=="function"||typeof e=="object"&&e!==null?void 0:e}function D(e,t,n){var o;e[t]=n,n==null&&t in(((o=globalThis.HTMLElement)==null?void 0:o.prototype)??{})&&e.removeAttribute(t)}var _=function({react:e,tagName:t,elementClass:n,events:o,displayName:r,defaultProps:a,toAttributeName:u=R,toAttributeValue:p=S}){const T=Number.parseInt(e.version)>=19,k=e.forwardRef((C,v)=>{var L,N;const c=e.useRef(null),w=e.useRef(new Map),b={},I={},f={},g={};for(const[s,i]of Object.entries(C)){if(W.has(s)){f[s]=i;continue}const l=u($[s]??s);if(n.prototype&&s in n.prototype&&!(s in(((L=globalThis.HTMLElement)==null?void 0:L.prototype)??{}))&&!((N=n.observedAttributes)!=null&&N.some(m=>m===l))){g[s]=i;continue}if(s.startsWith("on")){b[s]=i;continue}const d=p(i);if(l&&d!=null&&(I[l]=String(d),T||(f[l]=d)),l&&T){const m=S(i);f[l]=d!==m?d:i}}if(typeof window<"u"){for(const s in b){const i=b[s],l=s.endsWith("Capture"),d=(o?.[s]??s.slice(2).toLowerCase()).slice(0,l?-7:void 0);e.useLayoutEffect(()=>{const m=c?.current;if(m&&typeof i=="function")return m.addEventListener(d,i,l),()=>{m.removeEventListener(d,i,l)}},[c?.current,i])}e.useLayoutEffect(()=>{if(c.current===null)return;const s=new Map;for(const i in g)D(c.current,i,g[i]),w.current.delete(i),s.set(i,g[i]);for(const[i,l]of w.current)D(c.current,i,void 0);w.current=s})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:s,delegatesFocus:i}=n.shadowRootOptions,l=e.createElement("template",{shadowrootmode:s,shadowrootdelegatesfocus:i,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(I,C)},key:"ce-la-react-ssr-template-shadow-root"});f.children=[l,f.children]}return e.createElement(t,{...a,...f,ref:e.useCallback(s=>{c.current=s,typeof v=="function"?v(s):v!==null&&(v.current=s)},[v])},f.children)});return k.displayName=r??n.name,k}({react:P,tagName:"tiktok-video",elementClass:U,toAttributeName:e=>e==="muted"?"":e==="defaultMuted"?"muted":R(e)});export{_ as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{b as H}from"./sentry-BxlhxHUi.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="a3d086e3-f921-4307-9afe-563b3f278947",s._sentryDebugIdIdentifier="sentry-dbid-a3d086e3-f921-4307-9afe-563b3f278947")}catch{}})();const R=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,D=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function S(s,t={}){var e;const i={src:O(s,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(e=t.config)!=null&&e.referrerpolicy&&(i.referrerpolicy=t.config.referrerpolicy),t.config&&(i["data-config"]=JSON.stringify(t.config)),`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
line-height: 0;
|
|
6
|
+
position: relative;
|
|
7
|
+
min-width: 300px;
|
|
8
|
+
min-height: 150px;
|
|
9
|
+
}
|
|
10
|
+
iframe {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
<iframe${function(o){let r="";for(const h in o){const m=o[h];r+=m===""?` ${L(h)}`:` ${L(h)}="${L(`${m}`)}"`}return r}(i)}></iframe>
|
|
17
|
+
`}function O(s,t){if(!s.src)return;const e=s.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",i={controls:s.controls===""?null:0,autoplay:s.autoplay,loop:s.loop,mute:s.muted,playsinline:s.playsinline,preload:s.preload??"metadata",enablejsapi:1,cc_load_policy:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,...t.config};if(R.test(s.src)){const r=s.src.match(R);return`${e}/${r&&r[1]}?${I(i)}`}const o=s.src.match(D);return`${e}?${I({listType:"playlist",list:o&&o[1],...i})}`}class V extends(globalThis.HTMLElement??class{}){static getTemplateHTML=S;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new C;#o;#a;#e=0;#s=!1;#t;isLoaded=!1;#l=null;#r=null;#n=null;#i=1;constructor(){super(),this.#u("config")}get config(){return this.#r}set config(t){this.#r=t}async load(){if(this.#o)return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!this.#a;this.#a&&(this.loadComplete=new C,this.isLoaded=!1),this.#a=!0,await(this.#o=Promise.resolve()),this.#o=null,this.#e=0,this.dispatchEvent(new Event("emptied"));let e=this.api;if(this.api=null,!this.src)return void(e==null||e.destroy());this.#n=document.createElement("video"),this.textTracks=this.#n.textTracks,this.textTracks.addEventListener("change",()=>{var n;const l=Array.from(this.textTracks).find(c=>c.mode==="showing");(n=this.api)==null||n.setOption("captions","track",l?{languageCode:l.language}:{})}),this.dispatchEvent(new Event("loadstart"));let i=this.shadowRoot.querySelector("iframe"),o=function(n){let l={};for(let c of n)l[c.name]=c.value;return l}(this.attributes);t&&i&&(this.#r=JSON.parse(i.getAttribute("data-config")||"{}")),i?.src&&i.src===O(o,this)||(this.shadowRoot.innerHTML=S(o,this),i=this.shadowRoot.querySelector("iframe"));const r=await async function(n,l,c){return A[n]?A[n]:self[l]?(await j(0),self[l]):A[n]=new Promise(function(f,p){const v=document.createElement("script");v.src=n;const E=()=>f(self[l]);self[c]=E,v.onload=()=>!c,v.onerror=p,document.head.append(v)})}("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new r.Player(i,{events:{onReady:()=>{var n;this.#e=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.#i!==1&&((n=this.api)==null||n.setVolume(100*this.#i)),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:n=>{console.error(n),this.#l={code:n.data,message:`YouTube iframe player error #${n.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`},this.dispatchEvent(new Event("error"))}}});let h=!1;this.api.addEventListener("onStateChange",n=>{var l;const c=n.data;if((c===r.PlayerState.PLAYING||c===r.PlayerState.BUFFERING)&&(h||(h=!0,this.dispatchEvent(new Event("play"))),(this.api.getOption("captions","tracklist")||[]).forEach(f=>{[...this.textTracks].some(p=>p.language===f.languageCode)||this.#n.addTextTrack("subtitles",f.displayName,f.languageCode),this.textTracks=this.#n.textTracks}),this.dispatchEvent(new Event("loadstart"))),c===r.PlayerState.PLAYING)this.seeking&&(this.#s=!1,(l=this.#t)==null||l.resolve(),this.dispatchEvent(new Event("seeked"))),this.#e=3,this.dispatchEvent(new Event("playing"));else if(c===r.PlayerState.PAUSED){const f=Math.abs(this.currentTime-w);!this.seeking&&f>.1&&(this.#s=!0,this.dispatchEvent(new Event("seeking"))),h=!1,this.dispatchEvent(new Event("pause"))}c===r.PlayerState.ENDED&&(h=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{var n;const l=((n=this.api)==null?void 0:n.getVolume())/100;this.#i=l,this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let m,w=0;setInterval(()=>{var n;const l=Math.abs(this.currentTime-w),c=this.buffered.end(this.buffered.length-1);this.seeking&&c>.1?(this.#s=!1,(n=this.#t)==null||n.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&l>.1&&(this.#s=!0,this.dispatchEvent(new Event("seeking"))),w=this.currentTime},50);const T=setInterval(()=>{const n=this.buffered.end(this.buffered.length-1);n>=this.duration&&(clearInterval(T),this.#e=4),m!=n&&(m=n,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(t,e,i){if(e!==i)switch(t){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var t,e,i;return this.#t=null,await this.loadComplete,(t=this.api)==null||t.playVideo(),e=this,(i=(o,r)=>{let h;e.addEventListener(o,h=()=>{e.removeEventListener(o,h),r()})},(...o)=>new Promise(r=>{i(...o,(...h)=>{h.length>1?r(h):r(h[0])})}))("playing")}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pauseVideo()}get seeking(){return this.#s}get readyState(){return this.#e}get src(){return this.getAttribute("src")}set src(t){this.src!=t&&this.setAttribute("src",t)}get error(){return this.#l}get paused(){var t,e;return this.isLoaded?[-1,0,2,5].includes((e=(t=this.api)==null?void 0:t.getPlayerState)==null?void 0:e.call(t)):!this.autoplay}get duration(){var t,e;return((e=(t=this.api)==null?void 0:t.getDuration)==null?void 0:e.call(t))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get buffered(){var t,e;if(!this.isLoaded)return P();const i=((t=this.api)==null?void 0:t.getVideoLoadedFraction())*((e=this.api)==null?void 0:e.getDuration());return i>0?P(0,i):P()}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){var t,e;return((e=(t=this.api)==null?void 0:t.getCurrentTime)==null?void 0:e.call(t))??0}set currentTime(t){this.currentTime!=t&&(this.#t=new C,this.loadComplete.then(()=>{var e,i;(e=this.api)==null||e.seekTo(t,!0),this.paused&&((i=this.#t)==null||i.then(()=>{var o;this.#t&&((o=this.api)==null||o.pauseVideo())}))}))}set defaultMuted(t){this.defaultMuted!=t&&this.toggleAttribute("muted",!!t)}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}set muted(t){this.muted!=t&&this.loadComplete.then(()=>{var e,i;t?(e=this.api)==null||e.mute():(i=this.api)==null||i.unMute()})}get muted(){var t,e;return this.isLoaded?(e=(t=this.api)==null?void 0:t.isMuted)==null?void 0:e.call(t):this.defaultMuted}get playbackRate(){var t,e;return((e=(t=this.api)==null?void 0:t.getPlaybackRate)==null?void 0:e.call(t))??1}set playbackRate(t){this.playbackRate!=t&&this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setPlaybackRate(t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.playsInline!=t&&this.toggleAttribute("playsinline",!!t)}get poster(){return this.getAttribute("poster")}set poster(t){this.poster!=t&&this.setAttribute("poster",`${t}`)}set volume(t){this.volume!=t&&(this.#i=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setVolume(100*t)}))}get volume(){var t;return this.isLoaded?((t=this.api)==null?void 0:t.getVolume())/100:this.#i}#u(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}}function L(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}function I(s){return String(new URLSearchParams(function(t){let e={};for(let i in t){let o=t[i];o===!0||o===""?e[i]=1:o===!1?e[i]=0:o!=null&&(e[i]=o)}return e}(s)))}const A={},j=s=>new Promise(t=>setTimeout(t,s));class C extends Promise{constructor(t=()=>{}){let e,i;super((o,r)=>{t(o,r),e=o,i=r}),this.resolve=e,this.reject=i}}function P(s,t){return Array.isArray(s)?N(s):N(s==null||t==null||s===0&&t===0?[[0,0]]:[[s,t]])}function N(s){return Object.defineProperties(s,{start:{value:t=>s[t][0]},end:{value:t=>s[t][1]}}),s}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",V);var B=V,F=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),Y={className:"class",htmlFor:"for"};function x(s){return s.toLowerCase()}function _(s){return typeof s=="boolean"?s?"":void 0:typeof s=="function"||typeof s=="object"&&s!==null?void 0:s}function $(s,t,e){var i;s[t]=e,e==null&&t in(((i=globalThis.HTMLElement)==null?void 0:i.prototype)??{})&&s.removeAttribute(t)}var q=function({react:s,tagName:t,elementClass:e,events:i,displayName:o,defaultProps:r,toAttributeName:h=x,toAttributeValue:m=_}){const w=Number.parseInt(s.version)>=19,T=s.forwardRef((n,l)=>{var c,f;const p=s.useRef(null),v=s.useRef(new Map),E={},M={},y={},k={};for(const[a,u]of Object.entries(n)){if(F.has(a)){y[a]=u;continue}const d=h(Y[a]??a);if(e.prototype&&a in e.prototype&&!(a in(((c=globalThis.HTMLElement)==null?void 0:c.prototype)??{}))&&!((f=e.observedAttributes)!=null&&f.some(b=>b===d))){k[a]=u;continue}if(a.startsWith("on")){E[a]=u;continue}const g=m(u);if(d&&g!=null&&(M[d]=String(g),w||(y[d]=g)),d&&w){const b=_(u);y[d]=g!==b?g:u}}if(typeof window<"u"){for(const a in E){const u=E[a],d=a.endsWith("Capture"),g=(i?.[a]??a.slice(2).toLowerCase()).slice(0,d?-7:void 0);s.useLayoutEffect(()=>{const b=p?.current;if(b&&typeof u=="function")return b.addEventListener(g,u,d),()=>{b.removeEventListener(g,u,d)}},[p?.current,u])}s.useLayoutEffect(()=>{if(p.current===null)return;const a=new Map;for(const u in k)$(p.current,u,k[u]),v.current.delete(u),a.set(u,k[u]);for(const[u,d]of v.current)$(p.current,u,void 0);v.current=a})}if(typeof window>"u"&&e?.getTemplateHTML&&e?.shadowRootOptions){const{mode:a,delegatesFocus:u}=e.shadowRootOptions,d=s.createElement("template",{shadowrootmode:a,shadowrootdelegatesfocus:u,dangerouslySetInnerHTML:{__html:e.getTemplateHTML(M,n)},key:"ce-la-react-ssr-template-shadow-root"});y.children=[d,y.children]}return s.createElement(t,{...r,...y,ref:s.useCallback(a=>{p.current=a,typeof l=="function"?l(a):l!==null&&(l.current=a)},[l])},y.children)});return T.displayName=o??e.name,T}({react:H,tagName:"youtube-video",elementClass:B,toAttributeName:s=>s==="muted"?"":s==="defaultMuted"?"muted":x(s)});export{q as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{c as ee,b as Re}from"./sentry-BxlhxHUi.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="91e1f775-cdfd-4ce0-b16f-1ddc2d109154",n._sentryDebugIdIdentifier="sentry-dbid-91e1f775-cdfd-4ce0-b16f-1ddc2d109154")}catch{}})();function le(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function he(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?le(Object(e),!0).forEach(function(r){X(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):le(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function N(){N=function(){return n};var n={},t=Object.prototype,e=t.hasOwnProperty,r=Object.defineProperty||function(h,c,p){h[c]=p.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(h,c,p){return Object.defineProperty(h,c,{value:p,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{u({},"")}catch{u=function(c,p,E){return c[p]=E}}function v(h,c,p,E){var g=c&&c.prototype instanceof y?c:y,j=Object.create(g.prototype),C=new O(E||[]);return r(j,"_invoke",{value:f(h,p,C)}),j}function b(h,c,p){try{return{type:"normal",arg:h.call(c,p)}}catch(E){return{type:"throw",arg:E}}}n.wrap=v;var w={};function y(){}function T(){}function x(){}var P={};u(P,o,function(){return this});var A=Object.getPrototypeOf,S=A&&A(A(q([])));S&&S!==t&&e.call(S,o)&&(P=S);var _=x.prototype=y.prototype=Object.create(P);function M(h){["next","throw","return"].forEach(function(c){u(h,c,function(p){return this._invoke(c,p)})})}function l(h,c){function p(g,j,C,R){var F=b(h[g],h,j);if(F.type!=="throw"){var B=F.arg,$=B.value;return $&&typeof $=="object"&&e.call($,"__await")?c.resolve($.__await).then(function(W){p("next",W,C,R)},function(W){p("throw",W,C,R)}):c.resolve($).then(function(W){B.value=W,C(B)},function(W){return p("throw",W,C,R)})}R(F.arg)}var E;r(this,"_invoke",{value:function(g,j){function C(){return new c(function(R,F){p(g,j,R,F)})}return E=E?E.then(C,C):C()}})}function f(h,c,p){var E="suspendedStart";return function(g,j){if(E==="executing")throw new Error("Generator is already running");if(E==="completed"){if(g==="throw")throw j;return J()}for(p.method=g,p.arg=j;;){var C=p.delegate;if(C){var R=d(C,p);if(R){if(R===w)continue;return R}}if(p.method==="next")p.sent=p._sent=p.arg;else if(p.method==="throw"){if(E==="suspendedStart")throw E="completed",p.arg;p.dispatchException(p.arg)}else p.method==="return"&&p.abrupt("return",p.arg);E="executing";var F=b(h,c,p);if(F.type==="normal"){if(E=p.done?"completed":"suspendedYield",F.arg===w)continue;return{value:F.arg,done:p.done}}F.type==="throw"&&(E="completed",p.method="throw",p.arg=F.arg)}}}function d(h,c){var p=c.method,E=h.iterator[p];if(E===void 0)return c.delegate=null,p==="throw"&&h.iterator.return&&(c.method="return",c.arg=void 0,d(h,c),c.method==="throw")||p!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+p+"' method")),w;var g=b(E,h.iterator,c.arg);if(g.type==="throw")return c.method="throw",c.arg=g.arg,c.delegate=null,w;var j=g.arg;return j?j.done?(c[h.resultName]=j.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,w):j:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,w)}function k(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function m(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function O(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(k,this),this.reset(!0)}function q(h){if(h){var c=h[o];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var p=-1,E=function g(){for(;++p<h.length;)if(e.call(h,p))return g.value=h[p],g.done=!1,g;return g.value=void 0,g.done=!0,g};return E.next=E}}return{next:J}}function J(){return{value:void 0,done:!0}}return T.prototype=x,r(_,"constructor",{value:x,configurable:!0}),r(x,"constructor",{value:T,configurable:!0}),T.displayName=u(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return!!c&&(c===T||(c.displayName||c.name)==="GeneratorFunction")},n.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,u(h,s,"GeneratorFunction")),h.prototype=Object.create(_),h},n.awrap=function(h){return{__await:h}},M(l.prototype),u(l.prototype,a,function(){return this}),n.AsyncIterator=l,n.async=function(h,c,p,E,g){g===void 0&&(g=Promise);var j=new l(v(h,c,p,E),g);return n.isGeneratorFunction(c)?j:j.next().then(function(C){return C.done?C.value:j.next()})},M(_),u(_,s,"Generator"),u(_,o,function(){return this}),u(_,"toString",function(){return"[object Generator]"}),n.keys=function(h){var c=Object(h),p=[];for(var E in c)p.push(E);return p.reverse(),function g(){for(;p.length;){var j=p.pop();if(j in c)return g.value=j,g.done=!1,g}return g.done=!0,g}},n.values=q,O.prototype={constructor:O,reset:function(h){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(m),!h)for(var c in this)c.charAt(0)==="t"&&e.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=void 0)},stop:function(){this.done=!0;var h=this.tryEntries[0].completion;if(h.type==="throw")throw h.arg;return this.rval},dispatchException:function(h){if(this.done)throw h;var c=this;function p(F,B){return j.type="throw",j.arg=h,c.next=F,B&&(c.method="next",c.arg=void 0),!!B}for(var E=this.tryEntries.length-1;E>=0;--E){var g=this.tryEntries[E],j=g.completion;if(g.tryLoc==="root")return p("end");if(g.tryLoc<=this.prev){var C=e.call(g,"catchLoc"),R=e.call(g,"finallyLoc");if(C&&R){if(this.prev<g.catchLoc)return p(g.catchLoc,!0);if(this.prev<g.finallyLoc)return p(g.finallyLoc)}else if(C){if(this.prev<g.catchLoc)return p(g.catchLoc,!0)}else{if(!R)throw new Error("try statement without catch or finally");if(this.prev<g.finallyLoc)return p(g.finallyLoc)}}}},abrupt:function(h,c){for(var p=this.tryEntries.length-1;p>=0;--p){var E=this.tryEntries[p];if(E.tryLoc<=this.prev&&e.call(E,"finallyLoc")&&this.prev<E.finallyLoc){var g=E;break}}g&&(h==="break"||h==="continue")&&g.tryLoc<=c&&c<=g.finallyLoc&&(g=null);var j=g?g.completion:{};return j.type=h,j.arg=c,g?(this.method="next",this.next=g.finallyLoc,w):this.complete(j)},complete:function(h,c){if(h.type==="throw")throw h.arg;return h.type==="break"||h.type==="continue"?this.next=h.arg:h.type==="return"?(this.rval=this.arg=h.arg,this.method="return",this.next="end"):h.type==="normal"&&c&&(this.next=c),w},finish:function(h){for(var c=this.tryEntries.length-1;c>=0;--c){var p=this.tryEntries[c];if(p.finallyLoc===h)return this.complete(p.completion,p.afterLoc),m(p),w}},catch:function(h){for(var c=this.tryEntries.length-1;c>=0;--c){var p=this.tryEntries[c];if(p.tryLoc===h){var E=p.completion;if(E.type==="throw"){var g=E.arg;m(p)}return g}}throw new Error("illegal catch attempt")},delegateYield:function(h,c,p){return this.delegate={iterator:q(h),resultName:c,nextLoc:p},this.method==="next"&&(this.arg=void 0),w}},n}function fe(n,t,e,r,i,o,a){try{var s=n[o](a),u=s.value}catch(v){return void e(v)}s.done?t(u):Promise.resolve(u).then(r,i)}function H(n){return function(){var t=this,e=arguments;return new Promise(function(r,i){var o=n.apply(t,e);function a(u){fe(o,r,i,a,s,"next",u)}function s(u){fe(o,r,i,a,s,"throw",u)}a(void 0)})}}function Pe(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function je(n,t,e){return t&&function(r,i){for(var o=0;o<i.length;o++){var a=i[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,Oe(a.key),a)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function X(n,t,e){return(t=Oe(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Y(n){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(n)}function Q(n,t){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},Q(n,t)}function _e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ae(n,t,e){return ae=_e()?Reflect.construct.bind():function(r,i,o){var a=[null];a.push.apply(a,i);var s=new(Function.bind.apply(r,a));return o&&Q(s,o.prototype),s},ae.apply(null,arguments)}function ue(n){var t=typeof Map=="function"?new Map:void 0;return ue=function(e){if(e===null||(r=e,Function.toString.call(r).indexOf("[native code]")===-1))return e;var r;if(typeof e!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return ae(e,arguments,Y(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Q(i,e)},ue(n)}function Z(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Fe(n){var t=_e();return function(){var e,r=Y(n);if(t){var i=Y(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z(o)}(this,e)}}function Oe(n){var t=function(e,r){if(typeof e!="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var o=i.call(e,r);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n,"string");return typeof t=="symbol"?t:String(t)}var Ae=ee!==void 0&&{}.toString.call(ee)==="[object global]";function de(n,t){return n.indexOf(t.toLowerCase())===0?n:"".concat(t.toLowerCase()).concat(n.substr(0,1).toUpperCase()).concat(n.substr(1))}function z(n){return/^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(n)}function pe(n){return/^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/.test(n)}function Ce(){var n,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.id,r=t.url,i=e||r;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(n=i,!isNaN(parseFloat(n))&&isFinite(n)&&Math.floor(n)==n)return"https://vimeo.com/".concat(i);if(z(i))return i.replace("http:","https:");throw e?new TypeError("“".concat(e,"” is not a valid video id.")):new TypeError("“".concat(i,"” is not a vimeo.com url."))}var ve=function(n,t,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"addEventListener",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"removeEventListener",o=typeof t=="string"?[t]:t;return o.forEach(function(a){n[r](a,e)}),{cancel:function(){return o.forEach(function(a){return n[i](a,e)})}}},Ie=Array.prototype.indexOf!==void 0,qe=typeof window<"u"&&window.postMessage!==void 0;if(!(Ae||Ie&&qe))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var Me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:ee!==void 0?ee:typeof self<"u"?self:{};(function(n){if(!n.WeakMap){var t=Object.prototype.hasOwnProperty,e=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{value:1}).x===1}catch{}}(),r=function(o,a,s){e?Object.defineProperty(o,a,{configurable:!0,writable:!0,value:s}):o[a]=s};n.WeakMap=function(){function o(){if(this===void 0)throw new TypeError("Constructor WeakMap requires 'new'");if(r(this,"_id","_WeakMap_"+s()+"."+s()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function a(u,v){if(!i(u)||!t.call(u,"_id"))throw new TypeError(v+" method called on incompatible receiver "+typeof u)}function s(){return Math.random().toString().substring(2)}return r(o.prototype,"delete",function(u){if(a(this,"delete"),!i(u))return!1;var v=u[this._id];return!(!v||v[0]!==u)&&(delete u[this._id],!0)}),r(o.prototype,"get",function(u){if(a(this,"get"),i(u)){var v=u[this._id];return v&&v[0]===u?v[1]:void 0}}),r(o.prototype,"has",function(u){if(a(this,"has"),!i(u))return!1;var v=u[this._id];return!(!v||v[0]!==u)}),r(o.prototype,"set",function(u,v){if(a(this,"set"),!i(u))throw new TypeError("Invalid value used as weak map key");var b=u[this._id];return b&&b[0]===u?(b[1]=v,this):(r(u,this._id,[u,v]),this)}),r(o,"_polyfill",!0),o}()}function i(o){return Object(o)===o}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Me);var me,re,I=(me=function(n){var t,e,r;r=function(){var i,o,a,s=Object.prototype.toString,u=typeof setImmediate<"u"?function(l){return setImmediate(l)}:setTimeout;try{Object.defineProperty({},"x",{}),i=function(l,f,d,k){return Object.defineProperty(l,f,{value:d,writable:!0,configurable:k!==!1})}}catch{i=function(f,d,k){return f[d]=k,f}}function v(l,f){a.add(l,f),o||(o=u(a.drain))}function b(l){var f,d=typeof l;return l==null||d!="object"&&d!="function"||(f=l.then),typeof f=="function"&&f}function w(){for(var l=0;l<this.chain.length;l++)y(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function y(l,f,d){var k,m;try{f===!1?d.reject(l.msg):(k=f===!0?l.msg:f.call(void 0,l.msg))===d.promise?d.reject(TypeError("Promise-chain cycle")):(m=b(k))?m.call(k,d.resolve,d.reject):d.resolve(k)}catch(O){d.reject(O)}}function T(l){var f,d=this;if(!d.triggered){d.triggered=!0,d.def&&(d=d.def);try{(f=b(l))?v(function(){var k=new A(d);try{f.call(l,function(){T.apply(k,arguments)},function(){x.apply(k,arguments)})}catch(m){x.call(k,m)}}):(d.msg=l,d.state=1,d.chain.length>0&&v(w,d))}catch(k){x.call(new A(d),k)}}}function x(l){var f=this;f.triggered||(f.triggered=!0,f.def&&(f=f.def),f.msg=l,f.state=2,f.chain.length>0&&v(w,f))}function P(l,f,d,k){for(var m=0;m<f.length;m++)(function(O){l.resolve(f[O]).then(function(q){d(O,q)},k)})(m)}function A(l){this.def=l,this.triggered=!1}function S(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function _(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var f=new S(this);this.then=function(d,k){var m={success:typeof d!="function"||d,failure:typeof k=="function"&&k};return m.promise=new this.constructor(function(O,q){if(typeof O!="function"||typeof q!="function")throw TypeError("Not a function");m.resolve=O,m.reject=q}),f.chain.push(m),f.state!==0&&v(w,f),m.promise},this.catch=function(d){return this.then(void 0,d)};try{l.call(void 0,function(d){T.call(f,d)},function(d){x.call(f,d)})}catch(d){x.call(f,d)}}a=function(){var l,f,d;function k(m,O){this.fn=m,this.self=O,this.next=void 0}return{add:function(m,O){d=new k(m,O),f?f.next=d:l=d,f=d,d=void 0},drain:function(){var m=l;for(l=f=o=void 0;m;)m.fn.call(m.self),m=m.next}}}();var M=i({},"constructor",_,!1);return _.prototype=M,i(M,"__NPO__",0,!1),i(_,"resolve",function(l){return l&&typeof l=="object"&&l.__NPO__===1?l:new this(function(f,d){if(typeof f!="function"||typeof d!="function")throw TypeError("Not a function");f(l)})}),i(_,"reject",function(l){return new this(function(f,d){if(typeof f!="function"||typeof d!="function")throw TypeError("Not a function");d(l)})}),i(_,"all",function(l){var f=this;return s.call(l)!="[object Array]"?f.reject(TypeError("Not an array")):l.length===0?f.resolve([]):new f(function(d,k){if(typeof d!="function"||typeof k!="function")throw TypeError("Not a function");var m=l.length,O=Array(m),q=0;P(f,l,function(J,h){O[J]=h,++q===m&&d(O)},k)})}),i(_,"race",function(l){var f=this;return s.call(l)!="[object Array]"?f.reject(TypeError("Not an array")):new f(function(d,k){if(typeof d!="function"||typeof k!="function")throw TypeError("Not a function");P(f,l,function(m,O){d(O)},k)})}),_},(e=Me)[t="Promise"]=e[t]||r(),n.exports&&(n.exports=e[t])},me(re={exports:{}},re.exports),re.exports),V=new WeakMap;function G(n,t,e){var r=V.get(n.element)||{};t in r||(r[t]=[]),r[t].push(e),V.set(n.element,r)}function K(n,t){return(V.get(n.element)||{})[t]||[]}function te(n,t,e){var r=V.get(n.element)||{};if(!r[t])return!0;if(!e)return r[t]=[],V.set(n.element,r),!0;var i=r[t].indexOf(e);return i!==-1&&r[t].splice(i,1),V.set(n.element,r),r[t]&&r[t].length===0}function ne(n){if(typeof n=="string")try{n=JSON.parse(n)}catch(t){return console.warn(t),{}}return n}function D(n,t,e){if(n.element.contentWindow&&n.element.contentWindow.postMessage){var r={method:t};e!==void 0&&(r.value=e);var i=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));i>=8&&i<10&&(r=JSON.stringify(r)),n.element.contentWindow.postMessage(r,n.origin)}}function Ve(n,t){var e,r=[];if((t=ne(t)).event)t.event==="error"&&K(n,t.data.method).forEach(function(o){var a=new Error(t.data.message);a.name=t.data.name,o.reject(a),te(n,t.data.method,o)}),r=K(n,"event:".concat(t.event)),e=t.data;else if(t.method){var i=function(o,a){var s=K(o,a);if(s.length<1)return!1;var u=s.shift();return te(o,a,u),u}(n,t.method);i&&(r.push(i),e=t.value)}r.forEach(function(o){try{if(typeof o=="function")return void o.call(n,e);o.resolve(e)}catch{}})}var We=["airplay","audio_tracks","audiotrack","autopause","autoplay","background","byline","cc","chapter_id","chapters","chromecast","color","colors","controls","dnt","end_time","fullscreen","height","id","initial_quality","interactive_params","keyboard","loop","maxheight","max_quality","maxwidth","min_quality","muted","play_button_position","playsinline","portrait","preload","progress_bar","quality","quality_selector","responsive","skipping_forward","speed","start_time","texttrack","thumbnail_id","title","transcript","transparent","unmute_button","url","vimeo_logo","volume","watch_full_video","width"];function Ne(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return We.reduce(function(e,r){var i=n.getAttribute("data-vimeo-".concat(r));return(i||i==="")&&(e[r]=i===""?1:i),e},t)}function ce(n,t){var e=n.html;if(!t)throw new TypeError("An element must be provided");if(t.getAttribute("data-vimeo-initialized")!==null)return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=e,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function Le(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;return new Promise(function(r,i){if(!z(n))throw new TypeError("“".concat(n,"” is not a vimeo.com url."));var o=function(v){for(var b=(v||"").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/),w=(b&&b[1]||"").replace("player.",""),y=0,T=[".videoji.hk",".vimeo.work",".videoji.cn"];y<T.length;y++){var x=T[y];if(w.endsWith(x))return w}return"vimeo.com"}(n),a="https://".concat(o,"/api/oembed.json?url=").concat(encodeURIComponent(n));for(var s in t)t.hasOwnProperty(s)&&(a+="&".concat(s,"=").concat(encodeURIComponent(t[s])));var u="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;u.open("GET",a,!0),u.onload=function(){if(u.status!==404)if(u.status!==403)try{var v=JSON.parse(u.responseText);if(v.domain_status_code===403)return ce(v,e),void i(new Error("“".concat(n,"” is not embeddable.")));r(v)}catch(b){i(b)}else i(new Error("“".concat(n,"” is not embeddable.")));else i(new Error("“".concat(n,"” was not found.")))},u.onerror=function(){var v=u.status?" (".concat(u.status,")"):"";i(new Error("There was an error fetching the embed code from Vimeo".concat(v,".")))},u.send()})}var De={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},He=function(){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&Q(o,a)})(i,ue(EventTarget));var n,t,e,r=Fe(i);function i(o,a){var s,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},v=arguments.length>3?arguments[3]:void 0;return Pe(this,i),X(Z(s=r.call(this)),"logger",void 0),X(Z(s),"speedAdjustment",0),X(Z(s),"adjustSpeed",function(){var b=H(N().mark(function w(y,T){var x;return N().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(s.speedAdjustment!==T){P.next=2;break}return P.abrupt("return");case 2:return P.next=4,y.getPlaybackRate();case 4:return P.t0=P.sent,P.t1=s.speedAdjustment,P.t2=P.t0-P.t1,P.t3=T,x=P.t2+P.t3,s.log("New playbackRate: ".concat(x)),P.next=12,y.setPlaybackRate(x);case 12:s.speedAdjustment=T;case 13:case"end":return P.stop()}},w)}));return function(w,y){return b.apply(this,arguments)}}()),s.logger=v,s.init(a,o,he(he({},De),u)),s}return je(i,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:(e=H(N().mark(function o(a,s,u){var v,b,w,y=this;return N().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,this.waitForTOReadyState(a,"open");case 2:if(u.role!=="viewer"){T.next=10;break}return T.next=5,this.updatePlayer(a,s,u);case 5:v=ve(a,"change",function(){return y.updatePlayer(a,s,u)}),b=this.maintainPlaybackPosition(a,s,u),this.addEventListener("disconnect",function(){b.cancel(),v.cancel()}),T.next=14;break;case 10:return T.next=12,this.updateTimingObject(a,s);case 12:w=ve(s,["seeked","play","pause","ratechange"],function(){return y.updateTimingObject(a,s)},"on","off"),this.addEventListener("disconnect",function(){return w.cancel()});case 14:case"end":return T.stop()}},o,this)})),function(o,a,s){return e.apply(this,arguments)})},{key:"updateTimingObject",value:(t=H(N().mark(function o(a,s){return N().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.t0=a,u.next=3,s.getCurrentTime();case 3:return u.t1=u.sent,u.next=6,s.getPaused();case 6:if(!u.sent){u.next=10;break}u.t2=0,u.next=13;break;case 10:return u.next=12,s.getPlaybackRate();case 12:u.t2=u.sent;case 13:u.t3=u.t2,u.t4={position:u.t1,velocity:u.t3},u.t0.update.call(u.t0,u.t4);case 16:case"end":return u.stop()}},o)})),function(o,a){return t.apply(this,arguments)})},{key:"updatePlayer",value:(n=H(N().mark(function o(a,s,u){var v,b,w;return N().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(v=a.query(),b=v.position,w=v.velocity,typeof b=="number"&&s.setCurrentTime(b),typeof w!="number"){y.next=25;break}if(w!==0){y.next=11;break}return y.next=6,s.getPaused();case 6:if(y.t0=y.sent,y.t0!==!1){y.next=9;break}s.pause();case 9:y.next=25;break;case 11:if(!(w>0)){y.next=25;break}return y.next=14,s.getPaused();case 14:if(y.t1=y.sent,y.t1!==!0){y.next=19;break}return y.next=18,s.play().catch(function(){var T=H(N().mark(function x(P){return N().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(P.name!=="NotAllowedError"||!u.autoPlayMuted){A.next=5;break}return A.next=3,s.setMuted(!0);case 3:return A.next=5,s.play().catch(function(S){return console.error("Couldn't play the video from TimingSrcConnector. Error:",S)});case 5:case"end":return A.stop()}},x)}));return function(x){return T.apply(this,arguments)}}());case 18:this.updatePlayer(a,s,u);case 19:return y.next=21,s.getPlaybackRate();case 21:if(y.t2=y.sent,y.t3=w,y.t2===y.t3){y.next=25;break}s.setPlaybackRate(w);case 25:case"end":return y.stop()}},o,this)})),function(o,a,s){return n.apply(this,arguments)})},{key:"maintainPlaybackPosition",value:function(o,a,s){var u=this,v=s.allowedDrift,b=s.maxAllowedDrift,w=s.minCheckInterval,y=s.maxRateAdjustment,T=s.maxTimeToCatchUp,x=1e3*Math.min(T,Math.max(w,b)),P=function(){var S=H(N().mark(function _(){var M,l,f,d,k;return N().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(m.t0=o.query().velocity===0,m.t0){m.next=6;break}return m.next=4,a.getPaused();case 4:m.t1=m.sent,m.t0=m.t1===!0;case 6:if(!m.t0){m.next=8;break}return m.abrupt("return");case 8:return m.t2=o.query().position,m.next=11,a.getCurrentTime();case 11:if(m.t3=m.sent,M=m.t2-m.t3,l=Math.abs(M),u.log("Drift: ".concat(M)),!(l>b)){m.next=22;break}return m.next=18,u.adjustSpeed(a,0);case 18:a.setCurrentTime(o.query().position),u.log("Resync by currentTime"),m.next=29;break;case 22:if(!(l>v)){m.next=29;break}return k=(f=l/T)<(d=y)?(d-f)/2:d,m.next=28,u.adjustSpeed(a,k*Math.sign(M));case 28:u.log("Resync by playbackRate");case 29:case"end":return m.stop()}},_)}));return function(){return S.apply(this,arguments)}}(),A=setInterval(function(){return P()},x);return{cancel:function(){return clearInterval(A)}}}},{key:"log",value:function(o){var a;(a=this.logger)===null||a===void 0||a.call(this,"TimingSrcConnector: ".concat(o))}},{key:"waitForTOReadyState",value:function(o,a){return new Promise(function(s){(function u(){o.readyState===a?s():o.addEventListener("readystatechange",u,{once:!0})})()})}}]),i}(),U=new WeakMap,ie=new WeakMap,L={},se=function(){function n(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Pe(this,n),window.jQuery&&e instanceof jQuery&&(e.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),e=e[0]),typeof document<"u"&&typeof e=="string"&&(e=document.getElementById(e)),!function(u){return!!(u&&u.nodeType===1&&"nodeName"in u&&u.ownerDocument&&u.ownerDocument.defaultView)}(e))throw new TypeError("You must pass either a valid element or a valid id.");if(e.nodeName!=="IFRAME"){var o=e.querySelector("iframe");o&&(e=o)}if(e.nodeName==="IFRAME"&&!z(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(U.has(e))return U.get(e);this._window=e.ownerDocument.defaultView,this.element=e,this.origin="*";var a=new I(function(u,v){if(r._onMessage=function(w){if(z(w.origin)&&r.element.contentWindow===w.source){r.origin==="*"&&(r.origin=w.origin);var y=ne(w.data);if(y&&y.event==="error"&&y.data&&y.data.method==="ready"){var T=new Error(y.data.message);return T.name=y.data.name,void v(T)}var x=y&&y.event==="ready",P=y&&y.method==="ping";if(x||P)return r.element.setAttribute("data-ready","true"),void u();Ve(r,y)}},r._window.addEventListener("message",r._onMessage),r.element.nodeName!=="IFRAME"){var b=Ne(e,i);Le(Ce(b),b,e).then(function(w){var y,T,x,P=ce(w,e);return r.element=P,r._originalElement=e,y=e,T=P,x=V.get(y),V.set(T,x),V.delete(y),U.set(r.element,r),w}).catch(v)}});if(ie.set(this,a),U.set(this.element,this),this.element.nodeName==="IFRAME"&&D(this,"ping"),L.isEnabled){var s=function(){return L.exit()};this.fullscreenchangeHandler=function(){L.isFullscreen?G(r,"event:exitFullscreen",s):te(r,"event:exitFullscreen",s),r.ready().then(function(){D(r,"fullscreenchange",L.isFullscreen)})},L.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var t;return je(n,[{key:"callMethod",value:function(e){for(var r=this,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(e==null)throw new TypeError("You must pass a method name.");return new I(function(s,u){return r.ready().then(function(){G(r,e,{resolve:s,reject:u}),D(r,e,o)}).catch(u)})}},{key:"get",value:function(e){var r=this;return new I(function(i,o){return e=de(e,"get"),r.ready().then(function(){G(r,e,{resolve:i,reject:o}),D(r,e)}).catch(o)})}},{key:"set",value:function(e,r){var i=this;return new I(function(o,a){if(e=de(e,"set"),r==null)throw new TypeError("There must be a value to set.");return i.ready().then(function(){G(i,e,{resolve:o,reject:a}),D(i,e,r)}).catch(a)})}},{key:"on",value:function(e,r){if(!e)throw new TypeError("You must pass an event name.");if(!r)throw new TypeError("You must pass a callback function.");if(typeof r!="function")throw new TypeError("The callback must be a function.");K(this,"event:".concat(e)).length===0&&this.callMethod("addEventListener",e).catch(function(){}),G(this,"event:".concat(e),r)}},{key:"off",value:function(e,r){if(!e)throw new TypeError("You must pass an event name.");if(r&&typeof r!="function")throw new TypeError("The callback must be a function.");te(this,"event:".concat(e),r)&&this.callMethod("removeEventListener",e).catch(function(i){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=ie.get(this)||new I(function(r,i){i(new Error("Unknown player. Probably unloaded."))});return I.resolve(e)}},{key:"addCuePoint",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:r})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,r){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:r})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return L.isEnabled?L.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return L.isEnabled?L.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return L.isEnabled?I.resolve(L.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new I(function(r){if(ie.delete(e),U.delete(e.element),e._originalElement&&(U.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&e.element.nodeName==="IFRAME"&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&e.element.nodeName==="DIV"&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var i=e.element.querySelector("iframe");i&&i.parentNode&&(i.parentNode.parentNode&&e._originalElement&&e._originalElement!==i.parentNode?i.parentNode.parentNode.removeChild(i.parentNode):i.parentNode.removeChild(i))}e._window.removeEventListener("message",e._onMessage),L.isEnabled&&L.off("fullscreenchange",e.fullscreenchangeHandler),r()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return I.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"setColors",value:function(e){if(!Array.isArray(e))return new I(function(o,a){return a(new TypeError("Argument must be an array."))});var r=new I(function(o){return o(null)}),i=[e[0]?this.set("colorOne",e[0]):r,e[1]?this.set("colorTwo",e[1]):r,e[2]?this.set("colorThree",e[2]):r,e[3]?this.set("colorFour",e[3]):r];return I.all(i)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}},{key:"setTimingSrc",value:(t=H(N().mark(function e(r,i){var o,a=this;return N().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(r){s.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return s.next=4,this.ready();case 4:return o=new He(this,r,i),D(this,"notifyTimingObjectConnect"),o.addEventListener("disconnect",function(){return D(a,"notifyTimingObjectDisconnect")}),s.abrupt("return",o);case 8:case"end":return s.stop()}},e,this)})),function(e,r){return t.apply(this,arguments)})}]),n}();Ae||(L=function(){var n=function(){for(var r,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=0,a=i.length,s={};o<a;o++)if((r=i[o])&&r[1]in document){for(o=0;o<r.length;o++)s[i[0][o]]=r[o];return s}return!1}(),t={fullscreenchange:n.fullscreenchange,fullscreenerror:n.fullscreenerror},e={request:function(r){return new Promise(function(i,o){var a=function u(){e.off("fullscreenchange",u),i()};e.on("fullscreenchange",a);var s=(r=r||document.documentElement)[n.requestFullscreen]();s instanceof Promise&&s.then(a).catch(o)})},exit:function(){return new Promise(function(r,i){if(e.isFullscreen){var o=function s(){e.off("fullscreenchange",s),r()};e.on("fullscreenchange",o);var a=document[n.exitFullscreen]();a instanceof Promise&&a.then(o).catch(i)}else r()})},on:function(r,i){var o=t[r];o&&document.addEventListener(o,i)},off:function(r,i){var o=t[r];o&&document.removeEventListener(o,i)}};return Object.defineProperties(e,{isFullscreen:{get:function(){return!!document[n.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[n.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[n.fullscreenEnabled]}}}),e}(),function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,t=[].slice.call(n.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),e=function(r){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(r))};t.forEach(function(r){try{if(r.getAttribute("data-vimeo-defer")!==null)return;var i=Ne(r);Le(Ce(i),i,r).then(function(o){return ce(o,r)}).catch(e)}catch(o){e(o)}})}(),function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(t){if(z(t.origin)&&t.data&&t.data.event==="spacechange"){for(var e=n.querySelectorAll("iframe"),r=0;r<e.length;r++)if(e[r].contentWindow===t.source){e[r].parentElement.style.paddingBottom="".concat(t.data.data[0].bottom,"px");break}}}))}(),function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",function(t){if(z(t.origin)){var e=ne(t.data);if(e&&e.event==="ready")for(var r=n.querySelectorAll("iframe"),i=0;i<r.length;i++){var o=r[i],a=o.contentWindow===t.source;pe(o.src)&&a&&new se(o).callMethod("appendVideoMetadata",window.location.href)}}}))}(),function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var t=function(e){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(e))};window.addEventListener("message",function(e){if(z(e.origin)){var r=ne(e.data);if(r&&r.event==="ready")for(var i=n.querySelectorAll("iframe"),o=function(){var s=i[a],u=s.contentWindow===e.source;if(pe(s.src)&&u){var v=new se(s);v.getVideoId().then(function(b){var w=new RegExp("[?&]vimeo_t_".concat(b,"=([^&#]*)")).exec(window.location.href);if(w&&w[1]){var y=decodeURI(w[1]);v.setCurrentTime(y)}}).catch(t)}},a=0;a<i.length;a++)o()}})}}());const ze=/vimeo\.com\/(video\/|event\/)?(\d+)(?:\/([\w-]+))?/;function ye(n,t={}){const e={src:Be(n,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return t.config&&(e["data-config"]=JSON.stringify(t.config)),`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
min-width: 300px;
|
|
6
|
+
min-height: 150px;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
iframe {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
}
|
|
14
|
+
:host(:not([controls])) {
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
<iframe${function(r){let i="";for(const o in r){const a=r[o];i+=a===""?` ${oe(o)}`:` ${oe(o)}="${oe(`${a}`)}"`}return i}(e)}></iframe>
|
|
19
|
+
`}function Be(n,t){if(!n.src)return;let e=new URL(n.src);const r=n.src.match(ze),i=r&&r[1],o=r&&r[2],a=e.searchParams.get("h")||void 0,s={controls:n.controls===""?null:0,autoplay:n.autoplay,loop:n.loop,muted:n.muted,playsinline:n.playsinline,preload:n.preload??"metadata",transparent:!1,autopause:n.autopause,h:a,...t.config};return i==="event/"?`https://vimeo.com/event/${o}/embed?${ge(s)}`:`https://player.vimeo.com/video/${o}?${ge(s)}`}class Se extends(globalThis.HTMLElement??class{}){static getTemplateHTML=ye;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new we;#l;#h;#p;#t=0;#n=NaN;#r=!1;#e=!this.autoplay;#a=1;#u=0;#i=0;#s=!1;#o=1;#f=NaN;#d=NaN;#c=null;constructor(){super(),this.#v("config")}requestFullscreen(){var t,e;return(e=(t=this.api)==null?void 0:t.requestFullscreen)==null?void 0:e.call(t)}exitFullscreen(){var t,e;return(e=(t=this.api)==null?void 0:t.exitFullscreen)==null?void 0:e.call(t)}requestPictureInPicture(){var t,e;return(e=(t=this.api)==null?void 0:t.requestPictureInPicture)==null?void 0:e.call(t)}exitPictureInPicture(){var t,e;return(e=(t=this.api)==null?void 0:t.exitPictureInPicture)==null?void 0:e.call(t)}get config(){return this.#c}set config(t){this.#c=t}async load(){var t;if(this.#l)return;const e=!this.#h;this.#h&&(this.loadComplete=new we),this.#h=!0,await(this.#l=Promise.resolve()),this.#l=null,this.#t=0,this.#n=NaN,this.#r=!1,this.#e=!this.autoplay,this.#a=1,this.#u=0,this.#i=0,this.#s=!1,this.#o=1,this.#i=0,this.#f=NaN,this.#d=NaN,this.dispatchEvent(new Event("emptied"));let r=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const i={autoplay:this.autoplay,controls:this.controls,loop:this.loop,muted:this.defaultMuted,playsinline:this.playsInline,preload:this.preload??"metadata",transparent:!1,autopause:this.hasAttribute("autopause"),...this.#c},o=async()=>{this.#i=1,this.dispatchEvent(new Event("loadedmetadata")),this.api&&(this.#r=await this.api.getMuted(),this.#o=await this.api.getVolume(),this.dispatchEvent(new Event("volumechange")),this.#n=await this.api.getDuration(),this.dispatchEvent(new Event("durationchange"))),this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve()};if(this.#p)return this.api=r,await this.api.loadVideo({...i,url:this.src}),await o(),void await this.loadComplete;this.#p=!0;let a=(t=this.shadowRoot)==null?void 0:t.querySelector("iframe");e&&a&&(this.#c=JSON.parse(a.getAttribute("data-config")||"{}")),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=ye(function(v){let b={};for(let w of v)b[w.name]=w.value;return b}(this.attributes),this),a=this.shadowRoot.querySelector("iframe")),this.api=new se(a);const s=document.createElement("video");this.textTracks=s.textTracks,this.api.getTextTracks().then(v=>{v.forEach(b=>{s.addTextTrack(b.kind,b.label,b.language)})}),this.textTracks.addEventListener("change",()=>{const v=Array.from(this.textTracks).find(b=>b.mode==="showing");v?this.api.enableTextTrack(v.language,v.kind):this.api.disableTextTrack()});const u=()=>{this.api.off("loaded",u),o()};this.api.on("loaded",u),this.api.on("bufferstart",()=>{this.#e&&(this.#e=!1,this.dispatchEvent(new Event("play"))),this.dispatchEvent(new Event("waiting"))}),this.api.on("play",()=>{this.#e&&(this.#e=!1,this.dispatchEvent(new Event("play")))}),this.api.on("playing",()=>{this.#i=3,this.#e=!1,this.dispatchEvent(new Event("playing"))}),this.api.on("seeking",()=>{this.#s=!0,this.dispatchEvent(new Event("seeking"))}),this.api.on("seeked",()=>{this.#s=!1,this.dispatchEvent(new Event("seeked"))}),this.api.on("pause",()=>{this.#e=!0,this.dispatchEvent(new Event("pause"))}),this.api.on("ended",()=>{this.#e=!0,this.dispatchEvent(new Event("ended"))}),this.api.on("ratechange",({playbackRate:v})=>{this.#a=v,this.dispatchEvent(new Event("ratechange"))}),this.api.on("volumechange",async({volume:v})=>{this.#o=v,this.api&&(this.#r=await this.api.getMuted()),this.dispatchEvent(new Event("volumechange"))}),this.api.on("durationchange",({duration:v})=>{this.#n=v,this.dispatchEvent(new Event("durationchange"))}),this.api.on("timeupdate",({seconds:v})=>{this.#t=v,this.dispatchEvent(new Event("timeupdate"))}),this.api.on("progress",({seconds:v})=>{this.#u=v,this.dispatchEvent(new Event("progress"))}),this.api.on("resize",({videoWidth:v,videoHeight:b})=>{this.#f=v,this.#d=b,this.dispatchEvent(new Event("resize"))}),await this.loadComplete}async attributeChangedCallback(t,e,r){if(e!==r){switch(t){case"autoplay":case"controls":case"src":return void this.load()}await this.loadComplete,t==="loop"&&this.api.setLoop(this.loop)}}async play(){var t;this.#e=!1,this.dispatchEvent(new Event("play")),await this.loadComplete;try{await((t=this.api)==null?void 0:t.play())}catch(e){throw this.#e=!0,this.dispatchEvent(new Event("pause")),e}}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pause()}get ended(){return this.#t>=this.#n}get seeking(){return this.#s}get readyState(){return this.#i}get videoWidth(){return this.#f}get videoHeight(){return this.#d}get src(){return this.getAttribute("src")}set src(t){this.src!=t&&this.setAttribute("src",t)}get paused(){return this.#e}get duration(){return this.#n}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get buffered(){return this.#u>0?be(0,this.#u):be()}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){return this.#t}set currentTime(t){this.currentTime!=t&&(this.#t=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setCurrentTime(t).catch(()=>{})}))}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.defaultMuted!=t&&this.toggleAttribute("muted",!!t)}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get muted(){return this.#r}set muted(t){this.muted!=t&&(this.#r=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setMuted(t).catch(()=>{})}))}get playbackRate(){return this.#a}set playbackRate(t){this.playbackRate!=t&&(this.#a=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setPlaybackRate(t).catch(()=>{})}))}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.playsInline!=t&&this.toggleAttribute("playsinline",!!t)}get poster(){return this.getAttribute("poster")}set poster(t){this.poster!=t&&this.setAttribute("poster",`${t}`)}get volume(){return this.#o}set volume(t){this.volume!=t&&(this.#o=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setVolume(t).catch(()=>{})}))}#v(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}}function oe(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}function ge(n){return String(new URLSearchParams(function(t){let e={};for(let r in t){let i=t[r];i===!0||i===""?e[r]=1:i===!1?e[r]=0:i!=null&&(e[r]=i)}return e}(n)))}class we extends Promise{constructor(t=()=>{}){let e,r;super((i,o)=>{t(i,o),e=i,r=o}),this.resolve=e,this.reject=r}}function be(n,t){return Array.isArray(n)?ke(n):ke(n==null||t==null||n===0&&t===0?[[0,0]]:[[n,t]])}function ke(n){return Object.defineProperties(n,{start:{value:t=>n[t][0]},end:{value:t=>n[t][1]}}),n}globalThis.customElements&&!globalThis.customElements.get("vimeo-video")&&globalThis.customElements.define("vimeo-video",Se);var Ue=Se,$e=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),Ge={className:"class",htmlFor:"for"};function Ee(n){return n.toLowerCase()}function xe(n){return typeof n=="boolean"?n?"":void 0:typeof n=="function"||typeof n=="object"&&n!==null?void 0:n}function Te(n,t,e){var r;n[t]=e,e==null&&t in(((r=globalThis.HTMLElement)==null?void 0:r.prototype)??{})&&n.removeAttribute(t)}var Qe=function({react:n,tagName:t,elementClass:e,events:r,displayName:i,defaultProps:o,toAttributeName:a=Ee,toAttributeValue:s=xe}){const u=Number.parseInt(n.version)>=19,v=n.forwardRef((b,w)=>{var y,T;const x=n.useRef(null),P=n.useRef(new Map),A={},S={},_={},M={};for(const[l,f]of Object.entries(b)){if($e.has(l)){_[l]=f;continue}const d=a(Ge[l]??l);if(e.prototype&&l in e.prototype&&!(l in(((y=globalThis.HTMLElement)==null?void 0:y.prototype)??{}))&&!((T=e.observedAttributes)!=null&&T.some(m=>m===d))){M[l]=f;continue}if(l.startsWith("on")){A[l]=f;continue}const k=s(f);if(d&&k!=null&&(S[d]=String(k),u||(_[d]=k)),d&&u){const m=xe(f);_[d]=k!==m?k:f}}if(typeof window<"u"){for(const l in A){const f=A[l],d=l.endsWith("Capture"),k=(r?.[l]??l.slice(2).toLowerCase()).slice(0,d?-7:void 0);n.useLayoutEffect(()=>{const m=x?.current;if(m&&typeof f=="function")return m.addEventListener(k,f,d),()=>{m.removeEventListener(k,f,d)}},[x?.current,f])}n.useLayoutEffect(()=>{if(x.current===null)return;const l=new Map;for(const f in M)Te(x.current,f,M[f]),P.current.delete(f),l.set(f,M[f]);for(const[f,d]of P.current)Te(x.current,f,void 0);P.current=l})}if(typeof window>"u"&&e?.getTemplateHTML&&e?.shadowRootOptions){const{mode:l,delegatesFocus:f}=e.shadowRootOptions,d=n.createElement("template",{shadowrootmode:l,shadowrootdelegatesfocus:f,dangerouslySetInnerHTML:{__html:e.getTemplateHTML(S,b)},key:"ce-la-react-ssr-template-shadow-root"});_.children=[d,_.children]}return n.createElement(t,{...o,..._,ref:n.useCallback(l=>{x.current=l,typeof w=="function"?w(l):w!==null&&(w.current=l)},[w])},_.children)});return v.displayName=i??e.name,v}({react:Re,tagName:"vimeo-video",elementClass:Ue,toAttributeName:n=>n==="muted"?"":n==="defaultMuted"?"muted":Ee(n)});export{Qe as default};
|