PageSourceSearch

https://lemontaps.com/assets/HtmlComponentEditor-D2ld3bcp.js

js lemontaps.com collected 2026-09-24 22:36:31 UTC 3,628 bytes, 2 lines download raw bytes

1import{aP as S,aS as G,ce as R,b5 as U,aQ as k,aD as B,aR as F,jo as K,aF as o,dK as J,aC as r,aV as V,aG as M,aJ as $,cu as Q,dm as W}from"./index-BCi1utNp.js";import{w as Y}from"./withNav-V2C3ZfWp.js";import{E as q}from"./Editor-xUJEv8qt.js";import{g as z}from"./constants-ColCwlu9.js";import{u as X}from"./useHideElements-SCym3rYn.js";import{b as Z}from"./utils-BEQvH1T4.js";import{g as tt,u as et,c as at}from"./emailEditorComponents-DNLZiPxu.js";import{d as c,H as x}from"./ComponentDialog-DOt5uE_h.js";import"./aws-B1BUYc_W.js";import"./Dropzone-C0NnifpX.js";import"./LtTooltipText-CijPhX-2.js";import"./ImageSelector-C_bE8Tsd.js";import"./ImageSettings-CwVFjZAb.js";import"./East-BxqkmIOi.js";import"./Switch-D4njP6Tv.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="f268be73-2b75-404f-b2aa-4c8bd3074138",e._sentryDebugIdIdentifier="sentry-dbid-f268be73-2b75-404f-b2aa-4c8bd3074138")}catch{}const nt=()=>{try{const e=sessionStorage.getItem(x);return e?JSON.parse(e):null}catch{return null}},st=()=>{const{id:e}=G(),i=R(),{t:n}=U(),{notify:l}=k(),{getAccessTokenSilently:m}=B(),{setIsUnsaved:A}=F(),{setCollapsed:d}=K();o.useEffect(()=>(d(!0),()=>{d(!1)}),[d]);const[E,p]=o.useState(!0),[N,g]=o.useState(!1),[t,u]=o.useState(null),[T,h]=o.useState(c),_=X(),y=o.useCallback(async()=>{p(!0);const a=nt();if(a){u(a),h(a.structure||c),p(!1);return}if(e)try{const s=await tt(m,e);u({id:s.id,name:s.name,startDate:s.startDate||null,endDate:s.endDate||null,structure:s.structure||c}),h(s.structure||c)}catch{l.error(n("emailSignature.components.fetchError"))}else u({name:n("emailSignature.components.createTitle"),startDate:null,endDate:null,structure:c});p(!1)},[m,e,l,n]);o.useEffect(()=>{y()},[y]);const w=o.useMemo(()=>({content:T,subject:""}),[T]),O=()=>{i.push({pathname:S.MD.CUSTOMISESETTINGS.EMAIL_SIGNATURE_COMPONENTS,state:{reopenComponentDialog:!0,componentId:t==null?void 0:t.id}})},v=async a=>{var s,b;if(t!=null&&t.name){g(!0);try{const L=Z(a).replace(/<!--\s*\[if[^\]]+]\s*>[\s\S]*?<!\[endif]\s*-->/gi,"").replace(/<!--[\s\S]*?-->/g,""),C=((b=(s=new DOMParser().parseFromString(L,"text/html").body)==null?void 0:s.innerHTML)==null?void 0:b.trim())||"",D=C.match(/<table[\s\S]*<\/table>/i),P=D?D[0].trim():C,I={name:t.name,type:"signature",contentType:"HTML",structure:a.content,html:P,assetId:null,startDate:t.startDate,endDate:t.endD
1ate};if(t.id)await et(m,t.id,I);else{const j=await at(m,I);u(f=>f&&{...f,id:j.id})}sessionStorage.removeItem(x),W.flushSync(()=>{A(!1)}),l.success(n("emailSignature.components.saveSuccess")),i.push(S.MD.CUSTOMISESETTINGS.EMAIL_SIGNATURE_COMPONENTS)}catch{l.error(n("emailSignature.components.saveError"))}finally{g(!1)}}},H=o.useMemo(()=>z(J.EMAIL_SIGNATURE_TEMPLATE,!0,n,[]),[n]);return E||!t?null:r.jsxs(V,{maxWidth:"xl",px:2,children:[r.jsx(M,{mb:2,children:r.jsx($,{variant:"h1",children:t.name})}),r.jsx(M,{ref:_,children:r.jsx(q,{hideSubject:!0,editorKey:`email-editor-component-${t.id||"new"}`,mergeTags:{},onPreview:a=>a,initialValues:w,categories:H,hasFullAccess:!0,loading:E,cacheKey:"lt-email-editor-component-paste-cache",renderSlot:({values:a})=>r.jsx(Q,{loading:N,cancelAction:{text:n("cancel"),onClick:O},saveAction:{text:n("emailSignature.components.saveComponent"),onClick:()=>v(a)}})})})]})},bt=Y(st,{tTitle:"emailSignature.components.title",showBackButton:{linkTo:S.MD.CUSTOMISESETTINGS.EMAIL_SIGNATURE_COMPONENTS}},{});export{bt as default};
2//# sourceMappingURL=HtmlComponentEditor-D2ld3bcp.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.