@hippovideo/video-sdk 0.0.11 → 0.0.12
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/app/hv_recorder.js +2 -2
- package/app/hv_recorder.js.gz +0 -0
- package/package.json +1 -1
package/app/hv_recorder.js
CHANGED
|
@@ -161,7 +161,7 @@ t.matchMedia||(t.matchMedia=function(){var e=t.styleMedia||t.media;if(!e){var n,
|
|
|
161
161
|
/*!*****************************!*\
|
|
162
162
|
!*** ./src/utils/logger.js ***!
|
|
163
163
|
\*****************************/
|
|
164
|
-
/*! exports provided: enableLogs, logger */function(e,t,i){"use strict";i.r(t),i.d(t,"enableLogs",(function(){return c})),i.d(t,"logger",(function(){return d}));var n=i(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function r(){}var o={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=o;function s(e,t){return t="["+e+"] > "+t}var l=Object(n.getSelfScope)();function u(e){var t=l.console[e];return t?function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n[0]&&(n[0]=s(e,n[0])),t.apply(l.console,n)}:r}var c=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];i.forEach((function(t){a[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{a.log()}catch(e){a=o}}else a=o},d=a}}).default},e.exports=n())},function(e,t,i){"use strict";i(56),i(24),i(71),i(84),i(239),i(183);var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(4),u=i.n(l),c=i(3).c.video(n||(n=u()(["\n width: 100%;\n border-radius: 15px;\n"]))),d=Object(a.forwardRef)(function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.stream,n=arguments.length>1?arguments[1]:void 0;return o()(this,void 0),Object(a.useEffect)(function(){var t=this;o()(this,e),(i||n)&&("srcObject"in n.current?n.current.srcObject=i:n.current.src=window.URL.createObjectURL(i),n.current.onloadedmetadata=function(){o()(this,t),n.current.play()}.bind(this))}.bind(this),[i,n]),s.a.createElement(c,{ref:n,autoplay:!0,muted:!0})}.bind(void 0));t.a=d},function(e,t,i){"use strict";var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(4),u=i.n(l),c=i(3).c.canvas(n||(n=u()(["\n position: absolute;\n opacity: 0;\n left: 0;\n"]))),d=Object(a.forwardRef)(function(e,t){return o()(this,void 0),console.log("REFERENCE LIGHTING ",t),s.a.createElement(c,{ref:t})}.bind(void 0));t.a=d},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={__root:{subscription:{free:"FREE",plus:"plus",zeroDollar:"0",calf:"CALF",userPerYear:" / user / year",perYear:"Year",noOfUsers:"No. of Users",oneUserOnly:"1 user only",webCameRecoed:"Webcam record",audioRecord:"Audio record",screenCapture:"Screen record",uploadToYoutubeAndGclassroom:"Upload to Youtube & Google Classroom",recordUptoForFree:"Record up to 30 min/video",freeRecordingsBymonth:"5 recordings",hippoLogo:"Hippo branding",fourEightyResolution:"480 Resolution",freeResolution:"720 Resolution",downgrade:"DOWNGRADE",allOfFree:"All of FREE Plan",simpleEdintingOptions:"Crop and Trim",unlimittedRecordings:"Unlimited videos of 5 mins length",unlimittedLengthOfRecording:"Unlimited length of recording",recordingUpToTwoHours:"Record up to 2 hr/video",noHippoLogo:"No Hippo branding",calfResolution:"480p & 720p Resolution",upgrade:"Upgrade",businessPlan:"Business Edition",educationPlan:"Education Edition",currentPlan:"CURRENT PLAN",managePlan:"Manage Plan",chooseYourPlan:"Choose Plan",checkout:"Checkout",cancel:"CANCEL",currentPlanInfo:"You are currently subscribed to ",subscriptionPlan:"Subscription Plan",pod:"POD",hippo:"HIPPO",youPay:"You Pay",year:"year",yourSubscription:"Your subscription to ",isSuccessful:" is successful.",nextRenewalIs:"Your next renewal is on: ",zeroSetuoFee:"Zero setup fee",supportWorldWide:"24x5 LIVE support worldwide",currentNoOfUsers:"Current users",usersRequired:"Update users",month:"month",thisWill:"This will ",yourPlanTo:" your plan to ",doYouWant:". Do you want to continue?",userPerMonth:" / user / month",perMonth:"Month",allOfCalf:"All of CALF",integrations:"Helpdesk integrations*",integration:"Integrations",optionToshare:"Share URL",optionToEmbed:"Embed",optionToEmail:"Email",hostingOfVideos:"Video hosting",tracking:"Tracking & Analytics*",hippoResolution:"1080p Resolution*",hippoStorage:"100GB of Streaming & Viewing",users:"Users",upgradeTo:"Select the number of users you want and upgrade to - ",plan:"Plan",monthly:"Monthly",yearly:"Yearly",availDiscount:"Avail 20% discount on yearly subscription",monthlyBilling:"Monthly billing not available for 5 users and below",calff:"calf",calfEducational:"calf educational",hippoo:"hippo",months:"months",bulkPricingContact:"For bulk pricing contact",couponCode:"Apply Discount code",enterCouponCode:"Enter discount code",apply:"Apply",discountMsg:"20% discount will be applied for yearly billing on checkout",noteMonthlyBilling:"Note - Monthly billing not available for 5 users and below",trialMsg:"You are currently in Trial version. Your trial will expire on:",yourRenewal:"Your next renewal for ",isOn:"plan is on: ",planInfo:"User can create/edit videos. No restriction on no. of views",customizeEndCardBranding:"Customize end card",additionalStreaming:"Additional 100 GB Bandwidth at $10/month",allOfPro:"All of PRO Plan",allOfPremium:"All of PREMIUM Plan",allOfUnlimited:"All of UNLIMITED Plan",csmTeamStorage:"250GB of Streaming & Viewing",userManagement:"User Management",videoTickets:"Video ticketing*",videoAssignments:"Video Assignments",supportAgentsLogin:"3 Support Agents Login",adminLogin:"1 Admin Login",downloadOptions:"Download Your Videos",freelancerRecordings:"10 recordings",restrictionViewingStreaming:"100GB Bandwidth",highResolution:"1080p Resolution*",freelancerAdditionalVideos:"Additional Videos 10 Videos at 5USD",freelancer:"Freelancer",studentsLogin:"25 Students",additionalStudents:"Every 25 additional students at $10/year",educator:"Educator",individualTeacher:"Individual Teacher",student:"Student",recommended:"RECOMMENDED",exportOptions:"Export to Youtube, Vimeo, GDrive & Google Classroom",exportOptionsTwo:"Export to Youtube, GDrive & Google Classroom",newDiscountMsg:"20% discount has been applied",pro:"PRO",team:"team",premium:"Premium",starterNotAvailable:"Starter Plan not available for Monthly and Quarterly in Sales",unlimited:"Unlimited",newFreeDescription:"This one’s on us",freeForever:"FREE FOREVER",callOut:"In-Video Annotations",educatorTeamDescription:"For pioneer Educators looking to educate students better with video.",educatorDescription:"For stand-alone teachers looking to make a difference.",oneTeacher:"1 Teacher",studentManagement:"Student management",studentAssignment:"Student assignment videos",teacherAdditionalVideos:"Every 10 additional Exports at $5/year",studentDescription:"For Student who need lengthy videos with a personal touch.",studentAdditionalVideos:"10 additional Exports at $5/yr",csmFreeDescription:"For customer success enthusiasts.",freeBandwidth:"500MB Bandwidth",proDescription:"Mesmerize your audience and know them",teamDescription:"For high performance customer success teams bent on fighting churn and upselling.",teamCsm:"1 CSM",teamAgent:"3 Agents",unlimitedViewing:"Unlimited customers viewing",agnetManagement:"Agent management",teamBandwidth:"200 GB Bandwidth",teamAdditionalUsers:"Every additional user at $10/month",for:"For ",freelancerDescription:"who need lengthy videos with a personal touch.",freelancerUnlimitedDescription:" who live and breathe videos",choosePlan:"Choose a billing cycle and upgrade to",schoolPlan:"School",classRoom:"Classroom",billingCycle:"Billing Cycle",moveToFreePlan:"and will be moved to Forever Free plan",classRoomRecordings:"10 recordings per user",additionalAgents:"Every additional agent at $10/month",classRoomStudentRecordings:"10 recordings per student",numShareForFree:"Share up to 3 videos",unlimitedShares:"Unlimited video sharing",exportsTenVideos:"Export up to 10 videos",downloadTenVideos:"Download up to 10 videos",unlimitedExports:"Unlimited Exports",unlimitedDownloads:"Unlimited Downloads",exportsShareThreeVideos:"(*Export/Download/Share up to 3 videos)",advanceEditng:"Advanced editing*",googleSlidesIntegration:"Google Slides",unlimitedExportDownloadShare:"Unlimited Exports/Downloads/Shares",videoTicketing:"Video ticketing",embedButton:"Embed button on request*",bandwidthMonth:"50 GB Bandwidth/month",categories:"Categories*",exportsShareTenVideos:"Export/Download/Share up to 10 videos",bandwidthYear:"50 GB Bandwidth/year",additionalTenVideos:"Additional 10 videos upto 2 hours",additionalFiveGb:"Additional 5GB Bandwidth at $1/year",folders:"Folders*",freelancerPremiumBandwidth:"75 GB Bandwidth/year",unlimitedVideosOfTwoHours:"Unlimited 2 hour videos",unlimitedRecordings:"Unlimited recordings",agentManagement:"Agent management",premiumFeatures:" - Premium features",schoolPrice:"School / District Pricing",schoolContent:"Please contact us to set up Hippo Video for your entire school/district.",contactUs:"Contact Us",submit:"Submit",email:"Email*",name:"Name*",phone:"Phone*",yourRequirement:"Your Requirement",ok:"OK",emailValidation:"Please enter email address.",phoneNumberValidation:"Please enter phone number.",nameValidation:"Please enter your name.",successMessage:"Thank you, we will contact you shortly",school:"SCHOOL PLAN",notAvailableForBelowNineUsers:"Please select a min. of 100 users",quarterly:"Quarterly",halfYearly:"Half Yearly",freelancerBandwidth:"6.25 GB Bandwidth/month",classRoomStudentCount:"40 Students",classRoomTeacherCount:"1 Teacher",classRoomStudentCanCreate:"Student can create videos only with link provided by Teacher",schoolRoomStudentCount:"100+ Students or Teachers",videoApi:"Video API",schoolAssignment:"Assignments",roles:"Roles",classes:"Classes",classroomBandwidth:"100 GB Bandwidth/year",schoolStudentCanCreate:"Students can create their own videos",classRoomDesc:"For Teachers looking to flip the classroom.",allOfClassroom:"All of CLASSROOM Plan",classRoomPlanInfo:"for 40 Students & 1 Teacher",schoolPlanInfo:"for more than 100 users",freeStorage:"500MB storage",freeMins:"10 mins",simpleEdit:"Simple Edit",proEdit:"Pro Edit",proEditTooltip:"Edit your video and add text with Hippo Video's advanced features",shareVideo:"Video Sharing",shareAndDownloadVideos:"Share and Download your Videos",noHippoVideoWaterMark:"No Hippo Video Watermark",noHippoVideoEndCard:"No Hippo Video End Card",yesHippoVideoEndCard:"Yes Hippo Video End Card",hippoVideoBranding:"Hippo Video Branding",hippoVideoBrandingTooltip:"Customize the player logo,color to increase brand awareness",hippoVideoBrandingTooltip1:"Send out videos with our Hippo Video logo",everythingIn:"Everything in",and:"and",tenGbStorage:"10GB storage",tenGbBandwidthMonth:"10GB Bandwidth",oneGbBandwidthPerMonth:"1 GB/Month Bandwidth",tenGbBandwidthPerMonth:"10 GB/Month Bandwidth",fiftyGbBandwidthPerMonth:"50 GB/Month Bandwidth",hundredGbBandwidthPerMonth:"100 GB/Month Bandwidth",oneHour:"1 Hour",sevenTwentyP:"720p",markupTools:"Markup tools",googleSlides:"Google Slides",googleDocs:"Google Docs",googleClassroom:"Google Classroom Integration",twentyGbStorage:"20GB storage",twentyGbBandwidthMonth:"20GB Bandwidth",twoHours:"2 Hours",tenEightyp:"1080 Resolution",FullHdRecordingTenEighty:"Full HD Recording - 1080 Resolution",importVideos:"Import Videos",stockImages:"Stock image and audio track libraries",introOutro:"Intro Outro",gmailIntegration:"Gmail Integration",zoomIntegration:"Zoom Integration",zoomIntegrationtooltip:"Create and send 1:1 personalized videos directly inside your Zoom",slackWorkplace:"Slack and Workplace",zendeskFreshdesk:"Zendesk and Freshdesk",everythingInHippo:"Everything in PROFESSIONAL and",professional:"PROFESSIONAL",unlimitedStorage:"Unlimited Storage*",threeHours:"3 Hours Recording Limit Per Video",videoLibrary:"Add Video Categories",videoFolder:"Add Video Folders",privacySettings:"Video Privacy Settings",videoEngagements:"Video Engagements",embedVideos:"Embed Videos",usageAnalytics:"Video Performance Analytics",whiteLabeling:"White Labeling",guestRecording:"Guest Recording",comments:"Comments",reactions:"Reactions",videoComments:"Video Comments",desire2Learn:"Desire2Learn",slack:"Slack",singleUser:"Single User Plan",freeRecordingLimit:"5 Min Recording Limit Per Video",fifteenMinsRecording:"15 Mins Recording Limit Per Video",personalDescription:"Perfect if you’re getting started",quarter:"Quarter",halfYear:"Half Year",personalRecordLimit:"2 Hour Recording Limit Per Video",everythingInFree:"Everything in FREE and",everyThingInFreePlus:"Everything in free, plus:",professionalRecordLimit:"2 Hours Recording Limit Per Video",professionalDescription:"Perfect if you want to communicate better",everythingInPersonal:"Everything in PERSONAL and",personal:"PERSONAL",businessDescription:"For your firm’s creative goals",unlimitedUsers:"Multi User Plan",playerBranding:"Player Branding",business:"Business",user:"user",storage:"Storage",bandwidth:"Bandwidth",personalisation:"Personalization Credits",pausePeriodInfo:"During uncertain times like these, avail the 'Pause Subscription' feature from Hippo Video. You can now pause your billing and still continue to use the features under your plan",pauseSubscription:"PAUSE SUBSCRIPTION",cancelSubsc:"CANCEL SUBSCRIPTION",actualBillingDate:"Actual billing date",revisedBillingDate:"Revised billing date",pauseSubscriptionfor:"Pause subscription for",pauseSuccessMessage:"Your subscription has been successfully paused",cancelSubscription:"cancel subscription",cancelOrPauseLink:"Cancel or pause subscription",contactSupport:"Contact support for more details",pauseText:"Subscription paused.",cancelText:"Cancellation initiated.",gotit:"GOT IT",feedbackTitle:"We are sorry to let you go. As one last step, Please answer the below questions that help us make the product a better one.",feedbackQuestion1:"What made you quit Hippo Video?",feedbackQuestion2:"How would you rate your overall satisfaction?",cancelSuccessMessage:"We have initaited the cancellation process. Our customer support specialist will contact you within next two days.",bandwidthDescription:"Bandwidth is when you share, download or export a video, the video will be streamed/downloaded from our server. The count of bytes streamed/downloaded when it’s played is called as bandwidth.",hideBandwidth:"Hide Bandwidth Details",classroomDescription:"Everything you need for your class",classroom:"CLASSROOM",classroomStuCount:"40 students + 1 teacher",studentVideoRecording:"Student Video Recording",startCardEndCard:"Custom Start and End Screen",startEndScreen:"Start and End Screen",d2lIntegration:"D2L Integration",schoolStudentCount:"Minimum 100 users",schoolPlanNew:"SCHOOL",everythingInClassroom:"Everything in CLASSROOM and",schoolDescription:"For your school’s creative goals",bandwidthHoverMsg:"Data sent to a user who views your video is counted in bandwidth. When someone views your video using the link shared by you, the data consumed is bandwidth consumed. Data consumed by exporting and downloading videos is also calculated in bandwidth.",professionalTrialMsg1:"You are currently in Professional trial version. Your trial will expire on: ",professionalTrialMsg2:" and will be moved to Forever Free plan",freePlanMsg:"You are currently in the FREE plan. Choose a plan to upgrade.",personaFreeversion:"You’re currently on the free version!",fairUsagPolicy:" - Fair Usage Policy",usageAnalyticsHoverMsg:"Get viewership, engagement, and performance reports.",embedVideosHovverMsg:"Get the iframe code to embed videos in your website",vdoEngagementHoverToolTip:"Engage with videos using reactions and timeline comments.",privacySettingsHoverMsg:"Share videos by protecting them with a password. Control who can access your videos. Set an expiry date for the shared video link.",libraryHoverToolTip:"Organize your videos into folders for easy access.",assignmentHoverToolTip:"Teachers can send a link to their students to record assignments and submit.",markupToolsHoverMsg:"Use markup tools like focus, highlight, and cursor creating videos",startCardEndCardHoverMsg:"Add your start and end cards to customize your videos",studentVideoRecordingHoverMsg:"Teachers can send a link to students to record individual videos.",guestRecordingHoverMsg:"Send a link to start recording without signing up. Great for customer support and sales.",twentyGbBandwidthMonthUser:"20GB Bandwidth/user",upgradeToMsg:"Set the billing cycle time span for your upgrade to - ",managePlanMsg:" You shall only be charged for your recent purchase during the checkout process.",discountCodeErrorMsg:"Invalid discount code",invalidCodeErrorMsg:" is the invalid code",oneHourRecordLimit:"1 hour recording limit per video",teamPlanMsg:"You have subscribed to ",brandingAndCustomization:"Custom Branding",brandingCustomization1:"Branding & Customization",brandingAndCustomizationHoverMsg:"Add logo, favicon and customize links with your own personal or company domain name to give your videos a professional look.",brandingAndCustomizationSchoolHoverMsg:"Add logo, favicon and customize links with your own personal or school domain name to give your videos a professional look.",customDomain:"Custom Domain",createVideoFromImages:"Create Video from Images",customThumbnail:"Add a Custom Thumbnail",starter:"Starter",enterprise:"Enterprise",mktgFreeImportVideos:"3 Video Imports",mktgFreeCreateVideos:"Create Videos - 5/month",mktgFreeSlideShow:"Video Slideshow Maker",mktgFreePrivacy:"Set Expiry and Password Protect Videos",mktgFreeExport:"Export to YouTube, GDrive etc",mktgFreeSocialSharing:"Social Sharing Options",mktgFreeEmbed:"Embed Videos & Playlist",mktgFreeVdoComments:"Video Comments",mktgFreeResolution:"Video Quality - HD",mktgFreeCta:"Timeline Actions",mktgFreeBandWidth:"Bandwidth Limit - 200GB/month",mktgFreeReport:"Video Analytics",mktgFreeHippoBranding:"Hippo Video Branding",mktgFreeIntroOutro:"Custom Start and End Screen",mktgFreeSmartIntegration:"Smart Integrations",mktgFreeNumUsers:"User Seats - 1",mktgStarterImportVideos:"10 Hosted Videos",mktgStarterCreateVideos:"Create Videos - 10/month",mktgSimpleEdit:"Quick Editing Suite",mktgDownload:"Download Your Videos",mktgClone:"Create Video Copy",mktgFullHd:"Video Quality - Full HD",mktgAddSubtitle:"Add Subtitle Files",mktgCustomBranding:"Custom Branding",mktgCustomThumbnail:"Add a Custom Thumbnail",mktgPlayerThemes:"Customizable Video Player Themes",mktgSubdomain:"Account Subdomain",mktgNoHippoBranding:"No Hippo Video Branding",mktgProImportVideos:"20 Hosted Videos",mktgProCreateVideos:"Create Videos - 30/month",mktgGif:"Video to GIF",mktgBlur:"Add Blur Effect",mktgAdvancedEdit:"Professional Video Editing",mktgStockImages:"Stock Image and Music Library",mktgCategory:"Add Video Categories",mktgReactions:"Animated Reactions",mktgGenerateSubtitles:"Auto Generate Subtitles - 60 mins/month",mktgSpeedDetection:"HD Bandwidth Speed Detection",mktgAudienceDemographics:"Viewer Reports",mktgProCollectVideoTestimonials:"Collect Video Testimonials - 5/month",mktgGsuite:"GSuite. Need More? Submit Your Request.",mktgProUsers:"User Seats - 3",mktgEnterpriseImportVideos:"50 Hosted Videos",mktgEnterpriseCreateVideos:"Create Videos - 60/month",mktgCustomDomainSSL:"Custom Domain Mappping (SSL)",mktgUserPermissions:"User Roles & Permissions",mktgEnterpriseUsers:"User Seats - 5",mktgEnterpriseGenerateSubtitles:"Auto Generate Subtitles - 120 mins/month",mktgAccountManager:"Dedicated Account Manager",mktgPrioritySupport:"Priority Support",starterDescription:"Unearth brand visibility with videos",enterpriseDescription:"Own your video marketing strategy",mktgFreeRecordLimit:"Recording Limit - 30 mins/video",mktgStarterProRecordLimit:"Recording Limit - 1 hr/video",mktgEnterpriseRecordLimit:"Recording Limit - 2 hr/video",mktPlaceInteg:"Marketplace Integrations",everyDayNarrative:"Everyday Narrative",supportGenerateSubtitles:"Auto Generate Subtitles - 60 mins/month",supportCrtVideos:"Create Videos",basicReports:"Basic Reports",basicReportsTooltip:"View basic video reports like the total plays, avg watch rate for all your prospects",basicReportsTooltip1:'View all essential video reports such as "total plays" and "average watch rate" for each prospect',advancedReports:"Advanced Reports",advancedReportsTooltip:"View detailed video reports like the video play rate, watch duration etc. for all your prospects",knowledgebasInteg:"Knowledgebase Integration",supportFreeCta:"Create Polls Inside Video",recordingWidget:"Embeddable Recording Button",supportVideoTickets:"Collect Video Tickets",supportMktPlaceInteg:"Helpdesk Integrations (Zendesk, Freshdesk, Intercom)",supportAdminCost:"$25 / Admin / Month",supportAgentCost:"$5 / Agent / Month",supportBasicDescription:"Resolve tickets faster",supportStarterDescription:"Transform your support agents to support rockstars",supportProDescription:"Graduate from customer support to customer success",supportEnterpriseDescription:"For 'customer-first' businesses",supportFreeImportVideos:"Import Videos - 3",supportStarterImportVideos:"Import Videos - 10",supportProImportVideos:"Import Videos - 20/admin",supportEnterpriseImportVideos:"Import Videos - 30/admin",importCost:"Import Additional Videos for 25¢ each/month",salesStarterImportVideos:"5 Hosted Videos",salesStarterRecordingsBymonth:"Create Videos - 50/month",salesFreeCreateVideos:"Create Videos - 10/month",salesProCreateVideos:"Create Videos - 100/month",salesEnterpriseCreateVideos:"Create Videos - 200/month",salesProUsers:"User Seats - 2",salesEnterpriseUsers:"User Seats - 3",salesGmailAddon:"Gmail - AddOn",mktgEnterpriseCollectVideoTestimonials:"Collect Video Testimonials - 10/month",singleUserPlan:"Single User",oneTeacherUpto:"One Teacher & Add upto 40 Students",addAsManyYouWant:"Users - Add as many you want",min100users:"Minimum 100 Users",uptoUsers:"Upto 40 Students",sSocialSuccessMsg:"Successfully updated. Now, you are on paid plan",errorReferralCode:"Invalid code",perMonthSmallCase:"month",perYearSmallCase:"year",createStarterCreateVideos:"Create Videos - 100/month",createStarterProRecordLimit:"Recording Limit - 120 mins/video",createFullHd:"Video Quality - Full HD",createNumUsers:"User Seats - 1",createGif:"Video to GIF",createSimpleEdit:"Quick Editing Suite",createProEdit:"Professional Video Editing",createDownload:"Download Your Videos",createCategory:"Add Video Categories",youtubeNativeHosting:"Youtube Native Posting",youtubeNativeHosting1:"Youtube Native Videos",saveToGdrive:"Export to GDrive",directVideoSharing:"Direct video sharing",createBandWidth:"200 GB Bandwidth",animatedReactions:"Animated Reactions",videoBitrate:"Video bitrate",googleDocsIntegration:"Google Docs",recordYourSlidesAndDocs:"Record your Slides & Docs",createClone:"Create Video Copy",growth:"GROWTH",mktgProDescription:"Gain leads and audience insights",growthDescription:"Contextual customer journey mapping",createStarterDescription:"For quick creation and editing",createProCreateVideos:"Create Unlimited Videos",hostUnlimitedVideos:"Host Unlimited Videos",createProNumUsers:"User Seats - 2",addPlayerLogo:"Add Player Logo",advancedAnalytics:"Advanced Video Reports",createProDescription:"Create and Brand your Videos",creation:"Creation",marketing:"Marketing",sales:"Sales",supportEntUserLimit:"User Seats - No Upper Limit",supportProUserLimit:"User Seats - No Upper Limit",supportFreeUserLimit:"User Seats - 1",supportStarterUserLimit:"User Seats - 1",lowResolution:"Video Quality - SD",tenMinuteRecording:"Recording Limit - 10 mins/video",defaultBitrate:"Default Bitrate",sevenTwentyResolution:"Video Quality - HD",highBitrate:"High Bitrate",unlimittedRecordingOptions:"Unlimited Video Recordings",trackingAndNotification:"View Tracking and Notifications",contactsTab:"Contacts Tab",emailEmbed:"Email Campaign Link",zapierIntegration:"Zapier Integration",zapierIntegrationTooltip:"Connect Hippo Video with your everyday apps using Zapier",videoToGif60Sec:"Video to GIF - 60 sec",threeHostedVideos:"3 Hosted Videos",inVideoLeadGeneration:"In Video Lead Generation",tenVideoImports:"10 Hosted Videos",acceleratedStreaming:"Accelerated Video Streaming",unlimitedVideosWithSalesAddOn:"Unlimited Video Recordings with Capture Add-on",oneGbBandwidth:"1GB Bandwidth",videoSeo:"Video SEO",nativeFacebookHosting:"Facebook Native Video",twoGbBandwidth:"2GB Bandwidth",customTracking:"Custom Tracking",gifThumbnail:"GIF Thumbnail",gifThumbnailTooltip:"Choose gif thumbnail over static thumbnail to engage your prospects",transcoding:"HD Bandwidth Speed Detection",embedCrmLead:"Custom In-Video CRM Forms",endVideoPlaylist:"End Video Playlist",fiftyVideoImports:"100 Hosted Videos",internalTeamColloboration:"Internal Team Colloboration Tool",dashboard:"Marketing Dashboard",dashboardTooltip:"Understand your video and viewer performance in detail.",defaultCta:"Default Timeline Actions",configurableCta:"Configurable Timeline Actions",salesDashboard:"Sales Dashboard",salesDashboardTooltip:"Find your prospect activity, status, and other information all at one place",completeVideoPlatform:"A complete video marketing platform. Host videos and use performance tools to convert your casual viewers into customers.",checkPricing:"check pricing",support:"Support",theBusinessSuite:"THE BUSINESS SUITE",ownYourMarketing:"Ace your marketing, sales and support with our customized business suite. Contact us to know more.",salesAddonDesc:"Send video emails to your prospects, track them and leads to close more deals.",saledAddOn:"SALES ADD-ON",yearlyPlanOffer:"Bill yearly to pay only for 10 months. Get 2 months free.",yearlyPlanOfferBusiness:"Save 50% on this plan with an annual subscription.",yearlyEntPlanOfferBusiness:"Save 50% on sales growth annual plan buying a minimum of 3 users",applyNow:"Apply Now",perUser:" / user /",perMonthAddon:"/ month",perMonthUser:"/month/user",includesOne:"Includes 1 User",proTeamPlanInfo:"In the Pro plan, you can have only 5 users. To add more users, please opt for the Growth plan.",growthTeamPlanInfo:"You can only add users in multiples of 5. You will be billed accordingly.",includesFive:"Includes 5 Users",includesTen:"Includes 10 Users",perUserMonth:"/user/month",personalization:"Personalization",personMailPerMonth:"1000 video mails/month",testimonials:"Testimonials",testimonialPerMonth:"50/month",bandwidthPerMonth:"100 GB",subtitles:"Subtitles",subtitlesPerMinute:"60 min",additionalVideoImport:"Additional Video Imports",cents:"/ cents/ video",publishVideoToSlack:"Publish Videos to Slack, Jira, Trello",publishVideoToSlack1:"Publish Videos to Slack, Jira, Trello, D2L",trackViaFacbookPixel:"Track Using Facebook Pixel",trackViaFacbookPixelToolTip:"Understand your video performance with FB Pixel analytics",trackViaFacbookPixelAndGa:"Track Using Facebook Pixel & GA",trackViaFacbookPixelAndGaTooltip:"Understand your video performance with FB Pixel and Google analytics.",trackViaGoogle:"Track Using Google Analytics",inVideoCallToAction:"In Video Call-To-Action",inVideoCustomPoll:"In Video Custom Poll",inVideoCustomPollToolTip:"Include engaging Custom Poll to your video",shareableVideoLink:"Shareable Video Link",brandingCustomization:"Branding Customization",brandingCustomizationTooltip:"Customize the player logo and color to increase brand awareness",customizeVideoLandingPage:"Customize Video Sales Page",gifMaker:"GIF Maker",videoReactions:"Video Reactions",importsContactsFromCrm:"Import Contacts from CRM",inVideoMeetingLink:"In-Video Meeting Link",trackYourVideoEmails:"Track Your Video Emails",getRealTimeNotifi:"Get Real-Time Notifications",configurabaleInVideoTimelineAction:"Configurable In-Video Timeline Actions",salesAddOn:"Sales Workflow",personalizationAddonDesc:"Send personalized video emails to your contact list from Hippo Video itself.",testimonialAddonDesc:"Collect video testimonials from your customers. No signup required.",bandwidthAddonDesc:"Get bandwidth added to your account to continue serving videos.",subtitleAddonDesc:"Generate subtitles for your videos directly from Hippo Video.",importAddonDesc:" Import more videos to your Hippo Video account.",planUpgradeTo:"Plan Upgrade",backToSalesPricing:"Back to Sales",billing:"Billing",syncContactsViaZapier:"Sync Contacts via Zapier",perUserPerMonthAddon:"/ user/ month",availableAddOn:"Get Add-Ons",optional:" (optional)",aceYourMarketing:"Ace your marketing, sales and support \n with our customized plan",marketingTools:"Marketing Tools",salesTools:"Sales Tools",supportTools:"Support Tools",unlimittedVideos:"Unlimited Videos",unlimittedBandwidth:"Unlimited Bandwidth",videoRecorderApi:"Video Recorder API",personalizationApi:"Video Personalization API",limitedFreePlan:"Limited Free Plan - ",mktgFreePlanDesc:"Not decided yet? We have a Limited Free Plan where you get 3 Hosted Videos, In-Video Lead Generation Form and Hippo Video Branding",addOns:"ADD-ONS",customPricing:"Custom Pricing",gifThmbnail:"Animated GIF Thumbnail",greenScreen:"Green Screen",greenScreenTooltip:"Edit your video with Hippo Video's advanced features",basic:"Basic",basicDescription:"Begin your video marketing strategy",canBePurchasedAlone:"Can be purchased alone",buyNow:"BUY NOW",numAddon:"Num add-on",createAddon:"Capture",createAddonDesc:"Record and send unlimited webcam and screen recordings.",supportEntNewUserLimit:"User Seats - 100",supportProNewUserLimit:"User Seats - 50",supportStarterNewUserLimit:"User Seats - 25",salesforceIntegration:"Salesforce Integration",salesforceIntegrationTooltip:"Create, send and track 1:1 personalized videos and campaigns inside Salesforce account",hubspotIntegration:"HubSpot Integration",hubspotIntegrationTooltip:"Create, send and track 1:1 personalized videos directly inside your hubspot",includeAgentsStarter:"Includes 10 agents",includeAgentsPro:"Includes 25 agents",includeAgentsGrowth:"Includes 50 agents",oldPaidPlanInfo:"! You are currently charged based on our old pricing. This is valid until you choose to upgrade.",hiText:"Hi, ",hiText2:"Hi",includeAgentsBasic:"1 agent",clientRecording:"Client Recording",supportFreePlanDesc:"Not decided yet? We have a Limited Free Plan where you record SD Videos, Get Basic Reports and Hippo Video Branding",hdRecordingSevenTwenty:"HD Recording - 720 Resolution",commentsAndReactions:"Comments and Reactions",smartIntegration:"Smart Integration",advanceReports:"Advance Reports",videoSettings:"Video Settings",fourEightyRecording:"SD Recording - 480 Resolution",addGreenScreen:"Add Green Screen",basicPersonalizesVideos:"25 Personalized Video Emails. Add-on available",starterPersonalizesVideos:"50 Personalized Video Emails. Add-on available",proPersonalizesVideos:"75 Personalized Video Emails. Add-on available",growthPersonalizesVideos:"100 Personalized Video Emails. Add-on available",addonSubSuccessMsg:"Successfully added add-on to your account.",iWantUseVideoFor:"I want to use video for",marketingFeaturesFreeSalesSupport:"All marketing features included when you purchase sales or support plans",marketingFeaturesFreeSalesSupportOne:"Marketing features included when you purchase sales or support plans",saveTwentyPercent:"(Save 20%)",includes:"Includes",oneSales:"1 Sales",fiveSupport:"25 support",exportVideosToNativePlatform:"Export videos to native platform",gifCreation:"GIF creation",inVideoLeadGenerationTooltip:"Capture leads by adding lead forms in your video",everythinginStarterPlus:"Everything in starter, plus:",cloneVideos:"Clone Videos",customInVideoCallsToAction:"Custom-In-Video Call-To-Action",customInVideoCallsToActionTooltip:"Include engaging Calls-To-Action, Annotations, Custom Poll, and Forms to your video",seo:"SEO",seoTooltip:"Drive traffic to your website with video SEO using Subtitles, Title, Description, and Tags",videoChannelTemplates:"Video Channel Templates",outlookIntegration:"Outlook Integration",videoPrompter:"Teleprompter",videoPrompterTooltip:"Read the video script from your screen and record perfect videos",everythingInProPlus:"Everything in pro, plus:",everythingInGrowthPlus:"Everything in Growth, plus:",customDomainSSL:"Custom Domain (SSL)",videoReviewAndCollaboration:"Video Review and Collaboration",emailCampaignEmbed:"Email Campaign Embed",addVideoFolders:"Shared Team Folders",customizableVideoSalesPages:"Customizable Video Sales Pages",embeddableRecorderClient:"Embeddable Recorder Client",detailedComparisonTable:"See detailed comparison of our pricing plans",perYearText:" / year",perMonthText:" / month",perQuarterText:" / quarter",proSupportUsers:"50 support",growthSupportUsers:"100 support",collaboration:"Collaboration",marketingTeamDescription:"For Marketing Teams, Video & Digital Agencies",salesTeamDescription:"For SDRs and Sales Agents",supportTeamDescription:"For Support Agents and Executives",collaborationTeamDescription:"For team communication and video discussions",addOnCtaText:"This addon can only be attached to a subscription plan.",usersText:"users",tenSupportAgent:"10 Support Agents",proSupportAgent:"25 Support Agents",fiftySupportAgent:"50 Support Agents",additionalSalesUsers:"Additional sales user ",outreachIntegration:"Outreach Integration",outreachIntegrationTooltip:"Create, send and track 1:1 personalized videos and campaigns inside Outreach account",oneToOneVideo:"Send 1:1 Sales Video Email",linkedinIntegration:"Linkedin Integration",linkedinIntegrationTooltip:"Create and send 1:1 personalized videos directly inside your LinkedIN and Sales Navigator inbox",linkedinIntegrationTooltip1:"Create and send 1:1 personalized videos directly from your LinkedIn and LinkedIn Sales Navigator inbox",tenSalesCoachingVideosFromJeffreyGitomer:"12 Sales Coaching Videos from Jeffrey Gitomer",twentyfiveSalesCoachingVideosFromJeffreyGitomer:"30 Sales Coaching Videos from Jeffrey Gitomer",fortySalesCoachingVideosFromJeffreyGitomer:"50 Sales Coaching Videos from Jeffrey Gitomer",fortySalesCoachingVideosToolTip:'Get access to 50 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',tryNow:"Try Now",tryForFree:"TRY FOR FREE",existingPlan:"EXISTING PLAN",continueTrialWithThis:"Continue trial with this plan",doubleYourSales:"Accelerate your business with videos",noCreditCardRequire:"14-day free trial. No credit card required",noCreditCardRequired:"No credit card required",chooseThePlan:"Choose the best plan to unlock business growth",gsStarterDesc:"For Individuals with basic feature",gsProDesc:"For Sales Professionals starting with video selling",gsGrowthDesc:"For Sales Pros and Sales Teams with all business features",youCanSelect:"You can select more than one",billedMonthly:"Billed monthly",billedYearly:"Billed annually",billedQuarterly:"Billed quarterly",annually:"Annual",perAnnualText:" / annual",starterUpperCase:"STARTER",moveToFree:"Move to Free",trialPeriodEnd:"Your trial period has ended. Please choose a plan below. If you still need some time you can choose our Free forerver plan",moveFreeSuccssMsg:"Your successfully moved to forever Free plan",fieldRequired:"This filed is mandatory",stayFreePlanMsg:"Please let us know the reason you want to stay with our free plan",yearlyOffer:"20% off",videoCampaigns:"Video Campaigns",videoCampaignsTooltip:"Record and send video campaigns",netflixOfferMsg1:"Hippo Video is here for you to deal with the current global crisis. The discount on the new quarterly plan is as big as our annual plans. ",netflixOfferMsg2:"With our Sales annual plans, you get a ",netflixOfferMsg3:"coupon extra.",offerPercentage:"% off",covidOfferMsg:"COVID-19 DISCOUNTED PLAN",billingSummary:"Billing Summary",grandTotalPrice:"Grand Total Price",totalPrice:"Total Price",couponApplied:"Coupon Applied for",bestsuitedforteams:"Best Suited for Teams",mostpopular:"Most Popular",gamilOutlookInteg:"Gmail/Outlook Integration",gamilOutlookIntegTooltip:"Create and send 1:1 personalized videos and campaigns inside Gmail/Outlook account",gamilOutlookIntegTooltip1:"Create and send 1:1 personalized videos and campaigns inside Gmail account",fullHDRecording:"Full HD Recordings",fullHDRecordingTooltip:"Record unlimited full HD videos from your account",reportsInGmail:"Reports in Gmail",reportsInGmailTooltip:"View detailed video reports in Gmail and track your prospects",defaultSalesPage:"Default Sales Pages",defaultSalesPageTooltip:"Use personalized sales pages to shorten your sales cycle ",addtextInVideo:"Add Text/Image in Video",addtextInVideo1:"Add Text in Video",addtextInVideoTooltip:"Amplify your videos by adding text wherever needed",twelveSalesVideoFromGitomer:"12 Sales Coaching Videos from Jeffrey Gitomer",twelveSalesVideoFromGitomerTooltip:"Get your hands on 12 videos the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",twelveSalesVideoFromGitomerTooltip1:'Get access to 12 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',thirtySalesCoachingVideosFromJeffreyGitomer:'Get access to 30 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',ctaAndMeetingLink:"CTAs, Meeting Link",ctaAndMeetingLinkTooltip:"Add in-video meeting links and any all-to-action to redirect your prospects to take the desired action",ctaAndMeetingLinkTooltip1:"Add customizable call-to-actions and in-video meeting links that nudge your prospects to take action",organizeIntoFolders:"Organize into Folders",organizeIntoFoldersTooltip:"Create and add videos to separate folders to keep track",brandedUrl:"Branded URL",brandedUrlTooltip:"Customize your page URL to improve brand awareness","24x7SupportTooltip":"We Provide 24x7 Support Request to our all Customers",twentyFiveSalesCoachingVideo:"30 Sales Coaching Videos from Jeffrey Gitomer",twentyFiveSalesCoachingVideoTooltip:"Get your hands on 30 videos from the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",minThreeUsers:"Min 3 Users",minTenUsers:"Minimum 10 Users",teamReportes:"Team Reports",customizableSalesPages:"Customizable Sales Pages",customizableSalesPagesTooltip:"Create and customize personalized sales pages to shorten your sales cycle",peopleTab:"People Tab",peopleTabTooltip:"Get 360 degree view of your contact video engagement activity",docInSalesPage:"Documents in Sales Pages",docInSalesPageToolTip1:"Get the complete sales page experience by adding product demos, testimonials, and contract PDFs as a carousel",docInSalesPageTooltip:"Add pdf documens and other sales documents to the carousel",fortyPlusSalesCoachingVideos:"50 Sales Coaching Videos from Jeffrey Gitomer",fortyPlusSalesCoachingVideosTooltip:"Get your hands on 50 videos from the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",starterDescSeptPricing:"Gmail/Outlook only plan",proDescSeptPricing:"Basic Features. Suitable for VSB,SMBs",growthDescSeptPricing:"Premium Integrations & Customization",unlimittedHdRecording:"Unlimited HD Recordings",unlimittedHdRecordingTooltip:"Record unlimited HD videos from your account",mobileApp:"Mobile App",mobileAppTooltip:"Record and share videos on the go using Hippo Video app from your iOS or Android phone",notifications:"Notifications",trimOnly:"Trim Only",trimOnlyTooltip:"Trim your video length to your requirements",easyVideoCreationAndShare:"Easy video creation & share",realTimeNotifi:"Realtime Notifications",realTimeNotifiTooltip:"Receive real time notifications for all your videos",userRoles:"User Roles",createGIFFromVideo:"Create GIF from Video",webhookIntegration:"Webhook Integration",mailchimpIntegration:"Mailchimp Integration",freshservicIntegration:"Freshservice Integration",zohodeskIntegration:"Zohodesk Integration",intercomIntegration:"Intercom Integration",zendeskIntegration:"Zendesk Integration",freshdeskIntegration:"Freshdesk Integration",addIntroOutroVideos:"Add Intro and Outro Videos",gmailAddonIntegration:"Gmail Add-on Integration",professionalVideoEditingAndGreenScreen:"Professional Video Editing and Green Screen",editVideos:"Edit Videos",promotePlaylist:"Promote Playlist",inVideoCallToActionToolTip:"Include engaging Calls-To-Action to your video",customVideoCrmForm:"Custom in Video CRM Form",customVideoCrmFormToolTip:"Include engaging Forms to your video",iVideoAnnotation:"In Video Annotation",iVideoAnnotationToolTip:"Include engaging Annotations to your video",hubspotIntegrationForMarketing:"Hubspot Integration For Marketing",proEditAndGreenScreen:"Pro Edit & Green Screen",zendeskEmbeddableRecordingButton:"Zendesk Embeddable Recording Button",freshdeskEmbeddableRecordingButton:"Freshdesk Embeddable Recording Button",salesforceAdvancedIntegration:"Salesforce Advanced Integration",virtualBackground:"Virtual Background",customSalesPageTemplates:"Custom Sales Page Templates",ssoComingSoon:"SSO (Coming soon)",ssoText:"SSO",twentyFourSevenCustomerSupport:"24/7 Customer Support",fiftyPlusSalesCoachingVideosfromJeffreyGitomer:"50+ Sales Coaching Videos from Jeffrey Gitomer",gmailOutlookIntegrationTip:"Create and send 1:1 personalized videos right inside your Gmail/Outlook inbox",reportsGmailTip:"View detailed reports on prospect activity against each video right inside Gmail",defaultVideoSalesPagesTip:"Gain access to 3 default video sales pages",hubspotIntegrationToolTip:"Create, send, and track 1:1 personalized videos, all right inside your HubSpot CRM",advancedReportsToolTip:'View detailed video reports such as "video play rate" and "watch duration" for each prospect',mailchimpIntegrationToolTip:"Create and send 1:1 personalized videos directly inside your Mailchimp",webhookIntegrationToolTip:"Create and send 1:1 personalized videos directly inside your Webhook",salesCardDescription:"Get more responses & faster sales conversion with videos",marketingCardDescription:"Bring in more qualified leads using videos",supportCardDescription:"Faster customer service resolution with videos",teamCardDescription:"Improve team productivity & engagement using videos",tamCommunication:"Team communication",salesforceAdvancedIntegrationToolTip:"Enhance video prospecting strategy with advanced video reports from the Dashboard, which can be added or edited according to relevance and priority, right within Salesforce",virtualBackgroundToolTip:"Give your videos a professional feel by replacing the clutter in your background with images of your choice",customSalesPageTemplatesTip:"Our Hippo Video team specifically curates a video sales page template that is a perfect fit to your requirements",fiftyPlusSalesCoachingGitomerToolTip:'Get access to 50+ videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',gifThumbnailTooltip1:"Pick a GIF over a static thumbnail to catch prospect attention",replaceVideo:"Replace Video",emailSupport:"Email Support",knowledgebaseArticles:"Knowledgebase Articles",liveChatSupport:"Live Chat Support",phoneSupport:"Phone Support",videoSandwich:"Video Template Builder",emailChatPhoneSupport:"Email, Chat & Phone Support",textPerMonth:"/month",licenseTierOne:"AppSumo License Tier 1",licenseTierTwo:"AppSumo License Tier 2",licenseTierThree:"AppSumo License Tier 3",oneUser:"1 User",twoUsers:"2 Users",fiveUsers:"5 Users",twoHundredGbBandwidthPerMonth:"200 GB Bandwidth Per Month",fourHundredGbBandwidthPerMonth:"400 GB Bandwidth Per Month",oneTbBandwidthPerMonth:"1TB Bandwidth Per Month",twentyFiveGbStorage:"25 GB Storage",hundredGbStorage:"100 GB Storage",twoFiftyGbStorage:"250 GB Storage",fourtySalesCoachVideoGitomer:"40 Sales Coaching Videos From Jeffrey Gitomer",fiftySalesCoachVideoGitomer:"50 Sales Coaching Videos From Jeffrey Gitomer",featuresIncluded:"Features included",unlimitedFullHdRecordings:"Unlimited Full HD Recordings",gmailAndOutlookIntegrations:"Gmail/Outlook Integrations",reports:"Reports",videoCampaignsNotIncluded:"Video Campaigns",autoSubtitlingNotIncluded:"Auto-Subtitling not Included",upgradeYourLicense:"Upgrade Your License",createSalesPages:"Create Sales Pages",profilesAndPermissions:"Profiles and Permissions",profileAndPermissionsTooltiop:"Configure user profiles to set org level permissions to access videos, folders, documents, and other assets",knowledgeBaseIntegration:"Knowledge base integration"}},init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={__root:{homePage:{newLandingPageButtonText:"Create A New Sales Page",pageLink:"Page Link",emptyListTitle:"Personalized Sales Pages",myPagesEmptyStateText:"Click here to add Sales Page",sharedEmptyStateText:"No Sales Page has been shared with you currently.",allPagesEmptyStateText:"No result!",emptyListDesc:"Deliver a hyper-personalized experience to your prospects with Hippo Video. Customize every aspect of your sales page and videos as you proceed further. Design the perfect outreach asset to grab your prospect's attention.",pagesLabel:"Sales Pages",createNewButtonText:"Create new",watchDemoLink:"Watch a quick video demo",recent:"Recent",name:"Name",clear:"Clear",filterBy:"Sort by",filterByPremission:"Filter by",allPages:"All Sales Pages",myPages:"My Sales Pages",sharedPages:"Shared Sales Pages",createNewLabel:"CREATE NEW",landingPageLabel:"SALES PAGE",whatIsLandingPage:"WHAT IS A SALES PAGE?",salesPageExp:"A sales page is a landing page where your viewers watch a video. You can customize the page with your branding, add CTAs, add a calendar link to book more meetings, add pre-recorded videos like customer testimonials, product demos, add collateral documents, and convey your business value. All you have to do is customize the page according to your needs and choose a relevant page for the videos you record. Let's deliver a world-class experience together to your contacts.",shareOptions:"Share options",visiblityType:"Visibility",users:"Users",everyoneAtOrg:"Everyone in the Organization",specificUser:"Specific user",onlyMe:"Only me",selectedUsersEmpty:"Please select atleast one user.",permissionType:"Permission",editPermission:"Edit",viewPermission:"View"},edit:{emptyStripContent:"Elements on this page can be edited. Click on a page element to edit it further.",previewPageLabel:"Preview page",undoLabel:"Undo",redoLabel:"Redo",changeImageLabel:"Change Image",sizeLabel:"Size",linkTextLabel:"Link text",linkUrlLabel:"Link URL",imageLinkUrlLabel:"Image Redirect URL",iconLinkUrlLabel:"Icon URL",buttonLinkUrlLabel:"Button URL",linkUrlErrorLabel:"Must begin with http:// or https:// or mailto or ${User.",LinkErrorLabel:"Must begin with http:// or https:// or ${User.",userMergeFieldInfo:"Merge field option here let's your team to use the same page with their links when they're sending videos. Your entered field values will be replaced based on your profile settings accordingly.",userMergeFieldClick:"Click here to change in your profile settings.",buttonTextLabel:"Button Text",buttonTypeLabel:"Button Type",textColorLabel:"Text Color",formBgText:"FORM BACKGROUND",formShadow:"SHADOW",editForm:"Edit Form",editFormTitle:"Please fill the form below",editFormSubTitle:"We promise to keep your details safe and confidential",mandatoryFields:"Mandatory fields",textFields:"Text fields",optionalFields:"Optional fields",submit:"Submit",cancel:"CANCEL",save:"SAVE",bgColorLabel:"Background Color",bgImageLabel:"Background Image",themeColorLabel:"Theme Color",addVideoLabel:"Add primary video",scaleLabel:"Scale",addVideosLabel:"Add Videos & Documents",urlPlaceholder:"Enter URL here",emailPlaceholder:"Enter email id here",callPlaceholder:"Enter contact number here",textPlaceholder:"Type here",addPrimaryVideoLabel:"Add Primary Video",changePrimaryVideoLabel:"Change primary video",changeSliderVideoLabel:"ADD SLIDER VIDEOS, LINKS & DOCUMENTS",scrollAcrossTo:"SCROLL ACROSS TO",accessMore:"ACCESS MORE",addMediaToSlider:"ADD OR EDIT MEDIA",addMediaCarouselTooltip:"You can add or edit proposals, help articles, presentations, videos, or other sales collaterals by choosing from our library or importing them directly from your local. You can choose to “Add via link” option to include Gdrive or Onedrive links.",contactNumberLabel:"Contact number",emailLabel:"Email Id",chatConfiguration:"Chat configuration",editConfiguration:"Edit configuration",formConfiguration:"Form configuration",chatUsedLabel:"Chat used",formUsedLabel:"Form used",defaultBtn:"Link",alignment1:"Center",alignment2:"Left",alignment3:"Right",alignment4:"Space Evenly",chatBtn:"Chat",emailBtn:"Email",callBtn:"Call",ctaFromBtn:"Form",meetingWithLabel:"Scheduling App",calendlyLabel:"Calendly",hubspotLabel:"Hubspot",mergeFieldLabel:"Personal link",personalEmailLabel:"Personal email",customEmailLabel:"Customize",personalPhoneNumLabel:"Personal number",customPhoneNumLabel:"Customize",meetingLinkLabel:"Meeting link here",videoReply:"Get Video Reply",meeting:"Schedule a meeting",buttonLabel:"Button",addButton:"ADD BUTTON",addCarousel:"ADD CAROUSEL",changeButtonTo:"Change button to:",alignment:"Alignment",configurationTitle3:"Intercom configuration",configurationTitle4:"Drift configuration",configurationTitle5:"FreshChat configuration",driftLink:"Drift Link",driftLinkSample:"#DriftLink",invalidDriftLink:"Invalid drift link.",linkType:"Link Type",personalLink:"Use personal link",enterNewLink:"Enter new link",imgPosition:"Image Position",imgPosStretch:"Stretch",resolutionText:"Recommended resolution - 1080 * 1250",imgPosFit:"Fit",imgOpacity:"Image Opacity",containerOpacity:"Container Transparency",editNameTo:"Edit name to",titleCantBeEmpty:"Title can’t be empty"},footer:{cancelLabel:"Cancel",saveLabel:"Save",nextLabel:"Next",backLabel:"Back",saveAndNextLabel:"Save and Next"},delivery:{privacyTitle:"Uh oh! You don’t have permission to view this page.",privacyDesc:"It appears that the page you’re looking for is private and you don’t have permission to access it. Please make sure you have the right permission to access this page.",mediaIsProcessing:"Media is being processed",pleaseEnterValidEmail:"Please enter valid email",videoSendBy:"You have received this video from ",noVideoPlaceholderMsgPrefix:"Oh no! No video to view.",noVideoPlaceholderMsgPostfix:"Reach out to "},templates:{customizeLabel:"Create Page",previewLabel:"Preview",selectALandingPageLabel:"Select a sales page template to proceed",back:"Back",tryForFree:"Try Now",footerText:"Liked the Greetings? Surprise Your Near & Dear Ones with Free Video Greetings",insuranceBanner:{title:"Want to bring the most value to your customer interactions?",p1:"Request your preferred template from our wide range and we will customize it specifically to suit your insurance needs.",p2:"Ready to guide buyer experience and convert prospects 3x times?",btnText:"Explore Templates"},template1:{infoTitle:"Mary Margaret | Head of Product",infoEmailLabel:"Email:",infoEmailtext:"mary@sailingteam.com",infoPhoneLabel:"Tel:",infoPhoneText:"7567576579",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",button2Text:"Request A Demo",button3Text:"Visit Website",carouselLabelText:"Enter your text here.",footerText:"Powered by Sailing Team"},template2:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",about:"About",company:"Company",careers:"Careers",service:"Service",contactUs:"Contact Us",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com"},templateNY:{mainTitle:"Holiday cheers for you!",SubTitle:"Sent with love from Sender name",wishBtnText:"wish back"},template15:{mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUsContent:"Powered by Sailing Team"},template14:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",company:"Company",careers:"Careers",contactUs:"Contact Us",home:"Home",contact:"Contact",help:"Help",resources:"Resources",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com",darkTheme:"Dark Theme",lightTheme:"Light Theme",proceed:"Proceed",cancel:"Cancel",selectCategory:"Select Category",playVideo:"Play Video",noVideosFound:"No Videos Found",addVideoCategory:"Add Video Category",loadMore:"SEE MORE"},template4:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",company:"Company",careers:"Careers",contactUs:"Contact Us",home:"Home",contact:"Contact",help:"Help",resources:"Resources",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com",darkTheme:"Dark Theme",lightTheme:"Light Theme",proceed:"Proceed",cancel:"Cancel",selectCategory:"Select Category",playVideo:"Play Video",noVideosFound:"No Videos Found",addVideoCategory:"Add Video Category",loadMore:"SEE MORE"},template9:{mainTitle:"Happy Thanksgiving Day",subTitle:"Holiday cheers for you",wishBack:"Wish Back"},template16:{mainTitle:"Wishing you a Merry Christmas!",mainDesc:"'Tis the season to wish one another joy and love and peace. Merry Christmas!"},template18:{mainTitle:"Merry Christmas",mainDesc:"We hope your holidays will be filled with joy and laughter through the New Year!",subTitle:"Lorem Ipsum has been the industry's standard dummy",wishBack:"Wish Back"},template19:{mainTitle:"Happy Holidays and all the best to you in the year to come",mainDesc:"We hope your holidays will be filled with joy and laughter through the New Year. Merry Christmas!"},template20:{mainTitle:"Merry Christmas",subTitle:"Warmest wishes for a happy holiday season",wishBack:"Wish Back"},template21:{mainTitle:"Warmest wishes for a happy holiday season",mainDesc:"Wishing you a blissful holiday season. Merry Christmas!",buttonText:"Sign Up for free"},template28:{clientLogo:"CLIENT LOGO",addLogo:"ADD LOGO",contactDetails:"For more details contact",sampleName:"John doe",sampleDesignation:"Sales Manager",samplePhoneNum:"Phone number - 9789834904",sampleEmail:"Email - sampleemail@email.com",formTitle:"Please fill the form below",formSubTitle:"We promise to keep your details safe and confidential",firstName:"First Name",lastName:"Last Name",message:"Message",emailId:"Email ID",phoneNumber:"Phone Number",companyName:"Company Name",submit:"Submit",submittedSuccessfully:"Submitted successfully",editFormProps:"EDIT FORM PROPERTIES",sampleFooter:"© Hippo Video - all rights reserved",mainTitle:"Supercharge your pipeline with potential leads",mainDesc:"It’s simple! Sales conversions are bound to happen when you convey meaningful messages through powerful videos on Hippo Video’s innovative sales pages."},template200:{heroTitleL1:"Carry unlimited baggage",heroTitleL2:"to exotic locations.",heroSubTitleL1:"But never carry any",heroSubTitleL2:"emotional baggage.",ctaTitleL1:"Insure instantly.",ctaTitleL2:"Travel happily.",ctaSubTitle:"ABC Airlines, in association with XYZ Insurance presents a wide range of down-to-earth travel insurance plans that'll make you feel at home whichever part of the world you fly to. Whether you're a solo traveler or group traveler, there's a plan for you. Talk to us and you'll feel light.",about:"About",theTeam:"The Team",contactUs:"Contact Us",getApp:"Get the app",android:"Android",ios:"iOS",followUs:"Follow Us",twitter:"Twitter",facebook:"Facebook",company:"Company",tou:"Terms of use",privacy:"Privacy"},template202:{clientLogo:"CLIENT LOGO",heroTitleL1:"Supercharge your pipeline with potential leads",heroTitleL2:"It's simple! Sales conversions are bound to happen when you convey meaningful messages through powerful videos on Hippo Video's innovative sales pages.",ctaTitleL1:"Hello ${First Name},",ctaTitleL2:"Feed your pipeline with potential leads, get 3x responses, and accelerate your sales cycle upto 40% faster with powerful videos perceptively embedded on a landing page - we simply call it a sales page as it has got all the ingredients to boost your conversions.",carouselHeading:"A few more information exclusive for you",previous:"Previous",next:"Next",allRights:"Hippo Video - All rights reserved"},category:"Category",all:"All"},settings:{nameYourHub:"Sales page name",pageNamePlaceHolder:"Name your personalized sales page",pageURL:"Page URL",subdomainURL:"Subdomain",customDomain:"Custom Domain",addSubdomain:"Add Subdomain",fallbackURL:"Fallback URL",fallbackURLText:"www.sailingteam.com",privacy:"Privacy",thumbnail:"Thumbnail",favIconAndTitle:"Fav Icon",https:"https://",hippovideoio:".hippovideo.io",configureCustomDomain:"Edit your subdomain",addCustomDomain:"Add your subdomain",pagePrefix:"/page/",customDomainHelpTxt:"<subdomain>.hippovideo.io",anyoneWithLink:"Anyone with the link",onlyMe:"Only me",change:"Change",cancel:"Cancel",save:"Save",changeThumbnail:"Change",removeThumbnail:"Remove",urlPathDesc:"Page URL is the extension of your sales page URL. You can use this URL to access your page. Create a unique URL to differentiate your sales pages.",fallbackURLDesc:"Fallback URL helps in the event of any errors. If a user is unable to open or access your sales page, the user is automatically redirected to the Fallback URL.",privacyDesc:"Allow anyone with the link to access your sales page. You can choose to keep your sales page private.",thumbnailDesc:"Set a thumbnail to generate a miniature preview of your sales pages wherever you share.",favIconDesc:"Add icon and name to display on the browsers’ tab.",giveSubdomain:"Please enter a valid subdomain.",customDomainRestrictionMsg:"To set up Custom Domain, you need to configure your domain with a unique DNS record provided by HippoVideo. Please enter your Video Portal URL and submit your request below. The certificate typically takes 15-20 days.",customDomainPlaceholder:"video.yourcompanyname.com",urlChangeWarningTitle:"Url Edit Alert",urlChangeWarning:"Changing your page URL will affect this page. If you've shared this page before, it won't work once you take this action.",salesPrivacySettingAlert:"Sales Page Privacy Settings Alert",salesPrivacySettingDescForAll:"Any new sales page created will be shared by default with everyone in the organization. Change visibility to make it private or share with specific users.",salesPrivacySettingDescForOnlyMe:"Any new sales page created will be private by default. Change visibility to share with specific users.or everyone in the organization"},view:{copyLink:"Copy Link",copyLinkWithThumbnail:"Copy With Thumbnail",copyLinkHubspot:"Copy Link for HubSpot",copyLinkOutlook:"Copy Link for Outlook",previewPage:"Preview page",editPage:"Edit page",saving:"Saving",copiedText:"Copied !",uCanShareNow:"Your page URL is copied to clipboard. You can share now",deleteConfirmMsg:"Are you sure you want to delete ",deleteConfirmNote:"P.S. Please note that videos shared along with this sales page, links and documents inside the page will no longer be accessible by your recipients. Corresponding reports, if any will be deleted.",cloneConfirmMsg:"Are you sure you want to clone the page?",setDefaultConfirmMsg:"Do you want to set this page as default?",editConfirmMsg:"Changes made to sales pages will affect the existing reports.<br>Tip: Please duplicate the sales page before editing.",deleteIntegConfirmMsg:"Are you sure you want to delete the integration?",disableIntegConfirmMsg:"Are you sure you want to disable the integration?",enableIntegConfirmMsg:"Are you sure you want to enable the integration?",shareWarning:"This page cannot be shared due to privacy settings.",clone:"Clone",delete:"Delete",edit:"Edit",share:"Share",setAccess:"Set Access",reports:"Reports",noReports:"The reports won't be available for Video Channels and Video Avenue templates.",draftReports:"Reports will not be available for draft sales pages.",upgradeReports:"Upgrade your account",viewReport:"View Report",settings:"Settings",more:"More",disable:"Disable",enable:"Enable",mergeFieldValues:"Add details of your contacts here. Copy and send the unique page link to track.",mergeFieldValuesPop:"Enter contact’s merge field values",ok:"Add",addVideoReplyConfirm:"Are you sure you want to add this reply to library ?",deleteVideoConfirm:"Are you sure you want to delete this video ?",setDefaultLandingPage:"Set Default",defaultLandingPage:"Default",people:"People",contacts:"Contacts",users:"Users",videos:"Videos",insertMf:"Insert Merge Field",userMfFooter:"Use Merge Fields under the “Users” tab for personalizing your account user’s details.",peopleMfFooter:"Use Merge Fields under the “Contacts” tab for personalizing your recipient’s details.",videoMfFooter:"Use Merge Fields under the “Videos” tab for personalizing your video’s details.",noVideoPlaceholderMsg:"What’s a sales page without a video? Add one now!",sidebar:{sendCampaign:"Send the personalized sales page to your prospects via email",publishPage:"Publish",share:"Share",privacy:"Privacy",embed:"Embed",campaigns:"Campaigns",campaignLink:"Campaign Link",sendMail:"Send Mail",integrate:"Integrate",reports:"Reports",settings:"Settings",changePrivacy:"Change Privacy",configureSlackMsg:"Configure account and start posting to Slack",postToSlackMsg:"Post pages to your Slack channel from here",addAccount:"Add Account",emailTitle:"Email",emailTo:"To",subject:"Subject",content:"Content",mailSuccess:"Mail triggered successfully",cancel:"Cancel",send:"Send",confirmAccount:"Confirm Account",confirmSharePage:"Please confirm your account inorder to share this page.",toPlaceholder:"Enter email id",subjectPlaceholder:"Enter the email subject",contentPlaceholder:"Type in something...",privacyHeading:"Select an option below on who can see this page",onlyMe:"Only me",anyOneWithLink:"Anyone with the link",inlineEmbed:"Inline Embed",inlineEmbedDesc:"Embed this code on a webpage to play the video inline.",popOverEmbed:"Popover Embed",popOverEmbedDesc:"Embed this code on a webpage to play the video in a pop-up.",oembed:"Use oEmbed URL",embedSeo:"Push video metadata to the page for all search engines to index.",embedSeoTip:"Add a video title, description, and subtitles for better indexing by search engines.",usingWordPress:"Using Wordpress?",proTip:"Pro Tip:",checkoutHelpPage:"Check out our Help page",emailEmbed:"Email Embed",emailEmbedDesc:"Embed this code in your email HTML editor to generate the video thumbnail.",emailCampaignLinkDesc:"Copy and paste the code in your email/campaign template to send personalized videos and thumbnail",emailProvider:"Email Marketing Software",thumbnailSize:"Thumbnail Size",responsive:"Responsive",centerAlign:"Center Align",editCopyLinkMf:"If you’ve added any custom fields in your email marketing software, please copy and paste the same custom field inside the box given below to replace the merge fields inside the code.",editCopyLinkMfErr:"* Merge Fields can't be empty",emailMergeTag:"Email Merge Tag",copyCode:"Copy Code",preview:"Preview",emailCampaignLink:"Send a Personalized Page Campaign",sendVideoEmail:"Send Your Personalized Sales Page via Email",pixelId:"Pixel Id",trackingId:"Tracking Id",trackingCode:"Tracking Code",pixelContent:"Track your sales page conversions from Facebook ads. Optimize your ads based on our reports for future ads.",addEvents:"Add Events",eventsHelp:"Add multiple events relevant to your video category.",trackFromHelp:"Start tracking your video from a defined start time.",trackFrom:"Track from",save:"Save",GAContent:"Track your personalized sales page performance. Get page views, average time on page, bounce rate to measure ROI by integrating with GA.",videoSettings:"Video Page Settings",googleAnalytics:"Google Analytics",hubspot:"HubSpot",hubspotContent:"Automatically personalize your sales page with HubSpot and track the page right inside your HubSpot dashboard.",fbPixel:"Facebook Pixel",intercom:"Intercom",appId:"App Id",intercomContent:"Initiate a conversation through intercom chat in your personalized sales page.",integTagsPlaceholder:"Click to select or add tags",position:"Position",left:"Left",right:"Right",bottom:"Bottom",top:"Top",none:"None",default:"Default",horizontalPadding:"Horizontal Padding",verticalPadding:"Vertical Padding",px:"px",drift:"Drift",driftContent:"Be present on your personalized sales page with the Drift chat widget.",copyIntercomCodeDesc:"Intercom Settings -> Installation -> Copy App-Id.",copyDriftCodeDesc:"Drift Settings -> Drift Widget -> Install -> Javascript -> Copy Drift Id from code.",freshChat:"FreshChat",chatToken:"Visitor Widget Token",chatHost:"Chat Host",freshChatContent:"Be present on your personalized sales page with the FreshChat widget.",copyFreshChatCodeDesc:"Setting -> Web Messenger -> Getting Started -> Copy Visitor Widget Token",copyFreshChatHostDesc:"Setting -> Web Messenger -> Getting Started -> Copy Host",videoReply:"Video Replies",receivedOn:"Received on",imageUrl:"Image URL",linkUrl:"Link URL",pardot:"Pardot",luckyOrange:"Lucky Orange",luckyOrangeContent:"Track on individual prospect activities and organize filtered and custom-made follow-ups with real-time dashboard analytics and visitor maps.",copyCodeWithThumbnail:"Copy Code With Thumbnail",campaignLinkInfo:"Video thumbnail will not be generated on pasting this code in your platform. However, the receiver will be able to view the video thumbail and play the video."}},videoReply:{title:"Video Reply",capTitle:"VIDEO REPLY",startRecording:"Start Recording",finishRecording:"Stop Recording",videoBeingUploaded:"Your video is being uploaded. Please wait until it is completed.",nameLabel:"Name :",emailLabel:"Email :",dateLabel:"Date :",messageLabel:"Message :",firstNamePlaceholder:"Your Name *",emailPlaceholder:"Your Email Id *",messagePlaceholder:"Message",allowPermissionDesc:"Please provide permission to record video and audio",allowPermission:"Allow Permission",retakeConfirmationDesc:"The video which you have recorded will be lost forever. Are you sure you want to delete & retake the video?",cancel:"Cancel",proceed:"Proceed",save:"Save",sendReply:"Send",recordVideoMsgFor:"Reply with video",copiedToClipboard:"Video link copied to clipboard successfully.",userNameCannotBeEmpty:"User name cannot be empty.",userEmailCannotBeEmpty:"Email cannot be empty.",userMsgCannotBeEmpty:"Message cannot be empty.",addToLibrary:"Add to library",deleteVideo:"Delete video",invalidEmail:"Invalid Email",sendSuccessfully:"Well done, Video recording sent.",emptyContent:"We know you're expecting a reply, but currently there are none.",videoUploading:"Uploading",videoUploadInProgress:"Upload in progress. please wait"},poweredByFooter:{poweredByText:"Powered By",poweredBySignupTextForIndividual:"Loved it? Create and send mesmerizing videos on your own.",poweredBySignupTextForBusiness:"Loved it? Create and send mesmerizing videos on your own.",signUp:"Sign Up",getFreeAccountForLife:"Get Free Account For Life",signUpForFree:"Sign Up for Free"},reports:{downloadReport:"Download Report",exitReport:"Exit Report",templateReports:"Overall Report",viewClicksPlaceholder:"Performance Report",noReports:"No reports",overallEmptyDesc:"Oops! No reports to show. This sales page hasn't been shared or viewed yet.",dashboardHeading:"Track key performance indicators of a shared sales page",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",totalPageViews:"Total Page Views",totalViewsDesc:"Total number of times the page has been viewed.",uniquePageViews:"Unique Page Views",uniqueViewsDesc:"The number of times unique viewers have viewed the page.",averageTimeSpent:"Average page time",averageTimeSpentDesc:"The average amount of time spent on the sales page.",bounceRate:"Bounce Rate",bounceRateDesc:"Rate of unique viewers who landed on the sales page and left without any interaction.",totalCTAClicked:"Total CTA Clicked",totalCTAClickedDesc:"Total number of times all the CTAs in the sales page have been clicked.",totalVideoReplies:"Total Video Replies",totalVideoRepliesDesc:"Total number of video replies submitted.",avgPlayPercentage:"Average Video Viewed Percentage",avgPlayPercentageDesc:"The average duration of time spent on watching the video.",documentViews:"Total Document Views",documentViewsDesc:"Total number of times all documents have been viewed.",overallEngagementReports:"Overall Sales Page Engagement Report",engagementReportEmptyDesc:"Seems like your users haven’t engaged with any of the videos.",userLabel:"User:",singleEngagementReportsDesc:"Here, you can track how the sales page has performed for each member of your team.",totalPageLoads:"Unique Page Loads ",totalPageLoadsTooltip:"The number of times unique viewers have viewed the page.",engagementRate:"Engagement Rate ",engagementRateTooltip:"Rate of unique viewers who landed on the sales page and interacted with its content.",usersLabel:"Users",ctaClicks:"CTA CLICKS",ctaClicksEmptyDesc:"Hang Tight! Your viewers haven’t interacted with any CTAs yet.",ctaClicksTooltip:"Total number of CTAs clicked inside the page (FB links, buttons, and other links).",loadingDesc:"Please wait... All good things take time.",totalPageClicks:"Total page clicks",noOfClicks:"Number of clicks:",link:", Link:",numberOfClicks:"Number of clicks:",viewReplies:"Show Replies",showViewers:"Show Viewers",showClicks:"Show Clicks",noViewsWarning:"Sorry, there are no views to show.",noClicksWarning:"Sorry, there are no clicks to show",noRepliessWarning:"Sorry, there are no replies to show",noReportsToDownload:"Sorry! there are no reports to download"}},init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t,i){var n=i(547);e.exports=function(e,t){return n(e,t)}},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(141),i(678),i(48),i(12)],void 0===(r=function(e,t,i,n,r,o,a){"use strict";return a=a.default,{UPLOAD_REQUEST:0,PREVIEW_REQUEST:1,RENDER_REQUEST:2,MERGE_RENDER_REQUEST:3,COMPRESS_REQUEST:4,CONVERT_REQUEST:5,GIF_REQUEST:6,STREAMING_REQUEST:7,PERSONALIZATION_REQUEST:8,GENERATE_ANIMATED_PREVIEW_REQUEST:9,VIRTUAL_BG_OPERATION:20,initialize:function(t,i,s){return{interval:null==t?3e3:t,pollTimeout:(new Date).getTime()/1e3+(null==i?7200:i),latestWindow:[],init:function(){this.operationIdArray=[],this.assetId=void 0,this.expectedOperationType=void 0,this.operationId=void 0,this.pollErrorCount=0,this.timeRemaining=void 0,this.pollingAction,this.clientLogSent=!1},getStatus:function(e,t,i,n,r){this.init(),e&&e.constructor===Array?(this.operationIdArray=e,this.operationId=this.operationIdArray.pop()):this.operationId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.ping()},getAssetStatus:function(e,t,i,n,r,o,a){this.init(),this.assetId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.expectedOperationType=o,this.forExtnVBG=a,this.ping()},ping:function(){if("stop"!==this.pollingAction)if((new Date).getTime()/1e3>this.pollTimeout)this.errorHandler&&this.errorHandler(n.pingTooLong);else if(null!=this.operationId||null!=this.assetId){var t=this;r.statusOf(s,this.operationId,this.assetId,this.expectedOperationType,(function(e){if(e){if(null===e||"null"===e||""===JSON.stringify(e).trim())return setTimeout((function(){t.ping()}),t.interval),void a.postErrorsToLog({stackTrace:"Null value returned for statuspoller ",assetId:t.assetId,operationId:t.operationId});if(void 0===e.status&&e.operation_id)setTimeout((function(){t.ping()}),t.interval);else{if("error"==e.status)t.pollErrorCount++,t.pollErrorCount<=4&&setTimeout((function(){t.ping()}),t.interval),console.log("error!!!");else if(50==e.status)t.waitingHandler&&t.waitingHandler(e.data.text),setTimeout((function(){t.ping()}),t.interval);else if(51==e.status||52==e.status){if(e.data.progress>=0&&e.data.progress<=100&&(t.latestWindow.push(e.data),t.latestWindow.length>3&&t.latestWindow.splice(0,t.latestWindow.length-3)),t.latestWindow.length>1){var i=t.latestWindow[t.latestWindow.length-1].progress-t.latestWindow[0].progress,r=t.latestWindow[t.latestWindow.length-1].ts-t.latestWindow[0].ts;i>0&&r>0&&(t.timeRemaining=Math.round(r*(100-t.latestWindow[t.latestWindow.length-1].progress)/i))}t.progressHandler&&t.progressHandler(e.data.text,e.data.progress,t.timeRemaining),setTimeout((function(){t.ping()}),t.interval)}if(("error"==e.status&&t.pollErrorCount>4||54==e.status)&&t.errorHandler){var o=n.somethingWentWrong;null!=e.data&&null!=e.data.text&&(o=e.data.text);var s={reason:o,state:e.data.state};t.errorHandler(s)}53==e.status&&(null!=t.expectedOperationType&&e.operationtype!=t.expectedOperationType?(e.data.text=n.processPending,t.progressHandler(e.data.text,e.data.progress,t.timeRemaining,e.operationtype,e.status),setTimeout((function(){t.ping()}),t.interval)):t.operationIdArray&&t.operationIdArray.length>0?(t.operationId=t.operationIdArray.pop(),t.ping()):t.completeHandler&&t.completeHandler(e))}}else setTimeout((function(){t.ping()}),t.interval)}),(function(i){if(setTimeout((function(){t.ping()}),t.interval),!t.clientLogSent){var n=new o({digest:e("#digest").val()}),r={authoringAssetId:t.assetId,description:"STATUS_POLLER_ERROR",stackTrace:"Error while connecting server status from server. assetId-"+t.assetId+" status-"+i.status};n.logClientData([r],!1,(function(){}),(function(){})),t.clientLogSent=!0}}),this.forExtnVBG)}},stop:function(){this.pollingAction="stop"}}}}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return w}));i(77);var n=i(1),r=i.n(n),o=i(36),a=i.n(o),s=i(37),l=i.n(s),u=i(49),c=i.n(u),d=i(54),h=i.n(d),p=i(41),f=i.n(p),g=(i(136),i(24),i(35)),m=i.n(g),v=i(394),y=i.n(v);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=f()(e);if(t){var r=f()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return h()(this,i)}}var w=function(t){c()(n,t);var i=b(n);function n(){return a()(this,n),i.apply(this,arguments)}return l()(n,[{key:"initialize",value:function(t){this.id=t.id,this.showAsModal=t.showAsModal,this.isVirtualBg=t.isVirtualBg,this.$el=e("#".concat(this.id))}},{key:"render",value:function(){var t=this,i=!0;"true"==e("#isTestimonial").val()&&(i=!1),y()({showAsModal:this.showAsModal,showHippoIcon:i,isVirtualBg:this.isVirtualBg},function(i,n){r()(this,t),this.$el.empty().append(e(n)),this.$el.find("#progressBackdrop").show(),this.$el.removeClass("hide")}.bind(this))}},{key:"remove",value:function(){var e=this;setTimeout(function(){r()(this,e),this.$el.empty().addClass("hide")}.bind(this),800)}},{key:"updateValues",value:function(e,t){this.updateProgress(e),this.updateProgressText(t)}},{key:"updateProgress",value:function(e){var t=0===e?0:20;this.$el.find("#progressFillStrip").animate({width:"".concat(e,"%")},t)}},{key:"updateProgressText",value:function(e){this.$el.find("#progressText").text(e)}}]),n}(m.a.View)}).call(this,i(2))},function(e,t,i){"use strict";i.d(t,"a",(function(){return as})),i.d(t,"b",(function(){return ss}));i(220),i(46),i(24),i(66),i(93);var n=i(1),r=i.n(n),o=i(0),a=i.n(o);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}function u(e,t){if(null==e)return{};var i,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)i=o[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}var c=i(57),d=i.n(c),h=!1,p=a.a.createContext(null),f="entering",g="entered",m=function(e){function t(t,i){var n;n=e.call(this,t,i)||this;var r,o=i&&!i.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(r="exited",n.appearStatus=f):r=g:r=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",n.state={status:r},n.nextCallback=null,n}l(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var i=t.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var i=this.state.status;this.props.in?i!==f&&i!==g&&(t=f):i!==f&&i!==g||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,i,n=this.props.timeout;return e=t=i=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,i=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:i}},i.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===f?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e){var t=this,i=this.props.enter,n=this.context?this.context.isMounting:e,r=this.props.nodeRef?[n]:[d.a.findDOMNode(this),n],o=r[0],a=r[1],s=this.getTimeouts(),l=n?s.appear:s.enter;!e&&!i||h?this.safeSetState({status:g},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:f},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:g},(function(){t.props.onEntered(o,a)}))}))})))},i.performExit=function(){var e=this,t=this.props.exit,i=this.getTimeouts(),n=this.props.nodeRef?void 0:d.a.findDOMNode(this);t&&!h?(this.props.onExit(n),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(n),e.onTransitionEnd(i.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(n)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(n)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var i=this.props.nodeRef?this.props.nodeRef.current:d.a.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(i&&!n){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],o=r[0],a=r[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,i=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,u(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(p.Provider,{value:null},"function"==typeof i?i(e,n):a.a.cloneElement(a.a.Children.only(i),n))},t}(a.a.Component);function v(){}m.contextType=p,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},m.UNMOUNTED="unmounted",m.EXITED="exited",m.ENTERING=f,m.ENTERED=g,m.EXITING="exiting";var y,b,w=m;var E="out-in",_="in-out",S=function(e,t,i){return function(){var n;e.props[t]&&(n=e.props)[t].apply(n,arguments),i()}},T=((y={})[E]=function(e){var t=e.current,i=e.changeState;return a.a.cloneElement(t,{in:!1,onExited:S(t,"onExited",(function(){i(f,null)}))})},y[_]=function(e){var t=e.current,i=e.changeState,n=e.children;return[t,a.a.cloneElement(n,{in:!0,onEntered:S(n,"onEntered",(function(){i(f)}))})]},y),C=((b={})[E]=function(e){var t=e.children,i=e.changeState;return a.a.cloneElement(t,{in:!0,onEntered:S(t,"onEntered",(function(){i(g,a.a.cloneElement(t,{in:!0}))}))})},b[_]=function(e){var t=e.current,i=e.children,n=e.changeState;return[a.a.cloneElement(t,{in:!1,onExited:S(t,"onExited",(function(){n(g,a.a.cloneElement(i,{in:!0}))}))}),a.a.cloneElement(i,{in:!0})]},b),k=function(e){function t(){for(var t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).state={status:g,current:null},t.appeared=!1,t.changeState=function(e,i){void 0===i&&(i=t.state.current),t.setState({status:e,current:i})},t}l(t,e);var i=t.prototype;return i.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===f&&e.mode===_?{status:f}:!t.current||(i=t.current,n=e.children,i===n||a.a.isValidElement(i)&&a.a.isValidElement(n)&&null!=i.key&&i.key===n.key)?{current:a.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var i,n},i.render=function(){var e,t=this.props,i=t.children,n=t.mode,r=this.state,o=r.status,s=r.current,l={children:i,current:s,changeState:this.changeState,status:o};switch(o){case f:e=C[n](l);break;case"exiting":e=T[n](l);break;case g:e=s}return a.a.createElement(p.Provider,{value:{isMounting:!this.appeared}},e)},t}(a.a.Component);k.propTypes={},k.defaultProps={mode:E};var x=k;function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function P(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var I=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((i=e).classList?i.classList.remove(n):"string"==typeof i.className?i.className=P(i.className,n):i.setAttribute("class",P(i.className&&i.className.baseVal||"",n)));var i,n}))},R=function(e){function t(){for(var t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1];t.removeClasses(r,"exit"),t.addClass(r,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,i)},t.onEntering=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1]?"appear":"enter";t.addClass(r,o,"active"),t.props.onEntering&&t.props.onEntering(e,i)},t.onEntered=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1]?"appear":"enter";t.removeClasses(r,o),t.addClass(r,o,"done"),t.props.onEntered&&t.props.onEntered(e,i)},t.onExit=function(e){var i=t.resolveArguments(e)[0];t.removeClasses(i,"appear"),t.removeClasses(i,"enter"),t.addClass(i,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var i=t.resolveArguments(e)[0];t.addClass(i,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var i=t.resolveArguments(e)[0];t.removeClasses(i,"exit"),t.addClass(i,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,i){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,i]},t.getClassNames=function(e){var i=t.props.classNames,n="string"==typeof i,r=n?""+(n&&i?i+"-":"")+e:i[e];return{baseClassName:r,activeClassName:n?r+"-active":i[e+"Active"],doneClassName:n?r+"-done":i[e+"Done"]}},t}l(t,e);var i=t.prototype;return i.addClass=function(e,t,i){var n=this.getClassNames(t)[i+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===i&&r&&(n+=" "+r),"active"===i&&e&&e.scrollTop,n&&(this.appliedClasses[t][i]=n,function(e,t){e&&t&&t.split(" ").forEach((function(t){return n=t,void((i=e).classList?i.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(e,n))},i.removeClasses=function(e,t){var i=this.appliedClasses[t],n=i.base,r=i.active,o=i.done;this.appliedClasses[t]={},n&&I(e,n),r&&I(e,r),o&&I(e,o)},i.render=function(){var e=this.props,t=(e.classNames,u(e,["classNames"]));return a.a.createElement(w,A({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(a.a.Component);R.defaultProps={classNames:""},R.propTypes={};var D=R,O=i(3),N=(i(434),i(9)),L=i(38),M={PRE_RECORD:1,RECORD:2,POST_RECORD:3,UPLOAD_STATUS:4,IMPORT_VIDEO:5,ERROR:6},F=1,U=i(26);function B({tokenType:e,integrationType:t,userId:i}){let n=`${(new Date).getTime()}$$${e}$$${t}`;return i&&(n+="$$"+i),btoa(n)}var V=i(21),z=i.n(V),H=i(87),j=i.n(H),G=i(361),q=i.n(G),W=i(247),$=i.n(W);const Y="INFO",K="ERROR",J="DEBUG",X="WARN";var Q=i(5);const{MESSAGE:Z,LOG_SOURCE:ee,APP_NAME:te,INITIATOR:ie,LOG_TYPE:ne,REQUEST_PATH:re,DATE_TIME:oe,REQUEST_BROWSER:ae,USER_ID:se,LOG_UID:le,INTEGRATION_TYPE:ue,ASSET_ID:ce}={APP_NAME:"app_name",TENANT_ID:"tenant_id",API_TOTAL_TIME:"api_total_time",VIEW_TIME:"view_time",REQUEST_TIME:"req_time",METHOD_NAME:"method_name",LINE_NUMBER:"line_num",LOG_LEVEL:"log_level",DATE_TIME:"datetime",USER_ID:"user_id",REQUEST_ID:"request_id",REQUEST_PATH:"req_path",REQUEST_METHOD:"req_method",REQUEST_METHOD_NAME:"req_action",REQUEST_QUERY_PARAMS:"req_query_params",REQUEST_PARAMETERS:"req_params",REQUEST_PATH_PARAMETERS:"req_path_params",REQUEST_REFERER:"req_referer",IS_REQUEST:"is_req",MESSAGE:"msg",REQUEST_IP:"request_ip",LOG_SOURCE:"log_source",ERROR_TRACE:"error_trace",LOG_TYPE:"log_type",EVENT_NAME:"event_name",METRIC_NAME:"metric_name",METRIC_TYPE:"metric_Type",METRIC_VALUE:"metric_value",ASSET_ID:"asset_id",REQUEST_BROWSER:"browser",INITIATOR:"initiator",RECORD_ID:"record_id",ENCRYPTED:"encrypted",FAILED_LOG_COUNT:"failed_log_count",LOG_UID:"log_uid",INTEGRATION_TYPE:"integration_type"};class de{constructor({module:e,integrationType:t=Q.q.PRODUCT,assetId:i,logUID:n,tokenType:r,token:o}){this.origin=window._HVDomain||"https://www.hippovideo.io",this.assetId=i||-1,this.logUID=n||B({integrationType:t,tokenType:r}),this.module=e,this.tokenType=r,this.token=o,this.integrationType=t,this.logBuffer=this._getLogsFromLocalStorage()}updateParams({assetId:e,logUID:t}){e&&(this.assetId=e),t&&(this.logUID=t)}log(e,t={}){const i={asset_id:this.assetId,logUID:this.logUID,module:this.module,...t};console.log(`[${J}] :: ${e} :: ${i}`)}info(e,t={}){this._logData(Y,e,t)}error(e,t={}){this._logData(K,e,t)}warn(e,t={}){this._logData(X,e,t)}_logData(e,t,i){i[Z]=t,i[ce]=this.assetId,i[ee]="HV_CLIENT",i[te]=this.module||"HV_CLIENT",i[ie]=this.initiator,i[ne]=e,i[re]=location?location.href:"Unable to locate request path",i[oe]=this._getZuluTimeInUTC(),i[ae]=navigator.userAgent&&navigator.userAgent.toString(),i[se]=this._getUserId(),this.logUID&&(i[le]=this.logUID),this.integrationType&&(i[ue]=this.integrationType),this._pushLogRecord(i),console.log(`[${e}] :: ${t} `,i)}_getUserId(){try{return window.HippoVideo&&HippoVideo.data.api.getProperty("userId")||this.userId}catch(e){}return null}_getZuluTimeInUTC(){return(new Date).toISOString().replace("T"," ").slice(0,23)}async _pushLogRecord(e,t){try{await this._getFederateTokenAndUpdateConfig();const i=this._constructLogRecord(e);this.firehose.putRecord(i,t||((e,t)=>{e&&(this._fallback([i]),console.error("COULD NOT PUSH LOG ",e))}))}catch(e){t&&t("exception: "+JSON.stringify(e))}}async _pushLogRecordInBatch(e,t){try{const i=e.map(e=>this._constructLogRecord(e));await this._getFederateTokenAndUpdateConfig();const n={Records:i,DeliveryStreamName:this.streamName};this.firehose.putRecordBatch(n,t||((e,t)=>{e&&(this._fallback(i),console.error("COULD NOT PUSH LOG ",e))}))}catch(e){t&&t("exception: "+JSON.stringify(e))}}_fallback(e){this.logBuffer=this.logBuffer.concat(...e),this._pushLogRecordInBatch(e,(e,t)=>{if(e){if(this.logBuffer.length>10){const e=this.logBuffer.map(e=>this._deconstructLogRecord(e));return this.logDataToServer({logIdentifierText:"Kinesis failed logs",data:e}),void this._clearLocalLogs()}this._addLogsToLocalStorage([...this.logBuffer])}})}_clearLocalLogs(){try{this.logBuffer=[],localStorage.removeItem("hv_failed_logs")}catch(e){}}_addLogsToLocalStorage(e){try{localStorage.setItem("hv_failed_logs",JSON.stringify(e))}catch(e){}}_getLogsFromLocalStorage(){try{const e=localStorage.getItem("hv_failed_logs");if(e)return JSON.parse(e)}catch(e){}return[]}_constructLogRecord(e){return{Record:{Data:"_"+this._getZuluTimeInUTC()+"_\t"+JSON.stringify(e)},DeliveryStreamName:this.streamName}}_deconstructLogRecord(e){try{const t=e.Record.Data.split("_\t");return{date:t[0],data:JSON.parse(t[1])}}catch(e){}return e}_setAWSCredentials(){const e=1e3*(window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.KinesisApiTimeout?Number(window.HippoVideo.AppRegistry.KinesisApiTimeout):10);this.streamName=this.cognitoConfig.stream_name;try{this.cognitoIdentityCredentials.clearCachedId()}catch(e){}this.cognitoIdentityCredentials=new j.a({IdentityId:this.cognitoConfig.identity_id,Logins:{"cognito-identity.amazonaws.com":this.cognitoConfig.token}},{region:"us-east-1",httpOptions:{timeout:e}});let t={region:"us-east-1",credentials:this.cognitoIdentityCredentials,httpOptions:{timeout:e}};this.firehose=new q.a(t)}async _sendRequest(e){try{return[await z()({method:"get",baseURL:this.origin,url:"/api/internal/log/identity",params:e,headers:{accept:"application/json"}}),null]}catch(e){return[null,e]}}_getFederateTokenAndUpdateConfig(e){return new Promise(async(t,i)=>{const n=()=>{this._setAWSCredentials(),e&&e(),t()};if(window.HippoVideo&&HippoVideo.isDelivery)HippoVideo.logCognito?(this.cognitoConfig=HippoVideo.logCognito,n()):i();else{const e=()=>{try{let e=this.cognitoConfigWithExpiry;if(!e){let t=localStorage.getItem("hv-logger-ftkn");if(!t)return null;e=JSON.parse(t)}return t(e.expiry)?(localStorage.removeItem("hv-logger-ftkn"),null):("string"==typeof e&&(e=JSON.parse(e)),JSON.parse(e.value))}catch(e){console.warn("Local storage permission error",e)}return null},t=e=>{const t=new Date,i=new Date(e);return t.getTime()>i.getTime()},r=e=>{try{this.cognitoConfigWithExpiry=JSON.stringify({value:JSON.stringify(e),expiry:new Date((new Date).getTime()+36e5)}),localStorage.setItem("hv-logger-ftkn",this.cognitoConfigWithExpiry)}catch(e){console.warn("Local storage permission error",e)}};this.cognitoConfig=e();let o=null;if(this.tokenType===Q.e.GUEST&&(o={token_type:this.tokenType,token:this.token}),this.cognitoConfig)n();else{const[e,t]=await this._sendRequest(o);if(e){const t=e.data;t&&t.status?(delete t.status,this.cognitoConfig=t,r(t),n()):i()}t&&i()}}})}logDataToServer({logIdentifierText:e,...t}){const i=$.a.initialize({digest:this.token,maxLogSize:1,verbose:!1});i.startSavingLogs(this.assetId,this.logUID);const n={asset_id:this.assetId,logUID:this.logUID,module:this.module,...t};i&&i.log(e,JSON.stringify(n)),i.stopSavingLogs()}}var he=i(250),pe=i(116),fe=i(251);class ge{constructor(e){const t=window._HVDomain||"https://www.hippovideo.io";this.token=e.token,this.tokenType=e.tokenType,this.email=e.email,this.cancelSources={create_recording:z.a.CancelToken.source(),import_video:z.a.CancelToken.source(),import_convert:z.a.CancelToken.source()};let i=pe.a;this.tokenType===Q.e.GUEST&&(i=he.a),this.tokenType===Q.e.VIDEO_PLAY_TOKEN&&(i=he.b);const n={baseURL:t+i,headers:{accept:"application/json"}};if(this.tokenType===Q.e.RECORDER_SDK_TOKEN){let e=`${this.tokenType}$$${this.token}`;n.headers.Authorization="Basic "+btoa(e)}if(this.tokenType===Q.e.AUTHENTICATION_TOKEN){let e=`${this.tokenType}$$${this.token}$$${this.email}`;n.headers.Authorization="Basic "+btoa(e)}this.axiosInstance=z.a.create(n)}_getRttValue(){try{return navigator.connection.rtt}catch(e){}return-1}createRecording({configuration:e,logUID:t}){let i={recording_configuration:JSON.stringify(e),logUID:t,rtt:this._getRttValue()},n={cancelToken:this.cancelSources.create_recording.token};return this.tokenType===Q.e.GUEST&&(i.token=this.token),this._sendRequest({url:"/record/new",method:"post",jsonData:i,additionalReqConfig:n})}cancelRequest({type:e}){e&&("create_recording"===e&&(this.cancelSources.create_recording.cancel(),this.cancelSources.create_recording=z.a.CancelToken.source()),"import_video"===e&&(this.cancelSources.import_video.cancel(),this.cancelSources.import_video=z.a.CancelToken.source()),"import_convert"===e&&(this.cancelSources.import_convert.cancel(),this.cancelSources.import_convert=z.a.CancelToken.source()))}convertVideo({assetId:e,videoId:t,compressionRequired:i,saveAsNew:n,token:r,convertSpeed:o}){let a={asset_id:e,video_id:t,compression_required:i,save_as_new:n};o&&(a.convert_speed=o),r&&(a.token=r);let s={cancelToken:this.cancelSources.import_convert.token};return this._sendRequest({url:"/convert",method:"post",formData:a,additionalReqConfig:s})}getImportedDetails({assetId:e}){let t="/import_details";return this.tokenType===Q.e.GUEST&&(t=`${t}/${this.token}`),this._sendRequest({url:t,method:"get",params:{asset_id:e}})}createVideoImport(e){let t={asset_id:e.assetId,file_name:e.fileName?e.fileName:"",description:e.description?e.description:"",size:e.size,tags:e.tags?e.tags:"",from_advanced_edit:e.fromAdvancedEdit,record_from_mobile:e.isMobile,contact_id:e.contactId,is_intro_outro_video:e.isIntroOutroVideo,logUID:e.logUID};e.token&&(t.token=e.token,t.referer=e.source),e.uniqueId&&(t.unique_id=e.uniqueId);let i={cancelToken:this.cancelSources.import_video.token};return this._sendRequest({url:"/import/new",method:"post",formData:t,additionalReqConfig:i})}mergeAndRender({assetId:e,projectJson:t,renderFrom:i}){const n=fe.a.serializeProjectJSON(JSON.parse(JSON.stringify(t)));let r={asset_id:e,data:JSON.stringify(n),render_from:i};const o=fe.a.getAuthDataInDom();for(const e in o)r[e]=o[e];return"video_token"===this.tokenType&&(r.token=this.token),this._sendRequest({url:"/render_video",method:"post",formData:r})}completeUpload({assetId:e,webcamId:t,screenId:i,recordingConfiguration:n,token:r}){let o={recording_configuration:n,asset_id:e};return t&&(o.webcam_id=t),i&&(o.screen_id=i),r&&(o.token=r),this._sendRequest({url:"/compress",method:"post",jsonData:o})}setRecordError({errorState:e,logUID:t}){const i={error_state:e,uid:t};return this.tokenType===Q.e.GUEST&&(i.token=this.token),this._sendRequest({url:"/set_record_error",method:"post",jsonData:i})}getFederatedAwsToken({region:e}){const t={region:e};return this._sendRequest({url:"/federated_aws_token",method:"get",params:t})}async _sendRequest({method:e="get",url:t,jsonData:i=null,formData:n=null,params:r={},headers:o={},additionalReqConfig:a={}}){try{let s=n;if(n){if("object"==typeof n&&null!==n){let e=new FormData;for(const t in n)e.append(t,n[t]);s=e}o["Content-Type"]="application/x-www-form-urlencoded"}i&&(o["Content-Type"]="application/json");const l={url:t,method:e,data:i||s,headers:o,params:r,...a};return[await this.axiosInstance.request(l),null]}catch(e){if(z.a.isCancel(e)){return[null,{message:e.message,is_cancelled:!0}]}return[null,e]}}}var me=i(2),ve=i.n(me),ye=i(248),be=i.n(ye),we=i(14),Ee=i.n(we);i(48);const _e=()=>window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.isStageEnvironment||window.location.hostname.endsWith(".hippowiz.com")||window.location.hostname.endsWith(".hippovideo.us")?"stage":-1!==window.location.href.indexOf("localhost")||-1!==window.location.host.indexOf("127.0.0.1")?"local":"production";class Se{constructor(e){console.log("DATA TO THE UPLOADER >>> ",e);const t=e.bucket,i=e.key,n=e.acl;this.recorderModel=e.recorderModel,this.assetId=e.asset_id,this.digest=e.digest,this.IDENTITY_POOL_ID="local"==_e()?"us-east-1:8e44cb6f-5bb6-47a0-b6f7-e682b1827dc4":"us-east-1:df0a8fb6-f7ad-417c-be80-cdba8aa4a215",this.region="us-east-1",t&&-1!==t.indexOf("-in")&&(this.IDENTITY_POOL_ID="local"==_e()?"ap-south-1:3b87476b-e4de-43e1-85e9-9f24f060b566":"ap-south-1:b4a79053-b71d-4a2e-851b-c1a3fc4a403f",this.region="ap-south-1"),this.userUploadBucket=t,this.userUploadKey=i,this.initialized=!1,this.acl=n,this.userUploadId=void 0;let r="true"==(ve()("#isFreePlan").val()||"");this.useAccelerate=e.useAccelerate||!r,this.finishedBlobUpload=!1,this.uploadQueue=[],this.uploadStatsData={},this.uploadError=!1,this.MAX_UPLOAD_TRIES=5,this.uploadPartHandlers=[],this.isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}startMultiartUpload(){let e=this;return new Promise((t,i)=>{this.updateCredentials().then(()=>{let n={Bucket:e.userUploadBucket,Key:e.userUploadKey,ACL:e.acl};e.s3.createMultipartUpload(n,(function(r,o){r?(console.log(r,r.stack),-1!=JSON.stringify(r).indexOf("NetworkingError")?setTimeout(()=>e.retryCreateMultipartUpload(n,t,i),5e3):i(r)):(e.userUploadId=o.UploadId,e.initialized=!0,t())}))}).catch(i)})}retryCreateMultipartUpload(e,t,i){let n=this;this.s3.createMultipartUpload(e,(function(r,o){r?-1!=JSON.stringify(r).indexOf("NetworkingError")?setTimeout(()=>n.retryCreateMultipartUpload(e,t,i),5e3):i(r):(n.userUploadId=o.UploadId,n.initialized=!0,t())}))}updateCredentials(){return console.log("THIS1 ><<< ",this),new Promise(async(e,t)=>{console.log("THIS ><<< ",this.recorderModel);const[i,n]=await this.recorderModel.getFederatedAwsToken({region:this.region});if(i){const t=i.data;this.setS3Credentials(t),e()}n&&(console.error("error updating credentials",n),-1!=JSON.stringify(n).indexOf("Network Error")?this.retryUpdateCredentials(e,t):t(n))})}async retryUpdateCredentials(e,t){const[i,n]=await this.recorderModel.getFederatedAwsToken({region:this.region});if(i){const t=i.data;this.setS3Credentials(t),e()}n&&-1!=JSON.stringify(n).indexOf("Network Error")&&setTimeout(()=>this.retryUpdateCredentials(e,t),5e3)}setS3Credentials(e){if(e.error)return console.error("error getting federated aws token",e),void reject(e.error);const t=1e3*(window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.S3ApiTimeout?Number(window.HippoVideo.AppRegistry.S3ApiTimeout):600);try{this.cognitoIdentityCredentials.clearCachedId()}catch(e){}this.cognitoIdentityCredentials=new j.a({IdentityPoolId:this.IDENTITY_POOL_ID,IdentityId:e.identity_id,Logins:{"cognito-identity.amazonaws.com":e.token}},{region:this.region,httpOptions:{timeout:t},maxRetries:0}),Ee.a.events.on("retry",(function(e){if("RequestTimeTooSkewed"===e.error.name){let t=Date.parse(e.httpResponse.headers.date),i=(new Date).getTime();console.log("AWS Timestamp ::: "+new Date(t)),console.log("Browser Timestamp ::: "+new Date(i)),Ee.a.config.systemClockOffset=t-i,e.error.retryable=!0}})),this.s3=new be.a({apiVersion:"2006-03-01",region:this.region,credentials:this.cognitoIdentityCredentials,params:{Bucket:this.bucket},useAccelerateEndpoint:this.useAccelerate,httpOptions:{timeout:t},maxRetries:0})}refreshCognitoCredentials(){this.cognitoIdentityCredentials&&this.cognitoIdentityCredentials.refresh(e=>{console.error("REFRESH COGNITO CRED ",e)})}getCognitoIdentityCredentialsObject(e){return new j.a({IdentityPoolId:this.IDENTITY_POOL_ID,IdentityId:e.identity_id,Logins:{"cognito-identity.amazonaws.com":e.token}},{region:this.region,httpOptions:{timeout:AWS_API_TIMEOUT}})}uploadPart(e,t,i,n,r){console.log("S3Uploader.uploadBlob blob",i),console.info("S3Uploader.uploadBlob uploading");const o=i.size;let a={Bucket:this.userUploadBucket,Key:this.userUploadKey,PartNumber:t,UploadId:this.userUploadId,Body:i};return console.log("trying upload .... "+a),this.s3.uploadPart(a,(function(i,a){i?r(e,i,t):n(e,o,{ETag:a.ETag,PartNumber:Number(this.request.params.PartNumber)})}))}uploadPartSuccess(e){console.info("part upload complete",e)}uploadPartError(e,t){console.log("UPLOAD ERROR ",e,"Params ",t)}finishMultipartUpload(e){const t=this;return new Promise((i,n)=>{e.sort((function(e,t){return e.PartNumber-t.PartNumber}));let r={Bucket:t.userUploadBucket,Key:t.userUploadKey,UploadId:t.userUploadId,MultipartUpload:{Parts:e}};console.log("ASSSETID",t.assetId,r),t.s3.completeMultipartUpload(r,(function(e,o){e?(console.log(e,e.stack),-1!=JSON.stringify(e).indexOf("Network Error")?setTimeout(()=>t.retryFinishMultipartUpload(r,i,n),5e3):n({error:e,assetId:t.assetId})):i({data:o,assetId:t.assetId})}))})}async retryFinishMultipartUpload(e,t,i){let n=this;this.s3.completeMultipartUpload(e,(function(r,o){r?(console.log(r,r.stack),-1!=JSON.stringify(r).indexOf("Network Error")?setTimeout(()=>n.retryFinishMultipartUpload(e,t,i),5e3):i({error:r,assetId:n.assetId})):t({data:o,assetId:n.assetId})}))}cancelMultipartUpload(e){return console.log("CANCELLING MULTIPART UPLOAD"),new Promise((t,i)=>{for(let t in e){const i=e[t];try{i.abort()}catch(e){}}const n={Bucket:this.userUploadBucket,Key:this.userUploadKey,UploadId:this.userUploadId};this.s3.abortMultipartUpload(n,(function(e,n){e?(console.error("error while aborting multipartupload",{error:e}),i(e)):(console.warn("aborted multipartupload",{res:n}),t(n))}))})}onUploadPartProgress(){that.uploadStatsData[this.params.PartNumber].completed=progress.loaded;var e=Math.round(progress.loaded/progress.total*100),t=(new Date).getTime();if(curProgressCallStartTime=t,navigator.connection&&rttValues.push(navigator.connection.rtt),(new Date).getTime()/1e3-rttValueLastUpdated>=pushRttValuePerXSeconds){e=Math.round(progress.loaded/progress.total*100);for(var i=(new Date).getTime(),n=uploadParams.Body.size*e/100/(i-startTime),r=0,o=0;o<rttValues.length;o++)r+=rttValues[o];console.info("RTT VALUE UPDATE",{asset_id:that.assetId,part_num:Number(that.fileUploadRates.length+e/100||0),on_upload_complete:!1,rtt:Number(r/rttValues.length||0),avg_upload_rate:Number(n||0),is_finished:that.finishedRecording,media_type:that.type,user_upload_key:that.userUploadKey}),rttValueLastUpdated=(new Date).getTime()/1e3}that.calculateProgress()}async uploadFile(e,t){try{const i=this;await this.updateCredentials();const n={Bucket:i.userUploadBucket,Key:i.userUploadKey,Body:e,ACL:i.acl};return[await this._startS3Upload(n,t),null]}catch(e){return[null,e]}}cancelFileUpload(){try{setTimeout(this.uploadResponse.abort.bind(this.uploadResponse),1e3)}catch(e){}}_startS3Upload(e,t){return new Promise((i,n)=>{this.uploadResponse=this.s3.upload(e,(function(e,t){e?(-1!=JSON.stringify(e).indexOf("TimeoutError")||-1!=JSON.stringify(e).indexOf("Timeout")||JSON.stringify(e).indexOf("NetworkingError"),console.log("There was an error uploading video: ",e),n(e.message)):i(t)})).on("httpUploadProgress",(function(e){t&&t(e)}))})}sendAbortRequest(e){var t=this,i={Bucket:t.userUploadBucket,Key:t.userUploadKey,UploadId:t.userUploadId};t.s3.abortMultipartUpload(i,(function(i,n){i?console.error("error while aborting multipartupload",{error:i}):console.warn("aborted multipartupload",{res:n}),e(t)}))}abortCurrentUploads(e){for(var t in e.uploadPartHandlers)try{e.uploadPartHandlers.hasOwnProperty(t)&&(e.uploadPartHandlers[t].params&&(e.uploadStatsData[e.uploadPartHandlers[t].params.PartNumber].completed=0),e.uploadPartHandlers[t].abort(),delete e.uploadPartHandlers[t])}catch(e){}e.uploadPartHandlers={}}}const Te=["webcam","screen","file"];class Ce{constructor({webCam:e,audio:t,screenRecord:i,file:n,recorderModel:r,uploadProgressCallback:o}){console.log("DATA >>> ",r),this.recorderModel=r,this.uploaderData={},this.uploaderParts={},this.uploadedParts={},this.currentUploaderDataSize={},this.totalUploaderDataSize={},this.uploaders={},this.incompleteUploadParts={},this.uploadersCompleted={},this.uploadCompleted={},this.uploadPartHandlers={},this.uploadEntitiesForEachFile={},this.finishUploadCalled=!1,this.uploadProgressCallback=o,this.uploadProgressDetails={type:"upload"},this.uploadStartTime=null,this.optimalUploadTime=1400,this.uploadTimeThreshold=85e3,this.desirableProcessCount={},this.uploadQueue={},this.latestUploadTime={},this.uploadError={},this.currentProcessCount={},this.uploadStats={},this.uploadRetries={},this.activeUploaderTypes=[],this.cognitoError={},this.UPLOAD_RETRY_INTERVAL=5e3,(e||t)&&this.addUploader("webcam"),i&&this.addUploader("screen"),n&&this.addUploader("file"),this.checkAndCompleteMultipartUpload=this.checkAndCompleteMultipartUpload.bind(this),this.onUploadPartSuccess=this.onUploadPartSuccess.bind(this),this.onUploadPartFailure=this.onUploadPartFailure.bind(this),this.sendUploadProgress=this.sendUploadProgress.bind(this),this.calculateProgress=this.calculateProgress.bind(this),console.log("this.uploaderData ",this.uploaderData)}initializeUploaders(e){return new Promise(async(t,i)=>{console.log("INITIALIZING ALL UPLOADERS ",e),this.uploaderConfig=e;try{e.webcamId&&await this.initializeUploader("webcam"),e.screenRecord&&await this.initializeUploader("screen"),t()}catch(e){this.uploadError[e.type]=!0,i(e)}})}addUploader(e){console.log("ADDING UPLOADER ",e),this.activeUploaderTypes.push(e),this.uploaderData[e]={},this.uploadCompleted[e]={},this.uploadedParts[e]=[],this.incompleteUploadParts[e]=[],this.uploadersCompleted[e]=!1,this.currentUploaderDataSize[e]=0,this.totalUploaderDataSize[e]=0,this.uploaderParts[e]=1,this.uploadQueue[e]=[],this.uploadRetries[e]={},this.uploadError[e]=!1,this.desirableProcessCount[e]=1,this.currentProcessCount[e]=0,this.uploadStats[e]={},this.cognitoError[e]=!1}initializeUploader(e){let t=this;return new Promise((i,n)=>{if(!e||!Te.includes(e))throw new Error("INVALID_UPLOADER_TYPE");console.log("INITIALIZING UPLOADER ",e,this.uploaderConfig);let r={bucket:this.uploaderConfig.uploadBucket,acl:"private",digest:this.uploaderConfig.digest,asset_id:this.uploaderConfig.asset_id,recorderModel:this.recorderModel};"webcam"===e&&(r.key=this.uploaderConfig.webcamKey),"screen"===e&&(r.key=this.uploaderConfig.screenKey),console.log("DDD ",r);const o=new Se(r);o.startMultiartUpload().then(()=>{console.log("THIS UPLOADERS ",t.uploaders),this.uploaders[e]=o,this.uploadPartHandlers[e]={},this.checkAndUpload(e),this.uploadStartTime=new Date,console.log("UPLOADERS ",this.uploaders),i()}).catch(t=>n({type:e,error:t}))})}retryUpload(){return new Promise((e,t)=>{let i=0;this.activeUploaderTypes.forEach(n=>{this.uploadError[n]?(this.resetUploaders(n),this.initializeUploader(n).then(()=>{i++,i===this.activeUploaderTypes.length&&(this.uploadError[n]=!1,e())}).catch(e=>{this.uploadError[e.type]=!0,t(e)})):i++})})}resetUploaders(e){this.uploaders[e]=null,this.uploadCompleted[e]={},this.uploadedParts[e]=[],this.incompleteUploadParts[e]=[],this.uploadersCompleted[e]=!1,this.currentUploaderDataSize[e]=0,this.uploadRetries[e]={},this.uploadProgressDetails={type:"upload"},this.uploadError[e]=!1,this.desirableProcessCount[e]=1,this.currentProcessCount[e]=0,this.uploadStats[e]={}}calculateProgress(e){console.log("PROGRESS 123",e);let t=e&&e.loaded||0,i=e&&e.total||0;if(!e){for(let e in this.uploadCompleted){const i=this.uploadCompleted[e];for(let e in i)t+=i[e]}for(let e in this.totalUploaderDataSize)i+=this.totalUploaderDataSize[e]}console.log("TESTING CALCULATE PROGRESS ",JSON.stringify(this.uploadCompleted),JSON.stringify(this.totalUploaderDataSize));let n=t/((new Date-this.uploadStartTime)/1e3),r=Math.round((i-t)/n);return{type:"upload",totalSize:i,totalUploaded:t,completedPercent:Math.round(t/i*100),timeRemaining:r,completed:!1}}setUploadProgressCallback(e){console.log("SETTING UPLOAD PROGRESS CALLBACK ",this.uploadProgressCallback),this.uploadProgressCallback?e=this.uploadProgressCallback:this.uploadProgressCallback=e,e(this.uploadProgressDetails)}isUploadComplete(){return!!this.uploadProgressDetails&&!!this.uploadProgressDetails.completed}onDataAvailable(e,t){if(!e||!Te.includes(e))throw new Error("INVALID_UPLOADER_TYPE");if(!this.uploaderData.hasOwnProperty(e))throw new Error("UPLOADER_NOT_FOUND");const i=this.uploaderParts[e];this.uploaderData[e][i]||(this.uploaderData[e][i]=[]),this.uploaderData[e][i].push(t);const n=this.getDataSize(t);this.currentUploaderDataSize[e]+=n,this.totalUploaderDataSize[e]+=n,(this.currentUploaderDataSize[e]>5242880||this.finishUploadCalled)&&(console.log("SIZE REACHED"),this.uploadQueue[e].push({partNumber:i}),this.currentUploaderDataSize[e]=0,this.uploadRetries[e][i]=0,this.uploadStats[e][i]={},this.uploaders[e]&&this.checkAndUpload(e),!this.finishUploadCalled&&this.uploaderParts[e]++)}async checkAndUpload(e){if(console.log("this.uploadError ",this.uploadError),!this.uploadError[e]){if(this.latestUploadTime[e]){const t=Math.floor(this.uploadTimeThreshold/this.latestUploadTime[e]);this.latestUploadTime[e]<this.uploadTimeThreshold?(this.slowUpload=!1,this.desirableProcessCount[e]=Math.max(Math.round(.75*t),1)):(this.slowUpload=!0,this.desirableProcessCount[e]=Math.max(t,1))}if(console.log("CURRENT PROCESS COUNT "),console.log(this.currentProcessCount),console.log(this.desirableProcessCount),console.log(this.uploadQueue),this.cognitoError[e])try{await this.uploaders[e].updateCredentials()}catch(e){}if(this.currentProcessCount[e]<this.desirableProcessCount[e]){let t=Math.min(this.desirableProcessCount[e]-this.currentProcessCount[e],this.uploadQueue[e].length);for(;t>0;){const i=this.uploadQueue[e].pop(0);console.log("up ",i),this.uploadStats[e][i.partNumber]||(this.uploadStats[e][i.partNumber]={}),this.uploadStats[e][i.partNumber].start=(new Date).getTime(),this.constructAndUploadBlob(e,i.partNumber),this.currentProcessCount[e]++,t--}}}}sendUploadProgress(){this.uploadProgressCallback&&this.uploadProgressCallback(this.uploadProgressDetails)}constructAndUploadBlob(e,t){console.log("CONSTRUCT AND UPLOA BLOB");const i=this;let n=new Blob(this.uploaderData[e][t],{type:"video/webm"});this.incompleteUploadParts[e]=this.incompleteUploadParts[e].filter(e=>t!==e),this.uploaders[e]?(this.uploadPartHandlers[e][t]=this.uploaders[e].uploadPart(e,t,n,this.onUploadPartSuccess,this.onUploadPartFailure),this.uploadPartHandlers[e][t].on("httpUploadProgress",n=>{console.log("TTTTTT ",i.uploadProgressDetails,n),i.uploadCompleted[e][t]=n.loaded,i.uploadProgressDetails=i.calculateProgress(),i.sendUploadProgress(),console.log(`PROGRESS [${t}] : `,n,i.uploadProgressDetails)}),console.log("PART NUMBER INCREMENTED ",this.uploaderParts)):this.incompleteUploadParts[e].push(t)}finishUpload(){console.log("CALLING FINISH UPLOAD ",this.uploaders),this.finishUploadCalled=!0;const e=this;return new Promise((t,i)=>{if(Object.keys(this.uploaders).length===this.activeUploaderTypes.length)e.checkAndCompleteMultipartUpload(t,i);else{const n=setInterval(()=>{Object.keys(this.uploaders).length===this.activeUploaderTypes.length?(clearInterval(n),e.checkAndCompleteMultipartUpload(t,i)):console.log("UPLOADER STILL NOT INITALIZED")},1e3)}})}checkAndCompleteMultipartUpload(e,t){for(let i of Te){if(console.log("CALLING FINISH UPLOA ",i),!this.uploaders[i])continue;if(this.uploadersCompleted[i])continue;console.log("CALLING FINISH UPLOAD 1"),this.checkAndUpload(i);const n=setInterval(()=>{this.uploadError[i]&&clearInterval(n),this.uploaderParts[i]===this.uploadedParts[i].length&&(clearInterval(n),this.uploaders[i].finishMultipartUpload(this.uploadedParts[i]).then(({data:n,assetId:r})=>{if(window.isError)return console.log("MULTIPART FINISH ERROR manual trigger "),this.uploadProgressDetails&&(this.uploadProgressDetails.error=!0,this.uploadProgressDetails.errorType="MULTIPART_FINISH",this.sendUploadProgress()),void t(r);console.log("MULTIPART FINISH SUCCESS ",n),this.uploadersCompleted[i]=!0,this.isAllUploadCompleted()&&(this.uploadProgressDetails&&(this.uploadProgressDetails.completed=!0,this.sendUploadProgress()),e(r))}).catch(({error:e,assetId:i})=>{console.log("MULTIPART FINISH ERROR ",e),this.uploadProgressDetails&&(this.uploadProgressDetails.error=!0,this.uploadProgressDetails.errorType="MULTIPART_FINISH",this.sendUploadProgress()),t(i)}))},1e3)}}isAllUploadCompleted(){let e=!0;for(let t of Te)!1===this.uploadersCompleted[t]&&(e=!1);return e}onUploadPartSuccess(e,t,i){this.uploadedParts[e].push(i),this.currentProcessCount[e]--;const n=i.PartNumber;console.log("US ",this.uploadStats);const r=(new Date).getTime()-this.uploadStats[e][i.PartNumber].start;this.uploadStats[e][i.PartNumber].tt=r,t>=5242880&&(this.latestUploadTime[e]=r),this.incompleteUploadParts[e]=this.incompleteUploadParts[e].filter(e=>e!==n),console.log("On upload part success ",this.incompleteUploadParts[e],this.uploadStats[e]),this.checkAndUpload(e)}onUploadPartFailure(e,t,i){console.log("err ",t),-1==JSON.stringify(t).indexOf("RequestAbortedError")&&(-1!=JSON.stringify(t).indexOf("TimeoutError")||-1!=JSON.stringify(t).indexOf("Timeout")||JSON.stringify(t).indexOf("NetworkingError"),console.error("s3.uploadPart error ",{partNumber:i,error:t}),-1!=JSON.stringify(t).indexOf("CredentialsError")&&(console.log("CRED ERROR ",JSON.stringify(t)),this.cognitoError[e]=!0),this.currentProcessCount[e]--,this.uploadError[e]||setTimeout(()=>{console.log(`Retrying upload of ${e} part: #${i}`),this.latestUploadTime[e]=9999999,this.uploadStats[e][i].start=(new Date).getTime(),this.uploadRetries[e][i]+=1,this.uploadQueue[e].push({partNumber:i}),this.uploadStats[e][i].retries=this.uploadRetries[e][i],this.uploadStats[e][i].completed=0,this.checkAndUpload(e)},this.UPLOAD_RETRY_INTERVAL),this.incompleteUploadParts[e].includes(i)||this.incompleteUploadParts[e].push(i))}uploadFile(e,t,i){e&&(e.recorderModel=this.recorderModel),this.uploadStartTime=new Date,this.fileUploader=new Se(e);return this.fileUploader.uploadFile(t,e=>{i&&i(this.calculateProgress(e))})}cancelImport(){this.fileUploader&&this.fileUploader.cancelFileUpload()}cancelMultipartUpload(){for(let e of Te)this.uploadPartHandlers[e]&&this.uploaders[e].cancelMultipartUpload(this.uploadPartHandlers[e])}getObjectUrls({recordingConfig:e}){const t={};for(let i of Te){const n=this.uploaderParts[i];console.log("TYPE : ",i),console.log("TOTAL PARTS : ",n),console.log("UPLOADER PARTS : ",this.uploaderParts[i]);let r=[];for(let e=1;e<=n;e++)console.log("LEN ",this.uploaderData[i][e]),r=r.concat(this.uploaderData[i][e]);let o="video";"webcam"!==i||e.webCam||(o="audio");let a=o+"/mp4";MediaRecorder.isTypeSupported("video/webm")&&(a="video/webm"),console.log("TYPE >>> ",a),r.length>0&&(t[i]=URL.createObjectURL(new Blob(r,{type:a})))}return console.log("RES ",t),t}getDataSize(e){return e.size?e.size:e.byteLength}destroy(){}}var ke=i(99);class xe{constructor({token:e,tokenType:t,email:i}){const n={baseURL:(window._HVDomain||"https://www.hippovideo.io")+pe.a,headers:{accept:"application/json"}};if(t===Q.e.RECORDER_SDK_TOKEN){let i=`${t}$$${e}`;n.headers.Authorization="Basic "+btoa(i)}if(t===Q.e.AUTHENTICATION_TOKEN){let r=`${t}$$${e}$$${i}`;n.headers.Authorization="Basic "+btoa(r)}this.axiosInstance=z.a.create(n)}statusOf({operationId:e,assetId:t,expectedOperationType:i}){const n={operation_id:e,asset_id:t,expected_operation_type:i};return Object(ke.a)({axiosInstance:this.axiosInstance,url:"/video/status",method:"get",params:n})}}var Ae=i(195),Pe=i.n(Ae);class Ie{constructor({interval:e=3e3,pollTimeout:t=7200,token:i,tokenType:n,email:r}){this.interval=e,t=(new Date).getTime()/1e3+t,this.latestWindow=[],this.token=i,this.tokenType=n,this.statusPollerModel=new xe({token:i,tokenType:n,email:r}),this.logger=new de({module:"VIDEO_STATUS_POLLER",tokenType:n,token:i})}getStatus({operationId:e,waitingHandler:t,progressHandler:i,completeHandler:n,errorHandler:r}){this.setDefaults(),e&&e.constructor===Array?(this.operationIdArray=e,this.operationId=this.operationIdArray.pop()):this.operationId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.ping()}async ping(){if("stop"===this.pollingAction)return;if((new Date).getTime()/1e3>this.pollTimeout)return void(this.errorHandler&&this.errorHandler(Pe.a.pingTooLong));if(null==this.operationId&&null==this.assetId)return;const[e,t]=await this.statusPollerModel.statusOf({operationId:this.operationId,assetId:this.assetId,expectedOperationType:this.expectedOperationType});if(e){let t=e.data;if(console.log("EVENT ",t,this.interval),!t)return void setTimeout(()=>this.ping(),this.interval);if(null===t||"null"===t||""===JSON.stringify(t).trim())return setTimeout(()=>this.ping(),this.interval),void this.logger.error("Event is empty",{stackTrace:"Null value returned for statuspoller ",assetId:this.assetId,operationId:this.operationId});if(void 0===t.status&&t.operation_id)return void setTimeout(()=>this.ping(),this.interval);if("error"==t.status)this.pollErrorCount++,this.pollErrorCount<=4&&setTimeout(()=>this.ping(),this.interval);else if(50==t.status)this.waitingHandler&&this.waitingHandler(t.data.text),setTimeout(()=>this.ping(),this.interval);else if(51==t.status||52==t.status){if(t.data.progress>=0&&t.data.progress<=100&&(this.latestWindow.push(t.data),this.latestWindow.length>3&&this.latestWindow.splice(0,this.latestWindow.length-3)),this.latestWindow.length>1){var i=this.latestWindow[this.latestWindow.length-1].progress-this.latestWindow[0].progress,n=this.latestWindow[this.latestWindow.length-1].ts-this.latestWindow[0].ts;i>0&&n>0&&(this.timeRemaining=Math.round(n*(100-this.latestWindow[this.latestWindow.length-1].progress)/i))}this.progressHandler&&this.progressHandler(t.data.text,t.data.progress,this.timeRemaining),setTimeout(()=>this.ping(),this.interval)}if(("error"==t.status&&this.pollErrorCount>4||54==t.status)&&this.errorHandler){var r=Pe.a.somethingWentWrong;null!=t.data&&null!=t.data.text&&(r=t.data.text);var o={reason:r,state:t.data.state};this.errorHandler(o)}53==t.status&&(null!=this.expectedOperationType&&t.operationtype!=this.expectedOperationType?(t.data.text=Pe.a.processPending,this.progressHandler(t.data.text,t.data.progress,this.timeRemaining,t.operationtype,t.status),setTimeout(()=>this.ping(),this.interval)):this.operationIdArray&&this.operationIdArray.length>0?(this.operationId=this.operationIdArray.pop(),this.ping()):this.completeHandler&&this.completeHandler(t))}if(t&&(setTimeout(()=>this.ping(),this.interval),!this.clientLogSent)){var a={authoringAssetId:this.assetId,description:"STATUS_POLLER_ERROR",stackTrace:"Error while connecting server status from server. assetId-"+this.assetId+" status-"+t.status};this.logger.error("STATUS POLLER ERROR",a),this.clientLogSent=!0}}stop(){this.pollingAction="stop"}setDefaults(){this.operationIdArray=[],this.assetId=void 0,this.expectedOperationType=void 0,this.operationId=void 0,this.pollErrorCount=0,this.timeRemaining=void 0,this.pollingAction,this.clientLogSent=!1}}var Re=i(190),De=i.n(Re),Oe=i(204),Ne=i.n(Oe);const Le=({webcam:e=!0,audio:t=!0})=>new Promise((i,n)=>{Me({webcam:e,audio:t}).then(({error:e})=>{e?n():i()}).catch(n)}),Me=({webcam:e=!0,audio:t=!0})=>new Promise((i,n)=>{navigator.mediaDevices.enumerateDevices().then(n=>{let r=null;const o={};e&&(o.webcam=[]),t&&(o.audio=[]),n.forEach(i=>{if((e||"videoinput"!==i.kind)&&(t||"audioinput"!==i.kind)&&["audioinput","videoinput"].includes(i.kind)){if(""===i.deviceId&&""===i.label)return void(r="DEVICE_PERMISSION_NOT_GRANTED");"videoinput"===i.kind&&o.webcam.push(i),"audioinput"===i.kind&&o.audio.push(i)}}),i({error:r,devices:o})}).catch(n)}),Fe=e=>{let t="Low";return e>=1920?t="High":e>=1024&&(t="Good"),t};var Ue=class{constructor({recordingConfiguration:e,token:t,tokenType:i,email:n,integrationType:r=Q.q.PRODUCT,initiator:o,logID:a,recorderAPIUtils:s,recorderId:l,recorderEvtClass:u}){if(!e)throw new Error("INVALID_CONFIGURATION");console.log(" setting config >>>> ",JSON.stringify(e)),this.recordingConfiguration=e,this.token=t,this.tokenType=i,this.email=n,this.recordDetails={},this.recorderId=l,this.recorderEvtClass=u,this.recorderInitiator=o,this.preprocessCompleted=!1,this.uploadCompleted=!1,this.integrationType=r,this.currentWebcamStreamConfig=null,this.currentScreenStreamConfig=null,this.createRecordingRef=null,this.deliveryToken=null,this.projectJson=null,this.extensionRecording=!1,this.recorderAPIUtils=s,this.extensionAvailable=!1,this.webcamConstraints=Q.j,this.audioConstraints=Q.f,this.screenConstraints=Q.g,this.logUID=a||B({integrationType:r,tokenType:i}),this.exponentialBackoff={retryCount:0},this.logger=new de({integrationType:r,module:"RECORDER_CORE",logUID:this.logUID,tokenType:i,token:t}),this.recorderModel=new ge({token:t,tokenType:i,email:n}),this.extensionAvailable=!1,this.logger.info("[RECORDER_INITIALIZED]",{recording_configuration:e})}updateConfig({recordingConfiguration:e,logID:t}){return console.log("update config >>>> ",JSON.stringify(e)),e&&(this.recordingConfiguration=e),t&&(this.logID=t),this.logger.info("[RECORER_CONFIG_UPDATED]",{recording_configuration:e,log_id:t}),this}updateConstraints(e){let t=Object(U.m)({...e,oldWebcamConstraints:this.webcamConstraints,oldAudioConstraints:this.audioConstraints,oldScreenConstraints:this.screenConstraints});t.screen&&(this.screenConstraints=t.screen),t.audio&&(this.audioConstraints=t.audio),t.webcam&&(this.webcamConstraints=t.webcam)}getStreamConfig(){let e={};if(this.recordingConfiguration.screenRecord){const t={audio:this.recordingConfiguration.systemAudio,video:{frameRate:Q.h,height:Object(U.g)(this.recordingConfiguration.resolution).height,width:Object(U.g)(this.recordingConfiguration.resolution).width}};e.screen=t}if(this.recordingConfiguration.audio||this.recordingConfiguration.webCam){const t={audio:this.recordingConfiguration.audio,video:this.recordingConfiguration.webCam};this.recordingConfiguration.webCam&&(t.video={},this.recordingConfiguration.webcamSourceId&&(t.video.deviceId=this.recordingConfiguration.webcamSourceId),this.recordingConfiguration.aspectRatio&&"default"!==this.recordingConfiguration.aspectRatio&&(t.video.aspectRatio=this.recordingConfiguration.aspectRatio)),this.recordingConfiguration.audio&&(t.audio={},this.recordingConfiguration.audioSourceId&&(t.audio.deviceId=this.recordingConfiguration.audioSourceId)),e.webcam=t}return e}isExtensionAvailable(){return new Promise((e,t)=>{try{Object(U.j)(this.integrationType).then(t=>{e(t)}).catch(()=>{t()})}catch(e){t()}})}createRecording(){this.uploadCompleted=!1,this.createRecordingError=!1,this.exponentialBackoff.retryCount=0,this.activateWarning(),this.logger.info("[CREATE_RECORDING]",{recording_configuration:this.recordingConfiguration});const{webCam:e,audio:t,screenRecord:i}=this.recordingConfiguration;return console.log("DETAILS ",e,t,i),this.s3UploadManager=new Ce({webCam:e,audio:t,screenRecord:i,recorderModel:this.recorderModel}),this.recordType=Q.c.RECORD,this._sendCreateRecordingRequest()}sendCreateRecordingRequest(){return!this.createRecordingError||(this.logger.info("[SENDING_CREATE_RECORDING_REQUEST]"),this.exponentialBackoff.retryCount=Q.m,this.exponentialBackoff.setTimeoutRef&&clearTimeout(this.exponentialBackoff.setTimeoutRef),this.recorderModel.cancelRequest({type:"create_recording"}),this._sendCreateRecordingRequest())}createVideoImport({params:e,uploadStartedCallback:t,updateProgress:i,file:n}){this.uploadCompleted=!1,this.createRecordingError=!1,this.activateWarning(this.logger),this.s3UploadManager=new Ce({file:!0,recorderModel:this.recorderModel});const r=this;return this.recordType=Q.c.IMPORT,this.logger.info("[IMPORT_VIDEO_REQUEST]",{params:e}),new Promise(async(o,a)=>{const[s,l]=await this.recorderModel.createVideoImport({logUID:this.logUID,...e});if(this.logger.info("[IMPORT_VIDEO_RESPONSE]",{success:s,error:l}),s){const e=s.data;this._updateRecordDetails(e);const l={bucket:e.upload_bucket,key:e.upload_key,digest:this.token,acl:"private"},u=e.authoring_asset_id;t&&t();const[c,d]=await r.s3UploadManager.uploadFile(l,n,e=>{i(e)});if(this.logger.info("[VIDEO_UPLOAD_COMPLETED]",{success:c,error:d}),c){i({type:"upload",completedPercent:100,completed:!0}),r.uploadCompleted=!0;const[t,n]=await r.recorderModel.convertVideo({assetId:u,videoId:e.upload_video_id,compressionRequired:!1,saveAsNew:!0,token:this.token,convertSpeed:"lessonly"==this.integrationType?"ultrafast":void 0});if(this.logger.info("[VIDEO_CONVERSION_COMPLETED]",{success:t,error:n}),t){const e=t.data;r.videoConverting({convertVideoResponse:e,assetId:u,updateProgress:i,resolve:o,reject:a})}n&&(this.removeWarning(),a(n))}d&&(this.removeWarning(),a(d),i({type:"upload",completedPercent:0,completed:!1}))}l&&(this.removeWarning(),a(l))})}cancelVideoImport(){this.s3UploadManager.cancelImport();try{this.recorderModel.cancelRequest({type:"import_video"}),this.recorderModel.cancelRequest({type:"import_convert"}),this.importStatusPoller&&this.importStatusPoller.stop()}catch(e){}}async closeAudioContext(){try{this.audioContext&&await this.audioContext.close()}catch(e){}}getStream(e={}){let{preview:t}=e;this.preview=t,console.log("PREVIEW ",t,JSON.stringify(this.recordingConfiguration));let i=this.getStreamConfig(),{webcam:n=Q.i,screen:r=Q.g}=i;t&&(delete i.screen,r=null),!1===this.recordingConfiguration.webCam&&!1===this.recordingConfiguration.audio&&(n=!1),!1===this.recordingConfiguration.screenRecord&&(r=!1);let o={};return this.logger.info("[GET_STREAMS]",{options:i}),this.closeAudioContext(),new Promise(async(e,a)=>{if(this.extensionAvailable){const t={type:"get_stream",configuration:i};return void Object(U.b)({integrationType:this.integrationType,message:t}).then(t=>{"get_stream_response"===t.type&&e({_type:"url",webcamStream:t.url})}).catch(e=>{console.error(e)})}let s=!1;n&&!this.webcamStream&&(s=!0),r&&!this.screenStream&&(s=!0);const{isWebcamVideoConfigSame:l,isWebcamAudioConfigSame:u,isScreenConfigSame:c}=this.isStreamConfigSame(n,r);if(l&&u&&c&&!s)return e({message:"no_config_change",screenStream:this.screenStream,webcamStream:this.webcamStream}),void this.logger.info("[STREAM_CONFIGS_SAME]",{oldConfig:{webcam:this.currentWebcamStreamConfig,screen:this.currentScreenStreamConfig},newConfig:{webcam:n,screen:r}});t&&this.currentWebcamStreamConfig?((!this.currentWebcamStreamConfig.video&&n.video||n.video&&!l)&&this.stopWebcamStream(),(!this.currentWebcamStreamConfig.audio&&n.audio||n.audio&&!u)&&this.stopWebcamStream()):l&&u||this.stopWebcamStream(),!c&&r&&this.stopScreenStream(),this.updateConstraints({webcam:n&&n.video,audio:n&&n.audio,screen:r});try{if(r){const e=await this.getScreenStream(r);this.screenStream=e,o.screenStream=e}if(n){console.log("GETTING_NEW_STREAM ",t,n);const e=await this.getWebcamStream(n);this.webcamStream=e,o.webcamStream=e}e(o)}catch(e){return this.recorderModel.setRecordError({errorState:e.type,logUID:this.logUID}),void a(e)}})}getWebcamStream(e){if(e.video){let t=Object.assign({},Q.j,e.video);e.video=t}return this.webcamError=!1,new Promise((t,i)=>{if(this.webcamStream)return t(this.webcamStream);this.currentWebcamStreamConfig=e;const n=setTimeout(()=>{this.webcamError=Object(U.n)("webcam",{name:"WebcamReadTimeout",message:"Timeout in fetching the stream"}),i(this.webcamError)},5e3);this.webcamStreamRequestInprogress=!0,navigator.mediaDevices.getUserMedia(e).then(e=>{this.webcamStreamRequestInprogress=!1,clearTimeout(n),this.webcamStream=e,t(e)}).catch(e=>{this.webcamStreamRequestInprogress=!1,clearTimeout(n),this.logger.info("[GET_WEBCAM_STREAM]",{error:e}),this.webcamError=Object(U.n)("webcam",e),i(this.webcamError)})})}getScreenStream(e){return new Promise((t,i)=>{if(this.screenStream)return t(this.screenStream);this.currentScreenStreamConfig=e,"function"==typeof navigator.getDisplayMedia?navigator.getDisplayMedia().then(e=>{this.screenStream=e,t(e)}).catch(e=>{this.logger.info("[GET_SCREEN_STREAM]",{error:e}),i(Object(U.n)("screen",e))}):navigator.mediaDevices.getDisplayMedia(e).then(e=>{this.screenStream=e,t(e)}).catch(e=>{this.logger.info("[GET_SCREEN_STREAM]",{error:e}),i(Object(U.n)("screen",e))})})}pauseRecording(){if(this.recordingPaused)return{status:!0};this.pauseRecordingTimer();let{screenRecord:e,webCam:t,audio:i}=this.recordingConfiguration;return e&&this.screenRecorder.pause(),(t||i)&&this.webcamRecorder.pause(),this.recordingPaused=!0,{status:!0}}resumeRecording(e=0){return this.recordingPaused?(setTimeout(()=>{this.resumeRecordingTimer();let{screenRecord:e,webCam:t,audio:i}=this.recordingConfiguration;e&&this.screenRecorder.resume(),(t||i)&&this.webcamRecorder.resume(),this.recordingPaused=!1},e),{status:!0}):{status:!0}}pauseStream({audio:e,webcam:t,screen:i}){try{if(t||e){const i=this.webcamStream.getTracks();e&&(i.filter(e=>"audio"===e.kind)[0].enabled=!1),t&&(i.filter(e=>"video"===e.kind)[0].enabled=!1)}if(i){this.screenStream.getTracks().forEach(e=>{e.enabled=!1})}return{status:!0}}catch(e){return{status:!1,error:e}}}resumeStream({audio:e,webcam:t,screen:i}){try{if(t||e){const i=this.webcamStream.getTracks();e&&(i.filter(e=>"audio"===e.kind)[0].enabled=!0),t&&(i.filter(e=>"video"===e.kind)[0].enabled=!0)}if(i){this.screenStream.getTracks().forEach(e=>{e.enabled=!0})}return{status:!0}}catch(e){return{status:!1,error:e}}}stopOnlyWebcamStream(){if(!this.webcamStream)return;this.logger.info("[STOPPING_WEBCAM_ONLY_STREAM] ",{preview:this.preview});let e=!0;try{this.webcamStream.getTracks().forEach(t=>{"video"===t.kind&&t.stop(),"audio"===t.kind&&(e=!1)})}catch(e){}e&&(this.webcamStream=null)}stopOnlyMicStream(){if(!this.webcamStream)return;this.closeAudioContext(),this.logger.info("[STOPPING_AUDIO_STREAM]");let e=!0;try{this.webcamStream.getTracks().forEach(t=>{"audio"===t.kind&&t.stop(),"video"===t.kind&&(e=!1)})}catch(e){}e&&(this.webcamStream=null)}stopWebcamStream(){if(this.webcamStream){this.logger.info("[STOPPING_WEBCAM_STREAM] ",{preview:this.preview});try{this.webcamStream.getTracks().forEach(e=>{e.stop()})}catch(e){}this.webcamStream=null}}stopScreenStream(){if(this.screenStream){this.logger.info("[STOPPING_SCREEN_STREAM]");try{this.screenStream.getTracks().forEach(e=>{e.stop()})}catch(e){}this.screenStream=null}}stopStreams(){this.stopWebcamStream(),this.stopScreenStream()}checkMicVolumeStatus(e){this.closeAudioContext();const t=new AudioContext;this.audioContext=t;const i=t.createAnalyser(),n=t.createMediaStreamSource(this.webcamStream),r=t.createScriptProcessor(2048,1,1);i.smoothingTimeConstant=.8,i.fftSize=1024,n.connect(i),i.connect(r),r.connect(t.destination),r.onaudioprocess=()=>{const t=new Uint8Array(i.frequencyBinCount);i.getByteFrequencyData(t);0===t.reduce((e,t)=>e+t,0)/t.length?this.noVolumeInitialTime&&(new Date).getTime()-this.noVolumeInitialTime>1e4?(e({error:!0,type:"NO_VOLUME"}),this.noVolumeInitialTime=null):this.noVolumeInitialTime||(this.noVolumeInitialTime=(new Date).getTime()):this.noVolumeInitialTime&&(e({error:!1}),this.noVolumeInitialTime=null)}}startExtensionRecording(){return Object(U.a)({integrationType:this.integrationType})}startRecording(e){this.logger.info("[START_RECORDING]",{settings:e}),console.log("RECORDING CONFIGURATION ",JSON.stringify(this.recordingConfiguration));let t=this;e=e||{},this.resetRecording();const{externalStopStreamCallback:i,timerCallback:n}=e;if(this.setTimerCallback(n),this.recordingConfiguration.maxRecordingTime?this.maxRecordingTime=this.recordingConfiguration.maxRecordingTime:this.maxRecordingTime=null,this.extensionAvailable)return Object(U.p)({recordingConfiguration:this.recordingConfiguration,integrationType:this.integrationType,eventListerClass:this.recorderEvtClass});if(this.webcamStream){let n={mimeType:"video/mp4"};MediaRecorder.isTypeSupported("video/webm")&&(n.mimeType="video/webm"),null!=this.recordingConfiguration.webcamBitRate&&(n.videoBitsPerSecond=1e3*this.recordingConfiguration.webcamBitRate),this.webcamRecorder=new MediaRecorder(this.webcamStream,n),this.webcamRecorder.ondataavailable=e=>{t.s3UploadManager.onDataAvailable("webcam",e.data)},this.webcamRecorder.onstop=e=>{this.logger.info("[WEBCAM_STREAM_STOPPED]")},this.webcamStream.onended=()=>{this.logger.info("[WEBCAM_STREAM_STOPPED_EXTERNALLY]"),i&&this.screenRecorder&&!this.recordingConfiguration.screenRecord&&i()},this.logger.info("[START_WEBCAM_RECORDING]",{settings:e}),this.webcamRecorder.start(500)}if(this.screenStream){let e="video/mp4";MediaRecorder.isTypeSupported("video/webm")&&(e="video/webm"),(window.opr&&opr.addons||window.opera||navigator.userAgent.indexOf(" OPR/")>=0)&&(e="video/webm;codecs=vp8");let n={mimeType:e};this.screenRecorder=new MediaRecorder(this.screenStream,n),this.screenRecorder.ondataavailable=e=>{t.s3UploadManager.onDataAvailable("screen",e.data)},this.screenRecorder.onstop=e=>{this.logger.info("[STOP_SCREEN_RECORDING]")},this.logger.info("[START_SCREEN_RECORDING]"),this.screenRecorder.start(500),this.screenStream.onended=()=>{this.logger.info("[SCREEN_RECORDING_STOPPED_STREAM_ENDED]"),i&&i()},this.screenStream.getVideoTracks()[0].onended=()=>{i&&this.screenRecorder&&i()},this.screenStream.getVideoTracks()[0].onmute=()=>{this.logger.info("[SCREEN_RECORDING_MUTED]"),console.error("screen stream muted")},this.screenStream.getVideoTracks()[0].onunmute=()=>{this.logger.info("[SCREEN_RECORDING_UNMUTED]")}}this.startRecordingTimer()}resetRecording(){this.projectJson=null}setTimerCallback(e){this.timerCallback=e}startRecordingTimer(){this.reverseTimer&&this.maxRecordingTime?this.timer=this.maxRecordingTime:this.timer=0,this.clearTimerInterval(),this.startTimer()}startTimer(){this.timerInterval=setInterval(()=>{this.reverseTimer&&this.maxRecordingTime?this.timer--:this.timer++,this.timerCallback&&this.timerCallback(this.timer)},1e3)}pauseRecordingTimer(){this.clearTimerInterval()}resumeRecordingTimer(){this.startTimer()}clearTimerInterval(){clearInterval(this.timerInterval)}finishRecording(e={}){const{progress:t}=e;if(this.postRecordProgressCallback=t,this.logger.info("[FINISH_RECORDING_CALLED]"),this.extensionAvailable)return Object(U.c)(this.integrationType);const i=this.stopRecording();return this.clearTimerInterval(),this.stopStreams(),i.then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.removeWarning(),this.uploadCompleteError=!0}),t&&this.setUploadProgressCallback(t),i}setProjectJson(e){this.projectJson=e}setRecordDetails(e){this.recordDetails=e}setExtensionRecording(e){this.extensionRecording=e}cancelRecordingWithoutStream(){return this.logger.info("[CANCEL_RECORIDNG_WITHOUT_STREAM]"),this.removeWarning(),this.stopRecorder(),this.stopScreenStream(),this.s3UploadManager.cancelMultipartUpload()}cancelRecording(){return this.logger.info("[CANCEL_RECORIDNG]"),this.removeWarning(),this.stopRecorder(),this.stopStreams(),this.s3UploadManager.cancelMultipartUpload()}getRecordingObjectUrls(){if(!this.extensionAvailable)try{return this.s3UploadManager.getObjectUrls({recordingConfig:this.recordingConfiguration})}catch(e){}return{}}getRecordingConfiguration(){return this.recordingConfiguration}retryUpload(){return this.logger.info("[RETRY_UPLOAD]"),new Promise((e,t)=>{this.s3UploadManager.retryUpload().then(()=>{this.uploadInitError=!1,this.s3UploadManager.finishUpload().then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.uploadCompleteError=!0}),e()}).catch(e=>{t(e),this.s3UploadManager.cancelMultipartUpload()})})}getUploadDetails(){return new Promise((e,t)=>{this.extensionAvailable?Object(U.h)(this.integrationType).then(i=>{i?e({completed:i.status===Q.r.UPLOADED,error:i.status===Q.r.FAILED,completedPercent:i.progress.progress,timeRemaining:i.progress.remainingTime}):t({error:"INVALID_RESPONSE"})}).catch(e=>{t({error:e})}):e(this.s3UploadManager.uploadProgressDetails)})}isUploadComplete(){return this.extensionRecording&&Object(U.h)(this.integrationType).then(e=>{e&&(this.uploadCompleted=e.status===Q.r.UPLOADED)}).catch(()=>{}),this.uploadCompleted}isPreprocessComplete(){return new Promise((e,t)=>{this.preprocessCompleteCheckInterval=setInterval(()=>{this.projectJson&&e(this.projectJson),this.preprocessError&&t(this.preprocessError),(this.projectJson||this.preprocessError)&&clearInterval(this.preprocessCompleteCheckInterval)},500)})}removePreprocessCompleteCheck(){this.preprocessCompleteCheckInterval&&clearInterval(this.preprocessCompleteCheckInterval)}getRecordDetails(){return new Promise((e,t)=>{this.recordDetails.asset_id?e(this.recordDetails):this.recorderDetailsCheckInterval=setInterval(()=>{this.recordDetails.asset_id&&(e(this.recordDetails),clearInterval(this.recorderDetailsCheckInterval)),this.createRecordError&&t("create_recording_error")},1e3)})}cancelGetRecordDetails(){this.recorderDetailsCheckInterval&&clearInterval(this.recorderDetailsCheckInterval)}async completeUpload(e,t=0){this.logger.info("[RECORDING_UPLOAD_COMPLETED]");const[i,n]=await this.recorderModel.completeUpload({assetId:e,webcamId:this.createRecordingRef.webcamId,screenId:this.createRecordingRef.screenId,recordingConfiguration:this.recordingConfiguration,token:this.token});if(this.logger.info("[COMPLETE_UPLOAD_RESPONSE]",{success:i,error:n}),i){const t=i.data;this.removeWarning(),this.uploadCompleted=!0;let n=t.hippo_recorder;this.startPollingForStatus(e,n,[])}if(n){if(t>1)return this.removeWarning();this.completeUpload(e,++t)}}startPollingForStatus(e,t,i){let n=t.pop();if(null==n)this.saveVideoSuccess(e,i);else{new Ie({interval:2e3,token:this.token,tokenType:this.tokenType,email:this.email}).getStatus({operationId:n,waitingHandler:e=>{this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:"N/A",completed:!1,message:"Waiting for video to be uploaded",time_remaining:"N/A"})},progressHandler:(e,t,i)=>{this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:t,completed:!1,message:e,time_remaining:i})},completeHandler:n=>{if(4==n.operationtype){this.logger.info("[RECORDING_PREPROCESS_COMPLETE]",{event:n}),this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:100,completed:!0,message:"Preprocess completed",recordDetails:this.recordDetails});let r={},o=n.data;r.id=o.id,r.duration=o.duration<0?o.audioduration:o.duration,r.type=o.videotype,r.offset=o.offset,i||(i=[]),i.push(r),this.startPollingForStatus(e,t,i)}},errorHandler:e=>{console.error(e)}})}}async saveVideoSuccess(e,t){const i=this;let n=0;const r={version:"2.0",footageList:[],clips:[],totalVideoTracks:3,trackNames:["Screen recording","Webcam","Track 3"],canvasWidth:384,canvasHeight:216,resolution:"720"};let o=0;for(let e=0;e<t.length;e++){let i=t[e];o=0==e?i.duration:Math.min(i.duration,o)}this.recordingConfiguration.sourceConfig||(this.recordingConfiguration.sourceConfig={}),(!this.recordingConfiguration.sourceConfig.webcam||this.recordingConfiguration.sourceConfig.webcam.width<=0||this.recordingConfiguration.sourceConfig.webcam.height<=0)&&(this.recordingConfiguration.sourceConfig.webcam={width:288,height:216}),(!this.recordingConfiguration.sourceConfig.screen||this.recordingConfiguration.sourceConfig.screen.width<=0||this.recordingConfiguration.sourceConfig.screen.height<=0)&&(this.recordingConfiguration.sourceConfig.screen={width:384,height:216});for(let e=0;e<t.length;e++){let i=t[e];r.footageList.push(i.id);let l={};l.id=i.id,l.duration=i.duration,l.containsVideo=1!=i.type||this.recordingConfiguration.webCam,l.containsAudio=1==i.type&&this.recordingConfiguration.audio;let u={xpos:0};if(1==i.type&&t.length>1){let e=Object(U.i)(this.recordingConfiguration.sourceConfig.webcam,this.recordingConfiguration.sourceConfig.screen,this.recordingConfiguration.webcamPosition,this.recordingConfiguration.webcamSize);u.width=e.width,u.height=e.height,u.xpos=e.x,u.ypos=e.y}else{var a;a=1==i.type?this.recordingConfiguration.sourceConfig.webcam:this.recordingConfiguration.sourceConfig.screen;var s=Object(U.d)(a,{width:384,height:216});u.width=s.width,u.height=s.height,u.xpos=s.x,u.ypos=s.y,r.crop={x:s.x,y:s.y,w:s.width,h:s.height}}0==i.type?l.type="screenrecord":l.type="webcam",u.opacity=1,u.volume=this.recordingConfiguration.audio?1:0,u.fadein=0,u.fadeout=0;let c={position:1e-4};c.id=n++,c.start=0,c.end=o,c.track=1==i.type?2:1,c.footage=l,c.deleted=!1,c.properties=u,r.clips.push(c)}if(this.setProjectJson(r),this.projectJson=r,"local"==Object(U.e)()){const[t,n]=await this.recorderModel.mergeAndRender({assetId:e,projectJson:r,renderFrom:"embedded_video"});t&&(new De.a).deliveryUrgentVideos(i.deliveryToken,(function(e){})),n&&console.error(n)}else(new De.a).deliveryUrgentVideos(i.deliveryToken,(function(e){}))}generateDummyPJForImport(e){let t,i;e.width/e.height>384/216?(t=384,i=384*e.height/e.width):(i=216,t=216*e.width/e.height);const n={w:t,h:i,x:(384-t)/2,y:(216-i)/2},r={deleted:!1,end:e.duration,id:0,position:"0.00010",start:0,track:1,footage:{id:e.source_id,duration:e.duration,containsVideo:e.contains_video,containsAudio:e.contains_audio,type:"webcam"},properties:{xpos:n.x,ypos:n.y,width:t,height:i,volume:1,opacity:1,fadein:0,fadeout:0}};return{canvasWidth:384,canvasHeight:216,resolution:1080,totalVideoTracks:1,trackNames:["Imported Video"],version:"2.0",footageList:[e.source_id],clips:[r],crop:n}}stopRecording(){return this.logger.info("[STOP_RECORIDNG]"),this.stopRecorder(),this.s3UploadManager.finishUpload()}stopRecorder(){if(this.logger.info("[STOP_RECORDER]"),this.clearTimerInterval(),this.webcamRecorder||this.screenRecorder){for(const e of[this.webcamRecorder,this.screenRecorder])if(e)try{e&&e.stop()}catch(e){}this.webcamRecorder=null,this.screenRecorder=null}}retryMultipartUploadFinish(){return this.logger.info("[RETRY_MULTIPART_UPLOAD_FINISH]"),this.s3UploadManager.finishUpload().then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.uploadCompleteError=!0,console.error(e)})}setUploadProgressCallback(e){return this.s3UploadManager.setUploadProgressCallback(e)}createRecordingExponentialBackoff(){this.currentTime||(this.currentTime=new Date),this.exponentialBackoff.retryCount<Q.m&&(this.exponentialBackoff.retryCount+=1,this.exponentialBackoff.setTimeoutRef=setTimeout(()=>{this._sendCreateRecordingRequest()},Q.l*this.exponentialBackoff.retryCount))}initializeUploadManager({data:e,deliveryToken:t}){this.logger.info("[UPLOAD_MANAGER_INITIALIZED]",{data:e}),this.createRecordingRef=e,this.deliveryToken=t,this.s3UploadManager.initializeUploaders(e).catch(e=>{console.error("Upload initialize error ",e),this.uploadInitError=!0})}_sendCreateRecordingRequest(){return new Promise(async(e,t)=>{const[i,n]=await this.recorderModel.createRecording({configuration:this.recordingConfiguration,logUID:this.logUID});if(this.logger.info("[CREATE_RECORDING_RESPONSE]",{success:i,error:n}),i){const t=i.data;this.createRecordingError=!1,this._updateRecordDetails(t),this.recorderAPIUtils&&this.recorderAPIUtils.sendEvent("record_details",{asset_id:this.recordDetails.asset_id,token:this.recordDetails.delivery_token,embed_url:this.recordDetails.embedLink,embed_preview_url:this.recordDetails.embeddedPreviewLink,play_url:this.recordDetails.recordedUrl,thumbnail_url:this.recordDetails.publicThumbnail,thumbnail_play_url:this.recordDetails.publicPlayThumbnail}),e(this.recordDetails),this.recordDetails&&this.initializeUploadManager({data:this.recordDetails,deliveryToken:t.delivery_token}),this.updateCurrentWebcamDimensions()}n&&(n&&n.is_cancelled?console.warn(n):(t(n),this.createRecordingError=!0,this.createRecordingExponentialBackoff()))})}_updateRecordDetails(e){if(!e.status)return this.logger.info("[CREATE_RECORDING_ERROR]",{create_recording_response:e}),void(this.recordDetails=e);this.recordDetails=Object(U.o)({createRecResponse:e,recordingConfiguration:this.recordingConfiguration,digest:this.token})}videoConverting({convertVideoResponse:e,assetId:t,updateProgress:i,resolve:n,reject:r}){this.removeWarning(),this.importStatusPoller=new Ie({interval:2e3,token:this.token,tokenType:this.tokenType,email:this.email});const o=this;this.importStatusPoller.getStatus({operationId:e,waitingHandler:e=>{i({type:"processing",completedPercent:0,completed:!1,message:"Waiting for upload to complete"})},progressHandler:(e,t,n)=>{const r=Object(U.k)(n);i({type:"processing",completedPercent:t,completed:!1,timeRemaining:r,message:e})},completeHandler:e=>{i({type:"processing",completedPercent:100,completed:!0,message:"Completed",recordDetails:this.recordDetails}),o.onImportConvertComplete(e,t,n,r)},errorHandler:e=>{this.logger.info("[VIDEO_CONVERSION_PROCESSING_ERROR]",{error:e}),r(e)}})}renderVideo(e){return this.recorderModel.mergeAndRender(e)}async onImportConvertComplete(e,t,i,n){this.logger.info("[VIDEO_CONVERSION_PROCESSING_SUCCESS]",{success:e});let r=-1;!e.data||null==e.data.duration&&null==e.data.audioduration?e.data&&e.data.data instanceof Array&&null!=e.data.data[0]&&(r=null!=e.data.data[0].duration?e.data.data[0].duration:e.data.data[0].audioduration):r=null!=e.data.duration?e.data.duration:e.data.audioduration;const[o,a]=await this.recorderModel.getImportedDetails({assetId:t});if(this.logger.info("[GET_IMPORT_DETAILS]",{success:o,error:a}),o){const e=o.data,t=0==e.contains_video&&1==e.contains_audio;"local"==Object(U.e)()&&(e.projectjson=this.generateDummyPJForImport(e)),t&&delete e.projectjson.crop,this.projectJson=e.projectjson,this.setProjectJson(this.projectJson),i&&i(e)}a&&n(a)}isStreamConfigSame(e=!1,t=!1){let i=!0,n=!0,r=!0;return(e||this.currentWebcamStreamConfig)&&(i=Ne()(e&&e.video,this.currentWebcamStreamConfig&&this.currentWebcamStreamConfig.video),n=Ne()(e&&e.audio,this.currentWebcamStreamConfig&&this.currentWebcamStreamConfig.audio)),(t||this.currentScreenStreamConfig)&&(r=Ne()(t,this.currentScreenStreamConfig)),{isWebcamVideoConfigSame:i,isWebcamAudioConfigSame:n,isScreenConfigSame:r}}updateCurrentWebcamDimensions(){try{const e=this.webcamStream.getVideoTracks()[0].getSettings();this.recordingConfiguration.sourceConfig||(this.recordingConfiguration.sourceConfig={}),this.recordingConfiguration.sourceConfig.webcam={width:e.width,height:e.height}}catch(e){}}activateWarning(){Object(U.q)(this.logger)}removeWarning(){Object(U.l)()}destroy(){this.s3UploadManager=null}},Be=i(188);i(129);var Ve,ze,He,je,Ge,qe,We,$e,Ye=i(193),Ke={createAudioMeter:function(e,t,i,n){var r=e.createScriptProcessor(512);return r.onaudioprocess=this.volumeAudioProcess,r.clipping=!1,r.lastClip=0,r.volume=0,r.clipLevel=t||.98,r.averaging=i||.95,r.clipLag=n||750,r.connect(e.destination),r.checkClipping=function(){return!!this.clipping&&(this.lastClip+this.clipLag<window.performance.now()&&(this.clipping=!1),this.clipping)},r.shutdown=function(){this.disconnect(),this.onaudioprocess=null},r},volumeAudioProcess:function(e){for(var t,i=e.inputBuffer.getChannelData(0),n=i.length,r=0,o=0;o<n;o++)t=i[o],Math.abs(t)>=this.clipLevel&&(this.clipping=!0,this.lastClip=window.performance.now()),r+=t*t;var a=Math.sqrt(r/n);this.volume=Math.max(a,this.volume*this.averaging)}},Je=(i(173),i(4)),Xe=i.n(Je),Qe=O.c.div(Ve||(Ve=Xe()(["\n width: 640px;\n height: 360px;\n background-color: #2E2E2E;\n border-radius: 15px;\n"]))),Ze=O.c.div(ze||(ze=Xe()(["\n max-width: 160px;\n width: 20%;\n position: relative;\n div:first-of-type {\n height: 0;\n padding-bottom: 100%;\n }\n"]))),et=O.c.div(He||(He=Xe()(["\n position: absolute;\n display: flex;\n justify-content: center;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: #0A0A0A;\n align-items: center;\n"]))),tt=O.c.img(je||(je=Xe()(["\n height: 50%;\n"]))),it=O.c.div(Ge||(Ge=Xe()(["\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n"]))),nt=O.c.div(qe||(qe=Xe()(["\n &::before {\n content: '';\n background: transparent;\n border: 2px solid rgba(255,255,255,0.15);\n opacity: 1;\n transform: scale(0.45);\n border-radius: 50%;\n box-sizing: border-box;\n display: block;\n height: 200%;\n left: -50%;\n position: absolute;\n top: -50%;\n width: 200%;\n will-change: transform;\n }\n &::after {\n border-radius: 50%;\n box-sizing: border-box;\n content: '';\n display: block;\n height: 200%;\n left: -50%;\n position: absolute;\n top: -50%;\n width: 200%;\n will-change: transform;\n background: transparent radial-gradient(closest-side at 50% 50%, #000000 0%, #121212 0%, #0000002B 100%) 0% 0% no-repeat padding-box;;\n transform: ",";\n transition: transform 300ms steps(6,jump-none) 50ms;\n }\n"])),function(e){return r()(this,void 0),e.$scale?"scale(".concat(parseFloat(e.$scale),")"):"scale(.5)"}.bind(void 0)),rt=Object(O.c)(nt)(We||(We=Xe()(["\n animation: "," .225s step-end,"," .075s ease .225s;\n"])),ot,ot),ot=Object(O.d)($e||($e=Xe()(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"]))),at="url",st=Object(N.d)("/svg/audio-on.svg");function lt(e){var t=this,i=e.stream,n=e.streamType,s=e.audioIcon,l=void 0===s?st:s,u=e.errorCallback,c=Object(o.useRef)(),d=Object(o.useRef)(),h=Object(o.useRef)(!1),p=Object(o.useState)(0),f=p[0],g=p[1],m=function(e){var i=this;if(r()(this,t),!h.current){var n=13*c.current.volume;n<=.5&&.5!=f?g(.5):n>.5&&n<=.55&&.55!=f?g(.55):n>.55&&n<=.6&&.6!=f?g(.6):n>.6&&n<=.65&&.65!=f?g(.65):n>.65&&.7!=f&&g(.7)}setTimeout(function(){r()(this,i),d.current=window.requestAnimationFrame(m)}.bind(this),50)}.bind(this);return Object(o.useEffect)(function(){var e=this;return r()(this,t),function(){r()(this,e),console.log("AUDIO METER EXITING PROPERLY"),h.current=!0,d.current&&(window.cancelAnimationFrame(d.current),d.current=null)}.bind(this)}.bind(this),[]),Object(o.useEffect)(function(){if(r()(this,t),i&&n!==at)try{if(i.getAudioTracks().length){var e=new AudioContext,o=e.createMediaStreamSource(i);c.current=Ke.createAudioMeter(e),o.connect(c.current),console.log("DRAWING AUDIO METER"),m()}}catch(e){u&&u(e),console.log(e)}}.bind(this),[i]),a.a.createElement(Qe,null,a.a.createElement(it,null,a.a.createElement(Ze,null,a.a.createElement("div",null),a.a.createElement(rt,{$scale:f}),a.a.createElement(et,null,a.a.createElement(tt,{src:l,alt:"Mic"})))))}var ut,ct,dt,ht,pt,ft,gt,mt=i(194),vt=O.c.div(ut||(ut=Xe()(["\n width: 100%;\n height: 100%;\n"]))),yt=O.c.iframe(ct||(ct=Xe()(["\n width: 100%;\n height: 100%;\n border: none;\n border-radius: 3px;\n"]))),bt=O.c.div(dt||(dt=Xe()(["\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"]))),wt=O.c.div(ht||(ht=Xe()(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n"]))),Et=(O.c.img(pt||(pt=Xe()(["\n display: block;\n height: 143px;\n width: 68px;\n object-position: bottom;\n object-fit: contain;\n"]))),O.c.div(ft||(ft=Xe()(["\n height: 60%;\n position: relative;\n display: flex;\n align-items: flex-end;\n"]))),O.c.div(gt||(gt=Xe()(["\n position: relative;\n display: flex;\n"])))),_t="url";function St(e){var t=e.stream,i=e.streamType,n=e.webcam,r=e.mic,o=e.audioIcon,s=e.preview,l=e.lightingCanvasRef,u=e.videoElementRef,c=t;return i===_t&&(c="".concat(t,"?webcam=true")),a.a.createElement(bt,null,a.a.createElement(wt,null,!t&&a.a.createElement("div",null,"Waiting for permission"),n&&i===_t&&a.a.createElement(vt,{className:"hv-ext-webcam-preview"},a.a.createElement(yt,{src:"".concat(c)})),t&&i!==_t&&a.a.createElement(Et,null,n&&a.a.createElement(Ye.a,{stream:t,ref:u}),n&&t&&s&&a.a.createElement(mt.a,{ref:l}),!n&&r&&a.a.createElement(lt,{stream:t,audioIcon:o,streamType:i}))))}O.c.div(Tt||(Tt=Xe()(["\n position: relative;\n display: flex;\n"]))),O.c.div(Ct||(Ct=Xe()(["\n position: absolute;\n height: 25px;\n width: 2px;\n left: 22px;\n border: 0px;\n"])));var Tt,Ct,kt,xt,At,Pt,It=O.c.div(kt||(kt=Xe()(['\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 3px;\n & > span {\n font-family: "Open Sans";\n }\n /* Disable button text select by default */\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\n supported by Chrome, Edge, Opera and Firefox */\n']))),Rt=Object(O.c)(It)(xt||(xt=Xe()(["\n height: 45px;\n margin-top: 3px;\n background-color: #434141;\n & > img {\n height: 10px;\n margin-bottom: 3px;\n }\n & > span {\n font-size: 9px;\n color: ",";\n }\n"])),function(e){return r()(this,void 0),e.checked?"#37C689":"#EFEFEF"}.bind(void 0)),Dt=Object(O.c)(It)(At||(At=Xe()(["\n width: 85px;\n height: 85px;\n border-radius: 8px;\n margin: 10px;\n opacity: 0.77;\n transition: 0.3s;\n display: ",";\n border: ",";\n background-color: #0a0a0a;\n pointer-events: ",';\n & > span {\n font-family: "Open Sans";\n font-size: 8px;\n color: ',";\n font-weight: 600;\n }\n & > img {\n height: 28px;\n margin-bottom: 5px !important;\n transition: 0.4s;\n filter: ",";\n ",";\n }\n &:after {\n content: '';\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: #16C669;\n background-image: url(",");\n background-repeat: no-repeat;\n background-position: center;\n background-size: 50%;\n top: 5px;\n right: 5px;\n transition: 0.3s;\n transform: scale(0);\n }\n ",";\n &:active {\n transform: scale(0.8);\n }\n"])),function(e){return r()(this,void 0),!e.checked&&e.recordingStarted?"none":"inherit"}.bind(void 0),function(e){return r()(this,void 0),e.checked&&!e.recordingStarted?"2px solid #37C689;":"2px solid #0a0a0a;"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"none":"all"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"#FFFFFF":e.checked?"#37C689":"#FFFFFF"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"brightness(0) saturate(100%) invert(100%) sepia(18%) saturate(2%) hue-rotate(146deg) brightness(110%) contrast(101%)":"none"}.bind(void 0),function(e){if(r()(this,void 0),"webcam"==e.type&&!e.checked)return"\n -transform: scale(1.7);\n -margin-top: -1px;"}.bind(void 0),function(e){return r()(this,void 0),e.tickUrl}.bind(void 0),function(e){if(r()(this,void 0),e.checked&&!e.recordingStarted)return"\n &:after {\n // content: '';\n // position: absolute;\n // width: 10px;\n // height: 10px;\n // border-radius: 50%;\n // background-color: #16C669;\n // background-image: url('/svg/tick-white.svg');\n // background-repeat: no-repeat;\n // background-position: center;\n // background-size: 50%;\n // bottom: -5px;\n transform: scale(1);\n }"}.bind(void 0)),Ot=1,Nt=2;function Lt(e){var t=this,i=e.type,n=e.checked,o=e.label,s=e.onClick,l=e.optionType,u=e.recordingStarted,c=function(e){switch(r()(this,t),e){case"webcam":return n?Object(N.d)("/svg/rapi/webcam-on.svg"):Object(N.d)("/svg/rapi/webcam-off.svg");case"screen":return n?Object(N.d)("/svg/rapi/screen-on.svg"):Object(N.d)("/svg/rapi/screen-off.svg");default:return n?Object(N.d)("/svg/rapi/mic-on.svg"):Object(N.d)("/svg/rapi/mic-off.svg")}}.bind(this);return function(){var e=this;return r()(this,t),l===Ot?a.a.createElement(Dt,{onClick:function(){return r()(this,e),s(i)}.bind(this),checked:n,recordingStarted:u,type:i,tickUrl:Object(N.d)("/svg/tick-white.svg")},a.a.createElement(a.a.Fragment,null,a.a.createElement("img",{src:c(i)})),a.a.createElement("span",null,o)):a.a.createElement(Rt,{onClick:function(){return r()(this,e),s(i)}.bind(this),checked:n},a.a.createElement("img",{src:c(i)}),a.a.createElement("span",null,o))}.bind(this)()}var Mt=O.c.div(Pt||(Pt=Xe()(["\n position: absolute;\n width: 60px;\n height: 165px;\n background-color: rgba(0,0,0,0.8);\n right: 0;\n top: 20%;\n border-radius: 7px 0 0 7px;\n padding: 7px 3px;\n z-index: 11;\n"])));function Ft(e){var t=this,i=e.handleOptionsSelect,n=e.userSelect,o=e.webcam,s=e.screen,l=e.mic,u=e.screenEnabled,c=e.webcamEnabled,d=e.micEnabled;return a.a.createElement(Mt,null,(n||c)&&a.a.createElement(Lt,{type:"webcam",onClick:function(){return r()(this,t),i("webcam")}.bind(this),checked:o,previewEnabled:!o,label:"WEBCAM",optionType:Nt}),(n||u)&&a.a.createElement(Lt,{type:"screen",onClick:function(){return r()(this,t),i("screen")}.bind(this),checked:s,previewEnabled:!s,label:"SCREEN RECORD",optionType:Nt}),(n||d)&&a.a.createElement(Lt,{type:"mic",onClick:function(){return r()(this,t),i("mic")}.bind(this),checked:l,previewEnabled:!l,label:"MIC",optionType:Nt}))}var Ut,Bt,Vt,zt=O.c.div(Ut||(Ut=Xe()(["\n position: ",";\n width: 100%;\n display: flex;\n height: 100%;\n background-color: rgba(47, 48, 49, 0.86);\n top: 0;\n z-index: 10;\n border-radius: ",";\n left: 0;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n"])),function(e){return r()(this,void 0),e.screen?"fixed":"absolute"}.bind(void 0),function(e){return r()(this,void 0),e.screen?"0":"10px"}.bind(void 0)),Ht=O.c.div(Bt||(Bt=Xe()(["\n width: 135PX;\n height: 135PX;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 15;\n border-radius: 50%;\n background-color: transparent;\n border: 7px solid #ECEDF4;\n"]))),jt=O.c.div(Vt||(Vt=Xe()(["\n position: absolute;\n font: normal normal normal 71px/97px Open Sans;\n font-weight: 600;\n color: #E5E9F5;\n width: 40px;\n letter-spacing: 1.28px;\n"])));function Gt(e){var t=this,i=e.time,n=e.screen,s=e.onCountdownComplete,l=parseInt(i)||3,u=Object(o.useState)(l),c=u[0],d=u[1];return Object(o.useEffect)(function(){var e=this;if(r()(this,t),1!==c){var i=setTimeout(function(){r()(this,e),d(c-1)}.bind(this),1e3);return function(){return r()(this,e),clearTimeout(i)}.bind(this)}setTimeout(function(){r()(this,e),s&&s()}.bind(this),1e3)}.bind(this)),a.a.createElement(zt,{screen:n},a.a.createElement(Ht,null,a.a.createElement(jt,null,c)))}var qt,Wt=O.c.div(qt||(qt=Xe()(["\n display: flex;\n margin: ",";\n justify-content:",";\n -width: 300px;\n margin: 0 auto;\n background-color: #2E2E2E;\n border: none;\n"])),function(e){return r()(this,void 0),e.previewEnabled?"0 auto":"none"}.bind(void 0),function(e){return r()(this,void 0),e.previewEnabled,"center"}.bind(void 0));function $t(e){var t=this,i=e.userSelect,n=e.screenEnabled,o=e.webcamEnabled,s=e.micEnabled,l=e.screen,u=e.webcam,c=e.mic,d=e.recordingStarted,h=e.handleOptionsSelect;return a.a.createElement(Wt,{previewEnabled:!l},(n||i)&&a.a.createElement(Lt,{type:"screen",onClick:function(){return r()(this,t),h("screen")}.bind(this),checked:l,previewEnabled:!l,label:"SCREEN RECORD",recordingStarted:d,optionType:Ot}),(i||o)&&a.a.createElement(Lt,{type:"webcam",onClick:function(){return r()(this,t),h("webcam")}.bind(this),checked:u,previewEnabled:!u,label:"WEBCAM",recordingStarted:d,optionType:Ot}),(i||s)&&a.a.createElement(Lt,{type:"mic",onClick:function(){return r()(this,t),h("mic")}.bind(this),checked:c,previewEnabled:!c,label:"MICROPHONE",recordingStarted:d,optionType:Ot}))}var Yt=i(386);class Kt{constructor(e){console.log("DATA ",e);const t=window._HVDomain||"https://www.hippovideo.io";this.token=e.token,this.tokenType=e.tokenType,this.email=e.email;const i={baseURL:t+Yt.a,headers:{accept:"application/json"}};if(this.tokenType===Q.e.RECORDER_SDK_TOKEN){let e=`${this.tokenType}$$${this.token}`;i.headers.Authorization="Basic "+btoa(e)}if(this.tokenType===Q.e.AUTHENTICATION_TOKEN){let e=`${this.tokenType}$$${this.token}$$${this.email}`;i.headers.Authorization="Basic "+btoa(e)}this.axiosInstance=z.a.create(i)}getAllScripts(e){return this._sendRequest({method:"get",params:e})}async _sendRequest({method:e="get",url:t="",jsonData:i=null,formData:n=null,params:r={},headers:o={},additionalReqConfig:a={}}){try{let s=n;if(n){if("object"==typeof n&&null!==n){let e=new FormData;for(const t in n)e.append(t,n[t]);s=e}o["Content-Type"]="application/x-www-form-urlencoded"}i&&(o["Content-Type"]="application/json");const l={url:t,method:e,data:i||s,headers:o,params:r,...a};console.log("REQUEST CONFIG ",l);return[await this.axiosInstance.request(l),null]}catch(e){if(console.log("ERROR >>>> ",e),z.a.isCancel(e)){return[null,{message:e.message,is_cancelled:!0}]}return[null,e]}}}i(77);var Jt=i(36),Xt=i.n(Jt),Qt=i(37),Zt=i.n(Qt),ei=i(49),ti=i.n(ei),ii=i(54),ni=i.n(ii),ri=i(41),oi=i.n(ri),ai=(i(236),i(136),i(86),i(67),i(52),i(105),i(340),i(135),i(56),i(71),i(84),i(239),i(183),i(224),i(11)),si=i(35),li=i.n(si),ui=i(387),ci=i.n(ui),di=i(388),hi=i.n(di),pi=i(389),fi=i.n(pi),gi=i(149),mi=i.n(gi),vi=i(187),yi=i.n(vi),bi=i(6),wi=i.n(bi),Ei=i(7),_i=i.n(Ei);function Si(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=oi()(e);if(t){var r=oi()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ni()(this,i)}}var Ti,Ci,ki,xi,Ai,Pi,Ii=window.HippoVideo&&window.HippoVideo.data&&HippoVideo.data.api.getProperty("isNewRecordScreenEnabled"),Ri=function(e){ti()(i,e);var t=Si(i);function i(){return Xt()(this,i),t.apply(this,arguments)}return Zt()(i,[{key:"initialize",value:function(e){HippoVideo.UserProfile||(HippoVideo.UserProfile={}),this.prompterId=e.promptContainer||"teleprompterSiblingDiv";var t=(HippoVideo.UserProfile.userFirstName+" "+HippoVideo.UserProfile.userLastName).trim();this.mergeFieldValues={"Lead Name":t,"Lead Email":HippoVideo.UserProfile.userEmail,"Lead Company Name":HippoVideo.UserProfile.userCompanyName},this.mergeFieldValues=ai.default.extend({},this.mergeFieldValues,e.mergeFieldValues||{}),this.sdkTeleprompter=e.sdkTeleprompter||!1,this.origin=this.sdkTeleprompter?window._HVDomain||"https://assets.hippovideo.io":"",this.initialTop=e.initialTop||0,this.lastLineHeight=e.lastLineHeight||60,this.minFontSize=e.minFontSize||15,this.maxFontSize=e.maxFontSize||45,this.minLineSpace=e.minLineSpace||1,this.maxLineSpace=e.maxLineSpace||3,this.minSpeedVal=e.minSpeed||1,this.maxSpeedVal=e.maxSpeed||10,this.newRecorderScreen="newRecorderScreen"==e.from,this.initialScroll=0,this.scrollTimerDown=void 0,this.scriptSelected=!1,this.defaultScriptId=e.defaultScriptId,this.enableChangeScript=null==e.enableChangeScript||e.enableChangeScript,this.settingModel=new yi.a({settingTabName:wi.a.wizSetting.VIDEO_SCRIPT,guestToken:e.guestToken}),this.prompterModel=e.prompterModel,this.callback=e.callback,this.fromChecklistProspecting=e.fromChecklistProspecting,this.fromChecklistInviteVideo=e.fromChecklistInviteVideo,this.initLineSpace(),this.initSpeed(),this.initTextSize(),this.userEmail=HippoVideo.UserProfile.userEmail,this.spaceAllowedTags=["TEXTAREA","INPUT"],this.promptStarted=!1,this.promptCompleted=!1,this.scrollTimeout=50,this.prompterSpeedVal=10,this.nextStep=1,this.allScripts=[],this.showFirstVideoScript=!1,this.isRendered=!1,this.render()}},{key:"bindEvents",value:function(){this.enableDisablePrompter=this.enableDisablePrompter.bind(this),this.selectVideoScript=this.selectVideoScript.bind(this),this.initPrompt=this.initPrompt.bind(this),this.startPrompt=this.startPrompt.bind(this),this.keyPressEvent=this.keyPressEvent.bind(this),this.setSpeedProperties=this.setSpeedProperties.bind(this),this.restartPrompt=this.restartPrompt.bind(this),this.resetPrompt=this.resetPrompt.bind(this),this.changeTextWithMFValues=this.changeTextWithMFValues.bind(this),this.changeVideoScript=this.changeVideoScript.bind(this),this.textSizeIncrease=this.textSizeIncrease.bind(this),this.textSizeDecrease=this.textSizeDecrease.bind(this),this.speedIncrease=this.speedIncrease.bind(this),this.speedDecrease=this.speedDecrease.bind(this),this.lineSpaceIncrease=this.lineSpaceIncrease.bind(this),this.lineSpaceDecrease=this.lineSpaceDecrease.bind(this),this.addNewScriptFromPrompt=this.addNewScriptFromPrompt.bind(this),this.speedSliderChange=this.speedSliderChange.bind(this),this.allScriptsFetchSuccess=this.allScriptsFetchSuccess.bind(this),this.allScriptsFetchFailure=this.allScriptsFetchFailure.bind(this),this.addNewScriptFromAllScripts=this.addNewScriptFromAllScripts.bind(this),this.addNewScriptFromMyScripts=this.addNewScriptFromMyScripts.bind(this),this.refreshVideoPrompter=this.refreshVideoPrompter.bind(this),this.changeVideoScriptWithId=this.changeVideoScriptWithId.bind(this),this.handleTabChange=this.handleTabChange.bind(this)}},{key:"initEvents",value:function(){this.delegate("click",".script-list",this.selectVideoScript),this.delegate("click","#changeScriptId",this.changeVideoScript),this.delegate("click","#addNewScriptFromPrompt",this.addNewScriptFromPrompt),this.delegate("click","#addNewScriptFromAllScripts",this.addNewScriptFromAllScripts),this.delegate("click","#addNewScriptFromMyScripts",this.addNewScriptFromMyScripts),this.delegate("click","#refreshPrompterPages",this.refreshVideoPrompter),this.delegate("click",".tab-title",this.handleTabChange),ve()("#enableScriptId").on("click",this.enableDisablePrompter),ve()("#disableScriptId").on("click",this.enableDisablePrompter),ve()("#speedDecreaseId").on("click",this.speedDecrease),ve()("#speedIncreaseId").on("click",this.speedIncrease),ve()("#textSizeIncrease").on("click",this.textSizeIncrease),ve()("#textSizeDecrease").on("click",this.textSizeDecrease),ve()("#lineSpaceIncrease").on("click",this.lineSpaceIncrease),ve()("#lineSpaceDecrease").on("click",this.lineSpaceDecrease),ve()(document).off("keydown"),ve()(document).on("keydown",this.keyPressEvent)}},{key:"render",value:function(){var e=this,t={to_prompt:!0};this.prompterModel?this.prompterModel.getAllScripts(t).then(function(t){return r()(this,e),this.allScriptsFetchSuccess(t)}.bind(this)).catch(function(t){return r()(this,e),this.allScriptsFetchFailure(t)}.bind(this)):this.settingModel.getAllVideoScript(t,function(t){r()(this,e),this.allScriptsFetchSuccess(t)}.bind(this),function(t){r()(this,e),this.allScriptsFetchFailure(t)}.bind(this))}},{key:"allScriptsFetchSuccess",value:function(e){this.$el.empty();var t={inactive_minus:this.inActiveMinus,inactive_plus:this.inActivePlus,inactive_minus_linespace:this.inActiveMinusLine,inactive_plus_linespace:this.inActivePlusLine,inactive_minus_speed:this.inActiveMinusSpeed,inactive_plus_speed:this.inActivePlusSpeed,newRecorderScreen:this.newRecorderScreen,origin:this.origin};if(1==Ii&&this.newRecorderScreen){this.$el.append(hi()(ai.default.extend({},t,e,mi.a))),this.prompterSpeedVal=15;var i=parseInt(this.$el.find("#speedSliderId").attr("data-value"));this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-i)*this.prompterSpeedVal}else if(this.sdkTeleprompter){var n=e[0],r=e[1];if(r)return this.allScriptsFetchFailure(r);this.$el.append(fi()(ai.default.extend({},t,n.data,mi.a)))}else this.$el.append(ci()(ai.default.extend({},t,e,mi.a)));this.mergeFieldValues["Lead Company Name"]=e.company_name,this.bindEvents(),this.initEvents(),this.prompterModel||ve()(document).foundation(),null!=this.defaultScriptId&&(0==this.defaultScriptId?ve()("#allVideoScripts .script-list").first().click():ve()("#allVideoScripts").find("#"+this.defaultScriptId).click()),this.enableChangeScript||ve()("#changeScriptId").remove(),this.callback&&this.callback();var o=_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId),a=_i.a.getLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId),s=_i.a.getLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId);o&&ve()("#teleprompterId").css("line-height",o),a&&ve()("#teleprompterId").css("font-size",a+"px"),s&&!isNaN(s)?(parseInt(s)>10&&(s=parseInt(s)/10),ve()("#speedSliderId").attr("data-value",s).text(s)):(s=5,ve()("#speedSliderId").attr("data-value",s).text(s)),(this.fromChecklistProspecting||this.fromChecklistInviteVideo)&&(this.myScripts=e.my_scripts,this.enableChecklistTeleprompterScript()),this.allScripts=e.all_scripts,this.showFirstVideoScript&&this.displayFirstVideoScript(),this.isRendered=!0}},{key:"allScriptsFetchFailure",value:function(e){console.log("ERROR >>> ",e)}},{key:"enableFirstVideoScript",value:function(){this.showFirstVideoScript=!0}},{key:"displayFirstVideoScript",value:function(){if(!HippoVideo.data.api.getProperty("videosCreatedByUser")&&1==HippoVideo.data.api.getProperty("isSalesUser")&&1==HippoVideo.data.api.getProperty("isTrialPlan")){var e=this.getFirstVideoScript();e&&(this.enableDisablePrompter(),HippoVideo.data.api.getProperty("isNewRecordScreenEnabled")&&(ve()(".hvrecorder-promptscript-container").removeClass("disp-none"),ve()("#videoPrompterContainer").removeClass("disp-none"),ve()("#toggleTeleprompterMenu input").attr("checked",!0)),this.changeVideoScriptWithId(e.id),this.enableFirstVideoScriptTooltip())}}},{key:"enableFirstVideoScriptTooltip",value:function(){ve()("#enableScriptId, #disableScriptId").addClass("newpr-tooltip").attr("tooltip-hippo",mi.a.videoPrompter.firstVideoTooltip),_i.a.trackInThirdPartyTools("FV - teleprompter tooltip",{email:this.userEmail})}},{key:"getFirstVideoScript",value:function(){var e=this;return this.allScripts.filter(function(t){return r()(this,e),t.is_first_script}.bind(this))[0]}},{key:"enableChecklistTeleprompterScript",value:function(){var e=this;this.myScripts&&(this.enableDisablePrompter(),this.myScripts.forEach(function(t){r()(this,e),(this.fromChecklistProspecting&&"Prospecting video"==t.title||this.fromChecklistInviteVideo&&"Event invite video / greetings video"==t.title)&&this.changeVideoScriptWithId(t.id)}.bind(this)))}},{key:"initPrompt",value:function(){this.promptheight=ve()("#teleprompterId").height(),this.promptTop=this.$el.find("#"+this.prompterId).css("top");var e=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",e),"auto"==this.promptTop?this.promptTop=this.$el.find("#"+this.prompterId).position().top:this.promptTop=parseInt(this.promptTop.substr(0,this.promptTop.length-2))}},{key:"refreshVideoPrompter",value:function(){_i.a.trackInThirdPartyTools("Video Prompt refresh clicked",{email:this.userEmail}),this.render(),ve()("#refreshPrompterPages").addClass("refreshing")}},{key:"selectVideoScript",value:function(e){var t=e.currentTarget.dataset.text;t=this.changeTextWithMFValues(t),ve()("#teleprompterId").text(t),this.$el.find("#"+this.prompterId).css("top","auto"),this.$el.find("#scriptListId, #scriptTypesId").addClass("hide"),this.$el.find("#promptSettingsContainer").removeClass("hide"),this.initPrompt(),this.scriptSelected=!0,this.selectedScriptId=e.currentTarget.id,ve()("#telepromterColumnContainer").scrollTop(0),_i.a.trackInThirdPartyTools("Video Prompt on record - script selected",{email:this.userEmail})}},{key:"changeVideoScriptWithId",value:function(e){if(this.$el.find("#"+e).length>0){var t=this.$el.find("#"+e).attr("data-text");t=this.changeTextWithMFValues(t),ve()("#teleprompterId").text(t),this.$el.find("#"+this.prompterId).css("top","auto"),this.$el.find("#scriptListId, #scriptTypesId").addClass("hide"),this.$el.find("#promptSettingsContainer").removeClass("hide"),this.initPrompt(),this.scriptSelected=!0,this.selectedScriptId=e,_i.a.trackInThirdPartyTools("Video Prompt on record - script selected",{email:this.userEmail})}}},{key:"changeTextWithMFValues",value:function(e){for(var t in this.mergeFieldValues){var i=this.mergeFieldValues[t];if(i){var n="\\${"+t+"}";e=e.replace(new RegExp(n,"g"),i)}}return e}},{key:"enableDisablePrompter",value:function(){this.$el.toggleClass("disp-none"),ve()("#videoPrompterNote, .ed-prompter-link").toggleClass("hide"),ve()("#enableScriptId").hasClass("hide")?this.scriptSelected=!1:this.scriptSelected=!0,this.restartPrompt(),this.resetPrompt(),this.$el.find("#promptSettingsContainer").addClass("hide"),this.$el.find("#scriptTypesId, #scriptListId").removeClass("hide"),this.scriptSelected=!1,ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll");var e=ve()("#enableScriptId").hasClass("hide")?"enabled":"disabled";_i.a.trackInThirdPartyTools("Sales - teleprompter clicked "+e,{email:this.userEmail})}},{key:"keyPressEvent",value:function(e){var t=e.keyCode;this.spaceAllowedTags.includes(e.target.nodeName)||this.$el.find("#teleprompterId").is(":focus")||32!=t||(e.preventDefault(),e.stopPropagation()),this.$el.find("#teleprompterId").is(":focus")||32==t&&(this.promptStarted?(ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll"),this.stopPrompt(),this.promptStarted=!1,this.promptCompleted=!1):(this.startPrompt(),this.promptStarted=!0),1==this.promptCompleted&&this.restartPrompt(),_i.a.trackInThirdPartyTools("Video Prompt on record - space pressed",{email:this.userEmail}))}},{key:"startPrompt",value:function(){if(this.scriptSelected)if(this.initPrompt(),parseInt(this.promptTop)>=-1*this.promptheight+this.lastLineHeight){this.$el.find("#"+this.prompterId).css("top",parseInt(this.promptTop)-this.nextStep),ve()("#promptPropertiesId .font-size").addClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").addClass("show-tooltip"),ve()("#telepromterColumnContainer").addClass("disable-teleprompt-scroll");var e=-1*(parseInt(this.promptTop)-this.nextStep);setTimeout((function(){ve()("#telepromterColumnContainer").scrollTop(e)}),1),ve()("#teleprompterId").attr("contenteditable","false"),this.scrollTimerDown&&this.stopPrompt(),this.scrollTimerDown=setTimeout(this.startPrompt,this.scrollTimeout)}else ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll"),this.stopPrompt()}},{key:"isScriptSelected",value:function(){return this.scriptSelected}},{key:"getSelectedScriptId",value:function(){return this.selectedScriptId}},{key:"getTeleprompterTrackingParams",value:function(){return{"prompt-line-space":parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId)),"prompt-speed-val":parseInt(this.$el.find("#speedSliderId").attr("data-value")),"prompt-font-size":parseInt(ve()("#teleprompterId").css("font-size"))}}},{key:"stopPrompt",value:function(){if(this.scrollTimerDown){clearTimeout(this.scrollTimerDown);var e=-1*(parseInt(this.promptTop)-this.nextStep);ve()("#teleprompterId").outerHeight()-89<=e&&(this.promptCompleted=!0)}}},{key:"restartPrompt",value:function(){this.resetPrompt(),this.startPrompt()}},{key:"resetPrompt",value:function(){this.stopPrompt(),this.$el.find("#"+this.prompterId).animate({top:this.initialTop}),ve()("#telepromterColumnContainer").scrollTop(this.initialScroll)}},{key:"changeVideoScript",value:function(){this.$el.find("#promptSettingsContainer").addClass("hide"),this.$el.find("#scriptTypesId, #scriptListId").removeClass("hide"),this.scriptSelected=!1,_i.a.trackInThirdPartyTools("Video Prompt on record - change script clicked",{email:this.userEmail})}},{key:"textSizeIncrease",value:function(){var e=parseInt(ve()("#teleprompterId").css("font-size"));if(e>=this.maxFontSize)this.$el.find("#textSizeIncrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#textSizeDecrease").removeClass("in-active"),(e+=5)>=this.maxFontSize&&this.$el.find("#textSizeIncrease").addClass("in-active"),ve()("#teleprompterId").css("font-size",e+"px");var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - text size increased",{email:this.userEmail})}}},{key:"textSizeDecrease",value:function(){var e=parseInt(ve()("#teleprompterId").css("font-size"));if(e<=this.minFontSize)this.$el.find("#textSizeDecrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#textSizeIncrease").removeClass("in-active"),(e-=5)<=this.minFontSize&&this.$el.find("#textSizeDecrease").addClass("in-active"),ve()("#teleprompterId").css("font-size",e+"px");var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - text size decreased",{email:this.userEmail})}}},{key:"speedIncrease",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value")),t=e+1,i=parseInt(this.$el.find("#speedSliderId").attr("data-max"));e>=i||(this.$el.find(".speed-plus-container").removeClass("in-active"),e+=1,this.$el.find("#speedSliderId").attr("data-value",e).text(e),this.setSpeedProperties(),t>=i&&this.$el.find(".speed-plus-container").addClass("in-active"),this.$el.find(".speed-minus-container").removeClass("in-active"),_i.a.trackInThirdPartyTools("Video Prompt on record - speed increased",{email:this.userEmail}))}},{key:"speedDecrease",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value")),t=e-1,i=parseInt(this.$el.find("#speedSliderId").attr("data-min"));e<=i||(this.$el.find(".speed-minus-container").removeClass("in-active"),e-=1,this.$el.find("#speedSliderId").attr("data-value",e).text(e),this.setSpeedProperties(),t<=i&&this.$el.find(".speed-minus-container").addClass("in-active"),this.$el.find(".speed-plus-container").removeClass("in-active"),_i.a.trackInThirdPartyTools("Video Prompt on record - speed decreased",{email:this.userEmail}))}},{key:"lineSpaceIncrease",value:function(){var e=parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId));if(e>=this.maxLineSpace)this.$el.find("#lineSpaceIncrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#lineSpaceDecrease").removeClass("in-active"),(e+=.25)>=this.maxLineSpace&&this.$el.find("#lineSpaceIncrease").addClass("in-active"),ve()("#teleprompterId").css("line-height",e);var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - line space increased",{email:this.userEmail})}}},{key:"lineSpaceDecrease",value:function(){var e=parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId));if(e<=this.minLineSpace)this.$el.find("#lineSpaceDecrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#lineSpaceIncrease").removeClass("in-active"),(e-=.25)<=this.minLineSpace&&this.$el.find("#lineSpaceDecrease").addClass("in-active"),ve()("#teleprompterId").css("line-height",e);var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - line sapce decreased",{email:this.userEmail})}}},{key:"hidePromptProperties",value:function(){console.log("HIDE CALLED"),this.$el.find("#promptPropertiesId").addClass("hide")}},{key:"showPromptProperties",value:function(){this.$el.find("#promptPropertiesId").removeClass("hide")}},{key:"addNewScriptFromPrompt",value:function(){if(_i.a.trackInThirdPartyTools("Video Prompt on record - right side add new script clicked",{email:this.userEmail}),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg){var e=new URL(window.location.protocol+"//"+window.location.host+"/video-scripts/home"),t={authentication_token:HippoVideo.UserProfile.authToken,email:HippoVideo.UserProfile.userEmail,open_new:!0};e.search=new URLSearchParams(t).toString(),window.open(e)}else window.open("/video-scripts/home?open_new=true","_blank");window.opener=null}},{key:"addNewScriptFromAllScripts",value:function(){_i.a.trackInThirdPartyTools("Video Prompt on record - add new script clicked from all scripts",{email:this.userEmail}),window.open("/video-scripts/home?open_new=true","_blank"),window.opener=null}},{key:"addNewScriptFromMyScripts",value:function(){if(_i.a.trackInThirdPartyTools("Video Prompt on record - add new script clicked from my scripts",{email:this.userEmail}),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg){var e=new URL(window.location.protocol+"//"+window.location.host+"/video-scripts/home"),t={authentication_token:HippoVideo.UserProfile.authToken,email:HippoVideo.UserProfile.userEmail,open_new:!0};e.search=new URLSearchParams(t).toString(),window.open(e)}else window.open("/video-scripts/home?open_new=true","_blank");window.opener=null}},{key:"handleTabChange",value:function(e){e.preventDefault(),ve()(".tab-title").removeClass("active"),ve()(".content").removeClass("active"),ve()(e.target.attributes[0].nodeValue).addClass("active"),ve()(e.target.attributes[0].nodeValue+"Title").addClass("active");var t=e.target.getAttribute("data-tab");ve()("#"+t).addClass("active"),ve()("#"+t+"Title").addClass("active")}},{key:"speedSliderChange",value:function(){_i.a.trackInThirdPartyTools("Video Prompt on record - speed slider changed",{email:this.userEmail}),this.setSpeedProperties()}},{key:"setSpeedProperties",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value"));_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,e),this.nextStep=1,this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-e)*this.prompterSpeedVal,this.restartPrompt()}},{key:"setDefaultSpeed",value:function(e){var t=parseInt(this.$el.find("#speedSliderId").attr("data-value"));e&&!isNaN(e)&&(this.$el.find("#speedSliderId").attr("data-value",e).text(e),t=e),this.nextStep=1,this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-t)*this.prompterSpeedVal}},{key:"initLineSpace",value:function(){var e=_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId);null==e?(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.minLineSpace),this.inActiveMinusLine=!0,this.inActivePlusLine=!1):e>=this.maxLineSpace?(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.maxLineSpace),this.inActiveMinusLine=!1,this.inActivePlusLine=!0):e<=this.minLineSpace&&(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.minLineSpace),this.inActiveMinusLine=!0,this.inActivePlusLine=!1)}},{key:"initTextSize",value:function(){var e=_i.a.getLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId),t=e;null==e?(t=this.minFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!0,this.inActivePlus=!1):e>=this.maxFontSize?(t=this.maxFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!1,this.inActivePlus=!0):e<=this.minFontSize&&(t=this.minFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!0,this.inActivePlus=!1),ve()("#teleprompterId").css("font-size",t+"px")}},{key:"initSpeed",value:function(){var e=_i.a.getLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId),t=e;null==e?(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.minSpeedVal),t=this.minSpeedVal,this.inActiveMinusSpeed=!0,this.inActivePlusSpeed=!1):e>=this.maxSpeedVal?(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.maxSpeedVal),t=this.maxSpeedVal,this.inActiveMinusSpeed=!1,this.inActivePlusSpeed=!0):e<=this.minSpeedVal&&(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.minSpeedVal),t=this.minSpeedVal,this.inActiveMinusSpeed=!0,this.inActivePlusSpeed=!1),this.$el.find("#speedSliderId").text(t)}},{key:"destroy",value:function(){ve()(document).off("keydown",this.keyPressEvent),this.undelegateEvents()}}]),i}(li.a.View),Di=O.c.div(Ti||(Ti=Xe()(["\n width: 100%;\n margin: auto;\n position: absolute;\n left: 50%;\n top: 0;\n transform: translateX(-50%);\n z-index: 11;\n -background: transparent linear-gradient(180deg, #000000 0%, #000000CC 83%, #00000000 100%) 0% 0% no-repeat padding-box;\n background: rgba(0,0,0,0.5);\n -border: 1px solid #dbdbdb;\n transition: opacity 0.5s linear, transform 0.2s linear;\n border-radius: 15px 15px 0 0;\n"])));function Oi(e){var t=this,i=e.countdownStarted,n=e.recordingStarted;console.log("teleprompter loaded!!!");var s=Object(o.useRef)(),l=Object(o.useRef)(),u=Object(o.useContext)(L.a).authentication;console.log("authentication ",u);var c=function(){r()(this,t),s.current.setDefaultSpeed(1)}.bind(this);return Object(o.useEffect)(function(){r()(this,t),i&&s.current&&(s.current.resetPrompt(),s.current.hidePromptProperties())}.bind(this),[i]),Object(o.useEffect)(function(){r()(this,t),s.current&&(n?s.current.restartPrompt():(s.current.resetPrompt(),s.current.showPromptProperties()))}.bind(this),[n]),Object(o.useLayoutEffect)(function(){var e=this;r()(this,t);var i=new Kt({token:u.token,tokenType:u.tokenType,email:u.email});return s.current=new Ri({el:l.current,defaultScriptId:0,prompterModel:i,sdkTeleprompter:!0,enableChangeScript:!1,callback:c}),function(){r()(this,e),s.current.destroy(),s.current=null}.bind(this)}.bind(this),[]),s.current&&!s.current.isScriptSelected()&&n?null:a.a.createElement(Di,{ref:l})}var Ni,Li=O.c.div(Ci||(Ci=Xe()(["\n position: absolute;\n z-index: 30;\n background: #212126;\n width: 240px;\n box-shadow: 0px 8px 12px rgba(0,0,0,0.1);\n border: 1px solid #34343C;\n bottom: 100%;\n left: 10px;\n border-radius: 5px;\n padding: 8px 5px 12px 5px;\n"]))),Mi=O.c.div(ki||(ki=Xe()(["\n width: 90%;\n margin: 0 auto;\n text-align: left;\n"]))),Fi=O.c.div(xi||(xi=Xe()(["\n color: #C3C3C3;\n font: normal normal 600 14px/16px Open Sans;\n border-bottom: 1px solid #34343C;\n height: 30px;\n display: flex;\n align-items: center;\n"]))),Ui=O.c.div(Ai||(Ai=Xe()(["\n font: normal normal 600 13px/16px Open Sans;\n color: #C3C3C3;\n margin-top: 5px;\n > span {\n color: #FC3B52;\n }\n"]))),Bi=O.c.div(Pi||(Pi=Xe()(["\n font: italic normal normal 13px/16px Open Sans;\n color: #C3C3C3;\n margin-top: 5px;\n line-height: 18px;\n"])));function Vi(e){var t=e.info;return a.a.createElement(Li,null,a.a.createElement(Mi,null,a.a.createElement(Fi,null,"Lighting Info"),a.a.createElement(Ui,null,"Status: ",a.a.createElement("span",null,t.status)),a.a.createElement(Bi,null,t.message)))}var zi,Hi,ji,Gi,qi,Wi,$i=O.c.div(Ni||(Ni=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n & > span {\n font-size: 12px;\n color: #D8D8D8;\n }\n & > img {\n margin-left: 5px;\n margin-right: 5px;\n }\n"])));function Yi(e){var t=this,i=e.lightingCanvas,n=e.videoElement,s=Object(o.useState)(!1),l=s[0],u=s[1],c=Object(o.useState)({}),d=c[0],h=c[1],p=n||window&&window.videoPreviewRef&&window.videoPreviewRef.current,f=i||window&&window.lightingCanvasRef&&window.lightingCanvasRef.current,g=Object(o.useRef)();Object(o.useEffect)(function(){var e=this;return r()(this,t),function(){return r()(this,e),clearTimeout(g.current)}.bind(this)}.bind(this),[]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),f&&p){var i=f.getContext("2d"),n=p.offsetWidth,o=n/16*9;f.width=n/15,f.height=o/15,m(p,f,i)}return function(){return r()(this,e),clearTimeout(g.current)}.bind(this)}.bind(this),[f,p,window.videoPreviewRef]);var m=function(e,i,n){if(r()(this,t),0!==i.width&&0!==i.height){n.drawImage(e,0,0,e.videoWidth,e.videoHeight,0,0,i.width,i.height);for(var o=n.getImageData(0,0,i.width,i.height),a=0,s=0;s<o.data.length;s+=4)a+=.21*o.data[s]+.72*o.data[s+1]+.07*o.data[s+2];var l={};(a/=o.data.length)<20?(l.status="Poor",l.message="Your light source is poor. Please move to a better light source."):a<40?(l.status="Good",l.message="Your light source is good. You can improve further by moving to a better light source."):(l.status="Excellent",l.message="Your light source is excellent. Happy recording!"),g.current=setTimeout((function(){window.requestAnimationFrame((function(){m(e,i,n)}))}),1e3),h(l)}}.bind(this);return a.a.createElement($i,{onMouseEnter:function(){return r()(this,t),u(!0)}.bind(this),onMouseLeave:function(){return r()(this,t),u(!1)}.bind(this)},l&&a.a.createElement(Vi,{info:d}),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/lighting-icon.svg"),width:"14"}),a.a.createElement("span",null,"Lighting"),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/info-circle-grey.svg"),width:"10"}))}var Ki,Ji=O.c.div(zi||(zi=Xe()(["\n position: absolute;\n z-index: 30;\n width: 240px;\n bottom: 100%;\n left: -75%;\n background-color: #212126;\n border: 1px solid #34343C;\n border-radius: 6px;\n box-shadow: 0px 8px 12px #00000066;\n"]))),Xi=O.c.div(Hi||(Hi=Xe()(["\n font: normal normal 400 14px/16px Open Sans;\n color: #C3C3C3;\n height: 35px;\n width: 90%;\n display: flex;\n margin: 0 auto;\n align-items: center;\n border-bottom: 1px solid #34343C;\n"]))),Qi=O.c.div(ji||(ji=Xe()(["\n margin-top: 5px;\n display: flex;\n flex-flow: column;\n justify-content: space-evenly;\n min-height: 150px;\n max-height: 200px;\n"]))),Zi=O.c.div(Gi||(Gi=Xe()(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 90%;\n margin: 0 auto;\n min-height: 40px;\n max-height: 60px;\n background-color: #292929;\n border-radius: 6px;\n"]))),en=O.c.div(qi||(qi=Xe()(["\n max-width: 50%;\n font: italic normal normal 13px/16px Open Sans;\n color: #C3C3C3;\n margin-left: 10px;\n text-align: left;\n"]))),tn=O.c.div(Wi||(Wi=Xe()(["\n font: normal normal 600 14px/16px Open Sans;\n color: #FFFFFF;\n margin-right: 10px;\n"])));function nn(e){var t=e.webcamQualityInfo,i=void 0===t?{}:t;return a.a.createElement(Ji,null,a.a.createElement(Xi,null,"Current Webcam Info"),a.a.createElement(Qi,null,a.a.createElement(Zi,null,a.a.createElement(en,null,"Frame rate"),a.a.createElement(tn,null,i.frameRate)),a.a.createElement(Zi,null,a.a.createElement(en,null,"Resolution"),a.a.createElement(tn,null,i.resolution)),a.a.createElement(Zi,null,a.a.createElement(en,null,"Quality"),a.a.createElement(tn,null,i.quality))))}var rn,on=O.c.div(Ki||(Ki=Xe()(["\n display: flex;\n align-items: center;\n justify-content: left;\n position: relative;\n & > span {\n font-size: 12px;\n color: #D8D8D8;\n }\n & > img {\n margin-left: 5px;\n margin-right: 5px;\n }\n"])));function an(e){var t=this,i=e.webcamQualityInfo,n=Object(o.useState)(!1),s=n[0],l=n[1];return a.a.createElement(on,{onMouseEnter:function(){return r()(this,t),l(!0)}.bind(this),onMouseLeave:function(){return r()(this,t),l(!1)}.bind(this)},s&&a.a.createElement(nn,{webcamQualityInfo:i}),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/info-white.svg"),width:"14"}),a.a.createElement("span",null,"Video Quality"))}var sn,ln,un,cn=O.c.div(rn||(rn=Xe()(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n & > span {\n font-size: 11px;\n color: #fff;\n }\n"]))),dn=i(390),hn=i.n(dn),pn=O.c.div(sn||(sn=Xe()(["\n position: relative;\n"]))),fn=O.c.label(ln||(ln=Xe()(['\n position: absolute;\n top: 7px;\n left: 0;\n width: 41px;\n height: 19px;\n border-radius: 20px;\n background: #43454E;\n cursor: pointer;\n &::after {\n content: "";\n display: block;\n border-radius: 50%;\n width: 15px;\n height: 15px;\n margin: 2px;\n background: #ffffff;\n box-shadow: 1px 3px 3px 1px rgba(0, 0, 0, 0.2);\n transition: 0.2s;\n }\n']))),gn=O.c.input(un||(un=Xe()(["\n opacity: 0;\n z-index: 1;\n border-radius: 15px !important;\n margin: 0 !important; /* Foundation is overriding these styles!!!! */\n width: 42px !important; /* Foundation is overriding these styles!!!! */\n height: 26px !important; /* Foundation is overriding these styles!!!! */\n &:checked + ",' {\n background: #37C689;\n &::after {\n content: "";\n display: block;\n border-radius: 50%;\n width: 15px;\n height: 15px;\n margin-left: 22px;\n transition: 0.2s;\n }\n }\n'])),fn);function mn(e){var t=e.selected,i=e.onToggle,n=Object(o.useRef)(hn()("hv-toggle-"));return a.a.createElement(pn,null,a.a.createElement(gn,{id:n.current,onChange:i,type:"checkbox",checked:t}),a.a.createElement(fn,{htmlFor:n.current}))}function vn(e){var t=e.showTeleprompter,i=e.onTeleprompterToggle;return a.a.createElement(cn,null,a.a.createElement(mn,{selected:t,onToggle:i}))}var yn,bn=O.c.div(yn||(yn=Xe()(["\n background-color: #43454E;\n width: 31px;\n height: 31px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 10;\n img {\n width: ",";\n }\n"])),function(e){return r()(this,void 0),e.type===wn.PAUSE_RESUME?"10px":"12px"}.bind(void 0)),wn={PAUSE_RESUME:1,ABORT:2};function En(e){var t=this,i=e.type,n=e.recordingPaused,o=e.onAbortRecording,s=e.onPauseResumeRecording,l=function(){return r()(this,t),i===wn.PAUSE_RESUME?n?Object(N.d)("/svg/rapi/resume-recording.svg"):Object(N.d)("/svg/rapi/pause-recording.svg"):i===wn.ABORT?Object(N.d)("/svg/rapi/abort-recording.svg"):void 0}.bind(this),u=function(e){r()(this,t),i===wn.PAUSE_RESUME&&s(e),i===wn.ABORT&&o(e)}.bind(this);return a.a.createElement(bn,{onClick:u,type:i},a.a.createElement("img",{src:l()}))}i(341),i(61);var _n,Sn=i(145),Tn=i.n(Sn),Cn=(i(111),O.c.div(_n||(_n=Xe()(["\n position: relative;\n width: 100%;\n height: 100%;\n background-color: #121212;\n border-radius: 2px;\n transition: all .5s ease;\n box-shadow: 0px 8px 12px #00000066;\n font: normal normal normal 12px/14px Open Sans;\n text-transform: capitalize;\n color: #FFFFFF;\n text-align: left;\n\n .dropdown-select {\n cursor: ",";\n display: block;\n padding: 10px 30px 10px 10px;\n div {\n text-overflow: ellipsis;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n }\n img {\n position: absolute;\n right: 10px;\n top: 15px;\n }\n }\n\n .dropdown-menu {\n position: absolute;\n width: 100%;\n left: 0;\n margin-top: 1px;\n max-height: 144px;\n overflow-y: auto;\n z-index: 9;\n background-color: #121212;\n border-radius: 2px;\n\n li {\n padding: 10px;\n transition: all .2s ease-in-out;\n cursor: pointer;\n list-style: none;\n &:hover {\n background: #000;\n }\n }\n }\n"])),function(e){return r()(this,void 0),e.enabled?"pointer":"not-allowed"}.bind(void 0)));function kn(e){var t=this,i=e.defaultLabel,n=void 0===i?"Default":i,s=e.items,l=void 0===s?[]:s,u=e.onChange,c=e.disabled,d=void 0!==c&&c,h=Object(o.useState)(),p=h[0],f=h[1],g=Object(o.useState)(!1),m=g[0],v=g[1],y=function(e,i){r()(this,t),f(i),v(!1),u&&u(e)}.bind(this);return a.a.createElement(Cn,{className:"dropdown",enabled:!d},a.a.createElement("div",{className:"dropdown-select",onClick:function(){return r()(this,t),!d&&v(!m)}.bind(this)},a.a.createElement("div",null,p||n),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/down-arrow-black.svg")})),m&&a.a.createElement("ul",{className:"dropdown-menu"},l.map(function(e,i){var n=this;return r()(this,t),a.a.createElement("li",{"data-value":e.value,onClick:function(){return r()(this,n),y(e.value,e.label)}.bind(this),key:i},e.label)}.bind(this))))}var xn,An,Pn,In,Rn,Dn,On=1,Nn=2;function Ln(e){var t,i=this,n=e.type,s=e.handleSourceChange,l=e.selectedDevice,u=e.disabled,c=Object(o.useState)([]),d=c[0],h=c[1],p=Object(o.useState)(!0),f=p[0],g=p[1],m=Object(o.useRef)();t=n==On?{webcam:!0,audio:!1}:{audio:!0,webcam:!1};var v=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"Permission not given"}],disabled:!0})}.bind(this),y=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"Fetching the device info"}],disabled:!0})}.bind(this),b=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"No devices found"}],disabled:!0})}.bind(this);Object(o.useEffect)(function(){var e=this;if(r()(this,i),m.current&&!u){var t=setInterval(function(){var i=this;r()(this,e),Le({webcam:n===On,audio:n!==On}).then(function(){r()(this,i),clearInterval(t),w()}.bind(this)).catch(function(e){return r()(this,i),console.error("PERMISSION ERROR ",e)}.bind(this))}.bind(this),2e3);return function(){return r()(this,e),clearInterval(t)}.bind(this)}}.bind(this),[f,u]),Object(o.useEffect)(function(){r()(this,i),w()}.bind(this),[]);var w=function(){var e=this;r()(this,i),Me(t).then(function(t){var i=this,n=t.error,o=t.devices;if(r()(this,e),n)m.current=n,g(!1);else{var a=[];o.audio&&o.audio.forEach(function(e){r()(this,i),a.push({value:e.deviceId,label:e.label})}.bind(this)),o.webcam&&o.webcam.forEach(function(e){r()(this,i),a.push({value:e.deviceId,label:e.label})}.bind(this)),m.current=null,h(a),g(!1)}}.bind(this)).catch(function(t){r()(this,e),console.log(t.name+": "+t.message),g(!1)}.bind(this))}.bind(this),E=function(){return r()(this,i),l||"default"}.bind(this),_=function(){var e=this;return r()(this,i),l&&d.forEach(function(t){if(r()(this,e),t.value===l)return t.label}.bind(this)),"Default"}.bind(this);return function(){if(r()(this,i),f)return y();if(m.current)return v();if(0===d.length)return b();var e=E(),t=Tn()(d),n=_();return console.log("DEVICES ",t,e),a.a.createElement(kn,{items:t,onChange:s,defaultLabel:n,defaultValue:e,disabled:u})}.bind(this)()}var Mn,Fn=O.c.div(xn||(xn=Xe()(["\n position: absolute;\n width: 345px;\n bottom: 80px;\n left: 30%;\n z-index: 30;\n background-color: #212126;\n border-radius: 5px;\n"]))),Un=O.c.div(An||(An=Xe()(["\n color: #fff;\n text-align: left;\n padding: 15px;\n border-bottom: 1px solid #333339;\n"]))),Bn=O.c.div(Pn||(Pn=Xe()(["\n width: 100%;\n margin: 0 auto;\n padding: 15px;\n"]))),Vn=O.c.div(In||(In=Xe()(["\n margin: 0 auto 20px;\n display: flex;\n align-items: center;\n"]))),zn=O.c.label(Rn||(Rn=Xe()(["\n display: inline-block;\n vertical-align: middle;\n width: 100px;\n font-size: 13px;\n font-weight: 400;\n color: #fff;\n text-align: left;\n"]))),Hn=O.c.div(Dn||(Dn=Xe()(["\n width: 200px;\n"]))),jn=function(){r()(this,void 0);for(var e=[],t=0,i=Object.entries(Q.b);t<i.length;t++){var n=i[t],o=n[0],a=n[1];e.push({label:o,value:a})}return e}.bind(void 0)(),Gn=Object(o.forwardRef)(function(e,t){var i=this,n=e.webcam,s=e.audio,l=(e.aspectRatio,e.webcamSourceId),u=e.audioSourceId,c=e.onSourceSelection;r()(this,void 0);var d=Object(o.useState)(),h=d[0],p=d[1],f=Object(o.useState)(),g=f[0],m=f[1],v=Object(o.useState)(),y=v[0],b=v[1],w=function(e){r()(this,i),p(e)}.bind(this),E=function(e){r()(this,i),m(e)}.bind(this),_=function(e){r()(this,i),b(e)}.bind(this);Object(o.useEffect)(function(){r()(this,i),S()}.bind(this),[y,g,h]);var S=function(){r()(this,i);var e={};s&&g&&(e.audio=g),n&&h&&(e.webcam=h),n&&y&&(e.aspectRatio=y),c&&c(e)}.bind(this);return a.a.createElement(Fn,{ref:t},a.a.createElement(Un,null,"Settings"),a.a.createElement(Bn,null,n&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Webcam"),a.a.createElement(Hn,null,a.a.createElement(Ln,{handleSourceChange:w,type:On,selectedDevice:h||l}))),s&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Microphone"),a.a.createElement(Hn,null,a.a.createElement(Ln,{handleSourceChange:E,type:Nn,selectedDevice:g||u}))),n&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Aspect Ratio"),a.a.createElement(Hn,null,a.a.createElement(kn,{defaultLabel:"16:9",items:jn,onChange:_})))))}.bind(void 0)),qn=O.c.div(Mn||(Mn=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n & > span {\n position: relative;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n background-color: #43454E;\n cursor: ",";\n opacity: ",";\n\n & > img {\n margin-top: 10px;\n }\n }\n"])),function(e){return r()(this,void 0),e.enabled?"pointer":"default"}.bind(void 0),function(e){return r()(this,void 0),e.enabled?"1":"0.3"}.bind(void 0));function Wn(e){var t=this,i=e.webcam,n=e.mic,s=e.webcamSourceId,l=e.audioSourceId,u=e.aspectRatio,c=e.onSourceSelection,d=Object(o.useState)(!1),h=d[0],p=d[1],f=Object(o.useRef)(),g=Object(o.useRef)(),m=function(e){r()(this,t),!f.current||f.current.contains(e.target)||g.current.contains(e.target)||h&&p(!1)}.bind(this);return Object(o.useEffect)(function(){var e=this;if(r()(this,t),h)return document.addEventListener("mousedown",m),function(){r()(this,e),document.removeEventListener("mousedown",m)}.bind(this)}.bind(this),[f,h]),a.a.createElement(qn,{enabled:i||n},a.a.createElement("span",{onClick:function(){return r()(this,t),(i||n)&&p(!h)}.bind(this)},a.a.createElement("img",{ref:g,src:Object(N.d)("/svg/rapi/settings-white.svg"),width:"15"})),h&&a.a.createElement(Gn,{ref:f,webcam:i,audio:n,webcamSourceId:s,audioSourceId:l,aspectRatio:u,onSourceSelection:c}))}i(70);var $n,Yn,Kn,Jn,Xn,Qn,Zn,er,tr,ir,nr,rr=O.c.div($n||($n=Xe()(["\n width: 100%;\n"]))),or=O.c.iframe(Yn||(Yn=Xe()(["\n width: 100%;\n height: 95%;\n border: 1px solid #ddd;\n border-radius: 8px;\n"]))),ar=O.c.div(Kn||(Kn=Xe()(["\n position: relative;\n margin: 0;\n"]))),sr=Object(O.c)(ar)(Jn||(Jn=Xe()(["\n height: 100%;\n right: 0;\n"]))),lr=Object(O.c)(ar)(Xn||(Xn=Xe()(["\n width: 60%;\n display: flex;\n align-items: center;\n padding-right: 10px;\n"]))),ur=O.c.canvas(Qn||(Qn=Xe()(["\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 3px;\n background: #ebebeb 0% 0% no-repeat padding-box;\n"]))),cr=O.c.img(Zn||(Zn=Xe()(["\n display: block;\n height: 20px;\n width: 20px;\n padding: 4px;\n margin-right: 10px;\n background-color: #525252;\n border-radius: 50%;\n\n // @media only screen and (min-width: 540px) {\n // height: 26px;\n // }\n // @media only screen and (min-width: 720px) {\n // height: 32px;\n // }\n"]))),dr=O.c.div(er||(er=Xe()(["\n\n"]))),hr=Object(O.c)(dr)(tr||(tr=Xe()(["\n height: 90%;\n margin: 0 auto;\n @media only screen and (min-width: 540px) {\n height: 90%;\n }\n @media only screen and (min-width: 720px) {\n height: 91%;\n }\n"]))),pr=Object(O.c)(dr)(ir||(ir=Xe()(["\n width: 80%;\n height: 6px;\n"]))),fr="url",gr=1,mr=2;function vr(e){var t=this,i=e.type,n=e.stream,s=e.streamType,l=e.showIcon,u=e.errorCallback,c=Object(o.useRef)(),d=Object(o.useRef)(),h=Object(o.useRef)();console.log("AUDIO METER ",n,s);var p=function(e,i,n,o,a){return r()(this,t),e<i?o:e>n?a:(e-i)*(a-o)/(n-i)+o}.bind(this),f=function(e,i){r()(this,t);var n=i.getContext("2d"),o=i.width,a=i.height,s=e*a*5,l=p(2*s,0,200,50,255);n.clearRect(0,0,o,a),n.fillStyle="#000",n.fillRect(0,a,o,-3),n.fillStyle="rgb(".concat(Math.floor(l),", ").concat(Math.floor(205-l/2),", 50)"),n.fillRect(0,a,o,-s)}.bind(this),g=function(e,i){r()(this,t);var n=i.getContext("2d"),o=i.width,a=i.height,s=e*o*5;n.clearRect(0,0,o,a),n.fillStyle="#F5B93F",n.fillRect(0,0,3,o),n.fillRect(0,0,s,o)}.bind(this),m=function(){var e=this;r()(this,t),setTimeout(function(){r()(this,e),d.current&&0===d.current.volume&&console.log("WARNING FAULTY MIC")}.bind(this),2e3)}.bind(this),v=function(e){r()(this,t);var n=c.current;null!=n&&(i===gr?f(d.current.volume,n):g(d.current.volume,n)),h.current=window.requestAnimationFrame(v)}.bind(this);Object(o.useEffect)(function(){var e=this;if(r()(this,t),n&&s!==fr){try{if(n.getAudioTracks().length){var i=new AudioContext,o=i.createMediaStreamSource(n);d.current=Ke.createAudioMeter(i),m(),o.connect(d.current),console.log("DRAWING AUDIO METER"),v()}}catch(e){u&&u(e),console.log(e)}return function(){r()(this,e),console.log("AUDIO METER EXITING PROPERLY"),h.current&&(window.cancelAnimationFrame(h.current),h.current=null)}.bind(this)}}.bind(this),[n]);var y=n;return s===fr&&(y="".concat(n,"?mic=true")),function(){switch(r()(this,t),i){case i===gr:return a.a.createElement(sr,null,s===fr?a.a.createElement(rr,null,a.a.createElement(or,{src:y})):a.a.createElement(hr,null,a.a.createElement(ur,{ref:c})),l&&a.a.createElement(cr,{src:Object(N.d)("/svg/audio-on.svg"),alt:"Mic"}));default:return a.a.createElement(lr,null,l&&a.a.createElement(cr,{src:Object(N.d)("/svg/audio-on.svg"),alt:"Mic"}),s===fr?a.a.createElement(rr,null,a.a.createElement(or,{src:y})):a.a.createElement(pr,null,a.a.createElement(ur,{ref:c})))}}.bind(this)()}var yr=O.c.div(nr||(nr=Xe()(["\n display: flex;\n align-items: center;\n justify-content: right;\n"])));function br(e){var t=e.stream,i=e.streamType,n=e.showIcon;return a.a.createElement(yr,null,a.a.createElement(vr,{type:mr,stream:t,streamType:i,showIcon:n}))}function wr(e){var t=this,i=e.recorder,n=Object(o.useState)(0),s=n[0],l=n[1];Object(o.useEffect)(function(){var e=this;r()(this,t),i.setTimerCallback(function(t){return r()(this,e),l(t)}.bind(this))}.bind(this),[]);var u=function(){if(r()(this,t),s<0)return"0m:0s";var e=parseInt(s,10),i=Math.floor(e/3600),n=Math.floor((e-3600*i)/60),o=e-3600*i-60*n;i<10&&(i="0"+i),n<10&&(n="0"+n),o<10&&(o="0"+o);var a="".concat(n,":").concat(o);return parseInt(i)>0&&(a="".concat(i,"h:").concat(n,"m:").concat(o,"s")),a}.bind(this);return a.a.createElement("div",null,u())}var Er,_r,Sr,Tr,Cr=O.c.div(Er||(Er=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]))),kr=O.c.div(_r||(_r=Xe()(["\n width: ",";\n position: relative;\n border-radius: 25px;\n height: ",";\n z-index: 1;\n background-color: ",";\n"])),function(e){return r()(this,void 0),e.recording?"100px":"auto"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"50px":"auto"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"#43454E":"transparent"}.bind(void 0)),xr=O.c.div(Sr||(Sr=Xe()(["\n position: absolute;\n font-size: 11px;\n color: #ffffff;\n right: 10px;\n top: 35%;\n"]))),Ar=O.c.div(Tr||(Tr=Xe()(["\n width: ",";\n height: ",";\n border-radius: ",";\n left: ",";\n top: ",";\n background-color: rgb(221, 52, 65);\n margin: 0;\n position: relative;\n cursor: pointer;\n &:before {\n position: absolute;\n content: '';\n left: ",";\n top: ",";\n width: ",";\n height: ",";\n z-index: ",";\n border-radius: 50%;\n background-color: ",";\n border: ",";\n margin: 0;\n }\n"])),function(e){return r()(this,void 0),e.recording?"24px":"34px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"24px":"34px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"6px":"50%"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"13px":""}.bind(void 0),function(e){return r()(this,void 0),e.recording?"13px":""}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-10px":"-6px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-10px":"-6px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"44px":"42px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"44px":"42px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-1":"1"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"#FFFFFF":"transparent"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"none":"2px solid rgb(221, 52, 65)"}.bind(void 0));function Pr(e){var t=this,i=e.recorder,n=e.recordingStarted,o=e.onStopRecording,s=e.onStartRecording;return a.a.createElement(Cr,null,a.a.createElement(kr,{recording:n},a.a.createElement(Ar,{recording:n,onClick:function(){return r()(this,t),n?o():s()}.bind(this)}),n&&a.a.createElement(xr,null,a.a.createElement(wr,{recorder:i}))))}var Ir,Rr,Dr,Or,Nr,Lr=O.c.div(Ir||(Ir=Xe()(['\n width: 100%;\n height: 60px;\n position: absolute;\n bottom: 0;\n left: 0;\n background-color: rgba(0,0,0,0.6);\n border-radius: 0 0 15px 15px;\n display: grid;\n grid-template-columns: repeat(2, 1fr) 2fr 2fr;\n font-family: "Open Sans";\n justify-content: center;\n']))),Mr=O.c.div(Rr||(Rr=Xe()(["\n grid-column-start: ",";\n min-width: 200px;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n place-items: center;\n"])),function(e){return r()(this,void 0),!e.webcam||e.recordingStarted?"3":"auto"}.bind(void 0)),Fr=O.c.div(Dr||(Dr=Xe()(["\n position: absolute;\n bottom: 100%;\n text-align: center;\n width: 100%;\n color: #FFFFFF;\n background-color: inherit;\n font: ",";\n > span {\n color: #DD3441;\n font: normal normal 600 16px/22px Open Sans;\n }\n"])),function(e){return r()(this,void 0),e.recordingStarted?"normal normal normal 12px/17px Open Sans":"normal normal 600 16px/22px Open Sans"}.bind(void 0)),Ur=O.c.div(Or||(Or=Xe()(["\n\n"]))),Br=O.c.div(Nr||(Nr=Xe()(["\n color: #fff;\n font-size: 10px;\n"])));function Vr(e){var t=this,i=e.recorder,n=e.recordingStarted,o=e.screen,s=e.webcam,l=e.mic,u=e.stream,c=e.streamType,d=e.webcamSourceId,h=e.audioSourceId,p=e.aspectRatio,f=e.onSourceSelection,g=e.showTeleprompter,m=e.onTeleprompterToggle,v=e.teleprompterEnabled,y=e.onAbortRecording,b=e.onPauseResumeRecording,w=e.recordingPaused,E=e.onStartRecording,_=e.onStopRecording,S=e.lightingCanvas,T=e.videoElement,C=e.webcamQualityInfo,k=function(){return r()(this,t),n&&g?a.a.createElement(Fr,{recordingStarted:!0},"Note: Press Space to Play/Pause video prompting"):n?void 0:a.a.createElement(Fr,null,"Press ",a.a.createElement("span",null,"Record")," to start!")}.bind(this);return a.a.createElement(Lr,null,k(),s&&!n&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Yi,{lightingCanvas:S,videoElement:T}),a.a.createElement(an,{webcamQualityInfo:C})),a.a.createElement(Mr,{webcam:s,recordingStarted:n},!n&&a.a.createElement(Wn,{webcam:s,mic:l,webcamSourceId:d,audioSourceId:h,aspectRatio:p,onSourceSelection:f}),n&&a.a.createElement(En,{type:wn.ABORT,onAbortRecording:y}),a.a.createElement(Pr,{recorder:i,recordingStarted:n,onStartRecording:E,onStopRecording:_}),n&&a.a.createElement(En,{type:wn.PAUSE_RESUME,onPauseResumeRecording:b,recordingPaused:w}),!n&&!o&&v&&a.a.createElement(Ur,null,a.a.createElement(vn,{showTeleprompter:g,onTeleprompterToggle:m}),a.a.createElement(Br,null,"Teleprompter"))),(s||o)&&l&&u&&a.a.createElement(br,{stream:u,streamType:c,showIcon:!0}))}var zr,Hr,jr,Gr,qr,Wr,$r,Yr,Kr,Jr,Xr,Qr=O.c.div(zr||(zr=Xe()(["\n width: 80%;\n margin: 0 auto;\n display: grid;\n grid-template-columns: 50% 50%;\n margin-top: 15px;\n position: relative;\n z-index: 20;\n"]))),Zr=O.c.div(Hr||(Hr=Xe()(["\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 4fr;\n -padding-left: 20px;\n padding-right: 10px;\n ","\n"])),function(e){return r()(this,void 0),e.disabled&&"opacity: 0.4; cursor: not-allowed"}.bind(void 0)),eo=O.c.div(jr||(jr=Xe()(["\n -background-color: #f5fdf9;\n -border: 1px solid #39ce8e;\n border-radius: 4px;\n width: 40px;\n height: 35px;\n filter: grayscale(1);\n text-align: right;\n & > img {\n height: 15px;\n margin-top: 9px;\n }\n"]))),to=O.c.div(Gr||(Gr=Xe()(["\n width: 40px;\n height: 35px;\n filter: grayscale(1);\n text-align: right;\n & > img {\n height: 15px;\n margin-top: 9px;\n transform: scale(1.2);\n }\n"]))),io=O.c.div(qr||(qr=Xe()(["\n margin-left: 15px;\n width: 200px;\n"]))),no=O.c.div(Wr||(Wr=Xe()(["\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 4fr;\n padding-left: 10px;\n -padding-right: 20px;\n ","\n"])),function(e){return r()(this,void 0),e.disabled&&"opacity: 0.4; cursor: not-allowed"}.bind(void 0));function ro(e){var t=e.webcam,i=e.audio,n=e.handleWebcamSourceChange,r=e.handleAudioSourceChange;return a.a.createElement(Qr,null,a.a.createElement(Zr,{disabled:!t},a.a.createElement(eo,null,a.a.createElement("img",{src:Object(N.d)("/svg/rapi/webcam-on.svg")})),a.a.createElement(io,null,a.a.createElement(Ln,{handleSourceChange:n,type:On,disabled:!t}))),a.a.createElement(no,{disabled:!i},a.a.createElement(to,null,a.a.createElement("img",{src:Object(N.d)("/svg/rapi/mic-on.svg")})),a.a.createElement(io,null,a.a.createElement(Ln,{handleSourceChange:r,type:Nn,disabled:!i}))))}var oo,ao,so=O.c.div($r||($r=Xe()([""]))),lo=O.c.div(Yr||(Yr=Xe()(["\n text-align: center;\n color: #C3C3C3;\n font: normal normal normal 14px/18px Open Sans;\n width: 75%;\n letter-spacing: 0.2px;\n margin: 0 auto;\n"]))),uo=O.c.video(Kr||(Kr=Xe()(["\n height: 280px;\n"]))),co=O.c.div(Jr||(Jr=Xe()(["\n width: 90%;\n margin: 15px auto 0 auto;\n text-align: center;\n"]))),ho=O.c.div(Xr||(Xr=Xe()(["\n font: normal normal normal 12px/17px Open Sans;\n color: #FFFFFF;\n letter-spacing: 0.5px;\n margin-top: 10px;\n cursor: pointer;\n"])));function po(e){var t=this,i=e.permissionError,n=e.webcam,s=e.mic,l=e.onPermissionGranted,u=(e.showClose,e.onClose);Object(o.useEffect)(function(){var e=this;r()(this,t);var o=Q.k[i.type];if(!(isNaN(parseInt(o))||parseInt(o)-1e3>=100)){var a=setInterval(function(){var t=this;r()(this,e),Le({webcam:n,mic:s}).then(function(){r()(this,t),clearInterval(a),console.log("SUCCESS CAN GO BACK TO THE RECORD SCREEN"),l()}.bind(this)).catch(function(){r()(this,t),console.log("PERMISSION NOT YET GRANTED")}.bind(this))}.bind(this),1e3);return function(){r()(this,e),clearInterval(a)}.bind(this)}}.bind(this));var c=function(){if(r()(this,t),!i)return"Unknown error";switch(i.type){case Q.k.WEBCAM_PERMISSION_DENIED:return"Webcam permission denied";case Q.k.WEBCAM_NOT_FOUND:return"Webcam device not found";case Q.k.WEBCAM_READ_TIMEOUT:return"Could not start the webcam device. Please restart your browser or system and try again";case Q.k.SCREEN_PERMISSION_DENIED:case Q.k.SYSTEM_SCREEN_PERMISSION_DENIED:return"Please provide system permission to record";case Q.k.SCREEN_PERMISSION_DENIED:return"Please provide permission to record screen";case Q.k.SCREEN_NOT_READABLE_ERROR:return"Error in starting screen recording. Please restart your browser or system and try again";default:return"Unknown device error"}}.bind(this),d=function(e){r()(this,t),e.preventDefault(),u&&u()}.bind(this),h=function(){if(r()(this,t),i)switch(i.type){case Q.k.WEBCAM_PERMISSION_DENIED:return Object(N.d)("/hippo_videos/WebcamMicPermissionError.mp4");case Q.k.SCREEN_PERMISSION_DENIED:return Object(N.d)("/hippo_videos/ScreenShareCancelError.mp4");case Q.k.SCREEN_PERMISSION_DENIED:case Q.k.SYSTEM_SCREEN_PERMISSION_DENIED:default:return Object(N.d)("/hippo_videos/WebcamAudioSettings.mp4")}return"http://localhost:3000/hippo_videos/WebcamAudioSettings.mp4"}.bind(this);return a.a.createElement(so,null,a.a.createElement(co,null,a.a.createElement(uo,{src:h(),autoPlay:!0,muted:!0,loop:!0})),a.a.createElement(lo,null,c()),a.a.createElement(ho,{onClick:d},"Close"))}var fo=O.c.div(oo||(oo=Xe()(['\n position: relative;\n width: 30px;\n height: 30px;\n opacity: 0.7;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n &:before,\n &:after {\n position: absolute;\n right: 14px;\n top: 4px;\n content: " ";\n height: 20px;\n width: 2px;\n background-color: #FFFFFF;\n }\n &:before {\n transform: rotate(45deg);\n }\n &:after {\n transform: rotate(-45deg);\n }\n']))),go=Object(O.c)(fo)(ao||(ao=Xe()(["\n background-color: #121212;\n border-radius: 4px;\n"])));function mo(e){var t=e.withBorder,i=void 0!==t&&t,n=e.onClose;return i?a.a.createElement(go,{onClick:n}):a.a.createElement(fo,{onClick:n})}var vo,yo,bo,wo,Eo,_o,So,To,Co=O.c.div(vo||(vo=Xe()(["\n position: relative;\n border-radius: 15px;\n margin: 0 auto;\n width: 640px;\n min-height: 360px;\n max-height: 500px;\n background-color: #2E2E2E;\n display: grid;\n place-items: center;\n"]))),ko=O.c.div(yo||(yo=Xe()(["\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: #000;\n top: 0;\n left: 0;\n border-radius: 15px;\n z-index: 100;\n"]))),xo=O.c.div(bo||(bo=Xe()(["\n background: transparent linear-gradient(180deg, #000000 0%, #000000CC 83%, #00000000 100%) 0% 0% no-repeat padding-box;\n font: normal normal 600 14px/16px Open Sans;\n color: ",";\n height: 45px;\n display: flex;\n position: absolute;\n justify-content: center;\n align-items: center;\n top: 0;\n width: 100%;\n left: 0;\n z-index: 10;\n border-radius: 15px 15px 0 0;\n opacity: 0.72;\n"])),function(e){return r()(this,void 0),e.startedRecording?"#DE3232":"#FFFFFF"}.bind(void 0)),Ao=O.c.div(wo||(wo=Xe()(["\n display: grid;\n margin-top: -30px;\n"]))),Po=O.c.div(Eo||(Eo=Xe()(["\n display: flex;\n flex-flow: column;\n"]))),Io=O.c.div(_o||(_o=Xe()(["\n position: absolute;\n width: 275px;\n bottom: 85px;\n box-shadow: 0px 8px 12px #00000066;\n border: 1px solid #34343C;\n background-color: #212126;\n padding: 5px 15px;\n border-radius: 10px;\n z-index: 10;\n text-align: left;\n .mic-error-modal-header {\n display: flex;\n align-items: center;\n color: #C3C3C3;\n font: normal normal 600 12px/10px Open Sans;\n img {\n margin-right: 10px;\n width: 16px;\n }\n }\n .mic-error-modal-content {\n font: italic normal normal 12px/13px Open Sans;\n color: #C3C3C3;\n padding: 10px 0px;\n line-height: 1.4em;\n }\n"]))),Ro=O.c.div(So||(So=Xe()(["\n position: absolute;\n right: -35px;\n top: 0px;\n"]))),Do=O.c.div(To||(To=Xe()(["\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background: rgba(0,0,0,0.6);\n position: absolute;\n z-index: 500;\n .hv-cancel-record-modal {\n display: flex;\n justify-content: center;\n flex-flow: column;\n height: 100%;\n align-items: center;\n &-text {\n color: #fff;\n margin-bottom: 25px;\n }\n &-cancel-option {\n margin-right: 15px;\n }\n }\n"]))),Oo=i(16);function No(e){var t=e.text,i=e.confirmText,n=e.cancelText,r=e.onConfirm,o=e.onCancel;return a.a.createElement(Do,null,a.a.createElement("div",{className:"hv-cancel-record-modal"},a.a.createElement("div",{className:"hv-cancel-record-modal-text"},t),a.a.createElement("div",{className:"hv-cancel-record-modal-options-wrapper"},a.a.createElement(Oo.d,{className:"hv-cancel-record-modal-cancel-option",text:n,onClickHandler:o}),a.a.createElement(Oo.d,{className:"hv-cancel-record-modal-confirm-option",text:i,type:Oo.b.SECONDARY,onClickHandler:r}))))}function Lo(e){var t=this,i=e.recorder,n=e.recorderAPIUtils,s=e.onFinishRecording,l=e.onRecordingCancel,u=(e.onCloseRecorder,e.extensionAvailable),c=e.handlePopupClose,d=i.getRecordingConfiguration(),h=Object(o.useContext)(L.a).recorderInitOptions,p=h.record_config,f=h.inline,g=p.show_selectable_options,m=p.teleprompter,v=p.screen,y=p.webcam,b=p.mic,w=!1!==v,E=!1!==y,_=!1!==b,S=0!=g,T=Object(o.useState)(w),C=T[0],k=T[1],x=Object(o.useState)(E),A=x[0],P=x[1],I=Object(o.useState)(_),R=I[0],D=I[1],O=Object(o.useState)({}),M=O[0],F=O[1],U=Object(o.useState)(!1),B=U[0],V=U[1],z=Object(o.useState)(!1),H=z[0],j=z[1],G=Object(o.useState)(!1),q=G[0],W=G[1],$=Object(o.useState)(!1),Y=$[0],K=$[1],J=Object(o.useState)(!1),X=J[0],Z=J[1],ee=Object(o.useState)({}),te=ee[0],ie=ee[1],ne=Object(o.useState)(!1),re=ne[0],oe=ne[1],ae=Object(o.useState)(!1),se=ae[0],le=ae[1],ue=Object(o.useState)(!1),ce=ue[0],de=ue[1],he=Object(o.useRef)({}),pe=Object(o.useRef)(),fe=Object(o.useRef)(),ge=Object(o.useRef)(),me=Object(o.useRef)(!1),ve=Object(o.useRef)();Object(o.useEffect)(function(){var e=this;if(r()(this,t),ve.current=!0,console.info("PREVIEW UE ",u),!u)return be({preview:!0}),function(){return r()(this,e),ve.current=!1}.bind(this)}.bind(this),[]),Object(o.useEffect)(function(){if(r()(this,t),M.webcamStream){var e=(e=>{const t=e.getVideoTracks()[0];let i={frameRate:"N/A",resolution:"N/A",quality:"N/A"};if(t){const e=t.getSettings();if(e){const{width:t,height:n,frameRate:r}=e;r&&(i.frameRate=r.toFixed(2)),t&&(i.quality=Fe(t)),t&&n&&(i.resolution=`${t} x ${n}`)}}return i})(M.webcamStream);console.log("QUALITY ",e),ie(e)}}.bind(this),[M]),Object(o.useEffect)(function(){r()(this,t),d.screenRecord=C,d.webCam=A,d.audio=R,i.updateConfig({recordingConfiguration:d}),be({preview:!0})}.bind(this),[C,A,R]),Object(o.useEffect)(function(){if(r()(this,t),n&&M){if(!C)return n.sendEvent("_remove_webcam_preview");console.log("streams1!!!! ",M),A?n.sendEvent("_show_webcam_preview",{stream:M.webcamStream}):n.sendEvent("_remove_webcam_preview")}}.bind(this),[C,A,M]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),q)if(B)j(!1),V(!1),i.resumeRecording();else{if(!f&&d.screenRecord&&n&&n.sendEvent("hide_frame"),u)return void i.startExtensionRecording().then(function(){r()(this,e),K(!0),j(!1)}.bind(this));_e(),K(!0),j(!1)}}.bind(this),[q]),Object(o.useEffect)(function(){var e=this;r()(this,t),re&&A&&Le({webcam:!0}).catch(function(){return r()(this,e),n.sendEvent("_remove_webcam_preview")}.bind(this))}.bind(this),[re]);var ye=function(e){var i=e.error;r()(this,t),console.log("AAAAAA ",i,ve.current,se),ve.current&&(console.log("AAAAAA1 ",i,se),i&&!se&&le(!0),i||le(!1))}.bind(this);console.log("NO VOLUME ",se);var be=function(e){var n=this,o=e.preview;if(r()(this,t),console.info("[RecordPreview] Fetch Stream ",o),(!o||A||R)&&!me.current)return new Promise(function(e,t){var a=this;r()(this,n);try{me.current=!0,i.getStream({preview:o}).then(function(t){var n=t.webcamStream,o=t.screenStream,s=t.message,l=t._type;r()(this,a),console.log("STREAMS >>> ",n),me.current=!1,"no_config_change"===s&&console.log("STREAM UNCHANGED"),R&&i.checkMicVolumeStatus(ye),console.log("SET STREAMS >>> ",n),ge.current=null;var u=l||"stream";F({type:u,webcamStream:n,screenStream:o}),e({type:u,webcamStream:n,screenStream:o})}.bind(this)).catch(function(e){r()(this,a),me.current=!1,console.log("Exception in fetching stream ",e),ge.current=e,oe(!0),t(e)}.bind(this))}catch(e){me.current=!1,console.log("EXCEPTION ",e),t(e)}}.bind(this))}.bind(this),we=function(){var e=this;return r()(this,t),ge.current?oe(!0):u&&d.screenRecord?(setExtensionRecInitializing(!0),void _e().then(function(){r()(this,e),setExtensionRecInitializing(!1),j(!0)}.bind(this))):(console.log("FETCH STREAM 2"),void be({preview:!1}).then(function(t){var i=this;if(r()(this,e),console.log("START COUNTDOWN ",t),console.log("RECORDING CONFIG",d,M),u)return setExtensionRecInitializing(!0),void _e().then(function(){r()(this,i),setExtensionRecInitializing(!1),j(!0)}.bind(this));n.sendEvent("record_started"),n.sendEvent("_record_started",{showWebcamPreview:d.screenRecord&&d.webCam,stream:t&&t.webcamStream,showMarkupTools:d.screenRecord}),Ee(),j(!0)}.bind(this)))}.bind(this),Ee=function(){var e=this;r()(this,t),console.log("CREATE RECORDING"),i.createRecording(d).then(function(t){r()(this,e),console.log("CREATE RECORDING RESPONSE ",t),t.status&&(d.webcam={key:t.webcamKey,bucket:t.uploadBucket},d.screen={key:t.screenKey,bucket:t.uploadBucket},i.updateConfig({recordingConfiguration:d}),he.current=t)}.bind(this)).catch(function(t){r()(this,e),console.log("CREATE RECORDING ERROR ",t)}.bind(this))}.bind(this),_e=function(){return r()(this,t),i.startRecording({externalStopStreamCallback:Se})}.bind(this),Se=function(){var e=this;r()(this,t),console.log("FINISH RECORDING CLICKED"),n.sendEvent("record_stopped"),i.finishRecording().then(function(t){r()(this,e),u&&s(),console.log("ASSET_ID ",t)}.bind(this)).catch(function(t){r()(this,e),console.log("ASSET_ID",t)}.bind(this)),u||s(i.getRecordingObjectUrls()),V(!1)}.bind(this),Te=function(){r()(this,t),console.log("SHOW PREVIEW SCREEN ",!0),i.pauseRecording(),V(!0),W(!1),de(!0)}.bind(this),Ce=function(){r()(this,t),n.sendEvent("record_cancelled"),i.cancelRecordingWithoutStream(),de(!1),K(!1),V(!1),W(!1),l()}.bind(this),ke=function(){r()(this,t),console.log("handle pause recording called ",B),B?(xe(),n.sendEvent("record_resumed")):(n.sendEvent("record_paused"),i.pauseRecording(),V(!0))}.bind(this),xe=function(){r()(this,t),de(!1),W(!1),j(!0)}.bind(this),Ae=function(){r()(this,t);var e=0;return C&&e++,A&&e++,R&&e++,e>1}.bind(this),Pe=function(e){var n=e.webcam,o=e.audio,a=e.aspectRatio;if(r()(this,t),n||o||a){var s=0;console.log("SOURCES ",n,d.webcamSourceId),n&&n!==d.webcamSourceId&&(d.webcamSourceId=n,s++),o&&o!==d.audioSourceId&&(d.audioSourceId=o,s++),a&&a!==d.aspectRatio&&(d.aspectRatio=a,s++),console.info("FETCH STREAM 3 ",s),i.updateConfig({recordingConfiguration:d}),s>0&&be({preview:!0})}}.bind(this),Ie=function(e){if(r()(this,t),ge.current){var i=Q.k[ge.current.type],n="webcam";parseInt(i)-1e3>=100&&(n="screen"),console.log("ERROR MODULE ",n,e,A,R),"screen"===e&&"screen"===n&&C&&(ge.current=null),"webcam"!==e&&"mic"!==e||"webcam"!==n||!("webcam"===e&&A||"mic"===e&&R)||(ge.current=null)}}.bind(this),Re=function(e){if(r()(this,t),S)switch(console.log("TYPE ",e),Ie(e),e){case"screen":if(C&&!Ae())return;k(!C);break;case"webcam":if(A&&!Ae())return;P(!A);break;case"mic":if(R&&!Ae())return;D(!R)}}.bind(this),De=function(e){return r()(this,t),Pe({audio:e})}.bind(this),Oe=function(e){return r()(this,t),Pe({webcam:e})}.bind(this),Ne=function(){r()(this,t),ge.current=null,Me(),be({preview:!0})}.bind(this),Me=function(){r()(this,t),ge.current.type===Q.k.SCREEN_PERMISSION_DENIED&&(ge.current=null),oe(!1)}.bind(this),Ue=function(){return r()(this,t),Y&&B?"Recording paused":Y?"Recording in progress":"Record Preview"}.bind(this),Be=function(){return r()(this,t),se?Object(N.d)("/svg/rapi/mic-error-main-red.svg"):Object(N.d)("/svg/audio-on.svg")}.bind(this),Ve=function(){r()(this,t),W(!0)}.bind(this);return a.a.createElement(Co,null,!f&&!Y&&a.a.createElement(Ro,null,a.a.createElement(mo,{withBorder:!0,onClose:c})),ce&&a.a.createElement(No,{text:"Do you want to cancel the recording?",confirmText:"Yes",cancelText:"No",onConfirm:Ce,onCancel:xe}),!X&&!H&&a.a.createElement(xo,{startedRecording:Y},Ue()),H&&a.a.createElement(Gt,{screen:C,onCountdownComplete:Ve}),R&&se&&a.a.createElement(Io,null,a.a.createElement("div",{className:"mic-error-modal-header"},a.a.createElement("img",{src:Object(N.d)("/svg/rapi/error-circle-red.svg")}),"Microphone audio error"),a.a.createElement("div",{className:"mic-error-modal-content"},"No volume detected. Please check your microphone before continuing recording.")),X&&!C&&a.a.createElement(Oi,{countdownStarted:H,recordingStarted:Y}),a.a.createElement(Po,null,C&&a.a.createElement(Ao,null,a.a.createElement($t,{screenEnabled:v,webcamEnabled:y,micEnabled:b,userSelect:S,recordingStarted:Y,screen:C,webcam:A,mic:R,handleOptionsSelect:Re})),C&&!Y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(ro,{webcam:A,audio:R,webcamSourceId:d.webcamSourceId,audioSourceId:d.audioSourceId,handleWebcamSourceChange:Oe,handleAudioSourceChange:De}))),re&&a.a.createElement(ko,null,a.a.createElement(po,{permissionError:ge.current,webcam:A,mic:R,showClose:!0,onClose:Me,onPermissionGranted:Ne})),!C&&a.a.createElement(St,{stream:M.webcamStream,streamType:M.type,webcam:A,mic:R,audioIcon:Be(),preview:!Y,lightingCanvasRef:pe,videoElementRef:fe}),!C&&!Y&&S&&a.a.createElement(Ft,{screenEnabled:v,webcamEnabled:y,micEnabled:b,userSelect:S,screen:C,webcam:A,mic:R,handleOptionsSelect:Re}),a.a.createElement(Vr,{recorder:i,recordingStarted:Y,screen:C,webcam:A,mic:R,stream:M.webcamStream,streamType:M.type,webcamSourceId:d.webcamSourceId,audioSourceId:d.audioSourceId,aspectRatio:d.aspectRatio,onSourceSelection:Pe,showTeleprompter:X,onTeleprompterToggle:function(){return r()(this,t),Z(!X)}.bind(this),teleprompterEnabled:m,onAbortRecording:Te,onPauseResumeRecording:ke,recordingPaused:B,onStartRecording:we,onStopRecording:Se,lightingCanvas:pe.current,videoElement:fe.current,webcamQualityInfo:te}))}var Mo,Fo=i(257),Uo=i.n(Fo),Bo=O.c.div(Mo||(Mo=Xe()(["\n display: flex;\n justify-content: center;\n flex-flow: column;\n align-items: center;\n height: 350px;\n border: 1px solid #E5E5E5;\n border-radius: 14px;\n .close-recorder-options-warpper {\n margin-top: 20px;\n }\n"])));function Vo(e){var t=this,i=e.onVideoCancelRevert,n=e.onRecorderClose,o=function(){r()(this,t),console.log("RECORDER CANCEL VIDEO"),n()}.bind(this);return a.a.createElement(Bo,null,a.a.createElement("p",null,"Are you sure you want to cancel the recording?"),a.a.createElement("div",{className:"close-recorder-options-warpper"},a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Cancel Recording",onClickHandler:function(){r()(this,t),o(),console.log("Cancel recording")}.bind(this),style:{marginRight:"10px"}}),a.a.createElement(Oo.d,{text:"Go Back",onClickHandler:function(){r()(this,t),i(),console.log("Go back")}.bind(this)})))}var zo,Ho=i(391),jo=i.n(Ho),Go=O.c.div(zo||(zo=Xe()(["\n margin: 0 auto;\n"])));function qo(e){var t=this,i=e.importVideoUrl,n=e.screenUrl,s=e.webcamUrl,l=e.thumbnailUrl,u=e.isAudioOnly,c=e.recordingConfiguration,d=e.customColors,h=e.onVideoPlayerInitialize;console.log("PP ",e);var p=Object(o.useRef)(),f=Object(o.useRef)(),g=function(){return r()(this,t),i||(n||(s||void 0))}.bind(this),m=function(){if(r()(this,t),n)return s}.bind(this),v=function(){var e;if(r()(this,t),c&&c.screenRecord&&c.webCam){var i={width:288,height:216};c.sourceConfig&&c.sourceConfig.webcam&&(i=c.sourceConfig.webcam),e=_i.a.fitCenterLayout(i,{width:384,height:216})}return{el:p.current,fromSDK:!0,id:"preview-video",src:g(),audioSrc:m(),fullscreenControl:!1,primaryVideoLayout:e,customColors:d,isAudioOnly:u,integType:"generic_embed",thumbnail:l}}.bind(this);return Object(o.useEffect)(function(){var e=this;r()(this,t),p.current&&(console.log("PLAYER SETTINGS ",v()),f.current=new jo.a(v()),console.log("V PLAYER VIEW REF ",f.current),h(f.current),f.current.show(),setTimeout(function(){r()(this,e),f.current.resizePlayerForWindow()}.bind(this),1e3))}.bind(this),[p,f,s,n]),a.a.createElement(o.Fragment,null,a.a.createElement(Go,{ref:p}))}var Wo,$o,Yo=i(392),Ko=O.c.div(Wo||(Wo=Xe()(["\n background: ",";\n height: 100%;\n border-radius: inherit;\n transition: width 0.2s ease-in;\n"])),function(e){return r()(this,void 0),e.primaryColor}.bind(void 0));function Jo(e){var t=e.completedPercent,i=e.error,n=Object(o.useContext)(L.a),r=n&&n.theme&&n.theme.primaryColor;return r||(r="#FD7564"),i?a.a.createElement(Ko,{primaryColor:r,style:{width:"0%"}}):a.a.createElement(Ko,{primaryColor:r,style:{width:"".concat(t,"%")}})}var Xo=O.c.div($o||($o=Xe()(["\n position: relative;\n height: 8px;\n width: 100%;\n border-radius: 50px;\n border: none;\n background-color: #EDEDED;\n"])));function Qo(e){return a.a.createElement(Xo,null,a.a.createElement(Jo,e))}var Zo,ea,ta,ia,na,ra=O.c.div(Zo||(Zo=Xe()(["\n border: ",";\n width: 100%;\n background-color: ",";\n border-radius: 8px;\n padding: 20px 15px;\n margin-bottom: 15px;\n ","\n &.upload-progress-enter {\n max-height: 0px;\n overflow: hidden;\n }\n &.upload-progress-enter-active {\n max-height: 100px;\n overflow: auto;\n transition: max-height 500ms ease-in;\n }\n &.upload-progress-exit {\n max-height: 100px;\n border: none;\n }\n &.upload-progress-exit-active {\n max-height: 0px;\n border: none;\n overflow: hidden;\n transition: max-height 500ms ease-in;\n }\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"none":"1px solid #E6E6E6"}.bind(void 0),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"transparent":"#FFFFFF"}.bind(void 0),function(e){return r()(this,void 0),e.progressType!==ua.IMPORT&&"box-shadow: 0px 8px 12px #0000001A;"}.bind(void 0)),oa=O.c.div(ea||(ea=Xe()(["\n display: flex;\n justify-content: space-between;\n padding: 10px 0 5px 0;\n"]))),aa=O.c.div(ta||(ta=Xe()(["\n font-size: 13px;\n font-family: 'Open Sans';\n color: ",";\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#FFFFFF":"#4B4C4C"}.bind(void 0)),sa=O.c.div(ia||(ia=Xe()(["\n font-family: 'Open Sans';\n font-size: 12px;\n color: ",";\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#FFFFFF":"#4B4C4C"}.bind(void 0)),la=O.c.div(na||(na=Xe()(["\n text-align: right;\n font-family: 'Open Sans';\n font-size: 12px;\n color: ",";\n padding: 5px 0 10px 0;\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#D5D5D5":"#848383"}.bind(void 0)),ua={RECORD:1,IMPORT:2};function ca(e){var t=this,i=e.progressStatus,n=e.timeRemainingStatus,s=e.uploadProgress,l=e.type,u=s.completedPercent,c=void 0===u?0:u,d=s.type,h=Object(o.useRef)(),p=Object(o.useRef)();return console.log("UPLOAD !!!! ",i,s,h.current),Object(o.useEffect)(function(){var e=this;return r()(this,t),console.log("UPLOAD PROGRESS MOUNTED",c),h.current=0,p.current=null,function(){r()(this,e),console.log("UPLOAD PROGRESS UNMOUNTED"),h.current=0,p.current=null}.bind(this)}.bind(this),[]),s.error&&(h.current=0),s.completed||100!==s.completedPercent?p.current===d&&"upload"!=s.type?h.current<c&&(h.current=c):(p.current=d,h.current=c):console.log("ERROR !!!"),a.a.createElement(ra,{progressType:l},a.a.createElement(oa,null,a.a.createElement(aa,{progressType:l},i),a.a.createElement(sa,{progressType:l},"".concat(h.current,"%"))),a.a.createElement(Qo,{completedPercent:h.current,error:s.error}),a.a.createElement(la,{progressType:l},n))}var da,ha={completedPercent:0,type:"upload"};function pa(e){var t=this,i=e.showUploadProgress,n=e.recorder,s=e.onUploadComplete,l=e.onUploadError,u=Object(o.useState)(ha),c=u[0],d=u[1],h=Object(o.useRef)(),p=Object(N.e)(c);return Object(o.useEffect)(function(){var e=this;if(r()(this,t),console.log("progressFetchInterval.current ",h.current,i),!h.current)return h.current=setInterval(function(){var t=this;r()(this,e);try{if(!i)return clearInterval(h.current),void(h.current=null);n.getUploadDetails().then(function(e){return r()(this,t),e&&e.completed?(s(),clearInterval(h.current),void(h.current=null)):e&&e.error?(l(e.errorType),clearInterval(h.current),void(h.current=null)):void d(e)}.bind(this)).catch(function(e){r()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(h.current),h.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e)}}.bind(this),1e3),function(){r()(this,e),clearInterval(h.current),h.current=null}.bind(this)}.bind(this)),a.a.createElement(D,{in:i,timeout:300,unmountOnExit:!0,classNames:"upload-progress"},a.a.createElement(ca,{type:ua.RECORD,timeRemainingStatus:p,uploadProgress:c,progressStatus:"Uploading Video"}))}var fa,ga=O.c.div(da||(da=Xe()(["\n box-shadow: 0px 8px 12px #0000001a;\n border: 1px solid #E6E6E6;\n padding: 20px 35px;\n margin: 10px 0;\n border-radius: 8px;\n .error-widget {\n &-text {\n margin-bottom: 10px;\n text-align: left;\n }\n &-cta-wrapper {\n text-align: right;\n button:last-of-type {\n margin-right: 20px;\n }\n }\n &-retry-button-wrapper {\n display: inline;\n }\n &-download-button-wrapper {\n display: inline;\n }\n }\n"])));function ma(e){var t=this,i=e.error,n=e.onRetry,o=e.recordingSource,s="Error in create recording";"UPLOAD_ERROR"===i.type&&(s="Error while uploading video");var l="Retry";"UPLOAD_ERROR"===i.type&&(l="Retry Upload");var u=function(){if(r()(this,t),"UPLOAD_ERROR"===i.type){var e=[];if(o)for(var n in o){var a=o[n];e.push({link:a,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}}.bind(this);return a.a.createElement(ga,null,a.a.createElement("div",{className:"error-widget-text"},s),a.a.createElement("div",{className:"error-widget-cta-wrapper"},a.a.createElement("div",{className:"error-widget-download-button-wrapper"},"UPLOAD_ERROR"===i.type&&a.a.createElement(Oo.d,{style:{marginRight:"20px"},icon:Object(N.d)("/svg/rapi/download-icon.svg"),text:"Download Recording",options:u(),type:Oo.b.TRANSPARENT,buttonFeature:Oo.a.DROPDOWN})),a.a.createElement("div",{className:"error-widget-retry-button-wrapper"},a.a.createElement(Oo.d,{text:l,onClickHandler:n}))))}var va=O.c.div(fa||(fa=Xe()(['\n margin: 15px 0;\n height: 45px;\n text-align: left;\n position: relative;\n .title-wrapper {\n display: flex;\n align-items: center;\n cursor: pointer;\n div {\n font: normal normal 600 16px/33px Open Sans;\n }\n img {\n margin-left: 10px;\n\n }\n }\n .title-input-wrapper {\n width: 350px;\n position: relative;\n display: flex;\n align-items: center;\n input {\n border: 1px solid #cccccc;\n box-shadow: 0px 3px 6px #00000012;\n border-radius: 4px;\n width: 100%;\n padding: 5px 60px 5px 10px;\n font: normal normal normal 16px/33px Open Sans;\n }\n .title-close {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.3;\n right: 0px;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n &::before,\n &::after {\n position: absolute;\n content: " ";\n height: 18px;\n width: 2px;\n background-color: #333;\n }\n &::before {\n transform: rotate(45deg);\n }\n &::after {\n transform: rotate(-45deg);\n }\n }\n\n .title-save {\n right: 45px;\n bottom: 15px;\n opacity: 0.8;\n position: absolute;\n display: inline-block;\n transform: rotate(45deg);\n height: 20px;\n width: 10px;\n border-bottom: 2px solid #37c689;\n border-right: 2px solid #37c689;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n }\n }\n'])));function ya(e){var t=this,i=e.onTitleSave,n=e.videoTitle||"New Recording",s=Object(o.useState)(n),l=s[0],u=s[1],c=Object(o.useState)(!1),d=c[0],h=c[1],p=function(){r()(this,t),l.length>0?i(l):i("New Recording"),h(!1)}.bind(this),f=function(e){r()(this,t),"Enter"===e.key&&p()}.bind(this);return a.a.createElement(va,null,d?a.a.createElement("div",{className:"title-input-wrapper"},a.a.createElement("input",{type:"text",onChange:function(e){return r()(this,t),u(e.target.value)}.bind(this),onBlur:p,onKeyDown:f,value:l}),a.a.createElement("div",{className:"title-save",onClick:p}),a.a.createElement("div",{className:"title-close",onClick:function(){return r()(this,t),h(!1)}.bind(this)})):a.a.createElement("div",{className:"title-wrapper",onClick:function(){return r()(this,t),h(!0)}.bind(this)},a.a.createElement("div",null,l),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/pen.svg")})))}function ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=oi()(e);if(t){var r=oi()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ni()(this,i)}}var wa,Ea,_a,Sa,Ta=function(e){ti()(i,e);var t=ba(i);function i(e){var n;Xt()(this,i),n=t.call(this,e);var r=e.onRetry;return n.state={hasError:!1},n.onRetry=r,n}return Zt()(i,[{key:"componentDidCatch",value:function(e,t){console.log("ERROR in catch >>>> ",e,t)}},{key:"render",value:function(){return this.state.hasError?a.a.createElement("div",null,a.a.createElement("span",null,"Could not load the resource due to network failure.")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return console.log("ERROR >>>> ",e),{hasError:!0}}}]),i}(o.Component),Ca=O.c.div(wa||(wa=Xe()(["\n display: flex;\n width: 100%;\n position: relative;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n margin: 0 auto;\n"]))),ka=O.c.div(Ea||(Ea=Xe()(["\n margin-top: 10px;\n"]))),xa=O.c.div(_a||(_a=Xe()(["\n margin-top: 10px;\n display: block;\n right: 0;\n"])));function Aa(e){var t=this,i=e.urls,n=e.token,s=e.tokenType,l=e.recorder,u=e.integrationType,c=e.importCompleteResponse,d=e.recordingConfiguration,h=e.onRecorderClose,p=e.onVideoCancel,f=e.extensionAvailable,g=(e.handleShowUploadProgress,e.recorderAPIModel),m=e.onEditClick,v=e.recorderAPIUtils,y=Object(o.useContext)(L.a),b=y.theme,w=y.recorderInitOptions,E=w.show_video_title,_=w.edit,S=w.record_config,T=(void 0===S?{}:S).show_cancel_submit,C=void 0===T||T,k=i&&i.webcam,x=i&&i.screen,A=c&&c.signed_url,P=c&&0==c.contains_video&&1==c.contains_audio||d&&!d.webCam&&!d.screenRecord&&d.audio,I="lessonly"==_i.a.getQueryParams().type||"lessonly"==_i.a.getQueryParams().integration_type,R=Object(o.useState)(!1),D=R[0],O=R[1],M=Object(o.useState)(),F=M[0],U=M[1],B=Object(o.useState)(),V=B[0],z=B[1],H=Object(o.useState)("Edit Video"),j=H[0],G=H[1],q=Object(o.useState)(),W=q[0],$=q[1],Y=l&&l.isUploadComplete(),K=Object(o.useState)(Y),J=K[0],X=K[1],Q=Object(o.useState)(!1),Z=Q[0],ee=Q[1],te=Object(o.useState)(!1),ie=te[0],ne=te[1],re=l.createRecordingError,oe=l.uploadInitError,ae=Object(o.useRef)();Object(o.useEffect)(function(){r()(this,t),J&&!f&&v.sendEvent("source_uploaded")}.bind(this),[J]),Object(o.useEffect)(function(){r()(this,t),G(D?"Preview Video":"Edit Video")}.bind(this),[D]),Object(o.useEffect)(function(){r()(this,t),m&&m(D)}.bind(this),[D,m]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),c&&c.projectjson)$(c.projectjson);else if(!re)return l.isPreprocessComplete().then(function(t){r()(this,e),$(t)}.bind(this)).catch(function(){r()(this,e),console.log("ERROR IN PREPROCESS STEP")}.bind(this)),function(){r()(this,e),l.removePreprocessCompleteCheck()}.bind(this)}.bind(this),[]);var se=function(){return r()(this,t),{showSimpleEditor:D,videoPlayerView:V,recorder:l,recorderApiModel:g,token:n,tokenType:s,integrationType:u,isPersonalisationEnabled:ue(),customColors:he(),footageUrls:{},projectJson:W,onSimpleEditorInitialize:de}}.bind(this),le=function(){return r()(this,t),{importVideoUrl:A,screenUrl:x,webcamUrl:k,isAudioOnly:P,thumbnailUrl:null,recordingConfiguration:d,onVideoPlayerInitialize:ce,customColors:he()}}.bind(this),ue=function(){return r()(this,t),!1}.bind(this),ce=function(e){r()(this,t),z(e)}.bind(this),de=function(e){r()(this,t),U(e)}.bind(this),he=function(){r()(this,t);var e={};return I&&(e.primaryColor="#4A90E2",e.secondaryColor="#69a8e3",e.bgColor="#ebeaea"),e}.bind(this),pe=function(){r()(this,t),F&&(F.cancel(),O(!D))}.bind(this),fe=function(){r()(this,t),F&&(F.save(),O(!D))}.bind(this),ge=function(){r()(this,t),X(!0)}.bind(this),me=function(){r()(this,t),ee(!0)}.bind(this),ve=function(){r()(this,t),console.log("Submit video ",l.recordDetails),console.log(g);var e=l.recordDetails&&l.recordDetails.asset_id;if(e?g.submitVideo({assetId:e}):console.error("asset id not available in recorder"),e){var i={asset_id:l.recordDetails.asset_id,token:l.recordDetails.delivery_token,embed_url:l.recordDetails.embedLink,embed_preview_url:l.recordDetails.embeddedPreviewLink,play_url:l.recordDetails.recordedUrl,thumbnail_url:l.recordDetails.publicThumbnail,thumbnail_play_url:l.recordDetails.publicPlayThumbnail};v.sendEvent("video_submitted",i)}l.isUploadComplete()||v.sendEvent("_show_upload_progress",{recorder:l,theme:b}),h()}.bind(this),ye=function(){var e=this;r()(this,t),l.sendCreateRecordingRequest().then(function(){r()(this,e),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ne(!0)}.bind(this),be=function(){var e=this;r()(this,t),l.retryUpload().then(function(){r()(this,e),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ee(!1),ne(!0)}.bind(this),we=(function(){var e=this;r()(this,t),l.retryMultipartUploadFinish().then(function(){r()(this,e),ee(!1),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ne(!0)}.bind(this),function(){var e=this;r()(this,t),l.removePreprocessCompleteCheck(),l.isPreprocessComplete().then(function(t){r()(this,e),$(t)}.bind(this)).catch(function(){r()(this,e),console.log("ERROR IN PREPROCESS STEP")}.bind(this))}.bind(this));(function(){r()(this,t);var e="Error in create recording",i=ye;return oe&&(e="Error while uploading video",i=be),Z&&(e="Error while uploading video",i=be),a.a.createElement("div",null,e,a.a.createElement(Oo.d,{text:"Retry",onClickHandler:i,enabled:!ie}))}).bind(this);console.log("PREVIEW PLAYER ",qo._status,k);var Ee=function(e){r()(this,t),ae.current=e,g.saveVideoTitle({title:e,assetId:l.recordDetails&&l.recordDetails.asset_id})}.bind(this),_e=void 0!==W;console.log("SHOW EDIT ",_),console.log("PROJECT JSON ",W),console.log("enableEditButton ",_e);var Se=!(J||re||oe||Z||c);return console.log("showUploadProgress ",Se),a.a.createElement(a.a.Fragment,null,!c&&a.a.createElement(pa,{showUploadProgress:Se,recorder:l,onUploadComplete:ge,onUploadError:me}),E&&a.a.createElement(ya,{videoTitle:ae.current,onTitleSave:Ee}),(re||oe||Z)&&a.a.createElement(ma,{error:{type:re?"RECORDING_ERROR":"UPLOAD_ERROR"},onRetry:re?ye:be,recordingSource:l.getRecordingObjectUrls()}),a.a.createElement(Ta,null,a.a.createElement(o.Suspense,{fallback:a.a.createElement("div",null,"Loading ...")},a.a.createElement(qo,le()))),_&&a.a.createElement(Ta,null,a.a.createElement(o.Suspense,{fallback:a.a.createElement(a.a.Fragment,null)},a.a.createElement(Yo.a,se()))),a.a.createElement(Ca,null,a.a.createElement(ka,null,!D&&_&&a.a.createElement(Oo.d,{type:Oo.b.EDIT,icon:Object(N.d)("/svg/rapi/pen.svg"),text:j,loading:!_e,onClickHandler:function(){return r()(this,t),O(!D)}.bind(this),enabled:_e})),a.a.createElement(xa,null,!D&&C&&a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Close",onClickHandler:function(){r()(this,t),p(),console.log("Close modal")}.bind(this),style:{marginRight:"10px"}}),!D&&a.a.createElement(Oo.d,{text:"Submit",onClickHandler:function(){r()(this,t),ve(),console.log("Submit video")}.bind(this),enabled:!re}),D&&a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Cancel Edit",onClickHandler:function(){r()(this,t),pe(),console.log("Cancel Edit")}.bind(this),style:{marginRight:"10px"}}),D&&a.a.createElement(Oo.d,{text:"Save Edit",onClickHandler:function(){r()(this,t),fe(),console.log("Save Edit")}.bind(this)}))))}var Pa,Ia=O.c.div(Sa||(Sa=Xe()([""])));function Ra(e){var t=e.recorder,i=e.onRecorderClose;return a.a.createElement(Ia,null,a.a.createElement(ca,{recorder:t,onUploadComplete:i}))}var Da=O.c.div(Pa||(Pa=Xe()(["\n padding: 20px;\n"])));function Oa(e){var t=this,i=Object(o.useState)(!1),n=i[0],s=i[1],l=Object(o.useState)(!1),u=l[0],c=l[1],d=function(){r()(this,t),s(!0)}.bind(this),h=function(){r()(this,t),console.log("CANCEL REVERT"),s(!1)}.bind(this),p=function(){r()(this,t),c(!0)}.bind(this);return a.a.createElement(Da,null,u&&a.a.createElement(Ra,e),!u&&n&&a.a.createElement(Vo,Uo()({},e,{onVideoCancelRevert:h})),!u&&!n&&a.a.createElement(Aa,Uo()({},e,{onVideoCancel:d,handleShowUploadProgress:p})))}i(94);var Na,La,Ma=O.c.div(Na||(Na=Xe()(["\n width: 75%;\n height: 80%;\n padding: 20px;\n border: 2px dashed #ACB7C4;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n cursor: pointer;\n"])));function Fa(e){var t=this,i=e.onFileUpload,n=e.isMobile,s=Object(o.useRef)(),l=Object(o.useRef)(),u=Object(o.useRef)(),c=Object(o.useState)(!1),d=c[0],h=c[1],p=function(){if(r()(this,t),d)return{borderColor:"#FFFFFF"}}.bind(this),f=function(e){r()(this,t),e.preventDefault(),!d&&h(!0)}.bind(this),g=function(e){r()(this,t),e.preventDefault(),d&&h(!1)}.bind(this),m=function(){r()(this,t),console.log("IMPORT CLICK"),n?u.current.click():l.current.click()}.bind(this),v=function(e){r()(this,t),e.preventDefault(),console.log("DROPPED ",e);var n=null;try{if(e.dataTransfer.items){for(var o=0;o<e.dataTransfer.items.length;o++)if("file"===e.dataTransfer.items[o].kind&&y(e.dataTransfer.items[o].getAsFile())){n=e.dataTransfer.items[o].getAsFile();break}}else for(var a=0;a<e.dataTransfer.files.length;a++)if(y(e.dataTransfer.files[a])){n=e.dataTransfer.files[a];break}}catch(e){console.log("EXCEPTION ",e)}n?(n.size>Q.n?console.log("FILE SIZE GREATER THAN 5GB!!!!"):i(n),console.log("NAME : ",n.name," SIZE : ",n.size)):console.log("FILE NOT SUPPORTED !!!")}.bind(this),y=function(e){return r()(this,t),e.type&&["video","audio"].includes(e.type.split("/")[0])}.bind(this),b=function(e){r()(this,t),console.log("IMPORT FILE CHANGED !!!!");var n=e.target.files[0];i(n)}.bind(this);return a.a.createElement(a.a.Fragment,null,a.a.createElement(Ma,{ref:s,onClick:m,onDrop:v,onDragOver:f,onDragLeave:g,style:p()},a.a.createElement("img",{src:"/svg/upload.svg",alt:"upload",style:{width:"55px"}}),a.a.createElement("div",{style:{margin:"12px 0 0",fontSize:"13px",fontWeight:"400",color:"#E3E3E3"}},"Drag and drop"),a.a.createElement("div",{style:{margin:"0",fontSize:"14px",fontWeight:"400",color:"#8C8C8C"}},"your file here, or"," ",a.a.createElement("span",{style:{color:"#4FA3CB",textDecoration:"underline",cursor:"pointer"}},"browse"))),a.a.createElement("input",{type:"file",ref:l,onChange:b,style:{display:"none"},accept:"video/*,audio/*,video/mp4,video/x-m4v,video/*;capture=camcorder,microphone"}),a.a.createElement("input",{type:"file",ref:u,onChange:b,style:{display:"none"},accept:"video/*,audio/*,video/mp4,video/x-m4v,video/*;capture=camcorder,microphone",capture:!0}))}function Ua(e){var t=e.progress,i=e.uploadStatus,n=e.onCancelImport,r=null,o=Object(N.e)(t);return i===Va.INPROGRESS?(console.log("PROGRESS ",t),t&&"upload"===t.type&&(r="Uploading Video"),t&&"processing"===t.type&&(r="Processing video")):i===Va.INITIALIZED&&(r="Initializing Upload"),a.a.createElement("div",{style:{width:"90%"}},a.a.createElement(ca,{progressStatus:r,uploadProgress:t,timeRemainingStatus:o,type:ua.IMPORT}),a.a.createElement(Oo.d,{type:Oo.b.TRANSPARENT,text:"Cancel",onClickHandler:n}))}var Ba=O.c.div(La||(La=Xe()(["\n width: 100%;\n height: 147px;\n min-height: 360px;\n max-height: 500px;\n background-color: #212126;\n display: flex;\n justify-content: center;\n align-items: center;\n"]))),Va={INACTIVE:0,INITIALIZED:1,INPROGRESS:2},za={completedPercent:0,type:"upload"};function Ha(e){var t=this,i=e.file,n=e.isMobile,s=e.digest,l=e.recorder,u=e.recorderClose,c=(e.directImport,e.importCompletedCallback),d=Object(o.useState)(Va.INACTIVE),h=d[0],p=d[1],f=Object(o.useState)(za),g=f[0],m=f[1];Object(o.useEffect)(function(){r()(this,t),i&&v(i)}.bind(this),[e]);var v=function(e){var i=this;if(r()(this,t),e){var o={fileName:e.name,size:e.size/1024,fromAdvancedEdit:!1,token:s,isMobile:n};l.createVideoImport({params:o,uploadStartedCallback:y,updateProgress:b,file:e}).then(function(e){r()(this,i),console.log("PREVIEW RESPONSE ",e),c(e)}.bind(this)).catch(function(e){r()(this,i),console.log("ERROR >> ",e)}.bind(this)),p(Va.INITIALIZED)}}.bind(this),y=function(){r()(this,t),p(Va.INPROGRESS)}.bind(this),b=function(e){r()(this,t),m(e)}.bind(this),w=function(){if(r()(this,t),l.cancelVideoImport(),i)return u&&u();p(Va.INACTIVE),m(za)}.bind(this);return console.log("UPLOAD STATUS ",h,i,g),a.a.createElement(Ba,null,!i&&h===Va.INACTIVE&&a.a.createElement(Fa,{isMobile:n,onFileUpload:v}),h!==Va.INACTIVE&&a.a.createElement(Ua,{progress:g,uploadStatus:h,onCancelImport:w}))}i(85);var ja,Ga,qa,Wa=O.c.div(ja||(ja=Xe()([""]))),$a=O.c.div(Ga||(Ga=Xe()([""]))),Ya=O.c.div(qa||(qa=Xe()([""])));function Ka(e){var t=this,i=e.type,n=e.recorder,s=e.uploadCompleted,l=e.onRecorderClose,u=Object(o.useState)(!1),c=u[0],d=u[1],h=Object(o.useState)(),p=(h[0],h[1],function(){if(r()(this,t),i===F)return"Error when uploading video"}.bind(this)),f=function(){var e=this;r()(this,t);try{n.retryUpload().catch(function(t){r()(this,e),d(!1)}.bind(this))}catch(e){console.log("CATCH EX ",e)}d(!0)}.bind(this),g=function(){var e=this;r()(this,t);var i=n.getRecordingObjectUrls();if(Object.keys(i).length>0){var o=[];for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];o.push(a.a.createElement("a",{key:s,href:"".concat(l),download:!0},"Download ".concat(s," recording")))}return a.a.createElement("div",null,o,a.a.createElement("div",null,a.a.createElement(Oo.d,{text:"Retry upload",onClickHandler:f})))}Oo.d,Oo.b.SECONDARY,function(){return r()(this,e),console.log("Okay")}.bind(this)}.bind(this),m=function(){r()(this,t),s?s():l&&l()}.bind(this),v=function(){r()(this,t),d(!1)}.bind(this);return Object(o.useEffect)(function(){r()(this,t)}.bind(this),[c]),a.a.createElement(Wa,null,c&&a.a.createElement(ca,{recorder:n,onUploadComplete:m,onUploadError:v}),!c&&a.a.createElement(a.a.Fragment,null,a.a.createElement($a,null,p()),a.a.createElement(Ya,null,g())))}var Ja,Xa=i(101),Qa=i.n(Xa),Za=O.c.div(Ja||(Ja=Xe()(["\n &.screen-enter {\n opacity: 0;\n transform: translateX(100%);\n }\n\n &.screen-enter-active {\n opacity: 1;\n transform: translateX(0);\n }\n\n &.screen-enter-active {\n transition: opacity 300ms, transform 300ms;\n transition-delay: 50ms;\n }\n"]))),es=["active","children"];function ts(e){var t=e.active,i=e.children,n=Qa()(e,es);return a.a.createElement(D,{in:t,classNames:"screen",timeout:400,unmountOnExit:!0},a.a.createElement(Za,n,t&&i))}var is,ns,rs=O.c.div(is||(is=Xe()(["\n overflow-x: hidden;\n overflow-y: scroll;\n width: 720px;\n position: relative;\n background-color: ",';\n margin: 0 auto;\n text-align: center;\n transition: height 500ms ease-in;\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\n'])),function(e){switch(r()(this,void 0),e.action){case M.IMPORT_VIDEO:return"#212126";case M.POST_RECORD:return"#FFFFFF";default:return"transparent"}}.bind(void 0)),os=(O.c.div(ns||(ns=Xe()(["\n height: 45px;\n display: flex;\n align-items: center;\n font: normal normal 600 16px/16px Open Sans;\n color: #C3C3C3;\n border-bottom: 1px solid #34343C;\n justify-content: space-between;\n padding: 0 25px;\n"]))),["start_recording","import_video","hv_stop_recording","source_uploaded","record_stopped","preprocess_complete","source_video","record_initiated","record_details"]),as={RECORDER:1,IMPORTER:2};function ss(e){var t=this,i=e.type,n=e.settings,s=e.token,l=e.userId,u=e.eventListenerClass,c=e.recorderClassName,d=e.eventCallback,h={fromPopup:!0,separateLayer:!1,systemAudio:!0,aspectRatio:Q.b.SIXTEEN_NINE,initiator:"generic_recorder",highlights:!0,resolution:720},p=Q.e.RECORDER_SDK_TOKEN,f=Object(o.useState)(!1),g=f[0],m=f[1],v=Object(o.useState)(),y=v[0],b=v[1],w=function(){var e=this,t=Object(o.useState)(0),i=(t[0],t[1]);return function(){var t=this;return r()(this,e),i(function(e){return r()(this,t),e+1}.bind(this))}.bind(this)}(),E=s||Object(N.c)(),_=Object(o.useRef)(h),S=Object(o.useRef)({}),T=Object(o.useRef)(new N.b({eventCallback:d})),C=Object(o.useRef)(),k=Object(o.useRef)(),A=Object(o.useRef)(),P=Object(o.useRef)(),I=Object(o.useRef)(),R=Object(o.useRef)(),U=Object(o.useRef)({}),V=Object(o.useRef)(!1),z=Object(o.useRef)(B({tokenType:p,userId:l,integrationType:"recorder_api"})),H=Object(o.useRef)(),j=Object(o.useRef)(),G=function(){r()(this,t),console.log("RECORDING CONFIGURATION ",_.current),z.current=B({tokenType:Q.e.RECORDER_SDK_TOKEN,userId:l,integrationType:"recorder_api"}),K(n);var e=new Ue({recordingConfiguration:_.current,tokenType:Q.e.RECORDER_SDK_TOKEN,token:E,recorderId:c,recorderEvtClass:u,logID:z.current,recorderAPIUtils:T.current,integrationType:"recorder_api",initiator:Q.q.GENERIC_RECORDER,extensionAvailable:j.current});b(e)}.bind(this),q=Object(o.useState)(null),W=q[0],$=q[1];Object(o.useEffect)(function(){r()(this,t),C.current||(C.current=new Be.a({token:E,tokenType:p})),G(),n.inline&&!1!==n.inline.open&&(!g&&m(!0),i==as.IMPORTER?(V.current=!1,$(M.IMPORT_VIDEO)):$(M.PRE_RECORD))}.bind(this),[]);var Y=function(e){r()(this,t);var i={};for(var n in L.b.recorderInitOptions)e&&e.hasOwnProperty(n)?i[n]=e[n]:i[n]=L.b.recorderInitOptions[n];U.current={theme:L.b.theme,recorderInitOptions:i,authentication:{token:s,tokenType:p}}}.bind(this),K=function(e){r()(this,t),console.log("SETTINGS ",e),null!=e&&e.record_config&&(_.current.screenRecord=!1,_.current.webCam=!1,_.current.audio=!1,0!=e.record_config.screen&&(_.current.screenRecord=!0),0!=e.record_config.webcam&&(_.current.webCam=!0),0!=e.record_config.mic&&(_.current.audio=!0),y&&y.updateConfig({recordingConfiguration:_.current}))}.bind(this);Object(o.useEffect)(function(){r()(this,t),y&&n&&K(n)}.bind(this),[y]),Object(o.useEffect)(function(){r()(this,t),n&&Y(n)}.bind(this),[]);var J=function(e){var i;if(r()(this,t),e.detail&&e.detail.extension){var n=e.detail;delete n.extension,T.current.sendEvent(e.type,n)}"record_details"===e.type&&e.detail&&(y.setExtensionRecording(!0),y.setRecordDetails(e.detail)),"start_recording"===e.type&&(void 0!==e.detail.extension_available&&(j.current=e.detail.extension_available),G(),console.log("RECORDING CONFIG event ",e.detail.recording_configuration),te(e.detail.recording_configuration),!g&&m(!0),$(M.PRE_RECORD),w()),"hv_stop_recording"===e.type&&ie(),"record_stopped"===e.type&&console.log("RECORD STOPPED"),"preprocess_complete"===e.type&&y.setProjectJson(e.detail.project_json),"source_video"===e.type&&(A.current={},"webcam"===e.detail.type&&(A.current.webcam=e.detail.url),"screen"===e.detail.type&&(A.current.screen=e.detail.url),!g&&m(!0),$(M.POST_RECORD)),"import_video"===e.type&&(T.current.sendEvent("show_frame"),k.current=e.detail.file,G(),!g&&m(!0),V.current=!0,$(M.IMPORT_VIDEO));try{i="hippovideo"==e.data.initiator?e.data:JSON.parse(e.data)}catch(e){return}if("hippovideo"==i.initiator){if("record_initiated"===i.type&&i.detail&&i.detail.recording_with_extension&&(y.setExtensionRecording(i.detail.recording_with_extension),y.setRecordDetails(i.detail.record_details),y.stopStreams(),$(null)),"hv_initialize_recorder"===i.type){var o={};for(var a in L.b.recorderInitOptions)i.detail&&i.detail.settings&&i.detail.settings.hasOwnProperty(a)?o[a]=i.detail.settings[a]:o[a]=L.b.recorderInitOptions[a];o.theme=L.b.theme,U.current=o}"hv_source_video"===i.type&&(A.current={},"webcam"===i.detail.type&&(A.current.webcam=i.detail.url),"screen"===i.detail.type&&(A.current.screen=i.detail.url),T.current.sendEvent("show_frame"),!g&&m(!0),$(M.POST_RECORD)),"hv_start_recording"==i.type&&(te(i.detail),!g&&m(!0),$(M.RECORD)),"hv_stop_recording"===i.type&&ie(),"hv_import_video"===i.type&&(T.current.sendEvent("show_frame"),importTypeRef.current=i.detail.type,G(),!g&&m(!0),$(M.IMPORT_VIDEO)),i.type,"hv_preprocess_complete"===i.type&&y.setProjectJson(i.detail.project_json)}}.bind(this),X=function(){r()(this,t),!g&&m(!0),$(M.RECORD),w()}.bind(this),Z=function(){r()(this,t);var e=_.current;delete e.screenRecord,delete e.webCam,delete e.audio,_.current=e,y.updateConfig({recordingConfiguration:_.current})}.bind(this),ee=Object(o.useCallback)(function(){r()(this,t),n.inline&&n.inline.open?(Z(),y.isUploadComplete()&&G(),!g&&m(!0),i===as.IMPORTER?$(M.IMPORT_VIDEO):$(M.PRE_RECORD)):(m(!1),$(null),y.stopStreams(),T.current.sendEvent("_close_popup"))}.bind(this),[n,y]),te=function(e){if(r()(this,t),e){T.current.sendEvent("show_frame");var i=Object.assign({},_.current);null!=e.resolution&&(i.resolution=e.resolution),null!=e.initiator&&(i.initiator=e.initiator),null!=e.screenRecord&&(i.screenRecord=e.screenRecord),null!=e.webCam&&(i.webCam=e.webCam),null!=e.audio&&(i.audio=e.audio),null!=e.uniqueId&&(i.uniqueId=e.uniqueId),null!=e.webcamBitRate&&(i.webcamBitRate=e.webcamBitRate),null!=e.aspectRatio&&(i.aspectRatio=e.aspectRatio),null!=e.teleprompter&&(S.current.showTeleprompter=e.teleprompter),null!=e.timer&&(i.timer=e.timer),null!=e.recordingWithExtension&&(i.recordingWithExtension=e.recordingWithExtension),null!=e.show_preview&&(S.current.showRecordPreview=e.show_preview),null!=e.showFaceCue&&(S.current.showFaceCue=e.showFaceCue),null!=e.showLightingFeedback&&(S.current.showLightingFeedback=e.showLightingFeedback),null!=e.fromProductReview&&(i.fromProductReview=e.fromProductReview),null!=e.fromChristmasTemplate&&(i.my_video=!0);var n=parseInt(e.timer);null!=n&&!isNaN(n)&&Math.round(n)>0&&(S.current.recordingLimit=1e3*Math.round(n)),_.current=i,y.updateConfig({recordingConfiguration:_.current})}}.bind(this);Object(o.useEffect)(function(){var e=this;return r()(this,t),window.addEventListener("message",J),os.forEach(function(t){r()(this,e),H.current.addEventListener(t,J)}.bind(this)),function(){var t=this;r()(this,e),window.removeEventListener("message",J),os.forEach(function(e){r()(this,t),H.current.removeEventListener(e,J)}.bind(this))}.bind(this)}.bind(this));(function(){r()(this,t),console.log("close recorder event")}).bind(this);var ie=function(){r()(this,t),y.finishRecording(),n.inline||!g&&m(!0),ne(y.getRecordingObjectUrls())}.bind(this),ne=function(e){var i=this;r()(this,t),A.current=e,T.current.sendEvent("record_stopped",{removeWebcamPreview:!0,removeMarkupTools:!0}),y.getUploadDetails().then(function(e){r()(this,i),e.error?(R.current=F,$(M.ERROR)):$(M.POST_RECORD)}.bind(this)).catch(function(){r()(this,i),R.current=F,$(M.ERROR)}.bind(this))}.bind(this),re=function(e){r()(this,t),P.current=e,$(M.POST_RECORD)}.bind(this),oe=function(e){r()(this,t),e===M.ERROR&&$(M.POST_RECORD)}.bind(this),ae=(function(){r()(this,t),_.current=y.getRecordingConfiguration(),P.current=null,X()}.bind(this),function(){r()(this,t),n.inline&&n.inline.open&&(G(),$(M.PRE_RECORD))}.bind(this)),se=function(){var e=this;return r()(this,t),W?a.a.createElement(L.a.Provider,{value:U.current},[M.PRE_RECORD,M.RECORD].includes(W)&&a.a.createElement(Lo,{recorder:y,handlePopupClose:ue,onFinishRecording:ne,onRecordingCancel:ae,recorderAPIUtils:T.current,extensionAvailable:j.current}),a.a.createElement(ts,{active:W===M.POST_RECORD},a.a.createElement(Oa,{urls:A.current,token:E,tokenType:p,onEditClick:le,recorderAPIModel:C.current,integrationType:"recorder_api",recorder:y,recorderAPIUtils:T.current,extensionAvailable:j.current,recordingConfiguration:_.current,onRecorderClose:ee,importCompleteResponse:P.current})),a.a.createElement(ts,{active:W===M.IMPORT_VIDEO},a.a.createElement(Ha,{file:k.current,recorder:y,recorderAPIModel:C.current,isMobile:!1,digest:E,recorderClose:ee,directImport:V.current,importCompletedCallback:re})),a.a.createElement(ts,{active:W===M.ERROR},a.a.createElement(Ka,{recorder:y,type:R.current,onRecorderClose:ee,uploadCompleted:function(){return r()(this,e),oe(M.ERROR)}.bind(this)}))):null}.bind(this),le=function(e){r()(this,t),e&&T.current.sendEvent("edit_enabled"),I.current.style.maxHeight=e?"700px":""}.bind(this);Object(o.useLayoutEffect)(function(){var e=this;r()(this,t),setTimeout(function(){r()(this,e),T.current.sendEvent("sdk_loaded");try{var t=performance.getEntriesByType("navigation")[0].duration,i=new de({integrationType:"recorder_api",module:"RECORDER_API",logUID:z.current,tokenType:p,token:E});i&&i.info("RECORDER_API_PAGE_LOAD_TIME",{loadTime:t})}catch(e){}}.bind(this),500)}.bind(this),[]);(function(){var e=this;return r()(this,t),W&&a.a.createElement(x,{mode:"out-in"},a.a.createElement(D,{key:W,addEndListener:function(t,i){r()(this,e);try{t.addEndListener("transitionend",i,!1)}catch(e){console.error(e)}}.bind(this),classNames:"fade",unmountOnExit:!0},g&&a.a.createElement(rs,null,se())))}).bind(this),function(){switch(r()(this,t),W){case M.PRE_RECORD:return"Record Preview";case M.RECORD:return"Record";case M.POST_RECORD:return"Video Preview";case M.IMPORT_VIDEO:return"Import Video";case M.ERROR:return"Error";default:return"Info"}}.bind(this);var ue=function(){r()(this,t),ee()}.bind(this);return a.a.createElement(a.a.Fragment,null,g&&a.a.createElement(O.a,{theme:U.current.theme},a.a.createElement(rs,{action:W,ref:I,className:"".concat(c)},se())),a.a.createElement("input",{type:"hidden",ref:H,className:"".concat(u)}))}},function(e,t,i){var n={};n[i(22)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,i){var n=i(8),r=i(210),o=n["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=o},function(e,t,i){var n=i(8),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},function(e,t,i){var n=i(102),r=i(15);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var n=i(8),r=i(156),o=i(122),a=n.TypeError;e.exports=function(e){if(r(e))return e;throw a(o(e)+" is not a constructor")}},function(e,t,i){var n=i(32),r=i(265),o=i(42),a=i(30),s=i(51),l=i(126);t.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=s(t),r=l(t),u=r.length,c=0;u>c;)o.f(e,i=r[c++],n[i]);return e}},function(e,t,i){"use strict";var n=i(30);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,i){var n=i(15),r=i(8).RegExp,o=n((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||n((function(){return!r("a","y").sticky})),s=o||n((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},function(e,t,i){"use strict";var n=i(219).charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},function(e,t,i){var n=i(13),r=i(59),o=i(39),a=i(55),s=n("".charAt),l=n("".charCodeAt),u=n("".slice),c=function(e){return function(t,i){var n,c,d=o(a(t)),h=r(i),p=d.length;return h<0||h>=p?e?"":void 0:(n=l(d,h))<55296||n>56319||h+1===p||(c=l(d,h+1))<56320||c>57343?e?s(d,h):n:e?u(d,h,h+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},function(e,t,i){var n=i(17),r=i(275);n({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,i){var n=i(414);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},function(e,t,i){"use strict";(function(t){var n=i(53),r=i(420),o=i(279),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(l=i(280)),l),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,i){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,i=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,a=!i&&"json"===this.responseType;if(a||r&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u}).call(this,i(60))},function(e,t,i){var n=i(29),r=i(76),o=i(22)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==r(e))}},function(e,t,i){"use strict";var n=i(33),r=i(159),o=i(30),a=i(55),s=i(435),l=i(39),u=i(90),c=i(160);r("search",(function(e,t,i){return[function(t){var i=a(this),r=null==t?void 0:u(t,e);return r?n(r,t,i):new RegExp(t)[e](l(i))},function(e){var n=o(this),r=l(e),a=i(t,n,r);if(a.done)return a.value;var u=n.lastIndex;s(u,0)||(n.lastIndex=0);var d=c(n,r);return s(n.lastIndex,u)||(n.lastIndex=u),null===d?-1:d.index}]}))},function(e,t,i){"use strict";var n=i(63),r=i(42),o=i(22),a=i(32),s=o("species");e.exports=function(e){var t=n(e),i=r.f;a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,i){var n=i(8),r=i(83),o=i(33),a=i(30),s=i(122),l=i(227),u=i(45),c=i(64),d=i(167),h=i(132),p=i(287),f=n.TypeError,g=function(e,t){this.stopped=e,this.result=t},m=g.prototype;e.exports=function(e,t,i){var n,v,y,b,w,E,_,S=i&&i.that,T=!(!i||!i.AS_ENTRIES),C=!(!i||!i.IS_ITERATOR),k=!(!i||!i.INTERRUPTED),x=r(t,S),A=function(e){return n&&p(n,"normal",e),new g(!0,e)},P=function(e){return T?(a(e),k?x(e[0],e[1],A):x(e[0],e[1])):k?x(e,A):x(e)};if(C)n=e;else{if(!(v=h(e)))throw f(s(e)+" is not iterable");if(l(v)){for(y=0,b=u(e);b>y;y++)if((w=P(e[y]))&&c(m,w))return w;return new g(!1)}n=d(e,v)}for(E=n.next;!(_=o(E,n)).done;){try{w=P(_.value)}catch(e){p(n,"throw",e)}if("object"==typeof w&&w&&c(m,w))return w}return new g(!1)}},function(e,t,i){var n=i(22),r=i(131),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},function(e,t,i){var n=i(8).TypeError;e.exports=function(e,t){if(e<t)throw n("Not enough arguments");return e}},function(e,t){},function(e,t,i){var n=i(34),r=i(231),o=i(232),a=i(233).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,i=e.service.api,n=i.targetPrefix+"."+i.operations[e.operation].name,o=i.jsonVersion||"1.0",s=i.operations[e.operation].input,l=new r;1===o&&(o="1.0"),t.body=l.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+o,t.headers["X-Amz-Target"]=n,a(e)},extractError:function(e){var t={},i=e.httpResponse;if(t.code=i.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),i.body.length>0)try{var r=JSON.parse(i.body.toString()),o=r.__type||r.code||r.Code;o&&(t.code=o.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=r.message||r.Message||null}catch(r){t.statusCode=i.statusCode,t.message=i.statusMessage}else t.statusCode=i.statusCode,t.message=i.statusCode.toString();e.error=n.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var i=e.request.service.api.operations[e.request.operation].output||{},n=new o;e.data=n.parse(t,i)}}}},function(e,t,i){var n=i(34);function r(){}function o(e,t){if(t&&null!=e)switch(t.type){case"structure":return function(e,t){if(t.isDocument)return e;var i={};return n.each(e,(function(e,n){var r=t.members[e];if(r){if("body"!==r.location)return;var a=r.isLocationName?r.name:e,s=o(n,r);void 0!==s&&(i[a]=s)}})),i}(e,t);case"map":return function(e,t){var i={};return n.each(e,(function(e,n){var r=o(n,t.value);void 0!==r&&(i[e]=r)})),i}(e,t);case"list":return function(e,t){var i=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0!==n&&i.push(n)})),i}(e,t);default:return function(e,t){return t.toWireFormat(e)}(e,t)}}r.prototype.build=function(e,t){return JSON.stringify(o(e,t))},e.exports=r},function(e,t,i){var n=i(34);function r(){}function o(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return function(e,t){if(null==e)return;if(t.isDocument)return e;var i={},r=t.members;return n.each(r,(function(t,n){var r=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,r)){var a=o(e[r],n);void 0!==a&&(i[t]=a)}})),i}(e,t);case"map":return function(e,t){if(null==e)return;var i={};return n.each(e,(function(e,n){var r=o(n,t.value);i[e]=void 0===r?null:r})),i}(e,t);case"list":return function(e,t){if(null==e)return;var i=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0===n?i.push(null):i.push(n)})),i}(e,t);default:return function(e,t){return t.toType(e)}(e,t)}}r.prototype.parse=function(e,t){return o(JSON.parse(e),t)},e.exports=r},function(e,t,i){var n=i(34),r=i(14);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t,i,o,a=e.service.api.operations[e.operation];if(function(e){var t=e.service.api,i=t.operations[e.operation],r=t.endpointOperation&&t.endpointOperation===n.string.lowerFirst(i.name);return"NULL"!==i.endpointDiscoveryRequired||!0===r}(e))return e;if(a.endpoint&&a.endpoint.hostPrefix){var s=function(e,t,i){return n.each(i.members,(function(i,r){if(!0===r.hostLabel){if("string"!=typeof t[i]||""===t[i])throw n.error(new Error,{message:"Parameter "+i+" should be a non-empty string.",code:"InvalidParameter"});var o=new RegExp("\\{"+i+"\\}","g");e=e.replace(o,t[i])}})),e}(a.endpoint.hostPrefix,e.params,a.input);!function(e,t){e.host&&(e.host=t+e.host);e.hostname&&(e.hostname=t+e.hostname)}(e.httpRequest.endpoint,s),t=e.httpRequest.endpoint.hostname,i=t.split("."),o=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/,n.arrayEach(i,(function(e){if(!e.length||e.length<1||e.length>63)throw n.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!o.test(e))throw r.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},function(e,t,i){var n=i(34),r=i(460);function o(e,t){n.each(t,(function(t,i){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=i))}))}e.exports={configureEndpoint:function(e){for(var t=function(e){var t=e.config.region,i=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),n=e.api.endpointPrefix;return[[t,n],[i,n],[t,"*"],[i,"*"],["*",n],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),i=e.config.useFipsEndpoint,n=e.config.useDualstackEndpoint,a=0;a<t.length;a++){var s=t[a];if(s){var l=i?n?r.dualstackFipsRules:r.fipsRules:n?r.dualstackRules:r.rules;if(Object.prototype.hasOwnProperty.call(l,s)){var u=l[s];return"string"==typeof u&&(u=r.patterns[u]),e.isGlobalEndpoint=!!u.globalEndpoint,u.signingRegion&&(e.signingRegion=u.signingRegion),u.signatureVersion||(u.signatureVersion="v4"),void o(e,u)}}}},getEndpointSuffix:function(e){for(var t={"^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$":"amazonaws.com","^cn\\-\\w+\\-\\d+$":"amazonaws.com.cn","^us\\-gov\\-\\w+\\-\\d+$":"amazonaws.com","^us\\-iso\\-\\w+\\-\\d+$":"c2s.ic.gov","^us\\-isob\\-\\w+\\-\\d+$":"sc2s.sgov.gov"},i=Object.keys(t),n=0;n<i.length;n++){var r=RegExp(i[n]),o=t[i[n]];if(r.test(e))return o}return"amazonaws.com"}}},function(e,t,i){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,r){if(e===r)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(r))return!1;if(!0===t(e)){if(e.length!==r.length)return!1;for(var o=0;o<e.length;o++)if(!1===n(e[o],r[o]))return!1;return!0}if(!0===i(e)){var a={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===n(e[s],r[s]))return!1;a[s]=!0}for(var l in r)if(hasOwnProperty.call(r,l)&&!0!==a[l])return!1;return!0}return!1}function r(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(i(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}var o;o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var a=0,s=2,l={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},u={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},c={"<":!0,">":!0,"=":!0,"!":!0},d={" ":!0,"\t":!0,"\n":!0};function h(e){return e>="0"&&e<="9"||"-"===e}function p(){}p.prototype={tokenize:function(e){var t,i,n,r,o=[];for(this._current=0;this._current<e.length;)if((r=e[this._current])>="a"&&r<="z"||r>="A"&&r<="Z"||"_"===r)t=this._current,i=this._consumeUnquotedIdentifier(e),o.push({type:"UnquotedIdentifier",value:i,start:t});else if(void 0!==u[e[this._current]])o.push({type:u[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(h(e[this._current]))n=this._consumeNumber(e),o.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),o.push(n);else if('"'===e[this._current])t=this._current,i=this._consumeQuotedIdentifier(e),o.push({type:"QuotedIdentifier",value:i,start:t});else if("'"===e[this._current])t=this._current,i=this._consumeRawStringLiteral(e),o.push({type:"Literal",value:i,start:t});else if("`"===e[this._current]){t=this._current;var a=this._consumeLiteral(e);o.push({type:"Literal",value:a,start:t})}else if(void 0!==c[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==d[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:"And",value:"&&",start:t})):o.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:"Or",value:"||",start:t})):o.push({type:"Pipe",value:"|",start:t})}return o},_consumeUnquotedIdentifier:function(e){var t,i=this._current;for(this._current++;this._current<e.length&&((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(i,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var i=e.length;'"'!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var i=e.length;"'"!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var i=e.length;h(e[this._current])&&this._current<i;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,i=e[t];return this._current++,"!"===i?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===i?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===i?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===i&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,i=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&"`"!==e[r+1]?r++:r+=2,this._current=r}var a=o(e.slice(i,this._current));return a=a.replace("\\`","`"),t=this._looksLikeJSON(a)?JSON.parse(a):JSON.parse('"'+a+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var f={};function g(){}function m(e){this.runtime=e}function v(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[s,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[s]},{types:[s]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[s,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[s]},{types:[s]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[s]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[s,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}f.EOF=0,f.UnquotedIdentifier=0,f.QuotedIdentifier=0,f.Rbracket=0,f.Rparen=0,f.Comma=0,f.Rbrace=0,f.Number=0,f.Current=0,f.Expref=0,f.Pipe=1,f.Or=2,f.And=3,f.EQ=5,f.GT=5,f.LT=5,f.GTE=5,f.LTE=5,f.NE=5,f.Flatten=9,f.Star=20,f.Filter=21,f.Dot=40,f.Not=45,f.Lbrace=50,f.Lbracket=55,f.Lparen=60,g.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var i=this._lookaheadToken(0),n=new Error("Unexpected token type: "+i.type+", value: "+i.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new p).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var i=this.nud(t),n=this._lookahead(0);e<f[n];)this._advance(),i=this.led(n,i),n=this._lookahead(0);return i},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,i;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(f.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(f.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(f.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(f.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[i=this.expression(f.Expref)]};case"Lparen":for(var r=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(i={type:"Current"},this._advance()):i=this.expression(0),r.push(i);return this._match("Rparen"),r[0];default:this._errorToken(e)}},led:function(e,t){var i;switch(e){case"Dot":var n=f.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,i=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,i=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,i=this.expression(f.Pipe)]};case"Or":return{type:"OrExpression",children:[t,i=this.expression(f.Or)]};case"And":return{type:"AndExpression",children:[t,i=this.expression(f.And)]};case"Lparen":for(var r,o=t.name,a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),a.push(r);return this._match("Rparen"),{type:"Function",name:o,children:a};case"Filter":var s=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,i="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(f.Filter),s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(f.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var l=this._lookaheadToken(0);return"Number"===l.type||"Colon"===l.type?(i=this._parseIndexExpression(),this._projectIfSlice(t,i)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,i=this._parseProjectionRHS(f.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),i=new Error("Expected "+e+", got: "+t.type);throw i.name="ParserError",i}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var i={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[i,this._parseProjectionRHS(f.Star)]}:i},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,i=this._lookahead(0);"Rbracket"!==i&&t<3;){if("Colon"===i)t++,this._advance();else{if("Number"!==i){var n=this._lookahead(0),r=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw r.name="Parsererror",r}e[t]=this._lookaheadToken(0).value,this._advance()}i=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(f[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(f[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var i=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+i.value+"("+i.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,i,n=[],r=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),r.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),i={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(i),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},m.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var a,s,l,u,c,d,h,p,f;switch(e.type){case"Field":return null!==o&&i(o)?void 0===(d=o[e.name])?null:d:null;case"Subexpression":for(l=this.visit(e.children[0],o),f=1;f<e.children.length;f++)if(null===(l=this.visit(e.children[1],l)))return null;return l;case"IndexExpression":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Index":if(!t(o))return null;var g=e.value;return g<0&&(g=o.length+g),void 0===(l=o[g])&&(l=null),l;case"Slice":if(!t(o))return null;var m=e.children.slice(0),v=this.computeSliceParams(o.length,m),y=v[0],b=v[1],w=v[2];if(l=[],w>0)for(f=y;f<b;f+=w)l.push(o[f]);else for(f=y;f>b;f+=w)l.push(o[f]);return l;case"Projection":var E=this.visit(e.children[0],o);if(!t(E))return null;for(p=[],f=0;f<E.length;f++)null!==(s=this.visit(e.children[1],E[f]))&&p.push(s);return p;case"ValueProjection":if(!i(E=this.visit(e.children[0],o)))return null;p=[];var _=function(e){for(var t=Object.keys(e),i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}(E);for(f=0;f<_.length;f++)null!==(s=this.visit(e.children[1],_[f]))&&p.push(s);return p;case"FilterProjection":if(!t(E=this.visit(e.children[0],o)))return null;var S=[],T=[];for(f=0;f<E.length;f++)r(a=this.visit(e.children[2],E[f]))||S.push(E[f]);for(var C=0;C<S.length;C++)null!==(s=this.visit(e.children[1],S[C]))&&T.push(s);return T;case"Comparator":switch(u=this.visit(e.children[0],o),c=this.visit(e.children[1],o),e.name){case"EQ":l=n(u,c);break;case"NE":l=!n(u,c);break;case"GT":l=u>c;break;case"GTE":l=u>=c;break;case"LT":l=u<c;break;case"LTE":l=u<=c;break;default:throw new Error("Unknown comparator: "+e.name)}return l;case"Flatten":var k=this.visit(e.children[0],o);if(!t(k))return null;var x=[];for(f=0;f<k.length;f++)t(s=k[f])?x.push.apply(x,s):x.push(s);return x;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(p=[],f=0;f<e.children.length;f++)p.push(this.visit(e.children[f],o));return p;case"MultiSelectHash":if(null===o)return null;var A;for(p={},f=0;f<e.children.length;f++)p[(A=e.children[f]).name]=this.visit(A.value,o);return p;case"OrExpression":return r(a=this.visit(e.children[0],o))&&(a=this.visit(e.children[1],o)),a;case"AndExpression":return!0===r(u=this.visit(e.children[0],o))?u:this.visit(e.children[1],o);case"NotExpression":return r(u=this.visit(e.children[0],o));case"Literal":return e.value;case"Pipe":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Current":return o;case"Function":var P=[];for(f=0;f<e.children.length;f++)P.push(this.visit(e.children[f],o));return this.runtime.callFunction(e.name,P);case"ExpressionReference":var I=e.children[0];return I.jmespathType="Expref",I;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var i=t[0],n=t[1],r=t[2],o=[null,null,null];if(null===r)r=1;else if(0===r){var a=new Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var s=r<0;return i=null===i?s?e-1:0:this.capSliceRange(e,i,r),n=null===n?s?-1:e:this.capSliceRange(e,n,r),o[0]=i,o[1]=n,o[2]=r,o},capSliceRange:function(e,t,i){return t<0?(t+=e)<0&&(t=i<0?-1:0):t>=e&&(t=i<0?e-1:e),t}},v.prototype={callFunction:function(e,t){var i=this.functionTable[e];if(void 0===i)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,i._signature),i._func.call(this,t)},_validateArgs:function(e,t,i){var n,r,o,a;if(i[i.length-1].variadic){if(t.length<i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+i.length+n+" but received "+t.length)}else if(t.length!==i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+i.length+n+" but received "+t.length);for(var s=0;s<i.length;s++){a=!1,r=i[s].types,o=this._getTypeName(t[s]);for(var u=0;u<r.length;u++)if(this._typeMatches(o,r[u],t[s])){a=!0;break}if(!a){var c=r.map((function(e){return l[e]})).join(",");throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+c+" but received type "+l[o]+" instead.")}}},_typeMatches:function(e,t,i){if(1===t)return!0;if(9!==t&&8!==t&&3!==t)return e===t;if(3===t)return 3===e;if(3===e){var n;8===t?n=a:9===t&&(n=s);for(var r=0;r<i.length;r++)if(!this._typeMatches(this._getTypeName(i[r]),n,i[r]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return s;case"[object Number]":return a;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?6:4}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],i=e[1];return-1!==t.indexOf(i,t.length-i.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===s){for(var t=e[0],i="",n=t.length-1;n>=0;n--)i+=t[n];return i}var r=e[0].slice(0);return r.reverse(),r},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t/i.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return i(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],i=this._interpreter,n=e[0],r=e[1],o=0;o<r.length;o++)t.push(i.visit(n,r[o]));return t},_functionMerge:function(e){for(var t={},i=0;i<e.length;i++){var n=e[i];for(var r in n)t[r]=n[r]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.max.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)i.localeCompare(t[n])<0&&(i=t[n]);return i}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.min.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)t[n].localeCompare(i)<0&&(i=t[n]);return i}return null},_functionSum:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case a:return"number";case s:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],i=Object.keys(t),n=[],r=0;r<i.length;r++)n.push(t[i[r]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return 3===this._getTypeName(e[0])?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===s?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,i=this._getTypeName(e[0]);return i===a?e[0]:i!==s||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var i=this._interpreter,n=e[1],r=this._getTypeName(i.visit(n,t[0]));if([a,s].indexOf(r)<0)throw new Error("TypeError");for(var o=this,l=[],u=0;u<t.length;u++)l.push([u,t[u]]);l.sort((function(e,t){var a=i.visit(n,e[1]),s=i.visit(n,t[1]);if(o._getTypeName(a)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(a));if(o._getTypeName(s)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(s));return a>s?1:a<s?-1:e[0]-t[0]}));for(var c=0;c<l.length;c++)t[c]=l[c][1];return t},_functionMaxBy:function(e){for(var t,i,n=e[1],r=e[0],o=this.createKeyFunction(n,[a,s]),l=-1/0,u=0;u<r.length;u++)(i=o(r[u]))>l&&(l=i,t=r[u]);return t},_functionMinBy:function(e){for(var t,i,n=e[1],r=e[0],o=this.createKeyFunction(n,[a,s]),l=1/0,u=0;u<r.length;u++)(i=o(r[u]))<l&&(l=i,t=r[u]);return t},createKeyFunction:function(e,t){var i=this,n=this._interpreter;return function(r){var o=n.visit(e,r);if(t.indexOf(i._getTypeName(o))<0){var a="TypeError: expected one of "+t+", received "+i._getTypeName(o);throw new Error(a)}return o}}},e.tokenize=function(e){return(new p).tokenize(e)},e.compile=function(e){return(new g).parse(e)},e.search=function(e,t){var i=new g,n=new v,r=new m(n);n._interpreter=r;var o=i.parse(t);return r.search(o,e)},e.strictDeepEqual=n}(t)},function(e,t,i){"use strict";var n=i(17),r=i(162).trim;n({target:"String",proto:!0,forced:i(517)("trim")},{trim:function(){return r(this)}})},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(531),i(139),i(140)],void 0===(r=function(e,t,i,n){return i.View.extend({template:n,initialize:function(e){this.modalId=e.id,this.size=e.size?e.size:"",this.showIcon=e.showIcon,this.showError=e.showError,this.showConfirm=e.showConfirm,this.showInfo=e.showInfo,this.showButtonBar=e.showButtonBar,this.buttonBarTemplate=e.buttonBarTemplate,this.confirmYesCallback=e.confirmYesCallback,this.confirmNoCallback=e.confirmNoCallback,this.reduceFontSize=e.reduceFontSize,this.yesText=e.yesText,this.noText=e.noText,this.okText=e.okText,this._handleOKBtnClick=this._handleOKBtnClick.bind(this),this._handleYesBtnClick=this._handleOKBtnClick.bind(this,!0),this._handleNoBtnClick=this._handleOKBtnClick.bind(this,!1),this.modalTitle=e.title,this.titleImage=e.titleImage,this.modalBody=e.body,this.onYes=e.onYes,this.onNo=e.onNo,this.onOK=e.onOK,this.bgClickClose=void 0===e.bgClickClose,this.escClose=void 0===e.escClose,this.showCloseIcon=void 0===e.showCloseIcon,this.autoClose=void 0===e.autoClose,this.showSuccess=void 0===e.showSuccess,this.showTitle=void 0===e.showTitle||e.showTitle,this.leftBtnText=e.leftBtnText,this.onLeftBtnClick=e.onLeftBtnClick,this._handleLeftBtnClick=this._handleLeftBtnClick.bind(this),this.additionalClass=e.additionalClass||"",this.titleImage=e.titleImage,this.eventData=e.eventData},render:function(){this.$el.html(this.template({modalTitle:this.modalTitle,modalBody:this.modalBody,titleImage:this.titleImage,modalId:this.modalId,size:this.size,showIcon:this.showIcon,showError:this.showError,showConfirm:this.showConfirm,showInfo:this.showInfo,showButtonBar:this.showButtonBar,showOKButton:this.showError||this.showInfo,buttonBarTemplate:this.buttonBarTemplate,yesText:this.yesText,noText:this.noText,reduceFontSize:this.reduceFontSize,okText:this.okText,bgClickClose:this.bgClickClose,showCloseIcon:this.showCloseIcon,escClose:this.escClose,autoClose:this.autoClose,showSuccess:this.showSuccess,leftBtnText:this.leftBtnText,titleImage:this.titleImage,showTitle:this.showTitle,additionalClass:this.additionalClass})),this.setElement(e("#"+this.modalId)),this._delegateViewEvents(),this.renderState=!0},destroy:function(){this.undelegateEvents(),this.remove()},setBody:function(e){this.modalBody=e,this.renderState=!1},showModal:function(){this.renderState||(this.undelegateEvents(),this.render()),this.$el.foundation("reveal","open")},hideModal:function(){this.$el.foundation("reveal","close")},_handleOKBtnClick:function(e){this.autoClose&&this.$el.foundation("reveal","close"),!0===e?this.onYes&&(this.eventData?this.onYes(this.eventData):this.onYes()):!1===e?this.onNo&&this.onNo():this.onOK&&this.onOK()},_handleLeftBtnClick:function(e){this.onLeftBtnClick&&this.onLeftBtnClick()},_delegateViewEvents:function(){var e="#"+this.modalId+"OKBtn",t="#"+this.modalId+"YesBtn",i="#"+this.modalId+"NoBtn",n="#"+this.modalId+"LeftBtn";this.showError||this.showInfo?this.delegate("click",e,this._handleOKBtnClick):this.showConfirm&&(this.delegate("click",t,this._handleYesBtnClick),this.delegate("click",i,this._handleNoBtnClick)),this.onLeftBtnClick&&this.delegate("click",n,this._handleLeftBtnClick)}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(114)(i(72),"Map");e.exports=n},function(e,t,i){"use strict";i(71);var n,r=i(17),o=i(32),a=i(338),s=i(8),l=i(83),u=i(13),c=i(215).f,d=i(44),h=i(95),p=i(31),f=i(275),g=i(320),m=i(128),v=i(219).codeAt,y=i(614),b=i(39),w=i(82),E=i(228),_=i(183),S=i(50),T=S.set,C=S.getterFor("URL"),k=_.URLSearchParams,x=_.getState,A=s.URL,P=s.TypeError,I=s.parseInt,R=Math.floor,D=Math.pow,O=u("".charAt),N=u(/./.exec),L=u([].join),M=u(1..toString),F=u([].pop),U=u([].push),B=u("".replace),V=u([].shift),z=u("".split),H=u("".slice),j=u("".toLowerCase),G=u([].unshift),q=/[a-z]/i,W=/[\d+-.a-z]/i,$=/\d/,Y=/^0x/i,K=/^[0-7]+$/,J=/^\d+$/,X=/^[\da-f]+$/i,Q=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Z=/[\0\t\n\r #/:<>?@[\\\]^|]/,ee=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,te=/[\t\n\r]/g,ie=function(e){var t,i,n,r;if("number"==typeof e){for(t=[],i=0;i<4;i++)G(t,e%256),e=R(e/256);return L(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,i=1,n=null,r=0,o=0;o<8;o++)0!==e[o]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=o),++r);return r>i&&(t=n,i=r),t}(e),i=0;i<8;i++)r&&0===e[i]||(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=M(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},ne={},re=f({},ne,{" ":1,'"':1,"<":1,">":1,"`":1}),oe=f({},re,{"#":1,"?":1,"{":1,"}":1}),ae=f({},oe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),se=function(e,t){var i=v(e,0);return i>32&&i<127&&!p(t,e)?e:encodeURIComponent(e)},le={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ue=function(e,t){var i;return 2==e.length&&N(q,O(e,0))&&(":"==(i=O(e,1))||!t&&"|"==i)},ce=function(e){var t;return e.length>1&&ue(H(e,0,2))&&(2==e.length||"/"===(t=O(e,2))||"\\"===t||"?"===t||"#"===t)},de=function(e){return"."===e||"%2e"===j(e)},he={},pe={},fe={},ge={},me={},ve={},ye={},be={},we={},Ee={},_e={},Se={},Te={},Ce={},ke={},xe={},Ae={},Pe={},Ie={},Re={},De={},Oe=function(e,t,i){var n,r,o,a=b(e);if(t){if(r=this.parse(a))throw P(r);this.searchParams=null}else{if(void 0!==i&&(n=new Oe(i,!0)),r=this.parse(a,null,n))throw P(r);(o=x(new k)).bindURL(this),this.searchParams=o}};Oe.prototype={type:"URL",parse:function(e,t,i){var r,o,a,s,l,u=this,c=t||he,d=0,h="",f=!1,v=!1,y=!1;for(e=b(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=B(e,ee,"")),e=B(e,te,""),r=g(e);d<=r.length;){switch(o=r[d],c){case he:if(!o||!N(q,o)){if(t)return"Invalid scheme";c=fe;continue}h+=j(o),c=pe;break;case pe:if(o&&(N(W,o)||"+"==o||"-"==o||"."==o))h+=j(o);else{if(":"!=o){if(t)return"Invalid scheme";h="",c=fe,d=0;continue}if(t&&(u.isSpecial()!=p(le,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&le[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Ce:u.isSpecial()&&i&&i.scheme==u.scheme?c=ge:u.isSpecial()?c=be:"/"==r[d+1]?(c=me,d++):(u.cannotBeABaseURL=!0,U(u.path,""),c=Ie)}break;case fe:if(!i||i.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==o){u.scheme=i.scheme,u.path=m(i.path),u.query=i.query,u.fragment="",u.cannotBeABaseURL=!0,c=De;break}c="file"==i.scheme?Ce:ve;continue;case ge:if("/"!=o||"/"!=r[d+1]){c=ve;continue}c=we,d++;break;case me:if("/"==o){c=Ee;break}c=Pe;continue;case ve:if(u.scheme=i.scheme,o==n)u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query=i.query;else if("/"==o||"\\"==o&&u.isSpecial())c=ye;else if("?"==o)u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query="",c=Re;else{if("#"!=o){u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.path.length--,c=Pe;continue}u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query=i.query,u.fragment="",c=De}break;case ye:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,c=Pe;continue}c=Ee}else c=we;break;case be:if(c=we,"/"!=o||"/"!=O(h,d+1))continue;d++;break;case we:if("/"!=o&&"\\"!=o){c=Ee;continue}break;case Ee:if("@"==o){f&&(h="%40"+h),f=!0,a=g(h);for(var w=0;w<a.length;w++){var E=a[w];if(":"!=E||y){var _=se(E,ae);y?u.password+=_:u.username+=_}else y=!0}h=""}else if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(f&&""==h)return"Invalid authority";d-=g(h).length+1,h="",c=_e}else h+=o;break;case _e:case Se:if(t&&"file"==u.scheme){c=xe;continue}if(":"!=o||v){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(h))return s;if(h="",c=Ae,t)return;continue}"["==o?v=!0:"]"==o&&(v=!1),h+=o}else{if(""==h)return"Invalid host";if(s=u.parseHost(h))return s;if(h="",c=Te,t==Se)return}break;case Te:if(!N($,o)){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=h){var S=I(h,10);if(S>65535)return"Invalid port";u.port=u.isSpecial()&&S===le[u.scheme]?null:S,h=""}if(t)return;c=Ae;continue}return"Invalid port"}h+=o;break;case Ce:if(u.scheme="file","/"==o||"\\"==o)c=ke;else{if(!i||"file"!=i.scheme){c=Pe;continue}if(o==n)u.host=i.host,u.path=m(i.path),u.query=i.query;else if("?"==o)u.host=i.host,u.path=m(i.path),u.query="",c=Re;else{if("#"!=o){ce(L(m(r,d),""))||(u.host=i.host,u.path=m(i.path),u.shortenPath()),c=Pe;continue}u.host=i.host,u.path=m(i.path),u.query=i.query,u.fragment="",c=De}}break;case ke:if("/"==o||"\\"==o){c=xe;break}i&&"file"==i.scheme&&!ce(L(m(r,d),""))&&(ue(i.path[0],!0)?U(u.path,i.path[0]):u.host=i.host),c=Pe;continue;case xe:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ue(h))c=Pe;else if(""==h){if(u.host="",t)return;c=Ae}else{if(s=u.parseHost(h))return s;if("localhost"==u.host&&(u.host=""),t)return;h="",c=Ae}continue}h+=o;break;case Ae:if(u.isSpecial()){if(c=Pe,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=n&&(c=Pe,"/"!=o))continue}else u.fragment="",c=De;else u.query="",c=Re;break;case Pe:if(o==n||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(l=j(l=h))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||U(u.path,"")):de(h)?"/"==o||"\\"==o&&u.isSpecial()||U(u.path,""):("file"==u.scheme&&!u.path.length&&ue(h)&&(u.host&&(u.host=""),h=O(h,0)+":"),U(u.path,h)),h="","file"==u.scheme&&(o==n||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)V(u.path);"?"==o?(u.query="",c=Re):"#"==o&&(u.fragment="",c=De)}else h+=se(o,oe);break;case Ie:"?"==o?(u.query="",c=Re):"#"==o?(u.fragment="",c=De):o!=n&&(u.path[0]+=se(o,ne));break;case Re:t||"#"!=o?o!=n&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":se(o,ne)):(u.fragment="",c=De);break;case De:o!=n&&(u.fragment+=se(o,re))}d++}},parseHost:function(e){var t,i,n;if("["==O(e,0)){if("]"!=O(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,i,n,r,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,h=function(){return O(e,d)};if(":"==h()){if(":"!=O(e,1))return;d+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=i=0;i<4&&N(X,h());)t=16*t+I(h(),16),d++,i++;if("."==h()){if(0==i)return;if(d-=i,u>6)return;for(n=0;h();){if(r=null,n>0){if(!("."==h()&&n<4))return;d++}if(!N($,h()))return;for(;N($,h());){if(o=I(h(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;d++}l[u]=256*l[u]+r,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;l[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(H(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=y(e),N(Q,e))return"Invalid host";if(null===(t=function(e){var t,i,n,r,o,a,s,l=z(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(i=[],n=0;n<t;n++){if(""==(r=l[n]))return e;if(o=10,r.length>1&&"0"==O(r,0)&&(o=N(Y,r)?16:8,r=H(r,8==o?1:2)),""===r)a=0;else{if(!N(10==o?J:8==o?K:X,r))return e;a=I(r,o)}U(i,a)}for(n=0;n<t;n++)if(a=i[n],n==t-1){if(a>=D(256,5-t))return null}else if(a>255)return null;for(s=F(i),n=0;n<i.length;n++)s+=i[n]*D(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(N(Z,e))return"Invalid host";for(t="",i=g(e),n=0;n<i.length;n++)t+=se(i[n],ne);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return p(le,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ue(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,i=e.username,n=e.password,r=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==r?(u+="//",e.includesCredentials()&&(u+=i+(n?":"+n:"")+"@"),u+=ie(r),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+L(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw P(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ne(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",he)},getUsername:function(){return this.username},setUsername:function(e){var t=g(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<t.length;i++)this.username+=se(t[i],ae)}},getPassword:function(){return this.password},setPassword:function(e){var t=g(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<t.length;i++)this.password+=se(t[i],ae)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,_e)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Se)},getPort:function(){var e=this.port;return null===e?"":b(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=b(e))?this.port=null:this.parse(e,Te))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+L(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ae))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=b(e))?this.query=null:("?"==O(e,0)&&(e=H(e,1)),this.query="",this.parse(e,Re)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=b(e))?("#"==O(e,0)&&(e=H(e,1)),this.fragment="",this.parse(e,De)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ne=function(e){var t=h(this,Le),i=E(arguments.length,1)>1?arguments[1]:void 0,n=T(t,new Oe(e,!1,i));o||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Le=Ne.prototype,Me=function(e,t){return{get:function(){return C(this)[e]()},set:t&&function(e){return C(this)[t](e)},configurable:!0,enumerable:!0}};if(o&&c(Le,{href:Me("serialize","setHref"),origin:Me("getOrigin"),protocol:Me("getProtocol","setProtocol"),username:Me("getUsername","setUsername"),password:Me("getPassword","setPassword"),host:Me("getHost","setHost"),hostname:Me("getHostname","setHostname"),port:Me("getPort","setPort"),pathname:Me("getPathname","setPathname"),search:Me("getSearch","setSearch"),searchParams:Me("getSearchParams"),hash:Me("getHash","setHash")}),d(Le,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),d(Le,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),A){var Fe=A.createObjectURL,Ue=A.revokeObjectURL;Fe&&d(Ne,"createObjectURL",l(Fe,A)),Ue&&d(Ne,"revokeObjectURL",l(Ue,A))}w(Ne,"URL"),r({global:!0,forced:!a,sham:!o},{URL:Ne})},function(e,t,i){"use strict";var n=i(17),r=i(625);n({target:"String",proto:!0,forced:i(626)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,i){var n=i(8),r=i(75),o=i(43),a=i(124),s=i(45),l=n.TypeError,u=function(e){return function(t,i,n,u){r(i);var c=o(t),d=a(c),h=s(c),p=e?h-1:0,f=e?-1:1;if(n<2)for(;;){if(p in d){u=d[p],p+=f;break}if(p+=f,e?p<0:h<=p)throw l("Reduce of empty array with no initial value")}for(;e?p>=0:h>p;p+=f)p in d&&(u=i(u,d[p],p,c));return u}};e.exports={left:u(!1),right:u(!0)}},function(e,t,i){"use strict";var n=i(17),r=i(8),o=i(13),a=i(59),s=i(318),l=i(630),u=i(15),c=r.RangeError,d=r.String,h=Math.floor,p=o(l),f=o("".slice),g=o(1..toFixed),m=function(e,t,i){return 0===t?i:t%2==1?m(e,t-1,i*e):m(e*e,t/2,i)},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=h(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=h(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=d(e[t]);i=""===i?n:i+p("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!u((function(){g({})}))},{toFixed:function(e){var t,i,n,r,o=s(this),l=a(e),u=[0,0,0,0,0,0],h="",g="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return d(o);if(o<0&&(h="-",o=-o),o>1e-21)if(i=(t=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t}(o*m(2,69,1))-69)<0?o*m(2,-t,1):o/m(2,t,1),i*=4503599627370496,(t=52-t)>0){for(v(u,0,i),n=l;n>=7;)v(u,1e7,0),n-=7;for(v(u,m(10,n,1),0),n=t-1;n>=23;)y(u,1<<23),n-=23;y(u,1<<n),v(u,1,1),y(u,2),g=b(u)}else v(u,0,i),v(u,1<<-t,0),g=b(u)+p("0",l);return g=l>0?h+((r=g.length)<=l?"0."+p("0",l-r)+g:f(g,0,r-l)+"."+f(g,r-l)):h+g}})},function(e,t,i){(function(e,t){/*! v2.9.2-2904f94, 2019-10-09T14:32:09Z */
|
|
164
|
+
/*! exports provided: enableLogs, logger */function(e,t,i){"use strict";i.r(t),i.d(t,"enableLogs",(function(){return c})),i.d(t,"logger",(function(){return d}));var n=i(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function r(){}var o={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=o;function s(e,t){return t="["+e+"] > "+t}var l=Object(n.getSelfScope)();function u(e){var t=l.console[e];return t?function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n[0]&&(n[0]=s(e,n[0])),t.apply(l.console,n)}:r}var c=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];i.forEach((function(t){a[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{a.log()}catch(e){a=o}}else a=o},d=a}}).default},e.exports=n())},function(e,t,i){"use strict";i(56),i(24),i(71),i(84),i(239),i(183);var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(4),u=i.n(l),c=i(3).c.video(n||(n=u()(["\n width: 100%;\n border-radius: 15px;\n"]))),d=Object(a.forwardRef)(function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.stream,n=arguments.length>1?arguments[1]:void 0;return o()(this,void 0),Object(a.useEffect)(function(){var t=this;o()(this,e),(i||n)&&("srcObject"in n.current?n.current.srcObject=i:n.current.src=window.URL.createObjectURL(i),n.current.onloadedmetadata=function(){o()(this,t),n.current.play()}.bind(this))}.bind(this),[i,n]),s.a.createElement(c,{ref:n,autoplay:!0,muted:!0})}.bind(void 0));t.a=d},function(e,t,i){"use strict";var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(4),u=i.n(l),c=i(3).c.canvas(n||(n=u()(["\n position: absolute;\n opacity: 0;\n left: 0;\n"]))),d=Object(a.forwardRef)(function(e,t){return o()(this,void 0),console.log("REFERENCE LIGHTING ",t),s.a.createElement(c,{ref:t})}.bind(void 0));t.a=d},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={__root:{subscription:{free:"FREE",plus:"plus",zeroDollar:"0",calf:"CALF",userPerYear:" / user / year",perYear:"Year",noOfUsers:"No. of Users",oneUserOnly:"1 user only",webCameRecoed:"Webcam record",audioRecord:"Audio record",screenCapture:"Screen record",uploadToYoutubeAndGclassroom:"Upload to Youtube & Google Classroom",recordUptoForFree:"Record up to 30 min/video",freeRecordingsBymonth:"5 recordings",hippoLogo:"Hippo branding",fourEightyResolution:"480 Resolution",freeResolution:"720 Resolution",downgrade:"DOWNGRADE",allOfFree:"All of FREE Plan",simpleEdintingOptions:"Crop and Trim",unlimittedRecordings:"Unlimited videos of 5 mins length",unlimittedLengthOfRecording:"Unlimited length of recording",recordingUpToTwoHours:"Record up to 2 hr/video",noHippoLogo:"No Hippo branding",calfResolution:"480p & 720p Resolution",upgrade:"Upgrade",businessPlan:"Business Edition",educationPlan:"Education Edition",currentPlan:"CURRENT PLAN",managePlan:"Manage Plan",chooseYourPlan:"Choose Plan",checkout:"Checkout",cancel:"CANCEL",currentPlanInfo:"You are currently subscribed to ",subscriptionPlan:"Subscription Plan",pod:"POD",hippo:"HIPPO",youPay:"You Pay",year:"year",yourSubscription:"Your subscription to ",isSuccessful:" is successful.",nextRenewalIs:"Your next renewal is on: ",zeroSetuoFee:"Zero setup fee",supportWorldWide:"24x5 LIVE support worldwide",currentNoOfUsers:"Current users",usersRequired:"Update users",month:"month",thisWill:"This will ",yourPlanTo:" your plan to ",doYouWant:". Do you want to continue?",userPerMonth:" / user / month",perMonth:"Month",allOfCalf:"All of CALF",integrations:"Helpdesk integrations*",integration:"Integrations",optionToshare:"Share URL",optionToEmbed:"Embed",optionToEmail:"Email",hostingOfVideos:"Video hosting",tracking:"Tracking & Analytics*",hippoResolution:"1080p Resolution*",hippoStorage:"100GB of Streaming & Viewing",users:"Users",upgradeTo:"Select the number of users you want and upgrade to - ",plan:"Plan",monthly:"Monthly",yearly:"Yearly",availDiscount:"Avail 20% discount on yearly subscription",monthlyBilling:"Monthly billing not available for 5 users and below",calff:"calf",calfEducational:"calf educational",hippoo:"hippo",months:"months",bulkPricingContact:"For bulk pricing contact",couponCode:"Apply Discount code",enterCouponCode:"Enter discount code",apply:"Apply",discountMsg:"20% discount will be applied for yearly billing on checkout",noteMonthlyBilling:"Note - Monthly billing not available for 5 users and below",trialMsg:"You are currently in Trial version. Your trial will expire on:",yourRenewal:"Your next renewal for ",isOn:"plan is on: ",planInfo:"User can create/edit videos. No restriction on no. of views",customizeEndCardBranding:"Customize end card",additionalStreaming:"Additional 100 GB Bandwidth at $10/month",allOfPro:"All of PRO Plan",allOfPremium:"All of PREMIUM Plan",allOfUnlimited:"All of UNLIMITED Plan",csmTeamStorage:"250GB of Streaming & Viewing",userManagement:"User Management",videoTickets:"Video ticketing*",videoAssignments:"Video Assignments",supportAgentsLogin:"3 Support Agents Login",adminLogin:"1 Admin Login",downloadOptions:"Download Your Videos",freelancerRecordings:"10 recordings",restrictionViewingStreaming:"100GB Bandwidth",highResolution:"1080p Resolution*",freelancerAdditionalVideos:"Additional Videos 10 Videos at 5USD",freelancer:"Freelancer",studentsLogin:"25 Students",additionalStudents:"Every 25 additional students at $10/year",educator:"Educator",individualTeacher:"Individual Teacher",student:"Student",recommended:"RECOMMENDED",exportOptions:"Export to Youtube, Vimeo, GDrive & Google Classroom",exportOptionsTwo:"Export to Youtube, GDrive & Google Classroom",newDiscountMsg:"20% discount has been applied",pro:"PRO",team:"team",premium:"Premium",starterNotAvailable:"Starter Plan not available for Monthly and Quarterly in Sales",unlimited:"Unlimited",newFreeDescription:"This one’s on us",freeForever:"FREE FOREVER",callOut:"In-Video Annotations",educatorTeamDescription:"For pioneer Educators looking to educate students better with video.",educatorDescription:"For stand-alone teachers looking to make a difference.",oneTeacher:"1 Teacher",studentManagement:"Student management",studentAssignment:"Student assignment videos",teacherAdditionalVideos:"Every 10 additional Exports at $5/year",studentDescription:"For Student who need lengthy videos with a personal touch.",studentAdditionalVideos:"10 additional Exports at $5/yr",csmFreeDescription:"For customer success enthusiasts.",freeBandwidth:"500MB Bandwidth",proDescription:"Mesmerize your audience and know them",teamDescription:"For high performance customer success teams bent on fighting churn and upselling.",teamCsm:"1 CSM",teamAgent:"3 Agents",unlimitedViewing:"Unlimited customers viewing",agnetManagement:"Agent management",teamBandwidth:"200 GB Bandwidth",teamAdditionalUsers:"Every additional user at $10/month",for:"For ",freelancerDescription:"who need lengthy videos with a personal touch.",freelancerUnlimitedDescription:" who live and breathe videos",choosePlan:"Choose a billing cycle and upgrade to",schoolPlan:"School",classRoom:"Classroom",billingCycle:"Billing Cycle",moveToFreePlan:"and will be moved to Forever Free plan",classRoomRecordings:"10 recordings per user",additionalAgents:"Every additional agent at $10/month",classRoomStudentRecordings:"10 recordings per student",numShareForFree:"Share up to 3 videos",unlimitedShares:"Unlimited video sharing",exportsTenVideos:"Export up to 10 videos",downloadTenVideos:"Download up to 10 videos",unlimitedExports:"Unlimited Exports",unlimitedDownloads:"Unlimited Downloads",exportsShareThreeVideos:"(*Export/Download/Share up to 3 videos)",advanceEditng:"Advanced editing*",googleSlidesIntegration:"Google Slides",unlimitedExportDownloadShare:"Unlimited Exports/Downloads/Shares",videoTicketing:"Video ticketing",embedButton:"Embed button on request*",bandwidthMonth:"50 GB Bandwidth/month",categories:"Categories*",exportsShareTenVideos:"Export/Download/Share up to 10 videos",bandwidthYear:"50 GB Bandwidth/year",additionalTenVideos:"Additional 10 videos upto 2 hours",additionalFiveGb:"Additional 5GB Bandwidth at $1/year",folders:"Folders*",freelancerPremiumBandwidth:"75 GB Bandwidth/year",unlimitedVideosOfTwoHours:"Unlimited 2 hour videos",unlimitedRecordings:"Unlimited recordings",agentManagement:"Agent management",premiumFeatures:" - Premium features",schoolPrice:"School / District Pricing",schoolContent:"Please contact us to set up Hippo Video for your entire school/district.",contactUs:"Contact Us",submit:"Submit",email:"Email*",name:"Name*",phone:"Phone*",yourRequirement:"Your Requirement",ok:"OK",emailValidation:"Please enter email address.",phoneNumberValidation:"Please enter phone number.",nameValidation:"Please enter your name.",successMessage:"Thank you, we will contact you shortly",school:"SCHOOL PLAN",notAvailableForBelowNineUsers:"Please select a min. of 100 users",quarterly:"Quarterly",halfYearly:"Half Yearly",freelancerBandwidth:"6.25 GB Bandwidth/month",classRoomStudentCount:"40 Students",classRoomTeacherCount:"1 Teacher",classRoomStudentCanCreate:"Student can create videos only with link provided by Teacher",schoolRoomStudentCount:"100+ Students or Teachers",videoApi:"Video API",schoolAssignment:"Assignments",roles:"Roles",classes:"Classes",classroomBandwidth:"100 GB Bandwidth/year",schoolStudentCanCreate:"Students can create their own videos",classRoomDesc:"For Teachers looking to flip the classroom.",allOfClassroom:"All of CLASSROOM Plan",classRoomPlanInfo:"for 40 Students & 1 Teacher",schoolPlanInfo:"for more than 100 users",freeStorage:"500MB storage",freeMins:"10 mins",simpleEdit:"Simple Edit",proEdit:"Pro Edit",proEditTooltip:"Edit your video and add text with Hippo Video's advanced features",shareVideo:"Video Sharing",shareAndDownloadVideos:"Share and Download your Videos",noHippoVideoWaterMark:"No Hippo Video Watermark",noHippoVideoEndCard:"No Hippo Video End Card",yesHippoVideoEndCard:"Yes Hippo Video End Card",hippoVideoBranding:"Hippo Video Branding",hippoVideoBrandingTooltip:"Customize the player logo,color to increase brand awareness",hippoVideoBrandingTooltip1:"Send out videos with our Hippo Video logo",everythingIn:"Everything in",and:"and",tenGbStorage:"10GB storage",tenGbBandwidthMonth:"10GB Bandwidth",oneGbBandwidthPerMonth:"1 GB/Month Bandwidth",tenGbBandwidthPerMonth:"10 GB/Month Bandwidth",fiftyGbBandwidthPerMonth:"50 GB/Month Bandwidth",hundredGbBandwidthPerMonth:"100 GB/Month Bandwidth",oneHour:"1 Hour",sevenTwentyP:"720p",markupTools:"Markup tools",googleSlides:"Google Slides",googleDocs:"Google Docs",googleClassroom:"Google Classroom Integration",twentyGbStorage:"20GB storage",twentyGbBandwidthMonth:"20GB Bandwidth",twoHours:"2 Hours",tenEightyp:"1080 Resolution",FullHdRecordingTenEighty:"Full HD Recording - 1080 Resolution",importVideos:"Import Videos",stockImages:"Stock image and audio track libraries",introOutro:"Intro Outro",gmailIntegration:"Gmail Integration",zoomIntegration:"Zoom Integration",zoomIntegrationtooltip:"Create and send 1:1 personalized videos directly inside your Zoom",slackWorkplace:"Slack and Workplace",zendeskFreshdesk:"Zendesk and Freshdesk",everythingInHippo:"Everything in PROFESSIONAL and",professional:"PROFESSIONAL",unlimitedStorage:"Unlimited Storage*",threeHours:"3 Hours Recording Limit Per Video",videoLibrary:"Add Video Categories",videoFolder:"Add Video Folders",privacySettings:"Video Privacy Settings",videoEngagements:"Video Engagements",embedVideos:"Embed Videos",usageAnalytics:"Video Performance Analytics",whiteLabeling:"White Labeling",guestRecording:"Guest Recording",comments:"Comments",reactions:"Reactions",videoComments:"Video Comments",desire2Learn:"Desire2Learn",slack:"Slack",singleUser:"Single User Plan",freeRecordingLimit:"5 Min Recording Limit Per Video",fifteenMinsRecording:"15 Mins Recording Limit Per Video",personalDescription:"Perfect if you’re getting started",quarter:"Quarter",halfYear:"Half Year",personalRecordLimit:"2 Hour Recording Limit Per Video",everythingInFree:"Everything in FREE and",everyThingInFreePlus:"Everything in free, plus:",professionalRecordLimit:"2 Hours Recording Limit Per Video",professionalDescription:"Perfect if you want to communicate better",everythingInPersonal:"Everything in PERSONAL and",personal:"PERSONAL",businessDescription:"For your firm’s creative goals",unlimitedUsers:"Multi User Plan",playerBranding:"Player Branding",business:"Business",user:"user",storage:"Storage",bandwidth:"Bandwidth",personalisation:"Personalization Credits",pausePeriodInfo:"During uncertain times like these, avail the 'Pause Subscription' feature from Hippo Video. You can now pause your billing and still continue to use the features under your plan",pauseSubscription:"PAUSE SUBSCRIPTION",cancelSubsc:"CANCEL SUBSCRIPTION",actualBillingDate:"Actual billing date",revisedBillingDate:"Revised billing date",pauseSubscriptionfor:"Pause subscription for",pauseSuccessMessage:"Your subscription has been successfully paused",cancelSubscription:"cancel subscription",cancelOrPauseLink:"Cancel or pause subscription",contactSupport:"Contact support for more details",pauseText:"Subscription paused.",cancelText:"Cancellation initiated.",gotit:"GOT IT",feedbackTitle:"We are sorry to let you go. As one last step, Please answer the below questions that help us make the product a better one.",feedbackQuestion1:"What made you quit Hippo Video?",feedbackQuestion2:"How would you rate your overall satisfaction?",cancelSuccessMessage:"We have initaited the cancellation process. Our customer support specialist will contact you within next two days.",bandwidthDescription:"Bandwidth is when you share, download or export a video, the video will be streamed/downloaded from our server. The count of bytes streamed/downloaded when it’s played is called as bandwidth.",hideBandwidth:"Hide Bandwidth Details",classroomDescription:"Everything you need for your class",classroom:"CLASSROOM",classroomStuCount:"40 students + 1 teacher",studentVideoRecording:"Student Video Recording",startCardEndCard:"Custom Start and End Screen",startEndScreen:"Start and End Screen",d2lIntegration:"D2L Integration",schoolStudentCount:"Minimum 100 users",schoolPlanNew:"SCHOOL",everythingInClassroom:"Everything in CLASSROOM and",schoolDescription:"For your school’s creative goals",bandwidthHoverMsg:"Data sent to a user who views your video is counted in bandwidth. When someone views your video using the link shared by you, the data consumed is bandwidth consumed. Data consumed by exporting and downloading videos is also calculated in bandwidth.",professionalTrialMsg1:"You are currently in Professional trial version. Your trial will expire on: ",professionalTrialMsg2:" and will be moved to Forever Free plan",freePlanMsg:"You are currently in the FREE plan. Choose a plan to upgrade.",personaFreeversion:"You’re currently on the free version!",fairUsagPolicy:" - Fair Usage Policy",usageAnalyticsHoverMsg:"Get viewership, engagement, and performance reports.",embedVideosHovverMsg:"Get the iframe code to embed videos in your website",vdoEngagementHoverToolTip:"Engage with videos using reactions and timeline comments.",privacySettingsHoverMsg:"Share videos by protecting them with a password. Control who can access your videos. Set an expiry date for the shared video link.",libraryHoverToolTip:"Organize your videos into folders for easy access.",assignmentHoverToolTip:"Teachers can send a link to their students to record assignments and submit.",markupToolsHoverMsg:"Use markup tools like focus, highlight, and cursor creating videos",startCardEndCardHoverMsg:"Add your start and end cards to customize your videos",studentVideoRecordingHoverMsg:"Teachers can send a link to students to record individual videos.",guestRecordingHoverMsg:"Send a link to start recording without signing up. Great for customer support and sales.",twentyGbBandwidthMonthUser:"20GB Bandwidth/user",upgradeToMsg:"Set the billing cycle time span for your upgrade to - ",managePlanMsg:" You shall only be charged for your recent purchase during the checkout process.",discountCodeErrorMsg:"Invalid discount code",invalidCodeErrorMsg:" is the invalid code",oneHourRecordLimit:"1 hour recording limit per video",teamPlanMsg:"You have subscribed to ",brandingAndCustomization:"Custom Branding",brandingCustomization1:"Branding & Customization",brandingAndCustomizationHoverMsg:"Add logo, favicon and customize links with your own personal or company domain name to give your videos a professional look.",brandingAndCustomizationSchoolHoverMsg:"Add logo, favicon and customize links with your own personal or school domain name to give your videos a professional look.",customDomain:"Custom Domain",createVideoFromImages:"Create Video from Images",customThumbnail:"Add a Custom Thumbnail",starter:"Starter",enterprise:"Enterprise",mktgFreeImportVideos:"3 Video Imports",mktgFreeCreateVideos:"Create Videos - 5/month",mktgFreeSlideShow:"Video Slideshow Maker",mktgFreePrivacy:"Set Expiry and Password Protect Videos",mktgFreeExport:"Export to YouTube, GDrive etc",mktgFreeSocialSharing:"Social Sharing Options",mktgFreeEmbed:"Embed Videos & Playlist",mktgFreeVdoComments:"Video Comments",mktgFreeResolution:"Video Quality - HD",mktgFreeCta:"Timeline Actions",mktgFreeBandWidth:"Bandwidth Limit - 200GB/month",mktgFreeReport:"Video Analytics",mktgFreeHippoBranding:"Hippo Video Branding",mktgFreeIntroOutro:"Custom Start and End Screen",mktgFreeSmartIntegration:"Smart Integrations",mktgFreeNumUsers:"User Seats - 1",mktgStarterImportVideos:"10 Hosted Videos",mktgStarterCreateVideos:"Create Videos - 10/month",mktgSimpleEdit:"Quick Editing Suite",mktgDownload:"Download Your Videos",mktgClone:"Create Video Copy",mktgFullHd:"Video Quality - Full HD",mktgAddSubtitle:"Add Subtitle Files",mktgCustomBranding:"Custom Branding",mktgCustomThumbnail:"Add a Custom Thumbnail",mktgPlayerThemes:"Customizable Video Player Themes",mktgSubdomain:"Account Subdomain",mktgNoHippoBranding:"No Hippo Video Branding",mktgProImportVideos:"20 Hosted Videos",mktgProCreateVideos:"Create Videos - 30/month",mktgGif:"Video to GIF",mktgBlur:"Add Blur Effect",mktgAdvancedEdit:"Professional Video Editing",mktgStockImages:"Stock Image and Music Library",mktgCategory:"Add Video Categories",mktgReactions:"Animated Reactions",mktgGenerateSubtitles:"Auto Generate Subtitles - 60 mins/month",mktgSpeedDetection:"HD Bandwidth Speed Detection",mktgAudienceDemographics:"Viewer Reports",mktgProCollectVideoTestimonials:"Collect Video Testimonials - 5/month",mktgGsuite:"GSuite. Need More? Submit Your Request.",mktgProUsers:"User Seats - 3",mktgEnterpriseImportVideos:"50 Hosted Videos",mktgEnterpriseCreateVideos:"Create Videos - 60/month",mktgCustomDomainSSL:"Custom Domain Mappping (SSL)",mktgUserPermissions:"User Roles & Permissions",mktgEnterpriseUsers:"User Seats - 5",mktgEnterpriseGenerateSubtitles:"Auto Generate Subtitles - 120 mins/month",mktgAccountManager:"Dedicated Account Manager",mktgPrioritySupport:"Priority Support",starterDescription:"Unearth brand visibility with videos",enterpriseDescription:"Own your video marketing strategy",mktgFreeRecordLimit:"Recording Limit - 30 mins/video",mktgStarterProRecordLimit:"Recording Limit - 1 hr/video",mktgEnterpriseRecordLimit:"Recording Limit - 2 hr/video",mktPlaceInteg:"Marketplace Integrations",everyDayNarrative:"Everyday Narrative",supportGenerateSubtitles:"Auto Generate Subtitles - 60 mins/month",supportCrtVideos:"Create Videos",basicReports:"Basic Reports",basicReportsTooltip:"View basic video reports like the total plays, avg watch rate for all your prospects",basicReportsTooltip1:'View all essential video reports such as "total plays" and "average watch rate" for each prospect',advancedReports:"Advanced Reports",advancedReportsTooltip:"View detailed video reports like the video play rate, watch duration etc. for all your prospects",knowledgebasInteg:"Knowledgebase Integration",supportFreeCta:"Create Polls Inside Video",recordingWidget:"Embeddable Recording Button",supportVideoTickets:"Collect Video Tickets",supportMktPlaceInteg:"Helpdesk Integrations (Zendesk, Freshdesk, Intercom)",supportAdminCost:"$25 / Admin / Month",supportAgentCost:"$5 / Agent / Month",supportBasicDescription:"Resolve tickets faster",supportStarterDescription:"Transform your support agents to support rockstars",supportProDescription:"Graduate from customer support to customer success",supportEnterpriseDescription:"For 'customer-first' businesses",supportFreeImportVideos:"Import Videos - 3",supportStarterImportVideos:"Import Videos - 10",supportProImportVideos:"Import Videos - 20/admin",supportEnterpriseImportVideos:"Import Videos - 30/admin",importCost:"Import Additional Videos for 25¢ each/month",salesStarterImportVideos:"5 Hosted Videos",salesStarterRecordingsBymonth:"Create Videos - 50/month",salesFreeCreateVideos:"Create Videos - 10/month",salesProCreateVideos:"Create Videos - 100/month",salesEnterpriseCreateVideos:"Create Videos - 200/month",salesProUsers:"User Seats - 2",salesEnterpriseUsers:"User Seats - 3",salesGmailAddon:"Gmail - AddOn",mktgEnterpriseCollectVideoTestimonials:"Collect Video Testimonials - 10/month",singleUserPlan:"Single User",oneTeacherUpto:"One Teacher & Add upto 40 Students",addAsManyYouWant:"Users - Add as many you want",min100users:"Minimum 100 Users",uptoUsers:"Upto 40 Students",sSocialSuccessMsg:"Successfully updated. Now, you are on paid plan",errorReferralCode:"Invalid code",perMonthSmallCase:"month",perYearSmallCase:"year",createStarterCreateVideos:"Create Videos - 100/month",createStarterProRecordLimit:"Recording Limit - 120 mins/video",createFullHd:"Video Quality - Full HD",createNumUsers:"User Seats - 1",createGif:"Video to GIF",createSimpleEdit:"Quick Editing Suite",createProEdit:"Professional Video Editing",createDownload:"Download Your Videos",createCategory:"Add Video Categories",youtubeNativeHosting:"Youtube Native Posting",youtubeNativeHosting1:"Youtube Native Videos",saveToGdrive:"Export to GDrive",directVideoSharing:"Direct video sharing",createBandWidth:"200 GB Bandwidth",animatedReactions:"Animated Reactions",videoBitrate:"Video bitrate",googleDocsIntegration:"Google Docs",recordYourSlidesAndDocs:"Record your Slides & Docs",createClone:"Create Video Copy",growth:"GROWTH",mktgProDescription:"Gain leads and audience insights",growthDescription:"Contextual customer journey mapping",createStarterDescription:"For quick creation and editing",createProCreateVideos:"Create Unlimited Videos",hostUnlimitedVideos:"Host Unlimited Videos",createProNumUsers:"User Seats - 2",addPlayerLogo:"Add Player Logo",advancedAnalytics:"Advanced Video Reports",createProDescription:"Create and Brand your Videos",creation:"Creation",marketing:"Marketing",sales:"Sales",supportEntUserLimit:"User Seats - No Upper Limit",supportProUserLimit:"User Seats - No Upper Limit",supportFreeUserLimit:"User Seats - 1",supportStarterUserLimit:"User Seats - 1",lowResolution:"Video Quality - SD",tenMinuteRecording:"Recording Limit - 10 mins/video",defaultBitrate:"Default Bitrate",sevenTwentyResolution:"Video Quality - HD",highBitrate:"High Bitrate",unlimittedRecordingOptions:"Unlimited Video Recordings",trackingAndNotification:"View Tracking and Notifications",contactsTab:"Contacts Tab",emailEmbed:"Email Campaign Link",zapierIntegration:"Zapier Integration",zapierIntegrationTooltip:"Connect Hippo Video with your everyday apps using Zapier",videoToGif60Sec:"Video to GIF - 60 sec",threeHostedVideos:"3 Hosted Videos",inVideoLeadGeneration:"In Video Lead Generation",tenVideoImports:"10 Hosted Videos",acceleratedStreaming:"Accelerated Video Streaming",unlimitedVideosWithSalesAddOn:"Unlimited Video Recordings with Capture Add-on",oneGbBandwidth:"1GB Bandwidth",videoSeo:"Video SEO",nativeFacebookHosting:"Facebook Native Video",twoGbBandwidth:"2GB Bandwidth",customTracking:"Custom Tracking",gifThumbnail:"GIF Thumbnail",gifThumbnailTooltip:"Choose gif thumbnail over static thumbnail to engage your prospects",transcoding:"HD Bandwidth Speed Detection",embedCrmLead:"Custom In-Video CRM Forms",endVideoPlaylist:"End Video Playlist",fiftyVideoImports:"100 Hosted Videos",internalTeamColloboration:"Internal Team Colloboration Tool",dashboard:"Marketing Dashboard",dashboardTooltip:"Understand your video and viewer performance in detail.",defaultCta:"Default Timeline Actions",configurableCta:"Configurable Timeline Actions",salesDashboard:"Sales Dashboard",salesDashboardTooltip:"Find your prospect activity, status, and other information all at one place",completeVideoPlatform:"A complete video marketing platform. Host videos and use performance tools to convert your casual viewers into customers.",checkPricing:"check pricing",support:"Support",theBusinessSuite:"THE BUSINESS SUITE",ownYourMarketing:"Ace your marketing, sales and support with our customized business suite. Contact us to know more.",salesAddonDesc:"Send video emails to your prospects, track them and leads to close more deals.",saledAddOn:"SALES ADD-ON",yearlyPlanOffer:"Bill yearly to pay only for 10 months. Get 2 months free.",yearlyPlanOfferBusiness:"Save 50% on this plan with an annual subscription.",yearlyEntPlanOfferBusiness:"Save 50% on sales growth annual plan buying a minimum of 3 users",applyNow:"Apply Now",perUser:" / user /",perMonthAddon:"/ month",perMonthUser:"/month/user",includesOne:"Includes 1 User",proTeamPlanInfo:"In the Pro plan, you can have only 5 users. To add more users, please opt for the Growth plan.",growthTeamPlanInfo:"You can only add users in multiples of 5. You will be billed accordingly.",includesFive:"Includes 5 Users",includesTen:"Includes 10 Users",perUserMonth:"/user/month",personalization:"Personalization",personMailPerMonth:"1000 video mails/month",testimonials:"Testimonials",testimonialPerMonth:"50/month",bandwidthPerMonth:"100 GB",subtitles:"Subtitles",subtitlesPerMinute:"60 min",additionalVideoImport:"Additional Video Imports",cents:"/ cents/ video",publishVideoToSlack:"Publish Videos to Slack, Jira, Trello",publishVideoToSlack1:"Publish Videos to Slack, Jira, Trello, D2L",trackViaFacbookPixel:"Track Using Facebook Pixel",trackViaFacbookPixelToolTip:"Understand your video performance with FB Pixel analytics",trackViaFacbookPixelAndGa:"Track Using Facebook Pixel & GA",trackViaFacbookPixelAndGaTooltip:"Understand your video performance with FB Pixel and Google analytics.",trackViaGoogle:"Track Using Google Analytics",inVideoCallToAction:"In Video Call-To-Action",inVideoCustomPoll:"In Video Custom Poll",inVideoCustomPollToolTip:"Include engaging Custom Poll to your video",shareableVideoLink:"Shareable Video Link",brandingCustomization:"Branding Customization",brandingCustomizationTooltip:"Customize the player logo and color to increase brand awareness",customizeVideoLandingPage:"Customize Video Sales Page",gifMaker:"GIF Maker",videoReactions:"Video Reactions",importsContactsFromCrm:"Import Contacts from CRM",inVideoMeetingLink:"In-Video Meeting Link",trackYourVideoEmails:"Track Your Video Emails",getRealTimeNotifi:"Get Real-Time Notifications",configurabaleInVideoTimelineAction:"Configurable In-Video Timeline Actions",salesAddOn:"Sales Workflow",personalizationAddonDesc:"Send personalized video emails to your contact list from Hippo Video itself.",testimonialAddonDesc:"Collect video testimonials from your customers. No signup required.",bandwidthAddonDesc:"Get bandwidth added to your account to continue serving videos.",subtitleAddonDesc:"Generate subtitles for your videos directly from Hippo Video.",importAddonDesc:" Import more videos to your Hippo Video account.",planUpgradeTo:"Plan Upgrade",backToSalesPricing:"Back to Sales",billing:"Billing",syncContactsViaZapier:"Sync Contacts via Zapier",perUserPerMonthAddon:"/ user/ month",availableAddOn:"Get Add-Ons",optional:" (optional)",aceYourMarketing:"Ace your marketing, sales and support \n with our customized plan",marketingTools:"Marketing Tools",salesTools:"Sales Tools",supportTools:"Support Tools",unlimittedVideos:"Unlimited Videos",unlimittedBandwidth:"Unlimited Bandwidth",videoRecorderApi:"Video Recorder API",personalizationApi:"Video Personalization API",limitedFreePlan:"Limited Free Plan - ",mktgFreePlanDesc:"Not decided yet? We have a Limited Free Plan where you get 3 Hosted Videos, In-Video Lead Generation Form and Hippo Video Branding",addOns:"ADD-ONS",customPricing:"Custom Pricing",gifThmbnail:"Animated GIF Thumbnail",greenScreen:"Green Screen",greenScreenTooltip:"Edit your video with Hippo Video's advanced features",basic:"Basic",basicDescription:"Begin your video marketing strategy",canBePurchasedAlone:"Can be purchased alone",buyNow:"BUY NOW",numAddon:"Num add-on",createAddon:"Capture",createAddonDesc:"Record and send unlimited webcam and screen recordings.",supportEntNewUserLimit:"User Seats - 100",supportProNewUserLimit:"User Seats - 50",supportStarterNewUserLimit:"User Seats - 25",salesforceIntegration:"Salesforce Integration",salesforceIntegrationTooltip:"Create, send and track 1:1 personalized videos and campaigns inside Salesforce account",hubspotIntegration:"HubSpot Integration",hubspotIntegrationTooltip:"Create, send and track 1:1 personalized videos directly inside your hubspot",includeAgentsStarter:"Includes 10 agents",includeAgentsPro:"Includes 25 agents",includeAgentsGrowth:"Includes 50 agents",oldPaidPlanInfo:"! You are currently charged based on our old pricing. This is valid until you choose to upgrade.",hiText:"Hi, ",hiText2:"Hi",includeAgentsBasic:"1 agent",clientRecording:"Client Recording",supportFreePlanDesc:"Not decided yet? We have a Limited Free Plan where you record SD Videos, Get Basic Reports and Hippo Video Branding",hdRecordingSevenTwenty:"HD Recording - 720 Resolution",commentsAndReactions:"Comments and Reactions",smartIntegration:"Smart Integration",advanceReports:"Advance Reports",videoSettings:"Video Settings",fourEightyRecording:"SD Recording - 480 Resolution",addGreenScreen:"Add Green Screen",basicPersonalizesVideos:"25 Personalized Video Emails. Add-on available",starterPersonalizesVideos:"50 Personalized Video Emails. Add-on available",proPersonalizesVideos:"75 Personalized Video Emails. Add-on available",growthPersonalizesVideos:"100 Personalized Video Emails. Add-on available",addonSubSuccessMsg:"Successfully added add-on to your account.",iWantUseVideoFor:"I want to use video for",marketingFeaturesFreeSalesSupport:"All marketing features included when you purchase sales or support plans",marketingFeaturesFreeSalesSupportOne:"Marketing features included when you purchase sales or support plans",saveTwentyPercent:"(Save 20%)",includes:"Includes",oneSales:"1 Sales",fiveSupport:"25 support",exportVideosToNativePlatform:"Export videos to native platform",gifCreation:"GIF creation",inVideoLeadGenerationTooltip:"Capture leads by adding lead forms in your video",everythinginStarterPlus:"Everything in starter, plus:",cloneVideos:"Clone Videos",customInVideoCallsToAction:"Custom-In-Video Call-To-Action",customInVideoCallsToActionTooltip:"Include engaging Calls-To-Action, Annotations, Custom Poll, and Forms to your video",seo:"SEO",seoTooltip:"Drive traffic to your website with video SEO using Subtitles, Title, Description, and Tags",videoChannelTemplates:"Video Channel Templates",outlookIntegration:"Outlook Integration",videoPrompter:"Teleprompter",videoPrompterTooltip:"Read the video script from your screen and record perfect videos",everythingInProPlus:"Everything in pro, plus:",everythingInGrowthPlus:"Everything in Growth, plus:",customDomainSSL:"Custom Domain (SSL)",videoReviewAndCollaboration:"Video Review and Collaboration",emailCampaignEmbed:"Email Campaign Embed",addVideoFolders:"Shared Team Folders",customizableVideoSalesPages:"Customizable Video Sales Pages",embeddableRecorderClient:"Embeddable Recorder Client",detailedComparisonTable:"See detailed comparison of our pricing plans",perYearText:" / year",perMonthText:" / month",perQuarterText:" / quarter",proSupportUsers:"50 support",growthSupportUsers:"100 support",collaboration:"Collaboration",marketingTeamDescription:"For Marketing Teams, Video & Digital Agencies",salesTeamDescription:"For SDRs and Sales Agents",supportTeamDescription:"For Support Agents and Executives",collaborationTeamDescription:"For team communication and video discussions",addOnCtaText:"This addon can only be attached to a subscription plan.",usersText:"users",tenSupportAgent:"10 Support Agents",proSupportAgent:"25 Support Agents",fiftySupportAgent:"50 Support Agents",additionalSalesUsers:"Additional sales user ",outreachIntegration:"Outreach Integration",outreachIntegrationTooltip:"Create, send and track 1:1 personalized videos and campaigns inside Outreach account",oneToOneVideo:"Send 1:1 Sales Video Email",linkedinIntegration:"Linkedin Integration",linkedinIntegrationTooltip:"Create and send 1:1 personalized videos directly inside your LinkedIN and Sales Navigator inbox",linkedinIntegrationTooltip1:"Create and send 1:1 personalized videos directly from your LinkedIn and LinkedIn Sales Navigator inbox",tenSalesCoachingVideosFromJeffreyGitomer:"12 Sales Coaching Videos from Jeffrey Gitomer",twentyfiveSalesCoachingVideosFromJeffreyGitomer:"30 Sales Coaching Videos from Jeffrey Gitomer",fortySalesCoachingVideosFromJeffreyGitomer:"50 Sales Coaching Videos from Jeffrey Gitomer",fortySalesCoachingVideosToolTip:'Get access to 50 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',tryNow:"Try Now",tryForFree:"TRY FOR FREE",existingPlan:"EXISTING PLAN",continueTrialWithThis:"Continue trial with this plan",doubleYourSales:"Accelerate your business with videos",noCreditCardRequire:"14-day free trial. No credit card required",noCreditCardRequired:"No credit card required",chooseThePlan:"Choose the best plan to unlock business growth",gsStarterDesc:"For Individuals with basic feature",gsProDesc:"For Sales Professionals starting with video selling",gsGrowthDesc:"For Sales Pros and Sales Teams with all business features",youCanSelect:"You can select more than one",billedMonthly:"Billed monthly",billedYearly:"Billed annually",billedQuarterly:"Billed quarterly",annually:"Annual",perAnnualText:" / annual",starterUpperCase:"STARTER",moveToFree:"Move to Free",trialPeriodEnd:"Your trial period has ended. Please choose a plan below. If you still need some time you can choose our Free forerver plan",moveFreeSuccssMsg:"Your successfully moved to forever Free plan",fieldRequired:"This filed is mandatory",stayFreePlanMsg:"Please let us know the reason you want to stay with our free plan",yearlyOffer:"20% off",videoCampaigns:"Video Campaigns",videoCampaignsTooltip:"Record and send video campaigns",netflixOfferMsg1:"Hippo Video is here for you to deal with the current global crisis. The discount on the new quarterly plan is as big as our annual plans. ",netflixOfferMsg2:"With our Sales annual plans, you get a ",netflixOfferMsg3:"coupon extra.",offerPercentage:"% off",covidOfferMsg:"COVID-19 DISCOUNTED PLAN",billingSummary:"Billing Summary",grandTotalPrice:"Grand Total Price",totalPrice:"Total Price",couponApplied:"Coupon Applied for",bestsuitedforteams:"Best Suited for Teams",mostpopular:"Most Popular",gamilOutlookInteg:"Gmail/Outlook Integration",gamilOutlookIntegTooltip:"Create and send 1:1 personalized videos and campaigns inside Gmail/Outlook account",gamilOutlookIntegTooltip1:"Create and send 1:1 personalized videos and campaigns inside Gmail account",fullHDRecording:"Full HD Recordings",fullHDRecordingTooltip:"Record unlimited full HD videos from your account",reportsInGmail:"Reports in Gmail",reportsInGmailTooltip:"View detailed video reports in Gmail and track your prospects",defaultSalesPage:"Default Sales Pages",defaultSalesPageTooltip:"Use personalized sales pages to shorten your sales cycle ",addtextInVideo:"Add Text/Image in Video",addtextInVideo1:"Add Text in Video",addtextInVideoTooltip:"Amplify your videos by adding text wherever needed",twelveSalesVideoFromGitomer:"12 Sales Coaching Videos from Jeffrey Gitomer",twelveSalesVideoFromGitomerTooltip:"Get your hands on 12 videos the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",twelveSalesVideoFromGitomerTooltip1:'Get access to 12 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',thirtySalesCoachingVideosFromJeffreyGitomer:'Get access to 30 videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',ctaAndMeetingLink:"CTAs, Meeting Link",ctaAndMeetingLinkTooltip:"Add in-video meeting links and any all-to-action to redirect your prospects to take the desired action",ctaAndMeetingLinkTooltip1:"Add customizable call-to-actions and in-video meeting links that nudge your prospects to take action",organizeIntoFolders:"Organize into Folders",organizeIntoFoldersTooltip:"Create and add videos to separate folders to keep track",brandedUrl:"Branded URL",brandedUrlTooltip:"Customize your page URL to improve brand awareness","24x7SupportTooltip":"We Provide 24x7 Support Request to our all Customers",twentyFiveSalesCoachingVideo:"30 Sales Coaching Videos from Jeffrey Gitomer",twentyFiveSalesCoachingVideoTooltip:"Get your hands on 30 videos from the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",minThreeUsers:"Min 3 Users",minTenUsers:"Minimum 10 Users",teamReportes:"Team Reports",customizableSalesPages:"Customizable Sales Pages",customizableSalesPagesTooltip:"Create and customize personalized sales pages to shorten your sales cycle",peopleTab:"People Tab",peopleTabTooltip:"Get 360 degree view of your contact video engagement activity",docInSalesPage:"Documents in Sales Pages",docInSalesPageToolTip1:"Get the complete sales page experience by adding product demos, testimonials, and contract PDFs as a carousel",docInSalesPageTooltip:"Add pdf documens and other sales documents to the carousel",fortyPlusSalesCoachingVideos:"50 Sales Coaching Videos from Jeffrey Gitomer",fortyPlusSalesCoachingVideosTooltip:"Get your hands on 50 videos from the REAL video playbook by Jeffrey Gitomer that has all the actionable tips and tricks",starterDescSeptPricing:"Gmail/Outlook only plan",proDescSeptPricing:"Basic Features. Suitable for VSB,SMBs",growthDescSeptPricing:"Premium Integrations & Customization",unlimittedHdRecording:"Unlimited HD Recordings",unlimittedHdRecordingTooltip:"Record unlimited HD videos from your account",mobileApp:"Mobile App",mobileAppTooltip:"Record and share videos on the go using Hippo Video app from your iOS or Android phone",notifications:"Notifications",trimOnly:"Trim Only",trimOnlyTooltip:"Trim your video length to your requirements",easyVideoCreationAndShare:"Easy video creation & share",realTimeNotifi:"Realtime Notifications",realTimeNotifiTooltip:"Receive real time notifications for all your videos",userRoles:"User Roles",createGIFFromVideo:"Create GIF from Video",webhookIntegration:"Webhook Integration",mailchimpIntegration:"Mailchimp Integration",freshservicIntegration:"Freshservice Integration",zohodeskIntegration:"Zohodesk Integration",intercomIntegration:"Intercom Integration",zendeskIntegration:"Zendesk Integration",freshdeskIntegration:"Freshdesk Integration",addIntroOutroVideos:"Add Intro and Outro Videos",gmailAddonIntegration:"Gmail Add-on Integration",professionalVideoEditingAndGreenScreen:"Professional Video Editing and Green Screen",editVideos:"Edit Videos",promotePlaylist:"Promote Playlist",inVideoCallToActionToolTip:"Include engaging Calls-To-Action to your video",customVideoCrmForm:"Custom in Video CRM Form",customVideoCrmFormToolTip:"Include engaging Forms to your video",iVideoAnnotation:"In Video Annotation",iVideoAnnotationToolTip:"Include engaging Annotations to your video",hubspotIntegrationForMarketing:"Hubspot Integration For Marketing",proEditAndGreenScreen:"Pro Edit & Green Screen",zendeskEmbeddableRecordingButton:"Zendesk Embeddable Recording Button",freshdeskEmbeddableRecordingButton:"Freshdesk Embeddable Recording Button",salesforceAdvancedIntegration:"Salesforce Advanced Integration",virtualBackground:"Virtual Background",customSalesPageTemplates:"Custom Sales Page Templates",ssoComingSoon:"SSO (Coming soon)",ssoText:"SSO",twentyFourSevenCustomerSupport:"24/7 Customer Support",fiftyPlusSalesCoachingVideosfromJeffreyGitomer:"50+ Sales Coaching Videos from Jeffrey Gitomer",gmailOutlookIntegrationTip:"Create and send 1:1 personalized videos right inside your Gmail/Outlook inbox",reportsGmailTip:"View detailed reports on prospect activity against each video right inside Gmail",defaultVideoSalesPagesTip:"Gain access to 3 default video sales pages",hubspotIntegrationToolTip:"Create, send, and track 1:1 personalized videos, all right inside your HubSpot CRM",advancedReportsToolTip:'View detailed video reports such as "video play rate" and "watch duration" for each prospect',mailchimpIntegrationToolTip:"Create and send 1:1 personalized videos directly inside your Mailchimp",webhookIntegrationToolTip:"Create and send 1:1 personalized videos directly inside your Webhook",salesCardDescription:"Get more responses & faster sales conversion with videos",marketingCardDescription:"Bring in more qualified leads using videos",supportCardDescription:"Faster customer service resolution with videos",teamCardDescription:"Improve team productivity & engagement using videos",tamCommunication:"Team communication",salesforceAdvancedIntegrationToolTip:"Enhance video prospecting strategy with advanced video reports from the Dashboard, which can be added or edited according to relevance and priority, right within Salesforce",virtualBackgroundToolTip:"Give your videos a professional feel by replacing the clutter in your background with images of your choice",customSalesPageTemplatesTip:"Our Hippo Video team specifically curates a video sales page template that is a perfect fit to your requirements",fiftyPlusSalesCoachingGitomerToolTip:'Get access to 50+ videos on "The REAL video playbook" by Jeffrey Gitomer which take you through the in-and-out of sales prospecting',gifThumbnailTooltip1:"Pick a GIF over a static thumbnail to catch prospect attention",replaceVideo:"Replace Video",emailSupport:"Email Support",knowledgebaseArticles:"Knowledgebase Articles",liveChatSupport:"Live Chat Support",phoneSupport:"Phone Support",videoSandwich:"Video Template Builder",emailChatPhoneSupport:"Email, Chat & Phone Support",textPerMonth:"/month",licenseTierOne:"AppSumo License Tier 1",licenseTierTwo:"AppSumo License Tier 2",licenseTierThree:"AppSumo License Tier 3",oneUser:"1 User",twoUsers:"2 Users",fiveUsers:"5 Users",twoHundredGbBandwidthPerMonth:"200 GB Bandwidth Per Month",fourHundredGbBandwidthPerMonth:"400 GB Bandwidth Per Month",oneTbBandwidthPerMonth:"1TB Bandwidth Per Month",twentyFiveGbStorage:"25 GB Storage",hundredGbStorage:"100 GB Storage",twoFiftyGbStorage:"250 GB Storage",fourtySalesCoachVideoGitomer:"40 Sales Coaching Videos From Jeffrey Gitomer",fiftySalesCoachVideoGitomer:"50 Sales Coaching Videos From Jeffrey Gitomer",featuresIncluded:"Features included",unlimitedFullHdRecordings:"Unlimited Full HD Recordings",gmailAndOutlookIntegrations:"Gmail/Outlook Integrations",reports:"Reports",videoCampaignsNotIncluded:"Video Campaigns",autoSubtitlingNotIncluded:"Auto-Subtitling not Included",upgradeYourLicense:"Upgrade Your License",createSalesPages:"Create Sales Pages",profilesAndPermissions:"Profiles and Permissions",profileAndPermissionsTooltiop:"Configure user profiles to set org level permissions to access videos, folders, documents, and other assets",knowledgeBaseIntegration:"Knowledge base integration"}},init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={__root:{homePage:{newLandingPageButtonText:"Create A New Sales Page",pageLink:"Page Link",emptyListTitle:"Personalized Sales Pages",myPagesEmptyStateText:"Click here to add Sales Page",sharedEmptyStateText:"No Sales Page has been shared with you currently.",allPagesEmptyStateText:"No result!",emptyListDesc:"Deliver a hyper-personalized experience to your prospects with Hippo Video. Customize every aspect of your sales page and videos as you proceed further. Design the perfect outreach asset to grab your prospect's attention.",pagesLabel:"Sales Pages",createNewButtonText:"Create new",watchDemoLink:"Watch a quick video demo",recent:"Recent",name:"Name",clear:"Clear",filterBy:"Sort by",filterByPremission:"Filter by",allPages:"All Sales Pages",myPages:"My Sales Pages",sharedPages:"Shared Sales Pages",createNewLabel:"CREATE NEW",landingPageLabel:"SALES PAGE",whatIsLandingPage:"WHAT IS A SALES PAGE?",salesPageExp:"A sales page is a landing page where your viewers watch a video. You can customize the page with your branding, add CTAs, add a calendar link to book more meetings, add pre-recorded videos like customer testimonials, product demos, add collateral documents, and convey your business value. All you have to do is customize the page according to your needs and choose a relevant page for the videos you record. Let's deliver a world-class experience together to your contacts.",shareOptions:"Share options",visiblityType:"Visibility",users:"Users",everyoneAtOrg:"Everyone in the Organization",specificUser:"Specific user",onlyMe:"Only me",selectedUsersEmpty:"Please select atleast one user.",permissionType:"Permission",editPermission:"Edit",viewPermission:"View"},edit:{emptyStripContent:"Elements on this page can be edited. Click on a page element to edit it further.",previewPageLabel:"Preview page",undoLabel:"Undo",redoLabel:"Redo",changeImageLabel:"Change Image",sizeLabel:"Size",linkTextLabel:"Link text",linkUrlLabel:"Link URL",imageLinkUrlLabel:"Image Redirect URL",iconLinkUrlLabel:"Icon URL",buttonLinkUrlLabel:"Button URL",linkUrlErrorLabel:"Must begin with http:// or https:// or mailto or ${User.",LinkErrorLabel:"Must begin with http:// or https:// or ${User.",userMergeFieldInfo:"Merge field option here let's your team to use the same page with their links when they're sending videos. Your entered field values will be replaced based on your profile settings accordingly.",userMergeFieldClick:"Click here to change in your profile settings.",buttonTextLabel:"Button Text",buttonTypeLabel:"Button Type",textColorLabel:"Text Color",formBgText:"FORM BACKGROUND",formShadow:"SHADOW",editForm:"Edit Form",editFormTitle:"Please fill the form below",editFormSubTitle:"We promise to keep your details safe and confidential",mandatoryFields:"Mandatory fields",textFields:"Text fields",optionalFields:"Optional fields",submit:"Submit",cancel:"CANCEL",save:"SAVE",bgColorLabel:"Background Color",bgImageLabel:"Background Image",themeColorLabel:"Theme Color",addVideoLabel:"Add primary video",scaleLabel:"Scale",addVideosLabel:"Add Videos & Documents",urlPlaceholder:"Enter URL here",emailPlaceholder:"Enter email id here",callPlaceholder:"Enter contact number here",textPlaceholder:"Type here",addPrimaryVideoLabel:"Add Primary Video",changePrimaryVideoLabel:"Change primary video",changeSliderVideoLabel:"ADD SLIDER VIDEOS, LINKS & DOCUMENTS",scrollAcrossTo:"SCROLL ACROSS TO",accessMore:"ACCESS MORE",addMediaToSlider:"ADD OR EDIT MEDIA",addMediaCarouselTooltip:"You can add or edit proposals, help articles, presentations, videos, or other sales collaterals by choosing from our library or importing them directly from your local. You can choose to “Add via link” option to include Gdrive or Onedrive links.",contactNumberLabel:"Contact number",emailLabel:"Email Id",chatConfiguration:"Chat configuration",editConfiguration:"Edit configuration",formConfiguration:"Form configuration",chatUsedLabel:"Chat used",formUsedLabel:"Form used",defaultBtn:"Link",alignment1:"Center",alignment2:"Left",alignment3:"Right",alignment4:"Space Evenly",chatBtn:"Chat",emailBtn:"Email",callBtn:"Call",ctaFromBtn:"Form",meetingWithLabel:"Scheduling App",calendlyLabel:"Calendly",hubspotLabel:"Hubspot",mergeFieldLabel:"Personal link",personalEmailLabel:"Personal email",customEmailLabel:"Customize",personalPhoneNumLabel:"Personal number",customPhoneNumLabel:"Customize",meetingLinkLabel:"Meeting link here",videoReply:"Get Video Reply",meeting:"Schedule a meeting",buttonLabel:"Button",addButton:"ADD BUTTON",addCarousel:"ADD CAROUSEL",changeButtonTo:"Change button to:",alignment:"Alignment",configurationTitle3:"Intercom configuration",configurationTitle4:"Drift configuration",configurationTitle5:"FreshChat configuration",driftLink:"Drift Link",driftLinkSample:"#DriftLink",invalidDriftLink:"Invalid drift link.",linkType:"Link Type",personalLink:"Use personal link",enterNewLink:"Enter new link",imgPosition:"Image Position",imgPosStretch:"Stretch",resolutionText:"Recommended resolution - 1080 * 1250",imgPosFit:"Fit",imgOpacity:"Image Opacity",containerOpacity:"Container Transparency",editNameTo:"Edit name to",titleCantBeEmpty:"Title can’t be empty"},footer:{cancelLabel:"Cancel",saveLabel:"Save",nextLabel:"Next",backLabel:"Back",saveAndNextLabel:"Save and Next"},delivery:{privacyTitle:"Uh oh! You don’t have permission to view this page.",privacyDesc:"It appears that the page you’re looking for is private and you don’t have permission to access it. Please make sure you have the right permission to access this page.",mediaIsProcessing:"Media is being processed",pleaseEnterValidEmail:"Please enter valid email",videoSendBy:"You have received this video from ",noVideoPlaceholderMsgPrefix:"Oh no! No video to view.",noVideoPlaceholderMsgPostfix:"Reach out to "},templates:{customizeLabel:"Create Page",previewLabel:"Preview",selectALandingPageLabel:"Select a sales page template to proceed",back:"Back",tryForFree:"Try Now",footerText:"Liked the Greetings? Surprise Your Near & Dear Ones with Free Video Greetings",insuranceBanner:{title:"Want to bring the most value to your customer interactions?",p1:"Request your preferred template from our wide range and we will customize it specifically to suit your insurance needs.",p2:"Ready to guide buyer experience and convert prospects 3x times?",btnText:"Explore Templates"},template1:{infoTitle:"Mary Margaret | Head of Product",infoEmailLabel:"Email:",infoEmailtext:"mary@sailingteam.com",infoPhoneLabel:"Tel:",infoPhoneText:"7567576579",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",button2Text:"Request A Demo",button3Text:"Visit Website",carouselLabelText:"Enter your text here.",footerText:"Powered by Sailing Team"},template2:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",about:"About",company:"Company",careers:"Careers",service:"Service",contactUs:"Contact Us",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com"},templateNY:{mainTitle:"Holiday cheers for you!",SubTitle:"Sent with love from Sender name",wishBtnText:"wish back"},template15:{mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUsContent:"Powered by Sailing Team"},template14:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",company:"Company",careers:"Careers",contactUs:"Contact Us",home:"Home",contact:"Contact",help:"Help",resources:"Resources",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com",darkTheme:"Dark Theme",lightTheme:"Light Theme",proceed:"Proceed",cancel:"Cancel",selectCategory:"Select Category",playVideo:"Play Video",noVideosFound:"No Videos Found",addVideoCategory:"Add Video Category",loadMore:"SEE MORE"},template4:{linkText:"Go to company website",mainTitle:"The Ultimate Guide to Improve Your Business Performance",mainDesc:"Create a video strategy to gain more leads and sales for your business. Join 50,000+ companies who are closing more deals with a simple video solution.",videoDesc:"Video desc goes here",button1Text:"Sign Up",carouselLabelText:"Enter your text here.",aboutUs:"About us",aboutUsContent:"Powered by Sailing Team",links:"Links",company:"Company",careers:"Careers",contactUs:"Contact Us",home:"Home",contact:"Contact",help:"Help",resources:"Resources",phone:"Phone: +91 987654321",email:"Email: sample@samplecompany.com",darkTheme:"Dark Theme",lightTheme:"Light Theme",proceed:"Proceed",cancel:"Cancel",selectCategory:"Select Category",playVideo:"Play Video",noVideosFound:"No Videos Found",addVideoCategory:"Add Video Category",loadMore:"SEE MORE"},template9:{mainTitle:"Happy Thanksgiving Day",subTitle:"Holiday cheers for you",wishBack:"Wish Back"},template16:{mainTitle:"Wishing you a Merry Christmas!",mainDesc:"'Tis the season to wish one another joy and love and peace. Merry Christmas!"},template18:{mainTitle:"Merry Christmas",mainDesc:"We hope your holidays will be filled with joy and laughter through the New Year!",subTitle:"Lorem Ipsum has been the industry's standard dummy",wishBack:"Wish Back"},template19:{mainTitle:"Happy Holidays and all the best to you in the year to come",mainDesc:"We hope your holidays will be filled with joy and laughter through the New Year. Merry Christmas!"},template20:{mainTitle:"Merry Christmas",subTitle:"Warmest wishes for a happy holiday season",wishBack:"Wish Back"},template21:{mainTitle:"Warmest wishes for a happy holiday season",mainDesc:"Wishing you a blissful holiday season. Merry Christmas!",buttonText:"Sign Up for free"},template28:{clientLogo:"CLIENT LOGO",addLogo:"ADD LOGO",contactDetails:"For more details contact",sampleName:"John doe",sampleDesignation:"Sales Manager",samplePhoneNum:"Phone number - 9789834904",sampleEmail:"Email - sampleemail@email.com",formTitle:"Please fill the form below",formSubTitle:"We promise to keep your details safe and confidential",firstName:"First Name",lastName:"Last Name",message:"Message",emailId:"Email ID",phoneNumber:"Phone Number",companyName:"Company Name",submit:"Submit",submittedSuccessfully:"Submitted successfully",editFormProps:"EDIT FORM PROPERTIES",sampleFooter:"© Hippo Video - all rights reserved",mainTitle:"Supercharge your pipeline with potential leads",mainDesc:"It’s simple! Sales conversions are bound to happen when you convey meaningful messages through powerful videos on Hippo Video’s innovative sales pages."},template200:{heroTitleL1:"Carry unlimited baggage",heroTitleL2:"to exotic locations.",heroSubTitleL1:"But never carry any",heroSubTitleL2:"emotional baggage.",ctaTitleL1:"Insure instantly.",ctaTitleL2:"Travel happily.",ctaSubTitle:"ABC Airlines, in association with XYZ Insurance presents a wide range of down-to-earth travel insurance plans that'll make you feel at home whichever part of the world you fly to. Whether you're a solo traveler or group traveler, there's a plan for you. Talk to us and you'll feel light.",about:"About",theTeam:"The Team",contactUs:"Contact Us",getApp:"Get the app",android:"Android",ios:"iOS",followUs:"Follow Us",twitter:"Twitter",facebook:"Facebook",company:"Company",tou:"Terms of use",privacy:"Privacy"},template202:{clientLogo:"CLIENT LOGO",heroTitleL1:"Supercharge your pipeline with potential leads",heroTitleL2:"It's simple! Sales conversions are bound to happen when you convey meaningful messages through powerful videos on Hippo Video's innovative sales pages.",ctaTitleL1:"Hello ${First Name},",ctaTitleL2:"Feed your pipeline with potential leads, get 3x responses, and accelerate your sales cycle upto 40% faster with powerful videos perceptively embedded on a landing page - we simply call it a sales page as it has got all the ingredients to boost your conversions.",carouselHeading:"A few more information exclusive for you",previous:"Previous",next:"Next",allRights:"Hippo Video - All rights reserved"},category:"Category",all:"All"},settings:{nameYourHub:"Sales page name",pageNamePlaceHolder:"Name your personalized sales page",pageURL:"Page URL",subdomainURL:"Subdomain",customDomain:"Custom Domain",addSubdomain:"Add Subdomain",fallbackURL:"Fallback URL",fallbackURLText:"www.sailingteam.com",privacy:"Privacy",thumbnail:"Thumbnail",favIconAndTitle:"Fav Icon",https:"https://",hippovideoio:".hippovideo.io",configureCustomDomain:"Edit your subdomain",addCustomDomain:"Add your subdomain",pagePrefix:"/page/",customDomainHelpTxt:"<subdomain>.hippovideo.io",anyoneWithLink:"Anyone with the link",onlyMe:"Only me",change:"Change",cancel:"Cancel",save:"Save",changeThumbnail:"Change",removeThumbnail:"Remove",urlPathDesc:"Page URL is the extension of your sales page URL. You can use this URL to access your page. Create a unique URL to differentiate your sales pages.",fallbackURLDesc:"Fallback URL helps in the event of any errors. If a user is unable to open or access your sales page, the user is automatically redirected to the Fallback URL.",privacyDesc:"Allow anyone with the link to access your sales page. You can choose to keep your sales page private.",thumbnailDesc:"Set a thumbnail to generate a miniature preview of your sales pages wherever you share.",favIconDesc:"Add icon and name to display on the browsers’ tab.",giveSubdomain:"Please enter a valid subdomain.",customDomainRestrictionMsg:"To set up Custom Domain, you need to configure your domain with a unique DNS record provided by HippoVideo. Please enter your Video Portal URL and submit your request below. The certificate typically takes 15-20 days.",customDomainPlaceholder:"video.yourcompanyname.com",urlChangeWarningTitle:"Url Edit Alert",urlChangeWarning:"Changing your page URL will affect this page. If you've shared this page before, it won't work once you take this action.",salesPrivacySettingAlert:"Sales Page Privacy Settings Alert",salesPrivacySettingDescForAll:"Any new sales page created will be shared by default with everyone in the organization. Change visibility to make it private or share with specific users.",salesPrivacySettingDescForOnlyMe:"Any new sales page created will be private by default. Change visibility to share with specific users.or everyone in the organization"},view:{copyLink:"Copy Link",copyLinkWithThumbnail:"Copy With Thumbnail",copyLinkHubspot:"Copy Link for HubSpot",copyLinkOutlook:"Copy Link for Outlook",previewPage:"Preview page",editPage:"Edit page",saving:"Saving",copiedText:"Copied !",uCanShareNow:"Your page URL is copied to clipboard. You can share now",deleteConfirmMsg:"Are you sure you want to delete ",deleteConfirmNote:"P.S. Please note that videos shared along with this sales page, links and documents inside the page will no longer be accessible by your recipients. Corresponding reports, if any will be deleted.",cloneConfirmMsg:"Are you sure you want to clone the page?",setDefaultConfirmMsg:"Do you want to set this page as default?",editConfirmMsg:"Changes made to sales pages will affect the existing reports.<br>Tip: Please duplicate the sales page before editing.",deleteIntegConfirmMsg:"Are you sure you want to delete the integration?",disableIntegConfirmMsg:"Are you sure you want to disable the integration?",enableIntegConfirmMsg:"Are you sure you want to enable the integration?",shareWarning:"This page cannot be shared due to privacy settings.",clone:"Clone",delete:"Delete",edit:"Edit",share:"Share",setAccess:"Set Access",reports:"Reports",noReports:"The reports won't be available for Video Channels and Video Avenue templates.",draftReports:"Reports will not be available for draft sales pages.",upgradeReports:"Upgrade your account",viewReport:"View Report",settings:"Settings",more:"More",disable:"Disable",enable:"Enable",mergeFieldValues:"Add details of your contacts here. Copy and send the unique page link to track.",mergeFieldValuesPop:"Enter contact’s merge field values",ok:"Add",addVideoReplyConfirm:"Are you sure you want to add this reply to library ?",deleteVideoConfirm:"Are you sure you want to delete this video ?",setDefaultLandingPage:"Set Default",defaultLandingPage:"Default",people:"People",contacts:"Contacts",users:"Users",videos:"Videos",insertMf:"Insert Merge Field",userMfFooter:"Use Merge Fields under the “Users” tab for personalizing your account user’s details.",peopleMfFooter:"Use Merge Fields under the “Contacts” tab for personalizing your recipient’s details.",videoMfFooter:"Use Merge Fields under the “Videos” tab for personalizing your video’s details.",noVideoPlaceholderMsg:"What’s a sales page without a video? Add one now!",sidebar:{sendCampaign:"Send the personalized sales page to your prospects via email",publishPage:"Publish",share:"Share",privacy:"Privacy",embed:"Embed",campaigns:"Campaigns",campaignLink:"Campaign Link",sendMail:"Send Mail",integrate:"Integrate",reports:"Reports",settings:"Settings",changePrivacy:"Change Privacy",configureSlackMsg:"Configure account and start posting to Slack",postToSlackMsg:"Post pages to your Slack channel from here",addAccount:"Add Account",emailTitle:"Email",emailTo:"To",subject:"Subject",content:"Content",mailSuccess:"Mail triggered successfully",cancel:"Cancel",send:"Send",confirmAccount:"Confirm Account",confirmSharePage:"Please confirm your account inorder to share this page.",toPlaceholder:"Enter email id",subjectPlaceholder:"Enter the email subject",contentPlaceholder:"Type in something...",privacyHeading:"Select an option below on who can see this page",onlyMe:"Only me",anyOneWithLink:"Anyone with the link",inlineEmbed:"Inline Embed",inlineEmbedDesc:"Embed this code on a webpage to play the video inline.",popOverEmbed:"Popover Embed",popOverEmbedDesc:"Embed this code on a webpage to play the video in a pop-up.",oembed:"Use oEmbed URL",embedSeo:"Push video metadata to the page for all search engines to index.",embedSeoTip:"Add a video title, description, and subtitles for better indexing by search engines.",usingWordPress:"Using Wordpress?",proTip:"Pro Tip:",checkoutHelpPage:"Check out our Help page",emailEmbed:"Email Embed",emailEmbedDesc:"Embed this code in your email HTML editor to generate the video thumbnail.",emailCampaignLinkDesc:"Copy and paste the code in your email/campaign template to send personalized videos and thumbnail",emailProvider:"Email Marketing Software",thumbnailSize:"Thumbnail Size",responsive:"Responsive",centerAlign:"Center Align",editCopyLinkMf:"If you’ve added any custom fields in your email marketing software, please copy and paste the same custom field inside the box given below to replace the merge fields inside the code.",editCopyLinkMfErr:"* Merge Fields can't be empty",emailMergeTag:"Email Merge Tag",copyCode:"Copy Code",preview:"Preview",emailCampaignLink:"Send a Personalized Page Campaign",sendVideoEmail:"Send Your Personalized Sales Page via Email",pixelId:"Pixel Id",trackingId:"Tracking Id",trackingCode:"Tracking Code",pixelContent:"Track your sales page conversions from Facebook ads. Optimize your ads based on our reports for future ads.",addEvents:"Add Events",eventsHelp:"Add multiple events relevant to your video category.",trackFromHelp:"Start tracking your video from a defined start time.",trackFrom:"Track from",save:"Save",GAContent:"Track your personalized sales page performance. Get page views, average time on page, bounce rate to measure ROI by integrating with GA.",videoSettings:"Video Page Settings",googleAnalytics:"Google Analytics",hubspot:"HubSpot",hubspotContent:"Automatically personalize your sales page with HubSpot and track the page right inside your HubSpot dashboard.",fbPixel:"Facebook Pixel",intercom:"Intercom",appId:"App Id",intercomContent:"Initiate a conversation through intercom chat in your personalized sales page.",integTagsPlaceholder:"Click to select or add tags",position:"Position",left:"Left",right:"Right",bottom:"Bottom",top:"Top",none:"None",default:"Default",horizontalPadding:"Horizontal Padding",verticalPadding:"Vertical Padding",px:"px",drift:"Drift",driftContent:"Be present on your personalized sales page with the Drift chat widget.",copyIntercomCodeDesc:"Intercom Settings -> Installation -> Copy App-Id.",copyDriftCodeDesc:"Drift Settings -> Drift Widget -> Install -> Javascript -> Copy Drift Id from code.",freshChat:"FreshChat",chatToken:"Visitor Widget Token",chatHost:"Chat Host",freshChatContent:"Be present on your personalized sales page with the FreshChat widget.",copyFreshChatCodeDesc:"Setting -> Web Messenger -> Getting Started -> Copy Visitor Widget Token",copyFreshChatHostDesc:"Setting -> Web Messenger -> Getting Started -> Copy Host",videoReply:"Video Replies",receivedOn:"Received on",imageUrl:"Image URL",linkUrl:"Link URL",pardot:"Pardot",luckyOrange:"Lucky Orange",luckyOrangeContent:"Track on individual prospect activities and organize filtered and custom-made follow-ups with real-time dashboard analytics and visitor maps.",copyCodeWithThumbnail:"Copy Code With Thumbnail",campaignLinkInfo:"Video thumbnail will not be generated on pasting this code in your platform. However, the receiver will be able to view the video thumbail and play the video."}},videoReply:{title:"Video Reply",capTitle:"VIDEO REPLY",startRecording:"Start Recording",finishRecording:"Stop Recording",videoBeingUploaded:"Your video is being uploaded. Please wait until it is completed.",nameLabel:"Name :",emailLabel:"Email :",dateLabel:"Date :",messageLabel:"Message :",firstNamePlaceholder:"Your Name *",emailPlaceholder:"Your Email Id *",messagePlaceholder:"Message",allowPermissionDesc:"Please provide permission to record video and audio",allowPermission:"Allow Permission",retakeConfirmationDesc:"The video which you have recorded will be lost forever. Are you sure you want to delete & retake the video?",cancel:"Cancel",proceed:"Proceed",save:"Save",sendReply:"Send",recordVideoMsgFor:"Reply with video",copiedToClipboard:"Video link copied to clipboard successfully.",userNameCannotBeEmpty:"User name cannot be empty.",userEmailCannotBeEmpty:"Email cannot be empty.",userMsgCannotBeEmpty:"Message cannot be empty.",addToLibrary:"Add to library",deleteVideo:"Delete video",invalidEmail:"Invalid Email",sendSuccessfully:"Well done, Video recording sent.",emptyContent:"We know you're expecting a reply, but currently there are none.",videoUploading:"Uploading",videoUploadInProgress:"Upload in progress. please wait"},poweredByFooter:{poweredByText:"Powered By",poweredBySignupTextForIndividual:"Loved it? Create and send mesmerizing videos on your own.",poweredBySignupTextForBusiness:"Loved it? Create and send mesmerizing videos on your own.",signUp:"Sign Up",getFreeAccountForLife:"Get Free Account For Life",signUpForFree:"Sign Up for Free"},reports:{downloadReport:"Download Report",exitReport:"Exit Report",templateReports:"Overall Report",viewClicksPlaceholder:"Performance Report",noReports:"No reports",overallEmptyDesc:"Oops! No reports to show. This sales page hasn't been shared or viewed yet.",dashboardHeading:"Track key performance indicators of a shared sales page",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",totalPageViews:"Total Page Views",totalViewsDesc:"Total number of times the page has been viewed.",uniquePageViews:"Unique Page Views",uniqueViewsDesc:"The number of times unique viewers have viewed the page.",averageTimeSpent:"Average page time",averageTimeSpentDesc:"The average amount of time spent on the sales page.",bounceRate:"Bounce Rate",bounceRateDesc:"Rate of unique viewers who landed on the sales page and left without any interaction.",totalCTAClicked:"Total CTA Clicked",totalCTAClickedDesc:"Total number of times all the CTAs in the sales page have been clicked.",totalVideoReplies:"Total Video Replies",totalVideoRepliesDesc:"Total number of video replies submitted.",avgPlayPercentage:"Average Video Viewed Percentage",avgPlayPercentageDesc:"The average duration of time spent on watching the video.",documentViews:"Total Document Views",documentViewsDesc:"Total number of times all documents have been viewed.",overallEngagementReports:"Overall Sales Page Engagement Report",engagementReportEmptyDesc:"Seems like your users haven’t engaged with any of the videos.",userLabel:"User:",singleEngagementReportsDesc:"Here, you can track how the sales page has performed for each member of your team.",totalPageLoads:"Unique Page Loads ",totalPageLoadsTooltip:"The number of times unique viewers have viewed the page.",engagementRate:"Engagement Rate ",engagementRateTooltip:"Rate of unique viewers who landed on the sales page and interacted with its content.",usersLabel:"Users",ctaClicks:"CTA CLICKS",ctaClicksEmptyDesc:"Hang Tight! Your viewers haven’t interacted with any CTAs yet.",ctaClicksTooltip:"Total number of CTAs clicked inside the page (FB links, buttons, and other links).",loadingDesc:"Please wait... All good things take time.",totalPageClicks:"Total page clicks",noOfClicks:"Number of clicks:",link:", Link:",numberOfClicks:"Number of clicks:",viewReplies:"Show Replies",showViewers:"Show Viewers",showClicks:"Show Clicks",noViewsWarning:"Sorry, there are no views to show.",noClicksWarning:"Sorry, there are no clicks to show",noRepliessWarning:"Sorry, there are no replies to show",noReportsToDownload:"Sorry! there are no reports to download"}},init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t,i){var n=i(547);e.exports=function(e,t){return n(e,t)}},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(141),i(678),i(48),i(12)],void 0===(r=function(e,t,i,n,r,o,a){"use strict";return a=a.default,{UPLOAD_REQUEST:0,PREVIEW_REQUEST:1,RENDER_REQUEST:2,MERGE_RENDER_REQUEST:3,COMPRESS_REQUEST:4,CONVERT_REQUEST:5,GIF_REQUEST:6,STREAMING_REQUEST:7,PERSONALIZATION_REQUEST:8,GENERATE_ANIMATED_PREVIEW_REQUEST:9,VIRTUAL_BG_OPERATION:20,initialize:function(t,i,s){return{interval:null==t?3e3:t,pollTimeout:(new Date).getTime()/1e3+(null==i?7200:i),latestWindow:[],init:function(){this.operationIdArray=[],this.assetId=void 0,this.expectedOperationType=void 0,this.operationId=void 0,this.pollErrorCount=0,this.timeRemaining=void 0,this.pollingAction,this.clientLogSent=!1},getStatus:function(e,t,i,n,r){this.init(),e&&e.constructor===Array?(this.operationIdArray=e,this.operationId=this.operationIdArray.pop()):this.operationId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.ping()},getAssetStatus:function(e,t,i,n,r,o,a){this.init(),this.assetId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.expectedOperationType=o,this.forExtnVBG=a,this.ping()},ping:function(){if("stop"!==this.pollingAction)if((new Date).getTime()/1e3>this.pollTimeout)this.errorHandler&&this.errorHandler(n.pingTooLong);else if(null!=this.operationId||null!=this.assetId){var t=this;r.statusOf(s,this.operationId,this.assetId,this.expectedOperationType,(function(e){if(e){if(null===e||"null"===e||""===JSON.stringify(e).trim())return setTimeout((function(){t.ping()}),t.interval),void a.postErrorsToLog({stackTrace:"Null value returned for statuspoller ",assetId:t.assetId,operationId:t.operationId});if(void 0===e.status&&e.operation_id)setTimeout((function(){t.ping()}),t.interval);else{if("error"==e.status)t.pollErrorCount++,t.pollErrorCount<=4&&setTimeout((function(){t.ping()}),t.interval),console.log("error!!!");else if(50==e.status)t.waitingHandler&&t.waitingHandler(e.data.text),setTimeout((function(){t.ping()}),t.interval);else if(51==e.status||52==e.status){if(e.data.progress>=0&&e.data.progress<=100&&(t.latestWindow.push(e.data),t.latestWindow.length>3&&t.latestWindow.splice(0,t.latestWindow.length-3)),t.latestWindow.length>1){var i=t.latestWindow[t.latestWindow.length-1].progress-t.latestWindow[0].progress,r=t.latestWindow[t.latestWindow.length-1].ts-t.latestWindow[0].ts;i>0&&r>0&&(t.timeRemaining=Math.round(r*(100-t.latestWindow[t.latestWindow.length-1].progress)/i))}t.progressHandler&&t.progressHandler(e.data.text,e.data.progress,t.timeRemaining),setTimeout((function(){t.ping()}),t.interval)}if(("error"==e.status&&t.pollErrorCount>4||54==e.status)&&t.errorHandler){var o=n.somethingWentWrong;null!=e.data&&null!=e.data.text&&(o=e.data.text);var s={reason:o,state:e.data.state};t.errorHandler(s)}53==e.status&&(null!=t.expectedOperationType&&e.operationtype!=t.expectedOperationType?(e.data.text=n.processPending,t.progressHandler(e.data.text,e.data.progress,t.timeRemaining,e.operationtype,e.status),setTimeout((function(){t.ping()}),t.interval)):t.operationIdArray&&t.operationIdArray.length>0?(t.operationId=t.operationIdArray.pop(),t.ping()):t.completeHandler&&t.completeHandler(e))}}else setTimeout((function(){t.ping()}),t.interval)}),(function(i){if(setTimeout((function(){t.ping()}),t.interval),!t.clientLogSent){var n=new o({digest:e("#digest").val()}),r={authoringAssetId:t.assetId,description:"STATUS_POLLER_ERROR",stackTrace:"Error while connecting server status from server. assetId-"+t.assetId+" status-"+i.status};n.logClientData([r],!1,(function(){}),(function(){})),t.clientLogSent=!0}}),this.forExtnVBG)}},stop:function(){this.pollingAction="stop"}}}}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return w}));i(77);var n=i(1),r=i.n(n),o=i(36),a=i.n(o),s=i(37),l=i.n(s),u=i(49),c=i.n(u),d=i(54),h=i.n(d),p=i(41),f=i.n(p),g=(i(136),i(24),i(35)),m=i.n(g),v=i(394),y=i.n(v);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=f()(e);if(t){var r=f()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return h()(this,i)}}var w=function(t){c()(n,t);var i=b(n);function n(){return a()(this,n),i.apply(this,arguments)}return l()(n,[{key:"initialize",value:function(t){this.id=t.id,this.showAsModal=t.showAsModal,this.isVirtualBg=t.isVirtualBg,this.$el=e("#".concat(this.id))}},{key:"render",value:function(){var t=this,i=!0;"true"==e("#isTestimonial").val()&&(i=!1),y()({showAsModal:this.showAsModal,showHippoIcon:i,isVirtualBg:this.isVirtualBg},function(i,n){r()(this,t),this.$el.empty().append(e(n)),this.$el.find("#progressBackdrop").show(),this.$el.removeClass("hide")}.bind(this))}},{key:"remove",value:function(){var e=this;setTimeout(function(){r()(this,e),this.$el.empty().addClass("hide")}.bind(this),800)}},{key:"updateValues",value:function(e,t){this.updateProgress(e),this.updateProgressText(t)}},{key:"updateProgress",value:function(e){var t=0===e?0:20;this.$el.find("#progressFillStrip").animate({width:"".concat(e,"%")},t)}},{key:"updateProgressText",value:function(e){this.$el.find("#progressText").text(e)}}]),n}(m.a.View)}).call(this,i(2))},function(e,t,i){"use strict";i.d(t,"a",(function(){return as})),i.d(t,"b",(function(){return ss}));i(220),i(46),i(24),i(66),i(93);var n=i(1),r=i.n(n),o=i(0),a=i.n(o);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}function u(e,t){if(null==e)return{};var i,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)i=o[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}var c=i(57),d=i.n(c),h=!1,p=a.a.createContext(null),f="entering",g="entered",m=function(e){function t(t,i){var n;n=e.call(this,t,i)||this;var r,o=i&&!i.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(r="exited",n.appearStatus=f):r=g:r=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",n.state={status:r},n.nextCallback=null,n}l(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var i=t.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var i=this.state.status;this.props.in?i!==f&&i!==g&&(t=f):i!==f&&i!==g||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,i,n=this.props.timeout;return e=t=i=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,i=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:i}},i.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===f?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e){var t=this,i=this.props.enter,n=this.context?this.context.isMounting:e,r=this.props.nodeRef?[n]:[d.a.findDOMNode(this),n],o=r[0],a=r[1],s=this.getTimeouts(),l=n?s.appear:s.enter;!e&&!i||h?this.safeSetState({status:g},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:f},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:g},(function(){t.props.onEntered(o,a)}))}))})))},i.performExit=function(){var e=this,t=this.props.exit,i=this.getTimeouts(),n=this.props.nodeRef?void 0:d.a.findDOMNode(this);t&&!h?(this.props.onExit(n),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(n),e.onTransitionEnd(i.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(n)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(n)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var i=this.props.nodeRef?this.props.nodeRef.current:d.a.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(i&&!n){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],o=r[0],a=r[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,i=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,u(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(p.Provider,{value:null},"function"==typeof i?i(e,n):a.a.cloneElement(a.a.Children.only(i),n))},t}(a.a.Component);function v(){}m.contextType=p,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},m.UNMOUNTED="unmounted",m.EXITED="exited",m.ENTERING=f,m.ENTERED=g,m.EXITING="exiting";var y,b,w=m;var E="out-in",_="in-out",S=function(e,t,i){return function(){var n;e.props[t]&&(n=e.props)[t].apply(n,arguments),i()}},T=((y={})[E]=function(e){var t=e.current,i=e.changeState;return a.a.cloneElement(t,{in:!1,onExited:S(t,"onExited",(function(){i(f,null)}))})},y[_]=function(e){var t=e.current,i=e.changeState,n=e.children;return[t,a.a.cloneElement(n,{in:!0,onEntered:S(n,"onEntered",(function(){i(f)}))})]},y),C=((b={})[E]=function(e){var t=e.children,i=e.changeState;return a.a.cloneElement(t,{in:!0,onEntered:S(t,"onEntered",(function(){i(g,a.a.cloneElement(t,{in:!0}))}))})},b[_]=function(e){var t=e.current,i=e.children,n=e.changeState;return[a.a.cloneElement(t,{in:!1,onExited:S(t,"onExited",(function(){n(g,a.a.cloneElement(i,{in:!0}))}))}),a.a.cloneElement(i,{in:!0})]},b),k=function(e){function t(){for(var t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).state={status:g,current:null},t.appeared=!1,t.changeState=function(e,i){void 0===i&&(i=t.state.current),t.setState({status:e,current:i})},t}l(t,e);var i=t.prototype;return i.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===f&&e.mode===_?{status:f}:!t.current||(i=t.current,n=e.children,i===n||a.a.isValidElement(i)&&a.a.isValidElement(n)&&null!=i.key&&i.key===n.key)?{current:a.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var i,n},i.render=function(){var e,t=this.props,i=t.children,n=t.mode,r=this.state,o=r.status,s=r.current,l={children:i,current:s,changeState:this.changeState,status:o};switch(o){case f:e=C[n](l);break;case"exiting":e=T[n](l);break;case g:e=s}return a.a.createElement(p.Provider,{value:{isMounting:!this.appeared}},e)},t}(a.a.Component);k.propTypes={},k.defaultProps={mode:E};var x=k;function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function P(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var I=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return n=t,void((i=e).classList?i.classList.remove(n):"string"==typeof i.className?i.className=P(i.className,n):i.setAttribute("class",P(i.className&&i.className.baseVal||"",n)));var i,n}))},R=function(e){function t(){for(var t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1];t.removeClasses(r,"exit"),t.addClass(r,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,i)},t.onEntering=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1]?"appear":"enter";t.addClass(r,o,"active"),t.props.onEntering&&t.props.onEntering(e,i)},t.onEntered=function(e,i){var n=t.resolveArguments(e,i),r=n[0],o=n[1]?"appear":"enter";t.removeClasses(r,o),t.addClass(r,o,"done"),t.props.onEntered&&t.props.onEntered(e,i)},t.onExit=function(e){var i=t.resolveArguments(e)[0];t.removeClasses(i,"appear"),t.removeClasses(i,"enter"),t.addClass(i,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var i=t.resolveArguments(e)[0];t.addClass(i,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var i=t.resolveArguments(e)[0];t.removeClasses(i,"exit"),t.addClass(i,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,i){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,i]},t.getClassNames=function(e){var i=t.props.classNames,n="string"==typeof i,r=n?""+(n&&i?i+"-":"")+e:i[e];return{baseClassName:r,activeClassName:n?r+"-active":i[e+"Active"],doneClassName:n?r+"-done":i[e+"Done"]}},t}l(t,e);var i=t.prototype;return i.addClass=function(e,t,i){var n=this.getClassNames(t)[i+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===i&&r&&(n+=" "+r),"active"===i&&e&&e.scrollTop,n&&(this.appliedClasses[t][i]=n,function(e,t){e&&t&&t.split(" ").forEach((function(t){return n=t,void((i=e).classList?i.classList.add(n):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(e,n))},i.removeClasses=function(e,t){var i=this.appliedClasses[t],n=i.base,r=i.active,o=i.done;this.appliedClasses[t]={},n&&I(e,n),r&&I(e,r),o&&I(e,o)},i.render=function(){var e=this.props,t=(e.classNames,u(e,["classNames"]));return a.a.createElement(w,A({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(a.a.Component);R.defaultProps={classNames:""},R.propTypes={};var D=R,O=i(3),N=(i(434),i(9)),L=i(38),M={PRE_RECORD:1,RECORD:2,POST_RECORD:3,UPLOAD_STATUS:4,IMPORT_VIDEO:5,ERROR:6},F=1,U=i(26);function B({tokenType:e,integrationType:t,userId:i}){let n=`${(new Date).getTime()}$$${e}$$${t}`;return i&&(n+="$$"+i),btoa(n)}var V=i(21),z=i.n(V),H=i(87),j=i.n(H),G=i(361),q=i.n(G),W=i(247),$=i.n(W);const Y="INFO",K="ERROR",J="DEBUG",X="WARN";var Q=i(5);const{MESSAGE:Z,LOG_SOURCE:ee,APP_NAME:te,INITIATOR:ie,LOG_TYPE:ne,REQUEST_PATH:re,DATE_TIME:oe,REQUEST_BROWSER:ae,USER_ID:se,LOG_UID:le,INTEGRATION_TYPE:ue,ASSET_ID:ce}={APP_NAME:"app_name",TENANT_ID:"tenant_id",API_TOTAL_TIME:"api_total_time",VIEW_TIME:"view_time",REQUEST_TIME:"req_time",METHOD_NAME:"method_name",LINE_NUMBER:"line_num",LOG_LEVEL:"log_level",DATE_TIME:"datetime",USER_ID:"user_id",REQUEST_ID:"request_id",REQUEST_PATH:"req_path",REQUEST_METHOD:"req_method",REQUEST_METHOD_NAME:"req_action",REQUEST_QUERY_PARAMS:"req_query_params",REQUEST_PARAMETERS:"req_params",REQUEST_PATH_PARAMETERS:"req_path_params",REQUEST_REFERER:"req_referer",IS_REQUEST:"is_req",MESSAGE:"msg",REQUEST_IP:"request_ip",LOG_SOURCE:"log_source",ERROR_TRACE:"error_trace",LOG_TYPE:"log_type",EVENT_NAME:"event_name",METRIC_NAME:"metric_name",METRIC_TYPE:"metric_Type",METRIC_VALUE:"metric_value",ASSET_ID:"asset_id",REQUEST_BROWSER:"browser",INITIATOR:"initiator",RECORD_ID:"record_id",ENCRYPTED:"encrypted",FAILED_LOG_COUNT:"failed_log_count",LOG_UID:"log_uid",INTEGRATION_TYPE:"integration_type"};class de{constructor({module:e,integrationType:t=Q.q.PRODUCT,assetId:i,logUID:n,tokenType:r,token:o}){this.origin=window._HVDomain||"https://www.hippovideo.io",this.assetId=i||-1,this.logUID=n||B({integrationType:t,tokenType:r}),this.module=e,this.tokenType=r,this.token=o,this.integrationType=t,this.logBuffer=this._getLogsFromLocalStorage()}updateParams({assetId:e,logUID:t}){e&&(this.assetId=e),t&&(this.logUID=t)}log(e,t={}){const i={asset_id:this.assetId,logUID:this.logUID,module:this.module,...t};console.log(`[${J}] :: ${e} :: ${i}`)}info(e,t={}){this._logData(Y,e,t)}error(e,t={}){this._logData(K,e,t)}warn(e,t={}){this._logData(X,e,t)}_logData(e,t,i){i[Z]=t,i[ce]=this.assetId,i[ee]="HV_CLIENT",i[te]=this.module||"HV_CLIENT",i[ie]=this.initiator,i[ne]=e,i[re]=location?location.href:"Unable to locate request path",i[oe]=this._getZuluTimeInUTC(),i[ae]=navigator.userAgent&&navigator.userAgent.toString(),i[se]=this._getUserId(),this.logUID&&(i[le]=this.logUID),this.integrationType&&(i[ue]=this.integrationType),this._pushLogRecord(i),console.log(`[${e}] :: ${t} `,i)}_getUserId(){try{return window.HippoVideo&&HippoVideo.data.api.getProperty("userId")||this.userId}catch(e){}return null}_getZuluTimeInUTC(){return(new Date).toISOString().replace("T"," ").slice(0,23)}async _pushLogRecord(e,t){try{await this._getFederateTokenAndUpdateConfig();const i=this._constructLogRecord(e);this.firehose.putRecord(i,t||((e,t)=>{e&&(this._fallback([i]),console.error("COULD NOT PUSH LOG ",e))}))}catch(e){t&&t("exception: "+JSON.stringify(e))}}async _pushLogRecordInBatch(e,t){try{const i=e.map(e=>this._constructLogRecord(e));await this._getFederateTokenAndUpdateConfig();const n={Records:i,DeliveryStreamName:this.streamName};this.firehose.putRecordBatch(n,t||((e,t)=>{e&&(this._fallback(i),console.error("COULD NOT PUSH LOG ",e))}))}catch(e){t&&t("exception: "+JSON.stringify(e))}}_fallback(e){this.logBuffer=this.logBuffer.concat(...e),this._pushLogRecordInBatch(e,(e,t)=>{if(e){if(this.logBuffer.length>10){const e=this.logBuffer.map(e=>this._deconstructLogRecord(e));return this.logDataToServer({logIdentifierText:"Kinesis failed logs",data:e}),void this._clearLocalLogs()}this._addLogsToLocalStorage([...this.logBuffer])}})}_clearLocalLogs(){try{this.logBuffer=[],localStorage.removeItem("hv_failed_logs")}catch(e){}}_addLogsToLocalStorage(e){try{localStorage.setItem("hv_failed_logs",JSON.stringify(e))}catch(e){}}_getLogsFromLocalStorage(){try{const e=localStorage.getItem("hv_failed_logs");if(e)return JSON.parse(e)}catch(e){}return[]}_constructLogRecord(e){return{Record:{Data:"_"+this._getZuluTimeInUTC()+"_\t"+JSON.stringify(e)},DeliveryStreamName:this.streamName}}_deconstructLogRecord(e){try{const t=e.Record.Data.split("_\t");return{date:t[0],data:JSON.parse(t[1])}}catch(e){}return e}_setAWSCredentials(){const e=1e3*(window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.KinesisApiTimeout?Number(window.HippoVideo.AppRegistry.KinesisApiTimeout):10);this.streamName=this.cognitoConfig.stream_name;try{this.cognitoIdentityCredentials.clearCachedId()}catch(e){}this.cognitoIdentityCredentials=new j.a({IdentityId:this.cognitoConfig.identity_id,Logins:{"cognito-identity.amazonaws.com":this.cognitoConfig.token}},{region:"us-east-1",httpOptions:{timeout:e}});let t={region:"us-east-1",credentials:this.cognitoIdentityCredentials,httpOptions:{timeout:e}};this.firehose=new q.a(t)}async _sendRequest(e){try{return[await z()({method:"get",baseURL:this.origin,url:"/api/internal/log/identity",params:e,headers:{accept:"application/json"}}),null]}catch(e){return[null,e]}}_getFederateTokenAndUpdateConfig(e){return new Promise(async(t,i)=>{const n=()=>{this._setAWSCredentials(),e&&e(),t()};if(window.HippoVideo&&HippoVideo.isDelivery)HippoVideo.logCognito?(this.cognitoConfig=HippoVideo.logCognito,n()):i();else{const e=()=>{try{let e=this.cognitoConfigWithExpiry;if(!e){let t=localStorage.getItem("hv-logger-ftkn");if(!t)return null;e=JSON.parse(t)}return t(e.expiry)?(localStorage.removeItem("hv-logger-ftkn"),null):("string"==typeof e&&(e=JSON.parse(e)),JSON.parse(e.value))}catch(e){console.warn("Local storage permission error",e)}return null},t=e=>{const t=new Date,i=new Date(e);return t.getTime()>i.getTime()},r=e=>{try{this.cognitoConfigWithExpiry=JSON.stringify({value:JSON.stringify(e),expiry:new Date((new Date).getTime()+36e5)}),localStorage.setItem("hv-logger-ftkn",this.cognitoConfigWithExpiry)}catch(e){console.warn("Local storage permission error",e)}};this.cognitoConfig=e();let o=null;if(this.tokenType===Q.e.GUEST&&(o={token_type:this.tokenType,token:this.token}),this.cognitoConfig)n();else{const[e,t]=await this._sendRequest(o);if(e){const t=e.data;t&&t.status?(delete t.status,this.cognitoConfig=t,r(t),n()):i()}t&&i()}}})}logDataToServer({logIdentifierText:e,...t}){const i=$.a.initialize({digest:this.token,maxLogSize:1,verbose:!1});i.startSavingLogs(this.assetId,this.logUID);const n={asset_id:this.assetId,logUID:this.logUID,module:this.module,...t};i&&i.log(e,JSON.stringify(n)),i.stopSavingLogs()}}var he=i(250),pe=i(116),fe=i(251);class ge{constructor(e){const t=window._HVDomain||"https://www.hippovideo.io";this.token=e.token,this.tokenType=e.tokenType,this.email=e.email,this.cancelSources={create_recording:z.a.CancelToken.source(),import_video:z.a.CancelToken.source(),import_convert:z.a.CancelToken.source()};let i=pe.a;this.tokenType===Q.e.GUEST&&(i=he.a),this.tokenType===Q.e.VIDEO_PLAY_TOKEN&&(i=he.b);const n={baseURL:t+i,headers:{accept:"application/json"}};if(this.tokenType===Q.e.RECORDER_SDK_TOKEN){let e=`${this.tokenType}$$${this.token}`;n.headers.Authorization="Basic "+btoa(e)}if(this.tokenType===Q.e.AUTHENTICATION_TOKEN){let e=`${this.tokenType}$$${this.token}$$${this.email}`;n.headers.Authorization="Basic "+btoa(e)}this.axiosInstance=z.a.create(n)}_getRttValue(){try{return navigator.connection.rtt}catch(e){}return-1}createRecording({configuration:e,logUID:t}){let i={recording_configuration:JSON.stringify(e),logUID:t,rtt:this._getRttValue()},n={cancelToken:this.cancelSources.create_recording.token};return this.tokenType===Q.e.GUEST&&(i.token=this.token),this._sendRequest({url:"/record/new",method:"post",jsonData:i,additionalReqConfig:n})}cancelRequest({type:e}){e&&("create_recording"===e&&(this.cancelSources.create_recording.cancel(),this.cancelSources.create_recording=z.a.CancelToken.source()),"import_video"===e&&(this.cancelSources.import_video.cancel(),this.cancelSources.import_video=z.a.CancelToken.source()),"import_convert"===e&&(this.cancelSources.import_convert.cancel(),this.cancelSources.import_convert=z.a.CancelToken.source()))}convertVideo({assetId:e,videoId:t,compressionRequired:i,saveAsNew:n,token:r,convertSpeed:o}){let a={asset_id:e,video_id:t,compression_required:i,save_as_new:n};o&&(a.convert_speed=o),r&&(a.token=r);let s={cancelToken:this.cancelSources.import_convert.token};return this._sendRequest({url:"/convert",method:"post",formData:a,additionalReqConfig:s})}getImportedDetails({assetId:e}){let t="/import_details";return this.tokenType===Q.e.GUEST&&(t=`${t}/${this.token}`),this._sendRequest({url:t,method:"get",params:{asset_id:e}})}createVideoImport(e){let t={asset_id:e.assetId,file_name:e.fileName?e.fileName:"",description:e.description?e.description:"",size:e.size,tags:e.tags?e.tags:"",from_advanced_edit:e.fromAdvancedEdit,record_from_mobile:e.isMobile,contact_id:e.contactId,is_intro_outro_video:e.isIntroOutroVideo,logUID:e.logUID};e.token&&(t.token=e.token,t.referer=e.source),e.uniqueId&&(t.unique_id=e.uniqueId);let i={cancelToken:this.cancelSources.import_video.token};return this._sendRequest({url:"/import/new",method:"post",formData:t,additionalReqConfig:i})}mergeAndRender({assetId:e,projectJson:t,renderFrom:i}){const n=fe.a.serializeProjectJSON(JSON.parse(JSON.stringify(t)));let r={asset_id:e,data:JSON.stringify(n),render_from:i};const o=fe.a.getAuthDataInDom();for(const e in o)r[e]=o[e];return"video_token"===this.tokenType&&(r.token=this.token),this._sendRequest({url:"/render_video",method:"post",formData:r})}completeUpload({assetId:e,webcamId:t,screenId:i,recordingConfiguration:n,token:r}){let o={recording_configuration:n,asset_id:e};return t&&(o.webcam_id=t),i&&(o.screen_id=i),r&&(o.token=r),this._sendRequest({url:"/compress",method:"post",jsonData:o})}setRecordError({errorState:e,logUID:t}){const i={error_state:e,uid:t};return this.tokenType===Q.e.GUEST&&(i.token=this.token),this._sendRequest({url:"/set_record_error",method:"post",jsonData:i})}getFederatedAwsToken({region:e}){const t={region:e};return this._sendRequest({url:"/federated_aws_token",method:"get",params:t})}async _sendRequest({method:e="get",url:t,jsonData:i=null,formData:n=null,params:r={},headers:o={},additionalReqConfig:a={}}){try{let s=n;if(n){if("object"==typeof n&&null!==n){let e=new FormData;for(const t in n)e.append(t,n[t]);s=e}o["Content-Type"]="application/x-www-form-urlencoded"}i&&(o["Content-Type"]="application/json");const l={url:t,method:e,data:i||s,headers:o,params:r,...a};return[await this.axiosInstance.request(l),null]}catch(e){if(z.a.isCancel(e)){return[null,{message:e.message,is_cancelled:!0}]}return[null,e]}}}var me=i(2),ve=i.n(me),ye=i(248),be=i.n(ye),we=i(14),Ee=i.n(we);i(48);const _e=()=>window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.isStageEnvironment||window.location.hostname.endsWith(".hippowiz.com")||window.location.hostname.endsWith(".hippovideo.us")?"stage":-1!==window.location.href.indexOf("localhost")||-1!==window.location.host.indexOf("127.0.0.1")?"local":"production";class Se{constructor(e){console.log("DATA TO THE UPLOADER >>> ",e);const t=e.bucket,i=e.key,n=e.acl;this.recorderModel=e.recorderModel,this.assetId=e.asset_id,this.digest=e.digest,this.IDENTITY_POOL_ID="local"==_e()?"us-east-1:8e44cb6f-5bb6-47a0-b6f7-e682b1827dc4":"us-east-1:df0a8fb6-f7ad-417c-be80-cdba8aa4a215",this.region="us-east-1",t&&-1!==t.indexOf("-in")&&(this.IDENTITY_POOL_ID="local"==_e()?"ap-south-1:3b87476b-e4de-43e1-85e9-9f24f060b566":"ap-south-1:b4a79053-b71d-4a2e-851b-c1a3fc4a403f",this.region="ap-south-1"),this.userUploadBucket=t,this.userUploadKey=i,this.initialized=!1,this.acl=n,this.userUploadId=void 0;let r="true"==(ve()("#isFreePlan").val()||"");this.useAccelerate=e.useAccelerate||!r,this.finishedBlobUpload=!1,this.uploadQueue=[],this.uploadStatsData={},this.uploadError=!1,this.MAX_UPLOAD_TRIES=5,this.uploadPartHandlers=[],this.isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}startMultiartUpload(){let e=this;return new Promise((t,i)=>{this.updateCredentials().then(()=>{let n={Bucket:e.userUploadBucket,Key:e.userUploadKey,ACL:e.acl};e.s3.createMultipartUpload(n,(function(r,o){r?(console.log(r,r.stack),-1!=JSON.stringify(r).indexOf("NetworkingError")?setTimeout(()=>e.retryCreateMultipartUpload(n,t,i),5e3):i(r)):(e.userUploadId=o.UploadId,e.initialized=!0,t())}))}).catch(i)})}retryCreateMultipartUpload(e,t,i){let n=this;this.s3.createMultipartUpload(e,(function(r,o){r?-1!=JSON.stringify(r).indexOf("NetworkingError")?setTimeout(()=>n.retryCreateMultipartUpload(e,t,i),5e3):i(r):(n.userUploadId=o.UploadId,n.initialized=!0,t())}))}updateCredentials(){return console.log("THIS1 ><<< ",this),new Promise(async(e,t)=>{console.log("THIS ><<< ",this.recorderModel);const[i,n]=await this.recorderModel.getFederatedAwsToken({region:this.region});if(i){const t=i.data;this.setS3Credentials(t),e()}n&&(console.error("error updating credentials",n),-1!=JSON.stringify(n).indexOf("Network Error")?this.retryUpdateCredentials(e,t):t(n))})}async retryUpdateCredentials(e,t){const[i,n]=await this.recorderModel.getFederatedAwsToken({region:this.region});if(i){const t=i.data;this.setS3Credentials(t),e()}n&&-1!=JSON.stringify(n).indexOf("Network Error")&&setTimeout(()=>this.retryUpdateCredentials(e,t),5e3)}setS3Credentials(e){if(e.error)return console.error("error getting federated aws token",e),void reject(e.error);const t=1e3*(window.HippoVideo&&window.HippoVideo.AppRegistry&&window.HippoVideo.AppRegistry.S3ApiTimeout?Number(window.HippoVideo.AppRegistry.S3ApiTimeout):600);try{this.cognitoIdentityCredentials.clearCachedId()}catch(e){}this.cognitoIdentityCredentials=new j.a({IdentityPoolId:this.IDENTITY_POOL_ID,IdentityId:e.identity_id,Logins:{"cognito-identity.amazonaws.com":e.token}},{region:this.region,httpOptions:{timeout:t},maxRetries:0}),Ee.a.events.on("retry",(function(e){if("RequestTimeTooSkewed"===e.error.name){let t=Date.parse(e.httpResponse.headers.date),i=(new Date).getTime();console.log("AWS Timestamp ::: "+new Date(t)),console.log("Browser Timestamp ::: "+new Date(i)),Ee.a.config.systemClockOffset=t-i,e.error.retryable=!0}})),this.s3=new be.a({apiVersion:"2006-03-01",region:this.region,credentials:this.cognitoIdentityCredentials,params:{Bucket:this.bucket},useAccelerateEndpoint:this.useAccelerate,httpOptions:{timeout:t},maxRetries:0})}refreshCognitoCredentials(){this.cognitoIdentityCredentials&&this.cognitoIdentityCredentials.refresh(e=>{console.error("REFRESH COGNITO CRED ",e)})}getCognitoIdentityCredentialsObject(e){return new j.a({IdentityPoolId:this.IDENTITY_POOL_ID,IdentityId:e.identity_id,Logins:{"cognito-identity.amazonaws.com":e.token}},{region:this.region,httpOptions:{timeout:AWS_API_TIMEOUT}})}uploadPart(e,t,i,n,r){console.log("S3Uploader.uploadBlob blob",i),console.info("S3Uploader.uploadBlob uploading");const o=i.size;let a={Bucket:this.userUploadBucket,Key:this.userUploadKey,PartNumber:t,UploadId:this.userUploadId,Body:i};return console.log("trying upload .... "+a),this.s3.uploadPart(a,(function(i,a){i?r(e,i,t):n(e,o,{ETag:a.ETag,PartNumber:Number(this.request.params.PartNumber)})}))}uploadPartSuccess(e){console.info("part upload complete",e)}uploadPartError(e,t){console.log("UPLOAD ERROR ",e,"Params ",t)}finishMultipartUpload(e){const t=this;return new Promise((i,n)=>{e.sort((function(e,t){return e.PartNumber-t.PartNumber}));let r={Bucket:t.userUploadBucket,Key:t.userUploadKey,UploadId:t.userUploadId,MultipartUpload:{Parts:e}};console.log("ASSSETID",t.assetId,r),t.s3.completeMultipartUpload(r,(function(e,o){e?(console.log(e,e.stack),-1!=JSON.stringify(e).indexOf("Network Error")?setTimeout(()=>t.retryFinishMultipartUpload(r,i,n),5e3):n({error:e,assetId:t.assetId})):i({data:o,assetId:t.assetId})}))})}async retryFinishMultipartUpload(e,t,i){let n=this;this.s3.completeMultipartUpload(e,(function(r,o){r?(console.log(r,r.stack),-1!=JSON.stringify(r).indexOf("Network Error")?setTimeout(()=>n.retryFinishMultipartUpload(e,t,i),5e3):i({error:r,assetId:n.assetId})):t({data:o,assetId:n.assetId})}))}cancelMultipartUpload(e){return console.log("CANCELLING MULTIPART UPLOAD"),new Promise((t,i)=>{for(let t in e){const i=e[t];try{i.abort()}catch(e){}}const n={Bucket:this.userUploadBucket,Key:this.userUploadKey,UploadId:this.userUploadId};this.s3.abortMultipartUpload(n,(function(e,n){e?(console.error("error while aborting multipartupload",{error:e}),i(e)):(console.warn("aborted multipartupload",{res:n}),t(n))}))})}onUploadPartProgress(){that.uploadStatsData[this.params.PartNumber].completed=progress.loaded;var e=Math.round(progress.loaded/progress.total*100),t=(new Date).getTime();if(curProgressCallStartTime=t,navigator.connection&&rttValues.push(navigator.connection.rtt),(new Date).getTime()/1e3-rttValueLastUpdated>=pushRttValuePerXSeconds){e=Math.round(progress.loaded/progress.total*100);for(var i=(new Date).getTime(),n=uploadParams.Body.size*e/100/(i-startTime),r=0,o=0;o<rttValues.length;o++)r+=rttValues[o];console.info("RTT VALUE UPDATE",{asset_id:that.assetId,part_num:Number(that.fileUploadRates.length+e/100||0),on_upload_complete:!1,rtt:Number(r/rttValues.length||0),avg_upload_rate:Number(n||0),is_finished:that.finishedRecording,media_type:that.type,user_upload_key:that.userUploadKey}),rttValueLastUpdated=(new Date).getTime()/1e3}that.calculateProgress()}async uploadFile(e,t){try{const i=this;await this.updateCredentials();const n={Bucket:i.userUploadBucket,Key:i.userUploadKey,Body:e,ACL:i.acl};return[await this._startS3Upload(n,t),null]}catch(e){return[null,e]}}cancelFileUpload(){try{setTimeout(this.uploadResponse.abort.bind(this.uploadResponse),1e3)}catch(e){}}_startS3Upload(e,t){return new Promise((i,n)=>{this.uploadResponse=this.s3.upload(e,(function(e,t){e?(-1!=JSON.stringify(e).indexOf("TimeoutError")||-1!=JSON.stringify(e).indexOf("Timeout")||JSON.stringify(e).indexOf("NetworkingError"),console.log("There was an error uploading video: ",e),n(e.message)):i(t)})).on("httpUploadProgress",(function(e){t&&t(e)}))})}sendAbortRequest(e){var t=this,i={Bucket:t.userUploadBucket,Key:t.userUploadKey,UploadId:t.userUploadId};t.s3.abortMultipartUpload(i,(function(i,n){i?console.error("error while aborting multipartupload",{error:i}):console.warn("aborted multipartupload",{res:n}),e(t)}))}abortCurrentUploads(e){for(var t in e.uploadPartHandlers)try{e.uploadPartHandlers.hasOwnProperty(t)&&(e.uploadPartHandlers[t].params&&(e.uploadStatsData[e.uploadPartHandlers[t].params.PartNumber].completed=0),e.uploadPartHandlers[t].abort(),delete e.uploadPartHandlers[t])}catch(e){}e.uploadPartHandlers={}}}const Te=["webcam","screen","file"];class Ce{constructor({webCam:e,audio:t,screenRecord:i,file:n,recorderModel:r,uploadProgressCallback:o}){console.log("DATA >>> ",r),this.recorderModel=r,this.uploaderData={},this.uploaderParts={},this.uploadedParts={},this.currentUploaderDataSize={},this.totalUploaderDataSize={},this.uploaders={},this.incompleteUploadParts={},this.uploadersCompleted={},this.uploadCompleted={},this.uploadPartHandlers={},this.uploadEntitiesForEachFile={},this.finishUploadCalled=!1,this.uploadProgressCallback=o,this.uploadProgressDetails={type:"upload"},this.uploadStartTime=null,this.optimalUploadTime=1400,this.uploadTimeThreshold=85e3,this.desirableProcessCount={},this.uploadQueue={},this.latestUploadTime={},this.uploadError={},this.currentProcessCount={},this.uploadStats={},this.uploadRetries={},this.activeUploaderTypes=[],this.cognitoError={},this.UPLOAD_RETRY_INTERVAL=5e3,(e||t)&&this.addUploader("webcam"),i&&this.addUploader("screen"),n&&this.addUploader("file"),this.checkAndCompleteMultipartUpload=this.checkAndCompleteMultipartUpload.bind(this),this.onUploadPartSuccess=this.onUploadPartSuccess.bind(this),this.onUploadPartFailure=this.onUploadPartFailure.bind(this),this.sendUploadProgress=this.sendUploadProgress.bind(this),this.calculateProgress=this.calculateProgress.bind(this),console.log("this.uploaderData ",this.uploaderData)}initializeUploaders(e){return new Promise(async(t,i)=>{console.log("INITIALIZING ALL UPLOADERS ",e),this.uploaderConfig=e;try{e.webcamId&&await this.initializeUploader("webcam"),e.screenRecord&&await this.initializeUploader("screen"),t()}catch(e){this.uploadError[e.type]=!0,i(e)}})}addUploader(e){console.log("ADDING UPLOADER ",e),this.activeUploaderTypes.push(e),this.uploaderData[e]={},this.uploadCompleted[e]={},this.uploadedParts[e]=[],this.incompleteUploadParts[e]=[],this.uploadersCompleted[e]=!1,this.currentUploaderDataSize[e]=0,this.totalUploaderDataSize[e]=0,this.uploaderParts[e]=1,this.uploadQueue[e]=[],this.uploadRetries[e]={},this.uploadError[e]=!1,this.desirableProcessCount[e]=1,this.currentProcessCount[e]=0,this.uploadStats[e]={},this.cognitoError[e]=!1}initializeUploader(e){let t=this;return new Promise((i,n)=>{if(!e||!Te.includes(e))throw new Error("INVALID_UPLOADER_TYPE");console.log("INITIALIZING UPLOADER ",e,this.uploaderConfig);let r={bucket:this.uploaderConfig.uploadBucket,acl:"private",digest:this.uploaderConfig.digest,asset_id:this.uploaderConfig.asset_id,recorderModel:this.recorderModel};"webcam"===e&&(r.key=this.uploaderConfig.webcamKey),"screen"===e&&(r.key=this.uploaderConfig.screenKey),console.log("DDD ",r);const o=new Se(r);o.startMultiartUpload().then(()=>{console.log("THIS UPLOADERS ",t.uploaders),this.uploaders[e]=o,this.uploadPartHandlers[e]={},this.checkAndUpload(e),this.uploadStartTime=new Date,console.log("UPLOADERS ",this.uploaders),i()}).catch(t=>n({type:e,error:t}))})}retryUpload(){return new Promise((e,t)=>{let i=0;this.activeUploaderTypes.forEach(n=>{this.uploadError[n]?(this.resetUploaders(n),this.initializeUploader(n).then(()=>{i++,i===this.activeUploaderTypes.length&&(this.uploadError[n]=!1,e())}).catch(e=>{this.uploadError[e.type]=!0,t(e)})):i++})})}resetUploaders(e){this.uploaders[e]=null,this.uploadCompleted[e]={},this.uploadedParts[e]=[],this.incompleteUploadParts[e]=[],this.uploadersCompleted[e]=!1,this.currentUploaderDataSize[e]=0,this.uploadRetries[e]={},this.uploadProgressDetails={type:"upload"},this.uploadError[e]=!1,this.desirableProcessCount[e]=1,this.currentProcessCount[e]=0,this.uploadStats[e]={}}calculateProgress(e){console.log("PROGRESS 123",e);let t=e&&e.loaded||0,i=e&&e.total||0;if(!e){for(let e in this.uploadCompleted){const i=this.uploadCompleted[e];for(let e in i)t+=i[e]}for(let e in this.totalUploaderDataSize)i+=this.totalUploaderDataSize[e]}console.log("TESTING CALCULATE PROGRESS ",JSON.stringify(this.uploadCompleted),JSON.stringify(this.totalUploaderDataSize));let n=t/((new Date-this.uploadStartTime)/1e3),r=Math.round((i-t)/n);return{type:"upload",totalSize:i,totalUploaded:t,completedPercent:Math.round(t/i*100),timeRemaining:r,completed:!1}}setUploadProgressCallback(e){console.log("SETTING UPLOAD PROGRESS CALLBACK ",this.uploadProgressCallback),this.uploadProgressCallback?e=this.uploadProgressCallback:this.uploadProgressCallback=e,e(this.uploadProgressDetails)}isUploadComplete(){return!!this.uploadProgressDetails&&!!this.uploadProgressDetails.completed}onDataAvailable(e,t){if(!e||!Te.includes(e))throw new Error("INVALID_UPLOADER_TYPE");if(!this.uploaderData.hasOwnProperty(e))throw new Error("UPLOADER_NOT_FOUND");const i=this.uploaderParts[e];this.uploaderData[e][i]||(this.uploaderData[e][i]=[]),this.uploaderData[e][i].push(t);const n=this.getDataSize(t);this.currentUploaderDataSize[e]+=n,this.totalUploaderDataSize[e]+=n,(this.currentUploaderDataSize[e]>5242880||this.finishUploadCalled)&&(console.log("SIZE REACHED"),this.uploadQueue[e].push({partNumber:i}),this.currentUploaderDataSize[e]=0,this.uploadRetries[e][i]=0,this.uploadStats[e][i]={},this.uploaders[e]&&this.checkAndUpload(e),!this.finishUploadCalled&&this.uploaderParts[e]++)}async checkAndUpload(e){if(console.log("this.uploadError ",this.uploadError),!this.uploadError[e]){if(this.latestUploadTime[e]){const t=Math.floor(this.uploadTimeThreshold/this.latestUploadTime[e]);this.latestUploadTime[e]<this.uploadTimeThreshold?(this.slowUpload=!1,this.desirableProcessCount[e]=Math.max(Math.round(.75*t),1)):(this.slowUpload=!0,this.desirableProcessCount[e]=Math.max(t,1))}if(console.log("CURRENT PROCESS COUNT "),console.log(this.currentProcessCount),console.log(this.desirableProcessCount),console.log(this.uploadQueue),this.cognitoError[e])try{await this.uploaders[e].updateCredentials()}catch(e){}if(this.currentProcessCount[e]<this.desirableProcessCount[e]){let t=Math.min(this.desirableProcessCount[e]-this.currentProcessCount[e],this.uploadQueue[e].length);for(;t>0;){const i=this.uploadQueue[e].pop(0);console.log("up ",i),this.uploadStats[e][i.partNumber]||(this.uploadStats[e][i.partNumber]={}),this.uploadStats[e][i.partNumber].start=(new Date).getTime(),this.constructAndUploadBlob(e,i.partNumber),this.currentProcessCount[e]++,t--}}}}sendUploadProgress(){this.uploadProgressCallback&&this.uploadProgressCallback(this.uploadProgressDetails)}constructAndUploadBlob(e,t){console.log("CONSTRUCT AND UPLOA BLOB");const i=this;let n=new Blob(this.uploaderData[e][t],{type:"video/webm"});this.incompleteUploadParts[e]=this.incompleteUploadParts[e].filter(e=>t!==e),this.uploaders[e]?(this.uploadPartHandlers[e][t]=this.uploaders[e].uploadPart(e,t,n,this.onUploadPartSuccess,this.onUploadPartFailure),this.uploadPartHandlers[e][t].on("httpUploadProgress",n=>{console.log("TTTTTT ",i.uploadProgressDetails,n),i.uploadCompleted[e][t]=n.loaded,i.uploadProgressDetails=i.calculateProgress(),i.sendUploadProgress(),console.log(`PROGRESS [${t}] : `,n,i.uploadProgressDetails)}),console.log("PART NUMBER INCREMENTED ",this.uploaderParts)):this.incompleteUploadParts[e].push(t)}finishUpload(){console.log("CALLING FINISH UPLOAD ",this.uploaders),this.finishUploadCalled=!0;const e=this;return new Promise((t,i)=>{if(Object.keys(this.uploaders).length===this.activeUploaderTypes.length)e.checkAndCompleteMultipartUpload(t,i);else{const n=setInterval(()=>{Object.keys(this.uploaders).length===this.activeUploaderTypes.length?(clearInterval(n),e.checkAndCompleteMultipartUpload(t,i)):console.log("UPLOADER STILL NOT INITALIZED")},1e3)}})}checkAndCompleteMultipartUpload(e,t){for(let i of Te){if(console.log("CALLING FINISH UPLOA ",i),!this.uploaders[i])continue;if(this.uploadersCompleted[i])continue;console.log("CALLING FINISH UPLOAD 1"),this.checkAndUpload(i);const n=setInterval(()=>{this.uploadError[i]&&clearInterval(n),this.uploaderParts[i]===this.uploadedParts[i].length&&(clearInterval(n),this.uploaders[i].finishMultipartUpload(this.uploadedParts[i]).then(({data:n,assetId:r})=>{if(window.isError)return console.log("MULTIPART FINISH ERROR manual trigger "),this.uploadProgressDetails&&(this.uploadProgressDetails.error=!0,this.uploadProgressDetails.errorType="MULTIPART_FINISH",this.sendUploadProgress()),void t(r);console.log("MULTIPART FINISH SUCCESS ",n),this.uploadersCompleted[i]=!0,this.isAllUploadCompleted()&&(this.uploadProgressDetails&&(this.uploadProgressDetails.completed=!0,this.sendUploadProgress()),e(r))}).catch(({error:e,assetId:i})=>{console.log("MULTIPART FINISH ERROR ",e),this.uploadProgressDetails&&(this.uploadProgressDetails.error=!0,this.uploadProgressDetails.errorType="MULTIPART_FINISH",this.sendUploadProgress()),t(i)}))},1e3)}}isAllUploadCompleted(){let e=!0;for(let t of Te)!1===this.uploadersCompleted[t]&&(e=!1);return e}onUploadPartSuccess(e,t,i){this.uploadedParts[e].push(i),this.currentProcessCount[e]--;const n=i.PartNumber;console.log("US ",this.uploadStats);const r=(new Date).getTime()-this.uploadStats[e][i.PartNumber].start;this.uploadStats[e][i.PartNumber].tt=r,t>=5242880&&(this.latestUploadTime[e]=r),this.incompleteUploadParts[e]=this.incompleteUploadParts[e].filter(e=>e!==n),console.log("On upload part success ",this.incompleteUploadParts[e],this.uploadStats[e]),this.checkAndUpload(e)}onUploadPartFailure(e,t,i){console.log("err ",t),-1==JSON.stringify(t).indexOf("RequestAbortedError")&&(-1!=JSON.stringify(t).indexOf("TimeoutError")||-1!=JSON.stringify(t).indexOf("Timeout")||JSON.stringify(t).indexOf("NetworkingError"),console.error("s3.uploadPart error ",{partNumber:i,error:t}),-1!=JSON.stringify(t).indexOf("CredentialsError")&&(console.log("CRED ERROR ",JSON.stringify(t)),this.cognitoError[e]=!0),this.currentProcessCount[e]--,this.uploadError[e]||setTimeout(()=>{console.log(`Retrying upload of ${e} part: #${i}`),this.latestUploadTime[e]=9999999,this.uploadStats[e][i].start=(new Date).getTime(),this.uploadRetries[e][i]+=1,this.uploadQueue[e].push({partNumber:i}),this.uploadStats[e][i].retries=this.uploadRetries[e][i],this.uploadStats[e][i].completed=0,this.checkAndUpload(e)},this.UPLOAD_RETRY_INTERVAL),this.incompleteUploadParts[e].includes(i)||this.incompleteUploadParts[e].push(i))}uploadFile(e,t,i){e&&(e.recorderModel=this.recorderModel),this.uploadStartTime=new Date,this.fileUploader=new Se(e);return this.fileUploader.uploadFile(t,e=>{i&&i(this.calculateProgress(e))})}cancelImport(){this.fileUploader&&this.fileUploader.cancelFileUpload()}cancelMultipartUpload(){for(let e of Te)this.uploadPartHandlers[e]&&this.uploaders[e].cancelMultipartUpload(this.uploadPartHandlers[e])}getObjectUrls({recordingConfig:e}){const t={};for(let i of Te){const n=this.uploaderParts[i];console.log("TYPE : ",i),console.log("TOTAL PARTS : ",n),console.log("UPLOADER PARTS : ",this.uploaderParts[i]);let r=[];for(let e=1;e<=n;e++)console.log("LEN ",this.uploaderData[i][e]),r=r.concat(this.uploaderData[i][e]);let o="video";"webcam"!==i||e.webCam||(o="audio");let a=o+"/mp4";MediaRecorder.isTypeSupported("video/webm")&&(a="video/webm"),console.log("TYPE >>> ",a),r.length>0&&(t[i]=URL.createObjectURL(new Blob(r,{type:a})))}return console.log("RES ",t),t}getDataSize(e){return e.size?e.size:e.byteLength}destroy(){}}var ke=i(99);class xe{constructor({token:e,tokenType:t,email:i}){const n={baseURL:(window._HVDomain||"https://www.hippovideo.io")+pe.a,headers:{accept:"application/json"}};if(t===Q.e.RECORDER_SDK_TOKEN){let i=`${t}$$${e}`;n.headers.Authorization="Basic "+btoa(i)}if(t===Q.e.AUTHENTICATION_TOKEN){let r=`${t}$$${e}$$${i}`;n.headers.Authorization="Basic "+btoa(r)}this.axiosInstance=z.a.create(n)}statusOf({operationId:e,assetId:t,expectedOperationType:i}){const n={operation_id:e,asset_id:t,expected_operation_type:i};return Object(ke.a)({axiosInstance:this.axiosInstance,url:"/video/status",method:"get",params:n})}}var Ae=i(195),Pe=i.n(Ae);class Ie{constructor({interval:e=3e3,pollTimeout:t=7200,token:i,tokenType:n,email:r}){this.interval=e,t=(new Date).getTime()/1e3+t,this.latestWindow=[],this.token=i,this.tokenType=n,this.statusPollerModel=new xe({token:i,tokenType:n,email:r}),this.logger=new de({module:"VIDEO_STATUS_POLLER",tokenType:n,token:i})}getStatus({operationId:e,waitingHandler:t,progressHandler:i,completeHandler:n,errorHandler:r}){this.setDefaults(),e&&e.constructor===Array?(this.operationIdArray=e,this.operationId=this.operationIdArray.pop()):this.operationId=e,this.waitingHandler=t,this.progressHandler=i,this.completeHandler=n,this.errorHandler=r,this.ping()}async ping(){if("stop"===this.pollingAction)return;if((new Date).getTime()/1e3>this.pollTimeout)return void(this.errorHandler&&this.errorHandler(Pe.a.pingTooLong));if(null==this.operationId&&null==this.assetId)return;const[e,t]=await this.statusPollerModel.statusOf({operationId:this.operationId,assetId:this.assetId,expectedOperationType:this.expectedOperationType});if(e){let t=e.data;if(console.log("EVENT ",t,this.interval),!t)return void setTimeout(()=>this.ping(),this.interval);if(null===t||"null"===t||""===JSON.stringify(t).trim())return setTimeout(()=>this.ping(),this.interval),void this.logger.error("Event is empty",{stackTrace:"Null value returned for statuspoller ",assetId:this.assetId,operationId:this.operationId});if(void 0===t.status&&t.operation_id)return void setTimeout(()=>this.ping(),this.interval);if("error"==t.status)this.pollErrorCount++,this.pollErrorCount<=4&&setTimeout(()=>this.ping(),this.interval);else if(50==t.status)this.waitingHandler&&this.waitingHandler(t.data.text),setTimeout(()=>this.ping(),this.interval);else if(51==t.status||52==t.status){if(t.data.progress>=0&&t.data.progress<=100&&(this.latestWindow.push(t.data),this.latestWindow.length>3&&this.latestWindow.splice(0,this.latestWindow.length-3)),this.latestWindow.length>1){var i=this.latestWindow[this.latestWindow.length-1].progress-this.latestWindow[0].progress,n=this.latestWindow[this.latestWindow.length-1].ts-this.latestWindow[0].ts;i>0&&n>0&&(this.timeRemaining=Math.round(n*(100-this.latestWindow[this.latestWindow.length-1].progress)/i))}this.progressHandler&&this.progressHandler(t.data.text,t.data.progress,this.timeRemaining),setTimeout(()=>this.ping(),this.interval)}if(("error"==t.status&&this.pollErrorCount>4||54==t.status)&&this.errorHandler){var r=Pe.a.somethingWentWrong;null!=t.data&&null!=t.data.text&&(r=t.data.text);var o={reason:r,state:t.data.state};this.errorHandler(o)}53==t.status&&(null!=this.expectedOperationType&&t.operationtype!=this.expectedOperationType?(t.data.text=Pe.a.processPending,this.progressHandler(t.data.text,t.data.progress,this.timeRemaining,t.operationtype,t.status),setTimeout(()=>this.ping(),this.interval)):this.operationIdArray&&this.operationIdArray.length>0?(this.operationId=this.operationIdArray.pop(),this.ping()):this.completeHandler&&this.completeHandler(t))}if(t&&(setTimeout(()=>this.ping(),this.interval),!this.clientLogSent)){var a={authoringAssetId:this.assetId,description:"STATUS_POLLER_ERROR",stackTrace:"Error while connecting server status from server. assetId-"+this.assetId+" status-"+t.status};this.logger.error("STATUS POLLER ERROR",a),this.clientLogSent=!0}}stop(){this.pollingAction="stop"}setDefaults(){this.operationIdArray=[],this.assetId=void 0,this.expectedOperationType=void 0,this.operationId=void 0,this.pollErrorCount=0,this.timeRemaining=void 0,this.pollingAction,this.clientLogSent=!1}}var Re=i(190),De=i.n(Re),Oe=i(204),Ne=i.n(Oe);const Le=({webcam:e=!0,audio:t=!0})=>new Promise((i,n)=>{Me({webcam:e,audio:t}).then(({error:e})=>{e?n():i()}).catch(n)}),Me=({webcam:e=!0,audio:t=!0})=>new Promise((i,n)=>{navigator.mediaDevices.enumerateDevices().then(n=>{let r=null;const o={};e&&(o.webcam=[]),t&&(o.audio=[]),n.forEach(i=>{if((e||"videoinput"!==i.kind)&&(t||"audioinput"!==i.kind)&&["audioinput","videoinput"].includes(i.kind)){if(""===i.deviceId&&""===i.label)return void(r="DEVICE_PERMISSION_NOT_GRANTED");"videoinput"===i.kind&&o.webcam.push(i),"audioinput"===i.kind&&o.audio.push(i)}}),i({error:r,devices:o})}).catch(n)}),Fe=e=>{let t="Low";return e>=1920?t="High":e>=1024&&(t="Good"),t};var Ue=class{constructor({recordingConfiguration:e,token:t,tokenType:i,email:n,integrationType:r=Q.q.PRODUCT,initiator:o,logID:a,recorderAPIUtils:s,recorderId:l,recorderEvtClass:u}){if(!e)throw new Error("INVALID_CONFIGURATION");console.log(" setting config >>>> ",JSON.stringify(e)),this.recordingConfiguration=e,this.token=t,this.tokenType=i,this.email=n,this.recordDetails={},this.recorderId=l,this.recorderEvtClass=u,this.recorderInitiator=o,this.preprocessCompleted=!1,this.uploadCompleted=!1,this.integrationType=r,this.currentWebcamStreamConfig=null,this.currentScreenStreamConfig=null,this.createRecordingRef=null,this.deliveryToken=null,this.projectJson=null,this.extensionRecording=!1,this.recorderAPIUtils=s,this.extensionAvailable=!1,this.webcamConstraints=Q.j,this.audioConstraints=Q.f,this.screenConstraints=Q.g,this.logUID=a||B({integrationType:r,tokenType:i}),this.exponentialBackoff={retryCount:0},this.logger=new de({integrationType:r,module:"RECORDER_CORE",logUID:this.logUID,tokenType:i,token:t}),this.recorderModel=new ge({token:t,tokenType:i,email:n}),this.extensionAvailable=!1,this.logger.info("[RECORDER_INITIALIZED]",{recording_configuration:e})}updateConfig({recordingConfiguration:e,logID:t}){return console.log("update config >>>> ",JSON.stringify(e)),e&&(this.recordingConfiguration=e),t&&(this.logID=t),this.logger.info("[RECORER_CONFIG_UPDATED]",{recording_configuration:e,log_id:t}),this}updateConstraints(e){let t=Object(U.m)({...e,oldWebcamConstraints:this.webcamConstraints,oldAudioConstraints:this.audioConstraints,oldScreenConstraints:this.screenConstraints});t.screen&&(this.screenConstraints=t.screen),t.audio&&(this.audioConstraints=t.audio),t.webcam&&(this.webcamConstraints=t.webcam)}getStreamConfig(){let e={};if(this.recordingConfiguration.screenRecord){const t={audio:this.recordingConfiguration.systemAudio,video:{frameRate:Q.h,height:Object(U.g)(this.recordingConfiguration.resolution).height,width:Object(U.g)(this.recordingConfiguration.resolution).width}};e.screen=t}if(this.recordingConfiguration.audio||this.recordingConfiguration.webCam){const t={audio:this.recordingConfiguration.audio,video:this.recordingConfiguration.webCam};this.recordingConfiguration.webCam&&(t.video={},this.recordingConfiguration.webcamSourceId&&(t.video.deviceId=this.recordingConfiguration.webcamSourceId),this.recordingConfiguration.aspectRatio&&"default"!==this.recordingConfiguration.aspectRatio&&(t.video.aspectRatio=this.recordingConfiguration.aspectRatio)),this.recordingConfiguration.audio&&(t.audio={},this.recordingConfiguration.audioSourceId&&(t.audio.deviceId=this.recordingConfiguration.audioSourceId)),e.webcam=t}return e}isExtensionAvailable(){return new Promise((e,t)=>{try{Object(U.j)(this.integrationType).then(t=>{e(t)}).catch(()=>{t()})}catch(e){t()}})}createRecording(){this.uploadCompleted=!1,this.createRecordingError=!1,this.exponentialBackoff.retryCount=0,this.activateWarning(),this.logger.info("[CREATE_RECORDING]",{recording_configuration:this.recordingConfiguration});const{webCam:e,audio:t,screenRecord:i}=this.recordingConfiguration;return console.log("DETAILS ",e,t,i),this.s3UploadManager=new Ce({webCam:e,audio:t,screenRecord:i,recorderModel:this.recorderModel}),this.recordType=Q.c.RECORD,this._sendCreateRecordingRequest()}sendCreateRecordingRequest(){return!this.createRecordingError||(this.logger.info("[SENDING_CREATE_RECORDING_REQUEST]"),this.exponentialBackoff.retryCount=Q.m,this.exponentialBackoff.setTimeoutRef&&clearTimeout(this.exponentialBackoff.setTimeoutRef),this.recorderModel.cancelRequest({type:"create_recording"}),this._sendCreateRecordingRequest())}createVideoImport({params:e,uploadStartedCallback:t,updateProgress:i,file:n}){this.uploadCompleted=!1,this.createRecordingError=!1,this.activateWarning(this.logger),this.s3UploadManager=new Ce({file:!0,recorderModel:this.recorderModel});const r=this;return this.recordType=Q.c.IMPORT,this.logger.info("[IMPORT_VIDEO_REQUEST]",{params:e}),new Promise(async(o,a)=>{const[s,l]=await this.recorderModel.createVideoImport({logUID:this.logUID,...e});if(this.logger.info("[IMPORT_VIDEO_RESPONSE]",{success:s,error:l}),s){const e=s.data;this._updateRecordDetails(e);const l={bucket:e.upload_bucket,key:e.upload_key,digest:this.token,acl:"private"},u=e.authoring_asset_id;t&&t();const[c,d]=await r.s3UploadManager.uploadFile(l,n,e=>{i(e)});if(this.logger.info("[VIDEO_UPLOAD_COMPLETED]",{success:c,error:d}),c){i({type:"upload",completedPercent:100,completed:!0}),r.uploadCompleted=!0;const[t,n]=await r.recorderModel.convertVideo({assetId:u,videoId:e.upload_video_id,compressionRequired:!1,saveAsNew:!0,token:this.token,convertSpeed:"lessonly"==this.integrationType?"ultrafast":void 0});if(this.logger.info("[VIDEO_CONVERSION_COMPLETED]",{success:t,error:n}),t){const e=t.data;r.videoConverting({convertVideoResponse:e,assetId:u,updateProgress:i,resolve:o,reject:a})}n&&(this.removeWarning(),a(n))}d&&(this.removeWarning(),a(d),i({type:"upload",completedPercent:0,completed:!1}))}l&&(this.removeWarning(),a(l))})}cancelVideoImport(){this.s3UploadManager.cancelImport();try{this.recorderModel.cancelRequest({type:"import_video"}),this.recorderModel.cancelRequest({type:"import_convert"}),this.importStatusPoller&&this.importStatusPoller.stop()}catch(e){}}async closeAudioContext(){try{this.audioContext&&await this.audioContext.close()}catch(e){}}getStream(e={}){let{preview:t}=e;this.preview=t,console.log("PREVIEW ",t,JSON.stringify(this.recordingConfiguration));let i=this.getStreamConfig(),{webcam:n=Q.i,screen:r=Q.g}=i;t&&(delete i.screen,r=null),!1===this.recordingConfiguration.webCam&&!1===this.recordingConfiguration.audio&&(n=!1),!1===this.recordingConfiguration.screenRecord&&(r=!1);let o={};return this.logger.info("[GET_STREAMS]",{options:i}),this.closeAudioContext(),new Promise(async(e,a)=>{if(this.extensionAvailable){const t={type:"get_stream",configuration:i};return void Object(U.b)({integrationType:this.integrationType,message:t}).then(t=>{"get_stream_response"===t.type&&e({_type:"url",webcamStream:t.url})}).catch(e=>{console.error(e)})}let s=!1;n&&!this.webcamStream&&(s=!0),r&&!this.screenStream&&(s=!0);const{isWebcamVideoConfigSame:l,isWebcamAudioConfigSame:u,isScreenConfigSame:c}=this.isStreamConfigSame(n,r);if(l&&u&&c&&!s)return e({message:"no_config_change",screenStream:this.screenStream,webcamStream:this.webcamStream}),void this.logger.info("[STREAM_CONFIGS_SAME]",{oldConfig:{webcam:this.currentWebcamStreamConfig,screen:this.currentScreenStreamConfig},newConfig:{webcam:n,screen:r}});t&&this.currentWebcamStreamConfig?((!this.currentWebcamStreamConfig.video&&n.video||n.video&&!l)&&this.stopWebcamStream(),(!this.currentWebcamStreamConfig.audio&&n.audio||n.audio&&!u)&&this.stopWebcamStream()):l&&u||this.stopWebcamStream(),!c&&r&&this.stopScreenStream(),this.updateConstraints({webcam:n&&n.video,audio:n&&n.audio,screen:r});try{if(r){const e=await this.getScreenStream(r);this.screenStream=e,o.screenStream=e}if(n){console.log("GETTING_NEW_STREAM ",t,n);const e=await this.getWebcamStream(n);this.webcamStream=e,o.webcamStream=e}e(o)}catch(e){return this.recorderModel.setRecordError({errorState:e.type,logUID:this.logUID}),void a(e)}})}getWebcamStream(e){if(e.video){let t=Object.assign({},Q.j,e.video);e.video=t}return this.webcamError=!1,new Promise((t,i)=>{if(this.webcamStream)return t(this.webcamStream);this.currentWebcamStreamConfig=e;const n=setTimeout(()=>{this.webcamError=Object(U.n)("webcam",{name:"WebcamReadTimeout",message:"Timeout in fetching the stream"}),i(this.webcamError)},5e3);this.webcamStreamRequestInprogress=!0,navigator.mediaDevices.getUserMedia(e).then(e=>{this.webcamStreamRequestInprogress=!1,clearTimeout(n),this.webcamStream=e,t(e)}).catch(e=>{this.webcamStreamRequestInprogress=!1,clearTimeout(n),this.logger.info("[GET_WEBCAM_STREAM]",{error:e}),this.webcamError=Object(U.n)("webcam",e),i(this.webcamError)})})}getScreenStream(e){return new Promise((t,i)=>{if(this.screenStream)return t(this.screenStream);this.currentScreenStreamConfig=e,"function"==typeof navigator.getDisplayMedia?navigator.getDisplayMedia().then(e=>{this.screenStream=e,t(e)}).catch(e=>{this.logger.info("[GET_SCREEN_STREAM]",{error:e}),i(Object(U.n)("screen",e))}):navigator.mediaDevices.getDisplayMedia(e).then(e=>{this.screenStream=e,t(e)}).catch(e=>{this.logger.info("[GET_SCREEN_STREAM]",{error:e}),i(Object(U.n)("screen",e))})})}pauseRecording(){if(this.recordingPaused)return{status:!0};this.pauseRecordingTimer();let{screenRecord:e,webCam:t,audio:i}=this.recordingConfiguration;return e&&this.screenRecorder.pause(),(t||i)&&this.webcamRecorder.pause(),this.recordingPaused=!0,{status:!0}}resumeRecording(e=0){return this.recordingPaused?(setTimeout(()=>{this.resumeRecordingTimer();let{screenRecord:e,webCam:t,audio:i}=this.recordingConfiguration;e&&this.screenRecorder.resume(),(t||i)&&this.webcamRecorder.resume(),this.recordingPaused=!1},e),{status:!0}):{status:!0}}pauseStream({audio:e,webcam:t,screen:i}){try{if(t||e){const i=this.webcamStream.getTracks();e&&(i.filter(e=>"audio"===e.kind)[0].enabled=!1),t&&(i.filter(e=>"video"===e.kind)[0].enabled=!1)}if(i){this.screenStream.getTracks().forEach(e=>{e.enabled=!1})}return{status:!0}}catch(e){return{status:!1,error:e}}}resumeStream({audio:e,webcam:t,screen:i}){try{if(t||e){const i=this.webcamStream.getTracks();e&&(i.filter(e=>"audio"===e.kind)[0].enabled=!0),t&&(i.filter(e=>"video"===e.kind)[0].enabled=!0)}if(i){this.screenStream.getTracks().forEach(e=>{e.enabled=!0})}return{status:!0}}catch(e){return{status:!1,error:e}}}stopOnlyWebcamStream(){if(!this.webcamStream)return;this.logger.info("[STOPPING_WEBCAM_ONLY_STREAM] ",{preview:this.preview});let e=!0;try{this.webcamStream.getTracks().forEach(t=>{"video"===t.kind&&t.stop(),"audio"===t.kind&&(e=!1)})}catch(e){}e&&(this.webcamStream=null)}stopOnlyMicStream(){if(!this.webcamStream)return;this.closeAudioContext(),this.logger.info("[STOPPING_AUDIO_STREAM]");let e=!0;try{this.webcamStream.getTracks().forEach(t=>{"audio"===t.kind&&t.stop(),"video"===t.kind&&(e=!1)})}catch(e){}e&&(this.webcamStream=null)}stopWebcamStream(){if(this.webcamStream){this.logger.info("[STOPPING_WEBCAM_STREAM] ",{preview:this.preview});try{this.webcamStream.getTracks().forEach(e=>{e.stop()})}catch(e){}this.webcamStream=null}}stopScreenStream(){if(this.screenStream){this.logger.info("[STOPPING_SCREEN_STREAM]");try{this.screenStream.getTracks().forEach(e=>{e.stop()})}catch(e){}this.screenStream=null}}stopStreams(){this.stopWebcamStream(),this.stopScreenStream()}checkMicVolumeStatus(e){this.closeAudioContext();const t=new AudioContext;this.audioContext=t;const i=t.createAnalyser(),n=t.createMediaStreamSource(this.webcamStream),r=t.createScriptProcessor(2048,1,1);i.smoothingTimeConstant=.8,i.fftSize=1024,n.connect(i),i.connect(r),r.connect(t.destination),r.onaudioprocess=()=>{const t=new Uint8Array(i.frequencyBinCount);i.getByteFrequencyData(t);0===t.reduce((e,t)=>e+t,0)/t.length?this.noVolumeInitialTime&&(new Date).getTime()-this.noVolumeInitialTime>1e4?(e({error:!0,type:"NO_VOLUME"}),this.noVolumeInitialTime=null):this.noVolumeInitialTime||(this.noVolumeInitialTime=(new Date).getTime()):this.noVolumeInitialTime&&(e({error:!1}),this.noVolumeInitialTime=null)}}startExtensionRecording(){return Object(U.a)({integrationType:this.integrationType})}startRecording(e){this.logger.info("[START_RECORDING]",{settings:e}),console.log("RECORDING CONFIGURATION ",JSON.stringify(this.recordingConfiguration));let t=this;e=e||{},this.resetRecording();const{externalStopStreamCallback:i,timerCallback:n}=e;if(this.setTimerCallback(n),this.recordingConfiguration.maxRecordingTime?this.maxRecordingTime=this.recordingConfiguration.maxRecordingTime:this.maxRecordingTime=null,this.extensionAvailable)return Object(U.p)({recordingConfiguration:this.recordingConfiguration,integrationType:this.integrationType,eventListerClass:this.recorderEvtClass});if(this.webcamStream){let n={mimeType:"video/mp4"};MediaRecorder.isTypeSupported("video/webm")&&(n.mimeType="video/webm"),null!=this.recordingConfiguration.webcamBitRate&&(n.videoBitsPerSecond=1e3*this.recordingConfiguration.webcamBitRate),this.webcamRecorder=new MediaRecorder(this.webcamStream,n),this.webcamRecorder.ondataavailable=e=>{t.s3UploadManager.onDataAvailable("webcam",e.data)},this.webcamRecorder.onstop=e=>{this.logger.info("[WEBCAM_STREAM_STOPPED]")},this.webcamStream.onended=()=>{this.logger.info("[WEBCAM_STREAM_STOPPED_EXTERNALLY]"),i&&this.screenRecorder&&!this.recordingConfiguration.screenRecord&&i()},this.logger.info("[START_WEBCAM_RECORDING]",{settings:e}),this.webcamRecorder.start(500)}if(this.screenStream){let e="video/mp4";MediaRecorder.isTypeSupported("video/webm")&&(e="video/webm"),(window.opr&&opr.addons||window.opera||navigator.userAgent.indexOf(" OPR/")>=0)&&(e="video/webm;codecs=vp8");let n={mimeType:e};this.screenRecorder=new MediaRecorder(this.screenStream,n),this.screenRecorder.ondataavailable=e=>{t.s3UploadManager.onDataAvailable("screen",e.data)},this.screenRecorder.onstop=e=>{this.logger.info("[STOP_SCREEN_RECORDING]")},this.logger.info("[START_SCREEN_RECORDING]"),this.screenRecorder.start(500),this.screenStream.onended=()=>{this.logger.info("[SCREEN_RECORDING_STOPPED_STREAM_ENDED]"),i&&i()},this.screenStream.getVideoTracks()[0].onended=()=>{i&&this.screenRecorder&&i()},this.screenStream.getVideoTracks()[0].onmute=()=>{this.logger.info("[SCREEN_RECORDING_MUTED]"),console.error("screen stream muted")},this.screenStream.getVideoTracks()[0].onunmute=()=>{this.logger.info("[SCREEN_RECORDING_UNMUTED]")}}this.startRecordingTimer()}resetRecording(){this.projectJson=null}setTimerCallback(e){this.timerCallback=e}startRecordingTimer(){this.reverseTimer&&this.maxRecordingTime?this.timer=this.maxRecordingTime:this.timer=0,this.clearTimerInterval(),this.startTimer()}startTimer(){this.timerInterval=setInterval(()=>{this.reverseTimer&&this.maxRecordingTime?this.timer--:this.timer++,this.timerCallback&&this.timerCallback(this.timer)},1e3)}pauseRecordingTimer(){this.clearTimerInterval()}resumeRecordingTimer(){this.startTimer()}clearTimerInterval(){clearInterval(this.timerInterval)}finishRecording(e={}){const{progress:t}=e;if(this.postRecordProgressCallback=t,this.logger.info("[FINISH_RECORDING_CALLED]"),this.extensionAvailable)return Object(U.c)(this.integrationType);const i=this.stopRecording();return this.clearTimerInterval(),this.stopStreams(),i.then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.removeWarning(),this.uploadCompleteError=!0}),t&&this.setUploadProgressCallback(t),i}setProjectJson(e){this.projectJson=e}setRecordDetails(e){this.recordDetails=e}setExtensionRecording(e){this.extensionRecording=e}cancelRecordingWithoutStream(){return this.logger.info("[CANCEL_RECORIDNG_WITHOUT_STREAM]"),this.removeWarning(),this.stopRecorder(),this.stopScreenStream(),this.s3UploadManager.cancelMultipartUpload()}cancelRecording(){return this.logger.info("[CANCEL_RECORIDNG]"),this.removeWarning(),this.stopRecorder(),this.stopStreams(),this.s3UploadManager.cancelMultipartUpload()}getRecordingObjectUrls(){if(!this.extensionAvailable)try{return this.s3UploadManager.getObjectUrls({recordingConfig:this.recordingConfiguration})}catch(e){}return{}}getRecordingConfiguration(){return this.recordingConfiguration}retryUpload(){return this.logger.info("[RETRY_UPLOAD]"),new Promise((e,t)=>{this.s3UploadManager.retryUpload().then(()=>{this.uploadInitError=!1,this.s3UploadManager.finishUpload().then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.uploadCompleteError=!0}),e()}).catch(e=>{t(e),this.s3UploadManager.cancelMultipartUpload()})})}getUploadDetails(){return new Promise((e,t)=>{this.extensionAvailable?Object(U.h)(this.integrationType).then(i=>{i?e({completed:i.status===Q.r.UPLOADED,error:i.status===Q.r.FAILED,completedPercent:i.progress.progress,timeRemaining:i.progress.remainingTime}):t({error:"INVALID_RESPONSE"})}).catch(e=>{t({error:e})}):e(this.s3UploadManager.uploadProgressDetails)})}isUploadComplete(){return this.extensionRecording&&Object(U.h)(this.integrationType).then(e=>{e&&(this.uploadCompleted=e.status===Q.r.UPLOADED)}).catch(()=>{}),this.uploadCompleted}isPreprocessComplete(){return new Promise((e,t)=>{this.preprocessCompleteCheckInterval=setInterval(()=>{this.projectJson&&e(this.projectJson),this.preprocessError&&t(this.preprocessError),(this.projectJson||this.preprocessError)&&clearInterval(this.preprocessCompleteCheckInterval)},500)})}removePreprocessCompleteCheck(){this.preprocessCompleteCheckInterval&&clearInterval(this.preprocessCompleteCheckInterval)}getRecordDetails(){return new Promise((e,t)=>{this.recordDetails.asset_id?e(this.recordDetails):this.recorderDetailsCheckInterval=setInterval(()=>{this.recordDetails.asset_id&&(e(this.recordDetails),clearInterval(this.recorderDetailsCheckInterval)),this.createRecordError&&t("create_recording_error")},1e3)})}cancelGetRecordDetails(){this.recorderDetailsCheckInterval&&clearInterval(this.recorderDetailsCheckInterval)}async completeUpload(e,t=0){this.logger.info("[RECORDING_UPLOAD_COMPLETED]");const[i,n]=await this.recorderModel.completeUpload({assetId:e,webcamId:this.createRecordingRef.webcamId,screenId:this.createRecordingRef.screenId,recordingConfiguration:this.recordingConfiguration,token:this.token});if(this.logger.info("[COMPLETE_UPLOAD_RESPONSE]",{success:i,error:n}),i){const t=i.data;this.removeWarning(),this.uploadCompleted=!0;let n=t.hippo_recorder;this.startPollingForStatus(e,n,[])}if(n){if(t>1)return this.removeWarning();this.completeUpload(e,++t)}}startPollingForStatus(e,t,i){let n=t.pop();if(null==n)this.saveVideoSuccess(e,i);else{new Ie({interval:2e3,token:this.token,tokenType:this.tokenType,email:this.email}).getStatus({operationId:n,waitingHandler:e=>{this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:"N/A",completed:!1,message:"Waiting for video to be uploaded",time_remaining:"N/A"})},progressHandler:(e,t,i)=>{this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:t,completed:!1,message:e,time_remaining:i})},completeHandler:n=>{if(4==n.operationtype){this.logger.info("[RECORDING_PREPROCESS_COMPLETE]",{event:n}),this.postRecordProgressCallback&&this.postRecordProgressCallback({type:"preprocess",completedPercent:100,completed:!0,message:"Preprocess completed",recordDetails:this.recordDetails});let r={},o=n.data;r.id=o.id,r.duration=o.duration<0?o.audioduration:o.duration,r.type=o.videotype,r.offset=o.offset,i||(i=[]),i.push(r),this.startPollingForStatus(e,t,i)}},errorHandler:e=>{console.error(e)}})}}async saveVideoSuccess(e,t){const i=this;let n=0;const r={version:"2.0",footageList:[],clips:[],totalVideoTracks:3,trackNames:["Screen recording","Webcam","Track 3"],canvasWidth:384,canvasHeight:216,resolution:"720"};let o=0;for(let e=0;e<t.length;e++){let i=t[e];o=0==e?i.duration:Math.min(i.duration,o)}this.recordingConfiguration.sourceConfig||(this.recordingConfiguration.sourceConfig={}),(!this.recordingConfiguration.sourceConfig.webcam||this.recordingConfiguration.sourceConfig.webcam.width<=0||this.recordingConfiguration.sourceConfig.webcam.height<=0)&&(this.recordingConfiguration.sourceConfig.webcam={width:288,height:216}),(!this.recordingConfiguration.sourceConfig.screen||this.recordingConfiguration.sourceConfig.screen.width<=0||this.recordingConfiguration.sourceConfig.screen.height<=0)&&(this.recordingConfiguration.sourceConfig.screen={width:384,height:216});for(let e=0;e<t.length;e++){let i=t[e];r.footageList.push(i.id);let l={};l.id=i.id,l.duration=i.duration,l.containsVideo=1!=i.type||this.recordingConfiguration.webCam,l.containsAudio=1==i.type&&this.recordingConfiguration.audio;let u={xpos:0};if(1==i.type&&t.length>1){let e=Object(U.i)(this.recordingConfiguration.sourceConfig.webcam,this.recordingConfiguration.sourceConfig.screen,this.recordingConfiguration.webcamPosition,this.recordingConfiguration.webcamSize);u.width=e.width,u.height=e.height,u.xpos=e.x,u.ypos=e.y}else{var a;a=1==i.type?this.recordingConfiguration.sourceConfig.webcam:this.recordingConfiguration.sourceConfig.screen;var s=Object(U.d)(a,{width:384,height:216});u.width=s.width,u.height=s.height,u.xpos=s.x,u.ypos=s.y,r.crop={x:s.x,y:s.y,w:s.width,h:s.height}}0==i.type?l.type="screenrecord":l.type="webcam",u.opacity=1,u.volume=this.recordingConfiguration.audio?1:0,u.fadein=0,u.fadeout=0;let c={position:1e-4};c.id=n++,c.start=0,c.end=o,c.track=1==i.type?2:1,c.footage=l,c.deleted=!1,c.properties=u,r.clips.push(c)}if(this.setProjectJson(r),this.projectJson=r,"local"==Object(U.e)()){const[t,n]=await this.recorderModel.mergeAndRender({assetId:e,projectJson:r,renderFrom:"embedded_video"});t&&(new De.a).deliveryUrgentVideos(i.deliveryToken,(function(e){})),n&&console.error(n)}else(new De.a).deliveryUrgentVideos(i.deliveryToken,(function(e){}))}generateDummyPJForImport(e){let t,i;e.width/e.height>384/216?(t=384,i=384*e.height/e.width):(i=216,t=216*e.width/e.height);const n={w:t,h:i,x:(384-t)/2,y:(216-i)/2},r={deleted:!1,end:e.duration,id:0,position:"0.00010",start:0,track:1,footage:{id:e.source_id,duration:e.duration,containsVideo:e.contains_video,containsAudio:e.contains_audio,type:"webcam"},properties:{xpos:n.x,ypos:n.y,width:t,height:i,volume:1,opacity:1,fadein:0,fadeout:0}};return{canvasWidth:384,canvasHeight:216,resolution:1080,totalVideoTracks:1,trackNames:["Imported Video"],version:"2.0",footageList:[e.source_id],clips:[r],crop:n}}stopRecording(){return this.logger.info("[STOP_RECORIDNG]"),this.stopRecorder(),this.s3UploadManager.finishUpload()}stopRecorder(){if(this.logger.info("[STOP_RECORDER]"),this.clearTimerInterval(),this.webcamRecorder||this.screenRecorder){for(const e of[this.webcamRecorder,this.screenRecorder])if(e)try{e&&e.stop()}catch(e){}this.webcamRecorder=null,this.screenRecorder=null}}retryMultipartUploadFinish(){return this.logger.info("[RETRY_MULTIPART_UPLOAD_FINISH]"),this.s3UploadManager.finishUpload().then(e=>{this.uploadCompleteError=!1,this.completeUpload(e)}).catch(e=>{this.uploadCompleteError=!0,console.error(e)})}setUploadProgressCallback(e){return this.s3UploadManager.setUploadProgressCallback(e)}createRecordingExponentialBackoff(){this.currentTime||(this.currentTime=new Date),this.exponentialBackoff.retryCount<Q.m&&(this.exponentialBackoff.retryCount+=1,this.exponentialBackoff.setTimeoutRef=setTimeout(()=>{this._sendCreateRecordingRequest()},Q.l*this.exponentialBackoff.retryCount))}initializeUploadManager({data:e,deliveryToken:t}){this.logger.info("[UPLOAD_MANAGER_INITIALIZED]",{data:e}),this.createRecordingRef=e,this.deliveryToken=t,this.s3UploadManager.initializeUploaders(e).catch(e=>{console.error("Upload initialize error ",e),this.uploadInitError=!0})}_sendCreateRecordingRequest(){return new Promise(async(e,t)=>{const[i,n]=await this.recorderModel.createRecording({configuration:this.recordingConfiguration,logUID:this.logUID});if(this.logger.info("[CREATE_RECORDING_RESPONSE]",{success:i,error:n}),i){const t=i.data;this.createRecordingError=!1,this._updateRecordDetails(t),this.recorderAPIUtils&&this.recorderAPIUtils.sendEvent("record_details",{asset_id:this.recordDetails.asset_id,token:this.recordDetails.delivery_token,embed_url:this.recordDetails.embedLink,embed_preview_url:this.recordDetails.embeddedPreviewLink,play_url:this.recordDetails.recordedUrl,thumbnail_url:this.recordDetails.publicThumbnail,thumbnail_play_url:this.recordDetails.publicPlayThumbnail}),e(this.recordDetails),this.recordDetails&&this.initializeUploadManager({data:this.recordDetails,deliveryToken:t.delivery_token}),this.updateCurrentWebcamDimensions()}n&&(n&&n.is_cancelled?console.warn(n):(t(n),this.createRecordingError=!0,this.createRecordingExponentialBackoff()))})}_updateRecordDetails(e){if(!e.status)return this.logger.info("[CREATE_RECORDING_ERROR]",{create_recording_response:e}),void(this.recordDetails=e);this.recordDetails=Object(U.o)({createRecResponse:e,recordingConfiguration:this.recordingConfiguration,digest:this.token})}videoConverting({convertVideoResponse:e,assetId:t,updateProgress:i,resolve:n,reject:r}){this.removeWarning(),this.importStatusPoller=new Ie({interval:2e3,token:this.token,tokenType:this.tokenType,email:this.email});const o=this;this.importStatusPoller.getStatus({operationId:e,waitingHandler:e=>{i({type:"processing",completedPercent:0,completed:!1,message:"Waiting for upload to complete"})},progressHandler:(e,t,n)=>{const r=Object(U.k)(n);i({type:"processing",completedPercent:t,completed:!1,timeRemaining:r,message:e})},completeHandler:e=>{i({type:"processing",completedPercent:100,completed:!0,message:"Completed",recordDetails:this.recordDetails}),o.onImportConvertComplete(e,t,n,r)},errorHandler:e=>{this.logger.info("[VIDEO_CONVERSION_PROCESSING_ERROR]",{error:e}),r(e)}})}renderVideo(e){return this.recorderModel.mergeAndRender(e)}async onImportConvertComplete(e,t,i,n){this.logger.info("[VIDEO_CONVERSION_PROCESSING_SUCCESS]",{success:e});let r=-1;!e.data||null==e.data.duration&&null==e.data.audioduration?e.data&&e.data.data instanceof Array&&null!=e.data.data[0]&&(r=null!=e.data.data[0].duration?e.data.data[0].duration:e.data.data[0].audioduration):r=null!=e.data.duration?e.data.duration:e.data.audioduration;const[o,a]=await this.recorderModel.getImportedDetails({assetId:t});if(this.logger.info("[GET_IMPORT_DETAILS]",{success:o,error:a}),o){const e=o.data,t=0==e.contains_video&&1==e.contains_audio;"local"==Object(U.e)()&&(e.projectjson=this.generateDummyPJForImport(e)),t&&delete e.projectjson.crop,this.projectJson=e.projectjson,this.setProjectJson(this.projectJson),i&&i(e)}a&&n(a)}isStreamConfigSame(e=!1,t=!1){let i=!0,n=!0,r=!0;return(e||this.currentWebcamStreamConfig)&&(i=Ne()(e&&e.video,this.currentWebcamStreamConfig&&this.currentWebcamStreamConfig.video),n=Ne()(e&&e.audio,this.currentWebcamStreamConfig&&this.currentWebcamStreamConfig.audio)),(t||this.currentScreenStreamConfig)&&(r=Ne()(t,this.currentScreenStreamConfig)),{isWebcamVideoConfigSame:i,isWebcamAudioConfigSame:n,isScreenConfigSame:r}}updateCurrentWebcamDimensions(){try{const e=this.webcamStream.getVideoTracks()[0].getSettings();this.recordingConfiguration.sourceConfig||(this.recordingConfiguration.sourceConfig={}),this.recordingConfiguration.sourceConfig.webcam={width:e.width,height:e.height}}catch(e){}}activateWarning(){Object(U.q)(this.logger)}removeWarning(){Object(U.l)()}destroy(){this.s3UploadManager=null}},Be=i(188);i(129);var Ve,ze,He,je,Ge,qe,We,$e,Ye=i(193),Ke={createAudioMeter:function(e,t,i,n){var r=e.createScriptProcessor(512);return r.onaudioprocess=this.volumeAudioProcess,r.clipping=!1,r.lastClip=0,r.volume=0,r.clipLevel=t||.98,r.averaging=i||.95,r.clipLag=n||750,r.connect(e.destination),r.checkClipping=function(){return!!this.clipping&&(this.lastClip+this.clipLag<window.performance.now()&&(this.clipping=!1),this.clipping)},r.shutdown=function(){this.disconnect(),this.onaudioprocess=null},r},volumeAudioProcess:function(e){for(var t,i=e.inputBuffer.getChannelData(0),n=i.length,r=0,o=0;o<n;o++)t=i[o],Math.abs(t)>=this.clipLevel&&(this.clipping=!0,this.lastClip=window.performance.now()),r+=t*t;var a=Math.sqrt(r/n);this.volume=Math.max(a,this.volume*this.averaging)}},Je=(i(173),i(4)),Xe=i.n(Je),Qe=O.c.div(Ve||(Ve=Xe()(["\n width: 640px;\n height: 360px;\n background-color: #2E2E2E;\n border-radius: 15px;\n"]))),Ze=O.c.div(ze||(ze=Xe()(["\n max-width: 160px;\n width: 20%;\n position: relative;\n div:first-of-type {\n height: 0;\n padding-bottom: 100%;\n }\n"]))),et=O.c.div(He||(He=Xe()(["\n position: absolute;\n display: flex;\n justify-content: center;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: #0A0A0A;\n align-items: center;\n"]))),tt=O.c.img(je||(je=Xe()(["\n height: 50%;\n"]))),it=O.c.div(Ge||(Ge=Xe()(["\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n"]))),nt=O.c.div(qe||(qe=Xe()(["\n &::before {\n content: '';\n background: transparent;\n border: 2px solid rgba(255,255,255,0.15);\n opacity: 1;\n transform: scale(0.45);\n border-radius: 50%;\n box-sizing: border-box;\n display: block;\n height: 200%;\n left: -50%;\n position: absolute;\n top: -50%;\n width: 200%;\n will-change: transform;\n }\n &::after {\n border-radius: 50%;\n box-sizing: border-box;\n content: '';\n display: block;\n height: 200%;\n left: -50%;\n position: absolute;\n top: -50%;\n width: 200%;\n will-change: transform;\n background: transparent radial-gradient(closest-side at 50% 50%, #000000 0%, #121212 0%, #0000002B 100%) 0% 0% no-repeat padding-box;;\n transform: ",";\n transition: transform 300ms steps(6,jump-none) 50ms;\n }\n"])),function(e){return r()(this,void 0),e.$scale?"scale(".concat(parseFloat(e.$scale),")"):"scale(.5)"}.bind(void 0)),rt=Object(O.c)(nt)(We||(We=Xe()(["\n animation: "," .225s step-end,"," .075s ease .225s;\n"])),ot,ot),ot=Object(O.d)($e||($e=Xe()(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"]))),at="url",st=Object(N.d)("/svg/audio-on.svg");function lt(e){var t=this,i=e.stream,n=e.streamType,s=e.audioIcon,l=void 0===s?st:s,u=e.errorCallback,c=Object(o.useRef)(),d=Object(o.useRef)(),h=Object(o.useRef)(!1),p=Object(o.useState)(0),f=p[0],g=p[1],m=function(e){var i=this;if(r()(this,t),!h.current){var n=13*c.current.volume;n<=.5&&.5!=f?g(.5):n>.5&&n<=.55&&.55!=f?g(.55):n>.55&&n<=.6&&.6!=f?g(.6):n>.6&&n<=.65&&.65!=f?g(.65):n>.65&&.7!=f&&g(.7)}setTimeout(function(){r()(this,i),d.current=window.requestAnimationFrame(m)}.bind(this),50)}.bind(this);return Object(o.useEffect)(function(){var e=this;return r()(this,t),function(){r()(this,e),console.log("AUDIO METER EXITING PROPERLY"),h.current=!0,d.current&&(window.cancelAnimationFrame(d.current),d.current=null)}.bind(this)}.bind(this),[]),Object(o.useEffect)(function(){if(r()(this,t),i&&n!==at)try{if(i.getAudioTracks().length){var e=new AudioContext,o=e.createMediaStreamSource(i);c.current=Ke.createAudioMeter(e),o.connect(c.current),console.log("DRAWING AUDIO METER"),m()}}catch(e){u&&u(e),console.log(e)}}.bind(this),[i]),a.a.createElement(Qe,null,a.a.createElement(it,null,a.a.createElement(Ze,null,a.a.createElement("div",null),a.a.createElement(rt,{$scale:f}),a.a.createElement(et,null,a.a.createElement(tt,{src:l,alt:"Mic"})))))}var ut,ct,dt,ht,pt,ft,gt,mt=i(194),vt=O.c.div(ut||(ut=Xe()(["\n width: 100%;\n height: 100%;\n"]))),yt=O.c.iframe(ct||(ct=Xe()(["\n width: 100%;\n height: 100%;\n border: none;\n border-radius: 3px;\n"]))),bt=O.c.div(dt||(dt=Xe()(["\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"]))),wt=O.c.div(ht||(ht=Xe()(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n"]))),Et=(O.c.img(pt||(pt=Xe()(["\n display: block;\n height: 143px;\n width: 68px;\n object-position: bottom;\n object-fit: contain;\n"]))),O.c.div(ft||(ft=Xe()(["\n height: 60%;\n position: relative;\n display: flex;\n align-items: flex-end;\n"]))),O.c.div(gt||(gt=Xe()(["\n position: relative;\n display: flex;\n"])))),_t="url";function St(e){var t=e.stream,i=e.streamType,n=e.webcam,r=e.mic,o=e.audioIcon,s=e.preview,l=e.lightingCanvasRef,u=e.videoElementRef,c=t;return i===_t&&(c="".concat(t,"?webcam=true")),a.a.createElement(bt,null,a.a.createElement(wt,null,!t&&a.a.createElement("div",null,"Waiting for permission"),n&&i===_t&&a.a.createElement(vt,{className:"hv-ext-webcam-preview"},a.a.createElement(yt,{src:"".concat(c)})),t&&i!==_t&&a.a.createElement(Et,null,n&&a.a.createElement(Ye.a,{stream:t,ref:u}),n&&t&&s&&a.a.createElement(mt.a,{ref:l}),!n&&r&&a.a.createElement(lt,{stream:t,audioIcon:o,streamType:i}))))}O.c.div(Tt||(Tt=Xe()(["\n position: relative;\n display: flex;\n"]))),O.c.div(Ct||(Ct=Xe()(["\n position: absolute;\n height: 25px;\n width: 2px;\n left: 22px;\n border: 0px;\n"])));var Tt,Ct,kt,xt,At,Pt,It=O.c.div(kt||(kt=Xe()(['\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 3px;\n & > span {\n font-family: "Open Sans";\n }\n /* Disable button text select by default */\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\n supported by Chrome, Edge, Opera and Firefox */\n']))),Rt=Object(O.c)(It)(xt||(xt=Xe()(["\n height: 45px;\n margin-top: 3px;\n background-color: #434141;\n & > img {\n height: 10px;\n margin-bottom: 3px;\n }\n & > span {\n font-size: 9px;\n color: ",";\n }\n"])),function(e){return r()(this,void 0),e.checked?"#37C689":"#EFEFEF"}.bind(void 0)),Dt=Object(O.c)(It)(At||(At=Xe()(["\n width: 85px;\n height: 85px;\n border-radius: 8px;\n margin: 10px;\n opacity: 0.77;\n transition: 0.3s;\n display: ",";\n border: ",";\n background-color: #0a0a0a;\n pointer-events: ",';\n & > span {\n font-family: "Open Sans";\n font-size: 8px;\n color: ',";\n font-weight: 600;\n }\n & > img {\n height: 28px;\n margin-bottom: 5px !important;\n transition: 0.4s;\n filter: ",";\n ",";\n }\n &:after {\n content: '';\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: #16C669;\n background-image: url(",");\n background-repeat: no-repeat;\n background-position: center;\n background-size: 50%;\n top: 5px;\n right: 5px;\n transition: 0.3s;\n transform: scale(0);\n }\n ",";\n &:active {\n transform: scale(0.8);\n }\n"])),function(e){return r()(this,void 0),!e.checked&&e.recordingStarted?"none":"inherit"}.bind(void 0),function(e){return r()(this,void 0),e.checked&&!e.recordingStarted?"2px solid #37C689;":"2px solid #0a0a0a;"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"none":"all"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"#FFFFFF":e.checked?"#37C689":"#FFFFFF"}.bind(void 0),function(e){return r()(this,void 0),e.recordingStarted?"brightness(0) saturate(100%) invert(100%) sepia(18%) saturate(2%) hue-rotate(146deg) brightness(110%) contrast(101%)":"none"}.bind(void 0),function(e){if(r()(this,void 0),"webcam"==e.type&&!e.checked)return"\n -transform: scale(1.7);\n -margin-top: -1px;"}.bind(void 0),function(e){return r()(this,void 0),e.tickUrl}.bind(void 0),function(e){if(r()(this,void 0),e.checked&&!e.recordingStarted)return"\n &:after {\n // content: '';\n // position: absolute;\n // width: 10px;\n // height: 10px;\n // border-radius: 50%;\n // background-color: #16C669;\n // background-image: url('/svg/tick-white.svg');\n // background-repeat: no-repeat;\n // background-position: center;\n // background-size: 50%;\n // bottom: -5px;\n transform: scale(1);\n }"}.bind(void 0)),Ot=1,Nt=2;function Lt(e){var t=this,i=e.type,n=e.checked,o=e.label,s=e.onClick,l=e.optionType,u=e.recordingStarted,c=function(e){switch(r()(this,t),e){case"webcam":return n?Object(N.d)("/svg/rapi/webcam-on.svg"):Object(N.d)("/svg/rapi/webcam-off.svg");case"screen":return n?Object(N.d)("/svg/rapi/screen-on.svg"):Object(N.d)("/svg/rapi/screen-off.svg");default:return n?Object(N.d)("/svg/rapi/mic-on.svg"):Object(N.d)("/svg/rapi/mic-off.svg")}}.bind(this);return function(){var e=this;return r()(this,t),l===Ot?a.a.createElement(Dt,{onClick:function(){return r()(this,e),s(i)}.bind(this),checked:n,recordingStarted:u,type:i,tickUrl:Object(N.d)("/svg/tick-white.svg")},a.a.createElement(a.a.Fragment,null,a.a.createElement("img",{src:c(i)})),a.a.createElement("span",null,o)):a.a.createElement(Rt,{onClick:function(){return r()(this,e),s(i)}.bind(this),checked:n},a.a.createElement("img",{src:c(i)}),a.a.createElement("span",null,o))}.bind(this)()}var Mt=O.c.div(Pt||(Pt=Xe()(["\n position: absolute;\n width: 60px;\n height: 165px;\n background-color: rgba(0,0,0,0.8);\n right: 0;\n top: 20%;\n border-radius: 7px 0 0 7px;\n padding: 7px 3px;\n z-index: 11;\n"])));function Ft(e){var t=this,i=e.handleOptionsSelect,n=e.userSelect,o=e.webcam,s=e.screen,l=e.mic,u=e.screenEnabled,c=e.webcamEnabled,d=e.micEnabled;return a.a.createElement(Mt,null,(n||c)&&a.a.createElement(Lt,{type:"webcam",onClick:function(){return r()(this,t),i("webcam")}.bind(this),checked:o,previewEnabled:!o,label:"WEBCAM",optionType:Nt}),(n||u)&&a.a.createElement(Lt,{type:"screen",onClick:function(){return r()(this,t),i("screen")}.bind(this),checked:s,previewEnabled:!s,label:"SCREEN RECORD",optionType:Nt}),(n||d)&&a.a.createElement(Lt,{type:"mic",onClick:function(){return r()(this,t),i("mic")}.bind(this),checked:l,previewEnabled:!l,label:"MIC",optionType:Nt}))}var Ut,Bt,Vt,zt=O.c.div(Ut||(Ut=Xe()(["\n position: ",";\n width: 100%;\n display: flex;\n height: 100%;\n background-color: rgba(47, 48, 49, 0.86);\n top: 0;\n z-index: 10;\n border-radius: ",";\n left: 0;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n"])),function(e){return r()(this,void 0),e.screen?"fixed":"absolute"}.bind(void 0),function(e){return r()(this,void 0),e.screen?"0":"10px"}.bind(void 0)),Ht=O.c.div(Bt||(Bt=Xe()(["\n width: 135PX;\n height: 135PX;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 15;\n border-radius: 50%;\n background-color: transparent;\n border: 7px solid #ECEDF4;\n"]))),jt=O.c.div(Vt||(Vt=Xe()(["\n position: absolute;\n font: normal normal normal 71px/97px Open Sans;\n font-weight: 600;\n color: #E5E9F5;\n width: 40px;\n letter-spacing: 1.28px;\n"])));function Gt(e){var t=this,i=e.time,n=e.screen,s=e.onCountdownComplete,l=parseInt(i)||3,u=Object(o.useState)(l),c=u[0],d=u[1];return Object(o.useEffect)(function(){var e=this;if(r()(this,t),1!==c){var i=setTimeout(function(){r()(this,e),d(c-1)}.bind(this),1e3);return function(){return r()(this,e),clearTimeout(i)}.bind(this)}setTimeout(function(){r()(this,e),s&&s()}.bind(this),1e3)}.bind(this)),a.a.createElement(zt,{screen:n},a.a.createElement(Ht,null,a.a.createElement(jt,null,c)))}var qt,Wt=O.c.div(qt||(qt=Xe()(["\n display: flex;\n margin: ",";\n justify-content:",";\n -width: 300px;\n margin: 0 auto;\n background-color: #2E2E2E;\n border: none;\n"])),function(e){return r()(this,void 0),e.previewEnabled?"0 auto":"none"}.bind(void 0),function(e){return r()(this,void 0),e.previewEnabled,"center"}.bind(void 0));function $t(e){var t=this,i=e.userSelect,n=e.screenEnabled,o=e.webcamEnabled,s=e.micEnabled,l=e.screen,u=e.webcam,c=e.mic,d=e.recordingStarted,h=e.handleOptionsSelect;return a.a.createElement(Wt,{previewEnabled:!l},(n||i)&&a.a.createElement(Lt,{type:"screen",onClick:function(){return r()(this,t),h("screen")}.bind(this),checked:l,previewEnabled:!l,label:"SCREEN RECORD",recordingStarted:d,optionType:Ot}),(i||o)&&a.a.createElement(Lt,{type:"webcam",onClick:function(){return r()(this,t),h("webcam")}.bind(this),checked:u,previewEnabled:!u,label:"WEBCAM",recordingStarted:d,optionType:Ot}),(i||s)&&a.a.createElement(Lt,{type:"mic",onClick:function(){return r()(this,t),h("mic")}.bind(this),checked:c,previewEnabled:!c,label:"MICROPHONE",recordingStarted:d,optionType:Ot}))}var Yt=i(386);class Kt{constructor(e){console.log("DATA ",e);const t=window._HVDomain||"https://www.hippovideo.io";this.token=e.token,this.tokenType=e.tokenType,this.email=e.email;const i={baseURL:t+Yt.a,headers:{accept:"application/json"}};if(this.tokenType===Q.e.RECORDER_SDK_TOKEN){let e=`${this.tokenType}$$${this.token}`;i.headers.Authorization="Basic "+btoa(e)}if(this.tokenType===Q.e.AUTHENTICATION_TOKEN){let e=`${this.tokenType}$$${this.token}$$${this.email}`;i.headers.Authorization="Basic "+btoa(e)}this.axiosInstance=z.a.create(i)}getAllScripts(e){return this._sendRequest({method:"get",params:e})}async _sendRequest({method:e="get",url:t="",jsonData:i=null,formData:n=null,params:r={},headers:o={},additionalReqConfig:a={}}){try{let s=n;if(n){if("object"==typeof n&&null!==n){let e=new FormData;for(const t in n)e.append(t,n[t]);s=e}o["Content-Type"]="application/x-www-form-urlencoded"}i&&(o["Content-Type"]="application/json");const l={url:t,method:e,data:i||s,headers:o,params:r,...a};console.log("REQUEST CONFIG ",l);return[await this.axiosInstance.request(l),null]}catch(e){if(console.log("ERROR >>>> ",e),z.a.isCancel(e)){return[null,{message:e.message,is_cancelled:!0}]}return[null,e]}}}i(77);var Jt=i(36),Xt=i.n(Jt),Qt=i(37),Zt=i.n(Qt),ei=i(49),ti=i.n(ei),ii=i(54),ni=i.n(ii),ri=i(41),oi=i.n(ri),ai=(i(236),i(136),i(86),i(67),i(52),i(105),i(340),i(135),i(56),i(71),i(84),i(239),i(183),i(224),i(11)),si=i(35),li=i.n(si),ui=i(387),ci=i.n(ui),di=i(388),hi=i.n(di),pi=i(389),fi=i.n(pi),gi=i(149),mi=i.n(gi),vi=i(187),yi=i.n(vi),bi=i(6),wi=i.n(bi),Ei=i(7),_i=i.n(Ei);function Si(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=oi()(e);if(t){var r=oi()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ni()(this,i)}}var Ti,Ci,ki,xi,Ai,Pi,Ii=window.HippoVideo&&window.HippoVideo.data&&HippoVideo.data.api.getProperty("isNewRecordScreenEnabled"),Ri=function(e){ti()(i,e);var t=Si(i);function i(){return Xt()(this,i),t.apply(this,arguments)}return Zt()(i,[{key:"initialize",value:function(e){HippoVideo.UserProfile||(HippoVideo.UserProfile={}),this.prompterId=e.promptContainer||"teleprompterSiblingDiv";var t=(HippoVideo.UserProfile.userFirstName+" "+HippoVideo.UserProfile.userLastName).trim();this.mergeFieldValues={"Lead Name":t,"Lead Email":HippoVideo.UserProfile.userEmail,"Lead Company Name":HippoVideo.UserProfile.userCompanyName},this.mergeFieldValues=ai.default.extend({},this.mergeFieldValues,e.mergeFieldValues||{}),this.sdkTeleprompter=e.sdkTeleprompter||!1,this.origin=this.sdkTeleprompter?window._HVDomain||"https://assets.hippovideo.io":"",this.initialTop=e.initialTop||0,this.lastLineHeight=e.lastLineHeight||60,this.minFontSize=e.minFontSize||15,this.maxFontSize=e.maxFontSize||45,this.minLineSpace=e.minLineSpace||1,this.maxLineSpace=e.maxLineSpace||3,this.minSpeedVal=e.minSpeed||1,this.maxSpeedVal=e.maxSpeed||10,this.newRecorderScreen="newRecorderScreen"==e.from,this.initialScroll=0,this.scrollTimerDown=void 0,this.scriptSelected=!1,this.defaultScriptId=e.defaultScriptId,this.enableChangeScript=null==e.enableChangeScript||e.enableChangeScript,this.settingModel=new yi.a({settingTabName:wi.a.wizSetting.VIDEO_SCRIPT,guestToken:e.guestToken}),this.prompterModel=e.prompterModel,this.callback=e.callback,this.fromChecklistProspecting=e.fromChecklistProspecting,this.fromChecklistInviteVideo=e.fromChecklistInviteVideo,this.initLineSpace(),this.initSpeed(),this.initTextSize(),this.userEmail=HippoVideo.UserProfile.userEmail,this.spaceAllowedTags=["TEXTAREA","INPUT"],this.promptStarted=!1,this.promptCompleted=!1,this.scrollTimeout=50,this.prompterSpeedVal=10,this.nextStep=1,this.allScripts=[],this.showFirstVideoScript=!1,this.isRendered=!1,this.render()}},{key:"bindEvents",value:function(){this.enableDisablePrompter=this.enableDisablePrompter.bind(this),this.selectVideoScript=this.selectVideoScript.bind(this),this.initPrompt=this.initPrompt.bind(this),this.startPrompt=this.startPrompt.bind(this),this.keyPressEvent=this.keyPressEvent.bind(this),this.setSpeedProperties=this.setSpeedProperties.bind(this),this.restartPrompt=this.restartPrompt.bind(this),this.resetPrompt=this.resetPrompt.bind(this),this.changeTextWithMFValues=this.changeTextWithMFValues.bind(this),this.changeVideoScript=this.changeVideoScript.bind(this),this.textSizeIncrease=this.textSizeIncrease.bind(this),this.textSizeDecrease=this.textSizeDecrease.bind(this),this.speedIncrease=this.speedIncrease.bind(this),this.speedDecrease=this.speedDecrease.bind(this),this.lineSpaceIncrease=this.lineSpaceIncrease.bind(this),this.lineSpaceDecrease=this.lineSpaceDecrease.bind(this),this.addNewScriptFromPrompt=this.addNewScriptFromPrompt.bind(this),this.speedSliderChange=this.speedSliderChange.bind(this),this.allScriptsFetchSuccess=this.allScriptsFetchSuccess.bind(this),this.allScriptsFetchFailure=this.allScriptsFetchFailure.bind(this),this.addNewScriptFromAllScripts=this.addNewScriptFromAllScripts.bind(this),this.addNewScriptFromMyScripts=this.addNewScriptFromMyScripts.bind(this),this.refreshVideoPrompter=this.refreshVideoPrompter.bind(this),this.changeVideoScriptWithId=this.changeVideoScriptWithId.bind(this),this.handleTabChange=this.handleTabChange.bind(this)}},{key:"initEvents",value:function(){this.delegate("click",".script-list",this.selectVideoScript),this.delegate("click","#changeScriptId",this.changeVideoScript),this.delegate("click","#addNewScriptFromPrompt",this.addNewScriptFromPrompt),this.delegate("click","#addNewScriptFromAllScripts",this.addNewScriptFromAllScripts),this.delegate("click","#addNewScriptFromMyScripts",this.addNewScriptFromMyScripts),this.delegate("click","#refreshPrompterPages",this.refreshVideoPrompter),this.delegate("click",".tab-title",this.handleTabChange),ve()("#enableScriptId").on("click",this.enableDisablePrompter),ve()("#disableScriptId").on("click",this.enableDisablePrompter),ve()("#speedDecreaseId").on("click",this.speedDecrease),ve()("#speedIncreaseId").on("click",this.speedIncrease),ve()("#textSizeIncrease").on("click",this.textSizeIncrease),ve()("#textSizeDecrease").on("click",this.textSizeDecrease),ve()("#lineSpaceIncrease").on("click",this.lineSpaceIncrease),ve()("#lineSpaceDecrease").on("click",this.lineSpaceDecrease),ve()(document).off("keydown"),ve()(document).on("keydown",this.keyPressEvent)}},{key:"render",value:function(){var e=this,t={to_prompt:!0};this.prompterModel?this.prompterModel.getAllScripts(t).then(function(t){return r()(this,e),this.allScriptsFetchSuccess(t)}.bind(this)).catch(function(t){return r()(this,e),this.allScriptsFetchFailure(t)}.bind(this)):this.settingModel.getAllVideoScript(t,function(t){r()(this,e),this.allScriptsFetchSuccess(t)}.bind(this),function(t){r()(this,e),this.allScriptsFetchFailure(t)}.bind(this))}},{key:"allScriptsFetchSuccess",value:function(e){this.$el.empty();var t={inactive_minus:this.inActiveMinus,inactive_plus:this.inActivePlus,inactive_minus_linespace:this.inActiveMinusLine,inactive_plus_linespace:this.inActivePlusLine,inactive_minus_speed:this.inActiveMinusSpeed,inactive_plus_speed:this.inActivePlusSpeed,newRecorderScreen:this.newRecorderScreen,origin:this.origin};if(1==Ii&&this.newRecorderScreen){this.$el.append(hi()(ai.default.extend({},t,e,mi.a))),this.prompterSpeedVal=15;var i=parseInt(this.$el.find("#speedSliderId").attr("data-value"));this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-i)*this.prompterSpeedVal}else if(this.sdkTeleprompter){var n=e[0],r=e[1];if(r)return this.allScriptsFetchFailure(r);this.$el.append(fi()(ai.default.extend({},t,n.data,mi.a)))}else this.$el.append(ci()(ai.default.extend({},t,e,mi.a)));this.mergeFieldValues["Lead Company Name"]=e.company_name,this.bindEvents(),this.initEvents(),this.prompterModel||ve()(document).foundation(),null!=this.defaultScriptId&&(0==this.defaultScriptId?ve()("#allVideoScripts .script-list").first().click():ve()("#allVideoScripts").find("#"+this.defaultScriptId).click()),this.enableChangeScript||ve()("#changeScriptId").remove(),this.callback&&this.callback();var o=_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId),a=_i.a.getLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId),s=_i.a.getLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId);o&&ve()("#teleprompterId").css("line-height",o),a&&ve()("#teleprompterId").css("font-size",a+"px"),s&&!isNaN(s)?(parseInt(s)>10&&(s=parseInt(s)/10),ve()("#speedSliderId").attr("data-value",s).text(s)):(s=5,ve()("#speedSliderId").attr("data-value",s).text(s)),(this.fromChecklistProspecting||this.fromChecklistInviteVideo)&&(this.myScripts=e.my_scripts,this.enableChecklistTeleprompterScript()),this.allScripts=e.all_scripts,this.showFirstVideoScript&&this.displayFirstVideoScript(),this.isRendered=!0}},{key:"allScriptsFetchFailure",value:function(e){console.log("ERROR >>> ",e)}},{key:"enableFirstVideoScript",value:function(){this.showFirstVideoScript=!0}},{key:"displayFirstVideoScript",value:function(){if(!HippoVideo.data.api.getProperty("videosCreatedByUser")&&1==HippoVideo.data.api.getProperty("isSalesUser")&&1==HippoVideo.data.api.getProperty("isTrialPlan")){var e=this.getFirstVideoScript();e&&(this.enableDisablePrompter(),HippoVideo.data.api.getProperty("isNewRecordScreenEnabled")&&(ve()(".hvrecorder-promptscript-container").removeClass("disp-none"),ve()("#videoPrompterContainer").removeClass("disp-none"),ve()("#toggleTeleprompterMenu input").attr("checked",!0)),this.changeVideoScriptWithId(e.id),this.enableFirstVideoScriptTooltip())}}},{key:"enableFirstVideoScriptTooltip",value:function(){ve()("#enableScriptId, #disableScriptId").addClass("newpr-tooltip").attr("tooltip-hippo",mi.a.videoPrompter.firstVideoTooltip),_i.a.trackInThirdPartyTools("FV - teleprompter tooltip",{email:this.userEmail})}},{key:"getFirstVideoScript",value:function(){var e=this;return this.allScripts.filter(function(t){return r()(this,e),t.is_first_script}.bind(this))[0]}},{key:"enableChecklistTeleprompterScript",value:function(){var e=this;this.myScripts&&(this.enableDisablePrompter(),this.myScripts.forEach(function(t){r()(this,e),(this.fromChecklistProspecting&&"Prospecting video"==t.title||this.fromChecklistInviteVideo&&"Event invite video / greetings video"==t.title)&&this.changeVideoScriptWithId(t.id)}.bind(this)))}},{key:"initPrompt",value:function(){this.promptheight=ve()("#teleprompterId").height(),this.promptTop=this.$el.find("#"+this.prompterId).css("top");var e=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",e),"auto"==this.promptTop?this.promptTop=this.$el.find("#"+this.prompterId).position().top:this.promptTop=parseInt(this.promptTop.substr(0,this.promptTop.length-2))}},{key:"refreshVideoPrompter",value:function(){_i.a.trackInThirdPartyTools("Video Prompt refresh clicked",{email:this.userEmail}),this.render(),ve()("#refreshPrompterPages").addClass("refreshing")}},{key:"selectVideoScript",value:function(e){var t=e.currentTarget.dataset.text;t=this.changeTextWithMFValues(t),ve()("#teleprompterId").text(t),this.$el.find("#"+this.prompterId).css("top","auto"),this.$el.find("#scriptListId, #scriptTypesId").addClass("hide"),this.$el.find("#promptSettingsContainer").removeClass("hide"),this.initPrompt(),this.scriptSelected=!0,this.selectedScriptId=e.currentTarget.id,ve()("#telepromterColumnContainer").scrollTop(0),_i.a.trackInThirdPartyTools("Video Prompt on record - script selected",{email:this.userEmail})}},{key:"changeVideoScriptWithId",value:function(e){if(this.$el.find("#"+e).length>0){var t=this.$el.find("#"+e).attr("data-text");t=this.changeTextWithMFValues(t),ve()("#teleprompterId").text(t),this.$el.find("#"+this.prompterId).css("top","auto"),this.$el.find("#scriptListId, #scriptTypesId").addClass("hide"),this.$el.find("#promptSettingsContainer").removeClass("hide"),this.initPrompt(),this.scriptSelected=!0,this.selectedScriptId=e,_i.a.trackInThirdPartyTools("Video Prompt on record - script selected",{email:this.userEmail})}}},{key:"changeTextWithMFValues",value:function(e){for(var t in this.mergeFieldValues){var i=this.mergeFieldValues[t];if(i){var n="\\${"+t+"}";e=e.replace(new RegExp(n,"g"),i)}}return e}},{key:"enableDisablePrompter",value:function(){this.$el.toggleClass("disp-none"),ve()("#videoPrompterNote, .ed-prompter-link").toggleClass("hide"),ve()("#enableScriptId").hasClass("hide")?this.scriptSelected=!1:this.scriptSelected=!0,this.restartPrompt(),this.resetPrompt(),this.$el.find("#promptSettingsContainer").addClass("hide"),this.$el.find("#scriptTypesId, #scriptListId").removeClass("hide"),this.scriptSelected=!1,ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll");var e=ve()("#enableScriptId").hasClass("hide")?"enabled":"disabled";_i.a.trackInThirdPartyTools("Sales - teleprompter clicked "+e,{email:this.userEmail})}},{key:"keyPressEvent",value:function(e){var t=e.keyCode;this.spaceAllowedTags.includes(e.target.nodeName)||this.$el.find("#teleprompterId").is(":focus")||32!=t||(e.preventDefault(),e.stopPropagation()),this.$el.find("#teleprompterId").is(":focus")||32==t&&(this.promptStarted?(ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll"),this.stopPrompt(),this.promptStarted=!1,this.promptCompleted=!1):(this.startPrompt(),this.promptStarted=!0),1==this.promptCompleted&&this.restartPrompt(),_i.a.trackInThirdPartyTools("Video Prompt on record - space pressed",{email:this.userEmail}))}},{key:"startPrompt",value:function(){if(this.scriptSelected)if(this.initPrompt(),parseInt(this.promptTop)>=-1*this.promptheight+this.lastLineHeight){this.$el.find("#"+this.prompterId).css("top",parseInt(this.promptTop)-this.nextStep),ve()("#promptPropertiesId .font-size").addClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").addClass("show-tooltip"),ve()("#telepromterColumnContainer").addClass("disable-teleprompt-scroll");var e=-1*(parseInt(this.promptTop)-this.nextStep);setTimeout((function(){ve()("#telepromterColumnContainer").scrollTop(e)}),1),ve()("#teleprompterId").attr("contenteditable","false"),this.scrollTimerDown&&this.stopPrompt(),this.scrollTimerDown=setTimeout(this.startPrompt,this.scrollTimeout)}else ve()("#teleprompterId").attr("contenteditable","true"),ve()("#promptPropertiesId .font-size").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .linespace-container").removeClass("disable-teleprompt-options"),ve()("#promptPropertiesId .font-size").removeClass("show-tooltip"),ve()("#promptPropertiesId .linespace-container").removeClass("show-tooltip"),ve()("#telepromterColumnContainer").removeClass("disable-teleprompt-scroll"),this.stopPrompt()}},{key:"isScriptSelected",value:function(){return this.scriptSelected}},{key:"getSelectedScriptId",value:function(){return this.selectedScriptId}},{key:"getTeleprompterTrackingParams",value:function(){return{"prompt-line-space":parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId)),"prompt-speed-val":parseInt(this.$el.find("#speedSliderId").attr("data-value")),"prompt-font-size":parseInt(ve()("#teleprompterId").css("font-size"))}}},{key:"stopPrompt",value:function(){if(this.scrollTimerDown){clearTimeout(this.scrollTimerDown);var e=-1*(parseInt(this.promptTop)-this.nextStep);ve()("#teleprompterId").outerHeight()-89<=e&&(this.promptCompleted=!0)}}},{key:"restartPrompt",value:function(){this.resetPrompt(),this.startPrompt()}},{key:"resetPrompt",value:function(){this.stopPrompt(),this.$el.find("#"+this.prompterId).animate({top:this.initialTop}),ve()("#telepromterColumnContainer").scrollTop(this.initialScroll)}},{key:"changeVideoScript",value:function(){this.$el.find("#promptSettingsContainer").addClass("hide"),this.$el.find("#scriptTypesId, #scriptListId").removeClass("hide"),this.scriptSelected=!1,_i.a.trackInThirdPartyTools("Video Prompt on record - change script clicked",{email:this.userEmail})}},{key:"textSizeIncrease",value:function(){var e=parseInt(ve()("#teleprompterId").css("font-size"));if(e>=this.maxFontSize)this.$el.find("#textSizeIncrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#textSizeDecrease").removeClass("in-active"),(e+=5)>=this.maxFontSize&&this.$el.find("#textSizeIncrease").addClass("in-active"),ve()("#teleprompterId").css("font-size",e+"px");var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - text size increased",{email:this.userEmail})}}},{key:"textSizeDecrease",value:function(){var e=parseInt(ve()("#teleprompterId").css("font-size"));if(e<=this.minFontSize)this.$el.find("#textSizeDecrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#textSizeIncrease").removeClass("in-active"),(e-=5)<=this.minFontSize&&this.$el.find("#textSizeDecrease").addClass("in-active"),ve()("#teleprompterId").css("font-size",e+"px");var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - text size decreased",{email:this.userEmail})}}},{key:"speedIncrease",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value")),t=e+1,i=parseInt(this.$el.find("#speedSliderId").attr("data-max"));e>=i||(this.$el.find(".speed-plus-container").removeClass("in-active"),e+=1,this.$el.find("#speedSliderId").attr("data-value",e).text(e),this.setSpeedProperties(),t>=i&&this.$el.find(".speed-plus-container").addClass("in-active"),this.$el.find(".speed-minus-container").removeClass("in-active"),_i.a.trackInThirdPartyTools("Video Prompt on record - speed increased",{email:this.userEmail}))}},{key:"speedDecrease",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value")),t=e-1,i=parseInt(this.$el.find("#speedSliderId").attr("data-min"));e<=i||(this.$el.find(".speed-minus-container").removeClass("in-active"),e-=1,this.$el.find("#speedSliderId").attr("data-value",e).text(e),this.setSpeedProperties(),t<=i&&this.$el.find(".speed-minus-container").addClass("in-active"),this.$el.find(".speed-plus-container").removeClass("in-active"),_i.a.trackInThirdPartyTools("Video Prompt on record - speed decreased",{email:this.userEmail}))}},{key:"lineSpaceIncrease",value:function(){var e=parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId));if(e>=this.maxLineSpace)this.$el.find("#lineSpaceIncrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#lineSpaceDecrease").removeClass("in-active"),(e+=.25)>=this.maxLineSpace&&this.$el.find("#lineSpaceIncrease").addClass("in-active"),ve()("#teleprompterId").css("line-height",e);var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - line space increased",{email:this.userEmail})}}},{key:"lineSpaceDecrease",value:function(){var e=parseFloat(_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId));if(e<=this.minLineSpace)this.$el.find("#lineSpaceDecrease").addClass("in-active");else{this.resetPrompt(),this.$el.find("#lineSpaceIncrease").removeClass("in-active"),(e-=.25)<=this.minLineSpace&&this.$el.find("#lineSpaceDecrease").addClass("in-active"),ve()("#teleprompterId").css("line-height",e);var t=ve()("#teleprompterId").outerHeight(!0);ve()("#teleprompterSiblingDiv").css("min-height",t),_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,e),_i.a.trackInThirdPartyTools("Video Prompt on record - line sapce decreased",{email:this.userEmail})}}},{key:"hidePromptProperties",value:function(){console.log("HIDE CALLED"),this.$el.find("#promptPropertiesId").addClass("hide")}},{key:"showPromptProperties",value:function(){this.$el.find("#promptPropertiesId").removeClass("hide")}},{key:"addNewScriptFromPrompt",value:function(){if(_i.a.trackInThirdPartyTools("Video Prompt on record - right side add new script clicked",{email:this.userEmail}),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg){var e=new URL(window.location.protocol+"//"+window.location.host+"/video-scripts/home"),t={authentication_token:HippoVideo.UserProfile.authToken,email:HippoVideo.UserProfile.userEmail,open_new:!0};e.search=new URLSearchParams(t).toString(),window.open(e)}else window.open("/video-scripts/home?open_new=true","_blank");window.opener=null}},{key:"addNewScriptFromAllScripts",value:function(){_i.a.trackInThirdPartyTools("Video Prompt on record - add new script clicked from all scripts",{email:this.userEmail}),window.open("/video-scripts/home?open_new=true","_blank"),window.opener=null}},{key:"addNewScriptFromMyScripts",value:function(){if(_i.a.trackInThirdPartyTools("Video Prompt on record - add new script clicked from my scripts",{email:this.userEmail}),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg){var e=new URL(window.location.protocol+"//"+window.location.host+"/video-scripts/home"),t={authentication_token:HippoVideo.UserProfile.authToken,email:HippoVideo.UserProfile.userEmail,open_new:!0};e.search=new URLSearchParams(t).toString(),window.open(e)}else window.open("/video-scripts/home?open_new=true","_blank");window.opener=null}},{key:"handleTabChange",value:function(e){e.preventDefault(),ve()(".tab-title").removeClass("active"),ve()(".content").removeClass("active"),ve()(e.target.attributes[0].nodeValue).addClass("active"),ve()(e.target.attributes[0].nodeValue+"Title").addClass("active");var t=e.target.getAttribute("data-tab");ve()("#"+t).addClass("active"),ve()("#"+t+"Title").addClass("active")}},{key:"speedSliderChange",value:function(){_i.a.trackInThirdPartyTools("Video Prompt on record - speed slider changed",{email:this.userEmail}),this.setSpeedProperties()}},{key:"setSpeedProperties",value:function(){var e=parseInt(this.$el.find("#speedSliderId").attr("data-value"));_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,e),this.nextStep=1,this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-e)*this.prompterSpeedVal,this.restartPrompt()}},{key:"setDefaultSpeed",value:function(e){var t=parseInt(this.$el.find("#speedSliderId").attr("data-value"));e&&!isNaN(e)&&(this.$el.find("#speedSliderId").attr("data-value",e).text(e),t=e),this.nextStep=1,this.scrollTimeout=(parseInt(this.$el.find("#speedSliderId").attr("data-max"))-t)*this.prompterSpeedVal}},{key:"initLineSpace",value:function(){var e=_i.a.getLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId);null==e?(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.minLineSpace),this.inActiveMinusLine=!0,this.inActivePlusLine=!1):e>=this.maxLineSpace?(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.maxLineSpace),this.inActiveMinusLine=!1,this.inActivePlusLine=!0):e<=this.minLineSpace&&(_i.a.setLocalStorageValue("prompt-line-space-"+HippoVideo.UserProfile.userId,this.minLineSpace),this.inActiveMinusLine=!0,this.inActivePlusLine=!1)}},{key:"initTextSize",value:function(){var e=_i.a.getLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId),t=e;null==e?(t=this.minFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!0,this.inActivePlus=!1):e>=this.maxFontSize?(t=this.maxFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!1,this.inActivePlus=!0):e<=this.minFontSize&&(t=this.minFontSize,_i.a.setLocalStorageValue("prompt-text-font-"+HippoVideo.UserProfile.userId,t),this.inActiveMinus=!0,this.inActivePlus=!1),ve()("#teleprompterId").css("font-size",t+"px")}},{key:"initSpeed",value:function(){var e=_i.a.getLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId),t=e;null==e?(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.minSpeedVal),t=this.minSpeedVal,this.inActiveMinusSpeed=!0,this.inActivePlusSpeed=!1):e>=this.maxSpeedVal?(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.maxSpeedVal),t=this.maxSpeedVal,this.inActiveMinusSpeed=!1,this.inActivePlusSpeed=!0):e<=this.minSpeedVal&&(_i.a.setLocalStorageValue("prompt-speed-"+HippoVideo.UserProfile.userId,this.minSpeedVal),t=this.minSpeedVal,this.inActiveMinusSpeed=!0,this.inActivePlusSpeed=!1),this.$el.find("#speedSliderId").text(t)}},{key:"destroy",value:function(){ve()(document).off("keydown",this.keyPressEvent),this.undelegateEvents()}}]),i}(li.a.View),Di=O.c.div(Ti||(Ti=Xe()(["\n width: 100%;\n margin: auto;\n position: absolute;\n left: 50%;\n top: 0;\n transform: translateX(-50%);\n z-index: 11;\n -background: transparent linear-gradient(180deg, #000000 0%, #000000CC 83%, #00000000 100%) 0% 0% no-repeat padding-box;\n background: rgba(0,0,0,0.5);\n -border: 1px solid #dbdbdb;\n transition: opacity 0.5s linear, transform 0.2s linear;\n border-radius: 15px 15px 0 0;\n"])));function Oi(e){var t=this,i=e.countdownStarted,n=e.recordingStarted;console.log("teleprompter loaded!!!");var s=Object(o.useRef)(),l=Object(o.useRef)(),u=Object(o.useContext)(L.a).authentication;console.log("authentication ",u);var c=function(){r()(this,t),s.current.setDefaultSpeed(1)}.bind(this);return Object(o.useEffect)(function(){r()(this,t),i&&s.current&&(s.current.resetPrompt(),s.current.hidePromptProperties())}.bind(this),[i]),Object(o.useEffect)(function(){r()(this,t),s.current&&(n?s.current.restartPrompt():(s.current.resetPrompt(),s.current.showPromptProperties()))}.bind(this),[n]),Object(o.useLayoutEffect)(function(){var e=this;r()(this,t);var i=new Kt({token:u.token,tokenType:u.tokenType,email:u.email});return s.current=new Ri({el:l.current,defaultScriptId:0,prompterModel:i,sdkTeleprompter:!0,enableChangeScript:!1,callback:c}),function(){r()(this,e),s.current.destroy(),s.current=null}.bind(this)}.bind(this),[]),s.current&&!s.current.isScriptSelected()&&n?null:a.a.createElement(Di,{ref:l})}var Ni,Li=O.c.div(Ci||(Ci=Xe()(["\n position: absolute;\n z-index: 30;\n background: #212126;\n width: 240px;\n box-shadow: 0px 8px 12px rgba(0,0,0,0.1);\n border: 1px solid #34343C;\n bottom: 100%;\n left: 10px;\n border-radius: 5px;\n padding: 8px 5px 12px 5px;\n"]))),Mi=O.c.div(ki||(ki=Xe()(["\n width: 90%;\n margin: 0 auto;\n text-align: left;\n"]))),Fi=O.c.div(xi||(xi=Xe()(["\n color: #C3C3C3;\n font: normal normal 600 14px/16px Open Sans;\n border-bottom: 1px solid #34343C;\n height: 30px;\n display: flex;\n align-items: center;\n"]))),Ui=O.c.div(Ai||(Ai=Xe()(["\n font: normal normal 600 13px/16px Open Sans;\n color: #C3C3C3;\n margin-top: 5px;\n > span {\n color: #FC3B52;\n }\n"]))),Bi=O.c.div(Pi||(Pi=Xe()(["\n font: italic normal normal 13px/16px Open Sans;\n color: #C3C3C3;\n margin-top: 5px;\n line-height: 18px;\n"])));function Vi(e){var t=e.info;return a.a.createElement(Li,null,a.a.createElement(Mi,null,a.a.createElement(Fi,null,"Lighting Info"),a.a.createElement(Ui,null,"Status: ",a.a.createElement("span",null,t.status)),a.a.createElement(Bi,null,t.message)))}var zi,Hi,ji,Gi,qi,Wi,$i=O.c.div(Ni||(Ni=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n & > span {\n font-size: 12px;\n color: #D8D8D8;\n }\n & > img {\n margin-left: 5px;\n margin-right: 5px;\n }\n"])));function Yi(e){var t=this,i=e.lightingCanvas,n=e.videoElement,s=Object(o.useState)(!1),l=s[0],u=s[1],c=Object(o.useState)({}),d=c[0],h=c[1],p=n||window&&window.videoPreviewRef&&window.videoPreviewRef.current,f=i||window&&window.lightingCanvasRef&&window.lightingCanvasRef.current,g=Object(o.useRef)();Object(o.useEffect)(function(){var e=this;return r()(this,t),function(){return r()(this,e),clearTimeout(g.current)}.bind(this)}.bind(this),[]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),f&&p){var i=f.getContext("2d"),n=p.offsetWidth,o=n/16*9;f.width=n/15,f.height=o/15,m(p,f,i)}return function(){return r()(this,e),clearTimeout(g.current)}.bind(this)}.bind(this),[f,p,window.videoPreviewRef]);var m=function(e,i,n){if(r()(this,t),0!==i.width&&0!==i.height){n.drawImage(e,0,0,e.videoWidth,e.videoHeight,0,0,i.width,i.height);for(var o=n.getImageData(0,0,i.width,i.height),a=0,s=0;s<o.data.length;s+=4)a+=.21*o.data[s]+.72*o.data[s+1]+.07*o.data[s+2];var l={};(a/=o.data.length)<20?(l.status="Poor",l.message="Your light source is poor. Please move to a better light source."):a<40?(l.status="Good",l.message="Your light source is good. You can improve further by moving to a better light source."):(l.status="Excellent",l.message="Your light source is excellent. Happy recording!"),g.current=setTimeout((function(){window.requestAnimationFrame((function(){m(e,i,n)}))}),1e3),h(l)}}.bind(this);return a.a.createElement($i,{onMouseEnter:function(){return r()(this,t),u(!0)}.bind(this),onMouseLeave:function(){return r()(this,t),u(!1)}.bind(this)},l&&a.a.createElement(Vi,{info:d}),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/lighting-icon.svg"),width:"14"}),a.a.createElement("span",null,"Lighting"),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/info-circle-grey.svg"),width:"10"}))}var Ki,Ji=O.c.div(zi||(zi=Xe()(["\n position: absolute;\n z-index: 30;\n width: 240px;\n bottom: 100%;\n left: -75%;\n background-color: #212126;\n border: 1px solid #34343C;\n border-radius: 6px;\n box-shadow: 0px 8px 12px #00000066;\n"]))),Xi=O.c.div(Hi||(Hi=Xe()(["\n font: normal normal 400 14px/16px Open Sans;\n color: #C3C3C3;\n height: 35px;\n width: 90%;\n display: flex;\n margin: 0 auto;\n align-items: center;\n border-bottom: 1px solid #34343C;\n"]))),Qi=O.c.div(ji||(ji=Xe()(["\n margin-top: 5px;\n display: flex;\n flex-flow: column;\n justify-content: space-evenly;\n min-height: 150px;\n max-height: 200px;\n"]))),Zi=O.c.div(Gi||(Gi=Xe()(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 90%;\n margin: 0 auto;\n min-height: 40px;\n max-height: 60px;\n background-color: #292929;\n border-radius: 6px;\n"]))),en=O.c.div(qi||(qi=Xe()(["\n max-width: 50%;\n font: italic normal normal 13px/16px Open Sans;\n color: #C3C3C3;\n margin-left: 10px;\n text-align: left;\n"]))),tn=O.c.div(Wi||(Wi=Xe()(["\n font: normal normal 600 14px/16px Open Sans;\n color: #FFFFFF;\n margin-right: 10px;\n"])));function nn(e){var t=e.webcamQualityInfo,i=void 0===t?{}:t;return a.a.createElement(Ji,null,a.a.createElement(Xi,null,"Current Webcam Info"),a.a.createElement(Qi,null,a.a.createElement(Zi,null,a.a.createElement(en,null,"Frame rate"),a.a.createElement(tn,null,i.frameRate)),a.a.createElement(Zi,null,a.a.createElement(en,null,"Resolution"),a.a.createElement(tn,null,i.resolution)),a.a.createElement(Zi,null,a.a.createElement(en,null,"Quality"),a.a.createElement(tn,null,i.quality))))}var rn,on=O.c.div(Ki||(Ki=Xe()(["\n display: flex;\n align-items: center;\n justify-content: left;\n position: relative;\n & > span {\n font-size: 12px;\n color: #D8D8D8;\n }\n & > img {\n margin-left: 5px;\n margin-right: 5px;\n }\n"])));function an(e){var t=this,i=e.webcamQualityInfo,n=Object(o.useState)(!1),s=n[0],l=n[1];return a.a.createElement(on,{onMouseEnter:function(){return r()(this,t),l(!0)}.bind(this),onMouseLeave:function(){return r()(this,t),l(!1)}.bind(this)},s&&a.a.createElement(nn,{webcamQualityInfo:i}),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/info-white.svg"),width:"14"}),a.a.createElement("span",null,"Video Quality"))}var sn,ln,un,cn=O.c.div(rn||(rn=Xe()(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n & > span {\n font-size: 11px;\n color: #fff;\n }\n"]))),dn=i(390),hn=i.n(dn),pn=O.c.div(sn||(sn=Xe()(["\n position: relative;\n"]))),fn=O.c.label(ln||(ln=Xe()(['\n position: absolute;\n top: 7px;\n left: 0;\n width: 41px;\n height: 19px;\n border-radius: 20px;\n background: #43454E;\n cursor: pointer;\n &::after {\n content: "";\n display: block;\n border-radius: 50%;\n width: 15px;\n height: 15px;\n margin: 2px;\n background: #ffffff;\n box-shadow: 1px 3px 3px 1px rgba(0, 0, 0, 0.2);\n transition: 0.2s;\n }\n']))),gn=O.c.input(un||(un=Xe()(["\n opacity: 0;\n z-index: 1;\n border-radius: 15px !important;\n margin: 0 !important; /* Foundation is overriding these styles!!!! */\n width: 42px !important; /* Foundation is overriding these styles!!!! */\n height: 26px !important; /* Foundation is overriding these styles!!!! */\n &:checked + ",' {\n background: #37C689;\n &::after {\n content: "";\n display: block;\n border-radius: 50%;\n width: 15px;\n height: 15px;\n margin-left: 22px;\n transition: 0.2s;\n }\n }\n'])),fn);function mn(e){var t=e.selected,i=e.onToggle,n=Object(o.useRef)(hn()("hv-toggle-"));return a.a.createElement(pn,null,a.a.createElement(gn,{id:n.current,onChange:i,type:"checkbox",checked:t}),a.a.createElement(fn,{htmlFor:n.current}))}function vn(e){var t=e.showTeleprompter,i=e.onTeleprompterToggle;return a.a.createElement(cn,null,a.a.createElement(mn,{selected:t,onToggle:i}))}var yn,bn=O.c.div(yn||(yn=Xe()(["\n background-color: #43454E;\n width: 31px;\n height: 31px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 10;\n img {\n width: ",";\n }\n"])),function(e){return r()(this,void 0),e.type===wn.PAUSE_RESUME?"10px":"12px"}.bind(void 0)),wn={PAUSE_RESUME:1,ABORT:2};function En(e){var t=this,i=e.type,n=e.recordingPaused,o=e.onAbortRecording,s=e.onPauseResumeRecording,l=function(){return r()(this,t),i===wn.PAUSE_RESUME?n?Object(N.d)("/svg/rapi/resume-recording.svg"):Object(N.d)("/svg/rapi/pause-recording.svg"):i===wn.ABORT?Object(N.d)("/svg/rapi/abort-recording.svg"):void 0}.bind(this),u=function(e){r()(this,t),i===wn.PAUSE_RESUME&&s(e),i===wn.ABORT&&o(e)}.bind(this);return a.a.createElement(bn,{onClick:u,type:i},a.a.createElement("img",{src:l()}))}i(341),i(61);var _n,Sn=i(145),Tn=i.n(Sn),Cn=(i(111),O.c.div(_n||(_n=Xe()(["\n position: relative;\n width: 100%;\n height: 100%;\n background-color: #121212;\n border-radius: 2px;\n transition: all .5s ease;\n box-shadow: 0px 8px 12px #00000066;\n font: normal normal normal 12px/14px Open Sans;\n text-transform: capitalize;\n color: #FFFFFF;\n text-align: left;\n\n .dropdown-select {\n cursor: ",";\n display: block;\n padding: 10px 30px 10px 10px;\n div {\n text-overflow: ellipsis;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n }\n img {\n position: absolute;\n right: 10px;\n top: 15px;\n }\n }\n\n .dropdown-menu {\n position: absolute;\n width: 100%;\n left: 0;\n margin-top: 1px;\n max-height: 144px;\n overflow-y: auto;\n z-index: 9;\n background-color: #121212;\n border-radius: 2px;\n\n li {\n padding: 10px;\n transition: all .2s ease-in-out;\n cursor: pointer;\n list-style: none;\n &:hover {\n background: #000;\n }\n }\n }\n"])),function(e){return r()(this,void 0),e.enabled?"pointer":"not-allowed"}.bind(void 0)));function kn(e){var t=this,i=e.defaultLabel,n=void 0===i?"Default":i,s=e.items,l=void 0===s?[]:s,u=e.onChange,c=e.disabled,d=void 0!==c&&c,h=Object(o.useState)(),p=h[0],f=h[1],g=Object(o.useState)(!1),m=g[0],v=g[1],y=function(e,i){r()(this,t),f(i),v(!1),u&&u(e)}.bind(this);return a.a.createElement(Cn,{className:"dropdown",enabled:!d},a.a.createElement("div",{className:"dropdown-select",onClick:function(){return r()(this,t),!d&&v(!m)}.bind(this)},a.a.createElement("div",null,p||n),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/down-arrow-black.svg")})),m&&a.a.createElement("ul",{className:"dropdown-menu"},l.map(function(e,i){var n=this;return r()(this,t),a.a.createElement("li",{"data-value":e.value,onClick:function(){return r()(this,n),y(e.value,e.label)}.bind(this),key:i},e.label)}.bind(this))))}var xn,An,Pn,In,Rn,Dn,On=1,Nn=2;function Ln(e){var t,i=this,n=e.type,s=e.handleSourceChange,l=e.selectedDevice,u=e.disabled,c=Object(o.useState)([]),d=c[0],h=c[1],p=Object(o.useState)(!0),f=p[0],g=p[1],m=Object(o.useRef)();t=n==On?{webcam:!0,audio:!1}:{audio:!0,webcam:!1};var v=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"Permission not given"}],disabled:!0})}.bind(this),y=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"Fetching the device info"}],disabled:!0})}.bind(this),b=function(){r()(this,i);return a.a.createElement(kn,{items:[{value:"-1",label:"No devices found"}],disabled:!0})}.bind(this);Object(o.useEffect)(function(){var e=this;if(r()(this,i),m.current&&!u){var t=setInterval(function(){var i=this;r()(this,e),Le({webcam:n===On,audio:n!==On}).then(function(){r()(this,i),clearInterval(t),w()}.bind(this)).catch(function(e){return r()(this,i),console.error("PERMISSION ERROR ",e)}.bind(this))}.bind(this),2e3);return function(){return r()(this,e),clearInterval(t)}.bind(this)}}.bind(this),[f,u]),Object(o.useEffect)(function(){r()(this,i),w()}.bind(this),[]);var w=function(){var e=this;r()(this,i),Me(t).then(function(t){var i=this,n=t.error,o=t.devices;if(r()(this,e),n)m.current=n,g(!1);else{var a=[];o.audio&&o.audio.forEach(function(e){r()(this,i),a.push({value:e.deviceId,label:e.label})}.bind(this)),o.webcam&&o.webcam.forEach(function(e){r()(this,i),a.push({value:e.deviceId,label:e.label})}.bind(this)),m.current=null,h(a),g(!1)}}.bind(this)).catch(function(t){r()(this,e),console.log(t.name+": "+t.message),g(!1)}.bind(this))}.bind(this),E=function(){return r()(this,i),l||"default"}.bind(this),_=function(){var e=this;return r()(this,i),l&&d.forEach(function(t){if(r()(this,e),t.value===l)return t.label}.bind(this)),"Default"}.bind(this);return function(){if(r()(this,i),f)return y();if(m.current)return v();if(0===d.length)return b();var e=E(),t=Tn()(d),n=_();return console.log("DEVICES ",t,e),a.a.createElement(kn,{items:t,onChange:s,defaultLabel:n,defaultValue:e,disabled:u})}.bind(this)()}var Mn,Fn=O.c.div(xn||(xn=Xe()(["\n position: absolute;\n width: 345px;\n bottom: 80px;\n left: 30%;\n z-index: 30;\n background-color: #212126;\n border-radius: 5px;\n"]))),Un=O.c.div(An||(An=Xe()(["\n color: #fff;\n text-align: left;\n padding: 15px;\n border-bottom: 1px solid #333339;\n"]))),Bn=O.c.div(Pn||(Pn=Xe()(["\n width: 100%;\n margin: 0 auto;\n padding: 15px;\n"]))),Vn=O.c.div(In||(In=Xe()(["\n margin: 0 auto 20px;\n display: flex;\n align-items: center;\n"]))),zn=O.c.label(Rn||(Rn=Xe()(["\n display: inline-block;\n vertical-align: middle;\n width: 100px;\n font-size: 13px;\n font-weight: 400;\n color: #fff;\n text-align: left;\n"]))),Hn=O.c.div(Dn||(Dn=Xe()(["\n width: 200px;\n"]))),jn=function(){r()(this,void 0);for(var e=[],t=0,i=Object.entries(Q.b);t<i.length;t++){var n=i[t],o=n[0],a=n[1];e.push({label:o,value:a})}return e}.bind(void 0)(),Gn=Object(o.forwardRef)(function(e,t){var i=this,n=e.webcam,s=e.audio,l=(e.aspectRatio,e.webcamSourceId),u=e.audioSourceId,c=e.onSourceSelection;r()(this,void 0);var d=Object(o.useState)(),h=d[0],p=d[1],f=Object(o.useState)(),g=f[0],m=f[1],v=Object(o.useState)(),y=v[0],b=v[1],w=function(e){r()(this,i),p(e)}.bind(this),E=function(e){r()(this,i),m(e)}.bind(this),_=function(e){r()(this,i),b(e)}.bind(this);Object(o.useEffect)(function(){r()(this,i),S()}.bind(this),[y,g,h]);var S=function(){r()(this,i);var e={};s&&g&&(e.audio=g),n&&h&&(e.webcam=h),n&&y&&(e.aspectRatio=y),c&&c(e)}.bind(this);return a.a.createElement(Fn,{ref:t},a.a.createElement(Un,null,"Settings"),a.a.createElement(Bn,null,n&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Webcam"),a.a.createElement(Hn,null,a.a.createElement(Ln,{handleSourceChange:w,type:On,selectedDevice:h||l}))),s&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Microphone"),a.a.createElement(Hn,null,a.a.createElement(Ln,{handleSourceChange:E,type:Nn,selectedDevice:g||u}))),n&&a.a.createElement(Vn,null,a.a.createElement(zn,null,"Aspect Ratio"),a.a.createElement(Hn,null,a.a.createElement(kn,{defaultLabel:"16:9",items:jn,onChange:_})))))}.bind(void 0)),qn=O.c.div(Mn||(Mn=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n & > span {\n position: relative;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n background-color: #43454E;\n cursor: ",";\n opacity: ",";\n\n & > img {\n margin-top: 10px;\n }\n }\n"])),function(e){return r()(this,void 0),e.enabled?"pointer":"default"}.bind(void 0),function(e){return r()(this,void 0),e.enabled?"1":"0.3"}.bind(void 0));function Wn(e){var t=this,i=e.webcam,n=e.mic,s=e.webcamSourceId,l=e.audioSourceId,u=e.aspectRatio,c=e.onSourceSelection,d=Object(o.useState)(!1),h=d[0],p=d[1],f=Object(o.useRef)(),g=Object(o.useRef)(),m=function(e){r()(this,t),!f.current||f.current.contains(e.target)||g.current.contains(e.target)||h&&p(!1)}.bind(this);return Object(o.useEffect)(function(){var e=this;if(r()(this,t),h)return document.addEventListener("mousedown",m),function(){r()(this,e),document.removeEventListener("mousedown",m)}.bind(this)}.bind(this),[f,h]),a.a.createElement(qn,{enabled:i||n},a.a.createElement("span",{onClick:function(){return r()(this,t),(i||n)&&p(!h)}.bind(this)},a.a.createElement("img",{ref:g,src:Object(N.d)("/svg/rapi/settings-white.svg"),width:"15"})),h&&a.a.createElement(Gn,{ref:f,webcam:i,audio:n,webcamSourceId:s,audioSourceId:l,aspectRatio:u,onSourceSelection:c}))}i(70);var $n,Yn,Kn,Jn,Xn,Qn,Zn,er,tr,ir,nr,rr=O.c.div($n||($n=Xe()(["\n width: 100%;\n"]))),or=O.c.iframe(Yn||(Yn=Xe()(["\n width: 100%;\n height: 95%;\n border: 1px solid #ddd;\n border-radius: 8px;\n"]))),ar=O.c.div(Kn||(Kn=Xe()(["\n position: relative;\n margin: 0;\n"]))),sr=Object(O.c)(ar)(Jn||(Jn=Xe()(["\n height: 100%;\n right: 0;\n"]))),lr=Object(O.c)(ar)(Xn||(Xn=Xe()(["\n width: 60%;\n display: flex;\n align-items: center;\n padding-right: 10px;\n"]))),ur=O.c.canvas(Qn||(Qn=Xe()(["\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 3px;\n background: #ebebeb 0% 0% no-repeat padding-box;\n"]))),cr=O.c.img(Zn||(Zn=Xe()(["\n display: block;\n height: 20px;\n width: 20px;\n padding: 4px;\n margin-right: 10px;\n background-color: #525252;\n border-radius: 50%;\n\n // @media only screen and (min-width: 540px) {\n // height: 26px;\n // }\n // @media only screen and (min-width: 720px) {\n // height: 32px;\n // }\n"]))),dr=O.c.div(er||(er=Xe()(["\n\n"]))),hr=Object(O.c)(dr)(tr||(tr=Xe()(["\n height: 90%;\n margin: 0 auto;\n @media only screen and (min-width: 540px) {\n height: 90%;\n }\n @media only screen and (min-width: 720px) {\n height: 91%;\n }\n"]))),pr=Object(O.c)(dr)(ir||(ir=Xe()(["\n width: 80%;\n height: 6px;\n"]))),fr="url",gr=1,mr=2;function vr(e){var t=this,i=e.type,n=e.stream,s=e.streamType,l=e.showIcon,u=e.errorCallback,c=Object(o.useRef)(),d=Object(o.useRef)(),h=Object(o.useRef)();console.log("AUDIO METER ",n,s);var p=function(e,i,n,o,a){return r()(this,t),e<i?o:e>n?a:(e-i)*(a-o)/(n-i)+o}.bind(this),f=function(e,i){r()(this,t);var n=i.getContext("2d"),o=i.width,a=i.height,s=e*a*5,l=p(2*s,0,200,50,255);n.clearRect(0,0,o,a),n.fillStyle="#000",n.fillRect(0,a,o,-3),n.fillStyle="rgb(".concat(Math.floor(l),", ").concat(Math.floor(205-l/2),", 50)"),n.fillRect(0,a,o,-s)}.bind(this),g=function(e,i){r()(this,t);var n=i.getContext("2d"),o=i.width,a=i.height,s=e*o*5;n.clearRect(0,0,o,a),n.fillStyle="#F5B93F",n.fillRect(0,0,3,o),n.fillRect(0,0,s,o)}.bind(this),m=function(){var e=this;r()(this,t),setTimeout(function(){r()(this,e),d.current&&0===d.current.volume&&console.log("WARNING FAULTY MIC")}.bind(this),2e3)}.bind(this),v=function(e){r()(this,t);var n=c.current;null!=n&&(i===gr?f(d.current.volume,n):g(d.current.volume,n)),h.current=window.requestAnimationFrame(v)}.bind(this);Object(o.useEffect)(function(){var e=this;if(r()(this,t),n&&s!==fr){try{if(n.getAudioTracks().length){var i=new AudioContext,o=i.createMediaStreamSource(n);d.current=Ke.createAudioMeter(i),m(),o.connect(d.current),console.log("DRAWING AUDIO METER"),v()}}catch(e){u&&u(e),console.log(e)}return function(){r()(this,e),console.log("AUDIO METER EXITING PROPERLY"),h.current&&(window.cancelAnimationFrame(h.current),h.current=null)}.bind(this)}}.bind(this),[n]);var y=n;return s===fr&&(y="".concat(n,"?mic=true")),function(){switch(r()(this,t),i){case i===gr:return a.a.createElement(sr,null,s===fr?a.a.createElement(rr,null,a.a.createElement(or,{src:y})):a.a.createElement(hr,null,a.a.createElement(ur,{ref:c})),l&&a.a.createElement(cr,{src:Object(N.d)("/svg/audio-on.svg"),alt:"Mic"}));default:return a.a.createElement(lr,null,l&&a.a.createElement(cr,{src:Object(N.d)("/svg/audio-on.svg"),alt:"Mic"}),s===fr?a.a.createElement(rr,null,a.a.createElement(or,{src:y})):a.a.createElement(pr,null,a.a.createElement(ur,{ref:c})))}}.bind(this)()}var yr=O.c.div(nr||(nr=Xe()(["\n display: flex;\n align-items: center;\n justify-content: right;\n"])));function br(e){var t=e.stream,i=e.streamType,n=e.showIcon;return a.a.createElement(yr,null,a.a.createElement(vr,{type:mr,stream:t,streamType:i,showIcon:n}))}function wr(e){var t=this,i=e.recorder,n=Object(o.useState)(0),s=n[0],l=n[1];Object(o.useEffect)(function(){var e=this;r()(this,t),i.setTimerCallback(function(t){return r()(this,e),l(t)}.bind(this))}.bind(this),[]);var u=function(){if(r()(this,t),s<0)return"0m:0s";var e=parseInt(s,10),i=Math.floor(e/3600),n=Math.floor((e-3600*i)/60),o=e-3600*i-60*n;i<10&&(i="0"+i),n<10&&(n="0"+n),o<10&&(o="0"+o);var a="".concat(n,":").concat(o);return parseInt(i)>0&&(a="".concat(i,"h:").concat(n,"m:").concat(o,"s")),a}.bind(this);return a.a.createElement("div",null,u())}var Er,_r,Sr,Tr,Cr=O.c.div(Er||(Er=Xe()(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]))),kr=O.c.div(_r||(_r=Xe()(["\n width: ",";\n position: relative;\n border-radius: 25px;\n height: ",";\n z-index: 1;\n background-color: ",";\n"])),function(e){return r()(this,void 0),e.recording?"100px":"auto"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"50px":"auto"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"#43454E":"transparent"}.bind(void 0)),xr=O.c.div(Sr||(Sr=Xe()(["\n position: absolute;\n font-size: 11px;\n color: #ffffff;\n right: 10px;\n top: 35%;\n"]))),Ar=O.c.div(Tr||(Tr=Xe()(["\n width: ",";\n height: ",";\n border-radius: ",";\n left: ",";\n top: ",";\n background-color: rgb(221, 52, 65);\n margin: 0;\n position: relative;\n cursor: pointer;\n &:before {\n position: absolute;\n content: '';\n left: ",";\n top: ",";\n width: ",";\n height: ",";\n z-index: ",";\n border-radius: 50%;\n background-color: ",";\n border: ",";\n margin: 0;\n }\n"])),function(e){return r()(this,void 0),e.recording?"24px":"34px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"24px":"34px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"6px":"50%"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"13px":""}.bind(void 0),function(e){return r()(this,void 0),e.recording?"13px":""}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-10px":"-6px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-10px":"-6px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"44px":"42px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"44px":"42px"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"-1":"1"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"#FFFFFF":"transparent"}.bind(void 0),function(e){return r()(this,void 0),e.recording?"none":"2px solid rgb(221, 52, 65)"}.bind(void 0));function Pr(e){var t=this,i=e.recorder,n=e.recordingStarted,o=e.onStopRecording,s=e.onStartRecording;return a.a.createElement(Cr,null,a.a.createElement(kr,{recording:n},a.a.createElement(Ar,{recording:n,onClick:function(){return r()(this,t),n?o():s()}.bind(this)}),n&&a.a.createElement(xr,null,a.a.createElement(wr,{recorder:i}))))}var Ir,Rr,Dr,Or,Nr,Lr=O.c.div(Ir||(Ir=Xe()(['\n width: 100%;\n height: 60px;\n position: absolute;\n bottom: 0;\n left: 0;\n background-color: rgba(0,0,0,0.6);\n border-radius: 0 0 15px 15px;\n display: grid;\n grid-template-columns: repeat(2, 1fr) 2fr 2fr;\n font-family: "Open Sans";\n justify-content: center;\n']))),Mr=O.c.div(Rr||(Rr=Xe()(["\n grid-column-start: ",";\n min-width: 200px;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n place-items: center;\n"])),function(e){return r()(this,void 0),!e.webcam||e.recordingStarted?"3":"auto"}.bind(void 0)),Fr=O.c.div(Dr||(Dr=Xe()(["\n position: absolute;\n bottom: 100%;\n text-align: center;\n width: 100%;\n color: #FFFFFF;\n background-color: inherit;\n font: ",";\n > span {\n color: #DD3441;\n font: normal normal 600 16px/22px Open Sans;\n }\n"])),function(e){return r()(this,void 0),e.recordingStarted?"normal normal normal 12px/17px Open Sans":"normal normal 600 16px/22px Open Sans"}.bind(void 0)),Ur=O.c.div(Or||(Or=Xe()(["\n\n"]))),Br=O.c.div(Nr||(Nr=Xe()(["\n color: #fff;\n font-size: 10px;\n"])));function Vr(e){var t=this,i=e.recorder,n=e.recordingStarted,o=e.screen,s=e.webcam,l=e.mic,u=e.stream,c=e.streamType,d=e.webcamSourceId,h=e.audioSourceId,p=e.aspectRatio,f=e.onSourceSelection,g=e.showTeleprompter,m=e.onTeleprompterToggle,v=e.teleprompterEnabled,y=e.onAbortRecording,b=e.onPauseResumeRecording,w=e.recordingPaused,E=e.onStartRecording,_=e.onStopRecording,S=e.lightingCanvas,T=e.videoElement,C=e.webcamQualityInfo,k=function(){return r()(this,t),n&&g?a.a.createElement(Fr,{recordingStarted:!0},"Note: Press Space to Play/Pause video prompting"):n?void 0:a.a.createElement(Fr,null,"Press ",a.a.createElement("span",null,"Record")," to start!")}.bind(this);return a.a.createElement(Lr,null,k(),s&&!n&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Yi,{lightingCanvas:S,videoElement:T}),a.a.createElement(an,{webcamQualityInfo:C})),a.a.createElement(Mr,{webcam:s,recordingStarted:n},!n&&a.a.createElement(Wn,{webcam:s,mic:l,webcamSourceId:d,audioSourceId:h,aspectRatio:p,onSourceSelection:f}),n&&a.a.createElement(En,{type:wn.ABORT,onAbortRecording:y}),a.a.createElement(Pr,{recorder:i,recordingStarted:n,onStartRecording:E,onStopRecording:_}),n&&a.a.createElement(En,{type:wn.PAUSE_RESUME,onPauseResumeRecording:b,recordingPaused:w}),!n&&!o&&v&&a.a.createElement(Ur,null,a.a.createElement(vn,{showTeleprompter:g,onTeleprompterToggle:m}),a.a.createElement(Br,null,"Teleprompter"))),(s||o)&&l&&u&&a.a.createElement(br,{stream:u,streamType:c,showIcon:!0}))}var zr,Hr,jr,Gr,qr,Wr,$r,Yr,Kr,Jr,Xr,Qr=O.c.div(zr||(zr=Xe()(["\n width: 80%;\n margin: 0 auto;\n display: grid;\n grid-template-columns: 50% 50%;\n margin-top: 15px;\n position: relative;\n z-index: 20;\n"]))),Zr=O.c.div(Hr||(Hr=Xe()(["\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 4fr;\n -padding-left: 20px;\n padding-right: 10px;\n ","\n"])),function(e){return r()(this,void 0),e.disabled&&"opacity: 0.4; cursor: not-allowed"}.bind(void 0)),eo=O.c.div(jr||(jr=Xe()(["\n -background-color: #f5fdf9;\n -border: 1px solid #39ce8e;\n border-radius: 4px;\n width: 40px;\n height: 35px;\n filter: grayscale(1);\n text-align: right;\n & > img {\n height: 15px;\n margin-top: 9px;\n }\n"]))),to=O.c.div(Gr||(Gr=Xe()(["\n width: 40px;\n height: 35px;\n filter: grayscale(1);\n text-align: right;\n & > img {\n height: 15px;\n margin-top: 9px;\n transform: scale(1.2);\n }\n"]))),io=O.c.div(qr||(qr=Xe()(["\n margin-left: 15px;\n width: 200px;\n"]))),no=O.c.div(Wr||(Wr=Xe()(["\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 4fr;\n padding-left: 10px;\n -padding-right: 20px;\n ","\n"])),function(e){return r()(this,void 0),e.disabled&&"opacity: 0.4; cursor: not-allowed"}.bind(void 0));function ro(e){var t=e.webcam,i=e.audio,n=e.handleWebcamSourceChange,r=e.handleAudioSourceChange;return a.a.createElement(Qr,null,a.a.createElement(Zr,{disabled:!t},a.a.createElement(eo,null,a.a.createElement("img",{src:Object(N.d)("/svg/rapi/webcam-on.svg")})),a.a.createElement(io,null,a.a.createElement(Ln,{handleSourceChange:n,type:On,disabled:!t}))),a.a.createElement(no,{disabled:!i},a.a.createElement(to,null,a.a.createElement("img",{src:Object(N.d)("/svg/rapi/mic-on.svg")})),a.a.createElement(io,null,a.a.createElement(Ln,{handleSourceChange:r,type:Nn,disabled:!i}))))}var oo,ao,so=O.c.div($r||($r=Xe()([""]))),lo=O.c.div(Yr||(Yr=Xe()(["\n text-align: center;\n color: #C3C3C3;\n font: normal normal normal 14px/18px Open Sans;\n width: 75%;\n letter-spacing: 0.2px;\n margin: 0 auto;\n"]))),uo=O.c.video(Kr||(Kr=Xe()(["\n height: 280px;\n"]))),co=O.c.div(Jr||(Jr=Xe()(["\n width: 90%;\n margin: 15px auto 0 auto;\n text-align: center;\n"]))),ho=O.c.div(Xr||(Xr=Xe()(["\n font: normal normal normal 12px/17px Open Sans;\n color: #FFFFFF;\n letter-spacing: 0.5px;\n margin-top: 10px;\n cursor: pointer;\n"])));function po(e){var t=this,i=e.permissionError,n=e.webcam,s=e.mic,l=e.onPermissionGranted,u=(e.showClose,e.onClose);Object(o.useEffect)(function(){var e=this;r()(this,t);var o=Q.k[i.type];if(!(isNaN(parseInt(o))||parseInt(o)-1e3>=100)){var a=setInterval(function(){var t=this;r()(this,e),Le({webcam:n,mic:s}).then(function(){r()(this,t),clearInterval(a),console.log("SUCCESS CAN GO BACK TO THE RECORD SCREEN"),l()}.bind(this)).catch(function(){r()(this,t),console.log("PERMISSION NOT YET GRANTED")}.bind(this))}.bind(this),1e3);return function(){r()(this,e),clearInterval(a)}.bind(this)}}.bind(this));var c=function(){if(r()(this,t),!i)return"Unknown error";switch(i.type){case Q.k.WEBCAM_PERMISSION_DENIED:return"Webcam permission denied";case Q.k.WEBCAM_NOT_FOUND:return"Webcam device not found";case Q.k.WEBCAM_READ_TIMEOUT:return"Could not start the webcam device. Please restart your browser or system and try again";case Q.k.SCREEN_PERMISSION_DENIED:case Q.k.SYSTEM_SCREEN_PERMISSION_DENIED:return"Please provide system permission to record";case Q.k.SCREEN_PERMISSION_DENIED:return"Please provide permission to record screen";case Q.k.SCREEN_NOT_READABLE_ERROR:return"Error in starting screen recording. Please restart your browser or system and try again";default:return"Unknown device error"}}.bind(this),d=function(e){r()(this,t),e.preventDefault(),u&&u()}.bind(this),h=function(){if(r()(this,t),i)switch(i.type){case Q.k.WEBCAM_PERMISSION_DENIED:return Object(N.d)("/hippo_videos/WebcamMicPermissionError.mp4");case Q.k.SCREEN_PERMISSION_DENIED:return Object(N.d)("/hippo_videos/ScreenShareCancelError.mp4");case Q.k.SCREEN_PERMISSION_DENIED:case Q.k.SYSTEM_SCREEN_PERMISSION_DENIED:default:return Object(N.d)("/hippo_videos/WebcamAudioSettings.mp4")}return"http://localhost:3000/hippo_videos/WebcamAudioSettings.mp4"}.bind(this);return a.a.createElement(so,null,a.a.createElement(co,null,a.a.createElement(uo,{src:h(),autoPlay:!0,muted:!0,loop:!0})),a.a.createElement(lo,null,c()),a.a.createElement(ho,{onClick:d},"Close"))}var fo=O.c.div(oo||(oo=Xe()(['\n position: relative;\n width: 30px;\n height: 30px;\n opacity: 0.7;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n &:before,\n &:after {\n position: absolute;\n right: 14px;\n top: 4px;\n content: " ";\n height: 20px;\n width: 2px;\n background-color: #FFFFFF;\n }\n &:before {\n transform: rotate(45deg);\n }\n &:after {\n transform: rotate(-45deg);\n }\n']))),go=Object(O.c)(fo)(ao||(ao=Xe()(["\n background-color: #121212;\n border-radius: 4px;\n"])));function mo(e){var t=e.withBorder,i=void 0!==t&&t,n=e.onClose;return i?a.a.createElement(go,{onClick:n}):a.a.createElement(fo,{onClick:n})}var vo,yo,bo,wo,Eo,_o,So,To,Co=O.c.div(vo||(vo=Xe()(["\n position: relative;\n border-radius: 15px;\n margin: 0 auto;\n width: 640px;\n min-height: 360px;\n max-height: 500px;\n background-color: #2E2E2E;\n display: grid;\n place-items: center;\n"]))),ko=O.c.div(yo||(yo=Xe()(["\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: #000;\n top: 0;\n left: 0;\n border-radius: 15px;\n z-index: 100;\n"]))),xo=O.c.div(bo||(bo=Xe()(["\n background: transparent linear-gradient(180deg, #000000 0%, #000000CC 83%, #00000000 100%) 0% 0% no-repeat padding-box;\n font: normal normal 600 14px/16px Open Sans;\n color: ",";\n height: 45px;\n display: flex;\n position: absolute;\n justify-content: center;\n align-items: center;\n top: 0;\n width: 100%;\n left: 0;\n z-index: 10;\n border-radius: 15px 15px 0 0;\n opacity: 0.72;\n"])),function(e){return r()(this,void 0),e.startedRecording?"#DE3232":"#FFFFFF"}.bind(void 0)),Ao=O.c.div(wo||(wo=Xe()(["\n display: grid;\n margin-top: -30px;\n"]))),Po=O.c.div(Eo||(Eo=Xe()(["\n display: flex;\n flex-flow: column;\n"]))),Io=O.c.div(_o||(_o=Xe()(["\n position: absolute;\n width: 275px;\n bottom: 85px;\n box-shadow: 0px 8px 12px #00000066;\n border: 1px solid #34343C;\n background-color: #212126;\n padding: 5px 15px;\n border-radius: 10px;\n z-index: 10;\n text-align: left;\n .mic-error-modal-header {\n display: flex;\n align-items: center;\n color: #C3C3C3;\n font: normal normal 600 12px/10px Open Sans;\n img {\n margin-right: 10px;\n width: 16px;\n }\n }\n .mic-error-modal-content {\n font: italic normal normal 12px/13px Open Sans;\n color: #C3C3C3;\n padding: 10px 0px;\n line-height: 1.4em;\n }\n"]))),Ro=O.c.div(So||(So=Xe()(["\n position: absolute;\n right: -35px;\n top: 0px;\n"]))),Do=O.c.div(To||(To=Xe()(["\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background: rgba(0,0,0,0.6);\n position: absolute;\n z-index: 500;\n .hv-cancel-record-modal {\n display: flex;\n justify-content: center;\n flex-flow: column;\n height: 100%;\n align-items: center;\n &-text {\n color: #fff;\n margin-bottom: 25px;\n }\n &-cancel-option {\n margin-right: 15px;\n }\n }\n"]))),Oo=i(16);function No(e){var t=e.text,i=e.confirmText,n=e.cancelText,r=e.onConfirm,o=e.onCancel;return a.a.createElement(Do,null,a.a.createElement("div",{className:"hv-cancel-record-modal"},a.a.createElement("div",{className:"hv-cancel-record-modal-text"},t),a.a.createElement("div",{className:"hv-cancel-record-modal-options-wrapper"},a.a.createElement(Oo.d,{className:"hv-cancel-record-modal-cancel-option",text:n,onClickHandler:o}),a.a.createElement(Oo.d,{className:"hv-cancel-record-modal-confirm-option",text:i,type:Oo.b.SECONDARY,onClickHandler:r}))))}function Lo(e){var t=this,i=e.recorder,n=e.recorderAPIUtils,s=e.onFinishRecording,l=e.onRecordingCancel,u=(e.onCloseRecorder,e.extensionAvailable),c=e.handlePopupClose,d=e.action,h=i.getRecordingConfiguration(),p=Object(o.useContext)(L.a).recorderInitOptions,f=p.record_config,g=p.inline,m=f.show_selectable_options,v=f.teleprompter,y=f.screen,b=f.webcam,w=f.mic,E=!1!==y,_=!1!==b,S=!1!==w,T=0!=m,C=Object(o.useState)(E),k=C[0],x=C[1],A=Object(o.useState)(_),P=A[0],I=A[1],R=Object(o.useState)(S),D=R[0],O=R[1],F=Object(o.useState)({}),U=F[0],B=F[1],V=Object(o.useState)(!1),z=V[0],H=V[1],j=Object(o.useState)(!1),G=j[0],q=j[1],W=Object(o.useState)(!1),$=W[0],Y=W[1],K=Object(o.useState)(!1),J=K[0],X=K[1],Z=Object(o.useState)(!1),ee=Z[0],te=Z[1],ie=Object(o.useState)({}),ne=ie[0],re=ie[1],oe=Object(o.useState)(!1),ae=oe[0],se=oe[1],le=Object(o.useState)(!1),ue=le[0],ce=le[1],de=Object(o.useState)(!1),he=de[0],pe=de[1],fe=Object(o.useRef)({}),ge=Object(o.useRef)(),me=Object(o.useRef)(),ve=Object(o.useRef)(),ye=Object(o.useRef)(!1),be=Object(o.useRef)();Object(o.useEffect)(function(){var e=this;if(r()(this,t),be.current=!0,console.info("PREVIEW UE ",u,d),!u)return d===M.PRE_RECORD?Ee({preview:!0}):_e(),function(){return r()(this,e),be.current=!1}.bind(this)}.bind(this),[d]),Object(o.useEffect)(function(){if(r()(this,t),U.webcamStream){var e=(e=>{const t=e.getVideoTracks()[0];let i={frameRate:"N/A",resolution:"N/A",quality:"N/A"};if(t){const e=t.getSettings();if(e){const{width:t,height:n,frameRate:r}=e;r&&(i.frameRate=r.toFixed(2)),t&&(i.quality=Fe(t)),t&&n&&(i.resolution=`${t} x ${n}`)}}return i})(U.webcamStream);console.log("QUALITY ",e),re(e)}}.bind(this),[U]),Object(o.useEffect)(function(){r()(this,t),h.screenRecord=k,h.webCam=P,h.audio=D,i.updateConfig({recordingConfiguration:h}),Ee({preview:!0})}.bind(this),[k,P,D]),Object(o.useEffect)(function(){if(r()(this,t),n&&U){if(!k)return n.sendEvent("_remove_webcam_preview");console.log("streams1!!!! ",U),P?n.sendEvent("_show_webcam_preview",{stream:U.webcamStream}):n.sendEvent("_remove_webcam_preview")}}.bind(this),[k,P,U]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),$)if(z)q(!1),H(!1),i.resumeRecording();else{if(!g&&h.screenRecord&&n&&n.sendEvent("hide_frame"),u)return void i.startExtensionRecording().then(function(){r()(this,e),X(!0),q(!1)}.bind(this));Te(),X(!0),q(!1)}}.bind(this),[$]),Object(o.useEffect)(function(){var e=this;r()(this,t),ae&&P&&Le({webcam:!0}).catch(function(){return r()(this,e),n.sendEvent("_remove_webcam_preview")}.bind(this))}.bind(this),[ae]);var we=function(e){var i=e.error;r()(this,t),console.log("AAAAAA ",i,be.current,ue),be.current&&(console.log("AAAAAA1 ",i,ue),i&&!ue&&ce(!0),i||ce(!1))}.bind(this);console.log("NO VOLUME ",ue);var Ee=function(e){var n=this,o=e.preview;if(r()(this,t),console.info("[RecordPreview] Fetch Stream ",o),(!o||P||D)&&!ye.current)return new Promise(function(e,t){var a=this;r()(this,n);try{ye.current=!0,i.getStream({preview:o}).then(function(t){var n=t.webcamStream,o=t.screenStream,s=t.message,l=t._type;r()(this,a),console.log("STREAMS >>> ",n),ye.current=!1,"no_config_change"===s&&console.log("STREAM UNCHANGED"),D&&i.checkMicVolumeStatus(we),console.log("SET STREAMS >>> ",n),ve.current=null;var u=l||"stream";B({type:u,webcamStream:n,screenStream:o}),e({type:u,webcamStream:n,screenStream:o})}.bind(this)).catch(function(e){r()(this,a),ye.current=!1,console.log("Exception in fetching stream ",e),ve.current=e,se(!0),t(e)}.bind(this))}catch(e){ye.current=!1,console.log("EXCEPTION ",e),t(e)}}.bind(this))}.bind(this),_e=function(){var e=this;return r()(this,t),ve.current?se(!0):u&&h.screenRecord?(setExtensionRecInitializing(!0),void Te().then(function(){r()(this,e),setExtensionRecInitializing(!1),q(!0)}.bind(this))):(console.log("FETCH STREAM 2"),void Ee({preview:!1}).then(function(t){var i=this;if(r()(this,e),console.log("START COUNTDOWN ",t),console.log("RECORDING CONFIG",h,U),u)return setExtensionRecInitializing(!0),void Te().then(function(){r()(this,i),setExtensionRecInitializing(!1),q(!0)}.bind(this));n.sendEvent("record_started"),n.sendEvent("_record_started",{showWebcamPreview:h.screenRecord&&h.webCam,stream:t&&t.webcamStream,showMarkupTools:h.screenRecord}),Se(),q(!0)}.bind(this)))}.bind(this),Se=function(){var e=this;r()(this,t),console.log("CREATE RECORDING"),i.createRecording(h).then(function(t){r()(this,e),console.log("CREATE RECORDING RESPONSE ",t),t.status&&(h.webcam={key:t.webcamKey,bucket:t.uploadBucket},h.screen={key:t.screenKey,bucket:t.uploadBucket},i.updateConfig({recordingConfiguration:h}),fe.current=t)}.bind(this)).catch(function(t){r()(this,e),console.log("CREATE RECORDING ERROR ",t)}.bind(this))}.bind(this),Te=function(){return r()(this,t),i.startRecording({externalStopStreamCallback:Ce})}.bind(this),Ce=function(){var e=this;r()(this,t),console.log("FINISH RECORDING CLICKED"),n.sendEvent("record_stopped"),i.finishRecording().then(function(t){r()(this,e),u&&s(),console.log("ASSET_ID ",t)}.bind(this)).catch(function(t){r()(this,e),console.log("ASSET_ID",t)}.bind(this)),u||s(i.getRecordingObjectUrls()),H(!1)}.bind(this),ke=function(){r()(this,t),console.log("SHOW PREVIEW SCREEN ",!0),i.pauseRecording(),H(!0),Y(!1),pe(!0)}.bind(this),xe=function(){r()(this,t),n.sendEvent("record_cancelled"),i.cancelRecordingWithoutStream(),pe(!1),X(!1),H(!1),Y(!1),l()}.bind(this),Ae=function(){r()(this,t),console.log("handle pause recording called ",z),z?(Pe(),n.sendEvent("record_resumed")):(n.sendEvent("record_paused"),i.pauseRecording(),H(!0))}.bind(this),Pe=function(){r()(this,t),pe(!1),Y(!1),q(!0)}.bind(this),Ie=function(){r()(this,t);var e=0;return k&&e++,P&&e++,D&&e++,e>1}.bind(this),Re=function(e){var n=e.webcam,o=e.audio,a=e.aspectRatio;if(r()(this,t),n||o||a){var s=0;console.log("SOURCES ",n,h.webcamSourceId),n&&n!==h.webcamSourceId&&(h.webcamSourceId=n,s++),o&&o!==h.audioSourceId&&(h.audioSourceId=o,s++),a&&a!==h.aspectRatio&&(h.aspectRatio=a,s++),console.info("FETCH STREAM 3 ",s),i.updateConfig({recordingConfiguration:h}),s>0&&Ee({preview:!0})}}.bind(this),De=function(e){if(r()(this,t),ve.current){var i=Q.k[ve.current.type],n="webcam";parseInt(i)-1e3>=100&&(n="screen"),console.log("ERROR MODULE ",n,e,P,D),"screen"===e&&"screen"===n&&k&&(ve.current=null),"webcam"!==e&&"mic"!==e||"webcam"!==n||!("webcam"===e&&P||"mic"===e&&D)||(ve.current=null)}}.bind(this),Oe=function(e){if(r()(this,t),T)switch(console.log("TYPE ",e),De(e),e){case"screen":if(k&&!Ie())return;x(!k);break;case"webcam":if(P&&!Ie())return;I(!P);break;case"mic":if(D&&!Ie())return;O(!D)}}.bind(this),Ne=function(e){return r()(this,t),Re({audio:e})}.bind(this),Me=function(e){return r()(this,t),Re({webcam:e})}.bind(this),Ue=function(){r()(this,t),ve.current=null,Be(),Ee({preview:!0})}.bind(this),Be=function(){r()(this,t),ve.current.type===Q.k.SCREEN_PERMISSION_DENIED&&(ve.current=null),se(!1)}.bind(this),Ve=function(){return r()(this,t),J&&z?"Recording paused":J?"Recording in progress":"Record Preview"}.bind(this),ze=function(){return r()(this,t),ue?Object(N.d)("/svg/rapi/mic-error-main-red.svg"):Object(N.d)("/svg/audio-on.svg")}.bind(this),He=function(){r()(this,t),Y(!0)}.bind(this);return a.a.createElement(Co,null,!g&&!J&&a.a.createElement(Ro,null,a.a.createElement(mo,{withBorder:!0,onClose:c})),he&&a.a.createElement(No,{text:"Do you want to cancel the recording?",confirmText:"Yes",cancelText:"No",onConfirm:xe,onCancel:Pe}),!ee&&!G&&a.a.createElement(xo,{startedRecording:J},Ve()),G&&a.a.createElement(Gt,{screen:k,onCountdownComplete:He}),D&&ue&&a.a.createElement(Io,null,a.a.createElement("div",{className:"mic-error-modal-header"},a.a.createElement("img",{src:Object(N.d)("/svg/rapi/error-circle-red.svg")}),"Microphone audio error"),a.a.createElement("div",{className:"mic-error-modal-content"},"No volume detected. Please check your microphone before continuing recording.")),ee&&!k&&a.a.createElement(Oi,{countdownStarted:G,recordingStarted:J}),a.a.createElement(Po,null,k&&a.a.createElement(Ao,null,a.a.createElement($t,{screenEnabled:y,webcamEnabled:b,micEnabled:w,userSelect:T,recordingStarted:J,screen:k,webcam:P,mic:D,handleOptionsSelect:Oe})),k&&!J&&a.a.createElement(a.a.Fragment,null,a.a.createElement(ro,{webcam:P,audio:D,webcamSourceId:h.webcamSourceId,audioSourceId:h.audioSourceId,handleWebcamSourceChange:Me,handleAudioSourceChange:Ne}))),ae&&a.a.createElement(ko,null,a.a.createElement(po,{permissionError:ve.current,webcam:P,mic:D,showClose:!0,onClose:Be,onPermissionGranted:Ue})),!k&&a.a.createElement(St,{stream:U.webcamStream,streamType:U.type,webcam:P,mic:D,audioIcon:ze(),preview:!J,lightingCanvasRef:ge,videoElementRef:me}),!k&&!J&&T&&a.a.createElement(Ft,{screenEnabled:y,webcamEnabled:b,micEnabled:w,userSelect:T,screen:k,webcam:P,mic:D,handleOptionsSelect:Oe}),a.a.createElement(Vr,{recorder:i,recordingStarted:J,screen:k,webcam:P,mic:D,stream:U.webcamStream,streamType:U.type,webcamSourceId:h.webcamSourceId,audioSourceId:h.audioSourceId,aspectRatio:h.aspectRatio,onSourceSelection:Re,showTeleprompter:ee,onTeleprompterToggle:function(){return r()(this,t),te(!ee)}.bind(this),teleprompterEnabled:v,onAbortRecording:ke,onPauseResumeRecording:Ae,recordingPaused:z,onStartRecording:_e,onStopRecording:Ce,lightingCanvas:ge.current,videoElement:me.current,webcamQualityInfo:ne}))}var Mo,Fo=i(257),Uo=i.n(Fo),Bo=O.c.div(Mo||(Mo=Xe()(["\n display: flex;\n justify-content: center;\n flex-flow: column;\n align-items: center;\n height: 350px;\n border: 1px solid #E5E5E5;\n border-radius: 14px;\n .close-recorder-options-warpper {\n margin-top: 20px;\n }\n"])));function Vo(e){var t=this,i=e.onVideoCancelRevert,n=e.onRecorderClose,o=function(){r()(this,t),console.log("RECORDER CANCEL VIDEO"),n()}.bind(this);return a.a.createElement(Bo,null,a.a.createElement("p",null,"Are you sure you want to cancel the recording?"),a.a.createElement("div",{className:"close-recorder-options-warpper"},a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Cancel Recording",onClickHandler:function(){r()(this,t),o(),console.log("Cancel recording")}.bind(this),style:{marginRight:"10px"}}),a.a.createElement(Oo.d,{text:"Go Back",onClickHandler:function(){r()(this,t),i(),console.log("Go back")}.bind(this)})))}var zo,Ho=i(391),jo=i.n(Ho),Go=O.c.div(zo||(zo=Xe()(["\n margin: 0 auto;\n"])));function qo(e){var t=this,i=e.importVideoUrl,n=e.screenUrl,s=e.webcamUrl,l=e.thumbnailUrl,u=e.isAudioOnly,c=e.recordingConfiguration,d=e.customColors,h=e.onVideoPlayerInitialize;console.log("PP ",e);var p=Object(o.useRef)(),f=Object(o.useRef)(),g=function(){return r()(this,t),i||(n||(s||void 0))}.bind(this),m=function(){if(r()(this,t),n)return s}.bind(this),v=function(){var e;if(r()(this,t),c&&c.screenRecord&&c.webCam){var i={width:288,height:216};c.sourceConfig&&c.sourceConfig.webcam&&(i=c.sourceConfig.webcam),e=_i.a.fitCenterLayout(i,{width:384,height:216})}return{el:p.current,fromSDK:!0,id:"preview-video",src:g(),audioSrc:m(),fullscreenControl:!1,primaryVideoLayout:e,customColors:d,isAudioOnly:u,integType:"generic_embed",thumbnail:l}}.bind(this);return Object(o.useEffect)(function(){var e=this;r()(this,t),p.current&&(console.log("PLAYER SETTINGS ",v()),f.current=new jo.a(v()),console.log("V PLAYER VIEW REF ",f.current),h(f.current),f.current.show(),setTimeout(function(){r()(this,e),f.current.resizePlayerForWindow()}.bind(this),1e3))}.bind(this),[p,f,s,n]),a.a.createElement(o.Fragment,null,a.a.createElement(Go,{ref:p}))}var Wo,$o,Yo=i(392),Ko=O.c.div(Wo||(Wo=Xe()(["\n background: ",";\n height: 100%;\n border-radius: inherit;\n transition: width 0.2s ease-in;\n"])),function(e){return r()(this,void 0),e.primaryColor}.bind(void 0));function Jo(e){var t=e.completedPercent,i=e.error,n=Object(o.useContext)(L.a),r=n&&n.theme&&n.theme.primaryColor;return r||(r="#FD7564"),i?a.a.createElement(Ko,{primaryColor:r,style:{width:"0%"}}):a.a.createElement(Ko,{primaryColor:r,style:{width:"".concat(t,"%")}})}var Xo=O.c.div($o||($o=Xe()(["\n position: relative;\n height: 8px;\n width: 100%;\n border-radius: 50px;\n border: none;\n background-color: #EDEDED;\n"])));function Qo(e){return a.a.createElement(Xo,null,a.a.createElement(Jo,e))}var Zo,ea,ta,ia,na,ra=O.c.div(Zo||(Zo=Xe()(["\n border: ",";\n width: 100%;\n background-color: ",";\n border-radius: 8px;\n padding: 20px 15px;\n margin-bottom: 15px;\n ","\n &.upload-progress-enter {\n max-height: 0px;\n overflow: hidden;\n }\n &.upload-progress-enter-active {\n max-height: 100px;\n overflow: auto;\n transition: max-height 500ms ease-in;\n }\n &.upload-progress-exit {\n max-height: 100px;\n border: none;\n }\n &.upload-progress-exit-active {\n max-height: 0px;\n border: none;\n overflow: hidden;\n transition: max-height 500ms ease-in;\n }\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"none":"1px solid #E6E6E6"}.bind(void 0),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"transparent":"#FFFFFF"}.bind(void 0),function(e){return r()(this,void 0),e.progressType!==ua.IMPORT&&"box-shadow: 0px 8px 12px #0000001A;"}.bind(void 0)),oa=O.c.div(ea||(ea=Xe()(["\n display: flex;\n justify-content: space-between;\n padding: 10px 0 5px 0;\n"]))),aa=O.c.div(ta||(ta=Xe()(["\n font-size: 13px;\n font-family: 'Open Sans';\n color: ",";\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#FFFFFF":"#4B4C4C"}.bind(void 0)),sa=O.c.div(ia||(ia=Xe()(["\n font-family: 'Open Sans';\n font-size: 12px;\n color: ",";\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#FFFFFF":"#4B4C4C"}.bind(void 0)),la=O.c.div(na||(na=Xe()(["\n text-align: right;\n font-family: 'Open Sans';\n font-size: 12px;\n color: ",";\n padding: 5px 0 10px 0;\n"])),function(e){return r()(this,void 0),e.progressType===ua.IMPORT?"#D5D5D5":"#848383"}.bind(void 0)),ua={RECORD:1,IMPORT:2};function ca(e){var t=this,i=e.progressStatus,n=e.timeRemainingStatus,s=e.uploadProgress,l=e.type,u=s.completedPercent,c=void 0===u?0:u,d=s.type,h=Object(o.useRef)(),p=Object(o.useRef)();return console.log("UPLOAD !!!! ",i,s,h.current),Object(o.useEffect)(function(){var e=this;return r()(this,t),console.log("UPLOAD PROGRESS MOUNTED",c),h.current=0,p.current=null,function(){r()(this,e),console.log("UPLOAD PROGRESS UNMOUNTED"),h.current=0,p.current=null}.bind(this)}.bind(this),[]),s.error&&(h.current=0),s.completed||100!==s.completedPercent?p.current===d&&"upload"!=s.type?h.current<c&&(h.current=c):(p.current=d,h.current=c):console.log("ERROR !!!"),a.a.createElement(ra,{progressType:l},a.a.createElement(oa,null,a.a.createElement(aa,{progressType:l},i),a.a.createElement(sa,{progressType:l},"".concat(h.current,"%"))),a.a.createElement(Qo,{completedPercent:h.current,error:s.error}),a.a.createElement(la,{progressType:l},n))}var da,ha={completedPercent:0,type:"upload"};function pa(e){var t=this,i=e.showUploadProgress,n=e.recorder,s=e.onUploadComplete,l=e.onUploadError,u=Object(o.useState)(ha),c=u[0],d=u[1],h=Object(o.useRef)(),p=Object(N.e)(c);return Object(o.useEffect)(function(){var e=this;if(r()(this,t),console.log("progressFetchInterval.current ",h.current,i),!h.current)return h.current=setInterval(function(){var t=this;r()(this,e);try{if(!i)return clearInterval(h.current),void(h.current=null);n.getUploadDetails().then(function(e){return r()(this,t),e&&e.completed?(s(),clearInterval(h.current),void(h.current=null)):e&&e.error?(l(e.errorType),clearInterval(h.current),void(h.current=null)):void d(e)}.bind(this)).catch(function(e){r()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(h.current),h.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e)}}.bind(this),1e3),function(){r()(this,e),clearInterval(h.current),h.current=null}.bind(this)}.bind(this)),a.a.createElement(D,{in:i,timeout:300,unmountOnExit:!0,classNames:"upload-progress"},a.a.createElement(ca,{type:ua.RECORD,timeRemainingStatus:p,uploadProgress:c,progressStatus:"Uploading Video"}))}var fa,ga=O.c.div(da||(da=Xe()(["\n box-shadow: 0px 8px 12px #0000001a;\n border: 1px solid #E6E6E6;\n padding: 20px 35px;\n margin: 10px 0;\n border-radius: 8px;\n .error-widget {\n &-text {\n margin-bottom: 10px;\n text-align: left;\n }\n &-cta-wrapper {\n text-align: right;\n button:last-of-type {\n margin-right: 20px;\n }\n }\n &-retry-button-wrapper {\n display: inline;\n }\n &-download-button-wrapper {\n display: inline;\n }\n }\n"])));function ma(e){var t=this,i=e.error,n=e.onRetry,o=e.recordingSource,s="Error in create recording";"UPLOAD_ERROR"===i.type&&(s="Error while uploading video");var l="Retry";"UPLOAD_ERROR"===i.type&&(l="Retry Upload");var u=function(){if(r()(this,t),"UPLOAD_ERROR"===i.type){var e=[];if(o)for(var n in o){var a=o[n];e.push({link:a,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}}.bind(this);return a.a.createElement(ga,null,a.a.createElement("div",{className:"error-widget-text"},s),a.a.createElement("div",{className:"error-widget-cta-wrapper"},a.a.createElement("div",{className:"error-widget-download-button-wrapper"},"UPLOAD_ERROR"===i.type&&a.a.createElement(Oo.d,{style:{marginRight:"20px"},icon:Object(N.d)("/svg/rapi/download-icon.svg"),text:"Download Recording",options:u(),type:Oo.b.TRANSPARENT,buttonFeature:Oo.a.DROPDOWN})),a.a.createElement("div",{className:"error-widget-retry-button-wrapper"},a.a.createElement(Oo.d,{text:l,onClickHandler:n}))))}var va=O.c.div(fa||(fa=Xe()(['\n margin: 15px 0;\n height: 45px;\n text-align: left;\n position: relative;\n .title-wrapper {\n display: flex;\n align-items: center;\n cursor: pointer;\n div {\n font: normal normal 600 16px/33px Open Sans;\n }\n img {\n margin-left: 10px;\n\n }\n }\n .title-input-wrapper {\n width: 350px;\n position: relative;\n display: flex;\n align-items: center;\n input {\n border: 1px solid #cccccc;\n box-shadow: 0px 3px 6px #00000012;\n border-radius: 4px;\n width: 100%;\n padding: 5px 60px 5px 10px;\n font: normal normal normal 16px/33px Open Sans;\n }\n .title-close {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.3;\n right: 0px;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n &::before,\n &::after {\n position: absolute;\n content: " ";\n height: 18px;\n width: 2px;\n background-color: #333;\n }\n &::before {\n transform: rotate(45deg);\n }\n &::after {\n transform: rotate(-45deg);\n }\n }\n\n .title-save {\n right: 45px;\n bottom: 15px;\n opacity: 0.8;\n position: absolute;\n display: inline-block;\n transform: rotate(45deg);\n height: 20px;\n width: 10px;\n border-bottom: 2px solid #37c689;\n border-right: 2px solid #37c689;\n cursor: pointer;\n &:hover {\n opacity: 1;\n }\n }\n }\n'])));function ya(e){var t=this,i=e.onTitleSave,n=e.videoTitle||"New Recording",s=Object(o.useState)(n),l=s[0],u=s[1],c=Object(o.useState)(!1),d=c[0],h=c[1],p=function(){r()(this,t),l.length>0?i(l):i("New Recording"),h(!1)}.bind(this),f=function(e){r()(this,t),"Enter"===e.key&&p()}.bind(this);return a.a.createElement(va,null,d?a.a.createElement("div",{className:"title-input-wrapper"},a.a.createElement("input",{type:"text",onChange:function(e){return r()(this,t),u(e.target.value)}.bind(this),onBlur:p,onKeyDown:f,value:l}),a.a.createElement("div",{className:"title-save",onClick:p}),a.a.createElement("div",{className:"title-close",onClick:function(){return r()(this,t),h(!1)}.bind(this)})):a.a.createElement("div",{className:"title-wrapper",onClick:function(){return r()(this,t),h(!0)}.bind(this)},a.a.createElement("div",null,l),a.a.createElement("img",{src:Object(N.d)("/svg/rapi/pen.svg")})))}function ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=oi()(e);if(t){var r=oi()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ni()(this,i)}}var wa,Ea,_a,Sa,Ta=function(e){ti()(i,e);var t=ba(i);function i(e){var n;Xt()(this,i),n=t.call(this,e);var r=e.onRetry;return n.state={hasError:!1},n.onRetry=r,n}return Zt()(i,[{key:"componentDidCatch",value:function(e,t){console.log("ERROR in catch >>>> ",e,t)}},{key:"render",value:function(){return this.state.hasError?a.a.createElement("div",null,a.a.createElement("span",null,"Could not load the resource due to network failure.")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return console.log("ERROR >>>> ",e),{hasError:!0}}}]),i}(o.Component),Ca=O.c.div(wa||(wa=Xe()(["\n display: flex;\n width: 100%;\n position: relative;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n margin: 0 auto;\n"]))),ka=O.c.div(Ea||(Ea=Xe()(["\n margin-top: 10px;\n"]))),xa=O.c.div(_a||(_a=Xe()(["\n margin-top: 10px;\n display: block;\n right: 0;\n"])));function Aa(e){var t=this,i=e.urls,n=e.token,s=e.tokenType,l=e.recorder,u=e.integrationType,c=e.importCompleteResponse,d=e.recordingConfiguration,h=e.onRecorderClose,p=e.onVideoCancel,f=e.extensionAvailable,g=(e.handleShowUploadProgress,e.recorderAPIModel),m=e.onEditClick,v=e.recorderAPIUtils,y=Object(o.useContext)(L.a),b=y.theme,w=y.recorderInitOptions,E=w.show_video_title,_=w.edit,S=w.record_config,T=(void 0===S?{}:S).show_cancel_submit,C=void 0===T||T,k=i&&i.webcam,x=i&&i.screen,A=c&&c.signed_url,P=c&&0==c.contains_video&&1==c.contains_audio||d&&!d.webCam&&!d.screenRecord&&d.audio,I="lessonly"==_i.a.getQueryParams().type||"lessonly"==_i.a.getQueryParams().integration_type,R=Object(o.useState)(!1),D=R[0],O=R[1],M=Object(o.useState)(),F=M[0],U=M[1],B=Object(o.useState)(),V=B[0],z=B[1],H=Object(o.useState)("Edit Video"),j=H[0],G=H[1],q=Object(o.useState)(),W=q[0],$=q[1],Y=l&&l.isUploadComplete(),K=Object(o.useState)(Y),J=K[0],X=K[1],Q=Object(o.useState)(!1),Z=Q[0],ee=Q[1],te=Object(o.useState)(!1),ie=te[0],ne=te[1],re=l.createRecordingError,oe=l.uploadInitError,ae=Object(o.useRef)();Object(o.useEffect)(function(){r()(this,t),J&&!f&&v.sendEvent("source_uploaded")}.bind(this),[J]),Object(o.useEffect)(function(){r()(this,t),G(D?"Preview Video":"Edit Video")}.bind(this),[D]),Object(o.useEffect)(function(){r()(this,t),m&&m(D)}.bind(this),[D,m]),Object(o.useEffect)(function(){var e=this;if(r()(this,t),c&&c.projectjson)$(c.projectjson);else if(!re)return l.isPreprocessComplete().then(function(t){r()(this,e),$(t)}.bind(this)).catch(function(){r()(this,e),console.log("ERROR IN PREPROCESS STEP")}.bind(this)),function(){r()(this,e),l.removePreprocessCompleteCheck()}.bind(this)}.bind(this),[]);var se=function(){return r()(this,t),{showSimpleEditor:D,videoPlayerView:V,recorder:l,recorderApiModel:g,token:n,tokenType:s,integrationType:u,isPersonalisationEnabled:ue(),customColors:he(),footageUrls:{},projectJson:W,onSimpleEditorInitialize:de}}.bind(this),le=function(){return r()(this,t),{importVideoUrl:A,screenUrl:x,webcamUrl:k,isAudioOnly:P,thumbnailUrl:null,recordingConfiguration:d,onVideoPlayerInitialize:ce,customColors:he()}}.bind(this),ue=function(){return r()(this,t),!1}.bind(this),ce=function(e){r()(this,t),z(e)}.bind(this),de=function(e){r()(this,t),U(e)}.bind(this),he=function(){r()(this,t);var e={};return I&&(e.primaryColor="#4A90E2",e.secondaryColor="#69a8e3",e.bgColor="#ebeaea"),e}.bind(this),pe=function(){r()(this,t),F&&(F.cancel(),O(!D))}.bind(this),fe=function(){r()(this,t),F&&(F.save(),O(!D))}.bind(this),ge=function(){r()(this,t),X(!0)}.bind(this),me=function(){r()(this,t),ee(!0)}.bind(this),ve=function(){r()(this,t),console.log("Submit video ",l.recordDetails),console.log(g);var e=l.recordDetails&&l.recordDetails.asset_id;if(e?g.submitVideo({assetId:e}):console.error("asset id not available in recorder"),e){var i={asset_id:l.recordDetails.asset_id,token:l.recordDetails.delivery_token,embed_url:l.recordDetails.embedLink,embed_preview_url:l.recordDetails.embeddedPreviewLink,play_url:l.recordDetails.recordedUrl,thumbnail_url:l.recordDetails.publicThumbnail,thumbnail_play_url:l.recordDetails.publicPlayThumbnail};v.sendEvent("video_submitted",i)}l.isUploadComplete()||v.sendEvent("_show_upload_progress",{recorder:l,theme:b}),h()}.bind(this),ye=function(){var e=this;r()(this,t),l.sendCreateRecordingRequest().then(function(){r()(this,e),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ne(!0)}.bind(this),be=function(){var e=this;r()(this,t),l.retryUpload().then(function(){r()(this,e),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ee(!1),ne(!0)}.bind(this),we=(function(){var e=this;r()(this,t),l.retryMultipartUploadFinish().then(function(){r()(this,e),ee(!1),ne(!1),we()}.bind(this)).catch(function(){r()(this,e),ne(!1)}.bind(this)),ne(!0)}.bind(this),function(){var e=this;r()(this,t),l.removePreprocessCompleteCheck(),l.isPreprocessComplete().then(function(t){r()(this,e),$(t)}.bind(this)).catch(function(){r()(this,e),console.log("ERROR IN PREPROCESS STEP")}.bind(this))}.bind(this));(function(){r()(this,t);var e="Error in create recording",i=ye;return oe&&(e="Error while uploading video",i=be),Z&&(e="Error while uploading video",i=be),a.a.createElement("div",null,e,a.a.createElement(Oo.d,{text:"Retry",onClickHandler:i,enabled:!ie}))}).bind(this);console.log("PREVIEW PLAYER ",qo._status,k);var Ee=function(e){r()(this,t),ae.current=e,g.saveVideoTitle({title:e,assetId:l.recordDetails&&l.recordDetails.asset_id})}.bind(this),_e=void 0!==W;console.log("SHOW EDIT ",_),console.log("PROJECT JSON ",W),console.log("enableEditButton ",_e);var Se=!(J||re||oe||Z||c);return console.log("showUploadProgress ",Se),a.a.createElement(a.a.Fragment,null,!c&&a.a.createElement(pa,{showUploadProgress:Se,recorder:l,onUploadComplete:ge,onUploadError:me}),E&&a.a.createElement(ya,{videoTitle:ae.current,onTitleSave:Ee}),(re||oe||Z)&&a.a.createElement(ma,{error:{type:re?"RECORDING_ERROR":"UPLOAD_ERROR"},onRetry:re?ye:be,recordingSource:l.getRecordingObjectUrls()}),a.a.createElement(Ta,null,a.a.createElement(o.Suspense,{fallback:a.a.createElement("div",null,"Loading ...")},a.a.createElement(qo,le()))),_&&a.a.createElement(Ta,null,a.a.createElement(o.Suspense,{fallback:a.a.createElement(a.a.Fragment,null)},a.a.createElement(Yo.a,se()))),a.a.createElement(Ca,null,a.a.createElement(ka,null,!D&&_&&a.a.createElement(Oo.d,{type:Oo.b.EDIT,icon:Object(N.d)("/svg/rapi/pen.svg"),text:j,loading:!_e,onClickHandler:function(){return r()(this,t),O(!D)}.bind(this),enabled:_e})),a.a.createElement(xa,null,!D&&C&&a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Close",onClickHandler:function(){r()(this,t),p(),console.log("Close modal")}.bind(this),style:{marginRight:"10px"}}),!D&&a.a.createElement(Oo.d,{text:"Submit",onClickHandler:function(){r()(this,t),ve(),console.log("Submit video")}.bind(this),enabled:!re}),D&&a.a.createElement(Oo.d,{type:Oo.b.SECONDARY,text:"Cancel Edit",onClickHandler:function(){r()(this,t),pe(),console.log("Cancel Edit")}.bind(this),style:{marginRight:"10px"}}),D&&a.a.createElement(Oo.d,{text:"Save Edit",onClickHandler:function(){r()(this,t),fe(),console.log("Save Edit")}.bind(this)}))))}var Pa,Ia=O.c.div(Sa||(Sa=Xe()([""])));function Ra(e){var t=e.recorder,i=e.onRecorderClose;return a.a.createElement(Ia,null,a.a.createElement(ca,{recorder:t,onUploadComplete:i}))}var Da=O.c.div(Pa||(Pa=Xe()(["\n padding: 20px;\n"])));function Oa(e){var t=this,i=Object(o.useState)(!1),n=i[0],s=i[1],l=Object(o.useState)(!1),u=l[0],c=l[1],d=function(){r()(this,t),s(!0)}.bind(this),h=function(){r()(this,t),console.log("CANCEL REVERT"),s(!1)}.bind(this),p=function(){r()(this,t),c(!0)}.bind(this);return a.a.createElement(Da,null,u&&a.a.createElement(Ra,e),!u&&n&&a.a.createElement(Vo,Uo()({},e,{onVideoCancelRevert:h})),!u&&!n&&a.a.createElement(Aa,Uo()({},e,{onVideoCancel:d,handleShowUploadProgress:p})))}i(94);var Na,La,Ma=O.c.div(Na||(Na=Xe()(["\n width: 75%;\n height: 80%;\n padding: 20px;\n border: 2px dashed #ACB7C4;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n cursor: pointer;\n"])));function Fa(e){var t=this,i=e.onFileUpload,n=e.isMobile,s=Object(o.useRef)(),l=Object(o.useRef)(),u=Object(o.useRef)(),c=Object(o.useState)(!1),d=c[0],h=c[1],p=function(){if(r()(this,t),d)return{borderColor:"#FFFFFF"}}.bind(this),f=function(e){r()(this,t),e.preventDefault(),!d&&h(!0)}.bind(this),g=function(e){r()(this,t),e.preventDefault(),d&&h(!1)}.bind(this),m=function(){r()(this,t),console.log("IMPORT CLICK"),n?u.current.click():l.current.click()}.bind(this),v=function(e){r()(this,t),e.preventDefault(),console.log("DROPPED ",e);var n=null;try{if(e.dataTransfer.items){for(var o=0;o<e.dataTransfer.items.length;o++)if("file"===e.dataTransfer.items[o].kind&&y(e.dataTransfer.items[o].getAsFile())){n=e.dataTransfer.items[o].getAsFile();break}}else for(var a=0;a<e.dataTransfer.files.length;a++)if(y(e.dataTransfer.files[a])){n=e.dataTransfer.files[a];break}}catch(e){console.log("EXCEPTION ",e)}n?(n.size>Q.n?console.log("FILE SIZE GREATER THAN 5GB!!!!"):i(n),console.log("NAME : ",n.name," SIZE : ",n.size)):console.log("FILE NOT SUPPORTED !!!")}.bind(this),y=function(e){return r()(this,t),e.type&&["video","audio"].includes(e.type.split("/")[0])}.bind(this),b=function(e){r()(this,t),console.log("IMPORT FILE CHANGED !!!!");var n=e.target.files[0];i(n)}.bind(this);return a.a.createElement(a.a.Fragment,null,a.a.createElement(Ma,{ref:s,onClick:m,onDrop:v,onDragOver:f,onDragLeave:g,style:p()},a.a.createElement("img",{src:"/svg/upload.svg",alt:"upload",style:{width:"55px"}}),a.a.createElement("div",{style:{margin:"12px 0 0",fontSize:"13px",fontWeight:"400",color:"#E3E3E3"}},"Drag and drop"),a.a.createElement("div",{style:{margin:"0",fontSize:"14px",fontWeight:"400",color:"#8C8C8C"}},"your file here, or"," ",a.a.createElement("span",{style:{color:"#4FA3CB",textDecoration:"underline",cursor:"pointer"}},"browse"))),a.a.createElement("input",{type:"file",ref:l,onChange:b,style:{display:"none"},accept:"video/*,audio/*,video/mp4,video/x-m4v,video/*;capture=camcorder,microphone"}),a.a.createElement("input",{type:"file",ref:u,onChange:b,style:{display:"none"},accept:"video/*,audio/*,video/mp4,video/x-m4v,video/*;capture=camcorder,microphone",capture:!0}))}function Ua(e){var t=e.progress,i=e.uploadStatus,n=e.onCancelImport,r=null,o=Object(N.e)(t);return i===Va.INPROGRESS?(console.log("PROGRESS ",t),t&&"upload"===t.type&&(r="Uploading Video"),t&&"processing"===t.type&&(r="Processing video")):i===Va.INITIALIZED&&(r="Initializing Upload"),a.a.createElement("div",{style:{width:"90%"}},a.a.createElement(ca,{progressStatus:r,uploadProgress:t,timeRemainingStatus:o,type:ua.IMPORT}),a.a.createElement(Oo.d,{type:Oo.b.TRANSPARENT,text:"Cancel",onClickHandler:n}))}var Ba=O.c.div(La||(La=Xe()(["\n width: 100%;\n height: 147px;\n min-height: 360px;\n max-height: 500px;\n background-color: #212126;\n display: flex;\n justify-content: center;\n align-items: center;\n"]))),Va={INACTIVE:0,INITIALIZED:1,INPROGRESS:2},za={completedPercent:0,type:"upload"};function Ha(e){var t=this,i=e.file,n=e.isMobile,s=e.digest,l=e.recorder,u=e.recorderClose,c=(e.directImport,e.importCompletedCallback),d=Object(o.useState)(Va.INACTIVE),h=d[0],p=d[1],f=Object(o.useState)(za),g=f[0],m=f[1];Object(o.useEffect)(function(){r()(this,t),i&&v(i)}.bind(this),[i]);var v=function(e){var i=this;if(r()(this,t),e){var o={fileName:e.name,size:e.size/1024,fromAdvancedEdit:!1,token:s,isMobile:n};l.createVideoImport({params:o,uploadStartedCallback:y,updateProgress:b,file:e}).then(function(e){r()(this,i),console.log("PREVIEW RESPONSE ",e),c(e)}.bind(this)).catch(function(e){r()(this,i),console.log("ERROR >> ",e)}.bind(this)),p(Va.INITIALIZED)}}.bind(this),y=function(){r()(this,t),p(Va.INPROGRESS)}.bind(this),b=function(e){r()(this,t),m(e)}.bind(this),w=function(){if(r()(this,t),l.cancelVideoImport(),i)return u&&u();p(Va.INACTIVE),m(za)}.bind(this);return console.log("UPLOAD STATUS ",h,i,g),a.a.createElement(Ba,null,!i&&h===Va.INACTIVE&&a.a.createElement(Fa,{isMobile:n,onFileUpload:v}),h!==Va.INACTIVE&&a.a.createElement(Ua,{progress:g,uploadStatus:h,onCancelImport:w}))}i(85);var ja,Ga,qa,Wa=O.c.div(ja||(ja=Xe()([""]))),$a=O.c.div(Ga||(Ga=Xe()([""]))),Ya=O.c.div(qa||(qa=Xe()([""])));function Ka(e){var t=this,i=e.type,n=e.recorder,s=e.uploadCompleted,l=e.onRecorderClose,u=Object(o.useState)(!1),c=u[0],d=u[1],h=Object(o.useState)(),p=(h[0],h[1],function(){if(r()(this,t),i===F)return"Error when uploading video"}.bind(this)),f=function(){var e=this;r()(this,t);try{n.retryUpload().catch(function(t){r()(this,e),d(!1)}.bind(this))}catch(e){console.log("CATCH EX ",e)}d(!0)}.bind(this),g=function(){var e=this;r()(this,t);var i=n.getRecordingObjectUrls();if(Object.keys(i).length>0){var o=[];for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];o.push(a.a.createElement("a",{key:s,href:"".concat(l),download:!0},"Download ".concat(s," recording")))}return a.a.createElement("div",null,o,a.a.createElement("div",null,a.a.createElement(Oo.d,{text:"Retry upload",onClickHandler:f})))}Oo.d,Oo.b.SECONDARY,function(){return r()(this,e),console.log("Okay")}.bind(this)}.bind(this),m=function(){r()(this,t),s?s():l&&l()}.bind(this),v=function(){r()(this,t),d(!1)}.bind(this);return Object(o.useEffect)(function(){r()(this,t)}.bind(this),[c]),a.a.createElement(Wa,null,c&&a.a.createElement(ca,{recorder:n,onUploadComplete:m,onUploadError:v}),!c&&a.a.createElement(a.a.Fragment,null,a.a.createElement($a,null,p()),a.a.createElement(Ya,null,g())))}var Ja,Xa=i(101),Qa=i.n(Xa),Za=O.c.div(Ja||(Ja=Xe()(["\n &.screen-enter {\n opacity: 0;\n transform: translateX(100%);\n }\n\n &.screen-enter-active {\n opacity: 1;\n transform: translateX(0);\n }\n\n &.screen-enter-active {\n transition: opacity 300ms, transform 300ms;\n transition-delay: 50ms;\n }\n"]))),es=["active","children"];function ts(e){var t=e.active,i=e.children,n=Qa()(e,es);return a.a.createElement(D,{in:t,classNames:"screen",timeout:400,unmountOnExit:!0},a.a.createElement(Za,n,t&&i))}var is,ns,rs=O.c.div(is||(is=Xe()(["\n overflow-x: hidden;\n overflow-y: scroll;\n width: 720px;\n position: relative;\n background-color: ",';\n margin: 0 auto;\n text-align: center;\n transition: height 500ms ease-in;\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\n'])),function(e){switch(r()(this,void 0),e.action){case M.IMPORT_VIDEO:return"#212126";case M.POST_RECORD:return"#FFFFFF";default:return"transparent"}}.bind(void 0)),os=(O.c.div(ns||(ns=Xe()(["\n height: 45px;\n display: flex;\n align-items: center;\n font: normal normal 600 16px/16px Open Sans;\n color: #C3C3C3;\n border-bottom: 1px solid #34343C;\n justify-content: space-between;\n padding: 0 25px;\n"]))),["start_recording","import_video","hv_stop_recording","source_uploaded","record_stopped","preprocess_complete","source_video","record_initiated","record_details","open_widget"]),as={RECORDER:1,IMPORTER:2};function ss(e){var t=this,i=e.type,n=e.settings,s=e.token,l=e.userId,u=e.eventListenerClass,c=e.recorderClassName,d=e.eventCallback,h={fromPopup:!0,separateLayer:!1,systemAudio:!0,aspectRatio:Q.b.SIXTEEN_NINE,initiator:"generic_recorder",highlights:!0,resolution:720},p=Q.e.RECORDER_SDK_TOKEN,f=Object(o.useState)(!1),g=f[0],m=f[1],v=Object(o.useState)(),y=v[0],b=v[1],w=function(){var e=this,t=Object(o.useState)(0),i=(t[0],t[1]);return function(){var t=this;return r()(this,e),i(function(e){return r()(this,t),e+1}.bind(this))}.bind(this)}(),E=s||Object(N.c)(),_=Object(o.useRef)(h),S=Object(o.useRef)({}),T=Object(o.useRef)(new N.b({eventCallback:d})),C=Object(o.useRef)(),k=Object(o.useRef)(),A=Object(o.useRef)(),P=Object(o.useRef)(),I=Object(o.useRef)(),R=Object(o.useRef)(),U=Object(o.useRef)({}),V=Object(o.useRef)(!1),z=Object(o.useRef)(B({tokenType:p,userId:l,integrationType:"recorder_api"})),H=Object(o.useRef)(),j=Object(o.useRef)(),G=function(){r()(this,t),console.log("RECORDING CONFIGURATION ",_.current),z.current=B({tokenType:Q.e.RECORDER_SDK_TOKEN,userId:l,integrationType:"recorder_api"}),K(n);var e=new Ue({recordingConfiguration:_.current,tokenType:Q.e.RECORDER_SDK_TOKEN,token:E,recorderId:c,recorderEvtClass:u,logID:z.current,recorderAPIUtils:T.current,integrationType:"recorder_api",initiator:Q.q.GENERIC_RECORDER,extensionAvailable:j.current});b(e)}.bind(this),q=Object(o.useState)(null),W=q[0],$=q[1];Object(o.useEffect)(function(){r()(this,t),C.current||(C.current=new Be.a({token:E,tokenType:p})),G(),n.inline&&!1!==n.inline.open&&(!g&&m(!0),i==as.IMPORTER?(V.current=!1,$(M.IMPORT_VIDEO)):$(M.PRE_RECORD))}.bind(this),[]);var Y=function(e){r()(this,t);var i={};for(var n in L.b.recorderInitOptions)e&&e.hasOwnProperty(n)?i[n]=e[n]:i[n]=L.b.recorderInitOptions[n];U.current={theme:L.b.theme,recorderInitOptions:i,authentication:{token:s,tokenType:p}}}.bind(this),K=function(e){r()(this,t),console.log("SETTINGS ",e),null!=e&&e.record_config&&(_.current.screenRecord=!1,_.current.webCam=!1,_.current.audio=!1,0!=e.record_config.screen&&(_.current.screenRecord=!0),0!=e.record_config.webcam&&(_.current.webCam=!0),0!=e.record_config.mic&&(_.current.audio=!0),y&&y.updateConfig({recordingConfiguration:_.current}))}.bind(this);Object(o.useEffect)(function(){r()(this,t),y&&n&&K(n)}.bind(this),[y]),Object(o.useEffect)(function(){r()(this,t),n&&Y(n)}.bind(this),[]);var J=function(e){var i;if(r()(this,t),e.detail&&e.detail.extension){var n=e.detail;delete n.extension,T.current.sendEvent(e.type,n)}"record_details"===e.type&&e.detail&&(y.setExtensionRecording(!0),y.setRecordDetails(e.detail)),"open_widget"===e.type&&(console.log("YUP IM HERE"),g||W||(G(),m(!0),$(M.PRE_RECORD),w())),"start_recording"===e.type&&(void 0!==e.detail.extension_available&&(j.current=e.detail.extension_available),G(),console.log("RECORDING CONFIG event ",e.detail.recording_configuration),te(e.detail.recording_configuration),!g&&m(!0),$(M.RECORD),w()),"hv_stop_recording"===e.type&&ie(),"record_stopped"===e.type&&console.log("RECORD STOPPED"),"preprocess_complete"===e.type&&y.setProjectJson(e.detail.project_json),"source_video"===e.type&&(A.current={},"webcam"===e.detail.type&&(A.current.webcam=e.detail.url),"screen"===e.detail.type&&(A.current.screen=e.detail.url),!g&&m(!0),$(M.POST_RECORD)),"import_video"===e.type&&(T.current.sendEvent("show_frame"),k.current=e.detail.file,G(),!g&&m(!0),V.current=!0,$(M.IMPORT_VIDEO));try{i="hippovideo"==e.data.initiator?e.data:JSON.parse(e.data)}catch(e){return}if("hippovideo"==i.initiator){if("record_initiated"===i.type&&i.detail&&i.detail.recording_with_extension&&(y.setExtensionRecording(i.detail.recording_with_extension),y.setRecordDetails(i.detail.record_details),y.stopStreams(),$(null)),"hv_initialize_recorder"===i.type){var o={};for(var a in L.b.recorderInitOptions)i.detail&&i.detail.settings&&i.detail.settings.hasOwnProperty(a)?o[a]=i.detail.settings[a]:o[a]=L.b.recorderInitOptions[a];o.theme=L.b.theme,U.current=o}"hv_source_video"===i.type&&(A.current={},"webcam"===i.detail.type&&(A.current.webcam=i.detail.url),"screen"===i.detail.type&&(A.current.screen=i.detail.url),T.current.sendEvent("show_frame"),!g&&m(!0),$(M.POST_RECORD)),"hv_start_recording"==i.type&&(te(i.detail),!g&&m(!0),$(M.RECORD)),"hv_stop_recording"===i.type&&ie(),"hv_import_video"===i.type&&(T.current.sendEvent("show_frame"),importTypeRef.current=i.detail.type,G(),!g&&m(!0),$(M.IMPORT_VIDEO)),i.type,"hv_preprocess_complete"===i.type&&y.setProjectJson(i.detail.project_json)}}.bind(this),X=function(){r()(this,t),!g&&m(!0),$(M.RECORD),w()}.bind(this),Z=function(){r()(this,t);var e=_.current;delete e.screenRecord,delete e.webCam,delete e.audio,_.current=e,y.updateConfig({recordingConfiguration:_.current})}.bind(this),ee=Object(o.useCallback)(function(){r()(this,t),n.inline&&n.inline.open?(Z(),y.isUploadComplete()&&G(),!g&&m(!0),i===as.IMPORTER?$(M.IMPORT_VIDEO):$(M.PRE_RECORD)):(m(!1),$(null),y.stopStreams(),T.current.sendEvent("_close_popup"))}.bind(this),[n,y]),te=function(e){if(r()(this,t),e){T.current.sendEvent("show_frame");var i=Object.assign({},_.current);null!=e.resolution&&(i.resolution=e.resolution),null!=e.initiator&&(i.initiator=e.initiator),null!=e.screenRecord&&(i.screenRecord=e.screenRecord),null!=e.webCam&&(i.webCam=e.webCam),null!=e.audio&&(i.audio=e.audio),null!=e.uniqueId&&(i.uniqueId=e.uniqueId),null!=e.webcamBitRate&&(i.webcamBitRate=e.webcamBitRate),null!=e.aspectRatio&&(i.aspectRatio=e.aspectRatio),null!=e.teleprompter&&(S.current.showTeleprompter=e.teleprompter),null!=e.timer&&(i.timer=e.timer),null!=e.recordingWithExtension&&(i.recordingWithExtension=e.recordingWithExtension),null!=e.show_preview&&(S.current.showRecordPreview=e.show_preview),null!=e.showFaceCue&&(S.current.showFaceCue=e.showFaceCue),null!=e.showLightingFeedback&&(S.current.showLightingFeedback=e.showLightingFeedback),null!=e.fromProductReview&&(i.fromProductReview=e.fromProductReview),null!=e.fromChristmasTemplate&&(i.my_video=!0);var n=parseInt(e.timer);null!=n&&!isNaN(n)&&Math.round(n)>0&&(S.current.recordingLimit=1e3*Math.round(n)),_.current=i,y.updateConfig({recordingConfiguration:_.current})}}.bind(this);Object(o.useEffect)(function(){var e=this;return r()(this,t),window.addEventListener("message",J),os.forEach(function(t){r()(this,e),H.current.addEventListener(t,J)}.bind(this)),function(){var t=this;r()(this,e),window.removeEventListener("message",J),os.forEach(function(e){r()(this,t),H.current.removeEventListener(e,J)}.bind(this))}.bind(this)}.bind(this));(function(){r()(this,t),console.log("close recorder event")}).bind(this);var ie=function(){r()(this,t),y.finishRecording(),n.inline||!g&&m(!0),ne(y.getRecordingObjectUrls())}.bind(this),ne=function(e){var i=this;r()(this,t),A.current=e,T.current.sendEvent("record_stopped",{removeWebcamPreview:!0,removeMarkupTools:!0}),y.getUploadDetails().then(function(e){r()(this,i),e.error?(R.current=F,$(M.ERROR)):$(M.POST_RECORD)}.bind(this)).catch(function(){r()(this,i),R.current=F,$(M.ERROR)}.bind(this))}.bind(this),re=function(e){r()(this,t),P.current=e,$(M.POST_RECORD)}.bind(this),oe=function(e){r()(this,t),e===M.ERROR&&$(M.POST_RECORD)}.bind(this),ae=(function(){r()(this,t),_.current=y.getRecordingConfiguration(),P.current=null,X()}.bind(this),function(){r()(this,t),n.inline&&n.inline.open&&(G(),$(M.PRE_RECORD))}.bind(this)),se=function(){var e=this;return r()(this,t),W?a.a.createElement(L.a.Provider,{value:U.current},[M.PRE_RECORD,M.RECORD].includes(W)&&a.a.createElement(Lo,{recorder:y,action:W,handlePopupClose:ue,onFinishRecording:ne,onRecordingCancel:ae,recorderAPIUtils:T.current,extensionAvailable:j.current}),a.a.createElement(ts,{active:W===M.POST_RECORD},a.a.createElement(Oa,{urls:A.current,token:E,tokenType:p,onEditClick:le,recorderAPIModel:C.current,integrationType:"recorder_api",recorder:y,recorderAPIUtils:T.current,extensionAvailable:j.current,recordingConfiguration:_.current,onRecorderClose:ee,importCompleteResponse:P.current})),a.a.createElement(ts,{active:W===M.IMPORT_VIDEO},a.a.createElement(Ha,{file:k.current,recorder:y,recorderAPIModel:C.current,isMobile:!1,digest:E,recorderClose:ee,directImport:V.current,importCompletedCallback:re})),a.a.createElement(ts,{active:W===M.ERROR},a.a.createElement(Ka,{recorder:y,type:R.current,onRecorderClose:ee,uploadCompleted:function(){return r()(this,e),oe(M.ERROR)}.bind(this)}))):null}.bind(this),le=function(e){r()(this,t),e&&T.current.sendEvent("edit_enabled"),I.current.style.maxHeight=e?"700px":""}.bind(this);Object(o.useLayoutEffect)(function(){var e=this;r()(this,t),setTimeout(function(){r()(this,e),T.current.sendEvent("sdk_loaded");try{var t=performance.getEntriesByType("navigation")[0].duration,i=new de({integrationType:"recorder_api",module:"RECORDER_API",logUID:z.current,tokenType:p,token:E});i&&i.info("RECORDER_API_PAGE_LOAD_TIME",{loadTime:t})}catch(e){}}.bind(this),500)}.bind(this),[]);(function(){var e=this;return r()(this,t),W&&a.a.createElement(x,{mode:"out-in"},a.a.createElement(D,{key:W,addEndListener:function(t,i){r()(this,e);try{t.addEndListener("transitionend",i,!1)}catch(e){console.error(e)}}.bind(this),classNames:"fade",unmountOnExit:!0},g&&a.a.createElement(rs,null,se())))}).bind(this),function(){switch(r()(this,t),W){case M.PRE_RECORD:return"Record Preview";case M.RECORD:return"Record";case M.POST_RECORD:return"Video Preview";case M.IMPORT_VIDEO:return"Import Video";case M.ERROR:return"Error";default:return"Info"}}.bind(this);var ue=function(){r()(this,t),ee()}.bind(this);return a.a.createElement(a.a.Fragment,null,g&&a.a.createElement(O.a,{theme:U.current.theme},a.a.createElement(rs,{action:W,ref:I,className:"".concat(c)},se())),a.a.createElement("input",{type:"hidden",ref:H,className:"".concat(u)}))}},function(e,t,i){var n={};n[i(22)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,i){var n=i(8),r=i(210),o=n["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=o},function(e,t,i){var n=i(8),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},function(e,t,i){var n=i(102),r=i(15);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var n=i(8),r=i(156),o=i(122),a=n.TypeError;e.exports=function(e){if(r(e))return e;throw a(o(e)+" is not a constructor")}},function(e,t,i){var n=i(32),r=i(265),o=i(42),a=i(30),s=i(51),l=i(126);t.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=s(t),r=l(t),u=r.length,c=0;u>c;)o.f(e,i=r[c++],n[i]);return e}},function(e,t,i){"use strict";var n=i(30);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,i){var n=i(15),r=i(8).RegExp,o=n((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||n((function(){return!r("a","y").sticky})),s=o||n((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},function(e,t,i){"use strict";var n=i(219).charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},function(e,t,i){var n=i(13),r=i(59),o=i(39),a=i(55),s=n("".charAt),l=n("".charCodeAt),u=n("".slice),c=function(e){return function(t,i){var n,c,d=o(a(t)),h=r(i),p=d.length;return h<0||h>=p?e?"":void 0:(n=l(d,h))<55296||n>56319||h+1===p||(c=l(d,h+1))<56320||c>57343?e?s(d,h):n:e?u(d,h,h+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},function(e,t,i){var n=i(17),r=i(275);n({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,i){var n=i(414);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},function(e,t,i){"use strict";(function(t){var n=i(53),r=i(420),o=i(279),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(l=i(280)),l),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,i){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,i=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,a=!i&&"json"===this.responseType;if(a||r&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u}).call(this,i(60))},function(e,t,i){var n=i(29),r=i(76),o=i(22)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==r(e))}},function(e,t,i){"use strict";var n=i(33),r=i(159),o=i(30),a=i(55),s=i(435),l=i(39),u=i(90),c=i(160);r("search",(function(e,t,i){return[function(t){var i=a(this),r=null==t?void 0:u(t,e);return r?n(r,t,i):new RegExp(t)[e](l(i))},function(e){var n=o(this),r=l(e),a=i(t,n,r);if(a.done)return a.value;var u=n.lastIndex;s(u,0)||(n.lastIndex=0);var d=c(n,r);return s(n.lastIndex,u)||(n.lastIndex=u),null===d?-1:d.index}]}))},function(e,t,i){"use strict";var n=i(63),r=i(42),o=i(22),a=i(32),s=o("species");e.exports=function(e){var t=n(e),i=r.f;a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,i){var n=i(8),r=i(83),o=i(33),a=i(30),s=i(122),l=i(227),u=i(45),c=i(64),d=i(167),h=i(132),p=i(287),f=n.TypeError,g=function(e,t){this.stopped=e,this.result=t},m=g.prototype;e.exports=function(e,t,i){var n,v,y,b,w,E,_,S=i&&i.that,T=!(!i||!i.AS_ENTRIES),C=!(!i||!i.IS_ITERATOR),k=!(!i||!i.INTERRUPTED),x=r(t,S),A=function(e){return n&&p(n,"normal",e),new g(!0,e)},P=function(e){return T?(a(e),k?x(e[0],e[1],A):x(e[0],e[1])):k?x(e,A):x(e)};if(C)n=e;else{if(!(v=h(e)))throw f(s(e)+" is not iterable");if(l(v)){for(y=0,b=u(e);b>y;y++)if((w=P(e[y]))&&c(m,w))return w;return new g(!1)}n=d(e,v)}for(E=n.next;!(_=o(E,n)).done;){try{w=P(_.value)}catch(e){p(n,"throw",e)}if("object"==typeof w&&w&&c(m,w))return w}return new g(!1)}},function(e,t,i){var n=i(22),r=i(131),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},function(e,t,i){var n=i(8).TypeError;e.exports=function(e,t){if(e<t)throw n("Not enough arguments");return e}},function(e,t){},function(e,t,i){var n=i(34),r=i(231),o=i(232),a=i(233).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,i=e.service.api,n=i.targetPrefix+"."+i.operations[e.operation].name,o=i.jsonVersion||"1.0",s=i.operations[e.operation].input,l=new r;1===o&&(o="1.0"),t.body=l.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+o,t.headers["X-Amz-Target"]=n,a(e)},extractError:function(e){var t={},i=e.httpResponse;if(t.code=i.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),i.body.length>0)try{var r=JSON.parse(i.body.toString()),o=r.__type||r.code||r.Code;o&&(t.code=o.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=r.message||r.Message||null}catch(r){t.statusCode=i.statusCode,t.message=i.statusMessage}else t.statusCode=i.statusCode,t.message=i.statusCode.toString();e.error=n.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var i=e.request.service.api.operations[e.request.operation].output||{},n=new o;e.data=n.parse(t,i)}}}},function(e,t,i){var n=i(34);function r(){}function o(e,t){if(t&&null!=e)switch(t.type){case"structure":return function(e,t){if(t.isDocument)return e;var i={};return n.each(e,(function(e,n){var r=t.members[e];if(r){if("body"!==r.location)return;var a=r.isLocationName?r.name:e,s=o(n,r);void 0!==s&&(i[a]=s)}})),i}(e,t);case"map":return function(e,t){var i={};return n.each(e,(function(e,n){var r=o(n,t.value);void 0!==r&&(i[e]=r)})),i}(e,t);case"list":return function(e,t){var i=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0!==n&&i.push(n)})),i}(e,t);default:return function(e,t){return t.toWireFormat(e)}(e,t)}}r.prototype.build=function(e,t){return JSON.stringify(o(e,t))},e.exports=r},function(e,t,i){var n=i(34);function r(){}function o(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return function(e,t){if(null==e)return;if(t.isDocument)return e;var i={},r=t.members;return n.each(r,(function(t,n){var r=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,r)){var a=o(e[r],n);void 0!==a&&(i[t]=a)}})),i}(e,t);case"map":return function(e,t){if(null==e)return;var i={};return n.each(e,(function(e,n){var r=o(n,t.value);i[e]=void 0===r?null:r})),i}(e,t);case"list":return function(e,t){if(null==e)return;var i=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0===n?i.push(null):i.push(n)})),i}(e,t);default:return function(e,t){return t.toType(e)}(e,t)}}r.prototype.parse=function(e,t){return o(JSON.parse(e),t)},e.exports=r},function(e,t,i){var n=i(34),r=i(14);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t,i,o,a=e.service.api.operations[e.operation];if(function(e){var t=e.service.api,i=t.operations[e.operation],r=t.endpointOperation&&t.endpointOperation===n.string.lowerFirst(i.name);return"NULL"!==i.endpointDiscoveryRequired||!0===r}(e))return e;if(a.endpoint&&a.endpoint.hostPrefix){var s=function(e,t,i){return n.each(i.members,(function(i,r){if(!0===r.hostLabel){if("string"!=typeof t[i]||""===t[i])throw n.error(new Error,{message:"Parameter "+i+" should be a non-empty string.",code:"InvalidParameter"});var o=new RegExp("\\{"+i+"\\}","g");e=e.replace(o,t[i])}})),e}(a.endpoint.hostPrefix,e.params,a.input);!function(e,t){e.host&&(e.host=t+e.host);e.hostname&&(e.hostname=t+e.hostname)}(e.httpRequest.endpoint,s),t=e.httpRequest.endpoint.hostname,i=t.split("."),o=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/,n.arrayEach(i,(function(e){if(!e.length||e.length<1||e.length>63)throw n.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!o.test(e))throw r.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},function(e,t,i){var n=i(34),r=i(460);function o(e,t){n.each(t,(function(t,i){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=i))}))}e.exports={configureEndpoint:function(e){for(var t=function(e){var t=e.config.region,i=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),n=e.api.endpointPrefix;return[[t,n],[i,n],[t,"*"],[i,"*"],["*",n],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),i=e.config.useFipsEndpoint,n=e.config.useDualstackEndpoint,a=0;a<t.length;a++){var s=t[a];if(s){var l=i?n?r.dualstackFipsRules:r.fipsRules:n?r.dualstackRules:r.rules;if(Object.prototype.hasOwnProperty.call(l,s)){var u=l[s];return"string"==typeof u&&(u=r.patterns[u]),e.isGlobalEndpoint=!!u.globalEndpoint,u.signingRegion&&(e.signingRegion=u.signingRegion),u.signatureVersion||(u.signatureVersion="v4"),void o(e,u)}}}},getEndpointSuffix:function(e){for(var t={"^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$":"amazonaws.com","^cn\\-\\w+\\-\\d+$":"amazonaws.com.cn","^us\\-gov\\-\\w+\\-\\d+$":"amazonaws.com","^us\\-iso\\-\\w+\\-\\d+$":"c2s.ic.gov","^us\\-isob\\-\\w+\\-\\d+$":"sc2s.sgov.gov"},i=Object.keys(t),n=0;n<i.length;n++){var r=RegExp(i[n]),o=t[i[n]];if(r.test(e))return o}return"amazonaws.com"}}},function(e,t,i){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,r){if(e===r)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(r))return!1;if(!0===t(e)){if(e.length!==r.length)return!1;for(var o=0;o<e.length;o++)if(!1===n(e[o],r[o]))return!1;return!0}if(!0===i(e)){var a={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===n(e[s],r[s]))return!1;a[s]=!0}for(var l in r)if(hasOwnProperty.call(r,l)&&!0!==a[l])return!1;return!0}return!1}function r(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(i(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}var o;o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var a=0,s=2,l={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},u={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},c={"<":!0,">":!0,"=":!0,"!":!0},d={" ":!0,"\t":!0,"\n":!0};function h(e){return e>="0"&&e<="9"||"-"===e}function p(){}p.prototype={tokenize:function(e){var t,i,n,r,o=[];for(this._current=0;this._current<e.length;)if((r=e[this._current])>="a"&&r<="z"||r>="A"&&r<="Z"||"_"===r)t=this._current,i=this._consumeUnquotedIdentifier(e),o.push({type:"UnquotedIdentifier",value:i,start:t});else if(void 0!==u[e[this._current]])o.push({type:u[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(h(e[this._current]))n=this._consumeNumber(e),o.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),o.push(n);else if('"'===e[this._current])t=this._current,i=this._consumeQuotedIdentifier(e),o.push({type:"QuotedIdentifier",value:i,start:t});else if("'"===e[this._current])t=this._current,i=this._consumeRawStringLiteral(e),o.push({type:"Literal",value:i,start:t});else if("`"===e[this._current]){t=this._current;var a=this._consumeLiteral(e);o.push({type:"Literal",value:a,start:t})}else if(void 0!==c[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==d[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:"And",value:"&&",start:t})):o.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:"Or",value:"||",start:t})):o.push({type:"Pipe",value:"|",start:t})}return o},_consumeUnquotedIdentifier:function(e){var t,i=this._current;for(this._current++;this._current<e.length&&((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(i,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var i=e.length;'"'!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var i=e.length;"'"!==e[this._current]&&this._current<i;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var i=e.length;h(e[this._current])&&this._current<i;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,i=e[t];return this._current++,"!"===i?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===i?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===i?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===i&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,i=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&"`"!==e[r+1]?r++:r+=2,this._current=r}var a=o(e.slice(i,this._current));return a=a.replace("\\`","`"),t=this._looksLikeJSON(a)?JSON.parse(a):JSON.parse('"'+a+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var f={};function g(){}function m(e){this.runtime=e}function v(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[s,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[s]},{types:[s]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[s,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[s]},{types:[s]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[s]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[s,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}f.EOF=0,f.UnquotedIdentifier=0,f.QuotedIdentifier=0,f.Rbracket=0,f.Rparen=0,f.Comma=0,f.Rbrace=0,f.Number=0,f.Current=0,f.Expref=0,f.Pipe=1,f.Or=2,f.And=3,f.EQ=5,f.GT=5,f.LT=5,f.GTE=5,f.LTE=5,f.NE=5,f.Flatten=9,f.Star=20,f.Filter=21,f.Dot=40,f.Not=45,f.Lbrace=50,f.Lbracket=55,f.Lparen=60,g.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var i=this._lookaheadToken(0),n=new Error("Unexpected token type: "+i.type+", value: "+i.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new p).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var i=this.nud(t),n=this._lookahead(0);e<f[n];)this._advance(),i=this.led(n,i),n=this._lookahead(0);return i},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,i;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(f.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(f.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(f.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(f.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[i=this.expression(f.Expref)]};case"Lparen":for(var r=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(i={type:"Current"},this._advance()):i=this.expression(0),r.push(i);return this._match("Rparen"),r[0];default:this._errorToken(e)}},led:function(e,t){var i;switch(e){case"Dot":var n=f.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,i=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,i=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,i=this.expression(f.Pipe)]};case"Or":return{type:"OrExpression",children:[t,i=this.expression(f.Or)]};case"And":return{type:"AndExpression",children:[t,i=this.expression(f.And)]};case"Lparen":for(var r,o=t.name,a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),a.push(r);return this._match("Rparen"),{type:"Function",name:o,children:a};case"Filter":var s=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,i="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(f.Filter),s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(f.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var l=this._lookaheadToken(0);return"Number"===l.type||"Colon"===l.type?(i=this._parseIndexExpression(),this._projectIfSlice(t,i)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,i=this._parseProjectionRHS(f.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),i=new Error("Expected "+e+", got: "+t.type);throw i.name="ParserError",i}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var i={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[i,this._parseProjectionRHS(f.Star)]}:i},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,i=this._lookahead(0);"Rbracket"!==i&&t<3;){if("Colon"===i)t++,this._advance();else{if("Number"!==i){var n=this._lookahead(0),r=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw r.name="Parsererror",r}e[t]=this._lookaheadToken(0).value,this._advance()}i=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(f[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(f[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var i=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+i.value+"("+i.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,i,n=[],r=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),r.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),i={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(i),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},m.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var a,s,l,u,c,d,h,p,f;switch(e.type){case"Field":return null!==o&&i(o)?void 0===(d=o[e.name])?null:d:null;case"Subexpression":for(l=this.visit(e.children[0],o),f=1;f<e.children.length;f++)if(null===(l=this.visit(e.children[1],l)))return null;return l;case"IndexExpression":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Index":if(!t(o))return null;var g=e.value;return g<0&&(g=o.length+g),void 0===(l=o[g])&&(l=null),l;case"Slice":if(!t(o))return null;var m=e.children.slice(0),v=this.computeSliceParams(o.length,m),y=v[0],b=v[1],w=v[2];if(l=[],w>0)for(f=y;f<b;f+=w)l.push(o[f]);else for(f=y;f>b;f+=w)l.push(o[f]);return l;case"Projection":var E=this.visit(e.children[0],o);if(!t(E))return null;for(p=[],f=0;f<E.length;f++)null!==(s=this.visit(e.children[1],E[f]))&&p.push(s);return p;case"ValueProjection":if(!i(E=this.visit(e.children[0],o)))return null;p=[];var _=function(e){for(var t=Object.keys(e),i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}(E);for(f=0;f<_.length;f++)null!==(s=this.visit(e.children[1],_[f]))&&p.push(s);return p;case"FilterProjection":if(!t(E=this.visit(e.children[0],o)))return null;var S=[],T=[];for(f=0;f<E.length;f++)r(a=this.visit(e.children[2],E[f]))||S.push(E[f]);for(var C=0;C<S.length;C++)null!==(s=this.visit(e.children[1],S[C]))&&T.push(s);return T;case"Comparator":switch(u=this.visit(e.children[0],o),c=this.visit(e.children[1],o),e.name){case"EQ":l=n(u,c);break;case"NE":l=!n(u,c);break;case"GT":l=u>c;break;case"GTE":l=u>=c;break;case"LT":l=u<c;break;case"LTE":l=u<=c;break;default:throw new Error("Unknown comparator: "+e.name)}return l;case"Flatten":var k=this.visit(e.children[0],o);if(!t(k))return null;var x=[];for(f=0;f<k.length;f++)t(s=k[f])?x.push.apply(x,s):x.push(s);return x;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(p=[],f=0;f<e.children.length;f++)p.push(this.visit(e.children[f],o));return p;case"MultiSelectHash":if(null===o)return null;var A;for(p={},f=0;f<e.children.length;f++)p[(A=e.children[f]).name]=this.visit(A.value,o);return p;case"OrExpression":return r(a=this.visit(e.children[0],o))&&(a=this.visit(e.children[1],o)),a;case"AndExpression":return!0===r(u=this.visit(e.children[0],o))?u:this.visit(e.children[1],o);case"NotExpression":return r(u=this.visit(e.children[0],o));case"Literal":return e.value;case"Pipe":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Current":return o;case"Function":var P=[];for(f=0;f<e.children.length;f++)P.push(this.visit(e.children[f],o));return this.runtime.callFunction(e.name,P);case"ExpressionReference":var I=e.children[0];return I.jmespathType="Expref",I;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var i=t[0],n=t[1],r=t[2],o=[null,null,null];if(null===r)r=1;else if(0===r){var a=new Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var s=r<0;return i=null===i?s?e-1:0:this.capSliceRange(e,i,r),n=null===n?s?-1:e:this.capSliceRange(e,n,r),o[0]=i,o[1]=n,o[2]=r,o},capSliceRange:function(e,t,i){return t<0?(t+=e)<0&&(t=i<0?-1:0):t>=e&&(t=i<0?e-1:e),t}},v.prototype={callFunction:function(e,t){var i=this.functionTable[e];if(void 0===i)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,i._signature),i._func.call(this,t)},_validateArgs:function(e,t,i){var n,r,o,a;if(i[i.length-1].variadic){if(t.length<i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+i.length+n+" but received "+t.length)}else if(t.length!==i.length)throw n=1===i.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+i.length+n+" but received "+t.length);for(var s=0;s<i.length;s++){a=!1,r=i[s].types,o=this._getTypeName(t[s]);for(var u=0;u<r.length;u++)if(this._typeMatches(o,r[u],t[s])){a=!0;break}if(!a){var c=r.map((function(e){return l[e]})).join(",");throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+c+" but received type "+l[o]+" instead.")}}},_typeMatches:function(e,t,i){if(1===t)return!0;if(9!==t&&8!==t&&3!==t)return e===t;if(3===t)return 3===e;if(3===e){var n;8===t?n=a:9===t&&(n=s);for(var r=0;r<i.length;r++)if(!this._typeMatches(this._getTypeName(i[r]),n,i[r]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return s;case"[object Number]":return a;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?6:4}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],i=e[1];return-1!==t.indexOf(i,t.length-i.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===s){for(var t=e[0],i="",n=t.length-1;n>=0;n--)i+=t[n];return i}var r=e[0].slice(0);return r.reverse(),r},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t/i.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return i(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],i=this._interpreter,n=e[0],r=e[1],o=0;o<r.length;o++)t.push(i.visit(n,r[o]));return t},_functionMerge:function(e){for(var t={},i=0;i<e.length;i++){var n=e[i];for(var r in n)t[r]=n[r]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.max.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)i.localeCompare(t[n])<0&&(i=t[n]);return i}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.min.apply(Math,e[0]);for(var t=e[0],i=t[0],n=1;n<t.length;n++)t[n].localeCompare(i)<0&&(i=t[n]);return i}return null},_functionSum:function(e){for(var t=0,i=e[0],n=0;n<i.length;n++)t+=i[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case a:return"number";case s:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],i=Object.keys(t),n=[],r=0;r<i.length;r++)n.push(t[i[r]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return 3===this._getTypeName(e[0])?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===s?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,i=this._getTypeName(e[0]);return i===a?e[0]:i!==s||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var i=this._interpreter,n=e[1],r=this._getTypeName(i.visit(n,t[0]));if([a,s].indexOf(r)<0)throw new Error("TypeError");for(var o=this,l=[],u=0;u<t.length;u++)l.push([u,t[u]]);l.sort((function(e,t){var a=i.visit(n,e[1]),s=i.visit(n,t[1]);if(o._getTypeName(a)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(a));if(o._getTypeName(s)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(s));return a>s?1:a<s?-1:e[0]-t[0]}));for(var c=0;c<l.length;c++)t[c]=l[c][1];return t},_functionMaxBy:function(e){for(var t,i,n=e[1],r=e[0],o=this.createKeyFunction(n,[a,s]),l=-1/0,u=0;u<r.length;u++)(i=o(r[u]))>l&&(l=i,t=r[u]);return t},_functionMinBy:function(e){for(var t,i,n=e[1],r=e[0],o=this.createKeyFunction(n,[a,s]),l=1/0,u=0;u<r.length;u++)(i=o(r[u]))<l&&(l=i,t=r[u]);return t},createKeyFunction:function(e,t){var i=this,n=this._interpreter;return function(r){var o=n.visit(e,r);if(t.indexOf(i._getTypeName(o))<0){var a="TypeError: expected one of "+t+", received "+i._getTypeName(o);throw new Error(a)}return o}}},e.tokenize=function(e){return(new p).tokenize(e)},e.compile=function(e){return(new g).parse(e)},e.search=function(e,t){var i=new g,n=new v,r=new m(n);n._interpreter=r;var o=i.parse(t);return r.search(o,e)},e.strictDeepEqual=n}(t)},function(e,t,i){"use strict";var n=i(17),r=i(162).trim;n({target:"String",proto:!0,forced:i(517)("trim")},{trim:function(){return r(this)}})},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(531),i(139),i(140)],void 0===(r=function(e,t,i,n){return i.View.extend({template:n,initialize:function(e){this.modalId=e.id,this.size=e.size?e.size:"",this.showIcon=e.showIcon,this.showError=e.showError,this.showConfirm=e.showConfirm,this.showInfo=e.showInfo,this.showButtonBar=e.showButtonBar,this.buttonBarTemplate=e.buttonBarTemplate,this.confirmYesCallback=e.confirmYesCallback,this.confirmNoCallback=e.confirmNoCallback,this.reduceFontSize=e.reduceFontSize,this.yesText=e.yesText,this.noText=e.noText,this.okText=e.okText,this._handleOKBtnClick=this._handleOKBtnClick.bind(this),this._handleYesBtnClick=this._handleOKBtnClick.bind(this,!0),this._handleNoBtnClick=this._handleOKBtnClick.bind(this,!1),this.modalTitle=e.title,this.titleImage=e.titleImage,this.modalBody=e.body,this.onYes=e.onYes,this.onNo=e.onNo,this.onOK=e.onOK,this.bgClickClose=void 0===e.bgClickClose,this.escClose=void 0===e.escClose,this.showCloseIcon=void 0===e.showCloseIcon,this.autoClose=void 0===e.autoClose,this.showSuccess=void 0===e.showSuccess,this.showTitle=void 0===e.showTitle||e.showTitle,this.leftBtnText=e.leftBtnText,this.onLeftBtnClick=e.onLeftBtnClick,this._handleLeftBtnClick=this._handleLeftBtnClick.bind(this),this.additionalClass=e.additionalClass||"",this.titleImage=e.titleImage,this.eventData=e.eventData},render:function(){this.$el.html(this.template({modalTitle:this.modalTitle,modalBody:this.modalBody,titleImage:this.titleImage,modalId:this.modalId,size:this.size,showIcon:this.showIcon,showError:this.showError,showConfirm:this.showConfirm,showInfo:this.showInfo,showButtonBar:this.showButtonBar,showOKButton:this.showError||this.showInfo,buttonBarTemplate:this.buttonBarTemplate,yesText:this.yesText,noText:this.noText,reduceFontSize:this.reduceFontSize,okText:this.okText,bgClickClose:this.bgClickClose,showCloseIcon:this.showCloseIcon,escClose:this.escClose,autoClose:this.autoClose,showSuccess:this.showSuccess,leftBtnText:this.leftBtnText,titleImage:this.titleImage,showTitle:this.showTitle,additionalClass:this.additionalClass})),this.setElement(e("#"+this.modalId)),this._delegateViewEvents(),this.renderState=!0},destroy:function(){this.undelegateEvents(),this.remove()},setBody:function(e){this.modalBody=e,this.renderState=!1},showModal:function(){this.renderState||(this.undelegateEvents(),this.render()),this.$el.foundation("reveal","open")},hideModal:function(){this.$el.foundation("reveal","close")},_handleOKBtnClick:function(e){this.autoClose&&this.$el.foundation("reveal","close"),!0===e?this.onYes&&(this.eventData?this.onYes(this.eventData):this.onYes()):!1===e?this.onNo&&this.onNo():this.onOK&&this.onOK()},_handleLeftBtnClick:function(e){this.onLeftBtnClick&&this.onLeftBtnClick()},_delegateViewEvents:function(){var e="#"+this.modalId+"OKBtn",t="#"+this.modalId+"YesBtn",i="#"+this.modalId+"NoBtn",n="#"+this.modalId+"LeftBtn";this.showError||this.showInfo?this.delegate("click",e,this._handleOKBtnClick):this.showConfirm&&(this.delegate("click",t,this._handleYesBtnClick),this.delegate("click",i,this._handleNoBtnClick)),this.onLeftBtnClick&&this.delegate("click",n,this._handleLeftBtnClick)}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(114)(i(72),"Map");e.exports=n},function(e,t,i){"use strict";i(71);var n,r=i(17),o=i(32),a=i(338),s=i(8),l=i(83),u=i(13),c=i(215).f,d=i(44),h=i(95),p=i(31),f=i(275),g=i(320),m=i(128),v=i(219).codeAt,y=i(614),b=i(39),w=i(82),E=i(228),_=i(183),S=i(50),T=S.set,C=S.getterFor("URL"),k=_.URLSearchParams,x=_.getState,A=s.URL,P=s.TypeError,I=s.parseInt,R=Math.floor,D=Math.pow,O=u("".charAt),N=u(/./.exec),L=u([].join),M=u(1..toString),F=u([].pop),U=u([].push),B=u("".replace),V=u([].shift),z=u("".split),H=u("".slice),j=u("".toLowerCase),G=u([].unshift),q=/[a-z]/i,W=/[\d+-.a-z]/i,$=/\d/,Y=/^0x/i,K=/^[0-7]+$/,J=/^\d+$/,X=/^[\da-f]+$/i,Q=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Z=/[\0\t\n\r #/:<>?@[\\\]^|]/,ee=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,te=/[\t\n\r]/g,ie=function(e){var t,i,n,r;if("number"==typeof e){for(t=[],i=0;i<4;i++)G(t,e%256),e=R(e/256);return L(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,i=1,n=null,r=0,o=0;o<8;o++)0!==e[o]?(r>i&&(t=n,i=r),n=null,r=0):(null===n&&(n=o),++r);return r>i&&(t=n,i=r),t}(e),i=0;i<8;i++)r&&0===e[i]||(r&&(r=!1),n===i?(t+=i?":":"::",r=!0):(t+=M(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},ne={},re=f({},ne,{" ":1,'"':1,"<":1,">":1,"`":1}),oe=f({},re,{"#":1,"?":1,"{":1,"}":1}),ae=f({},oe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),se=function(e,t){var i=v(e,0);return i>32&&i<127&&!p(t,e)?e:encodeURIComponent(e)},le={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ue=function(e,t){var i;return 2==e.length&&N(q,O(e,0))&&(":"==(i=O(e,1))||!t&&"|"==i)},ce=function(e){var t;return e.length>1&&ue(H(e,0,2))&&(2==e.length||"/"===(t=O(e,2))||"\\"===t||"?"===t||"#"===t)},de=function(e){return"."===e||"%2e"===j(e)},he={},pe={},fe={},ge={},me={},ve={},ye={},be={},we={},Ee={},_e={},Se={},Te={},Ce={},ke={},xe={},Ae={},Pe={},Ie={},Re={},De={},Oe=function(e,t,i){var n,r,o,a=b(e);if(t){if(r=this.parse(a))throw P(r);this.searchParams=null}else{if(void 0!==i&&(n=new Oe(i,!0)),r=this.parse(a,null,n))throw P(r);(o=x(new k)).bindURL(this),this.searchParams=o}};Oe.prototype={type:"URL",parse:function(e,t,i){var r,o,a,s,l,u=this,c=t||he,d=0,h="",f=!1,v=!1,y=!1;for(e=b(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=B(e,ee,"")),e=B(e,te,""),r=g(e);d<=r.length;){switch(o=r[d],c){case he:if(!o||!N(q,o)){if(t)return"Invalid scheme";c=fe;continue}h+=j(o),c=pe;break;case pe:if(o&&(N(W,o)||"+"==o||"-"==o||"."==o))h+=j(o);else{if(":"!=o){if(t)return"Invalid scheme";h="",c=fe,d=0;continue}if(t&&(u.isSpecial()!=p(le,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&le[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Ce:u.isSpecial()&&i&&i.scheme==u.scheme?c=ge:u.isSpecial()?c=be:"/"==r[d+1]?(c=me,d++):(u.cannotBeABaseURL=!0,U(u.path,""),c=Ie)}break;case fe:if(!i||i.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==o){u.scheme=i.scheme,u.path=m(i.path),u.query=i.query,u.fragment="",u.cannotBeABaseURL=!0,c=De;break}c="file"==i.scheme?Ce:ve;continue;case ge:if("/"!=o||"/"!=r[d+1]){c=ve;continue}c=we,d++;break;case me:if("/"==o){c=Ee;break}c=Pe;continue;case ve:if(u.scheme=i.scheme,o==n)u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query=i.query;else if("/"==o||"\\"==o&&u.isSpecial())c=ye;else if("?"==o)u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query="",c=Re;else{if("#"!=o){u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.path.length--,c=Pe;continue}u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,u.path=m(i.path),u.query=i.query,u.fragment="",c=De}break;case ye:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=i.username,u.password=i.password,u.host=i.host,u.port=i.port,c=Pe;continue}c=Ee}else c=we;break;case be:if(c=we,"/"!=o||"/"!=O(h,d+1))continue;d++;break;case we:if("/"!=o&&"\\"!=o){c=Ee;continue}break;case Ee:if("@"==o){f&&(h="%40"+h),f=!0,a=g(h);for(var w=0;w<a.length;w++){var E=a[w];if(":"!=E||y){var _=se(E,ae);y?u.password+=_:u.username+=_}else y=!0}h=""}else if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(f&&""==h)return"Invalid authority";d-=g(h).length+1,h="",c=_e}else h+=o;break;case _e:case Se:if(t&&"file"==u.scheme){c=xe;continue}if(":"!=o||v){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(h))return s;if(h="",c=Ae,t)return;continue}"["==o?v=!0:"]"==o&&(v=!1),h+=o}else{if(""==h)return"Invalid host";if(s=u.parseHost(h))return s;if(h="",c=Te,t==Se)return}break;case Te:if(!N($,o)){if(o==n||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=h){var S=I(h,10);if(S>65535)return"Invalid port";u.port=u.isSpecial()&&S===le[u.scheme]?null:S,h=""}if(t)return;c=Ae;continue}return"Invalid port"}h+=o;break;case Ce:if(u.scheme="file","/"==o||"\\"==o)c=ke;else{if(!i||"file"!=i.scheme){c=Pe;continue}if(o==n)u.host=i.host,u.path=m(i.path),u.query=i.query;else if("?"==o)u.host=i.host,u.path=m(i.path),u.query="",c=Re;else{if("#"!=o){ce(L(m(r,d),""))||(u.host=i.host,u.path=m(i.path),u.shortenPath()),c=Pe;continue}u.host=i.host,u.path=m(i.path),u.query=i.query,u.fragment="",c=De}}break;case ke:if("/"==o||"\\"==o){c=xe;break}i&&"file"==i.scheme&&!ce(L(m(r,d),""))&&(ue(i.path[0],!0)?U(u.path,i.path[0]):u.host=i.host),c=Pe;continue;case xe:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ue(h))c=Pe;else if(""==h){if(u.host="",t)return;c=Ae}else{if(s=u.parseHost(h))return s;if("localhost"==u.host&&(u.host=""),t)return;h="",c=Ae}continue}h+=o;break;case Ae:if(u.isSpecial()){if(c=Pe,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=n&&(c=Pe,"/"!=o))continue}else u.fragment="",c=De;else u.query="",c=Re;break;case Pe:if(o==n||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(l=j(l=h))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||U(u.path,"")):de(h)?"/"==o||"\\"==o&&u.isSpecial()||U(u.path,""):("file"==u.scheme&&!u.path.length&&ue(h)&&(u.host&&(u.host=""),h=O(h,0)+":"),U(u.path,h)),h="","file"==u.scheme&&(o==n||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)V(u.path);"?"==o?(u.query="",c=Re):"#"==o&&(u.fragment="",c=De)}else h+=se(o,oe);break;case Ie:"?"==o?(u.query="",c=Re):"#"==o?(u.fragment="",c=De):o!=n&&(u.path[0]+=se(o,ne));break;case Re:t||"#"!=o?o!=n&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":se(o,ne)):(u.fragment="",c=De);break;case De:o!=n&&(u.fragment+=se(o,re))}d++}},parseHost:function(e){var t,i,n;if("["==O(e,0)){if("]"!=O(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,i,n,r,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,h=function(){return O(e,d)};if(":"==h()){if(":"!=O(e,1))return;d+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=i=0;i<4&&N(X,h());)t=16*t+I(h(),16),d++,i++;if("."==h()){if(0==i)return;if(d-=i,u>6)return;for(n=0;h();){if(r=null,n>0){if(!("."==h()&&n<4))return;d++}if(!N($,h()))return;for(;N($,h());){if(o=I(h(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;d++}l[u]=256*l[u]+r,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;l[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(H(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=y(e),N(Q,e))return"Invalid host";if(null===(t=function(e){var t,i,n,r,o,a,s,l=z(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(i=[],n=0;n<t;n++){if(""==(r=l[n]))return e;if(o=10,r.length>1&&"0"==O(r,0)&&(o=N(Y,r)?16:8,r=H(r,8==o?1:2)),""===r)a=0;else{if(!N(10==o?J:8==o?K:X,r))return e;a=I(r,o)}U(i,a)}for(n=0;n<t;n++)if(a=i[n],n==t-1){if(a>=D(256,5-t))return null}else if(a>255)return null;for(s=F(i),n=0;n<i.length;n++)s+=i[n]*D(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(N(Z,e))return"Invalid host";for(t="",i=g(e),n=0;n<i.length;n++)t+=se(i[n],ne);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return p(le,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ue(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,i=e.username,n=e.password,r=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==r?(u+="//",e.includesCredentials()&&(u+=i+(n?":"+n:"")+"@"),u+=ie(r),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+L(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw P(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ne(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",he)},getUsername:function(){return this.username},setUsername:function(e){var t=g(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<t.length;i++)this.username+=se(t[i],ae)}},getPassword:function(){return this.password},setPassword:function(e){var t=g(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<t.length;i++)this.password+=se(t[i],ae)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,_e)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Se)},getPort:function(){var e=this.port;return null===e?"":b(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=b(e))?this.port=null:this.parse(e,Te))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+L(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ae))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=b(e))?this.query=null:("?"==O(e,0)&&(e=H(e,1)),this.query="",this.parse(e,Re)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=b(e))?("#"==O(e,0)&&(e=H(e,1)),this.fragment="",this.parse(e,De)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ne=function(e){var t=h(this,Le),i=E(arguments.length,1)>1?arguments[1]:void 0,n=T(t,new Oe(e,!1,i));o||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Le=Ne.prototype,Me=function(e,t){return{get:function(){return C(this)[e]()},set:t&&function(e){return C(this)[t](e)},configurable:!0,enumerable:!0}};if(o&&c(Le,{href:Me("serialize","setHref"),origin:Me("getOrigin"),protocol:Me("getProtocol","setProtocol"),username:Me("getUsername","setUsername"),password:Me("getPassword","setPassword"),host:Me("getHost","setHost"),hostname:Me("getHostname","setHostname"),port:Me("getPort","setPort"),pathname:Me("getPathname","setPathname"),search:Me("getSearch","setSearch"),searchParams:Me("getSearchParams"),hash:Me("getHash","setHash")}),d(Le,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),d(Le,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),A){var Fe=A.createObjectURL,Ue=A.revokeObjectURL;Fe&&d(Ne,"createObjectURL",l(Fe,A)),Ue&&d(Ne,"revokeObjectURL",l(Ue,A))}w(Ne,"URL"),r({global:!0,forced:!a,sham:!o},{URL:Ne})},function(e,t,i){"use strict";var n=i(17),r=i(625);n({target:"String",proto:!0,forced:i(626)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,i){var n=i(8),r=i(75),o=i(43),a=i(124),s=i(45),l=n.TypeError,u=function(e){return function(t,i,n,u){r(i);var c=o(t),d=a(c),h=s(c),p=e?h-1:0,f=e?-1:1;if(n<2)for(;;){if(p in d){u=d[p],p+=f;break}if(p+=f,e?p<0:h<=p)throw l("Reduce of empty array with no initial value")}for(;e?p>=0:h>p;p+=f)p in d&&(u=i(u,d[p],p,c));return u}};e.exports={left:u(!1),right:u(!0)}},function(e,t,i){"use strict";var n=i(17),r=i(8),o=i(13),a=i(59),s=i(318),l=i(630),u=i(15),c=r.RangeError,d=r.String,h=Math.floor,p=o(l),f=o("".slice),g=o(1..toFixed),m=function(e,t,i){return 0===t?i:t%2==1?m(e,t-1,i*e):m(e*e,t/2,i)},v=function(e,t,i){for(var n=-1,r=i;++n<6;)r+=t*e[n],e[n]=r%1e7,r=h(r/1e7)},y=function(e,t){for(var i=6,n=0;--i>=0;)n+=e[i],e[i]=h(n/t),n=n%t*1e7},b=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var n=d(e[t]);i=""===i?n:i+p("0",7-n.length)+n}return i};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!u((function(){g({})}))},{toFixed:function(e){var t,i,n,r,o=s(this),l=a(e),u=[0,0,0,0,0,0],h="",g="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return d(o);if(o<0&&(h="-",o=-o),o>1e-21)if(i=(t=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t}(o*m(2,69,1))-69)<0?o*m(2,-t,1):o/m(2,t,1),i*=4503599627370496,(t=52-t)>0){for(v(u,0,i),n=l;n>=7;)v(u,1e7,0),n-=7;for(v(u,m(10,n,1),0),n=t-1;n>=23;)y(u,1<<23),n-=23;y(u,1<<n),v(u,1,1),y(u,2),g=b(u)}else v(u,0,i),v(u,1<<-t,0),g=b(u)+p("0",l);return g=l>0?h+((r=g.length)<=l?"0."+p("0",l-r)+g:f(g,0,r-l)+"."+f(g,r-l)):h+g}})},function(e,t,i){(function(e,t){/*! v2.9.2-2904f94, 2019-10-09T14:32:09Z */
|
|
165
165
|
!function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[a]={exports:{}};t[a][0].call(u.exports,(function(e){return r(t[a][1][e]||e)}),u,u.exports,e,t,i,n)}return i[a].exports}for(var o=!1,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){"use strict";var n={encode:function(e){for(var t=[],i=0;i<e.length;++i){var n=e.charCodeAt(i);n<128?t.push(n):n<2048?(t.push(192|n>>6),t.push(128|63&n)):n<65536?(t.push(224|n>>12),t.push(128|63&n>>6),t.push(128|63&n)):(t.push(240|n>>18),t.push(128|63&n>>12),t.push(128|63&n>>6),t.push(128|63&n))}return t},decode:function(e){for(var t=[],i=0;i<e.length;){var n=e[i++];n<128||(n<224?(n=(31&n)<<6,n|=63&e[i++]):n<240?(n=(15&n)<<12,n|=(63&e[i++])<<6,n|=63&e[i++]):(n=(7&n)<<18,n|=(63&e[i++])<<12,n|=(63&e[i++])<<6,n|=63&e[i++])),t.push(String.fromCharCode(n))}return t.join("")}},r={};!function(e){var t=function(t){for(var i=0,n=[],r=0|t.length/3;0<r--;){var o=(t[i]<<16)+(t[i+1]<<8)+t[i+2];i+=3,n.push(e.charAt(63&o>>18)),n.push(e.charAt(63&o>>12)),n.push(e.charAt(63&o>>6)),n.push(e.charAt(63&o))}if(2==t.length-i){o=(t[i]<<16)+(t[i+1]<<8);n.push(e.charAt(63&o>>18)),n.push(e.charAt(63&o>>12)),n.push(e.charAt(63&o>>6)),n.push("=")}else if(1==t.length-i){o=t[i]<<16;n.push(e.charAt(63&o>>18)),n.push(e.charAt(63&o>>12)),n.push("==")}return n.join("")},i=function(){for(var t=[],i=0;i<e.length;++i)t[e.charCodeAt(i)]=i;return t["=".charCodeAt(0)]=0,t}(),o=function(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var o=(i[e.charCodeAt(t)]<<18)+(i[e.charCodeAt(t+1)]<<12)+(i[e.charCodeAt(t+2)]<<6)+i[e.charCodeAt(t+3)];n.push(255&o>>16),n.push(255&o>>8),n.push(255&o),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},l={encode:function(e){for(var t=[],i=0;i<e.length;++i)t.push(e.charCodeAt(i));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}};r.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},r.encodeASCII=function(e){var i=l.encode(e);return t(i)},r.decodeASCII=function(e){var t=o(e);return l.decode(t)},r.encode=function(e){var i=n.encode(e);return t(i)},r.decode=function(e){var t=o(e);return n.decode(t)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),void 0!==i&&(i.decode=r.decode,i.decodeArray=r.decodeArray,i.encode=r.encode,i.encodeASCII=r.encodeASCII)},{}],2:[function(e,t,i){"use strict";!function(e){var t={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},i=function(e){var i=e;return t.hasOwnProperty(e)&&(i=t[e]),String.fromCharCode(i)},n=15,r=32,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},a={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var i=this.verboseFilter[e];this.verboseLevel>=i&&console.log(this.time+" ["+e+"] "+t)}},d=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].toString(16));return t},h=function(e,t,i,n,r){this.foreground=e||"white",this.underline=t||!1,this.italics=i||!1,this.background=n||"black",this.flash=r||!1};h.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],i=0;i<t.length;i++){var n=t[i];e.hasOwnProperty(n)&&(this[n]=e[n])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var p=function(e,t,i,n,r,o){this.uchar=e||" ",this.penState=new h(t,i,n,r,o)};p.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var f=function(){this.chars=[];for(var e=0;e<r;e++)this.chars.push(new p);this.pos=0,this.currPenState=new h};f.prototype={equals:function(e){for(var t=!0,i=0;i<r;i++)if(!this.chars[i].equals(e.chars[i])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>r&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=r)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var i=this.pos+1;i<t+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=i(e);this.pos>=r?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<r;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,i=0;i<r;i++){var n=this.chars[i].uchar;" "!==n&&(t=!1),e.push(n)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};var g=function(){this.rows=[];for(var e=0;e<n;e++)this.rows.push(new f);this.currRow=14,this.nrRollUpRows=null,this.reset()};g.prototype={reset:function(){for(var e=0;e<n;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,i=0;i<n;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t},copy:function(e){for(var t=0;t<n;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<n;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){c.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){c.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var i=this.rows[this.currRow];if(null!==e.indent){var n=e.indent,r=Math.max(n-1,0);i.setCursor(e.indent),e.color=i.chars[r].penState.foreground}var o={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(o)},setBkgData:function(e){c.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){c.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),c.log("INFO","Rolling up")}else c.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],i="",r=-1,o=0;o<n;o++){var a=this.rows[o].getTextString();a&&(r=o+1,e?t.push("Row "+r+': "'+a+'"'):t.push(a.trim()))}return t.length>0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i},getTextAndFormat:function(){return this.rows}};var m=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new g,this.nonDisplayedMemory=new g,this.lastOutputScreen=new g,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};m.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var i=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";c.log("INFO",i+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(c.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){c.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){c.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){c.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){c.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){c.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){c.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){c.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){c.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){c.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){c.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){c.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(c.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,c.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){c.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var i=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][i]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=c.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var v=function(e,t,i){this.field=e||1,this.outputs=[t,i],this.channels=[new m(1,t),new m(2,i)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};v.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var i,n,r,o=!1;this.lastTime=e,c.setTime(e);for(var a=0;a<t.length;a+=2)if(n=127&t[a],r=127&t[a+1],n>=16&&n<=31&&n===this.lastCmdA&&r===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+d([n,r])+") is dropped");else if(0!==n||0!==r){if(c.log("DATA","["+d([t[a],t[a+1]])+"] -> ("+d([n,r])+")"),(i=this.parseCmd(n,r))||(i=this.parseMidrow(n,r)),i||(i=this.parsePAC(n,r)),i||(i=this.parseBackgroundAttributes(n,r)),!i&&(o=this.parseChars(n,r)))if(this.currChNr&&this.currChNr>=0){this.channels[this.currChNr-1].insertChars(o)}else c.log("WARNING","No channel found yet. TEXT-MODE?");i?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+d([n,r])+" orig: "+d([t[a],t[a+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var i;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47)&&!((23===e||31===e)&&33<=t&&t<=35))return!1;i=20===e||21===e||23===e?1:2;var n=this.channels[i-1];return 20===e||21===e||28===e||29===e?32===t?n.cc_RCL():33===t?n.cc_BS():34===t?n.cc_AOF():35===t?n.cc_AON():36===t?n.cc_DER():37===t?n.cc_RU(2):38===t?n.cc_RU(3):39===t?n.cc_RU(4):40===t?n.cc_FON():41===t?n.cc_RDC():42===t?n.cc_TR():43===t?n.cc_RTD():44===t?n.cc_EDM():45===t?n.cc_CR():46===t?n.cc_ENM():47===t&&n.cc_EOC():n.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=i,!0},parseMidrow:function(e,t){var i=null;if((17===e||25===e)&&32<=t&&t<=47){if((i=17===e?1:2)!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var n=this.channels[i-1];return n.insertChars([32]),n.cc_MIDROW(t),c.log("DEBUG","MIDROW ("+d([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var i,n;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127)&&!((16===e||24===e)&&64<=t&&t<=95))return!1;i=e<=23?1:2,n=64<=t&&t<=95?1===i?o[e]:s[e]:1===i?a[e]:l[e];var r=this.interpretPAC(n,t);return this.channels[i-1].setPAC(r),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=i,!0},interpretPAC:function(e,t){var i,n={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,n.underline=1==(1&i),i<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((i-16)/2),n},parseChars:function(e,t){var n=null,r=null,o=null;if(e>=25?(n=2,o=e-8):(n=1,o=e),17<=o&&o<=19){var a;a=17===o?t+80:18===o?t+112:t+144,c.log("INFO","Special char '"+i(a)+"' in channel "+n),r=[a],this.lastCmdA=e,this.lastCmdB=t}else 32<=e&&e<=127&&(r=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null);if(r){var s=d(r);c.log("DEBUG","Char codes = "+s.join(","))}return r},parseBackgroundAttributes:function(e,t){var i,n,r,o;return!(!((16===e||24===e)&&32<=t&&t<=47)&&!((23===e||31===e)&&45<=t&&t<=47)||(i={},16===e||24===e?(n=Math.floor((t-32)/2),i.background=u[n],t%2==1&&(i.background=i.background+"_semi")):45===t?i.background="transparent":(i.foreground="black",47===t&&(i.underline=!0)),r=e<24?1:2,o=this.channels[r-1],o.setBkgData(i),this.lastCmdA=e,this.lastCmdB=t,0))},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};e.logger=c,e.PenState=h,e.CaptionScreen=g,e.Cea608Parser=v,e.findCea608Nalus=function(e,t,i){for(var n=0,r=t,o=[],a=function(e,t,i,n){if(4!==e||t<8)return null;var r=i.getUint8(n),o=i.getUint16(n+1),a=i.getUint32(n+3),s=i.getUint8(n+7);return 181==r&&49==o&&1195456820==a&&3==s};r<t+i;){if(n=e.getUint32(r),6==(31&e.getUint8(r+4)))for(var s=r+5,l=-1;s<r+4+n-1;){l=0;for(var u=255;255===u;)l+=u=e.getUint8(s),s++;var c=0;for(u=255;255===u;)c+=u=e.getUint8(s),s++;a(l,c,e,s)&&o.push([s,c]),s+=c}r+=n+4}return o},e.extractCea608DataFromRange=function(e,t){var i=t[0],n=[[],[]];i+=8;var r=31&e.getUint8(i);i+=2;for(var o=0;o<r;o++){var a=e.getUint8(i),s=4&a,l=3&a;i++;var u=e.getUint8(i);i++;var c=e.getUint8(i);i++,s&&(127&u)+(127&c)!=0&&(0===l?(n[0].push(u),n[0].push(c)):1===l&&(n[1].push(u),n[1].push(c)))}return n}}(void 0===i?(void 0).cea608parser={}:i)},{}],3:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){function t(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function n(e,t,i,n){for(var r=0;r<e.length;r++){var o=e[r];if("string"==typeof o){if(o==n)break}else if(o instanceof RegExp){if(o.test(n))break}else if("function"==typeof o&&o(t,i,n))break}return r!=e.length}function r(t,i,r){switch(e.arrayAccessForm){case"property":t[i]instanceof Array?t[i+"_asArray"]=t[i]:t[i+"_asArray"]=[t[i]]}!(t[i]instanceof Array)&&e.arrayAccessFormPaths.length>0&&n(e.arrayAccessFormPaths,t,i,r)&&(t[i]=[t[i]])}function o(e){var t=e.split(/[-T:+Z]/g),i=new Date(t[0],t[1]-1,t[2]),n=t[5].split(".");if(i.setHours(t[3],t[4],n[0]),n.length>1&&i.setMilliseconds(n[1]),t[6]&&t[7]){var r=60*t[6]+Number(t[7]);r=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*r:r),i.setMinutes(i.getMinutes()-r-i.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(i=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds())));return i}function a(t,i,r){if(e.datetimeAccessFormPaths.length>0){var a=r.split(".#")[0];return n(e.datetimeAccessFormPaths,t,i,a)?o(t):t}return t}function s(t,i,r,o){return!(i==b.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||n(e.xmlElementsFilter,t,r,o)}function l(i,n){if(i.nodeType==b.DOCUMENT_NODE){for(var o=new Object,u=i.childNodes,c=0;c<u.length;c++){if((h=u[c]).nodeType==b.ELEMENT_NODE)if(e.ignoreRoot)o=l(h);else{(o={})[p=t(h)]=l(h)}}return o}if(i.nodeType==b.ELEMENT_NODE){(o=new Object).__cnt=0;var d=[];for(u=i.childNodes,c=0;c<u.length;c++){var h,p=t(h=u[c]);if(h.nodeType!=b.COMMENT_NODE){var f=n+"."+p;if(s(o,h.nodeType,p,f))if(o.__cnt++,null==o[p]){var g=l(h,f);if("#text"!=p||/[^\s]/.test(g))(m={})[p]=g,d.push(m);o[p]=g,r(o,p,f)}else{null!=o[p]&&(o[p]instanceof Array||(o[p]=[o[p]],r(o,p,f)));var m;g=l(h,f);if("#text"!=p||/[^\s]/.test(g))(m={})[p]=g,d.push(m);o[p][o[p].length]=g}}}o.__children=d;for(var v=t(i),y=0;y<i.attributes.length;y++){var w=i.attributes[y];o.__cnt++;for(var E=w.value,_=0,S=e.matchers.length;_<S;_++){var T=e.matchers[_];T.test(w,v)&&(E=T.converter(w.value))}o[e.attributePrefix+w.name]=E}var C=function(e){return e.prefix}(i);return null!=C&&""!=C&&(o.__cnt++,o.__prefix=C),null!=o["#text"]&&(o.__text=o["#text"],o.__text instanceof Array&&(o.__text=o.__text.join("\n")),e.stripWhitespaces&&(o.__text=o.__text.trim()),delete o["#text"],"property"==e.arrayAccessForm&&delete o["#text_asArray"],o.__text=a(o.__text,p,n+"."+p)),null!=o["#cdata-section"]&&(o.__cdata=o["#cdata-section"],delete o["#cdata-section"],"property"==e.arrayAccessForm&&delete o["#cdata-section_asArray"]),0==o.__cnt&&"text"==e.emptyNodeForm?o="":1==o.__cnt&&null!=o.__text?o=o.__text:1!=o.__cnt||null==o.__cdata||e.keepCData?o.__cnt>1&&null!=o.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==o.__text||""==o.__text.trim())&&delete o.__text:o=o.__cdata,delete o.__cnt,!e.enableToStringFunc||null==o.__text&&null==o.__cdata||(o.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),o}if(i.nodeType==b.TEXT_NODE||i.nodeType==b.CDATA_SECTION_NODE)return i.nodeValue}function u(t,n,r,o){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=r)for(var s=0;s<r.length;s++){var l=r[s],u=t[l];e.escapeMode&&(u=i(u)),a+=" "+l.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?a+='"'+u+'"':a+="'"+u+"'"}return a+(o?"/>":">")}function c(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function d(t,i){return!!("property"==e.arrayAccessForm&&function(e,t){return-1!==e.indexOf(t,e.length-t.length)}(i.toString(),"_asArray")||0==i.toString().indexOf(e.attributePrefix)||0==i.toString().indexOf("__")||t[i]instanceof Function)}function h(e){var t=0;if(e instanceof Object)for(var i in e)d(e,i)||t++;return t}function p(t,i,r){return 0==e.jsonPropertiesFilter.length||""==r||n(e.jsonPropertiesFilter,t,i,r)}function f(t){var i=[];if(t instanceof Object)for(var n in t)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(e.attributePrefix)&&i.push(n);return i}function g(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?n+=i(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=i(t):n+=t),n}function m(e,t){return""===e?t:e+"."+t}function v(e,t,i,n){var r="";if(0==e.length)r+=u(e,t,i,!0);else for(var o=0;o<e.length;o++)r+=u(e[o],t,f(e[o]),!1),r+=y(e[o],m(n,t)),r+=c(e[o],t);return r}function y(e,t){var i="";if(h(e)>0)for(var n in e)if(!d(e,n)&&(""==t||p(e,n,m(t,n)))){var r=e[n],o=f(r);if(null==r||null==r)i+=u(r,n,o,!0);else if(r instanceof Object)if(r instanceof Array)i+=v(r,n,o,t);else if(r instanceof Date)i+=u(r,n,o,!1),i+=r.toISOString(),i+=c(r,n);else{h(r)>0||null!=r.__text||null!=r.__cdata?(i+=u(r,n,o,!1),i+=y(r,m(t,n)),i+=c(r,n)):i+=u(r,n,o,!0)}else i+=u(r,n,o,!1),i+=g(r),i+=c(r,n)}return i+g(e)}void 0===(e=e||{}).escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1),void 0===e.ignoreRoot&&(e.ignoreRoot=!1);var b={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){if(window.ActiveXObject||window,void 0===e)return null;var t;if(window.DOMParser){var i=new window.DOMParser;try{(t=i.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?o(e):e},this.xml2json=function(e){return l(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return y(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}},t.exports=i.default},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e(5),o=n(e(118)),a=n(e(152)),s=n(e(95)),l=n(e(46));dashjs.Protection=a.default,dashjs.MetricsReporting=o.default,dashjs.MediaPlayerFactory=s.default,dashjs.Debug=l.default,i.default=dashjs,i.MediaPlayer=r.MediaPlayer,i.Protection=a.default,i.MetricsReporting=o.default,i.MediaPlayerFactory=s.default,i.Debug=l.default},{118:118,152:152,46:46,5:5,95:95}],5:[function(t,i,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=i(t(93)),o=i(t(48)),a=i(t(46)),s=t(49),l="undefined"!=typeof window&&window||e,u=l.dashjs;u||(u=l.dashjs={}),u.MediaPlayer=r.default,u.FactoryMaker=o.default,u.Debug=a.default,u.Version=(0,s.getVersionString)(),n.default=u,n.MediaPlayer=r.default,n.FactoryMaker=o.default,n.Debug=a.default}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{46:46,48:48,49:49,93:93}],6:[function(e,t,i){/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
|
|
166
166
|
var n={parseBuffer:function(e){return new r(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(o.prototype._boxProcessors[e]=t)},createFile:function(){return new r},createBox:function(e,t,i){var n=o.create(e);return t&&t.append(n,i),n},createFullBox:function(e,t,i){var r=n.createBox(e,t,i);return r.version=0,r.flags=0,r},Utils:{}};n.Utils.dataViewToString=function(e,t){var i=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(i).decode(e);var n=[],r=0;if("utf-8"===i)for(;r<e.byteLength;){var o=e.getUint8(r++);o<128||(o<224?(o=(31&o)<<6,o|=63&e.getUint8(r++)):o<240?(o=(15&o)<<12,o|=(63&e.getUint8(r++))<<6,o|=63&e.getUint8(r++)):(o=(7&o)<<18,o|=(63&e.getUint8(r++))<<12,o|=(63&e.getUint8(r++))<<6,o|=63&e.getUint8(r++))),n.push(String.fromCharCode(o))}else for(;r<e.byteLength;)n.push(String.fromCharCode(e.getUint8(r++)));return n.join("")},n.Utils.utf8ToByteArray=function(e){var t,i;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],i=0;i<e.length;++i){var n=e.charCodeAt(i);n<128?t.push(n):n<2048?(t.push(192|n>>6),t.push(128|63&n)):n<65536?(t.push(224|n>>12),t.push(128|63&n>>6),t.push(128|63&n)):(t.push(240|n>>18),t.push(128|63&n>>12),t.push(128|63&n>>6),t.push(128|63&n))}return t},n.Utils.appendBox=function(e,t,i){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==i){if(null==i)return void e.boxes.push(t);var n,r=-1;if("number"==typeof i)r=i;else{if("string"==typeof i)n=i;else{if("object"!=typeof i||!i.type)return void e.boxes.push(t);n=i.type}for(var o=0;o<e.boxes.length;o++)if(n===e.boxes[o].type){r=o+1;break}}e.boxes.splice(r,0,t)}},void 0!==i&&(i.parseBuffer=n.parseBuffer,i.addBoxProcessor=n.addBoxProcessor,i.createFile=n.createFile,i.createBox=n.createBox,i.createFullBox=n.createFullBox,i.Utils=n.Utils),n.Cursor=function(e){this.offset=void 0===e?0:e};var r=function(e){this._cursor=new n.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};r.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},r.prototype.fetchAll=function(e,t){var i=[];return r._sweep.call(this,e,i,t),i},r.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=o.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},r._sweep=function(e,t,i){for(var n in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;r._sweep.call(this.boxes[n],e,t,i)}},r.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var i=new Uint8Array(t);for(this._rawo=new DataView(i.buffer),this.bytes=i,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return i.buffer},r.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)};var o=function(){this._cursor=new n.Cursor};o.parse=function(e){var t=new o;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},o.create=function(e){var t=new o;return t.type=e,t.boxes=[],t},o.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],o.prototype._boxProcessors={},o.prototype._procField=function(e,t,i){this._parsing?this[e]=this._readField(t,i):this._writeField(t,i,this[e])},o.prototype._procFieldArray=function(e,t,i,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e][r]=this._readField(i,n);else for(r=0;r<this[e].length;r++)this._writeField(i,n,this[e][r])},o.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},o.prototype._procEntries=function(e,t,i){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push({}),i.call(this,this[e][n]);else for(n=0;n<t;n++)i.call(this,this[e][n])},o.prototype._procSubEntries=function(e,t,i,n){var r;if(this._parsing)for(e[t]=[],r=0;r<i;r++)e[t].push({}),n.call(this,e[t][r]);else for(r=0;r<i;r++)n.call(this,e[t][r])},o.prototype._procEntryField=function(e,t,i,n){this._parsing?e[t]=this._readField(i,n):this._writeField(i,n,e[t])},o.prototype._procSubBoxes=function(e,t){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e].push(o.parse(this));else for(i=0;i<t;i++)this._rawo?this[e][i].write():this.size+=this[e][i].getLength()},o.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();default:return-1}},o.prototype._readInt=function(e){var t=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(i);break;case 16:t=this._raw.getInt16(i);break;case 32:t=this._raw.getInt32(i);break;case 64:var n=this._raw.getInt32(i),r=this._raw.getInt32(i+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},o.prototype._readUint=function(e){var t,i,n=null,r=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:n=this._raw.getUint8(r);break;case 16:n=this._raw.getUint16(r);break;case 24:n=((t=this._raw.getUint16(r))<<8)+(i=this._raw.getUint8(r+2));break;case 32:n=this._raw.getUint32(r);break;case 64:t=this._raw.getUint32(r),i=this._raw.getUint32(r+4),n=t*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,n},o.prototype._readString=function(e){for(var t="",i=0;i<e;i++){var n=this._readUint(8);t+=String.fromCharCode(n)}return t},o.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},o.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},o.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var i=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,i}return null},o.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?n.Utils.dataViewToString(t):t},o.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},o.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},o.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(o.parse(this))},o.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)},o.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},o.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},o.prototype._writeInt=function(e,t){if(this._rawo){var i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(i,t);break;case 16:this._rawo.setInt16(i,t);break;case 32:this._rawo.setInt32(i,t);break;case 64:var n=Math.floor(t/Math.pow(2,32)),r=t-n*Math.pow(2,32);this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeUint=function(e,t){if(this._rawo){var i,n,r=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(r,t);break;case 16:this._rawo.setUint16(r,t);break;case 24:i=(16776960&t)>>8,n=255&t,this._rawo.setUint16(r,i),this._rawo.setUint8(r+2,n);break;case 32:this._rawo.setUint32(r,t);break;case 64:n=t-(i=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(r,i),this._rawo.setUint32(r+4,n)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeString=function(e,t){for(var i=0;i<e;i++)this._writeUint(8,t.charCodeAt(i))},o.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},o.prototype._writeTemplate=function(e,t){var i=Math.floor(t),n=(t-i)*Math.pow(2,e/2);this._writeUint(e/2,i),this._writeUint(e/2,n)},o.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,i=0;i<e.length;i++)this._rawo.setInt8(t+i,e[i]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},o.prototype._writeUTF8String=function(e){var t=n.Utils.utf8ToByteArray(e);if(this._rawo)for(var i=new DataView(this._rawo.buffer,this._cursor.offset,t.length),r=0;r<t.length;r++)i.setUint8(r,t[r]);else this.size+=t.length},o.prototype._writeField=function(e,t,i){switch(e){case"uint":this._writeUint(t,i);break;case"int":this._writeInt(t,i);break;case"template":this._writeTemplate(t,i);break;case"string":-1==t?this._writeTerminatedString(i):this._writeString(t,i);break;case"data":this._writeData(i);break;case"utf8":this._writeUTF8String(i)}},o.prototype._boxProcessors.avc1=o.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},o.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)}))},o.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},o.prototype._boxProcessors.free=o.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},o.prototype._boxProcessors.ftyp=o.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},o.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},o.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},o.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},o.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},o.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},o.prototype._boxProcessors.mp4a=o.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},o.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},o.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},o.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},o.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},o.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},o.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)}))},o.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},o.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,(function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)}))}))},o.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,(function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)}))}))},o.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},o.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},o.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},o.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},o.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},o.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},o.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},o.prototype._boxProcessors["url "]=o.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},o.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},o.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},o.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},o.prototype._boxProcessors.vtte=function(){}},{}],7:[function(e,t,i){"use strict";var n=Array.isArray,r=Object.keys,o=Object.prototype.hasOwnProperty;t.exports=function e(t,i){if(t===i)return!0;var a,s,l,u=n(t),c=n(i);if(u&&c){if((s=t.length)!=i.length)return!1;for(a=0;a<s;a++)if(!e(t[a],i[a]))return!1;return!0}if(u!=c)return!1;var d=t instanceof Date,h=i instanceof Date;if(d!=h)return!1;if(d&&h)return t.getTime()==i.getTime();var p=t instanceof RegExp,f=i instanceof RegExp;if(p!=f)return!1;if(p&&f)return t.toString()==i.toString();if(t instanceof Object&&i instanceof Object){var g=r(t);if((s=g.length)!==r(i).length)return!1;for(a=0;a<s;a++)if(!o.call(i,g[a]))return!1;for(a=0;a<s;a++)if(!e(t[l=g[a]],i[l]))return!1;return!0}return!1}},{}],8:[function(e,t,i){!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===n||t===l?62:t===r||t===u?63:t<o?-1:t<o+10?t-o+26+26:t<s+26?t-s:t<a+26?t-a+26:void 0}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),o="0".charCodeAt(0),a="a".charCodeAt(0),s="A".charCodeAt(0),l="-".charCodeAt(0),u="_".charCodeAt(0);e.toByteArray=function(e){function n(e){u[d++]=e}var r,o,a,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new i(3*e.length/4-l),a=l>0?e.length-4:e.length;var d=0;for(r=0,o=0;r<a;r+=4,o+=3)n((16711680&(s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3))))>>16),n((65280&s)>>8),n(255&s);return 2===l?n(255&(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4)):1===l&&(n((s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2)>>8&255),n(255&s)),u},e.fromByteArray=function(e){function t(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}function i(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var n,r,o,a=e.length%3,s="";for(n=0,o=e.length-a;n<o;n+=3)s+=i(r=(e[n]<<16)+(e[n+1]<<8)+e[n+2]);switch(a){case 1:s+=t((r=e[e.length-1])>>2),s+=t(r<<4&63),s+="==";break;case 2:s+=t((r=(e[e.length-2]<<8)+e[e.length-1])>>10),s+=t(r>>4&63),s+=t(r<<2&63),s+="="}return s}}(void 0===i?this.base64js={}:i)},{}],9:[function(e,t,i){},{}],10:[function(t,i,n){(function(e){
|
|
167
167
|
/*!
|
|
@@ -245,7 +245,7 @@ var n;n=function(){return function(){var e={686:function(e,t,i){"use strict";i.d
|
|
|
245
245
|
* Copyright jQuery Foundation and other contributors
|
|
246
246
|
* Released under the MIT license.
|
|
247
247
|
* http://jquery.org/license
|
|
248
|
-
*/!function(s){"use strict";o=[i(2),i(707),i(708),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(134);var n=i(14),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(134);var n=i(14),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(528);return e.paginators=i(529).pagination,e.waiters=i(530).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(_,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(_,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(S,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,E,_=0,S=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,U=0,B=0,V=l.length,z=V-1,H="",j="",G="",q="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==S+C+T+_&&(0!==S&&(f=47===S?10:47),C=T=_=0,V++,z++),0===S+C+T+_){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,B=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(B,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(B=(g=e(s,F,g,f,h+1)).length,0<D&&(E=a(3,g,F=t(I,H,U),s,x,k,B,f,h,d),H=F.join(""),void 0!==E&&0===(B=(g=E.trim()).length)&&(f=0,g="")),0<B)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,U),g,d,h+1)}G+=g,g=U=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(B=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<D&&void 0!==(E=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(B=(H=E.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){q+=H+l.charAt(M);break}default:58!==H.charCodeAt(B-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}U=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===S+C+T+_){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+_+S)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+S+_&&(F=U=1,b="\f"+b);break;case 108:if(0===C+S+_+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+S+_&&(L=M);break;case 44:0===S+T+C+_&&(F=1,b+="\r");break;case 34:case 39:0===S&&(C=C===f?0:0===C?f:C);break;case 91:0===C+S+T&&_++;break;case 93:0===C+S+T&&_--;break;case 41:0===C+S+_&&T--;break;case 40:if(0===C+S+_){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===S+T+C+_+L+g&&(g=1);break;case 42:case 47:if(!(0<C+_+T))switch(S){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:S=47;break;case 220:B=M,S=42}break;case 42:47===f&&42===R&&B+2!==M&&(33===l.charCodeAt(B+2)&&(j+=l.substring(B,M+1)),b="",S=0)}}0===S&&(H+=b)}O=R,R=f,M++}if(0<(B=j.length)){if(F=s,0<D&&(void 0!==(E=a(2,j,F,i,x,k,B,d,h,d))&&0===(j=E).length))return q+j+G;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return q+j+G}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,_=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:E},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function E(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="1" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(616),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(627),i(632),i(7)],void 0===(r=function(e,t,i){return function(n){var r=!1;try{r=HippoVideo.data.api.getProperty("isLessonly")}catch(e){}return r=r||"lessonly"==i.getQueryParams().type||"lessonly"==i.getQueryParams().integration_type,n.isDelivery&&!r||n.isNewPlayer?new t(n):new e(n)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return T}));i(96),i(184),i(24),i(244),i(56),i(71),i(84),i(112),i(61),i(176),i(52),i(85),i(86),i(137),i(67),i(138);var n=i(98),r=i.n(n),o=i(97),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(393),h=i.n(d),p=i(398),f=i.n(p),g=i(6),m=i.n(g),v=i(38),y=i(100),b=i.n(y),w=i(399);function E(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function T(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,_=t.footageUrls,T=t.showSimpleEditor,C=t.projectJson,k=t.integrationType,x=t.onSimpleEditorInitialize,A=Object(u.useState)(d.recordDetails),P=A[0],I=A[1],R=Object(u.useContext)(v.a).recorderInitOptions.edit,D=window._HVDomain||"https://www.hippovideo.io",O=Object(u.useRef)(!1),N=Object(u.useRef)(),L=Object(u.useRef)(C),M=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!P||!P.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),I(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var F=function(){if(l()(this,i),P.asset_id){var e={el:N.current,fromSDK:!0,videoPlayerView:n,integration_type:k,assetId:P&&P.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:P&&P.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:P&&P.authoring_id,footageUrls:_};console.log("SIMPLE EDIT OPTIONS ",e),M.current?(console.log("1"),M.current.initialize(e)):(console.log("2"),M.current=new h.a(e)),x&&x(M.current)}}.bind(this),U=function(){l()(this,i);try{var e={};if(R&&"object"===a()(R)&&null!==R)for(var t in R)!1!==R[t]&&"false"!==R[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),N.current&&(N.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?S(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:k,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields,origin:D},U()))),O.current=!0,console.log("CONTROLS ADDED >>>",N.current))}.bind(this),[N]),Object(u.useEffect)(function(){l()(this,i),n&&N.current&&P&&O.current&&F()}.bind(this),[n,N,P,O]),Object(u.useEffect)(function(){if(l()(this,i),M.current)if(T){M.current.enable();var e,t=E(N.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}M.current.height="140px"}else{var n,r=E(N.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}M.current.height="0"}}.bind(this),[T]),Object(u.useEffect)(function(){var e=this;return l()(this,i),L.current=C,C&&M.current&&n&&(setTimeout(function(){l()(this,e),M.current.setProjectJson(C)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;l()(this,i),M.current&&n&&L.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",C),M.current.setProjectJson(C)}.bind(this),300),n.show())}.bind(this),[M,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:N})}}).call(this,i(11))},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(7),i(12),i(325),i(634),i(635),i(6),i(48),i(187),i(186),i(141),i(636),i(237),i(637),i(711),i(117),i(139),i(140),i(73),i(698),i(699),i(700),i(357),i(703),i(704),i(115),i(706),i(709)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.origin=t.fromSDK?window._HVDomain||"https://assets.hippovideo.io":"",this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&(console.log("HERE!!!!!!!!"),i.unselectText())),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){console.log("HERE!!!!!!!! 2"),this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s),console.log("draw context ",l,a,s,r);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),console.log("HERE!!!!!!!! 2"),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(68),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o){var a={set_default:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:a,success:i,error:o})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:E},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function E(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:_,block:S},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function _(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:E},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function E(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:_},{}).w("</select></div></div>")}function _(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:S},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function S(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:S},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:U},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="').f(t.get(["origin"],!1),t,"h").w('/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:E,block:_},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function E(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-right.png")}function _(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function S(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function U(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:B},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function B(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(9),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.d)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var E,_=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),S=i(16);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(_,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.d)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(S.d,{style:{marginRight:"10px"},icon:Object(y.d)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),type:S.b.TRANSPARENT,buttonFeature:S.a.DROPDOWN,dropdownPosition:S.c.TOP}),l.a.createElement(S.d,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(E||(E=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(193),d=i(194),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return F})),i.d(t,"initialize",(function(){return U})),i.d(t,"availableRecordingSupport",(function(){return V})),i.d(t,"RecorderWidget",(function(){return H})),i.d(t,"ImportWidget",(function(){return j}));i(24),i(77);var n=i(49),r=i.n(n),o=i(54),a=i.n(o),s=i(41),l=i.n(s),u=i(36),c=i.n(u),d=i(37),h=i.n(d),p=i(360),f=i.n(p),g=i(1),m=i.n(g),v=i(249),y=i.n(v),b=(i(66),i(52),i(105),i(220),i(0)),w=i.n(b),E=i(57),_=i.n(E),S=i(26),T=i(5),C=i(188),k=i(207),x=i(401),A=i(400),P=i(9);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var R,D=["sdk_loaded","record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],O=!1,N={},L={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function M(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{_.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function U(e,t){return B.apply(this,arguments)}function B(){return(B=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,n){e.next=7;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 7:return u=new C.a({token:n,tokenType:o}),e.next=10,u.authenticateToken();case 10:if(c=e.sent,d=c[0],h=c[1],!d){e.next=25;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=20;break}return i&&i(null,p),e.abrupt("return");case 20:g=M(),N[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},J(l),K(n),i&&i({key:g},null);case 25:if(!h){e.next=30;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){var e=Object(S.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var z=function(){function t(e,i){var n=this,r=i.type,o=i.settings,a=void 0===o?{}:o;i.recorder_events;if(c()(this,t),!N.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=a.extensionless,l=a.inline;if(this.recordingInProgress=!1,this.recorderSettings=a,this.eventCallbackMap={},N[e].initialized){var u,d,h;if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.extensionless=s,l){var p=l.element_id,f=l.element;if(p&&(u=document.getElementById(p)),f&&(u=f),!u&&document.getElementsByTagName("hippo-video-recorder")[0]&&(u=document.getElementsByTagName("hippo-video-recorder")[0]),!u)return void Y(this.eventCallbackMap,"record_error",{error:"inline_element_not_provided",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else d="hvr-popup-".concat((new Date).getTime()),(h=document.createElement("div")).setAttribute("id",d),h.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(h),u=h,this.popupElement=u;console.log("ELEMENT ",u,this.popupElementId),F(u),u.innerHTML="",_.a.render(w.a.createElement(k.b,{settings:a,userId:N[e].userId,type:r,token:N[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:function(e){return m()(this,n),this._cb(e)}.bind(this)}),u)}else Y(this.eventCallbackMap,"record_error",{error:"recorder_not_initialized",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"on",value:function(e,t){D.includes(e)&&(this.eventCallbackMap[e]=t),"sdk_loaded"===e&&this.sdkLoaded&&this.eventCallbackMap[e]()}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),Y(this.eventCallbackMap,t.type,t.detail),"sdk_loaded"===t.type&&(this.sdkLoaded=!0),"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};this.recordingInProgress=!0,i.showWebcamPreview&&X(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head"),window._HVDomain;var n,r,o,a=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(R={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:Object(P.d)("/images/hv-highlight-icons/hb-stop.png"),cursorIcon:Object(P.d)("/images/hv-highlight-icons/hb-select.png"),cursorIconActive:Object(P.d)("/images/hv-highlight-icons/hb-select-active.png"),penIcon:Object(P.d)("/images/hv-highlight-icons/hb-pen.png"),penIconActive:Object(P.d)("/images/hv-highlight-icons/hb-pen-active.png"),focusIcon:Object(P.d)("/images/hv-highlight-icons/hb-focus.png"),focusIconActive:Object(P.d)("/images/hv-highlight-icons/hb-focus-active.png"),eraseIcon:Object(P.d)("/images/hv-highlight-icons/hb-erase.png"),eraseIconActive:Object(P.d)("/images/hv-highlight-icons/hb-erase-active.png"),clearIcon:Object(P.d)("/images/hv-highlight-icons/hb-clear.png"),clearIconActive:Object(P.d)("/images/hv-highlight-icons/hb-clear-active.png"),video:Object(P.d)("/images/hv-highlight-icons/hb-video-off.png"),togarrow:Object(P.d)("/images/hv-highlight-icons/hb-toggle-arrow.png"),collapsIcon:Object(P.d)("/images/hv-highlight-icons/collapse-icon.png"),penColorIcon:Object(P.d)("/images/hv-highlight-icons/pen-with-color.svg"),penCursorIcon:Object(P.d)("/images/hv-highlight-icons/pen-cusor.svg"),eraseCursorIcon:Object(P.d)("/images/hv-highlight-icons/erase-cursor.svg"),arrowPointer:Object(P.d)("/images/hv-highlight-icons/arrow-pointer.png"),mouseAnimationIcon:Object(P.d)("/images/hv-highlight-icons/hb-mouse-animation.png"),mouseAnimationIconActive:Object(P.d)("/images/hv-highlight-icons/hb-mouse-animation-active.png"),highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;R.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&R.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),R.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),R.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(){console.log("SENDING EVENT ",i,"hv_stop_recording"),te(i,"markup-tools")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(R.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return R.resetValues(),R.highlightsEvents("hvCursor"),void R.cursor();if("hvCursor"==t&&!i)return R.resetValues(),void R.cursor();switch(R.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&R.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",R.mouseMove),R.isPen=!1,t){case"hvCursor":R.cursor();break;case"hvCursorAnimation":R.cursorAnimation();break;case"hvPen":R.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),R.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":R.eraser();break;case"hvClearScreen":R.clearScreen();break;case"hvFocusArea":R.focusArea();break;case"hvStop":R.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",R.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=R.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){R.highlightsEvents("hvColorChoose"),R.isEraser=!1,R.penColor=e.target.id,R.selectedColor=R.highlightsColors.indexOf(e.target.id),R.setCursor(e.target.id)},draw:function(){R.ctx.beginPath(),1==R.isEraser?R.ctx.globalCompositeOperation="destination-out":R.ctx.globalCompositeOperation="source-over",R.ctx.lineCap="round",R.ctx.moveTo(R.prevX,R.prevY),R.ctx.fillStyle=R.penColor,R.ctx.globalAlpha=1,R.ctx.lineTo(R.currX,R.currY),R.ctx.strokeStyle=R.penColor,R.ctx.lineWidth=R.cursorWidth,R.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);R.canvas.height=i;var n=R.canvas.width,r=R.canvas.height;R.ctx.clearRect(0,0,n,r),R.selectHiglightOptions(R.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",R.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){R.isEraser=!1,R.isPen=!0,R.setCursor(R.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){R.isEraser=!0,e("body").css("cursor","url("+R.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){R.tooltipHide(),R.highlightsOpen=!1,t&&R.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){R.highlightsOpen=!0,t&&R.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft,R.currY=i.offsetY-R.canvas.offsetTop,R.currY+=15,R.currX+=5,R.flag=!0,R.dot_flag=!0,R.dot_flag&&(R.ctx.beginPath(),R.ctx.fillStyle=R.penColor,R.ctx.fillRect(R.currX,R.currY,2,2),R.ctx.closePath(),R.dot_flag=!1)),"up"!=t&&"out"!=t||(R.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-R.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-R.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),R.flag&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft+5,R.currY=i.offsetY-R.canvas.offsetTop+17,R.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);R.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==R.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(R.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(R.isAlt=!0),R.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==R.isAlt&&R.stopRecording(),67==t.which&&1==R.isAlt&&(t.preventDefault(),R.closeHighlights(!0)),79==t.which&&1==R.isAlt&&(t.preventDefault(),R.openHighlights(!0)),90==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvEraser",!0),R.isEraser=!0),72==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvPen",!0),R.isEraser=!1,R.pen()),70==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvFocusArea",!0),R.focusArea()),(77==t.which&&1==R.isAlt||27==t.which)&&(R.selectHiglightOptions("hvCursor",!0),R.cursor()),65==t.which&&1==R.isAlt&&R.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&R.cursorWidth<=200&&(R.cursorWidth+=1,R.highlightCursorWidth+=1,R.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),38==t.which&&R.isAlt,40==t.which&&R.cursorWidth>=5&&(R.cursorWidth-=1,R.highlightCursorWidth-=1,R.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),37==t.which&&0!==R.selectedColor&&(R.selectedColor=R.selectedColor-1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor)),39==t.which&&5!==R.selectedColor&&(R.selectedColor=R.selectedColor+1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var s="Press "+("Mac"===a?"Option":"Alt")+" + O for Open",l="Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight",u='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+R.stopIcon+'" id="hvStopImg"/> <img src="'+R.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+R.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+R.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+R.penIcon+'" id="hvPenImg" /> <img src="'+R.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+R.focusIcon+'" id="hvFocusImg" /> <img src="'+R.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+R.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+R.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+R.clearIcon+'" id="hvClearImg" /> <img src="'+R.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+R.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+s+'"><img src="'+R.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+l+"</div> </div>";e(u).appendTo("body"),e(".hv-highlight-option").bind("click",R.highlightOptions),e(".hv-change-color-circle").bind("click",R.color),e(".hv-close-highlights").bind("click",R.closeHighlights),e(".hv-open-highlights").bind("click",R.openHighlights),e(".hv-highlight-option").on("mouseenter",R.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",R.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",R.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",R.tooltipShow),window.addEventListener("keyup",R.onkeyupEvent),window.addEventListener("keydown",R.onkeydownEvent),window.addEventListener("resize",R.windowResize),R.canvas=document.getElementById("hvCanvas"),R.ctx=R.canvas.getContext("2d"),R.canvas.width=window.innerWidth,R.canvas.height=window.innerHeight,n=R.canvas.width,r=R.canvas.height;var c=document.body,d=document.documentElement,h=Math.max(c.scrollHeight,c.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight);R.canvas.height=h,e("#hvHighLightDiv").css("height",h+"px"),R.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),R.canvas.addEventListener("mousemove",(function(e){R.findxy("move",e)}),!1),R.canvas.addEventListener("mousedown",(function(e){R.findxy("down",e)}),!1),R.canvas.addEventListener("mouseup",(function(e){R.findxy("up",e)}),!1),R.canvas.addEventListener("mouseout",(function(e){R.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&X((t.detail||{}).stream);if("_remove_webcam_preview"===t.type&&Q(),"_show_upload_progress"===t.type){var l=t.detail||{};o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,Q(),Z()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,Q(),Z()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"_close_popup"===t.type&&(this.popupElement&&(this.popupElement.style.display="none"),Q(),Z()),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),H={create:function(e,t){return m()(this,void 0),new G(e,{settings:t})}.bind(void 0)},j={create:function(e,t){return m()(this,void 0),new q(e,{settings:t})}.bind(void 0)},G=function(e){r()(i,e);var t=I(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?Y(this.eventCallbackMap,"record_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=$(e),console.log("RECORDING CONFIG ",e),W(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),ee(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:O})):Y(this.eventCallbackMap,"record_error",{error:"invalid_record_options",message:"The recording options given are invalid"}))}},{key:"stopRecording",value:function(){te(this.eventListenerClass,"user")}}]),i}(z),q=function(e){r()(i,e);var t=I(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"import",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){ee(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(z);function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function $(e){var t=Object.assign({},e);for(var i in e)L[i]&&(delete t[i],t[L[i]]=e[i]);return t}function Y(e,t,i){e[t]&&e[t](i)}function K(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function J(e){var t=this;try{Object(S.j)(e).then(function(){m()(this,t),O=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),O=!1}.bind(this))}catch(e){O=!1}}function X(e){Object(x.a)(e)}function Q(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Z(){!function(){R&&R.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function ee(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}function te(e,t){ee(e,"hv_stop_recording",{from:t})}}.call(this,i(2))},,function(e,t,i){var n=i(8),r=i(33),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(208),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(8),r=i(13),o=i(75),a=i(29),s=i(31),l=i(104),u=i(118),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new S(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;_(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(13),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";
|
|
248
|
+
*/!function(s){"use strict";o=[i(2),i(707),i(708),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(134);var n=i(14),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(134);var n=i(14),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(528);return e.paginators=i(529).pagination,e.waiters=i(530).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(_,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(_,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(S,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,E,_=0,S=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,U=0,B=0,V=l.length,z=V-1,H="",j="",G="",q="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==S+C+T+_&&(0!==S&&(f=47===S?10:47),C=T=_=0,V++,z++),0===S+C+T+_){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,B=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(B,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(B=(g=e(s,F,g,f,h+1)).length,0<D&&(E=a(3,g,F=t(I,H,U),s,x,k,B,f,h,d),H=F.join(""),void 0!==E&&0===(B=(g=E.trim()).length)&&(f=0,g="")),0<B)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,U),g,d,h+1)}G+=g,g=U=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(B=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<D&&void 0!==(E=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(B=(H=E.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){q+=H+l.charAt(M);break}default:58!==H.charCodeAt(B-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}U=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===S+C+T+_){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+_+S)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+S+_&&(F=U=1,b="\f"+b);break;case 108:if(0===C+S+_+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+S+_&&(L=M);break;case 44:0===S+T+C+_&&(F=1,b+="\r");break;case 34:case 39:0===S&&(C=C===f?0:0===C?f:C);break;case 91:0===C+S+T&&_++;break;case 93:0===C+S+T&&_--;break;case 41:0===C+S+_&&T--;break;case 40:if(0===C+S+_){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===S+T+C+_+L+g&&(g=1);break;case 42:case 47:if(!(0<C+_+T))switch(S){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:S=47;break;case 220:B=M,S=42}break;case 42:47===f&&42===R&&B+2!==M&&(33===l.charCodeAt(B+2)&&(j+=l.substring(B,M+1)),b="",S=0)}}0===S&&(H+=b)}O=R,R=f,M++}if(0<(B=j.length)){if(F=s,0<D&&(void 0!==(E=a(2,j,F,i,x,k,B,d,h,d))&&0===(j=E).length))return q+j+G;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return q+j+G}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,_=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:E},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function E(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="1" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(616),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(627),i(632),i(7)],void 0===(r=function(e,t,i){return function(n){var r=!1;try{r=HippoVideo.data.api.getProperty("isLessonly")}catch(e){}return r=r||"lessonly"==i.getQueryParams().type||"lessonly"==i.getQueryParams().integration_type,n.isDelivery&&!r||n.isNewPlayer?new t(n):new e(n)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return T}));i(96),i(184),i(24),i(244),i(56),i(71),i(84),i(112),i(61),i(176),i(52),i(85),i(86),i(137),i(67),i(138);var n=i(98),r=i.n(n),o=i(97),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(393),h=i.n(d),p=i(398),f=i.n(p),g=i(6),m=i.n(g),v=i(38),y=i(100),b=i.n(y),w=i(399);function E(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function T(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,_=t.footageUrls,T=t.showSimpleEditor,C=t.projectJson,k=t.integrationType,x=t.onSimpleEditorInitialize,A=Object(u.useState)(d.recordDetails),P=A[0],I=A[1],R=Object(u.useContext)(v.a).recorderInitOptions.edit,D=window._HVDomain||"https://www.hippovideo.io",O=Object(u.useRef)(!1),N=Object(u.useRef)(),L=Object(u.useRef)(C),M=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!P||!P.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),I(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var F=function(){if(l()(this,i),P.asset_id){var e={el:N.current,fromSDK:!0,videoPlayerView:n,integration_type:k,assetId:P&&P.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:P&&P.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:P&&P.authoring_id,footageUrls:_};console.log("SIMPLE EDIT OPTIONS ",e),M.current?(console.log("1"),M.current.initialize(e)):(console.log("2"),M.current=new h.a(e)),x&&x(M.current)}}.bind(this),U=function(){l()(this,i);try{var e={};if(R&&"object"===a()(R)&&null!==R)for(var t in R)!1!==R[t]&&"false"!==R[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),N.current&&(N.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?S(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:k,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields,origin:D},U()))),O.current=!0,console.log("CONTROLS ADDED >>>",N.current))}.bind(this),[N]),Object(u.useEffect)(function(){l()(this,i),n&&N.current&&P&&O.current&&F()}.bind(this),[n,N,P,O]),Object(u.useEffect)(function(){if(l()(this,i),M.current)if(T){M.current.enable();var e,t=E(N.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}M.current.height="140px"}else{var n,r=E(N.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}M.current.height="0"}}.bind(this),[T]),Object(u.useEffect)(function(){var e=this;return l()(this,i),L.current=C,C&&M.current&&n&&(setTimeout(function(){l()(this,e),M.current.setProjectJson(C)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;l()(this,i),M.current&&n&&L.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",C),M.current.setProjectJson(C)}.bind(this),300),n.show())}.bind(this),[M,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:N})}}).call(this,i(11))},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(7),i(12),i(325),i(634),i(635),i(6),i(48),i(187),i(186),i(141),i(636),i(237),i(637),i(711),i(117),i(139),i(140),i(73),i(698),i(699),i(700),i(357),i(703),i(704),i(115),i(706),i(709)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.origin=t.fromSDK?window._HVDomain||"https://assets.hippovideo.io":"",this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&(console.log("HERE!!!!!!!!"),i.unselectText())),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){console.log("HERE!!!!!!!! 2"),this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s),console.log("draw context ",l,a,s,r);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),console.log("HERE!!!!!!!! 2"),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(68),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o){var a={set_default:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:a,success:i,error:o})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:E},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function E(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:_,block:S},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function _(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:E},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function E(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:_},{}).w("</select></div></div>")}function _(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:S},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function S(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(18),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:S},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:U},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="').f(t.get(["origin"],!1),t,"h").w('/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:E,block:_},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function E(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-right.png")}function _(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function S(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function U(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:B},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function B(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(9),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.d)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var E,_=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),S=i(16);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(_,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.d)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(S.d,{style:{marginRight:"10px"},icon:Object(y.d)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),type:S.b.TRANSPARENT,buttonFeature:S.a.DROPDOWN,dropdownPosition:S.c.TOP}),l.a.createElement(S.d,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(E||(E=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(193),d=i(194),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return F})),i.d(t,"initialize",(function(){return U})),i.d(t,"availableRecordingSupport",(function(){return V})),i.d(t,"RecorderWidget",(function(){return H})),i.d(t,"ImportWidget",(function(){return j}));i(24),i(77);var n=i(49),r=i.n(n),o=i(54),a=i.n(o),s=i(41),l=i.n(s),u=i(36),c=i.n(u),d=i(37),h=i.n(d),p=i(360),f=i.n(p),g=i(1),m=i.n(g),v=i(249),y=i.n(v),b=(i(66),i(52),i(105),i(220),i(0)),w=i.n(b),E=i(57),_=i.n(E),S=i(26),T=i(5),C=i(188),k=i(207),x=i(401),A=i(400),P=i(9);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var R,D=["sdk_loaded","record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],O=!1,N={},L={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function M(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{_.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function U(e,t){return B.apply(this,arguments)}function B(){return(B=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,n){e.next=7;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 7:return u=new C.a({token:n,tokenType:o}),e.next=10,u.authenticateToken();case 10:if(c=e.sent,d=c[0],h=c[1],!d){e.next=25;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=20;break}return i&&i(null,p),e.abrupt("return");case 20:g=M(),N[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},J(l),K(n),i&&i({key:g},null);case 25:if(!h){e.next=30;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){var e=Object(S.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var z=function(){function t(e,i){var n=this,r=i.type,o=i.settings,a=void 0===o?{}:o;i.recorder_events;if(c()(this,t),!N.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=a.extensionless,l=a.inline;if(this.recordingInProgress=!1,this.recorderSettings=a,this.eventCallbackMap={},N[e].initialized){if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.targetElement,this.extensionless=s,l){var u=l.element_id,d=l.element;if(u&&(this.targetElement=document.getElementById(u)),d&&(this.targetElement=d),!this.targetElement&&document.getElementsByTagName("hippo-video-recorder")[0]&&(this.targetElement=document.getElementsByTagName("hippo-video-recorder")[0]),!this.targetElement)return void Y(this.eventCallbackMap,"record_error",{error:"inline_element_not_provided",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else this.targetElement=(h="hvr-popup-".concat((new Date).getTime()),(p=document.createElement("div")).setAttribute("id",h),p.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(p),p),this.popupElement=this.targetElement;var h,p;console.log("ELEMENT ",this.targetElement,this.popupElementId),F(this.targetElement),this.targetElement.innerHTML="",_.a.render(w.a.createElement(k.b,{settings:a,userId:N[e].userId,type:r,token:N[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:function(e){return m()(this,n),this._cb(e)}.bind(this)}),this.targetElement)}else Y(this.eventCallbackMap,"record_error",{error:"recorder_not_initialized",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"open",value:function(){ee(this.eventListenerClass,"open_widget"),this.popupElement&&(this.popupElement.style.display="flex")}},{key:"remove",value:function(){F(this.targetElement),this.popupElement&&(this.popupElement.style.display="none")}},{key:"on",value:function(e,t){D.includes(e)&&(this.eventCallbackMap[e]=t),"sdk_loaded"===e&&this.sdkLoaded&&this.eventCallbackMap[e]()}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),Y(this.eventCallbackMap,t.type,t.detail),"sdk_loaded"===t.type&&(this.sdkLoaded=!0),"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};this.recordingInProgress=!0,i.showWebcamPreview&&X(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head"),window._HVDomain;var n,r,o,a=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(R={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:Object(P.d)("/images/hv-highlight-icons/hb-stop.png"),cursorIcon:Object(P.d)("/images/hv-highlight-icons/hb-select.png"),cursorIconActive:Object(P.d)("/images/hv-highlight-icons/hb-select-active.png"),penIcon:Object(P.d)("/images/hv-highlight-icons/hb-pen.png"),penIconActive:Object(P.d)("/images/hv-highlight-icons/hb-pen-active.png"),focusIcon:Object(P.d)("/images/hv-highlight-icons/hb-focus.png"),focusIconActive:Object(P.d)("/images/hv-highlight-icons/hb-focus-active.png"),eraseIcon:Object(P.d)("/images/hv-highlight-icons/hb-erase.png"),eraseIconActive:Object(P.d)("/images/hv-highlight-icons/hb-erase-active.png"),clearIcon:Object(P.d)("/images/hv-highlight-icons/hb-clear.png"),clearIconActive:Object(P.d)("/images/hv-highlight-icons/hb-clear-active.png"),video:Object(P.d)("/images/hv-highlight-icons/hb-video-off.png"),togarrow:Object(P.d)("/images/hv-highlight-icons/hb-toggle-arrow.png"),collapsIcon:Object(P.d)("/images/hv-highlight-icons/collapse-icon.png"),penColorIcon:Object(P.d)("/images/hv-highlight-icons/pen-with-color.svg"),penCursorIcon:Object(P.d)("/images/hv-highlight-icons/pen-cusor.svg"),eraseCursorIcon:Object(P.d)("/images/hv-highlight-icons/erase-cursor.svg"),arrowPointer:Object(P.d)("/images/hv-highlight-icons/arrow-pointer.png"),mouseAnimationIcon:Object(P.d)("/images/hv-highlight-icons/hb-mouse-animation.png"),mouseAnimationIconActive:Object(P.d)("/images/hv-highlight-icons/hb-mouse-animation-active.png"),highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;R.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&R.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),R.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),R.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(){console.log("SENDING EVENT ",i,"hv_stop_recording"),te(i,"markup-tools")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(R.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return R.resetValues(),R.highlightsEvents("hvCursor"),void R.cursor();if("hvCursor"==t&&!i)return R.resetValues(),void R.cursor();switch(R.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&R.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",R.mouseMove),R.isPen=!1,t){case"hvCursor":R.cursor();break;case"hvCursorAnimation":R.cursorAnimation();break;case"hvPen":R.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),R.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":R.eraser();break;case"hvClearScreen":R.clearScreen();break;case"hvFocusArea":R.focusArea();break;case"hvStop":R.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",R.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=R.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){R.highlightsEvents("hvColorChoose"),R.isEraser=!1,R.penColor=e.target.id,R.selectedColor=R.highlightsColors.indexOf(e.target.id),R.setCursor(e.target.id)},draw:function(){R.ctx.beginPath(),1==R.isEraser?R.ctx.globalCompositeOperation="destination-out":R.ctx.globalCompositeOperation="source-over",R.ctx.lineCap="round",R.ctx.moveTo(R.prevX,R.prevY),R.ctx.fillStyle=R.penColor,R.ctx.globalAlpha=1,R.ctx.lineTo(R.currX,R.currY),R.ctx.strokeStyle=R.penColor,R.ctx.lineWidth=R.cursorWidth,R.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);R.canvas.height=i;var n=R.canvas.width,r=R.canvas.height;R.ctx.clearRect(0,0,n,r),R.selectHiglightOptions(R.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",R.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){R.isEraser=!1,R.isPen=!0,R.setCursor(R.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){R.isEraser=!0,e("body").css("cursor","url("+R.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){R.tooltipHide(),R.highlightsOpen=!1,t&&R.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){R.highlightsOpen=!0,t&&R.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft,R.currY=i.offsetY-R.canvas.offsetTop,R.currY+=15,R.currX+=5,R.flag=!0,R.dot_flag=!0,R.dot_flag&&(R.ctx.beginPath(),R.ctx.fillStyle=R.penColor,R.ctx.fillRect(R.currX,R.currY,2,2),R.ctx.closePath(),R.dot_flag=!1)),"up"!=t&&"out"!=t||(R.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-R.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-R.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),R.flag&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft+5,R.currY=i.offsetY-R.canvas.offsetTop+17,R.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);R.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==R.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(R.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(R.isAlt=!0),R.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==R.isAlt&&R.stopRecording(),67==t.which&&1==R.isAlt&&(t.preventDefault(),R.closeHighlights(!0)),79==t.which&&1==R.isAlt&&(t.preventDefault(),R.openHighlights(!0)),90==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvEraser",!0),R.isEraser=!0),72==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvPen",!0),R.isEraser=!1,R.pen()),70==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvFocusArea",!0),R.focusArea()),(77==t.which&&1==R.isAlt||27==t.which)&&(R.selectHiglightOptions("hvCursor",!0),R.cursor()),65==t.which&&1==R.isAlt&&R.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&R.cursorWidth<=200&&(R.cursorWidth+=1,R.highlightCursorWidth+=1,R.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),38==t.which&&R.isAlt,40==t.which&&R.cursorWidth>=5&&(R.cursorWidth-=1,R.highlightCursorWidth-=1,R.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),37==t.which&&0!==R.selectedColor&&(R.selectedColor=R.selectedColor-1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor)),39==t.which&&5!==R.selectedColor&&(R.selectedColor=R.selectedColor+1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var s="Press "+("Mac"===a?"Option":"Alt")+" + O for Open",l="Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight",u='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+R.stopIcon+'" id="hvStopImg"/> <img src="'+R.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+R.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+R.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+R.penIcon+'" id="hvPenImg" /> <img src="'+R.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+R.focusIcon+'" id="hvFocusImg" /> <img src="'+R.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+R.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+R.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+R.clearIcon+'" id="hvClearImg" /> <img src="'+R.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+R.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+s+'"><img src="'+R.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+l+"</div> </div>";e(u).appendTo("body"),e(".hv-highlight-option").bind("click",R.highlightOptions),e(".hv-change-color-circle").bind("click",R.color),e(".hv-close-highlights").bind("click",R.closeHighlights),e(".hv-open-highlights").bind("click",R.openHighlights),e(".hv-highlight-option").on("mouseenter",R.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",R.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",R.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",R.tooltipShow),window.addEventListener("keyup",R.onkeyupEvent),window.addEventListener("keydown",R.onkeydownEvent),window.addEventListener("resize",R.windowResize),R.canvas=document.getElementById("hvCanvas"),R.ctx=R.canvas.getContext("2d"),R.canvas.width=window.innerWidth,R.canvas.height=window.innerHeight,n=R.canvas.width,r=R.canvas.height;var c=document.body,d=document.documentElement,h=Math.max(c.scrollHeight,c.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight);R.canvas.height=h,e("#hvHighLightDiv").css("height",h+"px"),R.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),R.canvas.addEventListener("mousemove",(function(e){R.findxy("move",e)}),!1),R.canvas.addEventListener("mousedown",(function(e){R.findxy("down",e)}),!1),R.canvas.addEventListener("mouseup",(function(e){R.findxy("up",e)}),!1),R.canvas.addEventListener("mouseout",(function(e){R.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&X((t.detail||{}).stream);if("_remove_webcam_preview"===t.type&&Q(),"_show_upload_progress"===t.type){var l=t.detail||{};o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,Q(),Z()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,Q(),Z()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"_close_popup"===t.type&&(this.popupElement&&(this.popupElement.style.display="none"),Q(),Z()),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),H={create:function(e,t){return m()(this,void 0),new G(e,{settings:t})}.bind(void 0)},j={create:function(e,t){return m()(this,void 0),new q(e,{settings:t})}.bind(void 0)},G=function(e){r()(i,e);var t=I(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?Y(this.eventCallbackMap,"record_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=$(e),console.log("RECORDING CONFIG ",e),W(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),ee(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:O})):Y(this.eventCallbackMap,"record_error",{error:"invalid_record_options",message:"The recording options given are invalid"}))}},{key:"stopRecording",value:function(){te(this.eventListenerClass,"user")}}]),i}(z),q=function(e){r()(i,e);var t=I(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"open",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){ee(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(z);function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function $(e){var t=Object.assign({},e);for(var i in e)L[i]&&(delete t[i],t[L[i]]=e[i]);return t}function Y(e,t,i){e[t]&&e[t](i)}function K(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function J(e){var t=this;try{Object(S.j)(e).then(function(){m()(this,t),O=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),O=!1}.bind(this))}catch(e){O=!1}}function X(e){Object(x.a)(e)}function Q(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Z(){!function(){R&&R.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function ee(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}function te(e,t){ee(e,"hv_stop_recording",{from:t})}}.call(this,i(2))},,function(e,t,i){var n=i(8),r=i(33),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(208),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(8),r=i(13),o=i(75),a=i(29),s=i(31),l=i(104),u=i(118),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new S(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;_(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(13),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";
|
|
249
249
|
/** @license React v16.14.0
|
|
250
250
|
* react.production.min.js
|
|
251
251
|
*
|