1define("VideoCall/Utils",["require","exports","Types/function","EngineUser/Info","Controls/popup","CloudStatisticsHelper/cloudStatisticsHelper","Types/source","Feature/feature","VideoCall/Utils/Uuid","i18n!VideoCall","VideoCall/ExCalls","Env/Constants","Application/Env"],(function(e,t,n,i,o,a,r,s,l,c,d,u,f){"use strict";function h(e,t){const n=null==e?void 0:e.map((e=>"string"!=typeof e?JSON.stringify(e):e)).join("!"),i=["phone"===t.type?"/call/room/":"/meet/",t.roomId,"?"];if(n)i.push("toInvite="+n);else if(t&&t.phoneToInvite)i.push("phoneToInvite="+t.phoneToInvite);return Object.entries(t).forEach((([e,t])=>{let n;if(void 0!==t){switch(e){case"video":n=`video=${t}`;break;case"dialogId":n=`dialogId=${t}`;break;case"docGUID":n=`d=${t}`;break;case"type":n=`type=${t}`;break;case"extraHeaders":n=`e=${btoa(encodeURIComponent(JSON.stringify(t)))}`;break;case"sabyGetCardId":n=`sabyGetCardId=${encodeURIComponent(t)}`;break;case"isSabyGet":n=`isSabyGet=${t}`;break;case"multiPush":n=`multiPush=${t}`;break;case"skipInviteConfirmation":n=`skipInviteConfirmation=${t}`;break;default:n=void 0}if(void 0!==n)i.push(`&${n}`)}})),i.join("")}function p(e){if(!e||"string"==typeof e)e={};if(void 0===e.audio)e.audio=!0;if(e.roomId&&e.dialogId)delete e.roomId;return e.roomId=e.roomId||l.v4(),e}function v(e){if(e)return e instanceof Array?e:[e]}function C(e,t){let n;if(e.startsWith("https://"))n=e.replace(/^https?:\/\/[^\/]+/,(0,d.getMeetURL)());else if(f.location.host.includes("reg.tensor"))n=e;else n=(0,d.getMeetURL)()+e;const i=window.open(encodeURI(n),t||"",g());if(i)i.focus()}function g(){let e={width:window.screen.availWidth||window.screen.width||window.outerWidth,height:window.screen.availHeight||window.screen.height||window.outerHeight,top:0,left:0,target:"window"};if(window.screen.availLeft)e.left+=window.screen.availLeft;try{const t=localStorage.getItem("WebRTC-ScreenSettings");if(t){const n=JSON.parse(t),i=n.devicePixelRatio>=2?2:1;n.width=n.width*n.devicePixelRatio/i,n.height=n.height*n.devicePixelRatio/i,Object.assign(e,n),e={...e,...n}}}catch(e){}return Object.entries(e).map((([e,t])=>`${e}=${t}`)).join(",")}function w(e,t){S(e,t)}function m(){var e;return!(!i.Info.get("ÐденÑиÑикаÑоÑСеÑвиÑаÐÑоÑилей")||"Ðемо-веÑÑиÑ"===i.Info.get("ÐÑводимоеÐмÑ")||i.Info.get("guest")||/гоÑÑÑ/i.test(`${i.Info.get("ÐмÑÐолÑзоваÑелÑ")} + ${i.Info.get("ÐогинÐолÑзоваÑелÑ")}`)||(null===(e=u.constants.product)||void 0===e?void 0:e.includes("sabyinside")))}function I(){return m()}function y(){return!!f.location.host.match(/\.ru$/)||!!f.location.host.match(/\.xn--p1ai$/)||!!f.location.host.match(/\.top$/)}function k(){return!!f.location.host.match(/\.setty\.kz$/)}function b(){if(void 0===f.location)return!1;else return(y()||k())&&I()}async function P(){if(i.Info.get("isClient"))return!1;const e=new r.SbisService({endpoint:{address:"/webrtc/service/",contract:"SIP"}});if(f.location.host.match(/.+\.kz/))return!1;try{return(await e.call("HasConnectedWebClient",{})).getRawData()}catch(e){return!1}}if(Object.defineProperty(t,"__esModule",{value:!0}),t.getDeviceId=t.createVideoCallLink=t.askToCallBack=t.addGetParam=t.initPhoneCall=t.isPhoneCallAvailable=t.hasConnectedWebClient=t.showVideoCallLinkCopyDialog=t.generateVideoCallLink=t.getStand=t.openPromo=t.openQuickMeeting=t.getVideoCallLink=t.callUser=t.needRenderVideoCallButton=t.isKzCloud=t.isRuCloud=t.isBrowserSupport=t.isAvailable=t.isServiceAvailable=t.initCall=t.getWindowParams=t.openVideoCallByLink=void 0,"undefined"!=typeof window&&(/reg\.tensor\.ru/.test(window.location.host)||/reg\.setty\.kz/.test(window.location.host))&&!/\/meet\//.test(window.location.href))new Promise(((t,n)=>{e(["VideoCall/Listener"],t,n)}));const S=(0,n.throttle)((async(t,n)=>{const a=p(n);let r=v(t);if(1===(null==r?void 0:r.length)&&i.Info.get("ÐденÑиÑикаÑоÑСеÑвиÑаÐÑоÑилей")===r[0])return void o.Confirmation.openPopup({style:"danger",type:"ok",message:c("ÐÑ Ð¿ÑÑаеÑеÑÑ Ð¿Ð¾Ð·Ð²Ð¾Ð½Ð¸ÑÑ ÑÐ°Ð¼Ð¾Ð¼Ñ Ñебе")});if(r&&r.length>1)r=r.filter((e=>e!==i.Info.get("ÐденÑиÑикаÑоÑСеÑвиÑаÐÑоÑилей")));C(h(r,a));const s=new Error,l=await new Promise(((t,n)=>{e(["VideoCall/Event/Report"],t,n)})),d=await new Promise(((t,n)=>{e(["VideoCall/Event/Event"],t,n)})),u=await new Promise(((t,n)=>{e(["VideoCall/DataProvider"],t,n)}));(async t=>{const{Bus:n}=await new Promise(((t,n)=>{e(["Env/Event"],t,n)}));n.channel("VideocallChannel").notify("onInitCall",t)})(a);new d("utils",{conversationId:a.roomId,isPoint:!0,content:{stack:s.stack,toInvite:r}});if(l.insertIntoConversation(a.roomId),!a.isBCard)u.getUserInfo(i.Info.get("ÐденÑиÑикаÑоÑСеÑвиÑаÐÑоÑилей"),!0).then((e=>{l.insertIntoUserInfo(e.lastName?{...e,name:e.lastName+" "+e.firstName}:e),l.insertIntoConversationMember({conversation_id:a.roomId,member_id:e.uuid})}))}),1e3);t.openVideoCallByLink=C,t.getWindowParams=g,t.initCall=w,t.isServiceAvailable=m,t.isAvailable=I,t.isBrowserSupport=function(){return b()},t.isRuCloud=y,t.isKzCloud=k,t.needRenderVideoCallButton=b,t.callUser=function(e){if(!e)throw new Error("no callee");C((0,d.getMeetURL)()+"/meet/"+l.v4()+"?video=true&toInvite="+e)},t.getVideoCallLink=function(e){return"/meet/"+l.v4()+"?video=true"+(e?"&meeting="+e:"")},t.openQuickMeeting=function(){if(C("/meet/"+l.v4()+"?video=true&quickMeeting=true"),a.sendCloudStatistic)(0,a.sendCloudStatistic)({functionality:"ÐидеоÑвÑзÑ",context:"Ðидеозвонки",action:"ÐÑÑÑÑÐ°Ñ Ð²ÑÑÑеÑа"})},t.openPromo=function(e){const t=e?"&guestName="+encodeURIComponent(e):"";if(C((0,d.getMeetURL)()+"/meet/p/"+l.v4()+"?video=true"+t),a.sendCloudStatistic)(0,a.sendCloudStatistic)({functionality:"ÐидеоÑвÑзÑ",context:"Ðидеозвонки",action:"ÐÑомо звонок"})},t.getStand=function(){const e=f.location.host.match(/(dev-|pre-test-|test-|fix-)(.*)/);return e?e[1]:""},t.generateVideoCallLink=async function(t,n){return(await new Promise(((t,n)=>{e(["VideoCall/ExCalls"],t,n)}))).generateLink(t,n)},t.showVideoCallLinkCopyDialog=async function(t,n){const i=await new Promise(((t,n)=>{e(["VideoCall/ExCalls"],t,n)}));try{await i.copyLink(t,n)}catch(e){i.showAlert()}},t.hasConnectedWebClient=P,t.isPhoneCallAvailable=async function(){const e=await P();return I()&&e},t.initPhoneCall=async function(e,t){const[n]=await s.Feature.require(["outgoing-sip"]);if(n.isOn())w(void 0,{phoneToInvite:e,video:!1});else w({phoneNumber:e},{video:!1,type:"phone",extraHeaders:t})},t.addGetParam=function(e,t,n){const i=document.createElement("a");i.href=e;const o=i.search+(i.search.length<=0?"?":"&")+encodeURIComponent(t)+"="+encodeURIComponent(n);return(0===i.pathname.indexOf("/")?i.pathname:"/"+i.pathname)+o+i.hash},t.askToCallBack=function(e){new r.SbisService({endpoint:{address:"/videocall/service/",contract:"VideoCallHelpers"}}).call("AskToCallBack",{PersonId:e})},t.createVideoCallLink=function(e,t){const n=p(t),i=v(e);return encodeURI(h(i,n))},t.getDeviceId=function(){var e;let t=null;const n=localStorage.getItem("deviceIds");if(!n)return t;try{t=null!==(e=JSON.parse(n)[1.6])&&void 0!==e?e:null}catch{return t}return t}}));
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.