PageSourceSearch

https://www.culturalcare.com/_next/static/chunks/reactPlayerTiktok.75d4557d0a47ba4b.js

js culturalcare.com collected 2026-10-03 21:25:24 UTC 8,120 bytes, 19 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4491],{13599:function(e,t,i){i.r(t),i.d(t,{default:function(){return j}});var s,n,o,a,r,l,u,c,h,d,p,f,m,v,w,g,y=i(67294),b=Object.defineProperty,k=e=>{throw TypeError(e)},E=(e,t,i)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,T=(e,t,i)=>E(e,"symbol"!=typeof t?t+"":t,i),M=(e,t,i)=>t.has(e)||k("Cannot "+i),C=(e,t,i)=>(M(e,t,"read from private field"),i?i.call(e):t.get(e)),N=(e,t,i)=>t.has(e)?k("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),L=(e,t,i,s)=>(M(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),W=(e,t,i)=>(M(e,t,"access private method"),i);let S=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,A={INIT:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3},R={[A.INIT]:"emptied",[A.PAUSED]:"pause",[A.ENDED]:"ended",[A.PLAYING]:"play",[A.BUFFERING]:"waiting"};function I(e,t={}){let i={src:P(e,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; autoplay; fullscreen; encrypted-media; gyroscope; picture-in-picture"};return t.config&&(i["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(e){let t="";for(let i in e){let s=e[i];""===s?t+=` ${D(i)}`:t+=` ${D(i)}="${D(`${s}`)}"`}return t}(i)} title="TikTok video"></iframe>
19  `}function P(e,t={}){if(!e.src)return;let i=e.src.match(S),s=i&&i[1],n={controls:""===e.controls?null:0,autoplay:e.autoplay,muted:e.muted,loop:e.loop,rel:0,...t.config};return`https://www.tiktok.com/player/v1/${s}?${String(new URLSearchParams(function(e){let t={};for(let i in e){let s=e[i];!0===s||""===s?t[i]=1:!1===s?t[i]=0:null!=s&&(t[i]=s)}return t}(n)))}`}let H=class e extends(globalThis.HTMLElement??class{}){constructor(){super(),N(this,p),T(this,"loadComplete",new O),N(this,s),N(this,n),N(this,o,!1),N(this,a,0),N(this,r,!0),N(this,l,null),N(this,u,100),N(this,c,0),N(this,h),N(this,d,e=>{var t;if(e.source!==(null==(t=C(this,h))?void 0:t.contentWindow))return;let i=e.data;if(null!=i&&i["x-tiktok-player"])switch(i.type){case"onPlayerReady":this.loadComplete.resolve();break;case"onStateChange":{L(this,r,[A.INIT,A.PAUSED,A.ENDED].includes(i.value));let e=R[i.value];e&&this.dispatchEvent(new Event(e));break}case"onCurrentTime":L(this,a,i.value.currentTime),L(this,c,i.value.duration),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("timeupdate"));break;case"onVolumeChange":L(this,u,i.value),this.dispatchEvent(new Event("volumechange"));break;case"onMute":L(this,o,!!i.value),L(this,u,i.value?0:C(this,u)),this.dispatchEvent(new Event("volumechange"));break;case"onError":this.dispatchEvent(new Event("error"));break;default:console.warn("Unhandled TikTok player message:",i)}}),W(this,p,g).call(this,"config")}static get observedAttributes(){return["src","controls","loop","autoplay","muted"]}async load(){if(C(this,s))return;this.shadowRoot||this.attachShadow(e.shadowRootOptions);let t=!C(this,n);if(C(this,n)&&(this.loadComplete=new O),L(this,n,!0),await L(this,s,Promise.resolve()),L(this,s,null),L(this,a,0),L(this,o,!1),L(this,r,!0),!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",C(this,d));return}let i=this.shadowRoot.querySelector("iframe"),u=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);t&&i&&L(this,l,JSON.parse(i.getAttribute("data-config")||"{}")),null!=i&&i.src&&i.src===P(u,this)||(this.shadowRoot.innerHTML=I(u,this),i=this.shadowRoot.querySelector("iframe")),L(this,h,i),globalThis.addEventListener("message",C(this,d))}async attributeChangedCallback(e,t,i){if(t!==i)switch(e){case"muted":await this.loadComplete,this.muted=null!=i;break;case"autoplay":case"controls":case"loop":case"src":this.load();return}}get config(){return C(this,l)}set config(e){L(this,l,e)}async play(){await this.loadComplete,W(this,p,f).call(this,"play")}async pause(){await this.loadComplete,W(this,p,f).call(this,"pause")}get volume(){return C(this,u)/100}set volume(e){console.warn("Volume control is not supported for TikTok videos.")}get currentTime(){return C(this,a)}set currentTime(e){W(this,p,m).call(this,e)}get muted(){return C(this,o)}set muted(e){L(this,o,e),e?W(this,p,v).call(this):W(this,p,w).call(this)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",!!e)}get paused(){return C(this,r)}get duration(){return C(this,c)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e??"")}};s=new WeakMap,n=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakSet,f=function(e,t){var i;
19if(!(null!=(i=C(this,h))&&i.contentWindow))return;let s={"x-tiktok-player":!0,type:e,...void 0!==t?{value:t}:{}};C(this,h).contentWindow.postMessage(s,"*")},m=async function(e){await this.loadComplete,W(this,p,f).call(this,"seekTo",Number(e))},v=async function(){await this.loadComplete,W(this,p,f).call(this,"mute")},w=async function(){await this.loadComplete,W(this,p,f).call(this,"unMute")},g=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},T(H,"getTemplateHTML",I),T(H,"shadowRootOptions",{mode:"open"});class O extends Promise{constructor(e=()=>{}){let t,i;super((s,n)=>{e(s,n),t=s,i=n}),this.resolve=t,this.reject=i}}function D(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}globalThis.customElements&&!globalThis.customElements.get("tiktok-video")&&globalThis.customElements.define("tiktok-video",H);var x=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),U={className:"class",htmlFor:"for"};function $(e){return e.toLowerCase()}function F(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e||"object"==typeof e&&null!==e?void 0:e}function _(e,t,i){var s;e[t]=i,null==i&&t in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&e.removeAttribute(t)}var j=function({react:e,tagName:t,elementClass:i,events:s,displayName:n,defaultProps:o,toAttributeName:a=$,toAttributeValue:r=F}){let l=Number.parseInt(e.version)>=19,u=e.forwardRef((n,u)=>{var c,h;let d=e.useRef(null),p=e.useRef(new Map),f={},m={},v={},w={};for(let[e,t]of Object.entries(n)){if(x.has(e)){v[e]=t;continue}let s=a(U[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(c=globalThis.HTMLElement)?void 0:c.prototype)??{}))&&!(null!=(h=i.observedAttributes)&&h.some(e=>e===s))){w[e]=t;continue}if(e.startsWith("on")){f[e]=t;continue}let n=r(t);s&&null!=n&&(m[s]=String(n),l||(v[s]=n)),s&&l&&(n!==F(t)?v[s]=n:v[s]=t)}if("u">typeof window){for(let t in f){let i=f[t],n=t.endsWith("Capture"),o=((null==s?void 0:s[t])??t.slice(2).toLowerCase()).slice(0,n?-7:void 0);e.useLayoutEffect(()=>{let e=null==d?void 0:d.current;if(!(!e||"function"!=typeof i))return e.addEventListener(o,i,n),()=>{e.removeEventListener(o,i,n)}},[null==d?void 0:d.current,i])}e.useLayoutEffect(()=>{if(null===d.current)return;let e=new Map;for(let t in w)_(d.current,t,w[t]),p.current.delete(t),e.set(t,w[t]);for(let[e,t]of p.current)_(d.current,e,void 0);p.current=e})}if(typeof window>"u"&&null!=i&&i.getTemplateHTML&&null!=i&&i.shadowRootOptions){let{mode:t,delegatesFocus:s}=i.shadowRootOptions,o=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(m,n)}});v.children=[o,v.children]}return e.createElement(t,{...o,...v,ref:e.useCallback(e=>{d.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])})});return u.displayName=n??i.name,u}({react:y,tagName:"tiktok-video",elementClass:H,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":$(e)})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.