1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6073],{13738:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(89099),o=i(14232),a=i(58905);let s=function(e,t){let i=(0,n.useRouter)();(0,o.useEffect)(()=>{let n=async()=>{let n=i.query[a.uO];if(n&&n===e){await setTimeout(async()=>{await t()});let e={...i.query};delete e[a.uO],await i.replace({pathname:i.pathname,query:e},void 0,{shallow:!0})}};return n(),i.events.on("routeChangeComplete",n),()=>{i.events.off("routeChangeComplete",n)}},[i,e,t])}},46073:(e,t,i)=>{i.r(t),i.d(t,{default:()=>f});var n=i(37876),o=i(74162),a=i(89099),s=i(45105),l=i.n(s),c=i(14232),r=i(58905),d=i(51189),u=i(13738),m=i(30039),w=i(57923);let f=(0,o.PA)(()=>{let{auth:e}=(0,m.nc)(),{user:{webim:t}}=(0,m.kH)(),i=(0,a.useRouter)(),[o,s]=(0,c.useState)(!1),[f,h]=(0,c.useState)(!1),p=()=>{window.webim.api.chat.start()},v=()=>{var e,t,i;null==(i=window)||null==(t=i.webim)||null==(e=t.api)||e.chat.close()};return((0,c.useEffect)(()=>{if(!(0,w.S$)()){let o=document.querySelector(r.tn),a=document.querySelector(r.SX);if(window.webim){var i,n;!e&&(window.webim_visitor=null,(null==(n=window.webim)?void 0:n.api)&&a&&"block"===a.style.display&&window.webim.api.chat.close()),t&&(window.webim_visitor={fields:{id:t.visitor.fields.id,login:t.visitor.fields.login,phone:t.visitor.fields.phone,info:t.visitor.fields.info,display_name:t.visitor.fields.display_name,comment:t.visitor.fields.comment},hash:t.visitor.hash}),null==(i=window.webim.api)||i.onProvidedVisitorChanged(),o&&(o.style.display=e&&window.webim_visitor?"block":"none")}}},[e,t]),(0,c.useEffect)(()=>(i.events.on("routeChangeStart",v),()=>{i.events.off("routeChangeStart",v)}),[]),(0,c.useEffect)(()=>{f&&o&&(p(),h(!1))},[f,o]),(0,u.A)(d.qr.CHAT,()=>{(0,w.AI)(t.operatorsOnline)?p():(h(!0),setTimeout(()=>{h(!1)},3e5))}),e&&t)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{className:"webim_button",href:null,rel:"webim",style:{display:"none"},children:(0,n.jsx)("img",{src:"".concat(t.settings.accountName,"/button.php?location=").concat(t.settings.locationName),alt:"ЧаÑ"})}),(0,n.jsx)(l(),{id:"webim-data",strategy:"lazyOnload",async:!0,type:"text/javascript",children:'\n webim = {\n accountName: "koronapay",\n domain: "'.concat(new URL(t.settings.accountName).hostname,'",\n location: "').concat(t.settings.locationName,'"\n };\n webim_visitor = {\n fields: {\n id: "').concat(t.visitor.fields.id,'",\n login: "').concat(t.visitor.fields.login,'",\n phone: "').concat(t.visitor.fields.phone,'",\n info: "').concat(t.visitor.fields.info,'",\n display_name: "').concat(t.visitor.fields.display_name,'",\n comment: "').concat(t.visitor.fields.comment,'"\n },\n hash: "').concat(t.visitor.hash,'"\n };\n ')}),(0,n.jsx)(l(),{id:"chat",strategy:"lazyOnload",async:!0,type:"text/javascript",onLoad:()=>s(!0),src:"".concat(t.settings.accountName,"/js/button.js")})]}):null})}}]);
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.