1(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"4.103.4@781be76fe24"};var u=new d.Error().stack;u&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[u]="828cfd7a-bb10-4961-9b3a-3c4487da79bf",d._sentryDebugIdIdentifier="sentry-dbid-828cfd7a-bb10-4961-9b3a-3c4487da79bf")}catch{}})(),(self.webpackChunkvisme_dashboard_web_app=self.webpackChunkvisme_dashboard_web_app||[]).push([["114"],{88765(d,u,t){t.r(u),t.d(u,{default:()=>Y});var o=t(65723),a=t(22155),g=t(70851),k=t(98177),s=t(78624),U=t(66361),G=t(83692),B=t(90487),x=t(87803),j=t(4233),K=t(25236),W=t(9177),J=t(8099),X=t(62301),H=t(45773),V=t(39373),Z=t(47267),z=t(70060);const c={IMPORT_STARTED:"import-started",IMPORT_COMPLETED:"import-completed",IMPORT_FAILED:"import-failed",IMPORT_DONE:"import-done",IMPORT_CLOSE:"import-close",UPGRADE:"upgrade",RESIZE:"import-resize"},l={IMPORT_DONE:"import done.",IMPORT_FAILED:"import failed.",DONE:"done",UPGRADE:"upgrade",IMPORT_CLOSE:"import close.",CLOSE:"close"},r={"colorful-no-image--dark-gray":"colorful-no-image--dark-gray--rDckqib","colorful-no-image--orange":"colorful-no-image--orange--viD7Uj7","colorful-no-image--red":"colorful-no-image--red--GTyvx8J","colorful-no-image--yellow":"colorful-no-image--yellow--Hq0I1Q5","colorful-no-image--cyan":"colorful-no-image--cyan--ADvXhML","colorful-no-image--blue":"colorful-no-image--blue--VI3syO7","colorful-no-image--light-blue":"colorful-no-image--light-blue--xJSpbmx","colorful-no-image--light-green":"colorful-no-image--light-green--XUAbmBK","colorful-no-image--green":"colorful-no-image--green--BVmWgms","colorful-no-image--purple":"colorful-no-image--purple--qPRfTRO",dialogProjectImport:"dialogProjectImport--Q15Kx9J",header:"header--lJLoMHB",hide:"hide--vtrH2R5",row:"row--sZ1GTXV",rowPptx:"rowPptx--jwKRedN",iframe:"iframe--_diFu7X",pdf:"pdf--wy95zBd",body:"body--TgsccnI",content:"content--tu40rjl",expanded:"expanded--r1tS6mA",gap:"gap--OmRvZnd",freeTip:"freeTip--I6lzoSg",tipText:"tipText--wBtWXep",tipWarning:"tipWarning--me_LK5q"},Q=()=>{const{appStore:i,uiStateStore:$}=(0,z.g)(),{auth:T,workspaces:R,projects:q,tags:M}=i,{popupStore:p}=$,[_,ee]=(0,a.useState)(""),[te,re]=(0,a.useState)(!0),[oe,ne]=(0,a.useState)(!1),[ae,se]=(0,a.useState)(!0),h=(0,a.useRef)(!1),v=(0,a.useRef)(!1),I=(0,a.useRef)(!1),y=(0,a.useRef)(!1),b=(0,a.useRef)(void 0),{t:E}=(0,V.Bd)(),m=p.dialogOptions,f=m.type==="pdf",P=m.type==="pptx",O=()=>f?s.Ki.PDF_IMPORT:s.Ki.PPTX_IMPORT,A=e=>{const n=O();return{projectSource:n,importType:n,projectId:e?.projectId,errorType:e?.errorType}},de=e=>{h.current=!1,v.current=!1,I.current=!0,y.current=!1,b.current=e?.editorEnv,i.tags.enqueueAmplitudeEvent(s.JK.STARTED,A(e))},D=e=>{if(h.current)return;h.current=!0,I.current=!1;const n=A(e);(0,U.U7)(n.importType),i.tags.enqueueAmplitudeEvent(s.JK.COMPLETED,n)},w=e=>{v.current||(v.current=!0,I.current=!1,i.tags.enqueueAmplitudeEvent(s.JK.FAILED,A(e)))},C=e=>{!P||!I.current||y.current||(y.current=!0,(0,G.nW)("pptx_import.abandoned",{outcome:"failure",phase:"abandon",reason:e,importType:m.type,editor_env:b.current,projectSource:O(),workspaceId:R.currentId,userId:T.currentId},"warn"))},L=e=>{D(e),q.refresh(),setTimeout(()=>{M.trackEvent(s.aM.IMPORT_DONE)},3e3),p.closePopup(),Z.A.success(E("Project imported"))},S=()=>{p.closePopup(),p.openPopup(X.C.BILLING_UPGRADE,{type:"publish-download",plan:"complete"})};(0,a.useEffect)(()=>{se(P)},[P]);const ce=async()=>{M.trackEvent(s.aM.IMPORT_OPEN);try{const e=await B.A.GetImportUrl({userId:T.currentId,workspaceId:R.currentId,folderId:i.projects.effectiveFolderId||0,type:m.type});ee(e.url)}catch(e){console.warn("import",e)}},N=e=>{if(typeof e?.data=="string"){if(e.data===l.IMPORT_DONE||e.data===l.DONE){L();return}if(e.data===l.IMPORT_FAILED){w({errorType:"unknown"});return}if(e.data===l.UPGRADE){S();return}if(e.data===l.IMPORT_CLOSE||e.data===l.CLOSE){p.closePopup();return}}const n=e?.data;if(n?.type)switch(n.type){case c.IMPORT_DONE:L(n);break;case c.IMPORT_COMPLETED:D(n);break;case c.IMPORT_FAILED:w(n);break;case c.UPGRADE:S();break;case c.IMPORT_CLOSE:p.closePopup();break;case c.RESIZE:ne(!!n.expanded);break;case c.IMPORT_STARTED:{const F=O();de(n),i.tags.enqueueAmplitudeEvent(s.lg.PROJECT_CREATED,{type:s.SA.IMPORT,projectSource:F,importType:F})}break}};return(0,a.useEffect)(()=>{const e=()=>{C("page_hide")};return window.addEventListener("message",N),window.addEventListener("pagehide",e),ce(),(async()=>(await T.getUser(),re(R.subscription.plan===H.m0.FREE)))(),()=>{C("modal_closed"),window.removeEventListener("message",N),window.removeEventListener("pagehide",e)}},[]),(0,o.jsx)(J.A,{isShown:!0,wrapperClass:(0,g.A)(r.dialogProjectImport,{[r.dialogProjectImportPdf]:f,[r.expanded]:oe}),headerClass:(0,g.A)(r.header,{[r.hide]:f}),bodyClass:r.body,contentClass:r.content,Buttons:null,withoutStyles:!0,hasCrossButton:!f,children:(0,o.jsxs)("div",{className:r.content,children:[(0,o.jsx)(j.A,{className:(0,g.A)(r.row,r.iframeWrapper,{[r.rowPdf]:f,[r.rowPptx]:P}),children:(0,o.jsx)(x.A,{children:(0,o.jsx)(W.A,{className:(0,g.A)(r.iframe,r[m.type]),"data-crossorigin":"y",src:_})})}),ae&&(0,o.jsx)(o.Fragment,{children:te?(0,o.jsx)(j.A,{className:r.row,children:(0,o.jsx)(x.A,{contentCenter:!0,children:(0,o.jsxs)("div",{className:r.freeTip,children:[(0,o.jsx)("div",{className:r.tipWarning,children:E("i18n_auto_132")}),(0,o.jsx)("div",{className:r.tipText,children:(0,o.jsx)(K.A,{theme:"link",onClick:S,children:E("i18n_auto_211")})}),(0,o.jsx)("div",{className:r.tipText,children:E("i18n_auto_205")}),(0,o.jsx)("div",{className:r.arrow})]})})}):(0,o.jsx)("div",{className:r.gap})})]})})},Y=(0,k.PA)(Q)}}]); 2 3//# sourceMappingURL=dashboard-popup-ImportProject.9e51dc0ca8ef3b3e.chunk.js.map
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.