1"use strict";(self.webpackChunktrux_common=self.webpackChunktrux_common||[]).push([[3459],{43459:function(e,t,a){a.r(t);a(98992),a(3949);var s=a(52891);a(92354);t.default=class extends s.xI{static targets=["param"];phone=null;connect(){document.addEventListener("block_frame_update",e=>{this.update()}),this.element.dataset?.checkForm&&(document.addEventListener("_form_constructor_submit",e=>{this.runUpdate([{key:"form_id",value:e.detail.formId},{key:"keyField",value:this.phone}]),this.element.scrollIntoView({behavior:"smooth",block:"start"})}),document.addEventListener("td-fc:field-changed",e=>{e.detail.field===this.element.dataset?.formFieldAlias&&e.detail.value&&(this.phone=e.detail.value,22===this.phone.length&&this.checkPhoneIsWin())}))}async checkPhoneIsWin(){const e=this.element.dataset?.key,t=`/block/${e}/parts?code=${this.phone}`;let a=await fetch(t);if(a.ok){const e=await a.json(),t=JSON.stringify([{label:"is_win",group:"hidden",value:e.state_win}]),s=this.element.dataset?.formIndex;localStorage.setItem(`${s}.additionalRequestData`,t)}}update(){this.runUpdate()}runUpdate(e=[]){let t=new URL(this.element.dataset.src,window.location.origin),a=this.paramsList;Object.keys(a).forEach(function(e,s){t.searchParams.set(e,a[e])},this),e&&e.forEach(function(e){t.searchParams.set(e.key,e.value)},this),this.element.setAttribute("src",t)}get paramsList(){let e={};return this.paramTargets.forEach(function(t){e[t.dataset.blockFrameParam]=t.value},this),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.