@factoringplus/pl-components-pack-v3 0.5.2-pre-16 → 0.5.2-pre-17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47005,13 +47005,14 @@ const useConfigStore = defineStore("config", {
|
|
|
47005
47005
|
}
|
|
47006
47006
|
}
|
|
47007
47007
|
});
|
|
47008
|
+
const xGroupId = "KIK";
|
|
47008
47009
|
var apiChat = {
|
|
47009
47010
|
getChannels(api, baseUrl, category, count2 = 50) {
|
|
47010
47011
|
return api({
|
|
47011
47012
|
url: `${baseUrl}/api/channels/issues/${category}`,
|
|
47012
47013
|
method: "GET",
|
|
47013
47014
|
headers: {
|
|
47014
|
-
"x-group-id":
|
|
47015
|
+
"x-group-id": xGroupId
|
|
47015
47016
|
},
|
|
47016
47017
|
params: {
|
|
47017
47018
|
count: count2
|
|
@@ -47023,7 +47024,7 @@ var apiChat = {
|
|
|
47023
47024
|
url: `${baseUrl}/api/channels/issues/count`,
|
|
47024
47025
|
method: "GET",
|
|
47025
47026
|
headers: {
|
|
47026
|
-
"x-group-id":
|
|
47027
|
+
"x-group-id": xGroupId
|
|
47027
47028
|
}
|
|
47028
47029
|
});
|
|
47029
47030
|
},
|
|
@@ -47032,7 +47033,7 @@ var apiChat = {
|
|
|
47032
47033
|
url: `${baseUrl}/api/groups`,
|
|
47033
47034
|
method: "GET",
|
|
47034
47035
|
headers: {
|
|
47035
|
-
"x-group-id":
|
|
47036
|
+
"x-group-id": xGroupId
|
|
47036
47037
|
}
|
|
47037
47038
|
});
|
|
47038
47039
|
},
|
|
@@ -47044,7 +47045,7 @@ var apiChat = {
|
|
|
47044
47045
|
url: `${baseUrl}/api/public/channels/${channelId}/messages?count=${count2}`,
|
|
47045
47046
|
method: "GET",
|
|
47046
47047
|
headers: {
|
|
47047
|
-
"x-group-id":
|
|
47048
|
+
"x-group-id": xGroupId
|
|
47048
47049
|
}
|
|
47049
47050
|
});
|
|
47050
47051
|
},
|
|
@@ -47056,7 +47057,7 @@ var apiChat = {
|
|
|
47056
47057
|
url: `${baseUrl}/api/public/channels/${channelId}/messages`,
|
|
47057
47058
|
method: "GET",
|
|
47058
47059
|
headers: {
|
|
47059
|
-
"x-group-id":
|
|
47060
|
+
"x-group-id": xGroupId
|
|
47060
47061
|
},
|
|
47061
47062
|
params: {
|
|
47062
47063
|
count: count2,
|
|
@@ -47072,7 +47073,7 @@ var apiChat = {
|
|
|
47072
47073
|
url: `${baseUrl}/api/public/channels/${channelId}/messages`,
|
|
47073
47074
|
method: "GET",
|
|
47074
47075
|
headers: {
|
|
47075
|
-
"x-group-id":
|
|
47076
|
+
"x-group-id": xGroupId
|
|
47076
47077
|
},
|
|
47077
47078
|
params: {
|
|
47078
47079
|
count: count2,
|
|
@@ -47089,7 +47090,7 @@ var apiChat = {
|
|
|
47089
47090
|
attachments: message2.attachments
|
|
47090
47091
|
},
|
|
47091
47092
|
headers: {
|
|
47092
|
-
"x-group-id":
|
|
47093
|
+
"x-group-id": xGroupId
|
|
47093
47094
|
}
|
|
47094
47095
|
});
|
|
47095
47096
|
},
|
|
@@ -47098,7 +47099,7 @@ var apiChat = {
|
|
|
47098
47099
|
url: `${baseUrl}/api/public/channels/${channelId}/messages/read`,
|
|
47099
47100
|
method: "PUT",
|
|
47100
47101
|
headers: {
|
|
47101
|
-
"x-group-id":
|
|
47102
|
+
"x-group-id": xGroupId
|
|
47102
47103
|
},
|
|
47103
47104
|
params: {
|
|
47104
47105
|
lastMessageId
|
|
@@ -47110,7 +47111,7 @@ var apiChat = {
|
|
|
47110
47111
|
url: `${baseUrl}/api/public/channels/${channelId}/files`,
|
|
47111
47112
|
method: "GET",
|
|
47112
47113
|
headers: {
|
|
47113
|
-
"x-group-id":
|
|
47114
|
+
"x-group-id": xGroupId
|
|
47114
47115
|
}
|
|
47115
47116
|
});
|
|
47116
47117
|
},
|
|
@@ -47121,7 +47122,7 @@ var apiChat = {
|
|
|
47121
47122
|
data: fileData,
|
|
47122
47123
|
headers: {
|
|
47123
47124
|
"Content-type": "multipart/form-data;",
|
|
47124
|
-
"x-group-id":
|
|
47125
|
+
"x-group-id": xGroupId
|
|
47125
47126
|
},
|
|
47126
47127
|
signal
|
|
47127
47128
|
});
|
|
@@ -47131,7 +47132,7 @@ var apiChat = {
|
|
|
47131
47132
|
url: `${baseUrl}${downloadUrl}`,
|
|
47132
47133
|
method: "GET",
|
|
47133
47134
|
headers: {
|
|
47134
|
-
"x-group-id":
|
|
47135
|
+
"x-group-id": xGroupId
|
|
47135
47136
|
},
|
|
47136
47137
|
responseType: "blob"
|
|
47137
47138
|
});
|
|
@@ -47141,7 +47142,7 @@ var apiChat = {
|
|
|
47141
47142
|
url: `${baseUrl}/api/channels/${channelId}/current-issue/close`,
|
|
47142
47143
|
method: "PUT",
|
|
47143
47144
|
headers: {
|
|
47144
|
-
"x-group-id":
|
|
47145
|
+
"x-group-id": xGroupId
|
|
47145
47146
|
}
|
|
47146
47147
|
});
|
|
47147
47148
|
},
|
|
@@ -47150,7 +47151,7 @@ var apiChat = {
|
|
|
47150
47151
|
url: `${baseUrl}/api/channels/${channelId}/current-issue/interactions`,
|
|
47151
47152
|
method: "POST",
|
|
47152
47153
|
headers: {
|
|
47153
|
-
"x-group-id":
|
|
47154
|
+
"x-group-id": xGroupId
|
|
47154
47155
|
},
|
|
47155
47156
|
data: {
|
|
47156
47157
|
groupId
|
|
@@ -82,7 +82,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
82
82
|
* maska v1.5.0
|
|
83
83
|
* (c) 2019-2021 Alexander Shabunevich
|
|
84
84
|
* Released under the MIT License.
|
|
85
|
-
*/function e(V,z){if(!(V instanceof z))throw new TypeError("Cannot call a class as a function")}function t(V,z){for(var j=0;j<z.length;j++){var y=z[j];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(V,y.key,y)}}function n(V,z,j){return z in V?Object.defineProperty(V,z,{value:j,enumerable:!0,configurable:!0,writable:!0}):V[z]=j,V}function r(V,z){var j=Object.keys(V);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(V);z&&(y=y.filter(function(L){return Object.getOwnPropertyDescriptor(V,L).enumerable})),j.push.apply(j,y)}return j}function a(V){for(var z=1;z<arguments.length;z++){var j=arguments[z]!=null?arguments[z]:{};z%2?r(Object(j),!0).forEach(function(y){n(V,y,j[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(j)):r(Object(j)).forEach(function(y){Object.defineProperty(V,y,Object.getOwnPropertyDescriptor(j,y))})}return V}var o={"#":{pattern:/[0-9]/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,uppercase:!0},a:{pattern:/[a-zA-Z]/,lowercase:!0},"!":{escape:!0},"*":{repeat:!0}};function s(V,z){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,y=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return i(z).length>1?u(z)(V,z,j,y):p(V,z,j,y)}function i(V){try{return JSON.parse(V)}catch{return[V]}}function u(V){var z=i(V).sort(function(y,L){return y.length-L.length});return function(y,L,$){var UU=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],eU=z.map(function(lU){return p(y,lU,$,!1)}),VU=eU.pop();for(var QU in z)if(j(VU,z[QU],$))return p(y,z[QU],$,UU);return""};function j(y,L,$){for(var UU in $)$[UU].escape&&(L=L.replace(new RegExp(UU+".{1}","g"),""));return L.split("").filter(function(eU){return $[eU]&&$[eU].pattern}).length>=y.length}}function p(V,z,j){for(var y=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],L=0,$=0,UU="",eU="";L<z.length&&$<V.length;){var VU=z[L],QU=V[$],lU=j[VU];if(lU&&lU.pattern)lU.pattern.test(QU)&&(UU+=l(QU,lU),L++,y&&z[L]&&(j[z[L]]?j[z[L]]&&j[z[L]].escape&&(UU+=z[L+1],L+=2):(UU+=z[L],L++))),$++;else if(lU&&lU.repeat){var RU=j[z[L-1]];RU&&!RU.pattern.test(QU)?L++:L--}else lU&&lU.escape&&(VU=z[++L]),y&&(UU+=VU),QU===VU&&$++,L++}for(;y&&L<z.length;){var dU=z[L];if(j[dU]){eU="";break}eU+=dU,L++}return UU+eU}function l(V,z){return z.transform&&(V=z.transform(V)),z.uppercase?V.toLocaleUpperCase():z.lowercase?V.toLocaleLowerCase():V}function c(V){return V instanceof HTMLInputElement?V:V.querySelector("input")||V}function f(V){return Object.prototype.toString.call(V)==="[object String]"}var v=function(){function V(y){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e(this,V),!y)throw new Error("Maska: no element for mask");if($.preprocessor!=null&&typeof $.preprocessor!="function")throw new Error("Maska: preprocessor must be a function");if($.tokens)for(var UU in $.tokens)$.tokens[UU]=a({},$.tokens[UU]),$.tokens[UU].pattern&&f($.tokens[UU].pattern)&&($.tokens[UU].pattern=new RegExp($.tokens[UU].pattern));this._opts={mask:$.mask,tokens:a(a({},o),$.tokens),preprocessor:$.preprocessor},this._el=f(y)?document.querySelectorAll(y):y.length?y:[y],this.inputEvent=function(eU){return L.updateValue(eU.target,eU)},this.init()}var z,j;return z=V,(j=[{key:"init",value:function(){for(var y=this,L=function(UU){var eU=c(y._el[UU]);!y._opts.mask||eU.dataset.mask&&eU.dataset.mask===y._opts.mask||(eU.dataset.mask=y._opts.mask),setTimeout(function(){return y.updateValue(eU)},0),eU.dataset.maskInited||(eU.dataset.maskInited=!0,eU.addEventListener("input",y.inputEvent),eU.addEventListener("beforeinput",y.beforeInput))},$=0;$<this._el.length;$++)L($)}},{key:"destroy",value:function(){for(var y=0;y<this._el.length;y++){var L=c(this._el[y]);L.removeEventListener("input",this.inputEvent),L.removeEventListener("beforeinput",this.beforeInput),delete L.dataset.mask,delete L.dataset.maskInited}}},{key:"updateValue",value:function(y,L){if(y&&y.type){var $=y.type.match(/^number$/i)&&y.validity.badInput;if(!y.value&&!$||!y.dataset.mask)return y.dataset.maskRawValue="",void this.dispatch("maska",y,L);var UU=y.selectionEnd,eU=y.value,VU=eU[UU-1];y.dataset.maskRawValue=s(y.value,y.dataset.mask,this._opts.tokens,!1);var QU=y.value;this._opts.preprocessor&&(QU=this._opts.preprocessor(QU)),y.value=s(QU,y.dataset.mask,this._opts.tokens),L&&L.inputType==="insertText"&&UU===eU.length&&(UU=y.value.length),function(lU,RU,dU){for(;RU&&RU<lU.value.length&&lU.value.charAt(RU-1)!==dU;)RU++;(lU.type?lU.type.match(/^(text|search|password|tel|url)$/i):!lU.type)&&lU===document.activeElement&&(lU.setSelectionRange(RU,RU),setTimeout(function(){lU.setSelectionRange(RU,RU)},0))}(y,UU,VU),this.dispatch("maska",y,L),y.value!==eU&&this.dispatch("input",y,L)}}},{key:"beforeInput",value:function(y){y&&y.target&&y.target.type&&y.target.type.match(/^number$/i)&&y.data&&isNaN(y.target.value+y.data)&&y.preventDefault()}},{key:"dispatch",value:function(y,L,$){L.dispatchEvent(function(UU){var eU=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,VU=document.createEvent("Event");return VU.initEvent(UU,!0,!0),eU&&(VU.inputType=eU),VU}(y,$&&$.inputType||null))}}])&&t(z.prototype,j),V}(),d,h=(d=new WeakMap,function(V,z){z.value&&(d.has(V)&&!function(j){return!(f(j.value)&&j.value===j.oldValue||Array.isArray(j.value)&&JSON.stringify(j.value)===JSON.stringify(j.oldValue)||j.value&&j.value.mask&&j.oldValue&&j.oldValue.mask&&j.value.mask===j.oldValue.mask)}(z)||d.set(V,new v(V,function(j){var y={};return j.mask?(y.mask=Array.isArray(j.mask)?JSON.stringify(j.mask):j.mask,y.tokens=j.tokens?a({},j.tokens):{},y.preprocessor=j.preprocessor):y.mask=Array.isArray(j)?JSON.stringify(j):j,y}(z.value))))});function k(V){V.directive("maska",h)}typeof window!="undefined"&&window.Vue&&window.Vue.use&&window.Vue.use(k);var plFormContact_vue_vue_type_style_index_0_lang="";const _hoisted_1$m={id:"container-general",class:"d-flex flex-column gap-3"},_hoisted_2$l={class:"d-flex justify-content-between mt-32"},_sfc_main$p={__name:"pl-form-contact",props:{modelValue:{type:Object,required:!0}},setup(V){const z=V;let{modelValue:j}=vue.toRefs(z);const y=vue.ref(!1),L=()=>y.value=!0,$=UU=>{UU.target.value==="+7 (8"&&(j.value.contact.phone=UU.target.value.replace("(8",""))};return vue.watch(j,UU=>{emit("update:modelValue",UU)}),(UU,eU)=>{const VU=ElForm,QU=vue.resolveDirective("maska");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(_sfc_main$r,{title:"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u0434\u043B\u044F \u0441\u0432\u044F\u0437\u0438","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442",items:vue.unref(j).contactList,"add-item":L,"is-show-list":!0,"is-main":!0},null,8,["items"]),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[6]||(eU[6]=lU=>y.value=!1),visible:y.value,name:"\u041D\u043E\u0432\u044B\u0439 \u043A\u043E\u043D\u0442\u0430\u043A\u0442 \u0434\u043B\u044F \u0441\u0432\u044F\u0437\u0438","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(VU,{"label-position":"top",ref:"form",model:vue.unref(j).contact,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(PlSuggestions,{value:vue.unref(j).contact.fullName,label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E"},null,8,["value"]),vue.createVNode(_sfc_main$y,{class:"mt-32",label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",modelValue:vue.unref(j).contact.position,"onUpdate:modelValue":eU[0]||(eU[0]=lU=>vue.unref(j).contact.position=lU),placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"},null,8,["modelValue"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).contact.phone,"onUpdate:modelValue":eU[1]||(eU[1]=lU=>vue.unref(j).contact.phone=lU),label:"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430",placeholder:"+7 (000) 000 00 00",type:"text",onInput:$},null,8,["modelValue"]),[[QU,"!+7 (###) ### ## ##"]]),vue.createElementVNode("div",_hoisted_2$l,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).contact.contactPhone.number,"onUpdate:modelValue":eU[2]||(eU[2]=lU=>vue.unref(j).contact.contactPhone.number=lU),label:"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440"},null,8,["modelValue"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).contact.contactPhone.addNumber,"onUpdate:modelValue":eU[3]||(eU[3]=lU=>vue.unref(j).contact.contactPhone.addNumber=lU),label:"\u0414\u043E\u0431\u0430\u0432\u043E\u0447\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u043E\u0447\u043D\u044B\u0439"},null,8,["modelValue"])]),vue.createVNode(_sfc_main$x,{class:"mt-32 width-260",modelValue:vue.unref(j).contact.email,"onUpdate:modelValue":eU[4]||(eU[4]=lU=>vue.unref(j).contact.email=lU),label:"\u041F\u043E\u0447\u0442\u0430",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0447\u0442\u0443"},null,8,["modelValue"]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u043C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043E\u043C",modelValue:vue.unref(j).contact.isMain,"onUpdate:modelValue":eU[5]||(eU[5]=lU=>vue.unref(j).contact.isMain=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"])])}}};var _imports_0$a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjI1NjkxIDUuMDIwNEMyLjI0NTkxIDMuNDkzMSAzLjQ4MDU1IDIuMjUgNS4wMDY4OSAyLjI1SDE2LjE2MzlDMTYuODk0NCAyLjI1IDE3LjU5MjYgMi41NDA0MSAxOC4xMDg1IDMuMDU0OTZMMjAuOTM3MiA1Ljg4MzY3QzIxLjQ1MjcgNi4zOTkxNiAyMS43NDI5IDcuMDk4ODYgMjEuNzQyOSA3LjgyOFYxNEMyMS43NDI5IDE0LjQxNDIgMjEuNDA3MSAxNC43NSAyMC45OTI5IDE0Ljc1QzIwLjU3ODcgMTQuNzUgMjAuMjQyOSAxNC40MTQyIDIwLjI0MjkgMTRWNy44MjhDMjAuMjQyOSA3LjQ5NzE0IDIwLjExMTEgNy4xNzg4NCAxOS44NzY2IDYuOTQ0MzNMMTcuMDQ5MyA0LjExNzA0QzE3LjA0OTEgNC4xMTY5MiAxNy4wNDk0IDQuMTE3MTUgMTcuMDQ5MyA0LjExNzA0QzE2Ljk1ODEgNC4wMjYyMSAxNi44NTQ1IDMuOTUwNSAxNi43NDI5IDMuODkyMjFWNi45MDlDMTYuNzQyOSA3Ljg3NTIxIDE1Ljk1OTEgOC42NTkgMTQuOTkyOSA4LjY1OUg4Ljk5Mjg5QzguMDI2NjggOC42NTkgNy4yNDI4OSA3Ljg3NTIxIDcuMjQyODkgNi45MDlWMy43NUg1LjAwNjg5QzQuMzEzMjUgMy43NSAzLjc1MTkxIDQuMzE0NzYgMy43NTY4NyA1LjAwOTQzQzMuNzU2ODcgNS4wMDk0NSAzLjc1Njg3IDUuMDA5NDEgMy43NTY4NyA1LjAwOTQzTDMuODYwODcgMTkuMDA5NEMzLjg2NTg3IDE5LjY5NjEgNC40MjM3MiAyMC4yNSA1LjExMDg5IDIwLjI1SDYuMjQ5ODlWMTMuMjg2QzYuMjQ5ODkgMTIuMTYxOCA3LjE2MTY4IDExLjI1IDguMjg1ODkgMTEuMjVIMTUuNzE0OUMxNi44Mzg1IDExLjI1IDE3Ljc0OTkgMTIuMTYyMiAxNy43NDk5IDEzLjI4NlYxNEMxNy43NDk5IDE0LjQxNDIgMTcuNDE0MSAxNC43NSAxNi45OTk5IDE0Ljc1QzE2LjU4NTcgMTQuNzUgMTYuMjQ5OSAxNC40MTQyIDE2LjI0OTkgMTRWMTMuMjg2QzE2LjI0OTkgMTIuOTg5OCAxNi4wMDkzIDEyLjc1IDE1LjcxNDkgMTIuNzVIOC4yODU4OUM3Ljk5MDEgMTIuNzUgNy43NDk4OSAxMi45OTAyIDcuNzQ5ODkgMTMuMjg2VjIwLjI1SDEyLjk5OTlDMTMuNDE0MSAyMC4yNSAxMy43NDk5IDIwLjU4NTggMTMuNzQ5OSAyMUMxMy43NDk5IDIxLjQxNDIgMTMuNDE0MSAyMS43NSAxMi45OTk5IDIxLjc1SDUuMTEwODlDMy42MDAwOSAyMS43NSAyLjM3MTk3IDIwLjUzMTggMi4zNjA5MSAxOS4wMjA2QzIuMzYwOTEgMTkuMDIwNSAyLjM2MDkxIDE5LjAyMDYgMi4zNjA5MSAxOS4wMjA2TDIuMjU2OTEgNS4wMjA0Wk04Ljc0Mjg5IDMuNzVWNi45MDlDOC43NDI4OSA3LjA0Njc5IDguODU1MSA3LjE1OSA4Ljk5Mjg5IDcuMTU5SDE0Ljk5MjlDMTUuMTMwNyA3LjE1OSAxNS4yNDI5IDcuMDQ2NzkgMTUuMjQyOSA2LjkwOVYzLjc1SDguNzQyODlaTTIxLjUzMDIgMTcuNDY5N0MyMS44MjMxIDE3Ljc2MjYgMjEuODIzMSAxOC4yMzc0IDIxLjUzMDIgMTguNTMwM0wxOC41MzAyIDIxLjUzMDNDMTguMjM3MyAyMS44MjMyIDE3Ljc2MjUgMjEuODIzMiAxNy40Njk2IDIxLjUzMDNMMTUuNDY5NiAxOS41MzAzQzE1LjE3NjcgMTkuMjM3NCAxNS4xNzY3IDE4Ljc2MjYgMTUuNDY5NiAxOC40Njk3QzE1Ljc2MjUgMTguMTc2OCAxNi4yMzczIDE4LjE3NjggMTYuNTMwMiAxOC40Njk3TDE3Ljk5OTkgMTkuOTM5M0wyMC40Njk2IDE3LjQ2OTdDMjAuNzYyNSAxNy4xNzY4IDIxLjIzNzMgMTcuMTc2OCAyMS41MzAyIDE3LjQ2OTdaIiBmaWxsPSIjNTA1MDUxIi8+Cjwvc3ZnPgo=",_imports_1$5="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiAyLjI0NjA5QzEyLjE5ODkgMi4yNDYwOSAxMi4zODk3IDIuMzI1MTEgMTIuNTMwMyAyLjQ2NTc2TDE1LjUzMTYgNS40NjcwMUMxNS44MjQ1IDUuNzU5OTEgMTUuODI0NSA2LjIzNDc4IDE1LjUzMTYgNi41Mjc2N0MxNS4yMzg3IDYuODIwNTcgMTQuNzYzOCA2LjgyMDU3IDE0LjQ3MDkgNi41Mjc2N0wxMi43NSA0LjgwNjc1VjE1LjAwMTFDMTIuNzUgMTUuNDE1MyAxMi40MTQyIDE1Ljc1MTEgMTIgMTUuNzUxMUMxMS41ODU4IDE1Ljc1MTEgMTEuMjUgMTUuNDE1MyAxMS4yNSAxNS4wMDExVjQuODA2NzVMOS41MjkwNyA2LjUyNzY3QzkuMjM2MTcgNi44MjA1NyA4Ljc2MTMgNi44MjA1NyA4LjQ2ODQxIDYuNTI3NjdDOC4xNzU1MSA2LjIzNDc4IDguMTc1NTEgNS43NTk5MSA4LjQ2ODQxIDUuNDY3MDFMMTEuNDY5NyAyLjQ2NTc2QzExLjYxMDMgMi4zMjUxMSAxMS44MDExIDIuMjQ2MDkgMTIgMi4yNDYwOVpNNi45OTc5IDkuNzQ4NTlDNi4zMDcwOSA5Ljc0ODU5IDUuNzQ3MDcgMTAuMzA4NiA1Ljc0NzA3IDEwLjk5OTRWMTkuMDAyOEM1Ljc0NzA3IDE5LjY5MzYgNi4zMDcwOSAyMC4yNTM2IDYuOTk3OSAyMC4yNTM2SDE3LjAwMjFDMTcuNjkyOSAyMC4yNTM2IDE4LjI1MjkgMTkuNjkzNiAxOC4yNTI5IDE5LjAwMjhWMTAuOTk5NEMxOC4yNTI5IDEwLjMwODYgMTcuNjkyOSA5Ljc0ODU5IDE3LjAwMjEgOS43NDg1OUgxNS4wMDEyQzE0LjU4NyA5Ljc0ODU5IDE0LjI1MTIgOS40MTI4MSAxNC4yNTEyIDguOTk4NTlDMTQuMjUxMiA4LjU4NDM4IDE0LjU4NyA4LjI0ODU5IDE1LjAwMTIgOC4yNDg1OUgxNy4wMDIxQzE4LjUyMTMgOC4yNDg1OSAxOS43NTI5IDkuNDgwMTggMTkuNzUyOSAxMC45OTk0VjE5LjAwMjhDMTkuNzUyOSAyMC41MjIgMTguNTIxMyAyMS43NTM2IDE3LjAwMjEgMjEuNzUzNkg2Ljk5NzlDNS40Nzg2NiAyMS43NTM2IDQuMjQ3MDcgMjAuNTIyIDQuMjQ3MDcgMTkuMDAyOFYxMC45OTk0QzQuMjQ3MDcgOS40ODAxOCA1LjQ3ODY2IDguMjQ4NTkgNi45OTc5IDguMjQ4NTlIOC45OTg3NEM5LjQxMjk1IDguMjQ4NTkgOS43NDg3NCA4LjU4NDM4IDkuNzQ4NzQgOC45OTg1OUM5Ljc0ODc0IDkuNDEyODEgOS40MTI5NSA5Ljc0ODU5IDguOTk4NzQgOS43NDg1OUg2Ljk5NzlaIiBmaWxsPSIjNTA1MDUxIi8+Cjwvc3ZnPgo=",_imports_2$3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiAyLjM1ODg5QzYuNzA0OTUgMi4zNTg4OSAyLjI1IDYuMjY5OTMgMi4yNSAxMS4yOTA5QzIuMjUgMTQuMTEzMiAzLjY3NTA3IDE2LjU5MDEgNS44NDg3NCAxOC4yMTA2QzUuODQ4NjQgMTguNjE2OSA1Ljg0ODk2IDE5LjA3MyA1Ljg0OTMxIDE5LjU1ODVWMTkuNTU4Nkw1Ljg0OTMxIDE5LjU1OTJDNS44NDk2NCAyMC4wMzE1IDUuODUgMjAuNTMxNiA1Ljg1IDIxLjA0MDlDNS44NSAyMS4zMDAzIDUuOTg0MDEgMjEuNTQxMiA2LjIwNDM2IDIxLjY3OEM2LjQyNDcxIDIxLjgxNDkgNi43MDAxMSAyMS44MjgxIDYuOTMyNTkgMjEuNzEzMUwxMC4yNDE5IDIwLjA3NThDMTAuODExOSAyMC4xNzE0IDExLjM5ODcgMjAuMjIyOSAxMiAyMC4yMjI5QzE3LjI5NTEgMjAuMjIyOSAyMS43NSAxNi4zMTE4IDIxLjc1IDExLjI5MDlDMjEuNzUgNi4yNjk5MyAxNy4yOTUxIDIuMzU4ODkgMTIgMi4zNTg4OVpNMy43NSAxMS4yOTA5QzMuNzUgNy4yMzM4NSA3LjM5MTA1IDMuODU4ODkgMTIgMy44NTg4OUMxNi42MDg5IDMuODU4ODkgMjAuMjUgNy4yMzM4NSAyMC4yNSAxMS4yOTA5QzIwLjI1IDE1LjM0NzkgMTYuNjA4OSAxOC43MjI5IDEyIDE4LjcyMjlDMTEuNDA4NCAxOC43MjI5IDEwLjgzMTcgMTguNjY0OCAxMC4yNzI1IDE4LjU1NzNDMTAuMTExNyAxOC41MjY1IDkuOTQ1MTcgMTguNTQ5MSA5Ljc5ODQxIDE4LjYyMTdMNy4zNDk1IDE5LjgzMzNMNy4zNDkzIDE5LjU1NUM3LjM0ODg0IDE4LjkxMDMgNy4zNDg0MiAxOC4zMTkxIDcuMzQ5IDE3LjgyNThDNy4zNDkyOSAxNy41Nzc3IDcuMjI2OTMgMTcuMzQ1NiA3LjAyMjE1IDE3LjIwNTdDNS4wMjA4NSAxNS44MzgxIDMuNzUgMTMuNjk1MyAzLjc1IDExLjI5MDlaTTExLjkgNy4wODQ4OUMxMC41NzEzIDcuMDg0ODkgOS40OSA4LjE2MDIgOS40OSA5LjQ5Mjg5QzkuNDkgOS45MDcxIDkuODI1NzkgMTAuMjQyOSAxMC4yNCAxMC4yNDI5QzEwLjY1NDIgMTAuMjQyOSAxMC45OSA5LjkwNzEgMTAuOTkgOS40OTI4OUMxMC45OSA4Ljk5MTU3IDExLjM5NjcgOC41ODQ4OSAxMS45IDguNTg0ODlDMTIuNDAyMSA4LjU4NDg5IDEyLjgwOSA4Ljk5MTM5IDEyLjgwOSA5LjQ5Mzg5QzEyLjgwOSA5LjY1NDMyIDEyLjc2NDYgOS43NTU0MyAxMi43IDkuODQyNDFDMTIuNjIzIDkuOTQ2MTggMTIuNTAyOCAxMC4wNDgxIDEyLjMxOTYgMTAuMTcxNUMxMS44NTEzIDEwLjQ4NTkgMTEuMTQ5IDExLjA0ODYgMTEuMTQ5IDEyLjEyMDlWMTIuMzI3OUMxMS4xNDkgMTIuNzQyMSAxMS40ODQ4IDEzLjA3NzkgMTEuODk5IDEzLjA3NzlDMTIuMzEzMiAxMy4wNzc5IDEyLjY0OSAxMi43NDIxIDEyLjY0OSAxMi4zMjc5VjEyLjEyMDlDMTIuNjQ5IDExLjk1MzIgMTIuNjk1NiAxMS44NDcgMTIuNzYzMSAxMS43NTZDMTIuODQzMiAxMS42NDgyIDEyLjk2NzcgMTEuNTQzIDEzLjE1NjEgMTEuNDE2NkwxMy4xNTY4IDExLjQxNjFDMTMuNjE0NCAxMS4xMDggMTQuMzA5IDEwLjU1MjMgMTQuMzA5IDkuNDkzODlDMTQuMzA5IDguMTYyMzggMTMuMjI5OSA3LjA4NDg5IDExLjkgNy4wODQ4OVpNMTEuODkwNSAxNS43MjYxQzEyLjM5MyAxNS43MjYxIDEyLjgwMDUgMTUuMzE4NyAxMi44MDA1IDE0LjgxNjFDMTIuODAwNSAxNC4zMTM2IDEyLjM5MyAxMy45MDYxIDExLjg5MDUgMTMuOTA2MUMxMS4zODc5IDEzLjkwNjEgMTAuOTgwNSAxNC4zMTM2IDEwLjk4MDUgMTQuODE2MUMxMC45ODA1IDE1LjMxODcgMTEuMzg3OSAxNS43MjYxIDExLjg5MDUgMTUuNzI2MVoiIGZpbGw9IiM1MDUwNTEiLz4KPC9zdmc+Cg==",plFormMenu_vue_vue_type_style_index_0_lang="";const _sfc_main$o={},_hoisted_1$l={id:"form-menu",class:"container padding-menu pt-3 pb-3 h-100"},_hoisted_2$k=vue.createStaticVNode('<nav class="d-grid gap-52 justify-content-center h-100"><div class="d-grid top-section gap-4"><a href="#"><img src="'+_imports_0$a+'" alt="saved"></a><a href="#"><img src="'+_imports_1$5+'" alt="share"></a><a href="#"><img src="'+_imports_2$3+'" alt="support"></a></div><div class="decor"></div><a class="mt-auto" href="#"><img src="'+_imports_3$2+'" alt="close"></a></nav>',1),_hoisted_3$h=[_hoisted_2$k];function _sfc_render$2(V,z){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$l,_hoisted_3$h)}var PlFormMenu=_export_sfc(_sfc_main$o,[["render",_sfc_render$2]]);const _hoisted_1$k={id:"container-general",class:"d-flex flex-column gap-3"},_hoisted_2$j={class:"d-flex justify-content-between mt-32"},_hoisted_3$g={class:"d-flex justify-content-between mt-32"},_hoisted_4$b={class:"d-flex justify-content-between mt-32"},_hoisted_5$9={class:"d-flex justify-content-between mt-32"},_hoisted_6$6={class:"d-flex justify-content-between mt-32"},_hoisted_7$6={class:"d-flex justify-content-between mt-32"},_sfc_main$n={__name:"pl-additional",props:{modelValue:{type:Object,required:!0}},setup(V){const z=V;let{modelValue:j}=vue.toRefs(z);console.log("formClient",j);const y=vue.reactive({isBeneficiary:!1,isAcquirer:!1}),L=()=>y.isBeneficiary=!0,$=()=>y.isAcquirer=!0;return(UU,eU)=>{const VU=ElFormItem,QU=ElForm;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.createVNode(_sfc_main$r,{title:"\u041A\u043E\u0441\u0432\u0435\u043D\u043D\u044B\u0435 \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440\u044B","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","is-additional":!0,"add-item":L}),vue.createVNode(_sfc_main$r,{title:"\u0412\u044B\u0433\u043E\u0434\u043E\u043F\u0440\u0438\u043E\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043B\u0438","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","is-additional":!0,"add-item":$}),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[13]||(eU[13]=lU=>y.isBeneficiary=!1),visible:y.isBeneficiary,name:"\u041D\u043E\u0432\u044B\u0439 \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(QU,{"label-position":"top",ref:"form",model:vue.unref(j).newBeneficiary,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$x,{modelValue:vue.unref(j).newBeneficiary.fullName,"onUpdate:modelValue":eU[0]||(eU[0]=lU=>vue.unref(j).newBeneficiary.fullName=lU),label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:vue.unref(placeholders).name},null,8,["modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_2$j,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.percent,"onUpdate:modelValue":eU[1]||(eU[1]=lU=>vue.unref(j).newBeneficiary.percent=lU),label:"\u0414\u043E\u043B\u044F \u0432 \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u043C \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0435",placeholder:vue.unref(placeholders).share},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.nationality,"onUpdate:modelValue":eU[2]||(eU[2]=lU=>vue.unref(j).newBeneficiary.nationality=lU),label:"\u0413\u0440\u0430\u0436\u0434\u0430\u043D\u0441\u0442\u0432\u043E",placeholder:vue.unref(placeholders).nationality},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_3$g,[vue.createVNode(VU,{class:"width-260",label:"\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.birthday,"onUpdate:modelValue":eU[3]||(eU[3]=lU=>vue.unref(j).newBeneficiary.dates.birthday=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$y,{class:"width-260",label:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442",modelValue:vue.unref(j).newBeneficiary.doc,"onUpdate:modelValue":eU[4]||(eU[4]=lU=>vue.unref(j).newBeneficiary.doc=lU),placeholder:vue.unref(placeholders).document},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_4$b,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.ser,"onUpdate:modelValue":eU[5]||(eU[5]=lU=>vue.unref(j).newBeneficiary.ser=lU),label:"\u0421\u0435\u0440\u0438\u044F \u0438 \u043D\u043E\u043C\u0435\u0440 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430",placeholder:vue.unref(placeholders).passport.number},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.numb,"onUpdate:modelValue":eU[6]||(eU[6]=lU=>vue.unref(j).newBeneficiary.numb=lU),label:"\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F",placeholder:vue.unref(placeholders).passport.code},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431 \u043E\u0440\u0433\u0430\u043D\u0435, \u0432\u044B\u0434\u0430\u0432\u0448\u0435\u043C \u043F\u0430\u0441\u043F\u043E\u0440\u0442",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[7]||(eU[7]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).passport.organ},null,8,["modelValue","placeholder"]),vue.createVNode(VU,{style:{"margin-top":"32px !important"},label:"\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.passport,"onUpdate:modelValue":eU[8]||(eU[8]=lU=>vue.unref(j).newBeneficiary.dates.passport=lU),placeholder:vue.unref(placeholders).dates.passport},null,8,["modelValue","placeholder"])]),_:1}),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[9]||(eU[9]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).birthPlace},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[10]||(eU[10]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.registration,label:"\u0410\u0434\u0440\u0435\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"},null,8,["modelValue","placeholder"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[11]||(eU[11]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.actual,label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441"},null,8,["modelValue","placeholder"]),[[vue.vShow,!vue.unref(j).newBeneficiary.isSameAddress]]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438",modelValue:vue.unref(j).newBeneficiary.isSameAddress,"onUpdate:modelValue":eU[12]||(eU[12]=lU=>vue.unref(j).newBeneficiary.isSameAddress=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"]),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[28]||(eU[28]=lU=>y.isAcquirer=!1),visible:y.isAcquirer,name:"\u041D\u043E\u0432\u044B\u0439 \u0432\u044B\u0433\u043E\u0434\u043E\u043F\u0440\u0438\u043E\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043B\u044C","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(QU,{"label-position":"top",ref:"form",model:vue.unref(j).newBeneficiary,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$x,{modelValue:vue.unref(j).newBeneficiary.fullName,"onUpdate:modelValue":eU[14]||(eU[14]=lU=>vue.unref(j).newBeneficiary.fullName=lU),label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:vue.unref(placeholders).name},null,8,["modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_5$9,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.percent,"onUpdate:modelValue":eU[15]||(eU[15]=lU=>vue.unref(j).newBeneficiary.percent=lU),label:"\u0414\u043E\u043B\u044F \u0432 \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u043C \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0435",placeholder:vue.unref(placeholders).share},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.nationality,"onUpdate:modelValue":eU[16]||(eU[16]=lU=>vue.unref(j).newBeneficiary.nationality=lU),label:"\u0413\u0440\u0430\u0436\u0434\u0430\u043D\u0441\u0442\u0432\u043E",placeholder:vue.unref(placeholders).nationality},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440\u043E\u043C",modelValue:vue.unref(j).newBeneficiary.isBeneficiary,"onUpdate:modelValue":eU[17]||(eU[17]=lU=>vue.unref(j).newBeneficiary.isBeneficiary=lU)},null,8,["modelValue"]),vue.createElementVNode("div",_hoisted_6$6,[vue.createVNode(VU,{class:"width-260",label:"\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.birthday,"onUpdate:modelValue":eU[18]||(eU[18]=lU=>vue.unref(j).newBeneficiary.dates.birthday=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$y,{class:"width-260",label:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442",modelValue:vue.unref(j).newBeneficiary.doc,"onUpdate:modelValue":eU[19]||(eU[19]=lU=>vue.unref(j).newBeneficiary.doc=lU),placeholder:vue.unref(placeholders).document},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_7$6,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.ser,"onUpdate:modelValue":eU[20]||(eU[20]=lU=>vue.unref(j).newBeneficiary.ser=lU),label:"\u0421\u0435\u0440\u0438\u044F \u0438 \u043D\u043E\u043C\u0435\u0440 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430",placeholder:vue.unref(placeholders).passport.number},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.numb,"onUpdate:modelValue":eU[21]||(eU[21]=lU=>vue.unref(j).newBeneficiary.numb=lU),label:"\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F",placeholder:vue.unref(placeholders).passport.code},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431 \u043E\u0440\u0433\u0430\u043D\u0435, \u0432\u044B\u0434\u0430\u0432\u0448\u0435\u043C \u043F\u0430\u0441\u043F\u043E\u0440\u0442",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[22]||(eU[22]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).passport.organ},null,8,["modelValue","placeholder"]),vue.createVNode(VU,{style:{"margin-top":"32px !important"},label:"\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.passport,"onUpdate:modelValue":eU[23]||(eU[23]=lU=>vue.unref(j).newBeneficiary.dates.passport=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[24]||(eU[24]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).birthPlace},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[25]||(eU[25]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.registration,label:"\u0410\u0434\u0440\u0435\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"},null,8,["modelValue","placeholder"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[26]||(eU[26]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.actual,label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441"},null,8,["modelValue","placeholder"]),[[vue.vShow,!vue.unref(j).newBeneficiary.isSameAddress]]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438",modelValue:vue.unref(j).newBeneficiary.isSameAddress,"onUpdate:modelValue":eU[27]||(eU[27]=lU=>vue.unref(j).newBeneficiary.isSameAddress=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"])])}}};var plQuestionnaire_vue_vue_type_style_index_0_lang="";const _hoisted_1$j={class:"form-wrapper"},_hoisted_2$i={id:"pl-questionnaire",class:"wrapper d-flex justify-content-between"},_hoisted_3$f={class:"left d-flex flex-column gap-2"},_hoisted_4$a={class:"center d-flex flex-column gap-3"},_hoisted_5$8={class:"right"},_sfc_main$m={__name:"pl-questionnaire",props:{modelValue:{type:Object,required:!0},percent:{type:Number,default:26}},emits:["update:modelValue"],setup(V,{emit:z}){const j=V;let{modelValue:y}=vue.toRefs(j);vue.watch(y,$=>{z("update:modelValue",$)});const L=vue.ref("general");return($,UU)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$j,[vue.createElementVNode("div",_hoisted_2$i,[vue.createElementVNode("div",_hoisted_3$f,[vue.createVNode(_sfc_main$C,{selected:L.value,"onUpdate:selected":UU[0]||(UU[0]=eU=>L.value=eU)},null,8,["selected"]),vue.createVNode(_sfc_main$B),vue.createVNode(_sfc_main$A)]),vue.createElementVNode("div",_hoisted_4$a,[L.value==="general"?(vue.openBlock(),vue.createBlock(_sfc_main$t,{key:0,modelValue:vue.unref(y).general,"onUpdate:modelValue":UU[1]||(UU[1]=eU=>vue.unref(y).general=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0),L.value==="control"?(vue.openBlock(),vue.createBlock(_sfc_main$q,{key:1,newFounderTabs:vue.unref(y).newFounderTabs,modelValue:vue.unref(y),"onUpdate:modelValue":UU[2]||(UU[2]=eU=>vue.isRef(y)?y.value=eU:y=eU),percent:V.percent},null,8,["newFounderTabs","modelValue","percent"])):vue.createCommentVNode("",!0),L.value==="contact"?(vue.openBlock(),vue.createBlock(_sfc_main$p,{key:2,modelValue:vue.unref(y),"onUpdate:modelValue":UU[3]||(UU[3]=eU=>vue.isRef(y)?y.value=eU:y=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0),L.value==="additional"?(vue.openBlock(),vue.createBlock(_sfc_main$n,{key:3,modelValue:vue.unref(y),"onUpdate:modelValue":UU[4]||(UU[4]=eU=>vue.isRef(y)?y.value=eU:y=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_5$8,[vue.createVNode(PlFormMenu)])])]))}},PlQuestionnairePlugin={install(V){V.component("PlQuestionnaire",_sfc_main$m),V.use(k)}};var plStepper_vue_vue_type_style_index_0_lang="";const _hoisted_1$i={class:"stepper-container"},_hoisted_2$h={class:"stepper-title__container"},_hoisted_3$e={key:0,class:"stepper-figure"},_hoisted_4$9=vue.createElementVNode("div",{class:"stepper-figure__circle stepper-figure__circle_checked"},null,-1),_hoisted_5$7=vue.createElementVNode("div",{class:"stepper-figure__progress"},[vue.createElementVNode("div",{class:"stepper-figure__progress-inner"})],-1),_hoisted_6$5=[_hoisted_4$9,_hoisted_5$7],_hoisted_7$5={key:1,class:"stepper-figure"},_hoisted_8$4={class:"stepper-figure__progress"},_hoisted_9$3={key:2,class:"stepper-title__container"},_hoisted_10$3={key:0},_hoisted_11$3={key:1},_hoisted_12$3={key:0},_hoisted_13$2={key:1},_hoisted_14$2={key:0},_hoisted_15$2={key:3,class:"stepper-title__container"},_hoisted_16$2={key:0},_hoisted_17$2={key:1},_hoisted_18$2={key:0},_hoisted_19$2={key:1},_hoisted_20$2={key:0},_hoisted_21$2={key:0},_hoisted_22$2={class:"stepper-title__container stepper-title__container_ended"},_hoisted_23$2={class:"stepper-text"},_hoisted_24$2={key:0},_hoisted_25$2={key:0},_hoisted_26$2={key:0,class:"stepper-footer"},_hoisted_27$1=vue.createTextVNode(" \u041A\u043E\u043B\u0438\u0447\u0435\u0442\u0432\u043E \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0439 \u0434\u043B\u044F \u043F\u043E\u0432\u044B\u0448\u0435\u043D\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: "),_hoisted_28$1={class:"stepper-footer__count-remain"},_hoisted_29$1=vue.createTextVNode(" \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0432\u044B\u0434\u0430\u043D\u043D\u044B\u0445 \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0439: "),_hoisted_30$1={class:"stepper-footer__count"},_hoisted_31={key:1,class:"stepper-footer"},_hoisted_32=vue.createTextVNode(" \u0421\u0443\u043C\u043C\u0430 \u0434\u043B\u044F \u043F\u043E\u0432\u044B\u0448\u0435\u043D\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: "),_hoisted_33={class:"stepper-footer__count-remain"},_hoisted_34=vue.createTextVNode(" \u0412\u044B\u0434\u0430\u043D\u043E \u043A\u043E\u043C\u0438\u0441\u0441\u0438\u0439 \u043D\u0430 \u0441\u0443\u043C\u043C\u0443: "),_hoisted_35={class:"stepper-footer__count"},__default__$1={name:"PlStepper"},_sfc_main$l=Object.assign(__default__$1,{props:{displayType:{type:String,default:"number"},steps:{type:Array,required:!0},stepName:{type:String,default:"name"},stepCountName:{type:String,default:"count"},currentCount:{type:Number,required:!0},remainOnFooter:{type:Boolean,default:!1}},setup(V){const z=V,j=vue.computed(()=>z.steps.length-1),y=vue.computed(()=>z.displayType==="number"),L=vue.computed(()=>z.steps[j.value][z.stepCountName]<=z.currentCount),$=vue.computed(()=>{const RU=_.cloneDeep(z.steps);return RU.pop(),RU}),UU=vue.computed(()=>L.value?z.steps[j.value]:z.steps.find((RU,dU,nU)=>z.currentCount>=RU[z.stepCountName]&&z.currentCount<nU[dU+1][z.stepCountName])),eU=(RU,dU)=>Number((100*(RU/dU)).toFixed(2)),VU=vue.computed(()=>{const RU={remain:null,progress:null};if(!L.value){const dU=z.steps.findIndex(nU=>nU[z.stepName]===UU.value[z.stepName]);return RU.remain=z.steps[dU+1][z.stepCountName]-z.currentCount,RU.progress=eU(z.currentCount-UU.value[z.stepCountName],z.steps[dU+1][z.stepCountName]-UU.value[z.stepCountName]),RU}return RU.remain=0,RU.progress=100,RU}),QU=RU=>RU>0&&RU<j.value,lU=(RU,dU)=>RU[z.stepName]===dU[z.stepName];return(RU,dU)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$i,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref($),(nU,NU)=>(vue.openBlock(),vue.createElementBlock("div",{class:"stepper-item",key:nU[V.stepName]},[vue.createElementVNode("div",_hoisted_2$h,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-title",{"stepper-title_centered":QU(NU),"stepper-title_checked":V.currentCount>=nU[V.stepCountName],"stepper-title_on-footer":V.remainOnFooter}])},vue.toDisplayString(nU[V.stepName]),3)]),V.currentCount>nU[V.stepCountName]&&!lU(nU,vue.unref(UU))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$e,_hoisted_6$5)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$5,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-figure__circle",{"stepper-figure__circle_checked":lU(nU,vue.unref(UU))}])},null,2),vue.createElementVNode("div",_hoisted_8$4,[vue.createElementVNode("div",{class:"stepper-figure__progress-inner",style:vue.normalizeStyle(`width: ${lU(nU,vue.unref(UU))?vue.unref(VU).progress:0}%;`)},null,4)])])),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$3,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-text",{"stepper-title_centered":QU(NU)}])},[NU?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$3,vue.toDisplayString(nU[V.stepCountName]),1)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$3,[V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("span",_hoisted_12$3,"0")):(vue.openBlock(),vue.createElementBlock("span",_hoisted_13$2,[vue.unref(L)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_14$2,"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0434\u0430\u0442\u044C: ")),vue.createElementVNode("span",{class:vue.normalizeClass({"stepper-text__remain":!vue.unref(L)})},vue.toDisplayString(vue.unref(VU).remain),3)]))]))],2)])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-text",{"stepper-title_centered":QU(NU)}])},[NU?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16$2,vue.toDisplayString(nU[V.stepCountName].toLocaleString("ru-RU"))+" \u20BD ",1)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_17$2,[V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("span",_hoisted_18$2,"0 \u20BD")):(vue.openBlock(),vue.createElementBlock("span",_hoisted_19$2,[vue.unref(L)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_20$2,"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0434\u0430\u0442\u044C: ")),vue.createElementVNode("span",{class:vue.normalizeClass({"stepper-text__remain":!vue.unref(L)})},[vue.createTextVNode(vue.toDisplayString(Math.round(vue.unref(VU).remain).toLocaleString("ru-RU"))+" ",1),vue.unref(VU).remain?(vue.openBlock(),vue.createElementBlock("span",_hoisted_21$2,"\u20BD")):vue.createCommentVNode("",!0)],2)]))]))],2)]))]))),128)),vue.createElementVNode("div",_hoisted_22$2,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-title",{"stepper-title_checked":vue.unref(L),"stepper-title_on-footer":V.remainOnFooter}])},vue.toDisplayString(V.steps[vue.unref(j)][V.stepName]),3),vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-figure__circle",{"stepper-figure__circle_checked":vue.unref(L)}])},null,2),vue.createElementVNode("div",_hoisted_23$2,[vue.createTextVNode(vue.toDisplayString(V.steps[vue.unref(j)][V.stepCountName].toLocaleString("ru-RU"))+" ",1),vue.unref(y)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_24$2,"\u20BD"))])])]),V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("div",_hoisted_25$2,[vue.unref(y)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_26$2,[vue.createElementVNode("div",null,[_hoisted_27$1,vue.createElementVNode("span",_hoisted_28$1,vue.toDisplayString(vue.unref(VU).remain),1)]),vue.createElementVNode("div",null,[_hoisted_29$1,vue.createElementVNode("span",_hoisted_30$1,vue.toDisplayString(V.currentCount),1)])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_31,[vue.createElementVNode("div",null,[_hoisted_32,vue.createElementVNode("span",_hoisted_33,vue.toDisplayString(Math.round(vue.unref(VU).remain).toLocaleString("ru-RU"))+" \u20BD ",1)]),vue.createElementVNode("div",null,[_hoisted_34,vue.createElementVNode("span",_hoisted_35,vue.toDisplayString(Math.round(V.currentCount).toLocaleString("ru-RU"))+" \u20BD ",1)])]))])):vue.createCommentVNode("",!0)]))}}),PlStepperPlugin={install(V){V.component("PlStepper",_sfc_main$l)}};var plGroupTable_vue_vue_type_style_index_0_lang="";const _hoisted_1$h={key:0,class:"groupLabel__subLabelsList"},__default__={name:"PlGroupTable"},_sfc_main$k=Object.assign(__default__,{props:{showPopover:{type:Boolean,default:!1},additionalRowClassName:{type:Function,default:()=>" "},firstRowExpand:{type:Boolean,default:!0},tableSchema:{type:Object,required:!0},loadGroupsUrl:{type:String,required:!0},loadGroupsMethod:{type:String,default:"POST"},loadItemsUrl:{type:String,default:null},loadItemsMethod:{type:String,default:"POST"},headers:{type:Object,default:()=>({})},responseKeys:{type:String,default:"result"},filter:{type:Object,default:()=>({})},paging:{type:Object,default:()=>({page:1,pageSize:30}),validator:V=>_.isInteger(V.page)&&_.gt(V.page,0)&&_.isInteger(V.pageSize)&&_.gt(V.pageSize,0)},rowClass:{type:Function,default:()=>""},selectable:{type:Function,default:()=>!0}},emits:["page-loaded","item-selected-change","group-selected-change","selection-changed","all-unselected","all-selected","hoveredRow"],setup(V,{expose:z,emit:j}){const y=V,L=vue.ref(_.uniqueId()),$=vue.ref(!1),UU=vue.ref([]),eU=vue.ref(0),VU=vue.ref(!1),QU=vue.ref(!1);vue.ref(null);const lU=vue.ref([]),RU=vue.ref(!1);vue.ref(null);const dU=vue.ref(),nU=Object.freeze({NONE:"None",ALL:"All",ALL_BUT:"AllBut",ONLY:"Only"}),NU=Object.freeze({key:"$_plGroupTable_key",selected:"$_plGroupTable_selected",parent:"$_plGroupTable_parent",observer:"$_plGroupTable_observer",isFullyLoaded:"$_plGroupTable_isFullyLoaded",currentItemsPage:"$_plGroupTable_currentItemsPage"}),aU=vue.computed(()=>NU.key),WU=vue.computed(()=>!!(UU.value.length&&y.firstRowExpand)),ZU=vue.computed(()=>({children:EU.value,hasChildren:YU.value})),cU=vue.computed(()=>2),BU=vue.computed(()=>_.filter(y.tableSchema.cols,$U=>$U.selection)),oU=vue.computed(()=>_.reject(y.tableSchema.cols,$U=>$U.selection||$U.hidden)),sU=vue.computed(()=>_.get(y.tableSchema,"group.key","Id")),pU=vue.computed(()=>_.get(y.tableSchema,"group.label","label")),JU=vue.computed(()=>_.get(y.tableSchema,"group.subLabelsSlotName","subLabelsSlotName")),EU=vue.computed(()=>_.get(y.tableSchema,"group.items","items")),hU=vue.computed(()=>"type"),YU=vue.computed(()=>"isLazyLoadItems"),jU=vue.computed(()=>({groups:{url:y.loadGroupsUrl,method:y.loadGroupsMethod,headers:y.headers},groupItems:{url:y.loadItemsUrl,method:y.loadItemsMethod,headers:y.headers}})),CU=()=>{WU.value&&(RU.value=!0,fU(UU.value[0]).finally(()=>{RU.value=!1}))},zU=({row:$U,rowIndex:xe})=>[y.additionalRowClassName({row:$U,rowIndex:xe}),Ue({row:$U,rowIndex:xe})].join(" "),xU=()=>{j("hoveredRow",!1)},HU=$U=>{setTimeout(()=>{j("hoveredRow",$U[NU.key])},0)},wU=()=>{le(),NF(),qU()},fU=$U=>Promise.resolve($U).then(xe=>eF(xe,{},()=>{dU.value.toggleRowExpansion(_.set(xe,YU.value,!1),!0)})),XU=()=>{let $U=nU.NONE;return QU.value?VU.value?$U=nU.ALL:$U=nU.ALL_BUT:rF(UU.value)&&($U=nU.ONLY),{type:$U,groupsSelectionState:Ne($U)}};z({read:wU});const DU=({row:$U,column:xe,rowIndex:lF,columnIndex:nF})=>{if(Ce($U)){if(nF==0&&!_.get(y.tableSchema.cols[0],"selection",!1))return[1,oU.value.length+cU.value];if(nF==1&&_.get(y.tableSchema.cols[0],"selection",!1))return[1,oU.value.length+cU.value];if(nF>1)return[0,0]}},KU=()=>"pl-group-table-header",Ue=({row:$U,rowIndex:xe})=>{if(Ce($U))return"pl-group-table-row "+Tl($U);let lF=y.rowClass(MV($U),xe),nF=_.get($U,NU.parent);return mU(nF)||!Ve(nF,$U)?lF+" pl-group-table-row-leaf":(TU(nF)&&vue.nextTick(()=>{hQ(nF)}),lF+" pl-group-table-row-leaf "+Tl(nF)+" loading-trigger")},yU=({row:$U,column:xe,rowIndex:lF,columnIndex:nF})=>{const vF=_.get($U,EU.value);if(!(nF!==0||_.size(vF)==0)&&!UF(vF))return" is-indeterminate"},AU=($U,xe)=>Ce($U)?!0:y.selectable(MV($U),xe),oe=($U,xe)=>{const lF=_.find($U,xe)!=null;if(Ie(xe,lF),Ce(xe))re(xe),fV(xe,lF);else{let nF=_.get(xe,NU.parent),vF=_.get(nF,EU.value);re(nF),DQ(xe,lF),$e(vF)?iF(nF)&&(pe(nF,!0),re(nF),fV(xe,!0)):WF(nF)&&(pe(nF,!1),re(nF),fV(xe,!1))}VU.value=_.every(UU.value,QF.value),VU.value&&j("all-selected"),de()},de=()=>{UU.value.forEach($U=>{$U[EU.value].forEach(xe=>{vue.nextTick(()=>{dU.value.toggleRowSelection(xe,xe[NU.selected])})})})},_e=$U=>{QU.value=VU.value=!VU.value,_.forEach(UU.value,xe=>{Ie(xe,VU.value),re(xe)}),VU.value?j("all-selected"):j("all-unselected"),de()},he=()=>{j("selection-changed",XU())},pe=($U,xe)=>{_.set($U,NU.selected,xe),vue.nextTick(()=>{dU.value.toggleRowSelection($U,xe)})},Ie=($U,xe)=>{pe($U,xe),_.forEach(_.get($U,EU.value),lF=>{pe(lF,xe),vue.nextTick(()=>{de()})})},qe=($U,xe)=>_.forEach($U,lF=>{pe(lF,xe)}),Ce=$U=>_.get($U,EU.value)!=null,$e=$U=>_.every($U,WF),dF=$U=>_.every($U,iF),UF=$U=>$e($U)||dF($U),kF=$U=>!UF($U),WF=$U=>_.get($U,NU.selected,!1),QF=$U=>WF($U)&&$e(_.get($U,EU.value)),iF=$U=>!WF($U),rF=$U=>_.some($U,xe=>{if(WF(xe))return!0;if(Ce(xe)){const lF=_.get(xe,EU.value);if(_.size(lF)!==0)return _.some(lF,WF.value)}}),Ve=($U,xe)=>_.last(_.get($U,EU.value))===xe,mU=$U=>_.get($U,NU.isFullyLoaded,!1),TU=$U=>_.get($U,NU.observer,null)==null,SU=$U=>_.get($U,hU.value,nU.NONE)!==nU.NONE,bU=$U=>_.get($U,hU.value)!==nU.ALL,LU=$U=>{const xe=_.get($U,hU.value);return xe===nU.ALL||xe===nU.ALL_BUT},Ne=$U=>{let xe;switch($U){case nU.ALL_BUT:xe=_.chain(UU.value).filter(Ce).filter(bU).map(lF=>({type:_.get(lF,hU.value),group:MV(lF),items:ae(lF)})).value();break;case nU.ONLY:xe=_.chain(UU.value).filter(Ce).filter(SU).map(lF=>({type:_.get(lF,hU.value),group:MV(lF),items:ae(lF)})).value();break;default:xe=[];break}return xe},ae=$U=>{let xe,lF=_.get($U,EU.value);switch(_.get($U,hU.value)){case nU.ALL_BUT:xe=_.chain(lF).filter(iF.value).value();break;case nU.ONLY:xe=_.chain(lF).filter(WF.value).value();break;default:xe=[];break}return _.map(xe,MV.value)},IU=$U=>_.get($U,pU.value,null),PU=$U=>_.get($U,sU.value,null),re=$U=>{let xe;const lF=_.get($U,EU.value),nF=_.get($U,hU.value);if(WF($U))xe=nU.ALL;else if(_.size(lF)===0||dF(lF))xe=nU.NONE;else if(kF(lF))switch(nF){case nU.ALL:case nU.ALL_BUT:xe=nU.ALL_BUT;break;default:xe=nU.ONLY;break}_.set($U,hU.value,xe)},eF=($U,xe,lF)=>axios(uQ($U)).then(nF=>{const vF=_.get(nF.data,y.responseKeys,nF.data),DF=_.get($U,EU.value);return wF(vF,$U),DF.push(...vF),qe(vF,LU($U)),pQ($U),_.size(vF)<y.paging.pageSize&&_.set($U,NU.isFullyLoaded,!0),lF(DF),DF}).catch(nF=>{console.log(nF)}),MU=$U=>{eF($U,{},()=>{vue.nextTick(()=>{dU.value.toggleRowExpansion(_.set($U,YU.value,!1),!0),de()})})},GU=()=>{if(lU.value.length){RU.value=!0;const $U=sU.value,xe=UU.value.reduce((lF,nF)=>(lU.value.some(DF=>DF[$U]===nF[$U])&&lF.push(fU(nF)),lF),[]);return Promise.all(xe).finally(()=>{RU.value=!1}),!0}},qU=$U=>{const xe=UU.value;axios(mQ()).then(lF=>{if(xe!==UU.value)return;const nF=_.get(lF.data,y.responseKeys,lF.data);_.isArray(nF)&&_.size(nF)!==0&&(GF(nF),UU.value.push(...nF),_.forEach(nF,vF=>{pe(vF,QU.value)})),cl(),y.paging.page+=1}).then(()=>{Promise.resolve(GU()).then(lF=>{lF||CU()})}).catch(lF=>{console.log(lF),$U.error()})},le=()=>{UU.value=[],y.paging.page=1,eU.value=+new Date,VU.value=!1,QU.value=!1,dU.value.clearSelection()},NF=$U=>{$.value=!0},pF=$U=>{_.forEach($U,xe=>{const lF=_.get(xe,EU.value);_.set(xe,NU.key,_.uniqueId()),_.size(lF)!==0&&wF(lF,xe)})},CF=$U=>{_.forEach($U,xe=>{_.defaults(xe,_.set({},EU.value,[]))})},yF=$U=>{const xe=y.loadItemsUrl!=null;_.forEach($U,lF=>{_.set(lF,YU.value,xe)})},BF=$U=>{_.forEach($U,xe=>{_.set(xe,NU.currentItemsPage,1)})},GF=$U=>{pF($U),yF($U),CF($U),BF($U)},wF=($U,xe)=>{pF($U),oV($U,xe)},oV=($U,xe)=>{_.forEach($U,lF=>{_.set(lF,NU.parent,xe)})},pQ=$U=>{const xe=_.get($U,NU.currentItemsPage)+1;_.set($U,NU.currentItemsPage,xe)},iQ=($U,xe,lF)=>{_.head($U).isIntersecting&&vue.nextTick(()=>{const nF=_.get(xe,NU.observer,null);nF&&(nF.disconnect(),nF.unobserve(lF),vue.nextTick(()=>{eF(xe,{},()=>{_.set(xe,NU.observer,null),vue.nextTick(()=>{de()})})}))})},hQ=$U=>{const xe={root:document.querySelector(".pl-group-table"+Gl()),rootMargin:"0px",threshold:.1},lF=document.querySelector(Gl()+" .pl-group-table-row-leaf"+("."+Tl($U))+".loading-trigger"),nF=new IntersectionObserver(vF=>{iQ(vF,$U,lF)},xe);_.set($U,NU.observer,nF),nF.observe(lF)},MV=$U=>_.get($U,EU.value)!=null?_.omit($U,_.flatten([_.values(NU),EU.value,YU.value,hU.value])):_.pick($U,_.map(y.tableSchema.cols,"property")),zl=($U,xe,lF,nF)=>xe==="POST"?{url:$U,method:xe,headers:lF,data:nF}:{url:$U,method:xe,headers:lF,params:nF},mQ=()=>{const $U=_.merge({},y.paging,{filter:y.filter,groupKeyProp:sU.value});return zl(jU.value.groups.url,jU.value.groups.method,jU.value.groups.headers,$U)},uQ=$U=>{const xe=_.set({},_.camelCase(sU.value),_.get($U,sU.value));return _.merge(xe,{filter:y.filter},{page:_.get($U,NU.currentItemsPage),pageSize:y.paging.pageSize}),zl(jU.value.groupItems.url,jU.value.groupItems.method,jU.value.groupItems.headers,xe)},fV=($U,xe)=>{j("group-selected-change",MV($U),xe)},DQ=($U,xe)=>{j("item-selected-change",MV($U),xe)},cl=()=>{j("page-loaded",y.paging.page)},Tl=$U=>"plgt-group-key-"+bQ(_.get($U,sU.value)+"",!0),Gl=()=>"."+vl.value,vl=vue.computed(()=>"plgt-key-"+L.value),bQ=function(xe,lF,nF){var vF,DF,AF=nF===void 0?2166136261:nF;for(vF=0,DF=xe.length;vF<DF;vF++)AF^=xe.charCodeAt(vF),AF+=(AF<<1)+(AF<<4)+(AF<<7)+(AF<<8)+(AF<<24);return lF?("0000000"+(AF>>>0).toString(16)).substr(-8):AF>>>0};return($U,xe)=>{const lF=ElTableColumn,nF=ElTable,vF=vLoading;return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["pl-group-table",vue.unref(vl)])},[vue.withDirectives((vue.openBlock(),vue.createBlock(nF,vue.mergeProps({onCellMouseEnter:HU,onCellMouseLeave:xU,ref_key:"groupTable",ref:dU,"row-key":vue.unref(aU),data:UU.value,"span-method":DU,"header-row-class-name":KU,"row-class-name":zU,"cell-class-name":yU,onSelect:oe,onSelectAll:_e,onSelectionChange:he,lazy:"",load:MU},$U.$attrs,{"tree-props":vue.unref(ZU)}),{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(BU),(DF,AF)=>vue.withDirectives((vue.openBlock(),vue.createBlock(lF,{type:"selection",key:"spec-"+AF,width:DF.width,selectable:AU},null,8,["width"])),[[vue.vShow,DF.selection]])),128)),(vue.openBlock(),vue.createBlock(lF,{key:"grp-"+$U.key,width:"1","class-name":"groupLabel"},{default:vue.withCtx(({row:DF})=>[vue.renderSlot($U.$slots,[vue.unref(pU),PU(DF)].join("-"),{},()=>[vue.createElementVNode("p",null,vue.toDisplayString(IU(DF)),1)]),DF[vue.unref(EU)]?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$h,[vue.renderSlot($U.$slots,[vue.unref(JU),PU(DF)].join("-"))])):vue.createCommentVNode("",!0)]),_:3})),(vue.openBlock(),vue.createBlock(lF,{key:"grp-1",width:"5"},{default:vue.withCtx(({row:DF})=>[vue.renderSlot($U.$slots,"popover",{row:DF})]),_:3})),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(oU),(DF,AF)=>(vue.openBlock(),vue.createBlock(lF,{key:"reg-"+AF,prop:DF.property,label:DF.label,width:DF.width,"min-width":DF.minWidth,"show-overflow-tooltip":DF.showOverflowTooltip},{default:vue.withCtx(({row:xl})=>[vue.renderSlot($U.$slots,DF.slot,{row:xl},()=>[vue.createTextVNode(vue.toDisplayString(xl[DF.property]),1)])]),_:2},1032,["prop","label","width","min-width","show-overflow-tooltip"]))),128))]),_:3},16,["row-key","data","tree-props"])),[[vF,RU.value]])],2)}}}),PlGroupTablePlugin={install(V){V.component("PlGroupTable",_sfc_main$k)}};var _imports_0$9="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS40Njg3IDkuNDY5NjdDMTEuNzYxNiA5LjE3Njc4IDEyLjIzNjQgOS4xNzY3OCAxMi41MjkzIDkuNDY5NjdMMTYuNTI5MyAxMy40Njk3QzE2LjgyMjIgMTMuNzYyNiAxNi44MjIyIDE0LjIzNzQgMTYuNTI5MyAxNC41MzAzQzE2LjIzNjQgMTQuODIzMiAxNS43NjE2IDE0LjgyMzIgMTUuNDY4NyAxNC41MzAzTDExLjk5OSAxMS4wNjA3TDguNTI5MzIgMTQuNTMwM0M4LjIzNjQzIDE0LjgyMzIgNy43NjE1NiAxNC44MjMyIDcuNDY4NjYgMTQuNTMwM0M3LjE3NTc3IDE0LjIzNzQgNy4xNzU3NyAxMy43NjI2IDcuNDY4NjYgMTMuNDY5N0wxMS40Njg3IDkuNDY5NjdaIiBmaWxsPSIjNjU2NTY3Ii8+Cjwvc3ZnPgo=",plSelect_vue_vue_type_style_index_0_lang="";const _hoisted_1$g={id:"form-select"},_hoisted_2$g={class:"flex item-select"},_hoisted_3$d={key:0,src:_imports_1$7},_sfc_main$j={__name:"pl-select",props:{placeholder:{type:String,default:""},rules:{type:Object,default:function(){return{}}},prop:{type:String,default:"name"},isError:{type:Boolean,default:!1},label:{type:String,default:""},modelValue:{type:String,required:!0},options:{type:Object,required:!0},getValid:{type:Boolean,default:!1},checked:{type:Boolean,default:!0}},emits:["update:modelValue","validate"],setup(V,{emit:z}){const j=V,y=vue.ref(!1),L=vue.ref();let{modelValue:$,getValid:UU}=vue.toRefs(j);const eU=vue.computed({get:()=>j.modelValue,set:RU=>{y.value=!1,z("update:modelValue",RU)}}),VU=vue.ref({[j.prop]:$}),QU=(RU,dU,nU)=>{z("validate",RU,dU,nU)},lU=async()=>{y.value=!1,setTimeout(()=>{L.value.validate()},200)};return vue.watch(UU,()=>{lU()}),(RU,dU)=>{const nU=ElOption,NU=ElSelect,aU=ElFormItem,WU=ElForm;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.createVNode(WU,{onValidate:QU,"label-position":"top",model:VU.value,ref_key:"formSelect",ref:L,rules:V.rules},{default:vue.withCtx(()=>[vue.createVNode(aU,{label:V.label,prop:V.prop,class:vue.normalizeClass({"is-error":V.isError}),"show-message":!0},{default:vue.withCtx(()=>[vue.createElementVNode("img",{class:vue.normalizeClass(["form-select__arrow",{rotate:y.value}]),src:_imports_0$9,alt:"arrow"},null,2),vue.createVNode(NU,{"popper-class":V.checked&&"selectBox",modelValue:vue.unref(eU),"onUpdate:modelValue":dU[0]||(dU[0]=ZU=>vue.isRef(eU)?eU.value=ZU:null),placeholder:V.placeholder,"fit-input-width":!0,onFocus:dU[1]||(dU[1]=ZU=>y.value=!0),onBlur:lU},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(V.options,ZU=>(vue.openBlock(),vue.createBlock(nU,{class:"pl-form-option",key:ZU.value,label:ZU.label,value:ZU.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$g,[vue.createTextVNode(vue.toDisplayString(ZU.label)+" ",1),ZU.value===vue.unref(eU)?(vue.openBlock(),vue.createElementBlock("img",_hoisted_3$d)):vue.createCommentVNode("",!0)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["popper-class","modelValue","placeholder"])]),_:1},8,["label","prop","class"])]),_:1},8,["model","rules"])])}}},PlSelectPlugin={install(V){V.component("PlSelect",_sfc_main$j)}},PlDatePickerPlusPlugin={install(V){V.component("PlDatePickerPlus",_sfc_main$u)}};var _imports_0$8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiNCNUI1QjUiLz4KPC9zdmc+Cg==",plCard_vue_vue_type_style_index_0_lang="";const _hoisted_1$f={key:0,class:"pl-card__img-container"},_hoisted_2$f=vue.createElementVNode("img",{class:"pl-card__img",src:_imports_0$8,alt:"icon"},null,-1),_hoisted_3$c=[_hoisted_2$f],_hoisted_4$8={key:0,class:"pl-card__img-container pl-card__img-container_imaged"},_sfc_main$i={__name:"pl-card",props:{type:{type:String,default:"large"},imaged:{type:Boolean,default:!1},title:{type:String,required:!0,default:"title"},subtitle:{type:String,default:"subtitle"},img:{type:String},disable:{type:Boolean,default:!1}},setup(V){const z=V,j=vue.computed(()=>z.type==="large"||z.type==="medium"),y=vue.computed(()=>z.type==="large"||z.type==="small");return(L,$)=>V.imaged?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["pl-card pl-card_imaged",{"pl-card_disabled":V.disable}])},[vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$8)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:vue.normalizeClass(["text-container",{"text-container__small":V.type==="small"}])},[vue.createElementVNode("span",{class:vue.normalizeClass(["pl-card__title",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.title),3),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["pl-card__subtitle",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.subtitle),3)):vue.createCommentVNode("",!0)],2)],2)):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["pl-card",{"pl-card_disabled":V.disable}])},[vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$f,_hoisted_3$c)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass(["pl-card__title",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.title),3),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(["pl-card__subtitle",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.subtitle),3)):vue.createCommentVNode("",!0)],2))}},PlCardPlugin={install(V){V.component("PlCard",_sfc_main$i)}};var plCheckbox_vue_vue_type_style_index_0_lang="";const _hoisted_1$e={id:"plCheckbox"},_hoisted_2$e=["id","name"],_hoisted_3$b=["for"],_sfc_main$h={__name:"pl-checkbox",props:{label:{required:!0,type:String},modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(V,{emit:z}){const j=V,{modelValue:y}=vue.toRefs(j),L=vue.computed({get(){return y},set($){z("update:modelValue",$)}});return($,UU)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":UU[0]||(UU[0]=eU=>vue.isRef(L)?L.value=eU:null),type:"checkbox",class:"custom-checkbox",id:j.label,name:j.label},null,8,_hoisted_2$e),[[vue.vModelCheckbox,vue.unref(L)]]),vue.createElementVNode("label",{for:j.label},vue.toDisplayString(j.label),9,_hoisted_3$b)]))}},PlCheckboxPlugin={install(V){V.component("PlCheckbox",_sfc_main$h)}};class HttpError extends Error{constructor(z,j){const y=new.target.prototype;super(`${z}: Status code '${j}'`),this.statusCode=j,this.__proto__=y}}class TimeoutError extends Error{constructor(z="A timeout occurred."){const j=new.target.prototype;super(z),this.__proto__=j}}class AbortError extends Error{constructor(z="An abort occurred."){const j=new.target.prototype;super(z),this.__proto__=j}}class UnsupportedTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="UnsupportedTransportError",this.__proto__=y}}class DisabledTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="DisabledTransportError",this.__proto__=y}}class FailedToStartTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="FailedToStartTransportError",this.__proto__=y}}class FailedToNegotiateWithServerError extends Error{constructor(z){const j=new.target.prototype;super(z),this.errorType="FailedToNegotiateWithServerError",this.__proto__=j}}class AggregateErrors extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.innerErrors=j,this.__proto__=y}}class HttpResponse{constructor(z,j,y){this.statusCode=z,this.statusText=j,this.content=y}}class HttpClient{get(z,j){return this.send({...j,method:"GET",url:z})}post(z,j){return this.send({...j,method:"POST",url:z})}delete(z,j){return this.send({...j,method:"DELETE",url:z})}getCookieString(z){return""}}var LogLevel;(function(V){V[V.Trace=0]="Trace",V[V.Debug=1]="Debug",V[V.Information=2]="Information",V[V.Warning=3]="Warning",V[V.Error=4]="Error",V[V.Critical=5]="Critical",V[V.None=6]="None"})(LogLevel||(LogLevel={}));class NullLogger{constructor(){}log(z,j){}}NullLogger.instance=new NullLogger;const VERSION="7.0.0";class Arg{static isRequired(z,j){if(z==null)throw new Error(`The '${j}' argument is required.`)}static isNotEmpty(z,j){if(!z||z.match(/^\s*$/))throw new Error(`The '${j}' argument should not be empty.`)}static isIn(z,j,y){if(!(z in j))throw new Error(`Unknown ${y} value: ${z}.`)}}class Platform{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document=="undefined"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function getDataDetail(V,z){let j="";return isArrayBuffer(V)?(j=`Binary data of length ${V.byteLength}`,z&&(j+=`. Content: '${formatArrayBuffer(V)}'`)):typeof V=="string"&&(j=`String data of length ${V.length}`,z&&(j+=`. Content: '${V}'`)),j}function formatArrayBuffer(V){const z=new Uint8Array(V);let j="";return z.forEach(y=>{j+=`0x${y<16?"0":""}${y.toString(16)} `}),j.substr(0,j.length-1)}function isArrayBuffer(V){return V&&typeof ArrayBuffer!="undefined"&&(V instanceof ArrayBuffer||V.constructor&&V.constructor.name==="ArrayBuffer")}async function sendMessage(V,z,j,y,L,$){const UU={},[eU,VU]=getUserAgentHeader();UU[eU]=VU,V.log(LogLevel.Trace,`(${z} transport) sending data. ${getDataDetail(L,$.logMessageContent)}.`);const QU=isArrayBuffer(L)?"arraybuffer":"text",lU=await j.post(y,{content:L,headers:{...UU,...$.headers},responseType:QU,timeout:$.timeout,withCredentials:$.withCredentials});V.log(LogLevel.Trace,`(${z} transport) request complete. Response status: ${lU.statusCode}.`)}function createLogger(V){return V===void 0?new ConsoleLogger(LogLevel.Information):V===null?NullLogger.instance:V.log!==void 0?V:new ConsoleLogger(V)}class SubjectSubscription{constructor(z,j){this._subject=z,this._observer=j}dispose(){const z=this._subject.observers.indexOf(this._observer);z>-1&&this._subject.observers.splice(z,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(j=>{})}}class ConsoleLogger{constructor(z){this._minLevel=z,this.out=console}log(z,j){if(z>=this._minLevel){const y=`[${new Date().toISOString()}] ${LogLevel[z]}: ${j}`;switch(z){case LogLevel.Critical:case LogLevel.Error:this.out.error(y);break;case LogLevel.Warning:this.out.warn(y);break;case LogLevel.Information:this.out.info(y);break;default:this.out.log(y);break}}}}function getUserAgentHeader(){let V="X-SignalR-User-Agent";return Platform.isNode&&(V="User-Agent"),[V,constructUserAgent(VERSION,getOsName(),getRuntime(),getRuntimeVersion())]}function constructUserAgent(V,z,j,y){let L="Microsoft SignalR/";const $=V.split(".");return L+=`${$[0]}.${$[1]}`,L+=` (${V}; `,z&&z!==""?L+=`${z}; `:L+="Unknown OS; ",L+=`${j}`,y?L+=`; ${y}`:L+="; Unknown Runtime Version",L+=")",L}function getOsName(){if(Platform.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function getRuntimeVersion(){if(Platform.isNode)return process.versions.node}function getRuntime(){return Platform.isNode?"NodeJS":"Browser"}function getErrorString(V){return V.stack?V.stack:V.message?V.message:`${V}`}function getGlobalThis(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("could not find global")}class FetchHttpClient extends HttpClient{constructor(z){if(super(),this._logger=z,typeof fetch=="undefined"){const j=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(j("tough-cookie")).CookieJar,this._fetchType=j("node-fetch"),this._fetchType=j("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(getGlobalThis());if(typeof AbortController=="undefined"){const j=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=j("abort-controller")}else this._abortControllerType=AbortController}async send(z){if(z.abortSignal&&z.abortSignal.aborted)throw new AbortError;if(!z.method)throw new Error("No method defined.");if(!z.url)throw new Error("No url defined.");const j=new this._abortControllerType;let y;z.abortSignal&&(z.abortSignal.onabort=()=>{j.abort(),y=new AbortError});let L=null;if(z.timeout){const VU=z.timeout;L=setTimeout(()=>{j.abort(),this._logger.log(LogLevel.Warning,"Timeout from HTTP request."),y=new TimeoutError},VU)}z.content===""&&(z.content=void 0),z.content&&(z.headers=z.headers||{},isArrayBuffer(z.content)?z.headers["Content-Type"]="application/octet-stream":z.headers["Content-Type"]="text/plain;charset=UTF-8");let $;try{$=await this._fetchType(z.url,{body:z.content,cache:"no-cache",credentials:z.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...z.headers},method:z.method,mode:"cors",redirect:"follow",signal:j.signal})}catch(VU){throw y||(this._logger.log(LogLevel.Warning,`Error from HTTP request. ${VU}.`),VU)}finally{L&&clearTimeout(L),z.abortSignal&&(z.abortSignal.onabort=null)}if(!$.ok){const VU=await deserializeContent($,"text");throw new HttpError(VU||$.statusText,$.status)}const eU=await deserializeContent($,z.responseType);return new HttpResponse($.status,$.statusText,eU)}getCookieString(z){let j="";return Platform.isNode&&this._jar&&this._jar.getCookies(z,(y,L)=>j=L.join("; ")),j}}function deserializeContent(V,z){let j;switch(z){case"arraybuffer":j=V.arrayBuffer();break;case"text":j=V.text();break;case"blob":case"document":case"json":throw new Error(`${z} is not supported.`);default:j=V.text();break}return j}class XhrHttpClient extends HttpClient{constructor(z){super(),this._logger=z}send(z){return z.abortSignal&&z.abortSignal.aborted?Promise.reject(new AbortError):z.method?z.url?new Promise((j,y)=>{const L=new XMLHttpRequest;L.open(z.method,z.url,!0),L.withCredentials=z.withCredentials===void 0?!0:z.withCredentials,L.setRequestHeader("X-Requested-With","XMLHttpRequest"),z.content===""&&(z.content=void 0),z.content&&(isArrayBuffer(z.content)?L.setRequestHeader("Content-Type","application/octet-stream"):L.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const $=z.headers;$&&Object.keys($).forEach(UU=>{L.setRequestHeader(UU,$[UU])}),z.responseType&&(L.responseType=z.responseType),z.abortSignal&&(z.abortSignal.onabort=()=>{L.abort(),y(new AbortError)}),z.timeout&&(L.timeout=z.timeout),L.onload=()=>{z.abortSignal&&(z.abortSignal.onabort=null),L.status>=200&&L.status<300?j(new HttpResponse(L.status,L.statusText,L.response||L.responseText)):y(new HttpError(L.response||L.responseText||L.statusText,L.status))},L.onerror=()=>{this._logger.log(LogLevel.Warning,`Error from HTTP request. ${L.status}: ${L.statusText}.`),y(new HttpError(L.statusText,L.status))},L.ontimeout=()=>{this._logger.log(LogLevel.Warning,"Timeout from HTTP request."),y(new TimeoutError)},L.send(z.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class DefaultHttpClient extends HttpClient{constructor(z){if(super(),typeof fetch!="undefined"||Platform.isNode)this._httpClient=new FetchHttpClient(z);else if(typeof XMLHttpRequest!="undefined")this._httpClient=new XhrHttpClient(z);else throw new Error("No usable HttpClient found.")}send(z){return z.abortSignal&&z.abortSignal.aborted?Promise.reject(new AbortError):z.method?z.url?this._httpClient.send(z):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(z){return this._httpClient.getCookieString(z)}}class TextMessageFormat{static write(z){return`${z}${TextMessageFormat.RecordSeparator}`}static parse(z){if(z[z.length-1]!==TextMessageFormat.RecordSeparator)throw new Error("Message is incomplete.");const j=z.split(TextMessageFormat.RecordSeparator);return j.pop(),j}}TextMessageFormat.RecordSeparatorCode=30,TextMessageFormat.RecordSeparator=String.fromCharCode(TextMessageFormat.RecordSeparatorCode);class HandshakeProtocol{writeHandshakeRequest(z){return TextMessageFormat.write(JSON.stringify(z))}parseHandshakeResponse(z){let j,y;if(isArrayBuffer(z)){const eU=new Uint8Array(z),VU=eU.indexOf(TextMessageFormat.RecordSeparatorCode);if(VU===-1)throw new Error("Message is incomplete.");const QU=VU+1;j=String.fromCharCode.apply(null,Array.prototype.slice.call(eU.slice(0,QU))),y=eU.byteLength>QU?eU.slice(QU).buffer:null}else{const eU=z,VU=eU.indexOf(TextMessageFormat.RecordSeparator);if(VU===-1)throw new Error("Message is incomplete.");const QU=VU+1;j=eU.substring(0,QU),y=eU.length>QU?eU.substring(QU):null}const L=TextMessageFormat.parse(j),$=JSON.parse(L[0]);if($.type)throw new Error("Expected a handshake response from the server.");return[y,$]}}var MessageType;(function(V){V[V.Invocation=1]="Invocation",V[V.StreamItem=2]="StreamItem",V[V.Completion=3]="Completion",V[V.StreamInvocation=4]="StreamInvocation",V[V.CancelInvocation=5]="CancelInvocation",V[V.Ping=6]="Ping",V[V.Close=7]="Close"})(MessageType||(MessageType={}));class Subject{constructor(){this.observers=[]}next(z){for(const j of this.observers)j.next(z)}error(z){for(const j of this.observers)j.error&&j.error(z)}complete(){for(const z of this.observers)z.complete&&z.complete()}subscribe(z){return this.observers.push(z),new SubjectSubscription(this,z)}}const DEFAULT_TIMEOUT_IN_MS=30*1e3,DEFAULT_PING_INTERVAL_IN_MS=15*1e3;var HubConnectionState;(function(V){V.Disconnected="Disconnected",V.Connecting="Connecting",V.Connected="Connected",V.Disconnecting="Disconnecting",V.Reconnecting="Reconnecting"})(HubConnectionState||(HubConnectionState={}));class HubConnection{constructor(z,j,y,L){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(LogLevel.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Arg.isRequired(z,"connection"),Arg.isRequired(j,"logger"),Arg.isRequired(y,"protocol"),this.serverTimeoutInMilliseconds=DEFAULT_TIMEOUT_IN_MS,this.keepAliveIntervalInMilliseconds=DEFAULT_PING_INTERVAL_IN_MS,this._logger=j,this._protocol=y,this.connection=z,this._reconnectPolicy=L,this._handshakeProtocol=new HandshakeProtocol,this.connection.onreceive=$=>this._processIncomingData($),this.connection.onclose=$=>this._connectionClosed($),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=HubConnectionState.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:MessageType.Ping})}static create(z,j,y,L){return new HubConnection(z,j,y,L)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(z){if(this._connectionState!==HubConnectionState.Disconnected&&this._connectionState!==HubConnectionState.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!z)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=z}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==HubConnectionState.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=HubConnectionState.Connecting,this._logger.log(LogLevel.Debug,"Starting HubConnection.");try{await this._startInternal(),Platform.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=HubConnectionState.Connected,this._connectionStarted=!0,this._logger.log(LogLevel.Debug,"HubConnection connected successfully.")}catch(z){return this._connectionState=HubConnectionState.Disconnected,this._logger.log(LogLevel.Debug,`HubConnection failed to start successfully because of error '${z}'.`),Promise.reject(z)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const z=new Promise((j,y)=>{this._handshakeResolver=j,this._handshakeRejecter=y});await this.connection.start(this._protocol.transferFormat);try{const j={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(LogLevel.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(j)),this._logger.log(LogLevel.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await z,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(j){throw this._logger.log(LogLevel.Debug,`Hub handshake failed with error '${j}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(j),j}}async stop(){const z=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await z}catch{}}_stopInternal(z){return this._connectionState===HubConnectionState.Disconnected?(this._logger.log(LogLevel.Debug,`Call to HubConnection.stop(${z}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===HubConnectionState.Disconnecting?(this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=HubConnectionState.Disconnecting,this._logger.log(LogLevel.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(LogLevel.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=z||new AbortError("The connection was stopped before the hub handshake could complete."),this.connection.stop(z)))}stream(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._createStreamInvocation(z,j,L);let UU;const eU=new Subject;return eU.cancelCallback=()=>{const VU=this._createCancelInvocation($.invocationId);return delete this._callbacks[$.invocationId],UU.then(()=>this._sendWithProtocol(VU))},this._callbacks[$.invocationId]=(VU,QU)=>{if(QU){eU.error(QU);return}else VU&&(VU.type===MessageType.Completion?VU.error?eU.error(new Error(VU.error)):eU.complete():eU.next(VU.item))},UU=this._sendWithProtocol($).catch(VU=>{eU.error(VU),delete this._callbacks[$.invocationId]}),this._launchStreams(y,UU),eU}_sendMessage(z){return this._resetKeepAliveInterval(),this.connection.send(z)}_sendWithProtocol(z){return this._sendMessage(this._protocol.writeMessage(z))}send(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._sendWithProtocol(this._createInvocation(z,j,!0,L));return this._launchStreams(y,$),$}invoke(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._createInvocation(z,j,!1,L);return new Promise((eU,VU)=>{this._callbacks[$.invocationId]=(lU,RU)=>{if(RU){VU(RU);return}else lU&&(lU.type===MessageType.Completion?lU.error?VU(new Error(lU.error)):eU(lU.result):VU(new Error(`Unexpected message type: ${lU.type}`)))};const QU=this._sendWithProtocol($).catch(lU=>{VU(lU),delete this._callbacks[$.invocationId]});this._launchStreams(y,QU)})}on(z,j){!z||!j||(z=z.toLowerCase(),this._methods[z]||(this._methods[z]=[]),this._methods[z].indexOf(j)===-1&&this._methods[z].push(j))}off(z,j){if(!z)return;z=z.toLowerCase();const y=this._methods[z];if(!!y)if(j){const L=y.indexOf(j);L!==-1&&(y.splice(L,1),y.length===0&&delete this._methods[z])}else delete this._methods[z]}onclose(z){z&&this._closedCallbacks.push(z)}onreconnecting(z){z&&this._reconnectingCallbacks.push(z)}onreconnected(z){z&&this._reconnectedCallbacks.push(z)}_processIncomingData(z){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(z=this._processHandshakeResponse(z),this._receivedHandshakeResponse=!0),z){const j=this._protocol.parseMessages(z,this._logger);for(const y of j)switch(y.type){case MessageType.Invocation:this._invokeClientMethod(y);break;case MessageType.StreamItem:case MessageType.Completion:{const L=this._callbacks[y.invocationId];if(L){y.type===MessageType.Completion&&delete this._callbacks[y.invocationId];try{L(y)}catch($){this._logger.log(LogLevel.Error,`Stream callback threw error: ${getErrorString($)}`)}}break}case MessageType.Ping:break;case MessageType.Close:{this._logger.log(LogLevel.Information,"Close message received from server.");const L=y.error?new Error("Server returned an error on close: "+y.error):void 0;y.allowReconnect===!0?this.connection.stop(L):this._stopPromise=this._stopInternal(L);break}default:this._logger.log(LogLevel.Warning,`Invalid message type: ${y.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(z){let j,y;try{[y,j]=this._handshakeProtocol.parseHandshakeResponse(z)}catch(L){const $="Error parsing handshake response: "+L;this._logger.log(LogLevel.Error,$);const UU=new Error($);throw this._handshakeRejecter(UU),UU}if(j.error){const L="Server returned handshake error: "+j.error;this._logger.log(LogLevel.Error,L);const $=new Error(L);throw this._handshakeRejecter($),$}else this._logger.log(LogLevel.Debug,"Server handshake complete.");return this._handshakeResolver(),y}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let z=this._nextKeepAlive-new Date().getTime();z<0&&(z=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===HubConnectionState.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},z)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(z){const j=z.target.toLowerCase(),y=this._methods[j];if(!y){this._logger.log(LogLevel.Warning,`No client method with the name '${j}' found.`),z.invocationId&&(this._logger.log(LogLevel.Warning,`No result given for '${j}' method and invocation ID '${z.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(z.invocationId,"Client didn't provide a result.",null)));return}const L=y.slice(),$=!!z.invocationId;let UU,eU,VU;for(const QU of L)try{const lU=UU;UU=await QU.apply(this,z.arguments),$&&UU&&lU&&(this._logger.log(LogLevel.Error,`Multiple results provided for '${j}'. Sending error to server.`),VU=this._createCompletionMessage(z.invocationId,"Client provided multiple results.",null)),eU=void 0}catch(lU){eU=lU,this._logger.log(LogLevel.Error,`A callback for the method '${j}' threw error '${lU}'.`)}VU?await this._sendWithProtocol(VU):$?(eU?VU=this._createCompletionMessage(z.invocationId,`${eU}`,null):UU!==void 0?VU=this._createCompletionMessage(z.invocationId,null,UU):(this._logger.log(LogLevel.Warning,`No result given for '${j}' method and invocation ID '${z.invocationId}'.`),VU=this._createCompletionMessage(z.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(VU)):UU&&this._logger.log(LogLevel.Error,`Result given for '${j}' method but server is not expecting a result.`)}_connectionClosed(z){this._logger.log(LogLevel.Debug,`HubConnection.connectionClosed(${z}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||z||new AbortError("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(z||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===HubConnectionState.Disconnecting?this._completeClose(z):this._connectionState===HubConnectionState.Connected&&this._reconnectPolicy?this._reconnect(z):this._connectionState===HubConnectionState.Connected&&this._completeClose(z)}_completeClose(z){if(this._connectionStarted){this._connectionState=HubConnectionState.Disconnected,this._connectionStarted=!1,Platform.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(j=>j.apply(this,[z]))}catch(j){this._logger.log(LogLevel.Error,`An onclose callback called with error '${z}' threw error '${j}'.`)}}}async _reconnect(z){const j=Date.now();let y=0,L=z!==void 0?z:new Error("Attempting to reconnect due to a unknown error."),$=this._getNextRetryDelay(y++,0,L);if($===null){this._logger.log(LogLevel.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(z);return}if(this._connectionState=HubConnectionState.Reconnecting,z?this._logger.log(LogLevel.Information,`Connection reconnecting because of error '${z}'.`):this._logger.log(LogLevel.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(UU=>UU.apply(this,[z]))}catch(UU){this._logger.log(LogLevel.Error,`An onreconnecting callback called with error '${z}' threw error '${UU}'.`)}if(this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;$!==null;){if(this._logger.log(LogLevel.Information,`Reconnect attempt number ${y} will start in ${$} ms.`),await new Promise(UU=>{this._reconnectDelayHandle=setTimeout(UU,$)}),this._reconnectDelayHandle=void 0,this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=HubConnectionState.Connected,this._logger.log(LogLevel.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(UU=>UU.apply(this,[this.connection.connectionId]))}catch(UU){this._logger.log(LogLevel.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${UU}'.`)}return}catch(UU){if(this._logger.log(LogLevel.Information,`Reconnect attempt failed because of error '${UU}'.`),this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===HubConnectionState.Disconnecting&&this._completeClose();return}L=UU instanceof Error?UU:new Error(UU.toString()),$=this._getNextRetryDelay(y++,Date.now()-j,L)}}this._logger.log(LogLevel.Information,`Reconnect retries have been exhausted after ${Date.now()-j} ms and ${y} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(z,j,y){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:j,previousRetryCount:z,retryReason:y})}catch(L){return this._logger.log(LogLevel.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${z}, ${j}) threw error '${L}'.`),null}}_cancelCallbacksWithError(z){const j=this._callbacks;this._callbacks={},Object.keys(j).forEach(y=>{const L=j[y];try{L(null,z)}catch($){this._logger.log(LogLevel.Error,`Stream 'error' callback called with '${z}' threw error: ${getErrorString($)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(z,j,y,L){if(y)return L.length!==0?{arguments:j,streamIds:L,target:z,type:MessageType.Invocation}:{arguments:j,target:z,type:MessageType.Invocation};{const $=this._invocationId;return this._invocationId++,L.length!==0?{arguments:j,invocationId:$.toString(),streamIds:L,target:z,type:MessageType.Invocation}:{arguments:j,invocationId:$.toString(),target:z,type:MessageType.Invocation}}}_launchStreams(z,j){if(z.length!==0){j||(j=Promise.resolve());for(const y in z)z[y].subscribe({complete:()=>{j=j.then(()=>this._sendWithProtocol(this._createCompletionMessage(y)))},error:L=>{let $;L instanceof Error?$=L.message:L&&L.toString?$=L.toString():$="Unknown error",j=j.then(()=>this._sendWithProtocol(this._createCompletionMessage(y,$)))},next:L=>{j=j.then(()=>this._sendWithProtocol(this._createStreamItemMessage(y,L)))}})}}_replaceStreamingParams(z){const j=[],y=[];for(let L=0;L<z.length;L++){const $=z[L];if(this._isObservable($)){const UU=this._invocationId;this._invocationId++,j[UU]=$,y.push(UU.toString()),z.splice(L,1)}}return[j,y]}_isObservable(z){return z&&z.subscribe&&typeof z.subscribe=="function"}_createStreamInvocation(z,j,y){const L=this._invocationId;return this._invocationId++,y.length!==0?{arguments:j,invocationId:L.toString(),streamIds:y,target:z,type:MessageType.StreamInvocation}:{arguments:j,invocationId:L.toString(),target:z,type:MessageType.StreamInvocation}}_createCancelInvocation(z){return{invocationId:z,type:MessageType.CancelInvocation}}_createStreamItemMessage(z,j){return{invocationId:z,item:j,type:MessageType.StreamItem}}_createCompletionMessage(z,j,y){return j?{error:j,invocationId:z,type:MessageType.Completion}:{invocationId:z,result:y,type:MessageType.Completion}}}const DEFAULT_RETRY_DELAYS_IN_MILLISECONDS=[0,2e3,1e4,3e4,null];class DefaultReconnectPolicy{constructor(z){this._retryDelays=z!==void 0?[...z,null]:DEFAULT_RETRY_DELAYS_IN_MILLISECONDS}nextRetryDelayInMilliseconds(z){return this._retryDelays[z.previousRetryCount]}}class HeaderNames{}HeaderNames.Authorization="Authorization",HeaderNames.Cookie="Cookie";class AccessTokenHttpClient extends HttpClient{constructor(z,j){super(),this._innerClient=z,this._accessTokenFactory=j}async send(z){let j=!0;this._accessTokenFactory&&(!this._accessToken||z.url&&z.url.indexOf("/negotiate?")>0)&&(j=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(z);const y=await this._innerClient.send(z);return j&&y.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(z),await this._innerClient.send(z)):y}_setAuthorizationHeader(z){z.headers||(z.headers={}),this._accessToken?z.headers[HeaderNames.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&z.headers[HeaderNames.Authorization]&&delete z.headers[HeaderNames.Authorization]}getCookieString(z){return this._innerClient.getCookieString(z)}}var HttpTransportType;(function(V){V[V.None=0]="None",V[V.WebSockets=1]="WebSockets",V[V.ServerSentEvents=2]="ServerSentEvents",V[V.LongPolling=4]="LongPolling"})(HttpTransportType||(HttpTransportType={}));var TransferFormat;(function(V){V[V.Text=1]="Text",V[V.Binary=2]="Binary"})(TransferFormat||(TransferFormat={}));class AbortController$1{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class LongPollingTransport{constructor(z,j,y){this._httpClient=z,this._logger=j,this._pollAbort=new AbortController$1,this._options=y,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(z,j){if(Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._url=z,this._logger.log(LogLevel.Trace,"(LongPolling transport) Connecting."),j===TransferFormat.Binary&&typeof XMLHttpRequest!="undefined"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[y,L]=getUserAgentHeader(),$={[y]:L,...this._options.headers},UU={abortSignal:this._pollAbort.signal,headers:$,timeout:1e5,withCredentials:this._options.withCredentials};j===TransferFormat.Binary&&(UU.responseType="arraybuffer");const eU=`${z}&_=${Date.now()}`;this._logger.log(LogLevel.Trace,`(LongPolling transport) polling: ${eU}.`);const VU=await this._httpClient.get(eU,UU);VU.statusCode!==200?(this._logger.log(LogLevel.Error,`(LongPolling transport) Unexpected response code: ${VU.statusCode}.`),this._closeError=new HttpError(VU.statusText||"",VU.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,UU)}async _poll(z,j){try{for(;this._running;)try{const y=`${z}&_=${Date.now()}`;this._logger.log(LogLevel.Trace,`(LongPolling transport) polling: ${y}.`);const L=await this._httpClient.get(y,j);L.statusCode===204?(this._logger.log(LogLevel.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):L.statusCode!==200?(this._logger.log(LogLevel.Error,`(LongPolling transport) Unexpected response code: ${L.statusCode}.`),this._closeError=new HttpError(L.statusText||"",L.statusCode),this._running=!1):L.content?(this._logger.log(LogLevel.Trace,`(LongPolling transport) data received. ${getDataDetail(L.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(L.content)):this._logger.log(LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(y){this._running?y instanceof TimeoutError?this._logger.log(LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=y,this._running=!1):this._logger.log(LogLevel.Trace,`(LongPolling transport) Poll errored after shutdown: ${y.message}`)}}finally{this._logger.log(LogLevel.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(z){return this._running?sendMessage(this._logger,"LongPolling",this._httpClient,this._url,z,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(LogLevel.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(LogLevel.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const z={},[j,y]=getUserAgentHeader();z[j]=y;const L={headers:{...z,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,L),this._logger.log(LogLevel.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(LogLevel.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let z="(LongPolling transport) Firing onclose event.";this._closeError&&(z+=" Error: "+this._closeError),this._logger.log(LogLevel.Trace,z),this.onclose(this._closeError)}}}class ServerSentEventsTransport{constructor(z,j,y,L){this._httpClient=z,this._accessToken=j,this._logger=y,this._options=L,this.onreceive=null,this.onclose=null}async connect(z,j){return Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Trace,"(SSE transport) Connecting."),this._url=z,this._accessToken&&(z+=(z.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((y,L)=>{let $=!1;if(j!==TransferFormat.Text){L(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let UU;if(Platform.isBrowser||Platform.isWebWorker)UU=new this._options.EventSource(z,{withCredentials:this._options.withCredentials});else{const eU=this._httpClient.getCookieString(z),VU={};VU.Cookie=eU;const[QU,lU]=getUserAgentHeader();VU[QU]=lU,UU=new this._options.EventSource(z,{withCredentials:this._options.withCredentials,headers:{...VU,...this._options.headers}})}try{UU.onmessage=eU=>{if(this.onreceive)try{this._logger.log(LogLevel.Trace,`(SSE transport) data received. ${getDataDetail(eU.data,this._options.logMessageContent)}.`),this.onreceive(eU.data)}catch(VU){this._close(VU);return}},UU.onerror=eU=>{$?this._close():L(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},UU.onopen=()=>{this._logger.log(LogLevel.Information,`SSE connected to ${this._url}`),this._eventSource=UU,$=!0,y()}}catch(eU){L(eU);return}})}async send(z){return this._eventSource?sendMessage(this._logger,"SSE",this._httpClient,this._url,z,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(z){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(z))}}class WebSocketTransport{constructor(z,j,y,L,$,UU){this._logger=y,this._accessTokenFactory=j,this._logMessageContent=L,this._webSocketConstructor=$,this._httpClient=z,this.onreceive=null,this.onclose=null,this._headers=UU}async connect(z,j){Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Trace,"(WebSockets transport) Connecting.");let y;return this._accessTokenFactory&&(y=await this._accessTokenFactory()),new Promise((L,$)=>{z=z.replace(/^http/,"ws");let UU;const eU=this._httpClient.getCookieString(z);let VU=!1;if(Platform.isNode||Platform.isReactNative){const QU={},[lU,RU]=getUserAgentHeader();QU[lU]=RU,y&&(QU[HeaderNames.Authorization]=`Bearer ${y}`),eU&&(QU[HeaderNames.Cookie]=eU),UU=new this._webSocketConstructor(z,void 0,{headers:{...QU,...this._headers}})}else y&&(z+=(z.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(y)}`);UU||(UU=new this._webSocketConstructor(z)),j===TransferFormat.Binary&&(UU.binaryType="arraybuffer"),UU.onopen=QU=>{this._logger.log(LogLevel.Information,`WebSocket connected to ${z}.`),this._webSocket=UU,VU=!0,L()},UU.onerror=QU=>{let lU=null;typeof ErrorEvent!="undefined"&&QU instanceof ErrorEvent?lU=QU.error:lU="There was an error with the transport",this._logger.log(LogLevel.Information,`(WebSockets transport) ${lU}.`)},UU.onmessage=QU=>{if(this._logger.log(LogLevel.Trace,`(WebSockets transport) data received. ${getDataDetail(QU.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(QU.data)}catch(lU){this._close(lU);return}},UU.onclose=QU=>{if(VU)this._close(QU);else{let lU=null;typeof ErrorEvent!="undefined"&&QU instanceof ErrorEvent?lU=QU.error:lU="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",$(new Error(lU))}}})}send(z){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(LogLevel.Trace,`(WebSockets transport) sending data. ${getDataDetail(z,this._logMessageContent)}.`),this._webSocket.send(z),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(z){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(LogLevel.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(z)&&(z.wasClean===!1||z.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${z.code} (${z.reason||"no reason given"}).`)):z instanceof Error?this.onclose(z):this.onclose())}_isCloseEvent(z){return z&&typeof z.wasClean=="boolean"&&typeof z.code=="number"}}const MAX_REDIRECTS=100;class HttpConnection{constructor(z,j={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Arg.isRequired(z,"url"),this._logger=createLogger(j.logger),this.baseUrl=this._resolveUrl(z),j=j||{},j.logMessageContent=j.logMessageContent===void 0?!1:j.logMessageContent,typeof j.withCredentials=="boolean"||j.withCredentials===void 0)j.withCredentials=j.withCredentials===void 0?!0:j.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");j.timeout=j.timeout===void 0?100*1e3:j.timeout;let y=null,L=null;if(Platform.isNode&&typeof require!="undefined"){const $=typeof __webpack_require__=="function"?__non_webpack_require__:require;y=$("ws"),L=$("eventsource")}!Platform.isNode&&typeof WebSocket!="undefined"&&!j.WebSocket?j.WebSocket=WebSocket:Platform.isNode&&!j.WebSocket&&y&&(j.WebSocket=y),!Platform.isNode&&typeof EventSource!="undefined"&&!j.EventSource?j.EventSource=EventSource:Platform.isNode&&!j.EventSource&&typeof L!="undefined"&&(j.EventSource=L),this._httpClient=new AccessTokenHttpClient(j.httpClient||new DefaultHttpClient(this._logger),j.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=j,this.onreceive=null,this.onclose=null}async start(z){if(z=z||TransferFormat.Binary,Arg.isIn(z,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Debug,`Starting connection with transfer format '${TransferFormat[z]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(z),await this._startInternalPromise,this._connectionState==="Disconnecting"){const j="Failed to start the HttpConnection before stop() was called.";return this._logger.log(LogLevel.Error,j),await this._stopPromise,Promise.reject(new AbortError(j))}else if(this._connectionState!=="Connected"){const j="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(LogLevel.Error,j),Promise.reject(new AbortError(j))}this._connectionStarted=!0}send(z){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new TransportSendQueue(this.transport)),this._sendQueue.send(z))}async stop(z){if(this._connectionState==="Disconnected")return this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(j=>{this._stopPromiseResolver=j}),await this._stopInternal(z),await this._stopPromise}async _stopInternal(z){this._stopError=z;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(j){this._logger.log(LogLevel.Error,`HttpConnection.transport.stop() threw error '${j}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(LogLevel.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(z){let j=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===HttpTransportType.WebSockets)this.transport=this._constructTransport(HttpTransportType.WebSockets),await this._startTransport(j,z);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let y=null,L=0;do{if(y=await this._getNegotiationResponse(j),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new AbortError("The connection was stopped during negotiation.");if(y.error)throw new Error(y.error);if(y.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(y.url&&(j=y.url),y.accessToken){const $=y.accessToken;this._accessTokenFactory=()=>$,this._httpClient._accessToken=$,this._httpClient._accessTokenFactory=void 0}L++}while(y.url&&L<MAX_REDIRECTS);if(L===MAX_REDIRECTS&&y.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(j,this._options.transport,y,z)}this.transport instanceof LongPollingTransport&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(LogLevel.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(y){return this._logger.log(LogLevel.Error,"Failed to start the connection: "+y),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(y)}}async _getNegotiationResponse(z){const j={},[y,L]=getUserAgentHeader();j[y]=L;const $=this._resolveNegotiateUrl(z);this._logger.log(LogLevel.Debug,`Sending negotiation request: ${$}.`);try{const UU=await this._httpClient.post($,{content:"",headers:{...j,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(UU.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${UU.statusCode}'`));const eU=JSON.parse(UU.content);return(!eU.negotiateVersion||eU.negotiateVersion<1)&&(eU.connectionToken=eU.connectionId),eU}catch(UU){let eU="Failed to complete negotiation with the server: "+UU;return UU instanceof HttpError&&UU.statusCode===404&&(eU=eU+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(LogLevel.Error,eU),Promise.reject(new FailedToNegotiateWithServerError(eU))}}_createConnectUrl(z,j){return j?z+(z.indexOf("?")===-1?"?":"&")+`id=${j}`:z}async _createTransport(z,j,y,L){let $=this._createConnectUrl(z,y.connectionToken);if(this._isITransport(j)){this._logger.log(LogLevel.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=j,await this._startTransport($,L),this.connectionId=y.connectionId;return}const UU=[],eU=y.availableTransports||[];let VU=y;for(const QU of eU){const lU=this._resolveTransportOrError(QU,j,L);if(lU instanceof Error)UU.push(`${QU.transport} failed:`),UU.push(lU);else if(this._isITransport(lU)){if(this.transport=lU,!VU){try{VU=await this._getNegotiationResponse(z)}catch(RU){return Promise.reject(RU)}$=this._createConnectUrl(z,VU.connectionToken)}try{await this._startTransport($,L),this.connectionId=VU.connectionId;return}catch(RU){if(this._logger.log(LogLevel.Error,`Failed to start the transport '${QU.transport}': ${RU}`),VU=void 0,UU.push(new FailedToStartTransportError(`${QU.transport} failed: ${RU}`,HttpTransportType[QU.transport])),this._connectionState!=="Connecting"){const dU="Failed to select transport before stop() was called.";return this._logger.log(LogLevel.Debug,dU),Promise.reject(new AbortError(dU))}}}}return UU.length>0?Promise.reject(new AggregateErrors(`Unable to connect to the server with any of the available transports. ${UU.join(" ")}`,UU)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(z){switch(z){case HttpTransportType.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new WebSocketTransport(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case HttpTransportType.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ServerSentEventsTransport(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case HttpTransportType.LongPolling:return new LongPollingTransport(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${z}.`)}}_startTransport(z,j){return this.transport.onreceive=this.onreceive,this.transport.onclose=y=>this._stopConnection(y),this.transport.connect(z,j)}_resolveTransportOrError(z,j,y){const L=HttpTransportType[z.transport];if(L==null)return this._logger.log(LogLevel.Debug,`Skipping transport '${z.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${z.transport}' because it is not supported by this client.`);if(transportMatches(j,L))if(z.transferFormats.map(UU=>TransferFormat[UU]).indexOf(y)>=0){if(L===HttpTransportType.WebSockets&&!this._options.WebSocket||L===HttpTransportType.ServerSentEvents&&!this._options.EventSource)return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it is not supported in your environment.'`),new UnsupportedTransportError(`'${HttpTransportType[L]}' is not supported in your environment.`,L);this._logger.log(LogLevel.Debug,`Selecting transport '${HttpTransportType[L]}'.`);try{return this._constructTransport(L)}catch(UU){return UU}}else return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it does not support the requested transfer format '${TransferFormat[y]}'.`),new Error(`'${HttpTransportType[L]}' does not support ${TransferFormat[y]}.`);else return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it was disabled by the client.`),new DisabledTransportError(`'${HttpTransportType[L]}' is disabled by the client.`,L)}_isITransport(z){return z&&typeof z=="object"&&"connect"in z}_stopConnection(z){if(this._logger.log(LogLevel.Debug,`HttpConnection.stopConnection(${z}) called while in state ${this._connectionState}.`),this.transport=void 0,z=this._stopError||z,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(LogLevel.Debug,`Call to HttpConnection.stopConnection(${z}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(LogLevel.Warning,`Call to HttpConnection.stopConnection(${z}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${z}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),z?this._logger.log(LogLevel.Error,`Connection disconnected with error '${z}'.`):this._logger.log(LogLevel.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(j=>{this._logger.log(LogLevel.Error,`TransportSendQueue.stop() threw error '${j}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(z)}catch(j){this._logger.log(LogLevel.Error,`HttpConnection.onclose(${z}) threw error '${j}'.`)}}}_resolveUrl(z){if(z.lastIndexOf("https://",0)===0||z.lastIndexOf("http://",0)===0)return z;if(!Platform.isBrowser)throw new Error(`Cannot resolve '${z}'.`);const j=window.document.createElement("a");return j.href=z,this._logger.log(LogLevel.Information,`Normalizing '${z}' to '${j.href}'.`),j.href}_resolveNegotiateUrl(z){const j=z.indexOf("?");let y=z.substring(0,j===-1?z.length:j);return y[y.length-1]!=="/"&&(y+="/"),y+="negotiate",y+=j===-1?"":z.substring(j),y.indexOf("negotiateVersion")===-1&&(y+=j===-1?"?":"&",y+="negotiateVersion="+this._negotiateVersion),y}}function transportMatches(V,z){return!V||(z&V)!==0}class TransportSendQueue{constructor(z){this._transport=z,this._buffer=[],this._executing=!0,this._sendBufferedData=new PromiseSource,this._transportResult=new PromiseSource,this._sendLoopPromise=this._sendLoop()}send(z){return this._bufferData(z),this._transportResult||(this._transportResult=new PromiseSource),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(z){if(this._buffer.length&&typeof this._buffer[0]!=typeof z)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof z}`);this._buffer.push(z),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new PromiseSource;const z=this._transportResult;this._transportResult=void 0;const j=typeof this._buffer[0]=="string"?this._buffer.join(""):TransportSendQueue._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(j),z.resolve()}catch(y){z.reject(y)}}}static _concatBuffers(z){const j=z.map($=>$.byteLength).reduce(($,UU)=>$+UU),y=new Uint8Array(j);let L=0;for(const $ of z)y.set(new Uint8Array($),L),L+=$.byteLength;return y.buffer}}class PromiseSource{constructor(){this.promise=new Promise((z,j)=>[this._resolver,this._rejecter]=[z,j])}resolve(){this._resolver()}reject(z){this._rejecter(z)}}const JSON_HUB_PROTOCOL_NAME="json";class JsonHubProtocol{constructor(){this.name=JSON_HUB_PROTOCOL_NAME,this.version=1,this.transferFormat=TransferFormat.Text}parseMessages(z,j){if(typeof z!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!z)return[];j===null&&(j=NullLogger.instance);const y=TextMessageFormat.parse(z),L=[];for(const $ of y){const UU=JSON.parse($);if(typeof UU.type!="number")throw new Error("Invalid payload.");switch(UU.type){case MessageType.Invocation:this._isInvocationMessage(UU);break;case MessageType.StreamItem:this._isStreamItemMessage(UU);break;case MessageType.Completion:this._isCompletionMessage(UU);break;case MessageType.Ping:break;case MessageType.Close:break;default:j.log(LogLevel.Information,"Unknown message type '"+UU.type+"' ignored.");continue}L.push(UU)}return L}writeMessage(z){return TextMessageFormat.write(JSON.stringify(z))}_isInvocationMessage(z){this._assertNotEmptyString(z.target,"Invalid payload for Invocation message."),z.invocationId!==void 0&&this._assertNotEmptyString(z.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(z){if(this._assertNotEmptyString(z.invocationId,"Invalid payload for StreamItem message."),z.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(z){if(z.result&&z.error)throw new Error("Invalid payload for Completion message.");!z.result&&z.error&&this._assertNotEmptyString(z.error,"Invalid payload for Completion message."),this._assertNotEmptyString(z.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(z,j){if(typeof z!="string"||z==="")throw new Error(j)}}const LogLevelNameMapping={trace:LogLevel.Trace,debug:LogLevel.Debug,info:LogLevel.Information,information:LogLevel.Information,warn:LogLevel.Warning,warning:LogLevel.Warning,error:LogLevel.Error,critical:LogLevel.Critical,none:LogLevel.None};function parseLogLevel(V){const z=LogLevelNameMapping[V.toLowerCase()];if(typeof z!="undefined")return z;throw new Error(`Unknown log level: ${V}`)}class HubConnectionBuilder{configureLogging(z){if(Arg.isRequired(z,"logging"),isLogger(z))this.logger=z;else if(typeof z=="string"){const j=parseLogLevel(z);this.logger=new ConsoleLogger(j)}else this.logger=new ConsoleLogger(z);return this}withUrl(z,j){return Arg.isRequired(z,"url"),Arg.isNotEmpty(z,"url"),this.url=z,typeof j=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...j}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:j},this}withHubProtocol(z){return Arg.isRequired(z,"protocol"),this.protocol=z,this}withAutomaticReconnect(z){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return z?Array.isArray(z)?this.reconnectPolicy=new DefaultReconnectPolicy(z):this.reconnectPolicy=z:this.reconnectPolicy=new DefaultReconnectPolicy,this}build(){const z=this.httpConnectionOptions||{};if(z.logger===void 0&&(z.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const j=new HttpConnection(this.url,z);return HubConnection.create(j,this.logger||NullLogger.instance,this.protocol||new JsonHubProtocol,this.reconnectPolicy)}}function isLogger(V){return V.log!==void 0}const connectSignalR=async(V,z,j)=>{let y=null;const L=async()=>(y=await z.start().catch($=>(console.error("Failed to connect with hub",$),new Promise((UU,eU)=>setTimeout(()=>L().then(UU).catch(eU),5e3)))),console.log(`start $${j}ConnectionHub, id: ${V}`),y);try{await L(),await z.invoke("Join",V)}catch($){console.error($.toString())}},useConfigStore=pinia$1.defineStore("config",{state:()=>({token:"",baseUrl:""}),actions:{getToken(V){this.token=V},getBaseUrl(V){this.baseUrl=V},api(V){return ApiJs(V,!1,`Bearer ${this.token}`,!0)}}});var apiChat={getChannels(V,z,j,y=50){return V({url:`${z}/api/channels/issues/${j}`,method:"GET",headers:{"x-group-id":"FLINE"},params:{count:y}})},getUnreadChannels(V,z){return V({url:`${z}/api/channels/issues/count`,method:"GET",headers:{"x-group-id":"FLINE"}})},getGroups(V,z){return V({url:`${z}/api/groups`,method:"GET",headers:{"x-group-id":"FLINE"}})},getChatMessagesByChannelId(V,z,j,y,L){if(!y)return V({url:`${z}/api/public/channels/${j}/messages?count=${L}`,method:"GET",headers:{"x-group-id":"FLINE"}})},getChatMessagesBeforeByChannelId(V,z,j,y,L,$){if(!y)return V({url:`${z}/api/public/channels/${j}/messages`,method:"GET",headers:{"x-group-id":"FLINE"},params:{count:L,beforeMessageId:$}})},getChatMessagesAfterByChannelId(V,z,j,y,L,$){if(!(y&&L!==2))return V({url:`${z}/api/public/channels/${j}/messages`,method:"GET",headers:{"x-group-id":"FLINE"},params:{count:L,afterMessageId:$}})},postChatMessagesByChannelId(V,z,j,{message:y}){return V({url:`${z}/api/public/channels/${j}/messages`,method:"POST",data:{text:y.text,attachments:y.attachments},headers:{"x-group-id":"FLINE"}})},putChatMessagesReadByChannelId(V,z,j,y){return V({url:`${z}/api/public/channels/${j}/messages/read`,method:"PUT",headers:{"x-group-id":"FLINE"},params:{lastMessageId:y}})},getChatFilesByChannelId(V,z,j){return V({url:`${z}/api/public/channels/${j}/files`,method:"GET",headers:{"x-group-id":"FLINE"}})},postChatFilesByChannelId(V,z,j,{fileData:y,signal:L}){return V({url:`${z}/api/public/channels/${j}/files`,method:"POST",data:y,headers:{"Content-type":"multipart/form-data;","x-group-id":"FLINE"},signal:L})},downloadChatFileByUrl(V,z,j){return V({url:`${z}${j}`,method:"GET",headers:{"x-group-id":"FLINE"},responseType:"blob"})},closeInteraction(V,z,j){return V({url:`${z}/api/channels/${j}/current-issue/close`,method:"PUT",headers:{"x-group-id":"FLINE"}})},redirectInteraction(V,z,j,y){return V({url:`${z}/api/channels/${j}/current-issue/interactions`,method:"POST",headers:{"x-group-id":"FLINE"},data:{groupId:y}})}};const useGroupsStore=pinia$1.defineStore("groups",{state:()=>({groups:[],groupInfo:""}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},isNewLine(V){return V.groupInfo.name.length>3}},actions:{setGroupInfo(V){this.groupInfo=V},async getGroups(){try{this.groups=await apiChat.getGroups(this.api,this.baseUrl)}catch(V){console.log(V)}}}}),useChannelsStore=pinia$1.defineStore("channels",{state:()=>({channels:[],unreadChannels:{},channelCategory:"Active",isLoadingChannels:!1,isChannelsList:!0,isOpenChannel:!1,isFilesList:!1,isClientInfo:!1,isHubsConnected:!1,notifications:{messagesRead:null,messageAdded:null,activeChannels:[]}}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},unreadChannelsCount(V){return V.unreadChannels.active&&V.unreadChannels.active.unreadChannelsCount||V.unreadChannels.new&&V.unreadChannels.new.unreadChannelsCount},isActiveChannel(V){return V.channelCategory==="Active"},isClosedChannel(V){return V.channelCategory==="Closed"},tabs(V){return[{name:"\u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435",api:"Active",isActive:V.channelCategory==="Active",unread:V.unreadChannels&&V.unreadChannels.active.unreadChannelsCount},{name:"\u041D\u043E\u0432\u044B\u0435",api:"New",isActive:V.channelCategory==="New",unread:V.unreadChannels&&V.unreadChannels.new.unreadChannelsCount},{name:"\u0417\u0430\u043A\u0440\u044B\u0442\u044B\u0435",api:"Closed",isActive:V.channelCategory==="Closed"}]}},actions:{setIsLoadingChannels(V){this.isLoadingChannels=V},setIsChannelsList(V){this.isChannelsList=V},setIsOpenChannel(V){this.isOpenChannel=V},setIsFilesList(V){this.isFilesList=V},setIsClientInfo(V){this.isClientInfo=V},setIsHubsConnected(V){this.isHubsConnected=V},toggleChannelCategory(V){this.channelCategory=V},async getChannels(){try{const V=await apiChat.getChannels(this.api,this.baseUrl,this.channelCategory);this.channels=V,this.isActiveChannel&&(this.notifications.activeChannels=V)}catch(V){console.log(V)}},async getUnreadChannels(){try{this.unreadChannels=await apiChat.getUnreadChannels(this.api,this.baseUrl)}catch(V){console.log(V)}}}});dayjs.locale("ru");const getTime=V=>dayjs(V).format("H:mm"),sortByDate=V=>{const z=y=>dayjs(y).format("D MMMM YYYY"),j=V.reduce((y,L)=>(y[z(L.createdDateTime)]?y[z(L.createdDateTime)].push(L):y[z(L.createdDateTime)]=[L],y),{});return Object.keys(j).map(y=>{const L=z(new Date)===y?"\u0421\u0435\u0433\u043E\u0434\u043D\u044F":y,$=()=>{const UU=[];return j[y].map(eU=>{eU.files&&eU.files.length&&UU.push(...eU.files)}),UU.reverse()};return{date:L,messages:j[y],files:$()}})},parseFileSize=V=>{const z=V/1024;return z<1024?`${Math.round(z)} \u041A\u0411`:`${Math.round(z/1024)} \u041C\u0411`},uuidv4=()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,V=>(V^crypto.getRandomValues(new Uint8Array(1))[0]&15>>V/4).toString(16)),_sfc_main$g={},_hoisted_1$d={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_hoisted_2$d=vue.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.75 12C3.75 7.44321 7.44321 3.75 12 3.75C16.5568 3.75 20.25 7.44321 20.25 12C20.25 16.5568 16.5568 20.25 12 20.25C7.44321 20.25 3.75 16.5568 3.75 12ZM12 2.25C6.61479 2.25 2.25 6.61479 2.25 12C2.25 17.3852 6.61479 21.75 12 21.75C17.3852 21.75 21.75 17.3852 21.75 12C21.75 6.61479 17.3852 2.25 12 2.25ZM12.75 7.5C12.75 7.08579 12.4142 6.75 12 6.75C11.5858 6.75 11.25 7.08579 11.25 7.5V12.5C11.25 12.9142 11.5858 13.25 12 13.25C12.4142 13.25 12.75 12.9142 12.75 12.5V7.5ZM12 17.2532C12.5523 17.2532 13 16.8055 13 16.2532C13 15.7009 12.5523 15.2532 12 15.2532C11.4477 15.2532 11 15.7009 11 16.2532C11 16.8055 11.4477 17.2532 12 17.2532Z",fill:"#ED3636"},null,-1),_hoisted_3$a=[_hoisted_2$d];function _sfc_render$1(V,z){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$d,_hoisted_3$a)}var Warning=_export_sfc(_sfc_main$g,[["render",_sfc_render$1]]);const _sfc_main$f={},_hoisted_1$c={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_hoisted_2$c=vue.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 3.75C7.44321 3.75 3.75 7.44321 3.75 12C3.75 16.5568 7.44321 20.25 12 20.25C16.5568 20.25 20.25 16.5568 20.25 12C20.25 7.44321 16.5568 3.75 12 3.75ZM2.25 12C2.25 6.61479 6.61479 2.25 12 2.25C17.3852 2.25 21.75 6.61479 21.75 12C21.75 17.3852 17.3852 21.75 12 21.75C6.61479 21.75 2.25 17.3852 2.25 12ZM16.5303 9.46967C16.8232 9.76256 16.8232 10.2374 16.5303 10.5303L11.5303 15.5303C11.2374 15.8232 10.7626 15.8232 10.4697 15.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697C7.76256 11.1768 8.23744 11.1768 8.53033 11.4697L11 13.9393L15.4697 9.46967C15.7626 9.17678 16.2374 9.17678 16.5303 9.46967Z",fill:"#0CA31B"},null,-1),_hoisted_3$9=[_hoisted_2$c];function _sfc_render(V,z){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$c,_hoisted_3$9)}var CircleCheck=_export_sfc(_sfc_main$f,[["render",_sfc_render]]);const plNotif2=V=>{const z={...V};!z.icon&&z.icon!==null&&(z.type==="error"?(z.icon=Warning,z.message||(z.dangerouslyUseHTMLString=!0,z.message='<div>\u0414\u043B\u044F \u0443\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u043E\u0448\u0438\u0431\u043A\u0438 \u043D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443</div><div class="pt-5 text-end"><p class="px-1 default-call-chat">\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0432 \u0447\u0430\u0442</p></div>')):z.icon=CircleCheck),ElNotification({position:"bottom-right",offset:16,showClose:!1,...z,type:null})};plNotif2.success=V=>plNotif2({type:"success",...V}),plNotif2.error=V=>plNotif2({type:"error",...V});const useSelectedChannelStore=pinia$1.defineStore("selectedChannel",{state:()=>({channelId:"",participant:[],files:[],messages:[],unreadMessagesCount:null,loadingMessages:!1,managerConnect:null,afterMessagesLoaded:!1,beforeMessagesLoaded:!1,isManagerSendMsg:!1,isLoadingFiles:!1}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},groupId(){return useGroupsStore().groupInfo.code},displayName(V){return`${V.participant.firstName} ${V.participant.lastName}`},sortedMessages(V){return sortByDate(V.messages)},sortedFiles(V){return sortByDate(V.files)},clientFullName(V){return`
|
|
85
|
+
*/function e(V,z){if(!(V instanceof z))throw new TypeError("Cannot call a class as a function")}function t(V,z){for(var j=0;j<z.length;j++){var y=z[j];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(V,y.key,y)}}function n(V,z,j){return z in V?Object.defineProperty(V,z,{value:j,enumerable:!0,configurable:!0,writable:!0}):V[z]=j,V}function r(V,z){var j=Object.keys(V);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(V);z&&(y=y.filter(function(L){return Object.getOwnPropertyDescriptor(V,L).enumerable})),j.push.apply(j,y)}return j}function a(V){for(var z=1;z<arguments.length;z++){var j=arguments[z]!=null?arguments[z]:{};z%2?r(Object(j),!0).forEach(function(y){n(V,y,j[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(j)):r(Object(j)).forEach(function(y){Object.defineProperty(V,y,Object.getOwnPropertyDescriptor(j,y))})}return V}var o={"#":{pattern:/[0-9]/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,uppercase:!0},a:{pattern:/[a-zA-Z]/,lowercase:!0},"!":{escape:!0},"*":{repeat:!0}};function s(V,z){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,y=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return i(z).length>1?u(z)(V,z,j,y):p(V,z,j,y)}function i(V){try{return JSON.parse(V)}catch{return[V]}}function u(V){var z=i(V).sort(function(y,L){return y.length-L.length});return function(y,L,$){var UU=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],eU=z.map(function(lU){return p(y,lU,$,!1)}),VU=eU.pop();for(var QU in z)if(j(VU,z[QU],$))return p(y,z[QU],$,UU);return""};function j(y,L,$){for(var UU in $)$[UU].escape&&(L=L.replace(new RegExp(UU+".{1}","g"),""));return L.split("").filter(function(eU){return $[eU]&&$[eU].pattern}).length>=y.length}}function p(V,z,j){for(var y=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],L=0,$=0,UU="",eU="";L<z.length&&$<V.length;){var VU=z[L],QU=V[$],lU=j[VU];if(lU&&lU.pattern)lU.pattern.test(QU)&&(UU+=l(QU,lU),L++,y&&z[L]&&(j[z[L]]?j[z[L]]&&j[z[L]].escape&&(UU+=z[L+1],L+=2):(UU+=z[L],L++))),$++;else if(lU&&lU.repeat){var RU=j[z[L-1]];RU&&!RU.pattern.test(QU)?L++:L--}else lU&&lU.escape&&(VU=z[++L]),y&&(UU+=VU),QU===VU&&$++,L++}for(;y&&L<z.length;){var dU=z[L];if(j[dU]){eU="";break}eU+=dU,L++}return UU+eU}function l(V,z){return z.transform&&(V=z.transform(V)),z.uppercase?V.toLocaleUpperCase():z.lowercase?V.toLocaleLowerCase():V}function c(V){return V instanceof HTMLInputElement?V:V.querySelector("input")||V}function f(V){return Object.prototype.toString.call(V)==="[object String]"}var v=function(){function V(y){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e(this,V),!y)throw new Error("Maska: no element for mask");if($.preprocessor!=null&&typeof $.preprocessor!="function")throw new Error("Maska: preprocessor must be a function");if($.tokens)for(var UU in $.tokens)$.tokens[UU]=a({},$.tokens[UU]),$.tokens[UU].pattern&&f($.tokens[UU].pattern)&&($.tokens[UU].pattern=new RegExp($.tokens[UU].pattern));this._opts={mask:$.mask,tokens:a(a({},o),$.tokens),preprocessor:$.preprocessor},this._el=f(y)?document.querySelectorAll(y):y.length?y:[y],this.inputEvent=function(eU){return L.updateValue(eU.target,eU)},this.init()}var z,j;return z=V,(j=[{key:"init",value:function(){for(var y=this,L=function(UU){var eU=c(y._el[UU]);!y._opts.mask||eU.dataset.mask&&eU.dataset.mask===y._opts.mask||(eU.dataset.mask=y._opts.mask),setTimeout(function(){return y.updateValue(eU)},0),eU.dataset.maskInited||(eU.dataset.maskInited=!0,eU.addEventListener("input",y.inputEvent),eU.addEventListener("beforeinput",y.beforeInput))},$=0;$<this._el.length;$++)L($)}},{key:"destroy",value:function(){for(var y=0;y<this._el.length;y++){var L=c(this._el[y]);L.removeEventListener("input",this.inputEvent),L.removeEventListener("beforeinput",this.beforeInput),delete L.dataset.mask,delete L.dataset.maskInited}}},{key:"updateValue",value:function(y,L){if(y&&y.type){var $=y.type.match(/^number$/i)&&y.validity.badInput;if(!y.value&&!$||!y.dataset.mask)return y.dataset.maskRawValue="",void this.dispatch("maska",y,L);var UU=y.selectionEnd,eU=y.value,VU=eU[UU-1];y.dataset.maskRawValue=s(y.value,y.dataset.mask,this._opts.tokens,!1);var QU=y.value;this._opts.preprocessor&&(QU=this._opts.preprocessor(QU)),y.value=s(QU,y.dataset.mask,this._opts.tokens),L&&L.inputType==="insertText"&&UU===eU.length&&(UU=y.value.length),function(lU,RU,dU){for(;RU&&RU<lU.value.length&&lU.value.charAt(RU-1)!==dU;)RU++;(lU.type?lU.type.match(/^(text|search|password|tel|url)$/i):!lU.type)&&lU===document.activeElement&&(lU.setSelectionRange(RU,RU),setTimeout(function(){lU.setSelectionRange(RU,RU)},0))}(y,UU,VU),this.dispatch("maska",y,L),y.value!==eU&&this.dispatch("input",y,L)}}},{key:"beforeInput",value:function(y){y&&y.target&&y.target.type&&y.target.type.match(/^number$/i)&&y.data&&isNaN(y.target.value+y.data)&&y.preventDefault()}},{key:"dispatch",value:function(y,L,$){L.dispatchEvent(function(UU){var eU=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,VU=document.createEvent("Event");return VU.initEvent(UU,!0,!0),eU&&(VU.inputType=eU),VU}(y,$&&$.inputType||null))}}])&&t(z.prototype,j),V}(),d,h=(d=new WeakMap,function(V,z){z.value&&(d.has(V)&&!function(j){return!(f(j.value)&&j.value===j.oldValue||Array.isArray(j.value)&&JSON.stringify(j.value)===JSON.stringify(j.oldValue)||j.value&&j.value.mask&&j.oldValue&&j.oldValue.mask&&j.value.mask===j.oldValue.mask)}(z)||d.set(V,new v(V,function(j){var y={};return j.mask?(y.mask=Array.isArray(j.mask)?JSON.stringify(j.mask):j.mask,y.tokens=j.tokens?a({},j.tokens):{},y.preprocessor=j.preprocessor):y.mask=Array.isArray(j)?JSON.stringify(j):j,y}(z.value))))});function k(V){V.directive("maska",h)}typeof window!="undefined"&&window.Vue&&window.Vue.use&&window.Vue.use(k);var plFormContact_vue_vue_type_style_index_0_lang="";const _hoisted_1$m={id:"container-general",class:"d-flex flex-column gap-3"},_hoisted_2$l={class:"d-flex justify-content-between mt-32"},_sfc_main$p={__name:"pl-form-contact",props:{modelValue:{type:Object,required:!0}},setup(V){const z=V;let{modelValue:j}=vue.toRefs(z);const y=vue.ref(!1),L=()=>y.value=!0,$=UU=>{UU.target.value==="+7 (8"&&(j.value.contact.phone=UU.target.value.replace("(8",""))};return vue.watch(j,UU=>{emit("update:modelValue",UU)}),(UU,eU)=>{const VU=ElForm,QU=vue.resolveDirective("maska");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(_sfc_main$r,{title:"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u0434\u043B\u044F \u0441\u0432\u044F\u0437\u0438","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442",items:vue.unref(j).contactList,"add-item":L,"is-show-list":!0,"is-main":!0},null,8,["items"]),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[6]||(eU[6]=lU=>y.value=!1),visible:y.value,name:"\u041D\u043E\u0432\u044B\u0439 \u043A\u043E\u043D\u0442\u0430\u043A\u0442 \u0434\u043B\u044F \u0441\u0432\u044F\u0437\u0438","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(VU,{"label-position":"top",ref:"form",model:vue.unref(j).contact,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(PlSuggestions,{value:vue.unref(j).contact.fullName,label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E"},null,8,["value"]),vue.createVNode(_sfc_main$y,{class:"mt-32",label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",modelValue:vue.unref(j).contact.position,"onUpdate:modelValue":eU[0]||(eU[0]=lU=>vue.unref(j).contact.position=lU),placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"},null,8,["modelValue"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).contact.phone,"onUpdate:modelValue":eU[1]||(eU[1]=lU=>vue.unref(j).contact.phone=lU),label:"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430",placeholder:"+7 (000) 000 00 00",type:"text",onInput:$},null,8,["modelValue"]),[[QU,"!+7 (###) ### ## ##"]]),vue.createElementVNode("div",_hoisted_2$l,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).contact.contactPhone.number,"onUpdate:modelValue":eU[2]||(eU[2]=lU=>vue.unref(j).contact.contactPhone.number=lU),label:"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440"},null,8,["modelValue"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).contact.contactPhone.addNumber,"onUpdate:modelValue":eU[3]||(eU[3]=lU=>vue.unref(j).contact.contactPhone.addNumber=lU),label:"\u0414\u043E\u0431\u0430\u0432\u043E\u0447\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u043E\u0447\u043D\u044B\u0439"},null,8,["modelValue"])]),vue.createVNode(_sfc_main$x,{class:"mt-32 width-260",modelValue:vue.unref(j).contact.email,"onUpdate:modelValue":eU[4]||(eU[4]=lU=>vue.unref(j).contact.email=lU),label:"\u041F\u043E\u0447\u0442\u0430",optional:"\u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E",placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0447\u0442\u0443"},null,8,["modelValue"]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u043C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043E\u043C",modelValue:vue.unref(j).contact.isMain,"onUpdate:modelValue":eU[5]||(eU[5]=lU=>vue.unref(j).contact.isMain=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"])])}}};var _imports_0$a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjI1NjkxIDUuMDIwNEMyLjI0NTkxIDMuNDkzMSAzLjQ4MDU1IDIuMjUgNS4wMDY4OSAyLjI1SDE2LjE2MzlDMTYuODk0NCAyLjI1IDE3LjU5MjYgMi41NDA0MSAxOC4xMDg1IDMuMDU0OTZMMjAuOTM3MiA1Ljg4MzY3QzIxLjQ1MjcgNi4zOTkxNiAyMS43NDI5IDcuMDk4ODYgMjEuNzQyOSA3LjgyOFYxNEMyMS43NDI5IDE0LjQxNDIgMjEuNDA3MSAxNC43NSAyMC45OTI5IDE0Ljc1QzIwLjU3ODcgMTQuNzUgMjAuMjQyOSAxNC40MTQyIDIwLjI0MjkgMTRWNy44MjhDMjAuMjQyOSA3LjQ5NzE0IDIwLjExMTEgNy4xNzg4NCAxOS44NzY2IDYuOTQ0MzNMMTcuMDQ5MyA0LjExNzA0QzE3LjA0OTEgNC4xMTY5MiAxNy4wNDk0IDQuMTE3MTUgMTcuMDQ5MyA0LjExNzA0QzE2Ljk1ODEgNC4wMjYyMSAxNi44NTQ1IDMuOTUwNSAxNi43NDI5IDMuODkyMjFWNi45MDlDMTYuNzQyOSA3Ljg3NTIxIDE1Ljk1OTEgOC42NTkgMTQuOTkyOSA4LjY1OUg4Ljk5Mjg5QzguMDI2NjggOC42NTkgNy4yNDI4OSA3Ljg3NTIxIDcuMjQyODkgNi45MDlWMy43NUg1LjAwNjg5QzQuMzEzMjUgMy43NSAzLjc1MTkxIDQuMzE0NzYgMy43NTY4NyA1LjAwOTQzQzMuNzU2ODcgNS4wMDk0NSAzLjc1Njg3IDUuMDA5NDEgMy43NTY4NyA1LjAwOTQzTDMuODYwODcgMTkuMDA5NEMzLjg2NTg3IDE5LjY5NjEgNC40MjM3MiAyMC4yNSA1LjExMDg5IDIwLjI1SDYuMjQ5ODlWMTMuMjg2QzYuMjQ5ODkgMTIuMTYxOCA3LjE2MTY4IDExLjI1IDguMjg1ODkgMTEuMjVIMTUuNzE0OUMxNi44Mzg1IDExLjI1IDE3Ljc0OTkgMTIuMTYyMiAxNy43NDk5IDEzLjI4NlYxNEMxNy43NDk5IDE0LjQxNDIgMTcuNDE0MSAxNC43NSAxNi45OTk5IDE0Ljc1QzE2LjU4NTcgMTQuNzUgMTYuMjQ5OSAxNC40MTQyIDE2LjI0OTkgMTRWMTMuMjg2QzE2LjI0OTkgMTIuOTg5OCAxNi4wMDkzIDEyLjc1IDE1LjcxNDkgMTIuNzVIOC4yODU4OUM3Ljk5MDEgMTIuNzUgNy43NDk4OSAxMi45OTAyIDcuNzQ5ODkgMTMuMjg2VjIwLjI1SDEyLjk5OTlDMTMuNDE0MSAyMC4yNSAxMy43NDk5IDIwLjU4NTggMTMuNzQ5OSAyMUMxMy43NDk5IDIxLjQxNDIgMTMuNDE0MSAyMS43NSAxMi45OTk5IDIxLjc1SDUuMTEwODlDMy42MDAwOSAyMS43NSAyLjM3MTk3IDIwLjUzMTggMi4zNjA5MSAxOS4wMjA2QzIuMzYwOTEgMTkuMDIwNSAyLjM2MDkxIDE5LjAyMDYgMi4zNjA5MSAxOS4wMjA2TDIuMjU2OTEgNS4wMjA0Wk04Ljc0Mjg5IDMuNzVWNi45MDlDOC43NDI4OSA3LjA0Njc5IDguODU1MSA3LjE1OSA4Ljk5Mjg5IDcuMTU5SDE0Ljk5MjlDMTUuMTMwNyA3LjE1OSAxNS4yNDI5IDcuMDQ2NzkgMTUuMjQyOSA2LjkwOVYzLjc1SDguNzQyODlaTTIxLjUzMDIgMTcuNDY5N0MyMS44MjMxIDE3Ljc2MjYgMjEuODIzMSAxOC4yMzc0IDIxLjUzMDIgMTguNTMwM0wxOC41MzAyIDIxLjUzMDNDMTguMjM3MyAyMS44MjMyIDE3Ljc2MjUgMjEuODIzMiAxNy40Njk2IDIxLjUzMDNMMTUuNDY5NiAxOS41MzAzQzE1LjE3NjcgMTkuMjM3NCAxNS4xNzY3IDE4Ljc2MjYgMTUuNDY5NiAxOC40Njk3QzE1Ljc2MjUgMTguMTc2OCAxNi4yMzczIDE4LjE3NjggMTYuNTMwMiAxOC40Njk3TDE3Ljk5OTkgMTkuOTM5M0wyMC40Njk2IDE3LjQ2OTdDMjAuNzYyNSAxNy4xNzY4IDIxLjIzNzMgMTcuMTc2OCAyMS41MzAyIDE3LjQ2OTdaIiBmaWxsPSIjNTA1MDUxIi8+Cjwvc3ZnPgo=",_imports_1$5="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiAyLjI0NjA5QzEyLjE5ODkgMi4yNDYwOSAxMi4zODk3IDIuMzI1MTEgMTIuNTMwMyAyLjQ2NTc2TDE1LjUzMTYgNS40NjcwMUMxNS44MjQ1IDUuNzU5OTEgMTUuODI0NSA2LjIzNDc4IDE1LjUzMTYgNi41Mjc2N0MxNS4yMzg3IDYuODIwNTcgMTQuNzYzOCA2LjgyMDU3IDE0LjQ3MDkgNi41Mjc2N0wxMi43NSA0LjgwNjc1VjE1LjAwMTFDMTIuNzUgMTUuNDE1MyAxMi40MTQyIDE1Ljc1MTEgMTIgMTUuNzUxMUMxMS41ODU4IDE1Ljc1MTEgMTEuMjUgMTUuNDE1MyAxMS4yNSAxNS4wMDExVjQuODA2NzVMOS41MjkwNyA2LjUyNzY3QzkuMjM2MTcgNi44MjA1NyA4Ljc2MTMgNi44MjA1NyA4LjQ2ODQxIDYuNTI3NjdDOC4xNzU1MSA2LjIzNDc4IDguMTc1NTEgNS43NTk5MSA4LjQ2ODQxIDUuNDY3MDFMMTEuNDY5NyAyLjQ2NTc2QzExLjYxMDMgMi4zMjUxMSAxMS44MDExIDIuMjQ2MDkgMTIgMi4yNDYwOVpNNi45OTc5IDkuNzQ4NTlDNi4zMDcwOSA5Ljc0ODU5IDUuNzQ3MDcgMTAuMzA4NiA1Ljc0NzA3IDEwLjk5OTRWMTkuMDAyOEM1Ljc0NzA3IDE5LjY5MzYgNi4zMDcwOSAyMC4yNTM2IDYuOTk3OSAyMC4yNTM2SDE3LjAwMjFDMTcuNjkyOSAyMC4yNTM2IDE4LjI1MjkgMTkuNjkzNiAxOC4yNTI5IDE5LjAwMjhWMTAuOTk5NEMxOC4yNTI5IDEwLjMwODYgMTcuNjkyOSA5Ljc0ODU5IDE3LjAwMjEgOS43NDg1OUgxNS4wMDEyQzE0LjU4NyA5Ljc0ODU5IDE0LjI1MTIgOS40MTI4MSAxNC4yNTEyIDguOTk4NTlDMTQuMjUxMiA4LjU4NDM4IDE0LjU4NyA4LjI0ODU5IDE1LjAwMTIgOC4yNDg1OUgxNy4wMDIxQzE4LjUyMTMgOC4yNDg1OSAxOS43NTI5IDkuNDgwMTggMTkuNzUyOSAxMC45OTk0VjE5LjAwMjhDMTkuNzUyOSAyMC41MjIgMTguNTIxMyAyMS43NTM2IDE3LjAwMjEgMjEuNzUzNkg2Ljk5NzlDNS40Nzg2NiAyMS43NTM2IDQuMjQ3MDcgMjAuNTIyIDQuMjQ3MDcgMTkuMDAyOFYxMC45OTk0QzQuMjQ3MDcgOS40ODAxOCA1LjQ3ODY2IDguMjQ4NTkgNi45OTc5IDguMjQ4NTlIOC45OTg3NEM5LjQxMjk1IDguMjQ4NTkgOS43NDg3NCA4LjU4NDM4IDkuNzQ4NzQgOC45OTg1OUM5Ljc0ODc0IDkuNDEyODEgOS40MTI5NSA5Ljc0ODU5IDguOTk4NzQgOS43NDg1OUg2Ljk5NzlaIiBmaWxsPSIjNTA1MDUxIi8+Cjwvc3ZnPgo=",_imports_2$3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiAyLjM1ODg5QzYuNzA0OTUgMi4zNTg4OSAyLjI1IDYuMjY5OTMgMi4yNSAxMS4yOTA5QzIuMjUgMTQuMTEzMiAzLjY3NTA3IDE2LjU5MDEgNS44NDg3NCAxOC4yMTA2QzUuODQ4NjQgMTguNjE2OSA1Ljg0ODk2IDE5LjA3MyA1Ljg0OTMxIDE5LjU1ODVWMTkuNTU4Nkw1Ljg0OTMxIDE5LjU1OTJDNS44NDk2NCAyMC4wMzE1IDUuODUgMjAuNTMxNiA1Ljg1IDIxLjA0MDlDNS44NSAyMS4zMDAzIDUuOTg0MDEgMjEuNTQxMiA2LjIwNDM2IDIxLjY3OEM2LjQyNDcxIDIxLjgxNDkgNi43MDAxMSAyMS44MjgxIDYuOTMyNTkgMjEuNzEzMUwxMC4yNDE5IDIwLjA3NThDMTAuODExOSAyMC4xNzE0IDExLjM5ODcgMjAuMjIyOSAxMiAyMC4yMjI5QzE3LjI5NTEgMjAuMjIyOSAyMS43NSAxNi4zMTE4IDIxLjc1IDExLjI5MDlDMjEuNzUgNi4yNjk5MyAxNy4yOTUxIDIuMzU4ODkgMTIgMi4zNTg4OVpNMy43NSAxMS4yOTA5QzMuNzUgNy4yMzM4NSA3LjM5MTA1IDMuODU4ODkgMTIgMy44NTg4OUMxNi42MDg5IDMuODU4ODkgMjAuMjUgNy4yMzM4NSAyMC4yNSAxMS4yOTA5QzIwLjI1IDE1LjM0NzkgMTYuNjA4OSAxOC43MjI5IDEyIDE4LjcyMjlDMTEuNDA4NCAxOC43MjI5IDEwLjgzMTcgMTguNjY0OCAxMC4yNzI1IDE4LjU1NzNDMTAuMTExNyAxOC41MjY1IDkuOTQ1MTcgMTguNTQ5MSA5Ljc5ODQxIDE4LjYyMTdMNy4zNDk1IDE5LjgzMzNMNy4zNDkzIDE5LjU1NUM3LjM0ODg0IDE4LjkxMDMgNy4zNDg0MiAxOC4zMTkxIDcuMzQ5IDE3LjgyNThDNy4zNDkyOSAxNy41Nzc3IDcuMjI2OTMgMTcuMzQ1NiA3LjAyMjE1IDE3LjIwNTdDNS4wMjA4NSAxNS44MzgxIDMuNzUgMTMuNjk1MyAzLjc1IDExLjI5MDlaTTExLjkgNy4wODQ4OUMxMC41NzEzIDcuMDg0ODkgOS40OSA4LjE2MDIgOS40OSA5LjQ5Mjg5QzkuNDkgOS45MDcxIDkuODI1NzkgMTAuMjQyOSAxMC4yNCAxMC4yNDI5QzEwLjY1NDIgMTAuMjQyOSAxMC45OSA5LjkwNzEgMTAuOTkgOS40OTI4OUMxMC45OSA4Ljk5MTU3IDExLjM5NjcgOC41ODQ4OSAxMS45IDguNTg0ODlDMTIuNDAyMSA4LjU4NDg5IDEyLjgwOSA4Ljk5MTM5IDEyLjgwOSA5LjQ5Mzg5QzEyLjgwOSA5LjY1NDMyIDEyLjc2NDYgOS43NTU0MyAxMi43IDkuODQyNDFDMTIuNjIzIDkuOTQ2MTggMTIuNTAyOCAxMC4wNDgxIDEyLjMxOTYgMTAuMTcxNUMxMS44NTEzIDEwLjQ4NTkgMTEuMTQ5IDExLjA0ODYgMTEuMTQ5IDEyLjEyMDlWMTIuMzI3OUMxMS4xNDkgMTIuNzQyMSAxMS40ODQ4IDEzLjA3NzkgMTEuODk5IDEzLjA3NzlDMTIuMzEzMiAxMy4wNzc5IDEyLjY0OSAxMi43NDIxIDEyLjY0OSAxMi4zMjc5VjEyLjEyMDlDMTIuNjQ5IDExLjk1MzIgMTIuNjk1NiAxMS44NDcgMTIuNzYzMSAxMS43NTZDMTIuODQzMiAxMS42NDgyIDEyLjk2NzcgMTEuNTQzIDEzLjE1NjEgMTEuNDE2NkwxMy4xNTY4IDExLjQxNjFDMTMuNjE0NCAxMS4xMDggMTQuMzA5IDEwLjU1MjMgMTQuMzA5IDkuNDkzODlDMTQuMzA5IDguMTYyMzggMTMuMjI5OSA3LjA4NDg5IDExLjkgNy4wODQ4OVpNMTEuODkwNSAxNS43MjYxQzEyLjM5MyAxNS43MjYxIDEyLjgwMDUgMTUuMzE4NyAxMi44MDA1IDE0LjgxNjFDMTIuODAwNSAxNC4zMTM2IDEyLjM5MyAxMy45MDYxIDExLjg5MDUgMTMuOTA2MUMxMS4zODc5IDEzLjkwNjEgMTAuOTgwNSAxNC4zMTM2IDEwLjk4MDUgMTQuODE2MUMxMC45ODA1IDE1LjMxODcgMTEuMzg3OSAxNS43MjYxIDExLjg5MDUgMTUuNzI2MVoiIGZpbGw9IiM1MDUwNTEiLz4KPC9zdmc+Cg==",plFormMenu_vue_vue_type_style_index_0_lang="";const _sfc_main$o={},_hoisted_1$l={id:"form-menu",class:"container padding-menu pt-3 pb-3 h-100"},_hoisted_2$k=vue.createStaticVNode('<nav class="d-grid gap-52 justify-content-center h-100"><div class="d-grid top-section gap-4"><a href="#"><img src="'+_imports_0$a+'" alt="saved"></a><a href="#"><img src="'+_imports_1$5+'" alt="share"></a><a href="#"><img src="'+_imports_2$3+'" alt="support"></a></div><div class="decor"></div><a class="mt-auto" href="#"><img src="'+_imports_3$2+'" alt="close"></a></nav>',1),_hoisted_3$h=[_hoisted_2$k];function _sfc_render$2(V,z){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$l,_hoisted_3$h)}var PlFormMenu=_export_sfc(_sfc_main$o,[["render",_sfc_render$2]]);const _hoisted_1$k={id:"container-general",class:"d-flex flex-column gap-3"},_hoisted_2$j={class:"d-flex justify-content-between mt-32"},_hoisted_3$g={class:"d-flex justify-content-between mt-32"},_hoisted_4$b={class:"d-flex justify-content-between mt-32"},_hoisted_5$9={class:"d-flex justify-content-between mt-32"},_hoisted_6$6={class:"d-flex justify-content-between mt-32"},_hoisted_7$6={class:"d-flex justify-content-between mt-32"},_sfc_main$n={__name:"pl-additional",props:{modelValue:{type:Object,required:!0}},setup(V){const z=V;let{modelValue:j}=vue.toRefs(z);console.log("formClient",j);const y=vue.reactive({isBeneficiary:!1,isAcquirer:!1}),L=()=>y.isBeneficiary=!0,$=()=>y.isAcquirer=!0;return(UU,eU)=>{const VU=ElFormItem,QU=ElForm;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.createVNode(_sfc_main$r,{title:"\u041A\u043E\u0441\u0432\u0435\u043D\u043D\u044B\u0435 \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440\u044B","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","is-additional":!0,"add-item":L}),vue.createVNode(_sfc_main$r,{title:"\u0412\u044B\u0433\u043E\u0434\u043E\u043F\u0440\u0438\u043E\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043B\u0438","bth-title":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","is-additional":!0,"add-item":$}),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[13]||(eU[13]=lU=>y.isBeneficiary=!1),visible:y.isBeneficiary,name:"\u041D\u043E\u0432\u044B\u0439 \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(QU,{"label-position":"top",ref:"form",model:vue.unref(j).newBeneficiary,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$x,{modelValue:vue.unref(j).newBeneficiary.fullName,"onUpdate:modelValue":eU[0]||(eU[0]=lU=>vue.unref(j).newBeneficiary.fullName=lU),label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:vue.unref(placeholders).name},null,8,["modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_2$j,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.percent,"onUpdate:modelValue":eU[1]||(eU[1]=lU=>vue.unref(j).newBeneficiary.percent=lU),label:"\u0414\u043E\u043B\u044F \u0432 \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u043C \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0435",placeholder:vue.unref(placeholders).share},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.nationality,"onUpdate:modelValue":eU[2]||(eU[2]=lU=>vue.unref(j).newBeneficiary.nationality=lU),label:"\u0413\u0440\u0430\u0436\u0434\u0430\u043D\u0441\u0442\u0432\u043E",placeholder:vue.unref(placeholders).nationality},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_3$g,[vue.createVNode(VU,{class:"width-260",label:"\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.birthday,"onUpdate:modelValue":eU[3]||(eU[3]=lU=>vue.unref(j).newBeneficiary.dates.birthday=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$y,{class:"width-260",label:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442",modelValue:vue.unref(j).newBeneficiary.doc,"onUpdate:modelValue":eU[4]||(eU[4]=lU=>vue.unref(j).newBeneficiary.doc=lU),placeholder:vue.unref(placeholders).document},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_4$b,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.ser,"onUpdate:modelValue":eU[5]||(eU[5]=lU=>vue.unref(j).newBeneficiary.ser=lU),label:"\u0421\u0435\u0440\u0438\u044F \u0438 \u043D\u043E\u043C\u0435\u0440 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430",placeholder:vue.unref(placeholders).passport.number},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.numb,"onUpdate:modelValue":eU[6]||(eU[6]=lU=>vue.unref(j).newBeneficiary.numb=lU),label:"\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F",placeholder:vue.unref(placeholders).passport.code},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431 \u043E\u0440\u0433\u0430\u043D\u0435, \u0432\u044B\u0434\u0430\u0432\u0448\u0435\u043C \u043F\u0430\u0441\u043F\u043E\u0440\u0442",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[7]||(eU[7]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).passport.organ},null,8,["modelValue","placeholder"]),vue.createVNode(VU,{style:{"margin-top":"32px !important"},label:"\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.passport,"onUpdate:modelValue":eU[8]||(eU[8]=lU=>vue.unref(j).newBeneficiary.dates.passport=lU),placeholder:vue.unref(placeholders).dates.passport},null,8,["modelValue","placeholder"])]),_:1}),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[9]||(eU[9]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).birthPlace},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[10]||(eU[10]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.registration,label:"\u0410\u0434\u0440\u0435\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"},null,8,["modelValue","placeholder"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[11]||(eU[11]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.actual,label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441"},null,8,["modelValue","placeholder"]),[[vue.vShow,!vue.unref(j).newBeneficiary.isSameAddress]]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438",modelValue:vue.unref(j).newBeneficiary.isSameAddress,"onUpdate:modelValue":eU[12]||(eU[12]=lU=>vue.unref(j).newBeneficiary.isSameAddress=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"]),vue.createVNode(_sfc_main$s,{onTogglePopup:eU[28]||(eU[28]=lU=>y.isAcquirer=!1),visible:y.isAcquirer,name:"\u041D\u043E\u0432\u044B\u0439 \u0432\u044B\u0433\u043E\u0434\u043E\u043F\u0440\u0438\u043E\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043B\u044C","no-tabs":!0},{noTabs:vue.withCtx(()=>[vue.createVNode(QU,{"label-position":"top",ref:"form",model:vue.unref(j).newBeneficiary,"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$x,{modelValue:vue.unref(j).newBeneficiary.fullName,"onUpdate:modelValue":eU[14]||(eU[14]=lU=>vue.unref(j).newBeneficiary.fullName=lU),label:"\u0424\u0418\u041E \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",placeholder:vue.unref(placeholders).name},null,8,["modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_5$9,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.percent,"onUpdate:modelValue":eU[15]||(eU[15]=lU=>vue.unref(j).newBeneficiary.percent=lU),label:"\u0414\u043E\u043B\u044F \u0432 \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u043C \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0435",placeholder:vue.unref(placeholders).share},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.nationality,"onUpdate:modelValue":eU[16]||(eU[16]=lU=>vue.unref(j).newBeneficiary.nationality=lU),label:"\u0413\u0440\u0430\u0436\u0434\u0430\u043D\u0441\u0442\u0432\u043E",placeholder:vue.unref(placeholders).nationality},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0431\u0435\u043D\u0435\u0444\u0438\u0446\u0438\u0430\u0440\u043E\u043C",modelValue:vue.unref(j).newBeneficiary.isBeneficiary,"onUpdate:modelValue":eU[17]||(eU[17]=lU=>vue.unref(j).newBeneficiary.isBeneficiary=lU)},null,8,["modelValue"]),vue.createElementVNode("div",_hoisted_6$6,[vue.createVNode(VU,{class:"width-260",label:"\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.birthday,"onUpdate:modelValue":eU[18]||(eU[18]=lU=>vue.unref(j).newBeneficiary.dates.birthday=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$y,{class:"width-260",label:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442",modelValue:vue.unref(j).newBeneficiary.doc,"onUpdate:modelValue":eU[19]||(eU[19]=lU=>vue.unref(j).newBeneficiary.doc=lU),placeholder:vue.unref(placeholders).document},null,8,["modelValue","placeholder"])]),vue.createElementVNode("div",_hoisted_7$6,[vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.ser,"onUpdate:modelValue":eU[20]||(eU[20]=lU=>vue.unref(j).newBeneficiary.ser=lU),label:"\u0421\u0435\u0440\u0438\u044F \u0438 \u043D\u043E\u043C\u0435\u0440 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430",placeholder:vue.unref(placeholders).passport.number},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"width-260",modelValue:vue.unref(j).newBeneficiary.numb,"onUpdate:modelValue":eU[21]||(eU[21]=lU=>vue.unref(j).newBeneficiary.numb=lU),label:"\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F",placeholder:vue.unref(placeholders).passport.code},null,8,["modelValue","placeholder"])]),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431 \u043E\u0440\u0433\u0430\u043D\u0435, \u0432\u044B\u0434\u0430\u0432\u0448\u0435\u043C \u043F\u0430\u0441\u043F\u043E\u0440\u0442",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[22]||(eU[22]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).passport.organ},null,8,["modelValue","placeholder"]),vue.createVNode(VU,{style:{"margin-top":"32px !important"},label:"\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438 \u043F\u0430\u0441\u043F\u043E\u0440\u0442\u0430"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$u,{modelValue:vue.unref(j).newBeneficiary.dates.passport,"onUpdate:modelValue":eU[23]||(eU[23]=lU=>vue.unref(j).newBeneficiary.dates.passport=lU)},null,8,["modelValue"])]),_:1}),vue.createVNode(_sfc_main$x,{class:"mt-32",area:!0,label:"\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F",modelValue:vue.unref(j).newBeneficiary.organ,"onUpdate:modelValue":eU[24]||(eU[24]=lU=>vue.unref(j).newBeneficiary.organ=lU),placeholder:vue.unref(placeholders).birthPlace},null,8,["modelValue","placeholder"]),vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[25]||(eU[25]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.registration,label:"\u0410\u0434\u0440\u0435\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"},null,8,["modelValue","placeholder"]),vue.withDirectives(vue.createVNode(_sfc_main$x,{class:"mt-32",modelValue:vue.unref(j).newBeneficiary.LAddress,"onUpdate:modelValue":eU[26]||(eU[26]=lU=>vue.unref(j).newBeneficiary.LAddress=lU),area:!0,placeholder:vue.unref(placeholders).address.actual,label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441"},null,8,["modelValue","placeholder"]),[[vue.vShow,!vue.unref(j).newBeneficiary.isSameAddress]]),vue.createVNode(_sfc_main$w,{class:"mt-32",label:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438",modelValue:vue.unref(j).newBeneficiary.isSameAddress,"onUpdate:modelValue":eU[27]||(eU[27]=lU=>vue.unref(j).newBeneficiary.isSameAddress=lU)},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["visible"])])}}};var plQuestionnaire_vue_vue_type_style_index_0_lang="";const _hoisted_1$j={class:"form-wrapper"},_hoisted_2$i={id:"pl-questionnaire",class:"wrapper d-flex justify-content-between"},_hoisted_3$f={class:"left d-flex flex-column gap-2"},_hoisted_4$a={class:"center d-flex flex-column gap-3"},_hoisted_5$8={class:"right"},_sfc_main$m={__name:"pl-questionnaire",props:{modelValue:{type:Object,required:!0},percent:{type:Number,default:26}},emits:["update:modelValue"],setup(V,{emit:z}){const j=V;let{modelValue:y}=vue.toRefs(j);vue.watch(y,$=>{z("update:modelValue",$)});const L=vue.ref("general");return($,UU)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$j,[vue.createElementVNode("div",_hoisted_2$i,[vue.createElementVNode("div",_hoisted_3$f,[vue.createVNode(_sfc_main$C,{selected:L.value,"onUpdate:selected":UU[0]||(UU[0]=eU=>L.value=eU)},null,8,["selected"]),vue.createVNode(_sfc_main$B),vue.createVNode(_sfc_main$A)]),vue.createElementVNode("div",_hoisted_4$a,[L.value==="general"?(vue.openBlock(),vue.createBlock(_sfc_main$t,{key:0,modelValue:vue.unref(y).general,"onUpdate:modelValue":UU[1]||(UU[1]=eU=>vue.unref(y).general=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0),L.value==="control"?(vue.openBlock(),vue.createBlock(_sfc_main$q,{key:1,newFounderTabs:vue.unref(y).newFounderTabs,modelValue:vue.unref(y),"onUpdate:modelValue":UU[2]||(UU[2]=eU=>vue.isRef(y)?y.value=eU:y=eU),percent:V.percent},null,8,["newFounderTabs","modelValue","percent"])):vue.createCommentVNode("",!0),L.value==="contact"?(vue.openBlock(),vue.createBlock(_sfc_main$p,{key:2,modelValue:vue.unref(y),"onUpdate:modelValue":UU[3]||(UU[3]=eU=>vue.isRef(y)?y.value=eU:y=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0),L.value==="additional"?(vue.openBlock(),vue.createBlock(_sfc_main$n,{key:3,modelValue:vue.unref(y),"onUpdate:modelValue":UU[4]||(UU[4]=eU=>vue.isRef(y)?y.value=eU:y=eU)},null,8,["modelValue"])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_5$8,[vue.createVNode(PlFormMenu)])])]))}},PlQuestionnairePlugin={install(V){V.component("PlQuestionnaire",_sfc_main$m),V.use(k)}};var plStepper_vue_vue_type_style_index_0_lang="";const _hoisted_1$i={class:"stepper-container"},_hoisted_2$h={class:"stepper-title__container"},_hoisted_3$e={key:0,class:"stepper-figure"},_hoisted_4$9=vue.createElementVNode("div",{class:"stepper-figure__circle stepper-figure__circle_checked"},null,-1),_hoisted_5$7=vue.createElementVNode("div",{class:"stepper-figure__progress"},[vue.createElementVNode("div",{class:"stepper-figure__progress-inner"})],-1),_hoisted_6$5=[_hoisted_4$9,_hoisted_5$7],_hoisted_7$5={key:1,class:"stepper-figure"},_hoisted_8$4={class:"stepper-figure__progress"},_hoisted_9$3={key:2,class:"stepper-title__container"},_hoisted_10$3={key:0},_hoisted_11$3={key:1},_hoisted_12$3={key:0},_hoisted_13$2={key:1},_hoisted_14$2={key:0},_hoisted_15$2={key:3,class:"stepper-title__container"},_hoisted_16$2={key:0},_hoisted_17$2={key:1},_hoisted_18$2={key:0},_hoisted_19$2={key:1},_hoisted_20$2={key:0},_hoisted_21$2={key:0},_hoisted_22$2={class:"stepper-title__container stepper-title__container_ended"},_hoisted_23$2={class:"stepper-text"},_hoisted_24$2={key:0},_hoisted_25$2={key:0},_hoisted_26$2={key:0,class:"stepper-footer"},_hoisted_27$1=vue.createTextVNode(" \u041A\u043E\u043B\u0438\u0447\u0435\u0442\u0432\u043E \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0439 \u0434\u043B\u044F \u043F\u043E\u0432\u044B\u0448\u0435\u043D\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: "),_hoisted_28$1={class:"stepper-footer__count-remain"},_hoisted_29$1=vue.createTextVNode(" \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0432\u044B\u0434\u0430\u043D\u043D\u044B\u0445 \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0439: "),_hoisted_30$1={class:"stepper-footer__count"},_hoisted_31={key:1,class:"stepper-footer"},_hoisted_32=vue.createTextVNode(" \u0421\u0443\u043C\u043C\u0430 \u0434\u043B\u044F \u043F\u043E\u0432\u044B\u0448\u0435\u043D\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: "),_hoisted_33={class:"stepper-footer__count-remain"},_hoisted_34=vue.createTextVNode(" \u0412\u044B\u0434\u0430\u043D\u043E \u043A\u043E\u043C\u0438\u0441\u0441\u0438\u0439 \u043D\u0430 \u0441\u0443\u043C\u043C\u0443: "),_hoisted_35={class:"stepper-footer__count"},__default__$1={name:"PlStepper"},_sfc_main$l=Object.assign(__default__$1,{props:{displayType:{type:String,default:"number"},steps:{type:Array,required:!0},stepName:{type:String,default:"name"},stepCountName:{type:String,default:"count"},currentCount:{type:Number,required:!0},remainOnFooter:{type:Boolean,default:!1}},setup(V){const z=V,j=vue.computed(()=>z.steps.length-1),y=vue.computed(()=>z.displayType==="number"),L=vue.computed(()=>z.steps[j.value][z.stepCountName]<=z.currentCount),$=vue.computed(()=>{const RU=_.cloneDeep(z.steps);return RU.pop(),RU}),UU=vue.computed(()=>L.value?z.steps[j.value]:z.steps.find((RU,dU,nU)=>z.currentCount>=RU[z.stepCountName]&&z.currentCount<nU[dU+1][z.stepCountName])),eU=(RU,dU)=>Number((100*(RU/dU)).toFixed(2)),VU=vue.computed(()=>{const RU={remain:null,progress:null};if(!L.value){const dU=z.steps.findIndex(nU=>nU[z.stepName]===UU.value[z.stepName]);return RU.remain=z.steps[dU+1][z.stepCountName]-z.currentCount,RU.progress=eU(z.currentCount-UU.value[z.stepCountName],z.steps[dU+1][z.stepCountName]-UU.value[z.stepCountName]),RU}return RU.remain=0,RU.progress=100,RU}),QU=RU=>RU>0&&RU<j.value,lU=(RU,dU)=>RU[z.stepName]===dU[z.stepName];return(RU,dU)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$i,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref($),(nU,NU)=>(vue.openBlock(),vue.createElementBlock("div",{class:"stepper-item",key:nU[V.stepName]},[vue.createElementVNode("div",_hoisted_2$h,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-title",{"stepper-title_centered":QU(NU),"stepper-title_checked":V.currentCount>=nU[V.stepCountName],"stepper-title_on-footer":V.remainOnFooter}])},vue.toDisplayString(nU[V.stepName]),3)]),V.currentCount>nU[V.stepCountName]&&!lU(nU,vue.unref(UU))?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$e,_hoisted_6$5)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$5,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-figure__circle",{"stepper-figure__circle_checked":lU(nU,vue.unref(UU))}])},null,2),vue.createElementVNode("div",_hoisted_8$4,[vue.createElementVNode("div",{class:"stepper-figure__progress-inner",style:vue.normalizeStyle(`width: ${lU(nU,vue.unref(UU))?vue.unref(VU).progress:0}%;`)},null,4)])])),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$3,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-text",{"stepper-title_centered":QU(NU)}])},[NU?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$3,vue.toDisplayString(nU[V.stepCountName]),1)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$3,[V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("span",_hoisted_12$3,"0")):(vue.openBlock(),vue.createElementBlock("span",_hoisted_13$2,[vue.unref(L)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_14$2,"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0434\u0430\u0442\u044C: ")),vue.createElementVNode("span",{class:vue.normalizeClass({"stepper-text__remain":!vue.unref(L)})},vue.toDisplayString(vue.unref(VU).remain),3)]))]))],2)])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-text",{"stepper-title_centered":QU(NU)}])},[NU?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16$2,vue.toDisplayString(nU[V.stepCountName].toLocaleString("ru-RU"))+" \u20BD ",1)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_17$2,[V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("span",_hoisted_18$2,"0 \u20BD")):(vue.openBlock(),vue.createElementBlock("span",_hoisted_19$2,[vue.unref(L)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_20$2,"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0434\u0430\u0442\u044C: ")),vue.createElementVNode("span",{class:vue.normalizeClass({"stepper-text__remain":!vue.unref(L)})},[vue.createTextVNode(vue.toDisplayString(Math.round(vue.unref(VU).remain).toLocaleString("ru-RU"))+" ",1),vue.unref(VU).remain?(vue.openBlock(),vue.createElementBlock("span",_hoisted_21$2,"\u20BD")):vue.createCommentVNode("",!0)],2)]))]))],2)]))]))),128)),vue.createElementVNode("div",_hoisted_22$2,[vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-title",{"stepper-title_checked":vue.unref(L),"stepper-title_on-footer":V.remainOnFooter}])},vue.toDisplayString(V.steps[vue.unref(j)][V.stepName]),3),vue.createElementVNode("div",{class:vue.normalizeClass(["stepper-figure__circle",{"stepper-figure__circle_checked":vue.unref(L)}])},null,2),vue.createElementVNode("div",_hoisted_23$2,[vue.createTextVNode(vue.toDisplayString(V.steps[vue.unref(j)][V.stepCountName].toLocaleString("ru-RU"))+" ",1),vue.unref(y)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("span",_hoisted_24$2,"\u20BD"))])])]),V.remainOnFooter?(vue.openBlock(),vue.createElementBlock("div",_hoisted_25$2,[vue.unref(y)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_26$2,[vue.createElementVNode("div",null,[_hoisted_27$1,vue.createElementVNode("span",_hoisted_28$1,vue.toDisplayString(vue.unref(VU).remain),1)]),vue.createElementVNode("div",null,[_hoisted_29$1,vue.createElementVNode("span",_hoisted_30$1,vue.toDisplayString(V.currentCount),1)])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_31,[vue.createElementVNode("div",null,[_hoisted_32,vue.createElementVNode("span",_hoisted_33,vue.toDisplayString(Math.round(vue.unref(VU).remain).toLocaleString("ru-RU"))+" \u20BD ",1)]),vue.createElementVNode("div",null,[_hoisted_34,vue.createElementVNode("span",_hoisted_35,vue.toDisplayString(Math.round(V.currentCount).toLocaleString("ru-RU"))+" \u20BD ",1)])]))])):vue.createCommentVNode("",!0)]))}}),PlStepperPlugin={install(V){V.component("PlStepper",_sfc_main$l)}};var plGroupTable_vue_vue_type_style_index_0_lang="";const _hoisted_1$h={key:0,class:"groupLabel__subLabelsList"},__default__={name:"PlGroupTable"},_sfc_main$k=Object.assign(__default__,{props:{showPopover:{type:Boolean,default:!1},additionalRowClassName:{type:Function,default:()=>" "},firstRowExpand:{type:Boolean,default:!0},tableSchema:{type:Object,required:!0},loadGroupsUrl:{type:String,required:!0},loadGroupsMethod:{type:String,default:"POST"},loadItemsUrl:{type:String,default:null},loadItemsMethod:{type:String,default:"POST"},headers:{type:Object,default:()=>({})},responseKeys:{type:String,default:"result"},filter:{type:Object,default:()=>({})},paging:{type:Object,default:()=>({page:1,pageSize:30}),validator:V=>_.isInteger(V.page)&&_.gt(V.page,0)&&_.isInteger(V.pageSize)&&_.gt(V.pageSize,0)},rowClass:{type:Function,default:()=>""},selectable:{type:Function,default:()=>!0}},emits:["page-loaded","item-selected-change","group-selected-change","selection-changed","all-unselected","all-selected","hoveredRow"],setup(V,{expose:z,emit:j}){const y=V,L=vue.ref(_.uniqueId()),$=vue.ref(!1),UU=vue.ref([]),eU=vue.ref(0),VU=vue.ref(!1),QU=vue.ref(!1);vue.ref(null);const lU=vue.ref([]),RU=vue.ref(!1);vue.ref(null);const dU=vue.ref(),nU=Object.freeze({NONE:"None",ALL:"All",ALL_BUT:"AllBut",ONLY:"Only"}),NU=Object.freeze({key:"$_plGroupTable_key",selected:"$_plGroupTable_selected",parent:"$_plGroupTable_parent",observer:"$_plGroupTable_observer",isFullyLoaded:"$_plGroupTable_isFullyLoaded",currentItemsPage:"$_plGroupTable_currentItemsPage"}),aU=vue.computed(()=>NU.key),WU=vue.computed(()=>!!(UU.value.length&&y.firstRowExpand)),ZU=vue.computed(()=>({children:EU.value,hasChildren:YU.value})),cU=vue.computed(()=>2),BU=vue.computed(()=>_.filter(y.tableSchema.cols,$U=>$U.selection)),oU=vue.computed(()=>_.reject(y.tableSchema.cols,$U=>$U.selection||$U.hidden)),sU=vue.computed(()=>_.get(y.tableSchema,"group.key","Id")),pU=vue.computed(()=>_.get(y.tableSchema,"group.label","label")),JU=vue.computed(()=>_.get(y.tableSchema,"group.subLabelsSlotName","subLabelsSlotName")),EU=vue.computed(()=>_.get(y.tableSchema,"group.items","items")),hU=vue.computed(()=>"type"),YU=vue.computed(()=>"isLazyLoadItems"),jU=vue.computed(()=>({groups:{url:y.loadGroupsUrl,method:y.loadGroupsMethod,headers:y.headers},groupItems:{url:y.loadItemsUrl,method:y.loadItemsMethod,headers:y.headers}})),CU=()=>{WU.value&&(RU.value=!0,fU(UU.value[0]).finally(()=>{RU.value=!1}))},zU=({row:$U,rowIndex:xe})=>[y.additionalRowClassName({row:$U,rowIndex:xe}),Ue({row:$U,rowIndex:xe})].join(" "),xU=()=>{j("hoveredRow",!1)},HU=$U=>{setTimeout(()=>{j("hoveredRow",$U[NU.key])},0)},wU=()=>{le(),NF(),qU()},fU=$U=>Promise.resolve($U).then(xe=>eF(xe,{},()=>{dU.value.toggleRowExpansion(_.set(xe,YU.value,!1),!0)})),XU=()=>{let $U=nU.NONE;return QU.value?VU.value?$U=nU.ALL:$U=nU.ALL_BUT:rF(UU.value)&&($U=nU.ONLY),{type:$U,groupsSelectionState:Ne($U)}};z({read:wU});const DU=({row:$U,column:xe,rowIndex:lF,columnIndex:nF})=>{if(Ce($U)){if(nF==0&&!_.get(y.tableSchema.cols[0],"selection",!1))return[1,oU.value.length+cU.value];if(nF==1&&_.get(y.tableSchema.cols[0],"selection",!1))return[1,oU.value.length+cU.value];if(nF>1)return[0,0]}},KU=()=>"pl-group-table-header",Ue=({row:$U,rowIndex:xe})=>{if(Ce($U))return"pl-group-table-row "+Tl($U);let lF=y.rowClass(MV($U),xe),nF=_.get($U,NU.parent);return mU(nF)||!Ve(nF,$U)?lF+" pl-group-table-row-leaf":(TU(nF)&&vue.nextTick(()=>{hQ(nF)}),lF+" pl-group-table-row-leaf "+Tl(nF)+" loading-trigger")},yU=({row:$U,column:xe,rowIndex:lF,columnIndex:nF})=>{const vF=_.get($U,EU.value);if(!(nF!==0||_.size(vF)==0)&&!UF(vF))return" is-indeterminate"},AU=($U,xe)=>Ce($U)?!0:y.selectable(MV($U),xe),oe=($U,xe)=>{const lF=_.find($U,xe)!=null;if(Ie(xe,lF),Ce(xe))re(xe),fV(xe,lF);else{let nF=_.get(xe,NU.parent),vF=_.get(nF,EU.value);re(nF),DQ(xe,lF),$e(vF)?iF(nF)&&(pe(nF,!0),re(nF),fV(xe,!0)):WF(nF)&&(pe(nF,!1),re(nF),fV(xe,!1))}VU.value=_.every(UU.value,QF.value),VU.value&&j("all-selected"),de()},de=()=>{UU.value.forEach($U=>{$U[EU.value].forEach(xe=>{vue.nextTick(()=>{dU.value.toggleRowSelection(xe,xe[NU.selected])})})})},_e=$U=>{QU.value=VU.value=!VU.value,_.forEach(UU.value,xe=>{Ie(xe,VU.value),re(xe)}),VU.value?j("all-selected"):j("all-unselected"),de()},he=()=>{j("selection-changed",XU())},pe=($U,xe)=>{_.set($U,NU.selected,xe),vue.nextTick(()=>{dU.value.toggleRowSelection($U,xe)})},Ie=($U,xe)=>{pe($U,xe),_.forEach(_.get($U,EU.value),lF=>{pe(lF,xe),vue.nextTick(()=>{de()})})},qe=($U,xe)=>_.forEach($U,lF=>{pe(lF,xe)}),Ce=$U=>_.get($U,EU.value)!=null,$e=$U=>_.every($U,WF),dF=$U=>_.every($U,iF),UF=$U=>$e($U)||dF($U),kF=$U=>!UF($U),WF=$U=>_.get($U,NU.selected,!1),QF=$U=>WF($U)&&$e(_.get($U,EU.value)),iF=$U=>!WF($U),rF=$U=>_.some($U,xe=>{if(WF(xe))return!0;if(Ce(xe)){const lF=_.get(xe,EU.value);if(_.size(lF)!==0)return _.some(lF,WF.value)}}),Ve=($U,xe)=>_.last(_.get($U,EU.value))===xe,mU=$U=>_.get($U,NU.isFullyLoaded,!1),TU=$U=>_.get($U,NU.observer,null)==null,SU=$U=>_.get($U,hU.value,nU.NONE)!==nU.NONE,bU=$U=>_.get($U,hU.value)!==nU.ALL,LU=$U=>{const xe=_.get($U,hU.value);return xe===nU.ALL||xe===nU.ALL_BUT},Ne=$U=>{let xe;switch($U){case nU.ALL_BUT:xe=_.chain(UU.value).filter(Ce).filter(bU).map(lF=>({type:_.get(lF,hU.value),group:MV(lF),items:ae(lF)})).value();break;case nU.ONLY:xe=_.chain(UU.value).filter(Ce).filter(SU).map(lF=>({type:_.get(lF,hU.value),group:MV(lF),items:ae(lF)})).value();break;default:xe=[];break}return xe},ae=$U=>{let xe,lF=_.get($U,EU.value);switch(_.get($U,hU.value)){case nU.ALL_BUT:xe=_.chain(lF).filter(iF.value).value();break;case nU.ONLY:xe=_.chain(lF).filter(WF.value).value();break;default:xe=[];break}return _.map(xe,MV.value)},IU=$U=>_.get($U,pU.value,null),PU=$U=>_.get($U,sU.value,null),re=$U=>{let xe;const lF=_.get($U,EU.value),nF=_.get($U,hU.value);if(WF($U))xe=nU.ALL;else if(_.size(lF)===0||dF(lF))xe=nU.NONE;else if(kF(lF))switch(nF){case nU.ALL:case nU.ALL_BUT:xe=nU.ALL_BUT;break;default:xe=nU.ONLY;break}_.set($U,hU.value,xe)},eF=($U,xe,lF)=>axios(uQ($U)).then(nF=>{const vF=_.get(nF.data,y.responseKeys,nF.data),DF=_.get($U,EU.value);return wF(vF,$U),DF.push(...vF),qe(vF,LU($U)),pQ($U),_.size(vF)<y.paging.pageSize&&_.set($U,NU.isFullyLoaded,!0),lF(DF),DF}).catch(nF=>{console.log(nF)}),MU=$U=>{eF($U,{},()=>{vue.nextTick(()=>{dU.value.toggleRowExpansion(_.set($U,YU.value,!1),!0),de()})})},GU=()=>{if(lU.value.length){RU.value=!0;const $U=sU.value,xe=UU.value.reduce((lF,nF)=>(lU.value.some(DF=>DF[$U]===nF[$U])&&lF.push(fU(nF)),lF),[]);return Promise.all(xe).finally(()=>{RU.value=!1}),!0}},qU=$U=>{const xe=UU.value;axios(mQ()).then(lF=>{if(xe!==UU.value)return;const nF=_.get(lF.data,y.responseKeys,lF.data);_.isArray(nF)&&_.size(nF)!==0&&(GF(nF),UU.value.push(...nF),_.forEach(nF,vF=>{pe(vF,QU.value)})),cl(),y.paging.page+=1}).then(()=>{Promise.resolve(GU()).then(lF=>{lF||CU()})}).catch(lF=>{console.log(lF),$U.error()})},le=()=>{UU.value=[],y.paging.page=1,eU.value=+new Date,VU.value=!1,QU.value=!1,dU.value.clearSelection()},NF=$U=>{$.value=!0},pF=$U=>{_.forEach($U,xe=>{const lF=_.get(xe,EU.value);_.set(xe,NU.key,_.uniqueId()),_.size(lF)!==0&&wF(lF,xe)})},CF=$U=>{_.forEach($U,xe=>{_.defaults(xe,_.set({},EU.value,[]))})},yF=$U=>{const xe=y.loadItemsUrl!=null;_.forEach($U,lF=>{_.set(lF,YU.value,xe)})},BF=$U=>{_.forEach($U,xe=>{_.set(xe,NU.currentItemsPage,1)})},GF=$U=>{pF($U),yF($U),CF($U),BF($U)},wF=($U,xe)=>{pF($U),oV($U,xe)},oV=($U,xe)=>{_.forEach($U,lF=>{_.set(lF,NU.parent,xe)})},pQ=$U=>{const xe=_.get($U,NU.currentItemsPage)+1;_.set($U,NU.currentItemsPage,xe)},iQ=($U,xe,lF)=>{_.head($U).isIntersecting&&vue.nextTick(()=>{const nF=_.get(xe,NU.observer,null);nF&&(nF.disconnect(),nF.unobserve(lF),vue.nextTick(()=>{eF(xe,{},()=>{_.set(xe,NU.observer,null),vue.nextTick(()=>{de()})})}))})},hQ=$U=>{const xe={root:document.querySelector(".pl-group-table"+Gl()),rootMargin:"0px",threshold:.1},lF=document.querySelector(Gl()+" .pl-group-table-row-leaf"+("."+Tl($U))+".loading-trigger"),nF=new IntersectionObserver(vF=>{iQ(vF,$U,lF)},xe);_.set($U,NU.observer,nF),nF.observe(lF)},MV=$U=>_.get($U,EU.value)!=null?_.omit($U,_.flatten([_.values(NU),EU.value,YU.value,hU.value])):_.pick($U,_.map(y.tableSchema.cols,"property")),zl=($U,xe,lF,nF)=>xe==="POST"?{url:$U,method:xe,headers:lF,data:nF}:{url:$U,method:xe,headers:lF,params:nF},mQ=()=>{const $U=_.merge({},y.paging,{filter:y.filter,groupKeyProp:sU.value});return zl(jU.value.groups.url,jU.value.groups.method,jU.value.groups.headers,$U)},uQ=$U=>{const xe=_.set({},_.camelCase(sU.value),_.get($U,sU.value));return _.merge(xe,{filter:y.filter},{page:_.get($U,NU.currentItemsPage),pageSize:y.paging.pageSize}),zl(jU.value.groupItems.url,jU.value.groupItems.method,jU.value.groupItems.headers,xe)},fV=($U,xe)=>{j("group-selected-change",MV($U),xe)},DQ=($U,xe)=>{j("item-selected-change",MV($U),xe)},cl=()=>{j("page-loaded",y.paging.page)},Tl=$U=>"plgt-group-key-"+bQ(_.get($U,sU.value)+"",!0),Gl=()=>"."+vl.value,vl=vue.computed(()=>"plgt-key-"+L.value),bQ=function(xe,lF,nF){var vF,DF,AF=nF===void 0?2166136261:nF;for(vF=0,DF=xe.length;vF<DF;vF++)AF^=xe.charCodeAt(vF),AF+=(AF<<1)+(AF<<4)+(AF<<7)+(AF<<8)+(AF<<24);return lF?("0000000"+(AF>>>0).toString(16)).substr(-8):AF>>>0};return($U,xe)=>{const lF=ElTableColumn,nF=ElTable,vF=vLoading;return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["pl-group-table",vue.unref(vl)])},[vue.withDirectives((vue.openBlock(),vue.createBlock(nF,vue.mergeProps({onCellMouseEnter:HU,onCellMouseLeave:xU,ref_key:"groupTable",ref:dU,"row-key":vue.unref(aU),data:UU.value,"span-method":DU,"header-row-class-name":KU,"row-class-name":zU,"cell-class-name":yU,onSelect:oe,onSelectAll:_e,onSelectionChange:he,lazy:"",load:MU},$U.$attrs,{"tree-props":vue.unref(ZU)}),{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(BU),(DF,AF)=>vue.withDirectives((vue.openBlock(),vue.createBlock(lF,{type:"selection",key:"spec-"+AF,width:DF.width,selectable:AU},null,8,["width"])),[[vue.vShow,DF.selection]])),128)),(vue.openBlock(),vue.createBlock(lF,{key:"grp-"+$U.key,width:"1","class-name":"groupLabel"},{default:vue.withCtx(({row:DF})=>[vue.renderSlot($U.$slots,[vue.unref(pU),PU(DF)].join("-"),{},()=>[vue.createElementVNode("p",null,vue.toDisplayString(IU(DF)),1)]),DF[vue.unref(EU)]?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$h,[vue.renderSlot($U.$slots,[vue.unref(JU),PU(DF)].join("-"))])):vue.createCommentVNode("",!0)]),_:3})),(vue.openBlock(),vue.createBlock(lF,{key:"grp-1",width:"5"},{default:vue.withCtx(({row:DF})=>[vue.renderSlot($U.$slots,"popover",{row:DF})]),_:3})),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(oU),(DF,AF)=>(vue.openBlock(),vue.createBlock(lF,{key:"reg-"+AF,prop:DF.property,label:DF.label,width:DF.width,"min-width":DF.minWidth,"show-overflow-tooltip":DF.showOverflowTooltip},{default:vue.withCtx(({row:xl})=>[vue.renderSlot($U.$slots,DF.slot,{row:xl},()=>[vue.createTextVNode(vue.toDisplayString(xl[DF.property]),1)])]),_:2},1032,["prop","label","width","min-width","show-overflow-tooltip"]))),128))]),_:3},16,["row-key","data","tree-props"])),[[vF,RU.value]])],2)}}}),PlGroupTablePlugin={install(V){V.component("PlGroupTable",_sfc_main$k)}};var _imports_0$9="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS40Njg3IDkuNDY5NjdDMTEuNzYxNiA5LjE3Njc4IDEyLjIzNjQgOS4xNzY3OCAxMi41MjkzIDkuNDY5NjdMMTYuNTI5MyAxMy40Njk3QzE2LjgyMjIgMTMuNzYyNiAxNi44MjIyIDE0LjIzNzQgMTYuNTI5MyAxNC41MzAzQzE2LjIzNjQgMTQuODIzMiAxNS43NjE2IDE0LjgyMzIgMTUuNDY4NyAxNC41MzAzTDExLjk5OSAxMS4wNjA3TDguNTI5MzIgMTQuNTMwM0M4LjIzNjQzIDE0LjgyMzIgNy43NjE1NiAxNC44MjMyIDcuNDY4NjYgMTQuNTMwM0M3LjE3NTc3IDE0LjIzNzQgNy4xNzU3NyAxMy43NjI2IDcuNDY4NjYgMTMuNDY5N0wxMS40Njg3IDkuNDY5NjdaIiBmaWxsPSIjNjU2NTY3Ii8+Cjwvc3ZnPgo=",plSelect_vue_vue_type_style_index_0_lang="";const _hoisted_1$g={id:"form-select"},_hoisted_2$g={class:"flex item-select"},_hoisted_3$d={key:0,src:_imports_1$7},_sfc_main$j={__name:"pl-select",props:{placeholder:{type:String,default:""},rules:{type:Object,default:function(){return{}}},prop:{type:String,default:"name"},isError:{type:Boolean,default:!1},label:{type:String,default:""},modelValue:{type:String,required:!0},options:{type:Object,required:!0},getValid:{type:Boolean,default:!1},checked:{type:Boolean,default:!0}},emits:["update:modelValue","validate"],setup(V,{emit:z}){const j=V,y=vue.ref(!1),L=vue.ref();let{modelValue:$,getValid:UU}=vue.toRefs(j);const eU=vue.computed({get:()=>j.modelValue,set:RU=>{y.value=!1,z("update:modelValue",RU)}}),VU=vue.ref({[j.prop]:$}),QU=(RU,dU,nU)=>{z("validate",RU,dU,nU)},lU=async()=>{y.value=!1,setTimeout(()=>{L.value.validate()},200)};return vue.watch(UU,()=>{lU()}),(RU,dU)=>{const nU=ElOption,NU=ElSelect,aU=ElFormItem,WU=ElForm;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.createVNode(WU,{onValidate:QU,"label-position":"top",model:VU.value,ref_key:"formSelect",ref:L,rules:V.rules},{default:vue.withCtx(()=>[vue.createVNode(aU,{label:V.label,prop:V.prop,class:vue.normalizeClass({"is-error":V.isError}),"show-message":!0},{default:vue.withCtx(()=>[vue.createElementVNode("img",{class:vue.normalizeClass(["form-select__arrow",{rotate:y.value}]),src:_imports_0$9,alt:"arrow"},null,2),vue.createVNode(NU,{"popper-class":V.checked&&"selectBox",modelValue:vue.unref(eU),"onUpdate:modelValue":dU[0]||(dU[0]=ZU=>vue.isRef(eU)?eU.value=ZU:null),placeholder:V.placeholder,"fit-input-width":!0,onFocus:dU[1]||(dU[1]=ZU=>y.value=!0),onBlur:lU},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(V.options,ZU=>(vue.openBlock(),vue.createBlock(nU,{class:"pl-form-option",key:ZU.value,label:ZU.label,value:ZU.value},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$g,[vue.createTextVNode(vue.toDisplayString(ZU.label)+" ",1),ZU.value===vue.unref(eU)?(vue.openBlock(),vue.createElementBlock("img",_hoisted_3$d)):vue.createCommentVNode("",!0)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["popper-class","modelValue","placeholder"])]),_:1},8,["label","prop","class"])]),_:1},8,["model","rules"])])}}},PlSelectPlugin={install(V){V.component("PlSelect",_sfc_main$j)}},PlDatePickerPlusPlugin={install(V){V.component("PlDatePickerPlus",_sfc_main$u)}};var _imports_0$8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiNCNUI1QjUiLz4KPC9zdmc+Cg==",plCard_vue_vue_type_style_index_0_lang="";const _hoisted_1$f={key:0,class:"pl-card__img-container"},_hoisted_2$f=vue.createElementVNode("img",{class:"pl-card__img",src:_imports_0$8,alt:"icon"},null,-1),_hoisted_3$c=[_hoisted_2$f],_hoisted_4$8={key:0,class:"pl-card__img-container pl-card__img-container_imaged"},_sfc_main$i={__name:"pl-card",props:{type:{type:String,default:"large"},imaged:{type:Boolean,default:!1},title:{type:String,required:!0,default:"title"},subtitle:{type:String,default:"subtitle"},img:{type:String},disable:{type:Boolean,default:!1}},setup(V){const z=V,j=vue.computed(()=>z.type==="large"||z.type==="medium"),y=vue.computed(()=>z.type==="large"||z.type==="small");return(L,$)=>V.imaged?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["pl-card pl-card_imaged",{"pl-card_disabled":V.disable}])},[vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$8)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:vue.normalizeClass(["text-container",{"text-container__small":V.type==="small"}])},[vue.createElementVNode("span",{class:vue.normalizeClass(["pl-card__title",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.title),3),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["pl-card__subtitle",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.subtitle),3)):vue.createCommentVNode("",!0)],2)],2)):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["pl-card",{"pl-card_disabled":V.disable}])},[vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$f,_hoisted_3$c)):vue.createCommentVNode("",!0),vue.createElementVNode("span",{class:vue.normalizeClass(["pl-card__title",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.title),3),vue.unref(y)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(["pl-card__subtitle",{"pl-card_disabled":V.disable}])},vue.toDisplayString(V.subtitle),3)):vue.createCommentVNode("",!0)],2))}},PlCardPlugin={install(V){V.component("PlCard",_sfc_main$i)}};var plCheckbox_vue_vue_type_style_index_0_lang="";const _hoisted_1$e={id:"plCheckbox"},_hoisted_2$e=["id","name"],_hoisted_3$b=["for"],_sfc_main$h={__name:"pl-checkbox",props:{label:{required:!0,type:String},modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(V,{emit:z}){const j=V,{modelValue:y}=vue.toRefs(j),L=vue.computed({get(){return y},set($){z("update:modelValue",$)}});return($,UU)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":UU[0]||(UU[0]=eU=>vue.isRef(L)?L.value=eU:null),type:"checkbox",class:"custom-checkbox",id:j.label,name:j.label},null,8,_hoisted_2$e),[[vue.vModelCheckbox,vue.unref(L)]]),vue.createElementVNode("label",{for:j.label},vue.toDisplayString(j.label),9,_hoisted_3$b)]))}},PlCheckboxPlugin={install(V){V.component("PlCheckbox",_sfc_main$h)}};class HttpError extends Error{constructor(z,j){const y=new.target.prototype;super(`${z}: Status code '${j}'`),this.statusCode=j,this.__proto__=y}}class TimeoutError extends Error{constructor(z="A timeout occurred."){const j=new.target.prototype;super(z),this.__proto__=j}}class AbortError extends Error{constructor(z="An abort occurred."){const j=new.target.prototype;super(z),this.__proto__=j}}class UnsupportedTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="UnsupportedTransportError",this.__proto__=y}}class DisabledTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="DisabledTransportError",this.__proto__=y}}class FailedToStartTransportError extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.transport=j,this.errorType="FailedToStartTransportError",this.__proto__=y}}class FailedToNegotiateWithServerError extends Error{constructor(z){const j=new.target.prototype;super(z),this.errorType="FailedToNegotiateWithServerError",this.__proto__=j}}class AggregateErrors extends Error{constructor(z,j){const y=new.target.prototype;super(z),this.innerErrors=j,this.__proto__=y}}class HttpResponse{constructor(z,j,y){this.statusCode=z,this.statusText=j,this.content=y}}class HttpClient{get(z,j){return this.send({...j,method:"GET",url:z})}post(z,j){return this.send({...j,method:"POST",url:z})}delete(z,j){return this.send({...j,method:"DELETE",url:z})}getCookieString(z){return""}}var LogLevel;(function(V){V[V.Trace=0]="Trace",V[V.Debug=1]="Debug",V[V.Information=2]="Information",V[V.Warning=3]="Warning",V[V.Error=4]="Error",V[V.Critical=5]="Critical",V[V.None=6]="None"})(LogLevel||(LogLevel={}));class NullLogger{constructor(){}log(z,j){}}NullLogger.instance=new NullLogger;const VERSION="7.0.0";class Arg{static isRequired(z,j){if(z==null)throw new Error(`The '${j}' argument is required.`)}static isNotEmpty(z,j){if(!z||z.match(/^\s*$/))throw new Error(`The '${j}' argument should not be empty.`)}static isIn(z,j,y){if(!(z in j))throw new Error(`Unknown ${y} value: ${z}.`)}}class Platform{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document=="undefined"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function getDataDetail(V,z){let j="";return isArrayBuffer(V)?(j=`Binary data of length ${V.byteLength}`,z&&(j+=`. Content: '${formatArrayBuffer(V)}'`)):typeof V=="string"&&(j=`String data of length ${V.length}`,z&&(j+=`. Content: '${V}'`)),j}function formatArrayBuffer(V){const z=new Uint8Array(V);let j="";return z.forEach(y=>{j+=`0x${y<16?"0":""}${y.toString(16)} `}),j.substr(0,j.length-1)}function isArrayBuffer(V){return V&&typeof ArrayBuffer!="undefined"&&(V instanceof ArrayBuffer||V.constructor&&V.constructor.name==="ArrayBuffer")}async function sendMessage(V,z,j,y,L,$){const UU={},[eU,VU]=getUserAgentHeader();UU[eU]=VU,V.log(LogLevel.Trace,`(${z} transport) sending data. ${getDataDetail(L,$.logMessageContent)}.`);const QU=isArrayBuffer(L)?"arraybuffer":"text",lU=await j.post(y,{content:L,headers:{...UU,...$.headers},responseType:QU,timeout:$.timeout,withCredentials:$.withCredentials});V.log(LogLevel.Trace,`(${z} transport) request complete. Response status: ${lU.statusCode}.`)}function createLogger(V){return V===void 0?new ConsoleLogger(LogLevel.Information):V===null?NullLogger.instance:V.log!==void 0?V:new ConsoleLogger(V)}class SubjectSubscription{constructor(z,j){this._subject=z,this._observer=j}dispose(){const z=this._subject.observers.indexOf(this._observer);z>-1&&this._subject.observers.splice(z,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(j=>{})}}class ConsoleLogger{constructor(z){this._minLevel=z,this.out=console}log(z,j){if(z>=this._minLevel){const y=`[${new Date().toISOString()}] ${LogLevel[z]}: ${j}`;switch(z){case LogLevel.Critical:case LogLevel.Error:this.out.error(y);break;case LogLevel.Warning:this.out.warn(y);break;case LogLevel.Information:this.out.info(y);break;default:this.out.log(y);break}}}}function getUserAgentHeader(){let V="X-SignalR-User-Agent";return Platform.isNode&&(V="User-Agent"),[V,constructUserAgent(VERSION,getOsName(),getRuntime(),getRuntimeVersion())]}function constructUserAgent(V,z,j,y){let L="Microsoft SignalR/";const $=V.split(".");return L+=`${$[0]}.${$[1]}`,L+=` (${V}; `,z&&z!==""?L+=`${z}; `:L+="Unknown OS; ",L+=`${j}`,y?L+=`; ${y}`:L+="; Unknown Runtime Version",L+=")",L}function getOsName(){if(Platform.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function getRuntimeVersion(){if(Platform.isNode)return process.versions.node}function getRuntime(){return Platform.isNode?"NodeJS":"Browser"}function getErrorString(V){return V.stack?V.stack:V.message?V.message:`${V}`}function getGlobalThis(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("could not find global")}class FetchHttpClient extends HttpClient{constructor(z){if(super(),this._logger=z,typeof fetch=="undefined"){const j=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(j("tough-cookie")).CookieJar,this._fetchType=j("node-fetch"),this._fetchType=j("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(getGlobalThis());if(typeof AbortController=="undefined"){const j=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=j("abort-controller")}else this._abortControllerType=AbortController}async send(z){if(z.abortSignal&&z.abortSignal.aborted)throw new AbortError;if(!z.method)throw new Error("No method defined.");if(!z.url)throw new Error("No url defined.");const j=new this._abortControllerType;let y;z.abortSignal&&(z.abortSignal.onabort=()=>{j.abort(),y=new AbortError});let L=null;if(z.timeout){const VU=z.timeout;L=setTimeout(()=>{j.abort(),this._logger.log(LogLevel.Warning,"Timeout from HTTP request."),y=new TimeoutError},VU)}z.content===""&&(z.content=void 0),z.content&&(z.headers=z.headers||{},isArrayBuffer(z.content)?z.headers["Content-Type"]="application/octet-stream":z.headers["Content-Type"]="text/plain;charset=UTF-8");let $;try{$=await this._fetchType(z.url,{body:z.content,cache:"no-cache",credentials:z.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...z.headers},method:z.method,mode:"cors",redirect:"follow",signal:j.signal})}catch(VU){throw y||(this._logger.log(LogLevel.Warning,`Error from HTTP request. ${VU}.`),VU)}finally{L&&clearTimeout(L),z.abortSignal&&(z.abortSignal.onabort=null)}if(!$.ok){const VU=await deserializeContent($,"text");throw new HttpError(VU||$.statusText,$.status)}const eU=await deserializeContent($,z.responseType);return new HttpResponse($.status,$.statusText,eU)}getCookieString(z){let j="";return Platform.isNode&&this._jar&&this._jar.getCookies(z,(y,L)=>j=L.join("; ")),j}}function deserializeContent(V,z){let j;switch(z){case"arraybuffer":j=V.arrayBuffer();break;case"text":j=V.text();break;case"blob":case"document":case"json":throw new Error(`${z} is not supported.`);default:j=V.text();break}return j}class XhrHttpClient extends HttpClient{constructor(z){super(),this._logger=z}send(z){return z.abortSignal&&z.abortSignal.aborted?Promise.reject(new AbortError):z.method?z.url?new Promise((j,y)=>{const L=new XMLHttpRequest;L.open(z.method,z.url,!0),L.withCredentials=z.withCredentials===void 0?!0:z.withCredentials,L.setRequestHeader("X-Requested-With","XMLHttpRequest"),z.content===""&&(z.content=void 0),z.content&&(isArrayBuffer(z.content)?L.setRequestHeader("Content-Type","application/octet-stream"):L.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const $=z.headers;$&&Object.keys($).forEach(UU=>{L.setRequestHeader(UU,$[UU])}),z.responseType&&(L.responseType=z.responseType),z.abortSignal&&(z.abortSignal.onabort=()=>{L.abort(),y(new AbortError)}),z.timeout&&(L.timeout=z.timeout),L.onload=()=>{z.abortSignal&&(z.abortSignal.onabort=null),L.status>=200&&L.status<300?j(new HttpResponse(L.status,L.statusText,L.response||L.responseText)):y(new HttpError(L.response||L.responseText||L.statusText,L.status))},L.onerror=()=>{this._logger.log(LogLevel.Warning,`Error from HTTP request. ${L.status}: ${L.statusText}.`),y(new HttpError(L.statusText,L.status))},L.ontimeout=()=>{this._logger.log(LogLevel.Warning,"Timeout from HTTP request."),y(new TimeoutError)},L.send(z.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class DefaultHttpClient extends HttpClient{constructor(z){if(super(),typeof fetch!="undefined"||Platform.isNode)this._httpClient=new FetchHttpClient(z);else if(typeof XMLHttpRequest!="undefined")this._httpClient=new XhrHttpClient(z);else throw new Error("No usable HttpClient found.")}send(z){return z.abortSignal&&z.abortSignal.aborted?Promise.reject(new AbortError):z.method?z.url?this._httpClient.send(z):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(z){return this._httpClient.getCookieString(z)}}class TextMessageFormat{static write(z){return`${z}${TextMessageFormat.RecordSeparator}`}static parse(z){if(z[z.length-1]!==TextMessageFormat.RecordSeparator)throw new Error("Message is incomplete.");const j=z.split(TextMessageFormat.RecordSeparator);return j.pop(),j}}TextMessageFormat.RecordSeparatorCode=30,TextMessageFormat.RecordSeparator=String.fromCharCode(TextMessageFormat.RecordSeparatorCode);class HandshakeProtocol{writeHandshakeRequest(z){return TextMessageFormat.write(JSON.stringify(z))}parseHandshakeResponse(z){let j,y;if(isArrayBuffer(z)){const eU=new Uint8Array(z),VU=eU.indexOf(TextMessageFormat.RecordSeparatorCode);if(VU===-1)throw new Error("Message is incomplete.");const QU=VU+1;j=String.fromCharCode.apply(null,Array.prototype.slice.call(eU.slice(0,QU))),y=eU.byteLength>QU?eU.slice(QU).buffer:null}else{const eU=z,VU=eU.indexOf(TextMessageFormat.RecordSeparator);if(VU===-1)throw new Error("Message is incomplete.");const QU=VU+1;j=eU.substring(0,QU),y=eU.length>QU?eU.substring(QU):null}const L=TextMessageFormat.parse(j),$=JSON.parse(L[0]);if($.type)throw new Error("Expected a handshake response from the server.");return[y,$]}}var MessageType;(function(V){V[V.Invocation=1]="Invocation",V[V.StreamItem=2]="StreamItem",V[V.Completion=3]="Completion",V[V.StreamInvocation=4]="StreamInvocation",V[V.CancelInvocation=5]="CancelInvocation",V[V.Ping=6]="Ping",V[V.Close=7]="Close"})(MessageType||(MessageType={}));class Subject{constructor(){this.observers=[]}next(z){for(const j of this.observers)j.next(z)}error(z){for(const j of this.observers)j.error&&j.error(z)}complete(){for(const z of this.observers)z.complete&&z.complete()}subscribe(z){return this.observers.push(z),new SubjectSubscription(this,z)}}const DEFAULT_TIMEOUT_IN_MS=30*1e3,DEFAULT_PING_INTERVAL_IN_MS=15*1e3;var HubConnectionState;(function(V){V.Disconnected="Disconnected",V.Connecting="Connecting",V.Connected="Connected",V.Disconnecting="Disconnecting",V.Reconnecting="Reconnecting"})(HubConnectionState||(HubConnectionState={}));class HubConnection{constructor(z,j,y,L){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(LogLevel.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Arg.isRequired(z,"connection"),Arg.isRequired(j,"logger"),Arg.isRequired(y,"protocol"),this.serverTimeoutInMilliseconds=DEFAULT_TIMEOUT_IN_MS,this.keepAliveIntervalInMilliseconds=DEFAULT_PING_INTERVAL_IN_MS,this._logger=j,this._protocol=y,this.connection=z,this._reconnectPolicy=L,this._handshakeProtocol=new HandshakeProtocol,this.connection.onreceive=$=>this._processIncomingData($),this.connection.onclose=$=>this._connectionClosed($),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=HubConnectionState.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:MessageType.Ping})}static create(z,j,y,L){return new HubConnection(z,j,y,L)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(z){if(this._connectionState!==HubConnectionState.Disconnected&&this._connectionState!==HubConnectionState.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!z)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=z}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==HubConnectionState.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=HubConnectionState.Connecting,this._logger.log(LogLevel.Debug,"Starting HubConnection.");try{await this._startInternal(),Platform.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=HubConnectionState.Connected,this._connectionStarted=!0,this._logger.log(LogLevel.Debug,"HubConnection connected successfully.")}catch(z){return this._connectionState=HubConnectionState.Disconnected,this._logger.log(LogLevel.Debug,`HubConnection failed to start successfully because of error '${z}'.`),Promise.reject(z)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const z=new Promise((j,y)=>{this._handshakeResolver=j,this._handshakeRejecter=y});await this.connection.start(this._protocol.transferFormat);try{const j={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(LogLevel.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(j)),this._logger.log(LogLevel.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await z,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(j){throw this._logger.log(LogLevel.Debug,`Hub handshake failed with error '${j}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(j),j}}async stop(){const z=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await z}catch{}}_stopInternal(z){return this._connectionState===HubConnectionState.Disconnected?(this._logger.log(LogLevel.Debug,`Call to HubConnection.stop(${z}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===HubConnectionState.Disconnecting?(this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=HubConnectionState.Disconnecting,this._logger.log(LogLevel.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(LogLevel.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=z||new AbortError("The connection was stopped before the hub handshake could complete."),this.connection.stop(z)))}stream(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._createStreamInvocation(z,j,L);let UU;const eU=new Subject;return eU.cancelCallback=()=>{const VU=this._createCancelInvocation($.invocationId);return delete this._callbacks[$.invocationId],UU.then(()=>this._sendWithProtocol(VU))},this._callbacks[$.invocationId]=(VU,QU)=>{if(QU){eU.error(QU);return}else VU&&(VU.type===MessageType.Completion?VU.error?eU.error(new Error(VU.error)):eU.complete():eU.next(VU.item))},UU=this._sendWithProtocol($).catch(VU=>{eU.error(VU),delete this._callbacks[$.invocationId]}),this._launchStreams(y,UU),eU}_sendMessage(z){return this._resetKeepAliveInterval(),this.connection.send(z)}_sendWithProtocol(z){return this._sendMessage(this._protocol.writeMessage(z))}send(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._sendWithProtocol(this._createInvocation(z,j,!0,L));return this._launchStreams(y,$),$}invoke(z,...j){const[y,L]=this._replaceStreamingParams(j),$=this._createInvocation(z,j,!1,L);return new Promise((eU,VU)=>{this._callbacks[$.invocationId]=(lU,RU)=>{if(RU){VU(RU);return}else lU&&(lU.type===MessageType.Completion?lU.error?VU(new Error(lU.error)):eU(lU.result):VU(new Error(`Unexpected message type: ${lU.type}`)))};const QU=this._sendWithProtocol($).catch(lU=>{VU(lU),delete this._callbacks[$.invocationId]});this._launchStreams(y,QU)})}on(z,j){!z||!j||(z=z.toLowerCase(),this._methods[z]||(this._methods[z]=[]),this._methods[z].indexOf(j)===-1&&this._methods[z].push(j))}off(z,j){if(!z)return;z=z.toLowerCase();const y=this._methods[z];if(!!y)if(j){const L=y.indexOf(j);L!==-1&&(y.splice(L,1),y.length===0&&delete this._methods[z])}else delete this._methods[z]}onclose(z){z&&this._closedCallbacks.push(z)}onreconnecting(z){z&&this._reconnectingCallbacks.push(z)}onreconnected(z){z&&this._reconnectedCallbacks.push(z)}_processIncomingData(z){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(z=this._processHandshakeResponse(z),this._receivedHandshakeResponse=!0),z){const j=this._protocol.parseMessages(z,this._logger);for(const y of j)switch(y.type){case MessageType.Invocation:this._invokeClientMethod(y);break;case MessageType.StreamItem:case MessageType.Completion:{const L=this._callbacks[y.invocationId];if(L){y.type===MessageType.Completion&&delete this._callbacks[y.invocationId];try{L(y)}catch($){this._logger.log(LogLevel.Error,`Stream callback threw error: ${getErrorString($)}`)}}break}case MessageType.Ping:break;case MessageType.Close:{this._logger.log(LogLevel.Information,"Close message received from server.");const L=y.error?new Error("Server returned an error on close: "+y.error):void 0;y.allowReconnect===!0?this.connection.stop(L):this._stopPromise=this._stopInternal(L);break}default:this._logger.log(LogLevel.Warning,`Invalid message type: ${y.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(z){let j,y;try{[y,j]=this._handshakeProtocol.parseHandshakeResponse(z)}catch(L){const $="Error parsing handshake response: "+L;this._logger.log(LogLevel.Error,$);const UU=new Error($);throw this._handshakeRejecter(UU),UU}if(j.error){const L="Server returned handshake error: "+j.error;this._logger.log(LogLevel.Error,L);const $=new Error(L);throw this._handshakeRejecter($),$}else this._logger.log(LogLevel.Debug,"Server handshake complete.");return this._handshakeResolver(),y}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let z=this._nextKeepAlive-new Date().getTime();z<0&&(z=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===HubConnectionState.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},z)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(z){const j=z.target.toLowerCase(),y=this._methods[j];if(!y){this._logger.log(LogLevel.Warning,`No client method with the name '${j}' found.`),z.invocationId&&(this._logger.log(LogLevel.Warning,`No result given for '${j}' method and invocation ID '${z.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(z.invocationId,"Client didn't provide a result.",null)));return}const L=y.slice(),$=!!z.invocationId;let UU,eU,VU;for(const QU of L)try{const lU=UU;UU=await QU.apply(this,z.arguments),$&&UU&&lU&&(this._logger.log(LogLevel.Error,`Multiple results provided for '${j}'. Sending error to server.`),VU=this._createCompletionMessage(z.invocationId,"Client provided multiple results.",null)),eU=void 0}catch(lU){eU=lU,this._logger.log(LogLevel.Error,`A callback for the method '${j}' threw error '${lU}'.`)}VU?await this._sendWithProtocol(VU):$?(eU?VU=this._createCompletionMessage(z.invocationId,`${eU}`,null):UU!==void 0?VU=this._createCompletionMessage(z.invocationId,null,UU):(this._logger.log(LogLevel.Warning,`No result given for '${j}' method and invocation ID '${z.invocationId}'.`),VU=this._createCompletionMessage(z.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(VU)):UU&&this._logger.log(LogLevel.Error,`Result given for '${j}' method but server is not expecting a result.`)}_connectionClosed(z){this._logger.log(LogLevel.Debug,`HubConnection.connectionClosed(${z}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||z||new AbortError("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(z||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===HubConnectionState.Disconnecting?this._completeClose(z):this._connectionState===HubConnectionState.Connected&&this._reconnectPolicy?this._reconnect(z):this._connectionState===HubConnectionState.Connected&&this._completeClose(z)}_completeClose(z){if(this._connectionStarted){this._connectionState=HubConnectionState.Disconnected,this._connectionStarted=!1,Platform.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(j=>j.apply(this,[z]))}catch(j){this._logger.log(LogLevel.Error,`An onclose callback called with error '${z}' threw error '${j}'.`)}}}async _reconnect(z){const j=Date.now();let y=0,L=z!==void 0?z:new Error("Attempting to reconnect due to a unknown error."),$=this._getNextRetryDelay(y++,0,L);if($===null){this._logger.log(LogLevel.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(z);return}if(this._connectionState=HubConnectionState.Reconnecting,z?this._logger.log(LogLevel.Information,`Connection reconnecting because of error '${z}'.`):this._logger.log(LogLevel.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(UU=>UU.apply(this,[z]))}catch(UU){this._logger.log(LogLevel.Error,`An onreconnecting callback called with error '${z}' threw error '${UU}'.`)}if(this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;$!==null;){if(this._logger.log(LogLevel.Information,`Reconnect attempt number ${y} will start in ${$} ms.`),await new Promise(UU=>{this._reconnectDelayHandle=setTimeout(UU,$)}),this._reconnectDelayHandle=void 0,this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=HubConnectionState.Connected,this._logger.log(LogLevel.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(UU=>UU.apply(this,[this.connection.connectionId]))}catch(UU){this._logger.log(LogLevel.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${UU}'.`)}return}catch(UU){if(this._logger.log(LogLevel.Information,`Reconnect attempt failed because of error '${UU}'.`),this._connectionState!==HubConnectionState.Reconnecting){this._logger.log(LogLevel.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===HubConnectionState.Disconnecting&&this._completeClose();return}L=UU instanceof Error?UU:new Error(UU.toString()),$=this._getNextRetryDelay(y++,Date.now()-j,L)}}this._logger.log(LogLevel.Information,`Reconnect retries have been exhausted after ${Date.now()-j} ms and ${y} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(z,j,y){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:j,previousRetryCount:z,retryReason:y})}catch(L){return this._logger.log(LogLevel.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${z}, ${j}) threw error '${L}'.`),null}}_cancelCallbacksWithError(z){const j=this._callbacks;this._callbacks={},Object.keys(j).forEach(y=>{const L=j[y];try{L(null,z)}catch($){this._logger.log(LogLevel.Error,`Stream 'error' callback called with '${z}' threw error: ${getErrorString($)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(z,j,y,L){if(y)return L.length!==0?{arguments:j,streamIds:L,target:z,type:MessageType.Invocation}:{arguments:j,target:z,type:MessageType.Invocation};{const $=this._invocationId;return this._invocationId++,L.length!==0?{arguments:j,invocationId:$.toString(),streamIds:L,target:z,type:MessageType.Invocation}:{arguments:j,invocationId:$.toString(),target:z,type:MessageType.Invocation}}}_launchStreams(z,j){if(z.length!==0){j||(j=Promise.resolve());for(const y in z)z[y].subscribe({complete:()=>{j=j.then(()=>this._sendWithProtocol(this._createCompletionMessage(y)))},error:L=>{let $;L instanceof Error?$=L.message:L&&L.toString?$=L.toString():$="Unknown error",j=j.then(()=>this._sendWithProtocol(this._createCompletionMessage(y,$)))},next:L=>{j=j.then(()=>this._sendWithProtocol(this._createStreamItemMessage(y,L)))}})}}_replaceStreamingParams(z){const j=[],y=[];for(let L=0;L<z.length;L++){const $=z[L];if(this._isObservable($)){const UU=this._invocationId;this._invocationId++,j[UU]=$,y.push(UU.toString()),z.splice(L,1)}}return[j,y]}_isObservable(z){return z&&z.subscribe&&typeof z.subscribe=="function"}_createStreamInvocation(z,j,y){const L=this._invocationId;return this._invocationId++,y.length!==0?{arguments:j,invocationId:L.toString(),streamIds:y,target:z,type:MessageType.StreamInvocation}:{arguments:j,invocationId:L.toString(),target:z,type:MessageType.StreamInvocation}}_createCancelInvocation(z){return{invocationId:z,type:MessageType.CancelInvocation}}_createStreamItemMessage(z,j){return{invocationId:z,item:j,type:MessageType.StreamItem}}_createCompletionMessage(z,j,y){return j?{error:j,invocationId:z,type:MessageType.Completion}:{invocationId:z,result:y,type:MessageType.Completion}}}const DEFAULT_RETRY_DELAYS_IN_MILLISECONDS=[0,2e3,1e4,3e4,null];class DefaultReconnectPolicy{constructor(z){this._retryDelays=z!==void 0?[...z,null]:DEFAULT_RETRY_DELAYS_IN_MILLISECONDS}nextRetryDelayInMilliseconds(z){return this._retryDelays[z.previousRetryCount]}}class HeaderNames{}HeaderNames.Authorization="Authorization",HeaderNames.Cookie="Cookie";class AccessTokenHttpClient extends HttpClient{constructor(z,j){super(),this._innerClient=z,this._accessTokenFactory=j}async send(z){let j=!0;this._accessTokenFactory&&(!this._accessToken||z.url&&z.url.indexOf("/negotiate?")>0)&&(j=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(z);const y=await this._innerClient.send(z);return j&&y.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(z),await this._innerClient.send(z)):y}_setAuthorizationHeader(z){z.headers||(z.headers={}),this._accessToken?z.headers[HeaderNames.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&z.headers[HeaderNames.Authorization]&&delete z.headers[HeaderNames.Authorization]}getCookieString(z){return this._innerClient.getCookieString(z)}}var HttpTransportType;(function(V){V[V.None=0]="None",V[V.WebSockets=1]="WebSockets",V[V.ServerSentEvents=2]="ServerSentEvents",V[V.LongPolling=4]="LongPolling"})(HttpTransportType||(HttpTransportType={}));var TransferFormat;(function(V){V[V.Text=1]="Text",V[V.Binary=2]="Binary"})(TransferFormat||(TransferFormat={}));class AbortController$1{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class LongPollingTransport{constructor(z,j,y){this._httpClient=z,this._logger=j,this._pollAbort=new AbortController$1,this._options=y,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(z,j){if(Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._url=z,this._logger.log(LogLevel.Trace,"(LongPolling transport) Connecting."),j===TransferFormat.Binary&&typeof XMLHttpRequest!="undefined"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[y,L]=getUserAgentHeader(),$={[y]:L,...this._options.headers},UU={abortSignal:this._pollAbort.signal,headers:$,timeout:1e5,withCredentials:this._options.withCredentials};j===TransferFormat.Binary&&(UU.responseType="arraybuffer");const eU=`${z}&_=${Date.now()}`;this._logger.log(LogLevel.Trace,`(LongPolling transport) polling: ${eU}.`);const VU=await this._httpClient.get(eU,UU);VU.statusCode!==200?(this._logger.log(LogLevel.Error,`(LongPolling transport) Unexpected response code: ${VU.statusCode}.`),this._closeError=new HttpError(VU.statusText||"",VU.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,UU)}async _poll(z,j){try{for(;this._running;)try{const y=`${z}&_=${Date.now()}`;this._logger.log(LogLevel.Trace,`(LongPolling transport) polling: ${y}.`);const L=await this._httpClient.get(y,j);L.statusCode===204?(this._logger.log(LogLevel.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):L.statusCode!==200?(this._logger.log(LogLevel.Error,`(LongPolling transport) Unexpected response code: ${L.statusCode}.`),this._closeError=new HttpError(L.statusText||"",L.statusCode),this._running=!1):L.content?(this._logger.log(LogLevel.Trace,`(LongPolling transport) data received. ${getDataDetail(L.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(L.content)):this._logger.log(LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(y){this._running?y instanceof TimeoutError?this._logger.log(LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=y,this._running=!1):this._logger.log(LogLevel.Trace,`(LongPolling transport) Poll errored after shutdown: ${y.message}`)}}finally{this._logger.log(LogLevel.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(z){return this._running?sendMessage(this._logger,"LongPolling",this._httpClient,this._url,z,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(LogLevel.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(LogLevel.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const z={},[j,y]=getUserAgentHeader();z[j]=y;const L={headers:{...z,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,L),this._logger.log(LogLevel.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(LogLevel.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let z="(LongPolling transport) Firing onclose event.";this._closeError&&(z+=" Error: "+this._closeError),this._logger.log(LogLevel.Trace,z),this.onclose(this._closeError)}}}class ServerSentEventsTransport{constructor(z,j,y,L){this._httpClient=z,this._accessToken=j,this._logger=y,this._options=L,this.onreceive=null,this.onclose=null}async connect(z,j){return Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Trace,"(SSE transport) Connecting."),this._url=z,this._accessToken&&(z+=(z.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((y,L)=>{let $=!1;if(j!==TransferFormat.Text){L(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let UU;if(Platform.isBrowser||Platform.isWebWorker)UU=new this._options.EventSource(z,{withCredentials:this._options.withCredentials});else{const eU=this._httpClient.getCookieString(z),VU={};VU.Cookie=eU;const[QU,lU]=getUserAgentHeader();VU[QU]=lU,UU=new this._options.EventSource(z,{withCredentials:this._options.withCredentials,headers:{...VU,...this._options.headers}})}try{UU.onmessage=eU=>{if(this.onreceive)try{this._logger.log(LogLevel.Trace,`(SSE transport) data received. ${getDataDetail(eU.data,this._options.logMessageContent)}.`),this.onreceive(eU.data)}catch(VU){this._close(VU);return}},UU.onerror=eU=>{$?this._close():L(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},UU.onopen=()=>{this._logger.log(LogLevel.Information,`SSE connected to ${this._url}`),this._eventSource=UU,$=!0,y()}}catch(eU){L(eU);return}})}async send(z){return this._eventSource?sendMessage(this._logger,"SSE",this._httpClient,this._url,z,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(z){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(z))}}class WebSocketTransport{constructor(z,j,y,L,$,UU){this._logger=y,this._accessTokenFactory=j,this._logMessageContent=L,this._webSocketConstructor=$,this._httpClient=z,this.onreceive=null,this.onclose=null,this._headers=UU}async connect(z,j){Arg.isRequired(z,"url"),Arg.isRequired(j,"transferFormat"),Arg.isIn(j,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Trace,"(WebSockets transport) Connecting.");let y;return this._accessTokenFactory&&(y=await this._accessTokenFactory()),new Promise((L,$)=>{z=z.replace(/^http/,"ws");let UU;const eU=this._httpClient.getCookieString(z);let VU=!1;if(Platform.isNode||Platform.isReactNative){const QU={},[lU,RU]=getUserAgentHeader();QU[lU]=RU,y&&(QU[HeaderNames.Authorization]=`Bearer ${y}`),eU&&(QU[HeaderNames.Cookie]=eU),UU=new this._webSocketConstructor(z,void 0,{headers:{...QU,...this._headers}})}else y&&(z+=(z.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(y)}`);UU||(UU=new this._webSocketConstructor(z)),j===TransferFormat.Binary&&(UU.binaryType="arraybuffer"),UU.onopen=QU=>{this._logger.log(LogLevel.Information,`WebSocket connected to ${z}.`),this._webSocket=UU,VU=!0,L()},UU.onerror=QU=>{let lU=null;typeof ErrorEvent!="undefined"&&QU instanceof ErrorEvent?lU=QU.error:lU="There was an error with the transport",this._logger.log(LogLevel.Information,`(WebSockets transport) ${lU}.`)},UU.onmessage=QU=>{if(this._logger.log(LogLevel.Trace,`(WebSockets transport) data received. ${getDataDetail(QU.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(QU.data)}catch(lU){this._close(lU);return}},UU.onclose=QU=>{if(VU)this._close(QU);else{let lU=null;typeof ErrorEvent!="undefined"&&QU instanceof ErrorEvent?lU=QU.error:lU="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",$(new Error(lU))}}})}send(z){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(LogLevel.Trace,`(WebSockets transport) sending data. ${getDataDetail(z,this._logMessageContent)}.`),this._webSocket.send(z),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(z){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(LogLevel.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(z)&&(z.wasClean===!1||z.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${z.code} (${z.reason||"no reason given"}).`)):z instanceof Error?this.onclose(z):this.onclose())}_isCloseEvent(z){return z&&typeof z.wasClean=="boolean"&&typeof z.code=="number"}}const MAX_REDIRECTS=100;class HttpConnection{constructor(z,j={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Arg.isRequired(z,"url"),this._logger=createLogger(j.logger),this.baseUrl=this._resolveUrl(z),j=j||{},j.logMessageContent=j.logMessageContent===void 0?!1:j.logMessageContent,typeof j.withCredentials=="boolean"||j.withCredentials===void 0)j.withCredentials=j.withCredentials===void 0?!0:j.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");j.timeout=j.timeout===void 0?100*1e3:j.timeout;let y=null,L=null;if(Platform.isNode&&typeof require!="undefined"){const $=typeof __webpack_require__=="function"?__non_webpack_require__:require;y=$("ws"),L=$("eventsource")}!Platform.isNode&&typeof WebSocket!="undefined"&&!j.WebSocket?j.WebSocket=WebSocket:Platform.isNode&&!j.WebSocket&&y&&(j.WebSocket=y),!Platform.isNode&&typeof EventSource!="undefined"&&!j.EventSource?j.EventSource=EventSource:Platform.isNode&&!j.EventSource&&typeof L!="undefined"&&(j.EventSource=L),this._httpClient=new AccessTokenHttpClient(j.httpClient||new DefaultHttpClient(this._logger),j.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=j,this.onreceive=null,this.onclose=null}async start(z){if(z=z||TransferFormat.Binary,Arg.isIn(z,TransferFormat,"transferFormat"),this._logger.log(LogLevel.Debug,`Starting connection with transfer format '${TransferFormat[z]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(z),await this._startInternalPromise,this._connectionState==="Disconnecting"){const j="Failed to start the HttpConnection before stop() was called.";return this._logger.log(LogLevel.Error,j),await this._stopPromise,Promise.reject(new AbortError(j))}else if(this._connectionState!=="Connected"){const j="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(LogLevel.Error,j),Promise.reject(new AbortError(j))}this._connectionStarted=!0}send(z){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new TransportSendQueue(this.transport)),this._sendQueue.send(z))}async stop(z){if(this._connectionState==="Disconnected")return this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(LogLevel.Debug,`Call to HttpConnection.stop(${z}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(j=>{this._stopPromiseResolver=j}),await this._stopInternal(z),await this._stopPromise}async _stopInternal(z){this._stopError=z;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(j){this._logger.log(LogLevel.Error,`HttpConnection.transport.stop() threw error '${j}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(LogLevel.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(z){let j=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===HttpTransportType.WebSockets)this.transport=this._constructTransport(HttpTransportType.WebSockets),await this._startTransport(j,z);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let y=null,L=0;do{if(y=await this._getNegotiationResponse(j),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new AbortError("The connection was stopped during negotiation.");if(y.error)throw new Error(y.error);if(y.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(y.url&&(j=y.url),y.accessToken){const $=y.accessToken;this._accessTokenFactory=()=>$,this._httpClient._accessToken=$,this._httpClient._accessTokenFactory=void 0}L++}while(y.url&&L<MAX_REDIRECTS);if(L===MAX_REDIRECTS&&y.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(j,this._options.transport,y,z)}this.transport instanceof LongPollingTransport&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(LogLevel.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(y){return this._logger.log(LogLevel.Error,"Failed to start the connection: "+y),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(y)}}async _getNegotiationResponse(z){const j={},[y,L]=getUserAgentHeader();j[y]=L;const $=this._resolveNegotiateUrl(z);this._logger.log(LogLevel.Debug,`Sending negotiation request: ${$}.`);try{const UU=await this._httpClient.post($,{content:"",headers:{...j,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(UU.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${UU.statusCode}'`));const eU=JSON.parse(UU.content);return(!eU.negotiateVersion||eU.negotiateVersion<1)&&(eU.connectionToken=eU.connectionId),eU}catch(UU){let eU="Failed to complete negotiation with the server: "+UU;return UU instanceof HttpError&&UU.statusCode===404&&(eU=eU+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(LogLevel.Error,eU),Promise.reject(new FailedToNegotiateWithServerError(eU))}}_createConnectUrl(z,j){return j?z+(z.indexOf("?")===-1?"?":"&")+`id=${j}`:z}async _createTransport(z,j,y,L){let $=this._createConnectUrl(z,y.connectionToken);if(this._isITransport(j)){this._logger.log(LogLevel.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=j,await this._startTransport($,L),this.connectionId=y.connectionId;return}const UU=[],eU=y.availableTransports||[];let VU=y;for(const QU of eU){const lU=this._resolveTransportOrError(QU,j,L);if(lU instanceof Error)UU.push(`${QU.transport} failed:`),UU.push(lU);else if(this._isITransport(lU)){if(this.transport=lU,!VU){try{VU=await this._getNegotiationResponse(z)}catch(RU){return Promise.reject(RU)}$=this._createConnectUrl(z,VU.connectionToken)}try{await this._startTransport($,L),this.connectionId=VU.connectionId;return}catch(RU){if(this._logger.log(LogLevel.Error,`Failed to start the transport '${QU.transport}': ${RU}`),VU=void 0,UU.push(new FailedToStartTransportError(`${QU.transport} failed: ${RU}`,HttpTransportType[QU.transport])),this._connectionState!=="Connecting"){const dU="Failed to select transport before stop() was called.";return this._logger.log(LogLevel.Debug,dU),Promise.reject(new AbortError(dU))}}}}return UU.length>0?Promise.reject(new AggregateErrors(`Unable to connect to the server with any of the available transports. ${UU.join(" ")}`,UU)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(z){switch(z){case HttpTransportType.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new WebSocketTransport(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case HttpTransportType.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ServerSentEventsTransport(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case HttpTransportType.LongPolling:return new LongPollingTransport(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${z}.`)}}_startTransport(z,j){return this.transport.onreceive=this.onreceive,this.transport.onclose=y=>this._stopConnection(y),this.transport.connect(z,j)}_resolveTransportOrError(z,j,y){const L=HttpTransportType[z.transport];if(L==null)return this._logger.log(LogLevel.Debug,`Skipping transport '${z.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${z.transport}' because it is not supported by this client.`);if(transportMatches(j,L))if(z.transferFormats.map(UU=>TransferFormat[UU]).indexOf(y)>=0){if(L===HttpTransportType.WebSockets&&!this._options.WebSocket||L===HttpTransportType.ServerSentEvents&&!this._options.EventSource)return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it is not supported in your environment.'`),new UnsupportedTransportError(`'${HttpTransportType[L]}' is not supported in your environment.`,L);this._logger.log(LogLevel.Debug,`Selecting transport '${HttpTransportType[L]}'.`);try{return this._constructTransport(L)}catch(UU){return UU}}else return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it does not support the requested transfer format '${TransferFormat[y]}'.`),new Error(`'${HttpTransportType[L]}' does not support ${TransferFormat[y]}.`);else return this._logger.log(LogLevel.Debug,`Skipping transport '${HttpTransportType[L]}' because it was disabled by the client.`),new DisabledTransportError(`'${HttpTransportType[L]}' is disabled by the client.`,L)}_isITransport(z){return z&&typeof z=="object"&&"connect"in z}_stopConnection(z){if(this._logger.log(LogLevel.Debug,`HttpConnection.stopConnection(${z}) called while in state ${this._connectionState}.`),this.transport=void 0,z=this._stopError||z,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(LogLevel.Debug,`Call to HttpConnection.stopConnection(${z}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(LogLevel.Warning,`Call to HttpConnection.stopConnection(${z}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${z}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),z?this._logger.log(LogLevel.Error,`Connection disconnected with error '${z}'.`):this._logger.log(LogLevel.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(j=>{this._logger.log(LogLevel.Error,`TransportSendQueue.stop() threw error '${j}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(z)}catch(j){this._logger.log(LogLevel.Error,`HttpConnection.onclose(${z}) threw error '${j}'.`)}}}_resolveUrl(z){if(z.lastIndexOf("https://",0)===0||z.lastIndexOf("http://",0)===0)return z;if(!Platform.isBrowser)throw new Error(`Cannot resolve '${z}'.`);const j=window.document.createElement("a");return j.href=z,this._logger.log(LogLevel.Information,`Normalizing '${z}' to '${j.href}'.`),j.href}_resolveNegotiateUrl(z){const j=z.indexOf("?");let y=z.substring(0,j===-1?z.length:j);return y[y.length-1]!=="/"&&(y+="/"),y+="negotiate",y+=j===-1?"":z.substring(j),y.indexOf("negotiateVersion")===-1&&(y+=j===-1?"?":"&",y+="negotiateVersion="+this._negotiateVersion),y}}function transportMatches(V,z){return!V||(z&V)!==0}class TransportSendQueue{constructor(z){this._transport=z,this._buffer=[],this._executing=!0,this._sendBufferedData=new PromiseSource,this._transportResult=new PromiseSource,this._sendLoopPromise=this._sendLoop()}send(z){return this._bufferData(z),this._transportResult||(this._transportResult=new PromiseSource),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(z){if(this._buffer.length&&typeof this._buffer[0]!=typeof z)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof z}`);this._buffer.push(z),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new PromiseSource;const z=this._transportResult;this._transportResult=void 0;const j=typeof this._buffer[0]=="string"?this._buffer.join(""):TransportSendQueue._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(j),z.resolve()}catch(y){z.reject(y)}}}static _concatBuffers(z){const j=z.map($=>$.byteLength).reduce(($,UU)=>$+UU),y=new Uint8Array(j);let L=0;for(const $ of z)y.set(new Uint8Array($),L),L+=$.byteLength;return y.buffer}}class PromiseSource{constructor(){this.promise=new Promise((z,j)=>[this._resolver,this._rejecter]=[z,j])}resolve(){this._resolver()}reject(z){this._rejecter(z)}}const JSON_HUB_PROTOCOL_NAME="json";class JsonHubProtocol{constructor(){this.name=JSON_HUB_PROTOCOL_NAME,this.version=1,this.transferFormat=TransferFormat.Text}parseMessages(z,j){if(typeof z!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!z)return[];j===null&&(j=NullLogger.instance);const y=TextMessageFormat.parse(z),L=[];for(const $ of y){const UU=JSON.parse($);if(typeof UU.type!="number")throw new Error("Invalid payload.");switch(UU.type){case MessageType.Invocation:this._isInvocationMessage(UU);break;case MessageType.StreamItem:this._isStreamItemMessage(UU);break;case MessageType.Completion:this._isCompletionMessage(UU);break;case MessageType.Ping:break;case MessageType.Close:break;default:j.log(LogLevel.Information,"Unknown message type '"+UU.type+"' ignored.");continue}L.push(UU)}return L}writeMessage(z){return TextMessageFormat.write(JSON.stringify(z))}_isInvocationMessage(z){this._assertNotEmptyString(z.target,"Invalid payload for Invocation message."),z.invocationId!==void 0&&this._assertNotEmptyString(z.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(z){if(this._assertNotEmptyString(z.invocationId,"Invalid payload for StreamItem message."),z.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(z){if(z.result&&z.error)throw new Error("Invalid payload for Completion message.");!z.result&&z.error&&this._assertNotEmptyString(z.error,"Invalid payload for Completion message."),this._assertNotEmptyString(z.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(z,j){if(typeof z!="string"||z==="")throw new Error(j)}}const LogLevelNameMapping={trace:LogLevel.Trace,debug:LogLevel.Debug,info:LogLevel.Information,information:LogLevel.Information,warn:LogLevel.Warning,warning:LogLevel.Warning,error:LogLevel.Error,critical:LogLevel.Critical,none:LogLevel.None};function parseLogLevel(V){const z=LogLevelNameMapping[V.toLowerCase()];if(typeof z!="undefined")return z;throw new Error(`Unknown log level: ${V}`)}class HubConnectionBuilder{configureLogging(z){if(Arg.isRequired(z,"logging"),isLogger(z))this.logger=z;else if(typeof z=="string"){const j=parseLogLevel(z);this.logger=new ConsoleLogger(j)}else this.logger=new ConsoleLogger(z);return this}withUrl(z,j){return Arg.isRequired(z,"url"),Arg.isNotEmpty(z,"url"),this.url=z,typeof j=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...j}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:j},this}withHubProtocol(z){return Arg.isRequired(z,"protocol"),this.protocol=z,this}withAutomaticReconnect(z){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return z?Array.isArray(z)?this.reconnectPolicy=new DefaultReconnectPolicy(z):this.reconnectPolicy=z:this.reconnectPolicy=new DefaultReconnectPolicy,this}build(){const z=this.httpConnectionOptions||{};if(z.logger===void 0&&(z.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const j=new HttpConnection(this.url,z);return HubConnection.create(j,this.logger||NullLogger.instance,this.protocol||new JsonHubProtocol,this.reconnectPolicy)}}function isLogger(V){return V.log!==void 0}const connectSignalR=async(V,z,j)=>{let y=null;const L=async()=>(y=await z.start().catch($=>(console.error("Failed to connect with hub",$),new Promise((UU,eU)=>setTimeout(()=>L().then(UU).catch(eU),5e3)))),console.log(`start $${j}ConnectionHub, id: ${V}`),y);try{await L(),await z.invoke("Join",V)}catch($){console.error($.toString())}},useConfigStore=pinia$1.defineStore("config",{state:()=>({token:"",baseUrl:""}),actions:{getToken(V){this.token=V},getBaseUrl(V){this.baseUrl=V},api(V){return ApiJs(V,!1,`Bearer ${this.token}`,!0)}}}),xGroupId="KIK";var apiChat={getChannels(V,z,j,y=50){return V({url:`${z}/api/channels/issues/${j}`,method:"GET",headers:{"x-group-id":xGroupId},params:{count:y}})},getUnreadChannels(V,z){return V({url:`${z}/api/channels/issues/count`,method:"GET",headers:{"x-group-id":xGroupId}})},getGroups(V,z){return V({url:`${z}/api/groups`,method:"GET",headers:{"x-group-id":xGroupId}})},getChatMessagesByChannelId(V,z,j,y,L){if(!y)return V({url:`${z}/api/public/channels/${j}/messages?count=${L}`,method:"GET",headers:{"x-group-id":xGroupId}})},getChatMessagesBeforeByChannelId(V,z,j,y,L,$){if(!y)return V({url:`${z}/api/public/channels/${j}/messages`,method:"GET",headers:{"x-group-id":xGroupId},params:{count:L,beforeMessageId:$}})},getChatMessagesAfterByChannelId(V,z,j,y,L,$){if(!(y&&L!==2))return V({url:`${z}/api/public/channels/${j}/messages`,method:"GET",headers:{"x-group-id":xGroupId},params:{count:L,afterMessageId:$}})},postChatMessagesByChannelId(V,z,j,{message:y}){return V({url:`${z}/api/public/channels/${j}/messages`,method:"POST",data:{text:y.text,attachments:y.attachments},headers:{"x-group-id":xGroupId}})},putChatMessagesReadByChannelId(V,z,j,y){return V({url:`${z}/api/public/channels/${j}/messages/read`,method:"PUT",headers:{"x-group-id":xGroupId},params:{lastMessageId:y}})},getChatFilesByChannelId(V,z,j){return V({url:`${z}/api/public/channels/${j}/files`,method:"GET",headers:{"x-group-id":xGroupId}})},postChatFilesByChannelId(V,z,j,{fileData:y,signal:L}){return V({url:`${z}/api/public/channels/${j}/files`,method:"POST",data:y,headers:{"Content-type":"multipart/form-data;","x-group-id":xGroupId},signal:L})},downloadChatFileByUrl(V,z,j){return V({url:`${z}${j}`,method:"GET",headers:{"x-group-id":xGroupId},responseType:"blob"})},closeInteraction(V,z,j){return V({url:`${z}/api/channels/${j}/current-issue/close`,method:"PUT",headers:{"x-group-id":xGroupId}})},redirectInteraction(V,z,j,y){return V({url:`${z}/api/channels/${j}/current-issue/interactions`,method:"POST",headers:{"x-group-id":xGroupId},data:{groupId:y}})}};const useGroupsStore=pinia$1.defineStore("groups",{state:()=>({groups:[],groupInfo:""}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},isNewLine(V){return V.groupInfo.name.length>3}},actions:{setGroupInfo(V){this.groupInfo=V},async getGroups(){try{this.groups=await apiChat.getGroups(this.api,this.baseUrl)}catch(V){console.log(V)}}}}),useChannelsStore=pinia$1.defineStore("channels",{state:()=>({channels:[],unreadChannels:{},channelCategory:"Active",isLoadingChannels:!1,isChannelsList:!0,isOpenChannel:!1,isFilesList:!1,isClientInfo:!1,isHubsConnected:!1,notifications:{messagesRead:null,messageAdded:null,activeChannels:[]}}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},unreadChannelsCount(V){return V.unreadChannels.active&&V.unreadChannels.active.unreadChannelsCount||V.unreadChannels.new&&V.unreadChannels.new.unreadChannelsCount},isActiveChannel(V){return V.channelCategory==="Active"},isClosedChannel(V){return V.channelCategory==="Closed"},tabs(V){return[{name:"\u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435",api:"Active",isActive:V.channelCategory==="Active",unread:V.unreadChannels&&V.unreadChannels.active.unreadChannelsCount},{name:"\u041D\u043E\u0432\u044B\u0435",api:"New",isActive:V.channelCategory==="New",unread:V.unreadChannels&&V.unreadChannels.new.unreadChannelsCount},{name:"\u0417\u0430\u043A\u0440\u044B\u0442\u044B\u0435",api:"Closed",isActive:V.channelCategory==="Closed"}]}},actions:{setIsLoadingChannels(V){this.isLoadingChannels=V},setIsChannelsList(V){this.isChannelsList=V},setIsOpenChannel(V){this.isOpenChannel=V},setIsFilesList(V){this.isFilesList=V},setIsClientInfo(V){this.isClientInfo=V},setIsHubsConnected(V){this.isHubsConnected=V},toggleChannelCategory(V){this.channelCategory=V},async getChannels(){try{const V=await apiChat.getChannels(this.api,this.baseUrl,this.channelCategory);this.channels=V,this.isActiveChannel&&(this.notifications.activeChannels=V)}catch(V){console.log(V)}},async getUnreadChannels(){try{this.unreadChannels=await apiChat.getUnreadChannels(this.api,this.baseUrl)}catch(V){console.log(V)}}}});dayjs.locale("ru");const getTime=V=>dayjs(V).format("H:mm"),sortByDate=V=>{const z=y=>dayjs(y).format("D MMMM YYYY"),j=V.reduce((y,L)=>(y[z(L.createdDateTime)]?y[z(L.createdDateTime)].push(L):y[z(L.createdDateTime)]=[L],y),{});return Object.keys(j).map(y=>{const L=z(new Date)===y?"\u0421\u0435\u0433\u043E\u0434\u043D\u044F":y,$=()=>{const UU=[];return j[y].map(eU=>{eU.files&&eU.files.length&&UU.push(...eU.files)}),UU.reverse()};return{date:L,messages:j[y],files:$()}})},parseFileSize=V=>{const z=V/1024;return z<1024?`${Math.round(z)} \u041A\u0411`:`${Math.round(z/1024)} \u041C\u0411`},uuidv4=()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,V=>(V^crypto.getRandomValues(new Uint8Array(1))[0]&15>>V/4).toString(16)),_sfc_main$g={},_hoisted_1$d={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_hoisted_2$d=vue.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.75 12C3.75 7.44321 7.44321 3.75 12 3.75C16.5568 3.75 20.25 7.44321 20.25 12C20.25 16.5568 16.5568 20.25 12 20.25C7.44321 20.25 3.75 16.5568 3.75 12ZM12 2.25C6.61479 2.25 2.25 6.61479 2.25 12C2.25 17.3852 6.61479 21.75 12 21.75C17.3852 21.75 21.75 17.3852 21.75 12C21.75 6.61479 17.3852 2.25 12 2.25ZM12.75 7.5C12.75 7.08579 12.4142 6.75 12 6.75C11.5858 6.75 11.25 7.08579 11.25 7.5V12.5C11.25 12.9142 11.5858 13.25 12 13.25C12.4142 13.25 12.75 12.9142 12.75 12.5V7.5ZM12 17.2532C12.5523 17.2532 13 16.8055 13 16.2532C13 15.7009 12.5523 15.2532 12 15.2532C11.4477 15.2532 11 15.7009 11 16.2532C11 16.8055 11.4477 17.2532 12 17.2532Z",fill:"#ED3636"},null,-1),_hoisted_3$a=[_hoisted_2$d];function _sfc_render$1(V,z){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$d,_hoisted_3$a)}var Warning=_export_sfc(_sfc_main$g,[["render",_sfc_render$1]]);const _sfc_main$f={},_hoisted_1$c={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_hoisted_2$c=vue.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 3.75C7.44321 3.75 3.75 7.44321 3.75 12C3.75 16.5568 7.44321 20.25 12 20.25C16.5568 20.25 20.25 16.5568 20.25 12C20.25 7.44321 16.5568 3.75 12 3.75ZM2.25 12C2.25 6.61479 6.61479 2.25 12 2.25C17.3852 2.25 21.75 6.61479 21.75 12C21.75 17.3852 17.3852 21.75 12 21.75C6.61479 21.75 2.25 17.3852 2.25 12ZM16.5303 9.46967C16.8232 9.76256 16.8232 10.2374 16.5303 10.5303L11.5303 15.5303C11.2374 15.8232 10.7626 15.8232 10.4697 15.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697C7.76256 11.1768 8.23744 11.1768 8.53033 11.4697L11 13.9393L15.4697 9.46967C15.7626 9.17678 16.2374 9.17678 16.5303 9.46967Z",fill:"#0CA31B"},null,-1),_hoisted_3$9=[_hoisted_2$c];function _sfc_render(V,z){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$c,_hoisted_3$9)}var CircleCheck=_export_sfc(_sfc_main$f,[["render",_sfc_render]]);const plNotif2=V=>{const z={...V};!z.icon&&z.icon!==null&&(z.type==="error"?(z.icon=Warning,z.message||(z.dangerouslyUseHTMLString=!0,z.message='<div>\u0414\u043B\u044F \u0443\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u043E\u0448\u0438\u0431\u043A\u0438 \u043D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443</div><div class="pt-5 text-end"><p class="px-1 default-call-chat">\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0432 \u0447\u0430\u0442</p></div>')):z.icon=CircleCheck),ElNotification({position:"bottom-right",offset:16,showClose:!1,...z,type:null})};plNotif2.success=V=>plNotif2({type:"success",...V}),plNotif2.error=V=>plNotif2({type:"error",...V});const useSelectedChannelStore=pinia$1.defineStore("selectedChannel",{state:()=>({channelId:"",participant:[],files:[],messages:[],unreadMessagesCount:null,loadingMessages:!1,managerConnect:null,afterMessagesLoaded:!1,beforeMessagesLoaded:!1,isManagerSendMsg:!1,isLoadingFiles:!1}),getters:{api(){return useConfigStore().api},baseUrl(){return useConfigStore().baseUrl},groupId(){return useGroupsStore().groupInfo.code},displayName(V){return`${V.participant.firstName} ${V.participant.lastName}`},sortedMessages(V){return sortByDate(V.messages)},sortedFiles(V){return sortByDate(V.files)},clientFullName(V){return`
|
|
86
86
|
${V.participant.firstName||"\u0418\u043C\u044F"}
|
|
87
87
|
${V.participant.middleName||""}
|
|
88
88
|
${V.participant.lastName||"\u0424\u0430\u043C\u0438\u043B\u0438\u044F"}
|