1"use strict";(self.webpackChunktwilio_foundation_frontend=self.webpackChunktwilio_foundation_frontend||[]).push([[1207],{1207:function(e,n,t){t.r(n),t.d(n,{registerProductRecommenderEntry:function(){return h}});const o="/en-us/products/product-recommendation",r="usecase",c="[data-self-target]",i="wcmmode",d="disabled",a="product-recommender-entry--submitting",u={PROMPT_SUBMIT:"product_recommender_prompt_submit",PREDEFINED_USECASE_CLICK:"product_recommender_predefined_usecase_click"},s={ROOT:".product-recommender-entry",INPUT:".product-recommender-entry__input",SUBMIT:".product-recommender-entry__submit-btn",OPTION:".product-recommender-entry__option"};function l(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e})}function m(e){const n=e.replace(/\.html$/,"");return n.length>1?n.replace(/\/$/,""):n}function w(e,n,t){const o=e.querySelector(s.SUBMIT);e.classList.toggle(a,t),n.disabled=t,o&&(o.disabled=t),e.querySelectorAll(s.OPTION).forEach(e=>{e.disabled=t})}function f(e,n){const t=n.value.trim();t&&(l(u.PROMPT_SUBMIT),w(e,n,!0),function(e,n,t){!function(e){return e.origin===window.location.origin&&m(e.pathname)===m(window.location.pathname)}(t)?(window.open(t.toString(),"_blank","noopener"),w(e,n,!1)):window.location.assign(t.toString())}(e,n,function(e,n){const t=null!==e.closest(c),a=t?new URL(window.location.href):new URL(e.dataset.experienceUrl?.trim()||o,window.location.origin);return t?a.hash="":function(e){new URLSearchParams(window.location.search).get(i)===d&&e.searchParams.set(i,d)}(a),a.searchParams.set(r,n),a}(e,t)))}function p(e){const n=e.querySelector(s.INPUT);n&&(e.querySelector(s.SUBMIT)?.addEventListener("click",()=>f(e,n)),n.addEventListener("keydown",t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),f(e,n))}),e.querySelectorAll(s.OPTION).forEach(t=>{t.addEventListener("click",()=>{n.value=t.textContent?.trim()||"",l(u.PREDEFINED_USECASE_CLICK),f(e,n)})}))}function _(){document.querySelectorAll(s.ROOT).forEach(p)}function h(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",_):_()}}}]);
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.