PageSourceSearch

https://www.ag3ntic.ai/assets/types-BpAlB3Az.js

js ag3ntic.ai collected 2026-10-05 13:39:10 UTC 23,504 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3772e48f-f0e5-5bd8-92da-4a91bd6459b1")}catch(e){}}();
3import{a as e,i as t,n,t as r}from"./jsx-runtime-CMgEUHpv.js";import{V as i,g as a,m as o}from"./dist-CAHjj65Z.js";import{t as s}from"./useTranslation-BymTnaHx.js";import{O as c,l,p as u}from"./components-B8bHjdou.js";import{n as d}from"./exports-CsgSliUa.js";import{r as f}from"./dist-CrEJxMHP.js";import{t as p}from"./classnames-PxzWHlFm.js";import{t as m}from"./useWebThemeContext-BJu9VsBR.js";import{t as h}from"./StatusInputs-Bo_bMqPM.js";import{n as g,r as _,t as v}from"./local_storage-CooKze2L.js";import{r as y}from"./useBoostAffiliate-BpQKdrbe.js";import{t as b}from"./useNonRevalidatingFetcher-DstApf5k.js";import{t as x}from"./useToast-aQCYBESc.js";var S=e(i(),1);function C(){return()=>{}}function w(){return(0,S.useSyncExternalStore)(C,()=>!0,()=>!1)}function T({children:e,fallback:t=null}){return w()?S.createElement(S.Fragment,null,e()):S.createElement(S.Fragment,null,t)}function E({title:e,titleId:t,...n},r){return S.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?S.createElement(`title`,{id:t},e):null,S.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75`}))}var D=S.forwardRef(E),O=(e,t)=>{let n=t.split(`;`).map(e=>e.trim());for(let t of n){let[n,r]=t.split(`=`).map(e=>e.trim());if(n===e)return r}return null},k=n(((e,t)=>{t.exports={}})),A=n(((e,n)=>{(function(t,r){typeof e==`object`?n.exports=e=r():typeof define==`function`&&define.amd?define([],r):t.CryptoJS=r()})(e,function(){var e=e||function(e,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof t==`function`)try{r=k()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],t==n?this.sigBytes=e.length*4:this.sigBytes=t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=t?e.ceil(s):e.max((s|0)-this._minBufferSize,0);var c=s*o,u=e.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return e})})),j=e(n(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(A()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[],c=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,1/2))),c[i]=n(t.pow(r,1/3)),i++),r++})();var l=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=e[t+p]|0;else{var m=l[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=l[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[p]=h+l[p-7]+_+l[p-16]}var v=s&u^~s&d,y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=f+x+v+c[p]+l[p],C=b+y;f=d,d=u,u=s,s=o+S|0,o=a,a=i,i=r,r=S+C|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(u),n.HmacSHA256=a._createHmacHelper(u)})(Math),e.SHA256})}
3))(),1),M=class extends Error{};function N(e){if(!e||typeof e!=`string`)throw new M(`Invalid input: must be a non-empty string`);try{return(0,j.default)(e.trim()).toString()}catch(t){throw d(t,{extra:{input_length:e.length,input_preview:e.substring(0,100)}}),new M(`Failed to hash input`)}}function P(){if(typeof crypto<`u`&&crypto.randomUUID)try{return crypto.randomUUID()}catch(e){console.warn(`crypto.randomUUID failed, falling back to alternative method:`,e)}if(typeof crypto<`u`&&crypto.getRandomValues)try{let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20,32)].join(`-`)}catch(e){console.warn(`crypto.getRandomValues failed, falling back to Math.random:`,e)}return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var F=`visitTokenReady`,I=({shouldCreateVisitToken:e,setCookie:t})=>{let[n]=c(),r=b(),i=r.data;(0,S.useEffect)(()=>{if(e){let e=document.referrer,t=new FormData;t.append(`referrer`,e),t.append(`landing_page`,window.location.href);let i=`/visit_token`+(n.toString()?`?${n.toString()}`:``);r.submit(t,{method:`post`,action:i})}},[e]),(0,S.useEffect)(()=>{i?.visitToken&&e&&(t({name:`visit_token`,value:i?.visitToken,days:4/24}),typeof window<`u`&&window.dispatchEvent(new CustomEvent(F)))},[i])},L=e=>{if(e)try{return N(e.toLowerCase())}catch{return}},R=e=>{try{let t=new URL(e);return t.searchParams.has(`jwt_token`)&&t.searchParams.set(`jwt_token`,`REDACTED`),t.toString()}catch{return e}},z=null,B=()=>{let e=`beehiiv_anonymous_user_id`;try{let t=localStorage.getItem(e);return t||(t=P(),localStorage.setItem(e,t)),t}catch{return z||=P(),z}},V=({nectarId:e,enabled:t,publicationId:n,postId:r,subscriptionId:i,email:a,settings:o})=>{let s=(0,S.useRef)(``),c=(0,S.useRef)([]),l=(0,S.useRef)([]),u=(0,S.useRef)(null),d=(0,S.useRef)(!1),f=b(),p=(0,S.useCallback)(()=>typeof document>`u`?null:O(`visit_token`,document.cookie),[]),m=(0,S.useCallback)(e=>{f.submit(JSON.stringify({events:e,settings:o}),{method:`post`,action:`/nectar_analytics`,encType:`application/json`})},[f,o]),h=(0,S.useCallback)(()=>{if(d.current||c.current.length===0)return;d.current=!0;let e=c.current.splice(0,o.batchSize);if(e.length===0){d.current=!1;return}m(e),d.current=!1,c.current.length>0&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{h()},o.batchTimeoutMs))},[o.batchSize,o.batchTimeoutMs,m]),g=(0,S.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{h()},o.batchTimeoutMs)},[h,o.batchTimeoutMs]),_=(0,S.useCallback)(()=>{u.current&&=(clearTimeout(u.current),null),h()},[h]),v=(0,S.useCallback)(e=>{c.current.push(e),c.current.length>=o.batchSize?(u.current&&=(clearTimeout(u.current),null),h()):g()},[h,g,o.batchSize]),y=(0,S.useCallback)(()=>{if(l.current.length===0)return;let e=p();e&&l.current.splice(0).forEach(t=>{t.visit_token=e,v(t)})},[p,v]),x=(0,S.useCallback)(t=>({user_agent:navigator.userAgent,url:R(window.location.href),event:t.event_type,client_timestamp:Date.now(),event_id:P(),nectar_id:e,publication_id:n,visit_token:p()||``,ip:``,store_ip:o.ipTracking,url_referrer:document.referrer||void 0,sendable_id:r,sendable_type:r?`post`:void 0,subscription_id:i,email_hash_sha256:L(a),anonymous_user_id:B(),click_type:t.click_type,click_url:t.click_url,click_raw_tag_name:t.click_raw_tag_name}),[p,e,n,o.ipTracking,r,i,a]),C=(0,S.useCallback)(e=>{l.current.push(e)},[]),w=(0,S.useCallback)(()=>{if(!o.pageViewTracking)return;let e=window.location.href;if(e===s.current)return;s.current=e;let t=x({event_type:`pageview`});t.visit_token?v(t):C(t)},[x,v,o.pageViewTracking,C]),T=(0,S.useCallback)(({clickType:e,clickUrl:t,clickRawTagName:n})=>{if(!o.clickTracking)return;let r=x({event_type:`click`,click_type:e,click_url:t,click_raw_tag_name:n});r.visit_token?v(r):C(r)},[x,v,o.clickTracking,C]);return(0,S.useEffect)(()=>{let e=()=>{y()};return window.addEventListener(F,e),()=>{window.removeEventListener(F,e)}},[y]),(0,S.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]),(0,S.useEffect)(()=>{let e=()=>{_()};return window.addEventListener(`beforeunload`,e),()=>{window.removeEventListener(`beforeunload`,e)}},[_]),t?{trackPageView:w,trackClick:T}:{trackPageView:()=>{},trackClick:()=>{}}},ee={pushEvent:({name:e,category:t,action:n,label:r=window.location.href,value:i=0,data:a={}})=>{let o={event:e,eventProps:{category:t,action:n,label:r,value:i,timestamp:new Date().toISOString(),...a}};window.dataLayer!==void 0&&window.dataLayer.push(o)}},H=e=>e.match(/(iPad|iPhone|iPod)/g)!==null,U=function(e){return e.POPUP=`popup`,e.GATED=`gated`,e.FORM=`form`,e.NONE=`
3none`,e}({}),W=(0,S.createContext)(void 0),G=r(),te=({children:e,email:t,setEmail:n,onEmailChange:r,isSubmitting:i,autoFocus:a})=>(0,G.jsx)(W.Provider,{value:{email:t,setEmail:n,onEmailChange:r,isSubmitting:i,autoFocus:a},children:e}),ne=({visitToken:e,referralId:t,boostAffiliateRecommendingPublicationId:n})=>(0,G.jsx)(T,{fallback:null,children:()=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{hidden:!0,name:`ref`,value:t||``,onChange:()=>null}),(0,G.jsx)(`input`,{hidden:!0,name:`bhba`,value:n||``,onChange:()=>null}),(0,G.jsx)(`input`,{hidden:!0,name:`visit_token`,value:e||``,onChange:()=>null})]})}),K=({type:e=U.NONE,onEmailChange:t,onSuccess:n,autoFocus:r=!1,premiumOfferId:i,children:c,bodyTextColor:d})=>{let{t:p}=s(),m=a(),{publication:b}=u(`root`),{setCookie:C,cookies:w,visitToken:T,referralId:E,currentPath:D,postId:O}=_(),k=y(w.bhba||void 0),{pathname:A}=o(),[j,M]=g(),N=(0,S.useRef)(null),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)({signupUrl:``,anonymousUserId:``,sendableId:``,sendableType:``});(0,S.useEffect)(()=>{typeof window>`u`||L({signupUrl:window.location.href,anonymousUserId:B(),sendableId:O??``,sendableType:O?`post`:``})},[O]);let R=l(),z=R.data,V=R.state===`submitting`,W=b.web_template.signup_flow.filter(({enabled:e})=>e),K=W[0],q=W.length>0&&W?.[0]?.managed_type!==`custom`,J=!!K&&!K.full_url.startsWith(b.url),Y=e===U.POPUP,X=e===U.GATED,Z=e===U.FORM,Q=Y||X||Z,$=(0,S.useMemo)(()=>{if(Q)return A;if(K){let e=K.href.split(`?`),t=e[0],n=e[1]||``,r=new URLSearchParams(n);return r.set(`email`,j),`${t}?${r.toString()}`}return`/`},[K,A,j,Q]),{double_opt_required:re,has_referral_program:ie,private:ae,require_subscriber_approval:oe}=b,se=!!(re||ie&&E);x(z?.toast),(0,S.useEffect)(()=>{if(z?.toast?.status===`success`&&(C({name:`email_capture_disabled`,value:`true`,days:30}),N?.current?.reset()),z?.dataLayerEvent&&ee.pushEvent(z.dataLayerEvent),!Q&&z?.redirectTo&&q){let e={startedAt:new Date().toISOString(),currentIndex:0,nextIndex:1,redirects:W};localStorage.setItem(v.SIGNUP_REDIRECTS,JSON.stringify(e))}!Q&&z?.redirectTo&&(K&&J?setTimeout(()=>{if(H(navigator.userAgent))try{window.location=z?.redirectTo}catch{window.location=z?.redirectTo}else window.open(z?.redirectTo,`_blank`),m(`/`)},1e3):m(z?.redirectTo)),z?.redirectTo&&n&&n()},[z]);let ce=()=>b.require_subscriber_approval?p(`notifications.subscribe.require_approval`):b.double_opt_required?p(`notifications.subscribe.confirm`):p(`notifications.subscribe.subscribed`),le=(e,t)=>
3{if(e.preventDefault(),b?.enable_signup_confirmation&&!P){f.error(`Accept ToU & Privacy Policy.`);return}let n=new FormData(e.currentTarget),r=n.get(`visit_token`),i=n.get(`ref`),a=j?.trim();if(n.set(`is_js_enabled`,`true`),n.set(`accepted_tos`,String(P)),n.set(`email`,a),!a){f.error(`Please enter a valid email address`);return}!r&&T&&n.set(`visit_token`,T),!i&&E&&n.set(`ref`,E),t&&n.set(`premium_offer_id`,t),typeof window<`u`&&(n.set(`nectar_signup_url`,window.location.href),n.set(`nectar_anonymous_user_id`,B()),O&&(n.set(`nectar_sendable_id`,O),n.set(`nectar_sendable_type`,`post`))),R.submit(n,{method:`post`,action:`/create`})};return ae&&!oe?null:(0,G.jsx)(`div`,{className:`flex flex-col items-center w-full`,children:(0,G.jsxs)(R.Form,{ref:N,method:`post`,action:`/create`,className:`w-full bg-transparent group rounded-wt`,onSubmit:e=>le(e,i),children:[(0,G.jsx)(ne,{visitToken:T,referralId:E,boostAffiliateRecommendingPublicationId:k}),(0,G.jsx)(`input`,{name:`redirect_path`,type:`hidden`,value:$}),(0,G.jsx)(`input`,{name:`sent_from_orchid`,type:`hidden`,value:`true`}),(0,G.jsx)(`input`,{name:`fallback_path`,type:`hidden`,value:D}),(0,G.jsx)(`input`,{name:`nectar_signup_url`,type:`hidden`,value:I.signupUrl}),(0,G.jsx)(`input`,{name:`nectar_anonymous_user_id`,type:`hidden`,value:I.anonymousUserId}),I.sendableId?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{name:`nectar_sendable_id`,type:`hidden`,value:I.sendableId}),(0,G.jsx)(`input`,{name:`nectar_sendable_type`,type:`hidden`,value:I.sendableType})]}):null,(0,G.jsx)(`input`,{name:`double_opt`,type:`hidden`,value:se.toString()}),(0,G.jsx)(`input`,{name:`trigger_redirect`,type:`hidden`,value:q.toString()}),(0,G.jsx)(h,{name:`subscribe`,successMessage:ce(),errorMessage:p(`errors.default`)}),(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(te,{email:j,setEmail:M,onEmailChange:t,isSubmitting:V,autoFocus:r,children:c}),b?.enable_signup_confirmation&&(0,G.jsxs)(`div`,{className:`flex flex-row mt-3 space-x-2`,children:[(0,G.jsx)(`input`,{type:`checkbox`,className:`w-4 h-4 border-gray-300 rounded text-lp-main-signup-cta-color focus:ring-indigo-500`,checked:P,onChange:()=>F(!P)}),!b?.terms_of_service||b?.terms_of_service.length===0?(0,G.jsxs)(`p`,{className:`text-xs font-medium`,style:{color:d},children:[p(`shared.cta.gdpr_signup_consent`),` `,(0,G.jsx)(`a`,{href:`https://www.beehiiv.com/tou`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:p(`footer.terms_of_use`)}),` `,p(`shared.cta.and`),` `,(0,G.jsx)(`a`,{href:`https://www.beehiiv.com/privacy`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:p(`footer.privacy_policy`)}),`.`]}):(0,G.jsxs)(`p`,{className:`text-xs font-medium`,style:{color:d},children:[p(`shared.cta.gdpr_signup_consent`),` `,p(`shared.cta.sign_up`),` `,(0,G.jsx)(`a`,{href:`/tos`,target:`_blank`,className:`underline underline-offset-1 hover:opacity-80`,rel:`noreferrer`,children:p(`meta.titles.tos`)}),`.`]})]})]})]})})},q=()=>{let e=(0,S.useContext)(W);if(!e)throw Error(`useSignup must be used within a SignupProvider`);return e},J=e(p(),1),Y=({color:e,children:t,iconEnabled:n,className:r,style:i={}})=>(0,G.jsxs)(`div`,{className:(0,J.default)(`flex w-full items-center`,r),style:i,children:[n&&(0,G.jsx)(`div`,{className:`pl-2`,style:{color:e},children:(0,G.jsx)(D,{className:`h-6 w-6`})}),t]}),X=({backgroundColor:e,fontFamily:t,fontSize:n,textColor:r,autoFocus:i,placeholderText:a,setEmail:o,onEmailChange:c,className:l})=>{let{t:u}=s();return(0,G.jsx)(`input`,{type:`email`,name:`email`,autoComplete:`email`,autoFocus:i,required:!0,style:{...e&&{borderColor:e},...t&&{fontFamily:t},color:`#111827`},className:(0,J.default)(`wt-button-font z-10 w-full border-none bg-transparent placeholder-shown:text-ellipsis`,{"text-lg focus:text-lg active:text-lg sm:text-lg":!n||n===`lg`},{"text-sm focus:text-sm active:text-sm":n===`sm`},l),onChange:e=>{o(e.target.value),c&&c(e.target.value)},placeholder:a||u(`subscribe.email_placeholder`)||``})},Z=({className:e,children:t,style:n={}})=>{let{classes:r}=m();return(0,G.jsx)(`div`,{style:n,className:(0,J.default)(`flex w-full flex-col items-center sm:flex-row`,e,r.radiu
3s),children:t})},Q=e=>{switch(e){case`rounded-none`:return`rounded-none`;case`rounded-sm`:return`rounded-xs`;case`rounded-md`:return`rounded-sm`;case`rounded-lg`:return`rounded-md`;case`rounded-xl`:return`rounded-lg`;case`rounded-2xl`:return`rounded-xl`;case`rounded-3xl`:return`rounded-2xl`;default:return`rounded-none`}},$=({isSubmitting:e,ctaText:t,backgroundColor:n,fontFamily:r,fontSize:i,textColor:a,className:o,borderColor:c,shouldAdjustRadius:l=!1})=>{let{t:u}=s(),{classes:d}=m(),f=t||u(`shared.cta.subscribe`);return(0,G.jsx)(`input`,{type:`submit`,value:e?`${u(`shared.actions.submitting`)}...`:f,style:{...n&&{backgroundColor:n},...a&&{color:a},...r&&{fontFamily:r},...c&&{borderColor:c}},className:(0,J.default)(`cursor-pointer px-5 py-3 font-semibold`,`w-full sm:w-auto`,{"text-lg focus:text-lg active:text-lg sm:text-lg":!i||i===`lg`},{"text-sm focus:text-sm active:text-sm":i===`sm`},l?d.radius:Q(d.radius),o),disabled:e})},re=({signupStyles:e,isSubmitting:t,autoFocus:n,setEmail:r,onEmailChange:i})=>{let{fontFamily:a,fontSize:o,buttonFontFamily:s,buttonBgColor:c,buttonTextColor:l,placeholderBgColor:u,placeholderTextColor:d,buttonText:f,placeholderText:p,borderEnabled:m,borderColor:h,emailIconEnabled:g}=e;return(0,G.jsxs)(Z,{style:{backgroundColor:u,border:m?`2px solid ${h}`:`none`},className:`overflow-hidden p-1`,children:[(0,G.jsx)(Y,{color:c||``,style:{backgroundColor:u},iconEnabled:g,children:(0,G.jsx)(X,{fontFamily:a,fontSize:o,autoFocus:n,setEmail:r,onEmailChange:i,placeholderText:p,textColor:d})}),(0,G.jsx)($,{isSubmitting:t,fontFamily:s,fontSize:o,ctaText:f,backgroundColor:c,textColor:l})]})},ie=e=>{switch(e){case`none`:return`rounded-none sm:rounded-r-none`;case`sm`:return`rounded-none sm:rounded-sm-r`;case`md`:return`rounded-none sm:rounded-md-r`;case`lg`:return`rounded-none sm:rounded-lg-r`;case`xl`:return`rounded-none sm:rounded-xl-r`;case`2xl`:return`rounded-none sm:rounded-2xl-r`;case`3xl`:return`rounded-none sm:rounded-3xl-r`;default:return`rounded-none`}},ae=({signupStyles:e,isSubmitting:t,autoFocus:n,setEmail:r,onEmailChange:i})=>{let{webTheme:a}=m(),{fontFamily:o,buttonFontFamily:s,buttonBgColor:c,buttonTextColor:l,placeholderBgColor:u,placeholderTextColor:d,buttonText:f,placeholderText:p,borderEnabled:h,borderColor:g,emailIconEnabled:_}=e,v=ie(a.radius);return(0,G.jsxs)(Z,{style:{backgroundColor:u,border:h?`2px solid ${g}`:`none`},className:`overflow-hidden`,children:[(0,G.jsx)(Y,{color:c||``,style:{backgroundColor:u},iconEnabled:_,children:(0,G.jsx)(X,{fontFamily:o,autoFocus:n,setEmail:r,onEmailChange:i,placeholderText:p,textColor:d})}),(0,G.jsx)($,{isSubmitting:t,fontFamily:s,ctaText:f,backgroundColor:c,textColor:l,className:v,shouldAdjustRadius:!0})]})},oe=({signupStyles:e,isSubmitting:t,autoFocus:n,setEmail:r,onEmailChange:i})=>{let{classes:a}=m(),{fontFamily:o,buttonFontFamily:s,buttonBgColor:c,buttonTextColor:l,placeholderBgColor:u,placeholderTextColor:d,buttonText:f,placeholderText:p,borderEnabled:h,borderColor:g,emailIconEnabled:_}=e;return(0,G.jsxs)(Z,{className:`gap-2 overflow-hidden`,children:[(0,G.jsx)(Y,{color:c,iconEnabled:_,className:(0,J.default)(a.radius),style:{backgroundColor:u,border:h?`2px solid ${g}`:`none`},children:(0,G.jsx)(X,{fontFamily:o,autoFocus:n,setEmail:r,onEmailChange:i,placeholderText:p,textColor:d,className:`py-3`})}),(0,G.jsx)(`div`,{className:(0,J.default)(`w-full sm:w-auto`,a.radius),style:{backgroundColor:h?c:``,border:h?`2px solid ${c}`:`none`},children:(0,G.jsx)($,{isSubmitting:t,fontFamily:s,ctaText:f,backgroundColor:c,textColor:l})})]})},se=e=>!e||![`template-1`,`template-2`,`template-3`].includes(e)?`template-1`:e,ce=({signupStyles:e})=>{let t=se(e?.template),n={"template-1":re,"template-2":ae,"template-3":oe}[t],{isSubmitting:r,autoFocus:i,email:a,setEmail:o,onEmailChange:s}=q();return(0,G.jsx)(n,{signupStyles:e,autoFocus:i,isSubmitting:r,email:a,setEmail:o,onEmailChange:s})},le=({signupStyles:e,type:t,premiumOfferId:n,onEmailChange:r,onSuccess:i,autoFocus:a})=>e?(0,G.jsx)(K,{type:t,premiumOfferId:n,onEmailChange:r,onSuccess:i,autoFocus:a,bodyTextColor:e.bodyTextColor,children:(0,G.jsx)(ce,{signupStyles:e})}):null,ue=function(e){return e.POPUP=`popup`,e.GATED=`gated`,e.FORM=`form`,e.NONE=`
3none`,e}({}),de=function(e){return e.INLINE=`inline`,e.BOTTOM=`bottom`,e}({});export{ee as a,I as c,H as i,T as l,ue as n,B as o,le as r,V as s,de as t};
4//# sourceMappingURL=types-BpAlB3Az.js.map
5//# debugId=3772e48f-f0e5-5bd8-92da-4a91bd6459b1

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.