"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[921],{7356:function(e,t,a){a.d(t,{Z:function(){return r}});var n=a(7437);a(2265);var i=e=>{let{width:t=1.25,height:a=1.25}=e;return(0,n.jsxs)("svg",{width:"".concat(t,"rem"),height:"".concat(a,"rem"),viewBox:"0 0 125 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M54.3166 34.497C58.1489 54.4511 47.9488 73.847 30.6171 82.4999C30.0339 82.7897 29.3334 82.5977 28.9833 82.0494C26.2132 77.7273 24.2025 72.8171 23.176 67.4683C22.3664 63.2495 22.2229 59.0549 22.6771 54.9978C22.7244 54.5729 22.9936 54.2075 23.3757 54.0181C36.04 47.7808 44.9384 35.8217 47.3977 22.0722C47.4734 21.6577 47.747 21.3076 48.1359 21.1456L48.1546 21.1393C48.7557 20.8883 49.4433 21.1391 49.7532 21.7106C51.8714 25.6117 53.4331 29.8988 54.3163 34.4927L54.3166 34.497ZM47.5963 80.6375C44.0587 83.6985 41.1279 87.1954 38.808 90.9806C38.4679 91.5366 38.5951 92.2561 39.112 92.6523L39.1257 92.6645C39.4592 92.9209 39.8998 92.9837 40.295 92.8404C53.4311 88.0974 68.2382 89.8233 79.9714 97.6728C80.3254 97.9107 80.7764 97.9608 81.1692 97.7899C84.9111 96.1544 88.4714 93.9335 91.7182 91.1231C95.8366 87.5593 99.0851 83.363 101.443 78.8034C101.742 78.2264 101.558 77.5216 101.016 77.1624C84.8589 66.4793 62.9613 67.3439 47.5956 80.6401L47.5963 80.6375ZM91.0176 64.0895C95.4385 65.6224 99.9319 66.4144 104.37 66.5302C105.021 66.5474 105.58 66.0771 105.666 65.4315L105.668 65.4123C105.722 64.9948 105.557 64.5826 105.235 64.3108C94.5593 55.3058 88.6497 41.6192 89.5818 27.534C89.6099 27.1068 89.4281 26.6914 89.0836 26.439C85.7975 24.0164 82.0947 22.0443 78.0357 20.6353C72.8907 18.8503 67.6323 18.1338 62.5057 18.373C61.8559 18.4042 61.338 18.9154 61.2989 19.5634C60.1255 38.8984 71.824 57.4314 91.0203 64.0902L91.0176 64.0895Z",fill:"url(#paint0_linear_418_767)"}),(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"paint0_linear_418_767",x1:"41.6713",y1:"100.985",x2:"104.522",y2:"-4.17881",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{"stop-color":"#00FDB3"}),(0,n.jsx)("stop",{offset:"1","stop-color":"#4395F7"})]})})]})},o=a(4839);var r=e=>{let{className:t,height:a=8,width:r=8}=e;return(0,n.jsx)("div",{className:(0,o.Z)(t,"flex items-center justify-center h-full animate-spin-slow"),children:(0,n.jsx)(i,{height:a,width:r})})}},7761:function(e,t,a){a.d(t,{w:function(){return n}});const n={UNKOWN:"unknown",LINK:"link",IMAGE:"image",PDF:"pdf",HTML_TEMPLATE:"htmlTemplate"}},3749:function(e,t,a){a.d(t,{w:function(){return r}});var n=a(7437),i=a(2265);const o=(0,i.createContext)({domainData:{},setDomainData:()=>{},isValidDomain:!1}),r=()=>(0,i.useContext)(o);t.Z=e=>{let{children:t}=e;const[a,r]=(0,i.useState)({});return(0,n.jsx)(o.Provider,{value:{domainData:a,isValidDomain:Boolean(a.domain),setDomainData:e=>r(e)},children:t})}},6012:function(e,t,a){var n=a(856),i=a(2265),o=a(3332),r=a(5600),d=a(3377);t.Z=()=>{const{showNotification:e}=(0,r.$)(),{setOrgDetails:t}=(0,d.X)(),[a,c]=(0,i.useState)(!0),[s,l]=(0,i.useState)({});return(0,i.useEffect)((()=>{if(Object.keys(s).length)return;(async()=>{try{c(!0);const e=await o.Z.getOrganizationDetails();l(e.responseData),t(e.responseData),c(!1)}catch(a){c(!1),e({severity:n.d.ERROR,message:"Some error occurred!"})}})()}),[e,s]),{organizationDetails:s,isLoading:a}}},9156:function(e,t,a){var n=a(7761),i=a(856),o=a(2265),r=a(3332),d=a(518),c=a(5600),s=a(1693);t.Z=()=>{const{showNotification:e}=(0,c.$)(),{addMedia:t,toggleLoading:a,toggleDownLoading:l}=(0,d.Y)(),{isLoading:u,isDownLoading:m,editorConfig:g,media:p}=(0,d.G)(),D=(0,o.useCallback)((async(a,o)=>{try{var d,c;const{url:e,name:i="Scrut_Document",displayName:u="",sourceFileName:m}=a,p=e||"".concat("https://app.scrut.io/api/v1/trustCenterService","/trust-center/download?fileName=").concat("gomigo-prod","/").concat(m),D=u||i||"";l(!0);const f=await r.Z.downloadFile(p),C=a.isInline||"text/plain"===a.fileType&&(null===(d=a.name)||void 0===d?void 0:d.includes(".html"));if(C&&!g){const e=await f.text();return void t({mediaData:e,mediaType:n.w.HTML_TEMPLATE,mediaName:D,isEditorHidden:!0})}if(C&&g){const e=await f.text(),t=g.config.get("exportPdf");return void g.execute("exportPdf",{...t,dataCallback:()=>e})}if("save"===o){const e=await(0,s.w8)(f);return(0,s.bX)(e)}const v=window.URL.createObjectURL(f),w=document.createElement("a");return w.href=v,w.setAttribute("download",D),document.body.appendChild(w),w.click(),null===w||void 0===w||null===(c=w.parentNode)||void 0===c||c.removeChild(w),null}catch(u){e({severity:i.d.ERROR,message:"Failed to download media"})}finally{l(!1)}return null}),[l,t,e,g]),f=(0,o.useCallback)((async(t,a,n,o,d)=>{try{var c;const{url:u,name:m="Scrut_Document",displayName:g="",sourceFileName:p}=t,D=u||"".concat("https://app.scrut.io/api/v1/trustCenterService","/trust-center/download?fileName=").concat("gomigo-prod","/").concat(p),f=g||m||"";l(!0);const C=await r.Z.downloadFile(D,!0),{pdfBytes:v,isEncrypted:w}=await(0,s.K8)(C,n,a,d,o);if(w)return void e({severity:i.d.ERROR,message:"Encrypted PDFs cannot be watermarked and downloaded!"});const y=new Blob([v],{type:"application/pdf"}),E=window.URL.createObjectURL(y),A=document.createElement("a");return A.href=E,A.setAttribute("download",f),document.body.appendChild(A),A.click(),null===A||void 0===A||null===(c=A.parentNode)||void 0===c||c.removeChild(A),null}catch(u){e({severity:i.d.ERROR,message:"Failed to download media"})}finally{l(!1)}return null}),[l,t,e,g]);return{previewMedia:(0,o.useCallback)((async(o,d)=>{const{url:c,name:l="Scrut_Document",displayName:u=""}=o;try{var m;a(!0);const e=await r.Z.downloadFile(c);if(o.isInline||"text/plain"===o.fileType&&(null===(m=o.name)||void 0===m?void 0:m.includes(".html"))){const a=await e.text();return void t({mediaData:a,mediaType:n.w.HTML_TEMPLATE,mediaName:u||l,mediaDocumentObject:o})}if(e.type.includes("image/")||e.type.includes("application/xml")){const a=await(0,s.w8)(e);return void t({mediaType:n.w.IMAGE,mediaData:(0,s.bX)(a),mediaName:l,mediaDocumentObject:o})}if(e.type.includes("application/pdf"))return void t({mediaData:window.URL.createObjectURL(new Blob([e],{type:"application/pdf"})),mediaType:n.w.PDF,mediaName:u||l,mediaDocumentObject:o,controlData:d});t({mediaData:"",mediaType:n.w.UNKOWN,mediaName:"",mediaDocumentObject:o})}catch(g){t({mediaData:"",mediaType:n.w.UNKOWN,mediaName:"",mediaDocumentObject:o}),e({severity:i.d.ERROR,message:"Failed to preview media"})}finally{a(!1)}}),[a,t,e]),downloadMedia:D,isLoading:u,isDownLoading:m,downloadWatermarkedMedia:f}}},518:function(e,t,a){a.d(t,{G:function(){return o},Y:function(){return i}});const n=(0,a(9099).Ue)((e=>({media:{},editorConfig:null,isLoading:!1,isDownLoading:!1,actions:{addMedia:t=>e({media:t}),resetMedia:()=>e({media:{}}),toggleLoading:t=>e({isLoading:t}),toggleDownLoading:t=>e({isDownLoading:t}),setEditorConfig:t=>e({editorConfig:t})}}))),i=()=>n((e=>e.actions)),o=()=>n((e=>({media:e.media,isLoading:e.isLoading,isDownLoading:e.isDownLoading,editorConfig:e.editorConfig})))},3377:function(e,t,a){a.d(t,{X:function(){return i},a:function(){return o}});const n=(0,a(9099).Ue)((e=>({orgDetails:{},actions:{setOrgDetails:t=>e({orgDetails:t})}}))),i=()=>n((e=>e.actions)),o=()=>n((e=>({orgDetails:e.orgDetails,setOrgDetails:e.actions.setOrgDetails})))},812:function(e,t,a){a.d(t,{D:function(){return n}});const n={primary:{DEFAULT:"#011D33",25:"#F7F7FD",100:"#EFEDF9",400:"#3522AC",500:"#695ACC",600:"#3522AC",700:"#180C68",800:"#180C68",900:"#050026"},secondary:{DEFAULT:"#13161A",25:"#FAFBFC",50:"#F5F7FA",100:"#DDE4EB",200:"#C3CED9",400:"#818D99",600:"#606A73",900:"#13161A",500:"#DA47D4",700:"#5ACCBE",800:"#1E42C0"},alert:{DEFAULT:"#B21709",successDark:"#056632",success:"#04BE8D",successLight:"#C3F3D9",errorDark:"#B21709",error:"#FB5B4C",errorLight:"#FADEDC",regularDark:"#B28D09",regular:"#FFCC47",regularLight:"#F3EBCF",warning:"#FF9A4B",warningLight:"#EAD6C6",warningDark:"#E06301",purpleLight:"#B39DDB10"},text:{DEFAULT:"#232525",100:"#727677",500:"#4A4A4A",900:"#232525"},white:{DEFAULT:"#FFFFFF"},black:{DEFAULT:"#000000"},border:{DEFAULT:"#ECECEC"},background:{DEFAULT:"#ffffff","light-grayscale-50":"#F5F7FA","light-red":"#FB5B4C1A",gray:"#E6E6E6"},base:{primary:"#695ACC"}}},3900:function(e,t,a){a.d(t,{m:function(){return i}});const n={VISIT_TRUST_VAULT:e=>{var t,a;return{documentId:"trustVault",addedBy:{userName:e.name},updatedBy:"",eventSource:"trustVault",eventName:"SA.TRUST_VAULT.PORTAL_VIEWS",eventType:"SA.TRUST_VAULT.PORTAL_VIEWS",eventDocumentObject:["eventDocumentObject"],description:'<p class="description"><b>'.concat(e.name,"</b> has visited trust vault portal on Date: ").concat(null===e||void 0===e?void 0:e.formattedDate),category:"manual",visitorDetails:{ipAddress:"",operatingSystem:(null===(t=navigator)||void 0===t?void 0:t.platform)||"Anonymous",userAgent:(null===(a=navigator)||void 0===a?void 0:a.userAgent)||"Anonymous",firstname:e.firstName,lastname:e.lastName,company:(null===e||void 0===e?void 0:e.organizationName)||"Anonymous",tenantId:e.tenantId}}},REQUEST_ACCESS:e=>({documentId:"trustVault",addedBy:{userName:(null===e||void 0===e?void 0:e.firstName)||""},updatedBy:"",eventSource:"trustVault",eventName:"SA.TRUST_VAULT.REQUEST_ACCESS",eventType:"SA.TRUST_VAULT.REQUEST_ACCESS",eventDocumentObject:["eventDocumentObject"],description:'<p class="description"><b>'.concat((null===e||void 0===e?void 0:e.firstName)||"Anonymous"," ").concat((null===e||void 0===e?void 0:e.lastName)||"","</b> has requested access ").concat(null===e||void 0===e?void 0:e.formattedDate,".</p>"),category:"manual"})},i=(e,t)=>n[e](t)},2545:function(e,t,a){a.d(t,{Bi:function(){return l},y9:function(){return s},d7:function(){return u}});const n=new Date,i=n.getDate().toString().padStart(2,"0"),o=n.getMonth().toString().padStart(2,"0"),r=n.getFullYear().toString(),d=n.getHours().toString().padStart(2,"0"),c=n.getMinutes().toString().padStart(2,"0"),s=e=>Intl.DateTimeFormat("en-us",{day:"numeric",month:"short",year:"numeric"}).format(e),l="".concat(i," ").concat(["January","February","March","April","May","June","July","August","September","October","November","December"][Number(o)]," ").concat(r," \u2022 ").concat(d,":").concat(c,"PM"),u=e=>{let t=e.getHours(),a=e.getMinutes(),n=t>=12?"PM":"AM";return t%=12,t=t||12,a=a<10?"0"+a:a,"".concat(s(e)," ").concat(t,":").concat(a," ").concat(n)}}}]);