<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{a as ie,b as Te,c as ae,d as We}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-MC3FK4BP.js";import{a as K,b as ze,f as ee,h as He,i as te,j as oe,k as Oe}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-6SN6DWC7.js";import{a as re,b as _e}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-KFUUPBSI.js";import{a as Ve}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-XHCGEJX3.js";import{a as Q,b as De}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-XICOHT3V.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-P4R5UOYU.js";import{a as J,g as Me}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-CF2ZIFBU.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-Z3S4VKGU.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-V73BMVKS.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-IKFJ363R.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-GUT36SRF.js";import{a as s,b as Z}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-WTRLUTDC.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-2UWRKB54.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-L54LZFWJ.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-GJYANKFI.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-S2BNFCQK.js";import{r as k,v as A}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-YKQVM2R2.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-HNPQAQ5I.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-OYRY4DAN.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-V4QA7HID.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-UCBKAZP6.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-4YCREAZW.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-SGAEEZMY.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-77252CL3.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-EEP52L6K.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-463MRMYB.js";import{c as q}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-4M5XXQ4S.js";import{C as i,D as R,E as p}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-HRJSF4NK.js";import{a as Ee}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-LRTDJAGU.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-KIWSGWF7.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-SPBCO4Q4.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-WMZTKW3Q.js";import{b as W,c as Ue}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-YQV4XENG.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-NAUAUADT.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-5NAPE5TP.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-EUEMYWXP.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-PGL3AU4I.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-D543UXEU.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-GLOKZBLX.js";import"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-WNIIJ7B3.js";import{a as L,d as Re}from"https://st-p.rmcdn.net/ed98fd7a/dist/c/c-LGCVMNWZ.js";var Ae,Ze,ne,se=L(()=&gt;{"use strict";A();Z();p();Ae=e=&gt;i("svg",{width:64,height:64,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 4C0 1.79086 1.79086 0 4 0C6.20914 0 8 1.79086 8 4V60C8 62.2091 6.20914 64 4 64C1.79086 64 0 62.2091 0 60V4ZM56 28C56 25.7909 57.7909 24 60 24C62.2091 24 64 25.7909 64 28V36C64 38.2091 62.2091 40 60 40C57.7909 40 56 38.2091 56 36V28ZM46 18C43.7909 18 42 19.7909 42 22V42C42 44.2091 43.7909 46 46 46C48.2091 46 50 44.2091 50 42V22C50 19.7909 48.2091 18 46 18ZM28 16C28 13.7909 29.7909 12 32 12C34.2091 12 36 13.7909 36 16V48C36 50.2091 34.2091 52 32 52C29.7909 52 28 50.2091 28 48V16ZM18 6C15.7909 6 14 7.79086 14 10V54C14 56.2091 15.7909 58 18 58C20.2091 58 22 56.2091 22 54V10C22 7.79086 20.2091 6 18 6Z",fill:"#B8B8B8"})}),Ze=s.withComponent(k(Ae)`
      display: block;
    `),ne=Ze});var Xe,$e,le,de=L(()=&gt;{"use strict";A();Z();p();Xe=e=&gt;R("svg",{width:8,height:8,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[i("circle",{cx:6,cy:6,r:2,fill:"#282828"}),i("circle",{cx:2,cy:2,r:2,fill:"#282828"}),i("circle",{cx:2,cy:6,r:2,fill:"white"}),i("circle",{cx:6,cy:2,r:2,fill:"white"})]}),$e=s.withComponent(k(Xe)`
      display: block;
    `),le=$e});function je(e){let{model:{_id:m,w:n,h:u,basePath:l,numberOfImages:h,scrollSpeed:U=1,imageWidth:b=0,imageHeight:y=0,fixed_position:E,scrollStartPoint:M="bottom",playbackType:z,startPointOffset:C,scrollDelay:v,is_full_width:I,is_full_height:D,useEasing:B=!1,fileExtension:ue,pausable:fe,byStepSpeed:ge,byStepLoop:pe,byStepSpringLoop:he,firstFrameLambdaUrl:S},modelSave:be}=(0,o.useContext)(J),{model:{currentScrollOffset:H,hoverPercent:O,mouseIn:w,pageScale:V=1,viewport:Se,canDirectLinkBeUsed:we,pageContentTop:xe=0,magContainerHeight:ye=0,widgetBoxTop:Ce=0,isStarted:$=!1},model:N}=(0,o.useContext)(re),[{isUploading:x,files:G,url:P},f]=e.useSharedState?e.useSharedState():Ye,_=e.mode==="viewer",[ve,Ie]=(0,o.useState)(!1),[Y,Be]=(0,o.useState)(!1),j=(0,o.useRef)(null),c=(0,o.useRef)(null),Pe=c.current,T=(0,o.useRef)(null),g=T.current,Fe=(r,t)=&gt;{if(I||D)return{w:n,h:u};let d=r&lt;=480?r:Math.round(r*480/r),F=t*d/r;return{w:d,h:F}},Le=(0,o.useMemo)(()=&gt;{if(S){let r=new URL(S);return r.searchParams.append("w","40"),r.toString()}},[S]);(0,o.useEffect)(()=&gt;{l&amp;&amp;h&amp;&amp;(c.current=new ie(l,_?h:1,ue,()=&gt;{Be(!0),e.onAllImagesLoaded&amp;&amp;e.onAllImagesLoaded()}),c.current.preloadFirstImage(),T.current=new ae(j.current,c.current,z==="mousemove"?1:0),T.current.drawImageByIndex(0).then(()=&gt;{e.onFirstFrameLoaded&amp;&amp;e.onFirstFrameLoaded()}))},[l]);let[a,ke]=(0,o.useState)(null);return(0,o.useEffect)(()=&gt;{if(!a)return;let r=(t,d)=&gt;t===W.widget.defaults.w&amp;&amp;d===W.widget.defaults.h;be({basePath:a.basePath,imageWidth:a.imageWidth,imageHeight:a.imageHeight,numberOfImages:a.numberOfImages,fileExtension:a.fileExtension,totalSize:a.totalSize,firstFrameLambdaUrl:a.firstFrameLambdaUrl,...r(n,u)?Fe(a.imageWidth||n,a.imageHeight||n):{}})},[a]),(0,o.useEffect)(()=&gt;{let r=async()=&gt;{try{let t;if(P&amp;&amp;P.length)t=await ee(P,m);else{let{errorMsg:d,validated:F}=te(G);if(d||!F){f({isUploading:!1,uploadError:d}),setTimeout(()=&gt;alert(d),0);return}t=await oe(F,m)}t&amp;&amp;t.basePath&amp;&amp;t.imageHeight&amp;&amp;t.imageWidth&amp;&amp;t.numberOfImages&amp;&amp;t.totalSize&amp;&amp;!N.isDestroyed&amp;&amp;!ve?(ke({basePath:t.basePath,imageWidth:t.imageWidth,imageHeight:t.imageHeight,numberOfImages:t.numberOfImages,totalSize:t.totalSize,fileExtension:t.fileExtension,firstFrameLambdaUrl:t.firstFrameLambdaUrl}),f({isUploading:!1})):f({isUploading:!1,uploadError:"Error uploading video"})}catch{f({isUploading:!1,uploadError:"Error uploading video"})}};x&amp;&amp;(P||G)&amp;&amp;!N.isDestroyed&amp;&amp;r()},[x]),(0,o.useEffect)(()=&gt;{!_||!c.current||($?c.current.startLoad():c.current.stopLoad())},[$]),(0,o.useEffect)(()=&gt;{if(!Pe)return;let r;if(!_)g?.drawImageByIndex(0);else if(typeof H&lt;"u")r=Ge({currentScrollOffset:H,pageContentTop:xe,pageScale:V,magContainerHeight:ye,widgetBoxTop:Ce,scrollStartPoint:M,startPointOffset:C,scrollSpeed:U,scrollDelay:v,isFixed:!!E}),g?.drawImageByIndex(r,B);else if(typeof O&lt;"u")g?.drawImageByTimelinePercent(O,B);else if(typeof w&lt;"u")w&amp;&amp;g?.startDrawingByStep(h,{speed:ge,loop:pe,spring:he}),!w&amp;&amp;fe?g?.pauseDrawingByStep():w||g?.stopDrawingByStep();else return},[H,Se,n,u,O,w]),(0,o.useEffect)(()=&gt;(f({canDirectLinkBeUsed:we}),e.onFirstRender&amp;&amp;e.onFirstRender(),()=&gt;{Ie(!0)}),[]),R(s,{display:"flex",alignItems:"center",justifyContent:"center",backgroundRepeat:"no-repeat",css:q`
        label {
          position: absolute;
          cursor: default;
          z-index: 1001;
          width: 100%;
          height: 100%;
        }
      `,backgroundColor:e.mode!=="constructor"||l?"transparent":"lightGray",width:"100%",height:"100%",backgroundPosition:"center",className:"shots-cover",children:[!l&amp;&amp;e.mode==="constructor"&amp;&amp;!x&amp;&amp;i(s,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",children:i(ne,{})}),e.mode==="constructor"&amp;&amp;l&amp;&amp;i(s,{display:"flex",position:"absolute",zIndex:1e3,backgroundImage:`url(${le})`,backgroundRepeat:"repeat",width:"100%",height:"100%",opacity:.4}),e.mode==="constructor"&amp;&amp;i(K,{id:`rm-shots-widget-file-upload-${m}`,onClick:r=&gt;{r.preventDefault()},readFileData:!1,onChangeMultiple:r=&gt;{f({files:r,isUploading:!0})},position:"absolute",zIndex:1001,dropFile:!x,accept:"image/png, image/jpeg, video/*, .mkv",multiple:!0}),x&amp;&amp;i(s,{display:"flex",position:"absolute",top:"50%",left:"50%",cursor:"default",transform:"translate(-50%, -50%)",children:i(Q,{bgColor:"gray",size:"big"})}),i("canvas",{id:m,width:e.mode==="constructor"||V&gt;1?b:Math.min(b,Math.floor(n*ce)),height:e.mode==="constructor"||V&gt;1?y:Math.min(y,Math.floor(u*ce)),ref:j,style:{objectFit:"cover",userSelect:"none",width:"100%",height:"100%",zIndex:1e3,...Y||!S?{opacity:1,visibility:e.mode==="constructor"?"inherit":"visible"}:{opacity:0,visibility:e.mode==="constructor"?"inherit":"hidden"}},children:"Your browser does not support Canvas element"})," ",S&amp;&amp;!Y&amp;&amp;i(s,{position:"absolute",left:"0",right:"0",bottom:"0",top:"0",zIndex:1001,backgroundImage:`url(${Le})`,backgroundPosition:"center",backgroundSize:"cover",backgroundRepeat:"no-repeat",filter:"blur(5px)"})]})}var o,ce,Ne,me,Ge,Ye,qe,X=L(()=&gt;{"use strict";o=Re(Ee());Z();De();ze();se();Me();Te();Ve();He();Ue();We();_e();Oe();de();A();p();ce=window.devicePixelRatio||1,Ne={top:1,center:.5,bottom:0},me=10,Ge=({currentScrollOffset:e,pageContentTop:m,pageScale:n,magContainerHeight:u,widgetBoxTop:l,scrollStartPoint:h,startPointOffset:U,scrollSpeed:b,scrollDelay:y,isFixed:E})=&gt;{let M=m/n,z=u/n,C=e/n;if(E)return Math.round((C-y)*b/me);let v=l+M,I=v-z,D=Ne[h],B=D*(v-I)+I+U;return Math.round((C-B)*b/me)},Ye=[{},()=&gt;{}];qe=je});var Je=L(()=&gt;{X();X()});Je();export{qe as Shots};
</pre></body></html>