react-covideo-embed 1.0.83-flow.0 → 1.0.85
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/build/index.js +139 -143
- package/build/index.js.map +1 -1
- package/build/react-covideo-embed.esm.js +1376 -1377
- package/build/react-covideo-embed.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/index.js +0 -4567
- package/dist/index.js.map +0 -1
- package/dist/lib/api/analytics/utils.d.ts +0 -1
- package/dist/react-covideo-embed.css +0 -1
- package/dist/react-covideo-embed.esm.js +0 -18407
- package/dist/react-covideo-embed.esm.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),we=require("react-query"),so=require("axios"),p=require("react"),Gs=require("react-resize-detector"),Ue=require("dayjs"),Ys=require("dayjs/plugin/utc"),Qs=require("dayjs/plugin/timezone"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),we=require("react-query"),so=require("axios"),p=require("react"),Gs=require("react-resize-detector"),Ue=require("dayjs"),Ys=require("dayjs/plugin/utc"),Qs=require("dayjs/plugin/timezone"),de=require("react-router-dom"),Zs=require("file-saver"),n=require("styled-components"),Ks=require("jwt-decode"),Q=require("react-icons/md"),F=require("react-covideo-common"),H=require("react-i18next"),Gt=require("lodash"),Ti=require("react-icons/ai"),ki=require("react-covideo-ai-assist"),be=require("react-icons/io"),rt=require("react-router"),Ii=require("react-icons/bs"),Ai=require("color-convert"),$i=require("react-full-screen"),Xs=require("react-select/creatable"),Qe=require("react-select"),ct=require("i18next"),Js=require("react-icons/bi"),Ri=require("react-icons/io5"),Ae=require("formik"),ea=require("yup"),Jt=require("react-compound-slider"),zo=require("react-beautiful-dnd"),Bo=require("react-spinners"),_o=require("rc-progress/lib"),ln=require("recordrtc"),jo=require("react-icons/fa"),ta=require("rc-progress"),oa=require("react-scroll"),dn=require("@mediapipe/tasks-vision"),ra=require("react-dropzone"),na=require("react-infinite-scroll-component"),ia=require("js-cookie"),un=require("droplr-api");require("react-covideo-ai-assist/dist/react-covideo-ai-assist.css");function Vi(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const I=Vi(p),Ve=Vi(ea),Li="React-Covideo-Embed-Version",br={default:"https://api-sandbox.covideo.com/",development:"https://localhost:3000/api/",sandbox:"https://api-sandbox.covideo.com/",staging:"https://api-staging.covideo.com/",production:"https://api.covideo.com/"};var Fe=(e=>(e.jwt="react-covideo-embed-jwt",e.merge="react-covideo-merge",e.recordSettings="record_settings",e.recordError="react-covideo-record-error",e))(Fe||{});let _e=localStorage.getItem("react-covideo-embed-jwt"),Mt=br.default,gt;const Eo=(e,o=!1)=>{o||localStorage.setItem("react-covideo-embed-jwt",e),_e=e,oe.defaults.headers.Authorization=`Bearer ${_e}`,Mr.headers.Authorization=`Bearer ${_e}`},sa=e=>{Mt=br[e]||br.default,oe.defaults.baseURL=Mt},aa=e=>{gt=e,oe.defaults.headers.ApiKey=gt,Mr.headers.ApiKey=gt};let Mr={headers:{Authorization:`Bearer ${_e}`,...gt!==void 0?{ApiKey:gt}:{},[Li]:"1.0.85"}};const oe=so.create({baseURL:Mt,headers:{"Content-Type":"application/json",Authorization:`Bearer ${_e}`,...gt!==void 0?{ApiKey:gt}:{},[Li]:"1.0.85"}});Ue.extend(Ys);Ue.extend(Qs);const Mi=e=>e&&(Object.keys(e).forEach(o=>{if(typeof e[o]=="object")return Mi(e[o]);typeof e[o]!="boolean"&&(e[o]=""+e[o])}),e),pn=(e,o=30)=>{const r=Math.floor(e/3600),i=Math.floor((e-r*3600)/60);let s=e-r*3600-i*60;const c=parseInt((s%1).toFixed(3).substring(2));let a=parseInt(Math.floor(c/(1e3/o)).toFixed(0));if(s=parseInt(Math.floor(s).toFixed(0)),isNaN(i))return"00:00:00:00";let d="";return r<10&&(d="0"),d+=r+":",i<10&&(d+="0"),d+=i+":",s<10&&(d+="0"),d+=s+":",a<10&&(d+="0"),d+a},Dt=(e,o=1)=>{const r=Math.floor(e/3600),i=Math.floor((e-r*3600)/60),s=e-r*3600-i*60;if(isNaN(i))return"00:00.0";let c="";return i<10&&(c+="0"),c+=i+":",s<10&&(c+="0"),c+=s.toFixed(o),c},Di=(e,o)=>e.userId+"_"+e.customerId+"_"+(Math.random()+1).toString(36).substring(2)+"."+o,ca=()=>{const e=Ue(new Date).date();let o="th";return e===1||e===21||e===31?o="st":e===2||e===22?o="nd":(e===3||e===23)&&(o="rd"),Ue(new Date).format(`MMM D[${o}] YYYY @ h:mm A`)},la=(e,o,r="YYYY-MM-DD HH:mm:ss")=>{const i=o.timeZone||Intl.DateTimeFormat().resolvedOptions().timeZone||Ue.tz.guess(),s=Ue(e,["M/DD/YYYY h:mm:ss A","M/DD/YYYY, h:mm:ss A","M/D/YYYY h:mm:ss A","M/D/YYYY, h:mm:ss A","MM/DD/YYYY"]),c=-Ue().tz("America/New_York").utcOffset(),a=Ue().tz(i).utcOffset(),d=s.add(c,"minute");return Ue(d).add(a,"minute").format(r)},da=(e,o,r)=>{const i=Array.from(e),[s]=i.splice(o,1);return i.splice(r,0,s),i},Oi=({trimStart:e,trimEnd:o,videoDuration:r})=>r===0||o===0?!1:e!==0||r-o>.3,Pt=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Uo=e=>(e/1e3).toFixed(2);function ua(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ni(){for(let e in Fe)localStorage.removeItem(Fe[e])}const pa=(e,o=1)=>{const r=Math.floor(e/60),i=e-r*60;if(isNaN(r))return"00.0";let s="";return r<10&&(s+="0"),s+=r+":",i<10&&(s+="0"),s+=i.toFixed(o),s};function Yt(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}const Pi=p.createContext({}),ha=n.createGlobalStyle`
|
|
2
2
|
* {
|
|
3
3
|
font-family: ${e=>e.$isCdk?"'Roboto', sans-serif":"'Work Sans', sans-serif"};
|
|
4
4
|
}
|
|
5
5
|
button span {
|
|
6
6
|
font-family: ${e=>e.$isCdk?"'Roboto', sans-serif!important":"'Work Sans', sans-serif"};
|
|
7
7
|
}
|
|
8
|
-
`,ga=({children:e,...o})=>{const{width:r,height:i,ref:s}=Gs.useResizeDetector({refreshMode:"debounce",refreshRate:100}),{token:c,env:a,onVideoInsert:d,onVideoInsertError:l,hideFeatures:u,apikey:g,onRecordButtonClick:h,onUploadButtonClick:
|
|
8
|
+
`,ga=({children:e,...o})=>{const{width:r,height:i,ref:s}=Gs.useResizeDetector({refreshMode:"debounce",refreshRate:100}),{token:c,env:a,onVideoInsert:d,onVideoInsertError:l,hideFeatures:u,apikey:g,onRecordButtonClick:h,onUploadButtonClick:x,onVideoRecorded:m,reRender:f,shouldTrackAnalytics:w,flow:b,previewVideoId:y}=o,S=Object.fromEntries(Object.values(cn).map(C=>[`show${ua(C)}Feature`,!(u!=null&&u.includes(C))]));a&&sa(a),g&&aa(g);const T=!!c;T&&Eo(c,T);const $=!!h||S.showRecordBothFeature||S.showRecordCamFeature||S.showRecordScreenFeature,k=!!x||S.showUploadFeature,L=S.showInsertFeature&&!!d,v=b||ft.FULL,j={token:c,env:a,onVideoInsert:d,onVideoInsertError:l,hasExternalJwt:T,containerWidth:r||0,containerHeight:i||0,...S,showRecordFeature:$,showInsertFeature:L,onRecordButtonClick:h,onUploadButtonClick:x,onVideoRecorded:m,showUploadFeature:k,reRender:f,whitelabel:o.whitelabel,shouldTrackAnalytics:!!w,flow:v,previewVideoId:y},R=(o==null?void 0:o.whitelabel)||"branding",V=(o==null?void 0:o.whitelabel)==="cdk";return t.jsxs(Pi.Provider,{value:j,children:[t.jsx(ha,{$isCdk:V}),t.jsx(F.CovideoThemeProvider,{themeName:R,additionalStyles:{themeName:R,isCdkEnviroment:V,containerWidth:r,containerHeight:i},children:t.jsx("div",{ref:s,children:e})})]})},Ce=()=>{const e=p.useContext(Pi);if(!e)throw new Error("useConfigurationContext must be used within ConfigurationProvider");return e},ma=async()=>{const{data:e}=await oe.get("/auth/user");return e},_t={EMPTY:"",COMPANY:"Company",PRIMARY:"Primary",PRIVATE:"Private",VAULT:"Vault",VIDEO_REPLIES:"Video Replies",VEHICLE_WALKAROUNDS:"Vehicle Walkarounds",APPOINTMENT_REMINDERS:"Appointment Reminders",INTRODUCTIONS:"Introductions",POST_SALE_THANK_YOU:"Post - Sale Thank You"},xa=-1,fa="~~shared~~",Be={value:"_all",label:"All folders"},va=async()=>{const{data:e}=await oe.get("/folders/new?getShared=true"),o=e&&e.folders||[];return o.push({folderId:Be.value,name:Be.label,isDeletable:!1}),o},ba=async e=>{var a,d;const r={start:(e.page||0)*(e.size||10),limit:e.size,search:e.search,folder:e.folder},{data:i}=await oe.get("/videos",{params:r}),s=((a=i==null?void 0:i.data)==null?void 0:a.videos)||(i==null?void 0:i.videos)||[];return{count:((d=i==null?void 0:i.data)==null?void 0:d.count)||(i==null?void 0:i.count)||0,videos:s}},To=async e=>(await oe.get(`/videos/${e}`)).data,wa=async({videoIds:e,deleteMultiple:o,companyVideos:r})=>{let i={isCompanyVideo:r},s=`/videos/${e[0]}`;return(await oe.delete(s,{data:i})).data},ya=async e=>(await oe.post("/videos/merge",e)).data,Ca=async({videoId:e,videoBody:o})=>({video:(await oe.put(`/videos/${e}`,o)).data}),Fi=async(e,o)=>(await oe.put(`/videos/${e}/trim`,o)).data,Sa=async(e,o)=>{const r=await oe.get(`/videos/${e}/download`,{responseType:"blob"});return Zs.saveAs(new Blob([r.data],{type:"video/mp4"}),o)},ja=async e=>(await oe.put(`/videos/${e}/move`,{videoId:e,copy:!0,videoFolder:_t.PRIMARY})).data,Ea=async e=>(await oe.post(`/videos/${e}/transcripts/start`)).data,Dr=async e=>(await oe.get("/inventory",{params:e})).data,Ta=async({data:e})=>(await oe.post("/video-requests",e)).data,ka=async e=>(await oe.post("/aws/signedurl/voiceover-audio",e)).data,Ia=async({data:e})=>(await so.put(e.uploadURL,e.file,{headers:{"Content-Type":e.mimeType}})).data,Aa=async({videoId:e,audioFileName:o,newVideoTitle:r="",overwriteOriginal:i=!1})=>(await oe.post(`/videos/${e}/voiceover`,{newVideoTitle:r,audioFileName:o,overwriteOriginal:i})).data,st={all:[],user:[]},$a=async({page:e=0,size:o=50,search:r="",all:i=!1,sort:s,refresh:c=!0})=>{var u,g;const d={start:e*o,limit:o,search:r,sort:s,all:""};if(i&&(d.all="true"),!c){if(i&&((u=st==null?void 0:st.all)!=null&&u.length))return st.all;if(!i&&((g=st==null?void 0:st.user)!=null&&g.length))return st.user}const l=await oe.get("/video-tags",{params:d});return i?st.all=l.data:st.user=l.data,l.data},hn=async e=>{const r={start:((e.page||1)-1)*(e.limit||12),limit:e.limit,search:e.search,year:e.year},{data:i}=await oe.get("/wtv",{params:r}),s=i&&i.count||0,c=i&&i.videos||[];return{count:s,videos:c}},Ra=async e=>{const o={title:e.title,flvName:e.flvName,wtvId:parseInt(e.wtvId.toString(),10),animatedGifPath:e.animatedGifPath,notes:e.year+";"+e.make+";"+e.model+";"+e.title};return(await oe.post("/wtv/videos",o)).data},Va=async({page:e=0,size:o=10,search:r,sort:i,filterByDepartment:s=!1})=>{const c={start:e*o,limit:o,search:r,sort:i,filterByDepartment:s},{data:a}=await oe.get("/video-attributes",{params:c}),d=a&&a.videoAttributes||[];return{count:a&&a.count||0,attributes:d}},La=async(e,o)=>({videoAttributes:(await oe.put(`/videos/${e}/video-attributes`,o)).data}),Ma=async e=>{if(!e)throw new Error("Invalid url");return(await oe.patch(`/playback/${e}/view`)).data},Da=()=>we.useMutation(Ma),Oa=async({data:e,shortUrl:o})=>(await oe.put(`/playback/${o}/hotspot`,e)).data,Na=()=>we.useMutation(Oa),Pa={all:()=>["ANALYTICS"],shortUrl:e=>["VIDEO_SHORT_URL",e]},Fa=async e=>(await oe.get(`/playback/shortUrl/${e}`)).data,za=(e,o)=>we.useQuery(Pa.shortUrl(e),()=>Fa(e),{enabled:o&&!!e,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),Ba=e=>I.createElement("svg",{width:133,height:33,viewBox:"0 0 133 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M48.4811 22.7098C44.7502 22.7098 42.0752 20.0065 42.0752 16.208C42.0752 12.3628 44.8206 9.65956 48.6219 9.65956C51.0857 9.65956 53.268 10.8947 54.2301 12.8755L53.0803 13.528C52.2355 11.9667 50.5695 10.9413 48.6219 10.9413C45.6653 10.9413 43.4831 13.1085 43.4831 16.208C43.4831 19.2608 45.5949 21.428 48.4811 21.428C50.4287 21.428 52.2121 20.3328 53.0099 18.8413L54.1597 19.5404C53.1507 21.4746 50.9215 22.7098 48.4811 22.7098Z",fill:"white"}),I.createElement("path",{d:"M61.8263 22.7331C58.0484 22.7331 55.303 19.8434 55.303 16.1847C55.303 12.5492 58.0484 9.65956 61.8263 9.65956C65.6042 9.65956 68.3496 12.5492 68.3496 16.1847C68.3496 19.8434 65.6042 22.7331 61.8263 22.7331ZM61.8263 21.4513C64.7829 21.4513 66.9417 19.121 66.9417 16.1847C66.9417 13.2717 64.7829 10.9413 61.8263 10.9413C58.8932 10.9413 56.7109 13.2717 56.7109 16.1847C56.7109 19.121 58.8932 21.4513 61.8263 21.4513Z",fill:"white"}),I.createElement("path",{d:"M78.8263 9.65956H82.8388L77.2776 22.4068H74.3914L68.8537 9.65956H72.9131L75.8932 17.4897L78.8263 9.65956Z",fill:"white"}),I.createElement("path",{d:"M85.617 8.35455C84.3734 8.35455 83.4113 7.42239 83.4113 6.18728C83.4113 4.95218 84.3969 4.02002 85.617 4.02002C86.8607 4.02002 87.8227 4.95218 87.8227 6.18728C87.8227 7.42239 86.8607 8.35455 85.617 8.35455ZM87.4473 22.4301H83.7633V9.65956H87.4473V22.4301Z",fill:"white"}),I.createElement("path",{d:"M98.9292 4.69583H102.613V22.4301H99.0465V21.0552C98.1783 22.0339 96.9581 22.7564 95.2217 22.7564C91.6316 22.7564 88.8862 19.9133 88.8862 16.0448C88.8862 12.1997 91.6316 9.33331 95.2217 9.33331C96.8877 9.33331 98.061 10.0091 98.9292 10.8947V4.69583ZM95.8318 19.4239C97.7794 19.4239 99.1169 17.9091 99.1169 16.0215C99.1169 14.1805 97.7794 12.6658 95.8318 12.6658C93.8842 12.6658 92.5467 14.1805 92.5467 16.0215C92.5467 17.9091 93.8842 19.4239 95.8318 19.4239Z",fill:"white"}),I.createElement("path",{d:"M117.413 15.7419C117.413 16.2546 117.366 16.7673 117.295 17.2799H107.839C108.238 18.6782 109.341 19.6802 111.335 19.6802C112.72 19.6802 114.315 19.1443 115.348 18.4451L116.803 20.9387C115.559 21.8708 113.565 22.7098 111.171 22.7098C106.361 22.7098 104.132 19.4938 104.132 16.0215C104.132 12.223 106.83 9.33331 110.913 9.33331C114.597 9.33331 117.413 11.687 117.413 15.7419ZM110.913 12.2929C109.411 12.2929 108.238 13.1785 107.816 14.6699H113.87C113.541 13.2251 112.462 12.2929 110.913 12.2929Z",fill:"white"}),I.createElement("path",{d:"M125.152 22.7797C120.999 22.7797 118.23 19.7502 118.23 16.0448C118.23 12.3395 120.999 9.31001 125.152 9.31001C129.329 9.31001 132.122 12.3395 132.122 16.0448C132.122 19.7502 129.329 22.7797 125.152 22.7797ZM125.152 19.3773C127.006 19.3773 128.438 17.9091 128.438 16.0215C128.438 14.1805 127.006 12.7124 125.152 12.7124C123.322 12.7124 121.891 14.1805 121.891 16.0215C121.891 17.9091 123.322 19.3773 125.152 19.3773Z",fill:"white"}),I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.438 25.0699V6.95488L8.33453 2.43408L0 10.7149V21.4334L8.33453 29.77L15.438 25.0699Z",fill:"#1C8578"}),I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.6235 15.8128L35.6432 15.765V10.7185L24.9183 0H10.791L8.33688 2.43765L24.6235 15.8128Z",fill:"url(#paint0_linear_11_13017)"}),I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.6235 15.8134L8.33688 29.7741L10.7233 32.16H24.9183L35.6432 21.4375V15.7656L24.6235 15.8134Z",fill:"#11A694"}),I.createElement("defs",null,I.createElement("linearGradient",{id:"paint0_linear_11_13017",x1:18.7201,y1:1.67911,x2:27.9868,y2:15.5693,gradientUnits:"userSpaceOnUse"},I.createElement("stop",{offset:.0483,stopColor:"#11A694"}),I.createElement("stop",{offset:1,stopColor:"#2FE0C7"})))),_a=n(Ba)`
|
|
9
9
|
max-height: 48px;
|
|
10
10
|
max-width: 200px;
|
|
11
11
|
`,Ua=e=>I.createElement("svg",{width:1024,height:219,viewBox:"0 0 1024 219",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M99.8311 97.6852V121.3H107.851C112.249 121.3 114.486 120.31 116.404 118.468C118.641 116.29 119.889 113.596 119.889 109.591C119.889 105.846 118.778 103.075 116.738 100.913C114.836 98.8728 112.599 97.6852 107.866 97.6852H99.8311Z",fill:"white"}),I.createElement("path",{d:"M109.449 0C49.0938 0 0 49.1166 0 109.5C0 169.883 49.0938 219 109.449 219C169.804 219 218.898 169.883 218.898 109.5C218.898 49.1166 169.804 0 109.449 0ZM58.4834 132.292C44.087 132.292 34.5452 122.03 34.5452 109.47C34.5452 96.9087 44.1479 86.7078 58.1486 86.7078C66.0316 86.7078 74.0516 89.7376 79.5758 94.0768L72.6667 101.568C68.6491 98.279 63.4597 96.3758 59.5791 96.3758C51.62 96.3758 46.4915 102.359 46.4915 109.53C46.4915 116.702 51.7569 122.685 59.8987 122.685C64.8902 122.685 70.0948 119.731 73.8994 116.169L80.8693 123.538C75.6799 128.136 67.9186 132.292 58.4529 132.292H58.4834ZM125.732 124.847C121.989 128.532 116.602 130.968 108.11 130.968H88.3262V88.0172H108.11C116.13 88.0172 122.05 90.2553 126.052 94.4575C129.735 98.3399 131.774 103.593 131.774 109.454C131.774 115.316 129.674 120.965 125.732 124.847ZM172.544 130.968L157.888 112.484L152.699 117.417V130.968H141.133V88.0172H152.699V104.125L169.591 88.0172H184.185L165.969 105.054L186.803 130.968H172.544Z",fill:"white"}),I.createElement("path",{d:"M988.664 158.418C981.983 158.418 975.962 156.923 970.6 153.933C965.326 150.855 961.151 146.678 958.074 141.401C954.998 136.037 953.459 129.925 953.459 123.065C953.459 116.118 954.998 110.006 958.074 104.729C961.151 99.4527 965.326 95.3194 970.6 92.3293C975.874 89.3393 981.895 87.8443 988.664 87.8443C995.52 87.8443 1001.59 89.3393 1006.86 92.3293C1012.22 95.3194 1016.4 99.4527 1019.39 104.729C1022.46 110.006 1024 116.118 1024 123.065C1024 129.925 1022.46 136.037 1019.39 141.401C1016.4 146.678 1012.22 150.855 1006.86 153.933C1001.5 156.923 995.432 158.418 988.664 158.418ZM988.664 150.107C993.674 150.107 998.113 149.008 1001.98 146.81C1005.85 144.523 1008.88 141.357 1011.08 137.312C1013.36 133.178 1014.51 128.43 1014.51 123.065C1014.51 117.613 1013.36 112.864 1011.08 108.818C1008.88 104.773 1005.85 101.651 1001.98 99.4527C998.113 97.1662 993.718 96.0229 988.796 96.0229C983.873 96.0229 979.478 97.1662 975.61 99.4527C971.743 101.651 968.666 104.773 966.381 108.818C964.095 112.864 962.953 117.613 962.953 123.065C962.953 128.43 964.095 133.178 966.381 137.312C968.666 141.357 971.743 144.523 975.61 146.81C979.478 149.008 983.829 150.107 988.664 150.107Z",fill:"white"}),I.createElement("path",{d:"M910.276 158.418C903.068 158.418 896.739 156.923 891.289 153.933C885.839 150.855 881.576 146.678 878.499 141.401C875.423 136.037 873.885 129.925 873.885 123.065C873.885 116.206 875.335 110.138 878.236 104.861C881.224 99.5846 885.268 95.4513 890.366 92.4613C895.552 89.3833 901.354 87.8443 907.771 87.8443C914.275 87.8443 920.033 89.3393 925.043 92.3293C930.141 95.2314 934.141 99.3647 937.042 104.729C939.942 110.006 941.393 116.118 941.393 123.065C941.393 123.505 941.349 123.989 941.261 124.516C941.261 124.956 941.261 125.44 941.261 125.967H881.005V118.976H936.251L932.559 121.746C932.559 116.733 931.46 112.292 929.262 108.423C927.153 104.465 924.252 101.387 920.56 99.1888C916.868 96.9903 912.605 95.891 907.771 95.891C903.024 95.891 898.761 96.9903 894.981 99.1888C891.201 101.387 888.256 104.465 886.147 108.423C884.037 112.38 882.982 116.909 882.982 122.01V123.461C882.982 128.737 884.125 133.398 886.411 137.444C888.784 141.401 892.036 144.523 896.168 146.81C900.387 149.008 905.177 150.107 910.539 150.107C914.759 150.107 918.67 149.36 922.274 147.865C925.966 146.37 929.131 144.083 931.768 141.005L937.042 147.073C933.965 150.767 930.097 153.581 925.439 155.516C920.868 157.451 915.813 158.418 910.276 158.418Z",fill:"white"}),I.createElement("path",{d:"M819.069 158.418C812.477 158.418 806.543 156.923 801.269 153.933C796.083 150.943 791.996 146.809 789.007 141.533C786.018 136.168 784.524 130.012 784.524 123.065C784.524 116.03 786.018 109.874 789.007 104.597C791.996 99.3207 796.083 95.2314 801.269 92.3293C806.543 89.3392 812.477 87.8442 819.069 87.8442C825.134 87.8442 830.54 89.2073 835.287 91.9335C840.122 94.6597 843.945 98.6611 846.758 103.938C849.659 109.126 851.109 115.502 851.109 123.065C851.109 130.54 849.703 136.916 846.89 142.192C844.077 147.469 840.254 151.514 835.419 154.329C830.672 157.055 825.222 158.418 819.069 158.418ZM819.729 150.107C824.651 150.107 829.046 149.008 832.914 146.809C836.869 144.523 839.946 141.357 842.143 137.312C844.429 133.178 845.572 128.43 845.572 123.065C845.572 117.613 844.429 112.864 842.143 108.818C839.946 104.773 836.869 101.651 832.914 99.4526C829.046 97.1661 824.651 96.0228 819.729 96.0228C814.894 96.0228 810.543 97.1661 806.675 99.4526C802.808 101.651 799.731 104.773 797.446 108.818C795.16 112.864 794.017 117.613 794.017 123.065C794.017 128.43 795.16 133.178 797.446 137.312C799.731 141.357 802.808 144.523 806.675 146.809C810.543 149.008 814.894 150.107 819.729 150.107ZM845.835 157.758V136.916L846.758 122.933L845.44 108.95V59.8786H854.801V157.758H845.835Z",fill:"white"}),I.createElement("path",{d:"M756.103 157.758V88.5038H765.464V157.758H756.103ZM760.849 73.2018C758.915 73.2018 757.289 72.5423 755.971 71.2231C754.652 69.904 753.993 68.3211 753.993 66.4743C753.993 64.6275 754.652 63.0885 755.971 61.8573C757.289 60.5382 758.915 59.8786 760.849 59.8786C762.783 59.8786 764.409 60.4942 765.728 61.7254C767.046 62.9566 767.705 64.4956 767.705 66.3423C767.705 68.2771 767.046 69.904 765.728 71.2231C764.497 72.5423 762.871 73.2018 760.849 73.2018Z",fill:"white"}),I.createElement("path",{d:"M694.572 157.758L653.698 65.4186H664.246L702.484 152.349H696.682L735.183 65.4186H745.072L704.198 157.758H694.572Z",fill:"white"}),I.createElement("path",{d:"M503.809 157.758V65.4186H521.477L560.769 130.584H551.408L590.04 65.4186H607.577L607.84 157.758H587.799L587.667 96.1544H591.359L560.505 147.996H550.88L519.368 96.1544H523.851V157.758H503.809Z",fill:"white"}),I.createElement("path",{d:"M406.852 157.758V65.4186H446.803C455.066 65.4186 462.186 66.7817 468.163 69.5079C474.14 72.1462 478.755 75.9717 482.007 80.9844C485.26 85.9971 486.886 91.9771 486.886 98.9246C486.886 105.784 485.26 111.72 482.007 116.733C478.755 121.658 474.14 125.439 468.163 128.077C462.186 130.716 455.066 132.035 446.803 132.035H418.718L428.212 122.669V157.758H406.852ZM465.526 157.758L442.452 124.252H465.262L488.6 157.758H465.526ZM428.212 125.043L418.718 115.018H445.616C452.209 115.018 457.131 113.611 460.384 110.797C463.636 107.895 465.262 103.937 465.262 98.9246C465.262 93.8239 463.636 89.8665 460.384 87.0524C457.131 84.2382 452.209 82.8312 445.616 82.8312H418.718L428.212 72.6738V125.043Z",fill:"white"}),I.createElement("path",{d:"M354.323 159.341C347.203 159.341 340.566 158.198 334.413 155.911C328.348 153.537 323.074 150.195 318.591 145.886C314.108 141.577 310.592 136.52 308.043 130.716C305.581 124.912 304.351 118.536 304.351 111.588C304.351 104.641 305.581 98.2652 308.043 92.461C310.592 86.6568 314.108 81.6002 318.591 77.291C323.162 72.9818 328.48 69.684 334.545 67.3975C340.61 65.023 347.247 63.8358 354.454 63.8358C362.453 63.8358 369.661 65.2429 376.078 68.0571C382.583 70.7833 388.033 74.8286 392.428 80.1931L378.715 92.8568C375.551 89.2511 372.035 86.5689 368.167 84.81C364.299 82.9633 360.08 82.0399 355.509 82.0399C351.202 82.0399 347.247 82.7434 343.643 84.1505C340.039 85.5575 336.918 87.5802 334.281 90.2185C331.644 92.8568 329.578 95.9787 328.084 99.5843C326.678 103.19 325.974 107.191 325.974 111.588C325.974 115.986 326.678 119.987 328.084 123.593C329.578 127.198 331.644 130.32 334.281 132.958C336.918 135.597 340.039 137.619 343.643 139.026C347.247 140.433 351.202 141.137 355.509 141.137C360.08 141.137 364.299 140.258 368.167 138.499C372.035 136.652 375.551 133.882 378.715 130.188L392.428 142.852C388.033 148.216 382.583 152.306 376.078 155.12C369.661 157.934 362.41 159.341 354.323 159.341Z",fill:"white"})),Wa=n(Ua)`
|
|
12
12
|
max-height: 48px;
|
|
13
13
|
max-width: 200px;
|
|
14
|
-
`,yo=()=>{const{isCdkEnviroment:e}=n.useTheme();return e?t.jsx(Wa,{}):t.jsx(_a,{})},
|
|
14
|
+
`,yo=()=>{const{isCdkEnviroment:e}=n.useTheme();return e?t.jsx(Wa,{}):t.jsx(_a,{})},B={mb:420,xs:660,sm:768,cmd:812,md:1024,lg:1200},Ha="var(--font-family-secondary)",Or={fontFamily:Ha},zi={...Or,fontWeight:400},Bi={...Or,fontWeight:500},qa={...Or,fontWeight:700},ko={sm:"14px",m:"15px",lg:"18px"},Qt={mb:`@media (min-width: ${B.mb}px)`,lg:`@media (min-width: ${B.lg}px)`,cmd:`@media (min-width: ${B.cmd}px)`},E={white:"#fff",black_1_100:"#000",blackRgb60:"rgba(52,58,64, .6)",blackRgba75:"rgba(0,0,0, .75)",themeDark:"#343A40",gray10:"#F6F7F9",gray20:"#EEEFF2",gray40:"#D0D3D9",gray60:"#9297A2",gray80:"#4E5461",gray100:"#272A32",transparent:"transparent",error:"rgba(232, 76, 61, 1)",black:"#000",black25:"rgba(39, 42, 50, 0.25)",black40:"rgba(39, 42, 50, 0.4)",red100:"#E84C3D",whiteRgb85:"rgba(255,255,255, .85)",primaryDarkBlue:"#041640",lightgray40:"rgba(213,214,217,0.4)",covideoGray100:"rgba(78, 84, 97, 1)",themeDark50Percent:"#B3B9BF",themeDark75Percent:"#676D73",secondaryButtonBlueBg:"#F2F4F6",label:"#9297a2",lightgray:"rgba(213,214,217,1)",blackRgb75:"rgba(52,58,64, .75)",secondaryBlue:"#007BFF",midGrey:"#9297a2",coal:"#272a32",covideoGray40:"rgba(208, 211, 217, 1)"},Ga=n.div`
|
|
15
15
|
height: 64px;
|
|
16
16
|
position: relative;
|
|
17
17
|
z-index: 9;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
align-items: center;
|
|
37
37
|
justify-content: flex-start;
|
|
38
38
|
gap: 8px;
|
|
39
|
-
${({theme:e})=>e.containerWidth<
|
|
39
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
40
40
|
width: 49%;
|
|
41
41
|
`}
|
|
42
42
|
`,Za=n.div`
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
button {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
}
|
|
62
|
-
${({theme:e})=>e.containerWidth<
|
|
62
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
63
63
|
width: 49%;
|
|
64
64
|
`}
|
|
65
65
|
`,Wo=n.div`
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
overflow: hidden;
|
|
148
148
|
text-overflow: ellipsis;
|
|
149
149
|
max-width: 115px;
|
|
150
|
-
`,Ho=({text:e,subtext:o,type:r="button",icon:i,iconOther:s,backgroundColor:c=E.white,borderColor:a,hoverBorderColor:d,textColor:l,disabled:u=!1,margin:g="0",width:h="auto",fontSize:
|
|
150
|
+
`,Ho=({text:e,subtext:o,type:r="button",icon:i,iconOther:s,backgroundColor:c=E.white,borderColor:a,hoverBorderColor:d,textColor:l,disabled:u=!1,margin:g="0",width:h="auto",fontSize:x="13px",padding:m="0 16px",height:f,onClick:w,title:b})=>{const y=m||(i?"0 16px 0 12px":"0 16px");return t.jsxs(Ja,{backgroundColor:c,borderColor:a,textColor:l,disabled:u,margin:g,onClick:w,type:r,width:h,fontSize:x,padding:y,height:f,hoverBorderColor:d,title:b,children:[!!i&&t.jsx(ec,{margin:e?"0 6px 0 0":"0",children:i}),t.jsxs(oc,{children:[t.jsx("span",{children:e}),t.jsx(rc,{children:o})]}),!!s&&t.jsx(tc,{margin:e?"0 0 0 8px":"0",children:s})]})},nc=n.keyframes`
|
|
151
151
|
0% {
|
|
152
152
|
transform: rotate(0deg);
|
|
153
153
|
}
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
`,ic=n.div`
|
|
203
203
|
position: ${e=>e.height?"relative":"inherit"};
|
|
204
204
|
height: ${e=>{if(typeof e.height=="string")return e.height;if(typeof e.height=="number")return`${e.height}px`;if(typeof e.height>"u")return 0}};
|
|
205
|
-
`,
|
|
205
|
+
`,ze=({isLoading:e=!1,error:o=!1,text:r,color:i,height:s,zIndex:c,onRetry:a,hideLoaderText:d})=>{const{t:l}=H.useTranslation();return t.jsxs(ic,{height:s,children:[e&&!o&&t.jsx(gn,{zIndex:c,children:t.jsxs(mn,{children:[t.jsx("div",{children:t.jsx(tt,{color:i||E.gray100})}),!d&&t.jsx("h1",{style:{color:i},children:r||l("Loading...")})]})}),o&&t.jsx(gn,{zIndex:c,children:t.jsx(mn,{style:{cursor:a?"pointer":"auto"},onClick:()=>a&&a(),children:t.jsx("h1",{children:"Try Again..."})})})]})},_i="JWT_DECODED",sc="GET_USER_START",ac="GET_USER_ERROR",Ui="GET_USER_SUCCESS",cc=(e,o)=>{const{payload:r,type:i}=o;switch(i){case Ui:return{...e,userData:{...e.userData,...Mi(r)}};case _i:return{...e,userData:{...e.userData,...r}};default:return e}},xn={JWT_DECODED:_i,GET_USER_START:sc,GET_USER_ERROR:ac,GET_USER_SUCCESS:Ui},fn={id:"0",uid:"0",userId:"0",customerId:"0",resellerId:"0",firstName:"0",lastName:"0",eleadEnabled:!1,admin:!1,resellerAdmin:!1,trial:!1,notifyMe:!1,access:"0",verified:0,captions:!1,vin:!1,iat:0,exp:0,totalLogins:0,showWelcome:!1,salesforceIntegration:!1,autoTranscribe:!1,wheelsTV:!1,webEmailEnabled:!1,allowDelete:!0,webShare:!0,timeZone:"",intercom:{},videoCount:0,droplrAccess:!1,affiliateAccess:!1,email:"",phone1:"",customer:{},transcriptionAccess:!1,playButtonPosition:"0",trialAccount:!1,automotiveRole:"0",vdpEnabled:!1,markVideosAsSent:null,packageDetails:null,reactionsPreference:null,isCompanyAdmin:!1,eleadDMSEmployeeID:null},Wi=p.createContext({}),lc=({initialUser:e={},children:o})=>{const[r,i]=p.useState(_e),[s,c]=p.useReducer(cc,{userData:{...fn,...e},jwt:"",setJwt:i});p.useEffect(()=>{Object.keys(e).length!==0&&c({type:xn.GET_USER_SUCCESS,payload:e})},[JSON.stringify(e)]),p.useEffect(()=>{try{const d=r&&Ks(r)||fn;c({type:xn.JWT_DECODED,payload:d})}catch{console.log("Invalid token.")}},[r]);const a={...s,dispatch:c};return t.jsx(Wi.Provider,{value:a,children:o})},ve=()=>p.useContext(Wi);var mt=(e=>(e.NO_ROLE="0",e.TECHNICIAN="1",e.SERVICE_ADVISOR="2",e.SERVICE_MANAGER="3",e.SALESPERSON="4",e.SALES_MANAGER="5",e.BDC="6",e))(mt||{});const ot={ASK_VERY_TIME:{value:2},NEVER:{value:0},ALWAYS:{value:1}},Ke=e=>nt(e)||ut(e),nt=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&[mt.TECHNICIAN.toString(),mt.SERVICE_ADVISOR.toString(),mt.SERVICE_MANAGER.toString()].includes(r)},ut=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&[mt.SALESPERSON.toString(),mt.SALES_MANAGER.toString(),mt.BDC.toString()].includes(r)},Hi=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&r===mt.TECHNICIAN},Ot=e=>Ke(e)?e.customer.markVideosAsSent===null?ot.ASK_VERY_TIME.value:parseInt(e.customer.markVideosAsSent.toString(),10):ot.NEVER.value,wr=n.svg`
|
|
206
206
|
fill: none;
|
|
207
207
|
stroke: white;
|
|
208
208
|
stroke-width: 5px;
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
width: 24px;
|
|
256
256
|
height: 24px;
|
|
257
257
|
}
|
|
258
|
-
`,qi=e=>{const{boxSize:o,checked:r,checkGroupIndicator:i=!1,disabled:s,width:c,onClick:a,style:d={}}=e,{userData:l}=
|
|
258
|
+
`,qi=e=>{const{boxSize:o,checked:r,checkGroupIndicator:i=!1,disabled:s,width:c,onClick:a,style:d={}}=e,{userData:l}=ve(),u=Ke(l);return t.jsx(pc,{width:c,children:t.jsxs(dc,{className:e.className,onClick:g=>{a&&a(g)},children:[t.jsx(uc,{type:"checkbox",...e,disabled:s,"aria-label":"Hidden"}),t.jsx(hc,{boxSize:o,checked:r,checkGroupIndicator:i,disabled:s,isAutomotive:u,style:d,children:i?t.jsx(wr,{viewBox:"0 0 24 24",children:t.jsx("polyline",{points:"4,12 20,12"})}):t.jsx(wr,{viewBox:"0 0 24 24",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})})]})})},gc=n.label`
|
|
259
259
|
display: flex;
|
|
260
260
|
padding: ${({removePadding:e})=>e===!0?"0":"5px 0"};
|
|
261
261
|
align-items: center;
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
transform: rotate(45deg);
|
|
359
359
|
display: block;
|
|
360
360
|
}
|
|
361
|
-
`,Cc=({disabled:e=!1,onClick:o,light:r=!1,zIndex:i=!1,padding:s="",marginTop:c="",marginRight:a="",style:d})=>t.jsx(yc,{disabled:e,onClick:o,light:r,zIndex:i,padding:s,marginTop:c,marginRight:a,style:d,children:t.jsx(
|
|
361
|
+
`,Cc=({disabled:e=!1,onClick:o,light:r=!1,zIndex:i=!1,padding:s="",marginTop:c="",marginRight:a="",style:d})=>t.jsx(yc,{disabled:e,onClick:o,light:r,zIndex:i,padding:s,marginTop:c,marginRight:a,style:d,children:t.jsx(Q.MdClose,{})}),Sc=I.memo(Cc),jc=n.div`
|
|
362
362
|
box-shadow:
|
|
363
363
|
0 2px 4px 0 rgba(52, 58, 64, 0.1),
|
|
364
364
|
0 4px 24px 0 rgba(52, 58, 64, 0.15);
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
z-index: 999;
|
|
381
381
|
display: grid;
|
|
382
382
|
gap: 8px;
|
|
383
|
-
`,Gi=I.createContext(),Ic=({children:e})=>{const[o,r]=I.useState(),[i,s]=I.useState([]);I.useEffect(()=>{if(o){const{message:a,type:d,timeout:l=3e3}=o,u=new Date().getTime()+l,g={id:Math.random(),message:a,type:d,maxAge:u};s([...i,g]),r()}},[o,i]),I.useEffect(()=>{const a=setInterval(()=>{const d=({maxAge:u})=>u&&u<new Date().getTime(),l=i.filter(u=>!d(u));l.length!==i.length&&s(l)},500);return()=>clearInterval(a)},[i]);const c={toast:r};return t.jsx(Gi.Provider,{value:c,children:t.jsxs(t.Fragment,{children:[i.length>0&&t.jsx(kc,{children:i.map(({id:a,message:d})=>t.jsx(Tc,{message:d},a))}),e]})})},
|
|
383
|
+
`,Gi=I.createContext(),Ic=({children:e})=>{const[o,r]=I.useState(),[i,s]=I.useState([]);I.useEffect(()=>{if(o){const{message:a,type:d,timeout:l=3e3}=o,u=new Date().getTime()+l,g={id:Math.random(),message:a,type:d,maxAge:u};s([...i,g]),r()}},[o,i]),I.useEffect(()=>{const a=setInterval(()=>{const d=({maxAge:u})=>u&&u<new Date().getTime(),l=i.filter(u=>!d(u));l.length!==i.length&&s(l)},500);return()=>clearInterval(a)},[i]);const c={toast:r};return t.jsx(Gi.Provider,{value:c,children:t.jsxs(t.Fragment,{children:[i.length>0&&t.jsx(kc,{children:i.map(({id:a,message:d})=>t.jsx(Tc,{message:d},a))}),e]})})},Te=()=>I.useContext(Gi),po=({children:e})=>t.jsx("div",{id:"covideo-embeddable-recorder",children:e}),Ac=n.div`
|
|
384
384
|
box-sizing: border-box;
|
|
385
385
|
height: 40px;
|
|
386
386
|
border-radius: 6px;
|
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
padding: 32px;
|
|
447
447
|
background-color: ${E.white};
|
|
448
448
|
|
|
449
|
-
${({theme:e})=>e.containerWidth<=
|
|
449
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
450
450
|
width: 100%;
|
|
451
451
|
`}
|
|
452
452
|
`,Dc=n.div`
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
margin-top: 32px;
|
|
480
480
|
gap: 12px;
|
|
481
481
|
|
|
482
|
-
${({theme:e})=>e.containerWidth<=
|
|
482
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
483
483
|
justify-content: space-between;
|
|
484
484
|
`}
|
|
485
485
|
`,zc=n.div`
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
border-radius: 5px;
|
|
495
495
|
background-color: ${E.secondaryButtonBlueBg};
|
|
496
496
|
|
|
497
|
-
${({theme:e})=>e.containerWidth<=
|
|
497
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
498
498
|
width: 100%;
|
|
499
499
|
`}
|
|
500
500
|
`,Bc=n.section`
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
margin-right: 14px;
|
|
506
506
|
height: 100%;
|
|
507
507
|
color: ${({theme:e})=>e.colors.primary[40]};
|
|
508
|
-
`,Nr=({handleModalClose:e,quickShareMarkAsSentHandler:o,isQuickShareLoading:r,markAsSentPayload:i,getMarkAsSentPayload:s})=>{const{t:c}=
|
|
508
|
+
`,Nr=({handleModalClose:e,quickShareMarkAsSentHandler:o,isQuickShareLoading:r,markAsSentPayload:i,getMarkAsSentPayload:s})=>{const{t:c}=H.useTranslation(),{isCdkEnviroment:a}=n.useTheme(),{userData:d}=ve(),{isCompanyAdmin:l}=d,u=async g=>{const h=await(s==null?void 0:s()),x={markAsSentConfirmed:g,videoActivityType:Nt.QUICKSHARE,...i,...h==null?void 0:h.videoShareSetData,...(h==null?void 0:h.useAutomotive)!==void 0?{useAutomotive:h.useAutomotive}:{}};o(x)};return t.jsx(Ft,{children:t.jsxs(Mc,{children:[t.jsxs(Dc,{children:[t.jsx(Oc,{children:c("Mark Video as ‘Sent’?")}),t.jsx(Nc,{children:t.jsx(kt,{width:"24px",height:"24px",onClick:e,disabled:r})})]}),t.jsxs(zc,{children:[t.jsx(_c,{children:t.jsx(Ti.AiFillInfoCircle,{size:24,color:"inherit"})}),t.jsx(Bc,{children:t.jsx(Pc,{children:c(l?"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.")})})]}),t.jsxs(Fc,{children:[t.jsx(F.Button,{text:c("Leave as ‘Not Sent’"),variant:a?"text":"white",disabled:r,onClick:()=>u(!1)}),t.jsx(F.Button,{text:c("Mark as Sent"),disabled:r,onClick:()=>u(!0)})]})]})})};var Pr=(e=>(e.TELEPROPTER_SCRIPT="Teleprompter Script",e.EMAIL="Email",e.SMS="SMS",e.CRM_MESSAGE="CRM Message",e))(Pr||{});const Uc=async(e,o)=>(await oe.get(`/share/quickshare/${e}`,{params:o})).data,Yi=()=>{const{toast:e}=Te(),{t:o}=H.useTranslation(),r=async(c,a)=>{const d=l=>{l.clipboardData&&(l.clipboardData.setData("text/html",a||""),l.clipboardData.setData("text/plain",c)),l.preventDefault()};document.addEventListener("copy",l=>d(l),{once:!0}),document.execCommand("copy")},i=async c=>{const a=async()=>{const{videoId:l,toastType:u,...g}=c,h=await Uc(l,{...g});return{url:h.data.url,html:h.data.html}},d=document.createElement("textArea");await navigator.clipboard.write([await new ClipboardItem({"text/plain":new Promise(async l=>{l(new Blob([(await a()).url],{type:"text/plain"}))}),"text/html":new Promise(async l=>{d.style.visibility="hidden",d.setAttribute("contenteditable","true"),d.value=(await a()).html,document.body.appendChild(d);const u=document.createRange();u.selectNodeContents(d);const g=window.getSelection();g==null||g.removeAllRanges(),g==null||g.addRange(u),d==null||d.setSelectionRange(0,999999),l(new Blob([d.value],{type:"text/html"}))})})]),d&&d.remove&&d.remove()};return{copyClipboard:async(c,a,d)=>{try{Pt?await i(d):await r(c,a)}catch{e({message:o("Failed to copy to clipboard")})}}}},Wc=async e=>{const{videoId:o,toastType:r,...i}=e,s={...i,...Pt?{reuseShortUrl:!0}:{}},{data:c}=await oe.post(`/share/quickshare/${o}/mark-as-sent`,s);return c},Hc=(e,o)=>{switch(o.toastType){case"crm_code":return{title:"CRM Code Copied!",clipboardText:e.url,clipboardHtml:e.html};case"url":return{title:"URL Copied!",clipboardText:e.url};case"html_code":return{title:"Raw HTML Copied!",clipboardText:e.legacyHtml};case"quickshare":return{title:"Link copied to clipboard!",clipboardText:e.url,clipboardHtml:e.html};case"insert":return{title:"Inserting video..."}}},qc=e=>{const{t:o}=H.useTranslation(),{userData:r}=ve(),{toast:i}=Te(),{copyClipboard:s}=Yi(),{onVideoInsert:c,onVideoInsertError:a}=Ce(),d=Ot(r);return we.useMutation(Wc,{onSuccess:(l,u)=>{const g=Hc(l,u);if(d===ot.ALWAYS.value&&i({message:o("Video marked as Sent")}),d===ot.ASK_VERY_TIME.value&&u.markAsSentConfirmed&&i({message:o("Video marked as Sent")}),g){if(g.clipboardText)try{!Pt&&g.clipboardText&&s(g.clipboardText,(g==null?void 0:g.clipboardHtml)||"",{})}catch(h){console.log("Failed to copy to clipboard...",h)}g.title&&setTimeout(()=>{i({message:o(g.title)})},100)}u.toastType==="insert"&&(c==null||c({url:l.url,thumbnail:l.thumbnail,image:(l==null?void 0:l.image)||"",html:l.html,token:_e})),e()},onError:l=>{a==null||a(l)}})},Fr=({video:e,videoRequest:o,setShowModalQuickShareMarkAsSent:r,handleOnMarkAsSentSuccessCallback:i})=>{const{userData:s}=ve(),{copyClipboard:c}=Yi(),a=()=>{i==null||i(),r(!1)},{isLoading:d,mutateAsync:l}=qc(a),u=async({markAsSentConfirmed:h,videoActivityType:x,...m})=>{const f={videoId:typeof e=="number"?e.toString():(e==null?void 0:e.id)||"",vin:(o==null?void 0:o.vin)||"",useAutomotive:!!(o!=null&&o.vin),...x?{videoActivityType:x}:{},...h!==void 0?{markAsSentConfirmed:h}:{},...m};if(Pt)try{await c("","",f)}catch(w){console.log("Failed to copy to clipboard...",w)}return await l(f)};return{onQuickShareButtonClick:({videoActivityType:h,...x})=>{const m=Ot(s);if(m===ot.NEVER.value)return u({videoActivityType:h,...x});if(m===ot.ASK_VERY_TIME.value)return r(!0);if(m===ot.ALWAYS.value)return u({videoActivityType:h,...x})},isQuickshareLoading:d,onQuickShareMutationHandler:u}},Qi=({src:e,onLoad:o})=>{const s=p.useRef(null),[c,a]=p.useState(0),[d,l]=p.useState(!1),u=()=>{var h,x;l(!1),a(0),o&&o(((h=s.current)==null?void 0:h.offsetWidth)??0,((x=s.current)==null?void 0:x.offsetHeight)??0)},g=()=>{if(l(!0),c>=30)return;let h=Math.pow(2,c)*1e3;h>5e3&&(h=5e3),setTimeout(()=>a(c+1),h)};return p.useEffect(()=>(s!=null&&s.current&&(s.current.onload=u,s.current.onerror=g,s.current.src=e),()=>{s!=null&&s.current&&(s.current.onload=null,s.current.onerror=null)}),[e,c]),{imgRef:s,retryCount:c,error:d}};var Vt=(e=>(e[e.READY=0]="READY",e[e.PROCESSING=1]="PROCESSING",e[e.FAILED=2]="FAILED",e))(Vt||{});const Zi=({videoId:e,checkField:o,enabled:r})=>{const[c,a]=p.useState(null),[d,l]=p.useState(0),[u,g]=p.useState(!1);return p.useEffect(()=>{if(!r)return;(async()=>{try{const x=await To(e.toString()),m=(x==null?void 0:x.processing)===Vt.FAILED||(x==null?void 0:x.processing)===Vt.READY;if(o&&x[o]){a(x);return}if(m){const f=localStorage.getItem(Fe.merge);if(f){const w=JSON.parse(f)||[];w.forEach((b,y)=>{b.id===x.id&&(w[y]=x)}),localStorage.setItem(Fe.merge,JSON.stringify(w))}a(x);return}if(d<30){let f=Math.pow(2,d)*1e3;f>5e3&&(f=5e3),setTimeout(()=>{l(d+1)},f);return}g(!0)}catch{g(!0)}})()},[e,o,d,r]),{videoData:c,retryCount:d,error:u}},Gc=n.div`
|
|
509
509
|
position: relative;
|
|
510
510
|
width: ${e=>e.thumbnailWidth?e.thumbnailWidth:"100%"};
|
|
511
511
|
height: ${e=>e.thumbnailHeight?e.thumbnailHeight:"100%"};
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
align-items: center;
|
|
564
564
|
justify-content: center;
|
|
565
565
|
min-width: 36px;
|
|
566
|
-
`,Ki=({onClick:e,thumbnail:o,duration:r,videoId:i,emailStatus:s,processing:c,thumbnailHeight:a,thumbnailWidth:d,refreshVideoList:l})=>{const{t:u}=
|
|
566
|
+
`,Ki=({onClick:e,thumbnail:o,duration:r,videoId:i,emailStatus:s,processing:c,thumbnailHeight:a,thumbnailWidth:d,refreshVideoList:l})=>{const{t:u}=H.useTranslation(),g=$=>pa($/1e3).split(".")[0],{videoData:h}=Zi({videoId:i,enabled:c===1});p.useEffect(()=>{c!==(h==null?void 0:h.processing)&&l&&l()},[h]);const{imgRef:x,retryCount:m,error:f}=Qi({src:(h==null?void 0:h.autogeneratedThumbnail)||o}),w=!f&&m===0,b=r?g(r):h!=null&&h.videoLength?g(h==null?void 0:h.videoLength):"...",y=c===2||(h==null?void 0:h.processing)===2,S=c===0||(h==null?void 0:h.processing)===0,T=y||S;return t.jsxs(Gc,{onClick:()=>e(),status:s,thumbnailHeight:a,thumbnailWidth:d,children:[t.jsx(Yc,{src:o,ref:x,visible:w},m),S&&t.jsx(Qc,{children:t.jsx(Ii.BsPlayFill,{color:E.white,size:30})}),!T&&t.jsx(Zc,{children:t.jsx(tt,{})}),y&&t.jsx(Kc,{children:u("Failed")}),!y&&r&&t.jsx(Xc,{children:b})]})},zr=e=>{const[o,r]=I.useState(null);return I.useEffect(()=>{if(!o)return;const s=c=>{o.contains(c.target)||e()};return document.addEventListener("click",s,!0),()=>document.removeEventListener("click",s,!0)},[o]),{ref:I.useCallback(s=>r(s),[])}},Jc=n.div`
|
|
567
567
|
position: fixed;
|
|
568
568
|
top: 0;
|
|
569
569
|
bottom: 0;
|
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
`,el=n.div`
|
|
577
577
|
width: auto;
|
|
578
578
|
height: 100vh;
|
|
579
|
-
${({theme:e})=>e.containerWidth>=
|
|
579
|
+
${({theme:e})=>e.containerWidth>=B.mb&&n.css`
|
|
580
580
|
width: 100vw;
|
|
581
581
|
`}
|
|
582
582
|
transition: height 0.5s ease-in-out;
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
background-color: ${E.lightgray40};
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
`,kl=[{value:2,label:"2.0x"},{value:1.5,label:"1.5x"},{value:1.25,label:"1.25x"},{value:1,label:"1.0x"},{value:.75,label:"0.75x"},{value:.5,label:"0.5x"}],Il=e=>{const{t:o}=W.useTranslation(),{isCdkEnviroment:r}=n.useTheme(),{isVideoPaused:i,isVideoMuted:s,togglePlay:c,handleMute:a,handleFullScreen:d,duration:l=0,currentTime:u=0,handleVolumeControl:g,volumeRange:h,playerIconsColor:m,playerBackgroundColor:x,setPlayBack:f,isVisible:w,small:b,videoRef:y,scrub:S,hideControls:T,showPlaybackSpeed:$,setShowPlaybackSpeed:k}=e,[L,v]=I.useState(1),j=M=>{let N=Math.floor(M/60),D=N.toString(),O=`${Math.floor(M-N*60)}`;return D.length===1&&(D=`0${N}`),O.length===1&&(O=`0${O}`),`${N}:${O}`},R=j(u),V=I.createRef(),C=h*100;I.useEffect(()=>{w||k(!1)},[w]);const A=M=>{f&&f(M),v(M),T&&T()},P=()=>{k(!$)};return t.jsxs(fl,{small:b,children:[t.jsx(nl,{duration:l,currentTime:u,scrub:S,color:m,small:b}),t.jsxs(vl,{children:[t.jsxs(bl,{children:[t.jsx(yl,{small:b,onClick:c,children:i?t.jsx(al,{color:m,width:20,height:20}):t.jsx(ll,{color:m,width:20,height:20})}),!b&&t.jsxs(t.Fragment,{children:[t.jsxs(Sl,{children:[t.jsx(jl,{small:b,onClick:a,children:s?t.jsx(il,{color:m}):t.jsx(be.IoIosVolumeHigh,{style:{color:m,fontSize:20}})}),t.jsx(Cl,{ref:V,"aria-label":"Volume Range",type:"range",min:"0",value:C.toString(),onChange:M=>g(M,V),max:"100",step:"1",color:m,small:b})]}),t.jsxs(El,{width:y.current&&y.current.clientWidth,color:m,children:[R," / ",j(l)]})]})]}),!b&&t.jsxs(wl,{children:[t.jsx(vn,{active:$,color:x,onClick:P,children:t.jsx(ul,{color:m})}),$&&t.jsxs(Tl,{width:y.current&&y.current.clientWidth,children:[t.jsx("p",{children:o("Playback Speed")}),kl.map(M=>t.jsxs("div",{onClick:()=>A(M.value),children:[t.jsx("span",{children:M.label})," ",L==M.value&&t.jsx(Xi,{width:y.current&&y.current.clientWidth<500?"16px":"20px",height:y.current&&y.current.clientWidth<500?"16px":"20px"})]},M.value))]}),t.jsx(vn,{onClick:d,children:t.jsx(Y.MdFullscreen,{style:{color:m,fontSize:20}})}),r?t.jsx(gl,{style:{marginLeft:4},fill:E.white}):t.jsx(xl,{style:{marginLeft:4},fill:E.white})]})]})]})};var to=(e=>(e.PLAY="Play",e.PAUSE="Pause",e.COMPLETE="Complete",e))(to||{}),We=(e=>(e.COVIDEO_EVENT="covideo-event",e.COVIDEO_PAGEVIEW="covideo-pageview",e))(We||{}),Ji=(e=>(e.CRM_VIDEO_EMBED="CDK Video Whitelabel",e))(Ji||{}),Xe=(e=>(e.VIDEO_INTERACTION="Video Interaction",e.INVENTORY_INTERACTION="Inventory Interaction",e.MEETING_INTERACTION="Meeting Interaction",e.SCHEDULE_MEETING="Schedule Meeting",e.SAVED_NEW_VIDEO="Saved New Video",e.VIDEO_ATTRIBUTE_INTERACTION="Video Attribute Interaction",e.VIDEO_MESSAGE_INTERACTION="Video Message Interaction",e.SELECT_RECORDING_TYPE="Select Recording Type",e.RECORDING_TOOL_INTERACTION="Recording Tool Interaction",e.START_RECORDING="Start Recording",e.STOP_RECORDING="Stop Recording",e.ADD_VIDEO_ATTRIBUTES="Add Video Attributes",e.DISCARD_VIDEO="Discard Video",e.RECENTLY_DELETED_INTERACTION="Recently Deleted Interaction",e.NEW_LEAD_ADDED="New Lead Added",e.CREATE_NEW_MEETING="Create New Meeting",e.VIDEO_PLAYER_INTERACTION="Video Player Interaction",e))(Xe||{}),St=(e=>(e.SEND_SHARE="Send & Share",e.VIDEOS="Videos",e.RECORD="Record",e.MERGE="Merge",e.DETAILS="Details",e))(St||{}),jt=(e=>(e.SEND_SHARE="https://video.connectcdk.com/embed/send",e.HOME="https://video.connectcdk.com/embed/home",e.MERGE="https://video.connectcdk.com/embed/merge",e.RECORD="https://video.connectcdk.com/embed/record",e.VOICE_RECORDER="https://video.connectcdk.com/embed/voice-recorder",e))(jt||{}),Et=(e=>(e.SHARE="Share",e.OVERVIEW="Overview",e.RECORD="Record",e.RECORDER="Recorder",e.DETAILS="Details",e.VOICE_RECORDER="Voice Recorder",e))(Et||{});function Al(e,o="ms",r=2){if(!Number.isFinite(e)||e<0)return 0;const s=(o==="ms"?e/1e3:e)/60,c=10**r;return Math.round(s*c)/c}function ao(e){return e?{video_id:Number(e.videoId),video_title:(e==null?void 0:e.videoTitle)||void 0,video_type:(e==null?void 0:e.videoType)??void 0,video_customer_name:!!(e!=null&&e.videoCustomerName),video_length:Al(Number(e==null?void 0:e.videoLength))||0}:{}}function oo(e){var r;return e?{vehicle:(e==null?void 0:e.title)||void 0,price:e!=null&&e.price?parseFloat(e==null?void 0:e.price.toString()):void 0,vin:(e==null?void 0:e.vin)||void 0,stock_number:((r=e==null?void 0:e.stockNumber)==null?void 0:r.toString())||void 0,condition:(e==null?void 0:e.itemCondition)||void 0,engine:(e==null?void 0:e.engine)||void 0,make:(e==null?void 0:e.make)||void 0,model:(e==null?void 0:e.model)||void 0,trim:(e==null?void 0:e.trim)||void 0,year:e!=null&&e.year?parseInt(e==null?void 0:e.year.toString(),10):void 0,mileage:e!=null&&e.mileage?parseInt(e==null?void 0:e.mileage.toString(),10):void 0,ext_color:(e==null?void 0:e.exteriorColor)||void 0,int_color:(e==null?void 0:e.interiorColor)||void 0,transmission:(e==null?void 0:e.transmission)||void 0}:{}}const vt={SEND_SHARE:{pageUrl:jt.SEND_SHARE,pageLocation:St.SEND_SHARE,pageSection:Et.SHARE},VIDEOS_OVERVIEW:{pageUrl:jt.HOME,pageLocation:St.VIDEOS,pageSection:Et.OVERVIEW},VIDEOS_MERGE:{pageUrl:jt.MERGE,pageLocation:St.MERGE,pageSection:Et.DETAILS},VIDEOS_RECORD:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.RECORDER},VIDEOS_RECORDER:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.RECORDER},RECORD_VIDEOS_DETAILS:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.DETAILS},VIDEOS_VOICE_RECORDER:{pageUrl:jt.VOICE_RECORDER,pageSection:St.DETAILS,pageLocation:Et.VOICE_RECORDER}};function $l(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function Je(e){var o;$l()&&((o=window.dataLayer)==null||o.push({...e}))}function bn({action:e,videoIds:o,videoAttributes:r,vehicleData:i}){const s={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_INTERACTION},c=ao(r);Je({...s,action:e,video_ids:o,...c,...i})}function Rl(e){return e?{customer_id:(e==null?void 0:e.customerId)||void 0,sms:(e==null?void 0:e.sms)||void 0,email:(e==null?void 0:e.email)||void 0,notification_viewed:(e==null?void 0:e.notificationViewed)||!1,landing_page:(e==null?void 0:e.landingPage)||void 0,call_to_action:(e==null?void 0:e.callToAction)||void 0,thumbnails:(e==null?void 0:e.thumbnails)||void 0}:{}}function Vl(e,o=8e3){return new Promise((r,i)=>{const s=URL.createObjectURL(e),c=document.createElement("video");c.preload="metadata",c.muted=!0,c.playsInline=!0;let a=!1;const d=setTimeout(()=>g(new Error("Timed out reading video duration")),o),l=()=>{clearTimeout(d),c.removeEventListener("loadedmetadata",x),c.removeEventListener("canplay",f),c.removeEventListener("timeupdate",h),c.removeEventListener("error",w),URL.revokeObjectURL(s),c.removeAttribute("src");try{c.load()}catch{}},u=b=>{a||(a=!0,l(),r(Math.round(b)))},g=b=>{a||(a=!0,l(),i(b))},h=()=>{isFinite(c.duration)&&c.duration>0&&u(c.duration*1e3)},m=()=>{c.addEventListener("timeupdate",h);try{c.currentTime=1e101}catch{setTimeout(()=>{try{c.currentTime=Number.MAX_VALUE}catch{}},0)}},x=()=>{isFinite(c.duration)&&c.duration>0?u(c.duration*1e3):m()},f=()=>{isFinite(c.duration)&&c.duration>0&&u(c.duration*1e3)},w=()=>g(new Error("Failed to load video metadata"));c.addEventListener("loadedmetadata",x),c.addEventListener("canplay",f),c.addEventListener("error",w),c.src=s;try{c.load()}catch{}})}function yr(e,o,r,i=""){return Object.entries(e).reduce((s,[c,a])=>{const d=i?`${i}.${c}`:c,l=d.split(".")[0];if(!i){const u=o.some(h=>h===c||h.startsWith(`${c}.`)),g=c in r;if(!u&&!g)return s}if(Array.isArray(a)){const u=r[c]??r[l];u?a.forEach((g,h)=>{u.forEach(m=>{s[`${d}.${h}.${m}`]=String(g[m]??"")})}):s[d]=String(a)}else if(a!==null&&typeof a=="object"){if(r[l])return s;Object.assign(s,yr(a,o,r,d))}else{const u=o.some(h=>h.includes(".")),g=o.some(h=>d===h||d.startsWith(`${h}.`));(!u||g)&&(s[d]=String(a??""))}return s},{})}function Ll({initialValues:e,currentValues:o,trackedFields:r=[],trackedArrayFields:i={},onlyChangedList:s=!1}){const c=yr(e,r,i),a=yr(o,r,i),d=[],l={};for(const u in a)c[u]!==a[u]&&(d.push(u),s||(l[`${u}_before`]=c[u]??"",l[`${u}_after`]=a[u]));return{changed_fields:d,...l}}function Ml({action:e,videoMessageProperties:o,video:r,vehicleData:i}){const s={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_MESSAGE_INTERACTION},c=Rl(o),a=ao(r);Je({...s,action:e,...a,...c,...i})}function Dl({videoAttributes:e,vehicleData:o}){const r={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_ATTRIBUTE_INTERACTION},i=ao(e);Je({...r,...i,...o})}function Ol({videoAttributes:e,type:o,vehicleData:r,mergedIds:i,changedFieldKeys:s,changes:c}){const a={event:We.COVIDEO_EVENT,event_name:Xe.SAVED_NEW_VIDEO},d=ao(e);Je({...a,type:o,...i?{merge_ids:i}:{},...d,...r,changed_fields:s&&s.length>0?s:void 0,...c})}var Ut=(e=>(e.VIEW="View",e.SEND_AND_SHARE="Send & Share (Insert)",e.COPY_VIDEO_URL="Copy Video URL",e.MERGE="Merge",e.VOICE_OVER="Voice Over",e))(Ut||{}),Ao=(e=>(e.RECORD="Record",e.UPLOAD="Upload",e.MERGE="Merge",e.VOICE_RECORD="Voice Record",e))(Ao||{}),Cr=(e=>(e.INSERT="Insert",e.COPY="Copy",e))(Cr||{});function Nl({type:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.SELECT_RECORDING_TYPE};Je({...o,type:e})}function Pl({action:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.RECORDING_TOOL_INTERACTION};Je({...o,type:"Telepromter",action:e})}function Fl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.DISCARD_VIDEO};Je({...e})}function zl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.START_RECORDING};Je({...e})}function Bl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.STOP_RECORDING};Je({...e})}function _l(){const e={event:We.COVIDEO_EVENT,event_name:Xe.ADD_VIDEO_ATTRIBUTES};Je({...e})}function Ul({action:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_PLAYER_INTERACTION};Je({...o,action:e})}function He(){const{isCdkEnviroment:e}=n.useTheme(),o=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Array.isArray(a.videoIds)&&a.videoIds.length>0?bn({action:a.action,videoIds:a.videoIds}):bn({action:a.action,videoAttributes:a.videoAttributes,vehicleData:d})},[]),r=p.useCallback(async({vehicle:c,videoAttributes:a})=>{const d=oo(c);return Dl({vehicleData:d,videoAttributes:a})},[]),i=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Ol({vehicleData:d,...a})},[]),s=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Ml({...a,vehicleData:d})},[]);return{trackGTMVideoInteractionEvent:e?o:void 0,trackGTMVideoMessageInteractionEvent:e?s:void 0,trackGTMSaveNewVideoInteractionEvent:e?i:void 0,trackGTMVideoAttributeInteractionInteractionEvent:e?r:void 0,trackGTMRecordingToolIntearctionEvent:e?Pl:void 0,trackGTMSelectRecordingTypeEvent:e?Nl:void 0,trackGTMStopRecordingEvent:e?Bl:void 0,trackGTMStartRecordingEvent:e?zl:void 0,trackGTMAddVideoAttributeEvent:e?_l:void 0,trackGTMDiscardVideoEvent:e?Fl:void 0,trackVideoPlayerInteractionsEvent:e?Ul:void 0}}const Wl=n.div`
|
|
833
|
+
`,kl=[{value:2,label:"2.0x"},{value:1.5,label:"1.5x"},{value:1.25,label:"1.25x"},{value:1,label:"1.0x"},{value:.75,label:"0.75x"},{value:.5,label:"0.5x"}],Il=e=>{const{t:o}=H.useTranslation(),{isCdkEnviroment:r}=n.useTheme(),{isVideoPaused:i,isVideoMuted:s,togglePlay:c,handleMute:a,handleFullScreen:d,duration:l=0,currentTime:u=0,handleVolumeControl:g,volumeRange:h,playerIconsColor:x,playerBackgroundColor:m,setPlayBack:f,isVisible:w,small:b,videoRef:y,scrub:S,hideControls:T,showPlaybackSpeed:$,setShowPlaybackSpeed:k}=e,[L,v]=I.useState(1),j=M=>{let N=Math.floor(M/60),D=N.toString(),O=`${Math.floor(M-N*60)}`;return D.length===1&&(D=`0${N}`),O.length===1&&(O=`0${O}`),`${N}:${O}`},R=j(u),V=I.createRef(),C=h*100;I.useEffect(()=>{w||k(!1)},[w]);const A=M=>{f&&f(M),v(M),T&&T()},P=()=>{k(!$)};return t.jsxs(fl,{small:b,children:[t.jsx(nl,{duration:l,currentTime:u,scrub:S,color:x,small:b}),t.jsxs(vl,{children:[t.jsxs(bl,{children:[t.jsx(yl,{small:b,onClick:c,children:i?t.jsx(al,{color:x,width:20,height:20}):t.jsx(ll,{color:x,width:20,height:20})}),!b&&t.jsxs(t.Fragment,{children:[t.jsxs(Sl,{children:[t.jsx(jl,{small:b,onClick:a,children:s?t.jsx(il,{color:x}):t.jsx(be.IoIosVolumeHigh,{style:{color:x,fontSize:20}})}),t.jsx(Cl,{ref:V,"aria-label":"Volume Range",type:"range",min:"0",value:C.toString(),onChange:M=>g(M,V),max:"100",step:"1",color:x,small:b})]}),t.jsxs(El,{width:y.current&&y.current.clientWidth,color:x,children:[R," / ",j(l)]})]})]}),!b&&t.jsxs(wl,{children:[t.jsx(vn,{active:$,color:m,onClick:P,children:t.jsx(ul,{color:x})}),$&&t.jsxs(Tl,{width:y.current&&y.current.clientWidth,children:[t.jsx("p",{children:o("Playback Speed")}),kl.map(M=>t.jsxs("div",{onClick:()=>A(M.value),children:[t.jsx("span",{children:M.label})," ",L==M.value&&t.jsx(Xi,{width:y.current&&y.current.clientWidth<500?"16px":"20px",height:y.current&&y.current.clientWidth<500?"16px":"20px"})]},M.value))]}),t.jsx(vn,{onClick:d,children:t.jsx(Q.MdFullscreen,{style:{color:x,fontSize:20}})}),r?t.jsx(gl,{style:{marginLeft:4},fill:E.white}):t.jsx(xl,{style:{marginLeft:4},fill:E.white})]})]})]})};var to=(e=>(e.PLAY="Play",e.PAUSE="Pause",e.COMPLETE="Complete",e))(to||{}),We=(e=>(e.COVIDEO_EVENT="covideo-event",e.COVIDEO_PAGEVIEW="covideo-pageview",e))(We||{}),Ji=(e=>(e.CRM_VIDEO_EMBED="CDK Video Whitelabel",e))(Ji||{}),Xe=(e=>(e.VIDEO_INTERACTION="Video Interaction",e.INVENTORY_INTERACTION="Inventory Interaction",e.MEETING_INTERACTION="Meeting Interaction",e.SCHEDULE_MEETING="Schedule Meeting",e.SAVED_NEW_VIDEO="Saved New Video",e.VIDEO_ATTRIBUTE_INTERACTION="Video Attribute Interaction",e.VIDEO_MESSAGE_INTERACTION="Video Message Interaction",e.SELECT_RECORDING_TYPE="Select Recording Type",e.RECORDING_TOOL_INTERACTION="Recording Tool Interaction",e.START_RECORDING="Start Recording",e.STOP_RECORDING="Stop Recording",e.ADD_VIDEO_ATTRIBUTES="Add Video Attributes",e.DISCARD_VIDEO="Discard Video",e.RECENTLY_DELETED_INTERACTION="Recently Deleted Interaction",e.NEW_LEAD_ADDED="New Lead Added",e.CREATE_NEW_MEETING="Create New Meeting",e.VIDEO_PLAYER_INTERACTION="Video Player Interaction",e))(Xe||{}),St=(e=>(e.SEND_SHARE="Send & Share",e.VIDEOS="Videos",e.RECORD="Record",e.MERGE="Merge",e.DETAILS="Details",e))(St||{}),jt=(e=>(e.SEND_SHARE="https://video.connectcdk.com/embed/send",e.HOME="https://video.connectcdk.com/embed/home",e.MERGE="https://video.connectcdk.com/embed/merge",e.RECORD="https://video.connectcdk.com/embed/record",e.VOICE_RECORDER="https://video.connectcdk.com/embed/voice-recorder",e))(jt||{}),Et=(e=>(e.SHARE="Share",e.OVERVIEW="Overview",e.RECORD="Record",e.RECORDER="Recorder",e.DETAILS="Details",e.VOICE_RECORDER="Voice Recorder",e))(Et||{});function Al(e,o="ms",r=2){if(!Number.isFinite(e)||e<0)return 0;const s=(o==="ms"?e/1e3:e)/60,c=10**r;return Math.round(s*c)/c}function ao(e){return e?{video_id:Number(e.videoId),video_title:(e==null?void 0:e.videoTitle)||void 0,video_type:(e==null?void 0:e.videoType)??void 0,video_customer_name:!!(e!=null&&e.videoCustomerName),video_length:Al(Number(e==null?void 0:e.videoLength))||0}:{}}function oo(e){var r;return e?{vehicle:(e==null?void 0:e.title)||void 0,price:e!=null&&e.price?parseFloat(e==null?void 0:e.price.toString()):void 0,vin:(e==null?void 0:e.vin)||void 0,stock_number:((r=e==null?void 0:e.stockNumber)==null?void 0:r.toString())||void 0,condition:(e==null?void 0:e.itemCondition)||void 0,engine:(e==null?void 0:e.engine)||void 0,make:(e==null?void 0:e.make)||void 0,model:(e==null?void 0:e.model)||void 0,trim:(e==null?void 0:e.trim)||void 0,year:e!=null&&e.year?parseInt(e==null?void 0:e.year.toString(),10):void 0,mileage:e!=null&&e.mileage?parseInt(e==null?void 0:e.mileage.toString(),10):void 0,ext_color:(e==null?void 0:e.exteriorColor)||void 0,int_color:(e==null?void 0:e.interiorColor)||void 0,transmission:(e==null?void 0:e.transmission)||void 0}:{}}const vt={SEND_SHARE:{pageUrl:jt.SEND_SHARE,pageLocation:St.SEND_SHARE,pageSection:Et.SHARE},VIDEOS_OVERVIEW:{pageUrl:jt.HOME,pageLocation:St.VIDEOS,pageSection:Et.OVERVIEW},VIDEOS_MERGE:{pageUrl:jt.MERGE,pageLocation:St.MERGE,pageSection:Et.DETAILS},VIDEOS_RECORD:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.RECORDER},VIDEOS_RECORDER:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.RECORDER},RECORD_VIDEOS_DETAILS:{pageUrl:jt.RECORD,pageLocation:St.RECORD,pageSection:Et.DETAILS},VIDEOS_VOICE_RECORDER:{pageUrl:jt.VOICE_RECORDER,pageSection:St.DETAILS,pageLocation:Et.VOICE_RECORDER}};function $l(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function Je(e){var o;$l()&&((o=window.dataLayer)==null||o.push({...e}))}function bn({action:e,videoIds:o,videoAttributes:r,vehicleData:i}){const s={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_INTERACTION},c=ao(r);Je({...s,action:e,video_ids:o,...c,...i})}function Rl(e){return e?{customer_id:(e==null?void 0:e.customerId)||void 0,sms:(e==null?void 0:e.sms)||void 0,email:(e==null?void 0:e.email)||void 0,notification_viewed:(e==null?void 0:e.notificationViewed)||!1,landing_page:(e==null?void 0:e.landingPage)||void 0,call_to_action:(e==null?void 0:e.callToAction)||void 0,thumbnails:(e==null?void 0:e.thumbnails)||void 0}:{}}function Vl(e,o=8e3){return new Promise((r,i)=>{const s=URL.createObjectURL(e),c=document.createElement("video");c.preload="metadata",c.muted=!0,c.playsInline=!0;let a=!1;const d=setTimeout(()=>g(new Error("Timed out reading video duration")),o),l=()=>{clearTimeout(d),c.removeEventListener("loadedmetadata",m),c.removeEventListener("canplay",f),c.removeEventListener("timeupdate",h),c.removeEventListener("error",w),URL.revokeObjectURL(s),c.removeAttribute("src");try{c.load()}catch{}},u=b=>{a||(a=!0,l(),r(Math.round(b)))},g=b=>{a||(a=!0,l(),i(b))},h=()=>{isFinite(c.duration)&&c.duration>0&&u(c.duration*1e3)},x=()=>{c.addEventListener("timeupdate",h);try{c.currentTime=1e101}catch{setTimeout(()=>{try{c.currentTime=Number.MAX_VALUE}catch{}},0)}},m=()=>{isFinite(c.duration)&&c.duration>0?u(c.duration*1e3):x()},f=()=>{isFinite(c.duration)&&c.duration>0&&u(c.duration*1e3)},w=()=>g(new Error("Failed to load video metadata"));c.addEventListener("loadedmetadata",m),c.addEventListener("canplay",f),c.addEventListener("error",w),c.src=s;try{c.load()}catch{}})}function yr(e,o,r,i=""){return Object.entries(e).reduce((s,[c,a])=>{const d=i?`${i}.${c}`:c,l=d.split(".")[0];if(!i){const u=o.some(h=>h===c||h.startsWith(`${c}.`)),g=c in r;if(!u&&!g)return s}if(Array.isArray(a)){const u=r[c]??r[l];u?a.forEach((g,h)=>{u.forEach(x=>{s[`${d}.${h}.${x}`]=String(g[x]??"")})}):s[d]=String(a)}else if(a!==null&&typeof a=="object"){if(r[l])return s;Object.assign(s,yr(a,o,r,d))}else{const u=o.some(h=>h.includes(".")),g=o.some(h=>d===h||d.startsWith(`${h}.`));(!u||g)&&(s[d]=String(a??""))}return s},{})}function Ll({initialValues:e,currentValues:o,trackedFields:r=[],trackedArrayFields:i={},onlyChangedList:s=!1}){const c=yr(e,r,i),a=yr(o,r,i),d=[],l={};for(const u in a)c[u]!==a[u]&&(d.push(u),s||(l[`${u}_before`]=c[u]??"",l[`${u}_after`]=a[u]));return{changed_fields:d,...l}}function Ml({action:e,videoMessageProperties:o,video:r,vehicleData:i}){const s={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_MESSAGE_INTERACTION},c=Rl(o),a=ao(r);Je({...s,action:e,...a,...c,...i})}function Dl({videoAttributes:e,vehicleData:o}){const r={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_ATTRIBUTE_INTERACTION},i=ao(e);Je({...r,...i,...o})}function Ol({videoAttributes:e,type:o,vehicleData:r,mergedIds:i,changedFieldKeys:s,changes:c}){const a={event:We.COVIDEO_EVENT,event_name:Xe.SAVED_NEW_VIDEO},d=ao(e);Je({...a,type:o,...i?{merge_ids:i}:{},...d,...r,changed_fields:s&&s.length>0?s:void 0,...c})}var Ut=(e=>(e.VIEW="View",e.SEND_AND_SHARE="Send & Share (Insert)",e.COPY_VIDEO_URL="Copy Video URL",e.MERGE="Merge",e.VOICE_OVER="Voice Over",e))(Ut||{}),Ao=(e=>(e.RECORD="Record",e.UPLOAD="Upload",e.MERGE="Merge",e.VOICE_RECORD="Voice Record",e))(Ao||{}),Cr=(e=>(e.INSERT="Insert",e.COPY="Copy",e))(Cr||{});function Nl({type:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.SELECT_RECORDING_TYPE};Je({...o,type:e})}function Pl({action:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.RECORDING_TOOL_INTERACTION};Je({...o,type:"Telepromter",action:e})}function Fl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.DISCARD_VIDEO};Je({...e})}function zl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.START_RECORDING};Je({...e})}function Bl(){const e={event:We.COVIDEO_EVENT,event_name:Xe.STOP_RECORDING};Je({...e})}function _l(){const e={event:We.COVIDEO_EVENT,event_name:Xe.ADD_VIDEO_ATTRIBUTES};Je({...e})}function Ul({action:e}){const o={event:We.COVIDEO_EVENT,event_name:Xe.VIDEO_PLAYER_INTERACTION};Je({...o,action:e})}function He(){const{isCdkEnviroment:e}=n.useTheme(),o=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Array.isArray(a.videoIds)&&a.videoIds.length>0?bn({action:a.action,videoIds:a.videoIds}):bn({action:a.action,videoAttributes:a.videoAttributes,vehicleData:d})},[]),r=p.useCallback(async({vehicle:c,videoAttributes:a})=>{const d=oo(c);return Dl({vehicleData:d,videoAttributes:a})},[]),i=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Ol({vehicleData:d,...a})},[]),s=p.useCallback(async({vehicle:c,...a})=>{const d=oo(c);return Ml({...a,vehicleData:d})},[]);return{trackGTMVideoInteractionEvent:e?o:void 0,trackGTMVideoMessageInteractionEvent:e?s:void 0,trackGTMSaveNewVideoInteractionEvent:e?i:void 0,trackGTMVideoAttributeInteractionInteractionEvent:e?r:void 0,trackGTMRecordingToolIntearctionEvent:e?Pl:void 0,trackGTMSelectRecordingTypeEvent:e?Nl:void 0,trackGTMStopRecordingEvent:e?Bl:void 0,trackGTMStartRecordingEvent:e?zl:void 0,trackGTMAddVideoAttributeEvent:e?_l:void 0,trackGTMDiscardVideoEvent:e?Fl:void 0,trackVideoPlayerInteractionsEvent:e?Ul:void 0}}const Wl=n.div`
|
|
834
834
|
box-sizing: border-box;
|
|
835
835
|
overflow: overlay;
|
|
836
836
|
display: flex;
|
|
@@ -891,7 +891,7 @@
|
|
|
891
891
|
bottom: ${e=>e.isFullScreen?"0px":"7px"};
|
|
892
892
|
background-color: ${e=>e.hex};
|
|
893
893
|
padding: ${e=>`${e.small?"0px 2px 1px":"8px"}`};
|
|
894
|
-
`,Zl=1e3,Kl=3,It=e=>{const{videoSource:o,shortUrl:r,viewerStatisticId:i,thumbnail:s,small:c,videoRef:a,autoplay:d,playlist:l,preventWideSize:u,hideContext:g=!1,startWithControls:h=!0,height:
|
|
894
|
+
`,Zl=1e3,Kl=3,It=e=>{const{videoSource:o,shortUrl:r,viewerStatisticId:i,thumbnail:s,small:c,videoRef:a,autoplay:d,playlist:l,preventWideSize:u,hideContext:g=!1,startWithControls:h=!0,height:x,width:m,margin:f,disableControls:w=!1,borderBottomRadius:b,FullscreenVideoWrapperBackgroundColor:y,setIsVideoLoading:S,setVideoDuration:T,setVideoIsProcessing:$}=e,{trackVideoPlayerInteractionsEvent:k}=He(),{shouldTrackAnalytics:L}=Ce(),{colors:v}=n.useTheme(),{t:j}=H.useTranslation(),R=v.primary[80],V=v.white[100],[C,A]=I.useState(!0),[P,M]=I.useState(!1),[N,D]=I.useState(!1),[O,W]=I.useState(1),[Y,se]=I.useState(0),[Z,X]=I.useState(0),[G,re]=I.useState(h),[_,ne]=I.useState(!1),[ae,ue]=I.useState(0),{userData:xe}=ve(),Se=i,ke=r,ee=Ke(xe),ce=I.useRef(G),[K,q]=I.useState([]),[he,Ee]=I.useState(!1),[Ie,Ne]=I.useState(!1),[U,pe]=I.useState(0),{mutateAsync:ye}=Na(),{mutateAsync:Le}=Da(),$e=I.useRef(0),[me,Me]=I.useState(0),Re=I.createRef(),qe=()=>{const te=a.current;te&&(C?te.play():te.pause(),k==null||k({action:C?to.PLAY:to.PAUSE}))},wt=te=>{g&&te.preventDefault()},Pe=$i.useFullScreenHandle(),it=()=>Pe.active?Pe.exit():Pe.enter();I.useEffect(()=>{Z===Y&&Z!==0&&Y!==0&&(k==null||k({action:to.COMPLETE}))},[Z,Y]),I.useEffect(()=>{d&&(k==null||k({action:to.PLAY}))},[d]),I.useEffect(()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")),200)},[Pe.active]),I.useEffect(()=>{const te=a.current;if(te.textTracks.length&&te.textTracks[0]){const J=G?-4:-1;let ie=te.textTracks[0].cues;for(var z=0;z<ie.length;z++)ie[z].line=J;te.textTracks[0].activeCues[0]&&(te.textTracks[0].activeCues[0].line=J)}},[G]);const Ge=()=>{const te=a.current;te&&(N?(W(1),D(!1),te.volume=1):(W(0),D(!0),te.volume=0))},Oo=(te,z)=>{const J=z.current&&z.current.offsetWidth;let ie=te.target.value;if(ie>100&&(ie=100),ie<0&&(ie=0),a.current&&J){let ge=Number((ie/J).toFixed(2));if(Math.floor(a.current.volume*100)==te.target.valueAsNumber)return;W(ge),ge<0&&(ge=0,W(0)),ge>1&&(W(1),ge=1),ge===0&&D(!0),ge!==1&&D(!1),a.current.volume=ge}},No=(te,z)=>{const J=z.current?z.current.offsetWidth:640;if(a.current){const ie=te.nativeEvent.offsetX/J*a.current.duration;a.current.currentTime=ie}},co=()=>{if(a.current&&isFinite(a.current.duration)){const te=a.current.duration;se(te),T&&T(te);const z=[];for(let J=0;J<parseInt(String(te),10);J++)z[J]=0;q(z),Ee(!0),Ne(!1),pe(0)}},lo=()=>{a.current&&a.current.networkState==HTMLMediaElement.NETWORK_NO_SOURCE&&!_&&(console.log("error loading mp4"),ne(!0),$==null||$(!0))},uo=()=>{ne(!1),$==null||$(!1),clearTimeout(ae),a.current&&a.current.duration===1/0&&(a.current.currentTime=1e101,a.current.ontimeupdate=function(){this.ontimeupdate=()=>{},a.current&&(a.current.currentTime=0)})},Po=async()=>{if(!a.current)return;const te=a.current.currentTime;if(X(te),!he)return;const z=parseInt(String(te),10);if(U!==z||z===0){const J=[...K],ie=z-1;if(J[ie]>=0&&J[ie]++,q(J),z===1||z%Kl===0||z===parseInt(String(Y),10))try{if(L&&ke){await ye({shortUrl:ke,data:{hotSpotData:J.join(),viewerId:Se||0}});const ge=Y>0&&Y<3&&z>=1||Y>=3&&z===3;!Ie&&ge&&(Ne(!0),await Le(ke))}}catch(ge){console.log("Failed to update hotspot",ge)}}pe(z)};I.useEffect(()=>{S&&S(_),_&&Me(me+1)},[_]),I.useEffect(()=>{var te;if(me>0&&_){clearTimeout(ae);const z=setTimeout(Me,Zl*me,me+1);ue(z),(te=a.current)==null||te.load()}},[me]),I.useEffect(()=>(a.current&&(a.current.addEventListener("durationchange",co,!0),a.current.addEventListener("loadedmetadata",uo,!0),a.current.addEventListener("error",lo,!0),a.current.addEventListener("pause",()=>A(!0),!0),a.current.addEventListener("play",()=>A(!1),!0)),()=>{a.current&&(a.current.removeEventListener("durationchange",co,!0),a.current.removeEventListener("loadedmetadata",uo,!0),a.current.removeEventListener("error",lo,!0))}),[a,Re]),I.useEffect(()=>{const te=a.current,z=Re==null?void 0:Re.current;if(!(!te||!z||P))return te.addEventListener("mouseenter",zt),te.addEventListener("mouseleave",yt),z.addEventListener("mouseenter",zt),z.addEventListener("mouseleave",yt),()=>{te.removeEventListener("mouseenter",zt),te.removeEventListener("mouseleave",yt),z.removeEventListener("mouseenter",zt),z.removeEventListener("mouseleave",yt)}},[a,Re,P]);const yt=()=>{a.current&&(re(!1),ce.current=!1)},zt=()=>{w||(re(!0),ce.current=!0)};I.useEffect(()=>{l&&l.length>0&&($e.current=0,X(0),A(!0))},[l]),I.useEffect(()=>{const te=()=>{if(a.current&&(X(a.current.currentTime),$e&&l&&l[$e.current]&&a.current.currentTime>=l[$e.current].endTime)){const J=new Event("ended");a.current.dispatchEvent(J)}},z=()=>{if(a.current&&l&&($e.current++,$e.current<l.length&&l[$e.current].videoSource)){a.current.poster=l[$e.current].autogeneratedThumbnail;let J="";const ie=l[$e.current].startTime,ge=l[$e.current].endTime;(ie||ge)&&(J=`#t=${ie||0}${ge?","+ge:""}`);let fe=(""+l[$e.current].videoSource).split("#t=")[0]+J;a.current.src=fe,a.current.play()}};return a.current&&a.current.addEventListener("timeupdate",te,!0),a.current&&a.current.addEventListener("ended",z,!0),a.current&&d&&(a.current.play(),A(!1)),()=>{a.current&&(a.current.removeEventListener("timeupdate",te,!0),a.current.removeEventListener("ended",z,!0))}},[a]),I.useEffect(()=>{const te=a.current;return!te||!o?void 0:((async()=>{try{te.src=o,te.muted=!0,te.oncanplay=async()=>{try{d&&await te.play(),te.muted=!1}catch(J){console.error("Autoplay failed:",J)}},te.load()}catch(J){console.error("Error in playVideo:",J)}})(),()=>{te&&(te.pause(),te.src="")})},[o]);const Fo=te=>{a.current.playbackRate=te},Xt=Ai.hex.rgb(R)||[];return t.jsx(Wl,{small:c,height:x,width:m,margin:f,disablePointerEvents:w,children:t.jsx(Hl,{small:c,preventWideSize:u,borderBottomRadius:b,children:t.jsxs(ql,{handle:Pe,backgroundColor:y,children:[t.jsx(Gl,{onContextMenu:wt,poster:_?"":s,preload:Pt?"auto":"metadata",ref:a,onClick:qe,isFullScreen:Pe.active,height:x||"auto",borderBottomRadius:b,playsInline:!0,controls:!1,onTimeUpdate:Po,children:t.jsx("source",{src:o,type:"video/mp4"},me+$e.current+o)},o),_&&t.jsx(Yl,{children:t.jsx(ze,{height:"100%",isLoading:_,text:j("processing...")})}),!w&&t.jsx(Ql,{ref:Re,r:Xt[0],g:Xt[1],b:Xt[2],hex:R,small:c,isVisible:G,isFullScreen:Pe.active,children:t.jsx(Il,{isVideoPaused:C,togglePlay:qe,isVideoMuted:N,handleMute:Ge,handleFullScreen:it,setPlayBack:Fo,setTranslate:()=>{},duration:Y,currentTime:Z,handleVolumeControl:Oo,volumeRange:O,playerIconsColor:V,small:c,scrub:No,playerBackgroundColor:R,captionsEnabled:!1,captions:"",isVisible:G,videoRef:a,isAutomotive:ee,hideControls:yt,setShowPlaybackSpeed:M,showPlaybackSpeed:P})})]})})})},Xl=n.div`
|
|
895
895
|
display: flex;
|
|
896
896
|
flex-direction: column;
|
|
897
897
|
align-items: center;
|
|
@@ -921,12 +921,12 @@
|
|
|
921
921
|
min-width: 660px;
|
|
922
922
|
max-width: 800px;
|
|
923
923
|
|
|
924
|
-
${({theme:e})=>e.containerWidth<=
|
|
924
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
925
925
|
width: calc(100vw - 30px);
|
|
926
926
|
min-width: unset;
|
|
927
927
|
max-width: unset;
|
|
928
928
|
`}
|
|
929
|
-
`,td=({handleModalClose:e,video:o})=>{const{t:r}=
|
|
929
|
+
`,td=({handleModalClose:e,video:o})=>{const{t:r}=H.useTranslation(),i=p.createRef();return t.jsx(Io,{maxHeight:"fit-content",onOutsideClick:e,children:t.jsxs(ed,{children:[t.jsx(Jl,{title:r("Close video preview"),onClick:e,children:t.jsx(kt,{})}),t.jsx(Xl,{children:t.jsx(It,{videoSource:o.videoSource,videoId:o.id,thumbnail:o.autogeneratedThumbnail,videoRef:i,autoplay:!0,height:"405px",width:"100%"})})]})})},wn=n.div`
|
|
930
930
|
background: ${({theme:e})=>e.colors.white[100]};
|
|
931
931
|
box-shadow:
|
|
932
932
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
@@ -1001,10 +1001,10 @@
|
|
|
1001
1001
|
position: absolute;
|
|
1002
1002
|
top: 10px;
|
|
1003
1003
|
left: 10px;
|
|
1004
|
-
`,es=({video:e,isMerge:o,selectedVideosData:r,setSelectedVideosData:i})=>{var X,
|
|
1004
|
+
`,es=({video:e,isMerge:o,selectedVideosData:r,setSelectedVideosData:i})=>{var X,G,re,_;const{t:s,i18n:c}=H.useTranslation(),a=(e==null?void 0:e.folder)===_t.COMPANY,{showQuickshareFeature:d,showVoiceoverFeature:l,showInsertFeature:u,showAiAssistFeature:g,env:h,onVideoInsert:x}=Ce(),{userData:m}=ve(),f=nt(m),w=ut(m),b=Ot(m),y=!!(m!=null&&m.customer.isIMSEnabled),{trackGTMVideoInteractionEvent:S}=He(),T=Ke(m),$=rt.useHistory(),[k,L]=p.useState(!1),[v,j]=p.useState(!1),[R,V]=p.useState(!1),[C,A]=p.useState(!1),{toast:P}=Te(),{onQuickShareMutationHandler:M,isQuickshareLoading:N,onQuickShareButtonClick:D}=Fr({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:A}),O=e?la(e.recordDate,m,"MM/DD/YYYY hh:mm:ss A"):"",W=ne=>{let{checked:ae}=ne.target;i(ae?[...r,e]:r.filter(ue=>ue.id!=e.id))},Y=async()=>{if(e){j(!0);try{await Sa(e.id,`${e.title}.mp4`)}catch{P({message:s("Download failed, please try again later.")})}j(!1)}},se=({action:ne})=>{var ue,xe,Se;if(!e)return;const ae={videoId:Number(e.id),videoType:(ue=e==null?void 0:e.videoRequest)==null?void 0:ue.videoType,videoCustomerName:!!((xe=e==null?void 0:e.videoRequest)!=null&&xe.customerName),videoLength:e==null?void 0:e.videoLength,videoTitle:e==null?void 0:e.title};S==null||S({videoAttributes:ae,action:ne,vehicle:(Se=e==null?void 0:e.videoRequest)==null?void 0:Se.inventoryItem})},Z=async()=>{if(e){L(!0);try{await ja(e.id),P({message:s("Video copied successfully.")})}catch{P({message:s("Copy failed, please try again later.")})}L(!1)}};return e?t.jsxs(wn,{children:[t.jsxs(yn,{backgroundColor:E.black,children:[t.jsx(Ki,{videoId:e.id,thumbnail:e.thumbnail,duration:e.videoLength||0,processing:e.processing,onClick:()=>{se({action:Ut.VIEW}),V(!0)}}),!o&&t.jsxs(rd,{children:[t.jsxs(nd,{children:[!a&&t.jsxs(t.Fragment,{children:[u&&t.jsx(F.Button,{onClick:()=>{se({action:Ut.SEND_AND_SHARE}),$.push(`/insert-video/${e==null?void 0:e.id}`)},icon:t.jsx(be.IoMdAdd,{size:18}),variant:"white",iconPosition:"middle",size:"small",title:s("Insert")}),d&&t.jsx(F.Button,{onClick:()=>{se({action:Ut.COPY_VIDEO_URL}),D({videoActivityType:Nt.QUICKSHARE,toastType:"quickshare"})},icon:N?t.jsx(tt,{size:12}):t.jsx(be.IoIosShareAlt,{size:18}),disabled:N,variant:"white",title:s("Copy Video"),size:"small"}),g&&t.jsx(ki.CovideoMagicButton,{defaultPromptType:Pr.CRM_MESSAGE,handleSubmitGeneratedContent:(ne,ae,ue,xe)=>{const Se={url:ae||"",thumbnail:ue||"",image:e.thumbnail||"",html:ne,token:_e};x==null||x(Se),setTimeout(()=>{xe||b===ot.ALWAYS.value&&P({message:s("Video marked as Sent")})},100),P({message:s("Inserting video...")})},handleOnCopySuccess:(ne,ae,ue,xe)=>{setTimeout(()=>{xe||b===ot.ALWAYS.value&&P({message:s("Video marked as Sent")})},100),P({message:s("Link copied to clipboard!")})},margin:"0",iconColor:"gradient",videoId:e?e.id:"",defaultVin:((X=e==null?void 0:e.videoRequest)==null?void 0:X.vin)||"",token:_e,userData:{customer:{business:m.customer.business,hasCovideoMagic:((re=(G=m==null?void 0:m.customer)==null?void 0:G.hasCovideoMagic)==null?void 0:re.toString())==="1",markVideosAsSent:Ot(m),phone1:(_=m==null?void 0:m.customer)==null?void 0:_.phone1},firstName:m.firstName,isAutomotiveSalesRole:w,isAutomotiveServiceRole:f,isIMSEnabled:y,isCompanyAdmin:m.isCompanyAdmin,isAutomotive:T,preferredLanguage:c.language},aiAssistTheme:"branding",env:h,apiKey:gt,variant:"white",size:"small"})]}),a&&t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:Z,icon:k?t.jsx(tt,{size:12}):t.jsx(Q.MdCreateNewFolder,{size:18}),disabled:k,variant:"white",title:s("Copy to Primary"),size:"small"}),t.jsx(F.Button,{onClick:Y,title:s("Download"),icon:v?t.jsx(tt,{size:12}):t.jsx(Q.MdDownload,{size:18}),disabled:v,variant:"white",size:"small"})]})]}),l&&!a&&t.jsx(F.Button,{title:s("Voiceover"),onClick:()=>{se({action:Ut.VOICE_OVER}),$.push(`/voiceover/${e.id}`)},icon:t.jsx(be.IoIosMic,{size:18}),variant:"white",size:"small"})]}),o&&t.jsx(id,{children:t.jsx(qi,{width:"24px",checked:r.find(ne=>ne.id===e.id),onChange:ne=>W(ne)})})]}),t.jsxs(Cn,{children:[t.jsx(Sn,{children:e.title}),t.jsxs(jn,{children:[t.jsx(be.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),O]})]}),C&&t.jsx(Nr,{markAsSentPayload:{toastType:"quickshare"},isQuickShareLoading:N,quickShareMarkAsSentHandler:M,handleModalClose:async()=>{A(!1)}}),R&&t.jsx(td,{video:e,handleModalClose:()=>V(!1)})]}):t.jsxs(wn,{opacity:".3",children:[t.jsx(yn,{backgroundColor:E.gray20,children:t.jsx(od,{children:" "})}),t.jsxs(Cn,{children:[t.jsx(Sn,{backgroundColor:E.gray20,width:"100%",children:" "}),t.jsx(jn,{backgroundColor:E.gray20,width:"70%",children:" "})]})]})},sd=n.div`
|
|
1005
1005
|
position: relative;
|
|
1006
1006
|
width: 190px;
|
|
1007
|
-
${({theme:e})=>e.containerWidth<
|
|
1007
|
+
${({theme:e})=>e.containerWidth<B.cmd&&n.css`
|
|
1008
1008
|
width: 100%;
|
|
1009
1009
|
`}
|
|
1010
1010
|
`,ad=n.div`
|
|
@@ -1025,14 +1025,14 @@
|
|
|
1025
1025
|
&:hover {
|
|
1026
1026
|
color: ${E.gray100};
|
|
1027
1027
|
}
|
|
1028
|
-
`,ld=({prevSearch:e,handleSearch:o})=>{const{t:r}=
|
|
1028
|
+
`,ld=({prevSearch:e,handleSearch:o})=>{const{t:r}=H.useTranslation(),{containerWidth:i}=Ce(),[s,c]=p.useState(e||""),a=g=>{g.key==="Enter"&&o(s)},d=()=>{c(""),o("")},l=g=>{c(g.currentTarget.value)},u=i>=B.mb?r("Search Videos..."):r("Search...");return t.jsxs(sd,{children:[t.jsx(ad,{children:t.jsx(be.IoMdSearch,{onClick:()=>o(s),size:17})}),t.jsx(Zt,{width:"100%",type:"text",padding:"8px 8px 8px 40px",value:s,placeholder:u||void 0,onKeyUp:a,onChange:l}),s!==""&&t.jsx(cd,{children:t.jsx(Q.MdClear,{onClick:()=>d(),size:17})})]})},dd=n.div`
|
|
1029
1029
|
position: relative;
|
|
1030
1030
|
display: grid;
|
|
1031
1031
|
gap: 24px;
|
|
1032
1032
|
margin: 24px 0;
|
|
1033
1033
|
grid-template-columns: repeat(3, 1fr);
|
|
1034
1034
|
z-index: 0;
|
|
1035
|
-
${({theme:e})=>e.containerWidth<
|
|
1035
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
1036
1036
|
grid-template-columns: 1fr;
|
|
1037
1037
|
`}
|
|
1038
1038
|
`,ud=n.div`
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
font-size: 14px;
|
|
1046
1046
|
line-height: 20px;
|
|
1047
1047
|
color: ${E.gray60};
|
|
1048
|
-
${({theme:e})=>e.containerWidth<
|
|
1048
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
1049
1049
|
top: 32px;
|
|
1050
1050
|
width: 100%;
|
|
1051
1051
|
text-align: center;
|
|
@@ -1084,7 +1084,7 @@
|
|
|
1084
1084
|
align-items: center;
|
|
1085
1085
|
`,vd=n.div`
|
|
1086
1086
|
text-align: center;
|
|
1087
|
-
`,os=e=>{const{isDisabled:o,menuIsOpen:r,selectProps:i}=e;return o?{borderColor:E.transparent}:i.error?{borderColor:E.error}:{borderColor:E.covideoGray40}},rs=(e,o,r)=>{const{isFocused:i,isSelected:s,isDisabled:c}=e;return c?{color:E.gray40,backgroundColor:E.gray10,cursor:"not-allowed"}:i||s?r?{color:E.black_1_100,backgroundColor:"rgb(222, 235, 255)"}:{color:o.colors.primary[100],backgroundColor:o.colors.secondary[5]}:{color:E.covideoGray100,backgroundColor:E.white}},De=e=>{const{ariaLabel:o="Aria label is missing",name:r,options:i,value:s,defaultValue:c=void 0,placeholder:a="No Folders",onChange:d,getOptionLabel:l,getOptionValue:u,menuPosition:g="absolute",menuPlacement:h="auto",menuPortalTarget:
|
|
1087
|
+
`,os=e=>{const{isDisabled:o,menuIsOpen:r,selectProps:i}=e;return o?{borderColor:E.transparent}:i.error?{borderColor:E.error}:{borderColor:E.covideoGray40}},rs=(e,o,r)=>{const{isFocused:i,isSelected:s,isDisabled:c}=e;return c?{color:E.gray40,backgroundColor:E.gray10,cursor:"not-allowed"}:i||s?r?{color:E.black_1_100,backgroundColor:"rgb(222, 235, 255)"}:{color:o.colors.primary[100],backgroundColor:o.colors.secondary[5]}:{color:E.covideoGray100,backgroundColor:E.white}},De=e=>{const{ariaLabel:o="Aria label is missing",name:r,options:i,value:s,defaultValue:c=void 0,placeholder:a="No Folders",onChange:d,getOptionLabel:l,getOptionValue:u,menuPosition:g="absolute",menuPlacement:h="auto",menuPortalTarget:x,inputId:m,className:f,dropdownHeight:w="auto",height:b=48,width:y,disabled:S=!1,creatable:T=!0,error:$=!1,onMenuScrollToBottom:k,onMenuClose:L,extendStyles:v,icon:j,showIndicator:R=!0,chipValueSelected:V=!1,isClearable:C=!1,onInputChange:A,onCreateOption:P,isMulti:M=!1,isShareVideoModal:N=!1,zIndexProp:D=9999,menuZIndexProp:O=2,isSearchable:W,formatCreateLabel:Y,closeMenuOnScroll:se=void 0,menuShouldBlockScroll:Z=!1,isLoading:X=!1,filterOption:G,formatOptionLabel:re,customComponents:_,onMenuOpen:ne,maxMenuHeight:ae,controlShouldRenderValue:ue,createOptionPosition:xe,autoFocus:Se}=e,ke=n.useTheme(),ee={icon:j,error:$,options:i,className:f,name:r,placeholder:a,value:s,defaultValue:c,getOptionLabel:l,getOptionValue:u,onChange:d,menuPlacement:h,menuPosition:g,isDisabled:S,menuPortalTarget:x,"aria-label":o,onMenuScrollToBottom:k,onMenuClose:L,isClearable:C,onInputChange:A,onCreateOption:P,isMulti:M,isSearchable:W,filterOption:G},ce=q=>R?t.jsx(ts,{menuIsOpen:q.selectProps.menuIsOpen,children:t.jsx(Q.MdArrowDropDown,{size:18,opacity:.5})}):t.jsx(t.Fragment,{}),K={container:q=>({...q,...(v==null?void 0:v.container)||{}}),control:(q,he)=>({...q,width:y,boxShadow:"none",borderRadius:6,minHeight:"40px",cursor:"pointer",...os(he),...(v==null?void 0:v.control)||{},"&:hover":{borderColor:N?"rgb(128, 189, 255)":ke.colors.primary[100]},"&:focus-within":{borderColor:N?"rgb(128, 189, 255)":ke.colors.primary[100]}}),singleValue:q=>({...q,width:"95%",...(v==null?void 0:v.singleValue)||{}}),valueContainer:q=>({...q,...(v==null?void 0:v.valueContainer)||{}}),input:q=>({...q,...(v==null?void 0:v.input)||{}}),menuPortal:q=>({...q,zIndex:D||9999}),menuList:q=>({...q,...(v==null?void 0:v.menuList)||{},height:w}),menu:q=>({...q,...(v==null?void 0:v.menu)||{},marginTop:2,zIndex:O||2,color:E.primaryDarkBlue}),option:(q,he)=>({...q,height:N?35:b,display:"flex",alignItems:"center",padding:"0 16px",cursor:"pointer",transition:"all 0.3s",fontWeight:N?"normal":600,fontSize:15,...rs(he,ke,N),...(v==null?void 0:v.option)||{}})};return T?t.jsx(Xs,{...ee,isLoading:!1,components:{DropdownIndicator:ce,IndicatorSeparator:()=>null,..._},styles:K,isSearchable:W,formatCreateLabel:Y,formatOptionLabel:re,createOptionPosition:xe}):t.jsx(Qe,{...ee,inputId:m,maxMenuHeight:ae||220,menuShouldScrollIntoView:!1,menuPortalTarget:x,isLoading:X,components:{DropdownIndicator:ce,IndicatorSeparator:()=>null,..._},styles:K,isSearchable:W,closeMenuOnScroll:se,menuShouldBlockScroll:Z,filterOption:G,formatOptionLabel:re,onMenuOpen:ne,controlShouldRenderValue:ue,autoFocus:Se})},bd=n.div`
|
|
1088
1088
|
position: relative;
|
|
1089
1089
|
display: flex;
|
|
1090
1090
|
`,wd=n.div`
|
|
@@ -1099,12 +1099,12 @@
|
|
|
1099
1099
|
0px 6px 12px rgba(66, 79, 104, 0.06);
|
|
1100
1100
|
border-radius: 8px;
|
|
1101
1101
|
background: ${E.white};
|
|
1102
|
-
`,yd=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480",width:"20",height:"15",children:t.jsxs("g",{fillRule:"evenodd",children:[t.jsx("path",{fill:"#aa151b",d:"M0 0h640v480H0z"}),t.jsx("path",{fill:"#f1bf00",d:"M0 120h640v240H0z"})]})}),Cd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 30",width:"20",height:"15",children:[t.jsx("clipPath",{id:"t",children:t.jsx("path",{d:"M0,0 v30 h60 v-30 z"})}),t.jsx("clipPath",{id:"s",children:t.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),t.jsxs("g",{clipPath:"url(#t)",children:[t.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#012169"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#C8102E",strokeWidth:"4",clipPath:"url(#s)"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#C8102E",strokeWidth:"6"})]})]}),Sd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3 2",width:"20",height:"15",children:[t.jsx("rect",{width:"1",height:"2",x:"0",y:"0",fill:"#0055a4"}),t.jsx("rect",{width:"1",height:"2",x:"1",y:"0",fill:"#fff"}),t.jsx("rect",{width:"1",height:"2",x:"2",y:"0",fill:"#ef4135"})]}),ns=p.memo(({handleUpdateToken:e})=>{var M,N;const{i18n:o,t:r}=
|
|
1102
|
+
`,yd=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480",width:"20",height:"15",children:t.jsxs("g",{fillRule:"evenodd",children:[t.jsx("path",{fill:"#aa151b",d:"M0 0h640v480H0z"}),t.jsx("path",{fill:"#f1bf00",d:"M0 120h640v240H0z"})]})}),Cd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 30",width:"20",height:"15",children:[t.jsx("clipPath",{id:"t",children:t.jsx("path",{d:"M0,0 v30 h60 v-30 z"})}),t.jsx("clipPath",{id:"s",children:t.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),t.jsxs("g",{clipPath:"url(#t)",children:[t.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#012169"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#C8102E",strokeWidth:"4",clipPath:"url(#s)"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#C8102E",strokeWidth:"6"})]})]}),Sd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3 2",width:"20",height:"15",children:[t.jsx("rect",{width:"1",height:"2",x:"0",y:"0",fill:"#0055a4"}),t.jsx("rect",{width:"1",height:"2",x:"1",y:"0",fill:"#fff"}),t.jsx("rect",{width:"1",height:"2",x:"2",y:"0",fill:"#ef4135"})]}),ns=p.memo(({handleUpdateToken:e})=>{var M,N;const{i18n:o,t:r}=H.useTranslation(),{colors:i,isCdkEnviroment:s}=n.useTheme(),c=we.useQueryClient(),{hasExternalJwt:a,reRender:d,showMultiLocationFeature:l,showLanguageDropdownFeature:u}=Ce(),{mutateAsync:g,isLoading:h}=xd(a),{userData:x}=ve(),m=((N=(M=x==null?void 0:x.customer)==null?void 0:M.hasMultiLocation)==null?void 0:N.toString())==="1",{data:f}=gd(parseInt(x==null?void 0:x.userId,10),l&&m),w=!!(f&&f.length&&f.find(D=>{var O,W;return D.locationId.toString()===((W=(O=x==null?void 0:x.customer)==null?void 0:O.locationId)==null?void 0:W.toString())})),b=l&&m&&w,[y,S]=p.useState(!1),{ref:T}=zr(()=>S(!1)),$=de.useHistory(),k=()=>{S(D=>!D)},L=()=>{e(""),Ni(),c.clear(),$.go(0)};let v=x.firstName||x.lastName||r("Welcome");const j=(f||[]).find(D=>{var O;return((O=x==null?void 0:x.customer)==null?void 0:O.locationId)&&D.locationId.toString()===x.customer.locationId.toString()}),R=f.filter(D=>D.locationId!==(j==null?void 0:j.locationId)),V=async D=>{await g({locationId:D}),d()},C=[{value:"es",label:t.jsxs(t.Fragment,{children:[yd," ES"]})},{value:"en",label:t.jsxs(t.Fragment,{children:[Cd," EN"]})},{value:"fr",label:t.jsxs(t.Fragment,{children:[Sd," FR"]})}],A=[...b?(R||[]).map(D=>({key:`loc-${D.locationId}`,label:t.jsx(Ho,{text:D.name,textColor:"black",backgroundColor:"transparent",borderColor:"transparent",onClick:()=>V(D.locationId),disabled:h},D.locationId)})):[],...a?[]:[{key:"logout",label:t.jsx(Ho,{text:r("Log Out"),textColor:s?i.primary[100]:i.danger[80],backgroundColor:"transparent",borderColor:"transparent",icon:t.jsx(Q.MdLogout,{size:18,color:s?i.primary[100]:i.danger[40]}),onClick:()=>L(),disabled:h})}]],P=A.length>0;return t.jsxs(bd,{ref:T,children:[t.jsx(Ho,{text:v,subtext:b?j==null?void 0:j.name:"",backgroundColor:y?E.black25:"transparent",borderColor:"transparent",textColor:"white",icon:t.jsx(be.IoMdPerson,{size:18,color:"white"}),iconOther:P?y?t.jsx(be.IoMdArrowDropup,{}):t.jsx(be.IoMdArrowDropdown,{}):t.jsx(t.Fragment,{}),onClick:()=>P?k():()=>null}),y&&t.jsx(wd,{children:A.map(D=>t.jsx("div",{children:D.label},D.key))}),u&&t.jsx(De,{isSearchable:!1,isClearable:!1,width:90,options:C,onChange:D=>{o.changeLanguage(D.value)},formatOptionLabel:D=>t.jsx("div",{style:{display:"flex",gap:4,alignItems:"center"},children:D.label}),value:C.find(D=>D.value===o.language)})]})}),jd=n.div`
|
|
1103
1103
|
font-weight: 400;
|
|
1104
1104
|
font-size: 14px;
|
|
1105
1105
|
line-height: 20px;
|
|
1106
1106
|
color: ${E.gray80};
|
|
1107
|
-
`,Ed=({page:e,size:o,count:r})=>{const i=e*o+1;let s=e*o+o;return s>r&&(s=r),t.jsxs(jd,{children:[i,"-",s," of ",r]})};var Br=(e=>(e.NoType="",e.Marketing="Marketing",e.Prospecting="Prospecting",e.RespondToInquiry="Respond to Inquiry",e.ThanksForYourBusiness="Thanks For Your Business",e))(Br||{}),_r=(e=>(e.NoType="",e.AdditionalRepair="Additional Repair",e.RepairInquiry="Repair inquiry",e.RegularService="Regular service",e.ServiceReminder="Service reminder",e.QuoteRequest="Quote request",e))(_r||{});const Td="~~~external-video~~~";var Sr=(e=>(e[e.LEGACY=0]="LEGACY",e[e.FREE=1]="FREE",e[e.PRO=2]="PRO",e[e.TEAMS=3]="TEAMS",e[e.ENTERPRISE=4]="ENTERPRISE",e))(Sr||{});const kd={data:null,error:null,loading:!0,progress:0},Id=e=>Math.floor(Math.random()*Math.floor(e)),Ad=(e,o)=>{switch(o.type){case"REQUEST":return{...e,loading:!0,error:null};case"PROGRESS":return{...e,progress:Math.min(e.progress+Id(25),100)};case"SUCCESS":return{...e,data:o.data,loading:!1,error:null,progress:100};case"FAILURE":return{...e,data:null,loading:!1,error:o.error,progress:100};default:return e}},$d=e=>{const[o,r]=p.useReducer(Ad,e||kd);return{state:o,dispatch:r}},Ur=({method:e,pathname:o,params:r,autoFetch:i=!1,showToastMessage:s=!0})=>{const{state:c,dispatch:a}=$d({data:null,error:"",loading:!1}),{data:d,error:l,loading:u,progress:g}=c,{toast:h}=
|
|
1107
|
+
`,Ed=({page:e,size:o,count:r})=>{const i=e*o+1;let s=e*o+o;return s>r&&(s=r),t.jsxs(jd,{children:[i,"-",s," of ",r]})};var Br=(e=>(e.NoType="",e.Marketing="Marketing",e.Prospecting="Prospecting",e.RespondToInquiry="Respond to Inquiry",e.ThanksForYourBusiness="Thanks For Your Business",e))(Br||{}),_r=(e=>(e.NoType="",e.AdditionalRepair="Additional Repair",e.RepairInquiry="Repair inquiry",e.RegularService="Regular service",e.ServiceReminder="Service reminder",e.QuoteRequest="Quote request",e))(_r||{});const Td="~~~external-video~~~";var Sr=(e=>(e[e.LEGACY=0]="LEGACY",e[e.FREE=1]="FREE",e[e.PRO=2]="PRO",e[e.TEAMS=3]="TEAMS",e[e.ENTERPRISE=4]="ENTERPRISE",e))(Sr||{});const kd={data:null,error:null,loading:!0,progress:0},Id=e=>Math.floor(Math.random()*Math.floor(e)),Ad=(e,o)=>{switch(o.type){case"REQUEST":return{...e,loading:!0,error:null};case"PROGRESS":return{...e,progress:Math.min(e.progress+Id(25),100)};case"SUCCESS":return{...e,data:o.data,loading:!1,error:null,progress:100};case"FAILURE":return{...e,data:null,loading:!1,error:o.error,progress:100};default:return e}},$d=e=>{const[o,r]=p.useReducer(Ad,e||kd);return{state:o,dispatch:r}},Ur=({method:e,pathname:o,params:r,autoFetch:i=!1,showToastMessage:s=!0})=>{const{state:c,dispatch:a}=$d({data:null,error:"",loading:!1}),{data:d,error:l,loading:u,progress:g}=c,{toast:h}=Te(),x=async(m,f)=>{a({type:"REQUEST"});const w=setInterval(()=>{a({type:"PROGRESS"})},200);let b=m==null?void 0:m.baseURL;b||(b=Mt),so({...{url:o,baseURL:b,method:typeof e<"u"?e:"get",params:r},headers:Mr.headers,...m}).then(S=>{let{data:T,success:$}=S;T&&T.message&&s&&h({title:T.message}),T.id&&(T.video_id=T.id),e==="patch"&&(Array.isArray(T)&&(T=T.length>0?"SUCCESS":$),T=T===!0?"SUCCESS":"ERROR"),f>=0&&(T.id=f,T.data&&(T.data.id=f)),a({type:"SUCCESS",data:T}),clearInterval(w)}).catch(S=>{a({type:"FAILURE",error:S.message}),s&&h({title:S.message}),clearInterval(w)})};return i&&d==null&&u===!1&&!l&&x(),{data:d,loading:u,error:l,fetchData:x,progress:g}},is=()=>{const{data:e,error:o,loading:r,fetchData:i,progress:s}=Ur({pathname:""});return{videoData:e||null,loading:r,error:o,fetch:d=>{i({method:"post",url:"/videos",baseURL:Mt,data:{filename:d.filename,title:d.title}},d.hasOwnProperty("id")?d.id:void 0)},progress:s}},ss=()=>{const{data:e,error:o,loading:r,fetchData:i,progress:s}=Ur({pathname:""}),c=d=>{const{videoId:l}=d;return i({method:"post",url:`videos/${l}/encode`,baseURL:Mt})};return{encodeData:e&&(e.data||e.jobId)||null,loading:r,error:o,fetch:c,progress:s}},as=()=>{const{data:e,error:o,loading:r,fetchData:i}=Ur({});return{presignedUrl:e,loading:r,error:o,fetch:a=>{i({method:"get",url:`aws/signedurl?filename=${a.fileName}&filetype=${a.type}`,baseURL:Mt},a.hasOwnProperty("id")?a.id:void 0)}}},Wr=p.createContext({}),Rd=({children:e})=>{const[o,r]=p.useState({}),i={action:o,setAction:r};return t.jsx(Wr.Provider,{value:i,children:e})},Vd=()=>p.useContext(Wr),cs=({type:e,meta:o})=>({type:e,meta:o}),ls=({type:e,payload:o,meta:r})=>({type:e,payload:o,meta:r}),ds=({type:e,payload:o,meta:r,error:i=!0})=>({type:e,payload:o,meta:r,error:i});function Ld(e,o){switch(o.type){case"FETCH_REQUEST":return{...e,loading:!0,error:null};case"FETCH_SUCCESS":return{...e,data:o.payload,loading:!1,error:null};case"FETCH_FAILURE":return{...e,loading:!1,error:o.payload};default:return e}}const Md=e=>{const{action:o}=p.useContext(Wr);p.useEffect(()=>{e(o)},[o,e])},Dd={data:void 0,loading:!1,error:null},us=()=>{const[e,o]=p.useReducer(Ld,Dd),{error:r,loading:i,data:s}=e,{toast:c}=Te(),a=()=>{var l;return((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.indexOf("Firefox"))!==-1};Md(o);const d=p.useCallback(async l=>{o(cs({type:"FETCH_REQUEST"}));const u=g=>{l.onUploadProgress(g,l.hasOwnProperty("id")?l.id:void 0)};try{const g=a();await so.put(l.url,l.file,{headers:{"content-type":!g&&l.contentType?l.contentType:l.file.type},onUploadProgress:u}),o(ls({type:"FETCH_SUCCESS",payload:{success:!0,id:l.hasOwnProperty("id")?l.id:void 0}}));return}catch(g){if(g instanceof Error)throw c({message:g==null?void 0:g.message}),o(ds({type:"FETCH_FAILURE",payload:"Something wen wrong"})),new Error(g.message)}},[]);return{data:s,loading:i,error:r,uploadVideo:d}};function Od(e,o){switch(o.type){case"FETCH_REQUEST":return{...e,loading:!0,error:null};case"FETCH_SUCCESS":return{...e,data:o.payload,loading:!1,error:null};case"FETCH_FAILURE":return{...e,data:void 0,loading:!1,error:o.payload};default:return e}}const Nd=()=>{const{setAction:e}=Vd(),{toast:o}=Te(),{t:r}=H.useTranslation(),i={data:void 0,loading:!1,error:null,isValid:!1},[s,c]=p.useReducer(Od,i),a=async g=>{c(cs({type:"FETCH_REQUEST"}));try{const h=await Ea(g);return c(ls({type:"FETCH_SUCCESS",payload:h})),o({title:r("Transcription Started.")}),{data:d,loading:!1,error:null}}catch(h){return o({message:h}),c(ds({type:"FETCH_FAILURE",payload:"Something went wrong"})),e({type:"START_VIDEO_TRANSCRIPTION"}),Promise.reject({loading:!1,error:"Something went wrong"})}},{data:d,error:l,loading:u}=s;return{start:a,data:d,loading:u,error:l}},Pd=e=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},I.createElement("g",{fill:"#272A32"},I.createElement("path",{id:"bqn2hmlmqa",d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}))),ps=n(Pd)`
|
|
1108
1108
|
width: ${e=>e.width||"24px"};
|
|
1109
1109
|
height: ${e=>e.height||"24px"};
|
|
1110
1110
|
path {
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
line-height: 1.5;
|
|
1198
1198
|
text-align: center;
|
|
1199
1199
|
color: ${E.black_1_100};
|
|
1200
|
-
`,Ud=({accept:e=".csv, text/csv",inputStyle:o={},onDrop:r,width:i=528,height:s=100,marginTop:c=0,disabled:a=!1,textStyle:d,backgroundColor:l})=>{const{t:u}=
|
|
1200
|
+
`,Ud=({accept:e=".csv, text/csv",inputStyle:o={},onDrop:r,width:i=528,height:s=100,marginTop:c=0,disabled:a=!1,textStyle:d,backgroundColor:l})=>{const{t:u}=H.useTranslation(),g=(y,S)=>{switch(S.type){case"SET_DROP_DEPTH":return{...y,dropDepth:S.dropDepth};case"SET_IN_DROP_ZONE":return{...y,inDropZone:S.inDropZone};case"ADD_FILE_TO_LIST":let T=!0;for(let $ of S.files)T=e.includes($.name.substr(-4));return T?{...y,fileList:y.fileList.concat(S.files)}:y;default:return y}},[h,x]=p.useReducer(g,{dropDepth:0,inDropZone:!1,fileList:[]}),m=y=>{y.preventDefault(),y.stopPropagation(),x({type:"SET_DROP_DEPTH",dropDepth:h.dropDepth+1})},f=y=>{y.preventDefault(),y.stopPropagation(),!(y.target&&y.target.id.includes("text-"))&&(x({type:"SET_DROP_DEPTH",dropDepth:h.dropDepth-1}),x({type:"SET_IN_DROP_ZONE",inDropZone:!1}))},w=y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="copy",x({type:"SET_IN_DROP_ZONE",inDropZone:!0})},b=()=>{const y=document.getElementById("file");!y||!y.click||y.click()};return t.jsx(Fd,{width:i,height:s,marginTop:c,backgroundColor:l,children:t.jsx("div",{className:h.inDropZone?"drag-drop-zone inside-drag-area":"drag-drop-zone outside-drag-area",onDrop:y=>r(y),onDragOver:y=>w(y),onDragEnter:y=>m(y),onDragLeave:y=>f(y),children:t.jsxs(zd,{id:"text-browse",isActive:h.inDropZone,backgroundColor:l,children:[!h.inDropZone&&h.fileList.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(_d,{style:d,children:u("Drag and drop your files here or")}),h.inDropZone?t.jsx("input",{type:"button",value:"browse your files...",onClick:b}):t.jsx(Bd,{children:t.jsx(F.Button,{text:u("Browse files..."),icon:t.jsx(ps,{color:"#fff"}),disabled:a,onClick:b})})]}),h.inDropZone&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),t.jsx("p",{id:"text-drop",children:"Drop file here"})]}),h.fileList[0]&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),t.jsxs("p",{children:[h.fileList[0][0].name," is ready"]})]}),t.jsx("input",{className:"file",id:"file",type:"file",style:o,accept:e,onChange:y=>r(y),disabled:a})]})})})},Tn=n.div`
|
|
1201
1201
|
min-height: 400px;
|
|
1202
1202
|
position: relative;
|
|
1203
1203
|
`,Go=n.div`
|
|
@@ -1224,7 +1224,7 @@
|
|
|
1224
1224
|
padding: 10px 20px;
|
|
1225
1225
|
gap: 12px;
|
|
1226
1226
|
|
|
1227
|
-
${({theme:e})=>e.containerWidth<
|
|
1227
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
1228
1228
|
justify-content: space-between;
|
|
1229
1229
|
`}
|
|
1230
1230
|
`,Wd=n.div`
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
font-size: 16px;
|
|
1248
1248
|
border-radius: 0px;
|
|
1249
1249
|
|
|
1250
|
-
${({theme:e})=>e.containerWidth<
|
|
1250
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
1251
1251
|
font-size: 15px;
|
|
1252
1252
|
`}
|
|
1253
1253
|
`,Yd=n.div`
|
|
@@ -1261,7 +1261,7 @@
|
|
|
1261
1261
|
font-size: 16px;
|
|
1262
1262
|
border-radius: 0px;
|
|
1263
1263
|
|
|
1264
|
-
${({theme:e})=>e.containerWidth<
|
|
1264
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
1265
1265
|
font-size: 15px;
|
|
1266
1266
|
`}
|
|
1267
1267
|
`,Zd=n.div`
|
|
@@ -1274,7 +1274,7 @@
|
|
|
1274
1274
|
color: ${E.gray100};
|
|
1275
1275
|
background-color: white;
|
|
1276
1276
|
|
|
1277
|
-
${({theme:e})=>e.containerWidth<
|
|
1277
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
1278
1278
|
font-size: 16px;
|
|
1279
1279
|
`}
|
|
1280
1280
|
`,Kd=n.div`
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
color: ${({theme:e})=>e.colors.danger[100]};
|
|
1288
1288
|
height: 20px;
|
|
1289
1289
|
margin-top: 15px;
|
|
1290
|
-
`,kn=({progress:e,uploadingData:o,setUploadingData:r})=>{const i=[];let s=[],c=[],a=[];const{colors:d}=n.useTheme(),{t:l}=
|
|
1290
|
+
`,kn=({progress:e,uploadingData:o,setUploadingData:r})=>{const i=[];let s=[],c=[],a=[];const{colors:d}=n.useTheme(),{t:l}=H.useTranslation(),[u,g]=p.useState([{elementId:0,isTitleNotEmpty:!0}]);for(let f in o)i.push(o[f]),a=i.filter(w=>w.showActiveVideo===1),s=a.filter(w=>w.status===1),c=a.reduce((w,b)=>b.progressEvent.total+w,0);const h=(f,w)=>{u.filter(y=>y.elementId===f).forEach(y=>{const S=u.indexOf(y);S>=0&&g(u.splice(S,1))}),g([...u,{elementId:f,isTitleNotEmpty:!!w.trimStart()}]),r(y=>({...y,[f]:{...y[f],title:w}}))},x=f=>f.status>=1,m=f=>l(f===0?"Waiting...":f===1?"Uploading...":"Encoding...");return t.jsxs("div",{children:[!!e&&t.jsxs(Zd,{children:[t.jsx("span",{children:t.jsxs("b",{children:[s.length," of ",a.length]})})," ",l("videos uploading")," (",Uo(c)," MB)"]}),i.map(f=>t.jsxs(Wd,{children:[" ",f.showActiveVideo?t.jsxs(t.Fragment,{children:[t.jsxs(Hd,{style:{...x(f)&&{flexDirection:"column"}},children:[t.jsx(Zt,{maxLength:100,type:"text",value:f.title,readOnly:!!e,width:"100%",onChange:w=>h(f.id,w.target.value)}),x(f)&&t.jsxs("div",{style:{width:"100%",marginTop:"18px",backgroundColor:"white"},children:[t.jsx(qd,{style:{width:f.progressEvent.percentage+"%",backgroundColor:d.primary[100]}}),t.jsxs(Yd,{children:[t.jsx(Gd,{children:m(f.status)}),t.jsx(Qd,{children:Uo(f.progressEvent.loaded)+" MB/"+Uo(f.progressEvent.total)+" MB"})]})]})]}),u.map(w=>w.elementId===f.id&&!w.isTitleNotEmpty?t.jsx(Xd,{children:l("Video title is required!")},`error-${w.elementId}`):t.jsx("div",{},`el-${w.elementId}`))]}):""]},`Video-list-${f.id}`))]})},Jd={accept:"video/*,.mkv"},eu=({handleModalClose:e,onSuccess:o})=>{const{toast:r}=Te(),{userData:i}=ve(),{start:s}=Nd(),{isCdkEnviroment:c}=n.useTheme(),[a,d]=p.useState(0),[l,u]=p.useState({}),[g,h]=p.useState(!1),[x,m]=p.useState(!1),[f,w]=p.useState(!1),[b,y]=p.useState(0),[S,T]=p.useState([]),[$,k]=p.useState({loaded:0,total:0,percentage:0}),{presignedUrl:L,fetch:v,loading:j,error:R}=as(),{uploadVideo:V,loading:C,data:A,error:P}=us(),{fetch:M,loading:N,videoData:D,error:O}=is(),{fetch:W,loading:Y,encodeData:se}=ss();p.useEffect(()=>{if(!j&&!R&&Object.keys(l).length){d(1),y(1);const{id:K}=L||{id:-1};if(K===void 0)return;Object.keys(l).length&&(l[K].status=1,u(l)),V({url:L.url,file:l[K].file,onUploadProgress:_,id:L.id})}},[L]),p.useEffect(()=>{if(!C&&!P&&A&&Object.keys(l).length){const{id:K}=A||{id:-1};if(K===void 0)return;Object.keys(l).length&&(l[K].status=2,u(l));const q=l[K];y(2),M({filename:q.file.name,title:q.title,id:A.id})}},[C,A]),p.useEffect(()=>{a!==0&&(!l||!Object.keys(l).length)&&d(0);const K=[],q=[];Object.keys(l).forEach(he=>{K.push(!!(l[he].title&&l[he].title.trimStart())),q.push(l[he].title.length>100)}),K.includes(!1)?h(!0):q.includes(!0)?(r({title:ct.t("Video title can not be more than 100 characters!")}),h(!0)):h(!1)},[l]),p.useEffect(()=>{if(!N&&!O&&D&&Object.keys(l).length){y(3);const{id:K}=D||{id:-1};if(K===void 0)return;Object.keys(l).length&&(l[K].status=3,u(l)),T([Number(D.video_id)]),W({videoId:D.video_id,customerId:i.customerId})}},[N,D]),p.useEffect(()=>{!Y&&se&&S.length===Object.keys(l).length&&!Object.values(l).some(K=>K.status<3)&&(ne(),o(S),e())},[N,se,S]);const Z=async K=>{for(let q=0;q<K.length;q++){if(!/.*\.(avchd|swf|flv|mov|qt|wmv|mkv|m4v|m4p|mpv|mp2|mpe|mpg|ogg|mp4|avi|webm|mpeg)/i.test(K[q].name)){r({title:ct.t("{{name}} is of invalid type and won't be uploaded.",{name:K[q].name})});continue}const Ee=K[q].name.split("."),Ie=Ee[1]==="mkv"?"video/x-matroska":K[q].type,Ne=new File([K[q]],Di(i,Ee[Ee.length-1]),{type:Ie,lastModified:K[q].lastModified});u(U=>{const pe={...U};let ye=0;if(Object.keys(U).length){const Le=Object.keys(U);ye=parseInt(Le[Le.length-1],10)+1}return pe[ye]={id:ye,file:Ne,title:Ee[0],progressEvent:{loaded:0,total:0,percentage:0},status:0,showActiveVideo:1},pe})}},X=async K=>{K.preventDefault(),K.stopPropagation();const q=K.dataTransfer||K.target;q&&q.files&&q.files.length?await Z(q.files):r({title:ct.t("Oops! Something went wrong, try again in a few moments.")})},G=()=>{if(b===0)return e();w(!0)},re=()=>{m(!0),Object.keys(l).forEach(K=>{const q=l[K].file;v({fileName:q.name,type:q.type,id:parseInt(K,10)})})},_=(K,q)=>{const he=Math.round(K.loaded*100/K.total);if(q===void 0||!l[q])return;const Ee={...l};Ee[q].progressEvent={loaded:Math.floor(K.loaded/1024),total:Math.floor(K.total/1024),percentage:he},u(Ee),k({loaded:Math.floor(K.loaded/1024),total:Math.floor(K.total/1024),percentage:he})},ne=()=>{if(i.autoTranscribe&&D&&D.id)try{setTimeout(()=>{s(D.id)},5e3)}catch(K){console.log(K)}},ae=!!Object.keys(l).length,ue=({disabled:K=!1,onClick:q=re,title:he})=>{const Ee=he||ct.t("Upload");return t.jsx(F.Button,{text:Ee,onClick:q,disabled:K})},xe=t.jsxs(Tn,{children:[t.jsx(Go,{style:{...!ae&&{backgroundColor:"transparent",marginTop:0,maxHeight:"400px"}},children:ae?t.jsx(kn,{uploadingData:l,setUploadingData:u,progress:b}):t.jsx(Ud,{onDrop:X,marginTop:0,height:350,width:440,accept:Jd.accept})}),ae&&t.jsxs(Yo,{children:[t.jsx(F.Button,{text:ct.t("Cancel"),variant:c?"text":"secondary",onClick:G}),t.jsx(ue,{disabled:g||x})]})]}),Se=t.jsxs(t.Fragment,{children:[t.jsx(Go,{children:t.jsx(kn,{uploadingData:l,setUploadingData:u,progress:b})}),t.jsxs(Yo,{style:{justifyContent:"right"},children:[t.jsx(F.Button,{text:ct.t("Cancel"),variant:c?"text":"secondary",onClick:G}),t.jsx(ue,{disabled:!0})]})]}),ke=t.jsxs(t.Fragment,{children:[t.jsx(Go,{children:t.jsx(Kd,{children:ct.t("You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?")})}),t.jsxs(Yo,{children:[t.jsx(F.Button,{text:ct.t("Cancel"),variant:c?"text":"secondary",onClick:e}),t.jsx(ue,{title:ct.t("Continue Upload"),onClick:()=>w(!1)})]})]});return[xe,t.jsx(Tn,{children:f?ke:Se})][a]},tu=n.div`
|
|
1291
1291
|
display: flex;
|
|
1292
1292
|
justify-content: space-between;
|
|
1293
1293
|
align-items: center;
|
|
@@ -1295,7 +1295,7 @@
|
|
|
1295
1295
|
`,ou=n.div`
|
|
1296
1296
|
font-weight: bold;
|
|
1297
1297
|
font-size: 18px;
|
|
1298
|
-
`,ru=({handleModalClose:e,disabled:o,onSuccess:r})=>{const{t:i}=
|
|
1298
|
+
`,ru=({handleModalClose:e,disabled:o,onSuccess:r})=>{const{t:i}=H.useTranslation();return t.jsxs(Io,{disableFullScreen:!0,children:[t.jsxs(tu,{children:[t.jsx(ou,{children:i("Upload new video")}),t.jsx(Sc,{style:{position:"static",padding:0,height:"fit-content",width:"fit-content"},disabled:o,onClick:e})]}),t.jsx(eu,{handleModalClose:e,onSuccess:r})]})},nu=({vin:e=""})=>we.useQuery(["GTM_VIN",e],async()=>Dr({search:e,soldFilter:"2"}),{refetchOnWindowFocus:!1,staleTime:0,enabled:!!e});function bt({vin:e}){var g,h,x,m,f;const{isCdkEnviroment:o}=n.useTheme(),{data:r,isSuccess:i}=nu({vin:o?e:""}),{userData:s}=ve(),c=de.useLocation(),a=e?(g=r==null?void 0:r.items)==null?void 0:g[0]:void 0,d={user_id:(s==null?void 0:s.eleadDMSEmployeeID)||void 0,enterprise_id:((h=s==null?void 0:s.customer)==null?void 0:h.cdkEnterpriseId)||void 0,store_id:((x=s==null?void 0:s.customer)==null?void 0:x.cdkStoreId)||void 0,store_name:((m=s==null?void 0:s.customer)==null?void 0:m.business)||void 0,is_internal_user:(f=s==null?void 0:s.email)==null?void 0:f.includes("cdk")},l=oo(a),u=p.useCallback(({pageLocation:w,pageSection:b,videoAttributes:y,excludeVehicleData:S=!1,vehicle:T,mergeIds:$,pageUrl:k})=>{const L=ao(y),j={...{event:We.COVIDEO_PAGEVIEW,application:Ji.CRM_VIDEO_EMBED,page_url:k,page_location:w||void 0,page_section:b||void 0},...d,...L,...S?{}:l,...T,...$?{merge_ids:$}:{}};Je(j)},[c.pathname,s,l.vin]);return{trackVideoSpecificPagesManually:o?u:void 0,vehiceReady:i}}const hs="lastSelectedFolderEmbed",iu=()=>{const e=localStorage.getItem(hs);return e?JSON.parse(e):null},su=e=>{localStorage.setItem(hs,JSON.stringify(e))},au=e=>{const r=iu();return!(r&&Number(r.userId)===e)||r.folderId===void 0?-2:(r==null?void 0:r.folderId)===Be.value?Be.value:Number(r.folderId)},cu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.isUsingVinReels)},lu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.spotlightEnabled)&&!!Number(e==null?void 0:e.spotlightEnabled)},du=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.spotlightEnabled)},uu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideosEnabled)},pu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.suggestedContentEnabled)},hu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideoAvatarEnabled)&&!!Number(e==null?void 0:e.quickVideoAvatarEnabled)},gu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideoAvatarEnabled)},mu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.aiMusicEnabled)},xu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.hasCovideoMagic)},fu=()=>{const{userData:e}=ve();return p.useMemo(()=>({isAIScriptsEnabled:xu(e),isAIAssistantEnabled:hu(e),isAIAssistantEnabledForCustomer:gu(e),isVinReelsEnabled:cu(e),isAISpotlightEnabled:lu(e),isAISpotlightEnabledForCustomer:du(e),isQuickVideosEnabled:uu(e),isSuggestedContentEnabled:pu(e),isAIMusicEnabled:mu(e)}),[e])},vu=()=>{const{isVinReelsEnabled:e,isQuickVideosEnabled:o,isAISpotlightEnabled:r,isAIAssistantEnabled:i}=fu();return p.useMemo(()=>{const s=i||e||r,c=e||o,a=s||c,d=r||i,l=o;return{isPronunciationAvailable:s,isDealershipHighlightsAvailable:c,isPersonalizationAvailable:a,isAIAssistantsAvailable:d,isQuickVideosAvailable:l,isVinReelsAvailable:e,isAIConfigurationAvailable:a||d||l}},[e,o,r,i])},bu=n.div`
|
|
1299
1299
|
position: absolute;
|
|
1300
1300
|
top: calc(100% + 6px); // space below the trigger
|
|
1301
1301
|
right: 0;
|
|
@@ -1308,7 +1308,7 @@
|
|
|
1308
1308
|
flex-direction: column;
|
|
1309
1309
|
gap: 10px;
|
|
1310
1310
|
z-index: 999;
|
|
1311
|
-
${({theme:e})=>e.containerWidth<=
|
|
1311
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
1312
1312
|
right: -32px;
|
|
1313
1313
|
`}
|
|
1314
1314
|
`,wu=n.button`
|
|
@@ -1408,13 +1408,13 @@
|
|
|
1408
1408
|
border-width: 1px;
|
|
1409
1409
|
padding: 7px;
|
|
1410
1410
|
gap: 12px;
|
|
1411
|
-
`,Tu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M16.8318 10.0099V10.9675C16.7829 10.9675 16.7387 10.9675 16.6946 10.9675C15.5974 10.9675 14.5003 10.9663 13.4025 10.9693C13.2903 10.9693 13.1746 10.9824 13.0666 11.0122C12.9079 11.0564 12.8303 11.181 12.8321 11.3475C12.8345 11.5217 12.9073 11.6196 13.0809 11.6667C13.1537 11.6864 13.2295 11.7013 13.3046 11.7043C14.0289 11.7299 14.7538 11.7502 15.4781 11.7771C15.7018 11.7854 15.9267 11.7962 16.1469 11.8302C16.5908 11.8982 16.8551 12.1655 16.947 12.6022C17.0215 12.9584 17.0251 13.3163 16.947 13.6719C16.8402 14.1569 16.4983 14.4451 15.9828 14.4898C15.8206 14.5036 15.6571 14.5113 15.4942 14.5119C14.2562 14.5137 13.0189 14.5131 11.7809 14.5131C11.7356 14.5131 11.6902 14.5131 11.6341 14.5131V13.5484C11.6807 13.5484 11.7248 13.5484 11.769 13.5484C12.8661 13.5484 13.9633 13.5496 15.0611 13.5466C15.181 13.5466 15.3039 13.5329 15.4196 13.5031C15.5765 13.4625 15.6535 13.3563 15.6613 13.2107C15.6714 13.0335 15.607 12.9005 15.4501 12.8474C15.3194 12.8032 15.178 12.7764 15.0396 12.7704C14.3344 12.74 13.6286 12.7227 12.9234 12.6923C12.7045 12.6827 12.4825 12.6666 12.2689 12.6207C11.8215 12.5246 11.587 12.2466 11.5214 11.7371C11.4808 11.4209 11.488 11.1017 11.5661 10.7897C11.6944 10.2748 12.0124 10.0117 12.5678 10.0081C13.9764 9.99857 15.385 10.0051 16.7936 10.0051C16.8008 10.0051 16.8085 10.0075 16.8306 10.0117L16.8318 10.0099Z",fill:"#214099"}),t.jsx("path",{d:"M6.16772 10.0088H11.0426V11.035H7.54053C7.54053 11.2873 7.53933 11.5248 7.54291 11.7622C7.54291 11.7801 7.57692 11.807 7.59959 11.8135C7.63121 11.8225 7.66701 11.8171 7.70161 11.8171C8.69258 11.8171 9.68355 11.8171 10.6751 11.8171C10.7809 11.8171 10.834 11.8714 10.8344 11.98C10.8344 12.1805 10.8296 12.3815 10.8362 12.582C10.8398 12.6864 10.8058 12.7168 10.7002 12.7168C9.70145 12.7132 8.70272 12.7144 7.704 12.7144C7.65507 12.7144 7.60615 12.7144 7.53993 12.7144C7.53993 12.9554 7.53874 13.1887 7.54232 13.422C7.54232 13.4405 7.57513 13.4679 7.5972 13.4745C7.62882 13.484 7.66462 13.4781 7.69922 13.4781C8.76238 13.4781 9.82554 13.4781 10.8893 13.4781H11.0426V14.5048H6.16832V10.0088H6.16772Z",fill:"#214099"}),t.jsx("path",{d:"M16.8557 14.5122C16.981 14.2801 17.0973 14.0641 17.2143 13.8488C17.8878 12.6084 18.5626 11.3693 19.232 10.1271C19.2851 10.0287 19.3424 9.99884 19.451 10C19.9635 10.006 20.4759 10.0036 20.9884 10.0018C21.0523 10.0018 21.0905 10.0173 21.1227 10.0776C21.9024 11.5309 22.684 12.9837 23.4656 14.4364C23.4757 14.4555 23.4841 14.4764 23.5002 14.5128C23.4184 14.5128 23.3486 14.5128 23.2788 14.5128C22.8803 14.5128 22.4817 14.511 22.0832 14.5146C22.0062 14.5152 21.9615 14.4967 21.9251 14.4227C21.8249 14.2193 21.7127 14.0218 21.6083 13.8201C21.5785 13.7629 21.5421 13.7396 21.4759 13.7396C20.6144 13.742 19.7523 13.742 18.8907 13.7396C18.8233 13.7396 18.7881 13.7646 18.7589 13.8207C18.6497 14.0283 18.5399 14.236 18.4236 14.4394C18.4045 14.4734 18.352 14.5092 18.315 14.5098C17.8371 14.5146 17.3587 14.5128 16.8569 14.5128L16.8557 14.5122ZM21.0541 12.7749C20.7611 12.2236 20.4771 11.689 20.18 11.1306C19.8835 11.689 19.5989 12.2248 19.306 12.7749H21.0535H21.0541Z",fill:"#214099"}),t.jsx("path",{d:"M5.88986 14.509H1.5V10.0088H2.87041V10.1412C2.87041 11.1787 2.87041 12.2168 2.87041 13.2543C2.87041 13.456 2.84834 13.4321 3.04343 13.4327C3.94312 13.4333 4.84341 13.4327 5.74309 13.4327C5.78844 13.4327 5.83378 13.4327 5.88867 13.4327V14.5084L5.88986 14.509Z",fill:"#214099"})]}),ku=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8.01135 7.31074L8.13763 16.7994C8.15144 17.8372 9.27808 18.4745 10.1758 17.9536L18.1748 13.3109C19.0686 12.792 19.0765 11.5016 18.1886 10.9728L10.0634 6.12688C9.1518 5.58428 7.99754 6.24922 8.01135 7.31074Z",fill:"#E91524"}),t.jsx("path",{d:"M12.5 23C18.5751 23 23.5 18.0751 23.5 12C23.5 5.92487 18.5751 1 12.5 1C6.42487 1 1.5 5.92487 1.5 12C1.5 18.0751 6.42487 23 12.5 23Z",stroke:"#231F20","stroke-width":"1.18386","stroke-miterlimit":"10"})]}),Iu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4C2.5 3.44772 2.94772 3 3.5 3H21.5C22.0523 3 22.5 3.44772 22.5 4V14C22.5 14.5523 22.0523 15 21.5 15H3.5C2.94772 15 2.5 14.5523 2.5 14V4ZM14.3216 8.576C14.6349 8.77183 14.6349 9.22817 14.3216 9.424L11.765 11.0219C11.432 11.23 11 10.9906 11 10.5979V7.40212C11 7.00941 11.432 6.76998 11.765 6.97812L14.3216 8.576Z",fill:"#272A32"}),t.jsx("path",{d:"M3.5 17C2.94772 17 2.5 17.4477 2.5 18V20C2.5 20.5523 2.94772 21 3.5 21H21.5C22.0523 21 22.5 20.5523 22.5 20V18C22.5 17.4477 22.0523 17 21.5 17H3.5Z",fill:"#272A32"})]}),Au=()=>{var k,L,v,j;const{colors:e}=n.useTheme(),[o,r]=p.useState(!1),{showWheelsTVFeature:i,showLesaTVFeature:s,showVinReelsFeature:c}=Ce(),{t:a}=
|
|
1411
|
+
`,Tu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M16.8318 10.0099V10.9675C16.7829 10.9675 16.7387 10.9675 16.6946 10.9675C15.5974 10.9675 14.5003 10.9663 13.4025 10.9693C13.2903 10.9693 13.1746 10.9824 13.0666 11.0122C12.9079 11.0564 12.8303 11.181 12.8321 11.3475C12.8345 11.5217 12.9073 11.6196 13.0809 11.6667C13.1537 11.6864 13.2295 11.7013 13.3046 11.7043C14.0289 11.7299 14.7538 11.7502 15.4781 11.7771C15.7018 11.7854 15.9267 11.7962 16.1469 11.8302C16.5908 11.8982 16.8551 12.1655 16.947 12.6022C17.0215 12.9584 17.0251 13.3163 16.947 13.6719C16.8402 14.1569 16.4983 14.4451 15.9828 14.4898C15.8206 14.5036 15.6571 14.5113 15.4942 14.5119C14.2562 14.5137 13.0189 14.5131 11.7809 14.5131C11.7356 14.5131 11.6902 14.5131 11.6341 14.5131V13.5484C11.6807 13.5484 11.7248 13.5484 11.769 13.5484C12.8661 13.5484 13.9633 13.5496 15.0611 13.5466C15.181 13.5466 15.3039 13.5329 15.4196 13.5031C15.5765 13.4625 15.6535 13.3563 15.6613 13.2107C15.6714 13.0335 15.607 12.9005 15.4501 12.8474C15.3194 12.8032 15.178 12.7764 15.0396 12.7704C14.3344 12.74 13.6286 12.7227 12.9234 12.6923C12.7045 12.6827 12.4825 12.6666 12.2689 12.6207C11.8215 12.5246 11.587 12.2466 11.5214 11.7371C11.4808 11.4209 11.488 11.1017 11.5661 10.7897C11.6944 10.2748 12.0124 10.0117 12.5678 10.0081C13.9764 9.99857 15.385 10.0051 16.7936 10.0051C16.8008 10.0051 16.8085 10.0075 16.8306 10.0117L16.8318 10.0099Z",fill:"#214099"}),t.jsx("path",{d:"M6.16772 10.0088H11.0426V11.035H7.54053C7.54053 11.2873 7.53933 11.5248 7.54291 11.7622C7.54291 11.7801 7.57692 11.807 7.59959 11.8135C7.63121 11.8225 7.66701 11.8171 7.70161 11.8171C8.69258 11.8171 9.68355 11.8171 10.6751 11.8171C10.7809 11.8171 10.834 11.8714 10.8344 11.98C10.8344 12.1805 10.8296 12.3815 10.8362 12.582C10.8398 12.6864 10.8058 12.7168 10.7002 12.7168C9.70145 12.7132 8.70272 12.7144 7.704 12.7144C7.65507 12.7144 7.60615 12.7144 7.53993 12.7144C7.53993 12.9554 7.53874 13.1887 7.54232 13.422C7.54232 13.4405 7.57513 13.4679 7.5972 13.4745C7.62882 13.484 7.66462 13.4781 7.69922 13.4781C8.76238 13.4781 9.82554 13.4781 10.8893 13.4781H11.0426V14.5048H6.16832V10.0088H6.16772Z",fill:"#214099"}),t.jsx("path",{d:"M16.8557 14.5122C16.981 14.2801 17.0973 14.0641 17.2143 13.8488C17.8878 12.6084 18.5626 11.3693 19.232 10.1271C19.2851 10.0287 19.3424 9.99884 19.451 10C19.9635 10.006 20.4759 10.0036 20.9884 10.0018C21.0523 10.0018 21.0905 10.0173 21.1227 10.0776C21.9024 11.5309 22.684 12.9837 23.4656 14.4364C23.4757 14.4555 23.4841 14.4764 23.5002 14.5128C23.4184 14.5128 23.3486 14.5128 23.2788 14.5128C22.8803 14.5128 22.4817 14.511 22.0832 14.5146C22.0062 14.5152 21.9615 14.4967 21.9251 14.4227C21.8249 14.2193 21.7127 14.0218 21.6083 13.8201C21.5785 13.7629 21.5421 13.7396 21.4759 13.7396C20.6144 13.742 19.7523 13.742 18.8907 13.7396C18.8233 13.7396 18.7881 13.7646 18.7589 13.8207C18.6497 14.0283 18.5399 14.236 18.4236 14.4394C18.4045 14.4734 18.352 14.5092 18.315 14.5098C17.8371 14.5146 17.3587 14.5128 16.8569 14.5128L16.8557 14.5122ZM21.0541 12.7749C20.7611 12.2236 20.4771 11.689 20.18 11.1306C19.8835 11.689 19.5989 12.2248 19.306 12.7749H21.0535H21.0541Z",fill:"#214099"}),t.jsx("path",{d:"M5.88986 14.509H1.5V10.0088H2.87041V10.1412C2.87041 11.1787 2.87041 12.2168 2.87041 13.2543C2.87041 13.456 2.84834 13.4321 3.04343 13.4327C3.94312 13.4333 4.84341 13.4327 5.74309 13.4327C5.78844 13.4327 5.83378 13.4327 5.88867 13.4327V14.5084L5.88986 14.509Z",fill:"#214099"})]}),ku=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8.01135 7.31074L8.13763 16.7994C8.15144 17.8372 9.27808 18.4745 10.1758 17.9536L18.1748 13.3109C19.0686 12.792 19.0765 11.5016 18.1886 10.9728L10.0634 6.12688C9.1518 5.58428 7.99754 6.24922 8.01135 7.31074Z",fill:"#E91524"}),t.jsx("path",{d:"M12.5 23C18.5751 23 23.5 18.0751 23.5 12C23.5 5.92487 18.5751 1 12.5 1C6.42487 1 1.5 5.92487 1.5 12C1.5 18.0751 6.42487 23 12.5 23Z",stroke:"#231F20","stroke-width":"1.18386","stroke-miterlimit":"10"})]}),Iu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4C2.5 3.44772 2.94772 3 3.5 3H21.5C22.0523 3 22.5 3.44772 22.5 4V14C22.5 14.5523 22.0523 15 21.5 15H3.5C2.94772 15 2.5 14.5523 2.5 14V4ZM14.3216 8.576C14.6349 8.77183 14.6349 9.22817 14.3216 9.424L11.765 11.0219C11.432 11.23 11 10.9906 11 10.5979V7.40212C11 7.00941 11.432 6.76998 11.765 6.97812L14.3216 8.576Z",fill:"#272A32"}),t.jsx("path",{d:"M3.5 17C2.94772 17 2.5 17.4477 2.5 18V20C2.5 20.5523 2.94772 21 3.5 21H21.5C22.0523 21 22.5 20.5523 22.5 20V18C22.5 17.4477 22.0523 17 21.5 17H3.5Z",fill:"#272A32"})]}),Au=()=>{var k,L,v,j;const{colors:e}=n.useTheme(),[o,r]=p.useState(!1),{showWheelsTVFeature:i,showLesaTVFeature:s,showVinReelsFeature:c}=Ce(),{t:a}=H.useTranslation(),{userData:d}=ve(),l=de.useHistory(),{isVinReelsAvailable:u}=vu(),g=nt(d),h=()=>{r(!1)},{ref:x}=zr(h),m=!g&&!!Number(d.customer.wheelsTV),f=!!Number(d.customer.lesaAccess),w=[m?a("Wheels TV"):"",f?a("Lesa"):"",u?a("VINReels"):""].filter(Boolean),y=(R=>{const V=R.pop();return`${R.join(", ")} & ${V}`})([...w]),T=w.length>=2,$=[{label:t.jsx(xt,{children:a("Wheels TV")}),icon:ku,onClick:()=>{r(!1),l.push("/wheels-tv")},showItem:m&&i},{label:t.jsx(xt,{children:a("Lesa")}),icon:Tu,onClick:()=>{r(!1),l.push("/lesa-tv")},showItem:f&&s},{label:t.jsx(xt,{children:a("VINReels")}),icon:Iu,onClick:()=>{r(!1),l.push("/vinreels")},showItem:u&&c}];return!s&&!i&&!c?t.jsx(t.Fragment,{}):t.jsxs(t.Fragment,{children:[T&&t.jsxs("div",{ref:x,style:{position:"relative",display:"inline-block"},children:[t.jsx(F.Tooltip,{extendStyles:{element:{width:"100%",maxWidth:"200px"},popup:{padding:"10px"}},popup:t.jsx(pt,{children:y}),children:t.jsxs(Eu,{onClick:()=>r(R=>!R),children:[t.jsx(Ri.IoCarSport,{size:24,color:((L=(k=e.secondary)==null?void 0:k.text)==null?void 0:L.color)||e.secondary[100]}),t.jsx(Js.BiChevronDown,{size:20,color:((j=(v=e.secondary)==null?void 0:v.text)==null?void 0:j.color)||e.secondary[100]})]})}),!!o&&t.jsx(yu,{dropdownItems:$})]}),i?!T&&m&&t.jsx(F.Button,{onClick:()=>l.push("/wheels-tv"),icon:t.jsx(be.IoMdCar,{size:18}),text:"WheelsTV",variant:"white"}):null,s?!T&&f&&t.jsx(F.Button,{onClick:()=>l.push("/lesa-tv"),icon:t.jsx(be.IoMdCar,{size:18}),text:"LesaTV",variant:"white"}):null,c?!T&&u&&t.jsx(F.Button,{onClick:()=>l.push("/vinreels"),icon:t.jsx(be.IoMdCar,{size:18}),text:"VinReels",variant:"white"}):null]})},$u=n.div`
|
|
1412
1412
|
background: ${E.gray10};
|
|
1413
1413
|
`,Ru=n.div`
|
|
1414
1414
|
display: flex;
|
|
1415
1415
|
justify-content: space-between;
|
|
1416
1416
|
gap: 16px;
|
|
1417
|
-
${({theme:e})=>e.containerWidth<
|
|
1417
|
+
${({theme:e})=>e.containerWidth<B.cmd&&n.css`
|
|
1418
1418
|
flex-direction: column;
|
|
1419
1419
|
`}
|
|
1420
1420
|
`,Qo=n.div`
|
|
@@ -1426,7 +1426,7 @@
|
|
|
1426
1426
|
flex-shrink: 0;
|
|
1427
1427
|
}
|
|
1428
1428
|
flex-wrap: wrap;
|
|
1429
|
-
${({theme:e})=>e.containerWidth<
|
|
1429
|
+
${({theme:e})=>e.containerWidth<B.cmd&&n.css`
|
|
1430
1430
|
justify-content: flex-end;
|
|
1431
1431
|
`}
|
|
1432
1432
|
`,Vu=n.div`
|
|
@@ -1434,12 +1434,12 @@
|
|
|
1434
1434
|
gap: 8px;
|
|
1435
1435
|
justify-content: flex-end;
|
|
1436
1436
|
align-items: center;
|
|
1437
|
-
${({theme:e})=>e.containerWidth<
|
|
1437
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
1438
1438
|
width: 100%;
|
|
1439
1439
|
`}
|
|
1440
1440
|
`,Lu=n.div`
|
|
1441
1441
|
width: 190px;
|
|
1442
|
-
${({theme:e})=>e.containerWidth<
|
|
1442
|
+
${({theme:e})=>e.containerWidth<B.cmd&&n.css`
|
|
1443
1443
|
width: 100%;
|
|
1444
1444
|
`}
|
|
1445
1445
|
`,Mu=n.div`
|
|
@@ -1447,13 +1447,13 @@
|
|
|
1447
1447
|
gap: 24px;
|
|
1448
1448
|
margin: 24px 0;
|
|
1449
1449
|
grid-template-columns: repeat(3, 1fr);
|
|
1450
|
-
${({theme:e})=>e.containerWidth<
|
|
1450
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
1451
1451
|
grid-template-columns: 1fr 1fr;
|
|
1452
1452
|
`}
|
|
1453
|
-
${({theme:e})=>e.containerWidth<
|
|
1453
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
1454
1454
|
grid-template-columns: 1fr;
|
|
1455
1455
|
`}
|
|
1456
|
-
`,eo={folderId:-2,name:"Primary",isDeletable:!1},Zo=0,Du=6,Ou="cds-folders",Nu=({handleUpdateToken:e})=>{const{trackVideoSpecificPagesManually:o}=bt({vin:""}),{trackGTMVideoInteractionEvent:r}=He(),{colors:i,isCdkEnviroment:s}=n.useTheme(),{userData:c}=
|
|
1456
|
+
`,eo={folderId:-2,name:"Primary",isDeletable:!1},Zo=0,Du=6,Ou="cds-folders",Nu=({handleUpdateToken:e})=>{const{trackVideoSpecificPagesManually:o}=bt({vin:""}),{trackGTMVideoInteractionEvent:r}=He(),{colors:i,isCdkEnviroment:s}=n.useTheme(),{userData:c}=ve(),{toast:a}=Te(),{showMergeFeature:d,showWheelsTVFeature:l,showLesaTVFeature:u,showRecordFeature:g,showUploadFeature:h,showFolderFeature:x,containerWidth:m,onUploadButtonClick:f,onRecordButtonClick:w}=Ce(),[b,y]=p.useState(!1),[S,T]=p.useState([]),[$,k]=p.useState(!1);Ke(c),ut(c);const[L,v]=p.useState(0),{t:j}=H.useTranslation(),R=de.useHistory(),[V,C]=p.useState({page:Zo,size:Du,folderId:eo.folderId,searchQuery:""}),{data:A,isLoading:P}=we.useQuery(Ou,va,{refetchOnWindowFocus:!1,staleTime:5e8,select:ee=>{let ce=[...ee];return c.automotiveRole===mt.TECHNICIAN&&(ce=ee.filter(K=>K.name!==_t.VAULT&&K.name!==_t.PRIVATE)),ce}}),M=A?Gt.keyBy(A,"folderId"):{},N=M[V.folderId]||eo,D=!!(N!=null&&N.access);let O=M[V.folderId]?M[V.folderId].name:eo.name;D&&(O=`${fa}${V.folderId}`),O=O===Be.label?Be.value:O;const{data:W,isLoading:Y}=we.useQuery(["cds-videos",V],async()=>ba({folder:O,search:V.searchQuery,size:V.size,page:V.page}),{refetchOnWindowFocus:!1,enabled:!!(A!=null&&A.length)}),{count:se,videos:Z}=W||{count:0,videos:[]},X=Object.values(_t),G=(A==null?void 0:A.filter(Boolean).filter(ee=>ee.folderId!==Be.value).map(ee=>({value:ee.folderId,label:X.includes(ee.name)?j(`${ee.name}`):ee.name})).concat([{value:Be.value,label:j("All folders")}]))||[],re=ee=>{const ce=ee.toLowerCase();C(K=>({...K,page:Zo,searchQuery:ce}))},_=()=>{y(!1),localStorage.removeItem(Fe.merge),T([])},ne=ee=>{ee.toString()===xa.toString()&&_(),su({folderId:ee,userId:c.userId}),C(ce=>({...ce,page:Zo,folderId:ee}))},ae=ee=>{ee==="left"&&C(ce=>({...ce,page:ce.page-1})),ee==="right"&&C(ce=>({...ce,page:ce.page+1}))},ue=()=>{localStorage.setItem(Fe.merge,JSON.stringify(S));const ee=S.map(ce=>ce.id).filter(Boolean).join(",");r==null||r({action:Ut.MERGE,videoIds:S.map(ce=>Number(ce.id))}),R.push(`/merge/?videos=${ee}`)},xe=async ee=>{ee.length&&v(ee[0])};p.useEffect(()=>{var ce;const ee=(ce=c.customer)==null?void 0:ce.packageId;(Number(ee)===Sr.FREE||Number(ee)===Sr.PRO)&&(a({message:j("Please upgrade you account to use eLead integration.")}),e(""),R.go(0))},[]),p.useEffect(()=>{const ee=localStorage.getItem(Fe.merge);if(ee)try{const ce=JSON.parse(ee)||[];T(ce),y(!!ce.length)}catch{localStorage.removeItem(Fe.merge)}},[]),p.useEffect(()=>{o==null||o({...vt.VIDEOS_OVERVIEW})},[]),p.useEffect(()=>{if(!c.userId)return;const ee=au(Number(c.userId));C(ce=>({...ce,folderId:ee}))},[c.userId]),p.useEffect(()=>{L&&R.push(`/preview-upload/${L}`)},[L]);const Se=Y||P,ke=(N==null?void 0:N.name)===_t.COMPANY;return t.jsxs($u,{children:[t.jsx(Ze,{left:t.jsx(ns,{handleUpdateToken:e}),center:t.jsx(yo,{}),right:t.jsxs(t.Fragment,{children:[h&&t.jsx(F.Button,{onClick:f?()=>f(_e):()=>k(!0),variant:s?"white":"secondary",text:m>B.sm?j("Upload"):"",icon:t.jsx(Q.MdUpload,{size:22})}),g&&t.jsx(F.Button,{onClick:w?()=>w(_e):()=>R.push("/record/home"),text:m>B.sm?j("Record"):"",icon:t.jsx(Q.MdVideocam,{size:22}),variant:s?"white":"red"})]})}),t.jsxs(dt,{children:[t.jsxs(Ru,{children:[t.jsxs(Qo,{children:[t.jsx(ld,{handleSearch:re,prevSearch:V.searchQuery}),x&&t.jsx(Lu,{children:t.jsx(De,{options:G,value:G.find(ee=>ee.value===(V==null?void 0:V.folderId))||eo,placeholder:j("All folders"),onChange:ee=>ne((ee==null?void 0:ee.value)??eo.folderId),isLoading:P,isSearchable:!1,creatable:!1,disabled:P})})]}),(l||d||u)&&t.jsxs(t.Fragment,{children:[!b&&t.jsxs(Qo,{children:[t.jsx(Au,{}),d&&t.jsx(F.Button,{onClick:()=>ke?{}:y(!0),text:j("Merge Videos"),variant:"white",disabled:ke})]}),b&&t.jsxs(Qo,{children:[t.jsx(F.Button,{onClick:_,text:j("Cancel"),variant:"white"}),t.jsx(F.Tooltip,{position:"top",hoverable:!(S.length>=2&&S.length<=9),children:t.jsx(F.Button,{onClick:ue,text:j("Merge Videos"),disabled:ke||S.length<2||S.length>9}),popup:t.jsxs(t.Fragment,{children:[S.length<2&&j("Select 2+ videos to merge"),S.length>9&&j("Select maximum 9 videos")]}),extendStyles:{popup:{left:40,...s?{color:i.white[100],background:i.black[100]}:{}}}})]})]})]}),t.jsxs(t.Fragment,{children:[!Se&&!!Z.length&&t.jsxs(t.Fragment,{children:[t.jsx(Mu,{children:Z.map((ee,ce)=>t.jsx(es,{video:ee,isMerge:b,selectedVideosData:S,setSelectedVideosData:T},ee.id))}),t.jsxs(Vu,{children:[t.jsx(Ed,{page:V.page,size:V.size,count:se}),t.jsx(F.Button,{onClick:()=>ae("left"),icon:t.jsx(Q.MdChevronLeft,{size:22}),disabled:V.page===0,variant:"white",size:"small"}),t.jsx(F.Button,{onClick:()=>ae("right"),icon:t.jsx(Q.MdChevronRight,{size:22}),disabled:Z.length<V.size||(V.page+1)*V.size>=se,variant:"white",size:"small"})]})]}),Se&&t.jsx(En,{message:j("Loading..."),size:V.size}),!Se&&!Z.length&&t.jsx(En,{message:j("No videos match your query"),size:V.size})]})]}),$&&t.jsx(ru,{handleModalClose:()=>k(!1),onSuccess:xe})]})},Hr=n.keyframes`
|
|
1457
1457
|
from { opacity: 0; transform: translateY(10px); }
|
|
1458
1458
|
to { opacity: 1; transform: translateY(0); }
|
|
1459
1459
|
`,Pu=n.keyframes`
|
|
@@ -1565,7 +1565,7 @@
|
|
|
1565
1565
|
position: relative;
|
|
1566
1566
|
display: inline-block;
|
|
1567
1567
|
cursor: pointer;
|
|
1568
|
-
`,Rn=({info:e})=>{const{colors:o}=n.useTheme();return t.jsx(qu,{children:t.jsx(F.Tooltip,{popup:e,position:"bottom",extendStyles:{popup:{width:"310px",fontSize:"14px",lineHeight:"24px",color:o.neutral[80],padding:"8px 12px",zIndex:9999},element:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"}},children:t.jsx(
|
|
1568
|
+
`,Rn=({info:e})=>{const{colors:o}=n.useTheme();return t.jsx(qu,{children:t.jsx(F.Tooltip,{popup:e,position:"bottom",extendStyles:{popup:{width:"310px",fontSize:"14px",lineHeight:"24px",color:o.neutral[80],padding:"8px 12px",zIndex:9999},element:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"}},children:t.jsx(Q.MdInfo,{size:18,style:{display:"inline"}})})})},$o=({name:e,label:o,isRequired:r,disabled:i,info:s,labelStyles:c})=>{const a=n.useTheme();return e?t.jsxs(Wu,{htmlFor:e,disabled:i,style:c,children:[o," ",r&&t.jsx("span",{style:{color:a.colors.primary[100]},children:"*"})," ",s&&t.jsx(Rn,{info:s})]}):t.jsxs(Hu,{disabled:i,style:c,children:[o," ",r&&t.jsx("span",{style:{color:a.colors.primary[100]},children:"*"})," ",s&&t.jsx(Rn,{info:s})]})},je=n.div`
|
|
1569
1569
|
display: flex;
|
|
1570
1570
|
flex-wrap: ${({flexWrap:e})=>e||"wrap"};
|
|
1571
1571
|
margin: ${({m:e})=>e||"0px"};
|
|
@@ -1579,7 +1579,7 @@
|
|
|
1579
1579
|
align-items: center;
|
|
1580
1580
|
justify-content: center;
|
|
1581
1581
|
`}
|
|
1582
|
-
`;n(
|
|
1582
|
+
`;n(je)`
|
|
1583
1583
|
max-width: ${({maxWidth:e})=>e};
|
|
1584
1584
|
overflow: ${({overflow:e})=>e};
|
|
1585
1585
|
text-overflow: ${({textOverflow:e})=>e};
|
|
@@ -1660,7 +1660,7 @@
|
|
|
1660
1660
|
color: ${({theme:e})=>e.colors.neutral[40]};
|
|
1661
1661
|
font-size: 16px;
|
|
1662
1662
|
}
|
|
1663
|
-
`,lt=p.forwardRef(({label:e,isRequired:o,extendStyles:r,info:i,...s},c)=>{const[a,d]=Ae.useField(s);return t.jsxs(Vn,{...r==null?void 0:r.mainWrapper,gap:"4px",children:[e&&t.jsx($o,{label:e,name:s.name,isRequired:o,disabled:!!s.disabled,info:i,labelStyles:r==null?void 0:r.labelStyles}),t.jsxs(Vn,{...r==null?void 0:r.inputWrapper,gap:"4px",children:[t.jsx(vs,{...a,...s,id:s.name,ref:c}),t.jsx(Zr,{meta:d,extendStyles:r})]})]})});lt.displayName="FormikInputField";const Gu=
|
|
1663
|
+
`,lt=p.forwardRef(({label:e,isRequired:o,extendStyles:r,info:i,...s},c)=>{const[a,d]=Ae.useField(s);return t.jsxs(Vn,{...r==null?void 0:r.mainWrapper,gap:"4px",children:[e&&t.jsx($o,{label:e,name:s.name,isRequired:o,disabled:!!s.disabled,info:i,labelStyles:r==null?void 0:r.labelStyles}),t.jsxs(Vn,{...r==null?void 0:r.inputWrapper,gap:"4px",children:[t.jsx(vs,{...a,...s,id:s.name,ref:c}),t.jsx(Zr,{meta:d,extendStyles:r})]})]})});lt.displayName="FormikInputField";const Gu=Ve.object({username:Ve.string().trim().required("Username is required")}),Yu=Ve.object({username:Ve.string().required(),password:Ve.string().required("Password is required")}),Qu=(e,o)=>{const r=o?`?relayState=${encodeURIComponent(o)}`:"";return`${e}${r}`},Zu=async e=>(await oe.post("/auth/username-check-sso",e)).data,Ku=()=>we.useMutation({mutationFn:Zu,onError:e=>{console.error("Username check error",e)}}),Xu=({showSsoFeature:e,onVerified:o,onSso:r})=>{const{t:i}=H.useTranslation(),{mutateAsync:s}=Ku();return t.jsx(Ae.Formik,{initialValues:{username:""},validationSchema:Gu,onSubmit:async(c,{setFieldError:a})=>{const d=c.username.trim();if(!e){o(d);return}try{const{userExist:l,ssoLoginUrl:u}=await s({username:d});if(!l){a("username",i("Username not found. Please try again."));return}if(u){if(window.location.origin.includes("localhost:6006")){console.log("[SSO MOCK] Redirect to:",u);return}const g=window.location.href,h=Qu(u,g);r(d),setTimeout(()=>{window.location.assign(h)},1500)}else o(d)}catch{a("username",i("Could not verify username. Please try again."))}},children:({values:c,isSubmitting:a})=>t.jsx(Ae.Form,{children:t.jsxs(qr,{children:[t.jsxs(Gr,{children:[t.jsx(Yr,{htmlFor:"username",children:i("Username")}),t.jsx(Qr,{href:"https://www.covideo.com/forgot-username/",target:"_blank",children:i("Forgot username?")})]}),t.jsxs(ms,{children:[t.jsx(lt,{name:"username",isRequired:!0,placeholder:i("Username"),autoFocus:!0,type:"text",extendStyles:{mainWrapper:{flex:1}}}),t.jsx(F.Button,{type:"submit",disabled:!c.username.trim()||a,"aria-label":"Next",icon:a?t.jsx(xs,{}):t.jsx(Q.MdArrowForward,{size:18})})]})]})})})},Ju=n.keyframes`
|
|
1664
1664
|
from {
|
|
1665
1665
|
transform: rotate(0deg);
|
|
1666
1666
|
}
|
|
@@ -1670,7 +1670,7 @@
|
|
|
1670
1670
|
`,ep=n.svg`
|
|
1671
1671
|
animation: ${Ju} 2s linear infinite;
|
|
1672
1672
|
will-change: transform;
|
|
1673
|
-
`,tp=()=>t.jsx(ep,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"spinner",children:t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.83317 10.0003C5.83317 9.54033 5.45984 9.16699 4.99984 9.16699H2.49984C2.03984 9.16699 1.6665 9.54033 1.6665 10.0003C1.6665 10.4603 2.03984 10.8337 2.49984 10.8337H4.99984C5.45984 10.8337 5.83317 10.4603 5.83317 10.0003V10.0003ZM17.4998 9.16699H14.9998C14.5398 9.16699 14.1665 9.54033 14.1665 10.0003C14.1665 10.4603 14.5398 10.8337 14.9998 10.8337H17.4998C17.9598 10.8337 18.3332 10.4603 18.3332 10.0003C18.3332 9.54033 17.9598 9.16699 17.4998 9.16699V9.16699ZM9.99984 14.167C9.53984 14.167 9.1665 14.5403 9.1665 15.0003V17.5003C9.1665 17.9612 9.53984 18.3337 9.99984 18.3337C10.4598 18.3337 10.8332 17.9612 10.8332 17.5003V15.0003C10.8332 14.5403 10.4598 14.167 9.99984 14.167V14.167ZM9.99984 1.66699C9.53984 1.66699 9.1665 2.04033 9.1665 2.50033V5.00033C9.1665 5.46033 9.53984 5.83366 9.99984 5.83366C10.4598 5.83366 10.8332 5.46033 10.8332 5.00033V2.50033C10.8332 2.04033 10.4598 1.66699 9.99984 1.66699V1.66699ZM6.9715 3.08866C6.7415 2.69033 6.23234 2.55283 5.83317 2.78366C5.434 3.01366 5.29817 3.52366 5.52817 3.92199L6.77817 6.08699C7.00817 6.48533 7.51734 6.62199 7.9165 6.39199C8.31567 6.16199 8.4515 5.65199 8.2215 5.25366L6.9715 3.08866ZM13.2215 13.9137C12.9915 13.5153 12.4823 13.3787 12.0832 13.6087C11.684 13.8387 11.5482 14.3487 11.7782 14.747L13.0282 16.912C13.2582 17.3103 13.7673 17.4478 14.1665 17.217C14.5657 16.987 14.7015 16.477 14.4715 16.0787L13.2215 13.9137ZM6.3915 12.0837C6.1615 11.6845 5.6515 11.5487 5.25317 11.7787L3.08817 13.0287C2.68984 13.2587 2.55234 13.7678 2.78317 14.167C3.01317 14.5662 3.52317 14.702 3.9215 14.472L6.0865 13.222C6.48484 12.992 6.6215 12.4828 6.3915 12.0837V12.0837ZM13.6082 7.91699C13.8382 8.31616 14.3482 8.45199 14.7465 8.22199L16.9115 6.97199C17.3098 6.74199 17.4473 6.23283 17.2165 5.83366C16.9865 5.43449 16.4765 5.29866 16.0782 5.52866L13.9132 6.77866C13.5148 7.00866 13.3782 7.51783 13.6082 7.91699V7.91699ZM3.08817 6.97199L5.25317 8.22199C5.6515 8.45199 6.1615 8.31616 6.3915 7.91699C6.6215 7.51783 6.48484 7.00866 6.0865 6.77866L3.9215 5.52866C3.52317 5.29866 3.01317 5.43449 2.78317 5.83366C2.55234 6.23283 2.68984 6.74199 3.08817 6.97199V6.97199ZM16.9115 13.0287L14.7465 11.7787C14.3482 11.5487 13.8382 11.6845 13.6082 12.0837C13.3782 12.4828 13.5148 12.992 13.9132 13.222L16.0782 14.472C16.4765 14.702 16.9865 14.5662 17.2165 14.167C17.4473 13.7678 17.3098 13.2587 16.9115 13.0287V13.0287ZM7.9165 13.6087C7.51734 13.3787 7.00817 13.5153 6.77817 13.9137L5.52817 16.0787C5.29817 16.477 5.434 16.987 5.83317 17.217C6.23234 17.4478 6.7415 17.3103 6.9715 16.912L8.2215 14.747C8.4515 14.3487 8.31567 13.8387 7.9165 13.6087V13.6087ZM12.0832 6.39199C12.4823 6.62199 12.9915 6.48533 13.2215 6.08699L14.4715 3.92199C14.7015 3.52366 14.5657 3.01366 14.1665 2.78366C13.7673 2.55283 13.2582 2.69033 13.0282 3.08866L11.7782 5.25366C11.5482 5.65199 11.684 6.16199 12.0832 6.39199V6.39199Z",fill:"#9297A2"})}),op=({username:e})=>{const{t:o}=
|
|
1673
|
+
`,tp=()=>t.jsx(ep,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"spinner",children:t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.83317 10.0003C5.83317 9.54033 5.45984 9.16699 4.99984 9.16699H2.49984C2.03984 9.16699 1.6665 9.54033 1.6665 10.0003C1.6665 10.4603 2.03984 10.8337 2.49984 10.8337H4.99984C5.45984 10.8337 5.83317 10.4603 5.83317 10.0003V10.0003ZM17.4998 9.16699H14.9998C14.5398 9.16699 14.1665 9.54033 14.1665 10.0003C14.1665 10.4603 14.5398 10.8337 14.9998 10.8337H17.4998C17.9598 10.8337 18.3332 10.4603 18.3332 10.0003C18.3332 9.54033 17.9598 9.16699 17.4998 9.16699V9.16699ZM9.99984 14.167C9.53984 14.167 9.1665 14.5403 9.1665 15.0003V17.5003C9.1665 17.9612 9.53984 18.3337 9.99984 18.3337C10.4598 18.3337 10.8332 17.9612 10.8332 17.5003V15.0003C10.8332 14.5403 10.4598 14.167 9.99984 14.167V14.167ZM9.99984 1.66699C9.53984 1.66699 9.1665 2.04033 9.1665 2.50033V5.00033C9.1665 5.46033 9.53984 5.83366 9.99984 5.83366C10.4598 5.83366 10.8332 5.46033 10.8332 5.00033V2.50033C10.8332 2.04033 10.4598 1.66699 9.99984 1.66699V1.66699ZM6.9715 3.08866C6.7415 2.69033 6.23234 2.55283 5.83317 2.78366C5.434 3.01366 5.29817 3.52366 5.52817 3.92199L6.77817 6.08699C7.00817 6.48533 7.51734 6.62199 7.9165 6.39199C8.31567 6.16199 8.4515 5.65199 8.2215 5.25366L6.9715 3.08866ZM13.2215 13.9137C12.9915 13.5153 12.4823 13.3787 12.0832 13.6087C11.684 13.8387 11.5482 14.3487 11.7782 14.747L13.0282 16.912C13.2582 17.3103 13.7673 17.4478 14.1665 17.217C14.5657 16.987 14.7015 16.477 14.4715 16.0787L13.2215 13.9137ZM6.3915 12.0837C6.1615 11.6845 5.6515 11.5487 5.25317 11.7787L3.08817 13.0287C2.68984 13.2587 2.55234 13.7678 2.78317 14.167C3.01317 14.5662 3.52317 14.702 3.9215 14.472L6.0865 13.222C6.48484 12.992 6.6215 12.4828 6.3915 12.0837V12.0837ZM13.6082 7.91699C13.8382 8.31616 14.3482 8.45199 14.7465 8.22199L16.9115 6.97199C17.3098 6.74199 17.4473 6.23283 17.2165 5.83366C16.9865 5.43449 16.4765 5.29866 16.0782 5.52866L13.9132 6.77866C13.5148 7.00866 13.3782 7.51783 13.6082 7.91699V7.91699ZM3.08817 6.97199L5.25317 8.22199C5.6515 8.45199 6.1615 8.31616 6.3915 7.91699C6.6215 7.51783 6.48484 7.00866 6.0865 6.77866L3.9215 5.52866C3.52317 5.29866 3.01317 5.43449 2.78317 5.83366C2.55234 6.23283 2.68984 6.74199 3.08817 6.97199V6.97199ZM16.9115 13.0287L14.7465 11.7787C14.3482 11.5487 13.8382 11.6845 13.6082 12.0837C13.3782 12.4828 13.5148 12.992 13.9132 13.222L16.0782 14.472C16.4765 14.702 16.9865 14.5662 17.2165 14.167C17.4473 13.7678 17.3098 13.2587 16.9115 13.0287V13.0287ZM7.9165 13.6087C7.51734 13.3787 7.00817 13.5153 6.77817 13.9137L5.52817 16.0787C5.29817 16.477 5.434 16.987 5.83317 17.217C6.23234 17.4478 6.7415 17.3103 6.9715 16.912L8.2215 14.747C8.4515 14.3487 8.31567 13.8387 7.9165 13.6087V13.6087ZM12.0832 6.39199C12.4823 6.62199 12.9915 6.48533 13.2215 6.08699L14.4715 3.92199C14.7015 3.52366 14.5657 3.01366 14.1665 2.78366C13.7673 2.55283 13.2582 2.69033 13.0282 3.08866L11.7782 5.25366C11.5482 5.65199 11.684 6.16199 12.0832 6.39199V6.39199Z",fill:"#9297A2"})}),op=({username:e})=>{const{t:o}=H.useTranslation();return t.jsxs(t.Fragment,{children:[t.jsxs(qr,{children:[t.jsxs(Gr,{children:[t.jsx(Yr,{children:o("Username")}),t.jsx(Qr,{href:"https://www.covideo.com/forgot-username/",target:"_blank",children:o("Forgot username?")})]}),t.jsxs(ms,{children:[t.jsx(vs,{value:e,disabled:!0,type:"text",readOnly:!0}),t.jsx(F.Button,{type:"button",disabled:!0,"aria-label":"Verifying",icon:t.jsx(xs,{})})]})]}),t.jsxs(Bu,{children:[t.jsx(tp,{}),o("Verifying SSO...")]})]})},rp=async e=>(await oe.post("/auth",e)).data,np=()=>we.useMutation(rp,{onError:e=>{console.log(e)}}),ip=({username:e,handleUpdateToken:o,onPreviousStepHandler:r})=>{const{colors:i}=n.useTheme(),{t:s}=H.useTranslation(),c=de.useHistory(),[a,d]=p.useState(!1),{mutateAsync:l}=np();return t.jsxs(t.Fragment,{children:[t.jsx(Ae.Formik,{initialValues:{username:e,password:""},validationSchema:Yu,onSubmit:async(u,{setFieldError:g})=>{try{const{accessToken:h}=await l({username:u.username,password:u.password});await o(h),c.go(0)}catch{g("password",s("Incorrect login. Please try again."))}},children:({values:u,isSubmitting:g})=>t.jsxs(Ae.Form,{children:[t.jsx(lt,{name:"username",isRequired:!0,placeholder:s("Username"),type:"text",disabled:!0,extendStyles:{mainWrapper:{flex:1}}}),t.jsxs(qr,{children:[t.jsxs(Gr,{children:[t.jsx(Yr,{htmlFor:"password",children:s("Password")}),t.jsx(Qr,{href:"https://www.covideo.com/reset-password/",target:"_blank",children:s("Forgot Password?")})]}),t.jsxs(_u,{children:[t.jsx(lt,{name:"password",isRequired:!0,placeholder:s("Password"),autoFocus:!0,type:a?"text":"password",style:{paddingRight:40}}),t.jsx(Uu,{onClick:()=>d(h=>!h),children:a?t.jsx(be.IoMdEyeOff,{size:20}):t.jsx(be.IoMdEye,{size:20})})]})]}),t.jsx(F.Button,{style:{width:"100%"},type:"submit",disabled:!u.password||g,icon:t.jsx(Q.MdArrowForward,{size:16}),text:s("Log In"),iconPosition:"right"})]})}),t.jsx(F.Button,{text:s("Back to username"),variant:"text",onClick:r,icon:t.jsx(Q.MdArrowBack,{size:16}),style:{textDecoration:"underline",color:i.primary[100],marginTop:16}})]})},Ln=({handleUpdateToken:e})=>{const{t:o}=H.useTranslation(),{hasExternalJwt:r,showSsoFeature:i}=Ce(),[s,c]=p.useState("username"),[a,d]=p.useState("");return r?t.jsxs(t.Fragment,{children:[t.jsx(Ze,{center:t.jsx(yo,{})}),t.jsx(In,{children:t.jsxs(An,{children:[t.jsx($n,{children:o("Login failed")}),t.jsx(zu,{children:o("External token invalid.")})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx(Ze,{center:t.jsx(yo,{})}),t.jsx(In,{children:t.jsxs(An,{children:[t.jsxs($n,{children:[o("Welcome back")," 👋"]}),(s==="username"||s==="sso")&&t.jsx(Fu,{children:o("Enter username to continue")}),s==="username"&&t.jsx(Xu,{showSsoFeature:i,onVerified:l=>{d(l),c("password")},onSso:l=>{d(l),c("sso")}}),s==="sso"&&t.jsx(op,{username:a}),s==="password"&&t.jsx(ip,{username:a,handleUpdateToken:e,onPreviousStepHandler:()=>c("username")})]})})]})},Mn="-1",Wt=19,jr=20,bs=-2,Er=-1;var ws=(e=>(e.VIDMAILS="vidmails",e.AUTOMOTIVE="automotive",e))(ws||{});const ys={value:0,label:"",landingPageType:"vidmails",id:0},sp=e=>{const o=nt(e);return{value:bs,label:`${o?"Service":"Sales"} page`,landingPageType:"automotive",typeId:Wt}},ap=({userData:e,templatesResponse:o,sendVehicle:r,sendQuote:i})=>{var m,f;const{customer:s}=e,c=Ke(e);nt(e);const a=ut(e);if(s.isUsingLandingPageDesign.toString()==="1")return{autoSelectedOption:{...o.default,value:o.default.id,label:o.default.title,landingPageType:"automotive"},options:o.templates.map(w=>({...w,value:w.id,label:w.title,landingPageType:"automotive"}))};const d=!c,l=sp(e),u=a&&r;let g=d?ys:l;const h=o==null?void 0:o.default;let x=((o==null?void 0:o.templates)||[]).filter(w=>!u||w.typeId===Wt||w.typeId===jr).map(w=>({label:w.title,value:w.id,typeId:w.typeId,landingPageType:w.typeId!==Wt?"vidmails":"automotive"}));if(d||(x=[...x,l]),h!=null&&h.id&&(!u||(h==null?void 0:h.typeId)===Wt||(h==null?void 0:h.typeId)===jr)){const w={label:(m=o==null?void 0:o.default)==null?void 0:m.title,value:(f=o==null?void 0:o.default)==null?void 0:f.id,landingPageType:(h==null?void 0:h.typeId)===Wt?"automotive":"vidmails",typeId:h==null?void 0:h.typeId};g=w,x=[...x,w]}return x=Gt.uniqBy(x,"value"),{options:x,autoSelectedOption:g}},ho=n.div`
|
|
1674
1674
|
display: flex;
|
|
1675
1675
|
justify-content: space-between;
|
|
1676
1676
|
align-items: center;
|
|
@@ -1714,7 +1714,7 @@
|
|
|
1714
1714
|
border: solid 1px ${E.gray10};
|
|
1715
1715
|
outline: none;
|
|
1716
1716
|
padding: 8px 12px;
|
|
1717
|
-
`,pp=({linksetsData:e,templatesOptions:o,overlaysData:r,insertVideoData:i,setInsertVideoData:s,reactionsCustomerEnabled:c})=>{const{t:a}=
|
|
1717
|
+
`,pp=({linksetsData:e,templatesOptions:o,overlaysData:r,insertVideoData:i,setInsertVideoData:s,reactionsCustomerEnabled:c})=>{const{t:a}=H.useTranslation(),{showCTAFeature:d,showLandingPageFeature:l,showWebsiteOverlayFeature:u,showReactionsFeature:g}=Ce(),[h,x]=p.useState(!1),m=i.templateId===Er,f=p.useMemo(()=>(r||[]).map(({id:j,title:R})=>({value:j.toString(),label:R})),[r,u]),w=p.useMemo(()=>{const v=(e||[]).some(R=>R.id.toString()===Mn),j=(e||[]).map(({id:R,title:V})=>({value:R.toString(),label:V}));return v?j:[{value:Mn,label:"None"},...j]},[e]),b=Gt.debounce(v=>{s(m?{...i,overlayId:v}:{...i,linksetId:v})},1e3),y=o.find(v=>v.value===i.templateId),S=(y==null?void 0:y.typeId)===jr,T=!h&&m,$=!h&&!m,k=f.find(v=>{var j;return v.value===((j=i.overlayId)==null?void 0:j.toString())}),L=w.find(v=>{var j;return v.value===((j=i.linksetId)==null?void 0:j.toString())});return t.jsxs(t.Fragment,{children:[l&&t.jsx(ho,{children:t.jsxs(Ko,{width:"100%",children:[t.jsx(Dn,{children:a("Landing Page")}),t.jsx(De,{value:y,options:o,onChange:v=>{s({...i,templateId:parseInt(v.value)}),v.value!==Er&&x(!1)},placeholder:a("Select Landing Page"),isSearchable:!0,creatable:!1})]})}),S?null:(d||m)&&t.jsx(ho,{children:t.jsxs(Ko,{width:"100%",marginBottom:"35px",children:[t.jsxs(ho,{children:[t.jsx(Dn,{children:a(m?"Websites":"CTAs")}),m&&t.jsx(dp,{onClick:()=>x(v=>!v),children:a(h?"Use Existing":"Add New")})]}),T&&t.jsx(De,{"aria-label":"Website Overlay",className:"dropdown",value:k,isClearable:!0,placeholder:a("No Websites"),options:f,onChange:v=>{s(j=>({...j,overlayId:(v==null?void 0:v.value)||""}))},isSearchable:!0,creatable:!1}),$&&t.jsx(De,{"aria-label":"CTA",className:"dropdown",value:L,placeholder:a("No CTAs"),options:w,onChange:v=>{s(j=>({...j,linksetId:(v==null?void 0:v.value)||""}))},isSearchable:!0,creatable:!1}),S?null:h&&t.jsx(up,{type:"text",placeholder:a("Enter website"),onChange:v=>{b(v.target.value)}})]})}),S?null:t.jsx(Ko,{width:"100%",marginBottom:"15px",children:t.jsx(ho,{children:g?c&&t.jsxs(cp,{children:[t.jsx(qi,{name:"allowReactions",width:"24px",checked:i.allowReactions,onChange:v=>{const{checked:j}=v.target;s(R=>({...R,allowReactions:j}))}}),t.jsx(lp,{children:a("Enable video reactions & comments")})]}):null})})]})},hp=({size:e=10,page:o=0,sort:r="",searchQuery:i="",soldFilter:s="",videosRecordedFilter:c="",countRecorded:a=!1,enabled:d=!0})=>{const{userData:l}=ve();return we.useQuery(["inventoryItems",l==null?void 0:l.id,e,o,r,i,s,c,d,a],async()=>Dr({limit:e,start:o*e,sort:r,search:i||"",soldFilter:s,videosRecordedFilter:c,countRecorded:a}),{refetchOnWindowFocus:!1,staleTime:a?0:36e5,enabled:d,refetchOnMount:!1,refetchOnReconnect:!1})},gp=n.div`
|
|
1718
1718
|
display: flex;
|
|
1719
1719
|
align-items: center;
|
|
1720
1720
|
padding-left: 12px;
|
|
@@ -1802,7 +1802,7 @@
|
|
|
1802
1802
|
overflow: hidden;
|
|
1803
1803
|
white-space: nowrap;
|
|
1804
1804
|
text-overflow: ellipsis;
|
|
1805
|
-
`,Tp=e=>t.jsx(t.Fragment,{}),kp=(e,o)=>{const r=e.label.toLowerCase(),i=e.data.vin?e.data.vin.toLowerCase():"",s=e.data.stockNumber?e.data.stockNumber.toLowerCase():"";return`${r} ${i} ${s}`.includes(o.toLowerCase())},Ip=e=>t.jsx(gp,{children:t.jsx(mp,{children:t.jsx(Qe.components.Option,{...e})})}),Ap=({label:e,vin:o})=>t.jsxs(xp,{children:[t.jsx(fp,{children:e}),t.jsxs(vp,{children:[" ",o]})]}),$p=({children:e,...o})=>t.jsx(bp,{children:o.data.label}),Rp=e=>{const{t:o}=
|
|
1805
|
+
`,Tp=e=>t.jsx(t.Fragment,{}),kp=(e,o)=>{const r=e.label.toLowerCase(),i=e.data.vin?e.data.vin.toLowerCase():"",s=e.data.stockNumber?e.data.stockNumber.toLowerCase():"";return`${r} ${i} ${s}`.includes(o.toLowerCase())},Ip=e=>t.jsx(gp,{children:t.jsx(mp,{children:t.jsx(Qe.components.Option,{...e})})}),Ap=({label:e,vin:o})=>t.jsxs(xp,{children:[t.jsx(fp,{children:e}),t.jsxs(vp,{children:[" ",o]})]}),$p=({children:e,...o})=>t.jsx(bp,{children:o.data.label}),Rp=e=>{const{t:o}=H.useTranslation();return t.jsx(Qe.components.NoOptionsMessage,{...e,children:o(" No vehicles found, try entering a different name or VIN.")})},Cs=({onChangeVehicle:e,handleChangeVehicleButtonPress:o,handleRemoveVehicleButtonPress:r,setAddingVehicle:i,selectedVin:s="",placeholder:c,fetchSold:a=!0,addingVehicle:d=!0})=>{const{t:l}=H.useTranslation(),{userData:u}=ve(),{colors:g,isCdkEnviroment:h}=n.useTheme(),x=!!(u!=null&&u.customer.isIMSEnabled),[m,f]=p.useState(""),[w,b]=p.useState(s),{showUpgradeMessageFeature:y}=Ce(),S={control:(j,R)=>({...j,height:"40px",boxShadow:"none",borderColor:R.isFocused?g.primary[100]:E.gray40,":hover":{borderColor:g.primary[100]},":focus":{borderColor:g.primary[100]},":active":{borderColor:g.primary[100]}}),option:j=>({...j,backgroundColor:"transparent",color:E.gray100,padding:"8px",cursor:"pointer",":hover":{backgroundColor:"transparent",opacity:".8"},":focus":{backgroundColor:"transparent",opacity:".8"}}),indicatorSeparator:()=>({display:"none"}),valueContainer:j=>({...j,padding:4,overflow:"show"})},{data:T}=hp({searchQuery:w,countRecorded:!1,enabled:x,soldFilter:a?"2":"0"}),$=T?T.items:[];p.useEffect(()=>{b(s)},[s]),p.useEffect(()=>{if(!(!T||s==="")&&$){const j=$.filter(R=>R.vin===s);if(!j.length){r==null||r(),f("");return}f(j[0].title)}},[$,s]);const k=p.useRef(Gt.debounce(j=>b(j),500)).current,L=j=>{j.length<2||k(j)},v=$.map(j=>({...j,value:j.vin,label:j.title}));return x?d?t.jsx(Ep,{children:t.jsx(Qe,{components:{Option:Ip,DropdownIndicator:Tp,SingleValue:$p,NoOptionsMessage:Rp},styles:S,options:v,value:v.find(j=>j.value===s),onChange:j=>{e(j||void 0),f((j==null?void 0:j.title)||"")},autoFocus:!0,isSearchable:!0,isClearable:!0,placeholder:c,filterOption:kp,formatOptionLabel:Ap,onInputChange:L})}):s?t.jsxs(yp,{children:[t.jsxs(Cp,{children:[t.jsxs(Sp,{children:[t.jsx(be.IoMdCar,{size:20,color:g.primary[40]}),t.jsx(On,{children:m})]}),t.jsx(On,{color:g.primary[40],fontWeight:"400",children:s})]}),t.jsxs(jp,{children:[t.jsx(F.Button,{onClick:()=>{o==null||o(),f("")},text:l("Change"),variant:"primary",size:"small"}),t.jsx(F.Button,{onClick:()=>{r==null||r(),f("")},text:l("Remove"),variant:h?"text":"destructive",size:"small"})]})]}):t.jsxs(wp,{onClick:()=>i==null?void 0:i(!0),children:[t.jsx(be.IoMdCar,{size:20,color:g.primary[100]}),l("Add Vehicle")]}):y?t.jsxs(t.Fragment,{children:[l("To enable the integration with your Inventory Management System, please call us at")," ",t.jsx("br",{}),t.jsx("a",{href:"tel:8003061445",children:"800-306-1445"})]}):null},Vp=e=>{var o;return!!((o=e.customer)!=null&&o.reactionsPreference&&e.customer.reactionsPreference.toString()!=="0")},Lp=e=>{var o;return!!(e.reactionsPreference&&e.reactionsPreference.toString()==="1"||e.reactionsPreference===null&&((o=e.customer)!=null&&o.reactionsPreference)&&e.customer.reactionsPreference.toString()==="1")},Mp=n.video`
|
|
1806
1806
|
height: auto;
|
|
1807
1807
|
width: ${e=>e.width};
|
|
1808
1808
|
object-fit: cover;
|
|
@@ -1861,11 +1861,11 @@
|
|
|
1861
1861
|
background: ${E.white};
|
|
1862
1862
|
border-radius: 4px;
|
|
1863
1863
|
}
|
|
1864
|
-
`,_p=e=>{const{colors:o}=n.useTheme(),{domain:[r,i],handle:{id:s,value:c,percent:a},showFloatingPreview:d=!0,isActive:l,disabled:u,getHandleProps:g,videoRef:h,changeVideoPosition:
|
|
1864
|
+
`,_p=e=>{const{colors:o}=n.useTheme(),{domain:[r,i],handle:{id:s,value:c,percent:a},showFloatingPreview:d=!0,isActive:l,disabled:u,getHandleProps:g,videoRef:h,changeVideoPosition:x=!0,nChild:m}=e,[f,w]=p.useState(!1),b=p.createRef(),y=()=>{w(!0)},S=()=>{w(!1)};p.useEffect(()=>{l&&(d&&(b.current.currentTime=c||0),x&&(h.current.currentTime=c||0))},[c,b,x,h]);const T=Dt(c).split(".")[0],$=Dt(c).split(".")[1];return t.jsxs(p.Fragment,{children:[d&&t.jsxs(t.Fragment,{children:[(f||l)&&!u?t.jsxs("div",{style:{left:`${a}%`,position:"absolute",marginLeft:"-15px",marginTop:"52px",zIndex:1},children:[t.jsx("div",{style:{width:0,height:0,marginLeft:21,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderBottom:"6px solid "}}),t.jsxs("div",{style:{width:"auto",padding:4,fontSize:12,fontWeight:500,letterSpacing:.34,backgroundColor:o.primary[100],color:"#fff",textAlign:"center",zIndex:99999},children:[T,t.jsx("span",{style:{fontSize:9,fontWeight:400,letterSpacing:.34,color:"#fff",opacity:.7},children:"."+$})]})]}):null,t.jsx("div",{style:{left:`${a}%`,position:"absolute",marginLeft:"-38px",marginTop:"-92px",zIndex:3,visibility:(f||l)&&!u?"visible":"hidden"},children:t.jsx("div",{style:{width:141,height:80,border:`solid 2px ${o.primary[100]}`,backgroundColor:E.themeDark75Percent,display:"flex",justifyContent:"center"},children:t.jsx("video",{ref:b,height:"100%",src:e.videoSource,playsInline:!0,controls:!1},"previewvideoRef")})})]}),t.jsx(zp,{percent:`${a}%`,...g(s),onMouseEnter:y,onMouseLeave:S,transform:m===0?"translate(0px,0%)":"translate(-15px,0%)"}),t.jsx(Bp,{role:"slider","aria-valuemin":r,"aria-valuemax":i,"aria-valuenow":c,percent:`${a}%`,borderRadius:m===0?"5px 0px 0px 5px;":"0px 5px 5px 0px",isDisabled:u,transform:m===0?"translate(0px,0%)":"translate(-15px,0%)"})]})},Up=({source:e,target:o,getTrackProps:r,disabled:i})=>t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:i?"#999":"rgba(0,0,0,.7)",cursor:"pointer",left:"0",width:`${e.percent+1}%`,borderRadius:"6px 0 0 6px"},...r()}),t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:i?"#999":"transparent",cursor:"pointer",left:`${e.percent}%`,width:`${o.percent-e.percent}%`,borderRadius:6},...r()}),t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:i?"#999":"rgba(0,0,0,.7)",cursor:"pointer",left:`${o.percent}%`,width:`${100-o.percent}%`,borderRadius:"0 6px 6px 0"},...r()})]}),Wp=({tick:e,count:o})=>t.jsxs("div",{children:[t.jsx("div",{style:{position:"absolute",width:2,height:48,opacity:.4,backgroundColor:E.blackRgb60,left:`${e.percent}%`,zIndex:1}}),t.jsx("div",{style:{position:"absolute",marginTop:52,fontSize:10,textAlign:"center",marginLeft:`${-(100/o)/2}%`,width:`${100/o}%`,left:`${e.percent}%`},children:Dt(e.value).split(".")[0]})]}),Hp=n.div`
|
|
1865
1865
|
position: relative;
|
|
1866
1866
|
width: ${e=>e.width};
|
|
1867
1867
|
height: 48px;
|
|
1868
|
-
`,qp=I.memo(Op),Kr=e=>{const{colors:o}=n.useTheme(),{videoDuration:r,videoSource:i,setTrimDuration:s=()=>{},setStart:c=()=>{},value:a,setValue:d,addHistory:l=()=>{},onSlideEnd:u=()=>{},valueRef:g,videoRef:h,showTickTime:
|
|
1868
|
+
`,qp=I.memo(Op),Kr=e=>{const{colors:o}=n.useTheme(),{videoDuration:r,videoSource:i,setTrimDuration:s=()=>{},setStart:c=()=>{},value:a,setValue:d,addHistory:l=()=>{},onSlideEnd:u=()=>{},valueRef:g,videoRef:h,showTickTime:x=!0,changeVideoPosition:m=!0,showFloatingPreview:f=!0,width:w,showPreviewTrack:b=!0}=e,y=[0,r];I.useEffect(()=>{const A=[0,r||0];a[1]||d(A)},[r]),I.useEffect(()=>(h&&h.current&&(h.current.addEventListener("play",C=>T(C)),h.current.addEventListener("timeupdate",C=>S(C))),()=>{h&&h.current&&(h.current.removeEventListener("play",C=>T(C)),h.current.removeEventListener("timeupdate",C=>S(C)))}),[h]);const S=C=>{const A=C.target;A.currentTime>g.current[1]&&g.current[1]!=0&&A.pause()},T=C=>{const A=C.target;(A.currentTime>=g.current[1]||A.currentTime<g.current[0])&&(A.currentTime=g.current[0])},$=C=>{if(!isNaN(C[0])&&!isNaN(C[1])){const A=C.slice();l(A),d(A),g.current=A}},k=C=>{s(C[1]-C[0]),c(C[0])},L=C=>{u(C)},v=14,j=10,R=I.useMemo(()=>r,[r]),V={position:"relative",width:"100%",backgroundColor:o.primary[40]};return t.jsx(Hp,{width:w,children:t.jsxs(Jt.Slider,{rootStyle:V,mode:1,step:1e-7,domain:y,reversed:!1,onChange:$,onUpdate:k,values:a,onSlideEnd:L,children:[b&&t.jsx(qp,{numberOfStills:v,videoSource:i,videoDuration:R}),t.jsx(Jt.Rail,{children:C=>t.jsx(Fp,{...C})}),t.jsx(Jt.Handles,{children:({handles:C,activeHandleID:A,getHandleProps:P})=>t.jsx("div",{className:"slider-handles",children:C.map((M,N)=>t.jsx(_p,{showFloatingPreview:f,nChild:N,handle:M,domain:y,isActive:M.id===A,getHandleProps:P,videoSource:i,videoRef:h,changeVideoPosition:m},M.id))})}),t.jsx(Jt.Tracks,{left:!1,right:!1,children:({tracks:C,getTrackProps:A})=>t.jsx("div",{className:"slider-tracks",children:C.map(({id:P,source:M,target:N})=>t.jsx(Up,{source:M,target:N,getTrackProps:A},P))})}),x&&t.jsx(Jt.Ticks,{count:j,children:({ticks:C})=>t.jsx("div",{className:"slider-ticks",children:C.map(A=>t.jsx(Wp,{tick:A,count:C.length},A.id))})})]})})},Gp=n.div`
|
|
1869
1869
|
margin-top: 8px;
|
|
1870
1870
|
font-weight: 400;
|
|
1871
1871
|
color: ${E.covideoGray100};
|
|
@@ -1878,7 +1878,7 @@
|
|
|
1878
1878
|
height: 48px;
|
|
1879
1879
|
width: 100%;
|
|
1880
1880
|
background-color: ${E.gray10};
|
|
1881
|
-
`,Qp=({videoRef:e,videoDuration:o,videoSource:r,setValue:i,value:s,isVideoTrimmed:c,valueRef:a,isVideoLoading:d=!0})=>{const{t:l}=
|
|
1881
|
+
`,Qp=({videoRef:e,videoDuration:o,videoSource:r,setValue:i,value:s,isVideoTrimmed:c,valueRef:a,isVideoLoading:d=!0})=>{const{t:l}=H.useTranslation();return t.jsxs(t.Fragment,{children:[d?t.jsx(Yp,{width:"100%",videoRef:null,videoDuration:0,videoSource:"",setValue:i,value:[0,0],valueRef:a,showTickTime:!1,showFloatingPreview:!1}):t.jsx(Kr,{width:"100%",videoRef:e,videoDuration:o,videoSource:r,setValue:i,value:s,valueRef:a,showTickTime:!1,showFloatingPreview:!1}),c&&t.jsxs(Gp,{children:[l("Trimmed."),t.jsx("span",{style:{marginLeft:8},onClick:()=>{i([0,o]),a.current&&(a.current=[0,o]),e.current&&(e.current.currentTime=0)},children:l("Revert to Original")})]})]})},Zp=({video:e,getMarkAsSentPayload:o,disable:r,onCRMClick:i})=>{const{t:s}=H.useTranslation(),{isCdkEnviroment:c}=n.useTheme(),{userData:a}=ve(),d=Ot(a),[l,u]=p.useState(!1),[g,h]=p.useState(!1),x=()=>{u(!1)},{onQuickShareMutationHandler:m,isQuickshareLoading:f,onQuickShareButtonClick:w}=Fr({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:h,handleOnMarkAsSentSuccessCallback:x}),b=()=>{if(i==null||i(),d===ot.ASK_VERY_TIME.value){w({videoActivityType:Nt.QUICKSHARE,toastType:"insert"});return}u(!0);const S=o();w({videoActivityType:Nt.QUICKSHARE,toastType:"insert",...S.videoShareSetData,useAutomotive:S.useAutomotive})},y=async()=>(u(!0),o());return t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:b,text:s("Insert"),variant:c?"white":"primary",disabled:r||l,icon:l?t.jsx(tt,{size:12}):t.jsx(be.IoMdAdd,{size:18})}),g&&t.jsx(Nr,{markAsSentPayload:{toastType:"insert"},isQuickShareLoading:f,quickShareMarkAsSentHandler:m,handleModalClose:async()=>{h(!1)},getMarkAsSentPayload:y})]})},Kp=({video:e,getMarkAsSentPayload:o,disable:r,onCRMClick:i})=>{const{t:s}=H.useTranslation(),{isCdkEnviroment:c}=n.useTheme(),{containerWidth:a}=Ce(),{userData:d}=ve(),l=Ot(d),[u,g]=p.useState(!1),[h,x]=p.useState(!1),m=()=>{g(!1)},{onQuickShareMutationHandler:f,isQuickshareLoading:w,onQuickShareButtonClick:b}=Fr({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:x,handleOnMarkAsSentSuccessCallback:m}),y=async()=>{if(i==null||i(),l===ot.ASK_VERY_TIME.value){b({videoActivityType:Nt.QUICKSHARE,toastType:"quickshare"});return}g(!0);const T=o();b({videoActivityType:Nt.QUICKSHARE,toastType:"quickshare",...T.videoShareSetData,useAutomotive:T.useAutomotive})},S=async()=>(g(!0),o());return t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{variant:c?"white":"secondary",onClick:y,text:a>B.sm?s("Copy Video"):s("Copy"),disabled:r||u,icon:u?t.jsx(tt,{size:12}):t.jsx(be.IoIosShareAlt,{size:18})}),h&&t.jsx(Nr,{markAsSentPayload:{toastType:"quickshare"},isQuickShareLoading:w,quickShareMarkAsSentHandler:f,handleModalClose:async()=>{x(!1)},getMarkAsSentPayload:S})]})},Xp=async e=>(await oe.get("/templates",{params:e})).data,Jp=(e,o)=>{const{userData:r}=ve();return we.useQuery(["TEMPLATES",e,r==null?void 0:r.id],()=>Xp(e),{enabled:!0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})},eh=async e=>(await oe.get(`/videos/${e}`)).data,Ss=e=>we.useQuery(["VIDEO",e],()=>eh(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),th=async e=>{const{search:o="",start:r=0,limit:i=0}=e;return(await oe.get("/exitlinksets",{params:{search:o,start:r,limit:i}})).data},oh=e=>we.useQuery(["EXIT_LINKSETS"],()=>th(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),rh=async e=>(await oe.get("/overlays",{params:e})).data,nh=e=>we.useQuery(["WEBSITE_OVERLAY"],()=>rh(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),ih=n.div`
|
|
1882
1882
|
background: ${E.gray10};
|
|
1883
1883
|
`,sh=n.div`
|
|
1884
1884
|
display: flex;
|
|
@@ -1890,14 +1890,14 @@
|
|
|
1890
1890
|
`,ah=n.div`
|
|
1891
1891
|
box-sizing: border-box;
|
|
1892
1892
|
width: 100%;
|
|
1893
|
-
${({theme:e})=>e.containerWidth>=
|
|
1893
|
+
${({theme:e})=>e.containerWidth>=B.sm&&n.css`
|
|
1894
1894
|
width: calc(50% - 8px);
|
|
1895
1895
|
`}
|
|
1896
1896
|
`,ch=n.div`
|
|
1897
1897
|
box-sizing: border-box;
|
|
1898
1898
|
width: 100%;
|
|
1899
1899
|
margin-top: 16px;
|
|
1900
|
-
${({theme:e})=>e.containerWidth>=
|
|
1900
|
+
${({theme:e})=>e.containerWidth>=B.sm&&n.css`
|
|
1901
1901
|
margin-top: 0;
|
|
1902
1902
|
width: calc(50% - 8px);
|
|
1903
1903
|
`}
|
|
@@ -1937,7 +1937,7 @@
|
|
|
1937
1937
|
background-color: ${({backgroundColor:e})=>e||"transparent"};
|
|
1938
1938
|
width: ${({width:e})=>e||"auto"};
|
|
1939
1939
|
border-radius: 6px;
|
|
1940
|
-
`,go="pending",hh=e=>e?String(e):void 0,gh=()=>{var
|
|
1940
|
+
`,go="pending",hh=e=>e?String(e):void 0,gh=()=>{var Le,$e;const{showInsertFeature:e,showQuickshareFeature:o,containerWidth:r,showTrimFeature:i,showCTAFeature:s,showLandingPageFeature:c,showReactionsFeature:a,showWebsiteOverlayFeature:d}=Ce(),{t:l}=H.useTranslation(),{colors:u,isCdkEnviroment:g}=n.useTheme(),{videoId:h}=rt.useParams(),{toast:x}=Te(),{userData:m}=ve(),{isLoading:f,data:w}=Jp({start:0,limit:2e3,search:""}),{data:b,isLoading:y}=Ss(h),{data:S,isLoading:T}=nh({start:0,limit:100,search:""}),{data:$,isLoading:k}=oh({start:0,limit:100,search:""}),L=p.useRef(null),v=nt(m),j=ut(m),R=Vp(m),V=Lp(m),{trackGTMVideoMessageInteractionEvent:C}=He(),A=rt.useHistory(),[P,M]=p.useState(!1),[N,D]=p.useState(!1),[O,W]=p.useState({videoId:Number(h),templateId:ys.id,linksetId:"",overlayId:"",vin:go,allowReactions:V}),{trackVideoSpecificPagesManually:Y,vehiceReady:se}=bt({vin:O.vin!==go?O.vin:""}),[Z,X]=p.useState([]),[G,re]=p.useState(!1),[_,ne]=p.useState(!1),[ae,ue]=p.useState([0,0]),[xe,Se]=p.useState(0),ke=p.useRef([0,0]),ee=($==null?void 0:$.linksets)??[],ce=(S==null?void 0:S.websiteUrls)??[],K=()=>A.push("/");p.useEffect(()=>{ue([0,xe])},[xe]);const q=y||f||f||k||T,he=me=>{var it;if(f||!w)return;const{autoSelectedOption:Me,options:Re}=ap({userData:m,templatesResponse:w,sendVehicle:!!me,sendQuote:!1}),qe=Re.filter(Ge=>d?!0:Ge.id!==Er),wt=(it=qe.find(Ge=>Number(Ge.value)===O.templateId))==null?void 0:it.value,Pe=Re.some(Ge=>Ge.value===bs&&Ge.typeId===Wt);X(qe),W(Ge=>({...Ge,templateId:Pe?Number(Me.value)||w.default.id:Number(wt)||w.default.id,vin:me}))};p.useEffect(()=>{var me;!b&&!w||he(((me=b==null?void 0:b.videoRequest)==null?void 0:me.vin)||"")},[w,f,b]),p.useEffect(()=>{T||!ce.length||ce.length>0&&W(me=>({...me,overlayId:ce[0].id}))},[S,T]),p.useEffect(()=>{if(k||!ee.length)return;const me=ee.find(Me=>Me.defaultLinks)??ee[0];me&&W(Me=>({...Me,linksetId:me.id}))},[$,k]),p.useEffect(()=>{!y&&!b||W(me=>{var Me;return{...me,vin:((Me=b==null?void 0:b.videoRequest)==null?void 0:Me.vin)||""}})},[b,y]),p.useEffect(()=>{const me=Oi({trimStart:ae[0],trimEnd:ae[1],videoDuration:xe});return re(me),()=>{re(!1)}},[ae,xe]),p.useEffect(()=>{se&&O.vin!==go&&(Y==null||Y({...vt.SEND_SHARE}))},[se]);const Ee=async()=>{try{return await Fi(h,{duration:ae[1],start:ae[0],title:b==null?void 0:b.title})}catch{x({message:l("Something went wrong while trimming the video, try again later!")})}},Ie=()=>{const me=Z.find(qe=>qe.value===O.templateId),Me=v||(me==null?void 0:me.landingPageType)===ws.AUTOMOTIVE||!1;return{videoShareSetData:{videoId:Number(h),vin:O.vin!==go?O.vin:"",templateId:Number(O.templateId)||0,overlayId:O.overlayId||0,linksetId:O.linksetId||0,allowReactions:O.allowReactions},useAutomotive:Me}},Ne=async()=>{if(G){ne(!0);const me=await Ee();ne(!1),re(!1),A.replace(`/insert-video/${me.id}`)}},U={videoId:Number(b==null?void 0:b.id),videoTitle:b==null?void 0:b.title,videoLength:b==null?void 0:b.videoLength,videoCustomerName:!!((Le=b==null?void 0:b.videoRequest)!=null&&Le.customerName),videoType:(($e=b==null?void 0:b.videoRequest)==null?void 0:$e.videoType)||void 0},pe=({action:me})=>{var qe,wt,Pe;const Me=Ie(),Re={notificationViewed:void 0,landingPage:(qe=Z.find(it=>it.value===Me.videoShareSetData.templateId))==null?void 0:qe.label,callToAction:((wt=ee.find(it=>it.id===Me.videoShareSetData.linksetId))==null?void 0:wt.title)??void 0,thumbnails:void 0,customerId:hh(m.customerId),sms:void 0,email:void 0};C==null||C({action:me,video:U,videoMessageProperties:Re,vehicle:(Pe=b==null?void 0:b.videoRequest)==null?void 0:Pe.inventoryItem})},ye=f||k||T||O.templateId===-1&&!O.overlayId||P;return q||!b?t.jsx(ze,{isLoading:y}):t.jsxs(ih,{children:[t.jsx(Ze,{left:t.jsx(F.Button,{text:l("Back"),icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>K(),variant:"transparent",style:{color:"white"}}),center:t.jsx(t.Fragment,{}),right:t.jsxs(t.Fragment,{children:[G&&t.jsx(F.Button,{variant:g?"white":"secondary",onClick:Ne,text:r>B.sm?l("Trim Video"):l("Trim"),disabled:_,icon:_?t.jsx(tt,{size:12}):t.jsx(Q.MdContentCut,{size:18})}),o&&!G&&t.jsx(Kp,{video:b,disable:ye,getMarkAsSentPayload:Ie,onCRMClick:()=>{pe({action:Cr.COPY})}}),e&&!G&&t.jsx(Zp,{video:b,disable:ye,getMarkAsSentPayload:Ie,onCRMClick:async()=>{pe({action:Cr.INSERT})}})]})}),t.jsx(dt,{children:t.jsxs(sh,{children:[t.jsxs(ah,{children:[t.jsxs(lh,{children:[t.jsx(It,{videoId:h,videoRef:L,autoplay:!1,height:"247px",FullscreenVideoWrapperBackgroundColor:u.black[100],borderBottomRadius:"0px",videoSource:(b==null?void 0:b.videoSource)||"",playerBackgroundColor:(b==null?void 0:b.playerBackgroundColor)||"",setVideoDuration:Se,setVideoIsProcessing:M}),t.jsxs(dh,{children:[t.jsx(uh,{children:b==null?void 0:b.title}),t.jsxs(ph,{children:[t.jsx(be.IoMdCalendar,{size:16,color:u.neutral[40],style:{marginRight:6}}),b==null?void 0:b.recordDate]})]})]}),i&&t.jsx(Qp,{isVideoTrimmed:G,setValue:ue,value:ae,videoDuration:xe,videoRef:L,isVideoLoading:y,videoSource:(b==null?void 0:b.videoSource)||"",valueRef:ke})]}),(c||s||a)&&t.jsxs(ch,{children:[t.jsx(pp,{insertVideoData:O,setInsertVideoData:W,overlaysData:ce,templatesOptions:Z,linksetsData:ee,reactionsCustomerEnabled:R}),j&&t.jsx(Cs,{onChangeVehicle:me=>{he(me==null?void 0:me.vin),D(!1)},placeholder:l("Search vehicle by name, VIN or stock number..."),selectedVin:O.vin,fetchSold:!1,addingVehicle:N,handleChangeVehicleButtonPress:()=>{he(""),D(!0)},handleRemoveVehicleButtonPress:()=>he(""),setAddingVehicle:D})]})]})})]})},mh=n.div`
|
|
1941
1941
|
display: flex;
|
|
1942
1942
|
justify-content: center;
|
|
1943
1943
|
align-items: flex-start;
|
|
@@ -1953,7 +1953,7 @@
|
|
|
1953
1953
|
object-fit: contain;
|
|
1954
1954
|
background: ${({theme:e})=>e.colors.primary[100]};
|
|
1955
1955
|
}
|
|
1956
|
-
`,fh=({video:e,videoRef:o,width:r=696,margin:i="0",useCovideoPlayer:s=!1})=>t.jsxs(mh,{margin:i,children:[!s&&t.jsx(xh,{width:r,children:t.jsx("video",{ref:o,...!Pt&&{preload:"metadata"},width:r,playsInline:!0,controls:!1,children:t.jsx("source",{src:e.videoSource,type:"video/mp4"})})}),s&&t.jsx(It,{width:`${r}px`,playerBackgroundColor:e.playerBackgroundColor||"",videoSource:e.videoSource,videoId:e.id,playButtonPosition:e.playButtonPosition||"",playerIconsColor:e.playerIconsAndTextColor||"",videoRef:o,autoplay:!1,disableControls:!0,startWithControls:!1})]}),Tr="video/webm",So="webm",Xo=e=>{try{e.getTracks().forEach(o=>o.stop())}catch{}};var js=(e=>(e.AbortError="media_aborted",e.NotAllowedError="permission_denied",e.NotFoundError="no_specified_media_found",e.NotReadableError="media_in_use",e.OverconstrainedError="invalid_media_constraints",e.TypeError="no_constraints",e.NONE="",e.NO_RECORDER="recorder_error",e))(js||{});const Nn={low:1e6,standard:25e5,high:5e6,ultra:8e6};function vh({audio:e=!0,video:o=!1,onStop:r=()=>null,blobPropertyBag:i,screen:s=!1,mediaRecorderOptions:c=null,mimeType:a="",quality:d="low"}){const l=p.useRef(null),u=p.useRef([]),g=p.useRef(null),[h,
|
|
1956
|
+
`,fh=({video:e,videoRef:o,width:r=696,margin:i="0",useCovideoPlayer:s=!1})=>t.jsxs(mh,{margin:i,children:[!s&&t.jsx(xh,{width:r,children:t.jsx("video",{ref:o,...!Pt&&{preload:"metadata"},width:r,playsInline:!0,controls:!1,children:t.jsx("source",{src:e.videoSource,type:"video/mp4"})})}),s&&t.jsx(It,{width:`${r}px`,playerBackgroundColor:e.playerBackgroundColor||"",videoSource:e.videoSource,videoId:e.id,playButtonPosition:e.playButtonPosition||"",playerIconsColor:e.playerIconsAndTextColor||"",videoRef:o,autoplay:!1,disableControls:!0,startWithControls:!1})]}),Tr="video/webm",So="webm",Xo=e=>{try{e.getTracks().forEach(o=>o.stop())}catch{}};var js=(e=>(e.AbortError="media_aborted",e.NotAllowedError="permission_denied",e.NotFoundError="no_specified_media_found",e.NotReadableError="media_in_use",e.OverconstrainedError="invalid_media_constraints",e.TypeError="no_constraints",e.NONE="",e.NO_RECORDER="recorder_error",e))(js||{});const Nn={low:1e6,standard:25e5,high:5e6,ultra:8e6};function vh({audio:e=!0,video:o=!1,onStop:r=()=>null,blobPropertyBag:i,screen:s=!1,mediaRecorderOptions:c=null,mimeType:a="",quality:d="low"}){const l=p.useRef(null),u=p.useRef([]),g=p.useRef(null),[h,x]=p.useState("idle"),[m,f]=p.useState(!1),[w,b]=p.useState(null),[y,S]=p.useState("NONE"),T=p.useRef(!1),$=Nn[d]||Nn.low;window.streams||(window.streams=[]),window.streams=window.streams.filter(Boolean);const k=p.useCallback(async()=>{x("acquiring_media");const D={audio:typeof e=="boolean"?!!e:e,video:typeof o=="boolean"?!!o:o};let O,W;try{if(s?(O=await window.navigator.mediaDevices.getDisplayMedia({video:o||!0}),window.streams.push(O),O&&e&&(W=await window.navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0}}),window.streams.push(W),W.getAudioTracks().forEach(Y=>O.addTrack(Y))),g.current=O):(O=await window.navigator.mediaDevices.getUserMedia(D),window.streams.push(O),g.current=O),!T.current){Xo(O);return}O&&x("idle")}catch(Y){Xo(O),Xo(W),S(Y.name),x("idle")}},[e,o,s]);p.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]),p.useEffect(()=>{if(!window.MediaRecorder)throw new Error("Unsupported Browser");if(s&&!window.navigator.mediaDevices.getDisplayMedia)throw new Error("This browser doesn't support screen capturing");const D=O=>{const W=navigator.mediaDevices.getSupportedConstraints(),Y=Object.keys(O).filter(se=>!W[se]);Y.length>0&&console.error(`The constraints ${Y.join(",")} doesn't support on this browser. Please check your ReactMediaRecorder component.`)};typeof e=="object"&&D(e),typeof o=="object"&&D(o),c&&c.mimeType&&(MediaRecorder.isTypeSupported(c.mimeType)||console.error("The specified MIME type you supplied for MediaRecorder doesn't support this browser")),g.current||k()},[e,s,o,k,c]);const L=async()=>{S("NONE"),g.current||await k(),g.current&&(g.current.getTracks().some(O=>O.readyState==="ended")&&await k(),l.current=new MediaRecorder(g.current,{mimeType:a,videoBitsPerSecond:$}),l.current.ondataavailable=j,l.current.onstop=R,l.current.onerror=()=>{S("NO_RECORDER"),x("idle")},l.current.start(),x("recording"))},v=async D=>{if(!D){S("NO_RECORDER");return}if(e){let O=await window.navigator.mediaDevices.getUserMedia({audio:e});window.streams.push(O),O.getAudioTracks().forEach(W=>D.addTrack(W))}l.current=new MediaRecorder(D,{mimeType:a,videoBitsPerSecond:$}),l.current.ondataavailable=j,l.current.onstop=R,l.current.onerror=()=>{S("NO_RECORDER"),x("idle")},l.current.start(),x("recording")},j=({data:D})=>{u.current.push(D)},R=()=>{const[D]=u.current,O=Object.assign({type:D.type},i||(o?{type:"video/mp4"}:{type:"audio/wav"})),W=new Blob(u.current,O),Y=URL.createObjectURL(W);x("stopped"),b(Y),r(Y,W)},V=D=>{f(D),g.current&&g.current.getAudioTracks().forEach(O=>O.enabled=!D)},C=()=>{l.current&&l.current.state==="recording"&&l.current.pause()},A=()=>{l.current&&l.current.state==="paused"&&l.current.resume()},P=()=>{l.current&&l.current.state!=="inactive"&&(x("stopping"),l.current.stop(),g.current&&g.current.getTracks().forEach(D=>D.stop()),u.current=[])},M=g.current?new MediaStream(g.current.getVideoTracks()):null;window.streams.push(M);const N=g.current?new MediaStream(g.current.getAudioTracks()):null;return window.streams.push(N),{error:js[y],muteAudio:()=>V(!0),unMuteAudio:()=>V(!1),startRecording:L,startRecordingForCanvas:v,pauseRecording:C,resumeRecording:A,stopRecording:P,mediaBlobUrl:w,status:h,isAudioMuted:m,previewStream:M,previewAudioStream:N,clearBlobUrl:()=>b(null)}}const bh=n.div`
|
|
1957
1957
|
box-sizing: border-box;
|
|
1958
1958
|
width: 400px;
|
|
1959
1959
|
max-width: 100%;
|
|
@@ -2113,7 +2113,7 @@
|
|
|
2113
2113
|
}
|
|
2114
2114
|
`,Mh=n.audio`
|
|
2115
2115
|
display: none;
|
|
2116
|
-
`,Dh={audioSource:{value:"default"}},Oh=({video:e,videoRef:o,onChangeVoiceoverValid:r,onRecordingUrlGeneration:i,handleShowCard:s,margin:c="0",width:a=696,disabled:d=!1})=>{var K;const{t:l}=
|
|
2116
|
+
`,Dh={audioSource:{value:"default"}},Oh=({video:e,videoRef:o,onChangeVoiceoverValid:r,onRecordingUrlGeneration:i,handleShowCard:s,margin:c="0",width:a=696,disabled:d=!1})=>{var K;const{t:l}=H.useTranslation(),{containerWidth:u}=Ce(),{colors:g,isCdkEnviroment:h}=n.useTheme(),{toast:x}=Te(),m=p.createRef(),[f,w]=p.useState("NotRecording"),[b,y]=p.useState("NotPreviewing"),[S,T]=p.useState(0),[$,k]=p.useState(),[L,v]=p.useState(!1),j=rt.useHistory(),R={audioSource:JSON.parse(localStorage.getItem(Fe.recordSettings)||JSON.stringify(Dh)).audioSource};let V;try{V={deviceId:R.audioSource.value}}catch{}(!R||!R.audioSource||!R.audioSource.value)&&(V=!1);const{error:C,startRecording:A,stopRecording:P,pauseRecording:M,resumeRecording:N,mediaBlobUrl:D}=vh({audio:V});(!V||C)&&(x({message:l("Please enable audio in your recording settings and try again!")}),j.push("/record/home"));const O=async()=>{o.current&&(s==null||s(!1),o.current.volume=0,o.current.play(),A(),w("Recording"))},W=()=>{o.current&&(M(),o.current.pause(),w("RecordingPaused"))},Y=()=>{var q;o.current&&(N(),(q=o.current)==null||q.play(),w("Recording"))},se=()=>{!o.current||!$||($.pause(),o.current.pause(),b!=="NotPreviewing"&&y("PreviewingPaused"),f!=="Finished"&&w("RecordingPaused"),v(!0))},Z=()=>{!o.current||!$||(v(!1),P(),o.current.pause(),o.current.currentTime=0,$.pause(),$.currentTime=0,w("NotRecording"),y("NotPreviewing"))},X=()=>{!o.current||!$||(y("Previewing"),o.current.currentTime=0,o.current.play(),$.play())},G=()=>{!o.current||!$||($.pause(),o.current.pause(),y("PreviewingPaused"))},re=()=>{!o.current||!$||($.play(),o.current.play(),y("Previewing"))},_=q=>{!o.current||!$||(o.current.currentTime=parseFloat(q),$.currentTime=parseFloat(q),$.play(),o.current.play(),y("Previewing"))},ne=()=>{[...window.streams].filter(Boolean).forEach(he=>ae(he)),window.streams=[],w("NotRecording"),y("NotPreviewing")},ae=q=>{try{q.getTracks().forEach(he=>he.stop())}catch{}};p.useEffect(()=>()=>{ne()},[]),p.useEffect(()=>{const q=()=>{var pe;let U=0;o.current&&(U=((pe=o==null?void 0:o.current)==null?void 0:pe.currentTime)||0,o.current.currentTime>=o.current.duration&&(U=o.current.duration)),T(U)},he=()=>{P(),w("Finished"),y("NotPreviewing")},Ee=()=>{w(U=>U==="Finished"?U:"Recording"),y(U=>U==="PreviewingPaused"?"Previewing":U)},Ie=()=>{w(U=>U==="Finished"?U:"RecordingPaused"),y(U=>U==="Previewing"?"PreviewingPaused":U)},Ne=()=>{!o.current||!$||($.currentTime=o.current.currentTime)};return o.current&&(o.current.addEventListener("timeupdate",q,!0),o.current.addEventListener("ended",he,!0),o.current.addEventListener("pause",Ie,!0),o.current.addEventListener("play",Ee,!0),o.current.addEventListener("seeked",Ne,!0)),()=>{o.current&&(o.current.removeEventListener("timeupdate",q,!0),o.current.removeEventListener("ended",he,!0),o.current.removeEventListener("pause",Ie,!0),o.current.removeEventListener("play",Ee,!0),o.current.removeEventListener("seeked",Ne,!0))}},[o]),p.useEffect(()=>{r(f==="Finished")},[f]),p.useEffect(()=>{i(D||""),!(!D||!m.current)&&m.current.load()},[D]),p.useEffect(()=>{m.current&&k(m.current)},[m.current]);const ue=f==="Finished",xe=f==="Recording",Se=((K=o==null?void 0:o.current)==null?void 0:K.duration)||(e!=null&&e.videoLength?(e==null?void 0:e.videoLength)/1e3:0),ke=Se?S?parseFloat(S.toString())/parseFloat(Se.toString())*100:0:100,ee=q=>{const he=q.target.value.toString(),Ee=Se*(he/100);_(Ee.toString())},ce=new Date(S*1e3).toISOString().substring(14,19);return t.jsxs(Eh,{margin:c,width:a,disabled:d,children:[t.jsx(Mh,{ref:m,children:t.jsx("source",{src:D||""})}),t.jsxs(Pn,{children:[f==="NotRecording"&&t.jsx(F.Button,{variant:h?"primary":"red",icon:t.jsx(Ii.BsRecordCircle,{size:12}),text:l("Record"),onClick:()=>O()}),f==="Recording"&&t.jsx(t.Fragment,{children:t.jsx(F.Button,{icon:t.jsx(Q.MdPause,{}),text:l("Pause"),variant:"secondary",onClick:()=>W()})}),f==="RecordingPaused"&&t.jsx(F.Button,{icon:t.jsx(Q.MdPlayArrow,{}),text:l("Resume"),variant:"primary",onClick:()=>Y()}),f==="Finished"&&b==="NotPreviewing"&&t.jsx(F.Button,{icon:t.jsx(Q.MdPlayArrow,{}),onClick:()=>X()}),b==="Previewing"&&t.jsx(F.Button,{icon:t.jsx(Q.MdPause,{}),onClick:()=>G()}),b==="PreviewingPaused"&&t.jsx(F.Button,{icon:t.jsx(Q.MdPlayArrow,{}),onClick:()=>re()})]}),t.jsxs(Th,{disabled:!ue,title:ue?"":l("Controls disabled before preview."),children:[t.jsxs(Ah,{children:[t.jsx($h,{children:t.jsx(Q.MdMic,{size:22,color:xe?g.primary[100]:g.neutral[60]})}),t.jsx(Rh,{children:ce})]}),t.jsxs(kh,{children:[t.jsx(Lh,{disabled:!ue,type:"range",min:"0",max:"100",value:ke,onChange:q=>ee(q),step:"1"}),t.jsx(Ih,{background:g.primary[100],position:ke})]}),t.jsx(Vh,{children:Dt(Se,0)})]}),["RecordingPaused","Finished"].includes(f)&&t.jsx(Pn,{children:t.jsx(F.Button,{variant:h?"text":"destructive",icon:t.jsx(Q.MdRefresh,{}),text:u>B.mb?l("Start Over"):"",onClick:()=>se()})}),L&&t.jsx(jh,{title:l("Start Over?"),content:t.jsx(t.Fragment,{children:l("Your voiceover recording will be erased.")}),secondaryButtonText:l("Back"),primaryButtonText:l("Start Over"),primaryButtonType:"primary",handleSubmit:()=>Z(),handleModalClose:()=>v(!1)})]})},Nh=n.div`
|
|
2117
2117
|
box-sizing: border-box;
|
|
2118
2118
|
width: 400px;
|
|
2119
2119
|
max-width: 100%;
|
|
@@ -2153,7 +2153,7 @@
|
|
|
2153
2153
|
`,Es=({title:e,label:o,defaultValue:r,primaryButtonText:i,secondaryButtonText:s,handleModalClose:c,handleSubmit:a})=>{const[d,l]=p.useState(r),{isCdkEnviroment:u}=n.useTheme();return t.jsx(Ft,{children:t.jsxs(Nh,{children:[t.jsxs(Ph,{children:[e,t.jsx(Fh,{children:t.jsx(kt,{width:"24px",height:"24px",onClick:c})})]}),t.jsxs(zh,{children:[t.jsx(Bh,{children:o}),t.jsx(Zt,{autoFocus:!0,value:d,onChange:g=>l(g.currentTarget.value),width:"100%"}),t.jsxs(_h,{children:[t.jsx(F.Button,{text:s,variant:u?"text":"secondary",onClick:c}),t.jsx(F.Button,{text:i,onClick:()=>a(d),disabled:d===""})]})]})]})})},Uh=(e,o)=>e+"_"+(Math.random()+1).toString(36).substring(2)+"."+o,Wh=n.div`
|
|
2154
2154
|
position: relative;
|
|
2155
2155
|
width: 216px;
|
|
2156
|
-
${({theme:e})=>e.containerWidth<
|
|
2156
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
2157
2157
|
width: 100%;
|
|
2158
2158
|
`}
|
|
2159
2159
|
`,Hh=n.div`
|
|
@@ -2174,12 +2174,12 @@
|
|
|
2174
2174
|
&:hover {
|
|
2175
2175
|
color: ${E.gray100};
|
|
2176
2176
|
}
|
|
2177
|
-
`,Ts=({prevSearch:e,handleSearch:o})=>{const{t:r}=
|
|
2177
|
+
`,Ts=({prevSearch:e,handleSearch:o})=>{const{t:r}=H.useTranslation(),[i,s]=p.useState(e||""),c=l=>{l.key==="Enter"&&o(i)},a=()=>{s(""),o("")},d=l=>{s(l.currentTarget.value)};return t.jsxs(Wh,{children:[t.jsx(Hh,{children:t.jsx(be.IoMdSearch,{onClick:()=>o(i),size:17})}),t.jsx(Zt,{width:"100%",type:"text",padding:"8px 40px 8px 40px",value:i,placeholder:r("Search..."),onKeyUp:c,onChange:d}),i!==""&&t.jsx(qh,{children:t.jsx(Q.MdClear,{onClick:()=>a(),size:17})})]})},Gh=n.div`
|
|
2178
2178
|
font-weight: 400;
|
|
2179
2179
|
font-size: 14px;
|
|
2180
2180
|
line-height: 20px;
|
|
2181
2181
|
color: ${E.gray80};
|
|
2182
|
-
`,ks=({page:e,size:o,count:r})=>{const i=e*o+1;let s=e*o+o;return s>r&&(s=r),t.jsxs(Gh,{children:[i,"-",s," of ",r]})},Yh={all:({page:e,search:o})=>["LESA_LIST",e,o]},Qh=async e=>{const r={start:((e.page||1)-1)*(e.limit||12),limit:e.limit,search:e.search,page:e.page};return(await oe.get("/lesa/videos",{params:r})).data},Zh=e=>{var r;const{toast:o}=
|
|
2182
|
+
`,ks=({page:e,size:o,count:r})=>{const i=e*o+1;let s=e*o+o;return s>r&&(s=r),t.jsxs(Gh,{children:[i,"-",s," of ",r]})},Yh={all:({page:e,search:o})=>["LESA_LIST",e,o]},Qh=async e=>{const r={start:((e.page||1)-1)*(e.limit||12),limit:e.limit,search:e.search,page:e.page};return(await oe.get("/lesa/videos",{params:r})).data},Zh=e=>{var r;const{toast:o}=Te();return we.useQuery(Yh.all({page:e.page,search:e.search||""}),()=>Qh(e),{refetchOnMount:!0,refetchOnWindowFocus:!1,enabled:e.search===""||(((r=e.search)==null?void 0:r.length)||0)>2,onError:()=>{o({message:"We're currently experiencing difficulties fetching Lesa videos."})}})},Kh=async e=>await oe.post("/lesa/videos",{...e}),Xh=({onSuccesCallback:e})=>{const{toast:o}=Te(),{t:r}=H.useTranslation();return we.useMutation(Kh,{onSuccess:()=>{o({message:r("Video has been added!")}),e()},onError:()=>o({message:r("An error occured while trying to add the video!")})})},Jh=e=>e.filter(Boolean).join(" "),e1=n.div`
|
|
2183
2183
|
background: ${E.gray10};
|
|
2184
2184
|
`,Kt=n.div`
|
|
2185
2185
|
font-style: normal;
|
|
@@ -2193,13 +2193,13 @@
|
|
|
2193
2193
|
flex-direction: row;
|
|
2194
2194
|
flex-direction: flex-start;
|
|
2195
2195
|
gap: 8px;
|
|
2196
|
-
${({theme:e})=>e.containerWidth<
|
|
2196
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2197
2197
|
flex-direction: column;
|
|
2198
2198
|
width: 100%;
|
|
2199
2199
|
`}
|
|
2200
2200
|
`,o1=n.div`
|
|
2201
2201
|
width: 216px;
|
|
2202
|
-
${({theme:e})=>e.containerWidth<
|
|
2202
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2203
2203
|
width: 100%;
|
|
2204
2204
|
`}
|
|
2205
2205
|
`,r1=n.div`
|
|
@@ -2334,10 +2334,10 @@
|
|
|
2334
2334
|
gap: 8px;
|
|
2335
2335
|
justify-content: flex-end;
|
|
2336
2336
|
align-items: center;
|
|
2337
|
-
${({theme:e})=>e.containerWidth<
|
|
2337
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2338
2338
|
width: 100%;
|
|
2339
2339
|
`}
|
|
2340
|
-
`,Wn=1,Jo=8,h1=1,g1=()=>{const e=rt.useHistory(),{containerWidth:o}=Ce(),[r,i]=p.useState(""),[s,c]=p.useState(Wn),a=()=>e.push("/"),{t:d}=
|
|
2340
|
+
`,Wn=1,Jo=8,h1=1,g1=()=>{const e=rt.useHistory(),{containerWidth:o}=Ce(),[r,i]=p.useState(""),[s,c]=p.useState(Wn),a=()=>e.push("/"),{t:d}=H.useTranslation(),{data:l,refetch:u,isLoading:g}=Zh({limit:Jo,page:s,search:r}),h=()=>{a()},{mutateAsync:x,isLoading:m}=Xh({onSuccesCallback:h}),f=()=>{c(1)},w=g||m,b=r.length>0&&r.length<3;p.useEffect(()=>{b||u()},[r]);const y=async(k="")=>{i(k),f()},S=k=>{var v;if(!k.video)return;const L=Jh([k==null?void 0:k.year.toString(),k.make,k.model,k.stockNumber]);x({url:(v=k.video)==null?void 0:v.url,fileName:L,lesaVehicleId:k.lesaVehicleId})},T=k=>{k==="left"&&c(L=>L-1),k==="right"&&c(L=>L+1)},$=Math.ceil(((l==null?void 0:l.count)||0)/Jo);return t.jsxs(t.Fragment,{children:[t.jsxs(e1,{children:[t.jsx(Ze,{left:t.jsx(F.Button,{text:d("Back"),icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>a(),variant:"transparent",style:{color:"white"}}),center:t.jsx(Kt,{children:d("Lesa TV Import")})}),t.jsx(dt,{children:t.jsxs(t1,{children:[t.jsx(Ts,{handleSearch:y,prevSearch:r}),t.jsx(o1,{})]})})]}),t.jsx(r1,{children:t.jsx(dt,{extendStyle:{wrapper:{padding:o>=B.xs?"32px 16px":"16px 0px"}},children:w?t.jsx(c1,{children:t.jsx(ze,{isLoading:w})}):b?t.jsx(Un,{children:t.jsx("p",{children:d("Please enter at least three characters to search")})}):l!=null&&l.videos.length?t.jsxs(t.Fragment,{children:[t.jsxs(s1,{children:[t.jsx(Bn,{children:t.jsxs(mo,{children:[d("Stock")," #"]})}),o>=B.xs&&t.jsx(Fn,{children:t.jsx(mo,{children:d("Year")})}),t.jsx(zn,{children:t.jsx(mo,{children:d("Make")})}),t.jsx(_n,{children:t.jsx(mo,{children:d("Model")})})]}),t.jsx(n1,{children:l==null?void 0:l.videos.map(k=>t.jsxs(i1,{onClick:()=>{},children:[t.jsx(Bn,{children:k.stockNumber}),o>=B.xs&&t.jsx(Fn,{children:k.year}),t.jsx(zn,{children:k.make}),t.jsx(_n,{children:k.model}),t.jsx(a1,{children:t.jsx(F.Button,{variant:"secondary",onClick:()=>S(k),text:d("Add")})})]},k.stockNumber))}),t.jsx(l1,{children:t.jsxs(p1,{children:[t.jsx(d1,{children:d("Go to:")}),t.jsx(u1,{type:"number",min:h1,value:s,onChange:k=>{if(!k.currentTarget||!k.currentTarget.value)return;const L=parseInt(k.currentTarget.value);if(L<=0){f();return}if(L>$){c($);return}c(L)}}),t.jsx(ks,{page:s-1,size:Jo,count:(l==null?void 0:l.count)||0}),t.jsx(F.Button,{onClick:()=>T("left"),icon:t.jsx(Q.MdChevronLeft,{size:20}),disabled:s===Wn,size:"small",variant:"secondary"}),t.jsx(F.Button,{onClick:()=>T("right"),icon:t.jsx(Q.MdChevronRight,{size:20}),disabled:s===$,size:"small",variant:"secondary"})]})})]}):t.jsxs(Un,{children:[t.jsx("p",{children:d("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:d("Try using different search term")})]})})})]})},m1=n.div`
|
|
2341
2341
|
background: ${E.white};
|
|
2342
2342
|
`,x1=n.div`
|
|
2343
2343
|
width: 78%;
|
|
@@ -2352,7 +2352,7 @@
|
|
|
2352
2352
|
background: #f2f4f6;
|
|
2353
2353
|
border: 1px solid rgba(39, 42, 50, 0.05);
|
|
2354
2354
|
border-radius: 6px;
|
|
2355
|
-
${({theme:e})=>e.containerWidth<
|
|
2355
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
2356
2356
|
width: 100%;
|
|
2357
2357
|
`}
|
|
2358
2358
|
`,f1=n.div`
|
|
@@ -2372,10 +2372,10 @@
|
|
|
2372
2372
|
line-height: 20px;
|
|
2373
2373
|
color: ${E.blackRgb60};
|
|
2374
2374
|
margin-top: 2%;
|
|
2375
|
-
`,y1=()=>{const{trackVideoSpecificPagesManually:e}=bt({vin:""}),{trackGTMSaveNewVideoInteractionEvent:o}=He(),{t:r}=
|
|
2375
|
+
`,y1=()=>{const{trackVideoSpecificPagesManually:e}=bt({vin:""}),{trackGTMSaveNewVideoInteractionEvent:o}=He(),{t:r}=H.useTranslation(),{toast:i}=Te(),{colors:s,isCdkEnviroment:c}=n.useTheme(),{videoId:a}=rt.useParams(),d=rt.useHistory(),[l,u]=p.useState({}),[g,h]=p.useState(!0),[x,m]=p.useState(!1),[f,w]=p.useState(!1),[b,y]=p.useState(!1),[S,T]=p.useState(""),$=p.createRef(),k=async()=>{h(!0);const j=await To(a);j&&u(j),h(!1)},L=()=>{y(!0)};if(p.useEffect(()=>{k()},[]),p.useEffect(()=>{var j,R;g||e==null||e({...vt.VIDEOS_VOICE_RECORDER,videoAttributes:{videoId:Number(l.id),videoType:(j=l.videoRequest)==null?void 0:j.videoType,videoCustomerName:!!((R=l.videoRequest)!=null&&R.customerName)||!1,videoLength:l.videoLength||0,videoTitle:l==null?void 0:l.title}})},[g]),g)return t.jsx(ze,{isLoading:g});const v=async j=>{var N,D,O,W;y(!1),m(!0);const R=await fetch(S||"").then(Y=>Y.blob()),V=Uh(l.id,So),C=new File([R],V),A={fileName:C.name,mimeType:"audio/webm",folder:""},P=await ka(A);if(!P||P instanceof Error){m(!1),i({message:r("Server is currently unavailable, try again later!")});return}const M={file:C,uploadURL:P.uploadUrl,mimeType:A.mimeType};try{await Ia({data:M}),await Aa({videoId:l.id,newVideoTitle:j,audioFileName:V});const Y={videoId:Number(l.id),videoType:(N=l==null?void 0:l.videoRequest)==null?void 0:N.videoType,videoCustomerName:!!((D=l==null?void 0:l.videoRequest)!=null&&D.customerName),videoLength:l.videoLength,videoTitle:l.title};o==null||o({type:Ao.VOICE_RECORD,vehicle:((O=l==null?void 0:l.videoRequest)==null?void 0:O.inventoryItem)||((W=l==null?void 0:l.videoRequest)==null?void 0:W.vehicle),videoAttributes:Y})}catch{m(!1),i({message:r("Creating voiceover failed, try again later!")});return}i({message:r("Voiceover successfully created!")}),m(!1),w(!1),d.push("/")};return t.jsxs(m1,{children:[t.jsx(Ze,{left:t.jsx(F.Button,{text:r("Back"),variant:"transparent",icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>d.push("/"),style:{color:"white"}}),center:t.jsx(Kt,{children:r("Voiceover")}),right:t.jsx(F.Button,{onClick:L,text:r("Save Video"),variant:c?"white":"primary",disabled:!f||x})}),t.jsx(dt,{children:!x&&t.jsxs(t.Fragment,{children:[t.jsxs(x1,{children:[t.jsx(f1,{children:t.jsx(Q.MdInfo,{size:22,color:s.primary[60]})}),t.jsxs(v1,{children:[t.jsx(b1,{children:r("Duplicated video ready for voiceover")}),t.jsx(w1,{children:r("The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.")})]})]}),t.jsx(fh,{video:l,videoRef:$,margin:"32px 0 0"}),t.jsx(Oh,{videoRef:$,video:l,onChangeVoiceoverValid:w,onRecordingUrlGeneration:j=>{T(j)},margin:"32px auto 0"})]})}),x&&t.jsx(ze,{isLoading:!0}),b&&t.jsx(Es,{title:r("Name new video"),label:r("Give your new video a name"),defaultValue:l.title,secondaryButtonText:r("Back"),primaryButtonText:r("Save Video"),handleSubmit:v,handleModalClose:()=>y(!1)})]})},C1=n.div`
|
|
2376
2376
|
position: relative;
|
|
2377
2377
|
width: 216px;
|
|
2378
|
-
${({theme:e})=>e.containerWidth<
|
|
2378
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
2379
2379
|
width: 100%;
|
|
2380
2380
|
`}
|
|
2381
2381
|
`,S1=n.div`
|
|
@@ -2396,25 +2396,25 @@
|
|
|
2396
2396
|
&:hover {
|
|
2397
2397
|
color: ${E.gray100};
|
|
2398
2398
|
}
|
|
2399
|
-
`,E1=({prevSearch:e,handleSearch:o})=>{const{t:r}=
|
|
2399
|
+
`,E1=({prevSearch:e,handleSearch:o})=>{const{t:r}=H.useTranslation(),[i,s]=p.useState(e||""),c=l=>{l.key==="Enter"&&o(i)},a=()=>{s(""),o("")},d=l=>{s(l.currentTarget.value)};return t.jsxs(C1,{children:[t.jsx(S1,{children:t.jsx(be.IoMdSearch,{onClick:()=>o(i),size:17})}),t.jsx(Zt,{width:"100%",type:"text",padding:"8px 40px 8px 40px",value:i,placeholder:r("Search Videos..."),onKeyUp:c,onChange:d}),i!==""&&t.jsx(j1,{children:t.jsx(Q.MdClear,{onClick:()=>a(),size:17})})]})},T1=n.div`
|
|
2400
2400
|
font-weight: 400;
|
|
2401
2401
|
font-size: 14px;
|
|
2402
2402
|
line-height: 20px;
|
|
2403
2403
|
color: ${E.gray80};
|
|
2404
|
-
`,k1=({page:e,size:o,count:r})=>{const{t:i}=
|
|
2404
|
+
`,k1=({page:e,size:o,count:r})=>{const{t:i}=H.useTranslation(),s=e*o+1;let c=e*o+o;return c>r&&(c=r),t.jsxs(T1,{children:[s,"-",c," ",i("of")," ",r]})},I1=n.div`
|
|
2405
2405
|
background: ${E.gray10};
|
|
2406
2406
|
`,A1=n.div`
|
|
2407
2407
|
display: flex;
|
|
2408
2408
|
flex-direction: row;
|
|
2409
2409
|
flex-direction: flex-start;
|
|
2410
2410
|
gap: 8px;
|
|
2411
|
-
${({theme:e})=>e.containerWidth<
|
|
2411
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2412
2412
|
flex-direction: column;
|
|
2413
2413
|
width: 100%;
|
|
2414
2414
|
`}
|
|
2415
2415
|
`,$1=n.div`
|
|
2416
2416
|
width: 216px;
|
|
2417
|
-
${({theme:e})=>e.containerWidth<
|
|
2417
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2418
2418
|
width: 100%;
|
|
2419
2419
|
`}
|
|
2420
2420
|
`,R1=n.div`
|
|
@@ -2471,7 +2471,7 @@
|
|
|
2471
2471
|
-webkit-box-orient: vertical;
|
|
2472
2472
|
max-width: 275px;
|
|
2473
2473
|
min-width: 200px;
|
|
2474
|
-
${({theme:e})=>e.containerWidth<
|
|
2474
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2475
2475
|
min-width: 100px;
|
|
2476
2476
|
`}
|
|
2477
2477
|
`,Gn=n.div`
|
|
@@ -2538,10 +2538,10 @@
|
|
|
2538
2538
|
gap: 8px;
|
|
2539
2539
|
justify-content: flex-end;
|
|
2540
2540
|
align-items: center;
|
|
2541
|
-
${({theme:e})=>e.containerWidth<
|
|
2541
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
2542
2542
|
width: 100%;
|
|
2543
2543
|
`}
|
|
2544
|
-
`,$t=1,_1=10,Yn=1,U1=1,Qn=new Date().getFullYear(),W1=()=>{const{t:e}=
|
|
2544
|
+
`,$t=1,_1=10,Yn=1,U1=1,Qn=new Date().getFullYear(),W1=()=>{const{t:e}=H.useTranslation(),o=rt.useHistory(),{containerWidth:r}=Ce(),[i,s]=p.useState(""),[c,a]=p.useState($t),[d,l]=p.useState(U1),[u,g]=p.useState(Qn),[h,x]=p.useState(Yn),[m,f]=p.useState($t),[w,b]=p.useState([]),{toast:y}=Te(),S=_1,[T,$]=p.useState(!0),k=()=>o.push("/");let L=()=>{};p.useEffect(()=>{(async()=>{$(!0);try{const A=await hn({limit:S,page:c,year:u,search:i});x(A.count),b(A.videos);let P=A.count<S?A.count:S;f(Math.ceil(A.count/P)),$(!1)}catch{$(!1)}})()},[S,c,u]);const v=async(C="",A=0,P=0)=>{C.length<2&&C!==""||(C!==i&&(s(C),A=$t,a($t)),d>0&&clearTimeout(d),L(),new Promise((M,N)=>{L=N,l(setTimeout(M,C!==i?500:0))}).then(async()=>{$(!0),P===0&&(P=u);try{const M=await hn({limit:S,search:C,page:A,year:P});x(M.count),b(M.videos),f(Math.ceil(M.count/S)),$(!1)}catch{$(!1)}}))},j=async C=>{$(!0);try{await Ra({title:C.year+" "+C.make+" "+C.model,flvName:C.wtvVideoId,animatedGifPath:C.animatedGifPath,year:parseInt(C.year),make:C.make,model:C.model,wtvId:C.wtvId}),$(!1),y({message:e("Video has been added!")}),k()}catch{$(!1),y({message:e("An error occured while trying to add the video!")})}},R=C=>{C==="left"&&(v(i,c-1,u),a(A=>A-1)),C==="right"&&(v(i,c+1,u),a(A=>A+1))};let V=[];for(let C=Qn;C>2007;C--)V.push({value:C.toString(),label:C.toString()});return t.jsxs(t.Fragment,{children:[t.jsxs(I1,{children:[t.jsx(Ze,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>k(),style:{color:"white"}}),center:t.jsx(Kt,{children:e("Wheels TV Import")})}),t.jsx(dt,{children:t.jsxs(A1,{children:[t.jsx(E1,{handleSearch:v,prevSearch:i}),t.jsx($1,{children:t.jsx(De,{value:{value:u.toString()||"",label:u.toString()||""},onChange:C=>{g(C.value),a($t),v(i,$t,C.value)},options:V,isSearchable:!1,creatable:!1})})]})})]}),t.jsx(R1,{children:t.jsx(dt,{extendStyle:{wrapper:{padding:r>=B.xs?"32px 16px":"16px 0px"}},children:T?t.jsx(O1,{children:t.jsx(ze,{isLoading:T})}):w.length?t.jsxs(t.Fragment,{children:[t.jsxs(M1,{children:[r>=B.xs&&t.jsx(Hn,{children:t.jsx(er,{children:e("Year")})}),t.jsx(qn,{children:t.jsx(er,{children:e("Make")})}),t.jsx(Gn,{children:t.jsx(er,{children:e("Model")})})]}),t.jsx(V1,{children:w.map(C=>t.jsxs(L1,{onClick:()=>{},children:[r>=B.xs&&t.jsx(Hn,{children:C.year}),t.jsx(qn,{children:C.make}),t.jsx(Gn,{children:C.model}),t.jsx(D1,{children:t.jsx(F.Button,{onClick:async()=>{j(C)},text:e("Add"),variant:"secondary"})})]},C.wtvVideoId))}),t.jsx(P1,{children:t.jsxs(B1,{children:[t.jsx(F1,{children:e("Go to:")}),t.jsx(z1,{type:"number",min:Yn,value:c,onChange:C=>{if(!C.currentTarget||!C.currentTarget.value)return;const A=parseInt(C.currentTarget.value);if(A<=0){a(1),v(i,1,u);return}if(A>m){a(m),v(i,m,u);return}a(A),v(i,A,u)}}),t.jsx(k1,{page:c-1,size:S,count:h}),t.jsx(F.Button,{onClick:()=>R("left"),icon:t.jsx(Q.MdChevronLeft,{size:20}),disabled:c===$t,variant:"secondary",size:"small"}),t.jsx(F.Button,{onClick:()=>R("right"),icon:t.jsx(Q.MdChevronRight,{size:20}),disabled:c===m,variant:"secondary",size:"small"})]})})]}):t.jsxs(N1,{children:[t.jsx("p",{children:e("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:e("Try using a different search terms")})]})})})]})},H1=n.div`
|
|
2545
2545
|
padding-left: 2px;
|
|
2546
2546
|
padding-right: 2px;
|
|
2547
2547
|
padding-top: 2px;
|
|
@@ -2553,7 +2553,7 @@
|
|
|
2553
2553
|
position: relative;
|
|
2554
2554
|
left: ${e=>e.offset};
|
|
2555
2555
|
width: ${e=>e.width};
|
|
2556
|
-
`,G1=({index:e,totalDuration:o,offset:r,width:i,video:s={},setVideos:c=()=>{},hasProcessingVideos:a,showPreviewTrack:d=!0})=>{const l=I.useRef([0,0]),[u,g]=p.useState([0,s.duration]);p.useEffect(()=>{c(
|
|
2556
|
+
`,G1=({index:e,totalDuration:o,offset:r,width:i,video:s={},setVideos:c=()=>{},hasProcessingVideos:a,showPreviewTrack:d=!0})=>{const l=I.useRef([0,0]),[u,g]=p.useState([0,s.duration]);p.useEffect(()=>{c(x=>{const m=[...x],f=u[0],w=u[1],b=`#t=${f||0}${w?","+w:""}`;return m[e]={...m[e],start:pn(u[0]),end:pn(u[1]),startSec:f,endSec:w,source:(""+s.source).split("#t=")[0]+b},m})},[u]);const h=x=>{const m=x[1]-x[0];c(f=>{const w=[...f];return w[e]={...w[e],width:m*100/o,trimDuration:m},w})};return p.useEffect(()=>{o&&c(x=>{const m=[...x];return m[e]={...m[e],width:s.trimDuration*100/o},m})},[o]),p.useMemo(()=>t.jsx(H1,{children:t.jsx(q1,{offset:`${r||0}px`,width:`${i||0}px`,children:!!s.duration&&s.ref&&!a&&t.jsx(Kr,{videoRef:s.ref,videoDuration:s.duration,videoSource:s.videoSource,setValue:g,showTickTime:!1,value:u,valueRef:l,width:"100%",onSlideEnd:h,showPreviewTrack:d})})},s.id),[s.width,s.ref,u,r,i,s.processing])},Y1=e=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 17C21.5523 17 22 16.5523 22 16C22 15.4477 21.5523 15 21 15H3C2.44772 15 2 15.4477 2 16C2 16.5523 2.44772 17 3 17H21ZM21 13C21.5523 13 22 12.5523 22 12C22 11.4477 21.5523 11 21 11H3C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13H21ZM2 8C2 8.55228 2.44772 9 3 9H21C21.5523 9 22 8.55228 22 8C22 7.44772 21.5523 7 21 7H3C2.44772 7 2 7.44772 2 8Z",fill:"#001B53",fillOpacity:.4})),Q1=n(Y1)`
|
|
2557
2557
|
width: ${e=>e.width||"24px"};
|
|
2558
2558
|
height: ${e=>e.height||"24px"};
|
|
2559
2559
|
g {
|
|
@@ -2641,7 +2641,7 @@
|
|
|
2641
2641
|
display: flex;
|
|
2642
2642
|
justify-content: center;
|
|
2643
2643
|
align-items: center;
|
|
2644
|
-
`,eg=({video:e={},setVideos:o=()=>{},setVideoRef:r,index:i,isDragDisabled:s,setShouldFetch:c})=>{const a=I.createRef(),[d,l]=p.useState(0),u=!!(e!=null&&e.id)&&(e==null?void 0:e.id.toString().includes(Td)),{videoData:g,retryCount:h}=Zi({videoId:(e==null?void 0:e.id)||0,enabled:!u&&(e==null?void 0:e.processing)===Vt.PROCESSING}),{imgRef:
|
|
2644
|
+
`,eg=({video:e={},setVideos:o=()=>{},setVideoRef:r,index:i,isDragDisabled:s,setShouldFetch:c})=>{const a=I.createRef(),[d,l]=p.useState(0),u=!!(e!=null&&e.id)&&(e==null?void 0:e.id.toString().includes(Td)),{videoData:g,retryCount:h}=Zi({videoId:(e==null?void 0:e.id)||0,enabled:!u&&(e==null?void 0:e.processing)===Vt.PROCESSING}),{imgRef:x}=Qi({src:(g==null?void 0:g.autogeneratedThumbnail)||(e==null?void 0:e.autoGeneratedGifPath)}),m=()=>{if(a.current){const w=a.current.duration;l(w)}};p.useEffect(()=>{d&&o(w=>{const b=[...w];return b[i]={...b[i],duration:d,trimDuration:d},b})},[d]),p.useEffect(()=>{a&&a.current&&(a.current.onloadedmetadata=()=>m(),r(i,a))},[a]),p.useEffect(()=>{g&&h!==0&&c(!0)},[g,h]);const f=e.processing===Vt.FAILED||e.processing===Vt.READY;return p.useMemo(()=>t.jsxs(K1,{children:[t.jsx(X1,{disabled:s,children:t.jsx(Q1,{})}),f?t.jsxs(Z1,{children:[x.current?t.jsx(Zn,{ref:x}):t.jsx(Zn,{src:e.autogeneratedThumbnail}),t.jsx(It,{videoSource:e.videoSource,videoId:e.id,thumbnail:e.autogeneratedThumbnail,videoRef:a,autoplay:!1})]}):t.jsx(J1,{children:t.jsx(tt,{})})]},e.id),[e.videoSource,e.processing,g])},tg=e=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",...e},I.createElement("defs",null,I.createElement("path",{id:"p1bfbm3cda",d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.26 4.25c.41.41 1.07.41 1.48 0l.01-.01c.41-.41.41-1.07 0-1.48L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm-2-5h4c.28 0 .5.22.5.5s-.22.5-.5.5h-4c-.28 0-.5-.22-.5-.5s.22-.5.5-.5z"})),I.createElement("g",{fill:"none",fillRule:"evenodd",opacity:.2},I.createElement("g",null,I.createElement("g",null,I.createElement("g",{transform:"translate(-1112 -640) translate(1104 632) translate(8 8)"},I.createElement("mask",{id:"98kq0pmrgb",fill:"#fff"},I.createElement("use",{xlinkHref:"#p1bfbm3cda"})),I.createElement("use",{fill:"#000",fillRule:"nonzero",xlinkHref:"#p1bfbm3cda"}),I.createElement("g",{fill:"#272A32",mask:"url(#98kq0pmrgb)"},I.createElement("path",{d:"M0 0H24V24H0z"}))))))),og=n(tg)`
|
|
2645
2645
|
width: ${e=>e.width||"24px"};
|
|
2646
2646
|
height: ${e=>e.height||"24px"};
|
|
2647
2647
|
g {
|
|
@@ -2697,14 +2697,14 @@
|
|
|
2697
2697
|
${e=>e.playButtonPosition==="none"&&n.css`
|
|
2698
2698
|
display: none;
|
|
2699
2699
|
`}
|
|
2700
|
-
`,sg=e=>{const{playerBackgroundColor:o,playButtonPosition:r,isVideoPaused:i,togglePlay:s,playerIconsColor:c,small:a}=e,d=Ai.hex.rgb(o);return t.jsx(ig,{isVideoPaused:i,onClick:s,r:d[0],g:d[1],b:d[2],hex:o,playButtonPosition:r,small:a,children:t.jsx(
|
|
2700
|
+
`,sg=e=>{const{playerBackgroundColor:o,playButtonPosition:r,isVideoPaused:i,togglePlay:s,playerIconsColor:c,small:a}=e,d=Ai.hex.rgb(o);return t.jsx(ig,{isVideoPaused:i,onClick:s,r:d[0],g:d[1],b:d[2],hex:o,playButtonPosition:r,small:a,children:t.jsx(Q.MdPlayArrow,{color:c})})},ag=n.div`
|
|
2701
2701
|
position: relative;
|
|
2702
2702
|
background-color: ${E.themeDark75Percent};
|
|
2703
2703
|
border-radius: 6px;
|
|
2704
2704
|
width: ${e=>e.width||600}px;
|
|
2705
2705
|
height: ${e=>e.height||300}px;
|
|
2706
2706
|
max-width: 100%;
|
|
2707
|
-
${({theme:e})=>e.containerWidth<=
|
|
2707
|
+
${({theme:e})=>e.containerWidth<=B.mb&&n.css`
|
|
2708
2708
|
border-radius: 0;
|
|
2709
2709
|
`}
|
|
2710
2710
|
`,cg=n.div`
|
|
@@ -2720,7 +2720,7 @@
|
|
|
2720
2720
|
display: flex;
|
|
2721
2721
|
justify-content: center;
|
|
2722
2722
|
align-items: center;
|
|
2723
|
-
`,dg=({width:e,height:o,displayVideos:r,hasProcessingVideos:i})=>{const s=p.useRef(null),{colors:c}=n.useTheme(),a=p.useRef(0),[d,l]=p.useState(!0),[u,g]=p.useState(!1),[h,
|
|
2723
|
+
`,dg=({width:e,height:o,displayVideos:r,hasProcessingVideos:i})=>{const s=p.useRef(null),{colors:c}=n.useTheme(),a=p.useRef(0),[d,l]=p.useState(!0),[u,g]=p.useState(!1),[h,x]=p.useState(0),[m,f]=p.useState(0),[w,b]=p.useState(0);p.useEffect(()=>{a.current=0;let C=0;for(let A=0;A<r.length;A++){let P=r[A].startSec?r[A].startSec:0,N=(r[A].endSec?r[A].endSec:r[A].duration)-P;C+=N}x(C||1)},[r]);const y=()=>{l(!1)},S=()=>{if(s.current){const C=a.current,A=s.current;let P=A.currentTime,M=r[C].startSec?r[C].startSec:0;P=P-M,P=P<0?0:P;for(let N=0;N<C;N++){let D=r[N].startSec?r[N].startSec:0,W=(r[N].endSec?r[N].endSec:r[N].duration)-D;P+=W}r[C].endSec<=A.currentTime&&T(),f(P)}},T=()=>{if(s.current){const C=s.current;l(!0);const A=++a.current;if(r.length>A){C.src=r[A].source;let P=r[A].startSec?r[A].startSec:0;C.currentTime=P}else a.current=0,C.src=r[0].source,C.pause(),g(!1)}},$=C=>{const A=parseFloat(C.currentTarget.value);if(s.current){const P=s.current,M=a.current;let N=0,D=0;for(let O=0;O<r.length;O++){let W=r[O].startSec?r[O].startSec:0,se=(r[O].endSec?r[O].endSec:r[O].duration)-W;if(D+=se,A>=N&&A<D){M!==O&&(l(!0),a.current=O,P.src=r[O].source),P.currentTime=A-N+W;break}N=D}}},k=()=>{s.current&&a.current>0&&u&&s.current.play()},L=()=>{const C=s.current;C&&(u?C.pause():C.play(),g(!u))},j=!!(r[a.current]?r[a.current].source:"")&&!i,R=100*(w-0)/(h-0),V={background:`linear-gradient(90deg, ${c.primary[100]} 0%, ${c.primary[100]} ${R}%, #d0d3d9 ${R}%, #d0d3d9 100%)`};return t.jsx(ag,{width:e,height:o,children:j?t.jsxs(t.Fragment,{children:[t.jsx("video",{...!Pt&&{preload:"metadata"},width:e,height:o,ref:s,onTimeUpdate:S,onLoadedMetadata:y,onEnded:T,onCanPlayThrough:k,src:`${r[a.current].source}`,onClick:L,style:{maxWidth:"100%"},playsInline:!0,controls:!1}),t.jsx(sg,{playerBackgroundColor:"#fff",playButtonPosition:"center",isVideoPaused:!u,togglePlay:L,playerIconsColor:E.themeDark75Percent}),t.jsx(cg,{children:t.jsx(As,{onChange:C=>{b(+C.target.value),$(C)},value:m,max:h,min:"0",type:"range",step:"0.01",color:"red",style:{width:"100%",marginTop:"-25px",zIndex:2,height:"4px",...V,boxShadow:"0px 0px 4px rgba(66, 79, 104, 0.08),0px 6px 12px rgba(66, 79, 104, 0.06)"}})})]}):t.jsx(lg,{children:t.jsx(tt,{size:30})})})},ug=e=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},I.createElement("path",{className:"bg",fill:"white",d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"}),I.createElement("path",{className:"icon",fill:"#E84C3D",d:"M16.3 16.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0-.187-.187-.292-.44-.292-.705 0-.265.105-.518.292-.705L10.59 12 7.7 9.11c-.187-.187-.292-.44-.292-.705 0-.265.105-.518.292-.705.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"})),pg=n(ug)`
|
|
2724
2724
|
width: ${e=>e.width||"16px"};
|
|
2725
2725
|
height: ${e=>e.height||"16px"};
|
|
2726
2726
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -2781,7 +2781,7 @@
|
|
|
2781
2781
|
border-top-left-radius: 16px;
|
|
2782
2782
|
border-bottom-left-radius: 16px;
|
|
2783
2783
|
margin-top: 8px;
|
|
2784
|
-
${({theme:e})=>e.containerWidth<=
|
|
2784
|
+
${({theme:e})=>e.containerWidth<=B.mb&&n.css`
|
|
2785
2785
|
padding-top: 0px;
|
|
2786
2786
|
margin-top: 16px;
|
|
2787
2787
|
`}
|
|
@@ -2805,7 +2805,7 @@
|
|
|
2805
2805
|
width: calc(100% - 250px);
|
|
2806
2806
|
padding-top: 39px;
|
|
2807
2807
|
padding-bottom: 26px;
|
|
2808
|
-
${({theme:e})=>e.containerWidth<=
|
|
2808
|
+
${({theme:e})=>e.containerWidth<=B.mb&&n.css`
|
|
2809
2809
|
padding-top: 0;
|
|
2810
2810
|
margin-top: 16px;
|
|
2811
2811
|
`}
|
|
@@ -2845,7 +2845,7 @@
|
|
|
2845
2845
|
margin-bottom: 32px;
|
|
2846
2846
|
border-radius: 6px;
|
|
2847
2847
|
margin-top: 30px;
|
|
2848
|
-
${({theme:e})=>e.containerWidth<=
|
|
2848
|
+
${({theme:e})=>e.containerWidth<=B.mb&&n.css`
|
|
2849
2849
|
margin-top: 0;
|
|
2850
2850
|
border-radius: 0;
|
|
2851
2851
|
margin-bottom: 0;
|
|
@@ -2980,7 +2980,7 @@
|
|
|
2980
2980
|
border-color: transparent;
|
|
2981
2981
|
color: transparent;
|
|
2982
2982
|
}
|
|
2983
|
-
`,Mg=(e,o)=>e>0?Math.ceil(e/o)*o:o,Dg=({videos:e=[],setVideos:o=()=>{},hasProcessingVideos:r,setShouldFetch:i})=>{const{t:s}=
|
|
2983
|
+
`,Mg=(e,o)=>e>0?Math.ceil(e/o)*o:o,Dg=({videos:e=[],setVideos:o=()=>{},hasProcessingVideos:r,setShouldFetch:i})=>{const{t:s}=H.useTranslation(),{colors:c,isCdkEnviroment:a}=n.useTheme(),{containerWidth:d}=Ce(),l=de.useHistory(),[u,g]=p.useState(0),[h,x]=p.useState(0),[m,f]=p.useState(0),[w,b]=p.useState(0),[y,S]=p.useState(10),[T,$]=p.useState(20);p.useEffect(()=>{g(e.reduce((R,V)=>R+V.duration,0)||0),x(e.reduce((R,V)=>R+V.trimDuration,0)||0)},[e]),p.useEffect(()=>{b(60+e.length*100)},[e]),p.useEffect(()=>{function R(){const V=Math.max(Mg(u*y,y),d-223);f(V),$(Math.round(V/y))}R()},[u,y,d]);const k=R=>{if(e.length===1){l.push("/");return}try{const V=localStorage.getItem(Fe.merge),C=e[R],P=(JSON.parse(V||"")||[]).filter(M=>M.id.toString()!==C.id.toString());localStorage.setItem(Fe.merge,JSON.stringify(P))}catch(V){console.log(V)}o(V=>{const C=[...V];return C.splice(R,1),C})},L=(R,V)=>{o(C=>{const A=[...C];return A[R].ref=V,A})},v=R=>{if(R===0)return 0;const V=e[R-1],C=e[R];return R===1?V.endSec*y-C.startSec*y:V.trimDuration*y+V.startSec*y-C.startSec*y+v(R-1)},j=async R=>{if(!R.destination)return;const V=da(e,R.source.index,R.destination.index);o(V)};return t.jsxs(mg,{children:[r&&t.jsx(Lg,{children:t.jsx(Is,{text:"Some of the videos are still processing. Please wait until they are done, and then proceed with merging."})}),t.jsx(jg,{children:e&&!!e.length&&t.jsx(dg,{width:592,height:332,displayVideos:e,hasProcessingVideos:r})}),t.jsxs(xg,{children:[t.jsxs(Sg,{children:[t.jsx($g,{children:t.jsx(F.Button,{variant:"white",icon:t.jsx(ps,{height:21,width:21}),text:s("Add More Videos"),onClick:()=>{l.push("/?add-more")}})}),d>B.mb&&t.jsxs(Rg,{children:[t.jsx(Kn,{onClick:()=>!r&&y>10&&S(y-5),disabled:r||y===10,children:t.jsx(og,{width:24,height:24,color:c.primary[100]})}),t.jsx(As,{type:"range",onChange:R=>S(R.target.value),min:10,max:200,value:y,disabled:r,style:{width:"100px",height:"4px",backgroundColor:"#d0d3d9",boxShadow:"0px 0px 4px rgba(66, 79, 104, 0.08),0px 6px 12px rgba(66, 79, 104, 0.06)"}}),t.jsx(Kn,{onClick:()=>!r&&y<200&&S(y+5),disabled:y===200||r,children:t.jsx(ng,{width:24,height:24,color:c.primary[100]})})]})]}),t.jsxs(fg,{children:[t.jsx(vg,{children:t.jsx(zo.DragDropContext,{onDragEnd:j,children:t.jsx(zo.Droppable,{droppableId:"videos",children:R=>t.jsxs("div",{ref:R.innerRef,...R.droppableProps,children:[e.map((V,C)=>t.jsx(zo.Draggable,{draggableId:V.id.toString(),index:C,isDragDisabled:r,children:A=>t.jsx("div",{ref:A.innerRef,...A.draggableProps,...A.dragHandleProps,children:t.jsx(eg,{index:C,video:V,setVideos:o,removeVideo:k,setVideoRef:L,isDragDisabled:r,setShouldFetch:i},`${V.id}${C}thumb`)})},V.id)),R.placeholder]})})})}),t.jsxs(yg,{height:w,id:"row-container",children:[d>B.mb&&t.jsxs(wg,{width:m,children:[t.jsx(Eg,{children:[...Array(Math.round(T/12)).keys()].map(R=>t.jsxs(Ig,{width:12*y,children:[t.jsx("span",{children:Dt(R*12,0)}),R+1===Math.round(T/12)&&t.jsx("span",{children:Dt((R+1)*12,0)})]},R))}),t.jsx(Tg,{children:[...Array(T).keys()].map(R=>t.jsx(kg,{width:y,rightBorder:R+1===T,inside:R>=e[0].startSec&&R<=e[0].startSec+h},R))})]}),t.jsx(Cg,{children:e.map((R,V)=>t.jsx(Ag,{children:t.jsx(Vg,{children:t.jsx(pg,{onClick:()=>k(V),height:20,width:20,color:a?c.primary[100]:c.white[100],bgColor:a?c.white[100]:c.danger[40]})})},`${R.id}${V}`))}),d>B.mb&&t.jsx(bg,{children:e.map((R,V)=>t.jsx(G1,{index:V,totalDuration:u,offset:v(V),width:R.duration*y,video:R,setVideos:o,hasProcessingVideos:r,showPreviewTrack:!1},`${R.id}${V}row`))})]})]})]})]})},Og=e=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"3 3 18 18",...e},I.createElement("path",{fill:"#001B53",fillRule:"evenodd",d:"M17 3H3v18h18V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"})),$s=n(Og)`
|
|
2984
2984
|
width: ${e=>e.width||"24px"};
|
|
2985
2985
|
height: ${e=>e.height||"24px"};
|
|
2986
2986
|
path {
|
|
@@ -3037,9 +3037,9 @@
|
|
|
3037
3037
|
justify-content: flex-end;
|
|
3038
3038
|
align-items: right;
|
|
3039
3039
|
padding: 0 32px 32px;
|
|
3040
|
-
`,Hg=({open:e=!1,disableSave:o=!1,infoBoxText:r,title:i="",text:s="",discardButtonText:c="Keep video",confirmButtonText:a="Delete video",onClickDiscardButton:d,onClickConfirmButton:l,showDiscardIcon:u=!0,showSaveIcon:g=!0,handleModalClose:h=()=>{}})=>{const{isCdkEnviroment:
|
|
3040
|
+
`,Hg=({open:e=!1,disableSave:o=!1,infoBoxText:r,title:i="",text:s="",discardButtonText:c="Keep video",confirmButtonText:a="Delete video",onClickDiscardButton:d,onClickConfirmButton:l,showDiscardIcon:u=!0,showSaveIcon:g=!0,handleModalClose:h=()=>{}})=>{const{isCdkEnviroment:x}=n.useTheme();return e?t.jsx(Io,{disableFullScreen:!0,style:{position:"fixed",zIndex:999},children:t.jsxs(zg,{children:[t.jsxs(Bg,{children:[t.jsxs(_g,{children:[t.jsx("p",{children:i}),t.jsx(Fg,{children:t.jsx(kt,{width:"24px",height:"24px",onClick:h})})]}),t.jsx(Ug,{children:s}),r&&t.jsx(Is,{text:r,width:"430px"})]}),t.jsxs(Wg,{children:[t.jsx(F.Button,{...!!u&&{icon:t.jsx(Pg,{height:24,width:24})},text:c,onClick:d,variant:x?"text":"secondary"}),t.jsx(F.Button,{...!!g&&{icon:t.jsx($s,{height:16,width:16})},text:a,onClick:l,disabled:o})]})]})}):null},Ro=({when:e,navigate:o=()=>{},shouldBlockNavigation:r,onConfirm:i=()=>{},onDiscard:s=()=>{},onStay:c=()=>{},stay:a=!1,title:d,text:l,discardButtonText:u,confirmButtonText:g,showDiscardIcon:h=!0,showSaveIcon:x=!0,infoBoxText:m,disableSave:f})=>{const{t:w}=H.useTranslation(),b=d||w("Leave without saving changes?"),y=l||w("Your updates will not be saved. This action can’t be undone."),S=u||w("Discard Changes"),T=g||w("Save Changes"),[$,k]=p.useState(!1),[L,v]=p.useState(null),[j,R]=p.useState(!1),V=()=>{k(!1)},C=N=>!j&&r(N)?(k(!0),v(N),!1):!0,A=()=>{i(),k(!1),R(!0)},P=()=>{s(),k(!1),R(!0)},M=()=>{V(),c()};return p.useEffect(()=>{j&&L&&o(L.pathname)},[j,L]),t.jsxs(t.Fragment,{children:[t.jsx(de.Prompt,{when:e,message:C}),t.jsx(Hg,{open:$,title:b,text:y,discardButtonText:S,confirmButtonText:T,showDiscardIcon:h,showSaveIcon:x,handleModalClose:V,onClickDiscardButton:P,onClickConfirmButton:a?M:A,infoBoxText:m,disableSave:f})]})};var Rs=(e=>(e.ORGANIZATION_VIDEO="ORGANIZATION_VIDEO",e.LESA_VEHICLE="LESA_VEHICLE",e.VIDEO="VIDEO",e.WHEELS_TV="WHEELS_TV",e))(Rs||{});const qg=n.main`
|
|
3041
3041
|
background: ${E.gray10};
|
|
3042
|
-
`,Gg=()=>{const{t:e}=
|
|
3042
|
+
`,Gg=()=>{const{t:e}=H.useTranslation(),{trackGTMSaveNewVideoInteractionEvent:o}=He(),{isCdkEnviroment:r}=n.useTheme(),{trackVideoSpecificPagesManually:i}=bt({vin:""}),s=de.useLocation(),a=(new URLSearchParams(s.search).get("videos")||"").split(",").filter(Boolean),[d,l]=p.useState({}),[u,g]=p.useState(a.map(v=>({id:v}))),h=de.useHistory(),[x,m]=I.useState(!1),[f,w]=I.useState(!1),[b,y]=I.useState(!0),[S,T]=p.useState(!0),$=v=>v.pathname==="/"&&(v.search==="?add-more"||v.search==="?merged")?!1:!f;p.useEffect(()=>{b||i==null||i({...vt.VIDEOS_MERGE,mergeIds:a.map(v=>Number(v))})},[b]),p.useEffect(()=>{if(S){const v=localStorage.getItem(Fe.merge),j=JSON.parse(v);let R={};j==null||j.forEach(V=>{R[V.id]=V}),l(R),T(!1)}},[S]),p.useEffect(()=>{y(!0),Object.values(d).forEach(async v=>{const j=await To(v.id);g(R=>[...R].map(C=>{const A={sourceType:Rs.VIDEO,sourceId:Number(C.id)};return C.id.toString()===v.id.toString()?{...C,...v,source:j.videoSource,flvName:j.flvName+".mp4",start:"00:00:00:00",sourceType:A}:{...C,sourceType:A}}))}),y(!1)},[d]);const k=async v=>{var A,P;window.localStorage.removeItem(Fe.merge);const j=1e3*u.reduce((M,N)=>M+N.trimDuration,0),R=u.filter(M=>M.sourceType!==void 0).map(M=>M.sourceType),V=await ya({videos:u.map(M=>({start:M.start,end:M.end,id:M.id,flvName:M.flvName})),videoName:v,duration:j,...R.length>0&&{sources:R}}),C={videoId:Number(V.id),videoType:((A=V==null?void 0:V.videoRequest)==null?void 0:A.videoType)||void 0,videoCustomerName:!!((P=V==null?void 0:V.videoRequest)!=null&&P.customerName),videoLength:V.videoLength,videoTitle:V.title};o==null||o({type:Ao.MERGE,videoAttributes:C,mergedIds:u.map(M=>Number(M.id))}),w(!0),h.push("/?merged")};if(b)return t.jsx(ze,{isLoading:b});const L=!!u.find(v=>(v==null?void 0:v.processing)===Vt.PROCESSING);return t.jsxs(qg,{children:[u.length>=2&&t.jsx(Ro,{when:!0,navigate:v=>{h.push(v)},stay:!0,onStay:()=>m(!0),onConfirm:()=>{},shouldBlockNavigation:v=>$(v),disableSave:L,infoBoxText:L?e("Some of the videos are still processing. Please wait until they are done, and then proceed with merging."):""}),t.jsx(Ze,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>{window.localStorage.removeItem(Fe.merge),h.push("/")},extendStyles:{container:{color:"white"}}}),center:t.jsx(Kt,{children:e("Merge Videos")}),right:t.jsx(F.Button,{variant:r?"white":"primary",onClick:()=>m(!0),text:e("Save"),disabled:!u||u.length<2||L})}),t.jsx(Dg,{videos:u,setVideos:g,hasProcessingVideos:L,setShouldFetch:T}),x&&t.jsx(Es,{title:e("Name new video"),label:e("Give your new video a name"),defaultValue:"",secondaryButtonText:e("Back"),primaryButtonText:e("Save Video"),handleSubmit:v=>k(v),handleModalClose:()=>m(!1)})]})},Yg=({onSaveVideo:e,isSaveDisabled:o,setInsertAfterSave:r,uploadLoading:i})=>{const{t:s}=H.useTranslation(),{isCdkEnviroment:c,colors:a}=n.useTheme(),d=de.useHistory(),{showInsertFeature:l,containerWidth:u}=Ce();return t.jsx(Ze,{left:t.jsx(F.Button,{text:s("Back"),variant:"transparent",icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>{d.push("/")},style:{color:"white"}}),center:t.jsx(Kt,{children:""}),right:t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:()=>{e()},text:s("Save"),variant:c?"white":"secondary",disabled:o||i,icon:i?t.jsx(tt,{size:12}):t.jsx($s,{height:"15px"})}),l&&t.jsx(F.Button,{onClick:()=>{r(!0),e()},text:u>B.sm?s("Continue to Insert"):s("Insert"),disabled:o||i,variant:c?"white":"primary"})]})})},at={all:[],user:[]},Qg=async({page:e=0,size:o=50,search:r="",all:i=!1,sort:s,refresh:c=!0})=>{var l,u;const a={start:e*o,limit:o,search:r,sort:s,all:""};if(i&&(a.all="true"),!c){if(i&&((l=at==null?void 0:at.all)!=null&&l.length))return at.all;if(!i&&((u=at==null?void 0:at.user)!=null&&u.length))return at.user}const{data:d}=await oe.get("/video-tags",{params:a});return i?at.all=d:at.user=d,d},Zg=async(e,o)=>({videoTags:(await oe.put(`/videos/${e}/video-tags`,o)).data}),Kg=n.div`
|
|
3043
3043
|
font-style: normal;
|
|
3044
3044
|
font-weight: 500;
|
|
3045
3045
|
font-size: 14px;
|
|
@@ -3156,7 +3156,7 @@
|
|
|
3156
3156
|
`,or=n.div`
|
|
3157
3157
|
position: absolute;
|
|
3158
3158
|
top: 30px;
|
|
3159
|
-
`,rr={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},s0=({title:e,beginUploadProcess:o,afterUpload:r,setSavedVideoId:i,file:s,fileName:c})=>{const{t:a}=
|
|
3159
|
+
`,rr={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},s0=({title:e,beginUploadProcess:o,afterUpload:r,setSavedVideoId:i,file:s,fileName:c})=>{const{t:a}=H.useTranslation(),{colors:d}=n.useTheme(),{userData:l}=ve(),[u,g]=p.useState(1),[h,x]=p.useState({loaded:0,total:0,percentage:0}),{presignedUrl:m,fetch:f,loading:w,error:b}=as(),{uploadVideo:y,loading:S,data:T,error:$}=us(),{fetch:k,loading:L,videoData:v,error:j,progress:R}=is(),{fetch:V,loading:C,encodeData:A,error:P,progress:M}=ss(),N=async()=>{s&&f({fileName:c,type:Tr})};p.useEffect(()=>{if(o){if(m&&m.url||!e)return;N()}},[o]),p.useEffect(()=>{m&&!w&&!b&&s&&(g(1),y({url:m.url,file:s,contentType:Tr,onUploadProgress:O}))},[m]),p.useEffect(()=>{!S&&!$&&T&&s&&(g(2),k({filename:c,title:e}))},[S,T]),p.useEffect(()=>{!L&&!j&&v&&s&&(g(3),i(v.video_id),V({videoId:v.video_id,customerId:l.customerId}))},[L,v]),p.useEffect(()=>{!C&&!P&&A&&s&&r&&r()},[C,A]);const D=()=>u?u==1?h.percentage*50/100:u==2?50+(R||0):100:0,O=Y=>{var se=Math.round(Y.loaded*100/Y.total);x({loaded:Math.floor(Y.loaded/1024),total:Math.floor(Y.total/1024),percentage:se})},W=Y=>(Y/1e3).toFixed(2);return t.jsx(r0,{children:t.jsxs(t0,{children:[t.jsxs(o0,{children:[t.jsxs(tr,{isActive:S,children:[t.jsx("span",{children:a(S?"Uploading":"Uploaded")}),h.percentage<100&&t.jsx(or,{children:t.jsx(Bo.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!h.percentage||h.percentage===100)&&t.jsx(_o.Circle,{style:rr,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]}),t.jsxs(tr,{isActive:L,children:[t.jsx("span",{children:a(L?"Creating":"Created")}),R<100&&t.jsx(or,{children:t.jsx(Bo.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!R||R===100)&&t.jsx(_o.Circle,{style:rr,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]}),t.jsxs(tr,{isActive:C,children:[t.jsx("span",{children:a(C?"Encoding":"Encoded")}),M<100&&t.jsx(or,{children:t.jsx(Bo.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!M||M===100)&&t.jsx(_o.Circle,{style:rr,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]})]}),t.jsx(n0,{value:D(),max:100,color:d.primary[100]}),t.jsx(i0,{children:W(h.loaded)+" MB/"+W(h.total)+" MB"})]})})},a0=n.div`
|
|
3160
3160
|
width: auto;
|
|
3161
3161
|
margin-top: 8px;
|
|
3162
3162
|
.error {
|
|
@@ -3216,31 +3216,31 @@
|
|
|
3216
3216
|
&:focus {
|
|
3217
3217
|
outline: 0;
|
|
3218
3218
|
}
|
|
3219
|
-
${({theme:e})=>e.containerWidth>=
|
|
3219
|
+
${({theme:e})=>e.containerWidth>=B.lg&&n.css`
|
|
3220
3220
|
width: 368px;
|
|
3221
3221
|
min-width: 368px;
|
|
3222
3222
|
max-width: 368px;
|
|
3223
3223
|
`}
|
|
3224
|
-
`,p0=({attributes:e,initValues:o,setIsSaveDisabled:r})=>{const{colors:i}=n.useTheme(),{userData:s}=
|
|
3224
|
+
`,p0=({attributes:e,initValues:o,setIsSaveDisabled:r})=>{const{colors:i}=n.useTheme(),{userData:s}=ve(),c=Ke(s),a=nt(s),d=ut(s),l=Hi(s),[u,g]=I.useState(),{errors:h,validateForm:x,setFieldValue:m}=Ae.useFormikContext();I.useEffect(()=>{x(),f()},[e]),I.useEffect(()=>{(u==null?void 0:u.length)!==0?r(!0):r(!1)},[u]);const f=()=>{let b=0;const y=[];return e.forEach(S=>{S&&S.isRequired&&(S.default===""||S.default===null)&&(++b,y.push(S))}),g(y),d&&l&&(b+=1),a&&l&&(b+=2),b},w=(b,y)=>{b!==""&&y.isRequired&&u.find(T=>T.attributeId===y.attributeId)&&g(u.filter(T=>T.attributeId!==y.attributeId)),b===""&&y.isRequired&&!u.find(T=>T.attributeId===y.attributeId)&&g([...u,y])};return!c&&!e.length?null:t.jsx(a0,{children:e.map((b,y)=>{const S=(!!b.isReadOnly||!!b.isLocked)&&!!o[y],T=!!h[`attributes${y}`],$=!!b.isRequired;let k="";return S&&(k="disabled"),T&&(k+=" error"),t.jsxs(c0,{children:[t.jsxs(l0,{children:[b.title,$&&t.jsx("span",{style:{color:i.primary[100]},children:"*"})]}),b.type==="text"&&t.jsxs(t.Fragment,{children:[t.jsx(Ae.Field,{name:`attributes${y}`,disabled:S,as:d0,type:"text",required:$,className:k,defaultValue:b.default,onChange:L=>{w(L.target.value,b),m(`attributes${y}`,L.target.value)},onFocus:()=>{x()}}),T?t.jsx("div",{style:{color:"#E84C3D",marginTop:"3px"},children:h[`attributes${y}`]}):t.jsx(t.Fragment,{})]}),b.type==="textarea"&&t.jsxs(t.Fragment,{children:[t.jsx(Ae.Field,{disabled:S,name:`attributes${y}`,as:u0,defaultValue:b.default,className:k,required:$,type:"text",onChange:L=>{w(L.target.value,b),m(`attributes${y}`,L.target.value)}}),T?t.jsx("div",{style:{color:"#E84C3D",marginTop:"3px"},children:h[`attributes${y}`]}):t.jsx(t.Fragment,{})]}),b.type==="dropdown"&&t.jsx(Ae.Field,{name:`attributes${y}`,disabled:S,required:$,className:k,children:({field:L,form:v})=>{const{value:j}=L,R=b.dropdownValues.map(V=>({value:V.value,label:V.value}));return t.jsx(De,{creatable:!1,isSearchable:!0,disabled:S,maxMenuHeight:100,options:R,defaultValue:R.find(V=>V.value===b.default)||"",value:R.find(V=>V.value==j),onChange:V=>{w(V.value,b),(b.isReadOnly||b.isLocked)&&o[y]?v.setFieldValue(`attributes${y}`,o[y]):v.setFieldValue(`attributes${y}`,V.value)}})}})]},y)})})},h0=n.div`
|
|
3225
3225
|
display: flex;
|
|
3226
3226
|
justify-content: space-between;
|
|
3227
3227
|
box-sizing: border-box;
|
|
3228
|
-
${({theme:e})=>e.containerWidth<
|
|
3228
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
3229
3229
|
flex-direction: column;
|
|
3230
3230
|
`}
|
|
3231
3231
|
`,g0=n.div`
|
|
3232
3232
|
box-sizing: border-box;
|
|
3233
3233
|
width: 100%;
|
|
3234
|
-
${({theme:e})=>e.containerWidth>=
|
|
3234
|
+
${({theme:e})=>e.containerWidth>=B.xs&&n.css`
|
|
3235
3235
|
width: 50%;
|
|
3236
3236
|
`}
|
|
3237
|
-
${({theme:e})=>e.containerWidth<
|
|
3237
|
+
${({theme:e})=>e.containerWidth<B.xs&&n.css`
|
|
3238
3238
|
margin-top: 8px;
|
|
3239
3239
|
`}
|
|
3240
3240
|
`,m0=n.div`
|
|
3241
3241
|
box-sizing: border-box;
|
|
3242
3242
|
width: 100%;
|
|
3243
|
-
${({theme:e})=>e.containerWidth>=
|
|
3243
|
+
${({theme:e})=>e.containerWidth>=B.xs&&n.css`
|
|
3244
3244
|
padding-right: 52px;
|
|
3245
3245
|
width: 50%;
|
|
3246
3246
|
`}
|
|
@@ -3275,7 +3275,7 @@
|
|
|
3275
3275
|
display: flex;
|
|
3276
3276
|
flex-wrap: wrap;
|
|
3277
3277
|
gap: 4px;
|
|
3278
|
-
`,y0=[0,0],C0=({children:e,...o})=>{var s;const r=o.data.label,i=!((s=o.data)!=null&&s.__isNew__);return t.jsx(Qe.components.Option,{...o,children:t.jsxs(Ls,{children:[i&&t.jsx(Vs,{style:{marginRight:"8px"},width:15,height:15,color:"inherit"}),r]})})},S0=({recordingBlobUrl:e,recordDate:o,setSaveFunction:r,insertAfterSave:i=!1,setIsSaveDisabled:s,skipUploadProcess:c=!1,videoId:a,initialTitle:d,updateUploadLoading:l})=>{const{t:u}=W.useTranslation(),g=u("Search tags or create new..."),h=!1,{userData:m}=fe(),{showTrimFeature:x}=Ce(),f=p.useMemo(()=>Di(m,So),[m,So]),w=ut(m),b=nt(m),y=p.createRef(),[S,T]=p.useState(d||o),[$,k]=p.useState([]),[L,v]=p.useState({value:"",label:u("Select vehicle")}),[j,R]=p.useState({value:"",label:u("Select video type")}),[V,C]=p.useState([]),[A,P]=p.useState(),[M,N]=p.useState([]),[D,O]=p.useState([]),[U,G]=p.useState({value:"",label:g}),[se,Z]=p.useState(!1),[X,q]=p.useState(!1),[re,z]=p.useState({title:"",tags:""}),[ce,ae]=p.useState(),[pe,ve]=p.useState(0),[Te,ke]=p.useState({}),[ee,le]=p.useState(!0);p.useRef([0,0]);const[K,H]=p.useState(y0),[he,je]=p.useState(!1),[Ie,Q]=p.useState(a||""),[ne,ye]=p.useState(),Re=ue.useHistory(),_e=p.useRef(null),{toast:Ve}=Ee(),Me=Object.values(w?Br:_r).filter(Boolean).map(B=>({value:B,label:u(B)})),$e={};$e.covideoName=S,$e.saveToCompanyFolder=!1;const qe=()=>{let B={title:"",tags:""};return(!S||!S.length)&&(B.title=u("Title cannot be empty.")),z(B),Object.values(B).every(ie=>ie==="")},wt=()=>{const B=_e.current.values;ke(B),Z(!1),qe()&&(l==null||l(!0),c?yt(B):q(!0))},Ne=B=>B.sort((J,ie)=>{var ge;return(ge=J.labelField)==null?void 0:ge.localeCompare(ie.labelField)}),it=B=>{if(!B||!B.value)return;const J=M.some(xe=>xe.value==B.value),ie=J?B:{value:B.value,label:B.label,labelField:B.label,__isNew__:!0};D.find(xe=>xe.value===ie.value)||O(xe=>[...xe||[],ie]),J||N(Ne([...M,ie])),G(ie)},Ge=(B,J)=>{const ie=[...D];if(ie.splice(J,1),O(ie),G({value:"",label:g}),U.__isNew__){const ge=[...M],xe=M.findIndex(At=>At.value===B.value);xe>-1&&(ge.splice(xe,1),N(ge))}},Oo=async()=>{try{const B=await Qg({}),J=[];B.forEach(ge=>{J.push({label:ge.tag,value:ge.tagId,labelField:ge.tag})});const ie=Ne(J);N(ie)}catch(B){console.log(B)}},No=async()=>{try{const B=await Va({});C(B.attributes||[]);const J=B.attributes.map((ie,ge)=>{if(ie.type==="dropdown"){const xe=ie.dropdownValues.find(At=>At.default);return xe&&xe.value?($e[`attributes${ge}`]=xe.value,xe.value):($e[`attributes${ge}`]="","")}return $e[`attributes${ge}`]=ie.default||"",ie.default||""});_e.current.values=$e,ye($e),P(J)}catch(B){console.log(B)}},co=async()=>{try{const B=await Dr({});if(B.items){const J=[];B.items.forEach(ie=>{J.push({label:t.jsxs(v0,{children:[t.jsxs(Ls,{children:[t.jsx(Jg,{style:{marginRight:"8px"},width:15,height:15}),ie.title]}),t.jsx(b0,{children:ie.vin})]}),value:ie.vin,labelField:ie.vin})}),k(J)}}catch(B){console.log(B)}},lo=async()=>{const B=D.map(J=>({value:J.value,label:J.labelField,__isNew__:J.__isNew__}));await Zg(Ie,B)},uo=async()=>{if(!Ke(m))return 0;const B={videoId:parseInt(Ie),videoType:(j==null?void 0:j.value)||"",...!!w&&{vin:(L==null?void 0:L.value)||""}};return(await Ta({data:B})).videoRequestId},Po=async B=>{const J=B||Te,ie=V.map((ge,xe)=>({attributeId:ge.attributeId,value:J[`attributes${xe}`]||"",videoId:parseInt(Ie)}));ie&&ie.length&&await La(Ie,ie).catch(ge=>ge)},yt=async B=>{try{if(D.length&&await lo(),await Po(B),await uo(),he){const J=await Xt(Ie);J&&Q(J.id)}d&&a&&d!==S&&await Ca({videoId:a,videoBody:{title:S}}),Z(!0),Ve({message:u("Successfully saved video!")})}catch{Ve({message:u("There was an error while creating your video request. Please try again.")})}},zt=async()=>{await No(),await Oo(),await co()},Fo=async B=>{try{const J=await fetch(B||"").then(ie=>ie.blob());ae(J)}catch(J){console.log(J)}},Xt=async B=>{const J=Math.floor(K[0]*100)/100,ie=Math.floor(K[1]*100)/100;try{return await Fi(B,{duration:ie,start:J})}catch{Ve({message:u("Something went wrong while trimming the video, try again later!")})}};p.useEffect(()=>{zt()},[]),p.useEffect(()=>{e&&Fo(e)},[e]),p.useEffect(()=>{se&&setTimeout(()=>{if(l==null||l(!1),i&&Ie){Re.push(`/insert-video/${Ie}`);return}Re.push("/")},400)},[se,Ie]),p.useEffect(()=>{H([0,pe])},[pe]),p.useEffect(()=>{const B=Oi({trimStart:K[0],trimEnd:K[1],videoDuration:pe});return je(B),()=>{je(!1)}},[K,pe]),p.useEffect(()=>{s(S==="")},[S]),p.useEffect(()=>{r&&r(()=>wt)},[S,K,pe,L,he]);const te=async()=>{a&&await wa({videoIds:[a],deleteMultiple:!1})};return t.jsxs("div",{children:[t.jsx(Ro,{when:!0,stay:!0,onConfirm:()=>{},navigate:B=>{a&&te(),Re.push(B)},shouldBlockNavigation:()=>!se,title:u("Delete Current Video?"),text:u("Do you want to go back? The current video will be deleted."),confirmButtonText:u("No, Keep Video "),discardButtonText:u("Yes, Delete Video"),showDiscardIcon:!1,showSaveIcon:!1}),X?t.jsx(s0,{title:S,beginUploadProcess:X,afterUpload:yt,setSavedVideoId:Q,file:ce,fileName:f}):t.jsxs(h0,{children:[t.jsxs(m0,{children:[t.jsxs(x0,{children:[t.jsx(It,{id:"",videoSource:e,videoRef:y,preventWideSize:!0,borderBottomRadius:"0px",setVideoDuration:ve,setIsVideoLoading:le}),t.jsxs(f0,{children:[t.jsx(be.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),t.jsx("div",{children:ca()})]})]}),h]}),t.jsx(g0,{children:t.jsx(Ae.Formik,{enableReinitialize:!0,innerRef:_e,initialValues:ne,validateOnMount:!0,onSubmit:()=>{},children:({errors:B,isValid:J,values:ie,setFieldValue:ge})=>t.jsxs(Ae.Form,{children:[t.jsxs(xo,{children:[t.jsx(Bt,{text:u("Title")}),!!re.title&&t.jsx(Bt,{text:re.title,color:E.red100}),t.jsx(Zt,{type:"text",onChange:xe=>T(xe.target.value),value:S,...re.title&&{borderColor:E.red100}})]}),t.jsxs(xo,{marginBottom:"8px",children:[t.jsx(Bt,{text:u("Tags")}),!!re.tags&&t.jsx(Bt,{text:re.tags,color:E.red100}),t.jsx(De,{options:M.filter(xe=>!xe||!D.length||!D.some(At=>At.value===xe.value)),placeholder:g,controlShouldRenderValue:!1,value:U,onChange:xe=>it(xe),isSearchable:!0,creatable:!0,extendStyles:{control:{...re.tags&&{borderColor:E.red100}}},customComponents:{Option:C0}}),t.jsx(w0,{children:D.map((xe,At)=>t.jsx(F.Button,{icon:t.jsx(Vs,{width:15,height:15}),text:xe.label,onClick:()=>Ge(xe,At),size:"small",variant:"white"},xe.value))})]}),w&&t.jsxs(xo,{children:[t.jsx(Bt,{text:u("VIN / search vehicle")}),t.jsx(De,{options:$,value:L,onChange:xe=>v(xe),isSearchable:!0,isClearable:!!(L!=null&&L.value),creatable:!1})]}),(b||w)&&t.jsxs(xo,{marginBottom:"8px",children:[t.jsx(Bt,{text:u("Video Type")}),t.jsx(De,{options:Me,value:j,onChange:xe=>R(xe),isSearchable:!0,isClearable:!!(j!=null&&j.value),creatable:!1})]}),t.jsx(p0,{attributes:V||[],initValues:A,setIsSaveDisabled:s})]})})})]})]})},j0={id:"",title:"",recordDate:"",views:"0",videoLength:0,thumbnail:"",videoSource:"",tags:[],videoRequest:{videoRequestId:"0"},folder:"",processing:0,autogeneratedThumbnail:""},E0=()=>{const{videoId:e}=ue.useParams(),[o,r]=p.useState(j0),[i,s]=p.useState(!0),[c,a]=p.useState(),[d,l]=p.useState(!1),[u,g]=p.useState(!1),[h,m]=p.useState(!1),x=w=>m(w),f=async()=>{if(!e)return;const w=await To(e);w&&(r(w),s(!1))};return p.useEffect(()=>{o.id||f()},[]),i?t.jsx(Fe,{isLoading:i}):t.jsxs("div",{children:[t.jsx(Yg,{onSaveVideo:c||(()=>{}),setInsertAfterSave:l,isSaveDisabled:u,uploadLoading:h}),t.jsx(dt,{children:t.jsx(S0,{recordingBlobUrl:o.videoSource,recordDate:o.recordDate,insertAfterSave:d,setSaveFunction:a,setIsSaveDisabled:g,skipUploadProcess:!0,videoId:e,initialTitle:o.title,updateUploadLoading:x})})]})},T0=(e,o)=>{const r=new AudioContext,i=r.createMediaStreamSource(e),s=r.createMediaStreamSource(o),c=r.createMediaStreamDestination(),a=r.createGain(),d=r.createGain();return a.gain.value=.7,d.gain.value=.7,i.connect(a).connect(c),s.connect(d).connect(c),c.stream.getTracks()},k0=async(e,o,r)=>{const i={video:{...r,displaySurface:"monitor"},audio:!0},s=await navigator.mediaDevices.getDisplayMedia(i);e.current=s;const c=s.getAudioTracks();if(o){const a=await navigator.mediaDevices.getUserMedia({audio:o});if(c.length>0){const l=[...s.getVideoTracks(),...T0(s,a)];return new MediaStream(l)}const d=[...s.getVideoTracks(),...a.getAudioTracks()];return new MediaStream(d)}return s},nr=async(e,o,r)=>{const i=await navigator.mediaDevices.getUserMedia({audio:o,video:{...r,deviceId:{exact:r.deviceId}}});return e.current=i,e.current},I0=async(e,o,r,i,s)=>{const c={video:{displaySurface:"monitor",logicalSurface:!0,cursor:"always"}},a=await navigator.mediaDevices.getUserMedia({audio:r,video:i});s.current&&(s.current.srcObject=a,s.current.muted=!0,await s.current.play(),s.current.requestPictureInPicture());const d=await navigator.mediaDevices.getDisplayMedia(c);e.current=d,o.current=a;const l=new MediaStream;return a.getAudioTracks().forEach(u=>{l.addTrack(u)}),d.getVideoTracks().forEach(u=>{l.addTrack(u)}),l},A0=async(e,o,r,i,s)=>{const c={video:{displaySurface:"browser",logicalSurface:!0,cursor:"always"}},a=await navigator.mediaDevices.getDisplayMedia(c),d=await navigator.mediaDevices.getUserMedia({audio:r,video:i});e.current=a,o.current=d;const l=new MediaStream;return d.getAudioTracks().forEach(u=>{l.addTrack(u)}),a.getVideoTracks().forEach(u=>{l.addTrack(u)}),s.current&&(s.current.srcObject=d,s.current.muted=!0,await s.current.play()),l},$0=()=>new Promise(async(e,o)=>{let r=await navigator.mediaDevices.enumerateDevices();if(Gt.some(r,{label:""}))try{const i=await navigator.mediaDevices.getUserMedia({audio:!0,video:!0});r=await navigator.mediaDevices.enumerateDevices(),i.getTracks().forEach(s=>s.stop())}catch(i){o(i)}e(r)});var kr=(e=>(e.AUDIO_INPUT="audioinput",e.VIDEO_INPUT="videoinput",e))(kr||{}),Oe=(e=>(e.LOW="low",e.STANDARD="standard",e.HIGH="high",e))(Oe||{});const Ms=p.createContext({}),Ds="record_settings",Xn={audioSource:null,videoSource:null,videoQuality:Oe.STANDARD},R0=(e,o)=>{try{const r=localStorage.getItem(Ds);return r?JSON.parse(r):{videoQuality:Oe.STANDARD,videoSource:o,audioSource:e}}catch(r){return console.error("Error parsing user settings from localStorage:",r),{videoQuality:Oe.STANDARD,videoSource:o,audioSource:e}}},V0=({children:e})=>{const{t:o}=W.useTranslation(),r={label:o("No Audio"),value:!1},i={label:o("No Video"),value:!1},[s,c]=p.useState({audioSource:[],videoSource:[]}),[a,d]=p.useState(Xn),[l,u]=p.useState(null),[g,h]=p.useState(Xn),m=()=>{u(o("You do not have the necessary permissions to access this feature. Please check your browser permissions."))},x=async()=>{var w;try{const b=await $0(),S=(Array.isArray(b)?b:[]).reduce((L,v)=>(v.kind===kr.AUDIO_INPUT?L.audio.push({label:v.label,value:v.deviceId}):v.kind===kr.VIDEO_INPUT&&L.video.push({label:v.label,value:v.deviceId}),L),{audio:[],video:[]}),T=S.audio.find(L=>L.value==="default")||r,$=((w=S.video)==null?void 0:w[0])||i,k=R0(T,$);c({audioSource:[...S.audio,r],videoSource:S.video}),d(k),h(k),u(null)}catch{m(),c({audioSource:[r],videoSource:[i]})}},f=()=>{h(a),localStorage.setItem(Ds,JSON.stringify(a))};return p.useEffect(()=>{var b;const w=()=>{x()};if(((b=navigator==null?void 0:navigator.mediaDevices)==null?void 0:b.ondevicechange)!==void 0)return navigator.mediaDevices.addEventListener("devicechange",w),x(),()=>{navigator.mediaDevices.removeEventListener("devicechange",w)};console.log("The navigator.mediaDevices API is not supported in this browser."),w()},[]),t.jsx(Ms.Provider,{value:{recorderSettings:s,userSettings:a,setUserSettings:d,recordingError:l,updateErrorMessage:m,initialUserSettings:g,onSubmitModalHandler:f},children:e})},Xr=()=>{const e=p.useContext(Ms);if(e===void 0)throw new Error("useRecordSettings must be used within a RecordSettingsProvider");return e},L0=n.div`
|
|
3278
|
+
`,y0=[0,0],C0=({children:e,...o})=>{var s;const r=o.data.label,i=!((s=o.data)!=null&&s.__isNew__);return t.jsx(Qe.components.Option,{...o,children:t.jsxs(Ls,{children:[i&&t.jsx(Vs,{style:{marginRight:"8px"},width:15,height:15,color:"inherit"}),r]})})},S0=({recordingBlobUrl:e,recordDate:o,setSaveFunction:r,insertAfterSave:i=!1,setIsSaveDisabled:s,skipUploadProcess:c=!1,videoId:a,initialTitle:d,updateUploadLoading:l})=>{const{t:u}=H.useTranslation(),g=u("Search tags or create new..."),h=!1,{userData:x}=ve(),{showTrimFeature:m}=Ce(),f=p.useMemo(()=>Di(x,So),[x,So]),w=ut(x),b=nt(x),y=p.createRef(),[S,T]=p.useState(d||o),[$,k]=p.useState([]),[L,v]=p.useState({value:"",label:u("Select vehicle")}),[j,R]=p.useState({value:"",label:u("Select video type")}),[V,C]=p.useState([]),[A,P]=p.useState(),[M,N]=p.useState([]),[D,O]=p.useState([]),[W,Y]=p.useState({value:"",label:g}),[se,Z]=p.useState(!1),[X,G]=p.useState(!1),[re,_]=p.useState({title:"",tags:""}),[ne,ae]=p.useState(),[ue,xe]=p.useState(0),[Se,ke]=p.useState({}),[ee,ce]=p.useState(!0);p.useRef([0,0]);const[K,q]=p.useState(y0),[he,Ee]=p.useState(!1),[Ie,Ne]=p.useState(a||""),[U,pe]=p.useState(),ye=de.useHistory(),Le=p.useRef(null),{toast:$e}=Te(),Me=Object.values(w?Br:_r).filter(Boolean).map(z=>({value:z,label:u(z)})),Re={};Re.covideoName=S,Re.saveToCompanyFolder=!1;const qe=()=>{let z={title:"",tags:""};return(!S||!S.length)&&(z.title=u("Title cannot be empty.")),_(z),Object.values(z).every(ie=>ie==="")},wt=()=>{const z=Le.current.values;ke(z),Z(!1),qe()&&(l==null||l(!0),c?yt(z):G(!0))},Pe=z=>z.sort((J,ie)=>{var ge;return(ge=J.labelField)==null?void 0:ge.localeCompare(ie.labelField)}),it=z=>{if(!z||!z.value)return;const J=M.some(fe=>fe.value==z.value),ie=J?z:{value:z.value,label:z.label,labelField:z.label,__isNew__:!0};D.find(fe=>fe.value===ie.value)||O(fe=>[...fe||[],ie]),J||N(Pe([...M,ie])),Y(ie)},Ge=(z,J)=>{const ie=[...D];if(ie.splice(J,1),O(ie),Y({value:"",label:g}),W.__isNew__){const ge=[...M],fe=M.findIndex(At=>At.value===z.value);fe>-1&&(ge.splice(fe,1),N(ge))}},Oo=async()=>{try{const z=await Qg({}),J=[];z.forEach(ge=>{J.push({label:ge.tag,value:ge.tagId,labelField:ge.tag})});const ie=Pe(J);N(ie)}catch(z){console.log(z)}},No=async()=>{try{const z=await Va({});C(z.attributes||[]);const J=z.attributes.map((ie,ge)=>{if(ie.type==="dropdown"){const fe=ie.dropdownValues.find(At=>At.default);return fe&&fe.value?(Re[`attributes${ge}`]=fe.value,fe.value):(Re[`attributes${ge}`]="","")}return Re[`attributes${ge}`]=ie.default||"",ie.default||""});Le.current.values=Re,pe(Re),P(J)}catch(z){console.log(z)}},co=async()=>{try{const z=await Dr({});if(z.items){const J=[];z.items.forEach(ie=>{J.push({label:t.jsxs(v0,{children:[t.jsxs(Ls,{children:[t.jsx(Jg,{style:{marginRight:"8px"},width:15,height:15}),ie.title]}),t.jsx(b0,{children:ie.vin})]}),value:ie.vin,labelField:ie.vin})}),k(J)}}catch(z){console.log(z)}},lo=async()=>{const z=D.map(J=>({value:J.value,label:J.labelField,__isNew__:J.__isNew__}));await Zg(Ie,z)},uo=async()=>{if(!Ke(x))return 0;const z={videoId:parseInt(Ie),videoType:(j==null?void 0:j.value)||"",...!!w&&{vin:(L==null?void 0:L.value)||""}};return(await Ta({data:z})).videoRequestId},Po=async z=>{const J=z||Se,ie=V.map((ge,fe)=>({attributeId:ge.attributeId,value:J[`attributes${fe}`]||"",videoId:parseInt(Ie)}));ie&&ie.length&&await La(Ie,ie).catch(ge=>ge)},yt=async z=>{try{if(D.length&&await lo(),await Po(z),await uo(),he){const J=await Xt(Ie);J&&Ne(J.id)}d&&a&&d!==S&&await Ca({videoId:a,videoBody:{title:S}}),Z(!0),$e({message:u("Successfully saved video!")})}catch{$e({message:u("There was an error while creating your video request. Please try again.")})}},zt=async()=>{await No(),await Oo(),await co()},Fo=async z=>{try{const J=await fetch(z||"").then(ie=>ie.blob());ae(J)}catch(J){console.log(J)}},Xt=async z=>{const J=Math.floor(K[0]*100)/100,ie=Math.floor(K[1]*100)/100;try{return await Fi(z,{duration:ie,start:J})}catch{$e({message:u("Something went wrong while trimming the video, try again later!")})}};p.useEffect(()=>{zt()},[]),p.useEffect(()=>{e&&Fo(e)},[e]),p.useEffect(()=>{se&&setTimeout(()=>{if(l==null||l(!1),i&&Ie){ye.push(`/insert-video/${Ie}`);return}ye.push("/")},400)},[se,Ie]),p.useEffect(()=>{q([0,ue])},[ue]),p.useEffect(()=>{const z=Oi({trimStart:K[0],trimEnd:K[1],videoDuration:ue});return Ee(z),()=>{Ee(!1)}},[K,ue]),p.useEffect(()=>{s(S==="")},[S]),p.useEffect(()=>{r&&r(()=>wt)},[S,K,ue,L,he]);const te=async()=>{a&&await wa({videoIds:[a],deleteMultiple:!1})};return t.jsxs("div",{children:[t.jsx(Ro,{when:!0,stay:!0,onConfirm:()=>{},navigate:z=>{a&&te(),ye.push(z)},shouldBlockNavigation:()=>!se,title:u("Delete Current Video?"),text:u("Do you want to go back? The current video will be deleted."),confirmButtonText:u("No, Keep Video "),discardButtonText:u("Yes, Delete Video"),showDiscardIcon:!1,showSaveIcon:!1}),X?t.jsx(s0,{title:S,beginUploadProcess:X,afterUpload:yt,setSavedVideoId:Ne,file:ne,fileName:f}):t.jsxs(h0,{children:[t.jsxs(m0,{children:[t.jsxs(x0,{children:[t.jsx(It,{id:"",videoSource:e,videoRef:y,preventWideSize:!0,borderBottomRadius:"0px",setVideoDuration:xe,setIsVideoLoading:ce}),t.jsxs(f0,{children:[t.jsx(be.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),t.jsx("div",{children:ca()})]})]}),h]}),t.jsx(g0,{children:t.jsx(Ae.Formik,{enableReinitialize:!0,innerRef:Le,initialValues:U,validateOnMount:!0,onSubmit:()=>{},children:({errors:z,isValid:J,values:ie,setFieldValue:ge})=>t.jsxs(Ae.Form,{children:[t.jsxs(xo,{children:[t.jsx(Bt,{text:u("Title")}),!!re.title&&t.jsx(Bt,{text:re.title,color:E.red100}),t.jsx(Zt,{type:"text",onChange:fe=>T(fe.target.value),value:S,...re.title&&{borderColor:E.red100}})]}),t.jsxs(xo,{marginBottom:"8px",children:[t.jsx(Bt,{text:u("Tags")}),!!re.tags&&t.jsx(Bt,{text:re.tags,color:E.red100}),t.jsx(De,{options:M.filter(fe=>!fe||!D.length||!D.some(At=>At.value===fe.value)),placeholder:g,controlShouldRenderValue:!1,value:W,onChange:fe=>it(fe),isSearchable:!0,creatable:!0,extendStyles:{control:{...re.tags&&{borderColor:E.red100}}},customComponents:{Option:C0}}),t.jsx(w0,{children:D.map((fe,At)=>t.jsx(F.Button,{icon:t.jsx(Vs,{width:15,height:15}),text:fe.label,onClick:()=>Ge(fe,At),size:"small",variant:"white"},fe.value))})]}),w&&t.jsxs(xo,{children:[t.jsx(Bt,{text:u("VIN / search vehicle")}),t.jsx(De,{options:$,value:L,onChange:fe=>v(fe),isSearchable:!0,isClearable:!!(L!=null&&L.value),creatable:!1})]}),(b||w)&&t.jsxs(xo,{marginBottom:"8px",children:[t.jsx(Bt,{text:u("Video Type")}),t.jsx(De,{options:Me,value:j,onChange:fe=>R(fe),isSearchable:!0,isClearable:!!(j!=null&&j.value),creatable:!1})]}),t.jsx(p0,{attributes:V||[],initValues:A,setIsSaveDisabled:s})]})})})]})]})},j0={id:"",title:"",recordDate:"",views:"0",videoLength:0,thumbnail:"",videoSource:"",tags:[],videoRequest:{videoRequestId:"0"},folder:"",processing:0,autogeneratedThumbnail:""},E0=()=>{const{videoId:e}=de.useParams(),[o,r]=p.useState(j0),[i,s]=p.useState(!0),[c,a]=p.useState(),[d,l]=p.useState(!1),[u,g]=p.useState(!1),[h,x]=p.useState(!1),m=w=>x(w),f=async()=>{if(!e)return;const w=await To(e);w&&(r(w),s(!1))};return p.useEffect(()=>{o.id||f()},[]),i?t.jsx(ze,{isLoading:i}):t.jsxs("div",{children:[t.jsx(Yg,{onSaveVideo:c||(()=>{}),setInsertAfterSave:l,isSaveDisabled:u,uploadLoading:h}),t.jsx(dt,{children:t.jsx(S0,{recordingBlobUrl:o.videoSource,recordDate:o.recordDate,insertAfterSave:d,setSaveFunction:a,setIsSaveDisabled:g,skipUploadProcess:!0,videoId:e,initialTitle:o.title,updateUploadLoading:m})})]})},T0=(e,o)=>{const r=new AudioContext,i=r.createMediaStreamSource(e),s=r.createMediaStreamSource(o),c=r.createMediaStreamDestination(),a=r.createGain(),d=r.createGain();return a.gain.value=.7,d.gain.value=.7,i.connect(a).connect(c),s.connect(d).connect(c),c.stream.getTracks()},k0=async(e,o,r)=>{const i={video:{...r,displaySurface:"monitor"},audio:!0},s=await navigator.mediaDevices.getDisplayMedia(i);e.current=s;const c=s.getAudioTracks();if(o){const a=await navigator.mediaDevices.getUserMedia({audio:o});if(c.length>0){const l=[...s.getVideoTracks(),...T0(s,a)];return new MediaStream(l)}const d=[...s.getVideoTracks(),...a.getAudioTracks()];return new MediaStream(d)}return s},nr=async(e,o,r)=>{const i=await navigator.mediaDevices.getUserMedia({audio:o,video:{...r,deviceId:{exact:r.deviceId}}});return e.current=i,e.current},I0=async(e,o,r,i,s)=>{const c={video:{displaySurface:"monitor",logicalSurface:!0,cursor:"always"}},a=await navigator.mediaDevices.getUserMedia({audio:r,video:i});s.current&&(s.current.srcObject=a,s.current.muted=!0,await s.current.play(),s.current.requestPictureInPicture());const d=await navigator.mediaDevices.getDisplayMedia(c);e.current=d,o.current=a;const l=new MediaStream;return a.getAudioTracks().forEach(u=>{l.addTrack(u)}),d.getVideoTracks().forEach(u=>{l.addTrack(u)}),l},A0=async(e,o,r,i,s)=>{const c={video:{displaySurface:"browser",logicalSurface:!0,cursor:"always"}},a=await navigator.mediaDevices.getDisplayMedia(c),d=await navigator.mediaDevices.getUserMedia({audio:r,video:i});e.current=a,o.current=d;const l=new MediaStream;return d.getAudioTracks().forEach(u=>{l.addTrack(u)}),a.getVideoTracks().forEach(u=>{l.addTrack(u)}),s.current&&(s.current.srcObject=d,s.current.muted=!0,await s.current.play()),l},$0=()=>new Promise(async(e,o)=>{let r=await navigator.mediaDevices.enumerateDevices();if(Gt.some(r,{label:""}))try{const i=await navigator.mediaDevices.getUserMedia({audio:!0,video:!0});r=await navigator.mediaDevices.enumerateDevices(),i.getTracks().forEach(s=>s.stop())}catch(i){o(i)}e(r)});var kr=(e=>(e.AUDIO_INPUT="audioinput",e.VIDEO_INPUT="videoinput",e))(kr||{}),Oe=(e=>(e.LOW="low",e.STANDARD="standard",e.HIGH="high",e))(Oe||{});const Ms=p.createContext({}),Ds="record_settings",Xn={audioSource:null,videoSource:null,videoQuality:Oe.STANDARD},R0=(e,o)=>{try{const r=localStorage.getItem(Ds);return r?JSON.parse(r):{videoQuality:Oe.STANDARD,videoSource:o,audioSource:e}}catch(r){return console.error("Error parsing user settings from localStorage:",r),{videoQuality:Oe.STANDARD,videoSource:o,audioSource:e}}},V0=({children:e})=>{const{t:o}=H.useTranslation(),r={label:o("No Audio"),value:!1},i={label:o("No Video"),value:!1},[s,c]=p.useState({audioSource:[],videoSource:[]}),[a,d]=p.useState(Xn),[l,u]=p.useState(null),[g,h]=p.useState(Xn),x=()=>{u(o("You do not have the necessary permissions to access this feature. Please check your browser permissions."))},m=async()=>{var w;try{const b=await $0(),S=(Array.isArray(b)?b:[]).reduce((L,v)=>(v.kind===kr.AUDIO_INPUT?L.audio.push({label:v.label,value:v.deviceId}):v.kind===kr.VIDEO_INPUT&&L.video.push({label:v.label,value:v.deviceId}),L),{audio:[],video:[]}),T=S.audio.find(L=>L.value==="default")||r,$=((w=S.video)==null?void 0:w[0])||i,k=R0(T,$);c({audioSource:[...S.audio,r],videoSource:S.video}),d(k),h(k),u(null)}catch{x(),c({audioSource:[r],videoSource:[i]})}},f=()=>{h(a),localStorage.setItem(Ds,JSON.stringify(a))};return p.useEffect(()=>{var b;const w=()=>{m()};if(((b=navigator==null?void 0:navigator.mediaDevices)==null?void 0:b.ondevicechange)!==void 0)return navigator.mediaDevices.addEventListener("devicechange",w),m(),()=>{navigator.mediaDevices.removeEventListener("devicechange",w)};console.log("The navigator.mediaDevices API is not supported in this browser."),w()},[]),t.jsx(Ms.Provider,{value:{recorderSettings:s,userSettings:a,setUserSettings:d,recordingError:l,updateErrorMessage:x,initialUserSettings:g,onSubmitModalHandler:f},children:e})},Xr=()=>{const e=p.useContext(Ms);if(e===void 0)throw new Error("useRecordSettings must be used within a RecordSettingsProvider");return e},L0=n.div`
|
|
3279
3279
|
display: flex;
|
|
3280
3280
|
width: 90%;
|
|
3281
3281
|
align-items: center;
|
|
@@ -3300,7 +3300,7 @@
|
|
|
3300
3300
|
padding: 32px;
|
|
3301
3301
|
background-color: ${E.white};
|
|
3302
3302
|
|
|
3303
|
-
${({theme:e})=>e.containerWidth<=
|
|
3303
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
3304
3304
|
width: 100%;
|
|
3305
3305
|
`}
|
|
3306
3306
|
`,O0=n.div`
|
|
@@ -3322,7 +3322,7 @@
|
|
|
3322
3322
|
&:hover {
|
|
3323
3323
|
cursor: pointer;
|
|
3324
3324
|
}
|
|
3325
|
-
`,Jn=({children:e})=>t.jsx(L0,{children:t.jsx(M0,{children:e})}),F0=({handleModalClose:e,onSave:o})=>{const{colors:r,isCdkEnviroment:i}=n.useTheme(),{t:s}=
|
|
3325
|
+
`,Jn=({children:e})=>t.jsx(L0,{children:t.jsx(M0,{children:e})}),F0=({handleModalClose:e,onSave:o})=>{const{colors:r,isCdkEnviroment:i}=n.useTheme(),{t:s}=H.useTranslation(),{recorderSettings:c,setUserSettings:a,userSettings:d,onSubmitModalHandler:l,initialUserSettings:u}=Xr(),g=()=>{l(),o==null||o(),e()},h=()=>{a(u),e()},x=w=>a({...d,videoSource:w}),m=w=>a({...d,audioSource:w}),f=w=>a({...d,videoQuality:w});return t.jsx(Ft,{children:t.jsxs(D0,{children:[t.jsxs(O0,{children:[t.jsx(N0,{children:s("Recording settings")}),t.jsx(P0,{children:t.jsx(kt,{width:"24px",height:"24px",onClick:e})})]}),t.jsxs(je,{children:[!!c.videoSource.length&&t.jsxs(Lt,{width:"100%",alignItems:"start",gap:"4px",children:[t.jsx(pt,{color:r.neutral[60],children:s("Video source")}),t.jsx(De,{creatable:!1,value:d.videoSource,placeholder:s("No settings"),options:c.videoSource,onChange:x,height:40,extendStyles:{container:{width:"100%"}},customComponents:{ValueContainer:Jn},isSearchable:!1})]}),!!c.audioSource.length&&t.jsxs(Lt,{width:"100%",alignItems:"start",gap:"4px",children:[t.jsx(pt,{color:r.neutral[60],children:s("Audio source")}),t.jsx(De,{creatable:!1,placeholder:s("No settings"),value:d.audioSource,options:c.audioSource,onChange:m,extendStyles:{container:{width:"100%"}},height:40,customComponents:{ValueContainer:Jn},isSearchable:!1})]}),t.jsxs(t.Fragment,{children:[t.jsx(pt,{color:r.neutral[60],children:s("Video quality")}),t.jsxs(Lt,{alignItems:"flex-start",width:"100%",gap:"8px",m:"0 0 16px 0",children:[t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(ir,{children:[t.jsx(qo,{checked:d.videoQuality===Oe.LOW,name:"quality",value:Oe.LOW,onClick:()=>f(Oe.LOW),onChange:()=>f(Oe.LOW)}),t.jsx(xt,{color:r.neutral[100],children:s("Low")})]}),t.jsx(pt,{children:s("Faster Upload")})]}),t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(ir,{children:[t.jsx(qo,{checked:d.videoQuality===Oe.STANDARD,name:"quality",value:Oe.STANDARD,onClick:()=>f(Oe.STANDARD),onChange:()=>f(Oe.STANDARD)}),t.jsx(xt,{color:r.neutral[100],children:s("Standard")})]}),t.jsxs(pt,{children:[" ",s("Fast Upload")]})]}),t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(ir,{children:[t.jsx(qo,{checked:d.videoQuality===Oe.HIGH,name:"quality",value:Oe.HIGH,onClick:()=>f(Oe.HIGH),onChange:()=>f(Oe.HIGH)}),t.jsx(xt,{color:r.neutral[100],children:s("High")})]}),t.jsx(pt,{children:s("Slow Upload")})]})]})]})]}),t.jsxs(je,{width:"100%",justifyContent:"flex-end",children:[t.jsx(F.Button,{variant:i?"text":"secondary",text:s("Cancel"),onClick:h}),t.jsx(F.Button,{text:s("Save"),onClick:g})]})]})})};var le=(e=>(e.IDLE="IDLE",e.RECORDING="RECORDING",e.PAUSED="PAUSED",e.CAMERA_READY="CAMERA_READY",e.COUNTDOWN="COUNTDOWN",e.DONE="DONE",e))(le||{}),ht=(e=>(e[e.UPLOADING=1]="UPLOADING",e[e.CREATE=2]="CREATE",e[e.ENCODE=3]="ENCODE",e[e.UPLOAD_COMPLETED=4]="UPLOAD_COMPLETED",e[e.ERROR=5]="ERROR",e))(ht||{});const Ye={WAITING:"waiting",UPLOADING:"uploading",CANCELING:"canceling",CANCELED:"canceled",FINISHED:"finished",GENERATING_PREVIEW:"preview"},Jr=({status:e,handleGoToRecordHome:o,teleprompterActions:r,onOpenRecordingSettings:i})=>{const s=e===le.RECORDING||e===le.PAUSED,c=Yt(),{t:a}=H.useTranslation(),{trackGTMDiscardVideoEvent:d}=He(),{flow:l}=Ce(),u=l===ft.RECORD_CAMERA_ONLY;return t.jsxs(t.Fragment,{children:[t.jsx(Ro,{when:!0,stay:!0,onConfirm:()=>{},navigate:()=>{d==null||d(),o()},shouldBlockNavigation:()=>e===le.RECORDING,title:a("Leave without saving the recording?"),text:a("Your recording will not be saved. This action can’t be undone."),confirmButtonText:a("Continue"),discardButtonText:a("Leave")}),t.jsxs(je,{m:c?"12px 0 12px 0":u?"12px 0 32px 0":"72px 0 32px 0",width:"100%",justifyContent:"space-between",children:[s?t.jsx("div",{style:{height:40}}):!c&&t.jsx(F.Button,{icon:u?t.jsx(Q.MdSettings,{size:18}):t.jsx(Q.MdMovie,{size:18}),variant:"secondary",text:a(u?"Recording settings":"Change recording option"),onClick:()=>{if(u&&i){i();return}d==null||d(),o()},disabled:e===le.COUNTDOWN}),r]})]})},z0=n.div`
|
|
3326
3326
|
display: ${e=>e.hide?"none":"flex"};
|
|
3327
3327
|
flex-direction: row;
|
|
3328
3328
|
justify-content: center;
|
|
@@ -3356,7 +3356,7 @@
|
|
|
3356
3356
|
position: relative;
|
|
3357
3357
|
border-radius: 8px;
|
|
3358
3358
|
|
|
3359
|
-
${({theme:e})=>e.containerWidth<
|
|
3359
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
3360
3360
|
height: 100%;
|
|
3361
3361
|
width: auto;
|
|
3362
3362
|
background: ${e.colors.neutral[40]};
|
|
@@ -3377,24 +3377,24 @@
|
|
|
3377
3377
|
height: 100%;
|
|
3378
3378
|
pointer-events: none;
|
|
3379
3379
|
border-radius: 8px;
|
|
3380
|
-
${({theme:e})=>e.containerWidth<
|
|
3380
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
3381
3381
|
max-height: 440px;
|
|
3382
3382
|
min-height: 440px;
|
|
3383
3383
|
`}
|
|
3384
|
-
`,en=({countdown:e,videoRef:o,teleprompter:r,status:i,canvasRef:s,toggleCamera:c})=>{const a=Yt(),d=i===
|
|
3385
|
-
${({theme:e})=>e.containerWidth<
|
|
3384
|
+
`,en=({countdown:e,videoRef:o,teleprompter:r,status:i,canvasRef:s,toggleCamera:c})=>{const a=Yt(),d=i===le.CAMERA_READY||i===le.IDLE;return t.jsxs(U0,{children:[r,t.jsx(_0,{counter:e,willStart:e>0,hide:!e||i===le.CAMERA_READY}),t.jsx(W0,{ref:o,controls:!1,autoPlay:!0,playsInline:!0}),s&&t.jsx(H0,{ref:s}),a&&d&&t.jsx(F.Button,{variant:"secondary",icon:t.jsx(Q.MdFlipCameraAndroid,{size:20}),style:{position:"absolute",right:16,bottom:16},onClick:c})]})},q0=e=>{const[o,r]=p.useState(e),i=p.useRef(null);return p.useEffect(()=>()=>{i.current&&clearInterval(i.current)},[]),{countdown:o,startRecordingCountdown:()=>{r(e),i.current=setInterval(()=>{r(a=>a<=1?(clearInterval(i.current),i.current=null,0):a-1)},1e3)},stopRecordingCountdown:()=>{i.current&&(clearInterval(i.current),i.current=null),r(e)}}},G0=()=>{const[e,o]=p.useState(0),r=p.useRef(null);return p.useEffect(()=>()=>{r.current&&clearInterval(r.current)},[]),{timeInSeconds:e,startRecordingTime:()=>{r.current=setInterval(()=>{o(c=>c+1)},1e3)},stopRecordingTime:()=>{r.current&&clearInterval(r.current)}}},fo={low:1e6,standard:25e5,high:5e6},Y0=(e,o)=>{const r=new MediaStream;return e.getVideoTracks().forEach(c=>r.addTrack(c)),o.getAudioTracks().forEach(c=>r.addTrack(c)),r},Q0=3,tn=({screenStream:e,stopAllStreams:o,videoRef:r,canvasRef:i,isSegmenterActive:s,onStartUpladingVoiceOverHandler:c,shouldStartCountdown:a,handleGoToRecordHome:d,isCameraToggled:l})=>{const{trackGTMStartRecordingEvent:u,trackGTMStopRecordingEvent:g,trackGTMAddVideoAttributeEvent:h}=He(),{t:x}=H.useTranslation(),{toast:m}=Te(),{countdown:f,startRecordingCountdown:w,stopRecordingCountdown:b}=q0(Q0),{startRecordingTime:y,stopRecordingTime:S,timeInSeconds:T}=G0(),{userSettings:$}=Xr(),k=p.useRef(null),[L,v]=p.useState(le.IDLE),[j,R]=p.useState(null),V=(fo==null?void 0:fo[$==null?void 0:$.videoQuality])||fo.low;p.useEffect(()=>()=>{o==null||o(),k.current&&k.current.stopRecording(()=>{k.current.destroy(),k.current=null})},[]),p.useEffect(()=>{r.current&&e&&(r.current.srcObject=e,r.current.muted=!0,r.current.volume=0,r.current.onloadedmetadata=()=>{v(le.CAMERA_READY),a&&D()})},[e]),p.useEffect(()=>{if(r.current&&e){const W=e.getVideoTracks()[0];W.onended=()=>{if(L===le.RECORDING||L===le.PAUSED)return M();if(l)return v(le.IDLE);d==null||d()}}},[e,L]),p.useEffect(()=>{f===0&&L===le.COUNTDOWN&&(u==null||u(),P())},[f,L]);const C=W=>{var Y;if(s){const se=(Y=i==null?void 0:i.current)==null?void 0:Y.captureStream(30);return se?Y0(se,W):W}return W},A=MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",P=()=>{if(e){const W=C(e);try{k.current=new ln(W,{videoBitsPerSecond:V,type:"video",mimeType:A,recorderType:ln.MediaStreamRecorder}),k.current.startRecording(),v(le.RECORDING),y()}catch(Y){console.error("Failed to start recording:",Y),m({message:x("Failed to start recording.")})}}else m({message:"Something went wrong, try again later!"})},M=()=>{k.current&&(k.current.stopRecording(()=>{R(k.current.getBlob()),L===le.PAUSED||g==null||g(),h==null||h(),o==null||o(),v(le.DONE),c==null||c(k.current.getBlob()),k.current.destroy(),k.current=null}),S())},N=()=>{k.current&&L===le.RECORDING?(k.current.pauseRecording(),v(le.PAUSED),S()):k.current&&L===le.PAUSED&&(k.current.resumeRecording(),u==null||u(),v(le.RECORDING),y())},D=()=>{v(le.COUNTDOWN),w()};return{startRecording:P,stopRecording:M,pauseRecording:N,startCountDown:D,stopCountDown:()=>{v(le.CAMERA_READY),b()},setStatus:v,status:L,recordedBlob:j,countdown:f,timeInSeconds:T}},Z0=n(je)`
|
|
3385
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
3386
3386
|
width: 100%;
|
|
3387
3387
|
justify-content: space-between;
|
|
3388
3388
|
`}
|
|
3389
|
-
`,K0=n(
|
|
3389
|
+
`,K0=n(je)`
|
|
3390
3390
|
position: absolute;
|
|
3391
3391
|
width: 100%;
|
|
3392
3392
|
|
|
3393
|
-
${({theme:e})=>e.containerWidth<
|
|
3393
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
3394
3394
|
position: initial;
|
|
3395
3395
|
width: unset;
|
|
3396
3396
|
`}
|
|
3397
|
-
`,on=({status:e,timeInSeconds:o,startCountDown:r,stopCountDown:i,pauseRecording:s,stopRecording:c,isLoadingVB:a})=>{const{isCdkEnviroment:d}=n.useTheme(),{t:l}=
|
|
3397
|
+
`,on=({status:e,timeInSeconds:o,startCountDown:r,stopCountDown:i,pauseRecording:s,stopRecording:c,isLoadingVB:a})=>{const{isCdkEnviroment:d}=n.useTheme(),{t:l}=H.useTranslation(),u=e===le.CAMERA_READY||e===le.COUNTDOWN,g=e===le.PAUSED||e===le.RECORDING;return t.jsxs("div",{style:{width:"100%",position:"relative",paddingBottom:32},children:[u&&t.jsxs(je,{justifyContent:"center",width:"100%",m:"36px 0 0 0",children:[e===le.CAMERA_READY&&!a&&t.jsx(F.Button,{variant:d?"primary":"red",icon:t.jsx(Q.MdVideocam,{size:24}),text:l("Start recording"),onClick:r}),e===le.COUNTDOWN&&t.jsx(F.Button,{variant:d?"text":"secondary",text:l("Cancel"),onClick:i})]}),g&&t.jsxs(Z0,{m:"32px 0 0 0",children:[t.jsxs(je,{style:{position:"relative",zIndex:22},children:[t.jsx(F.Button,{variant:e===le.PAUSED?d?"text":"red":"secondary",icon:e===le.PAUSED?t.jsx(Q.MdVideocam,{size:24}):t.jsx(Q.MdOutlinePause,{}),text:e===le.PAUSED?l("Resume"):l("Pause"),onClick:s}),t.jsx("span",{style:{width:50},children:Dt(o,0)})]}),t.jsx(K0,{alignItems:"center",justifyContent:"center",children:t.jsx(F.Button,{icon:t.jsx(Xi,{}),variant:"primary",text:l("Finish"),onClick:c})})]})]})},Os=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),X0=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,J0=typeof InstallTrigger<"u",em={all:e=>["VIDEO_ATTRIBUTES",e],detail:e=>["VIDEO_ATTRIBUTES",e]},tm=async({page:e=0,size:o=10,filterByDepartment:r=!1})=>{const s={start:e*o,limit:o,filterByDepartment:r},{data:c}=await oe.get("/video-attributes",{params:s}),{videoAttributes:a=[],count:d=0}=c||{};return{count:d,attributes:a}},om=e=>we.useQuery(em.all(e),()=>tm(e)),rm=({setContineToInsert:e,onDiscardHandler:o})=>{const{t:r}=H.useTranslation(),{isValid:i,submitForm:s}=Ae.useFormikContext(),{userData:c}=ve(),{showInsertFeature:a,containerWidth:d}=Ce(),{colors:l,isCdkEnviroment:u}=n.useTheme(),g=()=>{e(!0),s()},h=ut(c);return t.jsx(t.Fragment,{children:t.jsxs(je,{width:"100%",justifyContent:"space-between",m:"0 0 32px 0",children:[t.jsx(gs,{color:l.black[100],children:r("Preview recorded video")}),t.jsxs(je,{gap:"8px",children:[t.jsx(F.Button,{icon:t.jsx(Q.MdDeleteForever,{size:20}),text:r("Discard"),variant:u?"text":"destructive",onClick:o}),t.jsx(F.Button,{disabled:!i,icon:t.jsx(Q.MdSave,{size:18}),text:r(h?"Save":"Save Recording"),onClick:s,variant:u?"secondary":"primary"}),a&&t.jsx(F.Button,{variant:"primary",disabled:!i,icon:t.jsx(Q.MdEmail,{size:20}),text:d>B.sm?r("Continue to Insert"):r("Insert"),onClick:g})]})]})})},nm=n.span`
|
|
3398
3398
|
font-size: 14px;
|
|
3399
3399
|
font-weight: 600;
|
|
3400
3400
|
line-height: 20px;
|
|
@@ -3480,7 +3480,7 @@
|
|
|
3480
3480
|
&:hover {
|
|
3481
3481
|
cursor: pointer;
|
|
3482
3482
|
}
|
|
3483
|
-
`,hm=({videoTags:e=[],handleModalClose:o,onSubmit:r,buttonTitle:i})=>{const{t:s}=
|
|
3483
|
+
`,hm=({videoTags:e=[],handleModalClose:o,onSubmit:r,buttonTitle:i})=>{const{t:s}=H.useTranslation(),[c,a]=p.useState(""),[d,l]=p.useState([]),[u,g]=p.useState(e),[h,x]=p.useState(""),{colors:m}=n.useTheme(),f=v=>v.sort((j,R)=>{var V;return(V=j.label)==null?void 0:V.localeCompare(R.label)}),w=async()=>{const v=await $a({});l(f(v.map(j=>({value:j.tagId,label:j.tag})).filter(j=>!u.find(R=>R.value===j.value))))};I.useEffect(()=>{w()},[]);const b=v=>{v==="Escape"&&o()};p.useEffect(()=>(document.addEventListener("keyup",v=>b(v.key)),()=>document.removeEventListener("keyup",v=>b(v.key),!0)),[]);const y=v=>{g(f(u.filter(j=>j.value!==v.value))),l(f([...d,v]))},S=v=>{v.length>sr||a(v)},T=v=>{var V;if(!v||!v.length)return;const j=v[0];if(!j||!j.value||!((V=j==null?void 0:j.value)!=null&&V.toString().trim().length))return x(()=>s("Tag can not be empty.")),!1;if(j.value.length>sr)return x(()=>s("Tag cannot contain more than {{count}} characters",{count:sr})),!1;if(u.some(C=>C.label==j.value))return x(()=>s("Tag already exists.")),!1;x(""),g(f([...u,j])),l(f(d.filter(C=>C.value!==j.value)))},$=v=>Qe.components.DropdownIndicator&&t.jsx(Qe.components.DropdownIndicator,{...v,children:t.jsx(Q.MdSearch,{})}),k=v=>v.data.__isNew__?t.jsxs(Qe.components.Option,{...v,children:[t.jsx(Q.MdAdd,{className:"add-icon",color:m.primary[100]}),v.label]}):t.jsxs(Qe.components.Option,{...v,children:[t.jsx(jo.FaHashtag,{color:m.primary[60],className:"hashtag-icon",size:"14px"}),v.label]}),L=()=>{try{return JSON.stringify(e)===JSON.stringify(u)}catch{return!1}};return t.jsx(Ft,{disableFullScreen:!0,style:{position:"fixed",zIndex:999},children:t.jsxs(im,{children:[t.jsxs(dm,{children:[t.jsx(um,{children:s("Manage Tags")}),t.jsx(pm,{children:t.jsx(kt,{width:"24px",height:"24px",onClick:o})})]}),t.jsxs(sm,{children:[t.jsx(am,{defaultValue:c,onInputChange:S,customComponents:{IndicatorSeparator:()=>null,DropdownIndicator:$,Option:k},placeholder:s("Add tag(s)..."),value:[],createOptionPosition:"first",onChange:T,options:d,isMulti:!0}),h!=null&&t.jsx("span",{className:"error-message",children:h}),t.jsx(cm,{children:u&&u.map(v=>t.jsx(Ns,{tag:v,showRemove:!0,onRemove:y},v.value))}),t.jsx(lm,{children:t.jsx(F.Button,{onClick:()=>r(u),text:i,type:"submit",disabled:L()})})]})]})})},gm=()=>{var g,h;const{t:e}=H.useTranslation(),{isCdkEnviroment:o}=n.useTheme(),r=rt.useHistory(),{values:i,setFieldValue:s}=Ae.useFormikContext(),[c,a]=p.useState(!1),d=()=>{a(!0)},l=()=>{a(!1)},u=x=>{s("videoTags",x),l()};return t.jsxs(Lt,{alignItems:"flex-start",width:"100%",m:"32px 0 32px 0",children:[t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsx(F.Button,{variant:o?"text":"destructive",icon:t.jsx(Q.MdDeleteForever,{size:18}),text:e("Remove this video"),onClick:()=>{r.push("/record/home")}}),t.jsx(F.Button,{variant:"secondary",icon:t.jsx(jo.FaHashtag,{size:"16px"}),text:e("Add Tags..."),onClick:d})]}),!!((g=i==null?void 0:i.videoTags)!=null&&g.length)&&t.jsx(je,{gap:"4px",m:"4px 0 0 0",children:(h=i==null?void 0:i.videoTags)==null?void 0:h.map(x=>t.jsx(Ns,{tag:x},x.value))}),c&&t.jsx(hm,{videoTags:i==null?void 0:i.videoTags,handleModalClose:l,onSubmit:u,buttonTitle:e("Save Changes")})]})},mm=n.textarea`
|
|
3484
3484
|
width: 100%;
|
|
3485
3485
|
height: 100px;
|
|
3486
3486
|
padding: 8px 12px;
|
|
@@ -3495,7 +3495,7 @@
|
|
|
3495
3495
|
}
|
|
3496
3496
|
`,Ps=({label:e,isRequired:o,...r})=>{const[i,s]=Ae.useField(r);return t.jsxs("div",{style:{width:"100%"},children:[t.jsx($o,{label:e,name:r.name,isRequired:o}),t.jsx(mm,{...i,...r,id:r.name}),t.jsx(Zr,{meta:s})]})},Ir=({label:e,isRequired:o,options:r,disabled:i,...s})=>{const[c,a,d]=Ae.useField(s),l=u=>{d.setValue(u?u.value:"")};return t.jsxs("div",{style:{width:"100%"},children:[t.jsx($o,{label:e,isRequired:o}),t.jsx(De,{disabled:i,value:r.find(u=>u.value===c.value),onChange:l,placeholder:"Select...",onMenuOpen:()=>d.setTouched(!0),options:r,menuPortalTarget:document.body,creatable:!1,isSearchable:!1}),t.jsx(Zr,{meta:a})]})},xm=()=>{var o;const{values:e}=Ae.useFormikContext();return(o=e==null?void 0:e.attributes)!=null&&o.length?t.jsx(Lt,{width:"100%",alignItems:"flex-start",children:t.jsx(Ae.FieldArray,{name:"attributes",children:()=>{var r;return t.jsx(t.Fragment,{children:(r=e==null?void 0:e.attributes)==null?void 0:r.map((i,s)=>{const c=!!i.isRequired,a=!!i.isReadOnly||!!i.isLocked;return t.jsxs(p.Fragment,{children:[i.type==="text"&&t.jsx(lt,{name:`attributes.${s}.value`,label:i.slug,disabled:a,isRequired:c}),i.type==="textarea"&&t.jsx(Ps,{name:`attributes.${s}.value`,label:i.slug,disabled:a,isRequired:c}),i.type==="dropdown"&&t.jsx(Ir,{name:`attributes.${s}.value`,label:i.slug,disabled:a,isRequired:c,options:(i==null?void 0:i.dropdownValues.map(d=>({value:d.value,label:d.value})))||[]})]},s)})})}})}):null};var io=(e=>(e.NO_ROLE="0",e.TECHNICIAN="1",e.SERVICE_ADVISOR="2",e.SERVICE_MANAGER="3",e.SALESPERSON="4",e.SALES_MANAGER="5",e.BDC="6",e))(io||{});const fm=n.div`
|
|
3497
3497
|
margin-top: 24px;
|
|
3498
|
-
`,vm=({fetchSoldVehiclesForAutomotive:e=!0,results:o})=>{var
|
|
3498
|
+
`,vm=({fetchSoldVehiclesForAutomotive:e=!0,results:o})=>{var m,f;const{t:r}=H.useTranslation(),{userData:i}=ve(),{setFieldValue:s,values:c}=Ae.useFormikContext(),a=Ke(i),d=nt(i),l=ut(i),u=i.automotiveRole===io.TECHNICIAN,h=Object.values(l?Br:_r).filter(Boolean).map(w=>({value:w,label:r(w)})),x=o.flatMap(w=>w.data?w.data.map(b=>({label:`${b.firstName} ${b.lastName}`,value:`${b.id}`})):[]);return a?t.jsxs(fm,{children:[t.jsx(Ir,{name:"videoRequest.videoType",label:r("Video Type"),disabled:!1,isRequired:!1,options:h}),l&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{marginBottom:16},children:[t.jsx($o,{label:r("Search vehicle"),isRequired:!1}),t.jsx(Cs,{onChangeVehicle:w=>{s("videoRequest.vehicle",w)},selectedVin:((f=(m=c.videoRequest)==null?void 0:m.vehicle)==null?void 0:f.vin)||"",placeholder:r("Search vehicle by name, VIN or stock number..."),fetchSold:e})]}),t.jsx(lt,{name:"videoRequest.vehicle.vin",label:r("VIN"),isRequired:!1,disabled:!0}),t.jsx(lt,{name:"videoRequest.vehicle.stockNumber",label:r("Stock number"),isRequired:!1,disabled:!0})]}),d&&t.jsx(Ir,{name:"videoRequest.advisorId",label:r("Assign To"),disabled:!1,isRequired:u,options:x}),d&&t.jsx(lt,{name:"videoRequest.repairOrderNumber",label:r("RO Number"),isRequired:u}),t.jsx(lt,{name:"videoRequest.customerName",label:r("Customer Name"),isRequired:!1}),d&&t.jsx(Ps,{name:"videoRequest.note",label:r("Note"),isRequired:!1})]}):t.jsx(t.Fragment,{})},bm=()=>{const{t:e}=H.useTranslation(),{userData:o}=ve(),{colors:r}=n.useTheme(),{values:i}=Ae.useFormikContext(),s=Hi(o),a=(()=>{var l;let d=0;return(l=i==null?void 0:i.attributes)==null||l.forEach(u=>{u&&u.isRequired&&d++}),s&&(d+=2),d})();return t.jsxs(je,{justifyContent:"space-between",m:"0 0 16px 0",children:[t.jsx(Su,{children:e("Video Attributes")}),t.jsxs(pt,{color:r.primary[100],children:[a," ",e("required")]})]})},wm={user:()=>["USER_AUTOMOTIVE"],customer_user:(e,o)=>["USER_AUTOMOTIVE",e,o]},ym=async({customerId:e,role:o})=>(await oe.get(`/users/${e}/automotive-users`,{params:{role:o}})).data,Cm=({params:e,enabled:o})=>{const r=e.map(({customerId:a,role:d})=>({queryKey:wm.customer_user(a,d),queryFn:()=>ym({customerId:a,role:d}),enabled:o})),i=we.useQueries(r),s=i.some(a=>a.isLoading),c=i.some(a=>a.isError);return{results:i,isLoading:s,isError:c}},Sm=async e=>{const{fileName:o,type:r}=e;return(await oe.get("/aws/signedurl",{params:{filename:o,filetype:r}})).data},jm=(e,o)=>we.useQuery(["AWS_SIGNED_URL",e.fileName],()=>Sm(e),{enabled:o,refetchOnMount:!0,refetchOnReconnect:!0,cacheTime:5e3}),Em=async(e,o)=>{var l;const{url:r,file:i,contentType:s}=e,c=((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.indexOf("Firefox"))!==-1,a={onUploadProgress:u=>{if(o){const g=u.loaded,h=u.total??0,x=Math.round(g*100/h);o({loaded:Math.floor(g/1024),total:Math.floor(h/1024),percentage:x})}}};return await so.put(r,i,{headers:{"content-type":!c&&s?s:i.type},...a})},Tm=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0}),{toast:r}=Te();return{...we.useMutation(i=>Em(i,o),{onError:i=>r({message:i})}),progress:e}},km=async(e,o)=>{const{title:r,filename:i,isFreemium:s,isGuide:c,folder:a,id:d,videoAttributeValues:l,videoRequest:u,videoTags:g}=e,h={onUploadProgress:m=>{if(o){const f=m.loaded,w=m.total??0,b=Math.round(f*100/w);o({loaded:Math.floor(f/1024),total:Math.floor(w/1024),percentage:b})}}},x=await oe.post("/videos",{filename:i,title:r,isFreemium:s,isGuide:!!c,folder:a||"Primary",videoAttributeValues:l,videoRequest:u,videoTags:g},h);return{...x.data,...d!==void 0?{id:d,videoId:x.data.id}:{}}},Im=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0}),{toast:r}=Te(),{t:i}=H.useTranslation();return{...we.useMutation(s=>km(s,o),{onSuccess:()=>{r({message:i("Video successfully created!")})},onError:()=>{r({message:i("Failed to create video. Please try again later.")})}}),progress:e}},Am=async(e,o)=>{const{videoId:r}=e,i={onUploadProgress:c=>{if(o){const a=c.loaded,d=c.total??0,l=Math.round(a*100/d);o({loaded:Math.floor(a/1024),total:Math.floor(d/1024),percentage:l})}}};return(await oe.post(`/videos/${r}/encode`,{},i)).data},$m=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0});return{...we.useMutation(r=>Am(r,o)),progress:e}},Rm=e=>Object.fromEntries(Object.entries(e).filter(([o,r])=>r!==null&&r!=="")),Vm=({contineToInsert:e})=>{var se,Z;const{flow:o,onVideoRecorded:r}=Ce(),i=o===ft.RECORD_CAMERA_ONLY,{toast:s}=Te(),{t:c}=H.useTranslation(),{userData:a}=ve(),d=Ke(a),l=rt.useHistory(),[u,g]=p.useState(ht.UPLOADING),[h,x]=p.useState(!1),[m,f]=p.useState(null),[w,b]=p.useState({values:{title:"",folder:{label:"",value:""},videoTags:[],attributes:[],videoRequest:void 0},initialValues:{title:"",folder:{label:"",value:""},videoTags:[],attributes:[],videoRequest:void 0}}),{trackGTMSaveNewVideoInteractionEvent:y}=He(),{data:S,isLoading:T,error:$}=jm({fileName:((se=m==null?void 0:m.file)==null?void 0:se.name)||"",type:((Z=m==null?void 0:m.file)==null?void 0:Z.type)||""},!!(m!=null&&m.title)),{mutateAsync:k,isLoading:L,error:v,progress:j}=Tm(),{mutateAsync:R,isLoading:V,error:C,progress:A}=Im(),{mutateAsync:P,progress:M,isLoading:N,isError:D}=$m();p.useEffect(()=>{S!=null&&S.url&&m&&O()},[S,m]);const O=async()=>{var X,G,re,_;x(!0);try{if(S!=null&&S.url&&m){g(ht.UPLOADING),await k({url:S.url,file:m.file,contentType:Tr}),g(ht.CREATE);const ne=await R({filename:m.file.name,title:m.title,folder:m.folder.label,isFreemium:!1,videoTags:m.videoTags,videoAttributeValues:m.attributes.map(ae=>({attributeId:ae.attributeId,value:ae.value})),...d&&m.videoRequest&&{videoRequest:Rm({repairOrderNumber:m.videoRequest.repairOrderNumber,advisorId:m.videoRequest.advisorId?Number(m.videoRequest.advisorId):"",videoType:m.videoRequest.videoType,vin:m.videoRequest.vehicle.vin,note:m.videoRequest.note,customerName:m.videoRequest.customerName})}});if(ne){const ae=await Vl(m.file),{changed_fields:ue,...xe}=Ll({initialValues:w.initialValues,currentValues:w.values,trackedFields:["title","folder.label","videoTags","videoRequest.customerName"],trackedArrayFields:{videoTags:["label"],attributes:["value"]}});console.log("changed_fields",ue),console.log("fields",xe),y==null||y({type:Ao.RECORD,vehicle:(X=m==null?void 0:m.videoRequest)==null?void 0:X.vehicle,videoAttributes:{videoId:Number(ne.id),videoType:((G=m.videoRequest)==null?void 0:G.videoType)||void 0,videoCustomerName:!!((re=m.videoRequest)!=null&&re.customerName),videoTitle:m.title,videoLength:ae},changedFieldKeys:ue,changes:xe}),g(ht.ENCODE),await P({videoId:(_=ne==null?void 0:ne.id)==null?void 0:_.toString(),customerId:a.customerId})}if(g(ht.UPLOAD_COMPLETED),r==null||r({token:_e||"",videoId:Number(ne.id)}),e){l.push(`/insert-video/${ne.id}/`);return}if(i){s({message:c("Successfully saved video!")}),l.push("/record/home"),x(!1);return}l.push("/"),x(!1)}}catch(ne){console.error("Error during upload:",ne),g(ht.ERROR),x(!1)}};return{isError:v||C||$||D,setRecordingFormData:f,isLoading:T||L||V||N||h,progressState:u,uploadToS3Progress:j,createProgress:A,encodeProgress:M,setCdkAmplitudeFields:b}},Lm=n.div`
|
|
3499
3499
|
display: flex;
|
|
3500
3500
|
flex-direction: column;
|
|
3501
3501
|
&:nth-child(2) {
|
|
@@ -3530,7 +3530,7 @@
|
|
|
3530
3530
|
color: ${e=>e.isInProgressOrDone?`${e.theme.colors.primary[100]};`:"rgba(213,214,217,1);"}
|
|
3531
3531
|
|
|
3532
3532
|
margin-bottom: 8px;
|
|
3533
|
-
`,Dm=(e,o,r)=>{switch(e){case"encode":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Encoding");if(o===100)return r("Encoded");break;case"create":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Creating");if(o===100)return r("Created");break;case"upload":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Uploading");if(o===100)return r("Uploaded");break;default:return""}},ar=({progress:e,progressType:o})=>{const{t:r}=
|
|
3533
|
+
`,Dm=(e,o,r)=>{switch(e){case"encode":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Encoding");if(o===100)return r("Encoded");break;case"create":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Creating");if(o===100)return r("Created");break;case"upload":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Uploading");if(o===100)return r("Uploaded");break;default:return""}},ar=({progress:e,progressType:o})=>{const{t:r}=H.useTranslation(),i=n.useTheme(),s={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},{percentage:c}=e,a=c>1&&c<=100;return t.jsxs(Lm,{children:[t.jsx(Mm,{isInProgressOrDone:a,children:Dm(o,c,r)}),t.jsx(ta.Circle,{style:s,percent:c,trailWidth:10,strokeWidth:10,strokeColor:i.colors.primary[100]})]})},Om=n.div`
|
|
3534
3534
|
margin-top: 16px;
|
|
3535
3535
|
background-color: #f6f7f9;
|
|
3536
3536
|
border-radius: 4px;
|
|
@@ -3587,7 +3587,7 @@
|
|
|
3587
3587
|
line-height: 1.5;
|
|
3588
3588
|
color: #4e5461;
|
|
3589
3589
|
margin-top: 32px;
|
|
3590
|
-
`,Bm=(e,o)=>{const r=(e/1e3).toFixed(2),i=(o/1e3).toFixed(2);return`${r} MB/${i} MB`},ei=({progressState:e,uploadToS3Progress:o,createProgress:r,encodeProgress:i})=>{const s=Yt(),{colors:c}=n.useTheme(),a=()=>e?e==ht.UPLOADING?o.percentage*50/100:e==ht.CREATE?50+(r.percentage||0):100:0;return t.jsx(Pm,{children:t.jsxs(Om,{style:{padding:s?0:32},children:[t.jsxs(Nm,{children:[t.jsx(ar,{progress:o,progressType:"upload"}),t.jsx(ar,{progress:r,progressType:"create"}),t.jsx(ar,{progress:i,progressType:"encode"})]}),t.jsx(Fm,{value:a(),max:100,color:c.primary[100]}),t.jsx(zm,{children:Bm(o.loaded,o.total)})]})})},ro=(e,o=!1)=>{try{return o?decodeURIComponent(e).replaceAll(" "," "):decodeURIComponent(e)}catch{return e}},_m=e=>e?"Initial Reach Out":"",Um=e=>[{value:4e3,label:`160 ${e("words / min")}`},{value:2e3,label:`200 ${e("words / min")}`},{value:1e3,label:`240 ${e("words / min")}`}],Ar=e=>[{value:6e3,label:`160 ${e("words / min")}`},{value:4e3,label:`200 ${e("words / min")}`},{value:2e3,label:`240 ${e("words / min")}`}],Wm=e=>[{value:8e3,label:`160 ${e("words / min")}`},{value:6e3,label:`200 ${e("words / min")}`},{value:4e3,label:`240 ${e("words / min")}`}],Fs=(e,o)=>{switch(e){case"small":return Wm(o);case"large":return Ar(o);case"x-large":return Um(o);default:return Ar(o)}},Hm=(e,o=2)=>{if(e===0)return"0 Bytes";const r=1024,i=o<0?0:o,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],c=Math.floor(Math.log(e)/Math.log(r));return qm(parseFloat((e/Math.pow(r,c)).toFixed(i)))+" "+s[c]},qm=(e,o=!1)=>e.toLocaleString("en",o?{minimumFractionDigits:2,maximumFractionDigits:2}:{}),Gm=e=>e===Ye.WAITING?"Waiting…":e===Ye.UPLOADING?"Uploading…":e===Ye.CANCELING?"Canceling…":e===Ye.CANCELED?"Canceled":e===Ye.GENERATING_PREVIEW?"Generating Preview URL...":"Finished",Ym=e=>e===Ye.WAITING?"#9297A2":E.primaryDarkBlue,Qm=e=>e.status===Ye.UPLOADING?`${e.currentUpload} / ${e.sizeText}`:e.sizeText,Zm=()=>{const e=Ue(new Date).date();let o="th";return e===1||e===21||e===31?o="st":e===2||e===22?o="nd":(e===3||e===23)&&(o="rd"),Ue(new Date).format(`MMM D[${o}] YYYY @ h:mm A`)},Km={all:()=>["FOLDERS"]},Xm=async e=>(await oe.get("folders/new",{params:e})).data,Jm=e=>we.useQuery(Km.all(),()=>Xm(e),{select:o=>[...o&&o.folders||[],{folderId:
|
|
3590
|
+
`,Bm=(e,o)=>{const r=(e/1e3).toFixed(2),i=(o/1e3).toFixed(2);return`${r} MB/${i} MB`},ei=({progressState:e,uploadToS3Progress:o,createProgress:r,encodeProgress:i})=>{const s=Yt(),{colors:c}=n.useTheme(),a=()=>e?e==ht.UPLOADING?o.percentage*50/100:e==ht.CREATE?50+(r.percentage||0):100:0;return t.jsx(Pm,{children:t.jsxs(Om,{style:{padding:s?0:32},children:[t.jsxs(Nm,{children:[t.jsx(ar,{progress:o,progressType:"upload"}),t.jsx(ar,{progress:r,progressType:"create"}),t.jsx(ar,{progress:i,progressType:"encode"})]}),t.jsx(Fm,{value:a(),max:100,color:c.primary[100]}),t.jsx(zm,{children:Bm(o.loaded,o.total)})]})})},ro=(e,o=!1)=>{try{return o?decodeURIComponent(e).replaceAll(" "," "):decodeURIComponent(e)}catch{return e}},_m=e=>e?"Initial Reach Out":"",Um=e=>[{value:4e3,label:`160 ${e("words / min")}`},{value:2e3,label:`200 ${e("words / min")}`},{value:1e3,label:`240 ${e("words / min")}`}],Ar=e=>[{value:6e3,label:`160 ${e("words / min")}`},{value:4e3,label:`200 ${e("words / min")}`},{value:2e3,label:`240 ${e("words / min")}`}],Wm=e=>[{value:8e3,label:`160 ${e("words / min")}`},{value:6e3,label:`200 ${e("words / min")}`},{value:4e3,label:`240 ${e("words / min")}`}],Fs=(e,o)=>{switch(e){case"small":return Wm(o);case"large":return Ar(o);case"x-large":return Um(o);default:return Ar(o)}},Hm=(e,o=2)=>{if(e===0)return"0 Bytes";const r=1024,i=o<0?0:o,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],c=Math.floor(Math.log(e)/Math.log(r));return qm(parseFloat((e/Math.pow(r,c)).toFixed(i)))+" "+s[c]},qm=(e,o=!1)=>e.toLocaleString("en",o?{minimumFractionDigits:2,maximumFractionDigits:2}:{}),Gm=e=>e===Ye.WAITING?"Waiting…":e===Ye.UPLOADING?"Uploading…":e===Ye.CANCELING?"Canceling…":e===Ye.CANCELED?"Canceled":e===Ye.GENERATING_PREVIEW?"Generating Preview URL...":"Finished",Ym=e=>e===Ye.WAITING?"#9297A2":E.primaryDarkBlue,Qm=e=>e.status===Ye.UPLOADING?`${e.currentUpload} / ${e.sizeText}`:e.sizeText,Zm=()=>{const e=Ue(new Date).date();let o="th";return e===1||e===21||e===31?o="st":e===2||e===22?o="nd":(e===3||e===23)&&(o="rd"),Ue(new Date).format(`MMM D[${o}] YYYY @ h:mm A`)},Km={all:()=>["FOLDERS"]},Xm=async e=>(await oe.get("folders/new",{params:e})).data,Jm=e=>we.useQuery(Km.all(),()=>Xm(e),{select:o=>[...o&&o.folders||[],{folderId:Be.value,name:Be.label,isDeletable:!1}]}),ti={MY_FOLDERS:"MY FOLDERS",SHARED_WITH_ME:"SHARED WITH ME"},ex=n.div`
|
|
3591
3591
|
display: flex;
|
|
3592
3592
|
align-items: center;
|
|
3593
3593
|
padding: 7px 16px 0px 16px;
|
|
@@ -3625,7 +3625,7 @@
|
|
|
3625
3625
|
color: var(--covideo-grey-80, #4e5461);
|
|
3626
3626
|
text-overflow: ellipsis;
|
|
3627
3627
|
white-space: nowrap;
|
|
3628
|
-
`,sx=(e,o,r,i)=>{if(typeof e>"u")return null;switch(e){case"folder":return r.includes("option-0")&&i!==
|
|
3628
|
+
`,sx=(e,o,r,i)=>{if(typeof e>"u")return null;switch(e){case"folder":return r.includes("option-0")&&i!==Be.value?t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(Q.MdCreateNewFolder,{size:16})}):o&&t.jsx(be.IoMdCheckmark,{size:20});case"sharedFolder":return o?o&&t.jsx(be.IoMdCheckmark,{size:20}):t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(Q.MdFolderShared,{size:16})});case"accounts":return o?o&&t.jsx(be.IoMdCheckmark,{size:20}):t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(Q.MdSupervisorAccount,{size:16})});default:return null}},ax=({children:e,...o})=>{const{selectProps:r,isSelected:i,innerProps:s}=o;return e===ti.MY_FOLDERS||e===ti.SHARED_WITH_ME?t.jsxs(ex,{children:[t.jsx(tx,{children:e}),t.jsx(ox,{})]}):t.jsx(Qe.components.Option,{...o,children:t.jsxs(nx,{children:[t.jsxs(fd,{children:[t.jsx(ix,{children:e}),t.jsx(vd,{children:sx(o.data.isFolderShared||o.data.access?o.data.access?"accounts":"sharedFolder":r.icon,i,s.id??"",o.data.value)})]}),!!o.data.sharedBy&&t.jsxs(rx,{children:["Shared by ",o.data.sharedBy]})]})})},cx=e=>{const{options:o,value:r,onChange:i}=e,s=n.useTheme(),c={options:o,value:r,onChange:i},a=u=>t.jsx(ts,{menuIsOpen:u.selectProps.menuIsOpen,children:t.jsx(Q.MdArrowDropDown,{size:18,opacity:.5})}),d=u=>u.children,l={container:u=>({...u}),control:(u,g)=>({...u,boxShadow:"none",borderRadius:6,minHeight:"40px",cursor:"pointer",...os(g),"&:hover":{borderColor:s.colors.primary[100]},"&:focus-within":{borderColor:s.colors.primary[100]}}),singleValue:u=>({...u,width:"95%"}),valueContainer:u=>({...u,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flexWrap:"nowrap"}),input:u=>({...u}),menuPortal:u=>({...u,zIndex:9999}),menuList:u=>({...u,height:"auto"}),menu:u=>({...u,marginTop:2,color:E.primaryDarkBlue}),option:(u,g)=>({...u,height:40,display:"flex",alignItems:"center",padding:"0 16px",cursor:"pointer",transition:"all 0.3s",fontWeight:600,fontSize:15,zIndex:1,...rs(g,s)})};return t.jsx(Qe,{...c,icon:"folder",error:!1,className:"dropdown",isDisabled:!1,"aria-label":"Aria label is missing",menuPosition:"absolute",menuPlacement:"auto",maxMenuHeight:220,menuShouldScrollIntoView:!1,menuPortalTarget:null,isLoading:!1,components:{DropdownIndicator:a,IndicatorSeparator:()=>null,Option:ax,SingleValue:d},styles:l,isSearchable:!0})},rn={VIRTUAL_BACKGROUNDS:10,FOLDER_ORGANIZATION:11,TELEPROMPTER:50},nn=(e,o)=>o&&e&&e.user&&e.user.packageDetails?e.user.packageDetails.id===0?!0:!e.user.packageDetails.products||!e.user.packageDetails.products.length?!1:e.user.packageDetails.products.includes(o):!1,oi={MY_FOLDERS:"MY FOLDERS",SHARED_WITH_ME:"SHARED WITH ME"},ri={MY_FOLDERS:"my_folders",SHARED_WITH_ME:"shared_with_me"},lx=n.div`
|
|
3629
3629
|
width: ${({width:e})=>e};
|
|
3630
3630
|
margin-top: 12px;
|
|
3631
3631
|
margin-bottom: 12px;
|
|
@@ -3636,7 +3636,7 @@
|
|
|
3636
3636
|
line-height: 20px;
|
|
3637
3637
|
color: ${E.midGrey};
|
|
3638
3638
|
margin-bottom: 8px;
|
|
3639
|
-
`,ux=({value:e,setValue:o,showSharedWithMeFolders:r=!0,showLabel:i=!0,width:s="100%",showAllFolderOption:c=!0})=>{const{t:a}=
|
|
3639
|
+
`,ux=({value:e,setValue:o,showSharedWithMeFolders:r=!0,showLabel:i=!0,width:s="100%",showAllFolderOption:c=!0})=>{const{t:a}=H.useTranslation(),{userData:d}=ve(),{data:l=[],refetch:u}=Jm({getShared:!0}),g=nn(d,rn.FOLDER_ORGANIZATION);p.useEffect(()=>{u()},[]);let h=[];if(g){let x=(l==null?void 0:l.filter(f=>!f.hasOwnProperty("access")&&f.folderId!==Be.value).map(f=>({value:f.folderId,label:f.name,isFolderShared:!!f.isFolderShared,access:!!f.hasOwnProperty("access")})))||[],m=(l==null?void 0:l.filter(f=>!!f.hasOwnProperty("access")&&f.access==="edit").map(f=>({value:f.folderId,label:f.name,isFolderShared:!!f.isFolderShared,access:!!f.hasOwnProperty("access"),sharedBy:f.sharedBy})))||[];c&&(h=[{value:Be.value,label:Be.label,isFolderShared:!1,access:!1}]),h=h.concat([{value:ri.MY_FOLDERS,label:oi.MY_FOLDERS,isFolderShared:!1,access:!1}]),x.length&&(h=h.concat(x)),r&&m.length&&(h=h.concat([{value:ri.SHARED_WITH_ME,label:oi.SHARED_WITH_ME,isFolderShared:!1,access:!1}],m))}return p.useEffect(()=>{l&&l.length&&o&&o({value:l[0].folderId.toString(),label:l[0].name})},[l]),t.jsxs(lx,{width:s,children:[i&&t.jsx(dx,{children:a("Select Folder")}),t.jsx(cx,{value:e,onChange:x=>{o&&o(x)},options:[...h]})]})},px={value:-2,label:"Primary",isFolderShared:!1,access:"edit"},hx=n.div`
|
|
3640
3640
|
padding-bottom: 64px;
|
|
3641
3641
|
display: flex;
|
|
3642
3642
|
position: relative;
|
|
@@ -3644,7 +3644,7 @@
|
|
|
3644
3644
|
width: 1000px;
|
|
3645
3645
|
flex-direction: column;
|
|
3646
3646
|
|
|
3647
|
-
${({theme:e})=>e.containerWidth<
|
|
3647
|
+
${({theme:e})=>e.containerWidth<B.md&&n.css`
|
|
3648
3648
|
width: 100%;
|
|
3649
3649
|
`}
|
|
3650
3650
|
`,gx=n.div`
|
|
@@ -3657,23 +3657,23 @@
|
|
|
3657
3657
|
`,mx=n(Ae.Form)`
|
|
3658
3658
|
width: 380px;
|
|
3659
3659
|
|
|
3660
|
-
${({theme:e})=>e.containerWidth<
|
|
3660
|
+
${({theme:e})=>e.containerWidth<B.md&&n.css`
|
|
3661
3661
|
width: 100%;
|
|
3662
3662
|
`}
|
|
3663
|
-
`,xx=n(
|
|
3663
|
+
`,xx=n(je)`
|
|
3664
3664
|
flex-flow: initial;
|
|
3665
3665
|
align-items: flex-start;
|
|
3666
3666
|
justify-content: space-between;
|
|
3667
3667
|
|
|
3668
|
-
${({theme:e})=>e.containerWidth<
|
|
3668
|
+
${({theme:e})=>e.containerWidth<B.md&&n.css`
|
|
3669
3669
|
flex-direction: column-reverse;
|
|
3670
3670
|
`}
|
|
3671
|
-
`,ni=n(
|
|
3671
|
+
`,ni=n(je)`
|
|
3672
3672
|
width: 770px;
|
|
3673
3673
|
height: 437px;
|
|
3674
3674
|
background: '#f6f7f9';
|
|
3675
3675
|
margin-top: 90px;
|
|
3676
|
-
`,fx=(e,o)=>{const r=(Math.random()+1).toString(36).substring(2);return`${o.userId}_${o.customerId}_${r}.${e}`},sn=({videoBlob:e,handleGoToRecordHome:o,autoSave:r=!1})=>{var X;const{t:i}=
|
|
3676
|
+
`,fx=(e,o)=>{const r=(Math.random()+1).toString(36).substring(2);return`${o.userId}_${o.customerId}_${r}.${e}`},sn=({videoBlob:e,handleGoToRecordHome:o,autoSave:r=!1})=>{var X;const{t:i}=H.useTranslation(),[s,c]=p.useState(null),{userData:a}=ve(),d=rt.useHistory(),{customer:l}=a,{userId:u}=a,[g,h]=p.useState(!1),x=Zm(),m=Yt(),{trackGTMDiscardVideoEvent:f}=He(),{trackVideoSpecificPagesManually:w}=bt({vin:""}),{setCdkAmplitudeFields:b,setRecordingFormData:y,isLoading:S,createProgress:T,encodeProgress:$,uploadToS3Progress:k,progressState:L}=Vm({contineToInsert:g}),v=Ke(a),j=nt(a),R=a.automotiveRole===io.TECHNICIAN,V=p.useRef(),C=p.useRef(!1),{data:A,isLoading:P}=om({page:0,size:200,filterByDepartment:!0}),M=[{customerId:l.customerId,role:io.SERVICE_ADVISOR},{customerId:l.customerId,role:io.SERVICE_MANAGER}],{isLoading:N,results:D}=Cm({params:M,enabled:j});p.useEffect(()=>{w==null||w({...vt.RECORD_VIDEOS_DETAILS})},[]),p.useEffect(()=>{const G=URL.createObjectURL(e);return c(G),()=>{URL.revokeObjectURL(G)}},[e]);const O=G=>{const re=fx(So,a),_=new File([e],re,{type:e.type});y({...G,file:_})},W=()=>{o(),f==null||f()},Y=((X=A==null?void 0:A.attributes)==null?void 0:X.map(G=>{var _,ne;return{value:G.type==="dropdown"&&((ne=(_=G.dropdownValues)==null?void 0:_.find(ae=>ae.default))==null?void 0:ne.value)||(G==null?void 0:G.default)||"",...G}}))||[],se={title:x,folder:px,videoTags:[],attributes:Y,...v?{videoRequest:{customerName:"",videoType:"",vehicle:{vin:"",stockNumber:""},advisorId:j&&!R?u:"",repairOrderNumber:"",note:""}}:{}};p.useEffect(()=>{!r||C.current||P||N||(C.current=!0,b({values:se,initialValues:se}),O(se))},[r,P,N,x]);const Z=Ve.object().shape({attributes:Ve.array().of(Ve.object().shape({value:Ve.string().when("isRequired",{is:1,then:Ve.string().required(i("This field is required")),otherwise:Ve.string()})})),title:Ve.string().trim().required(i("This field is required")).matches(/^[^.]*$/,i("Title should not contain a dot (.)")),...v?{videoRequest:Ve.object().shape({advisorId:Ve.string().when([],{is:()=>R,then:Ve.string().nullable().required(i("Advisor ID is required")),otherwise:Ve.string()}),repairOrderNumber:Ve.string().when([],{is:()=>R,then:Ve.string().required(i("Repair Order Number is required.")),otherwise:Ve.string()})})}:{}});return P||N||s===null?t.jsx(ze,{isLoading:!0}):S?t.jsx(ni,{style:{width:m?"100%":770},children:t.jsx(ei,{progressState:L,encodeProgress:$,uploadToS3Progress:k,createProgress:T})}):r?t.jsx(ni,{style:{width:m?"100%":770},children:t.jsx(ei,{progressState:L,encodeProgress:$,uploadToS3Progress:k,createProgress:T})}):t.jsxs(hx,{children:[t.jsx(Ae.Formik,{initialValues:se,validateOnMount:!0,onSubmit:G=>(b({values:G,initialValues:se}),O(G)),validationSchema:Z,children:({values:G,setFieldValue:re})=>t.jsxs(t.Fragment,{children:[t.jsx(rm,{onDiscardHandler:W,setContineToInsert:h}),t.jsxs(xx,{flexDirection:"column",width:"100%",gap:"36px",children:[t.jsxs(mx,{children:[t.jsx(lt,{name:"title",label:i("Video Title"),isRequired:!0}),t.jsx(Ae.Field,{name:"folder",component:ux,value:G.folder,setValue:_=>re("folder",_),showAllFolderOption:!1}),t.jsx(gm,{}),t.jsx(bm,{}),t.jsx(vm,{results:D,fetchSoldVehiclesForAutomotive:!1}),t.jsx(xm,{})]}),t.jsx(gx,{children:t.jsx(It,{videoRef:V,videoSource:s})})]})]})}),t.jsx(Ro,{when:!0,stay:!0,navigate:G=>d.push(G),shouldBlockNavigation:()=>!0,title:i("Leave without saving the recording?"),text:i("Your recording will not be saved. This action can’t be undone."),confirmButtonText:i("Continue"),discardButtonText:i("Leave")})]})},vx=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,showPreview:i=!0,onStartUpladingVoiceOverHandler:s})=>{const c=p.useRef(null),{trackVideoSpecificPagesManually:a}=bt({vin:""}),{stopRecording:d,pauseRecording:l,startCountDown:u,stopCountDown:g,status:h,recordedBlob:x,countdown:m,timeInSeconds:f}=tn({screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:s,videoRef:c,shouldStartCountdown:!Os,handleGoToRecordHome:r});return p.useEffect(()=>{a==null||a({...vt.VIDEOS_RECORDER})},[]),h===le.DONE&&x&&i?t.jsx(sn,{videoBlob:x,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Jr,{status:h,handleGoToRecordHome:r}),t.jsx(en,{videoRef:c,countdown:m,status:h}),t.jsx(on,{startCountDown:u,stopCountDown:g,pauseRecording:l,stopRecording:d,status:h,timeInSeconds:f})]})},bx=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,showPreview:i=!0,onStartUpladingVoiceOverHandler:s})=>{const c=p.useRef(null),{trackVideoSpecificPagesManually:a}=bt({vin:""}),{stopRecording:d,pauseRecording:l,startCountDown:u,stopCountDown:g,status:h,recordedBlob:x,countdown:m,timeInSeconds:f}=tn({screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:s,shouldStartCountdown:!0,videoRef:c,handleGoToRecordHome:r});return p.useEffect(()=>{a==null||a({...vt.VIDEOS_RECORDER})},[]),h===le.DONE&&x&&i?t.jsx(sn,{videoBlob:x,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Jr,{status:h,handleGoToRecordHome:r}),t.jsx(en,{videoRef:c,countdown:m,status:h}),t.jsx(on,{startCountDown:u,stopCountDown:g,pauseRecording:l,stopRecording:d,status:h,timeInSeconds:f})]})};var no=(e=>(e.SCREEN="Screen",e.CAM="Camera",e.SCREEN_AND_CAM="Screen+Camera",e))(no||{}),qt=(e=>(e.OPENED="Opened",e.APPLIED="Applied",e.CLOSED="Closed",e.REMOVED="Removed",e))(qt||{});const zs=p.createContext({}),wx=()=>{const e=localStorage.getItem("TeleprompterSettings");if(e===null)return null;try{return JSON.parse(e)}catch(o){return console.error("Error parsing localStorage data:",o),null}},yx=e=>{localStorage.setItem("TeleprompterSettings",JSON.stringify(e))},Cx=({children:e})=>{const{trackGTMRecordingToolIntearctionEvent:o}=He(),[r,i]=p.useState(!1),[s,c]=p.useState(!1),[a,d]=p.useState(wx()),[l,u]=p.useState(!1),[g,h]=p.useState(!1),x=k=>{d(k),yx({...k,activeScriptId:"",content:""}),c(!1)},m=()=>{g||(i(!0),c(!0),o==null||o({action:qt.OPENED}))},f=k=>{u(!1),d({...a,speed:k,scriptSize:(a==null?void 0:a.scriptSize)||""}),u(!0)},w=()=>{u(!l)},b=()=>{c(!1),i(!1),o==null||o({action:qt.CLOSED})},y=()=>{i(!1),o==null||o({action:qt.REMOVED})},S=()=>{i(!0)},T=()=>{u(!0)},$=k=>{h(k)};return t.jsx(zs.Provider,{value:{isUsingTeleprompter:r,showTeleprompterModal:s,teleprompterSettings:a,isTeleprompterPlaying:l,isTeleprompterDisabled:g,saveTeleprompterSettingsHandler:x,onEditOrTurnOnTeleprompterHandler:m,onDropdownTeleprompterSpeedChange:f,turnOnTeleprompterPlaying:T,toggleTeleprompterPlaying:w,onTeleprompterModalClose:b,turnOffTeleprompter:y,turnOnTeleprompter:S,disableOrEnableTeleprompter:$},children:e})},Vo=()=>{const e=p.useContext(zs);if(e===void 0)throw new Error("useTeleprompter must be used within a TeleprompterProvider");return e},Sx=({status:e})=>{const{colors:o,isCdkEnviroment:r}=n.useTheme(),{t:i}=H.useTranslation(),{turnOffTeleprompter:s,onEditOrTurnOnTeleprompterHandler:c,isUsingTeleprompter:a,isTeleprompterDisabled:d}=Vo();return t.jsxs(je,{children:[t.jsxs(je,{gap:"4px",children:[t.jsx(Q.MdSubtitles,{color:o.neutral[60],size:20}),t.jsx(Co,{color:o.neutral[60],children:i("Teleprompter")})]}),t.jsx(F.Button,{variant:"secondary",disabled:d||e===le.COUNTDOWN,text:i(a?"Edit":"Turn on"),onClick:c}),a&&t.jsx(F.Button,{title:i("Turn Off Teleprompter"),icon:t.jsx(Q.MdPowerSettingsNew,{size:20}),onClick:s,variant:r?"text":"destructive"})]})},jx=()=>{const{teleprompterSettings:e,isUsingTeleprompter:o,toggleTeleprompterPlaying:r,isTeleprompterPlaying:i,onDropdownTeleprompterSpeedChange:s}=Vo(),{t:c}=H.useTranslation();return o?t.jsx(t.Fragment,{children:t.jsxs(je,{m:"0 0 0 auto",children:[t.jsx(De,{placeholder:c("Set teleprompter speed"),value:e==null?void 0:e.speed,onChange:a=>s(a),options:Fs(e==null?void 0:e.scriptSize,c),isSearchable:!1,height:40,zIndexProp:9999,menuZIndexProp:9,extendStyles:{container:{width:180}},creatable:!1}),t.jsx(F.Button,{text:`${i?"Pause":"Play"} Teleprompter`,icon:i?t.jsx(Q.MdPause,{size:20}):t.jsx(Q.MdPlayArrow,{size:20}),onClick:r})]})}):t.jsx(t.Fragment,{})},Ex=({status:e})=>{const o=e===le.RECORDING||e===le.PAUSED;return t.jsx(t.Fragment,{children:o?t.jsx(jx,{}):t.jsx(Sx,{status:e})})},Tx=n.div`
|
|
3677
3677
|
overflow-wrap: break-word;
|
|
3678
3678
|
max-width: 600px;
|
|
3679
3679
|
font-size: ${e=>e.fontSize};
|
|
@@ -3747,7 +3747,7 @@
|
|
|
3747
3747
|
.marquee-container:not(.horizontal)::after {
|
|
3748
3748
|
background: transparent;
|
|
3749
3749
|
}
|
|
3750
|
-
`,$x=({status:e})=>{const{teleprompterSettings:o,isUsingTeleprompter:r,isTeleprompterPlaying:i}=Vo(),s=()=>{oa.animateScroll.scrollMore(20,{containerId:"teleprompter",duration:50,smooth:!0,offset:50})};return p.useEffect(()=>{var a;let c;return i&&e===
|
|
3750
|
+
`,$x=({status:e})=>{const{teleprompterSettings:o,isUsingTeleprompter:r,isTeleprompterPlaying:i}=Vo(),s=()=>{oa.animateScroll.scrollMore(20,{containerId:"teleprompter",duration:50,smooth:!0,offset:50})};return p.useEffect(()=>{var a;let c;return i&&e===le.RECORDING?(c&&clearInterval(c),c=setInterval(s,((a=o==null?void 0:o.speed)==null?void 0:a.value)||100)):c&&clearInterval(c),()=>{c&&clearInterval(c)}},[i,o==null?void 0:o.speed,e]),r?t.jsxs(t.Fragment,{children:[t.jsx(Ix,{className:o==null?void 0:o.scriptPosition}),t.jsx(Ax,{id:"teleprompter",style:{top:(o==null?void 0:o.scriptPosition)==="top"?"0px":"30%"},children:t.jsx(kx,{content:ro((o==null?void 0:o.content)||""),fontSize:(o==null?void 0:o.scriptSize)||"16px"})})]}):t.jsx(t.Fragment,{})},Rx=n.div`
|
|
3751
3751
|
height: 440px;
|
|
3752
3752
|
width: 100%;
|
|
3753
3753
|
z-index: 4;
|
|
@@ -3759,7 +3759,7 @@
|
|
|
3759
3759
|
justify-content: center;
|
|
3760
3760
|
top: 0;
|
|
3761
3761
|
left: 0;
|
|
3762
|
-
`,an=({text:e})=>t.jsx(Rx,{children:t.jsx("div",{children:t.jsx(
|
|
3762
|
+
`,an=({text:e})=>t.jsx(Rx,{children:t.jsx("div",{children:t.jsx(ze,{isLoading:!0,text:e})})}),cr={url:"",type:"none",index:-1,privacy:"PUBLIC",id:""},Vx=e=>{const o=localStorage.getItem("covideoVirtualBackground")||"";try{const r=JSON.parse(o);return r&&typeof r=="object"&&(r==null?void 0:r[e])||cr}catch{return cr}},Lx=()=>{const e=localStorage.getItem("covideoVirtualBackground")||"";try{const o=JSON.parse(e);return o&&typeof o=="object"?o:{}}catch{return{}}},Mx=(e,o)=>{const i={...Lx(),[o]:e};localStorage.setItem("covideoVirtualBackground",JSON.stringify(i))},Dx={all:()=>["CUSTOM_VIRTUAL_BACKGROUND"]},Ox=async()=>(await oe.get("custom-virtual-background")).data,Nx=()=>{const{toast:e}=Te(),{t:o}=H.useTranslation(),{data:r,isLoading:i,refetch:s}=we.useQuery(Dx.all(),()=>Ox(),{refetchOnMount:!0,onError:()=>{e({message:o("We're currently experiencing difficulties fetching custom virtual backgrounds.")})}});return{data:r||[],isLoading:i,refetch:s}},Px=e=>I.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M2 3C2 2.45 2.45 2 3 2H8C8.55 2 9 1.55 9 1C9 0.45 8.55 0 8 0H2C0.9 0 0 0.9 0 2V8C0 8.55 0.45 9 1 9C1.55 9 2 8.55 2 8V3ZM7.61 11.49L4.65 15.19C4.39 15.52 4.62 16 5.04 16H15C15.41 16 15.65 15.53 15.4 15.2L13.4 12.53C13.2 12.26 12.8 12.26 12.6 12.53L10.97 14.71L8.39 11.49C8.19 11.24 7.81 11.24 7.61 11.49ZM15 6.5C15 5.67 14.33 5 13.5 5C12.67 5 12 5.67 12 6.5C12 7.33 12.67 8 13.5 8C14.33 8 15 7.33 15 6.5ZM18 0H12C11.45 0 11 0.45 11 1C11 1.55 11.45 2 12 2H17C17.55 2 18 2.45 18 3V8C18 8.55 18.45 9 19 9C19.55 9 20 8.55 20 8V2C20 0.9 19.1 0 18 0ZM18 17C18 17.55 17.55 18 17 18H12C11.45 18 11 18.45 11 19C11 19.55 11.45 20 12 20H18C19.1 20 20 19.1 20 18V12C20 11.45 19.55 11 19 11C18.45 11 18 11.45 18 12V17ZM1 11C0.45 11 0 11.45 0 12V18C0 19.1 0.9 20 2 20H8C8.55 20 9 19.55 9 19C9 18.45 8.55 18 8 18H3C2.45 18 2 17.55 2 17V12C2 11.45 1.55 11 1 11Z",fill:"#272A32"})),Fx=n(Px)`
|
|
3763
3763
|
width: ${e=>e.width||"16px"};
|
|
3764
3764
|
height: ${e=>e.height||"16px"};
|
|
3765
3765
|
path {
|
|
@@ -3837,7 +3837,7 @@
|
|
|
3837
3837
|
gl_FragColor = blended;
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
`);return s?{gl:o,program:s}:(console.error("Failed to create WebGL program"),{gl:null,program:null})},_x=(e,o)=>{const r=e.getAttribLocation(o,"a_position"),i=e.getAttribLocation(o,"a_texCoord"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s);const c=new Float32Array([-1,-1,1,-1,-1,1,1,1]);e.bufferData(e.ARRAY_BUFFER,c,e.STATIC_DRAW),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);const a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a);const d=new Float32Array([0,0,1,0,0,1,1,1]);e.bufferData(e.ARRAY_BUFFER,d,e.STATIC_DRAW),e.enableVertexAttribArray(i),e.vertexAttribPointer(i,2,e.FLOAT,!1,0,0)},Ux=(e,o,r,i,s,c,a,d,l,u,g=[1,1])=>{e.useProgram(o),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,r),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,s),e.activeTexture(e.TEXTURE3),e.bindTexture(e.TEXTURE_2D,c),e.activeTexture(e.TEXTURE4),e.bindTexture(e.TEXTURE_2D,a),e.activeTexture(e.TEXTURE5),e.bindTexture(e.TEXTURE_2D,d),e.activeTexture(e.TEXTURE6),e.bindTexture(e.TEXTURE_2D,l),e.activeTexture(e.TEXTURE7),e.bindTexture(e.TEXTURE_2D,u);const h=e.getUniformLocation(o,"u_foreground"),
|
|
3840
|
+
`);return s?{gl:o,program:s}:(console.error("Failed to create WebGL program"),{gl:null,program:null})},_x=(e,o)=>{const r=e.getAttribLocation(o,"a_position"),i=e.getAttribLocation(o,"a_texCoord"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s);const c=new Float32Array([-1,-1,1,-1,-1,1,1,1]);e.bufferData(e.ARRAY_BUFFER,c,e.STATIC_DRAW),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);const a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a);const d=new Float32Array([0,0,1,0,0,1,1,1]);e.bufferData(e.ARRAY_BUFFER,d,e.STATIC_DRAW),e.enableVertexAttribArray(i),e.vertexAttribPointer(i,2,e.FLOAT,!1,0,0)},Ux=(e,o,r,i,s,c,a,d,l,u,g=[1,1])=>{e.useProgram(o),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,r),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,s),e.activeTexture(e.TEXTURE3),e.bindTexture(e.TEXTURE_2D,c),e.activeTexture(e.TEXTURE4),e.bindTexture(e.TEXTURE_2D,a),e.activeTexture(e.TEXTURE5),e.bindTexture(e.TEXTURE_2D,d),e.activeTexture(e.TEXTURE6),e.bindTexture(e.TEXTURE_2D,l),e.activeTexture(e.TEXTURE7),e.bindTexture(e.TEXTURE_2D,u);const h=e.getUniformLocation(o,"u_foreground"),x=e.getUniformLocation(o,"u_background"),m=e.getUniformLocation(o,"u_confidenceMask"),f=e.getUniformLocation(o,"u_confidenceMaskHair"),w=e.getUniformLocation(o,"u_confidenceMaskBody"),b=e.getUniformLocation(o,"u_confidenceMaskFace"),y=e.getUniformLocation(o,"u_confidenceMaskClothes"),S=e.getUniformLocation(o,"u_confidenceMaskOther");e.uniform1i(h,0),e.uniform1i(x,1),e.uniform1i(m,2),e.uniform1i(f,3),e.uniform1i(w,4),e.uniform1i(b,5),e.uniform1i(y,6),e.uniform1i(S,7),e.clear(e.COLOR_BUFFER_BIT);const T=e.getUniformLocation(o,"u_backgroundScale");e.uniform2fv(T,g),e.drawArrays(e.TRIANGLE_STRIP,0,4)},Wx=e=>{e.useProgram(null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},Vr=document.createElement("canvas"),ai=Vr.getContext("2d");let vo=0;const Hx=(e,o,r)=>{let i=o,s=r,c=0,a=0;return o/r<e.width/e.height?(i=r*(e.width/e.height),c=(i-o)/2):(s=o*e.height/e.width,a=(s-r)/2),Vr.width=i,Vr.height=s,ai.drawImage(e,0,0,i,s),ai.getImageData(c,a,o,r).data},ci=(e,o,r,i)=>{const s=e/o,c=r/i;let a=1,d=1;return c<s?d=c/s:a=s/c,[a,d]},qx=(e,o,r)=>{const i=p.useRef(null),s=p.useRef(!0),c=p.useRef(null),a=p.useRef(null),d=p.useRef({gl:null,program:null}),l=p.useRef(),u=p.useRef([1,1]);let g;const h=T=>{g=si(T),l.current=si(T)},x=()=>{e.current&&(d.current=Bx(e.current),d.current.gl&&(h(d.current.gl),a.current&&(lr(d.current.gl,l.current,a.current,e.current.width,e.current.height),u.current=ci(Rr,$r,a.current.width,a.current.height))))},m=async()=>{if(i.current)return;const T=await dn.FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.2/wasm");x();const $=await dn.ImageSegmenter.createFromOptions(T,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_multiclass_256x256/float32/latest/selfie_multiclass_256x256.tflite",delegate:"GPU"},runningMode:"VIDEO",outputCategoryMask:!1,outputConfidenceMasks:!0,canvas:e.current});i.current=$,r(!1),S()},f=()=>{if(i.current&&(i.current.close(),i.current=null),d.current.gl&&Wx(d.current.gl),e.current){const T=e.current.getContext("2d");T&&T.clearRect(0,0,e.current.width,e.current.height)}},w=T=>{if(!T.confidenceMasks||!e.current||!c.current||!a.current||!o.current){T.close();return}const{gl:$,program:k}=d.current;if(!$||!k)return;_x($,k);const L=T.confidenceMasks[0].getAsWebGLTexture(),v=T.confidenceMasks[1].getAsWebGLTexture(),j=T.confidenceMasks[2].getAsWebGLTexture(),R=T.confidenceMasks[3].getAsWebGLTexture(),V=T.confidenceMasks[4].getAsWebGLTexture(),C=T.confidenceMasks[5].getAsWebGLTexture();Ux($,k,g,l.current,L,v,j,R,V,C,u.current),window.requestAnimationFrame(S),T.close()},b=()=>{e.current&&o.current&&a.current&&(c.current=Hx(a.current,e.current.width,e.current.height),d.current.gl&&(u.current=ci(Rr,$r,a.current.width,a.current.height),lr(d.current.gl,l.current,a.current,e.current.width,e.current.height)))};function y(){const T=Math.floor(performance.now());return T<=vo?vo+=1:vo=T,vo}const S=async()=>{if(e.current&&o.current&&i.current&&a.current){const T=o.current.videoWidth,$=o.current.videoHeight;s.current&&(s.current=!1,e.current.width=T,e.current.height=$,b());let k=y();d.current.gl&&lr(d.current.gl,g,o.current,T,$),i.current.segmentForVideo(o.current,k,w)}};return{imageRef:a,onDestroyVirtualBackgroundHandler:f,getCavansBgImage:b,onCreateVirtualBackgroundHandler:m}};let Tt;const Lo=async()=>{if(!Tt){const{data:e}=await oe.get("/droplr/auth");ia.set("jwtToken",e.jwt,{domain:".covideo.com",sameSite:"strict",secure:!0}),Tt=new un.Client({auth:new un.JwtAuth(e.jwt)}),Tt.sharedDrop=new Gx(Tt)}};class Gx{constructor(o){this.client=o,this.path="drops/groups/shared"}async get(o,r={}){return(await this.client.get(`${this.path}/${o}`,r)).data}async list(o={},r={}){const i={params:o},s=await this.client.get(this.path,Object.assign(i,r));return{count:s.headers["x-results-count"],hasMore:s.headers["x-has-more"],results:s.data}}}const Yx=async(e,o,r,i)=>(await Lo(),Tt.drops.create({type:"FILE",variant:o,title:e,content:r},{onUploadProgress:s=>{const c=s.loaded/s.total;Number(c.toFixed(2))*100}})),Qx=async e=>{await Lo();const o=await Tt.boards.list(),r=(o==null?void 0:o.results)||[],i=(await oe.get("/board/all",{params:e})).data,s=(i==null?void 0:i.boards)||[],c=[];return r.forEach(a=>{const d=s.find(l=>l.droplrBoardId===a.id);c.push({...a,thumbnailUrl:(d==null?void 0:d.thumbnailUrl)||""})}),{boards:c,count:c.length}},li=async e=>{if(e)return await Lo(),Tt.drops.get(e)},Zx={FILE:"FILE"};var Lr=(e=>(e.SHARED="shared",e.OWNED="owned",e))(Lr||{});const di=async e=>{await Lo();const{order:o,sort:r,page:i=0,size:s=10,type:c="",variant:a="",search:d="",boardId:l}=e;let u={order:o,sort_by:r,offset:i*s,amount:s,board:""};c&&(u.type=c,c===Zx.FILE&&a&&(u.variant=a)),d&&(u.search=d),l&&(u.board=l);const g=await Tt.drops.list(u);return{drops:g.results,count:Number(g.count)||0,hasMore:(g==null?void 0:g.hasMore)||!1}},Kx=n.div`
|
|
3841
3841
|
margin-top: 24px;
|
|
3842
3842
|
padding: 0 32px;
|
|
3843
3843
|
width: 100%;
|
|
@@ -3966,7 +3966,7 @@
|
|
|
3966
3966
|
justify-content: center;
|
|
3967
3967
|
align-items: center;
|
|
3968
3968
|
border: 1px solid rgba(39, 42, 50, 0.1);
|
|
3969
|
-
`,gf=[{value:"file",text:"Files"},{value:"board",text:"Boards"}],mf=e=>{const{handleModalClose:o,onSelect:r,selectedFile:i,selectedVirtualBackgroundUrl:s}=e,[c,a]=p.useState({name:"",sizeText:"",size:0,currentUpload:0,status:"",progress:0}),{t:d}=
|
|
3969
|
+
`,gf=[{value:"file",text:"Files"},{value:"board",text:"Boards"}],mf=e=>{const{handleModalClose:o,onSelect:r,selectedFile:i,selectedVirtualBackgroundUrl:s}=e,[c,a]=p.useState({name:"",sizeText:"",size:0,currentUpload:0,status:"",progress:0}),{t:d}=H.useTranslation(),{toast:l}=Te(),[u,g]=p.useState(0),[h,x]=p.useState({count:"0",hasMore:"false"}),[m,f]=p.useState([]),[w,b]=p.useState(""),[y,S]=p.useState(!0),[T,$]=p.useState([{label:d("All"),value:""}]),[k,L]=p.useState(T[0]),[v,j]=p.useState([]),{userData:R}=ve(),V=(i==null?void 0:i.itemType)||gf[0].value,C=p.useCallback(async Z=>{let X={name:Z[0].name,status:Ye.WAITING,sizeText:Hm(Z[0].size,2),size:Z[0].size,progress:0,currentUpload:0};a(X);const G=new FileReader;G.onabort=()=>console.log("file reading was aborted"),G.onerror=()=>console.log("file reading has failed"),G.onload=async()=>{X={...X,status:Ye.UPLOADING},a(X);try{const re=await Yx(Z[0].name,Z[0].type,G.result);let _=(re==null?void 0:re.previewMedium)||"";if(_)X={...X,status:Ye.FINISHED,progress:100},a(X),setTimeout(()=>{W()},100);else{if(!re||!re.code){l({message:d("Error while uploading file, please try again later.")});return}X={...X,status:Ye.GENERATING_PREVIEW,progress:90},a(X),_=await A(c,re.code,1500)||"",X={...X,status:Ye.FINISHED,progress:100},a(X),setTimeout(()=>{W()},150)}}catch{l({message:d("Error while uploading file, please try again later.")})}},G.readAsArrayBuffer(Z[0])},[]),A=async(Z,X,G)=>new Promise(re=>{li(X).then(_=>_&&_.previewMedium?re(_.previewMedium):P(X,G)).then(_=>re(_)).catch(()=>{})}),P=(Z,X)=>new Promise(G=>{setTimeout(()=>{li(Z).then(re=>re&&re.previewMedium?G(re.previewMedium):X>=96e3?G(""):G(P(Z,X*2))).catch(()=>{})},X)}),{getRootProps:M,getInputProps:N,isDragActive:D}=ra.useDropzone({onDrop:C,multiple:!1,accept:["image/png","image/jpeg"]}),O=async()=>{const Z=await di({boardId:k.value||"",search:w,page:u+1,type:"IMAGE",dropType:Lr.OWNED});g(u+1),x(Z),f([...m,...Z.drops])},W=async()=>{if(V!=="file")return;S(!0);const Z=await di({boardId:k.value||"",search:w,type:"IMAGE",dropType:Lr.OWNED});if(!v||v.length<=1){const X=await Qx({userId:Number(R.id),customerId:Number(R.customerId)}).catch(()=>{});if(X&&X.boards){j(X.boards||[]);const G=se(X.boards);$([...T,...G])}}x(Z),S(!1),f(Z.drops)};p.useEffect(()=>{V==="file"&&W()},[k,w,V]);const Y=!!c.name,se=Z=>Z.map(G=>({label:G.name,value:G.id}))||[];return t.jsxs(t.Fragment,{children:[!Y&&t.jsxs(Kx,{isDragActive:D,...M(),children:[t.jsx("input",{...N()}),!D&&t.jsxs(t.Fragment,{children:[t.jsx("p",{children:d("Drag and drop files here to upload new file")}),t.jsx(F.Button,{text:d("Browse files..."),variant:"ghost"})]}),D&&t.jsx("p",{children:d("Drop files here")})]}),Y&&t.jsxs(Xx,{children:[t.jsxs(Jx,{children:[t.jsx(tf,{children:c.name}),t.jsx(of,{value:c.progress,max:100}),t.jsxs(rf,{children:[t.jsx(nf,{color:Ym(c.status),children:Gm(c.status)}),t.jsx(sf,{children:Qm(c)})]})]}),t.jsx(ef,{})]}),y&&t.jsx(ze,{isLoading:y,height:"200px"}),!y&&t.jsxs(af,{children:[t.jsxs(cf,{children:[t.jsx("div",{style:{width:"280px"}}),t.jsx("div",{style:{display:"flex"},children:t.jsx(lf,{children:t.jsx(De,{value:k,onChange:Z=>{L(Z)},options:T,placeholder:d("All"),isSearchable:!1,creatable:!1})})})]}),t.jsx(df,{children:t.jsxs(na,{dataLength:u*parseInt(h.count),next:O,hasMore:h.hasMore==="true",loader:t.jsx("h4",{children:d("Loading...")}),height:300,endMessage:t.jsx("p",{style:{textAlign:"center"},children:t.jsx("b",{children:d("No more files")})}),children:[t.jsx(pf,{children:m.map(Z=>t.jsx(hf,{backgroundUrl:Z.previewMedium,onClick:()=>{r(Z.previewMedium,"custom",-1,Z.privacy,Z.code),o()},className:s===Z.previewMedium?"selected":""},Z.code))}),!m.length&&t.jsx(uf,{children:d("No files found.")})]})})]})]})},xf=n.div`
|
|
3970
3970
|
width: 592px;
|
|
3971
3971
|
height: 648px;
|
|
3972
3972
|
background: #ffffff;
|
|
@@ -3997,7 +3997,7 @@
|
|
|
3997
3997
|
opacity: 0.7;
|
|
3998
3998
|
cursor: pointer;
|
|
3999
3999
|
}
|
|
4000
|
-
`,wf=({handleModalClose:e,selectedVirtualBackgroundUrl:o,onSelect:r})=>{const{t:i}=
|
|
4000
|
+
`,wf=({handleModalClose:e,selectedVirtualBackgroundUrl:o,onSelect:r})=>{const{t:i}=H.useTranslation();return t.jsx(Ft,{style:{position:"fixed"},children:t.jsxs(xf,{style:{width:"592px",height:"648px",background:"#FFFFFF",border:"1px solid #F7F8FA",boxShadow:"0px 4px 12px rgba(29, 30, 36, 0.04)",borderRadius:"4px"},children:[t.jsxs(ff,{children:[t.jsx(vf,{children:i("Select your virtual background")}),t.jsx(bf,{title:"Close",children:t.jsx(be.IoMdClose,{size:24,onClick:e,color:E.label})})]}),t.jsx("br",{}),t.jsx(mf,{onSelect:r,handleModalClose:e,selectedVirtualBackgroundUrl:o})]})})},yf=n.div`
|
|
4001
4001
|
display: flex;
|
|
4002
4002
|
width: 100%;
|
|
4003
4003
|
height: auto;
|
|
@@ -4053,7 +4053,7 @@
|
|
|
4053
4053
|
align-items: center;
|
|
4054
4054
|
border: 1px solid rgba(39, 42, 50, 0.1);
|
|
4055
4055
|
box-sizing: border-box;
|
|
4056
|
-
`,Tf=["https://virtualbackgrounds.s3.amazonaws.com/Embed/vb1.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb2.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb3.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb4.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb5.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb6.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb7.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb8.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb9.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb10.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb11.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb12.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb13.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb14.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb15.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb16.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb17.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb18.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb19.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb20.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb21.webp"],kf="https://cv-custom-virtual-backgrounds.s3.amazonaws.com/",If=({onSelect:e,onMainButtonClick:o,selectedVirtualBackgroundUrl:r,customVirtualBackgrounds:i})=>{const{colors:s}=n.useTheme(),{t:c}=
|
|
4056
|
+
`,Tf=["https://virtualbackgrounds.s3.amazonaws.com/Embed/vb1.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb2.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb3.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb4.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb5.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb6.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb7.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb8.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb9.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb10.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb11.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb12.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb13.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb14.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb15.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb16.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb17.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb18.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb19.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb20.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb21.webp"],kf="https://cv-custom-virtual-backgrounds.s3.amazonaws.com/",If=({onSelect:e,onMainButtonClick:o,selectedVirtualBackgroundUrl:r,customVirtualBackgrounds:i})=>{const{colors:s}=n.useTheme(),{t:c}=H.useTranslation(),[a,d]=p.useState(!1),l=(i==null?void 0:i.map(h=>h.url))||[],{userData:u}=ve(),g=[...l,...Tf];return t.jsxs(t.Fragment,{children:[a&&t.jsx(wf,{selectedVirtualBackgroundUrl:r,onSelect:e,handleModalClose:()=>{d(!1)}}),t.jsxs(yf,{children:[t.jsxs(Cf,{children:[t.jsx(Sf,{children:c("Select a virtual background")}),t.jsx(F.Button,{variant:"primary",text:c("Done"),icon:t.jsx(Q.MdCheck,{size:24}),onClick:o})]}),t.jsx(jf,{children:t.jsxs(Ef,{children:[t.jsx(dr,{onClick:()=>{e("","none",-1)},children:t.jsx("div",{style:{display:"flex",color:s.primary[100],justifyContent:"center",alignItems:"center",height:"100px",fontSize:"34px",borderRadius:"3px",boxSizing:"border-box"},className:r===""?"selected":"",children:t.jsx(jo.FaBan,{})})}),u.droplrAccess&&t.jsx(dr,{onClick:()=>{d(!0)},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",color:"#FF8B22",justifyContent:"center",alignItems:"center",height:"100px",fontSize:"28px",borderRadius:"3px",boxSizing:"border-box"},children:[t.jsx(Q.MdAddCircle,{color:s.primary[100]}),t.jsx("div",{style:{marginTop:"5px",width:"auto",display:"flex",color:s.primary[100],justifyContent:"center",alignItems:"center",height:"auto",fontSize:"14px",boxSizing:"border-box"},children:c("Select your own")})]})}),g.map((h,x)=>t.jsx(dr,{backgroundUrl:h,className:r===h?"selected":"",onClick:()=>{if(h.includes(kf)){e(h,"custom",-1);return}e(h,"default",x)}},h+x))]})})]})]})},Af=n.div`
|
|
4057
4057
|
max-width: 770px;
|
|
4058
4058
|
margin-top: 25px;
|
|
4059
4059
|
`,$f=n.div`
|
|
@@ -4061,7 +4061,7 @@
|
|
|
4061
4061
|
bottom: 25px;
|
|
4062
4062
|
right: 20px;
|
|
4063
4063
|
z-index: 2;
|
|
4064
|
-
`,Rf=()=>{const{t:e}=
|
|
4064
|
+
`,Rf=()=>{const{t:e}=H.useTranslation();return t.jsxs(t.Fragment,{children:[t.jsx(Co,{children:e("Virtual Backgrounds")}),t.jsx(pt,{children:e("Select from a library of high-resolution images, or upload your own for extra personalization.")})]})},Vf=({videoRef:e,canvasRef:o,isSegmenterActive:r,setIsSegmenterActive:i,status:s,initialImage:c,setIsLoadingVB:a,isLoadingVb:d})=>{const{t:l}=H.useTranslation(),{colors:u,isCdkEnviroment:g}=n.useTheme(),[h,x]=p.useState(!1),{userData:m}=ve(),[f,w]=p.useState(!0),[b,y]=p.useState(c),{onCreateVirtualBackgroundHandler:S,onDestroyVirtualBackgroundHandler:T,imageRef:$,getCavansBgImage:k}=qx(o,e,a),{data:L}=Nx(),v=()=>{var A,P,M;(A=o.current)!=null&&A.width&&((P=o.current)!=null&&P.height)&&((M=e.current)!=null&&M.videoWidth)&&e.current.videoHeight&&(S(),i(!0))},j=()=>{T(),i(!1)},R=(A,P)=>{if($.current){const M=$.current;M.src=`${A}?t=virtual`,M.crossOrigin="Anonymous";const N=()=>{P==null||P(),r||v()};return M.onload=N,()=>{M.onload=null}}},V=({url:A,type:P,index:M,privacy:N,id:D})=>{const O={url:A,type:P,index:M,privacy:N,id:D};y(O),Mx(O,m.id)},C=()=>{x(!h)};return p.useEffect(()=>{var A,P,M,N;if(((P=(A=m.user)==null?void 0:A.packageDetails)==null?void 0:P.id)==0)w(!0);else if((N=(M=m.user)==null?void 0:M.packageDetails)!=null&&N.products){const D=nn(m,rn.VIRTUAL_BACKGROUNDS);w(D)}},[]),p.useEffect(()=>{if(s===le.CAMERA_READY){const{url:A}=b;if(A&&$.current){const P=$.current;return P.crossOrigin="Anonymous",P.src=`${A}?t=virtual`,P.onload=async()=>{r||(k==null||k(),v())},()=>{P.onload=null}}}},[s]),p.useEffect(()=>()=>{T()},[]),t.jsxs(t.Fragment,{children:[!h&&t.jsxs(t.Fragment,{children:[d&&t.jsx(an,{text:l("Applying Virtual Background")}),s===le.CAMERA_READY&&t.jsx(t.Fragment,{children:!d&&t.jsx($f,{children:t.jsx(F.Tooltip,{position:"bottom",children:t.jsx(F.Button,{icon:t.jsx(Fx,{}),variant:g?"text":"white",disabled:!f,text:l("Virtual Backgrounds"),onClick:C}),popup:f?null:t.jsx(Rf,{}),extendStyles:{popup:f?{display:"none"}:{width:210,gap:8,display:"flex",flexDirection:"column",padding:"10px 24px",...g?{color:u.white[100],background:u.black[100]}:{}}}})})})]}),t.jsx(t.Fragment,{children:t.jsx(Af,{hidden:!h||s===le.RECORDING,children:t.jsx(If,{selectedVirtualBackgroundUrl:b.url,customVirtualBackgrounds:L,onMainButtonClick:()=>{x(!1)},onSelect:(A="",P,M,N="PUBLIC",D="")=>{const O={url:A,type:P,index:M,privacy:N,id:D};if(P==="none"){j(),V(O);return}V(O),R(A,k)}})})}),t.jsx("img",{ref:$,crossOrigin:"anonymous",alt:"Segmentation",style:{display:"none"}})]})},Lf=async e=>(await oe.get("/teleprompter",{params:{...e,field:"createdAt",order:"desc"}})).data,Mf=async({data:e})=>(await oe.post("/teleprompter",e)).data,Df=async({scriptId:e,data:o})=>(await oe.put(`/teleprompter/${e}`,o)).data,Of=e=>I.createElement("svg",{width:15,height:14,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.31556 1.25854L0 4.66606V9.33212L3.31662 12.7638L6.49739 9.94768V3.954L3.31556 1.25854Z",fill:"#09534A"}),I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.0001 6.74778V4.66606L10.4863 0H4.54083L3.50781 1.06115L10.2023 6.74778H15.0001Z",fill:"#09534A"}),I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2012 7.02661L3.50781 12.9614L4.51217 13.9999H10.4863L15.0001 9.33204V7.02661H10.2012Z",fill:"#09534A"})),ui=n(Of)`
|
|
4065
4065
|
width: ${e=>e.width||"21px"};
|
|
4066
4066
|
height: ${e=>e.height||"21px"};
|
|
4067
4067
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -4106,12 +4106,8 @@
|
|
|
4106
4106
|
width: 100%;
|
|
4107
4107
|
padding: 4px;
|
|
4108
4108
|
align-items: center;
|
|
4109
|
-
background:
|
|
4110
|
-
|
|
4111
|
-
rgba(0, 27, 83, 0.05),
|
|
4112
|
-
rgba(0, 27, 83, 0.05)
|
|
4113
|
-
),
|
|
4114
|
-
#ffffff;
|
|
4109
|
+
background:
|
|
4110
|
+
linear-gradient(0deg, rgba(0, 27, 83, 0.05), rgba(0, 27, 83, 0.05)), #ffffff;
|
|
4115
4111
|
border-radius: 24px;
|
|
4116
4112
|
.scriptTab,
|
|
4117
4113
|
.appearanceTab {
|
|
@@ -4310,7 +4306,7 @@
|
|
|
4310
4306
|
gap: 8px;
|
|
4311
4307
|
flex-direction: row;
|
|
4312
4308
|
align-items: center;
|
|
4313
|
-
`,Ct=-1;function Wf(e,o){var a;const r=Ar(e)[2],i=((a=o==null?void 0:o.speed)==null?void 0:a.label)??"",s=String(i).match(/(\d+(?:[.,]\d+)?)/),c=s?Number(s[1].replace(",",".")):void 0;return c!=null&&!Number.isNaN(c)?{value:c,label:`${c} ${e("words / min")}`}:r}const Hf=({handleModalClose:e,handleSubmit:o,settings:r})=>{var je,Ie;const{trackGTMRecordingToolIntearctionEvent:i}=He(),{t:s,i18n:c}=W.useTranslation(),a=[{value:"top",text:s("Top")},{value:"bottom",text:s("Bottom")}],{isCdkEnviroment:d}=n.useTheme(),{env:l}=Ce(),{userData:u}=fe(),{toast:g}=Ee(),h=nt(u),m=ut(u),x=Ke(u),f=!!(u!=null&&u.customer.isIMSEnabled),w=[{title:s("Create a new script"),scriptId:Ct}],[b,y]=p.useState(1),[S,T]=p.useState(0),[$,k]=p.useState(!1),[L,v]=p.useState({speed:Wf(s,r),scriptSize:(r==null?void 0:r.scriptSize)||"large",scriptPosition:(r==null?void 0:r.scriptPosition)||a[0].value,content:ro((r==null?void 0:r.content)||""),activeScriptId:(r==null?void 0:r.activeScriptId)||Ct}),[j,R]=p.useState(ro(L.content||"")),V=`New Script ${Ue(new Date).format("YYYY-MM-DD")}`,[C,A]=p.useState(!1),[P,M]=p.useState(V),[N,D]=p.useState(!1),[O,U]=p.useState(w),G=n.useTheme(),se=async()=>{try{D(!0);const Q=await Lf({});Z(Q.scripts),Q.count||D(!1);let ne=JSON.parse(JSON.stringify(O));Q.scripts.forEach(ye=>{ne=[...ne,ye]}),ne=Gt.uniqBy(ne,"scriptId"),U(ne),D(!1)}catch(Q){console.log("exp at get scripts",Q)}},Z=Q=>Q.sort((ne,ye)=>ne.title.localeCompare(ye.title)),X=Q=>{if(Q.scriptId!==""&&Q.scriptId>Ct){const ne=ro(Q.content||"");M(Q.title),R(ne),v({...L,content:ne,activeScriptId:Q.sharedWithAll?Ct:Q.scriptId})}else R(""),v({...L,content:"",activeScriptId:Q.sharedWithAll?Ct:Q.scriptId}),M(Q.title??V);k(!1),D(!1)},q=Q=>{R(Q.target.value),k(!0)},re=Q=>{v({...L,speed:Q})},z=Q=>{v({...L,scriptSize:Q})},ce=Q=>{v({...L,scriptPosition:Q})},ae=async()=>{L.activeScriptId<0?A(!0):await pe()},pe=async()=>{const Q=encodeURIComponent(j||""),ne=await Df({scriptId:L.activeScriptId,data:{content:Q}});if(ne){let ye=JSON.parse(JSON.stringify(O)),Re=ye.findIndex(_e=>_e.scriptId==L.activeScriptId);Re!=-1&&(ye[Re].content=ro(ne.content)),U(ye),A(!1),v({...L,content:Q}),k(!1),g({message:s("Script updated sucessfully.")})}},ve=async()=>{const Q=encodeURIComponent(j||""),ne=await Mf({data:{title:P,content:Q}});if(ne){let ye=O.filter(Re=>!!Re.scriptId);ye=[...ye,ne],Z(ye),ye=[...w,...ye],U(ye),A(!1),v({...L,activeScriptId:ne.scriptId,content:Q}),k(!1),g({message:s("Script saved as {{scriptTitleText}}.",{scriptTitleText:P})}),M(`New Script ${Ue(new Date).format("YYYY-MM-DD")}`)}},Te=_m(x);p.useEffect(()=>{se()},[]);const ke=[...O.filter(Q=>!Q.sharedWithAll),...O.filter(Q=>Q.sharedWithAll)],ee=Q=>{const{data:ne}=Q;return t.jsx(Qe.components.SingleValue,{...Q,children:ne.sharedWithAll?t.jsxs(bi,{children:[d?t.jsx(pi,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(ui,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),ne.title]}):t.jsx(t.Fragment,{children:ne.title})})},le=Q=>{const{data:ne,innerRef:ye,innerProps:Re}=Q;return t.jsx("div",{ref:ye,...Re,style:{padding:"10px 15px",fontSize:"14px",lineHeight:"20px",fontWeight:500,color:"##001B53",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:ne.sharedWithAll?t.jsxs(bi,{children:[d?t.jsx(pi,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(ui,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),ne.title]}):ne.title})},K=t.jsxs(hi,{children:[t.jsxs(gi,{children:[t.jsx(mi,{children:s("Telepromter")}),t.jsx(zf,{title:s("Close"),children:t.jsx(be.IoMdClose,{size:24,onClick:()=>y(3),color:E.label})})]}),t.jsxs(xi,{children:[t.jsxs(Pf,{children:[t.jsx("div",{className:` scriptTab ${S==0?"active":""}`,onClick:()=>T(0),children:s("Script")}),t.jsx("div",{className:` appearanceTab ${S==1?"active":""}`,onClick:()=>{T(1),A(!1)},children:s("Appearance")})]}),S==1?t.jsxs(Uf,{children:[t.jsxs(vi,{children:[t.jsxs(hr,{children:[t.jsx(pr,{htmlFor:"videoSource",children:s("Speed")}),t.jsx(De,{name:"videoSource",value:L.speed,placeholder:s("Select script..."),options:Fs(L.scriptSize,s),onChange:re,dropdownHeight:140,height:40,isSearchable:!1,creatable:!1})]})," ",t.jsxs(hr,{children:[t.jsx(pr,{htmlFor:"audioSource",children:s("Position")}),t.jsx("div",{children:t.jsx(_f,{width:"150px",children:t.jsx(Rc,{defaultValue:L.scriptPosition,values:a,onChange:ce})})})]})]}),t.jsx(vi,{children:t.jsxs(hr,{children:[t.jsx(pr,{children:s("Text size")}),t.jsxs("div",{className:"scriptSizeContainer",children:[t.jsxs("div",{className:` smallSize ${L.scriptSize=="small"?"active":""}`,onClick:()=>{z("small")},children:[s("Small"),L.scriptSize=="small"?t.jsx(ur,{fill:G.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` mediumSize ${L.scriptSize=="large"?"active":""}`,onClick:()=>{z("large")},children:[s("Medium"),L.scriptSize=="large"?t.jsx(ur,{fill:G.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` largeSize ${L.scriptSize=="x-large"?"active":""}`,onClick:()=>{z("x-large")},children:[s("Large"),L.scriptSize=="x-large"?t.jsx(ur,{fill:G.colors.primary[100],size:22}):null]})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Se,{flexWrap:"no-wrap",alignItems:"center",children:[t.jsx(Ff,{children:t.jsx("div",{className:`scriptList ${u.droplrAccess?"":"fullWidth"}`,children:t.jsx(De,{options:ke,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"bottom",placeholder:s("Select script..."),value:ke.find(Q=>Q.scriptId==L.activeScriptId),onChange:X,getOptionLabel:Q=>Q.title,getOptionValue:Q=>Q.scriptId,isLoading:N,onMenuClose:()=>D(!1),isSearchable:!1,creatable:!1,disabled:N,customComponents:{SingleValue:ee,Option:le}})})}),t.jsx(ki.CovideoMagicButton,{userInput:j,defaultPromptType:Pr.TELEPROPTER_SCRIPT,defaultPromptUseCase:Te,handleSubmitGeneratedContent:Q=>{R(Q),k(!0)},variant:"gradient",token:Be,userData:{customer:{business:u.customer.business,hasCovideoMagic:((Ie=(je=u==null?void 0:u.customer)==null?void 0:je.hasCovideoMagic)==null?void 0:Ie.toString())==="1",markVideosAsSent:Ot(u)},firstName:u.firstName,isAutomotiveSalesRole:m,isAutomotiveServiceRole:h,isIMSEnabled:f,isCompanyAdmin:u.isCompanyAdmin,isAutomotive:x,preferredLanguage:c.language},aiAssistTheme:"branding",env:l,apiKey:gt,size:"small"})]}),t.jsx(Bf,{value:j,onChange:q,placeholder:s("Type or paste your script here...")})]})]}),t.jsx(fi,{children:C?t.jsxs("div",{className:"saveNewScript",children:[t.jsx(Vc,{style:{boxSizing:"border-box",width:"75%"},onChange:Q=>M(Q.target.value),value:P}),t.jsx(F.Button,{text:s("Save"),icon:t.jsx(Y.MdSave,{}),onClick:async()=>{await ve()}}),t.jsx("div",{className:"closeCreateScriptView",children:t.jsx(Y.MdOutlineClose,{size:"24px",color:"#272A32",onClick:()=>{A(!1)}})})]}):t.jsxs("div",{className:"newScriptDiv",children:[S!=1?t.jsx(F.Button,{disabled:!L.activeScriptId||!j||j&&!$||j.trim()==="",variant:"secondary",text:s("Save To My Scripts"),icon:t.jsx(Y.MdSave,{size:18}),onClick:ae}):t.jsx("div",{children:" "}),t.jsx(F.Button,{text:s("Turn on"),disabled:L.activeScriptId!==Ct&&!L.content||L.activeScriptId===Ct&&(!j||j.trim()===""||j&&!$),onClick:()=>{const Q=L;Q.activeScriptId===Ct&&(Q.content=j),o&&(i==null||i({action:qt.APPLIED}),o(Q))}})]})})]}),H=t.jsxs(hi,{children:[t.jsx(gi,{children:t.jsx(mi,{children:s("Cancel Teleprompter?")})}),t.jsx(xi,{children:s("You will lose all changes for the Teleprompter.")}),t.jsxs(fi,{style:{justifyContent:"end"},children:[t.jsx(F.Button,{text:s("Yes, cancel"),onClick:()=>{i==null||i({action:qt.REMOVED}),e()},variant:d?"text":"destructive"}),t.jsx(F.Button,{text:s("Back to editing"),onClick:()=>y(1)})]})]});let he=null;switch(b){case 1:he=K;break;case 3:he=H;break}return t.jsx(Ft,{disableFullScreen:!0,style:{position:"fixed",zIndex:9},children:he})},qf=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,onOpenRecordingSettings:i,showPreview:s=!0,autoSaveOnFinish:c=!1,onStartUpladingVoiceOverHandler:a,toggleCamera:d,isCameraToggled:l})=>{const{t:u}=W.useTranslation(),g=p.useRef(null),h=p.useRef(null),{userData:m}=fe(),{showVirtualBgFeature:x,showTeleprompterFeature:f}=Ce(),w=Vx(m.id),[b,y]=p.useState(!!w.url),[S,T]=p.useState(!1),$=Yt(),{trackVideoSpecificPagesManually:k}=bt({vin:""}),{disableOrEnableTeleprompter:L,turnOnTeleprompterPlaying:v,saveTeleprompterSettingsHandler:j,onTeleprompterModalClose:R,showTeleprompterModal:V,isUsingTeleprompter:C,teleprompterSettings:A}=Vo(),{stopRecording:P,pauseRecording:M,startCountDown:N,stopCountDown:D,status:O,recordedBlob:U,countdown:G,timeInSeconds:se}=tn({isSegmenterActive:S,canvasRef:g,videoRef:h,screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:a,shouldStartCountdown:!1,handleGoToRecordHome:r,isCameraToggled:l});return p.useEffect(()=>{k==null||k({...vt.VIDEOS_RECORDER})},[]),p.useEffect(()=>{G===0&&O===de.COUNTDOWN&&C&&v()},[G,O]),p.useEffect(()=>{var Z,X;if((X=(Z=m==null?void 0:m.user)==null?void 0:Z.packageDetails)!=null&&X.id){const q=!nn(m,rn.TELEPROMPTER);L(q)}},[]),O===de.DONE&&U&&(s||c)?t.jsx(sn,{videoBlob:U,autoSave:c,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Jr,{status:O,handleGoToRecordHome:()=>{r()},onOpenRecordingSettings:i,teleprompterActions:f?t.jsx(Ex,{status:O}):t.jsx(t.Fragment,{})}),t.jsxs("div",{style:{position:"relative"},children:[O===de.IDLE&&t.jsx(an,{text:u("Loading camera")}),t.jsx(en,{videoRef:h,canvasRef:g,countdown:G,status:O,teleprompter:t.jsx($x,{status:O}),toggleCamera:d}),!$&&x&&t.jsx(Vf,{setIsLoadingVB:y,isLoadingVb:b,initialImage:w,videoRef:h,canvasRef:g,isSegmenterActive:S,setIsSegmenterActive:T,status:O})]}),t.jsx(on,{startCountDown:N,stopCountDown:D,pauseRecording:M,stopRecording:P,status:O,timeInSeconds:se,isLoadingVB:b}),V&&t.jsx(Hf,{handleModalClose:R,handleSubmit:j,settings:A})]})},Gf=24,wi=e=>{var r;const o=(r=e==null?void 0:e.audioSource)==null?void 0:r.value;return o?{deviceId:o}:!1},yi={low:{width:{ideal:640},height:{ideal:360}},standard:{width:{ideal:1280},height:{ideal:720}},high:{width:{ideal:1920},height:{ideal:1080}}},Ci=e=>{var r,i;return{...e!=null&&e.videoQuality?yi[e.videoQuality]:yi.standard,frameRate:Gf,deviceId:(r=e==null?void 0:e.videoSource)!=null&&r.value?(i=e==null?void 0:e.videoSource)==null?void 0:i.value:void 0}},gr=n.div`
|
|
4309
|
+
`,Ct=-1;function Wf(e,o){var a;const r=Ar(e)[2],i=((a=o==null?void 0:o.speed)==null?void 0:a.label)??"",s=String(i).match(/(\d+(?:[.,]\d+)?)/),c=s?Number(s[1].replace(",",".")):void 0;return c!=null&&!Number.isNaN(c)?{value:c,label:`${c} ${e("words / min")}`}:r}const Hf=({handleModalClose:e,handleSubmit:o,settings:r})=>{var Ee,Ie,Ne;const{trackGTMRecordingToolIntearctionEvent:i}=He(),{t:s,i18n:c}=H.useTranslation(),a=[{value:"top",text:s("Top")},{value:"bottom",text:s("Bottom")}],{isCdkEnviroment:d}=n.useTheme(),{env:l}=Ce(),{userData:u}=ve(),{toast:g}=Te(),h=nt(u),x=ut(u),m=Ke(u),f=!!(u!=null&&u.customer.isIMSEnabled),w=[{title:s("Create a new script"),scriptId:Ct}],[b,y]=p.useState(1),[S,T]=p.useState(0),[$,k]=p.useState(!1),[L,v]=p.useState({speed:Wf(s,r),scriptSize:(r==null?void 0:r.scriptSize)||"large",scriptPosition:(r==null?void 0:r.scriptPosition)||a[0].value,content:ro((r==null?void 0:r.content)||""),activeScriptId:(r==null?void 0:r.activeScriptId)||Ct}),[j,R]=p.useState(ro(L.content||"")),V=`New Script ${Ue(new Date).format("YYYY-MM-DD")}`,[C,A]=p.useState(!1),[P,M]=p.useState(V),[N,D]=p.useState(!1),[O,W]=p.useState(w),Y=n.useTheme(),se=async()=>{try{D(!0);const U=await Lf({});Z(U.scripts),U.count||D(!1);let pe=JSON.parse(JSON.stringify(O));U.scripts.forEach(ye=>{pe=[...pe,ye]}),pe=Gt.uniqBy(pe,"scriptId"),W(pe),D(!1)}catch(U){console.log("exp at get scripts",U)}},Z=U=>U.sort((pe,ye)=>pe.title.localeCompare(ye.title)),X=U=>{if(U.scriptId!==""&&U.scriptId>Ct){const pe=ro(U.content||"");M(U.title),R(pe),v({...L,content:pe,activeScriptId:U.sharedWithAll?Ct:U.scriptId})}else R(""),v({...L,content:"",activeScriptId:U.sharedWithAll?Ct:U.scriptId}),M(U.title??V);k(!1),D(!1)},G=U=>{R(U.target.value),k(!0)},re=U=>{v({...L,speed:U})},_=U=>{v({...L,scriptSize:U})},ne=U=>{v({...L,scriptPosition:U})},ae=async()=>{L.activeScriptId<0?A(!0):await ue()},ue=async()=>{const U=encodeURIComponent(j||""),pe=await Df({scriptId:L.activeScriptId,data:{content:U}});if(pe){let ye=JSON.parse(JSON.stringify(O)),Le=ye.findIndex($e=>$e.scriptId==L.activeScriptId);Le!=-1&&(ye[Le].content=ro(pe.content)),W(ye),A(!1),v({...L,content:U}),k(!1),g({message:s("Script updated sucessfully.")})}},xe=async()=>{const U=encodeURIComponent(j||""),pe=await Mf({data:{title:P,content:U}});if(pe){let ye=O.filter(Le=>!!Le.scriptId);ye=[...ye,pe],Z(ye),ye=[...w,...ye],W(ye),A(!1),v({...L,activeScriptId:pe.scriptId,content:U}),k(!1),g({message:s("Script saved as {{scriptTitleText}}.",{scriptTitleText:P})}),M(`New Script ${Ue(new Date).format("YYYY-MM-DD")}`)}},Se=_m(m);p.useEffect(()=>{se()},[]);const ke=[...O.filter(U=>!U.sharedWithAll),...O.filter(U=>U.sharedWithAll)],ee=U=>{const{data:pe}=U;return t.jsx(Qe.components.SingleValue,{...U,children:pe.sharedWithAll?t.jsxs(bi,{children:[d?t.jsx(pi,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(ui,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),pe.title]}):t.jsx(t.Fragment,{children:pe.title})})},ce=U=>{const{data:pe,innerRef:ye,innerProps:Le}=U;return t.jsx("div",{ref:ye,...Le,style:{padding:"10px 15px",fontSize:"14px",lineHeight:"20px",fontWeight:500,color:"##001B53",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:pe.sharedWithAll?t.jsxs(bi,{children:[d?t.jsx(pi,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(ui,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),pe.title]}):pe.title})},K=t.jsxs(hi,{children:[t.jsxs(gi,{children:[t.jsx(mi,{children:s("Telepromter")}),t.jsx(zf,{title:s("Close"),children:t.jsx(be.IoMdClose,{size:24,onClick:()=>y(3),color:E.label})})]}),t.jsxs(xi,{children:[t.jsxs(Pf,{children:[t.jsx("div",{className:` scriptTab ${S==0?"active":""}`,onClick:()=>T(0),children:s("Script")}),t.jsx("div",{className:` appearanceTab ${S==1?"active":""}`,onClick:()=>{T(1),A(!1)},children:s("Appearance")})]}),S==1?t.jsxs(Uf,{children:[t.jsxs(vi,{children:[t.jsxs(hr,{children:[t.jsx(pr,{htmlFor:"videoSource",children:s("Speed")}),t.jsx(De,{name:"videoSource",value:L.speed,placeholder:s("Select script..."),options:Fs(L.scriptSize,s),onChange:re,dropdownHeight:140,height:40,isSearchable:!1,creatable:!1})]})," ",t.jsxs(hr,{children:[t.jsx(pr,{htmlFor:"audioSource",children:s("Position")}),t.jsx("div",{children:t.jsx(_f,{width:"150px",children:t.jsx(Rc,{defaultValue:L.scriptPosition,values:a,onChange:ne})})})]})]}),t.jsx(vi,{children:t.jsxs(hr,{children:[t.jsx(pr,{children:s("Text size")}),t.jsxs("div",{className:"scriptSizeContainer",children:[t.jsxs("div",{className:` smallSize ${L.scriptSize=="small"?"active":""}`,onClick:()=>{_("small")},children:[s("Small"),L.scriptSize=="small"?t.jsx(ur,{fill:Y.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` mediumSize ${L.scriptSize=="large"?"active":""}`,onClick:()=>{_("large")},children:[s("Medium"),L.scriptSize=="large"?t.jsx(ur,{fill:Y.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` largeSize ${L.scriptSize=="x-large"?"active":""}`,onClick:()=>{_("x-large")},children:[s("Large"),L.scriptSize=="x-large"?t.jsx(ur,{fill:Y.colors.primary[100],size:22}):null]})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsxs(je,{flexWrap:"no-wrap",alignItems:"center",children:[t.jsx(Ff,{children:t.jsx("div",{className:`scriptList ${u.droplrAccess?"":"fullWidth"}`,children:t.jsx(De,{options:ke,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"bottom",placeholder:s("Select script..."),value:ke.find(U=>U.scriptId==L.activeScriptId),onChange:X,getOptionLabel:U=>U.title,getOptionValue:U=>U.scriptId,isLoading:N,onMenuClose:()=>D(!1),isSearchable:!1,creatable:!1,disabled:N,customComponents:{SingleValue:ee,Option:ce}})})}),t.jsx(ki.CovideoMagicButton,{userInput:j,defaultPromptType:Pr.TELEPROPTER_SCRIPT,defaultPromptUseCase:Se,handleSubmitGeneratedContent:U=>{R(U),k(!0)},variant:"gradient",token:_e,userData:{customer:{business:u.customer.business,hasCovideoMagic:((Ie=(Ee=u==null?void 0:u.customer)==null?void 0:Ee.hasCovideoMagic)==null?void 0:Ie.toString())==="1",markVideosAsSent:Ot(u),phone1:(Ne=u==null?void 0:u.customer)==null?void 0:Ne.phone1},firstName:u.firstName,isAutomotiveSalesRole:x,isAutomotiveServiceRole:h,isIMSEnabled:f,isCompanyAdmin:u.isCompanyAdmin,isAutomotive:m,preferredLanguage:c.language},aiAssistTheme:"branding",env:l,apiKey:gt,size:"small"})]}),t.jsx(Bf,{value:j,onChange:G,placeholder:s("Type or paste your script here...")})]})]}),t.jsx(fi,{children:C?t.jsxs("div",{className:"saveNewScript",children:[t.jsx(Vc,{style:{boxSizing:"border-box",width:"75%"},onChange:U=>M(U.target.value),value:P}),t.jsx(F.Button,{text:s("Save"),icon:t.jsx(Q.MdSave,{}),onClick:async()=>{await xe()}}),t.jsx("div",{className:"closeCreateScriptView",children:t.jsx(Q.MdOutlineClose,{size:"24px",color:"#272A32",onClick:()=>{A(!1)}})})]}):t.jsxs("div",{className:"newScriptDiv",children:[S!=1?t.jsx(F.Button,{disabled:!L.activeScriptId||!j||j&&!$||j.trim()==="",variant:"secondary",text:s("Save To My Scripts"),icon:t.jsx(Q.MdSave,{size:18}),onClick:ae}):t.jsx("div",{children:" "}),t.jsx(F.Button,{text:s("Turn on"),disabled:L.activeScriptId!==Ct&&!L.content||L.activeScriptId===Ct&&(!j||j.trim()===""||j&&!$),onClick:()=>{const U=L;U.activeScriptId===Ct&&(U.content=j),o&&(i==null||i({action:qt.APPLIED}),o(U))}})]})})]}),q=t.jsxs(hi,{children:[t.jsx(gi,{children:t.jsx(mi,{children:s("Cancel Teleprompter?")})}),t.jsx(xi,{children:s("You will lose all changes for the Teleprompter.")}),t.jsxs(fi,{style:{justifyContent:"end"},children:[t.jsx(F.Button,{text:s("Yes, cancel"),onClick:()=>{i==null||i({action:qt.REMOVED}),e()},variant:d?"text":"destructive"}),t.jsx(F.Button,{text:s("Back to editing"),onClick:()=>y(1)})]})]});let he=null;switch(b){case 1:he=K;break;case 3:he=q;break}return t.jsx(Ft,{disableFullScreen:!0,style:{position:"fixed",zIndex:9},children:he})},qf=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,onOpenRecordingSettings:i,showPreview:s=!0,autoSaveOnFinish:c=!1,onStartUpladingVoiceOverHandler:a,toggleCamera:d,isCameraToggled:l})=>{const{t:u}=H.useTranslation(),g=p.useRef(null),h=p.useRef(null),{userData:x}=ve(),{showVirtualBgFeature:m,showTeleprompterFeature:f}=Ce(),w=Vx(x.id),[b,y]=p.useState(!!w.url),[S,T]=p.useState(!1),$=Yt(),{trackVideoSpecificPagesManually:k}=bt({vin:""}),{disableOrEnableTeleprompter:L,turnOnTeleprompterPlaying:v,saveTeleprompterSettingsHandler:j,onTeleprompterModalClose:R,showTeleprompterModal:V,isUsingTeleprompter:C,teleprompterSettings:A}=Vo(),{stopRecording:P,pauseRecording:M,startCountDown:N,stopCountDown:D,status:O,recordedBlob:W,countdown:Y,timeInSeconds:se}=tn({isSegmenterActive:S,canvasRef:g,videoRef:h,screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:a,shouldStartCountdown:!1,handleGoToRecordHome:r,isCameraToggled:l});return p.useEffect(()=>{k==null||k({...vt.VIDEOS_RECORDER})},[]),p.useEffect(()=>{Y===0&&O===le.COUNTDOWN&&C&&v()},[Y,O]),p.useEffect(()=>{var Z,X;if((X=(Z=x==null?void 0:x.user)==null?void 0:Z.packageDetails)!=null&&X.id){const G=!nn(x,rn.TELEPROMPTER);L(G)}},[]),O===le.DONE&&W&&(s||c)?t.jsx(sn,{videoBlob:W,autoSave:c,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Jr,{status:O,handleGoToRecordHome:()=>{r()},onOpenRecordingSettings:i,teleprompterActions:f?t.jsx(Ex,{status:O}):t.jsx(t.Fragment,{})}),t.jsxs("div",{style:{position:"relative"},children:[O===le.IDLE&&t.jsx(an,{text:u("Loading camera")}),t.jsx(en,{videoRef:h,canvasRef:g,countdown:Y,status:O,teleprompter:t.jsx($x,{status:O}),toggleCamera:d}),!$&&m&&t.jsx(Vf,{setIsLoadingVB:y,isLoadingVb:b,initialImage:w,videoRef:h,canvasRef:g,isSegmenterActive:S,setIsSegmenterActive:T,status:O})]}),t.jsx(on,{startCountDown:N,stopCountDown:D,pauseRecording:M,stopRecording:P,status:O,timeInSeconds:se,isLoadingVB:b}),V&&t.jsx(Hf,{handleModalClose:R,handleSubmit:j,settings:A})]})},Gf=24,wi=e=>{var r;const o=(r=e==null?void 0:e.audioSource)==null?void 0:r.value;return o?{deviceId:o}:!1},yi={low:{width:{ideal:640},height:{ideal:360}},standard:{width:{ideal:1280},height:{ideal:720}},high:{width:{ideal:1920},height:{ideal:1080}}},Ci=e=>{var r,i;return{...e!=null&&e.videoQuality?yi[e.videoQuality]:yi.standard,frameRate:Gf,deviceId:(r=e==null?void 0:e.videoSource)!=null&&r.value?(i=e==null?void 0:e.videoSource)==null?void 0:i.value:void 0}},gr=n.div`
|
|
4314
4310
|
display: flex;
|
|
4315
4311
|
flex-direction: column;
|
|
4316
4312
|
width: 176px;
|
|
@@ -4327,17 +4323,17 @@
|
|
|
4327
4323
|
cursor: ${({error:e})=>e?"not-allowed":"pointer"};
|
|
4328
4324
|
border: solid 2px #d0d3d9;
|
|
4329
4325
|
}
|
|
4330
|
-
`,Yf=n(
|
|
4326
|
+
`,Yf=n(je)`
|
|
4331
4327
|
border-radius: 8px;
|
|
4332
4328
|
margin: 56px auto 0 auto;
|
|
4333
4329
|
background-color: ${({theme:e})=>e.colors.neutral[10]};
|
|
4334
4330
|
|
|
4335
|
-
${({theme:e})=>e.containerWidth<
|
|
4331
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
4336
4332
|
width: 100%;
|
|
4337
4333
|
padding: 24px 0;
|
|
4338
4334
|
`}
|
|
4339
|
-
`,Qf=n(
|
|
4340
|
-
${({theme:e})=>e.containerWidth<
|
|
4335
|
+
`,Qf=n(je)`
|
|
4336
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
4341
4337
|
flex-direction: column;
|
|
4342
4338
|
`}
|
|
4343
4339
|
`,bo=n.div`
|
|
@@ -4345,7 +4341,7 @@
|
|
|
4345
4341
|
padding: 0 16px;
|
|
4346
4342
|
box-sizing: border-box;
|
|
4347
4343
|
|
|
4348
|
-
${({theme:e})=>e.containerWidth<
|
|
4344
|
+
${({theme:e})=>e.containerWidth<B.sm&&n.css`
|
|
4349
4345
|
width: 100%;
|
|
4350
4346
|
padding: 0 16px;
|
|
4351
4347
|
`}
|
|
@@ -4370,9 +4366,9 @@
|
|
|
4370
4366
|
border: 2px solid white;
|
|
4371
4367
|
bottom: 65px;
|
|
4372
4368
|
left: 35px;
|
|
4373
|
-
`,Jf=({extendStyles:e,showPreview:o,onStartUpladingVoiceOverHandler:r,autoStartCam:i})=>{const{showRecordBothFeature:s,showRecordCamFeature:c,showRecordScreenFeature:a}=Ce(),{trackVideoSpecificPagesManually:d}=bt({vin:""}),{trackGTMSelectRecordingTypeEvent:l}=He(),u=
|
|
4369
|
+
`,Jf=({extendStyles:e,showPreview:o,onStartUpladingVoiceOverHandler:r,autoStartCam:i})=>{const{showRecordBothFeature:s,showRecordCamFeature:c,showRecordScreenFeature:a}=Ce(),{trackVideoSpecificPagesManually:d}=bt({vin:""}),{trackGTMSelectRecordingTypeEvent:l}=He(),u=de.useHistory(),[g,h]=p.useState(!1),{t:x}=H.useTranslation(),{recordingError:m,updateErrorMessage:f,userSettings:w,recorderSettings:b}=Xr(),{colors:y}=n.useTheme(),[S,T]=p.useState(),[$,k]=p.useState(null),[L,v]=p.useState(!1),[j,R]=p.useState(null),V=p.useRef(null),C=p.useRef(null),A=p.useRef(null),P=p.useRef(!1),M=p.useRef(!1),N=wi(w),D=Ci(w),O=async()=>{V.current&&V.current.getTracks().forEach(_=>_.stop()),C.current&&(C.current.getTracks().forEach(_=>_.stop()),C.current=null),j&&j.getTracks().forEach(_=>_.stop()),document.pictureInPictureElement&&await document.exitPictureInPicture(),A.current&&A.current.srcObject&&(A.current.srcObject.getTracks().forEach(ne=>ne.stop()),A.current.srcObject=null)},W=async()=>{if(!(m||L))try{v(!0);const _=await k0(V,N,D);_&&(R(_),l==null||l({type:no.SCREEN}),k("screen")),v(!1)}catch(_){O(),v(!1),console.log(_,"screenCaptureHandler")}},Y=async()=>{if(!(m||L))try{v(!0);const _=await nr(C,N,D);_&&(R(_),l==null||l({type:no.CAM}),k("cam")),v(!1)}catch(_){O(),v(!1),console.log(_,"enableCameraHandler"),f()}},se=async()=>{var _,ne;try{P.current=!0;const ae=!S,ue=b.videoSource.filter(Se=>ae?Se.label.toLowerCase().includes("front"):Se.label.toLowerCase().includes("back"));await O();const xe=await nr(C,N,{...D,deviceId:(_=ue[0])!=null&&_.value?(ne=ue[0])==null?void 0:ne.value:void 0});xe&&(R(xe),l==null||l({type:no.CAM}),k("cam")),T(ae)}catch(ae){console.error("Error toggling camera:",ae)}},Z=async()=>{if(!(m||A.current===null||L))try{v(!0);const _=Os?await A0(V,C,N,D,A):await I0(V,C,N,D,A);R(_),k("both"),l==null||l({type:no.SCREEN_AND_CAM}),v(!1)}catch(_){O(),console.log(_,"enableCameraHandler"),v(!1)}},X=()=>{i&&(M.current=!1),k(null),O()},G=async()=>{if($==="cam")try{await O();const _=await nr(C,wi(w),Ci(w));_&&R(_)}catch(_){console.log(_,"handleRecordingSettingsSave"),f()}},re=Yt();return p.useEffect(()=>{X()},[u.location]),p.useEffect(()=>{var ne,ae,ue;const _=!!((ue=(ae=(ne=w==null?void 0:w.videoSource)==null?void 0:ne.label)==null?void 0:ae.toLowerCase())!=null&&ue.includes("front"));T(_)},[w]),p.useEffect(()=>{$===null&&(d==null||d({...vt.VIDEOS_RECORD}))},[$]),p.useEffect(()=>{i&&c&&$===null&&!M.current&&(M.current=!0,Y())},[i,c,$]),t.jsxs(t.Fragment,{children:[t.jsxs(Lt,{gap:"32px",children:[$===null&&!i&&t.jsxs(Yf,{flexDirection:"column",gap:"44px",style:e==null?void 0:e.mainRecordContentWrapper,children:[t.jsx(gs,{color:y.black[100],children:x("Choose recording option")}),t.jsxs(Qf,{gap:"32px",children:[s&&!X0&&!J0&&!re&&t.jsxs(gr,{onClick:Z,style:{position:"relative"},error:!!m,children:[t.jsx(Q.MdLaptop,{size:72}),t.jsx(Xf,{children:t.jsx(Ri.IoPersonCircle,{size:28})}),t.jsx(xt,{color:y.black[100],textAlign:"center",children:x("Screen+Cam")})]}),a&&!re&&t.jsxs(gr,{onClick:W,error:!!m,children:[t.jsx(Q.MdLaptop,{size:72}),t.jsx(xt,{color:y.black[100],textAlign:"center",children:x("Screen Only")})]}),c&&t.jsxs(gr,{onClick:Y,error:!!m,children:[t.jsx(Q.MdPerson,{size:72}),t.jsx(xt,{color:y.black[100],textAlign:"center",children:x("Cam Only")})]})]})]}),$===null&&i&&!m&&t.jsx(bo,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(Zf,{children:t.jsx(Kf,{children:t.jsx(an,{text:x("Loading camera")})})})}),$===null&&i&&!!m&&t.jsxs(Lt,{gap:"16px",style:{width:"100%"},children:[t.jsx(Co,{children:m}),t.jsx(F.Button,{variant:"secondary",text:x("Try again"),onClick:Y})]}),!!m&&$===null&&!i&&t.jsx(Co,{children:m}),$==="screen"&&j instanceof MediaStream&&t.jsx(bo,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(mr,{children:t.jsx(bx,{screenStream:j,stopAllStreams:O,handleGoToRecordHome:X,showPreview:o,onStartUpladingVoiceOverHandler:r})})}),$==="cam"&&j instanceof MediaStream&&t.jsx(bo,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(mr,{children:t.jsx(Cx,{children:t.jsx(qf,{screenStream:j,stopAllStreams:O,handleGoToRecordHome:X,onOpenRecordingSettings:()=>h(!0),showPreview:o,autoSaveOnFinish:!!i,onStartUpladingVoiceOverHandler:r,toggleCamera:se,isCameraToggled:P.current})})})}),$==="both"&&j instanceof MediaStream&&t.jsx(bo,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(mr,{children:t.jsx(vx,{screenStream:j,stopAllStreams:O,handleGoToRecordHome:X,showPreview:o,onStartUpladingVoiceOverHandler:r})})}),t.jsx("video",{ref:A,style:{display:"none"}}),$===null&&!i&&t.jsx(F.Button,{icon:t.jsx(Q.MdSettings,{size:18}),variant:"secondary",text:x("Recording settings"),onClick:()=>h(!0)})]}),g&&t.jsx(F0,{handleModalClose:()=>h(!1),onSave:G})]})},e2=n.div`
|
|
4374
4370
|
background: ${E.gray10};
|
|
4375
|
-
`,t2=()=>{const{t:e}=W.useTranslation(),o=ue.useHistory(),{flow:r}=Ce(),i=r===ft.RECORD_CAMERA_ONLY;return t.jsxs(e2,{children:[!i&&t.jsx(Ze,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(Y.MdArrowBack,{size:"18"}),onClick:()=>o.push("/"),style:{color:"white"}}),center:t.jsx(Kt,{children:e("Record Video")})}),t.jsx(V0,{children:t.jsx(Jf,{showHelpDesk:!0,showLegacyRecorderSwitch:!0,autoStartCam:i})})]})},o2=()=>t.jsx(ue.Switch,{children:t.jsx(ue.Route,{path:"/record/home",component:t2})}),r2="Add",n2="Upload",i2="Record",s2="Back",a2="Stock",c2="Model",l2="Make",d2="Year",u2="Cancel",p2="Insert",h2="Download",g2="Voiceover",m2="Low",x2="Standard",f2="High",v2="Save",b2="Continue",w2="Leave",y2="Resume",C2="Pause",S2="Finish",j2="Teleprompter",E2="Edit",T2="Close",k2="Script",I2="Appearance",A2="Speed",$2="Position",R2="Small",V2="Medium",L2="Large",M2="Top",D2="Bottom",O2="Teleprompter",N2="Done",P2="All",F2="Discard",z2="required",B2="VIN",_2="Note",U2="Encoding",W2="Encoded",H2="Creating",q2="Created",G2="Uploading",Y2="Uploaded",Q2="Failed",Z2="Title",K2="Tags",X2="Marketing",J2="Prospecting",ev="Copy",tv="Trim",ov="Websites",rv="CTAs",nv="Change",iv="Remove",sv="Username",av="Password",cv="Login",lv="of",dv="VINReels",uv="Lesa",pv="Preview",hv="Company",gv="Primary",mv="Private",xv="Vault",fv="Introductions",vv={Add:r2,Upload:n2,Record:i2,Back:s2,"Search...":"Search...","Search Videos...":"Search Videos...",Stock:a2,Model:c2,Make:l2,Year:d2,"Lesa TV Import":"Lesa TV Import","Merge Videos":"Merge Videos",Cancel:u2,"Select 2+ videos to merge":"Select 2+ videos to merge","Select maximum 9 videos":"Select maximum 9 videos",Insert:p2,"Copy Video":"Copy Video","Copy to Primary":"Copy to Primary",Download:h2,Voiceover:g2,"Loading...":"Loading...","No videos match your query":"No videos match your query","Upload new video":"Upload new video","Drag and drop your files here or":"Drag and drop your files here or","Browse files...":"Browse files...","Continue Upload":"Continue Upload","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?","Record Video":"Record Video","Choose recording option":"Choose recording option","Screen+Cam":"Screen+Cam","Screen Only":"Screen Only","Cam Only":"Cam Only","Recording settings":"Recording settings","Video source":"Video source","Audio source":"Audio source","Video quality":"Video quality",Low:m2,"Faster Upload":"Faster Upload",Standard:x2,"Fast Upload":"Fast Upload",High:f2,"Slow Upload":"Slow Upload",Save:v2,"Leave without saving changes?":"Leave without saving changes?","Your updates will not be saved. This action can’t be undone.":"Your updates will not be saved. This action can’t be undone.","Discard Changes":"Discard Changes","Save Changes":"Save Changes","Leave without saving the recording?":"Leave without saving the recording?","Your recording will not be saved. This action can’t be undone.":"Your recording will not be saved. This action can’t be undone.",Continue:b2,Leave:w2,"Delete Current Video?":"Delete Current Video?","Do you want to go back? The current video will be deleted.":"Do you want to go back? The current video will be deleted.","Yes, Delete Video":"Yes, Delete Video","No, Keep Video":"No, Keep Video","Yes, Keep Video":"Yes, Keep Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Some of the videos are still processing. Please wait until they are done, and then proceed with merging.","Change recording option":"Change recording option","Start recording":" Start recording",Resume:y2,Pause:C2,Finish:S2,"Loading camera":"Loading camera",Teleprompter:j2,"Turn on":"Turn on",Edit:E2,"Turn Off Teleprompter":"Turn Off Teleprompter","Set teleprompter speed":"Set teleprompter speed",Close:T2,Script:k2,Appearance:I2,Speed:A2,"Select script...":"Select script...",Position:$2,"Text size":"Text size",Small:R2,Medium:V2,Large:L2,"Type or paste your script here...":"Type or paste your script here...","Save To My Scripts":"Save To My Scripts",Top:M2,Bottom:D2,"Create a new script":"Create a new script","Select file":"Select file","Cancel Teleprompter?":"Cancel Teleprompter?","You will lose all changes for the Teleprompter.":"You will lose all changes for the Teleprompter.","Yes, cancel":"Yes, cancel","Back to editing":"Back to editing",Telepromter:O2,"Virtual Backgrounds":"Virtual Backgrounds","Applying Virtual Background":"Applying Virtual Background","Select from a library of high-resolution images, or upload your own for extra personalization.":" Select from a library of high-resolution images, or upload your own for extra personalization.","Select your own":"Select your own","Select a virtual background":"Select a virtual background",Done:N2,"Drag and drop files here to upload new file":"Drag and drop files here to upload new file","Drop files here":"Drop files here",All:P2,"No more files":"No more files","No files found.":"No files found.","Select your virtual background":"Select your virtual background","Search files...":"Search files...","Uploaded on (ASC)":"Uploaded on (ASC)","Uploaded on (DESC)":"Uploaded on (DESC)","Close video preview":"Close video preview","Tag can not be empty.":"Tag can not be empty.","Tag cannot contain more than {{count}} characters":"Tag cannot contain more than {{count}} characters","Tag already exists.":"Tag already exists.","Manage Tags":"Manage Tags","Add tag(s)...":"Add tag(s)...","Add Tags...":"Add Tags...","Remove this video":"Remove this video","Select Folder":"Select Folder","Video Title":"Video Title","This field is required":"This field is required","Title should not contain a dot (.)":"Title should not contain a dot (.)","Advisor ID is required":"Advisor ID is required","Repair Order Number is required.":"Repair Order Number is required.","Preview recorded video":"Preview recorded video",Discard:F2,"Save Recording":"Save Recording","Continue to Insert":"Continue to Insert","Video Attributes":"Video Attributes",required:z2,"Video Type":"Video Type","Search vehicle":"Search vehicle","Search vehicle by name, VIN or stock number...":"Search vehicle by name, VIN or stock number...",VIN:B2,"Stock number":"Stock number","Assign To":"Assign To","RO Number":"RO Number","Customer Name":"Customer Name",Note:_2,"Waiting...":"Waiting...",Encoding:U2,Encoded:W2,Creating:H2,Created:q2,Uploading:G2,Uploaded:Y2,"Controls disabled before preview.":"Controls disabled before preview.","Start Over":"Start Over","Start Over?":"Start Over?","Your voiceover recording will be erased.":"Your voiceover recording will be erased.","Go Back":"Go Back","Save Video":"Save Video","Duplicated video ready for voiceover":"Duplicated video ready for voiceover","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.","Name new video":"Name new video","Give your new video a name":"Give your new video a name","Wheels TV Import":"Wheels TV Import","Oops! It looks like there are no videos matching your search terms.":"Oops! It looks like there are no videos matching your search terms.","Try using a different search terms":"Try using a different search terms","Go to:":"Go to:",Failed:Q2,"Trimmed.":"Trimmed.","Revert to Original":"Revert to Original","Playback Speed":"Playback Speed",Title:Z2,Tags:K2,"Search tags or create new...":"Search tags or create new...","Mark Video as ‘Sent’?":"Mark Video as ‘Sent’?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.","Leave as ‘Not Sent’":"Leave as ‘Not Sent’","Mark as Sent":"Mark as Sent","Something went wrong while trimming the video, try again later!":"Something went wrong while trimming the video, try again later!","Download failed, please try again later.":"Download failed, please try again later.","Video copied successfully.":"Video copied successfully.","Copy failed, please try again later.":"Copy failed, please try again later.","Video marked as Sent":"Video marked as Sent","Inserting video...":"Inserting video...","Link copied to clipboard!":"Link copied to clipboard!","Script updated sucessfully.":"Script updated sucessfully.","Script saved as {{scriptTitleText}}.":"Script saved as {{scriptTitleText}}.","Failed to start recording.":"Failed to start recording.","Something went wrong, try again later!":"Something went wrong, try again later!","Error while uploading file, please try again later.":"Error while uploading file, please try again later.","Successfully saved video!":"Successfully saved video!","There was an error while creating your video request. Please try again.":"There was an error while creating your video request. Please try again.","Server is currently unavailable, try again later!":"Server is currently unavailable, try again later!","Creating voiceover failed, try again later!":"Creating voiceover failed, try again later!","Voiceover successfully created!":"Voiceover successfully created!","Please enable audio in your recording settings and try again!":"Please enable audio in your recording settings and try again!","Video has been added!":"Video has been added!","An error occured while trying to add the video!":"An error occured while trying to add the video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"We're currently experiencing difficulties fetching custom virtual backgrounds.","We're currently experiencing difficulties fetching Lesa videos.":"We're currently experiencing difficulties fetching Lesa videos.","Video successfully created!":"Video successfully created!","Failed to create video. Please try again later.":"Failed to create video. Please try again later.","Video title can not be more than 100 characters!":"Video title can not be more than 100 characters!","{{name}} is of invalid type and won't be uploaded.":"{{name}} is of invalid type and won't be uploaded.","Oops! Something went wrong, try again in a few moments.":"Oops! Something went wrong, try again in a few moments.","Failed to copy to clipboard":"Failed to copy to clipboard","Transcription Started.":"Transcription Started.",Marketing:X2,Prospecting:J2,"Respond to Inquiry":"Respond to Inquiry","Thanks For Your Business":"Thanks For Your Business","Additional Repair":"Additional Repair","Repair inquiry":"Repair inquiry","Regular service":"Regular service","Service reminder":"Service reminder","Quote request":"Quote request",Copy:ev,"Trim Video":"Trim Video",Trim:tv,"CRM Code Copied!":"CRM Code Copied!","URL Copied!":"URL Copied!","Raw HTML Copied!":"Raw HTML Copied!","Landing Page":"Landing Page",Websites:ov,CTAs:rv,"Use Existing":"Use Existing","Add New":"Add New","No Websites":"No Websites","No CTAs":"No CTAs","Enter website":"Enter website","No vehicles found, try entering a different name or VIN.":"No vehicles found, try entering a different name or VIN.","Add Vehicle":"Add Vehicle",Change:nv,Remove:iv,"To enable the integration with your Inventory Management System, please call us at":"To enable the integration with your Inventory Management System, please call us at","processing...":"processing...","Login failed":"Login failed","External token invalid.":"External token invalid.",Username:sv,Password:av,Login:cv,"Forgot password?":"Forgot password?","Please upgrade you account to use eLead integration.":"Please upgrade you account to use eLead integration.","No Audio":"No Audio","No Video":"No Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"You do not have the necessary permissions to access this feature. Please check your browser permissions.","Add More Videos":"Add More Videos","videos uploading":"videos uploading","Video title is required!":"Video title is required!","Uploading...":"Uploading...","Encoding...":"Encoding...","VIN / search vehicle":"VIN / search vehicle","Select vehicle":"Select vehicle","Select video type":"Select video type","Log Out":"Log Out","Login to your account":"Login to your account",of:lv,"No settings":"No settings","Title cannot be empty.":"Title cannot be empty.","words / min":"words / min","Please enter at least three characters to search":"Please enter at least three characters to search","Select Landing Page":"Select Landing Page","We're currently experiencing difficulties fetching VINReels.":"We're currently experiencing difficulties fetching VINReels.","VINReel has been added to Video library.":"VINReel has been added to Video library.","We're currently experiencing difficulties copying the VINReel to the Video library.":"We're currently experiencing difficulties copying the VINReel to the Video library.","VINReels Import":"VINReels Import",VINReels:dv,Lesa:uv,"Wheels TV":"Wheels TV","Add to Covideo":"Add to Covideo",Preview:pv,"Enable video reactions & comments":"Enable video reactions & comments","Try using different search term":"Try using different search term","All folders":"All folders",Company:hv,Primary:gv,Private:mv,Vault:xv,"Vehicle Walkarounds":"Vehicle Walkarounds","Appointment Reminders":"Appointment Reminders",Introductions:fv,"Post - Sale Thank You":"Post - Sale Thank You","Video Replies":"Video Replies","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.","Welcome back":"Welcome back","Enter username to continue":"Enter username to continue","Forgot username?":"Forgot username?","Log In":"Log In","Verifying SSO...":"Verifying SSO..."},bv="Añadir",wv="Subir",yv="Grabar",Cv="Atrás",Sv="Stock",jv="Modelo",Ev="Marca",Tv="Año",kv="Cancelar",Iv="Insertar",Av="Descargar",$v="Narración",Rv="Baja",Vv="Estándar",Lv="Alta",Mv="Guardar",Dv="Continuar",Ov="Salir",Nv="Reanudar",Pv="Pausa",Fv="Finalizar",zv="Editar",Bv="Teleprompter",_v="Cerrar",Uv="Guion",Wv="Apariencia",Hv="Velocidad",qv="Posición",Gv="Pequeño",Yv="Mediano",Qv="Grande",Zv="Arriba",Kv="Abajo",Xv="Teleprompter",Jv="Hecho",eb="Todos",tb="Descartar",ob="obligatorio",rb="VIN",nb="Nota",ib="Codificando",sb="Codificado",ab="Creando",cb="Creado",lb="Subiendo",db="Subido",ub="Fallido",pb="Título",hb="Etiquetas",gb="Marketing",mb="Prospección",xb="Copy",fb="Recortar",vb="Sitios Web",bb="CTAs",wb="Cambiar",yb="Eliminar",Cb="Nombre de usuario",Sb="Contraseña",jb="Iniciar sesión",Eb="de",Tb="VINReels",kb="Lesa",Ib="Vista Previa",Ab="Empresa",$b="Principal",Rb="Privado",Vb="Bóveda",Lb="Introducciones",Mb={Add:bv,Upload:wv,Record:yv,Back:Cv,"Search...":"Buscar...","Search Videos...":"Buscar videos...",Stock:Sv,Model:jv,Make:Ev,Year:Tv,"Lesa TV Import":"Importar Lesa TV","Merge Videos":"Combinar Videos",Cancel:kv,"Select 2+ videos to merge":"Selecciona 2 o más videos para combinar","Select maximum 9 videos":"Selecciona un máximo de 9 videos",Insert:Iv,"Copy Video":"Copiar Video","Copy to Primary":"Copiar a Primary",Download:Av,Voiceover:$v,"Loading...":"Cargando...","No videos match your query":"Ningún video coincide con tu búsqueda","Upload new video":"Subir nuevo video","Drag and drop your files here or":"Arrastra y suelta tus archivos aquí o","Browse files...":"Buscar archivos...","Continue Upload":"Continuar Subida","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Tendrás que reiniciar la subida de tu video desde el principio si cancelas ahora. Estás seguro de que quieres cancelar esta subida?","Record Video":"Grabar Video","Choose recording option":"Elige opción de grabación","Screen+Cam":"Pantalla+Cámara","Screen Only":"Solo Pantalla","Cam Only":"Solo Cámara","Recording settings":"Configuración de grabación","Video source":"Fuente de video","Audio source":"Fuente de audio","Video quality":"Calidad de video",Low:Rv,"Faster Upload":"Subida Más Rápida",Standard:Vv,"Fast Upload":"Subida Rápida",High:Lv,"Slow Upload":"Subida Lenta",Save:Mv,"Leave without saving changes?":"¿Salir sin guardar los cambios?","Your updates will not be saved. This action can’t be undone.":"Tus actualizaciones no se guardarán. Esta acción no se puede deshacer.","Discard Changes":"Descartar Cambios","Save Changes":"Guardar Cambios","Leave without saving the recording?":"¿Salir sin guardar la grabación?","Your recording will not be saved. This action can’t be undone.":"Tu grabación no se guardará. Esta acción no se puede deshacer.",Continue:Dv,Leave:Ov,"Delete Current Video?":"¿Eliminar el Video Actual?","Do you want to go back? The current video will be deleted.":"¿Quieres regresar? El video actual será eliminado.","Yes, Delete Video":"Sí, Eliminar Video","No, Keep Video":"No, Mantener Video","Yes, Keep Video":"Sí, Mantener Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Algunos de los videos aún están procesándose. Por favor espera hasta que terminen, y luego procede con la combinación.","Change recording option":"Cambiar opción de grabación","Start recording":" Iniciar grabación",Resume:Nv,Pause:Pv,Finish:Fv,"Loading camera":"Cargando cámara",Edit:zv,Teleprompter:Bv,"Turn on":"Encender","Turn Off Teleprompter":"Apagar Teleprompter","Set teleprompter speed":"Ajustar velocidad del teleprompter",Close:_v,Script:Uv,Appearance:Wv,Speed:Hv,"Select script...":"Seleccionar guion...",Position:qv,"Text size":"Tamaño del texto",Small:Gv,Medium:Yv,Large:Qv,"Type or paste your script here...":"Escribe o pega tu guion aquí...","Save To My Scripts":"Guardar en Mis Guiones",Top:Zv,Bottom:Kv,"Create a new script":"Crear un nuevo guion","Select file":"Seleccionar archivo","Cancel Teleprompter?":"¿Cancelar Teleprompter?","You will lose all changes for the Teleprompter.":"Perderás todos los cambios del Teleprompter.","Yes, cancel":"Sí, cancelar","Back to editing":"Volver a editar",Telepromter:Xv,"Virtual Backgrounds":"Fondos Virtuales","Applying Virtual Background":"Aplicando Fondos Virtuale","Select from a library of high-resolution images, or upload your own for extra personalization.":"Selecciona de una biblioteca de imágenes de alta resolución, o sube las tuyas para una personalización extra.","Select your own":"Selecciona las tuyas propias","Select a virtual background":"Selecciona un fondo virtual",Done:Jv,"Drag and drop files here to upload new file":"Arrastra y suelta archivos aquí para subir un nuevo archivo","Drop files here":"Suelta los archivos aquí",All:eb,"No more files":"No hay más archivos","No files found.":"No se encontraron archivos.","Select your virtual background":"Selecciona tu fondo virtual","Search files...":"Buscar archivos...","Uploaded on (ASC)":"Subido el (ASC)","Uploaded on (DESC)":"Subido el (DESC)","Close video preview":"Cerrar vista previa de video","Tag can not be empty.":"La etiqueta no puede estar vacía.","Tag cannot contain more than {{count}} characters":"La etiqueta no puede contener más de {{count}} caracteres.","Tag already exists.":"La etiqueta ya existe.","Manage Tags":"Gestionar Etiquetas","Add tag(s)...":"Añadir etiqueta(s)...","Add Tags...":"Añadir Etiquetas...","Remove this video":"Eliminar este video","Select Folder":"Seleccionar Carpeta","Video Title":"Título del Video","This field is required":"Este campo es obligatorio","Title should not contain a dot (.)":"El título no debe contener un punto (.).","Advisor ID is required":"El identificador del asesor es obligatorio.","Repair Order Number is required.":"El número de orden de reparación es obligatorio.","Preview recorded video":"Vista previa del video grabado",Discard:tb,"Save Recording":"Guardar Grabación","Continue to Insert":"Continuar para Insertar","Video Attributes":"Atributos del Video",required:ob,"Video Type":"Tipo de Video","Search vehicle":"Buscar vehículo","Search vehicle by name, VIN or stock number...":"Buscar vehículo por nombre, VIN o número de stock...",VIN:rb,"Stock number":"Número de stock","Assign To":"Asignar a","RO Number":"Número de RO","Customer Name":"Nombre del Cliente",Note:nb,"Waiting...":"Esperando...",Encoding:ib,Encoded:sb,Creating:ab,Created:cb,Uploading:lb,Uploaded:db,"Controls disabled before preview.":"Controles deshabilitados antes de la vista previa.","Start Over":"Empezar de Nuevo","Start Over?":"¿Empezar de Nuevo?","Your voiceover recording will be erased.":"Tu grabación de voz será borrada.","Go Back":"Regresar","Save Video":"Guardar Video","Duplicated video ready for voiceover":"Video duplicado listo para voz en off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"El video no estará disponible en la Biblioteca hasta que lo guardes. Una nueva voz en off reemplazará el audio original del video duplicado.","Name new video":"Nombrar nuevo video","Give your new video a name":"Dale un nombre a tu nuevo video","Wheels TV Import":"Importar Wheels TV","Oops! It looks like there are no videos matching your search terms.":"¡Vaya! Parece que no hay videos que coincidan con tus términos de búsqueda.","Try using a different search terms":"Intenta usar términos de búsqueda diferentes","Go to:":"Ir a:",Failed:ub,"Trimmed.":"Recortado.","Revert to Original":"Revertir a Original","Playback Speed":"Velocidad de Reproducción",Title:pb,Tags:hb,"Search tags or create new...":"Buscar etiquetas o crear nuevas...","Mark Video as ‘Sent’?":"¿Marcar Video como 'Enviado'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, puedes cambiar las preferencias de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, tu administrador puede cambiar las preferencias de QuickShare.","Leave as ‘Not Sent’":"Dejar como 'No Enviado'","Mark as Sent":"Marcar como Enviado","Something went wrong while trimming the video, try again later!":"¡Algo salió mal al recortar el video, intenta de nuevo más tarde!","Download failed, please try again later.":"La descarga falló, por favor intenta de nuevo más tarde.","Video copied successfully.":"Video copiado con éxito.","Copy failed, please try again later.":"Error al copiar, por favor intenta de nuevo más tarde.","Video marked as Sent":"Video marcado como Enviado","Inserting video...":"Insertando video...","Link copied to clipboard!":"¡Enlace copiado al portapapeles!","Script updated sucessfully.":"Guion actualizado con éxito.","Script saved as {{scriptTitleText}}.":"Guion guardado como {{scriptTitleText}}","Failed to start recording.":"Error al iniciar la grabación.","Something went wrong, try again later!":"¡Algo salió mal, intenta de nuevo más tarde!","Error while uploading file, please try again later.":"Error al subir el archivo, por favor intenta de nuevo más tarde.","Successfully saved video!":"¡Video guardado con éxito!","There was an error while creating your video request. Please try again.":"Hubo un error al crear tu solicitud de video. Por favor, intenta de nuevo.","Server is currently unavailable, try again later!":"¡El servidor no está disponible actualmente, intenta de nuevo más tarde!","Creating voiceover failed, try again later!":"¡Error al crear la voz en off, intenta de nuevo más tarde!","Voiceover successfully created!":"¡Voz en off creada con éxito!","Please enable audio in your recording settings and try again!":"¡Por favor, habilita el audio en la configuración de tu grabación e intenta de nuevo!","Video has been added!":"¡El video ha sido añadido!","An error occured while trying to add the video!":"¡Ocurrió un error al intentar añadir el video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Actualmente estamos experimentando dificultades para obtener fondos virtuales personalizados.","We're currently experiencing difficulties fetching Lesa videos.":"Actualmente estamos experimentando dificultades para obtener videos de Lesa.","Video successfully created!":"¡Video creado con éxito!","Failed to create video. Please try again later.":"No se pudo crear el video. Por favor, intenta de nuevo más tarde.","Video title can not be more than 100 characters!":"¡El título del video no puede tener más de 100 caracteres!","{{name}} is of invalid type and won't be uploaded.":"{{name}} tiene un tipo no válido y no se subirá.","Oops! Something went wrong, try again in a few moments.":"¡Vaya! Algo salió mal, intenta de nuevo en unos momentos.","Failed to copy to clipboard":"Error al copiar al portapapeles","Transcription Started.":"Transcripción Iniciada.",Marketing:gb,Prospecting:mb,"Respond to Inquiry":"Responder a Consulta","Thanks For Your Business":"Gracias por tu Negocio","Additional Repair":"Reparaciones Adicionale","Repair inquiry":"Consulta de Reparación","Regular service":"Servicio Regular","Service reminder":"Recordatorio de Servicio","Quote request":"Solicitud de Cotización",Copy:xb,"Trim Video":"Recortar Video",Trim:fb,"CRM Code Copied!":"¡Código CRM Copiado!","URL Copied!":"¡URL Copiado!","Raw HTML Copied!":"¡HTML en Bruto Copiado!","Landing Page":"Página de Aterrizaje",Websites:vb,CTAs:bb,"Use Existing":"Usar Existente","Add New":"Añadir Nuevo","No Websites":"No hay Sitios Web","No CTAs":"No hay CTAs","Enter website":"Introducir sitio web","No vehicles found, try entering a different name or VIN.":"No se encontraron vehículos, intenta ingresar un nombre o VIN diferente.","Add Vehicle":"Añadir Vehículo",Change:wb,Remove:yb,"To enable the integration with your Inventory Management System, please call us at":"Para habilitar la integración con tu Sistema de Gestión de Inventario, por favor llámanos al","processing...":"procesando...","Login failed":"Error de inicio de sesión","External token invalid.":"Token externo no válido.",Username:Cb,Password:Sb,Login:jb,"Forgot password?":"¿Olvidaste tu contraseña?","Please upgrade you account to use eLead integration.":"Por favor, actualiza tu cuenta para usar la integración eLead.","No Audio":"Sin Audio","No Video":"Sin Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"No tienes los permisos necesarios para acceder a esta función. Por favor, verifica los permisos de tu navegador.","Add More Videos":"Añadir Más Videos","videos uploading":"videos subiendo","Video title is required!":"¡El título del video es obligatorio!","Uploading...":"Subiendo...","Encoding...":"Codificando...","VIN / search vehicle":"VIN / buscar vehículo","Select vehicle":"Seleccionar vehículo","Select video type":"Seleccionar tipo de video","Log Out":"Cerrar sesión","Login to your account":"Iniciar sesión en tu cuenta",of:Eb,"No settings":"Sin configuraciones","Title cannot be empty.":"El título no puede estar vacío.","words / min":"palabras / min","Please enter at least three characters to search":"Por favor, ingresa al menos tres caracteres para buscar","Select Landing Page":"Seleccionar Página de Aterrizaje","We're currently experiencing difficulties fetching VINReels.":"Actualmente estamos experimentando dificultades para obtener VINReels.","VINReel has been added to Video library.":"VINReel ha sido añadido a la Biblioteca de Videos.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Actualmente estamos experimentando dificultades para copiar el VINReel a la Biblioteca de Videos.","VINReels Import":"Importar VINReels",VINReels:Tb,Lesa:kb,"Wheels TV":"Wheels TV","Add to Covideo":"Añadir a Covideo",Preview:Ib,"Enable video reactions & comments":"Habilitar reacciones y comentarios en el video","Try using different search term":"Intenta usar un término de búsqueda diferente","All folders":"Todas las carpetas",Company:Ab,Primary:$b,Private:Rb,Vault:Vb,"Vehicle Walkarounds":"Presentaciones de vehículos","Appointment Reminders":"Recordatorios de citas",Introductions:Lb,"Post - Sale Thank You":"Gracias postventa","Video Replies":"Respuestas en video","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Actualmente estás conectado con una cuenta de usuario que no tiene funcionalidades activas asignadas dentro de la integración de Covideo.","Welcome back":"Bienvenido de nuevo","Enter username to continue":"Ingresa tu nombre de usuario para continuar","Forgot username?":"¿Olvidaste tu nombre de usuario?","Log In":"Iniciar sesión","Verifying SSO...":"Verificando SSO..."},Db="Ajouter",Ob="Téléverser",Nb="Enregistrer",Pb="Retour",Fb="Stock",zb="Modèle",Bb="Marque",_b="Année",Ub="Annuler",Wb="Insérer",Hb="Télécharger",qb="Voix off",Gb="Faible",Yb="Standard",Qb="Élevée",Zb="Enregistrer",Kb="Continuer",Xb="Quitter",Jb="Reprendre",ew="Pause",tw="Terminer",ow="Modifier",rw="Téléprompteur",nw="Fermer",iw="Script",sw="Apparence",aw="Vitesse",cw="Position",lw="Petit",dw="Moyen",uw="Grand",pw="Haut",hw="Bas",gw="Téléprompteur",mw="Terminé",xw="Tout",fw="Ignorer",vw="obligatoire",bw="VIN",ww="Remarque",yw="Encodage",Cw="Encodé",Sw="Création",jw="Créé",Ew="Téléversement",Tw="Téléversé",kw="Échoué",Iw="Titre",Aw="Balises",$w="Marketing",Rw="Prospection",Vw="Copy",Lw="Rogner",Mw="Sites Web",Dw="CTA",Ow="Changer",Nw="Supprimer",Pw="Nom d’utilisateur",Fw="Mot de passe",zw="Connexion",Bw="de",_w="VINReels",Uw="Lesa",Ww="Aperçu",Hw="Entreprise",qw="Principal",Gw="Privé",Yw="Coffre",Qw="Présentations",Zw={Add:Db,Upload:Ob,Record:Nb,Back:Pb,"Search...":"Rechercher...","Search Videos...":"Rechercher des vidéos...",Stock:Fb,Model:zb,Make:Bb,Year:_b,"Lesa TV Import":"Importation Lesa TV","Merge Videos":"Fusionner les vidéos",Cancel:Ub,"Select 2+ videos to merge":"Sélectionnez 2 vidéos ou plus à fusionner","Select maximum 9 videos":"Sélectionnez un maximum de 9 vidéos",Insert:Wb,"Copy Video":"Copier la vidéo","Copy to Primary":"Copier vers Primary",Download:Hb,Voiceover:qb,"Loading...":"Chargement...","No videos match your query":"Aucune vidéo ne correspond à votre recherche","Upload new video":"Téléverser une nouvelle vidéo","Drag and drop your files here or":"Glissez et déposez vos fichiers ici ou","Browse files...":"Parcourir les fichiers...","Continue Upload":"Continuer le téléversement","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Vous devrez recommencer le téléversement de votre vidéo depuis le début si vous annulez maintenant. Êtes-vous sûr de vouloir annuler ce téléversement?","Record Video":"Enregistrer une vidéo","Choose recording option":"Choisir l'option d'enregistrement","Screen+Cam":"Écran+Caméra","Screen Only":"Écran uniquement","Cam Only":"Caméra uniquement","Recording settings":"Paramètres d'enregistrement","Video source":"Source vidéo","Audio source":"Source audio","Video quality":"Qualité vidéo",Low:Gb,"Faster Upload":"Téléversement plus rapide",Standard:Yb,"Fast Upload":"Téléversement rapide",High:Qb,"Slow Upload":"Téléversement lent",Save:Zb,"Leave without saving changes?":"Quitter sans enregistrer les modifications?","Your updates will not be saved. This action can’t be undone.":"Vos mises à jour ne seront pas enregistrées. Cette action est irréversible.","Discard Changes":"Ignorer les modifications","Save Changes":"Enregistrer les modifications","Leave without saving the recording?":"Quitter sans enregistrer l'enregistrement?","Your recording will not be saved. This action can’t be undone.":"Votre enregistrement ne sera pas sauvegardé. Cette action est irréversible.",Continue:Kb,Leave:Xb,"Delete Current Video?":"Supprimer la vidéo actuelle?","Do you want to go back? The current video will be deleted.":"Voulez-vous revenir en arrière? La vidéo actuelle sera supprimée.","Yes, Delete Video":"Oui, supprimer la vidéo","No, Keep Video":"Non, conserver la vidéo","Yes, Keep Video":"Oui, conserver la vidéo","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Certaines des vidéos sont encore en cours de traitement. Veuillez attendre qu'elles soient terminées, puis procédez à la fusion.","Change recording option":"Changer l'option d'enregistrement","Start recording":" Démarrer l'enregistrement",Resume:Jb,Pause:ew,Finish:tw,"Loading camera":"Chargement de la caméra",Edit:ow,Teleprompter:rw,"Turn on":"Allumer","Turn Off Teleprompter":"Éteindre le téléprompteur","Set teleprompter speed":"Régler la vitesse du téléprompteur",Close:nw,Script:iw,Appearance:sw,Speed:aw,"Select script...":"Sélectionner un script...",Position:cw,"Text size":"Taille du texte",Small:lw,Medium:dw,Large:uw,"Type or paste your script here...":"Tapez ou collez votre script ici...","Save To My Scripts":"Enregistrer dans Mes Scripts",Top:pw,Bottom:hw,"Create a new script":"Créer un nouveau script","Select file":"Sélectionner un fichier","Cancel Teleprompter?":"Annuler le téléprompteur?","You will lose all changes for the Teleprompter.":"Vous perdrez toutes les modifications du téléprompteur.","Yes, cancel":"Oui, annuler","Back to editing":"Retour à la modification",Telepromter:gw,"Virtual Backgrounds":"Arrière-plans virtuels","Applying Virtual Background":"Application des arrière-plans virtuel","Select from a library of high-resolution images, or upload your own for extra personalization.":"Sélectionnez dans une bibliothèque d'images haute résolution, ou téléversez les vôtres pour une personnalisation supplémentaire.","Select your own":"Sélectionnez les vôtres","Select a virtual background":"Sélectionnez un arrière-plan virtuel",Done:mw,"Drag and drop files here to upload new file":"Glissez et déposez des fichiers ici pour téléverser un nouveau fichier","Drop files here":"Déposez les fichiers ici",All:xw,"No more files":"Plus de fichiers","No files found.":"Aucun fichier trouvé.","Select your virtual background":"Sélectionnez votre arrière-plan virtuel","Search files...":"Rechercher des fichiers...","Uploaded on (ASC)":"Téléversé le (ASC)","Uploaded on (DESC)":"Téléversé le (DESC)","Close video preview":"Fermer l'aperçu vidéo","Tag can not be empty.":"La balise ne peut pas être vide.","Tag cannot contain more than {{count}} characters":"L’étiquette ne peut pas contenir plus de {{count}} caractères.","Tag already exists.":"La balise existe déjà.","Manage Tags":"Gérer les balises","Add tag(s)...":"Ajouter une ou des balises...","Add Tags...":"Ajouter des balises...","Remove this video":"Supprimer cette vidéo","Select Folder":"Sélectionner un dossier","Video Title":"Titre de la vidéo","This field is required":"Ce champ est obligatoire","Title should not contain a dot (.)":"Le titre ne doit pas contenir de point (.).","Advisor ID is required":"L’identifiant du conseiller est obligatoire.","Repair Order Number is required.":"Le numéro de commande de réparation est obligatoire.","Preview recorded video":"Aperçu de la vidéo enregistrée",Discard:fw,"Save Recording":"Enregistrer l'enregistrement","Continue to Insert":"Continuer pour insérer","Video Attributes":"Attributs de la vidéo",required:vw,"Video Type":"Type de vidéo","Search vehicle":"Rechercher un véhicule","Search vehicle by name, VIN or stock number...":"Rechercher un véhicule par nom, VIN ou numéro de stock...",VIN:bw,"Stock number":"Numéro de stock","Assign To":"Assigner à","RO Number":"Numéro de RO","Customer Name":"Nom du client",Note:ww,"Waiting...":"En attente...",Encoding:yw,Encoded:Cw,Creating:Sw,Created:jw,Uploading:Ew,Uploaded:Tw,"Controls disabled before preview.":"Contrôles désactivés avant l'aperçu.","Start Over":"Recommencer","Start Over?":"Recommencer?","Your voiceover recording will be erased.":"Votre enregistrement de voix off sera effacé.","Go Back":"Retour","Save Video":"Enregistrer la vidéo","Duplicated video ready for voiceover":"Vidéo dupliquée prête pour la voix off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"La vidéo ne sera pas disponible dans la bibliothèque tant que vous ne l'aurez pas enregistrée. Une nouvelle voix off remplacera l'audio original de la vidéo dupliquée.","Name new video":"Nommer la nouvelle vidéo","Give your new video a name":"Donnez un nom à votre nouvelle vidéo","Wheels TV Import":"Importation Wheels TV","Oops! It looks like there are no videos matching your search terms.":"Oups! Il semble qu'il n'y ait pas de vidéos correspondant à vos termes de recherche.","Try using a different search terms":"Essayez d'utiliser des termes de recherche différents","Go to:":"Aller à:",Failed:kw,"Trimmed.":"Rogner.","Revert to Original":"Revenir à l'original","Playback Speed":"Vitesse de lecture",Title:Iw,Tags:Aw,"Search tags or create new...":"Rechercher des balises ou en créer de nouvelles...","Mark Video as ‘Sent’?":"Marquer la vidéo comme 'Envoyée'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, vous pouvez modifier les préférences de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, votre administrateur peut modifier les préférences de QuickShare.","Leave as ‘Not Sent’":"Laisser comme 'Non envoyé'","Mark as Sent":"Marquer comme envoyé","Something went wrong while trimming the video, try again later!":"Une erreur s'est produite lors du rognage de la vidéo, réessayez plus tard!","Download failed, please try again later.":"Le téléchargement a échoué, veuillez réessayer plus tard.","Video copied successfully.":"Vidéo copiée avec succès.","Copy failed, please try again later.":"La copie a échoué, veuillez réessayer plus tard.","Video marked as Sent":"Vidéo marquée comme envoyée","Inserting video...":" Insertion de la vidéo...","Link copied to clipboard!":"Lien copié dans le presse-papiers!","Script updated sucessfully.":"Script mis à jour avec succès.","Script saved as {{scriptTitleText}}.":"Script enregistré sous {{scriptTitleText}}.","Failed to start recording.":"Échec du démarrage de l'enregistrement.","Something went wrong, try again later!":"Une erreur s'est produite, réessayez plus tard!","Error while uploading file, please try again later.":"Erreur lors du téléversement du fichier, veuillez réessayer plus tard.","Successfully saved video!":"Vidéo enregistrée avec succès!","There was an error while creating your video request. Please try again.":"Une erreur s'est produite lors de la création de votre demande de vidéo. Veuillez réessayer.","Server is currently unavailable, try again later!":"Le serveur est actuellement indisponible, réessayez plus tard!","Creating voiceover failed, try again later!":"Échec de la création de la voix off, réessayez plus tard!","Voiceover successfully created!":"Voix off créée avec succès!","Please enable audio in your recording settings and try again!":"Veuillez activer l'audio dans vos paramètres d'enregistrement et réessayer!","Video has been added!":"La vidéo a été ajoutée!","An error occured while trying to add the video!":"Une erreur s'est produite lors de la tentative d'ajout de la vidéo!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Nous rencontrons actuellement des difficultés pour récupérer des arrière-plans virtuels personnalisés.","We're currently experiencing difficulties fetching Lesa videos.":"Nous rencontrons actuellement des difficultés pour récupérer les vidéos Lesa.","Video successfully created!":"Vidéo créée avec succès!","Failed to create video. Please try again later.":"Échec de la création de la vidéo. Veuillez réessayer plus tard.","Video title can not be more than 100 characters!":"Le titre de la vidéo ne peut pas contenir plus de 100 caractères!","{{name}} is of invalid type and won't be uploaded.":"{{name}} est d’un type non valide et ne sera pas téléversé.","Oops! Something went wrong, try again in a few moments.":"Oups! Une erreur s'est produite, réessayez dans quelques instants.","Failed to copy to clipboard":"Échec de la copie dans le presse-papiers","Transcription Started.":"Transcription commencée.",Marketing:$w,Prospecting:Rw,"Respond to Inquiry":"Répondre à la demande","Thanks For Your Business":"Merci pour votre entreprise","Additional Repair":"Réparations supplémentaire","Repair inquiry":"Demande de réparation","Regular service":"Service régulier","Service reminder":"Rappel de service","Quote request":"Demande de devis",Copy:Vw,"Trim Video":"Rogner la vidéo",Trim:Lw,"CRM Code Copied!":"Code CRM copié!","URL Copied!":"URL copiée!","Raw HTML Copied!":"HTML brut copié!","Landing Page":"Page de destination",Websites:Mw,CTAs:Dw,"Use Existing":"Utiliser existant","Add New":"Ajouter nouveau","No Websites":"Aucun site Web","No CTAs":"Aucun CTA","Enter website":"Entrer le site Web","No vehicles found, try entering a different name or VIN.":"Aucun véhicule trouvé, essayez d'entrer un nom ou un VIN différent.","Add Vehicle":"Ajouter un véhicule",Change:Ow,Remove:Nw,"To enable the integration with your Inventory Management System, please call us at":"Pour activer l'intégration avec votre système de gestion des stocks, veuillez nous appeler au","processing...":"traitement...","Login failed":"Échec de la connexion","External token invalid.":"Jeton externe invalide.",Username:Pw,Password:Fw,Login:zw,"Forgot password?":"Mot de passe oublié ?","Please upgrade you account to use eLead integration.":"Veuillez mettre à niveau votre compte pour utiliser l'intégration eLead.","No Audio":"Pas d'audio","No Video":"Pas de vidéo","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"Vous n'avez pas les autorisations nécessaires pour accéder à cette fonctionnalité. Veuillez vérifier les autorisations de votre navigateur.","Add More Videos":"Ajouter plus de vidéos","videos uploading":"vidéos en cours de téléversement","Video title is required!":"Le titre de la vidéo est obligatoire!","Uploading...":"Téléversement...","Encoding...":"Encodage...","VIN / search vehicle":"VIN / rechercher un véhicule","Select vehicle":"Sélectionner un véhicule","Select video type":"Sélectionner le type de vidéo","Log Out":"Déconnexion","Login to your account":"Connectez-vous à votre compte",of:Bw,"No settings":"Aucun paramètre","Title cannot be empty.":"Le titre ne peut pas être vide.","words / min":"mots / min","Please enter at least three characters to search":"Veuillez entrer au moins trois caractères pour la recherche","Select Landing Page":"Sélectionner la page de destination","We're currently experiencing difficulties fetching VINReels.":"Nous rencontrons actuellement des difficultés pour récupérer les VINReels.","VINReel has been added to Video library.":"Le VINReel a été ajouté à la bibliothèque vidéo.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Nous rencontrons actuellement des difficultés pour copier le VINReel dans la bibliothèque vidéo.","VINReels Import":"Importation VINReels",VINReels:_w,Lesa:Uw,"Wheels TV":"Wheels TV","Add to Covideo":"Ajouter à Covideo",Preview:Ww,"Enable video reactions & comments":"Activer les réactions et commentaires vidéo","Try using different search term":"Essayez d'utiliser un terme de recherche différent","All folders":"Tous les dossiers",Company:Hw,Primary:qw,Private:Gw,Vault:Yw,"Vehicle Walkarounds":"Présentations de véhicules","Appointment Reminders":"Rappels de rendez-vous",Introductions:Qw,"Post - Sale Thank You":"Remerciements après-vente","Video Replies":"Réponses vidéo","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Vous êtes actuellement connecté avec un compte utilisateur qui n'a aucune fonctionnalité active assignée dans l'intégration de Covideo.","Welcome back":"Bon retour","Enter username to continue":"Entrez le nom d'utilisateur pour continuer","Forgot username?":"Nom d'utilisateur oublié?","Log In":"Se connecter","Verifying SSO...":"Vérification SSO..."};ct.use(W.initReactI18next).init({resources:{en:{translation:vv},es:{translation:Mb},fr:{translation:Zw}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},react:{useSuspense:!1},saveMissing:!0,missingKeyHandler:function(e,o,r,i){console.warn("Missing translation key:",{lng:e,ns:o,key:r,fallbackValue:i})}});const Bs=n.div`
|
|
4371
|
+
`,t2=()=>{const{t:e}=H.useTranslation(),o=de.useHistory(),{flow:r}=Ce(),i=r===ft.RECORD_CAMERA_ONLY;return t.jsxs(e2,{children:[!i&&t.jsx(Ze,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>o.push("/"),style:{color:"white"}}),center:t.jsx(Kt,{children:e("Record Video")})}),t.jsx(V0,{children:t.jsx(Jf,{showHelpDesk:!0,showLegacyRecorderSwitch:!0,autoStartCam:i})})]})},o2=()=>t.jsx(de.Switch,{children:t.jsx(de.Route,{path:"/record/home",component:t2})}),r2="Add",n2="Upload",i2="Record",s2="Back",a2="Stock",c2="Model",l2="Make",d2="Year",u2="Cancel",p2="Insert",h2="Download",g2="Voiceover",m2="Low",x2="Standard",f2="High",v2="Save",b2="Continue",w2="Leave",y2="Resume",C2="Pause",S2="Finish",j2="Teleprompter",E2="Edit",T2="Close",k2="Script",I2="Appearance",A2="Speed",$2="Position",R2="Small",V2="Medium",L2="Large",M2="Top",D2="Bottom",O2="Teleprompter",N2="Done",P2="All",F2="Discard",z2="required",B2="VIN",_2="Note",U2="Encoding",W2="Encoded",H2="Creating",q2="Created",G2="Uploading",Y2="Uploaded",Q2="Failed",Z2="Title",K2="Tags",X2="Marketing",J2="Prospecting",ev="Copy",tv="Trim",ov="Websites",rv="CTAs",nv="Change",iv="Remove",sv="Username",av="Password",cv="Login",lv="of",dv="VINReels",uv="Lesa",pv="Preview",hv="Company",gv="Primary",mv="Private",xv="Vault",fv="Introductions",vv={Add:r2,Upload:n2,Record:i2,Back:s2,"Search...":"Search...","Search Videos...":"Search Videos...",Stock:a2,Model:c2,Make:l2,Year:d2,"Lesa TV Import":"Lesa TV Import","Merge Videos":"Merge Videos",Cancel:u2,"Select 2+ videos to merge":"Select 2+ videos to merge","Select maximum 9 videos":"Select maximum 9 videos",Insert:p2,"Copy Video":"Copy Video","Copy to Primary":"Copy to Primary",Download:h2,Voiceover:g2,"Loading...":"Loading...","No videos match your query":"No videos match your query","Upload new video":"Upload new video","Drag and drop your files here or":"Drag and drop your files here or","Browse files...":"Browse files...","Continue Upload":"Continue Upload","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?","Record Video":"Record Video","Choose recording option":"Choose recording option","Screen+Cam":"Screen+Cam","Screen Only":"Screen Only","Cam Only":"Cam Only","Recording settings":"Recording settings","Video source":"Video source","Audio source":"Audio source","Video quality":"Video quality",Low:m2,"Faster Upload":"Faster Upload",Standard:x2,"Fast Upload":"Fast Upload",High:f2,"Slow Upload":"Slow Upload",Save:v2,"Leave without saving changes?":"Leave without saving changes?","Your updates will not be saved. This action can’t be undone.":"Your updates will not be saved. This action can’t be undone.","Discard Changes":"Discard Changes","Save Changes":"Save Changes","Leave without saving the recording?":"Leave without saving the recording?","Your recording will not be saved. This action can’t be undone.":"Your recording will not be saved. This action can’t be undone.",Continue:b2,Leave:w2,"Delete Current Video?":"Delete Current Video?","Do you want to go back? The current video will be deleted.":"Do you want to go back? The current video will be deleted.","Yes, Delete Video":"Yes, Delete Video","No, Keep Video":"No, Keep Video","Yes, Keep Video":"Yes, Keep Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Some of the videos are still processing. Please wait until they are done, and then proceed with merging.","Change recording option":"Change recording option","Start recording":" Start recording",Resume:y2,Pause:C2,Finish:S2,"Loading camera":"Loading camera",Teleprompter:j2,"Turn on":"Turn on",Edit:E2,"Turn Off Teleprompter":"Turn Off Teleprompter","Set teleprompter speed":"Set teleprompter speed",Close:T2,Script:k2,Appearance:I2,Speed:A2,"Select script...":"Select script...",Position:$2,"Text size":"Text size",Small:R2,Medium:V2,Large:L2,"Type or paste your script here...":"Type or paste your script here...","Save To My Scripts":"Save To My Scripts",Top:M2,Bottom:D2,"Create a new script":"Create a new script","Select file":"Select file","Cancel Teleprompter?":"Cancel Teleprompter?","You will lose all changes for the Teleprompter.":"You will lose all changes for the Teleprompter.","Yes, cancel":"Yes, cancel","Back to editing":"Back to editing",Telepromter:O2,"Virtual Backgrounds":"Virtual Backgrounds","Applying Virtual Background":"Applying Virtual Background","Select from a library of high-resolution images, or upload your own for extra personalization.":" Select from a library of high-resolution images, or upload your own for extra personalization.","Select your own":"Select your own","Select a virtual background":"Select a virtual background",Done:N2,"Drag and drop files here to upload new file":"Drag and drop files here to upload new file","Drop files here":"Drop files here",All:P2,"No more files":"No more files","No files found.":"No files found.","Select your virtual background":"Select your virtual background","Search files...":"Search files...","Uploaded on (ASC)":"Uploaded on (ASC)","Uploaded on (DESC)":"Uploaded on (DESC)","Close video preview":"Close video preview","Tag can not be empty.":"Tag can not be empty.","Tag cannot contain more than {{count}} characters":"Tag cannot contain more than {{count}} characters","Tag already exists.":"Tag already exists.","Manage Tags":"Manage Tags","Add tag(s)...":"Add tag(s)...","Add Tags...":"Add Tags...","Remove this video":"Remove this video","Select Folder":"Select Folder","Video Title":"Video Title","This field is required":"This field is required","Title should not contain a dot (.)":"Title should not contain a dot (.)","Advisor ID is required":"Advisor ID is required","Repair Order Number is required.":"Repair Order Number is required.","Preview recorded video":"Preview recorded video",Discard:F2,"Save Recording":"Save Recording","Continue to Insert":"Continue to Insert","Video Attributes":"Video Attributes",required:z2,"Video Type":"Video Type","Search vehicle":"Search vehicle","Search vehicle by name, VIN or stock number...":"Search vehicle by name, VIN or stock number...",VIN:B2,"Stock number":"Stock number","Assign To":"Assign To","RO Number":"RO Number","Customer Name":"Customer Name",Note:_2,"Waiting...":"Waiting...",Encoding:U2,Encoded:W2,Creating:H2,Created:q2,Uploading:G2,Uploaded:Y2,"Controls disabled before preview.":"Controls disabled before preview.","Start Over":"Start Over","Start Over?":"Start Over?","Your voiceover recording will be erased.":"Your voiceover recording will be erased.","Go Back":"Go Back","Save Video":"Save Video","Duplicated video ready for voiceover":"Duplicated video ready for voiceover","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.","Name new video":"Name new video","Give your new video a name":"Give your new video a name","Wheels TV Import":"Wheels TV Import","Oops! It looks like there are no videos matching your search terms.":"Oops! It looks like there are no videos matching your search terms.","Try using a different search terms":"Try using a different search terms","Go to:":"Go to:",Failed:Q2,"Trimmed.":"Trimmed.","Revert to Original":"Revert to Original","Playback Speed":"Playback Speed",Title:Z2,Tags:K2,"Search tags or create new...":"Search tags or create new...","Mark Video as ‘Sent’?":"Mark Video as ‘Sent’?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.","Leave as ‘Not Sent’":"Leave as ‘Not Sent’","Mark as Sent":"Mark as Sent","Something went wrong while trimming the video, try again later!":"Something went wrong while trimming the video, try again later!","Download failed, please try again later.":"Download failed, please try again later.","Video copied successfully.":"Video copied successfully.","Copy failed, please try again later.":"Copy failed, please try again later.","Video marked as Sent":"Video marked as Sent","Inserting video...":"Inserting video...","Link copied to clipboard!":"Link copied to clipboard!","Script updated sucessfully.":"Script updated sucessfully.","Script saved as {{scriptTitleText}}.":"Script saved as {{scriptTitleText}}.","Failed to start recording.":"Failed to start recording.","Something went wrong, try again later!":"Something went wrong, try again later!","Error while uploading file, please try again later.":"Error while uploading file, please try again later.","Successfully saved video!":"Successfully saved video!","There was an error while creating your video request. Please try again.":"There was an error while creating your video request. Please try again.","Server is currently unavailable, try again later!":"Server is currently unavailable, try again later!","Creating voiceover failed, try again later!":"Creating voiceover failed, try again later!","Voiceover successfully created!":"Voiceover successfully created!","Please enable audio in your recording settings and try again!":"Please enable audio in your recording settings and try again!","Video has been added!":"Video has been added!","An error occured while trying to add the video!":"An error occured while trying to add the video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"We're currently experiencing difficulties fetching custom virtual backgrounds.","We're currently experiencing difficulties fetching Lesa videos.":"We're currently experiencing difficulties fetching Lesa videos.","Video successfully created!":"Video successfully created!","Failed to create video. Please try again later.":"Failed to create video. Please try again later.","Video title can not be more than 100 characters!":"Video title can not be more than 100 characters!","{{name}} is of invalid type and won't be uploaded.":"{{name}} is of invalid type and won't be uploaded.","Oops! Something went wrong, try again in a few moments.":"Oops! Something went wrong, try again in a few moments.","Failed to copy to clipboard":"Failed to copy to clipboard","Transcription Started.":"Transcription Started.",Marketing:X2,Prospecting:J2,"Respond to Inquiry":"Respond to Inquiry","Thanks For Your Business":"Thanks For Your Business","Additional Repair":"Additional Repair","Repair inquiry":"Repair inquiry","Regular service":"Regular service","Service reminder":"Service reminder","Quote request":"Quote request",Copy:ev,"Trim Video":"Trim Video",Trim:tv,"CRM Code Copied!":"CRM Code Copied!","URL Copied!":"URL Copied!","Raw HTML Copied!":"Raw HTML Copied!","Landing Page":"Landing Page",Websites:ov,CTAs:rv,"Use Existing":"Use Existing","Add New":"Add New","No Websites":"No Websites","No CTAs":"No CTAs","Enter website":"Enter website","No vehicles found, try entering a different name or VIN.":"No vehicles found, try entering a different name or VIN.","Add Vehicle":"Add Vehicle",Change:nv,Remove:iv,"To enable the integration with your Inventory Management System, please call us at":"To enable the integration with your Inventory Management System, please call us at","processing...":"processing...","Login failed":"Login failed","External token invalid.":"External token invalid.",Username:sv,Password:av,Login:cv,"Forgot password?":"Forgot password?","Please upgrade you account to use eLead integration.":"Please upgrade you account to use eLead integration.","No Audio":"No Audio","No Video":"No Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"You do not have the necessary permissions to access this feature. Please check your browser permissions.","Add More Videos":"Add More Videos","videos uploading":"videos uploading","Video title is required!":"Video title is required!","Uploading...":"Uploading...","Encoding...":"Encoding...","VIN / search vehicle":"VIN / search vehicle","Select vehicle":"Select vehicle","Select video type":"Select video type","Log Out":"Log Out","Login to your account":"Login to your account",of:lv,"No settings":"No settings","Title cannot be empty.":"Title cannot be empty.","words / min":"words / min","Please enter at least three characters to search":"Please enter at least three characters to search","Select Landing Page":"Select Landing Page","We're currently experiencing difficulties fetching VINReels.":"We're currently experiencing difficulties fetching VINReels.","VINReel has been added to Video library.":"VINReel has been added to Video library.","We're currently experiencing difficulties copying the VINReel to the Video library.":"We're currently experiencing difficulties copying the VINReel to the Video library.","VINReels Import":"VINReels Import",VINReels:dv,Lesa:uv,"Wheels TV":"Wheels TV","Add to Covideo":"Add to Covideo",Preview:pv,"Enable video reactions & comments":"Enable video reactions & comments","Try using different search term":"Try using different search term","All folders":"All folders",Company:hv,Primary:gv,Private:mv,Vault:xv,"Vehicle Walkarounds":"Vehicle Walkarounds","Appointment Reminders":"Appointment Reminders",Introductions:fv,"Post - Sale Thank You":"Post - Sale Thank You","Video Replies":"Video Replies","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.","Welcome back":"Welcome back","Enter username to continue":"Enter username to continue","Forgot username?":"Forgot username?","Log In":"Log In","Verifying SSO...":"Verifying SSO..."},bv="Añadir",wv="Subir",yv="Grabar",Cv="Atrás",Sv="Stock",jv="Modelo",Ev="Marca",Tv="Año",kv="Cancelar",Iv="Insertar",Av="Descargar",$v="Narración",Rv="Baja",Vv="Estándar",Lv="Alta",Mv="Guardar",Dv="Continuar",Ov="Salir",Nv="Reanudar",Pv="Pausa",Fv="Finalizar",zv="Editar",Bv="Teleprompter",_v="Cerrar",Uv="Guion",Wv="Apariencia",Hv="Velocidad",qv="Posición",Gv="Pequeño",Yv="Mediano",Qv="Grande",Zv="Arriba",Kv="Abajo",Xv="Teleprompter",Jv="Hecho",eb="Todos",tb="Descartar",ob="obligatorio",rb="VIN",nb="Nota",ib="Codificando",sb="Codificado",ab="Creando",cb="Creado",lb="Subiendo",db="Subido",ub="Fallido",pb="Título",hb="Etiquetas",gb="Marketing",mb="Prospección",xb="Copy",fb="Recortar",vb="Sitios Web",bb="CTAs",wb="Cambiar",yb="Eliminar",Cb="Nombre de usuario",Sb="Contraseña",jb="Iniciar sesión",Eb="de",Tb="VINReels",kb="Lesa",Ib="Vista Previa",Ab="Empresa",$b="Principal",Rb="Privado",Vb="Bóveda",Lb="Introducciones",Mb={Add:bv,Upload:wv,Record:yv,Back:Cv,"Search...":"Buscar...","Search Videos...":"Buscar videos...",Stock:Sv,Model:jv,Make:Ev,Year:Tv,"Lesa TV Import":"Importar Lesa TV","Merge Videos":"Combinar Videos",Cancel:kv,"Select 2+ videos to merge":"Selecciona 2 o más videos para combinar","Select maximum 9 videos":"Selecciona un máximo de 9 videos",Insert:Iv,"Copy Video":"Copiar Video","Copy to Primary":"Copiar a Primary",Download:Av,Voiceover:$v,"Loading...":"Cargando...","No videos match your query":"Ningún video coincide con tu búsqueda","Upload new video":"Subir nuevo video","Drag and drop your files here or":"Arrastra y suelta tus archivos aquí o","Browse files...":"Buscar archivos...","Continue Upload":"Continuar Subida","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Tendrás que reiniciar la subida de tu video desde el principio si cancelas ahora. Estás seguro de que quieres cancelar esta subida?","Record Video":"Grabar Video","Choose recording option":"Elige opción de grabación","Screen+Cam":"Pantalla+Cámara","Screen Only":"Solo Pantalla","Cam Only":"Solo Cámara","Recording settings":"Configuración de grabación","Video source":"Fuente de video","Audio source":"Fuente de audio","Video quality":"Calidad de video",Low:Rv,"Faster Upload":"Subida Más Rápida",Standard:Vv,"Fast Upload":"Subida Rápida",High:Lv,"Slow Upload":"Subida Lenta",Save:Mv,"Leave without saving changes?":"¿Salir sin guardar los cambios?","Your updates will not be saved. This action can’t be undone.":"Tus actualizaciones no se guardarán. Esta acción no se puede deshacer.","Discard Changes":"Descartar Cambios","Save Changes":"Guardar Cambios","Leave without saving the recording?":"¿Salir sin guardar la grabación?","Your recording will not be saved. This action can’t be undone.":"Tu grabación no se guardará. Esta acción no se puede deshacer.",Continue:Dv,Leave:Ov,"Delete Current Video?":"¿Eliminar el Video Actual?","Do you want to go back? The current video will be deleted.":"¿Quieres regresar? El video actual será eliminado.","Yes, Delete Video":"Sí, Eliminar Video","No, Keep Video":"No, Mantener Video","Yes, Keep Video":"Sí, Mantener Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Algunos de los videos aún están procesándose. Por favor espera hasta que terminen, y luego procede con la combinación.","Change recording option":"Cambiar opción de grabación","Start recording":" Iniciar grabación",Resume:Nv,Pause:Pv,Finish:Fv,"Loading camera":"Cargando cámara",Edit:zv,Teleprompter:Bv,"Turn on":"Encender","Turn Off Teleprompter":"Apagar Teleprompter","Set teleprompter speed":"Ajustar velocidad del teleprompter",Close:_v,Script:Uv,Appearance:Wv,Speed:Hv,"Select script...":"Seleccionar guion...",Position:qv,"Text size":"Tamaño del texto",Small:Gv,Medium:Yv,Large:Qv,"Type or paste your script here...":"Escribe o pega tu guion aquí...","Save To My Scripts":"Guardar en Mis Guiones",Top:Zv,Bottom:Kv,"Create a new script":"Crear un nuevo guion","Select file":"Seleccionar archivo","Cancel Teleprompter?":"¿Cancelar Teleprompter?","You will lose all changes for the Teleprompter.":"Perderás todos los cambios del Teleprompter.","Yes, cancel":"Sí, cancelar","Back to editing":"Volver a editar",Telepromter:Xv,"Virtual Backgrounds":"Fondos Virtuales","Applying Virtual Background":"Aplicando Fondos Virtuale","Select from a library of high-resolution images, or upload your own for extra personalization.":"Selecciona de una biblioteca de imágenes de alta resolución, o sube las tuyas para una personalización extra.","Select your own":"Selecciona las tuyas propias","Select a virtual background":"Selecciona un fondo virtual",Done:Jv,"Drag and drop files here to upload new file":"Arrastra y suelta archivos aquí para subir un nuevo archivo","Drop files here":"Suelta los archivos aquí",All:eb,"No more files":"No hay más archivos","No files found.":"No se encontraron archivos.","Select your virtual background":"Selecciona tu fondo virtual","Search files...":"Buscar archivos...","Uploaded on (ASC)":"Subido el (ASC)","Uploaded on (DESC)":"Subido el (DESC)","Close video preview":"Cerrar vista previa de video","Tag can not be empty.":"La etiqueta no puede estar vacía.","Tag cannot contain more than {{count}} characters":"La etiqueta no puede contener más de {{count}} caracteres.","Tag already exists.":"La etiqueta ya existe.","Manage Tags":"Gestionar Etiquetas","Add tag(s)...":"Añadir etiqueta(s)...","Add Tags...":"Añadir Etiquetas...","Remove this video":"Eliminar este video","Select Folder":"Seleccionar Carpeta","Video Title":"Título del Video","This field is required":"Este campo es obligatorio","Title should not contain a dot (.)":"El título no debe contener un punto (.).","Advisor ID is required":"El identificador del asesor es obligatorio.","Repair Order Number is required.":"El número de orden de reparación es obligatorio.","Preview recorded video":"Vista previa del video grabado",Discard:tb,"Save Recording":"Guardar Grabación","Continue to Insert":"Continuar para Insertar","Video Attributes":"Atributos del Video",required:ob,"Video Type":"Tipo de Video","Search vehicle":"Buscar vehículo","Search vehicle by name, VIN or stock number...":"Buscar vehículo por nombre, VIN o número de stock...",VIN:rb,"Stock number":"Número de stock","Assign To":"Asignar a","RO Number":"Número de RO","Customer Name":"Nombre del Cliente",Note:nb,"Waiting...":"Esperando...",Encoding:ib,Encoded:sb,Creating:ab,Created:cb,Uploading:lb,Uploaded:db,"Controls disabled before preview.":"Controles deshabilitados antes de la vista previa.","Start Over":"Empezar de Nuevo","Start Over?":"¿Empezar de Nuevo?","Your voiceover recording will be erased.":"Tu grabación de voz será borrada.","Go Back":"Regresar","Save Video":"Guardar Video","Duplicated video ready for voiceover":"Video duplicado listo para voz en off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"El video no estará disponible en la Biblioteca hasta que lo guardes. Una nueva voz en off reemplazará el audio original del video duplicado.","Name new video":"Nombrar nuevo video","Give your new video a name":"Dale un nombre a tu nuevo video","Wheels TV Import":"Importar Wheels TV","Oops! It looks like there are no videos matching your search terms.":"¡Vaya! Parece que no hay videos que coincidan con tus términos de búsqueda.","Try using a different search terms":"Intenta usar términos de búsqueda diferentes","Go to:":"Ir a:",Failed:ub,"Trimmed.":"Recortado.","Revert to Original":"Revertir a Original","Playback Speed":"Velocidad de Reproducción",Title:pb,Tags:hb,"Search tags or create new...":"Buscar etiquetas o crear nuevas...","Mark Video as ‘Sent’?":"¿Marcar Video como 'Enviado'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, puedes cambiar las preferencias de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, tu administrador puede cambiar las preferencias de QuickShare.","Leave as ‘Not Sent’":"Dejar como 'No Enviado'","Mark as Sent":"Marcar como Enviado","Something went wrong while trimming the video, try again later!":"¡Algo salió mal al recortar el video, intenta de nuevo más tarde!","Download failed, please try again later.":"La descarga falló, por favor intenta de nuevo más tarde.","Video copied successfully.":"Video copiado con éxito.","Copy failed, please try again later.":"Error al copiar, por favor intenta de nuevo más tarde.","Video marked as Sent":"Video marcado como Enviado","Inserting video...":"Insertando video...","Link copied to clipboard!":"¡Enlace copiado al portapapeles!","Script updated sucessfully.":"Guion actualizado con éxito.","Script saved as {{scriptTitleText}}.":"Guion guardado como {{scriptTitleText}}","Failed to start recording.":"Error al iniciar la grabación.","Something went wrong, try again later!":"¡Algo salió mal, intenta de nuevo más tarde!","Error while uploading file, please try again later.":"Error al subir el archivo, por favor intenta de nuevo más tarde.","Successfully saved video!":"¡Video guardado con éxito!","There was an error while creating your video request. Please try again.":"Hubo un error al crear tu solicitud de video. Por favor, intenta de nuevo.","Server is currently unavailable, try again later!":"¡El servidor no está disponible actualmente, intenta de nuevo más tarde!","Creating voiceover failed, try again later!":"¡Error al crear la voz en off, intenta de nuevo más tarde!","Voiceover successfully created!":"¡Voz en off creada con éxito!","Please enable audio in your recording settings and try again!":"¡Por favor, habilita el audio en la configuración de tu grabación e intenta de nuevo!","Video has been added!":"¡El video ha sido añadido!","An error occured while trying to add the video!":"¡Ocurrió un error al intentar añadir el video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Actualmente estamos experimentando dificultades para obtener fondos virtuales personalizados.","We're currently experiencing difficulties fetching Lesa videos.":"Actualmente estamos experimentando dificultades para obtener videos de Lesa.","Video successfully created!":"¡Video creado con éxito!","Failed to create video. Please try again later.":"No se pudo crear el video. Por favor, intenta de nuevo más tarde.","Video title can not be more than 100 characters!":"¡El título del video no puede tener más de 100 caracteres!","{{name}} is of invalid type and won't be uploaded.":"{{name}} tiene un tipo no válido y no se subirá.","Oops! Something went wrong, try again in a few moments.":"¡Vaya! Algo salió mal, intenta de nuevo en unos momentos.","Failed to copy to clipboard":"Error al copiar al portapapeles","Transcription Started.":"Transcripción Iniciada.",Marketing:gb,Prospecting:mb,"Respond to Inquiry":"Responder a Consulta","Thanks For Your Business":"Gracias por tu Negocio","Additional Repair":"Reparaciones Adicionale","Repair inquiry":"Consulta de Reparación","Regular service":"Servicio Regular","Service reminder":"Recordatorio de Servicio","Quote request":"Solicitud de Cotización",Copy:xb,"Trim Video":"Recortar Video",Trim:fb,"CRM Code Copied!":"¡Código CRM Copiado!","URL Copied!":"¡URL Copiado!","Raw HTML Copied!":"¡HTML en Bruto Copiado!","Landing Page":"Página de Aterrizaje",Websites:vb,CTAs:bb,"Use Existing":"Usar Existente","Add New":"Añadir Nuevo","No Websites":"No hay Sitios Web","No CTAs":"No hay CTAs","Enter website":"Introducir sitio web","No vehicles found, try entering a different name or VIN.":"No se encontraron vehículos, intenta ingresar un nombre o VIN diferente.","Add Vehicle":"Añadir Vehículo",Change:wb,Remove:yb,"To enable the integration with your Inventory Management System, please call us at":"Para habilitar la integración con tu Sistema de Gestión de Inventario, por favor llámanos al","processing...":"procesando...","Login failed":"Error de inicio de sesión","External token invalid.":"Token externo no válido.",Username:Cb,Password:Sb,Login:jb,"Forgot password?":"¿Olvidaste tu contraseña?","Please upgrade you account to use eLead integration.":"Por favor, actualiza tu cuenta para usar la integración eLead.","No Audio":"Sin Audio","No Video":"Sin Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"No tienes los permisos necesarios para acceder a esta función. Por favor, verifica los permisos de tu navegador.","Add More Videos":"Añadir Más Videos","videos uploading":"videos subiendo","Video title is required!":"¡El título del video es obligatorio!","Uploading...":"Subiendo...","Encoding...":"Codificando...","VIN / search vehicle":"VIN / buscar vehículo","Select vehicle":"Seleccionar vehículo","Select video type":"Seleccionar tipo de video","Log Out":"Cerrar sesión","Login to your account":"Iniciar sesión en tu cuenta",of:Eb,"No settings":"Sin configuraciones","Title cannot be empty.":"El título no puede estar vacío.","words / min":"palabras / min","Please enter at least three characters to search":"Por favor, ingresa al menos tres caracteres para buscar","Select Landing Page":"Seleccionar Página de Aterrizaje","We're currently experiencing difficulties fetching VINReels.":"Actualmente estamos experimentando dificultades para obtener VINReels.","VINReel has been added to Video library.":"VINReel ha sido añadido a la Biblioteca de Videos.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Actualmente estamos experimentando dificultades para copiar el VINReel a la Biblioteca de Videos.","VINReels Import":"Importar VINReels",VINReels:Tb,Lesa:kb,"Wheels TV":"Wheels TV","Add to Covideo":"Añadir a Covideo",Preview:Ib,"Enable video reactions & comments":"Habilitar reacciones y comentarios en el video","Try using different search term":"Intenta usar un término de búsqueda diferente","All folders":"Todas las carpetas",Company:Ab,Primary:$b,Private:Rb,Vault:Vb,"Vehicle Walkarounds":"Presentaciones de vehículos","Appointment Reminders":"Recordatorios de citas",Introductions:Lb,"Post - Sale Thank You":"Gracias postventa","Video Replies":"Respuestas en video","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Actualmente estás conectado con una cuenta de usuario que no tiene funcionalidades activas asignadas dentro de la integración de Covideo.","Welcome back":"Bienvenido de nuevo","Enter username to continue":"Ingresa tu nombre de usuario para continuar","Forgot username?":"¿Olvidaste tu nombre de usuario?","Log In":"Iniciar sesión","Verifying SSO...":"Verificando SSO..."},Db="Ajouter",Ob="Téléverser",Nb="Enregistrer",Pb="Retour",Fb="Stock",zb="Modèle",Bb="Marque",_b="Année",Ub="Annuler",Wb="Insérer",Hb="Télécharger",qb="Voix off",Gb="Faible",Yb="Standard",Qb="Élevée",Zb="Enregistrer",Kb="Continuer",Xb="Quitter",Jb="Reprendre",ew="Pause",tw="Terminer",ow="Modifier",rw="Téléprompteur",nw="Fermer",iw="Script",sw="Apparence",aw="Vitesse",cw="Position",lw="Petit",dw="Moyen",uw="Grand",pw="Haut",hw="Bas",gw="Téléprompteur",mw="Terminé",xw="Tout",fw="Ignorer",vw="obligatoire",bw="VIN",ww="Remarque",yw="Encodage",Cw="Encodé",Sw="Création",jw="Créé",Ew="Téléversement",Tw="Téléversé",kw="Échoué",Iw="Titre",Aw="Balises",$w="Marketing",Rw="Prospection",Vw="Copy",Lw="Rogner",Mw="Sites Web",Dw="CTA",Ow="Changer",Nw="Supprimer",Pw="Nom d’utilisateur",Fw="Mot de passe",zw="Connexion",Bw="de",_w="VINReels",Uw="Lesa",Ww="Aperçu",Hw="Entreprise",qw="Principal",Gw="Privé",Yw="Coffre",Qw="Présentations",Zw={Add:Db,Upload:Ob,Record:Nb,Back:Pb,"Search...":"Rechercher...","Search Videos...":"Rechercher des vidéos...",Stock:Fb,Model:zb,Make:Bb,Year:_b,"Lesa TV Import":"Importation Lesa TV","Merge Videos":"Fusionner les vidéos",Cancel:Ub,"Select 2+ videos to merge":"Sélectionnez 2 vidéos ou plus à fusionner","Select maximum 9 videos":"Sélectionnez un maximum de 9 vidéos",Insert:Wb,"Copy Video":"Copier la vidéo","Copy to Primary":"Copier vers Primary",Download:Hb,Voiceover:qb,"Loading...":"Chargement...","No videos match your query":"Aucune vidéo ne correspond à votre recherche","Upload new video":"Téléverser une nouvelle vidéo","Drag and drop your files here or":"Glissez et déposez vos fichiers ici ou","Browse files...":"Parcourir les fichiers...","Continue Upload":"Continuer le téléversement","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Vous devrez recommencer le téléversement de votre vidéo depuis le début si vous annulez maintenant. Êtes-vous sûr de vouloir annuler ce téléversement?","Record Video":"Enregistrer une vidéo","Choose recording option":"Choisir l'option d'enregistrement","Screen+Cam":"Écran+Caméra","Screen Only":"Écran uniquement","Cam Only":"Caméra uniquement","Recording settings":"Paramètres d'enregistrement","Video source":"Source vidéo","Audio source":"Source audio","Video quality":"Qualité vidéo",Low:Gb,"Faster Upload":"Téléversement plus rapide",Standard:Yb,"Fast Upload":"Téléversement rapide",High:Qb,"Slow Upload":"Téléversement lent",Save:Zb,"Leave without saving changes?":"Quitter sans enregistrer les modifications?","Your updates will not be saved. This action can’t be undone.":"Vos mises à jour ne seront pas enregistrées. Cette action est irréversible.","Discard Changes":"Ignorer les modifications","Save Changes":"Enregistrer les modifications","Leave without saving the recording?":"Quitter sans enregistrer l'enregistrement?","Your recording will not be saved. This action can’t be undone.":"Votre enregistrement ne sera pas sauvegardé. Cette action est irréversible.",Continue:Kb,Leave:Xb,"Delete Current Video?":"Supprimer la vidéo actuelle?","Do you want to go back? The current video will be deleted.":"Voulez-vous revenir en arrière? La vidéo actuelle sera supprimée.","Yes, Delete Video":"Oui, supprimer la vidéo","No, Keep Video":"Non, conserver la vidéo","Yes, Keep Video":"Oui, conserver la vidéo","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Certaines des vidéos sont encore en cours de traitement. Veuillez attendre qu'elles soient terminées, puis procédez à la fusion.","Change recording option":"Changer l'option d'enregistrement","Start recording":" Démarrer l'enregistrement",Resume:Jb,Pause:ew,Finish:tw,"Loading camera":"Chargement de la caméra",Edit:ow,Teleprompter:rw,"Turn on":"Allumer","Turn Off Teleprompter":"Éteindre le téléprompteur","Set teleprompter speed":"Régler la vitesse du téléprompteur",Close:nw,Script:iw,Appearance:sw,Speed:aw,"Select script...":"Sélectionner un script...",Position:cw,"Text size":"Taille du texte",Small:lw,Medium:dw,Large:uw,"Type or paste your script here...":"Tapez ou collez votre script ici...","Save To My Scripts":"Enregistrer dans Mes Scripts",Top:pw,Bottom:hw,"Create a new script":"Créer un nouveau script","Select file":"Sélectionner un fichier","Cancel Teleprompter?":"Annuler le téléprompteur?","You will lose all changes for the Teleprompter.":"Vous perdrez toutes les modifications du téléprompteur.","Yes, cancel":"Oui, annuler","Back to editing":"Retour à la modification",Telepromter:gw,"Virtual Backgrounds":"Arrière-plans virtuels","Applying Virtual Background":"Application des arrière-plans virtuel","Select from a library of high-resolution images, or upload your own for extra personalization.":"Sélectionnez dans une bibliothèque d'images haute résolution, ou téléversez les vôtres pour une personnalisation supplémentaire.","Select your own":"Sélectionnez les vôtres","Select a virtual background":"Sélectionnez un arrière-plan virtuel",Done:mw,"Drag and drop files here to upload new file":"Glissez et déposez des fichiers ici pour téléverser un nouveau fichier","Drop files here":"Déposez les fichiers ici",All:xw,"No more files":"Plus de fichiers","No files found.":"Aucun fichier trouvé.","Select your virtual background":"Sélectionnez votre arrière-plan virtuel","Search files...":"Rechercher des fichiers...","Uploaded on (ASC)":"Téléversé le (ASC)","Uploaded on (DESC)":"Téléversé le (DESC)","Close video preview":"Fermer l'aperçu vidéo","Tag can not be empty.":"La balise ne peut pas être vide.","Tag cannot contain more than {{count}} characters":"L’étiquette ne peut pas contenir plus de {{count}} caractères.","Tag already exists.":"La balise existe déjà.","Manage Tags":"Gérer les balises","Add tag(s)...":"Ajouter une ou des balises...","Add Tags...":"Ajouter des balises...","Remove this video":"Supprimer cette vidéo","Select Folder":"Sélectionner un dossier","Video Title":"Titre de la vidéo","This field is required":"Ce champ est obligatoire","Title should not contain a dot (.)":"Le titre ne doit pas contenir de point (.).","Advisor ID is required":"L’identifiant du conseiller est obligatoire.","Repair Order Number is required.":"Le numéro de commande de réparation est obligatoire.","Preview recorded video":"Aperçu de la vidéo enregistrée",Discard:fw,"Save Recording":"Enregistrer l'enregistrement","Continue to Insert":"Continuer pour insérer","Video Attributes":"Attributs de la vidéo",required:vw,"Video Type":"Type de vidéo","Search vehicle":"Rechercher un véhicule","Search vehicle by name, VIN or stock number...":"Rechercher un véhicule par nom, VIN ou numéro de stock...",VIN:bw,"Stock number":"Numéro de stock","Assign To":"Assigner à","RO Number":"Numéro de RO","Customer Name":"Nom du client",Note:ww,"Waiting...":"En attente...",Encoding:yw,Encoded:Cw,Creating:Sw,Created:jw,Uploading:Ew,Uploaded:Tw,"Controls disabled before preview.":"Contrôles désactivés avant l'aperçu.","Start Over":"Recommencer","Start Over?":"Recommencer?","Your voiceover recording will be erased.":"Votre enregistrement de voix off sera effacé.","Go Back":"Retour","Save Video":"Enregistrer la vidéo","Duplicated video ready for voiceover":"Vidéo dupliquée prête pour la voix off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"La vidéo ne sera pas disponible dans la bibliothèque tant que vous ne l'aurez pas enregistrée. Une nouvelle voix off remplacera l'audio original de la vidéo dupliquée.","Name new video":"Nommer la nouvelle vidéo","Give your new video a name":"Donnez un nom à votre nouvelle vidéo","Wheels TV Import":"Importation Wheels TV","Oops! It looks like there are no videos matching your search terms.":"Oups! Il semble qu'il n'y ait pas de vidéos correspondant à vos termes de recherche.","Try using a different search terms":"Essayez d'utiliser des termes de recherche différents","Go to:":"Aller à:",Failed:kw,"Trimmed.":"Rogner.","Revert to Original":"Revenir à l'original","Playback Speed":"Vitesse de lecture",Title:Iw,Tags:Aw,"Search tags or create new...":"Rechercher des balises ou en créer de nouvelles...","Mark Video as ‘Sent’?":"Marquer la vidéo comme 'Envoyée'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, vous pouvez modifier les préférences de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, votre administrateur peut modifier les préférences de QuickShare.","Leave as ‘Not Sent’":"Laisser comme 'Non envoyé'","Mark as Sent":"Marquer comme envoyé","Something went wrong while trimming the video, try again later!":"Une erreur s'est produite lors du rognage de la vidéo, réessayez plus tard!","Download failed, please try again later.":"Le téléchargement a échoué, veuillez réessayer plus tard.","Video copied successfully.":"Vidéo copiée avec succès.","Copy failed, please try again later.":"La copie a échoué, veuillez réessayer plus tard.","Video marked as Sent":"Vidéo marquée comme envoyée","Inserting video...":" Insertion de la vidéo...","Link copied to clipboard!":"Lien copié dans le presse-papiers!","Script updated sucessfully.":"Script mis à jour avec succès.","Script saved as {{scriptTitleText}}.":"Script enregistré sous {{scriptTitleText}}.","Failed to start recording.":"Échec du démarrage de l'enregistrement.","Something went wrong, try again later!":"Une erreur s'est produite, réessayez plus tard!","Error while uploading file, please try again later.":"Erreur lors du téléversement du fichier, veuillez réessayer plus tard.","Successfully saved video!":"Vidéo enregistrée avec succès!","There was an error while creating your video request. Please try again.":"Une erreur s'est produite lors de la création de votre demande de vidéo. Veuillez réessayer.","Server is currently unavailable, try again later!":"Le serveur est actuellement indisponible, réessayez plus tard!","Creating voiceover failed, try again later!":"Échec de la création de la voix off, réessayez plus tard!","Voiceover successfully created!":"Voix off créée avec succès!","Please enable audio in your recording settings and try again!":"Veuillez activer l'audio dans vos paramètres d'enregistrement et réessayer!","Video has been added!":"La vidéo a été ajoutée!","An error occured while trying to add the video!":"Une erreur s'est produite lors de la tentative d'ajout de la vidéo!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Nous rencontrons actuellement des difficultés pour récupérer des arrière-plans virtuels personnalisés.","We're currently experiencing difficulties fetching Lesa videos.":"Nous rencontrons actuellement des difficultés pour récupérer les vidéos Lesa.","Video successfully created!":"Vidéo créée avec succès!","Failed to create video. Please try again later.":"Échec de la création de la vidéo. Veuillez réessayer plus tard.","Video title can not be more than 100 characters!":"Le titre de la vidéo ne peut pas contenir plus de 100 caractères!","{{name}} is of invalid type and won't be uploaded.":"{{name}} est d’un type non valide et ne sera pas téléversé.","Oops! Something went wrong, try again in a few moments.":"Oups! Une erreur s'est produite, réessayez dans quelques instants.","Failed to copy to clipboard":"Échec de la copie dans le presse-papiers","Transcription Started.":"Transcription commencée.",Marketing:$w,Prospecting:Rw,"Respond to Inquiry":"Répondre à la demande","Thanks For Your Business":"Merci pour votre entreprise","Additional Repair":"Réparations supplémentaire","Repair inquiry":"Demande de réparation","Regular service":"Service régulier","Service reminder":"Rappel de service","Quote request":"Demande de devis",Copy:Vw,"Trim Video":"Rogner la vidéo",Trim:Lw,"CRM Code Copied!":"Code CRM copié!","URL Copied!":"URL copiée!","Raw HTML Copied!":"HTML brut copié!","Landing Page":"Page de destination",Websites:Mw,CTAs:Dw,"Use Existing":"Utiliser existant","Add New":"Ajouter nouveau","No Websites":"Aucun site Web","No CTAs":"Aucun CTA","Enter website":"Entrer le site Web","No vehicles found, try entering a different name or VIN.":"Aucun véhicule trouvé, essayez d'entrer un nom ou un VIN différent.","Add Vehicle":"Ajouter un véhicule",Change:Ow,Remove:Nw,"To enable the integration with your Inventory Management System, please call us at":"Pour activer l'intégration avec votre système de gestion des stocks, veuillez nous appeler au","processing...":"traitement...","Login failed":"Échec de la connexion","External token invalid.":"Jeton externe invalide.",Username:Pw,Password:Fw,Login:zw,"Forgot password?":"Mot de passe oublié ?","Please upgrade you account to use eLead integration.":"Veuillez mettre à niveau votre compte pour utiliser l'intégration eLead.","No Audio":"Pas d'audio","No Video":"Pas de vidéo","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"Vous n'avez pas les autorisations nécessaires pour accéder à cette fonctionnalité. Veuillez vérifier les autorisations de votre navigateur.","Add More Videos":"Ajouter plus de vidéos","videos uploading":"vidéos en cours de téléversement","Video title is required!":"Le titre de la vidéo est obligatoire!","Uploading...":"Téléversement...","Encoding...":"Encodage...","VIN / search vehicle":"VIN / rechercher un véhicule","Select vehicle":"Sélectionner un véhicule","Select video type":"Sélectionner le type de vidéo","Log Out":"Déconnexion","Login to your account":"Connectez-vous à votre compte",of:Bw,"No settings":"Aucun paramètre","Title cannot be empty.":"Le titre ne peut pas être vide.","words / min":"mots / min","Please enter at least three characters to search":"Veuillez entrer au moins trois caractères pour la recherche","Select Landing Page":"Sélectionner la page de destination","We're currently experiencing difficulties fetching VINReels.":"Nous rencontrons actuellement des difficultés pour récupérer les VINReels.","VINReel has been added to Video library.":"Le VINReel a été ajouté à la bibliothèque vidéo.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Nous rencontrons actuellement des difficultés pour copier le VINReel dans la bibliothèque vidéo.","VINReels Import":"Importation VINReels",VINReels:_w,Lesa:Uw,"Wheels TV":"Wheels TV","Add to Covideo":"Ajouter à Covideo",Preview:Ww,"Enable video reactions & comments":"Activer les réactions et commentaires vidéo","Try using different search term":"Essayez d'utiliser un terme de recherche différent","All folders":"Tous les dossiers",Company:Hw,Primary:qw,Private:Gw,Vault:Yw,"Vehicle Walkarounds":"Présentations de véhicules","Appointment Reminders":"Rappels de rendez-vous",Introductions:Qw,"Post - Sale Thank You":"Remerciements après-vente","Video Replies":"Réponses vidéo","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Vous êtes actuellement connecté avec un compte utilisateur qui n'a aucune fonctionnalité active assignée dans l'intégration de Covideo.","Welcome back":"Bon retour","Enter username to continue":"Entrez le nom d'utilisateur pour continuer","Forgot username?":"Nom d'utilisateur oublié?","Log In":"Se connecter","Verifying SSO...":"Vérification SSO..."};ct.use(H.initReactI18next).init({resources:{en:{translation:vv},es:{translation:Mb},fr:{translation:Zw}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},react:{useSuspense:!1},saveMissing:!0,missingKeyHandler:function(e,o,r,i){console.warn("Missing translation key:",{lng:e,ns:o,key:r,fallbackValue:i})}});const Bs=n.div`
|
|
4376
4372
|
display: flex;
|
|
4377
4373
|
box-sizing: border-box;
|
|
4378
4374
|
width: 1246px;
|
|
@@ -4465,7 +4461,7 @@
|
|
|
4465
4461
|
flex-direction: row;
|
|
4466
4462
|
justify-content: flex-start;
|
|
4467
4463
|
gap: 8px;
|
|
4468
|
-
${({theme:e})=>e.containerWidth<
|
|
4464
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
4469
4465
|
flex-direction: column;
|
|
4470
4466
|
width: 100%;
|
|
4471
4467
|
`}
|
|
@@ -4473,7 +4469,7 @@
|
|
|
4473
4469
|
background: ${E.white};
|
|
4474
4470
|
`;n.div`
|
|
4475
4471
|
width: 216px;
|
|
4476
|
-
${({theme:e})=>e.containerWidth<
|
|
4472
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
4477
4473
|
width: 100%;
|
|
4478
4474
|
`}
|
|
4479
4475
|
`;const d3=n.div`
|
|
@@ -4506,7 +4502,7 @@
|
|
|
4506
4502
|
gap: 8px;
|
|
4507
4503
|
justify-content: flex-end;
|
|
4508
4504
|
align-items: center;
|
|
4509
|
-
${({theme:e})=>e.containerWidth<
|
|
4505
|
+
${({theme:e})=>e.containerWidth<B.mb&&n.css`
|
|
4510
4506
|
width: 100%;
|
|
4511
4507
|
`}
|
|
4512
4508
|
`,g3=n.div`
|
|
@@ -4554,12 +4550,12 @@
|
|
|
4554
4550
|
min-width: 660px;
|
|
4555
4551
|
max-width: 800px;
|
|
4556
4552
|
|
|
4557
|
-
${({theme:e})=>e.containerWidth<=
|
|
4553
|
+
${({theme:e})=>e.containerWidth<=B.xs&&n.css`
|
|
4558
4554
|
width: calc(100vw - 30px);
|
|
4559
4555
|
min-width: unset;
|
|
4560
4556
|
max-width: unset;
|
|
4561
4557
|
`}
|
|
4562
|
-
`,w3=({handleModalClose:e,source:o})=>{const{t:r}=
|
|
4558
|
+
`,w3=({handleModalClose:e,source:o})=>{const{t:r}=H.useTranslation(),i=p.createRef();return t.jsx(Io,{maxHeight:"fit-content",onOutsideClick:e,children:t.jsxs(b3,{children:[t.jsx(v3,{title:r("Close video preview"),onClick:e,children:t.jsx(kt,{})}),t.jsx(f3,{children:t.jsx(It,{videoSource:o,videoRef:i,autoplay:!0,height:"405px",width:"100%"})})]})})};var Rt=(e=>(e.CREATED_AT="createdAt",e.YEAR="year",e.MAKE="make",e.MODEL="model",e))(Rt||{}),Ht=(e=>(e.DESCENDING="DESC",e.ASCENDING="ASC",e))(Ht||{});const y3=async e=>(await oe.get("/vinreels",{params:e})).data,C3=e=>{const{toast:o}=Te(),{t:r}=H.useTranslation();return we.useQuery(["VIN_REEL",e],()=>y3(e),{onError:i=>{o({message:r("We're currently experiencing difficulties fetching VINReels.")})}})},S3=async e=>(await oe.post("/vinreels/videos",e)).data,j3=({onSuccessCallback:e})=>{const{t:o}=H.useTranslation(),{toast:r}=Te();return we.useMutation(S3,{onSuccess:()=>{r({message:o("VINReel has been added to Video library.")}),e&&e()},onError:i=>{r({message:o("We're currently experiencing difficulties copying the VINReel to the Video library.")})}})},E3="data:image/webp;base64,UklGRmgHAABXRUJQVlA4IFwHAACQbwCdASqAAuABPp1Op020NzKiopHoALATiWlu4XJx+s/50+yuzN5LT07P+uvZVjy2gXYbLyiFcmJVtPJ99F7iDa3Mx9NfEQfTXxEH018RB9NfEXEW+GSWku6CKN0gKVzhot39pAUrnDRbt6EBSucNFu/tIClc4aLd/aQFJCIPpr4iD6a+Il2V86F8zMfTX02Vbtg8lWeZj6a+PEkbPFnmY+mviIPpsO8XYPMKlc4bOt2weYVPKf2l1BgbkGlK7hNpAOB3f2kBrKY98cqBJq6R6rF6f2rnDRKj3NmOWiu5CGO7+0gKVzhotgbSAwB6IkT3maV9pAUkxKrdsHmFSQiD6a/Vsx9NfEQfTXxEFiXleOFr2CRwqk5d2kBSucNFu/U8WeZj6a+BC/7IHIcFZ5lKWhbXls3wt2P1ipChg52BghCKhvxZ5q7+0gKVzhosoKBiFb6hayiOe2VDCepc9JLy2Znyq3jKcSKGOo9pASKGS7+0gKVzheq8aOFTyUYRDE4N8ZCOOx4SA1Z2dVAVzilc4aLd/aK6Vzhot39pAMiFF8JvTmFkag4TaoRQPuer+YcG8j3ETWEIHzmYC9COcNFu/XA5aK7kIpFZwCPHKzQmBoDZCv/2yCrYRH1uje1uLegBPQd3qatUn6uacwFmBVniOtSucNFsDaQFK5w0W6SFx3yTKKfhc2HofMjMi3v8ZTWYJmdCbPTrv7SApXOF5MhfVxJDu52eZtJOPbPM5SKan+R9TeWrnDRI+mviIPpgzcQAKV8QKQQ/Dcco4ItRxaxwtewKKlVA4t1KXf2kBSucNEj6a+Ig+mDETtzQTushu6rxWradFTRxaxwtewLUBR2rmY+mviIRzzCpXOGi3esJ4NNIVRKRH4dF49j5QUiIcKT9QQRlhZFJLv7SApJiU/GvyxLVzhotaNe0OmOVjheD9eYhV3KtDnizzMfTXxEH018RB9N/orLksPtDRbv7SApXOCEzHtIClc4aLd/aQFK5w0W7+0gKVzhlmT7CxSucMqfU18RB9NfEQfTXxEH018RB+UgqVzhot39pAUrnDRbv7CxSucNFu/tFdK5gWAvR9NfEQfTXxEH018RB9NfFi7br2pXOGi3f2kBI3JLv7SApXOGi2BtIClc4DfX9gIg+mviIPpr4iD6a+Ig+m/2z5Jd/aP1nmY+mviIPpr4iD6a+Ig+mvgQAAP79ZMH00mGs/Vy5cuXLly5TlDbQbaDbQbaDbQbkkg7i0JnaQCDhhvwXlXNzCTXNc2RLlzZERAhkyZMmTI9tVpIZdzLuZkidA0U9cuXLlym3GB8OdtCi3ijpckE2jH6CGQpdOGfIyAg5wQqgm2ow1Krg7JAtNBtoNs3Iaow2KSsQHeBG5VCQSA3KqltQHgnrLvnZqnC4ycua8HYi6CBPgXPJiYZr80n6zn2E1jT3Vjsbc1W25h6vhl+WX3xj5aaPagtEKviRRNvgcJlhZWS+kfDfT+vLqqroKOeI3CQbXlpntcQmuGdGObqLzkFR+SYQoT3DpY8xfw+7FNN5ujkAjo6OAvOIP/NXbVMN0PFvwHSkJ3Y8UrMwOShDOKqVhuIcYnJVdBTyMDkMGuG+hKTEa5cjkrC5AeALlTgMv6ZUjydfffodVvh1NNhNwmbiEmuVx6Goy/mqbhH2Aa7uNFU7dtBKmNkVscjSlDWBCxVdHEknWPmeLa9ZD5K/appsdDgBILJmyOnbdcNJHxJe7S41pGqcwy43+9nU42FHxA9RbMJ9jEoh/uSrypP24fRZNdgJuxxh8vLgw3hP8c6TfxK1SHQkcZgcBsdn+DKvxDDb18Yqbnz6/GRJL0BqFFKKcF94rzCjW6CSU4oob5Kz7CH5XM2uz2TvSWVWZVm95WjT/MQtrqt1YCDo7FJFVJqa2Li0zdyKnAl/nxEUhwAyqH9z5gtZg86+6A2c6JXc6hcWyuTA+PK3w+fPnzPTSDa69QEZAXGbwRtuYOauK07sgn3jwXpO8tG16S75KDF4qh4KVgYsBKRDac5y19hBTztscqp56cDxqpFCXehgWuH7AbxR05igWMmsfPUeQRPA3O7Wo/lT7PGICl85jwU7LEOuf1kNCWmrXqdnK4hcv2fA2vE3Lokvq70Ta1YmI7lbnQeGf51YGxDon3oUagmcYMbkEefKizZWzGKh1187Ao7GNLxcywGkTvx3qPUXvkGRi5Irau39fMQcHay/ILTpdFwVKKeOOQMkvpA3ouEL2FQSCeeWl2phPl3H+pm4JqazzdT5TPvnWGie+wruyd4ORbf4AYMmAcV/j9lTVeVllfYL7poL1U78rvDqlWPnOLrd2CJSePegCVlIHELGc9drkze+9jSc9vtxSwYBiiVJVPdD7JxjzQPsp8/63yfQT6ENMXv+zo43gEWXX14820PPZvcIRt8nR5KUNg0BhMgfav5jVTnkZVc80m3ehSwL1JDdYEW62qi7JqkDYzKccAAA01AAh6/2AAAAHvvrf42kAAAXWDhqAAAAAAAAAAA=",T3={imagePlaceholder:E3},k3=e=>e.filter(Boolean).join(" "),xr=e=>{const{isSorted:o,order:r,onChange:i}=e;return t.jsxs(g3,{cursor:"pointer",children:[t.jsx(be.IoMdArrowRoundUp,{className:o&&r===Ht.ASCENDING?"active":"",onClick:()=>i(Ht.ASCENDING)}),t.jsx(be.IoMdArrowRoundDown,{className:o&&r===Ht.DESCENDING?"active":"",onClick:()=>i(Ht.DESCENDING)})]})},fr=1,wo=8,I3=1,A3=()=>{var P;const{containerWidth:e}=Ce(),o=de.useHistory(),[r,i]=p.useState(""),[s,c]=p.useState(fr),{t:a}=H.useTranslation(),[d,l]=p.useState(""),[u,g]=p.useState(Ht.ASCENDING),[h,x]=p.useState(null),m=()=>{o.push("/")},{data:f,isFetching:w,refetch:b}=C3({start:((s||1)-1)*wo,limit:wo,search:r,...h&&u?{sortKey:h,order:u}:{}}),{mutateAsync:y,isLoading:S}=j3({onSuccessCallback:m}),T=w||S,$=((f==null?void 0:f.data)||[]).find(M=>M.vin===d),k=()=>{c(1)},L=r.length>0&&r.length<3;p.useEffect(()=>{L||b()},[r]);const v=(M,N)=>{g(N),x(M),c(fr)},j=async M=>{const N=M==null?void 0:M.inventoryItem;if(!N)return;const D=k3([N==null?void 0:N.year.toString(),N.make,N.model,N.stockNumber]);await y({itemId:M.itemId,videoTitle:D})},R=M=>{M==="left"&&c(N=>N-1),M==="right"&&c(N=>N+1)},V=Math.ceil(((f==null?void 0:f.count)||0)/wo),C=()=>o.push("/"),A=async(M="")=>{i(M),k()};return t.jsxs(t.Fragment,{children:[t.jsxs(s3,{children:[t.jsx(Ze,{left:t.jsx(F.Button,{text:a("Back"),icon:t.jsx(Q.MdArrowBack,{size:"18"}),onClick:()=>C(),variant:"transparent",style:{color:"white"}}),center:t.jsx(a3,{children:a("VINReels Import")})}),t.jsx(dt,{children:t.jsx(c3,{children:t.jsx(Ts,{handleSearch:A,prevSearch:r})})})]}),t.jsx(l3,{children:t.jsx(dt,{extendStyle:{wrapper:{padding:e>=B.xs?"32px 16px":"16px 0px"}},children:T?t.jsx(x3,{children:t.jsx(ze,{isLoading:T})}):L?t.jsx(Si,{children:t.jsx("p",{children:a("Please enter at least three characters to search")})}):f!=null&&f.data.length?t.jsxs(t.Fragment,{children:[t.jsxs(m3,{children:[e>=B.xs&&t.jsx(i3,{children:a("Preview")}),e>=B.xs&&t.jsxs(e3,{children:[a("Year"),t.jsx(xr,{isSorted:h===Rt.YEAR,order:u,onChange:M=>v(Rt.YEAR,M)})]}),t.jsxs(o3,{children:[a("Make"),t.jsx(xr,{isSorted:h===Rt.MAKE,order:u,onChange:M=>v(Rt.MAKE,M)})]}),t.jsxs(n3,{children:[a("Model"),t.jsx(xr,{isSorted:h===Rt.MODEL,order:u,onChange:M=>v(Rt.MODEL,M)})]})]}),t.jsx(Kw,{children:(P=(f==null?void 0:f.data)||[])==null?void 0:P.map(M=>{var N,D,O;return t.jsxs(Xw,{children:[e>=B.xs&&t.jsx("div",{style:{width:"130px",height:"40px"},children:t.jsx(Ki,{onClick:()=>l(M.vin),thumbnail:M.thumbnailUrl||T3.imagePlaceholder,videoId:M.vin,processing:0})}),e>=B.xs&&t.jsx(Jw,{children:((N=M==null?void 0:M.inventoryItem)==null?void 0:N.year)||""}),t.jsx(t3,{children:((D=M==null?void 0:M.inventoryItem)==null?void 0:D.make)||""}),t.jsx(r3,{children:((O=M==null?void 0:M.inventoryItem)==null?void 0:O.model)||""}),t.jsx(je,{flexWrap:"noWrap",gap:"10px",children:t.jsx(F.Button,{variant:"secondary",text:a("Add"),onClick:()=>j(M)})})]},M.vin)})}),t.jsx(d3,{children:t.jsxs(h3,{children:[t.jsx(u3,{children:a("Go to:")}),t.jsx(p3,{type:"number",min:I3,value:s,onChange:M=>{if(!M.currentTarget||!M.currentTarget.value)return;const N=parseInt(M.currentTarget.value);if(N<=0){k();return}if(N>V){c(V);return}c(N)}}),t.jsx(ks,{page:s-1,size:wo,count:(f==null?void 0:f.count)||0}),t.jsx(F.Button,{onClick:()=>R("left"),icon:t.jsx(Q.MdChevronLeft,{size:20}),disabled:s===fr,size:"small",variant:"secondary"}),t.jsx(F.Button,{onClick:()=>R("right"),icon:t.jsx(Q.MdChevronRight,{size:20}),disabled:s===V,size:"small",variant:"secondary"})]})}),!!d&&!!$&&!!($!=null&&$.videoUrl)&&t.jsx(w3,{source:($==null?void 0:$.videoUrl)||"",handleModalClose:()=>{l("")}})]}):t.jsxs(Si,{children:[t.jsx("p",{children:a("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:a("Try using different search term")})]})})})]})};var Hs=(e=>(e.USER="1",e.ADMIN="3",e.SUPERVISOR="4",e))(Hs||{});const $3=n.div`
|
|
4563
4559
|
background: ${E.gray10};
|
|
4564
4560
|
`,R3=n.div`
|
|
4565
4561
|
position: absolute;
|
|
@@ -4574,7 +4570,7 @@
|
|
|
4574
4570
|
color: ${E.gray80};
|
|
4575
4571
|
`,V3=n.div`
|
|
4576
4572
|
max-width: 65%;
|
|
4577
|
-
`,ji=({handleUpdateToken:e})=>{const{t:o}=
|
|
4573
|
+
`,ji=({handleUpdateToken:e})=>{const{t:o}=H.useTranslation();return t.jsxs($3,{children:[t.jsx(Ze,{left:t.jsx(ns,{handleUpdateToken:e}),center:t.jsx(yo,{})}),t.jsx(R3,{children:t.jsx(V3,{children:o("You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.")})})]})},Ei=()=>{const{videoId:e}=de.useParams(),o=p.useRef(null),{shouldTrackAnalytics:r}=Ce(),{data:i,isLoading:s}=za(e||"",!!r),{data:c,isLoading:a}=Ss(e||"");return a||s?t.jsx(ze,{isLoading:!0}):c!=null&&c.videoSource?t.jsx(It,{videoRef:o,videoSource:c.videoSource,shortUrl:i==null?void 0:i.shortUrl,viewerStatisticId:i==null?void 0:i.viewerStatisticId}):t.jsx("div",{children:"Unable to load video preview."})},vr={id:"",verified:0,access:0,customerId:0,customer:{automotiveAccess:0}},L3=()=>{const e=de.useHistory(),{flow:o,previewVideoId:r}=Ce();return p.useEffect(()=>{o===ft.PREVIEW_VIDEO&&r&&e.push(`/preview/${r}`)},[o,r,e]),null};function M3(){const{flow:e,hasExternalJwt:o,previewVideoId:r}=Ce(),[i,s]=p.useState(!0),[c,a]=p.useState(vr),[d,l]=p.useState(""),u=p.useMemo(()=>String(c.access)===Hs.SUPERVISOR,[c.access]),g=async()=>{var y,S;if(!_e){a(vr),l(""),s(!1);return}s(!0);try{const T=await ma();a(T),l("")}catch(T){a(vr),l(((S=(y=T==null?void 0:T.response)==null?void 0:y.data)==null?void 0:S.message)||"Invalid token. Please provide a valid token to use recorder-only mode.")}s(!1)},h=async y=>{Eo(y),await g()};p.useEffect(()=>{g()},[]);const x=!!(c!=null&&c.id),m=e===ft.RECORD_CAMERA_ONLY,f=e===ft.PREVIEW_VIDEO,b=f?r?`/preview/${r}`:"/":m?"/record/home":"/";return m&&!o?t.jsx(po,{children:t.jsx("div",{children:"Please provide a token to use recorder-only mode."})}):m&&o&&!i&&!x?t.jsx(po,{children:t.jsx("div",{children:d||"Invalid token. Please provide a valid token to use recorder-only mode."})}):i?t.jsx(po,{children:t.jsx(ze,{height:400,isLoading:!0,hideLoaderText:!0})}):t.jsx(lc,{initialUser:c,children:t.jsx(Rd,{children:t.jsx(Ic,{children:t.jsx(po,{children:t.jsxs(de.MemoryRouter,{initialEntries:[b],children:[t.jsx(L3,{}),x&&!u&&(f?t.jsxs(de.Switch,{children:[t.jsx(de.Route,{exact:!0,path:"/preview/:videoId",component:Ei}),t.jsx(de.Route,{path:"*",render:()=>r?t.jsx(de.Redirect,{to:`/preview/${r}`}):t.jsx("div",{children:"Please provide previewVideoId for preview flow."})})]}):t.jsxs(de.Switch,{children:[t.jsx(de.Route,{path:"/merge",component:Gg,exact:!0}),t.jsx(de.Route,{path:"/voiceover/:videoId",component:y1,exact:!0}),t.jsx(de.Route,{path:"/insert-video/:videoId",component:gh,exact:!0}),t.jsx(de.Route,{path:"/wheels-tv",component:W1}),t.jsx(de.Route,{path:"/lesa-tv",component:g1}),t.jsx(de.Route,{path:"/vinreels",component:A3}),t.jsx(de.Route,{exact:!0,path:"/preview-upload/:videoId",component:E0}),t.jsx(de.Route,{exact:!0,path:"/preview/:videoId",component:Ei}),t.jsx(de.Route,{exact:!0,path:"/",render:()=>m?t.jsx(de.Redirect,{to:"/record/home"}):t.jsx(Nu,{handleUpdateToken:h})}),t.jsx(de.Route,{path:"/record",component:o2})]})),u&&t.jsxs(de.Switch,{children:[t.jsx(de.Route,{exact:!0,path:"/",render:()=>t.jsx(ji,{handleUpdateToken:h})}),t.jsx(de.Route,{path:"*",render:()=>t.jsx(ji,{handleUpdateToken:h})})]}),!x&&!m&&!f&&t.jsxs(de.Switch,{children:[t.jsx(de.Route,{exact:!0,path:"/",render:()=>t.jsx(Ln,{handleUpdateToken:h})}),t.jsx(de.Route,{path:"*",render:()=>t.jsx(Ln,{handleUpdateToken:h})})]})]})})})})})}function D3({gtmId:e}){const[o,r]=p.useState(!0);return p.useEffect(()=>{if(typeof window>"u"||!e||document.getElementById("gtm-script"))return r(!1);const i=document.createElement("script");i.id="gtm-script",i.innerHTML=`
|
|
4578
4574
|
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
4579
4575
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
4580
4576
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
@@ -4583,5 +4579,5 @@
|
|
|
4583
4579
|
`,document.head.appendChild(i);const s=document.createElement("noscript");s.id="gtm-noscript",s.innerHTML=`
|
|
4584
4580
|
<iframe src="https://www.googletagmanager.com/ns.html?id=${e}"
|
|
4585
4581
|
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
|
4586
|
-
`,document.body.appendChild(s),r(!1)},[e]),{isLoadingScript:o}}const O3=new we.QueryClient({defaultOptions:{queries:{retry:0},mutations:{retry:0}}});var cn=(e=>(e.UPLOAD="upload",e.FOLDER="folder",e.RECORD_SCREEN="recordScreen",e.MERGE="merge",e.RECORD_CAM="recordCam",e.WHEELS_TV="wheelsTV",e.RECORD_BOTH="recordBoth",e.TRIM="trim",e.INSERT="insert",e.LANDING_PAGE="landingPage",e.QUICKSHARE="quickshare",e.CTA="CTA",e.VOICEOVER="voiceover",e.REACTIONS="reactions",e.AI_ASSIST="aiAssist",e.UPGRADE_MESSAGE="upgradeMessage",e.LESA_TV="lesaTV",e.MULTI_LOCATION="multiLocation",e.TELEPROMPTER="teleprompter",e.VIRTUAL_BG="virtualBg",e.WEBSITE_OVERLAY="websiteOverlay",e.LANGUAGE_DROPDOWN="languageDropdown",e.SSO="sso",e.VIN_REELS="vinReels",e))(cn||{}),qs=(e=>(e.DEVELOPMENT="development",e.SANDBOX="sandbox",e.STAGING="staging",e.PRODUCTION="production",e))(qs||{}),ft=(e=>(e.FULL="full",e.RECORD_CAMERA_ONLY="recordCameraOnly",e.PREVIEW_VIDEO="previewVideo",e))(ft||{});function N3(){Eo(""),Ni()}const P3=e=>{const[o,r]=p.useState(0),i=()=>r(c=>c+1);if(!(e!=null&&e.apikey))return t.jsx(t.Fragment,{children:"Apikey is required."});const{isLoadingScript:s}=D3({gtmId:e.gtmId});return s?t.jsx("div",{style:{fontFamily:"Arial, sans-serif"},children:t.jsx(
|
|
4582
|
+
`,document.body.appendChild(s),r(!1)},[e]),{isLoadingScript:o}}const O3=new we.QueryClient({defaultOptions:{queries:{retry:0},mutations:{retry:0}}});var cn=(e=>(e.UPLOAD="upload",e.FOLDER="folder",e.RECORD_SCREEN="recordScreen",e.MERGE="merge",e.RECORD_CAM="recordCam",e.WHEELS_TV="wheelsTV",e.RECORD_BOTH="recordBoth",e.TRIM="trim",e.INSERT="insert",e.LANDING_PAGE="landingPage",e.QUICKSHARE="quickshare",e.CTA="CTA",e.VOICEOVER="voiceover",e.REACTIONS="reactions",e.AI_ASSIST="aiAssist",e.UPGRADE_MESSAGE="upgradeMessage",e.LESA_TV="lesaTV",e.MULTI_LOCATION="multiLocation",e.TELEPROMPTER="teleprompter",e.VIRTUAL_BG="virtualBg",e.WEBSITE_OVERLAY="websiteOverlay",e.LANGUAGE_DROPDOWN="languageDropdown",e.SSO="sso",e.VIN_REELS="vinReels",e))(cn||{}),qs=(e=>(e.DEVELOPMENT="development",e.SANDBOX="sandbox",e.STAGING="staging",e.PRODUCTION="production",e))(qs||{}),ft=(e=>(e.FULL="full",e.RECORD_CAMERA_ONLY="recordCameraOnly",e.PREVIEW_VIDEO="previewVideo",e))(ft||{});function N3(){Eo(""),Ni()}const P3=e=>{const[o,r]=p.useState(0),i=()=>r(c=>c+1);if(!(e!=null&&e.apikey))return t.jsx(t.Fragment,{children:"Apikey is required."});const{isLoadingScript:s}=D3({gtmId:e.gtmId});return s?t.jsx("div",{style:{fontFamily:"Arial, sans-serif"},children:t.jsx(ze,{isLoading:!0})}):t.jsx(we.QueryClientProvider,{client:O3,children:t.jsx(ga,{...e,reRender:i,children:t.jsx(M3,{},`${e==null?void 0:e.env}${e==null?void 0:e.token}${e==null?void 0:e.apikey}${o}`)})})};exports.CovideoEmbed=P3;exports.Environment=qs;exports.Feature=cn;exports.Flow=ft;exports.logoutCovideo=N3;
|
|
4587
4583
|
//# sourceMappingURL=index.js.map
|