@letscooee/web-sdk 14.1.11 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger.component-DD3uGY2a-WIc_-4-e.js → debugger.component-CWwvp-FV-C1UlTOOd.js} +3 -3
- package/dist/{esm-DKhFdjmg-BHggOOEU.js → esm-DKhFdjmg-BFj9mMXP.js} +1 -1
- package/dist/main.min.js +23 -23
- package/dist/renderer-BkTLOXoP-BTRzgoOp.js +5 -0
- package/dist/{share-dialog.component-Ca6SvmlX-BL9a6APi.js → share-dialog.component-CD5Wee2q-C-vbcMRm.js} +2 -2
- package/dist/video-detail-dialog.component-By05qzvB-CUXamE8p.js +14 -0
- package/dist/widgets-C7lA7XGj-BrnR9z4Y.js +44 -0
- package/package.json +2 -1
- package/.editorconfig +0 -17
- package/.eslintrc.json +0 -138
- package/.github/workflows/release.yml +0 -52
- package/.github/workflows/validate-pr.yml +0 -25
- package/.postcssrc.json +0 -5
- package/.release-it.json +0 -50
- package/dist/renderer-J5_AfM4W-Dqxkak4b.js +0 -5
- package/dist/video-detail-dialog.component-BJdssgp8-7Rgfp-Ve.js +0 -14
- package/dist/widgets-By0Ht5M7-Sfm_ntym.js +0 -44
- package/ssl/localhost.crt +0 -19
- package/ssl/localhost.key +0 -28
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { c as B$1, d as H, F as Fe, M, e as M$1, k as ke, m as mt$1, g as Be, j as jr, Y, h as ge, I as Ir, i as Ur, n as Fr, w as wt, o as Br, p as et, W as Wt, L as Lr, q as Mr, A, r as br, s as r, t as s, x, u as bn, R as Rn, v as On, Q as Qt, S, y as dt, z as Be$1, C as j, X as Xt, D as dr, E as Dn, N as Nn, G as Tt } from './main.min.js';
|
|
2
|
+
|
|
3
|
+
var w=class{loadedFonts=[];async loadAllFonts(t){t.elems?.forEach(e=>{e instanceof Be$1&&this.loadFamily(e.typography?.fam);});}async loadFamily(t){if(!t?.fonts||this.loadedFonts.indexOf(t.name)>-1)return;let e=[];t.fonts.forEach(n=>{if(n.url){let c=new FontFace(`cooee`+t.name,n.getURL(),n.getFontDescriptor());e.push(c.load());}}),this.loadedFonts.push(t.name),(await Promise.all(e)).forEach(n=>{document.fonts.add(n);});}};var b=class{static updateIdentity(t){if(!this.isInstalled())return;let e={};t.email&&(e.email=t.email),t.mobile&&(e.phone_number=t.mobile),Y.verbose(`Sending email/mobile to Klaviyo`),window.klaviyo.push([`identify`,e]);}static isInstalled(){return window.klaviyo&&typeof window.klaviyo==`object`}};var R=class{action;triggerContext;constructor(t,e){this.action=t,this.triggerContext=e;}async execute(){let t=this.containsCTA()?`CE Trigger Clicked`:`CE Trigger Closed`;switch(this.action.at!==dr.SUBMIT_FORM&&await this.closeTriggerAndSendEvent(t),this.action.at){case dr.ACCEPT_POPUP:break;case dr.GO_TO_URL:this.gotoURLAction();break;case dr.SHARE:this.shareAction();break;case dr.SUBMIT_FORM:await this.collectFormData();break;case void 0:case dr.OPEN_CART:break;default:Y.error(`Received an invalid ClickActionType: `,this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,`_blank`)?.focus();}gotoURLAction(){if(this.action.gu?.u){let t=this.action.gu.u;Dn(t)||(t=`//${t}`),window.open(t,`_self`);}}async closeTriggerAndSendEvent(t,e){this.triggerContext.closeInApp(t,e),await this.dispatchEvent();}shareAction(){if(!this.action.share)return;if(!navigator.share){Y.warn(`Navigator.share is not compatible with this browser`);return}navigator.share({text:this.action.share.text,title:`Share`}).then(e=>console.log(e)).catch(e=>console.error(e));}containsCTA(){return this.action.at&&this.action.at!==dr.REJECT_POPUP?true:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(t){return t?Object.keys(t).length===0:true}async collectFormData(){let t={};for(let e of this.triggerContext.inputs){if(!e.isValid)return;let n=document.getElementById(e.id).value;e.type===51?t.email=n:e.type===52&&(t.mobile=n);}await this.closeTriggerAndSendEvent(`CE Form Submitted`,{form:t}),this.action.applyDiscount&&Nn(`Coupon applied on cart`),b.updateIdentity(t);}async dispatchEvent(){let t=this.triggerContext.triggerData,e={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??t.embeddedItems??t.items,collections:t.collections,triggerData:t};await new Tt().process(e);let r={action:this.containsCTA()?`CLICKED`:`CLOSED`};document.dispatchEvent(new CustomEvent(`letscooee:outbound:popup-activities`,{detail:r}));}};var a=class{renderer=D.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;scalingFactor;constructor(t,e,r){this.parentHTMLEl=t,this.inappElement=e,this.triggerContext=r,this.scalingFactor=this.renderer.getScalingFactor();}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.parentHTMLEl.appendChild(this.inappHTMLEl);}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let t=s(r(r(r(r({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:`border-box`,outline:`none`});S(this.inappHTMLEl,t);}getDisplayStyles(){return {display:`block`}}processWidthAndHeight(){this.inappElement.w&&H(this.inappHTMLEl,`width`,x(this.inappElement.w,this.scalingFactor)),this.inappElement.h&&H(this.inappHTMLEl,`height`,x(this.inappElement.h,this.scalingFactor));}processPositionBlock(){let t={position:`absolute`,left:x(this.inappElement.x,this.scalingFactor),top:x(this.inappElement.y,this.scalingFactor)};S(this.inappHTMLEl,t);}getBorderStyles(){return On(this.inappElement.br,this.scalingFactor)}getSpaceStyles(){return bn(this.inappElement.spc,this.scalingFactor)}processTransparency(){let t=this.inappElement.alpha;if(!isNaN(t)){let e=(t/100).toFixed(2);H(this.inappHTMLEl,`opacity`,e);}}processShadow(){let t=this.inappElement.shd;t?H(this.inappHTMLEl,`box-shadow`,t.getStyle(this.scalingFactor)):H(this.inappHTMLEl,`box-shadow`,`unset`);}processTransformBlock(){let t=new j(this.inappElement.trf);t&&t.rotate&&H(this.inappHTMLEl,`transform`,`rotate(${t.rotate}deg)`);}registerAction(){let t=this.inappElement.clc;!t||Object.keys(t).length===0||(this.inappHTMLEl.addEventListener(`click`,e=>{e.stopPropagation(),new R(t,this.triggerContext).execute();}),H(this.inappHTMLEl,`cursor`,`pointer`));}getBackgroundStyles(){return Rn(this.inappElement.bg)}};var l=class extends a{constructor(t,e,r){super(t,e,r);}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment();}processFontBlock(){let t={},e=this.inappElement.typography;return e&&(t.fontSize=x(e.fs,this.scalingFactor),t.fontFamily=`cooee`+e.fam?.name,t.lineHeight=`${e.lh}`,t.letterSpacing=e.letterSpacing),Qt(this.inappElement.color,`color`,t),S(this.inappHTMLEl,t),t}processPart(t,e){let r=[];e.u&&r.push(`underline`),e.st&&r.push(`line-through`),r.length||r.push(`normal`),H(t,`font-weight`,e.b?`bold`:`normal`),H(t,`font-style`,e.i?`italic`:`normal`),H(t,`text-decoration`,r.join(` `)),H(t,`color`,e.c??`inherit`),H(t,`font-family`,`inherit`);}processAlignment(){let t=this.inappElement.typography.ta,e=t?Xt[t]?.toLowerCase():this.inappElement.typography.alignment;e||(e=`start`),H(this.inappHTMLEl,`text-align`,e);}};var f=class extends l{constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.inappElement.parts?.forEach(t=>{let e=document.createElement(`span`);e.innerHTML=t.txt?.toString()?.replace(/\n/g,`<br />`),this.processPart(e,t),this.inappHTMLEl.appendChild(e);}),this.processCommonBlocks();}};var v=class extends a{constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.processCommonBlocks();}};var T=class extends a{constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`img`),this.insertElement();}render(){this.inappHTMLEl.setAttribute(`src`,this.inappElement.src),H(this.inappHTMLEl,`max-width`,`none`),H(this.inappHTMLEl,`max-height`,`none`),H(this.inappHTMLEl,`margin`,`0 auto`),this.processCommonBlocks();}};var y=class o extends a{constructor(e,r,n){super(e,r,n);this.parent=e;this.inappHTMLEl=document.createElement(`div`);}static MAX_Z_INDEX=`2147483647`;render(){return this.parent||this.renderer.removeInApp(),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(`cooee-wrapper`),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),H(this.inappHTMLEl,`z-index`,o.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let e=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(H(this.inappHTMLEl,`width`,`100%`),H(this.inappHTMLEl,`height`,`100%`)):(H(this.inappHTMLEl,`width`,`100vw`),H(this.inappHTMLEl,`height`,`100vh`)),H(this.inappHTMLEl,`top`,`0`),H(this.inappHTMLEl,`left`,`0`);else {let r=this.inappElement.spc,n=br(e.w,this.scalingFactor)+r.getHorizontal(),c=br(e.h,this.scalingFactor)+r.getVertical();H(this.inappHTMLEl,`width`,n+`px`),H(this.inappHTMLEl,`height`,c+`px`);}}getSpaceStyles(){return {padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return r(r({display:`flex`},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){this.renderer.isParentNotBody()?H(this.inappHTMLEl,`position`,`absolute`):H(this.inappHTMLEl,`position`,`fixed`);}getBorderStyles(){return {}}processTransparency(){}processTransformBlock(){}processShadow(){}};var mt=`cooee-container`,P=class extends a{constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){return this.processCommonBlocks(),H(this.inappHTMLEl,`position`,`relative`),H(this.inappHTMLEl,`overflow`,`hidden`),this.inappHTMLEl.classList.add(mt),this}};var k=class o extends l{static DAYS=`Days`;static HOURS=`Hours`;static MINUTES=`Minutes`;static SECONDS=`Seconds`;elements;spans=[];constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=s(r(r(r({flex:`1 1 0`},Rn(this.inappElement.bg)),On(this.inappElement.br,this.scalingFactor)),bn(this.inappElement.spc,this.scalingFactor)),{marginLeft:x(this.inappElement.gap,this.scalingFactor),marginRight:x(this.inappElement.gap,this.scalingFactor)});this.addStylesToTimer(t);}getBackgroundStyles(){return {}}processFontBlock(){let t=super.processFontBlock();return Qt(this.inappElement.color,`color`,t),this.addStylesToTimer(t),t}getSpaceStyles(){return {}}getBorderStyles(){return {}}getDisplayStyles(){return {display:`flex`,flexWrap:`nowrap`,justifyContent:`center`}}addStylesToTimer(t){this.elements.forEach(e=>S(e,t));}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(o.DAYS)),t.hour&&this.elements.push(this.getChild(o.HOURS)),t.minute&&this.elements.push(this.getChild(o.MINUTES)),t.second&&this.elements.push(this.getChild(o.SECONDS)),this.elements.forEach(e=>this.inappHTMLEl.appendChild(e));}getChild(t){let e=document.createElement(`div`),r=document.createElement(`span`),n=document.createElement(`span`);return n.innerText=t,r.innerText=`00`,r.id=`lc-${t}`,H(n,`font-size`,`0.5em`),H(n,`text-align`,`center`),H(n,`font-family`,`inherit`),H(r,`text-align`,`center`),H(r,`font-family`,`inherit`),this.inappElement.lblPos===`start`?(e.appendChild(n),e.appendChild(r)):(e.appendChild(r),e.appendChild(n)),H(e,`display`,`flex`),H(e,`flex-direction`,this.inappElement.horizontal?``:`column`),H(e,`justify-content`,`center`),H(e,`align-items`,`center`),H(e,`gap`,`5px`),this.spans.push(r),e}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,e=>{this.spans.forEach(r=>{r.id===`lc-${o.DAYS}`?r.innerText=String(e.days).padStart(2,`0`):r.id===`lc-${o.HOURS}`?r.innerText=String(e.hours).padStart(2,`0`):r.id===`lc-${o.MINUTES}`?r.innerText=String(e.minutes).padStart(2,`0`):r.id===`lc-${o.SECONDS}`&&(r.innerText=String(e.seconds).padStart(2,`0`));});});this.triggerContext.intervals.push(t);}};var B=class extends l{constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`select`),this.insertElement();}render(){H(this.inappHTMLEl,`background`,`#ffffff00`),H(this.inappHTMLEl,`outline`,`none`),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions();}addListener(t){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),t.addEventListener(`click`,e=>{e.stopPropagation();}),t.addEventListener(`change`,()=>{let e=new dt(JSON.parse(t.value));this.updateItems(e);});}updateItems(t){let e=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[e.toEmbed(t)];let r=this.parentHTMLEl.querySelector(`#coo-13`);if(!r)return;let n=t.imgs[0]??e.imgs?.at(0);n?.url&&r.setAttribute(`src`,n.url);}addOptions(){let t=this.triggerContext.triggerData.items,e=this.inappHTMLEl;if(!t?.length){e.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);t[0].vars.forEach(n=>{e.add(this.createOption(n.name??`Default`,n,n.mID===r?.vID));});}createOption(t,e,r){let n=document.createElement(`option`);return n.text=t,n.value=JSON.stringify(e),r&&(n.selected=true),e||(n.disabled=true),n}};var u=class extends l{borderColor=``;constructor(t,e,r){super(t,e,r),this.inappHTMLEl=document.createElement(`input`),this.insertElement();}render(){let t=this.setInputType();this.inappHTMLEl.setAttribute(`placeholder`,this.inappElement.placeholderText),H(this.inappHTMLEl,`background`,`#ffffff00`),H(this.inappHTMLEl,`outline`,`none`),this.inappHTMLEl.addEventListener(`click`,e=>{e.stopPropagation();}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,t),this.triggerContext.addInputField(t,this.inappElement.t);}};var F=class o extends u{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,e,r){super(t,e,r);}setInputType(){let t=`coo-${this.inappElement.t}`;return this.inappHTMLEl.setAttribute(`type`,`email`),this.inappHTMLEl.setAttribute(`id`,t),t}addListener(t,e){t.addEventListener(`keydown`,r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(o.EMAIL_REGEX)?(H(this.inappHTMLEl,`border-color`,this.borderColor),this.triggerContext.updateValidation(e,true)):(H(this.inappHTMLEl,`border-color`,`red`),this.triggerContext.updateValidation(e,false)),r.stopPropagation();});}};var O=class o extends u{static MOBILE_REGEX=/^\d+$/;constructor(t,e,r){super(t,e,r);}setInputType(){let t=`coo-${this.inappElement.t}`;return this.inappHTMLEl.setAttribute(`type`,`tel`),this.inappHTMLEl.setAttribute(`id`,t),t}addListener(t,e){t.addEventListener(`keydown`,r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(o.MOBILE_REGEX)?(H(this.inappHTMLEl,`border-color`,this.borderColor),this.triggerContext.updateValidation(e,true)):(H(this.inappHTMLEl,`border-color`,`red`),this.triggerContext.updateValidation(e,false)),r.stopPropagation();});}};var N=class extends T{constructor(t,e,r){super(t,e,r);}render(){super.render(),this.inappHTMLEl.setAttribute(`id`,`coo-${this.inappElement.type}`);}};var D=class o{static DOCUMENT_STANDARD_MODE=`CSS1Compat`;static ACTIVE_TRIGGER_DATA;static _instance;parent;rootContainer;containerHTMLElement;ian;scalingFactor=1;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.resizeListener=()=>this.screenResized(),this.setParentContainer(t);}static get(){return o._instance}render(t){this.renderEngagement(new B$1(t));}getScalingFactor(){return this.scalingFactor}calculateScalingFactor(t){let e=t.max,r=t.cont.w,n=t.cont.h,c=t.spc,m=this.getWidth(),h=this.getHeight();e&&(m=m?Math.min(m,e):e,h=h?Math.min(h,e):e),h&&(m-=c.getHorizontal(),h-=c.getVertical(),m/h<r/n?this.scalingFactor=m/r:this.scalingFactor=h/n,this.scalingFactor=Math.min(this.scalingFactor,1));}setParentContainer(t){this.parent=t||document.body,this.isParentNotBody()&&H(this.parent,`position`,`relative`);}isParentNotBody(){return this.parent&&this.parent!==document.body}getWidth(){return this.isParentNotBody()?this.parent.clientWidth:document.compatMode===o.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parent.clientHeight:document.compatMode===o.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}async renderEngagement(t){this.triggerContext=new Fe(new Date,t),this.triggerContext.onClose(e=>{this.closeInApp(e);}),this.ian=t.ian,(M()||t.previewType===`mobile`)&&this.ian.overrideForMobileView(),await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed();},t.getDelaySeconds()):this.withCartDrawerClosed();}withCartDrawerClosed(){if(!M$1.get().isOpen()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=window.CooeeSDK.cartDrawerToggle$.subscribe(({open:e})=>{!e&&this.startRenderingOnce();});}startRenderingOnce(){if(!this.shouldSkipCampaign()){o.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData,o._instance=this;try{this.startRendering();}catch(t){ke(t,`render-popup`,{triggerContext:this.triggerContext});return}this.sendTriggerDisplayed(),M()||window.addEventListener(`resize`,this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe();}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&o.ACTIVE_TRIGGER_DATA){let r={triggerShown:new mt$1(o.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),true}if(Be().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:`GoKwik popup is open`}),true;let e=jr.find(r=>!!document.querySelector(r.identifier));return e?(this.skipTrigger(t,{reason:`${e.gateway} modal is open`}),true):false}startRendering(){this.calculateScalingFactor(this.ian),this.rootContainer=new y(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext);}catch(t){throw Y.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(n=>n.mID));ge(new Ir(`CE Trigger Displayed`,t,this.triggerContext.triggerData));document.dispatchEvent(new CustomEvent(`letscooee:outbound:popup-activities`,{detail:{action:`DISPLAYED`}}));}sendTriggerClosed(t){let e=t.eventName;delete t.eventName;let r=new Ir(e,t,this.triggerContext.triggerData);r.name===`CE Trigger Clicked`&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(n=>n.toEmbed())),ge(r);}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500});}renderElement(t,e,r){e instanceof Ur?new F(t,e,r).render():e instanceof Fr?new O(t,e,r).render():e instanceof wt?new f(t,e,r).render():e instanceof Br?new N(t,e,r).render():e instanceof et?new T(t,e,r).render():e instanceof Wt?new v(t,e,r).render():e instanceof Lr?new k(t,e,r).render():e instanceof Mr?new B(t,e,r).render():Y.error(`Unsupported element type- `+e.type);}renderContainer(t){let e=this.ian?.cont;e&&(this.containerHTMLElement=new P(this.rootContainer,e,t).render().getHTMLElement(),new w().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t);}),this.addEnterAnimation(this.ian.anim));}closeInApp(t){let e=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),o.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(e,{duration:500,easing:`ease-in-out`});r.onfinish=()=>{this.removeInApp(),window.removeEventListener(`resize`,this.resizeListener);};}screenResized(){this.removeInApp(),this.startRendering();}removeInApp(){let t=document.querySelector(`.${this.triggerContext.rootClassName}`);t&&t.parentElement.removeChild(t);}skipTrigger(t,e){ge(new Ir(`CE Campaign Rejected`,e,t));}async preloadImages(t){let e=t.ian;if(!e)return;let r=[];e.elems.forEach(n=>{let c=n.bg?.img?.src;if(c&&r.push(c),n.t===1){let m=n.src;if(!m)return;r.push(m);}}),e.bg?.img?.src&&r.push(e.bg.img.src),e.cont.bg?.img?.src&&r.push(e.cont.bg.img.src),await Promise.all(r.map(n=>A(n)));}};
|
|
4
|
+
|
|
5
|
+
export { D as FreeformRenderer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './main.min.js';
|
|
2
|
-
import { h as g, j as W, G as Ge, K as Ke, o as of, y as ye, k as Ka, u as uv, J as Ja, S as Sf, D as Df } from './widgets-
|
|
3
|
-
import { l, f } from './video-detail-dialog.component-
|
|
2
|
+
import { h as g, j as W, G as Ge, K as Ke, o as of, y as ye, k as Ka, u as uv, J as Ja, S as Sf, D as Df } from './widgets-C7lA7XGj-BrnR9z4Y.js';
|
|
3
|
+
import { l, f } from './video-detail-dialog.component-By05qzvB-CUXamE8p.js';
|
|
4
4
|
|
|
5
5
|
var _=class d{dialogRef=g(W);eventData=g(Ge);triggerData=g(Ke)().triggerData;onShareAndClose(p,o){p.stopPropagation();let{url:t,text:a}=l(this.triggerData,this.eventData.video,o!==`Clipboard`);switch(o){case `Whatsapp`:window.open(`https://wa.me/?text=${a}%20${t}`,`_blank`,`noopener,noreferrer`);break;case `X(Twitter)`:window.open(`https://x.com/intent/post?text=${a}&url=${t}`,`_blank`,`noopener,noreferrer`);break;case `Clipboard`:navigator.clipboard.writeText(t).catch(()=>{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e);});break;}o&&f(this.triggerData,this.eventData.video,this.eventData.index,o),this.dialogRef.close();}static ɵfac=function(o){return new(o||d)};static ɵcmp=of({type:d,selectors:[[`cooee-share-dialog`]],decls:19,vars:0,consts:[[1,`share-dialog`],[1,`share-dialog-header`],[`type`,`button`,`aria-label`,`Close`,1,`close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`],[1,`share-options`],[`type`,`button`,`aria-label`,`Share on WhatsApp`,1,`share-option`,3,`click`],[`name`,`whatsapp`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Share on X`,1,`share-option`,3,`click`],[`name`,`x-twitter`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Copy link`,1,`share-option`,3,`click`],[`name`,`copy`,`aria-hidden`,`true`]],template:function(o,t){o&1&&(Ka(0,`div`,0)(1,`div`,1)(2,`h3`),uv(3,`Share`),Ja(),Ka(4,`button`,2),Sf(`click`,function(e){return t.onShareAndClose(e)}),Df(5,`cooee-icon`,3),Ja()(),Ka(6,`div`,4)(7,`button`,5),Sf(`click`,function(e){return t.onShareAndClose(e,`Whatsapp`)}),Df(8,`cooee-icon`,6),Ka(9,`span`),uv(10,`Whatsapp`),Ja()(),Ka(11,`button`,7),Sf(`click`,function(e){return t.onShareAndClose(e,`X(Twitter)`)}),Df(12,`cooee-icon`,8),Ka(13,`span`),uv(14,`X`),Ja()(),Ka(15,`button`,9),Sf(`click`,function(e){return t.onShareAndClose(e,`Clipboard`)}),Df(16,`cooee-icon`,10),Ka(17,`span`),uv(18,`Copy link`),Ja()()()());},dependencies:[ye],styles:[`@keyframes _ngcontent-%COMP%_slideInScale{0%{opacity:0;transform:scale(.9) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.share-dialog[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:20px;min-width:280px;box-shadow:0 8px 32px #00000026;color:#333;animation:_ngcontent-%COMP%_slideInScale .25s ease-out}.share-dialog-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.share-dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-family:var(--lc-heading-family),serif;margin:0;font-size:18px;font-weight:600}.share-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;font-family:var(--lc-text-family),serif}.share-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#0002;border:1px solid #e9ecef;border-radius:8px;color:#333;font-size:16px;font-weight:500;cursor:pointer;transition:all .2s ease}.share-option[_ngcontent-%COMP%]:hover{background:#0004;border-color:#dee2e6;transform:translateY(-1px)}.share-option[_ngcontent-%COMP%]:active{transform:translateY(0)}.share-option[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{width:24px;height:24px}.share-option[_ngcontent-%COMP%] cooee-icon[name=whatsapp][_ngcontent-%COMP%]{color:#25d366}.share-option[_ngcontent-%COMP%] cooee-icon[name=x-twitter][_ngcontent-%COMP%], .share-option[_ngcontent-%COMP%] cooee-icon[name=copy][_ngcontent-%COMP%]{color:#000}.share-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;text-align:left}button.close-button[_ngcontent-%COMP%]{background-color:transparent;border:none}button.close-button[_ngcontent-%COMP%] cooee-icon[name=close][_ngcontent-%COMP%]{border-radius:100%;color:#000}`]})};
|
|
6
6
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { I as Ir, V as Ve, H as He, _ as _r, M, U as Ue, T as Te$1, l as l$1, O, a as Bi, f as fe, Y, b as V } from './main.min.js';
|
|
2
|
+
import { l as Mt, h as g, m as Ye, n as Se$1, G as Ge, j as W, o as of, L as Lt, N as Nt, B as Bt, p as TE, q as wE, r as jt, R as Rt, y as ye, k as Ka, S as Sf, s as ec, w as wD, $ as $o, J as Ja, t as lf, v as jD, x as yf, c as ud, _ as _D, z as nc, A as Rf, C as xf, E as $b, F as Ro, K as Ke, O as Ft, D as Df, U as Ub, P as Cs, V as Vo, X as Xa, H as Ho, Q as rc, Z as mf, a0 as ND, a1 as vD, a2 as fu, a3 as pu, a4 as kD, a5 as ED, a6 as Ef, a7 as gv, a8 as Zf, a9 as qf, aa as fv, ab as Sv, ac as Kg } from './widgets-C7lA7XGj-BrnR9z4Y.js';
|
|
3
|
+
|
|
4
|
+
var f=(t,e,o,r)=>{if(!e)return;let i=new Ir(`CE Video Shared`,{current:{videoID:e.id,videoIndex:o},platform:r},t);window.CooeeSDK.sendEvent(i);},l=(t,e,o=true)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n=`Hey! Check out this video for an amazing product -`;return {url:r,text:o?encodeURIComponent(n):n}},m=(t,e)=>{return Ve(He(window.location.href,t),e)};
|
|
5
|
+
|
|
6
|
+
var S=class n{video=Ub.required();progress=Mt(0);constructor(){Cs(t=>{let e=this.video(),i=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,i),t(()=>{e.removeEventListener(`timeupdate`,i);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-video-progress-bar`]],inputs:{video:[1,`video`]},decls:3,vars:3,consts:[[1,`video-untracked-path`],[`role`,`progressbar`,1,`video-tracked-path`]],template:function(e,i){e&1&&(Vo(0,`div`,0)(1,`div`,1),Xa(2,`div`),Ho()()),e&2&&(ud(),rc(`width`,i.progress(),`%`),mf(`aria-valuenow`,i.progress()));},styles:[`[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%], .video-tracked-path[_ngcontent-%COMP%]{height:4px;border-radius:var(--lc-video-progress-bar-radius)}.video-untracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-bg-color));width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-color));transition:width .5s ease-in-out}@media(prefers-reduced-motion:reduce){.video-tracked-path[_ngcontent-%COMP%]{transition:none}}`]})};var P=class n{dialogState=$b();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Ft);async share(t){t.stopPropagation(),t.preventDefault(),M()&&V()?await this.shareNative():await this.shareWithDialog();}async shareNative(){let t=l(this.triggerData,this.eventData.video,false);await navigator.share(t),f(this.triggerData,this.eventData.video,this.eventData.index,`Native`);}async shareWithDialog(){let t=await import('./share-dialog.component-CD5Wee2q-C-vbcMRm.js');this.dialogState.emit(true),this.dialog.open(t.ShareDialogComponent,{viewContainerRef:this.containerRef}).closed.subscribe(()=>this.dialogState.emit(false));}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-share-button`]],outputs:{dialogState:`dialogState`},decls:2,vars:0,consts:[[`type`,`button`,`aria-label`,`Share video`,3,`click`],[`name`,`share`]],template:function(e,i){e&1&&(Ka(0,`button`,0),Sf(`click`,function(r){return i.share(r)}),Df(1,`cooee-icon`,1),Ja());},dependencies:[ye],styles:[`button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}button[_ngcontent-%COMP%] cooee-icon[name=share][_ngcontent-%COMP%]{color:#fff}`]})};var Te=[`swiperComp`],Ie=[`videoEl`],Se=(n,t)=>t.video.id,Pe=(n,t)=>t.url;function ke(n,t){n&1&&(Ka(0,`div`,11),Df(1,`div`,15),Ja());}function Me(n,t){if(n&1&&Df(0,`source`,13),n&2){let e=t.$implicit;yf(`type`,gv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Ef(0);}function Ne(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-promoted-items`,24),Sf(`cardClick`,function(o){fu(e);let r=kD(2).$implicit;return pu(kD().productCardClicked(o,r.video))}),Ja();}if(n&2){let e=kD(2).$implicit;yf(`items`,e.video.items);}}function ze(n,t){if(n&1&&Df(0,`cooee-video-card`,23),n&2){let e=kD(2).$implicit;yf(`card`,e.video.card);}}function Fe(n,t){if(n&1){let e=ND();Df(0,`cooee-video-progress-bar`,16),Ka(1,`div`,17)(2,`cooee-mute-toggle`,18),Zf(`mutedChange`,function(o){fu(e);let r=kD(2);return fv(r.muted,o)||(r.muted=o),pu(o)}),Sf(`toggled`,function(){fu(e);return pu(kD(2).muteToggled())}),Ja(),lf(3,Oe,1,0,`ng-container`,8),Ja(),Ka(4,`div`,19)(5,`cooee-share-button`,20),Sf(`dialogState`,function(o){fu(e);return pu(kD(2).shareDialogOpen.set(o))}),Ja()(),Ka(6,`div`,21),vD(7,Ne,1,1,`cooee-video-promoted-items`,22)(8,ze,1,1,`cooee-video-card`,23),Ja();}if(n&2){let e=kD().$implicit,i=jD(5),o=kD(),r=jD(9);yf(`video`,i),ud(2),qf(`muted`,o.muted),yf(`videoEl`,i),ud(),yf(`ngTemplateOutlet`,r),ud(4),ED(e.video.items.length&&o.videoConfig.showItems()?7:e.video.card&&o.videoConfig.footerContent===o.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=ND();Ka(0,`cooee-item-detail`,25),Sf(`closeClick`,function(){fu(e);return pu(kD(2).productModalClosed())}),Ja();}if(n&2){let e=kD(2);yf(`item`,e.selectedItem)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Re(n,t){if(n&1){let e=ND();Ka(0,`div`,6)(1,`div`,9)(2,`div`,10),vD(3,ke,2,0,`div`,11),Ka(4,`video`,12,2),Sf(`click`,function(){let o=fu(e).$index,r=kD();return pu(r.currentIndex===o&&r.toggleMute())})(`ended`,function(){fu(e);let o=jD(5);return pu(kD().onVideoEnded(o))})(`loadstart`,function(){let o=fu(e).$index;return pu(kD().onVideoLoadStart(o))})(`canplay`,function(){let o=fu(e).$index;return pu(kD().onVideoCanPlay(o))}),wD(6,Me,1,3,`source`,13,Pe),Ja(),vD(8,Fe,9,5),Ja(),vD(9,Le,1,3,`cooee-item-detail`,14),Ja()();}if(n&2){let e=t.$implicit,i=t.$index,o=kD();ud(2),rc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),ud(),ED(o.shouldShowVideoSpinner(i)?3:-1),ud(),yf(`ngClass`,o.viewTemplateClassName)(`muted`,true),mf(`preload`,o.isVideoVisible(i)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),ud(2),_D(e.video.sources),ud(2),ED(o.currentIndex===i?8:-1),ud(),ED(o.selectedItem&&o.currentIndex===i?9:-1);}}function Ae(n,t){n&1&&Ef(0);}function Be(n,t){if(n&1){let e=ND();Ka(0,`button`,26),Sf(`click`,function(){fu(e);return pu(kD().close())}),Df(1,`cooee-icon`,27),Ja();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=_r;currentIndex=0;muted=Mt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=Mt(false);data=g(Ye);elementRef=g(Se$1);eventData=g(Ge);dialogRef=g(W);swiperInitialized=Mt(false);swiperOptions=Mt(null);videoEntries=[];videoConfig;triggerContext;engagementTrigger;isMobile=M();navigationConfig;cssLoadedPromise;resizeDebouncer=new Ue(this.onResize.bind(this));videoLoadingStates=new Map;constructor(){this.videoEntries=this.data.videoEntries,this.currentIndex=this.data.currentIndex,this.selectedItem=this.data.selectedItem??null,this.selectedVideo=this.videoEntries[this.currentIndex]?.video,this.triggerContext=this.data.triggerContext,this.engagementTrigger=this.triggerContext.triggerData,this.videoConfig=this.engagementTrigger?.content?.videoConfig??new Te$1,this.navigationConfig=new l$1({enabled:true,size:50,color:new O({h:`#000000`})}),this.cssLoadedPromise=Bi(this.elementRef.nativeElement.shadowRoot);}onKeyDown(t){t.preventDefault(),t.stopPropagation(),this.close();}async ngOnInit(){switch(this.muted.set(await fe.get(`muted`,false)),this.videoConfig.detailPopup.template){case `PRODUCT_DETAIL_VIEW`:this.selectItemForDetailView(),this.viewTemplateClassName=`lc-product-detail-view`;break;case `VIDEO_ONLY_VIEW`:this.viewTemplateClassName=`lc-video-only-view`;break}}ngAfterViewInit(){this.initializeSwiperWithVideoDimensions();}ngOnDestroy(){this.resizeDebouncer?.destroy();}initializeSwiperWithVideoDimensions(){this.applyOptimalVideoDimensions(),this.initSwiperOptions(),this.playActiveVideo(false);}close(){let t=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:this.videoEntries[this.currentIndex].video,lastVideoIndex:this.currentIndex,lastVideoDuration:t?.currentTime});}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperComponent.swiper.slideTo(this.currentIndex+1);}productModalClosed(){this.selectedItem=null;}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause());}toggleMute(){this.muted.update(t=>!t);}async muteToggled(){await fe.set(`muted`,this.muted());let e=[this.muted()?`CE Video Muted`:`CE Video Unmuted`,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e);}playActiveVideo(t=true){t&&this.pauseAll();let e=this.getCurrentVideoElement();e&&this.playVideo(e);}playVideo(t){t.currentTime=0,t.play().catch(e=>Y.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let i=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),this.playVideo(t);}}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.selectedVideo=this.videoEntries[this.currentIndex].video,this.eventData.video=this.selectedVideo,this.eventData.index=this.currentIndex,this.playActiveVideo(),this.isProductDetailView()?this.selectItemForDetailView():this.selectedItem=null;let r=new Ir(`CE Video Changed`,{previous:e,current:this.currentVideoProps()},this.engagementTrigger);r.setVideos(this.videoEntries[this.currentIndex].video),window.CooeeSDK.sendEvent(r);}productCardClicked(t,e){let o=new Ir(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);o.setVideos(e),window.CooeeSDK.sendEvent(o),this.selectedItem=t;}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}shouldShowVideoSpinner(t){return this.swiperInitialized()?this.videoLoadingStates.get(t)===true&&this.isVideoVisible(t):this.isVideoVisible(t)}isVideoVisible(t){let e=this.currentIndex-1,i=this.currentIndex+1;return t===this.currentIndex||t===e||t===i}async initSwiperOptions(){await this.cssLoadedPromise;let t=this.isMobile?1:`auto`,e=0;this.isProductDetailView()&&(t=`auto`,e=10),this.swiperOptions.set({direction:this.isMobile?`vertical`:`horizontal`,effect:this.isMobile?`slide`:`coverflow`,slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:true,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:false},on:{init:i=>{this.swiperInitialized.set(true),setTimeout(()=>{i.update();},100);}},mousewheel:{enabled:!this.isMobile,invert:false,thresholdDelta:20}});}isProductDetailView(){return this.videoConfig.detailPopup.template===`PRODUCT_DETAIL_VIEW`}currentVideoProps(){return {videoID:this.videoEntries[this.currentIndex].video.id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let i=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/i).toFixed(4),t}selectItemForDetailView(){this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null;}applyOptimalVideoDimensions(){if(this.isMobile||this.isProductDetailView())return;let t=this.calculateOptimalVideoDimensions();t&&this.setVideoContainerDimensions(t.width,t.height);}calculateOptimalVideoDimensions(){let t=this.videoEntries.map(u=>u.video.sources?.[0]).filter(u=>u?.width&&u?.height).map(u=>({width:u.width,height:u.height,aspectRatio:u.width/u.height}));if(t.length===0)return null;let e=t[0],i=window.innerWidth*.9,o=window.innerHeight*.9,r=i/e.width,k=o/e.height,A=Math.min(r,k);return {width:Math.floor(e.width*A),height:Math.floor(e.height*A)}}setVideoContainerDimensions(t,e){let i=this.elementRef.nativeElement;i.style.setProperty(`--video-container-width`,`${t}px`),i.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,i){if(e&1&&nc(Te,7)(Ie,5),e&2){let o;Rf(o=xf())&&(i.swiperComponent=o.first),Rf(o=xf())&&(i.videoElements=o);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,i){e&1&&Sf(`keydown.escape`,function(r){return i.onKeyDown(r)},Kg);},decls:10,vars:4,consts:[[`swiperComp`,``],[`closeButtonTemplate`,``],[`videoEl`,``],[1,`lc-shadow-inner`,3,`ngClass`],[1,`video-swiper`,3,`slideChange`,`options`,`navigationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-slide`],[1,`lc-desktop-controls`],[4,`ngTemplateOutlet`],[1,`lc-video-modal-row`],[1,`lc-video-container`],[1,`video-loading-overlay`],[`playsinline`,``,1,`lc-video-el`,3,`click`,`ended`,`loadstart`,`canplay`,`ngClass`,`muted`],[3,`src`,`type`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`item`,`similarItems`,`template`],[1,`loading-spinner`],[3,`video`],[1,`lc-video-controls`],[3,`mutedChange`,`toggled`,`muted`,`videoEl`],[1,`share-controls`],[3,`dialogState`],[1,`lc-card-container`],[3,`items`],[3,`card`],[3,`cardClick`,`items`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`item`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,i){if(e&1&&(Ka(0,`div`,3)(1,`cooee-swiper`,4,0),Sf(`slideChange`,function(r){return i.onSlideChange(r)}),ec(3,5),wD(4,Re,10,10,`div`,6,Se),$o(),Ja(),Ka(6,`div`,7),lf(7,Ae,1,0,`ng-container`,8),Ja()(),lf(8,Be,2,0,`ng-template`,null,1,Sv)),e&2){let o=jD(9);yf(`ngClass`,i.viewTemplateClassName),ud(),yf(`options`,i.swiperOptions())(`navigationConfig`,i.navigationConfig),ud(3),_D(i.videoEntries),ud(3),yf(`ngTemplateOutlet`,o);}},dependencies:[Lt,Nt,Bt,P,S,TE,wE,jt,Rt,ye],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media(min-width:768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.video-swiper{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .video-swiper{align-items:center}@media(min-width:768px){.video-swiper{width:100%;height:100%;max-width:90vw;max-height:90vh}}.video-swiper>.swiper-wrapper{max-height:100%;pointer-events:none}.lc-product-detail-view .video-swiper>.swiper-wrapper{align-items:center}@media(max-width:768px){.video-swiper>.swiper-button-prev{display:none!important}}@media(max-width:768px){.video-swiper>.swiper-button-next{display:var(--lc-next-video-button-display)!important;width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent);color:#fff;inset:auto auto 12px 50%;transform:translate(-50%) rotate(90deg)}.video-swiper>.swiper-button-next:after{color:#fff;font-weight:900}}.video-swiper:has(cooee-item-detail)>.swiper-button-next{display:none!important}.video-slide{position:relative;display:flex;align-items:center;visibility:hidden;pointer-events:auto}.lc-product-detail-view .video-slide{width:40vw!important;height:70vh!important}@media(min-width:768px){.lc-product-detail-view .video-slide{min-width:650px!important}}@media(max-width:768px){.lc-product-detail-view .video-slide{width:100%!important;height:100%!important}}@media(min-width:768px){.lc-video-only-view .video-slide{width:fit-content!important}}@media(min-width:768px){.video-slide{border-radius:var(--lc-media-radius);overflow:hidden}}.video-slide.swiper-slide-active,.video-slide.swiper-slide-prev,.video-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;position:relative;z-index:3}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media(max-width:768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}@media(min-width:768px){.lc-video-controls .lc-close-button{display:none}}.share-controls{position:absolute;bottom:30%;right:.5rem;z-index:10;display:flex;gap:.25rem;flex-direction:column;justify-content:center;align-items:center}.lc-close-button{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}.lc-video-container{position:relative;height:100%;width:100%;background:#000000b3 no-repeat center;background-size:cover}@media(min-width:768px){.lc-product-detail-view .lc-video-container{width:50%}}@media(min-width:768px){.lc-video-only-view .lc-video-container{width:var(--video-container-width, 100%);height:var(--video-container-height, 100%)}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media(max-width:768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-item-detail{--header-display: none;width:50%;flex:1}@media(max-width:768px){.lc-product-detail-view cooee-item-detail{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-item-detail{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute;border-radius:var(--lc-card-radius) var(--lc-card-radius) 0 0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.video-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#0000004d;z-index:2}.video-loading-overlay .loading-spinner{width:30px;height:30px;border:3px solid rgba(255,255,255,.3);border-top:3px solid #fff;border-radius:50%;animation:spin 1s linear infinite}
|
|
7
|
+
`],encapsulation:3})};
|
|
8
|
+
|
|
9
|
+
var videoDetailDialog_componentBy05qzvB = /*#__PURE__*/Object.freeze({
|
|
10
|
+
__proto__: null,
|
|
11
|
+
VideoDetailDialogComponent: Ee
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { f, l, videoDetailDialog_componentBy05qzvB as v };
|