1(self.webpackChunkphotocut=self.webpackChunkphotocut||[]).push([[716],{2716:(fe,re,d)=>{"use strict";d.r(re),d.d(re,{EditorToolsModule:()=>ja});var g=d(6895),J=d(4965),O=d(5939),F=d(4466),w=d(433),Q=d(9996),x=d(3500),P=d(3913),C=d(2965),S=d(7626),p=d(657),y=d(2340),e=d(4650),T=d(7915),X=d(9910),L=d(4489),ce=d(4310),N=d(1752),W=d(263),s=d(3142),c=d(5148),h=d(763);function I(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",7)(2,"div",8)(3,"div",9),e._uU(4),e.qZA(),e.TgZ(5,"h3",10),e._uU(6),e.qZA(),e.TgZ(7,"p",11),e._uU(8),e.qZA()()(),e.BQk()),2&i){const t=a.$implicit,n=a.index;e.xp6(4),e.hij("Step ",n+1," "),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Oqu(t.desc)}}let b=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["story-tutorial-area"]],inputs:{area:"area"},decls:8,vars:2,consts:[[1,"container-fluid","p-0"],[1,"container-fluid","area-inner","pad-md"],[1,"p-0"],[1,"mx-auto","mt-13","text-center",2,"max-width","800px"],[1,"text-32","lh-h12","text-dark","mb-0"],[1,"row","g-0","justify-content-between","mt-14"],[4,"ngFor","ngForOf"],[1,"col-xl-4","col-lg-4","col-md-4","mt-2","mt-lg-0","p-2"],[1,"tutorialContentBox"],[1,"stepBtn","btn-h40","text-lg","text-bold"],[1,"text-24","grey-800","text-bold","lh-3","mt-13","mb-0"],[1,"text-lg","grey-800","lh-p2","mt-3","mb-0"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),e._uU(5),e.qZA()()(),e.TgZ(6,"div",5),e.YNc(7,I,9,3,"ng-container",6),e.qZA()()()),2&t&&(e.xp6(5),e.Oqu(n.area.title),e.xp6(2),e.Q6J("ngForOf",n.area.steps))},dependencies:[g.sg],styles:[".tutorialContentBox[_ngcontent-%COMP%]{background:#fff;border:1px solid #F0F0F0;border-radius:24px;padding:40px 24px 24px;height:100%}.tutorialContentBox[_ngcontent-%COMP%] .stepBtn[_ngcontent-%COMP%]{display:flex;align-items:center;width:92px;background:linear-gradient(90deg,#FDEEDE -4%,#FAE3EA 100%);border-radius:12px;box-shadow:0 4px 16px #00000014;color:#f58c24}"]}),i})(),Z=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["story-heading-area"]],inputs:{area:"area"},decls:7,vars:1,consts:[[1,"w-100","text-center","d-lg-block","d-md-block","d-sm-block","d-none","gray-100",2,"min-height","140px"],[1,"container-fluid","area-inner","pad-md","pb-10"],[1,"row","g-0","align-items-center"],[1,"col-xl-8","col-lg-11","mx-auto","p-0"],[1,"text-center","mx-auto","mt-13"],[1,"text-36","lh-h12","text-dark"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h2",5),e._uU(6),e.qZA()()()()()()),2&t&&(e.xp6(6),e.Oqu(n.area.title))}}),i})();var $=d(690),V=d(9912);const Y=function(i){return{"img-active":i}};function z(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",16),e.NdJ("click",function(){const o=e.CHM(t),r=o.index,l=o.$implicit,m=e.oxw();return e.KtG(m.onImageSelect(r,l.url))}),e.TgZ(1,"picture"),e._UZ(2,"source",14),e.ALo(3,"imgwebp"),e._UZ(4,"img",17),e.qZA(),e.TgZ(5,"div",18),e._uU(6),e.qZA()()}if(2&i){const t=a.$implicit,n=a.index,o=e.oxw();e.Q6J("ngClass",e.VKq(7,Y,n===o.selectedImageId)),e.xp6(2),e.s9C("srcset",e.lcZ(3,5,t.url)),e.xp6(2),e.s9C("src",t.url,e.LSH),e.Q6J("alt",t.altText),e.xp6(2),e.Oqu(t.text)}}let U=(()=>{class i{constructor(t){this.commonService=t,this.selectedImageId=3,this.imgurl=""}ngOnInit(){this.onImageSelect(this.selectedImageId,this.area.images[3].url)}getAction(t){return[`${t.split("?")[0]}`]}getQueryParams(t){return this.commonService.getQueryParams(t)}onImageSelect(t,n){this.selectedImageId=t,this.imgurl=n}}return i.\u0275fac=function(t){return new(t||i)(e.Y36($.v))},i.\u0275cmp=e.Xpm({type:i,selectors:[["image-preview-area"]],inputs:{area:"area",even:"even"},decls:20,vars:7,consts:[[1,"bg-grey","w-100"],[1,"container-fluid","area-inner","pad-md"],[1,"row","g-0"],[1,"d-flex","text-center","pt-13","pb-13"],[1,"col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],[1,"col-xl-11","col-lg-11","mx-auto","p-0"],[1,"text-32","text-dark","lh-h12","text-bold","mb-0"],[1,"text-24","text-dark","lh-3","text-semi","mt-13","mb-0"],[1,"container-fluid","p-0"],[1,"row","g-0","align-items-center","justify-content-center","mt-14","pt-10"],[1,"col-md-6","col-xl-6","col-lg-6"],[1,"row","g-0","align-items-center"],["class","col-xl-5 col-lg-5 col-md-5 col-sm-5 pointer d-none d-lg-block d-md-block","style","margin: 10px;",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"col-md-6","col-xl-6","col-lg-6","ms-0","ms-lg-6"],["type","image/webp",3,"srcset"],["loading","lazy","width","583px","height","583px",1,"responsive","rounded-24",3,"src"],[1,"col-xl-5","col-lg-5","col-md-5","col-sm-5","pointer","d-none","d-lg-block","d-md-block",2,"margin","10px",3,"ngClass","click"],["loading","lazy","width","238px","height","238px",1,"responsive","rounded-24",3,"src","alt"],[1,"img-heading","mt-2"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"h2",6),e._uU(7),e.qZA(),e.TgZ(8,"p",7),e._uU(9),e.qZA()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e.YNc(14,z,7,9,"div",12),e.qZA()(),e.TgZ(15,"div",13)(16,"picture"),e._UZ(17,"source",14),e.ALo(18,"imgwebp"),e._UZ(19,"img",15),e.qZA()()()()()()()()()),2&t&&(e.xp6(7),e.Oqu(n.area.title),e.xp6(2),e.hij("",n.area.subTitle," "),e.xp6(5),e.Q6J("ngForOf",n.area.images),e.xp6(3),e.s9C("srcset",e.lcZ(18,5,n.imgurl)),e.xp6(2),e.Q6J("src",n.imgurl,e.LSH))},dependencies:[g.mk,g.sg,V.I],styles:[".area-section[_ngcontent-%COMP%]{padding:20px 100px}"]}),i})();var k=d(7582),A=(d(7596),d(2033)),K=d(4541),v=d(8049),q=d(8237),ee=d(5282),H=d(253),B=d(4105),D=d(4126),me=d(9133),te=d(8303),se=d(5879);const he=function(i,a,t){return{even:i,"mb-14":a,"pb-sm-0":t}},ue=function(i){return{"d-none":i}},G=function(i,a,t,n){return{"order-2":i,"order-1":a,"order-md-2":t,"order-md-1":n}}
1,de=function(i,a,t,n){return{"order-lg-1":i,"order-lg-2":a,"order-md-1":t,"order-md-2":n}},ne=function(i,a){return{"d-none":i,"button-scroll-mobile":a}},pe=function(i,a,t,n){return{"float-lg-end":i,"float-lg-start":a,"w-100":t,"d-none":n}},be=function(i,a,t,n){return{"float-lg-end":i,"float-lg-start":a,"w-100":t,"d-flex-1":n}};let Ce=(()=>{class i{constructor(t,n,o,r,l,m,_,u){this.authService=t,this.activeModal=n,this.uploadImgService=o,this.env=r,this.downloadService=l,this.subsService=m,this.mediaContentService=_,this.gtmService=u,this.colors=[],this.bgImages=[],this.hexcolor="#ffffff",this.dw={w:720,h:720},this.dwHD={w:1920,h:1920},this.isCompare=!1,this.close=new e.vpe,this.activeItem="none",this.isCp=!1,this.isLoaded=!1,this.user=this.authService.currentUser()}ngOnInit(){this.outPutUrl=JSON.parse(JSON.stringify(this.remBgUrl)),this.getBgColors()}edit(){if(this.env.isMobileView)return void this.env.openPlayStoreUrl();const t=JSON.parse(JSON.stringify(this.area.metadata));t.imageUrl=this.remBgUrl,t.editorType=v.gg.DesignTemplate,t.isCutout=!0,this.colors&&this.colors.length&&this.activeItem?t.bgColor="none"==this.activeItem?"":this.activeItem:this.bgImages&&this.bgImages.length&&this.activeItem&&(t.bgImg="none"==this.activeItem?"":this.activeItem),this.oImage&&(t.oImage=this.oImage),this.uploadImgService.loadInputImage(t,()=>{}),this.gtmService.pushTag({eventName:p.t.gtm.eventname.editForFree,itemName:p.t.gtm.itemName.editFree})}getBgColors(){var t;const n=null!==(t=this.area.metadata)&&void 0!==t&&t.colors?this.area.metadata.colors.toString():"";if(this.area.metadata&&n.startsWith("#"))this.colors=this.area.metadata.colors.split(","),this.isLoaded=!0;else if(this.area.metadata&&n&&!isNaN(n)){const o=Number(n);o&&Number(o)>0&&this.getBgImages(o)}}getBgImages(t){this.mediaContentService.getTemplateByProductId(t,0,n=>{n&&n.storeProductImages&&n.storeProductImages.length>0&&(this.bgImages=n?.storeProductImages||[],this.isLoaded=!0)},n=>{this.isLoaded=!0})}download(t=null){t||(t=this.dw),this.downloadService.getImageType(this.remBgUrl).then(n=>{q.S.loadImageElement(this.outPutUrl,o=>{q.S.checkAndResizeImage(o,r=>{var l;this.downloadService.download(r.src,n);let m={eventName:p.t.gtm.eventname.downloadRemBg,itemName:this.storyProps.subType,itemType:null===(l=this.area.metadata)||void 0===l?void 0:l.toolName,itemValue:t.w==this.dwHD.w?"HD":"Standard"};this.gtmService.pushTag(m)},t.w,t.h)})})}downloadHD(){var t;let n={eventName:p.t.gtm.eventname.downloadRemBg,itemName:this.storyProps.subType,itemType:null===(t=this.area.metadata)||void 0===t?void 0:t.toolName,itemValue:this.env.isMobileView?"HD_Mob_Init":"HD_Web_Init"};this.gtmService.pushTag(n),this.env.isMobileView?this.env.openPlayStoreUrl():this.user&&this.user.subscribed?this.download(this.dwHD):this.subsService.loginWithUpgrade(()=>{this.user=this.authService.currentUser(),this.user&&this.user.subscribed&&this.download(this.dwHD)})}changeBgColor(t=null,n=null){this.activeItem=t||n,this.ouputImage?this.updateColor("none"==t?null:t,n):q.S.loadImageFromUrl(this.remBgUrl,o=>{this.ouputImage=o;const r=o.width,l=o.height;this.canvas=ee.fabric.util.createCanvasElement(),this.canvas.width=r,this.canvas.height=l,this.updateColor(t,n)})}updateColor(t,n){const o=new ee.fabric.StaticCanvas(this.canvas,{enableRetinaScaling:!1});this.colors.length?(o.setBackgroundColor(t,()=>{o.renderAll()}),o.add(this.ouputImage),o.renderAll(),this.canvas.toBlob(r=>{this.outPutUrl=URL.createObjectURL(r)},"image/png")):this.bgImages&&this.bgImages.length&&(n?q.S.loadImageFromUrl(n,r=>{let l=1;l=this.ouputImage.width/this.ouputImage.height<r.width/r.height?this.ouputImage.height/r.height:this.ouputImage.width/r.width,r.scale(l),o.setBackgroundImage(r,()=>o.renderAll(),{originX:"left",originY:"top",crossOrigin:"anonymous"}),o.add(this.ouputImage),o.renderAll(),this.canvas.toBlob(m=>{this.outPutUrl=URL.createObjectURL(m)},"image/png")}):(o.backgroundImage=null,o.add(this.ouputImage),o.renderAll(),this.canvas.toBlob(r=>{this.outPutUrl=URL.createObjectURL(r)},"image/png")))}touchstart(){this.isCompare=!0}touchend(){this.isCompare=!1}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(W.e),e.Y36(Q.Kz),e.Y36(L.u),e.Y36(N.D),e.Y36(H.K),e.Y36(B.F),e.Y36(D.N),e.Y36(K.J))},i.\u0275cmp=e.Xpm({type:i,selectors:[["remove-bg-editor"]],inputs:{area:"area",inputImage:"inputImage",remBgUrl:"remBgUrl",even:"even",oImage:"oImage",storyProps:"storyProps"},outputs:{close:"close"},decls:35,vars:49,consts:[[1,"w-100","position-relative","overflow-hidden","position-relative","pt-3"],[1,"container-fluid","p-ltrt","pb-5","pb-lg-0","position-relative",2,"max-width","1366px","z-index","1",3,"ngClass"],[1,"row","g-0","align-items-end","justify-content-between",3,"ngClass"],[1,"col-xl-5","col-lg-5","col-md-6","flex-column","mt-4","mt-lg-0","position-relative",2,"max-height","412px",3,"ngClass"],[1,"upload-box","d-flex","align-items-center","justify-content-center","mx-auto","ms-lg-auto","me-lg-10",2,"min-height","305px","height","406px","padding","48px 40px"],[1,"wp-100","text-center"],["id","dw-hd",1,"btn-all","btn-secondary","btn-h48","justify-content-center","d-flex","align-items-center","w-100","text-semi","mb-2",3,"click"],["name","downloadwhite",1,"icon","f-24","me-2"],[1,"text-14","grey-400"],["
1id","dw-pre",1,"btn-all","btn-outline-primary","justify-content-center","btn-h48","d-flex","align-items-center","w-100","text-semi","text-black","mb-2","mt-4",3,"click"],["name","download",1,"icon","f-24","me-2","grey-800"],[2,"margin","40px -31px"],["id","edit-ff",1,"btn","btn-primary","btn-h48","justify-content-center","d-flex","align-items-center","w-100","text-semi",3,"click"],["name","refineEdit",1,"icon","f-24","me-2"],[1,"col-xl-7","col-lg-6","col-md-5","mb-4","mb-lg-0","position-relative",2,"min-height","476px",3,"ngClass"],[1,"d-flex","align-items-center","justify-content-center","flex-column","w-100"],[1,"d-flex","align-items-center","justify-content-start","w-100","mb-9","position-relative",2,"min-height","52px","height","52px",3,"ngClass"],[3,"type","name","items","selectMenu"],[3,"type","items","selectMenu"],[1,"d-flex","align-items-center","justify-content-center","w-100","overflow-hidden","canvas-rmbg-box","position-relative"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100"],["loading","lazy","disableRC","",1,"section-rmbg","show-transbg",3,"src","alt","ngClass"],["loading","lazy",1,"d-none","section-rmbg","show-transbg",3,"src","alt","ngClass"],[1,"d-flex","align-items-center","justify-content-center","position-absolute",2,"right","12px","top","8px"],[1,"btn","btn-white","btn-h40","d-flex","align-items-center","justify-content-center","grey-800","border-radius-12","ps-2","pe-2","border-0","me-2",3,"touchstart","touchend","mouseup","mouseout","mousedown"],["name","compareactive",1,"f-24"],[1,"btn","btn-white","btn-h40","d-flex","align-items-center","justify-content-center","grey-800","border-radius-12","ps-2","pe-2","border-0",3,"click"],["name","deletecommon",1,"f-24"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"button",6),e.NdJ("click",function(){return n.downloadHD()}),e._UZ(7,"pi",7),e._uU(8,"Download HD "),e.qZA(),e.TgZ(9,"span",8),e._uU(10,"Resolution upto 1920 x 1920 px"),e.qZA(),e.TgZ(11,"button",9),e.NdJ("click",function(){return n.download()}),e._UZ(12,"pi",10),e._uU(13,"Download Standard "),e.qZA(),e.TgZ(14,"span",8),e._uU(15,"Resolution upto 720 x 720 px"),e.qZA(),e._UZ(16,"hr",11),e.TgZ(17,"button",12),e.NdJ("click",function(){return n.edit()}),e._UZ(18,"pi",13),e._uU(19,"Edit for free "),e.qZA()()()(),e.TgZ(20,"div",14)(21,"div",15)(22,"div",16)(23,"buttons-scroll-menu",17),e.NdJ("selectMenu",function(r){return n.changeBgColor(r)}),e.qZA()(),e.TgZ(24,"div",16)(25,"buttons-scroll-menu",18),e.NdJ("selectMenu",function(r){return n.changeBgColor(r)}),e.qZA()(),e.TgZ(26,"div",19)(27,"picture",20),e._UZ(28,"img",21)(29,"img",22),e.qZA(),e.TgZ(30,"div",23)(31,"button",24),e.NdJ("touchstart",function(){return n.touchstart()})("touchend",function(){return n.touchend()})("mouseup",function(){return n.isCompare=!1})("mouseout",function(){return n.isCompare=!1})("mousedown",function(){return n.isCompare=!0}),e._UZ(32,"pi",25),e.qZA(),e.TgZ(33,"button",26),e.NdJ("click",function(){return n.close.emit()}),e._UZ(34,"pi",27),e.qZA()()()()()()()()),2&t&&(e.xp6(1),e.Q6J("ngClass",e.kEZ(17,he,n.even,n.area.title,n.area.title)),e.xp6(1),e.Q6J("ngClass",e.VKq(21,ue,(null==n.area?null:n.area.links)&&"stripBtn"==(null==n.area?null:n.area.links[0].type))),e.xp6(1),e.Q6J("ngClass",e.l5B(23,G,n.even,!n.even,n.even,!n.even)),e.xp6(17),e.Q6J("ngClass",e.l5B(28,de,n.even,n.even,n.even,n.even)),e.xp6(2),e.Q6J("ngClass",e.WLB(33,ne,!(null!=n.colors&&n.colors.length),n.env.isMobileView)),e.xp6(1),e.Q6J("type","colorremovebg")("name","color")("items",n.colors),e.xp6(1),e.Q6J("ngClass",e.WLB(36,ne,!(null!=n.bgImages&&n.bgImages.length),n.env.isMobileView)),e.xp6(1),e.Q6J("type","colorremovebg")("items",n.bgImages),e.xp6(3),e.Q6J("src",n.outPutUrl,e.LSH)("alt",n.area.images[0].altText)("ngClass",e.l5B(39,pe,n.even,!n.even,n.env.isMobileView&&(null==n.inputImage?null:n.inputImage.width)>=(null==n.inputImage?null:n.inputImage.height),n.isCompare)),e.xp6(1),e.Q6J("src",n.inputImage.src,e.LSH)("alt",n.area.images[0].altText)("ngClass",e.l5B(44,be,n.even,!n.even,n.env.isMobileView&&(null==n.inputImage?null:n.inputImage.width)>=(null==n.inputImage?null:n.inputImage.height),n.isCompare)))},dependencies:[g.mk,me.m,te.G,se.B],styles:[".n-show[_ngcontent-%COMP%]{position:absolute;z-index:-99}.btn-upload[_ngcontent-%COMP%]{width:100%;min-height:60px;font-size:20px!important}.p-50[_ngcontent-%COMP%]{padding:0 50px}@media (max-width: 576px){.p-50[_ngcontent-%COMP%]{padding:0 15px}}.centered[_ngcontent-%COMP%]{height:100vh;z-index:9999;position:fixed;top:50%;left:0%;right:0%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.centered[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter bold;font-size:32px;color:#2e2d2d;line-height:43.58px;margin-bottom:0}.centered[_ngcontent-%COMP%] .secondary-text[_ngcontent-%COMP%]{font-size:20px;font-family:Inter semibold;color:#2e2d2d;line-height:36px}.bg-color-item-section[_ngcontent-%COMP%]{overflow-x:auto!important}.bg-color-item-section[_ngcontent-%COMP%] .bg-color-item[_ngcontent-%COMP%]{width:52px;height:52px;border-radius:40px;padding:2px;border:2px solid transparent;background:transparent;margin-right:2px;min-width:52px;min-height:52px;transition:all .3s ease-out;cursor:pointer}.bg-color-item-section[_ngcontent-%COMP%] .bg-color-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .bg-color-item-section[_ngcontent-%COMP%] .bg-color-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:44px;width:44px;border-radius:40px;border:1px solid #E7E5E5}.bg-color-item-section[_ngcontent-%COMP%] .bg-color-item[_ngcontent-%COMP%] .blank-item[_ngcontent-%COMP%]{border-radius:4px;background:var(--colors-SEMANTIC-Error, #F25555);width:36px;height:3px;transform:rotate(-45deg)}.bg-color-item-section[_ngcontent-%COMP%] .bg-color-item[_ngcontent-%COMP%]:hover{border:2px solid rgba(0,0,0,.04)}.bg-color-item-section[_ngcontent-%COMP%] .bg-color-item.active-bg[_ngcontent-%COMP%]{border:2px solid #413F3F;background:#fff}.new-scroll-behave[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}.new-scroll-behave[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.canvas-rmbg-box[_ngcontent-%COMP%]{border-radius:16px;border:1px solid var(--colors-NEW-GREY-Opaque-100, #E7E5E5);background:#F7F7F7;height:412px;min-height:412px}.canvas-rmbg-box[_ngcontent-%COMP%] .section-rmbg[_ngcontent-%COMP%]{object-fit:contain;position:absolute;max-height:100%}.canvas-rmbg-box[_ngcontent-%COMP%] .btn-white[_ngcontent-%COMP%]{background:rgba(255,255,255,.7)!important;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.canvas-rmbg-box[_ngcontent-%COMP%] .btn-white[_ngcontent-%COMP%]:hover{background:linear-gradient(0deg,rgba(0,0,0,.08) 0%,rgba(0,0,0,.08) 100%),rgba(255,255,255,.7)!important}.d-flex-1[_ngcontent-%COMP%]{display:block!important}"]}),i})();var le=d(4700);function ve(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1,"This field is required."),e.qZA())}function ie(i,a){if(1&i&&(e.TgZ(0,"div",8),e.YNc(1,ve,2,0,"div",0),e.qZA()),2&i){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Te(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1)(2,"form",null,2)(4,"div",3)(5,"div",4)(6,"re-captcha",5,6),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.token=o)})("ngModelChange",function(){e.CHM(t);const o=e.MAs(3),r=e.oxw();return e.KtG(r.send(o))}),e.qZA(),e.YNc(8,ie,2,1,"div",7),e.qZA()()()(),e.BQk()}if(2&i){const t=e.MAs(7),n=e.oxw();e.xp6(6),e.ekj("is-invalid",t.invalid&&(t.dirty||t.touched)),e.Q6J("ngModel",n.token),e.xp6(2),e.Q6J("ngIf",t.invalid&&(t.dirty||t.touched))}}let ke=(()=>{class i{constructor(){this.show=!1,this.validate=new e.vpe}
1send(t){if(t.invalid)for(const n of Object.keys(t.controls))t.controls[n].markAsTouched();else t.valid&&(this.show=!1,this.validate.emit(!0)),console.debug(`Token [${this.token}] generated`)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["google-captcha"]],inputs:{show:"show"},outputs:{validate:"validate"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","position-fixed","google-captcha-conatiner"],["form","ngForm"],[1,"row","mt-3"],[1,"col-sm-12","mb-2"],["id","recaptcha","name","recaptcha","required","",3,"ngModel","ngModelChange"],["recaptcha","ngModel"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"]],template:function(t,n){1&t&&e.YNc(0,Te,9,4,"ng-container",0),2&t&&e.Q6J("ngIf",n.show)},dependencies:[g.O5,w._Y,w.JJ,w.JL,w.Q7,w.On,w.F,le.Vd,le.wT],styles:[".google-captcha-conatiner[_ngcontent-%COMP%]{background:rgba(255,255,255,.2);box-shadow:0 8px 24px #00000026;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);top:0px;left:0px;width:100%;height:100%;z-index:9999}"]}),i})();const Le=["fileInput"],Se=function(i){return{"bottom-upload":i}},je=function(i,a){return{"btn-upload text-semi":i,"btn-white text-primary btn-h48 me-2 w-50 ":a}};function Ke(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",6)(2,"button",7),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.showCaptcha())}),e._uU(3),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(3,Se,(null==t.area?null:t.area.metadata)&&(null==t.area||null==t.area.metadata?null:t.area.metadata.isStrip))),e.xp6(1),e.Q6J("ngClass",e.WLB(5,je,!t.isStripVisible,t.isStripVisible)),e.xp6(1),e.Oqu(t.isStripVisible?null==t.area||null==t.area.metadata?null:t.area.metadata.stripText:t.area.links[0].text)}}const De=function(i,a){return{"btn-upload text-semi":i,"btn-white text-primary btn-h48 me-2":a}};function Ge(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.showCaptcha())}),e._uU(1),e.qZA()}if(2&i){const t=e.oxw(3);e.Q6J("ngClass",e.WLB(2,De,!t.isStripVisible,t.isStripVisible)),e.xp6(1),e.Oqu(t.isStripVisible?null==t.area||null==t.area.metadata?null:t.area.metadata.stripText:t.area.links[0].text)}}function $e(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Ge,2,5,"button",9),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.uploadImgService.inProgress)}}function ze(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",8),e.YNc(2,$e,2,1,"ng-container",2),e.qZA(),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,Se,(null==t.area?null:t.area.metadata)&&(null==t.area||null==t.area.metadata?null:t.area.metadata.isStrip))),e.xp6(1),e.Q6J("ngIf","image"==(null==t.metadata?null:t.metadata.uploadType))}}function Re(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",19)(1,"picture"),e._UZ(2,"source",20),e.ALo(3,"imgwebp"),e.TgZ(4,"img",21),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.showCaptcha(r.url))}),e.qZA()()()}if(2&i){const t=a.$implicit,n=a.index,o=e.oxw(3);e.xp6(2),e.s9C("srcset",e.lcZ(3,4,t.thumbUrl||t.url)),e.xp6(2),e.hYB("id","sample_image_",n+1,"_",null==o.metadata?null:o.metadata.toolName,""),e.Q6J("src",t.thumbUrl||t.url,e.LSH)}}function Xe(i,a){if(1&i&&(e.TgZ(0,"div",17),e.YNc(1,Re,5,6,"div",18),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",null==t.area?null:t.area.links[1].urls)}}const We=function(){return["/terms"]};function et(i,a){if(1&i&&(e.TgZ(0,"div")(1,"div",11),e._uU(2),e.qZA(),e._UZ(3,"div",12)(4,"hr"),e.TgZ(5,"div",13),e._uU(6),e.qZA(),e.YNc(7,Xe,2,1,"div",14),e.TgZ(8,"div",15),e._uU(9),e.TgZ(10,"a",16),e._uU(11,"Terms of Service."),e.qZA()()()),2&i){const t=e.oxw();e.xp6(2),e.hij("or drag & drop an ",null==t.metadata?null:t.metadata.uploadType,""),e.xp6(4),e.hij("",t.link.text,":"),e.xp6(1),e.Q6J("ngIf",(null==t.area?null:t.area.links)&&(null==t.area?null:t.area.links.length)),e.xp6(2),e.hij("By uploading an ",null==t.metadata?null:t.metadata.uploadType,", you agree to our "),e.xp6(1),e.Q6J("routerLink",e.DdM(5,We))}}let tt=(()=>{class i{constructor(t,n,o,r,l){this.authService=t,this.activeModal=n,this.uploadImgService=o,this.toastService=r,this.env=l,this.uploadImage=new e.vpe,this.isShown=!1,this.isStripVisible=!1,this.captcha=!1,this.sampleUrl="",this.user=this.authService.currentUser()}ngOnInit(){this.metadata=this.area.metadata,this.link=this.area.links[1],this.accept=this.uploadImgService.getFileAccept(this.metadata.editorType)}onFileUploaded(t){if(!t.length)return;const n=t[0];n&&this.uploadImgService.allowedMimeTypes.indexOf(n.type)>0?(this.uploadImage.emit({file:n}),this.isStripVisible&&setTimeout(()=>{window.scroll(0,0)}
1)):this.toastService.showErrorSingle(p.t.message.validImageMessageForEdit)}loadInputImage(t){t&&this.uploadImage.emit({sampleUrl:t})}onChangeVisibility(t){let n=document.querySelector(".bottom-upload");setTimeout(()=>{n&&(n.classList.contains("d-none")&&n.classList.remove("d-none"),t.visible&&scrollY>=360?(n.classList.contains("fixed-upload-btn")||(this.isStripVisible=!0),n.classList.add("fixed-upload-btn")):(n.classList.contains("fixed-upload-btn")&&(this.isStripVisible=!1),n.classList.remove("fixed-upload-btn")))},200)}validateCaptcha(t,n){t&&this.sampleUrl?(this.captcha=!1,this.loadInputImage(this.sampleUrl),this.sampleUrl=null):t&&n&&(this.captcha=!1,n.click())}showCaptcha(t=null){this.sampleUrl=t,this.env.isMacSafari?(this.captcha=!1,this.fileInput&&!this.sampleUrl?this.fileInput.nativeElement.click():this.loadInputImage(this.sampleUrl)):this.captcha=!0}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(W.e),e.Y36(Q.Kz),e.Y36(L.u),e.Y36(ce.k),e.Y36(N.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["editor-upload-panel"]],viewQuery:function(t,n){if(1&t&&e.Gf(Le,7),2&t){let o;e.iGM(o=e.CRH())&&(n.fileInput=o.first)}},inputs:{storyProps:"storyProps",area:"area",isStripVisible:"isStripVisible"},outputs:{uploadImage:"uploadImage"},decls:8,vars:7,consts:[[1,"wp-100","text-center"],["type","hidden","id","upload_page_slug",1,"d-none",3,"value"],[4,"ngIf"],["id","fileInput","name","fileInput","type","file",1,"custom-file-input","n-show","d-none",3,"accept","multiple","click","change"],["fileInput",""],[3,"show","validate"],["id","upload-btn",1,"upload-btn",3,"ngClass"],[1,"btn","btn-primary","mb-3","d-flex","align-items-center","justify-content-center",3,"ngClass","click"],[1,"upload-btn",3,"ngClass"],["id","upload-btn-strip","class","btn btn-primary mb-2",3,"ngClass","click",4,"ngIf"],["id","upload-btn-strip",1,"btn","btn-primary","mb-2",3,"ngClass","click"],[1,"text-semi","text-lg","lh-p3"],[1,"text-semi","text-lg","lh-p3","mt-9"],[1,"text-semi","text-lg","lh-p4"],["class","d-flex justify-content-center mt-9 sample-image-upload","id","sample_image_upload_container",4,"ngIf"],[1,"mt-4","pt-1","text-14","lh-2"],[1,"text-14","d-inline-flex","orange-text",2,"text-decoration","underline",3,"routerLink"],["id","sample_image_upload_container",1,"d-flex","justify-content-center","mt-9","sample-image-upload"],["class","pointer img-col",4,"ngFor","ngForOf"],[1,"pointer","img-col"],["type","image/webp",3,"srcset"],["loading","lazy","width","56px","height","56px","alt","Sample Image",1,"responsive","rounded-8","sample-image-upload",2,"max-height","56px",3,"src","id","click"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"div",0),e._UZ(1,"input",1),e.YNc(2,Ke,4,8,"ng-container",2),e.YNc(3,ze,3,4,"ng-container",2),e.YNc(4,et,12,6,"div",2),e.TgZ(5,"input",3,4),e.NdJ("click",function(){e.CHM(o);const l=e.MAs(6);return e.KtG(l.value="")})("change",function(l){return n.onFileUploaded(l.srcElement.files)}),e.qZA()(),e.TgZ(7,"google-captcha",5),e.NdJ("validate",function(l){e.CHM(o);const m=e.MAs(6);return e.KtG(n.validateCaptcha(l,m))}),e.qZA()}2&t&&(e.xp6(1),e.s9C("value",null==n.storyProps?null:n.storyProps.subType),e.xp6(1),e.Q6J("ngIf",n.env.isMobileView),e.xp6(1),e.Q6J("ngIf",!n.env.isMobileView),e.xp6(1),e.Q6J("ngIf",n.link&&n.link.urls),e.xp6(1),e.Q6J("accept",n.accept)("multiple",!1),e.xp6(2),e.Q6J("show",n.captcha))},dependencies:[g.mk,g.sg,g.O5,C.rH,ke,V.I],styles:[".n-show[_ngcontent-%COMP%]{position:absolute;z-index:-99}.btn-upload[_ngcontent-%COMP%]{width:100%;min-height:60px;font-size:20px!important}.p-50[_ngcontent-%COMP%]{padding:0 50px}@media (max-width: 576px){.p-50[_ngcontent-%COMP%]{padding:0 15px}}.centered[_ngcontent-%COMP%]{height:100vh;z-index:9999;position:fixed;top:50%;left:0%;right:0%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.centered[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter bold;font-size:32px;color:#2e2d2d;line-height:43.58px;margin-bottom:0}.centered[_ngcontent-%COMP%] .secondary-text[_ngcontent-%COMP%]{font-size:20px;font-family:Inter semibold;color:#2e2d2d;line-height:36px}.sample-image-upload[_ngcontent-%COMP%] .img-col[_ngcontent-%COMP%]{margin-left:6px;margin-right:6px}"]}),i})();var nt=d(7579);let we=(()=>
1{class i{constructor(){this.visibilityChangeEvent=new e.vpe,this.threshold=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],this.lastIntersect=0,this.subject$=new nt.x}ngOnInit(){this.createObserver()}isVisible(t){return new Promise(n=>{const o=new IntersectionObserver(([r])=>{n(1!=r.intersectionRatio),this.lastIntersect=r.intersectionRatio,o.disconnect()});o.observe(t)})}ngAfterViewInit(){this.element&&this.startObservingElements()}createObserver(){this.observer=new IntersectionObserver((o,r)=>{o.forEach(l=>{(o=>o.isIntersecting||o.intersectionRatio>=0)(l)&&this.subject$.next({entry:l,observer:r})})},{rootMargin:"0px",threshold:this.threshold})}startObservingElements(){this.observer&&(this.observer.observe(this.element),this.subject$.subscribe(({entry:t})=>(0,k.mG)(this,void 0,void 0,function*(){const o=t.target,r=yield this.isVisible(o);this.visibilityChangeEvent.emit({visible:r})})))}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=e.lG2({type:i,selectors:[["","observeVisibility",""]],inputs:{element:["obsIntersectTarget","element"]},outputs:{visibilityChangeEvent:"obsChange"}}),i})();function it(i,a){1&i&&e._UZ(0,"div",18)}const Pe=function(i){return{"d-none":i}};function ot(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"img-comparison-slider",19)(2,"picture",20),e._UZ(3,"source",21),e.ALo(4,"imgwebp"),e._UZ(5,"img",22),e.qZA(),e.TgZ(6,"picture",23),e._UZ(7,"source",21),e.ALo(8,"imgwebp"),e._UZ(9,"img",24),e.qZA(),e.O4$(),e.TgZ(10,"svg",25),e._UZ(11,"circle",26)(12,"path",27)(13,"path",28),e.qZA()(),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(11,Pe,t.inProgress)),e.xp6(2),e.s9C("srcset",e.lcZ(4,7,null==t.area?null:t.area.images[0].url)),e.xp6(2),e.Q6J("src",null==t.area?null:t.area.images[0].url,e.LSH)("alt",t.area.images[0].altText),e.xp6(2),e.s9C("srcset",e.lcZ(8,9,null==t.area?null:t.area.images[1].url)),e.xp6(2),e.Q6J("src",null==t.area?null:t.area.images[1].url,e.LSH)("alt",t.area.images[1].altText)}}const at=function(i,a){return{"float-lg-end":i,"float-lg-start":a}};function rt(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",29)(2,"picture"),e._UZ(3,"source",21),e.ALo(4,"imgwebp"),e._UZ(5,"img",30),e.qZA()(),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(7,Pe,t.inProgress)),e.xp6(2),e.s9C("srcset",e.lcZ(4,5,null==t.area?null:t.area.images[0].url)),e.xp6(2),e.Q6J("src",null==t.area?null:t.area.images[0].url,e.LSH)("alt",t.area.images[0].altText)("ngClass",e.WLB(9,at,t.even,!t.even))}}const st=function(i,a,t){return{"float-lg-end":i,"float-lg-start":a,"w-100":t}};function lt(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",31),e._UZ(2,"img",32),e.qZA(),e.BQk()),2&i){const t=e.oxw(2);e.xp6(2),e.Q6J("src",t.inputImgUrl,e.LSH)("ngClass",e.kEZ(2,st,t.even,!t.even,t.env.isMobileView&&(null==t.inputImage?null:t.inputImage.width)>=(null==t.inputImage?null:t.inputImage.height)))}}function ct(i,a){1&i&&(e.TgZ(0,"div",33)(1,"div",34)(2,"div",35),e._UZ(3,"div",36,37),e.qZA(),e.TgZ(5,"div",38)(6,"h3",39),e._uU(7,"Processing image..."),e.qZA(),e.TgZ(8,"span",40),e._uU(9,"Wait a few moments"),e.qZA()()()())}const dt=function(i,a,t){return{even:i,"mb-14":a,"pb-sm-0":t}},pt=function(i,a,t,n){return{"order-2":i,"order-1":a,"order-md-2":t,"order-md-1":n}},gt=function(i,a,t,n){return{"order-lg-1":i,"order-lg-2":a,"order-md-1":t,"order-md-2":n}};function mt(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"editor-upload-panel",13),e.NdJ("uploadImage",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.loadInputImage(o))}),e.qZA()(),e.YNc(6,it,1,0,"div",14),e.qZA(),e.TgZ(7,"div",15)(8,"div",16),e.YNc(9,ot,14,13,"ng-container",4),e.YNc(10,rt,6,12,"ng-container",4),e.YNc(11,lt,3,6,"ng-container",4),e.qZA(),e.YNc(12,ct,10,0,"div",17),e.qZA()()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.kEZ(12,dt,t.even,t.area.title,t.area.title)),e.xp6(1),e.Q6J("ngClass",e.VKq(16,Pe,(null==t.area?null:t.area.links)&&"stripBtn"==(null==t.area?null:t.area.links[0].type))),e.xp6(1),e.Q6J("ngClass",e.l5B(18,pt,t.even,!t.even,t.even,!t.even)),e.xp6(2),e.Q6J("area",t.area)("storyProps",t.storyProps)("isStripVisible",t.isStripVisible),e.xp6(1),e.Q6J("ngIf",t.inProgress),e.xp6(1),e.Q6J("ngClass",e.l5B(23,gt,t.even,t.even,t.even,t.even)),e.xp6(2),e.Q6J("ngIf",(null==t.area?null:t.area.images)&&2==(null==t.area?null:t.area.images.length)),e.xp6(1),e.Q6J("ngIf",(null==t.area?null:t.area.images)&&1==(null==t.area?null:t.area.images.length)),e.xp6(1),e.Q6J("ngIf",t.inProgress&&t.inputImgUrl),e.xp6(1),e.Q6J("ngIf",t.inProgress)}}function ut(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"remove-bg-editor",41),e.NdJ("close",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.close())}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("area",t.area)("storyProps",t.storyProps)("even",t.even)("remBgUrl",t.remBgUrl)("inputImage",t.inputImage)("oImage",t.inputImageSrc)}}const _t=function(i,a){return{"btn-upload text-semi":i,"btn-white text-primary btn-h48 me-2":a}};function ht(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",48),e.NdJ("click",function(){e.CHM(t),e.oxw(2);const o=e.MAs(4),r=e.oxw();return e.KtG(r.showCaptcha(o))}),e._uU(1),e.qZA()}if(2&i){const t=e.oxw(3);e.Q6J("ngClass",e.WLB(2,_t,!t.isStripVisible,t.isStripVisible)),e.xp6(1),e.Oqu(null==t.area||null==t.area.metadata?null:t.area.metadata.stripText)}}function vt(i,a){if(1&i&&(e.ynx(0),e.YNc(1,ht,2,5,"button",47),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.uploadImgService.inProgress)}}const xt=function(i){return{"d-flex":i}},ft=function(i){return{"bottom-upload":i}};function bt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",42)(1,"div",43),e.YNc(2,vt,2,1,"ng-container",4),e.qZA(),e.TgZ(3,"input",44,45),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}
1)("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onFileUploaded(o.srcElement.files))}),e.qZA(),e.TgZ(5,"google-captcha",46),e.NdJ("validate",function(o){e.CHM(t);const r=e.MAs(4),l=e.oxw();return e.KtG(l.validateCaptcha(o,r))}),e.qZA()()}if(2&i){const t=e.oxw();e.Q6J("ngClass",e.VKq(6,xt,2==t.step&&t.isStripVisible)),e.xp6(1),e.Q6J("ngClass",e.VKq(8,ft,(null==t.area?null:t.area.metadata)&&(null==t.area||null==t.area.metadata?null:t.area.metadata.isStrip)&&2==t.step)),e.xp6(1),e.Q6J("ngIf","image"==(null==t.area.metadata?null:t.area.metadata.uploadType)),e.xp6(1),e.Q6J("accept",t.accept)("multiple",!1),e.xp6(2),e.Q6J("show",t.captcha)}}let Ct=(()=>{class i{constructor(t,n,o,r,l){this.env=t,this.uploadImgService=n,this.removeBgService=o,this.toastService=r,this.gtmService=l,this.inputImageSrc=null,this.step=1,this.inProgress=!1,this.isStripVisible=!1,this.captcha=!1,this.uploadImgService.uploadFileFn=m=>(0,k.mG)(this,void 0,void 0,function*(){m&&this.loadInputImage({file:m})})}ngOnInit(){this.accept=this.uploadImgService.getFileAccept(this.area.metadata.editorType)}loadInputImage(t){var n;this.inProgress=!0;const o=new Date;let r;if(this.showProgress(),t){const l=JSON.parse(JSON.stringify(this.area.metadata));t.file?(l.file=t.file,this.inputImgUrl=URL.createObjectURL(t.file),r=p.t.gtm.eventname.uploadImageClick):t.sampleUrl&&(l.imageUrl=t.sampleUrl,this.inputImgUrl=t.sampleUrl,r=p.t.gtm.eventname.sampleImageClick);let m={eventName:r,itemName:this.storyProps.subType,itemType:null===(n=this.area.metadata)||void 0===n?void 0:n.toolName,itemValue:p.t.gtm.itemValue.init};this.gtmService.pushTag(m),this.uploadImgService.loadInputImage(l,(_,u=null)=>{this.inputImage=_,l.inputImage=_,u&&(l.file=u),this.getBgMask(l,o)})}}getBgMask(t,n){this.removeBgService.processRemBgImage(t,o=>{var r;if(o&&o.urls){this.remBgUrl=o.urls[0],this.step=2,this.inProgress=!1,o.inputImageSrc&&(this.inputImageSrc=o.inputImageSrc);let m={eventName:t.file?p.t.gtm.eventname.uploadImageClick:p.t.gtm.eventname.sampleImageClick,itemName:this.storyProps.subType,itemType:null===(r=this.area.metadata)||void 0===r?void 0:r.toolName,itemValue:p.t.gtm.itemValue.finish};this.gtmService.pushTag(m)}else o?.inQueue&&this.toastService.showError(o?.description||o?.message||p.t.message.somethingWrong),this.closeProgress(n)},o=>{this.toastService.showError(o?.description||o?.message||p.t.message.somethingWrong),this.clearInterval()})}showProgress(){setTimeout(()=>{const t=document.getElementById("myBar");if(t){let n=1;this.interValId=setInterval(()=>{this.inProgress?n<95&&(n++,t.style.width=n+"%"):clearInterval(this.interValId)},100)}},500)}clearInterval(){this.inProgress=!1,this.interValId&&clearInterval(this.interValId)}closeProgress(t){const n=new Date(t.getTime()+15e3);this.interValId=setInterval(()=>{new Date>=n&&this.clearInterval()},100)}getMaskFromRemote(t,n,o){this.removeBgService.getRemBGFromRemote(t,n).then(r=>{o(r)}).catch(r=>{this.toastService.showError(p.t.message.somethingWrong)})}close(){this.step=1,this.inputImage=null,this.inputImgUrl=null}onChangeVisibility(t){let n=document.querySelector(".bottom-upload");setTimeout(()=>{n&&(n.classList.contains("d-none")&&n.classList.remove("d-none"),t.visible&&scrollY>=360?(n.classList.contains("fixed-upload-btn")||(this.isStripVisible=!0),n.classList.add("fixed-upload-btn")):(n.classList.contains("fixed-upload-btn")&&(this.isStripVisible=!1),n.classList.remove("fixed-upload-btn")))},200)}onFileUploaded(t){if(!t.length)return;const n=t[0];n&&this.uploadImgService.allowedMimeTypes.indexOf(n.type)>0?(this.loadInputImage({file:n}),this.isStripVisible=!1,this.step=1,setTimeout(()=>{window.scroll(0,0)})):this.toastService.showErrorSingle(p.t.message.validImageMessageForEdit)}validateCaptcha(t,n){t&&n&&(this.captcha=!1,n.click())}showCaptcha(t){this.env.isMacSafari?t.click():this.captcha=!0}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(L.u),e.Y36(A.t),e.Y36(ce.k),e.Y36(K.J))},i.\u0275cmp=e.Xpm({type:i,selectors:[["story-upload-area"]],inputs:{area:"area",storyProps:"storyProps",even:"even"},decls:13,vars:6,consts:[[1,"w-100","position-relative","overflow-hidden","position-relative","pt-3","bg-white"],[1,"col-xl-8","col-lg-11","mx-auto","ps-3","pe-3","pt-4","position-relative",2,"z-index","1"],[1,"text-center","mx-auto","mt-14","mb-14"],[1,"text-xxl","text-dark","text-semi","lh-p1","mt-3"],[4,"ngIf"],[1,"left-shadow"],["class","wp-100 text-center d-none",3,"ngClass",4,"ngIf"],["observeVisibility","",3,"obsIntersectTarget","obsChange"],["nameuplod",""],[1,"container-fluid","p-ltrt","pb-5","pb-lg-0","position-relative",2,"max-width","1366px","z-index","1",3,"ngClass"],[1,"row","g-0","align-items-start","justify-content-between",3,"ngClass"],[1,"col-xl-5","col-lg-5","col-md-6","flex-column","mt-4","mt-lg-0","position-relative",2,"max-height","412px",3,"ngClass"],[1,"upload-box","d-flex","align-items-center","justify-content-center","mx-auto","ms-lg-auto","me-lg-10",2,"min-height","305px"],[2,"min-height","304px",3,"area","storyProps","isStripVisible","uploadImage"],["class","upload-box-overlay d-flex align-items-center justify-content-center mx-auto ms-lg-auto me-lg-10 position-absolute w-100 h-100",4,"ngIf"],[1,"col-xl-7","col-lg-6","col-md-5","mb
1-4","mb-lg-0","position-relative",3,"ngClass"],[1,"text-center","text-lg-start","overflow-hidden"],["class","d-flex align-items-center justify-content-center w-100 h-100 progress-wrapper border-radius-lg flex-column","style","max-width: 696px;min-height: 412px; position: absolute;",4,"ngIf"],[1,"upload-box-overlay","d-flex","align-items-center","justify-content-center","mx-auto","ms-lg-auto","me-lg-10","position-absolute","w-100","h-100"],[1,"slider-with-animated-handle",2,"max-height","412px","overflow","hidden","border-radius","24px",3,"ngClass"],["slot","first"],["type","image/webp",3,"srcset"],["width","696px","height","412px",1,"responsive",2,"border-radius","24px","max-height","412px",3,"src","alt"],["slot","second"],["width","696px","height","412px",1,"responsive",2,"border-radius","27px","max-height","412px",3,"src","alt"],["slot","handle","width","52","height","52","viewBox","0 0 52 52","fill","none","xmlns","http://www.w3.org/2000/svg",1,"handle-round"],["cx","26","cy","26","r","26","fill","white"],["d","M39.3147 26.0715L34.3647 21.1215C34.1825 20.9329 34.0817 20.6803 34.084 20.4181C34.0863 20.1559 34.1915 19.9051 34.3769 19.7197C34.5623 19.5342 34.8131 19.4291 35.0753 19.4268C35.3375 19.4245 35.5901 19.5253 35.7787 19.7075L41.4357 25.3645C41.6232 25.552 41.7285 25.8063 41.7285 26.0715C41.7285 26.3366 41.6232 26.5909 41.4357 26.7785L35.7787 32.4355C35.5901 32.6176 35.3375 32.7184 35.0753 32.7161C34.8131 32.7139 34.5623 32.6087 34.3769 32.4233C34.1915 32.2379 34.0863 31.9871 34.084 31.7249C34.0817 31.4627 34.1825 31.2101 34.3647 31.0215L39.3147 26.0715Z","fill","var(--handle-color)"],["d","M12.7536 26.0002L17.7036 30.9502C17.7991 31.0424 17.8753 31.1528 17.9277 31.2748C17.9801 31.3968 18.0077 31.528 18.0089 31.6608C18.01 31.7936 17.9847 31.9252 17.9345 32.0481C17.8842 32.171 17.8099 32.2827 17.716 32.3766C17.6221 32.4705 17.5105 32.5447 17.3876 32.595C17.2647 32.6453 17.133 32.6706 17.0002 32.6694C16.8674 32.6683 16.7362 32.6407 16.6142 32.5883C16.4922 32.5359 16.3819 32.4597 16.2896 32.3642L10.6326 26.7072C10.4452 26.5197 10.3398 26.2653 10.3398 26.0002C10.3398 25.735 10.4452 25.4807 10.6326 25.2932L16.2896 19.6362C16.4782 19.454 16.7308 19.3532 16.993 19.3555C17.2552 19.3578 17.506 19.463 17.6914 19.6484C17.8769 19.8338 17.982 20.0846 17.9843 20.3468C17.9866 20.609 17.8858 20.8616 17.7036 21.0502L12.7536 26.0002Z","fill","var(--handle-color)"],[1,"slider-with-animated-handle",3,"ngClass"],["loading","eager","width","520px","height","508px",1,"responsive","section-img",3,"src","alt","ngClass"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100","border-radius-lg","flex-column","progress-wrapper-back",2,"max-width","696px","min-height","412px","position","absolute"],["loading","","width","696px","height","412px",1,"section-rmbg",3,"src","ngClass"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100","progress-wrapper","border-radius-lg","flex-column",2,"max-width","696px","min-height","412px","position","absolute"],[1,"progress-container",2,"max-width","230px"],[1,"progress-bar-container","w-100","border-radius-8","overflow-h"],["id","myBar",1,"progress-bar","border-radius-8"],["myBar",""],[1,"d-flex","align-items-center","justify-content-center","w-100","flex-column","mt-4"],[1,"text-xxl","grey-700","text-bold","mb-2","lh-p2"],[1,"text-14","grey-700"],[3,"area","storyProps","even","remBgUrl","inputImage","oImage","close"],[1,"wp-100","text-center","d-none",3,"ngClass"],[1,"upload-btn",3,"ngClass"],["id","fileInput","name","fileInput","type","file",1,"custom-file-input","n-show","d-none",3,"accept","multiple","click","change"],["file",""],[3,"show","validate"],["id","upload-btn-strip","class","btn btn-primary mb-2",3,"ngClass","click",4,"ngIf"],["id","upload-btn-strip",1,"btn","btn-primary","mb-2",3,"ngClass","click"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e._uU(4),e.qZA(),e.TgZ(5,"p",3),e._uU(6),e.qZA()()(),e.YNc(7,mt,13,28,"ng-container",4),e.YNc(8,ut,2,6,"ng-container",4),e._UZ(9,"div",5),e.YNc(10,bt,6,10,"div",6),e.qZA(),e.TgZ(11,"div",7,8),e.NdJ("obsChange",function(r){return n.onChangeVisibility(r)}),e.qZA()),2&t){const o=e.MAs(12);e.xp6(4),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.subTitle),e.xp6(1),e.Q6J("ngIf",1==n.step),e.xp6(1),e.Q6J("ngIf",2==n.step),e.xp6(2),e.Q6J("ngIf",2==n.step),e.xp6(1),e.Q6J("obsIntersectTarget",o)}},dependencies:[g.mk,g.O5,Ce,ke,tt,we,V.I],styles:['.progress-container[_ngcontent-%COMP%]{width:100%;overflow:hidden}.progress-bar-container[_ngcontent-%COMP%]{position:relative;height:18px}.progress-bar-container[_ngcontent-%COMP%]:before{position:absolute;border-radius:8px;content:"";padding:1.6px;border:0px;background:linear-gradient(to right,#ffc866 0%,#c850c0 33%,#613df5 66%,#b09df9 100%);-webkit-mask:linear-gradient(to right,#ffc866 0%,#c850c0 33%,#613df5 66%,#b09df9 100%) content-box,linear-gradient(to right,#ffc866 0%,#c850c0 33%,#613df5 66%,#b09df9 100%);-webkit-mask-composite:xor;mask-composite:exclude;width:inherit;height:18px;overflow:hidden}
1.progress-bar[_ngcontent-%COMP%]{height:18px;width:0;background:linear-gradient(to right,#fff1bf 0%,#ec458d 49%,#474ed7 100%);text-align:center;transition:width .1s ease;border-radius:8px;overflow:hidden;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.left-shadow[_ngcontent-%COMP%]{border-radius:315px;background:linear-gradient(217deg,rgba(255,123,202,.45) 12.02%,rgba(255,197,111,.36) 85.85%);filter:blur(100px);position:absolute;right:-80px;top:-80px;width:315px;height:315px}.progress-wrapper[_ngcontent-%COMP%]{border:1px solid var(--colors-NEW-GREY-Opaque-100, #E7E5E5);background:rgba(248,249,249,.8);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);top:0px;left:0px}.upload-box-overlay[_ngcontent-%COMP%]{left:0px;top:0px;background:transparent;z-index:1}.section-rmbg[_ngcontent-%COMP%]{object-fit:contain;max-height:100%}.progress-wrapper-back[_ngcontent-%COMP%]{border:1px solid var(--colors-NEW-GREY-Opaque-100, #E7E5E5);background:rgba(248,249,249,.8);top:0px;left:0px;position:relative}']}),i})();var wt=d(4203);const yt=["videoElem"];function Tt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.playVideo())}),e._UZ(1,"pi",12),e.qZA()}}let Pt=(()=>{class i{constructor(t){this.modalService=t,this.isVideoPlaying=!1}ngOnInit(){}playVideo(){if(!this.isVideoPlaying){let t=this.area.links[0].url.split("=")[1];const n=this.modalService.open("VideoPreviewComponent",{centered:!0,size:"xl",backdropClass:"bg-dark-blur",windowClass:"youtubevideo"});n.componentInstance.videoId=t,n.result.then(o=>{}).catch(o=>{})}}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(Q.FF))},i.\u0275cmp=e.Xpm({type:i,selectors:[["story-video-tutorial-area"]],viewQuery:function(t,n){if(1&t&&e.Gf(yt,5),2&t){let o;e.iGM(o=e.CRH())&&(n.videoElem=o.first)}},inputs:{area:"area"},decls:12,vars:6,consts:[[1,"area","w-100","bg-white"],[1,"container-fluid","area-inner","pad-md"],[1,"row","g-0"],[1,"mx-auto","p-0",2,"width","auto"],[1,"text-center",2,"max-width","760px"],[1,"text-32","lh-h12","text-dark","mb-0"],[1,"mt-14","mb-13","video-preview"],["loading","lazy","noloop","","width","768px","height","480px",1,"responsive",2,"max-width","768px","border-radius","16px",3,"src","alt"],["videoElem",""],[1,"btn-play","position-absolute","h-100","w-100","d-flex","align-items-center","justify-content-center"],["class","pointer",3,"click",4,"ngIf"],[1,"pointer",3,"click"],["name","playtutorialvideo",1,"f-120"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h2",5),e._uU(6),e.qZA()(),e.TgZ(7,"div",6),e._UZ(8,"img",7,8),e.TgZ(10,"div",9),e.YNc(11,Tt,2,0,"a",10),e.qZA()()()()()()),2&t&&(e.xp6(6),e.Oqu(n.area.title),e.xp6(2),e.Q6J("src",null==n.area||null==n.area.metadata?null:n.area.metadata.thumbUrl,e.LSH)("alt",null==n.area||null==n.area.metadata?null:n.area.metadata.altText),e.xp6(2),e.Udp("opacity",n.isVideoPlaying?0:1),e.xp6(1),e.Q6J("ngIf",!n.isVideoPlaying))},dependencies:[g.O5,te.G]}),i})();var At=d(3368),Ae=d(3867);const It=["carousel"];function Zt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"li",9)(1,"a",10),e.NdJ("click",function(){const r=e.CHM(t).index,l=e.oxw();return e.KtG(l.goToSlide("ngb-slide-"+r))}),e._uU(2),e.qZA()()}if(2&i){const t=a.$implicit,n=a.index,o=e.oxw();e.Q6J("ngClass",o.ActiveId=="ngb-slide-"+n?"active":""),e.xp6(2),e.Oqu(t.text)}}function kt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",14)(1,"img",15),e.NdJ("mouseover",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.togglePaused(!0))})("mouseout",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.togglePaused(!1))}),e.qZA()()}if(2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("alt",t.images[0].altText)("src",t.images[0].url,e.LSH)}}const Me=function(i){return{"mb-14":i}};function St(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"h3",12),e.NdJ("mouseover",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.togglePaused(!0))})("mouseout",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.togglePaused(!1))}),e._uU(1),e.qZA(),e.YNc(2,kt,2,2,"div",13)}if(2&i){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(3,Me,!(n.area.metadata&&1==n.area.metadata.variant))),e.xp6(1),e.Oqu(t.textBelow),e.xp6(1),e.Q6J("ngIf",t.images&&t.images.length>0)}}function Mt(i,a){1&i&&e.YNc(0,St,3,5,"ng-template",11),2&i&&e.MGl("id","ngb-slide-",a.index,"")}const Ot=function(i){return{background:i}},Ut=function(i){return{"area-inner":i}};let Jt=(()=>{class i{constructor(){this.imgUrl="",this.altText="",this.ActiveId="ngb-slide-0",this.timeIntervel=2e3,this.tools=Ae.fS.ProductShowcaseAnimatedBanner.nav.items,this.tabcount=new Array(Math.ceil(this.tools.length/2))}ngOnInit(){if(this.area.links&&this.area.links.length>0&&this.area.links[0].images&&this.area.links[0].images.length>0){let t=this.area.links[0];this.imgUrl=t?.images[0].url,this.altText=t?.images[0].altText}else this.imgUrl=this.area.img1}togglePaused(t=!1){t?this.carousel.pause():this.carousel.cycle()}onSlide(t){this.ActiveId=t.current}goToSlide(t){this.carousel.select(t)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["story-animated-banner-area"]],viewQuery:function(t,n){if(1&t&&e.Gf(It,7),2&t){let o;e.iGM(o=e.CRH())&&(n.carousel=o.first)}},inputs:{area:"area"},decls:10,vars:15,consts:[[1,"mx-auto","padding-top-bottom100",3,"ngStyle","ngClass"],[1,"text-32","text-dark","text-bold","text-center","lh-12"],[1,"pt-14","position-relative","animatedBannerArea"],[1,"tab-div-show","mb-4",3,"ngClass","mouseover","mouseout"],[1,"list-unstyled","carousel-indicators-btn","p-1","pe-0"],["class","p-0 pointer me-2 d-flex align-items-center text-semi",3,"ngClass",4,"ngFor","ngForOf"],[2,"z-index","1",3,"interval","pauseOnHover","pauseOnFocus","slide"],["carousel",""],[4,"ngFor","ngForOf"],[1,"p-0","pointer","me-2","d-flex","align-items-center","text-semi",3,"ngClass"],["data-toggle","tab",1,"d-flex","align-items-center","justify-content-center","w-100","h-100","pl-12","pr-12",3,"click"],["ngbSlide","",3,"id"],[1,"text-24","text-dark","text-semi","text-center","mx-auto","mb-4","lh-5",2,"width","fit-content",3,"ngClass","mouseover","mouseout"],["class","",4,"ngIf"],[1,""],["loading","lazy",1,"responsive","mx-auto",3,"alt","src","mouseover","mouseout"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2),e.qZA(),e.TgZ(3,"div",2)(4,"div",3),e.NdJ("mouseover",function(){return n.togglePaused(!0)})("mouseout",function(){return n.togglePaused(!1)}),e.TgZ(5,"ul",4),e.YNc(6,Zt,3,2,"li",5),e.qZA()(),e.TgZ(7,"ngb-carousel",6,7),e.NdJ("slide",function(r){return n.onSlide(r)}),e.YNc(9,Mt,1,1,null,8),e.qZA()()()),2&t&&(e.Q6J("ngStyle",e.VKq(9,Ot,n.area.bgColors))("ngClass",e.VKq(11,Ut,!(n.area.metadata&&1==n.area.metadata.variant))),e.xp6(2),e.Oqu(n.area.title),e.xp6(2),e.Q6J("ngClass",e.VKq(13,Me,!(n.area.metadata&&1==n.area.metadata.variant))),e.xp6(2),e.Q6J("ngForOf",n.area.links),e.xp6(1),e.Q6J("interval",n.timeIntervel)("pauseOnHover",!1)("pauseOnFocus",!1),e.xp6(2),e.Q6J("ngForOf",n.area.links))},dependencies:[g.mk,g.sg,g.O5,g.PC,Q.uo,Q.xl],styles:["@media (max-width: 1081px){.tab-div-show[_ngcontent-%COMP%] .carousel-indicators-btn[_ngcontent-%COMP%]{flex-wrap:wrap;height:auto!important;width:-moz-fit-content!important;width:fit-content!important}.tab-div-show[_ngcontent-%COMP%] .carousel-indicators-btn[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:auto!important}.tab-div-show[_ngcontent-%COMP%] .carousel-indicators-btn[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-left:29px!important;padding-right:29px!important;width:auto!important}}@media (min-width: 1082px){.mobile-div-show[_ngcontent-%COMP%]{display:none}.tab-div-show[_ngcontent-%COMP%]{display:block}}"]}),i})();var oe=d(6969),Ie=d(4438);const Qt=function(i,a){return{"btn-none":i,"d-none":a}};function Nt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3),r=e.MAs(22);return e.KtG(o.uploadFile(r))}),e._uU(1),e.qZA()}if(2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.Q6J("ngClass",e.WLB(2,Qt,"get-app"==t.type,("get-app"==t.type||"image"==t.type)&&n.env.isMobileView)),e.xp6(1),e.Oqu(null==t?null:t.text)}}function qt(i,a){if(1&i&&(e.TgZ(0,"div",21),e.YNc(1,Nt,2,5,"button",22),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","image"!=t.type)}}const Ft=function(i){return{"bottom-upload":i}};function Vt(i,a){if(1&i&&(e.TgZ(0,"div",20),e.YNc(1,qt,2,1,"div",11),e.qZA()),2&i){const t=e.oxw();e.Q6J("ngClass",e.VKq(2,Ft,t.area.desc1)),e.xp6(1),e.Q6J("ngForOf",null==t.area?null:t.area.links)}}function Bt(i,a){if(1&i){const t=e.EpF();
1e.TgZ(0,"div",26)(1,"picture"),e._UZ(2,"source",27),e.ALo(3,"imgwebp"),e.TgZ(4,"img",28),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.loadInputImage(r.url))}),e.qZA()()()}if(2&i){const t=a.$implicit;e.xp6(2),e.s9C("srcset",e.lcZ(3,2,t.thumbUrl||t.url)),e.xp6(2),e.Q6J("src",t.thumbUrl||t.url,e.LSH)}}function Et(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"span",24),e._uU(2),e.qZA(),e.YNc(3,Bt,5,4,"div",25),e.BQk()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngClass",n.env.isMobileView?"text-dark":"grey-800"),e.xp6(1),e.Oqu(t.text),e.xp6(1),e.Q6J("ngForOf",null==t?null:t.urls)}}function Yt(i,a){if(1&i&&(e.TgZ(0,"div",21),e.YNc(1,Et,4,3,"ng-container",17),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",null==t?null:t.urls)}}function Ht(i,a){if(1&i&&e._UZ(0,"img",29),2&i){const t=e.oxw();e.Q6J("alt",t.getAltText(t.area))("src",t.getImgUrl(t.area),e.LSH)}}function Lt(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"video",30),e._UZ(2,"source",31)(3,"source",32),e.qZA(),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("muted","muted"),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"mp4"),e.LSH),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"webm"),e.LSH)}}const jt=function(i){return{background:i}},Kt=function(i){return{"bg-grey pb-5":i}},Dt=function(i){return{"pe-3":i}},Gt=function(i){return{"mt-36":i}},$t=function(i){return{"pt-5 pb-5 min-height-621":i}};let zt=(()=>{class i{constructor(t,n,o,r,l){this.env=t,this.storyPageService=n,this.aiUploadImageService=o,this.uploadImageService=r,this.createPopupService=l,this.isVideo=!1,this.uploadImageService.uploadFileFn=m=>(0,k.mG)(this,void 0,void 0,function*(){m&&this.uploadImageFile(m)})}ngOnInit(){this.area&&(this.metadata=this.area.metadata)}uploadFile(t){this.env.isMobileView||this.metadata.toolName?this.env.isMobileView?this.env.openPlayStoreUrl():t.click():this.createPopupService.getTheAppPopup()}deepLinkData(){const[t,n]=this.getVersion();let o={os:n,osVersion:t,screenSize:window.screen.width+":"+window.screen.height,deepLink:this.area.metadata.deepLink};n&&this.storyPageService.postDeepLink(o,r=>{},r=>{})}getAltText(t){return t&&t.images&&t.images[0]?t.images[0].altText:""}getImgUrl(t){return t&&t.images&&t.images[0]?t.images[0].url:t.img1}getVideoUrl(t,n){if("mp4"==n){const o=t&&t.images&&t.images[0]?t.images[0].url:t.img1;return o&&o.replace("webm","mp4")}return t&&t.images&&t.images[0]?t.images[0].url:t.img1}onFileUploaded(t){t.length&&this.uploadImageFile(t[0])}uploadImageFile(t){const n=JSON.parse(JSON.stringify(this.area.metadata));n.file=t,this.uploadImageService.loadInputImageOld(n).then(o=>{})}loadInputImage(t){if(this.env.isMobileView)this.env.openPlayStoreUrl();else{const n=JSON.parse(JSON.stringify(this.area.metadata));n.imageUrl=t,this.uploadImageService.loadInputImageOld(n).then(o=>{})}}onChangeVisibility(t){let n=document.querySelector(".bottom-upload");n&&(n.classList.contains("d-none")&&n.classList.remove("d-none"),t.visible&&scrollY>=360?n.classList.contains("fixed-upload-btn")||n.classList.add("fixed-upload-btn"):n.classList.contains("fixed-upload-btn")&&n.classList.remove("fixed-upload-btn"))}loadExternalScript(t,n){return new Promise((o,r)=>{if(document.getElementById(t))o({script:t,loaded:!0,status:"Already Loaded"});else{let m=document.createElement("script");m.type="text/javascript",m.src=n,m.onload=()=>{o({script:t,loaded:!0,status:"Loaded"})},m.onerror=_=>o({script:t,loaded:!1,status:"Loaded"}),document.getElementsByTagName("head")[0].appendChild(m)}})}getVersion(){const t=navigator.userAgent;if(/(iPhone)/i.test(t)){const n=t.match(/OS [\d_]+/i)[0].substr(3).split("_").map(r=>parseInt(r));return[n.length&&n.join("."),"ios"]}return/(Macintosh)/i.test(t)||/(iPad)/i.test(t)?["0","ios"]:-1!=t.indexOf("Android")?[t.match(/Android\s+([\d\.]+)/)[1],"android"]:["",""]}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(T.d),e.Y36(oe.V),e.Y36(L.u),e.Y36(Ie.A))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-banner-header"]],inputs:{area:"area",storyProps:"storyProps"},decls:23,vars:25,consts:[[1,"topBanner","d-flex","align-items-center","position-relative",3,"ngStyle","ngClass"],[1,"row","g-0","pt-0","overflow-hidden","w-100","area-inner","mx-auto","pe-0","pb-0",3,"ngClass"],[1,"col-lg-6","col-xl-6","p-0","align-self-center","order-1"],[1,"text-center","text-lg-start"],[1,"mb-13"],[1,"",3,"ngClass"],[1,"pt-4","pt-lg-0",3,"ngClass"],[1,"mt-9"],[1,"text-xxl","lh-p1","text-regular",3,"ngClass"],["class","upload-btn d-flex",3,"ngClass",4,"ngIf"],[1,"d-flex","w-100","flex-column"],["class","text-left",4,"ngFor","ngForOf"],["observeVisibility","",3,"obsIntersectTarget","obsChange"],["nameuplod",""],[1,"col-lg-6","col-xl-6","p-0","order-2",3,"ngClass"],[1,"pt-4","pt-lg-0","text-center"],["class","responsive","height","600px","width","600px",3,"alt","src",4,"ngIf"],[4,"ngIf"],["id","fileInputId","name","fileInputId","type","file",1,"custom-file-input","d-none",3,"accept","change","click"],["file",""],[1,"upload-btn","d-flex",3,"ngClass"],[1,"text-left"],["class","btn btn-primary btn-h48 me-2",3,"ngClass","click",4,"ngIf"],[1,"btn","btn-primary","btn-h48","me-2",3,"ngClass","click"],[1,"text-center","text-lg-start","text-semi","text-lg","mt-13","mb-2","d-block","w-100","text-center","text-lg-start",3,"ngClass"],["class","mr-9 pointer bottom-upload d-inline-flex",4,"ngFor","ngForOf"],[1,"mr-9","pointer","bottom-upload","d-inline-flex"],["type","image/webp",3,"srcset"],["loading","eager","width","56px","height","56px","alt","Sample Image",1,"rounded-8","sample-image-upload",2,"max-height","56px",3,"src","click"],["height","600px","width","600px",1,"responsive",3,"alt","src"],["width","600px","height","600px","auto
1play","","loop","",1,"video-box","p-0","rounded-24",2,"max-width","520px","max-height","520px",3,"muted"],["type","video/mp4",3,"src"],["type","video/webm",3,"src"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"h1",6),e._uU(7),e.qZA()(),e.TgZ(8,"div",7)(9,"p",8),e._uU(10),e.qZA()()(),e.TgZ(11,"div"),e.YNc(12,Vt,2,4,"div",9),e.qZA(),e.TgZ(13,"div",10),e.YNc(14,Yt,2,1,"div",11),e.qZA(),e.TgZ(15,"div",12,13),e.NdJ("obsChange",function(l){return n.onChangeVisibility(l)}),e.qZA()()(),e.TgZ(17,"div",14)(18,"div",15),e.YNc(19,Ht,1,2,"img",16),e.YNc(20,Lt,4,3,"ng-container",17),e.qZA()()()(),e.TgZ(21,"input",18,19),e.NdJ("change",function(l){return n.onFileUploaded(l.srcElement.files)})("click",function(){e.CHM(o);const l=e.MAs(22);return e.KtG(l.value="")}),e.qZA()}if(2&t){const o=e.MAs(16);e.Q6J("ngStyle",e.VKq(15,jt,n.area.bgColors))("ngClass",e.VKq(17,Kt,n.env.isMobileView)),e.xp6(1),e.Q6J("ngClass",e.VKq(19,Dt,n.env.isMobileView)),e.xp6(4),e.Q6J("ngClass",e.VKq(21,Gt,n.env.isMobileView)),e.xp6(1),e.Q6J("ngClass",n.env.isMobileView?"text-32 lh-inherit text-dark":"text-48 grey-800"),e.xp6(1),e.hij(" ",n.area.title," "),e.xp6(2),e.Q6J("ngClass",n.env.isMobileView?"text-dark":"grey-800"),e.xp6(1),e.hij("",n.area.desc1," "),e.xp6(2),e.Q6J("ngIf",n.area.title&&n.area.desc1),e.xp6(2),e.Q6J("ngForOf",null==n.area?null:n.area.links),e.xp6(1),e.Q6J("obsIntersectTarget",o),e.xp6(2),e.Q6J("ngClass",e.VKq(23,$t,n.isVideo)),e.xp6(2),e.Q6J("ngIf",!n.isVideo),e.xp6(1),e.Q6J("ngIf",n.isVideo),e.xp6(1),e.Q6J("accept",n.aiUploadImageService.fileImageAccept)}},dependencies:[g.mk,g.sg,g.O5,g.PC,we,V.I],styles:[".btnAiBanner[_ngcontent-%COMP%]{background:rgba(255,255,255,.25);height:48px;font-size:16px;color:#fff!important;border-radius:12px}.btnAiBanner[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.35)}.fixed-upload-btn[_ngcontent-%COMP%]{justify-content:center}.fixed-upload-btn[_ngcontent-%COMP%] .btn-none[_ngcontent-%COMP%]{display:none}.gradientHeading[_ngcontent-%COMP%]{background:linear-gradient(90deg,#BC9BFF 16.37%,#FFE7AB 78.43%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}@media (max-width: 980px){.upload-btn[_ngcontent-%COMP%]{justify-content:center}}@media (max-width: 576px){.upload-btn[_ngcontent-%COMP%]{justify-content:center}.upload-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:0!important}}.max-height-621[_ngcontent-%COMP%]{min-height:621px}"]}),i})();function Rt(i,a){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"div",10),e._uU(3),e.qZA(),e.TgZ(4,"h3",11),e._uU(5),e.qZA()(),e.TgZ(6,"p",12),e._uU(7),e.qZA()()),2&i){const t=a.$implicit;e.xp6(3),e.hij(" ",t.type," "),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Oqu(t.desc)}}const Xt=function(i){return{background:i}},Wt=function(i){return{"text-center":i}};let en=(()=>{class i{constructor(t){this.env=t}getImgUrl(t){return t&&t.images&&t.images[0]?t.images[0].url:t.img1}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-tutorial-area"]],inputs:{area:"area",slug:"slug"},decls:9,vars:11,consts:[[1,"d-flex","align-items-center",3,"ngStyle"],[1,"row","g-0","overflow-hidden","w-100","area-inner","mx-auto","area-inner",3,"ngClass"],[1,"col-lg-6","col-xl-6","p-0","align-self-center","order-1"],["height","520px","width","520px",1,"responsive",2,"max-width","520px",3,"src","alt"],[1,"col-lg-6","col-xl-6","p-0","order-2"],[1,"row","g-0"],[1,"text-32","text-bold","text-dark","mb-3","mt-5","mt-lg-0","lh-h12",3,"ngClass"],["class","col-12 col-sm-12 col-xl-11 col-lg-11 col-md-11 mt-32",4,"ngFor","ngForOf"],[1,"col-12","col-sm-12","col-xl-11","col-lg-11","col-md-11","mt-32"],[1,"d-flex","align-items-center"],[1,"aiPortraitIconBg","text-bold","d-flex","align-items-center","justify-content-center"],[1,"text-24","text-dark","text-bold","ml-10","lh-h5","mb-0"],[1,"text-lg","text-dark","lh-p2",2,"margin-left","77px"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"img",3),e.qZA(),e.TgZ(4,"div",4)(5,"div",5)(6,"h2",6),e._uU(7),e.qZA(),e.YNc(8,Rt,8,3,"div",7),e.qZA()()()()),2&t&&(e.Q6J("ngStyle",e.VKq(7,Xt,n.area.bgColors)),e.xp6(1),e.Q6J("ngClass",n.env.isMobileView?"mt-10":"mt-13"),e.xp6(2),e.Q6J("src",n.getImgUrl(n.area),e.LSH)("alt",null==n.area||null==n.area.metadata?null:n.area.metadata.altText),e.xp6(3),e.Q6J("ngClass",e.VKq(9,Wt,n.env.isMobileView)),e.xp6(1),e.Oqu(n.area.title),e.xp6(1),e.Q6J("ngForOf",n.area.steps))},dependencies:[g.mk,g.sg,g.PC]}),i})();
1var xe=d(2260);const Oe=function(i){return{"img-active":i}};function tn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",18),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSelect(r))}),e._UZ(1,"img",19),e.TgZ(2,"div",20),e._uU(3),e.qZA()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(4,Oe,t.url===n.selectedImage.url)),e.xp6(1),e.s9C("src",t.clickImage,e.LSH),e.xp6(1),e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary":"text-dark"),e.xp6(1),e.Oqu(t.text)}}function nn(i,a){if(1&i&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.Q6J("routerLink",n.getAction(null==t?null:t.url)),e.xp6(1),e.hij(" ",t.text," ")}}function on(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",26),e._uU(2),e.qZA(),e.TgZ(3,"input",27,28),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")})("change",function(o){e.CHM(t);const r=e.oxw().$implicit,l=e.oxw(2);return e.KtG(l.onFileUploaded(o.srcElement.files,r))})("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(),n=t.index,o=t.$implicit,r=e.oxw(2);e.xp6(1),e.s9C("for",r.uniqueId+n),e.xp6(1),e.Oqu(o.text),e.xp6(1),e.s9C("id",r.uniqueId+n),e.s9C("name",r.uniqueId+n),e.Q6J("accept",r.fileUploadAccept)}}function an(i,a){if(1&i&&(e.ynx(0),e.YNc(1,nn,2,2,"a",23),e.YNc(2,on,5,5,"ng-container",24),e.BQk()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.url),e.xp6(1),e.Q6J("ngIf",!t.url)}}function rn(i,a){if(1&i&&(e.TgZ(0,"div",21),e.YNc(1,an,3,2,"ng-container",22),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.area.links)}}function sn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",29),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSelect(r))}),e._UZ(1,"img",30),e.TgZ(2,"div",31),e._uU(3),e.qZA()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(5,Oe,t.url===n.selectedImage.url)),e.xp6(1),e.s9C("src",t.clickImage,e.LSH),e.Q6J("alt",t.altText),e.xp6(1),e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary":"text-dark"),e.xp6(1),e.Oqu(t.text)}}function ln(i,a){if(1&i&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.Q6J("routerLink",n.getAction(null==t?null:t.url)),e.xp6(1),e.hij(" ",t.text," ")}}function cn(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",26),e._uU(2),e.qZA(),e.TgZ(3,"input",27,28),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")})("change",function(o){e.CHM(t);const r=e.oxw().$implicit,l=e.oxw(2);return e.KtG(l.onFileUploaded(o.srcElement.files,r))})("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(),n=t.index,o=t.$implicit,r=e.oxw(2);e.xp6(1),e.s9C("for",r.uniqueId+n),e.xp6(1),e.Oqu(o.text),e.xp6(1),e.s9C("id",r.uniqueId+n),e.s9C("name",r.uniqueId+n),e.Q6J("accept",r.fileUploadAccept)}}function dn(i,a){if(1&i&&(e.ynx(0),e.YNc(1,ln,2,2,"a",23),e.YNc(2,cn,5,5,"ng-container",24),e.BQk()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.url),e.xp6(1),e.Q6J("ngIf",!t.url)}}function pn(i,a){if(1&i&&(e.TgZ(0,"div",32),e.YNc(1,dn,3,2,"ng-container",22),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.area.links)}}const gn=function(i){return{"mt-4":i}},Ue=function(i){return{"d-none":i}};let mn=(()=>{class i{constructor(t,n){this.env=t,this.aiUploadImageService=n,this.params={},this.altText="",this.imgurl="",this.fileUploadAccept="image/*"}ngOnInit(){this.onImageSelect(this.area.images[0])}onImageSelect(t){this.selectedImage=t}getAction(t){return[`${t.split("?")[0]}`]}onFileUploaded(t,n){let o=(0,xe.qY)();if(this.env.isMobileView){if("iOS"===o.os||"Mac OS"==o.os)return window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone&ppid=6522dc67-da0b-440d-9337-e1522adab0ee",!1;if("Android OS"===o.os)return window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en",!1}if(!t.length)return;const r=t[0];this.params={from:this.slug,tab:n.toolName,subTool:n?.subTool},this.aiUploadImageService.aiUploadImage(r,this.params).then(l=>{})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(oe.V))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-preview-area"]],inputs:{area:"area",slug:"slug"},decls:20,vars:18,consts:[[1,"area","bg-white","w-100"],[1,"container-fluid","bg-white","w-100","area-inner",3,"ngClass"],[1,"row","g-0"],[1,"col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],[1,"container-fluid","p-0"],[1,"row","g-0","align-items-center","justify-content-center"],[1,"col-md-6","col-xl-6","col-lg-6","ms-0","ms-lg-6","order-2","order-lg-1",3,"ngClass"],["loading","lazy","width","520px","height","520px",1,"responsive","rounded-36",2,"max-width","520px",3,"src","alt"],[1,"d-flex","text-center","mt-4",2,"column-gap","16px",3,"ngClass"],["class","pointer",3,"ngClass","click",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"col-md-6","col-xl-6","col-lg-6","order-1","order-lg-2"],[1,"row","g-0","align-items-center"],[1,"title","text-bold","lh-h12"],[1,"text-lg","text-dark","lh-p2","mt-3"],[1,"d-flex","text-center","mt-5",2,"column-gap","24px",3,"ngClass"],["class","pointer previewSmallImg",3,"ngClass","click",4,"ngFor","ngForOf"],["class","mt-5",4,"ngIf"],[1,"pointer",3,"ngClass","click"],["loading","lazy","width","160px","height","160px",1,"responsive","rounded-24","previewSmallImg",3,"src"],[1,"text-lg","text-semi","mt-2",3,"ngClass"],[1,"mt-4"],[4,"ngFor","ngForOf"],["class","btn btn-primary btn-h48 mr-8","routerLinkActive","router-link-active",3,"routerLink",4,"ngIf"],[4,"ngIf"],["routerLinkActive","router-link-active",1,"btn","btn-primary","btn-h48","mr-8",3,"routerLink"],[1,"btn","btn-primary","btn-h48","mr-8",3,"for"],["type","file",1,"custom-file-input","d-none",3,"id","name","accept","click","change"],["file",""],[1,"pointer","previewSmallImg",3,"ngClass","click"],["loading","lazy","width","160px","height","160px",1,"responsive","rounded-24",3,"src","alt"],[1,"text-lg","text-semi","pt-2",3,"ngClass"],[1,"mt-5"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),e._UZ(7,"img",7),e.TgZ(8,"div",8),e.YNc(9,tn,4,6,"div",9),e.qZA(),e.YNc(10,rn,2,1,"div",10),e.qZA(),e.TgZ(11,"div",11)(12,"div",12)(13,"h2",13),e._uU(14),e.qZA(),e.TgZ(15,"p",14),e._uU(16),e.qZA(),e.TgZ(17,"div",15),e.YNc(18,sn,4,7,"div",16),e.qZA()(),e.YNc(19,pn,2,1,"div",17),e.qZA()()()()()()()),2&t&&(e.xp6(1),e.Q6J("ngClass",n.env.isMobileView?"mt-10":"mt-13"),e.xp6(5),e.Q6J("ngClass",e.VKq(12,gn,n.env.isMobileView)),e.xp6(1),e.Q6J("src",n.selectedImage.url,e.LSH)("alt",n.selectedImage.altText),e.xp6(1),e.Q6J("ngClass",e.VKq(14,Ue,!n.env.isMobileView)),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(1),e.Q6J("ngIf",n.area.links&&n.env.isMobileView),e.xp6(4),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.desc1),e.xp6(1),e.Q6J("ngClass",e.VKq(16,Ue,n.env.isMobileView)),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(1),e.Q6J("ngIf",n.area.links&&!n.env.isMobileView))},dependencies:[g.mk,g.sg,g.O5,C.rH,C.Od],styles:[".previewSmallImg[_ngcontent-%COMP%]{max-width:160px;transition:all .3s ease}.previewSmallImg[_ngcontent-%COMP%]:hover{transform:translateY(-8px)}@media (max-width: 576px){.previewSmallImg[_ngcontent-%COMP%]:hover{transform:none}}"]}),i})();function un(i,a){1&i&&e._UZ(0,"pi",21)}const Je=function(i){return{"d-none":i}},Qe=function(i){return{"tab-active":i}};function _n(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",16)(1,"div",17),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(),m=e.MAs(20);return e.KtG(l.onImageSelect(r,m))}),e.YNc(2,un,1,0,"pi",18),e.TgZ(3,"div",19),e._uU(4),e.qZA(),e.TgZ(5,"div",20),e._uU(6),e.qZA()()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(7,Je,n.env.isMobileView)),e.xp6(1),e.Q6J("ngClass",e.VKq(9,Qe,t.url===n.selectedImage.url)),e.xp6(1),e.Q6J("ngIf","clickLink"==t.type),e.xp6(1),e.Q6J("ngClass","clickLink"==t.type?"editorLink text-regular d-none":"promptBtn"),e.xp6(1),e.Oqu("clickLink"==t.type?"":t.type),e.xp6(1),e.Q6J("ngClass",t.url===n.selectedImage.url?"text-dark":"grey-500"),e.xp6(1),e.Oqu(t.text)}}function hn(i,a){1&i&&e._UZ(0,"pi",21)}function vn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",16)(1,"div",17),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(),m=e.MAs(20);return e.KtG(l.onImageSelect(r,m))}),e.YNc(2,hn,1,0,"pi",18),e.TgZ(3,"div",19),e._uU(4),e.qZA(),e.TgZ(5,"div",20),e._uU(6),e.qZA()()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(7,Je,!n.env.isMobileView)),e.xp6(1),e.Q6J("ngClass",e.VKq(9,Qe,t.url===n.selectedImage.url)),e.xp6(1),e.Q6J("ngIf","clickLink"==t.type),e.xp6(1),e.Q6J("ngClass","clickLink"==t.type?"editorLink text-regular d-none":"promptBtn"),e.xp6(1),e.Oqu("clickLink"==t.type?"":t.type),e.xp6(1),e.Q6J("ngClass",t.url===n.selectedImage.url?"text-dark":"grey-500"),e.xp6(1),e.Oqu(t.text)}}const xn=function(i){return{"text-center":i}};let fn=(()=>{class i{constructor(t,n,o){this.env=t,this.storyPageService=n,this.aiUploadImageService=o,this.params={},this.imgurl="",this.altText=""}ngOnInit(){this.onImageSelect(this.area.images[0]),this.params={from:this.slug,tab:this.tab,subTool:this.subTool}}onImageSelect(t,n=null){"clickLink"==t.type?this.openImageSelection(n):this.selectedImage=t}openImageSelection(t=null){let n=(0,xe.qY)();if(this.env.isMobileView){if("iOS"===n.os||"Mac OS"==n.os)return window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone&ppid=6522dc67-da0b-440d-9337-e1522adab0ee",!1;if("Android OS"===n.os)return window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en",!1}else t.click()}onFileUploaded(t){t.length&&this.aiUploadImageService.aiUploadImage(t[0],this.params).then(o=>{})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(T.d),e.Y36(oe.V))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-prompt-preview-area"]],inputs:{area:"area",slug:"slug",tab:"tab",subTool:"subTool"},decls:21,vars:14,consts:[[1,"bg-white","w-100",3,"ngClass"],[1,"container-fluid","area-inner"],[1,"row","g-0"],[1,"col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],[1,"container-fluid","p-0"],[1,"row","g-0","align-items-center","justify-content-center",3,"ngClass"],[1,"col-xl-6","col-lg-6","pe-3"],[1,"row","g-0","align-items-center"],[1,"text-32","text-dark","text-bold","lh-h12"],[1,"text-lg","text-dark","lh-p2","mt-3","mb-32"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"col-xl-6","col-lg-6","text-end"],["type","image/webp",3,"srcset"],["loading","lazy","width","520px","height","520px",1,"responsive","rounded-36","mb-2","mb-lg-0",2,"max-width","520px",3,"src","alt"],["id","fileInputId","name","fileInputId","type","file",1,"custom-file-input","d-none",3,"accept","change","click"],["file",""],[3,"ngClass"],[1,"promptTabBg","mt-3",3,"ngClass","click"],["name","plusiconset","class","f-40 ms-2",4,"ngIf"],[1,"text-semi","ms-2",3,"ngClass"],[1,"text-lg","text-semi","ml-10",3,"ngClass"],["name","plusiconset",1,"f-40","ms-2"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"h2",8),e._uU(9),e.qZA(),e.TgZ(10,"p",9),e._uU(11),e.qZA(),e.YNc(12,_n,7,11,"div",10),e.qZA()(),e.TgZ(13,"div",11)(14,"picture"),e._UZ(15,"source",12),e.ALo(16,"imgwebp"),e._UZ(17,"img",13),e.qZA(),e.YNc(18,vn,7,11,"div",10),e.qZA()()()()()()(),e.TgZ(19,"input",14,15),e.NdJ("change",function(l){return n.onFileUploaded(l.srcElement.files)})("click",function(){e.CHM(o);const l=e.MAs(20);return e.KtG(l.value="")}
1),e.qZA()}2&t&&(e.Q6J("ngClass",n.env.isMobileView?"pt-10":"pt-13"),e.xp6(5),e.Q6J("ngClass",e.VKq(12,xn,n.env.isMobileView)),e.xp6(4),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.desc1),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(3),e.s9C("srcset",e.lcZ(16,10,n.selectedImage.img)),e.xp6(2),e.Q6J("src",n.selectedImage.url,e.LSH)("alt",n.selectedImage.altText),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(1),e.Q6J("accept",n.aiUploadImageService.fileImageAccept))},dependencies:[g.mk,g.sg,g.O5,te.G,V.I],styles:[".promptTabBg[_ngcontent-%COMP%]{min-height:60px;background:#F8F7F7;border:1px solid #E7E5E5;border-radius:18px;display:flex;align-items:center;cursor:pointer;text-align:left}.promptTabBg[_ngcontent-%COMP%]:hover{background:rgba(0,0,0,.04)}.promptTabBg[_ngcontent-%COMP%] .promptBtn[_ngcontent-%COMP%]{min-width:101px;height:44px;background:linear-gradient(270deg,#F2DFF3 0%,#FAE3EA 50%,#FDEEDE 100%);color:#f58c24;border-radius:12px;display:flex;align-items:center;justify-content:center}.tab-active[_ngcontent-%COMP%]{border:2px solid #F58C24!important;color:#f58c24!important;background:#F8F7F7!important}.editorLink[_ngcontent-%COMP%]{font-size:16px;color:#6d6969}@media (min-width: 768px) and (max-width: 980px){.text-end[_ngcontent-%COMP%]{text-align:center!important}}"]}),i})();var bn=d(2736),Cn=d(8666),ye=d.n(Cn);function wn(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"img",11),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.s9C("src",t.url,e.LSH),e.Q6J("alt",t.altText)}}function yn(i,a){if(1&i&&(e.TgZ(0,"div",9),e.YNc(1,wn,2,2,"div",10),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.img1)}}function Tn(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"img",11),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.s9C("src",t.url,e.LSH),e.Q6J("alt",t.altText)}}function Pn(i,a){if(1&i&&(e.TgZ(0,"div",9),e.YNc(1,Tn,2,2,"div",10),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.img2)}}let An=(()=>{class i{constructor(t){this.env=t,this.altText="",this.img1=[],this.img2=[]}ngAfterViewInit(){this.addScrollAnim(),this.img1=this.area.images.slice(0,10),this.img2=this.area.images.slice(11,21)}getVideoUrl(t){return t&&t.video&&t.video[0]?t.video[0].url:t.video}addScrollAnim(){ye().init(),ye().addDriver("scrollY",function(){return window.scrollY}),ye().addElements(".story-scroll-anim",{scrollY:{translateY:[["elInY","elCenterY"],[20,0],{easing:"easeInOutCubic"}],opacity:[["elInY","elCenterY"],[0,1],{easing:"easeInOutCubic"}]}}),ye().addElements(".scroll-animations-delay",{scrollY:{translateY:[["elInY+310","elCenterY+310"],[20,0],{easing:"easeInOutCubic"}],opacity:[["elInY+200","elCenterY+200"],[0,1],{easing:"easeInOutCubic"}]}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-banner-slider"]],inputs:{area:"area"},decls:12,vars:6,consts:[[1,"bg-white","overflow-hidden",3,"ngClass"],[1,"story-scroll-anim","text-bold","text-dark","text-center","mx-auto","lh-12","p-3","p-lg-0",2,"max-width","996px",3,"ngClass"],[1,"gradientHeadingSliderx","gradient-text"],[1,"scroll-animations-delay"],[1,"overflow-hidden"],[1,"overflow-auto","me-2"],[1,"row","g-0","ml-15","me-2",3,"ngClass"],["class","d-inline-flex mx-auto w-auto","style","column-gap: 20px;",4,"ngIf"],[1,"row","g-0","mt-10","ms-2"],[1,"d-inline-flex","mx-auto","w-auto",2,"column-gap","20px"],[4,"ngFor","ngForOf"],["loading","lazy","width","200px","height","200px",1,"rounded-32",3,"src","alt"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h2",1)(2,"span",2),e._uU(3,"Styles "),e.qZA(),e.TgZ(4,"span",3),e._uU(5),e.qZA()(),e.TgZ(6,"div",4)(7,"div",5)(8,"div",6),e.YNc(9,yn,2,1,"div",7),e.qZA(),e.TgZ(10,"div",8),e.YNc(11,Pn,2,1,"div",7),e.qZA()()()()),2&t&&(e.Q6J("ngClass",n.env.isMobileView?"pt-14 pb-14":"padding-top-bottom100"),e.xp6(1),e.Q6J("ngClass","text-36"),e.xp6(4),e.Oqu(n.area.title),e.xp6(3),e.Q6J("ngClass",n.env.isMobileView?"mt-13":"mt-14"),e.xp6(1),e.Q6J("ngIf",n.img1&&n.img1.length),e.xp6(2),e.Q6J("ngIf",n.img2&&n.img2.length))},dependencies:[g.mk,g.sg,g.O5],styles:[".gradientHeadingSliderx[_ngcontent-%COMP%]{background:linear-gradient(273deg,#F58C24 85.27%,#A64DFF 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.sectionBg[_ngcontent-%COMP%]{opacity:.3}[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}"]}),i})();const In=function(i){return{activeImg:i}};function Zn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",28),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.onImageSelect(r))}),e._UZ(1,"img",29),e.qZA()}if(2&i){const t=a.$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("src",t.clickImage,e.LSH)("alt",t.altText)("ngClass",e.VKq(3,In,t.url===n.selectedImage.url))}}function kn(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Zn,2,5,"div",27),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.imagelist)}}function Sn(i,a){1&i&&(e.ynx(0),e.TgZ(1,"div",30),e._UZ(2,"div",31)(3,"div",31)(4,"div",31)(5,"div",31),e.qZA(),e.BQk())}const Ne=function(i){return{"img-active":i}};function Mn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",32),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSectioSelect(r))}),e.TgZ(1,"div",33),e._UZ(2,"img",34),e.qZA()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(3,Ne,t.type===n.selectedImageId)),e.xp6(2),e.Q6J("src",t.url,e.LSH)("alt",t.text)}}function On(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",35),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSectioSelect(r))}),e.TgZ(1,"div"),e._UZ(2,"img",36),e.qZA()()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(3,Ne,t.type===n.selectedImageId)),e.xp6(2),e.Q6J("src",t.url,e.LSH)("alt",t.text)}}const Un=function(i){return{"mt-4":i}},qe=function(i){return{"d-none":i}},Jn=function(i){return{"text-center":i}};let Qn=(()=>{class i{constructor(t,n){this.env=t,this.aiUploadImageService=n,this.params={},this.selectedImageId="0",this.imgurl="",this.altText="",this.isLoaded=!1}ngOnInit(){this.selectedImageId=this.area.links[0].type,this.imagelist=this.area.links[0].images,this.onImageSelect(this.imagelist[0]),this.params={from:this.slug,tab:this.tab,subTool:this.subTool}}onImageSelect(t){this.selectedImage=t}onImageSectioSelect(t){this.isLoaded=!0,setTimeout(()=>{this.selectedImageId=t.type,this.imagelist=t.images,this.selectedImage=this.imagelist[0],this.isLoaded=!1},300)}openImageSelection(t=null){let n=(0,xe.qY)();if(this.env.isMobileView){if("iOS"===n.os||"Mac OS"==n.os)return window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone&ppid=6522dc67-da0b-440d-9337-e1522adab0ee",!1;if("Android OS"===n.os)return window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en",!1}else t.click()}onFileUploaded(t){t.length&&this.aiUploadImageService.aiUploadImage(t[0],this.params).then(o=>{})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(oe.V))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-preview-area-variant2"]],inputs:{area:"area",slug:"slug",tab:"tab",subTool:"subTool"},decls:33,vars:24,consts:[[1,"bg-white","w-100",3,"ngClass"],[1,"container-fluid","bg-white","w-100","area-inner"],[1,"row","g-0"],[1,"col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],[1,"container-fluid","p-0"],[1,"row","g-0","align-items-center","justify-content-center"],[1,"col-xl-6","col-lg-6","ms-0","ms-lg-6","order-2","order-lg-1","position-relative",3,"ngClass"],[1,"d-flex","justify-content-center","position-relative","tab-width",2,"width","fit-content"],["loading","lazy","width","520px","height","520px",1,"responsive","rounded-36",2,"max-width","520px",3,"src","alt"],[1,"d-flex","text-center","justify-content-center","p-2","p-lg-0","pt-0","pb-0","position-absolute",2,"bottom","-11.6%","column-gap","8px"],[4,"ngIf"],[1,"d-grid","imgGrid","text-center","mt-5","pt-3",3,"ngClass"],["class","pointer",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"clickBoxBtn","d-flex","flex-column","align-items-center","justify-content-center",3,"click"],["name","plus"],[1,"text-normal","grey-600","mt-4"],[1,"col-xl-6","col-lg-6","order-1","order-lg-2","ps-lg-4"],[1,"row","g-0","align-items-center",3,"ngClass"],[1,"text-32","text-dark","text-bold","lh-h12"],[1,"text-lg","text-dark","lh-p2","mt-3"],[1,"row","g-0","d-flex","flex-wrap","text-center","mt-5",2,"row-gap","33px",3,"ngClass"],["class","col-lg-6 col-xl-6 pointer gx-3 d-flex align-items-center","style","max-width: 280px; max-height: 200px;",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"col-lg-6","col-xl-6","gx-3","d-flex","justify-content-center",3,"click"],[1,"clickBoxBtn","h-100","d-flex","flex-column","align-items-center","justify-content-center","p-4"],["name","plusiconset",1,"f-40"],["id","fileInputId","name","fileInputId","type","file",1,"custom-file-input","d-none",3,"accept","change","click"],["file",""],["class","pointer previewImg",3,"click",4,"ngFor","ngForOf"],[1,"pointer","previewImg",3,"click"],["width","120px","height","120px",1,"rounded-24",3,"src","alt","ngClass"],[1,"d-flex","text-center","justify-content-center","p-2","p-lg-0","pt-0","pb-0","position-absolute",2,"bottom","3.4%","column-gap","8px"],[1,"anim-blank-view","imgThumb","rounded-24"],[1,"pointer",3,"ngClass","click"],[2,"max-width","250px","max-height","200px"],["loading","lazy","width","250px","height","200px",1,"responsive","rounded-24","h-100","w-100",3,"src","alt"],[1,"col-lg-6","col-xl-6","pointer","gx-3","d-flex","align-items-center",2,"max-width","280px","max-height","200px",3,"ngClass","click"],["loading","lazy","width","250px","height","200px",1,"responsive","rounded-24","img",3,"src","alt"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),e._UZ(8,"img",8),e.TgZ(9,"div",9),e.YNc(10,kn,2,1,"ng-container",10),e.YNc(11,Sn,6,0,"ng-container",10),e.qZA()(),e.TgZ(12,"div",11),e.YNc(13,Mn,3,5,"div",12),e.TgZ(14,"div",13),e.NdJ("click",function(){e.CHM(o);const l=e.MAs(32);return e.KtG(n.openImageSelection(l))}),e._UZ(15,"pi",14),e.TgZ(16,"span",15),e._uU(17),e.qZA()()()(),e.TgZ(18,"div",16)(19,"div",17)(20,"h2",18),e._uU(21),e.qZA(),e.TgZ(22,"p",19),e._uU(23),e.qZA(),e.TgZ(24,"div",20),e.YNc(25,On,3,5,"div",21),e.TgZ(26,"div",22),e.NdJ("click",function(){e.CHM(o);const l=e.MAs(32);return e.KtG(n.openImageSelection(l))}),e.TgZ(27,"div",23),e._UZ(28,"pi",24),e.TgZ(29,"span",15),e._uU(30),e.qZA()()()()()()()()()()()(),e.TgZ(31,"input",25,26),e.NdJ("change",function(l){return n.onFileUploaded(l.srcElement.files)})("click",function(){e.CHM(o);const l=e.MAs(32);return e.KtG(l.value="")}
1),e.qZA()}2&t&&(e.Q6J("ngClass",n.env.isMobileView?"pt-10":"pt-13"),e.xp6(6),e.Q6J("ngClass",e.VKq(16,Un,n.env.isMobileView)),e.xp6(2),e.Q6J("src",n.selectedImage.url,e.LSH)("alt",n.selectedImage.text),e.xp6(2),e.Q6J("ngIf",!n.isLoaded),e.xp6(1),e.Q6J("ngIf",n.isLoaded),e.xp6(1),e.Q6J("ngClass",e.VKq(18,qe,!n.env.isMobileView)),e.xp6(1),e.Q6J("ngForOf",n.area.links),e.xp6(4),e.Oqu(n.area.desc2),e.xp6(2),e.Q6J("ngClass",e.VKq(20,Jn,n.env.isMobileView)),e.xp6(2),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.desc1),e.xp6(1),e.Q6J("ngClass",e.VKq(22,qe,n.env.isMobileView)),e.xp6(1),e.Q6J("ngForOf",n.area.links),e.xp6(5),e.Oqu(n.area.desc2),e.xp6(1),e.Q6J("accept",n.aiUploadImageService.fileImageAccept))},dependencies:[g.mk,g.sg,g.O5,te.G],styles:[".previewSmallImg[_ngcontent-%COMP%]{max-width:160px;max-height:160px;transition:all .3s ease}.previewSmallImg[_ngcontent-%COMP%]:hover{transform:translateY(-8px)}.previewImg[_ngcontent-%COMP%]{max-width:120px;max-height:120px;transition:all .3s ease}.previewImg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border:4px solid #E2E3E1}.previewImg[_ngcontent-%COMP%] .activeImg[_ngcontent-%COMP%]{border:4px solid #F58C24}.clickBoxBtn[_ngcontent-%COMP%]{max-width:258px;max-height:200px;background:#F8F7F7;border:1px solid #E7E5E5;border-radius:24px;cursor:pointer}.clickBoxBtn[_ngcontent-%COMP%]:hover{border:1px solid #B9B6B6;background:linear-gradient(0deg,rgba(0,0,0,.04) 0%,rgba(0,0,0,.04) 100%),#F8F7F7}.imgGrid[_ngcontent-%COMP%]{-moz-column-gap:24px;column-gap:24px;row-gap:24px;grid-template-columns:1fr 1fr}.imgGridRight[_ngcontent-%COMP%]{-moz-column-gap:24px;column-gap:24px;row-gap:24px}.img[_ngcontent-%COMP%]{padding:6px;border:2px solid #fff;box-sizing:border-box}.img-active[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{padding:6px;border:2px solid #5D5FEF!important;box-sizing:border-box;filter:drop-shadow(0px 0px 48px rgba(55,60,72,.12))}.imgThumb[_ngcontent-%COMP%]{width:120px;height:120px;background:#000}@media (max-width: 540px){.previewImg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%}}@media (min-width: 768px) and (max-width: 980px){.d-grid.imgGrid[_ngcontent-%COMP%]{max-width:500px;margin-top:80px!important;margin:0 auto}.tab-width[_ngcontent-%COMP%]{width:auto!important}}"]}),i})();const Nn=function(i){return{"float-lg-end":i}};function qn(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"img-comparison-slider",16)(2,"picture",17),e._UZ(3,"source",18),e.ALo(4,"imgwebp"),e._UZ(5,"img",19),e.qZA(),e.TgZ(6,"picture",20),e._UZ(7,"source",18),e.ALo(8,"imgwebp"),e._UZ(9,"img",21),e.qZA(),e.O4$(),e.TgZ(10,"svg",22),e._UZ(11,"circle",23)(12,"path",24)(13,"path",25),e.qZA()(),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(11,Nn,t.even)),e.xp6(2),e.s9C("srcset",e.lcZ(4,7,t.beforeImgUrl)),e.xp6(2),e.Q6J("src",t.selectedImage.beforeImgUrl,e.LSH)("alt",t.altText1),e.xp6(2),e.s9C("srcset",e.lcZ(8,9,t.afterImgUrl)),e.xp6(2),e.Q6J("src",t.selectedImage.afterImgUrl,e.LSH)("alt",t.altText2)}}function Fn(i,a){if(1&i&&e._UZ(0,"img",30),2&i){const t=e.oxw().$implicit;e.s9C("src",t.clickImage,e.LSH)}}function Vn(i,a){if(1&i&&(e.TgZ(0,"div",31),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary":"text-dark"),e.xp6(1),e.Oqu(t.text)}}function Bn(i,a){if(1&i&&(e.TgZ(0,"div",32),e._UZ(1,"pi",33),e._uU(2),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary previewBoxActive":"text-dark"),e.xp6(1),e.s9C("name",t.icon),e.xp6(1),e.Oqu(t.text)}}const Fe=function(i){return{"img-active":i}};function En(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",26),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSelect(r))}),e.YNc(1,Fn,1,1,"img",27),e.YNc(2,Vn,2,2,"div",28),e.YNc(3,Bn,3,3,"div",29),e.qZA()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(4,Fe,t.url===n.selectedImage.url)),e.xp6(1),e.Q6J("ngIf",t.clickImage),e.xp6(1),e.Q6J("ngIf",t.clickImage),e.xp6(1),e.Q6J("ngIf",!t.clickImage)}}function Yn(i,a){if(1&i&&(e.TgZ(0,"a",37),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.Q6J("routerLink",n.getAction(null==t?null:t.url)),e.xp6(1),e.hij(" ",t.text," ")}}function Hn(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",38),e._uU(2),e.qZA(),e.TgZ(3,"input",39,40),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}
1)("change",function(o){e.CHM(t);const r=e.oxw().$implicit,l=e.oxw(2);return e.KtG(l.onFileUploaded(o.srcElement.files,r))})("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(),n=t.index,o=t.$implicit,r=e.oxw(2);e.xp6(1),e.s9C("for",r.uniqueId+n),e.xp6(1),e.Oqu(o.text),e.xp6(1),e.s9C("id",r.uniqueId+n),e.s9C("name",r.uniqueId+n),e.Q6J("accept",r.fileUploadAccept)}}function Ln(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Yn,2,2,"a",36),e.YNc(2,Hn,5,5,"ng-container",5),e.BQk()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.url),e.xp6(1),e.Q6J("ngIf",!t.url)}}function jn(i,a){if(1&i&&(e.TgZ(0,"div",34),e.YNc(1,Ln,3,2,"ng-container",35),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.links)}}function Kn(i,a){if(1&i&&e._UZ(0,"img",44),2&i){const t=e.oxw().$implicit;e.s9C("src",t.clickImage,e.LSH),e.Q6J("alt",t.altText)}}function Dn(i,a){if(1&i&&(e.TgZ(0,"div",31),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary":"text-dark"),e.xp6(1),e.Oqu(t.text)}}function Gn(i,a){if(1&i&&(e.TgZ(0,"div",45),e._UZ(1,"pi",33),e._uU(2),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("ngClass",t.url===n.selectedImage.url?"text-primary previewBoxActive":"text-dark"),e.xp6(1),e.s9C("name",t.icon),e.xp6(1),e.Oqu(t.text)}}function $n(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onImageSelect(r))}),e.YNc(1,Kn,1,2,"img",42),e.YNc(2,Dn,2,2,"div",28),e.YNc(3,Gn,3,3,"div",43),e.qZA()}if(2&i){const t=a.$implicit,n=e.oxw();e.Q6J("ngClass",e.VKq(4,Fe,t.url===n.selectedImage.url)),e.xp6(1),e.Q6J("ngIf",t.clickImage),e.xp6(1),e.Q6J("ngIf",t.clickImage),e.xp6(1),e.Q6J("ngIf",!t.clickImage)}}function zn(i,a){if(1&i&&(e.TgZ(0,"a",37),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.Q6J("routerLink",n.getAction(null==t?null:t.url)),e.xp6(1),e.hij(" ",t.text," ")}}function Rn(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",38),e._uU(2),e.qZA(),e.TgZ(3,"input",39,40),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")})("change",function(o){e.CHM(t);const r=e.oxw().$implicit,l=e.oxw(2);return e.KtG(l.onFileUploaded(o.srcElement.files,r))})("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(),n=t.index,o=t.$implicit,r=e.oxw(2);e.xp6(1),e.s9C("for",r.uniqueId+n),e.xp6(1),e.Oqu(o.text),e.xp6(1),e.s9C("id",r.uniqueId+n),e.s9C("name",r.uniqueId+n),e.Q6J("accept",r.fileUploadAccept)}}function Xn(i,a){if(1&i&&(e.ynx(0),e.YNc(1,zn,2,2,"a",36),e.YNc(2,Rn,5,5,"ng-container",5),e.BQk()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.url),e.xp6(1),e.Q6J("ngIf",!t.url)}}function Wn(i,a){if(1&i&&(e.TgZ(0,"div",46),e.YNc(1,Xn,3,2,"ng-container",35),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.links)}}const ei=function(i){return{even:i}},ti=function(i,a,t,n,o){return{"order-2":i,"order-1":a,"order-md-2":t,"order-md-1":n,"mt-4":o}},ni=function(i){return{"justify-content-end":i}},ii=function(i,a){return{"d-none":i,"flex-wrap":a}},oi=function(i,a,t,n){return{"order-lg-1":i,"order-lg-2":a,"order-md-1":t,"order-md-2":n}},ai=function(i){return{"d-none":i}};let ri=(()=>{class i{constructor(t,n,o){this.env=t,this.aiUploadImageService=n,this.uploadImageService=o,this.params={},this.altText="",this.imgurl="",this.beforeImgUrl="",this.afterImgUrl="",this.altText1="",this.altText2="",this.isImage=!0,this.fileUploadAccept="image/*",this.links=[]}ngOnInit(){this.onImageSelect(this.area.images[0]),this.area.images&&(this.altText1=this.area.images[0].altText,this.beforeImgUrl=this.area.images[0].url,this.altText2=this.area.images[0].altText,this.afterImgUrl=this.area.images[0].url1)}onImageSelect(t){this.selectedImage=t,t&&(this.altText1=t.altText,this.beforeImgUrl=t.url,this.altText2=t.altText1,this.afterImgUrl=t.url1),this.links=this.selectedImage&&this.area.links.length>1?this.area.links.filter(n=>n.type==this.selectedImage.type):this.area.links}getAction(t){return[`${t.split("?")[0]}`]}onFileUploaded(t,n){let o=(0,xe.qY)();if(this.env.isMobileView){if("iOS"===o.os||"Mac OS"==o.os)return window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone&ppid=6522dc67-da0b-440d-9337-e1522adab0ee",!1;if("Android OS"===o.os)return window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en",!1}if(!t.length)return;n.id&&(this.uploadImageService.storyMetaData={storyAttr:"id="+n.id});const r=t[0];this.params={from:this.slug,tab:n.toolName,subTool:n?.subTool},this.aiUploadImageService.aiUploadImage(r,this.params).then(l=>{})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(oe.V),e.Y36(L.u))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-slide-preview-area"]],inputs:{even:"even",area:"area",slug:"slug"},decls:18,vars:33,consts:[[1,"area","w-100","bg-white"],[1,"container-fluid","area-inner","area-section","p-top-bottom",3,"ngClass"],[1,"row","g-0","align-items-center","justify-content-between"],[1,"col-xl-6","col-lg-6","col-md-6","flex-column",2,"max-width","520px",3,"ngClass"],[1,"d-flex","flex-column",3,"ngClass"],[4,"ngIf"],[1,"d-flex","text-center","mt-4",2,"column-gap","16px",3,"ngClass"],["class","pointer",3,"ngClass","click",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"col-xl-6","col-lg-6","col-md-6",3,"ngClass"],[1,"row","g-0","align-items-center"],[1,"title","text-bold","lh-h12"],[1,"text-lg","text-dark","lh-p2","mt-3"],[1,"d-flex","text-center","mt-5",2,"column-gap","24px",3,"ngClass"],["class","pointer previewSmallImg",3,"ngClass","click",4,"ngFor","ngForOf"],["class","mt-5",4,"ngIf"],[1,"slider-with-animated-handle",2,"max-height","520px",3,"ngClass"],["slot","first"],["type","image/webp",3,"srcset"],["width","520px","height","520px",1,"responsive",2,"border-radius","24px","max-height","520px",3,"src","alt"],["slot","second"],["width","520px","height","520px",1,"responsive",2,"border-radius","27px","max-height","520px",3,"src","alt"],["slot","handle","width","52","height","52","viewBox","0 0 52 52","fill","none","xmlns","http://www.w3.org/2000/svg",1,"handle-round"],["cx","26","cy","26","r","26","fill","white"],["d","M39.3147 26.0715L34.3647 21.1215C34.1825 20.9329 34.0817 20.6803 34.084 20.4181C34.0863 20.1559 34.1915 19.9051 34.3769 19.7197C34.5623 19.5342 34.8131 19.4291 35.0753 19.4268C35.3375 19.4245 35.5901 19.5253 35.7787 19.7075L41.4357 25.3645C41.6232 25.552 41.7285 25.8063 41.7285 26.0715C41.7285 26.3366 41.6232 26.5909 41.4357 26.7785L35.7787 32.4355C35.5901 32.6176 35.3375 32.7184 35.0753 32.7161C34.8131 32.7139 34.5623 32.6087 34.3769 32.4233C34.1915 32.2379 34.0863 31.9871 34.084 31.7249C34.0817 31.4627 34.1825 31.2101 34.3647 31.0215L39.3147 26.0715Z","fill","var(--handle-color)"],["d","M12.7536 26.0002L17.7036 30.9502C17.7991 31.0424 17.8753 31.1528 17.9277 31.2748C17.9801 31.3968 18.0077 31.528 18.0089 31.6608C18.01 31.7936 17.9847 31.9252 17.9345 32.0481C17.8842 32.171 17.8099 32.2827 17.716 32.3766C17.6221 32.4705 17.5105 32.5447 17.3876 32.595C17.2647 32.6453 17.133 32.6706 17.0002 32.6694C16.8674 32.6683 16.7362 32.6407 16.6142 32.5883C16.4922 32.5359 16.3819 32.4597 16.2896 32.3642L10.6326 26.7072C10.4452 26.5197 10.3398 26.2653 10.3398 26.0002C10.3398 25.735 10.4452 25.4807 10.6326 25.2932L16.2896 19.6362C16.4782 19.454 16.7308 19.3532 16.993 19.3555C17.2552 19.3578 17.506 19.463 17.6914 19.6484C17.8769 19.8338 17.982 20.0846 17.9843 20.3468C17.9866 20.609 17.8858 20.8616 17.7036 21.0502L12.7536 26.0002Z","fill","var(--handle-color)"],[1,"pointer",3,"ngClass","click"],["class","responsive roun
1ded-24 previewSmallImg","loading","lazy","width","160px","height","160px",3,"src",4,"ngIf"],["class","text-lg text-semi pt-2",3,"ngClass",4,"ngIf"],["class","d-flex align-items-center previewBox mb-3",3,"ngClass",4,"ngIf"],["loading","lazy","width","160px","height","160px",1,"responsive","rounded-24","previewSmallImg",3,"src"],[1,"text-lg","text-semi","pt-2",3,"ngClass"],[1,"d-flex","align-items-center","previewBox","mb-3",3,"ngClass"],[1,"me-2",3,"name"],[1,"mt-4"],[4,"ngFor","ngForOf"],["class","btn btn-primary btn-h48 mr-8","routerLinkActive","router-link-active","style","width: fit-content;",3,"routerLink",4,"ngIf"],["routerLinkActive","router-link-active",1,"btn","btn-primary","btn-h48","mr-8",2,"width","fit-content",3,"routerLink"],[1,"btn","btn-primary","btn-h48","mr-8",3,"for"],["type","file",1,"custom-file-input","d-none",3,"id","name","accept","click","change"],["file",""],[1,"pointer","previewSmallImg",3,"ngClass","click"],["class","responsive rounded-24","loading","lazy","width","160px","height","160px",3,"src","alt",4,"ngIf"],["class","d-flex align-items-center previewBox",3,"ngClass",4,"ngIf"],["loading","lazy","width","160px","height","160px",1,"responsive","rounded-24",3,"src","alt"],[1,"d-flex","align-items-center","previewBox",3,"ngClass"],[1,"mt-5"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e.YNc(5,qn,14,13,"ng-container",5),e.TgZ(6,"div",6),e.YNc(7,En,4,6,"div",7),e.qZA(),e.YNc(8,jn,2,1,"div",8),e.qZA()(),e.TgZ(9,"div",9)(10,"div",10)(11,"h2",11),e._uU(12),e.qZA(),e.TgZ(13,"p",12),e._uU(14),e.qZA(),e.TgZ(15,"div",13),e.YNc(16,$n,4,6,"div",14),e.qZA()(),e.YNc(17,Wn,2,1,"div",15),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("ngClass",e.VKq(13,ei,n.even)),e.xp6(2),e.Q6J("ngClass",e.qbA(15,ti,!n.even,n.even,!n.even,n.even,n.env.isMobileView)),e.xp6(1),e.Q6J("ngClass",e.VKq(21,ni,n.even)),e.xp6(1),e.Q6J("ngIf",n.beforeImgUrl&&n.afterImgUrl),e.xp6(1),e.Q6J("ngClass",e.WLB(23,ii,!n.env.isMobileView,"1"==n.area.img1)),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(1),e.Q6J("ngIf",n.links&&n.links.length&&n.env.isMobileView),e.xp6(1),e.Q6J("ngClass",e.l5B(26,oi,!n.even,!n.even,!n.even,!n.even)),e.xp6(3),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.desc1),e.xp6(1),e.Q6J("ngClass",e.VKq(31,ai,n.env.isMobileView)),e.xp6(1),e.Q6J("ngForOf",n.area.images),e.xp6(1),e.Q6J("ngIf",n.links&&n.links.length&&!n.env.isMobileView))},dependencies:[g.mk,g.sg,g.O5,C.rH,C.Od,te.G,V.I],styles:[".previewSmallImg[_ngcontent-%COMP%]{max-width:160px;transition:all .3s ease}.previewSmallImg[_ngcontent-%COMP%]:hover{transform:translateY(-8px)}@media (max-width: 576px){.previewSmallImg[_ngcontent-%COMP%]:hover{transform:none}}.previewBox[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #E7E5E5;background:rgba(0,0,0,.04);padding:18px 24px;font-size:16px;font-style:normal;font-weight:600;line-height:120%;color:#565252}.previewBoxActive[_ngcontent-%COMP%]{border:2px solid #F58C24}"]}),i})();var si=d(6074);function li(i,a){if(1&i&&(e.TgZ(0,"div",12),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij("",t.paymentConfig.aiDailyFreeCredits," credits daily")}}function ci(i,a){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"currency"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",e.gM2(2,1,0,t.selectedProduct.currency.toUpperCase(),"symbol","1.0-2"),".00/mo ")}}function di(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.upgradePro())}),e._uU(2,"Get Started Now"),e.qZA()()}}function pi(i,a){if(1&i&&(e.TgZ(0,"div",12),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij("",null==t.paymentConfig?null:t.paymentConfig.aiSubscriptionCredits," AI Credits/month + unlimited access to all pro features")}}function gi(i,a){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"currency"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",e.gM2(2,1,t.selectedProduct.unitAmount/100,t.selectedProduct.currency.toUpperCase(),"symbol","1.0-2"),"/mo")}}function mi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.upgradePro())}),e._uU(2,"Buy Now"),e.qZA()()}}function ui(i,a){if(1&i&&(e.TgZ(0,"div",1)(1,"div",2),e._uU(2,"Upgrade Your Photos, Not Your Spending"),e.qZA(),e.TgZ(3,"div",3),e._uU(4,"Choose a payment plan that works for you"),e.qZA(),e.TgZ(5,"div",4)(6,"div",5)(7,"div",6),e._uU(8,"Free"),e.qZA(),e.YNc(9,li,2,1,"div",7),e.TgZ(10,"div",8),e.YNc(11,ci,3,6,"span",9),e.qZA(),e.TgZ(12,"div",10),e._uU(13,"No credit card required"),e.qZA(),e.YNc(14,di,3,0,"div",9),e.qZA(),e.TgZ(15,"div",11)(16,"div",6),e._uU(17,"Premium"),e.qZA(),e.YNc(18,pi,2,1,"div",7),e.TgZ(19,"div",8),e.YNc(20,gi,3,6,"span",9),e.qZA(),e.TgZ(21,"div",10),e._uU(22,"Billed monthly. Cancel anytime."),e.qZA(),e.YNc(23,mi,3,0,"div",9),e.qZA()()()),2&i){const t=e.oxw();e.xp6(9),e.Q6J("ngIf",t.paymentConfig),e.xp6(2),e.Q6J("ngIf",t.selectedProduct),e.xp6(3),e.Q6J("ngIf",!t.user),e.xp6(4),e.Q6J("ngIf",t.paymentConfig),e.xp6(2),e.Q6J("ngIf",t.selectedProduct),e.xp6(3),e.Q6J("ngIf",!t.user||!t.user.subscribed)}}let _i=(()=>{class i{constructor(t,n,o,r,l){this.subsService=t,this.authService=n,this.router=o,this.paymentService=r,this.envService=l,this.t="month",this.user=this.authService.currentUser()}ngOnInit(){this.getProducts()}upgradePro(){if(this.envService.isMobileView)return this.envService.openPlayStoreUrl(),!1;let t=0;this.user?(t=this.user.subscribed,t?this.router.navigate([p.t.AFTER_LOGIN_REDIRATION_URI]):this.subsService.upgradePlanCheckout("","","",n=>{this.user=this.authService.currentUser(),this.isSubscribed=this.user.subscribed})):this.getStartedPremium()}getStartedPremium(){this.router.navigate(["./login"],{queryParams:{view:"login",returnUrl:this.router.url,action:"upgrade",from:this.router.url}})}getProducts(){this.paymentService.getPaymentProducts(t=>{if(t&&(this.paymentConfig=t.config,!this.selectedProduct)){let n=this.filterProductPlan(t.priceList,this.t);this.selectedProduct=n||t.priceList[0]}},t=>{})}filterProductPlan(t,n){let o=t.filter(r=>{var l;return(null===(l=r.recurring)||void 0===l?void 0:l.interval)===n});return o.length>0?o[0]:null}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(B.F),e.Y36(W.e),e.Y36(C.F0),e.Y36(si.t),e.Y36(N.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["in-page-pricing"]],inputs:{area:"area",slug:"slug"},decls:1,vars:1,consts:[["class","text-center padding-top-bottom100","style","background: linear-gradient(90deg, #FFD464 -51.47%, #EF97F9 153.33%);",4,"ngIf"],[1,"text-center","padding-top-bottom100",2,"background","linear-gradient(90deg, #FFD464 -51.47%, #EF97F9 153.33%)"],[1,"text-32","text-bold"],[1,"text-lg","mt-3"],[1,"row","g-0","d-flex","justify-content-center","mt-13",2,"column-gap","24px"],[1,"col-xl-6","col-lg-6","col-sm","whiteBox","p-4"],[1,"text-32","text-semi"],["class","text-normal mt-2 h-40",4,"ngIf"],[1,"gradient-text","text-36","text-bold","mt-13"],[4,"ngIf"],[1,"text-normal","mt-2"],[1,"col-xl-6","col-lg-6","col-sm","whiteBox","p-4","mt-4","mt-lg-0"],[1,"text-normal","mt-2","h-40"],[1,"btn","btn-primary","btn-h48","text-semi","mt-13",3,"click"]],template:function(t,n){1&t&&e.YNc(0,ui,24,6,"div",0),2&t&&e.Q6J("ngIf",!n.user||!n.user.subscribed)},dependencies:[g.O5,g.H9],styles:[".whiteBox[_ngcontent-%COMP%]{max-width:300px;width:300px;border-radius:20px;border:1px solid #FFF;background:#fff7f9;background-blend-mode:color-dodge,normal;-webkit-backdrop-filter:blur(25px);backdrop-filter:blur(25px)}.gradient-text[_ngcontent-%COMP%]{background:var(--GRADIENT-Pro-Button, linear-gradient(273deg, #F58C24 0%, #A64DFF 100%));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}"]}),i})();var Ve=d(4962);function hi(i,a){if(1&i&&(e.TgZ(0,"div",18)(1,"button",17),e._uU(2),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.text)}}const vi=function(i){return{background:i}},xi=function(i){return[i]},fi=function(i){return{"h-100":i}};function bi(i,a){if(1&i&&(e.TgZ(0,"div",6),e.ynx(1),e.TgZ(2,"div",7)(3,"a",8)(4,"picture"),e._UZ(5,"source",9),e.ALo(6,"imgwebp"),e._UZ(7,"img",10),e.qZA(),e.TgZ(8,"div",11)(9,"h2",12),e._uU(10),e.qZA(),e.TgZ(11,"p",13)(12,"span",14),e._uU(13),e.qZA()(),e.YNc(14,hi,3,1,"div",15),e.qZA(),e.TgZ(15,"div",16)(16,"button",17),e._uU(17),e.qZA()()()(),e.BQk(),e.qZA()),2&i){const t=a.$implicit,n=e.oxw(2);e.xp6(2),e.Q6J("ngStyle",e.VKq(11,vi,t.bgColors)),e.xp6(1),e.Q6J("routerLink",e.VKq(13,xi,"/tools/"+t.slug)),e.xp6(2),e.s9C("srcset",e.lcZ(6,9,t.url)),e.xp6(2),e.Q6J("src",t.url,e.LSH),e.xp6(1),e.Q6J("ngClass",e.VKq(15,fi,n.env
1Service.isMobileView)),e.xp6(2),e.Oqu(t.text),e.xp6(3),e.hij(" ",t.textbelow," "),e.xp6(1),e.Q6J("ngIf",n.envService.isMobileView),e.xp6(3),e.Oqu(t.text)}}function Ci(i,a){if(1&i&&(e.TgZ(0,"div",4),e.YNc(1,bi,18,17,"div",5),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.area.links)}}let wi=(()=>{class i{constructor(t,n,o,r){this.envService=t,this.aiUploadImageService=n,this.uploadImageService=o,this.dialogService=r,this.isLoaded=!1,this.categorylist=Ae.g5.categoryDetail.items,this.params={from:"",toolName:"",subTool:"",editorType:""}}ngOnInit(){this.isLoaded=!0}uploadImage(t,n=null){let o=(0,xe.qY)();if(this.envService.isMobileView)return"iOS"===o.os||"Mac OS"==o.os?window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone":"Android OS"===o.os&&(window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en"),!1;n&&(this.uploadImageService.storyMetaData={},n.id&&(this.uploadImageService.storyMetaData={storyAttr:"id="+n.id}),this.params.toolName=n?.tab||"",this.params.tab=n?.tab||"",this.params.editorType=n?.type||"",this.params.subTool=n?.subTool||""),t&&t.click()}onFileUploaded(t){if(!t.length)return;const n=t[0];this.params.editorType==v.gg.AIPhoto?this.aiUploadImageService.aiUploadImage(n,this.params).then(o=>{}):this.params.editorType==v.gg.Photo&&this.loadInputImage(n)}loadInputImage(t){const o={imageUrl:URL.createObjectURL(t),tabName:this.params.tab,editorType:this.params.type,subTool:this.params.subTool};let r=this.dialogService.showProgress();this.uploadImageService.loadInputImage(o,()=>{setTimeout(()=>{r.close()},500)})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(oe.V),e.Y36(L.u),e.Y36(Ve.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-all-tools"]],inputs:{area:"area",slug:"slug"},decls:6,vars:1,consts:[[1,"area-inner","mx-auto","toolInfo","p-top-bottom"],[1,"text-32","text-bold","text-center"],[1,"text-lg","mt-3","text-center","p-0","ps-lg-5","pe-lg-5"],["class","row g-0 justify-content-center mt-13",4,"ngIf"],[1,"row","g-0","justify-content-center","mt-13"],["class","col-xl-4 col-lg-4 ps-lg-4 pe-lg-4 mb-32 short
1-des pointer","style","max-width: 350px;",4,"ngFor","ngForOf"],[1,"col-xl-4","col-lg-4","ps-lg-4","pe-lg-4","mb-32","short-des","pointer",2,"max-width","350px"],[1,"toolinner","text-start",3,"ngStyle"],[1,"pointer","d-block",3,"routerLink"],["width","300px","height","300px","type","image/webp",3,"srcset"],["onerror","errImage(this)","width","300px","height","300px","alt","","loading","lazy",1,"responsive",2,"border-top-left-radius","23px","border-top-right-radius","23px",3,"src"],[1,"content",3,"ngClass"],[1,"text-xl","text-semi","ps-3","pe-3","pt-3"],[1,"p-3","pt-0"],[1,"mt-2"],["class","ps-3 pb-3",4,"ngIf"],[1,"button","text-center"],[1,"btn","btn-primary","btn-h48","rounded-24"],[1,"ps-3","pb-3"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._uU(2,"Journey through the Realm of AI Wonders!"),e.qZA(),e.TgZ(3,"div",2),e._uU(4,"Fast, Instant, Cost-Efficient: An image to image AI Powerhouse With Unmatched Accuracy, Efficiency, And An Array Of Cutting-Edge Features!"),e.qZA(),e.YNc(5,Ci,2,1,"div",3),e.qZA()),2&t&&(e.xp6(5),e.Q6J("ngIf",n.isLoaded))},dependencies:[g.mk,g.sg,g.O5,g.PC,C.rH,V.I]}),i})();var yi=d(1502);const Ti=["cpText"];function Pi(i,a){if(1&i&&(e.TgZ(0,"span",40),e._uU(1),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.hij("",t.customPrompt.length,"/450")}}const Ai=function(i,a,t){return{"info-up":i,"info-blue":a,"info-red":t}};function Ii(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",24)(1,"div",25)(2,"div",26),e._uU(3," Enter Prompt "),e.qZA()(),e.TgZ(4,"div",27)(5,"div",28)(6,"div",29)(7,"div",30)(8,"div",31)(9,"textarea",32,33),e.NdJ("keyup",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changePrompt())})("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.customPrompt=o)})("keydown.enter",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onEnter(o))}),e.qZA(),e.YNc(11,Pi,2,1,"span",34),e.qZA(),e.TgZ(12,"div",35)(13,"buttons-scroll-menu",36),e.NdJ("selectLayout",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.selectPrompt(o))}),e.qZA()()()()()(),e.TgZ(14,"div",37)(15,"button",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.generate())}),e.TgZ(16,"span",39),e._uU(17,"Generate Now"),e.qZA()()()()}if(2&i){const t=e.oxw(2);e.xp6(8),e.Q6J("ngClass",e.kEZ(8,Ai,t.customPrompt.length,t.isFocused,450==t.customPrompt.length)),e.xp6(1),e.ekj("blue-active",t.isFocused),e.Q6J("ngModel",t.customPrompt),e.xp6(2),e.Q6J("ngIf",t.customPrompt.length),e.xp6(2),e.Q6J("items",t.prompts)("type","prompt-mobile"),e.xp6(2),e.Q6J("disabled",t.disabled)}}function Zi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.focusOut())}),e.qZA()}}const Be=function(i){return{"bottom-upload":i}};function ki(i,a){if(1&i){const t=e.EpF();e.ynx(0,15),e.TgZ(1,"div",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.focusIn())}),e._uU(2),e.qZA(),e.TgZ(3,"div",17,18),e.NdJ("obsChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onChangeVisibility(o))}),e.qZA(),e.TgZ(5,"div",19)(6,"div",20)(7,"button",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.focusIn())}),e._uU(8),e.qZA()()(),e.YNc(9,Ii,18,12,"div",22),e.YNc(10,Zi,1,0,"div",23),e.BQk()}if(2&i){const t=e.MAs(4),n=e.oxw();e.xp6(2),e.hij(" ",n.customPrompt?n.customPrompt:"Enter prompt to generate AI image"," "),e.xp6(1),e.Q6J("obsIntersectTarget",t),e.xp6(2),e.Q6J("ngClass",e.VKq(6,Be,n.area.desc1)),e.xp6(3),e.Oqu(null==n.area||null==n.area.links[0]?null:n.area.links[0].text),e.xp6(1),e.Q6J("ngIf",n.isFocused),e.xp6(1),e.Q6J("ngIf",n.isFocused)}}function Si(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",42)(2,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.generatePrompt())}),e._uU(3),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(3),e.Oqu(null==t.area||null==t.area.links[0]?null:t.area.links[0].text)}}const Mi=function(i,a){return{invalid:i,"border-active":a}},Oi=function(i){return{"d-none":i}};function Ui(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",19)(1,"div",45)(2,"div",46)(3,"input",47),e.NdJ("keyup.enter",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.generatePrompt())})("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.customPrompt=o)}),e.qZA(),e.TgZ(4,"div",48)(5,"span",49),e._uU(6),e.qZA()()(),e.TgZ(7,"div",50)(8,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.generatePrompt())}),e._uU(9),e.qZA()()()()}if(2&i){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(8,Be,t.area.desc1)),e.xp6(3),e.Q6J("ngModel",t.customPrompt)("placeholder",t.area.metadata.placeholder)("ngClass",e.WLB(10,Mi,t.customPrompt.length>449,t.customPrompt.length>0)),e.xp6(1),e.Q6J("ngClass",e.VKq(13,Oi,t.customPrompt.length<401)),e.xp6(1),e.Q6J("ngClass",t.customPrompt.length>449?"text-red":"grey-300"),e.xp6(1),e.hij("",t.customPrompt.length,"/450"),e.xp6(3),e.Oqu(null==t.area||null==t.area.links[0]?null:t.area.links[0].text)}}function Ji(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",17,18),e.NdJ("obsChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onChangeVisibility(o))}),e.qZA(),e.YNc(3,Ui,10,15,"div",44),e.BQk()}if(2&i){const t=e.MAs(2),n=e.oxw();e.xp6(1),e.Q6J("obsIntersectTarget",t),e.xp6(2),e.Q6J("ngIf",n.area.title&&n.area.desc1&&!n.env.isMobileView)}}function Qi(i,a){if(1&i&&e._UZ(0,"img",53),2&i){const t=e.oxw(2);e.Q6J("alt",t.getAltText(t.area))("src",t.getImgUrl(t.area),e.LSH)}}function Ni(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"video",54),e._UZ(2,"
1source",55)(3,"source",56),e.qZA(),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("muted","muted"),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"mp4"),e.LSH),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"webm"),e.LSH)}}function qi(i,a){if(1&i&&(e.TgZ(0,"div",51),e.YNc(1,Qi,1,2,"img",52),e.YNc(2,Ni,4,3,"ng-container",13),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isVideo),e.xp6(1),e.Q6J("ngIf",t.isVideo)}}const Fi=function(i){return{background:i}},Vi=function(i){return{"mx-auto w-100 ps-3":i}},Bi=function(i){return[i]},Ei=function(i){return{"text-32":i}};let Yi=(()=>{class i{constructor(t,n,o){this.env=t,this.mediaContentService=n,this.aiUploadImageService=o,this.homeURL="/",this.displayName="",this.type="",this.value="",this.maxlength=450,this.customPrompt="",this.editorType=v.gg.AIPhoto,this.params={},this.storyPageUrl="/"+p.t.photoEditor.urlPart+p.t.slug.aiAvatarGenerator,this.isVideo=!1,this.prompts=[],this.isFocused=!1,this.disabled=!1}ngOnInit(){var t,n,o,r,l,m,_,u;this.toolName=(null===(n=null===(t=this.area)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.toolName)||"";let f=(null===(r=null===(o=this.area)||void 0===o?void 0:o.metadata)||void 0===r?void 0:r.subTool)||"",M=(null===(m=null===(l=this.area)||void 0===l?void 0:l.metadata)||void 0===m?void 0:m.model)||"",E=(null===(u=null===(_=this.area)||void 0===_?void 0:_.metadata)||void 0===u?void 0:u._sId)||"";this.params={from:this.slug,tab:this.toolName,subTool:f,textPrompt:"",_sId:E,editorType:this.editorType,model:M},this.isVideo=this.checkIsVideo(this.area&&this.area.images&&this.area.images[0]?this.area.images[0].url:""),(this.editorType=v.gg.AIPhoto)&&(this.displayEditorType="AI Editor",this.type="ai-photo-editor"),this.getPrompts()}getAltText(t){return t&&t.images&&t.images[0]?t.images[0].altText:""}getImgUrl(t){return t&&t.images&&t.images[0]?t.images[0].url:t.img1}getVideoUrl(t,n){if("mp4"==n){const o=t&&t.images&&t.images[0]?t.images[0].url:t.img1;return o&&o.replace("webm","mp4")}return t&&t.images&&t.images[0]?t.images[0].url:t.img1}generatePrompt(){if(this.env.isMobileView)return this.env.openPlayStoreUrl(),!1;this.params.textPrompt=this.customPrompt,this.customPrompt&&this.customPrompt.trim().length>1&&this.aiUploadImageService.loadInputTextToAiEditor(this.params)}onChangeVisibility(t){let n=document.querySelector(".bottom-upload");n&&(n.classList.contains("d-none")&&n.classList.remove("d-none"),t.visible&&scrollY>=360?n.classList.contains("fixed-upload-btn")||n.classList.add("fixed-upload-btn","for-mobile-upload"):n.classList.contains("fixed-upload-btn")&&n.classList.remove("fixed-upload-btn","for-mobile-upload"))}checkIsVideo(t){const n=t&&t.split(".").pop().split(/\#|\?/)[0];return"mp4"==n||"webm"==n}generate(){this.params.textPrompt=this.customPrompt,this.aiUploadImageService.loadInputTextToAiEditor(this.params)}getPrompts(t=null){this.mediaContentService.getPrompts(yi.t.TextToImage,n=>{n&&(this.prompts=n.prompts),t&&t()},n=>{})}focusIn(){this.changePrompt(),document.body.classList.add("overflow-h"),this.isFocused=!0,setTimeout(()=>{this.cpText&&this.cpText.nativeElement.focus()},100)}focusOut(){document.body.classList.remove("overflow-h"),this.isFocused=!1}selectPrompt(t){this.customPrompt=t.prompt,this.changePrompt()}changePrompt(){this.disabled=!this.customPrompt.trim()}onEnter(t){this.cpText.nativeElement.blur()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.D),e.Y36(D.N),e.Y36(oe.V))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-banner-header-v1"]],viewQuery:function(t,n){if(1&t&&e.Gf(Ti,5),2&t){let o;e.iGM(o=e.CRH())&&(n.cpText=o.first)}},inputs:{displayName:"displayName",type:"type",area:"area",slug:"slug",editorType:"editorType"},decls:23,vars:25,consts:[[1,"topBanner","d-flex","align-items-center","position-relative","pb-3","pb-lg-0",2,"background-size","cover","background-position","center","min-height","600px",3,"ngStyle"],[1,"lightThemeBreadcrumb","ml-40","position-absolute","d-flex","align-items-center","justify-content-start",2,"top","24px",3,"ngClass"],[3,"routerLink"],["name","lightbreadcrumbarrow",1,"ms-1","me-1","hw-24","d-inline-flex"],[1,"orange-text"],[1,"row","g-0","pt-0","overflow-hidden","w-100","justify-content-center","area-inner","mx-auto","p-0"],[1,"col-lg-7","col-xl-7","d-flex","align-items-center","ps-3","pe-3",3,"ngClass"],[1,"aiBannerHeader",2,"max-width","754px",3,"ngClass"],[1,"mt-5","mt-lg-0"],[1,"text-white","pt-4","pt-lg-0",3,"ngClass"],[1,"mt-9","mb-10"],[1,"text-xxl","lh-p1","text-white","text-semi"],["class","",4,"ngIf"],[4,"ngIf"],["class","col-lg-5 col-xl-5 p-0 d-flex justify-content-center",4,"ngIf"],[1,""],[1,"d-flex","align-items-start","justify-content-start","mobile-prompt-text","border-radius-12","text-12","grey-500","text-regular","mt-1","mb-10","overflow-h",3,"click"],["observeVisibility","",3,"obsIntersectTarget","obsChange"],["nameuplod",""],[1,"upload-btn",3,"ngClass"],[1,"d-flex","justify-content-center"],[1,"btn","btn-primary","d-flex","align-items-center","btn-h48","pe-4","ps-4","btnGenerate",2,"border","1p
1x solid #FFF",3,"click"],["class","p-3 pt-9 pb-9 position-fixed bg-white w-100","style","bottom: 0px; z-index: 99999;border-radius: 20px 20px 0px 0px;left: 0px;",4,"ngIf"],["class","showpreview-overlay align-items-center justify-content-start position-fixed d-flex","style","left: 0px; z-index: 9999;",3,"click",4,"ngIf"],[1,"p-3","pt-9","pb-9","position-fixed","bg-white","w-100",2,"bottom","0px","z-index","99999","border-radius","20px 20px 0px 0px","left","0px"],[1,"wp-100","d-flex","align-items-center","justify-content-between","mb-2"],[1,"text-lg","text-semi","grey-800"],[1,"card","drawer-card","mb-2","mt-0"],[1,"card-body"],[1,"btn-panel"],[1,"card-body","prompt-view"],[1,"textarea-col",3,"ngClass"],["id","cprompt","name","cprompt","rows","4","cols","50","maxlength","450",1,"prompt-text",3,"ngModel","keyup","ngModelChange","keydown.enter"],["cpText",""],["class","prompt-info text-regular position-relative d-flex",4,"ngIf"],[1,"d-flex","mt-2","mobile-prompt"],[2,"max-width","-webkit-fill-available",3,"items","type","selectLayout"],[1,"d-flex","align-items-center","justify-content-center","w-100"],["id","gtm-generate",1,"btn","btn-primary","text-13","btn-h48","w-100","d-flex","align-items-center","justify-content-center",3,"disabled","click"],[1,"text-lg"],[1,"prompt-info","text-regular","position-relative","d-flex"],[1,"showpreview-overlay","align-items-center","justify-content-start","position-fixed","d-flex",2,"left","0px","z-index","9999",3,"click"],[1,"top-0","right-0","p-2","d-flex","align-items-center","justify-content-center"],[1,"btn","btn-primary","d-flex","align-items-center","btn-h48","pe-3","ps-3","btnGenerate",3,"click"],["class","upload-btn",3,"ngClass",4,"ngIf"],[1,"position-relative","inputSearch"],[1,"form-group","position-relative"],["maxlength","450","type","search","aria-describedby","search",1,"form-control",2,"height","64px",3,"ngModel","placeholder","ngClass","keyup.enter","ngModelChange"],[1,"position-absolute","top-0","h-100","d-flex","align-items-center",2,"right","124px","width","60px",3,"ngClass"],[1,"counter","text-11","ps-3",3,"ngClass"],[1,"position-absolute","top-0","right-0","p-2"],[1,"col-lg-5","col-xl-5","p-0","d-flex","justify-content-center"],["class","responsive","height","600px","width","600px",3,"alt","src",4,"ngIf"],["height","600px","width","600px",1,"responsive",3,"alt","src"],["width","100%","height","100%","autoplay","","loop","",1,"video-box","p-0","rounded-24",2,"max-width","520px","max-height","520px",3,"muted"],["type","video/mp4",3,"src"],["type","video/webm",3,"src"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"a",2),e._uU(3,"Home"),e.qZA(),e._UZ(4,"pi",3),e.TgZ(5,"a",2),e._uU(6),e.qZA(),e._UZ(7,"pi",3),e.TgZ(8,"span",4),e._uU(9),e.qZA()(),e.TgZ(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"h1",9),e._uU(15),e.qZA()(),e.TgZ(16,"div",10)(17,"p",11),e._uU(18),e.qZA()(),e.YNc(19,ki,11,8,"ng-container",12),e.YNc(20,Si,4,1,"ng-container",13),e.YNc(21,Ji,4,2,"ng-container",13),e.qZA()(),e.YNc(22,qi,3,2,"div",14),e.qZA()()),2&t&&(e.Udp("background-image","url("+n.area.bgColors+")"),e.Q6J("ngStyle",e.VKq(17,Fi,n.area.bgColors)),e.xp6(1),e.Q6J("ngClass",e.VKq(19,Vi,n.env.isMobileView)),e.xp6(1),e.Q6J("routerLink",e.VKq(21,Bi,n.homeURL)),e.xp6(3),e.Q6J("routerLink","/"+n.type),e.xp6(1),e.Oqu(n.displayEditorType),e.xp6(3),e.Oqu(n.displayName),e.xp6(2),e.Q6J("ngClass",n.area.img1&&!n.env.isMobileView?"justify-content-start pl-14":"justify-content-center p-0"),e.xp6(1),e.Q6J("ngClass",n.area.img1?"text-left":"text-center"),e.xp6(2),e.Q6J("ngClass",e.VKq(23,Ei,n.env.isMobileView)),e.xp6(1),e.Oqu(n.area.title),e.xp6(3),e.hij("",n.area.desc1," "),e.xp6(1),e.Q6J("ngIf",n.env.isMobileView&&!n.env.isiOS&&"text2image"==n.toolName),e.xp6(1),e.Q6J("ngIf",n.env.isMobileView&&"text2image"!=n.toolName||n.env.isMobileView&&n.env.isiOS),e.xp6(1),e.Q6J("ngIf",!n.env.isMobileView),e.xp6(1),e.Q6J("ngIf","ai-banner-header-v2"==n.area.type&&!n.env.isMobileView))},dependencies:[g.mk,g.O5,g.PC,w.Fj,w.JJ,w.nD,w.On,C.rH,te.G,se.B,we],styles:[".btnAiBanner[_ngcontent-%COMP%]{background:rgba(255,255,255,.25);height:48px;font-size:16px;color:#fff!important;border-radius:12px}
1.btnAiBanner[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.35)}.fixed-upload-btn[_ngcontent-%COMP%]{justify-content:center}.fixed-upload-btn[_ngcontent-%COMP%] .btn-none[_ngcontent-%COMP%]{display:none}.gradientHeading[_ngcontent-%COMP%]{background:linear-gradient(90deg,#BC9BFF 16.37%,#FFE7AB 78.43%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}@media (max-width: 576px){.upload-btn[_ngcontent-%COMP%]{justify-content:center}.upload-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:0!important}}.fixed-upload-btn[_ngcontent-%COMP%]{padding:5px}.fixed-upload-btn[_ngcontent-%COMP%] .inputSearch[_ngcontent-%COMP%]{width:40%;margin:auto}.fixed-upload-btn[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:56px!important}h1[_ngcontent-%COMP%]{line-height:125%}.showpreview-overlay[_ngcontent-%COMP%]{display:none;background:rgba(0,0,0,.2);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);width:100%;height:100%;top:0px;bottom:0px;z-index:999}.mobile-prompt-text[_ngcontent-%COMP%]{border:1px solid #DCDBE6;background:linear-gradient(0deg,rgba(0,0,0,.08) 0%,rgba(0,0,0,.08) 100%),#FFF;padding:8px 12px;height:110px;text-align:left}.for-mobile-upload[_ngcontent-%COMP%] .btnGenerate[_ngcontent-%COMP%]{display:flex;align-items:center;background:linear-gradient(90deg,#E67200 0%,#F38634 50%,#FFB133 100%);color:#fff!important;border:0px!important}.prompt-view[_ngcontent-%COMP%] .textarea-col[_ngcontent-%COMP%]{width:100%;height:204px;border-radius:12px;border:1px solid #E7E5E5;background:#EEEDF3;padding:4px}.prompt-view[_ngcontent-%COMP%] .textarea-col[_ngcontent-%COMP%]:hover{border:1px solid #B9B6B6}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;outline:none;width:100%;height:178px;padding:8px;font-size:12px;color:#b9b6b6;border:0px;background:transparent;border-radius:12px;line-height:18px;overflow:hidden}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px;height:4px;border-radius:12px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#e3e3e3;border-radius:12px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9a9a9a;border-radius:12px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#555}.prompt-view[_ngcontent-%COMP%] .prompt-info[_ngcontent-%COMP%]{font-size:11px;color:#b9b6b6;margin-top:0;padding-left:8px;line-height:10px}.info-up[_ngcontent-%COMP%]{border:1px solid #B9B6B6!important;background:#EEEDF3!important}.info-blue[_ngcontent-%COMP%]{border:1px solid #F58C24!important;background:rgba(0,0,0,.04)!important}.info-blue[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#f58c24!important}.info-red[_ngcontent-%COMP%]{border:1px solid #F25555!important;background:rgba(0,0,0,.04)!important}.info-red[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#f25555!important}.prompt-text[_ngcontent-%COMP%]{color:#2e2d2d!important}"]}),i})();function Hi(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",8)(2,"div",9)(3,"div",10),e._UZ(4,"img",11),e.qZA(),e.TgZ(5,"div",12)(6,"h3",13),e._uU(7),e.qZA(),e.TgZ(8,"p",14),e._uU(9),e.qZA()()()(),e.BQk()),2&i){const t=a.$implicit;e.xp6(4),e.Q6J("src",t.url,e.LSH)("alt",t.altUrl),e.xp6(3),e.Oqu(t.title),e.xp6(2),e.Oqu(t.desc)}}let Li=(()=>{class i{constructor(){this.altText="",this.imgUrl=""}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["tutorial-area-v1"]],inputs:{area:"area"},decls:10,vars:3,consts:[[1,"container-fluid","p-0"],[1,"container-fluid","area-inner","p-top-bottom"],[1,"p-0"],[1,"mx-auto","mt-13","text-center",2,"max-width","800px"],[1,"text-32","lh-h12","text-dark","mb-0"],[1,"text-lg","text-dark","mt-1"],[1,"row","g-0","justify-content-between","mt-13","pt-8"],[4,"ngFor","ngForOf"],[1,"col-xl-4","col-lg-4","col-md-4","mt-2","mt-lg-0","p-2"],[1,"tutorialContentBox"],[1,""],["loading","lazy","height","280px","width","373px",1,"responsive",3,"src","alt"],[1,"p-4"],[1,"text-24","text-dark","text-bold","lh-3","mb-0"],[1,"text-lg","text-dark","lh-p2","mt-9","mb-0"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),e._uU(5),e.qZA(),e.TgZ(6,"p",5),e._uU(7),e.qZA()()(),e.TgZ(8,"div",6),e.YNc(9,Hi,10,4,"ng-container",7),e.qZA()()()),2&t&&(e.xp6(5),e.Oqu(n.area.title),e.xp6(2),e.Oqu(n.area.desc1),e.xp6(2),e.Q6J("ngForOf",n.area.steps))},dependencies:[g.sg],styles:[".tutorialContentBox[_ngcontent-%COMP%]{background:#fff;border:1px solid #EEEDF3;border-radius:24px;height:100%}.tutorialContentBox[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:24px 24px 0 0}"]}),i})();var Ze=d(247);function ji(i,a){if(1&i&&(e.TgZ(0,"ng-option",10)(1,"div",11),e._uU(2),e.qZA()()),2&i){const t=a.$implicit;e.Q6J("value",t),e.xp6(2),e.hij(" ",t.text," ")}}const Ki=function(i){return{active:i}};function Di(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"li",15)(1,"a",16),e.NdJ("click",function(){const o=e.CHM(t),r=o.index,l=o.$implicit,m=e.oxw(2);return e.KtG(m.onSlide(r,l))}),e._uU(2),e.qZA()()}if(2&i){const t=a.$implicit,n=a.index,o=e.oxw(2);e.Q6J("ngClass",e.VKq(2,Ki,n==o.activeId)),e.xp6(2),e.Oqu(t.text)}}const Gi=function(i){return{"mb-13":i}};function $i(i,a){if(1&i&&(e.TgZ(0,"div",12)(1,"ul",13),e.YNc(2,Di,3,4,"li",14),e.qZA()()),2&i){const t=e.oxw();e.Q6J("ngClass",e.VKq(2,Gi,!(t.area.metadata&&1==t.area.metadata.variant))),e.xp6(2),e.Q6J("ngForOf",t.area.links)}}function zi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",19),e._UZ(1,"img",20),e.TgZ(2,"div",21)(3,"div",22),e._uU(4),e.qZA(),e.TgZ(5,"button",23),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.generatePrompt(r.text))}),e._uU(6),e.qZA()()()}if(2&i){const t=a.$implicit;e.xp6(1),e.Q6J("alt",t.altText)("src",t.url,e.LSH),e.xp6(3),e.Oqu(t.text),e.xp6(2),e.Oqu(null==t?null:t.clickImage)}}function Ri(i,a){if(1&i&&(e.TgZ(0,"div",17),e.YNc(1,zi,7,4,"div",18),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",null==t.selectedProduct?null:t.selectedProduct.images)}}function Xi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",26),e._UZ(1,"img",20),e.TgZ(2,"div",27)(3,"div",28),e._uU(4),e.qZA(),e.TgZ(5,"button",29),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.generatePrompt(r.text))}),e._uU(6),e.qZA()()()}if(2&i){const t=a.$implicit;e.xp6(1),e.Q6J("alt",t.altText)("src",t.url,e.LSH),e.xp6(3),e.Oqu(t.text),e.xp6(2),e.Oqu(null==t?null:t.clickImage)}}function Wi(i,a){if(1&i&&(e.TgZ(0,"div",24),e.YNc(1,Xi,7,4,"div",25),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",null==t.selectedProduct?null:t.selectedProduct.images)}}const eo=function(i){return{background:i}},to=function(i,a){return{"area-inner":i,"p-0":a}};let no=(()=>{class i{constructor(t,n){this.aiUploadImageService=t,this.env=n,this.imgUrl="",this.altText="",this.activeId=0,this.tools=Ae.fS.ProductShowcaseAnimatedBanner.nav.items,this.tabcount=new Array(Math.ceil(this.tools.length/2))}ngOnInit(){var t;this.selectedProduct=this.area.links&&this.area.links.length>0?this.area.links[0]:{images:this.area.images},this.params={from:this.slug,tab:this.toolName,subTool:"",textPrompt:"",_sId:this._s
1Id||(null===(t=this.selectedProduct)||void 0===t?void 0:t.text)||""}}onSlide(t,n){var o;this.activeId=t,this.selectedProduct=n,this.params._sId=null===(o=this.selectedProduct)||void 0===o?void 0:o.text}generatePrompt(t){let n=(0,xe.qY)();if(this.env.isMobileView&&this.env.isiOS)return"iOS"===n.os||"Mac OS"==n.os?window.location.href="https://apps.apple.com/us/app/lightx-ai-photo-editor-retouch/id1400740705?platform=iphone&ppid=6522dc67-da0b-440d-9337-e1522adab0ee":"Android OS"===n.os&&(window.location.href="https://play.google.com/store/apps/details?id=com.lightx&hl=en"),!1;this.params.textPrompt=t,this.aiUploadImageService.loadInputTextToAiEditor(this.params)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(oe.V),e.Y36(N.D))},i.\u0275cmp=e.Xpm({type:i,selectors:[["ai-animated-banner-area"]],inputs:{area:"area",slug:"slug",toolName:"toolName",_sId:"_sId"},decls:11,vars:17,consts:[[1,"mx-auto","p-top-bottom",3,"ngStyle","ngClass"],[1,"text-32","text-dark","text-bold","text-center","lh-12"],[1,"position-relative","animatedBannerArea",3,"ngClass"],[1,"mobile-div-show","mb-13","tags-listing-col","ps-3","pe-3","bg-transparent","w-100"],[1,"w-100","c-ng-select",3,"ngModel","searchable","clearable","ngModelChange","change"],["ngSelect",""],[3,"value",4,"ngFor","ngForOf"],["class","tab-div-show mb-4",3,"ngClass",4,"ngIf"],["class","d-flex","style","column-gap: 24px;",4,"ngIf"],["class","d-flex overflow-auto ps-3 pe-3","style","column-gap: 24px;",4,"ngIf"],[3,"value"],[1,"option-with-icon"],[1,"tab-div-show","mb-4",3,"ngClass"],[1,"list-unstyled","carousel-indicators-btn","p-1","pe-0"],["class","p-0 pointer me-2 d-flex align-items-center text-semi",3,"ngClass",4,"ngFor","ngForOf"],[1,"p-0","pointer","me-2","d-flex","align-items-center","text-semi",3,"ngClass"],["data-toggle","tab",1,"d-flex","align-items-center","justify-content-center","w-100","h-100","pl-12","pr-12",3,"click"],[1,"d-flex",2,"column-gap","24px"],["class","imageNormal position-relative",4,"ngFor","ngForOf"],[1,"imageNormal","position-relative"],["loading","lazy","width","266px","height","266px",1,"responsive","mx-auto",2,"width","266px","height","266px",3,"alt","src"],[1,"imageContent","position-absolute","bottom-0","p-3","w-100"],[1,"text-13","grey-100"],[1,"btn","btn-white","text-dark","w-100","btn-h48","mt-3",3,"click"],[1,"d-flex","overflow-auto","ps-3","pe-3",2,"column-gap","24px"],["class","imageNormalMobile",4,"ngFor","ngForOf"],[1,"imageNormalMobile"],[1,"contentBox","position-relative","p-3"],[1,"text-normal","grey-600"],[1,"btn","btn-primary","text-dark","btn-h48","w-50","mt-3",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2),e.qZA(),e.TgZ(3,"div",2)(4,"div",3)(5,"ng-select",4,5),e.NdJ("ngModelChange",function(r){return n.selectedProduct=r})("change",function(r){return n.onSlide(n.activeId,r)}),e.YNc(7,ji,3,2,"ng-option",6),e.qZA()(),e.YNc(8,$i,3,4,"div",7),e.YNc(9,Ri,2,1,"div",8),e.YNc(10,Wi,2,1,"div",9),e.qZA()()),2&t&&(e.Q6J("ngStyle",e.VKq(12,eo,n.area.bgColors))("ngClass",e.WLB(14,to,!(n.area.metadata&&1==n.area.metadata.variant),n.env.isMobileView)),e.xp6(2),e.AsE("",n.area.title,"",n.isLoaded,""),e.xp6(1),e.Q6J("ngClass",n.env.isMobileView?"pt-13":"pt-14"),e.xp6(2),e.Q6J("ngModel",n.selectedProduct)("searchable",!1)("clearable",!1),e.xp6(2),e.Q6J("ngForOf",n.area.links),e.xp6(1),e.Q6J("ngIf",null==n.area?null:n.area.links),e.xp6(1),e.Q6J("ngIf",!n.env.isMobileView),e.xp6(1),e.Q6J("ngIf",n.env.isMobileView))},dependencies:[g.mk,g.sg,g.O5,g.PC,w.JJ,w.On,Ze.w9,Ze.jq],styles:["@media (max-width: 1081px){.mobile-div-show[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.tab-div-show[_ngcontent-%COMP%]{display:none}}@media (min-width: 1082px){.mobile-div-show[_ngcontent-%COMP%]{display:none}.tab-div-show[_ngcontent-%COMP%]{display:block}}img[_ngcontent-%COMP%]{border-radius:24px;background:lightgray 0px -3.097px/100% 138.462% no-repeat;box-shadow:0 8px 24px #00000026;cursor:pointer}.imageNormal[_ngcontent-%COMP%] .imageContent[_ngcontent-%COMP%]{display:none}.imageNormal[_ngcontent-%COMP%]:hover .imageContent[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);
1height:100%;display:flex;flex-direction:column;justify-content:end;border-radius:24px;cursor:pointer}.blankImgDiv[_ngcontent-%COMP%]{width:274px;height:274px;background:#B9B6B6;border-radius:24px}.imageNormalMobile[_ngcontent-%COMP%]{background:#fff;border-radius:24px;width:266px}.imageNormalMobile[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:24px 24px 0 0}.imageNormalMobile[_ngcontent-%COMP%] .contentBox[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:column;justify-content:space-between;height:calc(100% - 266px)}[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}"]}),i})();var ae=d(455),Ee=d(7130),Ye=d(1862),io=d(1850);function oo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"div",16)(2,"div",17),e._uU(3),e.qZA(),e.TgZ(4,"div",18),e._UZ(5,"h4",19),e.qZA()(),e.TgZ(6,"div",20),e._UZ(7,"p",21),e.qZA()()),2&i){const t=e.oxw(),n=t.index,o=t.$implicit;e.xp6(3),e.hij(" ",n+1," "),e.xp6(2),e.Q6J("innerHtml",null==o?null:o.title,e.oJD),e.xp6(2),e.Q6J("innerHtml",null==o?null:o.desc,e.oJD)}}function ao(i,a){if(1&i&&(e.TgZ(0,"div",16)(1,"div",22),e._uU(2),e.qZA(),e.TgZ(3,"div",18),e._UZ(4,"h4",19),e.qZA()()),2&i){const t=e.oxw(),n=t.index,o=t.$implicit;e.xp6(2),e.hij(" ",n+1," "),e.xp6(2),e.Q6J("innerHtml",null==o?null:o.title,e.oJD)}}function ro(i,a){if(1&i&&(e.TgZ(0,"div",16)(1,"div",22),e._uU(2),e.qZA(),e.TgZ(3,"div",4),e._UZ(4,"p",23),e.qZA()()),2&i){const t=e.oxw(),n=t.index,o=t.$implicit;e.xp6(2),e.hij(" ",n+1," "),e.xp6(2),e.Q6J("innerHtml",null==o?null:o.desc,e.oJD)}}function so(i,a){if(1&i&&(e.TgZ(0,"div",14),e.YNc(1,oo,8,3,"div",8),e.YNc(2,ao,5,2,"div",15),e.YNc(3,ro,5,2,"div",15),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",(null==t?null:t.title)&&(null==t?null:t.desc)),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.desc)&&(null==t?null:t.title)),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.desc)&&!(null!=t&&t.title))}}function lo(i,a){if(1&i&&(e.ynx(0),e.YNc(1,so,4,3,"div",13),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",null==t.area?null:t.area.steps)}}const co=function(i,a){return{invalid:i,"border-active":a}},po=function(i){return{"d-none":i}};function go(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",30)(1,"input",31),e.NdJ("keyup.enter",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.genOrUploadClick())})("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.customPrompt=o)}),e.qZA(),e.TgZ(2,"div",32)(3,"span",33),e._uU(4),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.customPrompt)("ngClass",e.WLB(5,co,t.customPrompt.length>449,t.customPrompt.length>0)),e.xp6(1),e.Q6J("ngClass",e.VKq(8,po,t.customPrompt.length<401)),e.xp6(1),e.Q6J("ngClass",t.customPrompt.length>449?"text-red":"grey-300"),e.xp6(1),e.hij("",t.customPrompt.length,"/450")}}function mo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",24),e.YNc(1,go,5,10,"div",25),e.TgZ(2,"div",26)(3,"button",27),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(6),r=e.oxw();return e.KtG(r.genOrUploadClick(o))}),e._uU(4),e.qZA(),e.TgZ(5,"input",28,29),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onFileUploaded(o.srcElement.files))})("click",function(){e.CHM(t);const o=e.MAs(6);return e.KtG(o.value="")}),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","Generate_With_Text"==(null==t.link?null:t.link.type)),e.xp6(3),e.Oqu(t.link.text),e.xp6(1),e.MGl("id","fileInput",t.index,"")("name","fileInput",t.index,""),e.Q6J("accept",t.accept)("multiple",t.multiple)}}const uo=function(i){return{even:i}},_o=function(i,a,t,n){return{"order-2":i,"order-1":a,"order-md-2":t,"order-md-1":n}},ho=function(i){return{"only-button":i}},vo=function(i,a,t,n){return{"order-lg-1":i,"order-lg-2":a,"order-md-1":t,"order-md-2":n}};let xo=(()=>{class i{constructor(t,n,o,r,l,m,_,u,f){this.createPopupService=t,this.env=n,this.route=o,this.uploadImageService=r,this.uploadVideoService=l,this.aiUploadImageService=m,this.uploadService=_,this.toastService=u,this.authService=f,this.accept="image/*",this.videoUrl="",this.imgQueryParams={imageUrl:"",tabName:"",from:"",editorType:""},this.multiple=!1,this.customPrompt="",this.errorMmsg="",this.user=this.authService.currentUser(),this.slug=this.route.
1snapshot.paramMap.get("slug")}ngOnInit(){var t,n,o,r,l,m;this.area&&this.area.links.length&&(this.link=this.area.links[0],this.metadata=null===(t=this.link)||void 0===t?void 0:t.metadata),this.area&&this.area.images.length&&(this.imgItem=this.area.images[0]),(null===(n=this.metadata)||void 0===n?void 0:n.editorType)==v.gg.Video?(this.accept=p.t.allowedVideoTypes.join(","),this.errorMmsg=p.t.message.validVideoSupportMessage):(null===(o=this.metadata)||void 0===o?void 0:o.editorType)==v.gg.ImageTool?this.area.metadata&&this.area.metadata.toolName==p.t.tool.imageCompress?(this.accept=p.t.allowedCompressImageTypes.join(","),this.errorMmsg=p.t.message.uploadImageCompressValidMsg):(this.accept=p.t.allowedImagetoolsMimeTypes.join(","),this.errorMmsg=p.t.message.uploadImageToolValidMsg):((null===(r=this.link)||void 0===r?void 0:r.type)==ae.h.Video||(null===(l=this.link)||void 0===l?void 0:l.type)==ae.h.Video_Img)&&(this.accept="image/*, video/mp4, video/x-m4v"),(null===(m=this.metadata)||void 0===m?void 0:m.editorType)==v.gg.VideoEditor&&(this.multiple=!0)}genOrUploadClick(t=null){var n,o,r,l,m,_,u;if(this.env.isMobileView)return this.env.openPlayStoreUrl(),!1;if(!(null!==(n=this.link)&&void 0!==n&&n.type||null!==(o=this.metadata)&&void 0!==o&&o.editorType||null!==(r=this.metadata)&&void 0!==r&&r.toolName))return;const f=(null===(l=this.link)||void 0===l?void 0:l.type)==ae.h.Image||(null===(m=this.link)||void 0===m?void 0:m.type)==ae.h.Video_Img||(null===(_=this.link)||void 0===_?void 0:_.type)==ae.h.Video;(null===(u=this.metadata)||void 0===u?void 0:u.editorType)==v.gg.Photo?this.onOpenUpload():!f||this.metadata.editorType!=v.gg.VideoEditor&&this.metadata.editorType!=v.gg.AIPhoto&&this.metadata.editorType!=v.gg.ImageTool&&this.metadata.editorType!=v.gg.Video?this.aiUploadImageService.loadInputTextToAiEditor({from:this.slug,tab:this.metadata.toolName,subTool:this.metadata.subTool,textPrompt:this.customPrompt,editorType:this.metadata.editorType}):t&&t.click()}onFileUploaded(t){var n,o,r,l,m;const _={slug:this.slug,editorType:null===(n=this.metadata)||void 0===n?void 0:n.editorType,toolName:this.metadata.toolName,subTool:this.metadata.subTool};if(!t.length)return;const u=t[0];if((null===(o=this.metadata)||void 0===o?void 0:o.editorType)==v.gg.VideoEditor)return this.uploadVideoService.loadMultipleFilesUpload(t,_),!1;if((null===(r=this.metadata)||void 0===r?void 0:r.editorType)==v.gg.AIPhoto)this.aiUploadImageService.aiUploadImage(u,{slug:this.slug,editorType:this.metadata.editorType,tab:this.metadata.toolName,subTool:this.metadata.subTool});else if((null===(l=this.metadata)||void 0===l?void 0:l.editorType)==v.gg.ImageTool){let f=window.URL.createObjectURL(u);this.uploadImageService.slug=this.slug,this.uploadImageService.loadPhotoEditingImage(f,u.name,u.size,this.metadata.toolName,()=>{})}else(null===(m=this.metadata)||void 0===m?void 0:m.editorType)==v.gg.Video&&this.uploadService.onVideoUploaded(u,p.t.processType.convert,f=>{var M;f&&this.uploadImageService.loadInputVideo(this.slug,null===(M=this.metadata)||void 0===M?void 0:M.editorType,{videoUrl:f.contentUrl,keyName:f.keyName,assetId:f.assetId,fileSize:u.size,systemRefKey:f.systemRefKey,name:u.name},()=>{})},f=>{this.toastService.showErrorOptions({msg:f?.description||f?.message||f?.msg||p.t.message.errorOnUploadVideo,cssClass:"full"})})}onOpenUpload(){var t,n,o,r,l,m,_,u,f,M,E,R,ge,_e;this.env.isMobileView&&(null===(t=this.metadata)||void 0===t?void 0:t.toolName)!=p.t.tool.removeBg&&(null===(n=this.metadata)||void 0===n?void 0:n.toolName)!=p.t.tool.profileMaker&&(null===(o=this.metadata.subTool)||void 0===o?void 0:o.subTool)!=p.t.subTool.resize?this.env.openPlayStoreUrl():(this.imgQueryParams.from=this.slug,this.imgQueryParams.slug=this.slug,this.imgQueryParams.tabName=null===(r=this.metadata)||void 0===r?void 0:r.toolName,this.imgQueryParams.editorType=null===(l=this.metadata)||void 0===l?void 0:l.editorType,this.imgQueryParams.subTool=null===(m=this.metadata)||void 0===m?void 0:m.subTool,(null===(_=this.metadata)||void 0===_?void 0:_.toolName)==v.ux.ProfileMaker?(this.imgQueryParams.targetPage=p.t.targetPage.profilePicture,this.imgQueryParams.pid=null===(u=this.metadata)||void 0===u?void 0:u.id,this.imgQueryParams.stagid=null===(f=this.metadata)||void 0===f?void 0:f.subId):(null===(M=this.metadata)||void 0===M?void 0:M.toolName)==v.ux.ProductShowcase?(this.imgQueryParams.targetPage=p.t.targetPage.productShowcase,this.imgQueryParams.pid=null===(E=this.metadata)||void 0===E?void 0:E.id,this.imgQueryParams.stagid=null===(R=this.metadata)||void 0===R?void 0:R.subId):(null===(ge=this.metadata)||void 0===ge?void 0:ge.toolName)==v.ux.PhotoResizer&&(this.imgQueryParams.targetPage=p.t.targetPage.photoResizer,this.imgQueryParams.pid=null===(_e=this.metadata)||void 0===_e?void 0:_e.id),this.createPopupService.editorUploadImageModal(this.imgQueryParams,Ka=>{}))}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(Ie.A),e.Y36(N.D),e.Y36(C.gz),e.Y36(L.u),e.Y36(Ee.F),e.Y36(oe.V),e.Y36(Ye.C),e.Y36(ce.k),e.Y36(W.e))},i.\u0275cmp=e.Xpm({type:i,selectors:[["mixed-section-area"]],inputs:{area:"area",even:"even",index:"index"},decls:15,vars:25,consts:[[1,"area","w-100","bg-grey2"],[1,"container-fluid","area-inner","pad-md","area-section",3,"ngClass"],[1,"row","g-0","align-items-center"],[1,"col-xl-6","col-lg-6","col-md-6","flex-column","text-content","m-mt-12",3,"ngClass"],[1,""],[1,"title","text-bold"],[1,"mt-8"],[1,"content-text",3,"innerHtml"],[4,"ngIf"],[1,"aiBannerHeader",3,"ngClass"],["class","mt-13 position-relative inputSearch",4,"ngIf"],[1,"col-xl-6","col-lg-6","col-md-6","text-center","img-content",3,"ngClass"],[3,"url","altText","even"],["class","row g-0 mt-4",4,"ngFor","ngForOf"],[1,"row","g-0","mt-4"],["class","d-flex",4,"ngIf"],[1,"d-flex"],[1,"icon-bg-gradiant","d-flex","align-items-center","justify-content-center","text-blue","text-xl","text-semi","hw-56","rounded-20"],[1,"ms-4",2,"padding-top","12px"],[1,"text-24","text-bold","text-dark","mb-0",3,"innerHtml"],[1,"ps-4",2,"margin-left","56px"],[1,"text-lg","text-dark",3,"innerHtml"],[1,"icon-bg-gradiant","d-flex","align-items-center","justify-content-center","text-blue","text-xl","text-semi","hw-40"],[1,"content-text","ms-4",3,"innerHtml"],[1,"mt-13","position-relative","inputSearch"],["class","form-group position-relative",4,"ngIf"],[1,"position-absolute","top-0","right-0","p-2","text-button"],[1,"btn","btn-primary","d-flex","align-items-center","btn-h48","pe-3","ps-3","btnGenerate",3,"click"],["type","file",1,"custom-file-input","n-show","d-none","gtm-up-sec",3,"id","name","accept","multiple","change","click"],["file",""],[1,"form-group","position-relative"],["maxlength","450","type","text","placeholder","Enter a prompt to generate AI image","aria-describedby","search",1,"form-control",2,"height","64px",3,"ngModel","ngClass","keyup.enter","ngModelChange"],[1,"position-absolute","top-0","h-100","d-flex","align-items-center",2,"right","124px","width","60px",3,"ngClass"],[1,"counter","text-11","ps-3",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div")(6,"h2",5),e._uU(7),e.qZA()(),e.TgZ(8,"div",6),e._UZ(9,"p",7),e.qZA(),e.YNc(10,lo,2,1,"ng-container",8),e.TgZ(11,"div",9),e.YNc(12,mo,7,6,"div",10),e.qZA()()(),e.TgZ(13,"div",11),e._UZ(14,"video-element",12),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("ngClass",e.VKq(11,uo,n.even)),e.xp6(2),e.Q6J("ngClass",e.l5B(13,_o,n.even,!n.even,n.even,!n.even)),e.xp6(4),e.Oqu(n.area.title),e.xp6(2),e.Q6J("innerHtml",n.area.desc1,e.oJD),e.xp6(1),e.Q6J("ngIf",null==n.area?null:n.area.steps),e.xp6(1),e.Q6J("ngClass",e.VKq(18,ho,"Generate_With_Text"!=(null==n.link?null:n.link.type))),e.xp6(1),e.Q6J("ngIf",n.link),e.xp6(1),e.Q6J("ngClass",e.l5B(20,vo,n.even,n.even,n.even,n.even)),e.xp6(1),e.Q6J("url",null==n.imgItem?null:n.imgItem.url)("altText",null==n.imgItem?null:n.imgItem.altText)("even",n.even))},dependencies:[g.mk,g.sg,g.O5,w.Fj,w.JJ,w.nD,w.On,io.C],styles:[".hw-40[_ngcontent-%COMP%]{min-width:40px!important}.aiBannerHeader.only-button[_ngcontent-%COMP%] .inputSearch[_ngcontent-%COMP%]:hover{background:transparent}.aiBannerHeader.only-button[_ngcontent-%COMP%] .text-button[_ngcontent-%COMP%]{position:relative!important;padding:0!important}"]}),i})();var fo=d(8091),bo=d(3733),Co=d(5154),wo=d(1146);let yo=(()=>{class i{transform(t){return[`${t.split("?")[0]}`]}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275pipe=e.Yjl({name:"lightroute",type:i,pure:!0}),i})(),To=(()=>{class i{transform(t){return this.getQueryParams(t)}getQueryParams(t){var n={},r=[],l=t.split("?");if(l.length>1){for(var m=l[1].split("&"),_=0;_<m.length;_++)n[(r=m[_].split("="))[0]]=r[1];return n}return{}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275pipe=e.Yjl({name:"queryparams",type:i,pure:!0}),i})();function Po(i,a){if(1&i&&(e.TgZ(0,"div",10)(1,"h2",11),e._uU(2),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(null==t.area?null:t.area.title)}}function Ao(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",1)(1,"div",2)(2,"div",3),e.YNc(3,Po,3,1,"div",4),e.TgZ(4,"div",5)(5,"ng-image-slider",6,7),e.NdJ("imageClick",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.templateClick(o))})("previewClick",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.showPreview(o))}),e.qZA(),e.TgZ(7,"div",8)(8,"a",9),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.goToLink(o.area.links[0].url,0))}),e.ALo(9,"lightroute"),e.ALo(10,"queryparams"),e._uU(11),e.qZA()()()()()()}if(2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngIf","templates-slider"==t.area.type),e.xp6(2),e.Q6J("images",t.imageObjects)("isSubscribed",!1)("videoPlayShow",!1)("footerShow",!1)("imageSize",t.imageSize)("imagePopup",!1)("autoPlay",!0),e.xp6(3),e.Q6J("routerLink",e.lcZ(9,11,null==t.area?null:t.area.links[0].url))("queryParams",e.lcZ(10,13,null==t.area?null:t.area.links[0].url)),e.xp6(3),e.Oqu(null==t.area?null:t.area.links[0].text)}}let Io=(()=>{class i{constructor(t,n,o,r,l,m){this.router=t,this.templateService=n,this.openTemplatePage=o,this.activeModal=r,this.envService=l,this.modalService=m,this.imageObjects=[],this.pageNumber=0,this.rowsCount=15,this.productId=0,this.tagId=0}ngOnInit(){var t,n,o,r,l,m,_,u;this.productId||(this.productId=null!==(n=null===(t=this.area)||void 0===t?void 0:t.metadata)&&void 0!==n&&n.productId?null===(r=null===(o=this.area)||void 0===o?void 0:o.metadata)||void 0===r?void 0:r.productId:this.productId),this.tagId||(this.tagId=null!==(m=null===(l=this.area)||void 0===l?void 0:l.metadata)&&void 0!==m&&m.tagId?null===(u=null===(_=this.area)||void 0===_?void 0:_.metadata)||void 0===u?void 0:u.tagId:this.tagId),this.getTemplatesByProductId(this.productId)}getFormattedCategory(t){let o,r,n=[];for(let l=0;l<t.length;l++)o=t[l],r=t[0].format,n.push({video:o.videoThumbUrl,posterImage:o.thumbUrl,item:o,format:r,imageSizel:this.templateService.getNewImageSizeL(r,o.format)});this.imageSize=this.templateService.getSliderImageHeight(r),this.imageObjects=n}notFound(){this.router.navigate(["/404"],{skipLocationChange:!0})}showPreview(t){const n=this.modalService.open(fo.C,{size:"lg",backdrop:"static",windowClass:"preview-dialog"});n.componentInstance.template=t.img,n.componentInstance.productId=this.productId,n.componentInstance.isSubscribed=!1,n.result.then(o=>{}).catch(o=>{})}templateClick(t){var n,o;this.envService.isMobileView?this.envService.openPlayStoreUrl():114==(null===(o=null===(n=this.area)||void 0===n?void 0:n.metadata)||void 0===o?void 0:o.pCatId)?this.openTemplatePage.openVideoTemplatePage(t.img.item,null,null,null,this.sceneParser):this.openTemplatePage.openDesignTemplatePage(t.img.item,this.productId,null)}goToLink(t,n){this.envService.isMobileView&&n>0?this.envService.openPlayStoreUrl():(this.activeModal.dismiss("ok"),this.router.navigate([`${t.split("?")[0]}`],{queryParams:this.templateService.getQueryParams(t)}))}getTemplatesByProductId(t){this.templateService.getNewTemplatesByProductId({format:0,pageNumber:this.pageNumber,rows:this.rowsCount,productId:t,tagId:this.tagId||null},o=>{let r=o.storeProductImages;r&&r.length>0&&this.getFormattedCategory(r)},o=>{})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(C.F0),e.Y36(bo.E),e.Y36(Co.O),e.Y36(Q.Kz),e.Y36(N.D),e.Y36(Q.FF))},i.\u0275cmp=e.Xpm({type:i,selectors:[["templates-slider"]],inputs:{area:"area",productId:"productId",tagId:"tagId",sceneParser:"sceneParser"},decls:1,vars:1,consts:[["class","container-fluid m-0 p-ltrt mt-3",4,"ngIf"],[1,"container-fluid","m-0","p-ltrt","mt-3"],[1,"row","g-0"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],["class","mx-auto mt-13 text-center","style","max-width: 800px;",4,"ngIf"],[1,"templates-thumbs","hometemplate","mb-2","mt-14","p-0","design-template"],[3,"images","isSubscribed","videoPlayShow","footerShow","imageSize","imagePopup","autoPlay","imageClick","previewClick"],["nav",""],[1,"d-flex","justify-content-center","mt-3"],[1,"btn","btn-primary","btn-h48",3,"routerLink","queryParams","click"],[1,"mx-auto","mt-13","text-center",2,"max-width","800px"],[1,"title","text-bold"]],template:function(t,n){1&t&&e.YNc(0,Ao,12,15,"div",0),2&t&&e.Q6J("ngIf",n.area)},dependencies:[g.O5,C.rH,wo.s,yo,To],styles:["@media (max-width: 1200px){.cover-inner[_ngcontent-%COMP%]{position:relative}.home-top-banner[_ngcontent-%COMP%]{min-height:360px;height:unset!important}.home-top-banner-sm[_ngcontent-%COMP%]{display:none}}.home-top-banner[_ngcontent-%COMP%]{background-size:cover;border-radius:12px;height:360px;min-height:360px}.p-40[_ngcontent-%COMP%]{padding:40px}@media (max-width: 576px){.p-40[_ngcontent-%COMP%]{padding:8px}}.padding-process-info[_ngcontent-%COMP%]{padding:60px 40px 40px}@media (max-width: 576px){.padding-process-info[_ngcontent-%COMP%]{padding:20px 0}}"]}),i})();function Zo(i,a){if(1&i&&(e.TgZ(0,"div",20)(1,"p",21),e._uU(2),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.hij("",t.area.desc1," ")}}function ko(i,a){if(1&i&&(e.TgZ(0,"div",16)(1,"div",17)(2,"h1",18),e._uU(3),e.qZA()(),e.YNc(4,Zo,3,1,"div",19),e.qZA()),2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",t.env.isMobileView?"text-32 lh-inherit":"text-48"),e.xp6(1),e.hij("",t.area.title," "),e.xp6(1),e.Q6J("ngIf",t.area.desc1)}}function So(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",27)(1,"button",28),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(4),r=e.oxw();return e.KtG(r.genOrUploadClick(o))}),e._uU(2),e.qZA()()}if(2&i){const t=a.$implicit;e.xp6(2),e.Oqu(null==t?null:t.text)}}function Mo(i,a){if(1&i){const t=e.EpF();
1e.TgZ(0,"div",31)(1,"picture"),e._UZ(2,"source",32),e.ALo(3,"imgwebp"),e.TgZ(4,"img",33),e.NdJ("click",function(){const r=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.loadInputImage(r.url))}),e.qZA()()()}if(2&i){const t=a.$implicit;e.xp6(2),e.s9C("srcset",e.lcZ(3,2,t.thumbUrl||t.url)),e.xp6(2),e.Q6J("src",t.thumbUrl||t.url,e.LSH)}}function Oo(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"span",29),e._uU(2),e.qZA(),e.YNc(3,Mo,5,4,"div",30),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(null==t?null:t.textBelow),e.xp6(1),e.Q6J("ngForOf",null==t?null:t.urls)}}function Uo(i,a){if(1&i&&(e.TgZ(0,"div",27),e.YNc(1,Oo,4,2,"ng-container",9),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",null==t?null:t.urls)}}const He=function(i){return{"bottom-upload":i}};function Jo(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",22),e.YNc(2,So,3,1,"div",23),e.TgZ(3,"input",24,25),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onFileUploaded(o.srcElement.files))})("click",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.value="")}),e.qZA()(),e.TgZ(5,"div",26),e.YNc(6,Uo,2,1,"div",23),e.qZA(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(5,He,t.area.desc1)),e.xp6(1),e.Q6J("ngForOf",null==t.area?null:t.area.links),e.xp6(1),e.Q6J("accept",t.accept)("multiple",t.multiple),e.xp6(3),e.Q6J("ngForOf",null==t.area?null:t.area.links)}}const Qo=function(i,a){return{invalid:i,"border-active":a}},No=function(i){return{"d-none":i}};function qo(i,a){if(1&i){const t=e.EpF();e.ynx(0,34),e.TgZ(1,"div",35)(2,"div",36)(3,"div",37)(4,"input",38),e.NdJ("keyup.enter",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.generatePrompt())})("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.customPrompt=o)}),e.qZA(),e.TgZ(5,"div",39)(6,"span",40),e._uU(7),e.qZA()()(),e.TgZ(8,"div",41)(9,"button",42),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.generatePrompt())}),e._uU(10),e.qZA()()()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(8,He,t.area.desc1)),e.xp6(3),e.Q6J("ngModel",t.customPrompt)("placeholder",t.area.metadata.placeholder)("ngClass",e.WLB(10,Qo,t.customPrompt.length>449,t.customPrompt.length>0)),e.xp6(1),e.Q6J("ngClass",e.VKq(13,No,t.customPrompt.length<401)),e.xp6(1),e.Q6J("ngClass",t.customPrompt.length>449?"text-red":"grey-300"),e.xp6(1),e.hij("",t.customPrompt.length,"/450"),e.xp6(3),e.Oqu(null==t.link?null:t.link.text)}}function Fo(i,a){if(1&i&&e._UZ(0,"img",43),2&i){const t=e.oxw();e.Q6J("alt",t.getAltText(t.area))("src",t.getImgUrl(t.area),e.LSH)}}function Vo(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"video",44),e._UZ(2,"source",45)(3,"source",46),e.qZA(),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("muted","muted"),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"mp4"),e.LSH),e.xp6(1),e.Q6J("src",t.getVideoUrl(t.area,"webm"),e.LSH)}}const Bo=function(i){return{background:i}},Eo=function(i){return{"mx-auto w-100 ms-3":i}},Yo=function(i){return[i]},Ho=function(i){return{"pe-3 pt-5":i}},Lo=function(i){return{"pt-5 pb-5":i}};let jo=(()=>{class i{constructor(t,n,o,r,l,m,_,u){this.dialogService=t,this.createPopupService=n,this.env=o,this.aiUploadImageService=r,this.uploadImageService=l,this.uploadVideoService=m,this.uploadService=_,this.toastService=u,this.homeURL="/",this.params={},this.isVideo=!1,this.customPrompt="",this.imgQueryParams={imageUrl:"",tabName:"",from:"",editorType:""},this.accept="image/*",this.errorMmsg="",this.multiple=!1,this.displayName="",this.type=""}ngOnInit(){var t,n,o,r,l,m;this.isVideo=this.checkIsVideo(this.area&&this.area.images&&this.area.images[0]?this.area.images[0].url:""),this.link=null===(t=this.area)||void 0===t?void 0:t.links[0],this.metadata=null===(n=this.link)||void 0===n?void 0:n.metadata,this.params={from:this.slug,tab:null===(o=this.metadata)||void 0===o?void 0:o.toolName,subTool:null===(r=this.metadata)||void 0===r?void 0:r.subTool},this.metadata.editorType==v.gg.Video?(this.accept=p.t.allowedVideoTypes.join(","),this.errorMmsg=p.t.message.validVideoSupportMessage):this.metadata.editorType==v.gg.ImageTool?this.area.metadata&&this.area.metadata.toolName==p.t.tool.imageCompress?(this.accept=p.t.allowedCompressImageTypes.join(","),this.errorMmsg=p.t.message.uploadImageCompressValidMsg):(this.accept=p.t.allowedImagetoolsMimeTypes.join(","),this.errorMmsg=p.t.message.uploadImageToolValidMsg):this.metadata.editorType==v.gg.VideoEditor&&((null===(l=this.link)||void 0===l?void 0:l.type)==ae.h.Video||(null===(m=this.link)||void 0===m?void 0:m.type)==ae.h.Video_Img)&&(this.accept="image/*, video/mp4, video/x-m4v"),this.metadata.editorType==v.gg.VideoEditor&&(this.multiple=!0),"ph
1oto-editing"==this.type?this.displayEditorType="Photo Editor Tools":"video-editing"==this.type&&(this.displayEditorType="Video Editor Tools")}getAltText(t){return t&&t.images&&t.images[0]?t.images[0].altText:""}getImgUrl(t){return t&&t.images&&t.images[0]?t.images[0].url:t.img1}getVideoUrl(t,n){if("mp4"==n){const o=t&&t.images&&t.images[0]?t.images[0].url:t.img1;return o&&o.replace("webm","mp4")}return t&&t.images&&t.images[0]?t.images[0].url:t.img1}loadInputImage(t){var n,o,r,l,m,_,u,f,M,E;if(this.env.isMobileView)return this.env.openPlayStoreUrl(),!1;if((null===(n=this.metadata)||void 0===n?void 0:n.editorType)==v.gg.AIPhoto)this.aiUploadImageService.aiUploadImage(null,this.params,t).then(ge=>{});else if((null===(o=this.metadata)||void 0===o?void 0:o.editorType)==v.gg.Photo||this.metadata.editorType==v.gg.DesignTemplate){let R=this.dialogService.showProgress();this.imgQueryParams.imageUrl=t,this.imgQueryParams.from=this.slug,this.imgQueryParams.tabName=this.metadata.toolName,this.imgQueryParams.editorType=this.metadata.editorType,this.imgQueryParams.subTool=this.metadata.subTool,(null===(r=this.metadata)||void 0===r?void 0:r.toolName)==v.ux.ProfileMaker?(this.imgQueryParams.targetPage=p.t.targetPage.profilePicture,this.imgQueryParams.pid=null===(l=this.metadata)||void 0===l?void 0:l.id,this.imgQueryParams.stagid=null===(m=this.metadata)||void 0===m?void 0:m.subId):(null===(_=this.metadata)||void 0===_?void 0:_.toolName)==v.ux.ProductShowcase?(this.imgQueryParams.targetPage=p.t.targetPage.productShowcase,this.imgQueryParams.pid=null===(u=this.metadata)||void 0===u?void 0:u.id,this.imgQueryParams.stagid=null===(f=this.metadata)||void 0===f?void 0:f.subId):(null===(M=this.metadata)||void 0===M?void 0:M.toolName)==v.ux.PhotoResizer&&(this.imgQueryParams.targetPage=p.t.targetPage.photoResizer,this.imgQueryParams.pid=null===(E=this.metadata)||void 0===E?void 0:E.id),this.uploadImageService.loadInputImage(this.imgQueryParams,()=>{R.close()})}}onChangeVisibility(t){let n=document.querySelector(".bottom-upload");n&&(n.classList.contains("d-none")&&n.classList.remove("d-none"),t.visible&&scrollY>=360?n.classList.contains("fixed-upload-btn")||n.classList.add("fixed-upload-btn"):n.classList.contains("fixed-upload-btn")&&n.classList.remove("fixed-upload-btn"))}genOrUploadClick(t=null){var n,o,r,l;if(this.env.isMobileView)return this.env.openPlayStoreUrl(),!1;if(!(null!==(n=this.link)&&void 0!==n&&n.type||this.metadata.editorType||this.metadata.toolName))return;const m=(null===(o=this.link)||void 0===o?void 0:o.type)==ae.h.Image||(null===(r=this.link)||void 0===r?void 0:r.type)==ae.h.Video_Img||(null===(l=this.link)||void 0===l?void 0:l.type)==ae.h.Video;this.metadata.editorType==v.gg.Photo||this.metadata.editorType==v.gg.DesignTemplate?this.onOpenUpload():!m||this.metadata.editorType!=v.gg.VideoEditor&&this.metadata.editorType!=v.gg.AIPhoto&&this.metadata.editorType!=v.gg.ImageTool&&this.metadata.editorType!=v.gg.Video?this.aiUploadImageService.loadInputTextToAiEditor({from:this.slug,tab:this.metadata.toolName,subTool:this.metadata.subTool,textPrompt:this.customPrompt,editorType:this.metadata.editorType}):t&&t.click()}onFileUploaded(t){var n,o,r,l;if(!t.length)return;const _=t[0];if((null===(n=this.metadata)||void 0===n?void 0:n.editorType)==v.gg.VideoEditor)return this.uploadVideoService.loadMultipleFilesUpload(t,{slug:this.slug,editorType:this.metadata.editorType,toolName:this.metadata.toolName,subTool:this.metadata.subTool}),!1;if((null===(o=this.metadata)||void 0===o?void 0:o.editorType)==v.gg.AIPhoto)this.aiUploadImageService.aiUploadImage(_,{slug:this.slug,editorType:this.metadata.editorType,tab:this.metadata.toolName,subTool:this.metadata.subTool});else if((null===(r=this.metadata)||void 0===r?void 0:r.editorType)==v.gg.ImageTool){let u=window.URL.createObjectURL(_);this.uploadImageService.slug=this.slug,this.uploadImageService.loadPhotoEditingImage(u,_.name,_.size,this.metadata.toolName,()=>{})}else(null===(l=this.metadata)||void 0===l?void 0:l.editorType)==v.gg.Video&&this.uploadService.onVideoUploaded(_,p.t.processType.convert,u=>{var f;u&&this.uploadImageService.loadInputVideo(this.slug,null===(f=this.metadata)||void 0===f?void 0:f.editorType,{videoUrl:u.contentUrl,keyName:u.keyName,assetId:u.assetId,fileSize:_.size,systemRefKey:u.systemRefKey,name:_.n
1ame},()=>{})},u=>{this.toastService.showErrorOptions({msg:u?.description||u?.message||u?.msg||p.t.message.errorOnUploadVideo,cssClass:"full"})})}onOpenUpload(){var t,n,o,r,l,m,_,u,f,M,E,R,ge,_e;this.env.isMobileView&&(null===(t=this.metadata)||void 0===t?void 0:t.toolName)!=p.t.tool.removeBg&&(null===(n=this.metadata)||void 0===n?void 0:n.toolName)!=p.t.tool.profileMaker&&(null===(o=this.metadata.subTool)||void 0===o?void 0:o.subTool)!=p.t.subTool.resize?this.env.openPlayStoreUrl():(this.imgQueryParams.from=this.slug,this.imgQueryParams.slug=this.slug,this.imgQueryParams.tabName=null===(r=this.metadata)||void 0===r?void 0:r.toolName,this.imgQueryParams.editorType=null===(l=this.metadata)||void 0===l?void 0:l.editorType,this.imgQueryParams.subTool=null===(m=this.metadata)||void 0===m?void 0:m.subTool,(null===(_=this.metadata)||void 0===_?void 0:_.toolName)==v.ux.ProfileMaker?(this.imgQueryParams.targetPage=p.t.targetPage.profilePicture,this.imgQueryParams.pid=null===(u=this.metadata)||void 0===u?void 0:u.id,this.imgQueryParams.stagid=null===(f=this.metadata)||void 0===f?void 0:f.subId):(null===(M=this.metadata)||void 0===M?void 0:M.toolName)==v.ux.ProductShowcase?(this.imgQueryParams.targetPage=p.t.targetPage.productShowcase,this.imgQueryParams.pid=null===(E=this.metadata)||void 0===E?void 0:E.id,this.imgQueryParams.stagid=null===(R=this.metadata)||void 0===R?void 0:R.subId):(null===(ge=this.metadata)||void 0===ge?void 0:ge.toolName)==v.ux.PhotoResizer&&(this.imgQueryParams.targetPage=p.t.targetPage.photoResizer,this.imgQueryParams.pid=null===(_e=this.metadata)||void 0===_e?void 0:_e.id),this.createPopupService.editorUploadImageModal(this.imgQueryParams,Ka=>{}))}generatePrompt(){this.aiUploadImageService.loadInputTextToAiEditor({from:this.slug,tab:this.metadata.toolName,subTool:this.metadata.subTool,textPrompt:this.customPrompt,editorType:this.metadata.editorType})}checkIsVideo(t){const n=t&&t.split(".").pop().split(/\#|\?/)[0];return"mp4"==n||"webm"==n}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(Ve.D),e.Y36(Ie.A),e.Y36(N.D),e.Y36(oe.V),e.Y36(L.u),e.Y36(Ee.F),e.Y36(Ye.C),e.Y36(ce.k))},i.\u0275cmp=e.Xpm({type:i,selectors:[["mixed-banner-header"]],inputs:{area:"area",slug:"slug",displayName:"displayName",type:"type"},decls:22,vars:24,consts:[[1,"topBanner","d-flex","align-items-center","position-relative",3,"ngStyle"],[1,"lightThemeBreadcrumb","ml-40","position-absolute","d-flex","align-items-center","justify-content-start",2,"top","12px",3,"ngClass"],[3,"routerLink"],["name","lightbreadcrumbarrow",1,"ms-1","me-1","hw-24","d-inline-flex"],[1,"orange-text"],[1,"row","g-0","pt-0","overflow-hidden","w-100","area-inner","mx-auto","pe-0","pb-0",3,"ngClass"],[1,"col-lg-6","col-xl-6","p-0","align-self-center","order-1"],[1,"text-center","text-lg-start"],["class","mb-13",4,"ngIf"],[4,"ngIf"],["class","aiBannerHeader",4,"ngIf"],["observeVisibility","",3,"obsIntersectTarget","obsChange"],["nameuplod",""],[1,"col-lg-6","col-xl-6","p-0","order-2",3,"ngClass"],[1,"pt-4","pt-lg-0","text-center"],["class","responsive","height","600px","width","600px",3,"alt","src",4,"ngIf"],[1,"mb-13"],[1,""],[1,"text-white","pt-4","pt-lg-0",3,"ngClass"],["class","mt-9",4,"ngIf"],[1,"mt-9"],[1,"text-xxl","lh-p1","text-white","text-semi"],[1,"upload-btn","d-flex","p-0",3,"ngClass"],["class","text-left",4,"ngFor","ngForOf"],["id","fileInputId","name","fileInputId","type","file",1,"custom-file-input","d-none",3,"accept","multiple","change","click"],["file",""],[1,"d-flex","w-100","flex-column"],[1,"text-left"],[1,"btn","btn-white","text-primary","btn-h48","me-2",3,"click"],[1,"text-center","text-lg-start","text-semi","text-white","text-lg","mt-13","mb-2","d-block","w-100","text-center","text-lg-start"],["class","mr-9 pointer bottom-upload d-inline-flex",4,"ngFor","ngForOf"],[1,"mr-9","pointer","bottom-upload","d-inline-flex"],["type","image/webp",3,"srcset"],["loading","lazy","width","56px","height","56px","alt","Sample Image",1,"rounded-8","sample-image-upload",2,"max-height","56px",3,"src","click"],[1,"aiBannerHeader"],[1,"upload-btn","aiBannerHeader",3,"ngClass"],[1,"position-relative","inputSearch"],[1,"form-group","position-relative"],["maxlength","450","type","search","aria-describedby","search",1,"form-control",2,"height","64px",3,"ngModel","placeholder","ngClass","keyup.enter","ngModelChange"],[1,"position-absolute","top-0","h-100","d-flex","align-items-center",2,"right","124px","width","60px",3,"ngClass"],[1,"counter","text-11","ps-3",3,"ngClass"],[1,"position-absolute","top-0","right-0","p-2"],[1,"btn","btn-primary","d-flex","align-items-center","btn-h48","pe-3","ps-3","btnGenerate",3,"click"],["height","600px","width","600px",1,"responsive",3,"alt","src"],["width","100%","height","100%","autoplay","","loop","",1,"video-box","p-0","rounded-24",2,"max-width","520px","max-height","520px",3,"muted"],["type","video/mp4",3,"src"],["type","video/webm",3,"src"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"a",2),e._uU(3,"Home"),e.qZA(),e._UZ(4,"pi",3),e.TgZ(5,"a",2),e._uU(6),e.qZA(),e._UZ(7,"pi",3),e.TgZ(8,"span",4),e._uU(9),e.qZA()(),e.TgZ(10,"div",5)(11,"div",6)(12,"div",7),e.YNc(13,ko,5,3,"div",8),e.YNc(14,Jo,7,7,"ng-container",9),e.YNc(15,qo,11,15,"ng-container",10),e.TgZ(16,"div",11,12),e.NdJ("obsChange",function(r){return n.onChangeVisibility(r)}),e.qZA()()(),e.TgZ(18,"div",13)(19,"div",14),e.YNc(20,Fo,1,2,"img",15),e.YNc(21,Vo,4,3,"ng-container",9),e.qZA()()()()),2&t){const o=e.MAs(17);e.Q6J("ngStyle",e.VKq(14,Bo,n.area.bgColors)),e.xp6(1),e.Q6J("ngClass",e.VKq(16,Eo,n.env.isMobileView)),e.xp6(1),e.Q6J("routerLink",e.VKq(18,Yo,n.homeURL)),e.xp6(3),e.Q6J("routerLink","/"+n.type),e.xp6(1),e.Oqu(n.displayEditorType),e.xp6(3),e.Oqu(n.displayName),e.xp6(1),e.Q6J("ngClass",e.VKq(20,Ho,n.env.isMobileView)),e.xp6(3),e.Q6J("ngIf",n.area.title),e.xp6(1),e.Q6J("ngIf","Generate_With_Text"!=(null==n.link?null:n.link.type)),e.xp6(1),e.Q6J("ngIf","Generate_With_Text"==(null==n.link?null:n.link.type)),e.xp6(1),e.Q6J("obsIntersectTarget",o),e.xp6(2),e.Q6J("ngClass",e.VKq(22,Lo,n.isVideo)),e.xp6(2),e.Q6J("ngIf",!n.isVideo),e.xp6(1),e.Q6J("ngIf",n.isVideo)}},dependencies:[g.mk,g.sg,g.O5,g.PC,w.Fj,w.JJ,w.nD,w.On,C.rH,te.G,we,V.I],styles:[".btnAiBanner[_ngcontent-%COMP%]{background:rgba(255,255,255,.25);height:48px;font-size:16px;color:#fff!important;border-radius:12px}
1.btnAiBanner[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.35)}.fixed-upload-btn[_ngcontent-%COMP%]{justify-content:center}.fixed-upload-btn[_ngcontent-%COMP%] .btn-none[_ngcontent-%COMP%]{display:none}.gradientHeading[_ngcontent-%COMP%]{background:linear-gradient(90deg,#BC9BFF 16.37%,#FFE7AB 78.43%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}@media (max-width: 980px){.upload-btn[_ngcontent-%COMP%]{justify-content:center}}@media (max-width: 576px){.upload-btn[_ngcontent-%COMP%]{justify-content:center}.upload-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:0!important}}.fixed-upload-btn[_ngcontent-%COMP%]{padding:8px}.fixed-upload-btn[_ngcontent-%COMP%] .inputSearch[_ngcontent-%COMP%]{width:40%;margin:auto}.fixed-upload-btn[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:56px!important}h1[_ngcontent-%COMP%]{line-height:125%}"]}),i})();var Ko=d(4807);function Do(i,a){if(1&i&&e._UZ(0,"story-upload-area",23),2&i){const t=e.oxw(),n=t.$implicit,o=t.even,r=t.index,l=e.oxw(3);e.Tol(l.slug),e.Q6J("area",n)("even",!o&&0==r)("storyProps",l.storyProps)}}function Go(i,a){if(1&i&&e._UZ(0,"ai-banner-header",24),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("storyProps",n.storyProps)}}function $o(i,a){if(1&i&&e._UZ(0,"story-upload-area",25),2&i){const t=e.oxw(),n=t.$implicit,o=t.even,r=t.index,l=e.oxw(3);e.Tol(l.slug),e.Q6J("area",n)("even",o&&0==r)("displayName",l.storyPage.displayName)("type",l.storyPage.type)("metadata",l.metadata)}}function zo(i,a){if(1&i&&e._UZ(0,"story-tutorial-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function Ro(i,a){if(1&i&&e._UZ(0,"story-video-tutorial-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function Xo(i,a){if(1&i&&e._UZ(0,"story-section-area",27),2&i){const t=e.oxw(),n=t.$implicit,o=t.even,r=t.index,l=e.oxw(3);e.Q6J("area",n)("even",o)("metadata",l.metadata)("index",r)}}function Wo(i,a){if(1&i&&e._UZ(0,"mixed-section-area",28),2&i){const t=e.oxw(),o=t.even,r=t.index;e.Q6J("area",t.$implicit)("even",o)("index",r)}}function ea(i,a){if(1&i&&e._UZ(0,"image-preview-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ta(i,a){if(1&i&&e._UZ(0,"remove-bg-preview-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function na(i,a){if(1&i&&e._UZ(0,"story-animated-banner-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ia(i,a){if(1&i&&e._UZ(0,"story-faq-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function oa(i,a){if(1&i&&e._UZ(0,"story-photo-footer-area",29),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("type",n.storyPage.type)}}function aa(i,a){if(1&i&&e._UZ(0,"story-heading-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ra(i,a){if(1&i&&e._UZ(0,"ai-banner-header",30),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("displayName",n.storyPage.displayName)("type",n.storyPage.type)("area",t)("slug",n.slug)}}function sa(i,a){if(1&i&&e._UZ(0,"mixed-banner-header",30),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("displayName",n.storyPage.displayName)("type",n.storyPage.type)("area",t)("slug",n.slug)}}function la(i,a){if(1&i&&e._UZ(0,"ai-banner-header",31),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("displayName",n.storyPage.displayName)("type",n.storyPage.type)("slug",n.slug)}}function ca(i,a){if(1&i&&e._UZ(0,"ai-banner-header-v1",32),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("displayName",n.storyPage.displayName)("type",n.storyPage.type)("area",t)("slug",n.slug)("editorType",null==n.metadata?null:n.metadata.editorType)}}function da(i,a){if(1&i&&e._UZ(0,"ai-banner-header-v1",32),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("displayName",n.storyPage.displayName)("type",n.storyPage.type)("area",t)("slug",n.slug)("editorType",null==n.metadata?null:n.metadata.editorType)}}function pa(i,a){if(1&i&&e._UZ(0,"ai-tutorial-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ga(i,a){if(1&i&&e._UZ(0,"ai-preview-area",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ma(i,a){if(1&i&&e._UZ(0,"ai-prompt-preview-area",33),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("slug",n.slug)("tab",null==n.metadata?null:n.metadata.toolName)("subTool",null==n.metadata?null:n.metadata.subTool)}}function ua(i,a){if(1&i&&e._UZ(0,"ai-bottom-banner",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function _a(i,a){if(1&i&&e._UZ(0,"ai-bottom-banner",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ha(i,a){if(1&i&&e._UZ(0,"tutorial-area-v1",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function va(i,a){if(1&i&&e._UZ(0,"ai-animated-banner-area",34),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("toolName",null==n.metadata?null:n.metadata.toolName)("_sId",null==n.metadata?null:n.metadata._sId)}}function xa(i,a){if(1&i&&e._UZ(0,"ai-animated-banner-area",34),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("toolName",null==n.metadata?null:n.metadata.toolName)("_sId",null==n.metadata?null:n.metadata._sId)}}function fa(i,a){if(1&i&&e._UZ(0,"templates-slider",35),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("sceneParser",n.sceneParser)}}function ba(i,a){if(1&i&&e._UZ(0,"ai-preview-area-variant2",33),2&i){const t=e.oxw().$implicit,n=e.oxw(3);e.Q6J("area",t)("slug",n.slug)("tab",null==n.metadata?null:n.metadata.toolName)("subTool",null==n.metadata?null:n.metadata.subTool)}}function Ca(i,a){if(1&i&&e._UZ(0,"in-page-pricing",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function wa(i,a){if(1&i&&e._UZ(0,"ai-all-tools",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function ya(i,a){if(1&i&&e._UZ(0,"ai-banner-slider",26),2&i){const t=e.oxw().$implicit;e.Q6J("area",t)}}function Ta(i,a){if(1&i&&e._UZ(0,"ai-slide-preview-area",36),2&i){const t=e.oxw(),o=t.$implicit;e.Q6J("even",t.even)("area",o)}}function Pa(i,a){if(1&i&&(e.ynx(0),e._UZ(1,"div",37),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("innerHTML",t,e.oJD)}}function Aa(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"div",7),e.YNc(2,Do,1,6,"story-upload-area",8),e.YNc(3,Go,1,2,"ai-banner-header",9),e.YNc(4,$o,1,8,"story-upload-area",10),e.YNc(5,zo,1,1,"story-tutorial-area",11),e.YNc(6,Ro,1,1,"story-video-tutorial-area",11),e.YNc(7,Xo,1,4,"story-section-area",12),e.YNc(8,Wo,1,3,"mixed-section-area",13),e.YNc(9,ea,1,1,"image-preview-area",11),e.YNc(10,ta,1,1,"remove-bg-preview-area",11),e.YNc(11,na,1,1,"story-animated-banner-area",11),e.YNc(12,ia,1,1,"story-faq-area",11),e.YNc(13,oa,1,2,"story-photo-footer-area",14),e.YNc(14,aa,1,1,"story-heading-area",11),e.YNc(15,ra,1,4,"ai-banner-header",15),e.YNc(16,sa,1,4,"mixed-banner-header",15),e.YNc(17,la,
11,4,"ai-banner-header",16),e.YNc(18,ca,1,5,"ai-banner-header-v1",17),e.YNc(19,da,1,5,"ai-banner-header-v1",17),e.YNc(20,pa,1,1,"ai-tutorial-area",11),e.YNc(21,ga,1,1,"ai-preview-area",11),e.YNc(22,ma,1,4,"ai-prompt-preview-area",18),e.YNc(23,ua,1,1,"ai-bottom-banner",11),e.YNc(24,_a,1,1,"ai-bottom-banner",11),e.YNc(25,ha,1,1,"tutorial-area-v1",11),e.YNc(26,va,1,3,"ai-animated-banner-area",19),e.YNc(27,xa,1,3,"ai-animated-banner-area",19),e.YNc(28,fa,1,2,"templates-slider",20),e.YNc(29,ba,1,4,"ai-preview-area-variant2",18),e.YNc(30,Ca,1,1,"in-page-pricing",11),e.YNc(31,wa,1,1,"ai-all-tools",11),e.YNc(32,ya,1,1,"ai-banner-slider",11),e.YNc(33,Ta,1,2,"ai-slide-preview-area",21),e.YNc(34,Pa,2,1,"ng-container",22),e.qZA(),e.BQk()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase","banner-header-1"),e.xp6(1),e.Q6J("ngSwitchCase","banner-header-2"),e.xp6(1),e.Q6J("ngSwitchCase","upload"),e.xp6(1),e.Q6J("ngSwitchCase","steps"),e.xp6(1),e.Q6J("ngSwitchCase","video"),e.xp6(1),e.Q6J("ngSwitchCase","section"),e.xp6(1),e.Q6J("ngSwitchCase","mixed-section"),e.xp6(1),e.Q6J("ngSwitchCase","image-preview"),e.xp6(1),e.Q6J("ngSwitchCase","tab-image-preview-area"),e.xp6(1),e.Q6J("ngSwitchCase","slider-tab-image-preview"),e.xp6(1),e.Q6J("ngSwitchCase","questions"),e.xp6(1),e.Q6J("ngSwitchCase","discover-tools"),e.xp6(1),e.Q6J("ngSwitchCase","heading"),e.xp6(1),e.Q6J("ngSwitchCase","ai-banner-header"),e.xp6(1),e.Q6J("ngSwitchCase","mixed-banner-header"),e.xp6(1),e.Q6J("ngSwitchCase","ai-banner"),e.xp6(1),e.Q6J("ngSwitchCase","ai-banner-header-v1"),e.xp6(1),e.Q6J("ngSwitchCase","ai-banner-header-v2"),e.xp6(1),e.Q6J("ngSwitchCase","aisteps"),e.xp6(1),e.Q6J("ngSwitchCase","ai-image-preview"),e.xp6(1),e.Q6J("ngSwitchCase","ai-prompt-area"),e.xp6(1),e.Q6J("ngSwitchCase","ai-footer-area"),e.xp6(1),e.Q6J("ngSwitchCase","footer-1"),e.xp6(1),e.Q6J("ngSwitchCase","stepsV1"),e.xp6(1),e.Q6J("ngSwitchCase","tab-image-with-prompt"),e.xp6(1),e.Q6J("ngSwitchCase","ai-animated-banner"),e.xp6(1),e.Q6J("ngSwitchCase","templates-slider"),e.xp6(1),e.Q6J("ngSwitchCase","ai-image-preview-v2"),e.xp6(1),e.Q6J("ngSwitchCase","in-page-pricing"),e.xp6(1),e.Q6J("ngSwitchCase","ai-all-tools"),e.xp6(1),e.Q6J("ngSwitchCase","ai-banner-slider"),e.xp6(1),e.Q6J("ngSwitchCase","ai-slide-image-preview"),e.xp6(1),e.Q6J("ngSwitchCase","raw-html")}}function Ia(i,a){if(1&i&&(e.TgZ(0,"div",5),e.YNc(1,Aa,35,34,"ng-container",6),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.storyPage.sections)}}function Za(i,a){1&i&&(e.ynx(0),e._UZ(1,"element-placeholder",38),e.BQk()),2&i&&(e.xp6(1),e.Q6J("view","storyThumb"))}function ka(i,a){1&i&&(e.ynx(0),e._UZ(1,"element-placeholder",38),e.BQk()),2&i&&(e.xp6(1),e.Q6J("view","storymobileThumb"))}function Sa(i,a){if(1&i&&(e.YNc(0,Ia,2,1,"div",3),e.YNc(1,Za,2,1,"ng-container",4),e.YNc(2,ka,2,1,"ng-container",4)),2&i){const t=e.oxw();e.Q6J("ngIf",t.isLoaded&&t.storyPage),e.xp6(1),e.Q6J("ngIf",!t.isLoaded&&!t.env.isMobileView),e.xp6(1),e.Q6J("ngIf",!t.isLoaded&&t.env.isMobileView)}}function Ma(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",39)(1,"div",40)(2,"pi",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.isShown=!1)}),e.qZA()(),e.TgZ(3,"div",42),e._uU(4," Drop an image anywhere to upload "),e.TgZ(5,"div",43),e._uU(6," Upload one image at a time "),e.qZA()()()}if(2&i){const t=e.oxw();e.Q6J("ngClass",t.isShown?"show":"d-none")}}const Ua=[{path:"",component:S.Z,children:[]},{path:":slug",component:(()=>{class i{constructor(t,n,o,r,l,m,_,u,f,M){this.storyPageService=t,this.route=n,this.seoService=o,this.uploadImageService=r,this.router=l,this.tostr=m,this.env=_,this.modalService=u,this.authService=f,this.sceneParser=M,this.isAiIosUrl=!1,this.homeURL="/",this.photoeditorTool="Photo Editor Tool",this.allowedImagetoolsMimeTypes=p.t.allowedImagetoolsMimeTypes,this.isLoaded=!1,this.slug="",this.files=[],this.errorMmsg=p.t.message.validImageMessageForEdit,this.isShown=!1,this.user=this.authService.currentUser(),this.route.params.subscribe(E=>{this.langcode=this.route.snapshot.paramMap.get("langcode"),this.onLoad()}
1),this.queryParams=this.route.snapshot.queryParams,this.user=this.authService.currentUser(),this.setHomeUrl(),this.loggedInObserver=this.authService.loggedIn.subscribe(E=>{this.user=this.authService.currentUser(),this.setHomeUrl()}),this.usrPropChangedObserver=this.authService.usrPropChanged.subscribe(E=>{this.user=this.authService.currentUser(),this.setHomeUrl()})}setHomeUrl(){this.homeURL=this.user?p.t.AFTER_LOGIN_REDIRATION_URI:"/"}ngAfterViewInit(){setTimeout(()=>{window.scrollTo(0,0)},10)}onLoad(){this.isLoaded=!1,this.slug=this.route.snapshot.paramMap.get("slug"),this.slug&&this.getStoryPage()}setLangUrls(){var t;this.storyPageService.storyPageLanguageListing(p.t.photoEditor.type,p.t.pageType,this.slug,null===(t=this.metadata)||void 0===t?void 0:t.targetTool,n=>{this.seoService.setLangUrls(n.body.storyPage,p.t.photoEditor.type,this.slug)},n=>{})}ngOnInit(){}getStoryPage(){this.storyPageService.getStoryPageContent(p.t.photoEditor.type,p.t.pageType,this.slug,t=>{var n;if(this.storyPage=t.body.storyPage,this.storyPage){const{type:o,subType:r,displayName:l,productId:m,metadata:_}=this.storyPage;this.storyProps={type:o,subType:r,displayName:l,productId:m,metadata:_},this.metadata=this.storyPage.sections[0].metadata,this.seoService.updatePageTitle(this.storyPage.pageTitle),this.seoService.updatePageMeta("description",this.storyPage.pageDescription),this.seoService.updateLang(this.langcode),this.setLangUrls(),this.isLoaded=!0;let u=this.seoService.generateBreadcrumbSchema([{name:"Home",url:y.N.siteUrl+"/"},{name:this.photoeditorTool,url:y.N.siteUrl+"/"+this.storyPage.type+"/"},{name:this.storyPage.displayName,url:y.N.siteUrl+this.router.url}]);this.seoService.addBreadcrumbSchemaToDOM(u),this.fileUploadAccept=this.uploadImageService.getFileAccept(null===(n=this.metadata)||void 0===n?void 0:n.editorType)}else this.notFound()},t=>{t&&1e3===t.statusCode&&this.notFound()},this.langcode)}notFound(){this.router.navigate(["/404"],{skipLocationChange:!0})}dropped(t){this.files=t;for(const n of t)n.fileEntry.isFile&&n.fileEntry.file(r=>{this.droppedFile(r)})}fileOver(t){this.isShown=!0,document.documentElement.style.overflow="hidden"}fileLeave(t){this.isShown=!1,document.documentElement.style.overflow="scroll"}droppedFile(t){document.documentElement.style.overflow="auto",this.onFileUploadedDrop(t),this.isShown=!1}onFileUploadedDrop(t){this.uploadImageService.allowedMimeTypes.indexOf(t.type)<0?this.tostr.showErrorSingle(this.errorMmsg):t&&this.uploadImageService.uploadFileFn(t)}ngOnDestroy(){this.seoService.setDefaultLang(),this.modalService.hasOpenModals()&&this.modalService.dismissAll("")}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(T.d),e.Y36(C.gz),e.Y36(X.L),e.Y36(L.u),e.Y36(C.F0),e.Y36(ce.k),e.Y36(N.D),e.Y36(Q.FF),e.Y36(W.e),e.Y36(s.n))},i.\u0275cmp=e.Xpm({type:i,selectors:[["photo-story-page"]],decls:4,vars:2,consts:[["dropZoneLabel","Drop files here","multiple","false","dropZoneClassName","","contentClassName","",3,"accept","onFileOver"],["ngx-file-drop-content-tmp","","class",""],["dropZoneLabel","Drop files here","multiple","false","dropZoneClassName","","contentClassName","",3,"accept","onFileDrop","onFileLeave"],["style","margin-top:72px","class","top-ads-balance",4,"ngIf"],[4,"ngIf"],[1,"top-ads-balance",2,"margin-top","72px"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],[3,"class","area","even","storyProps",4,"ngSwitchCase"],[3,"area","storyProps",4,"ngSwitchCase"],[3,"class","area","even","displayName","type","metadata",4,"ngSwitchCase"],[3,"area",4,"ngSwitchCase"],[3,"area","even","metadata","index",4,"ngSwitchCase"],[3,"area","even","index",4,"ngSwitchCase"],[3,"area","type",4,"ngSwitchCase"],[3,"displayName","type","area","slug",4,"ngSwitchCase"],[3,"area","displayName","type","slug",4,"ngSwitchCase"],[3,"displayName","type","area","slug","editorType",4,"ngSwitchCase"],[3,"area","slug","tab","subTool",4,"ngSwitchCase"],[3,"area","toolName","_sId",4,"ngSwitchCase"],[3,"area","sceneParser",4,"ngSwitchCase"],[3,"even","area",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"area","even","storyProps"],[3,"area","storyProps"],[3,"area","even","displayName","type","metadata"],[3,"area"],[3,"area","even","metadata","index"],[3,"area","even","index"],[3,"area","type"],[3,"displayName","type","area","slug"],[3,"area","displayName","type","slug"],[3,"displayName","type","area","slug","editorType"],[3,"area","slug","tab","subTool"],[3,"area","toolName","_sId"],[3,"area","sceneParser"],[3,"even","area"],[3,"innerHTML"],[3,"view"],["id","divshow",1,"row","g-0","centered","position-fixed","w-100",3,"ngClass"],[1,"d-flex","align-items-center","justify-content-center","close"],["name","close",1,"f-30",3,"click"],[1,"d-flex","flex-column","align-items-center","justify-content-center","w-100","drag-drop-text","text-center",2,"height","100vh"],[1,"secondary-text","text-semi","mt-3",2,"z-index","-99"]],template:function(t,n){1&t&&(e.TgZ(0,"ngx-file-drop",0),e.NdJ("onFileOver",function(r){return n.fileOver(r)}
1),e.YNc(1,Sa,3,3,"ng-template",1),e.qZA(),e.TgZ(2,"ngx-file-drop",2),e.NdJ("onFileDrop",function(r){return n.dropped(r)})("onFileLeave",function(r){return n.fileLeave(r)}),e.YNc(3,Ma,7,1,"ng-template",1),e.qZA()),2&t&&(e.s9C("accept",n.fileUploadAccept),e.xp6(2),e.s9C("accept",n.fileUploadAccept))},dependencies:[g.mk,g.sg,g.O5,g.RF,g.n9,c.J,x.CB,x.L9,h.T,b,Z,U,Ct,wt.K,Pt,At.q,Jt,zt,en,mn,fn,bn.g,An,Qn,ri,_i,wi,Yi,Li,no,xo,Io,jo,te.G,Ko.Y],styles:["ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;font-size:18px;line-height:23px;padding:1.3rem 1rem}ul.premium[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(odd){background:#5063ea}ul.premium[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(even){background:#475ae7}@media (max-width: 576px){.ltrt-80[_ngcontent-%COMP%]{padding-left:20px!important;padding-right:20px!important}}@media (min-width: 577px){.ltrt-80[_ngcontent-%COMP%]{padding-left:80px!important;padding-right:80px!important}}.active[_ngcontent-%COMP%]{color:#f58c24}.show[_ngcontent-%COMP%]{display:block}.centered[_ngcontent-%COMP%]{background:rgba(248,249,249,.8);-webkit-backdrop-filter:blur(40px);backdrop-filter:blur(40px);top:0;z-index:1002}.centered[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:32px;font-family:Inter semibold;color:#2e2d2d;line-height:43.58px;margin-bottom:0}.centered[_ngcontent-%COMP%] .secondary-text[_ngcontent-%COMP%]{font-size:20px;font-family:Inter semibold;color:#2e2d2d;line-height:36px}.drag-drop-text[_ngcontent-%COMP%]{font-size:32px;font-family:Inter semibold;color:#2e2d2d;line-height:43.58px;margin-bottom:0}.close[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:20px;right:20px;background:rgba(39,43,52,.4);border-radius:50%;width:40px;height:40px;background-size:contain;padding:0;opacity:1!important;z-index:1003;font-size:0}.close[_ngcontent-%COMP%]:hover{background:#2E2D2D}"]}),i})()}];let Ja=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[C.Bz.forChild(Ua),C.Bz]}),i})();var Qa=d(4519),Na=d(4110),qa=d(7296),Fa=d(9668),Va=d(4586),Ba=d(7595),Ea=d(1094),Ya=d(337),Ha=d(8010);const La={suppressScrollX:!0,wheelSpeed:.3};let ja=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i,bootstrap:[S.Z]}),i.\u0275inj=e.cJS({providers:[{provide:J.op,useValue:La},Q.Kz],imports:[g.ez,w.u5,F.m,w.UX,Ja,O.X,Q.ZQ,x.Yi,Q.jF,Q.ZS,Q.IJ,P.E,Qa.s,Na.j,qa.Rq,Fa.v,Va.D,Ze.A0,Ba.H,Ea.yI.forRoot(),Ya.N,Ha.r]}),i})()},7596:()=>{(()=>{"use strict";var fe={792:(g,J,O)=>{O.d(J,{Z:()=>Q});var F=O(609),w=O.n(F)()(function(x){return x[1]});w.push([g.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;
1border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const Q=w},609:g=>{g.exports=function(J){var O=[];return O.toString=function(){return this.map(function(F){var w=J(F);return F[2]?"@media ".concat(F[2]," {").concat(w,"}"):w}).join("")},O.i=function(F,w,Q){"string"==typeof F&&(F=[[null,F,""]]);var x={};if(Q)for(var P=0;P<this.length;P++){var C=this[P][0];null!=C&&(x[C]=!0)}for(var S=0;S<F.length;S++){var p=[].concat(F[S]);Q&&x[p[0]]||(w&&(p[2]=p[2]?"".concat(w," and ").concat(p[2]):w),O.push(p))}},O}}},re={};function d(g){var J=re[g];if(void 0!==J)return J.exports;var O=re[g]={id:g,exports:{}};return fe[g](O,O.exports,d),O.exports}d.n=g=>{var J=g&&g.__esModule?()=>g.default:()=>g;return d.d(J,{a:J}),J},d.d=(g,J)=>{for(var O in J)d.o(J,O)&&!d.o(g,O)&&Object.defineProperty(g,O,{enumerable:!0,get:J[O]})},d.o=(g,J)=>Object.prototype.hasOwnProperty.call(g,J),(()=>{var g=d(792);const J="rendered",O=(S,p)=>{const y=S.getBoundingClientRect();let e,T;return"mousedown"===p.type?(e=p.clientX,T=p.clientY):(e=p.touches[0].clientX,T=p.touches[0].clientY),e>=y.x&&e<=y.x+y.width&&T>=y.y&&T<=y.y+y.height},F=document.createElement("template");F.innerHTML='<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> ';const w={ArrowLeft:-1,ArrowRight:1},Q=["horizontal","vertical"],x=S=>({x:S.touches[0].pageX,y:S.touches[0].pageY}),P=S=>({x:S.pageX,y:S.pageY});class C extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.handle=!1,this.onMouseMove=e=>{if(this.isMouseDown||this.slideOnHover){const T=P(e);this.slideToPage(T)}},this.bodyUserSelectStyle="",this.onMouseDown=e=>{if(this.slideOnHover||this.handle&&!O(this.handleElement,e))return;e.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const T=P(e);this.slideToPage(T),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=e=>{this.handle&&!O(this.handleElement,e)||(this.touchStartPoint=x(e),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=e=>{if(null===this.touchStartPoint)return;const T=x(e);if(this.isTouchComparing)return this.slideToPage(T),e.preventDefault(),!1;if(!this.hasTouchMoved){const X=Math.abs(T.y-this.touchStartPoint.y),L=Math.abs(T.x-this.touchStartPoint.x);if("horizontal"===this.slideDirection&&X<L||"vertical"===this.slideDirection&&X>L)return this.isTouchComparing=!0,this.focus(),this.slideToPage(T),e.preventDefault(),!1;this.hasTouchMoved=!0}
1},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=e=>{if("disabled"===this.keyboard)return;const T=w[e.key];this.animationDirection!==T&&void 0!==T&&(this.animationDirection=T,this.startSlideAnimation())},this.onKeyUp=e=>{if("disabled"===this.keyboard)return;const T=w[e.key];void 0!==T&&this.animationDirection===T&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const p=this.attachShadow({mode:"open"}),y=document.createElement("style");y.innerHTML=g.Z,this.getAttribute("nonce")&&y.setAttribute("nonce",this.getAttribute("nonce")),p.appendChild(y),p.appendChild(F.content.cloneNode(!0)),this.firstElement=p.getElementById("first"),this.secondElement=p.getElementById("second"),this.handleElement=p.getElementById("handle")}get value(){return this.exposure}set value(p){const y=parseFloat(p);y!==this.exposure&&(this.exposure=y,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(p){this.slideOnHover="false"!==p.toString().toLowerCase(),this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(p){this.slideDirection=p.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...Q),Q.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",p=>(p.preventDefault(),!1)),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&"disabled"===this.getAttribute("keyboard")?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle"),this.hover=!!this.hasAttribute("hover")&&this.getAttribute("hover"),this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):"horizontal",this.resetDimensions(),this.classList.contains(J)||this.classList.add(J),this.querySelectorAll('[slot="before"], [slot="after"]').length>0&&console.warn('<img-comparison-slider>: slot names "before" and "after" are deprecated and soon won\'t be supported. Please use slot="first" instead of slot="after", and slot="second" instead of slot="before".')}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(p,y,e){"hover"===p&&(this.hover=e),"direction"===p&&(this.direction=e),"keyboard"===p&&(this.keyboard="disabled"===e?"disabled":"enabled")}setExposure(p=0){var y;this.exposure=(y=this.exposure+p)<0?0:y>100?100:y,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(p=0){this.setExposure(p);const y=new Event("slide");this.dispatchEvent(y)}slideToPage(p){"horizontal"===this.slideDirection&&this.slideToPageX(p.x),"vertical"===this.slideDirection&&this.slideToPageY(p.y)}slideToPageX(p){const y=p-this.getBoundingClientRect().left-window.scrollX;this.exposure=y/this.imageWidth*100,this.slide(0)}slideToPageY(p){const y=p-this.getBoundingClientRect().top-window.scrollY;this.exposure=y/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout(()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null},100)}startSlideAnimation(){let p=null,y=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const e=T=>{0!==this.animationDirection&&y===this.animationDirection&&(null===p&&(p=T),this.slide((T-p)/16.666666666666668*this.animationDirection),setTimeout(()=>window.requestAnimationFrame(e),0),p=T)};window.requestAnimationFrame(e)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}typeof window<"u"&&window.customElements.define("img-comparison-slider",C)})()})()},8666:fe=>{"use strict";function re(x,P){if(!(x instanceof P))throw new TypeError("Cannot call a class as a function")}function d(x,P,C){return P in x?Object.defineProperty(x,P,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[P]=C,x}function g(x,P){return function Q(x){if(Array.isArray(x))return x}(x)||function w(x,P){if(typeof Symbol<"u"&&Symbol.iterator in Object(x)){var C=[],S=!0,p=!1,y=void 0;try{for(var e,T=x[Symbol.iterator]();!(S=(e=T.next()).done)&&(C.push(e.value),!P||C.length!==P);S=!0);}catch(X){p=!0,y=X}finally{try{S||null==T.return||T.return()}finally{if(p)throw y}}return C}}(x,P)||function O(x,P){if(x){if("string"==typeof x)return F(x,P);var C=Object.prototype.toString.call(x).slice(8,-1);return"Object"===C&&x.constructor&&(C=x.constructor.name),"Map"===C||"Set"===C?Array.from(x):"Arguments"===C||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?F(x,P):void 0}}
1(x,P)||function J(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(x,P){(null==P||P>x.length)&&(P=x.length);for(var C=0,S=new Array(P);C<P;C++)S[C]=x[C];return S}!function(){function x(s){return["elInY+elHeight","elCenterY-".concat(s=0<arguments.length&&void 0!==s?s:30),"elCenterY","elCenterY+".concat(s),"elOutY-elHeight"]}var P,C,S,p,y,e,T={fadeInOut:function(s,c){return c=1<arguments.length&&void 0!==c?c:0,{opacity:[x(0<arguments.length&&void 0!==s?s:30),[c,1,1,1,c]]}},fadeIn:function(s,c){return{opacity:[["elInY+elHeight",0<arguments.length&&void 0!==s?s:"elCenterY"],[1<arguments.length&&void 0!==c?c:0,1]]}},fadeOut:function(s,c){return{opacity:[[0<arguments.length&&void 0!==s?s:"elCenterY","elOutY-elHeight"],[1,1<arguments.length&&void 0!==c?c:0]]}},blurInOut:function(s,c){return c=1<arguments.length&&void 0!==c?c:20,{blur:[x(0<arguments.length&&void 0!==s?s:100),[c,0,0,0,c]]}},blurIn:function(s,c){return{blur:[["elInY+elHeight",0<arguments.length&&void 0!==s?s:"elCenterY"],[1<arguments.length&&void 0!==c?c:20,0]]}},blurOut:function(s,c){return{opacity:[[0<arguments.length&&void 0!==s?s:"elCenterY","elOutY-elHeight"],[0,1<arguments.length&&void 0!==c?c:20]]}},scaleInOut:function(s,c){return c=1<arguments.length&&void 0!==c?c:.6,{scale:[x(0<arguments.length&&void 0!==s?s:100),[c,1,1,1,c]]}},scaleIn:function(s,c){return{scale:[["elInY+elHeight",0<arguments.length&&void 0!==s?s:"elCenterY"],[1<arguments.length&&void 0!==c?c:.6,1]]}},scaleOut:function(s,c){return{scale:[[0<arguments.length&&void 0!==s?s:"elCenterY","elOutY-elHeight"],[1,1<arguments.length&&void 0!==c?c:.6]]}},slideX:function(s,c){return{translateX:[["elInY",0<arguments.length&&void 0!==s?s:0],[0,1<arguments.length&&void 0!==c?c:500]]}},slideY:function(s,c){return{translateY:[["elInY",0<arguments.length&&void 0!==s?s:0],[0,1<arguments.length&&void 0!==c?c:500]]}},spin:function(s,c){return{rotate:[[0,s=0<arguments.length&&void 0!==s?s:1e3],[0,1<arguments.length&&void 0!==c?c:360],{modValue:s}]}},flipX:function(s,c){return{rotateX:[[0,s=0<arguments.length&&void 0!==s?s:1e3],[0,1<arguments.length&&void 0!==c?c:360],{modValue:s}]}},flipY:function(s,c){return{rotateY:[[0,s=0<arguments.length&&void 0!==s?s:1e3],[0,1<arguments.length&&void 0!==c?c:360],{modValue:s}]}},jiggle:function(s,c){return{skewX:[[0,+(s=0<arguments.length&&void 0!==s?s:50),2*s,3*s,4*s],[0,c=1<arguments.length&&void 0!==c?c:40,0,-c,0],{modValue:4*s}]}},seesaw:function(s,c){return{skewY:[[0,+(s=0<arguments.length&&void 0!==s?s:50),2*s,3*s,4*s],[0,c=1<arguments.length&&void 0!==c?c:40,0,-c,0],{modValue:4*s}]}},zigzag:function(s,c){return{translateX:[[0,+(s=0<arguments.length&&void 0!==s?s:100),2*s,3*s,4*s],[0,c=1<arguments.length&&void 0!==c?c:100,0,-c,0],{modValue:4*s}]}},hueRotate:function(s,c){return{"hue-rotate":[[0,s=0<arguments.length&&void 0!==s?s:600],[0,1<arguments.length&&void 0!==c?c:360],{modValue:s}]}}},X=(P=["perspective","scaleX","scaleY","scale","skewX","skewY","skew","rotateX","rotateY","rotate"],C=["blur","hue-rotate","brightness"],S=["translateX","translateY","translateZ"],p=["perspective","border-radius","blur","translateX","translateY","translateZ"],y=["hue-rotate","rotate","rotateX","rotateY","skew","skewX","skewY"],e={easeInQuad:function(s){return s*s},easeOutQuad:function(s){return s*(2-s)},easeInOutQuad:function(s){return s<.5?2*s*s:(4-2*s)*s-1},easeInCubic:function(s){return s*s*s},easeOutCubic:function(s){return--s*s*s+1},easeInOutCubic:function(s){return s<.5?4*s*s*s:(s-1)*(2*s-2)*(2*s-2)+1},easeInQuart:function(s){return s*s*s*s},easeOutQuart:function(s){return 1- --s*s*s*s},easeInOutQuart:function(s){return s<.5?8*s*s*s*s:1-8*--s*s*s*s},easeInQuint:function(s){return s*s*s*s*s},easeOutQuint:function(s){return 1+--s*s*s*s*s},easeInOutQuint:function(s){return s<.5?16*s*s*s*s*s:1+16*--s*s*s*s*s},easeOutBounce:function(s){var c=7.5625,h=2.75;return s<1/h?c*s*s:s<2/h?c*(s-=1.5/h)*s+.75:s<2.5/h?c*(s-=2.25/h)*s+.9375:c*(s-=2.625/h)*s+.984375},easeInBounce:function(s){return 1-e.easeOutBounce(1-s)},easeOutBack:function(s){return 1+2.70158*Math.pow(s-1,3)+1.70158*Math.pow(s-1,2)},easeInBack:function(s){return 2.70158*s*s*s-1.70158*s*s}},new function s(){var c=this;re(this,s),d(this,"drivers",[]),d(this,"elements",[]),d(this,"frame",0),d(this,"debug",!1),d(this,"windowWidth",0),d(this,"windowHeight",0),d(this,"presets",T),d(this,"debugData",{frameLengths:[]}),d(this,"init",function(){c.findAndAddElements(),window.requestAnimationFrame(c.onAnimationFrame),c.windowWidth=document.body.clientWidth,c.windowHeight=document.body.clientHeight,window.onresize=c.onWindowResize}),d(this,"onWindowResize",function(){document.body.clientWidth===c.windowWidth&&document.body.clientHeight===c.windowHeight||(c.windowWidth=document.body.clientWidth,c.windowHeight=document.body.clientHeight,c.elements.forEac
1h(function(h){return h.calculateTransforms()}))}),d(this,"onAnimationFrame",function(h){c.debug&&(c.debugData.frameStart=Date.now());var I,b={};c.drivers.forEach(function(Z){b[Z.name]=Z.getValue(c.frame)}),c.elements.forEach(function(Z){Z.update(b,c.frame)}),c.debug&&c.debugData.frameLengths.push(Date.now()-c.debugData.frameStart),c.frame%60==0&&c.debug&&(I=Math.ceil(c.debugData.frameLengths.reduce(function(Z,$){return Z+$},0)/60),console.log("Average frame calculation time: ".concat(I,"ms")),c.debugData.frameLengths=[]),c.frame++,window.requestAnimationFrame(c.onAnimationFrame)}),d(this,"addDriver",function(h,I){c.drivers.push(new N(h,I,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))}),d(this,"removeDriver",function(h){c.drivers=c.drivers.filter(function(I){return I.name!==h})}),d(this,"findAndAddElements",function(){c.elements=[],document.querySelectorAll(".lax").forEach(function(h){var I=[];h.classList.forEach(function(Z){Z.includes("lax_preset")&&(Z=Z.replace("lax_preset_",""),I.push(Z))});var b=d({},"scrollY",{presets:I});c.elements.push(new W(".lax",c,h,b,0,{}))})}),d(this,"addElements",function(h,I,b){document.querySelectorAll(h).forEach(function(Z,$){c.elements.push(new W(h,c,Z,I,$,b))})}),d(this,"removeElements",function(h){c.elements=c.elements.filter(function(I){return I.selector!==h})}),d(this,"addElement",function(h,I,b){c.elements.push(new W("",c,h,I,0,b))}),d(this,"removeElement",function(h){c.elements=c.elements.filter(function(I){return I.domElement!==h})})});function L(s,c){if(Array.isArray(s))return s;for(var h=Object.keys(s).map(function($){return parseInt($)}).sort(function($,V){return V<$?1:-1}),I=h[h.length-1],b=0;b<h.length;b++){var Z=h[b];if(c<Z){I=Z;break}}return s[I]}function ce(s,A,h){var I=A.width,b=A.height,U=A.x,j=A.y;if("number"==typeof s)return s;var Z,$=document.body.scrollHeight,V=document.body.scrollWidth,Y=window.innerWidth,z=window.innerHeight,k=(A=(k=g((Z=void 0!==window.pageXOffset,k="CSS1Compat"===(document.compatMode||""),A=Z?window.pageXOffset:(k?document.documentElement:document.body).scrollLeft,[Z?window.pageYOffset:(k?document.documentElement:document.body).scrollTop,A]),2))[0],(U+=k[1])+I);return A=(j+=A)+b,Function("return ".concat(s.replace(/screenWidth/g,Y).replace(/screenHeight/g,z).replace(/pageHeight/g,$).replace(/pageWidth/g,V).replace(/elWidth/g,I).replace(/elHeight/g,b).replace(/elInY/g,j-z).replace(/elOutY/g,A).replace(/elCenterY/g,j+b/2-z/2).replace(/elInX/g,U-Y).replace(/elOutX/g,k).replace(/elCenterX/g,U+I/2-Y/2).replace(/index/g,h)))()}function N(s,c){var h=this,I=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};re(this,N),d(this,"getValueFn",void 0),d(this,"name",""),d(this,"lastValue",0),d(this,"frameStep",1),d(this,"m1",0),d(this,"m2",0),d(this,"inertia",0),d(this,"inertiaEnabled",!1),d(this,"getValue",function(b){var Z=h.lastValue;return b%h.frameStep==0&&(Z=h.getValueFn(b)),h.inertiaEnabled&&(h.m1=.8*h.m1+(b=Z-h.lastValue)*(1-.8),h.m2=.8*h.m2+h.m1*(1-.8),h.inertia=Math.round(5e3*h.m2)/15e3),h.lastValue=Z,[h.lastValue,h.inertia]}),this.name=s,this.getValueFn=c,Object.keys(I).forEach(function(b){h[b]=I[b]}),this.lastValue=this.getValueFn(0)}function W(s,c,h,I){var b=this,Z=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,V=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{};re(this,W),d(this,"domElement",void 0),d(this,"transformsData",void 0),d(this,"styles",{}),d(this,"selector",""),d(this,"groupIndex",0),d(this,"laxInstance",void 0),d(this,"onUpdate",void 0),d(this,"update",function(Y,z){var U,k=b.transforms,j={};for(U in k){var A=k[U];Y[U]||console.error("No lax driver with name: ",U);var K,v=g(Y[U],2),q=v[0],ee=v[1];for(K in A){var H,B=(se=g(A[K],3))[0],D=se[1],me=(G=void 0===(he=se[2])?{}:he).modValue,te=void 0===(ue=G.frameStep)?1:ue,de=G.easing,se=G.inertia,he=G.inertiaMode,ue=G.cssFn,G=void 0===(G=G.cssUnit)?"":G;de=e[de],z%te==0&&(de=function(ne,pe,be,Ce){var le=0;if(ne.forEach(function(Te){Te<be&&le++}),le<=0)return pe[0];if(le>=ne.length)return pe[ne.length-1];var ve,ie=(ie=ne[ve=le-1],(be-ie)/((ne=ne[le])-ie));return Ce&&(ie=Ce(ie)),(ve=pe[ve])*(1-ie)+(pe=pe[le])*ie}(B,D,me?q%me:q,de),se&&(H=ee*se,"absolute"===he&&(H=Math.abs(H)),de+=H),H="px"==(G||p.includes(K)?"px":y.includes(K)?"deg":"")?0:3,H=de.toFixed(H),j[K]=ue?ue(H,b.domElement):H+G)}}b.applyStyles(j),b.onUpdate&&b.onUpdate(Y,b.domElement)}),d(this,"calculateTransforms",function(){b.transforms={};var Y,z=b.laxInstance.windowWidth;for(Y in b.transformsData)!function(U){var k=b.transformsData[U],j={},A=k.presets;for(var K in(void 0===A?[]:A).forEach(function(B){var q,D,ee=(D=g(B.split(":"),3))[0],H=D[1];B=D[2],(D=window.lax.presets[ee])?(q=D(H,B),Object.keys(q).forEach(function(me){k[me]=q[me]})):console.error("Lax preset cannot be found with name: ",ee)}),delete k.presets,k)!function(v){var H=void 0===(B=(q=g(k[v],3))[0])?[-1e9,1e9]:B,B=void 0===(B=q[1])?[-1e9,1e9]:B,q=void 0===(q=q[2])?{}:q,ee=b.domElement.getBoundingClientRect();H=L(H,z).map(function(D){return ce(D,ee,b.groupIndex)}),B=L(B,z).map(function(D){return ce(D,ee,b.groupIndex)}),j[v]=[H,B,q]}(K);b.transforms[U]=j}(Y)}),d(this,"applyStyles",function(Y){var z,U,k,j=(z=Y,U={transform:"",filter:""},k={translateX:1e-5,translateY:1e-5,translateZ:1e-5},Object.keys(z).forEach(function(A){var K=z[A],v=p.includes(A)?"px":y.includes(A)?"deg":"";S.includes(A)?k[A]=K:P.includes(A)?U.transform+="".concat(A,"(").concat(K).concat(v,") "):C.includes(A)?U.filter+="".concat(A,"(").concat(K).concat(v,") "):U[A]="".concat(K).concat(v," ")}),U.transform="translate3d(".concat(k.translateX,"px, ").concat(k.translateY,"px, ").concat(k.translateZ,"px) ").concat(U.transform),U);
1Object.keys(j).forEach(function(A){b.domElement.style.setProperty(A,j[A])})}),this.selector=s,this.laxInstance=c,this.domElement=h,this.transformsData=I,this.groupIndex=Z;var $=void 0===(Z=V.style)?{}:Z;V=V.onUpdate,Object.keys($).forEach(function(Y){h.style.setProperty(Y,$[Y])}),V&&(this.onUpdate=V),this.calculateTransforms()}void 0!==fe.exports?fe.exports=X:window.lax=X}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.