1import{m as A,q as E,o as U,Y as V,ah as $,u as f,N as _,ag as D,Q as l,$ as w,U as I,p as h,j as T,M as p,v as R}from"./uOatmh1Q.js";import{_ as j}from"./p7j0WGZt.js";function G(o){if(!o||typeof o!="object")return!1;const t=o;return typeof t.id=="number"&&typeof t.section=="string"&&typeof t.loaderUrl=="string"}function O(o,t){const n=document.createElement("script");n.setAttribute("data-b24-form",`inline/${t.id}/${t.section}`),n.setAttribute("data-skip-moving","true"),o.appendChild(n);const a=document.createElement("script");return a.async=!0,a.src=`${t.loaderUrl}?${Date.now()/18e4|0}`,o.appendChild(a),()=>{o.innerHTML=""}}const S={class:"modal-content"},Y={class:"modal-body"},q={key:0,class:"loading-overlay"},z=A({__name:"BitrixModalForm",props:{modelValue:{type:Boolean},form:{},title:{}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,a=t,r=h({get:()=>n.modelValue,set:e=>a("update:modelValue",e)}),d=h(()=>G(n.form)?n.form:null),c=T(!1);let s=null;const u=()=>{s&&(clearTimeout(s),s=null),c.value=!1},M=e=>{e.getFields().forEach(function(i){(i.name=="LEAD_UF_CRM_LEAD_AGREEMENT_MAILING"||i.name=="CONTACT_UF_CRM_67B711DC5570E")&&(i.item().selected=!0)})},x=e=>{c.value=!0,s&&clearTimeout(s),s=setTimeout(u,e)},v=T(null);let m=null;const b=e=>{u(),M(e.detail.object)},L=async()=>{if(x(4e3),window.addEventListener("b24:form:init",b),await R(),!v.value||!d.value){u();return}m?.(),m=O(v.value,d.value)},B=()=>{window.removeEventListener("b24:form:init",b),m?.(),m=null},C=()=>{typeof window>"u"||(d.value?L():console.warn("[BitrixModalForm] Ðе пеÑедан деÑкÑипÑÐ¾Ñ CRM-ÑоÑÐ¼Ñ Ð24 â ÑоÑма не показана."))},F=()=>{u(),B()};let y=0;const N=()=>{const e=document.body;y=window.scrollY||document.documentElement.scrollTop,e.style.overflow="hidden",e.style.position="fixed",e.style.width="100%",e.style.top=`-${y}px`},k=()=>{const e=document.body;e.style.overflow="",e.style.position="",e.style.width="",e.style.top="",window.scrollTo(0,y)};E(r,e=>{typeof window>"u"||(e?(C(),N()):(F(),k()))}),E(()=>n.form,()=>{r.value&&typeof window<"u"&&(B(),C())}),U(()=>{F(),r.value&&k()});const g=()=>{r.value=!1};return(e,i)=>(p(),V($,{to:"#modals-teleport"},[f(r)?(p(),_("div",{key:0,class:"modal-overlay",onClick:D(g,["self"])},[l("div",S,[l("button",{class:"close-btn",onClick:g},"Ã"),l("div",Y,[f(c)?(p(),_("div",q,[...i[0]||(i[0]=[l("div",{class:"loading-spinner"},[l("div",{class:"spinner"}),l("p",{class:"loading-text"},"ÐагÑÑзка ÑоÑмÑ...")],-1)])])):w("",!0),f(d)?(p(),_("div",{key:1,ref_key:"nativeContainer",ref:v,class:I(["b24-native",{"content-hidden":f(c)}])},null,2)):w("",!0)])])])):w("",!0)]))}}),Q=j(z,[["__scopeId","data-v-0ac3df68"]]);export{Q as B,G as i};
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.