1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68],{79068:function(e,t,o){o.r(t),o.d(t,{default:function(){return a}});var i=o(64351),n=o(53143),r=function(e,t,o,i){return new(o||(o=Promise))(function(n,r){function c(e){try{d(i.next(e))}catch(e){r(e)}}function l(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?n(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(c,l)}d((i=i.apply(e,t||[])).next())})};let c=e=>`https://forms-publisher-${e||"euw"}.sitecorecloud.io`,l=(e,t,o)=>r(void 0,void 0,void 0,function*(){var i,n;let l;o&&o.contextId&&o.edgeUrl?(i=o.edgeUrl,n=o.contextId,l=new URL(i).origin+"/v1/forms/publisher/"+e+"?sitecoreContextId="+n):l=c(function(e){let t=e.split("-");return t[t.length-1]}(e))+"/api/v1/forms/"+e;let d=yield function(e){return r(this,void 0,void 0,function*(){return yield(yield fetch(e,{method:"GET",cache:"no-cache"})).text()})}(l);if(t)t.innerHTML=d,function(e){Array.from(e.querySelectorAll("script")).forEach(e=>{var t;let o=document.createElement("script");Array.from(e.attributes).forEach(e=>{o.setAttribute(e.name,e.value)}),o.text=e.text,null===(t=null==e?void 0:e.parentNode)||void 0===t||t.replaceChild(o,e)})}(t);else throw Error("Second parameter of loadForm needs to be a valid DOM node")}),d="undefined"!=typeof HTMLElement?HTMLElement:class{setAttribute(){}};class s extends d{sitecoreContextCallback(e){this.addEventListener("form:engage",t=>{e.getSDK("Events").then(o=>{"preview"===e.pageState||"edit"===e.pageState?console.log("form:engage",t.detail.formId,t.detail.name):null==o||o.form(t.detail.formId,t.detail.name)}).catch(console.log)})}connectedCallback(){var e,t,o,i;let n=this.getAttribute("form-id");if(!n){console.error("Sitecore Form requires form-id attribute to be set.");return}l(n,this,{edgeUrl:null!==(t=null===(e=this.getAttribute("sitecore-edge-url"))||void 0===e?void 0:e.toString())&&void 0!==t?t:null,contextId:null!==(i=null===(o=this.getAttribute("sitecore-edge-context-id"))||void 0===o?void 0:o.toString())&&void 0!==i?i:null})}}"undefined"==typeof window||window.customElements.get("sitecore-form")||window.customElements.define("sitecore-form",s),n.RM(s,{name:"SitecoreForm",isHidden:!0,title:"Sitecore Form",links:{github:"https://github.com/Sitecore-PD/sitecore.cloudsdk.components/tree/master/src/form",npm:"https://www.npmjs.com/package/@sitecore/components",icon:"data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='forms'%3e%3crect%20id='Rectangle%208'%20x='2'%20y='4'%20width='20'%20height='7'%20rx='0.5'%20fill='%23AAA4EC'/%3e%3crect%20id='Rectangle%209'%20x='2'%20y='12.5'%20width='12'%20height='7'%20rx='0.5'%20fill='%235548D9'/%3e%3c/g%3e%3c/svg%3e"},properties:{formId:{type:"string"}}});var a=e=>i.Jp(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.