PageSourceSearch

https://www.authy.com/etc.clientlibs/twilio-foundation/clientlibs/…/resources/8525.c02c80166ad33a08887a.js

js authy.com collected 2026-10-01 08:30:43 UTC 14,093 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktwilio_foundation_frontend=self.webpackChunktwilio_foundation_frontend||[]).push([[8525],{38525:function(e,t,n){n.r(t),n.d(t,{formatElementByLocale:function(){return f},registerSliderV2Component:function(){return y}});var i=n(91072);const r=["Free","Essentials","Pro","Premier"],c="cmp-pricing-calculator-v2-card",o=e=>({tileTitle:e[0],emailValue:e[1],isTileActive:e[2],isRecommended:e[3],pricing:e[4]}),a=(e,t,n)=>{const i=e.querySelector(t);void 0!==n&&i&&(i.textContent=n)},l=(e,t)=>{const n=`.${c}__title`,i=`.${c}__plan-info`,r=`.${c}__pricing`;e.forEach((e,o)=>{const{emailValue:l,tileTitle:s,isTileActive:u,pricing:d,isRecommended:h}=t[o]??{};a(e,n,s),a(e,i,l),a(e,r,d);const p=e.querySelector(`.${c}__header--recommended`);p&&p.classList.toggle("visible",!!h),e.classList.toggle(`${c}--recommended`,!!h),e.classList.toggle(`${c}--inactive`,!u);const m=e.querySelector(".button-primary");m?.classList.toggle("disabled",!u)})},s="cmp-pricing-calculator-v2-card",u={0:2e3,1:5e3,2:1e4,3:2e4,4:5e4,5:1e5,6:2e5,7:5e5},d={0:0,1:15e3,2:3e4,3:5e4,4:6e4,5:1e5,6:15e4,7:25e4,8:3e5,9:5e5,10:1e6,11:25e5},h=[{plan:0,contacts:2e3,emails:0},{plan:1,contacts:5e3,emails:15e3},{plan:2,contacts:1e4,emails:3e4},{plan:3,contacts:1e4,emails:5e4},{plan:4,contacts:2e4,emails:6e4},{plan:5,contacts:2e4,emails:1e5},{plan:6,contacts:5e4,emails:15e4},{plan:7,contacts:5e4,emails:25e4},{plan:8,contacts:1e5,emails:3e5},{plan:9,contacts:1e5,emails:5e5},{plan:10,contacts:2e5,emails:1e6},{plan:11,contacts:5e5,emails:25e5}],p=e=>({tileTitle:e[0]||void 0,value:e[1]||void 0,isTileActive:e[2],isRecommended:e[3],pricing:e[4]||void 0}),m=(e,t,n)=>{if(void 0!==n){const i=e.querySelector(t);i&&(i.textContent=n)}},g=(0,i.JK)(),f=e=>{if(!e)return"";const t=(e=>{switch(e){case"en":case"ja":default:return",";case"de":case"pt":return".";case"es":case"fr":return" "}})(g);return e.replaceAll(",",t)},v=()=>{const e=document.querySelectorAll(".pricing-calculator-v2__slider-dropdown"),t=document.querySelectorAll(".pricing-calculator-v2__range-slider");e.forEach(e=>{(e=>{Array.from(e.options).forEach(e=>{e.textContent&&(e.textContent=f(e.textContent.trim()))})})(e)}),t.forEach(e=>{const t=e.querySelector("input.pricing-calculator-v2__slider"),n=e.querySelector(".pricing-calculator-v2__sliderticks");n&&(e=>{Array.from(e.children).forEach(e=>{e instanceof HTMLElement&&e.textContent&&(e.textContent=f(e.textContent.trim()))})})(n),t?.addEventListener("input",({target:e})=>{if(!(e instanceof HTMLInputElement&&n))return;const i=parseInt(e.value,10),r=parseInt(e.max,10),c=i/r*100,o=`linear-gradient(to right, #0263E0 ${c}%, #F4F4F6 ${c}%)`;t.style.background=o,Array.from(n.children).forEach(e=>{e instanceof HTMLElement&&(e.getAttribute("value")===String(i)?e.classList.add("active"):e.classList.remove("active"))})})}),(()=>{const e="Show features",t=document.querySelectorAll(".cmp-pricing-calculator-v2-container .cmp-pricing-calculator-v2-card"),n=(e,t)=>{if(e instanceof HTMLDivElement)return void(e.style.height="auto");const n=Array.from(e);if(window.innerWidth>992){const e=n.map(e=>(e.style.height="auto",e)),i=e.map(e=>e.offsetHeight).reduce((e,t)=>Math.max(e,t),0);document.documentElement.style.setProperty(t,`${i}px`),e.forEach(e=>e.style.height="")}else n.forEach(e=>{e.style.height="auto"})},i=()=>{n(document.querySelectorAll(".richtexteditor.paragraph-small"),"--max-richtext-container-card-height"),n(document.querySelectorAll(".pricing-calculator-v2-card-features .list"),"--max-list-container-card-height"),n(document.querySelectorAll(".pricing-calculator-v2-card-features .cmp-pricing-calculator-v2-card-content__addons-list"),"--max-addons-container-card-height"),n(document.querySelectorAll(".cmp-pricing-calculator-v2-card__plan-info"),"--max-plan-info-card-height")};t.forEach(t=>{const n=t.querySelector(".cmp-pricing-calculator-v2-card-content-show-more-button"),r=n?.querySelector("p"),c=t.querySelectorAll(".pricing-calculator-v2-card-features"),o=t.querySelector("#plusSvg"),a=t.querySelector("#minusSvg");
1n?.addEventListener("click",function(){if(c.forEach(e=>{e.classList.toggle("show"),i()}),!r)return;const t=r?.textContent===e;r.textContent=t?"Hide features":e,o?.classList.toggle("icon--hidden",t),o?.classList.toggle("icon--visible",!t),a?.classList.toggle("icon--hidden",!t),a?.classList.toggle("icon--visible",t)})}),document.querySelectorAll(".card-content__addon-item--spacing:last-child span").forEach(e=>{e?.parentNode?.classList.toggle("card-content__addon-item--column",e.textContent.trim().split(" ").length>=3)}),window.addEventListener("load",i),window.addEventListener("resize",i)})(),(()=>{const e=document.querySelector(".cmp-pricing-calculator-v2"),t=e?.id;return!!t&&t.includes("emailApiV2")})()?(()=>{const e=document.getElementById("cmp-pricing-calculator-v2-email-api-slider"),t=document.getElementById("pricingData-emailApiV2");if(!e||!t)return;const n=e.querySelector("#pricing-calculator-v2-range"),i=e.querySelector(".pricing-calculator-v2__slider-dropdown"),a=document.querySelectorAll(`.cmp-pricing-calculator-v2-container .${c}`),s=t.getAttribute("data-plans");if(!s)return;const u=JSON.parse(s),d=e=>{const t=parseInt(e.value,10),n=r.map(e=>{const n=u[e]?.[t];return n?o(n):null});l(a,n)},h=()=>{n&&i&&(window.innerWidth<1280?i.onchange=e=>{const t=e.target;d(t),i.value=t.value,n.value=t.value}:n.oninput=e=>{const t=e.target;d(t),i.value=t.value,n.value=t.value})};window.addEventListener("resize",h),(()=>{const e=r.map(e=>{const t=u[e]?.[0];return t?o(t):null});l(a,e)})(),h()})():(()=>{const e=document.getElementById("cmp-pricing-calculator-v2-marketing-api-slider"),t=document.getElementById("pricingData-marketingCampaignV2");if(!e||!t)return;const n=e.querySelector("#pricing-calculator-v2-rangeContacts"),i=e.querySelector("#pricing-calculator-v2-dropdown-contacts"),r=e.querySelector("#pricing-calculator-v2-rangeEmails"),c=e.querySelector("#pricing-calculator-v2-dropdown-emails"),o=document.querySelectorAll(`.cmp-pricing-calculator-v2-container .${s}`),a=t.getAttribute("data-plans");if(!a)return;const l=JSON.parse(a);function g(e){const t=`.${s}__title`,n=`.${s}__plan-info`,i=`.${s}__pricing`;o.forEach((r,c)=>{const{value:o,tileTitle:a,isTileActive:l,pricing:u,isRecommended:d}=e[c]??{};m(r,t,a),m(r,n,o),m(r,i,u);const h=r.querySelector(`.${s}__header--recommended`);h&&h.classList.toggle("visible",!!d),r.classList.toggle(`${s}--recommended`,!!d),r.classList.toggle(`${s}--inactive`,!l);const p=r.querySelector(".button-primary");p?.classList.toggle("disabled",!l)})}function f(){n&&i&&r&&c&&(window.innerWidth<1440?(i.onchange=e=>{v(i,e),w(i.value,c.value)},c.onchange=e=>{v(c,e),w(i.value,c.value)}):(n.oninput=e=>{v(n,e),w(n.value,r.value)},r.oninput=e=>{v(r,e),w(n.value,r.value)}))}function v(e,t){const n=t.target;e.value=n.value}function y(e,t){return 100*(e+1)/t}function w(e,t){const n=parseInt(e,10),i=parseInt(t,10),r=(1e4===u[n]&&5e4===d[i]?h.filter(e=>1e4===e.contacts&&5e4===e.emails):y(n,8)>y(i,12)?h.filter(e=>u[n]===e.contacts):h.filter(e=>d[i]===e.emails))[0];if(!r)return;const c=l[r.plan.toString()];c&&g(c.map(e=>p(e)))}window.addEventListener("resize",f),function(){const e=l[0];e&&g(e.map(e=>p(e)))}(),f()})()},y=()=>{"loading"!==document.readyState?v():window.addEventListener("DOMContentLoaded",v)}},42430:function(e,t,n){var i=n(94598);const r="e507005",c="e682286",o="e555348",a="e555373",l=(e,t=!1)=>t&&window.location.hostname.startsWith("author-")?`.author-p62254-${e}.adobeaemcloud.com`:`.publish-p62254-${e}.adobeaemcloud.com`,s={setCookie(e,t,n,s=!1,u=!1){const d=((e=!1)=>(0,i.YW)(window.location.hostname).when(e=>e.includes("localhost"),()=>"localhost").when(e=>e.includes("127.0.0.1"),()=>"127.0.0.1").when(e=>e.includes(r),()=>l(r,e)).when(e=>e.includes(c),()=>l(c,e)).when(e=>e.includes(o),()=>l(o,e)).when(e=>e.includes(a),()=>l(a,e)).when(e=>e.includes("sendgrid.com"),()=>".sendgrid.com").when(e=>e.includes("twilio.org"),()=>".twilio.org").when(e=>e.includes("segment.com"),()=>".segment.com").otherwise(()=>".twilio.com"))(u);if(n){const i=new Date;i.setTime(i.getTime()+n),document.cookie=`${e}=${t}; expires=${i.toUTCString()}; domain=${d}; path=/`}else document.cookie=s?`${e}=${t}; domain=${d}; path=/`:`${e}=${t}; path=/`},getCookie(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length&&t.pop()?.split(";").shift()||""},deleteCookie(e){const t=new Date;t.setTime(t.getTime()-864e5),document.cookie=`${e}=; expires=${t.toUTCString()}; path=/`}};t.A=s},91072:function(e,t,n){n.d(t,{JK:function(){return r}});var i=n(42430);const r=()=>{const e=(()=>{const e=window.location.pathname,t=[{key:"en",paths:["/en/","/en-us"]},{key:"es",paths:["/es/","/es-mx"]},{key:"pt",paths:["/pt/","/pt-br"]},{key:"fr",paths:["/fr/","/fr-fr"]},{key:"de",paths:["/de/","/de-de"]}
1,{key:"ja",paths:["/ja/","/ja-jp"]}].find(t=>t.paths.some(t=>e.includes(t)));return t?t.key:null})(),t=(()=>{const e=i.A.getCookie("tw-content-language").split("-")[0];return e&&e.split("-")[0]||null})();return e||t||"en"}},94598:function(e,t,n){n.d(t,{YW:function(){return $}});const i=Symbol.for("@ts-pattern/matcher"),r=Symbol.for("@ts-pattern/isVariadic"),c="@ts-pattern/anonymous-select-key",o=e=>Boolean(e&&"object"==typeof e),a=e=>e&&!!e[i],l=(e,t,n)=>{if(a(e)){const r=e[i](),{matched:c,selections:o}=r.match(t);return c&&o&&Object.keys(o).forEach(e=>n(e,o[e])),c}if(o(e)){if(!o(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let i=[],c=[],o=[];for(const t of e.keys()){const n=e[t];a(n)&&n[r]?o.push(n):o.length?c.push(n):i.push(n)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<i.length+c.length)return!1;const e=t.slice(0,i.length),r=0===c.length?[]:t.slice(-c.length),a=t.slice(i.length,0===c.length?1/0:-c.length);return i.every((t,i)=>l(t,e[i],n))&&c.every((e,t)=>l(e,r[t],n))&&(0===o.length||l(o[0],a,n))}return e.length===t.length&&e.every((e,i)=>l(e,t[i],n))}return Reflect.ownKeys(e).every(r=>{const c=e[r];return(r in t||a(o=c)&&"optional"===o[i]().matcherType)&&l(c,t[r],n);var o})}return Object.is(t,e)},s=e=>{var t,n,r;return o(e)?a(e)?null!=(t=null==(n=(r=e[i]()).getSelectionKeys)?void 0:n.call(r))?t:[]:Array.isArray(e)?u(e,s):u(Object.values(e),s):[]},u=(e,t)=>e.reduce((e,n)=>e.concat(t(n)),[]);function d(e){return Object.assign(e,{optional:()=>h(e),and:t=>p(e,t),or:t=>m(e,t),select:t=>void 0===t?f(e):f(t,e)})}function h(e){return d({[i]:()=>({match:t=>{let n={};const i=(e,t)=>{n[e]=t};return void 0===t?(s(e).forEach(e=>i(e,void 0)),{matched:!0,selections:n}):{matched:l(e,t,i),selections:n}},getSelectionKeys:()=>s(e),matcherType:"optional"})})}function p(...e){return d({[i]:()=>({match:t=>{let n={};const i=(e,t)=>{n[e]=t};return{matched:e.every(e=>l(e,t,i)),selections:n}},getSelectionKeys:()=>u(e,s),matcherType:"and"})})}function m(...e){return d({[i]:()=>({match:t=>{let n={};const i=(e,t)=>{n[e]=t};return u(e,s).forEach(e=>i(e,void 0)),{matched:e.some(e=>l(e,t,i)),selections:n}},getSelectionKeys:()=>u(e,s),matcherType:"or"})})}function g(e){return{[i]:()=>({match:t=>({matched:Boolean(e(t))})})}}function f(...e){const t="string"==typeof e[0]?e[0]:void 0,n=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return d({[i]:()=>({match:e=>{let i={[null!=t?t:c]:e};return{matched:void 0===n||l(n,e,(e,t)=>{i[e]=t}),selections:i}},getSelectionKeys:()=>[null!=t?t:c].concat(void 0===n?[]:s(n))})})}function v(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"bigint"==typeof e}d(g(function(e){return!0}));const S=e=>Object.assign(d(e),{startsWith:t=>{return S(p(e,(n=t,g(e=>y(e)&&e.startsWith(n)))));var n},endsWith:t=>{return S(p(e,(n=t,g(e=>y(e)&&e.endsWith(n)))));var n},minLength:t=>S(p(e,(e=>g(t=>y(t)&&t.length>=e))(t))),length:t=>S(p(e,(e=>g(t=>y(t)&&t.length===e))(t))),maxLength:t=>S(p(e,(e=>g(t=>y(t)&&t.length<=e))(t))),includes:t=>{return S(p(e,(n=t,g(e=>y(e)&&e.includes(n)))));var n},regex:t=>{return S(p(e,(n=t,g(e=>y(e)&&Boolean(e.match(n))))));var n}}),_=(S(g(y)),e=>Object.assign(d(e),{between:(t,n)=>_(p(e,((e,t)=>g(n=>v(n)&&e<=n&&t>=n))(t,n))),lt:t=>_(p(e,(e=>g(t=>v(t)&&t<e))(t))),gt:t=>_(p(e,(e=>g(t=>v(t)&&t>e))(t))),lte:t=>_(p(e,(e=>g(t=>v(t)&&t<=e))(t))),gte:t=>_(p(e,(e=>g(t=>v(t)&&t>=e))(t))),int:()=>_(p(e,g(e=>v(e)&&Number.isInteger(e)))),finite:()=>_(p(e,g(e=>v(e)&&Number.isFinite(e)))),positive:()=>_(p(e,g(e=>v(e)&&e>0))),negative:()=>_(p(e,g(e=>v(e)&&e<0)))})),b=(_(g(v)),e=>Object.assign(d(e),{between:(t,n)=>b(p(e,((e,t)=>g(n=>w(n)&&e<=n&&t>=n))(t,n))),lt:t=>b(p(e,(e=>g(t=>w(t)&&t<e))(t))),gt:t=>b(p(e,(e=>g(t=>w(t)&&t>e))(t))),lte:t=>b(p(e,(e=>g(t=>w(t)&&t<=e))(t))),gte:t=>b(p(e,(e=>g(t=>w(t)&&t>=e))(t))),positive:()=>b(p(e,g(e=>w(e)&&e>0))),negative:()=>b(p(e,g(e=>w(e)&&e<0)))}));b(g(w)),d(g(function(e){return"boolean"==typeof e})),d(g(function(e){return"symbol"==typeof e})),d(g(function(e){return null==e})),d(g(function(e){return null!=e}));
1class E extends Error{constructor(e){let t;try{t=JSON.stringify(e)}catch(n){t=e}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=e}}const A={matched:!1,value:void 0};function $(e){return new L(e,A)}class L{constructor(e,t){this.input=void 0,this.state=void 0,this.input=e,this.state=t}with(...e){if(this.state.matched)return this;const t=e[e.length-1],n=[e[0]];let i;3===e.length&&"function"==typeof e[1]?i=e[1]:e.length>2&&n.push(...e.slice(1,e.length-1));let r=!1,o={};const a=(e,t)=>{r=!0,o[e]=t},s=!n.some(e=>l(e,this.input,a))||i&&!Boolean(i(this.input))?A:{matched:!0,value:t(r?c in o?o[c]:o:this.input,this.input)};return new L(this.input,s)}when(e,t){if(this.state.matched)return this;const n=Boolean(e(this.input));return new L(this.input,n?{matched:!0,value:t(this.input,this.input)}:A)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=q){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function q(e){throw new E(e)}}}]);

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.