sprof 0.0.20 → 0.0.21
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.
- package/dist/modules/indexNames.d.ts +1 -1
- package/dist/sprof.js +1 -1
- package/dist/sprof.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: string[];
|
|
2
2
|
export default _default;
|
package/dist/sprof.js
CHANGED
|
@@ -12350,7 +12350,7 @@ const Ng = /* @__PURE__ */ E(zg, [["render", Bg], ["__scopeId", "data-v-4d1abb74
|
|
|
12350
12350
|
], 64);
|
|
12351
12351
|
};
|
|
12352
12352
|
}
|
|
12353
|
-
}), e1 = /* @__PURE__ */ E(Kg, [["__scopeId", "data-v-61aa63c7"]]), t1 = ["Passport", "PassportScan"], i1 = ["PassportsStore", "PassportScansStore"], S0 = [...i1, t1], C0 = [
|
|
12353
|
+
}), e1 = /* @__PURE__ */ E(Kg, [["__scopeId", "data-v-61aa63c7"]]), t1 = ["Passport", "PassportScan"], i1 = ["PassportsStore", "PassportScansStore"], S0 = [...i1, ...t1], C0 = [
|
|
12354
12354
|
"BaseStore",
|
|
12355
12355
|
"Contact",
|
|
12356
12356
|
"Static",
|
package/dist/sprof.umd.cjs
CHANGED
|
@@ -39,4 +39,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
39
39
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
40
40
|
PERFORMANCE OF THIS SOFTWARE.
|
|
41
41
|
***************************************************************************** */function fs(t,e){var n,o;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),o=t+"-"+e):(n=t||e,o=t||e),{name:n,classname:o}}function ms(t){return/^blob:/.test(t)}function ps(t){return ms(t)||function(e){return/^data:/.test(e)}(t)}function gt(t){return!!(t&&t.constructor&&t.call&&t.apply)}function oe(t){return t===void 0}function kn(t){return typeof t=="object"&&t!==null}function Pi(t,e,n){var o={};return kn(t)?(Object.keys(e).forEach(function(r){oe(t[r])?o[r]=e[r]:kn(e[r])?kn(t[r])?o[r]=Pi(t[r],e[r],n[r]):o[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?o[r]=!!t[r]:o[r]=t[r]}),o):t?e:n}function En(t){var e=Number(t);return Number.isNaN(e)?t:e}function gs(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!ys(t)}function ys(t){return t!=t}function ws(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Ot=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},Bh=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},Ti=function(t){this.type="move",this.directions=t},xh=function(){function t(e,n,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=n,this.anchor=s}return t.prototype.shift=function(){var e=this,n=e.element,o=e.anchor,r=e.position;if(n){var s=n.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},t}(),zi={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=it(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:t.clientX-n,top:t.clientY-s,bottom:r-t.clientY,right:o-t.clientX}},processMove:function(t,e){var n=it(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var o=this.$refs.draggable;this.$emit("drag",new xh(t,o,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};zi.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],34)};var Fi=Ie("vue-handler-wrapper"),bs={name:"HandlerWrapper",components:{DraggableElement:zi},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=fs(this.horizontalPosition,this.verticalPosition);t=Fi((Me(e={},n.classname,!0),Me(e,"disabled",this.disabled),e))}else t=Fi({disabled:this.disabled});return{root:t,draggable:Fi("draggable")}}},emits:["leave","enter","drag","drag-end"]};bs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:s.classes.root},[i.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var $h=Ie("vue-line-wrapper"),Ss={name:"LineWrapper",components:{DraggableElement:zi},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return $h((Me(t={},this.position,!0),Me(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};Ss.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var ze=["left","right","top","bottom"],Nh=["left","right"],Ih=["top","bottom"],Rh=["left","top"],Ah=["fill-area","fit-area","stencil","none"],Cs={left:0,top:0,width:0,height:0};function ks(t,e,n){return!(n=n||["width","height","left","top"]).some(function(o){return t[o]!==e[o]})}function Fe(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function yt(t,e){return{left:t.left-e.left,top:t.top-e.top}}function le(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function _t(t,e){var n={left:0,top:0,right:0,bottom:0};return ze.forEach(function(o){var r=e[o],s=Fe(t)[o];n[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),n}function De(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function vn(t){return{left:-t.left,top:-t.top}}function be(t,e){return V(V({},t),{left:t.left+e.left,top:t.top+e.top})}function Be(t,e,n,o){if(e!==1){if(n){var r=le(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function G(t){return t.width/t.height}function wt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function bt(t,e){var n={left:0,top:0},o=_t(t,e);return o.left&&o.left>0?n.left=o.left:o.right&&o.right>0&&(n.left=-o.right),o.top&&o.top>0?n.top=o.top:o.bottom&&o.bottom>0&&(n.top=-o.bottom),n}function Di(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function Es(t,e){var n=G(t),o=G(e);return e.width<1/0&&e.height<1/0?n>o?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function vs(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function We(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function Mn(t,e){var n=_t(ce(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,wt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,wt(t,e)):1}function ce(t,e,n){n===void 0&&(n=!1);var o=bt(t,e);return be(t,n?vn(o):o)}function Li(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function Vh(t,e){return V(V({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function Ms(t,e,n){n===void 0&&(n=!0);var o={};return ze.forEach(function(r){var s=t[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?n?Math.max(s,a):Math.min(s,a):n?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function Bn(t,e){return Ms(t,e,!0)}function Bs(t){var e=t.size,n=t.aspectRatio,o=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||G(e)>=n.minimum&&G(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function xs(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function _e(t){var e=t.width,n=t.height,o=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,p){return Bs({size:p,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:h})&&(!f||xs(p,{width:e,height:n})<xs(f,{width:e,height:n}))?p:f},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),Bs({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var d=a(c)||a(c,!0);return d&&{width:d.width,height:d.height}}function Oi(t){var e=t.event,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=be(n,e.directions);return be(s,bt(s,r))}function Ph(t){var e=t.coordinates,n=t.transform,o=t.imageSize,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,d=function(h,f){return Oi({coordinates:h,positionRestrictions:s,event:new Ti({left:f.left-h.left,top:f.top-h.top})})},u=V({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};oe((f=typeof h=="function"?h({coordinates:u,imageSize:o,visibleArea:c}):h).width)&&oe(f.height)||(u=function(p,y){var g=V(V(V({},p),_e({width:y.width,height:y.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return d(g,{left:p.left,top:p.top})}(u,V(V({},u),f))),oe(f.left)&&oe(f.top)||(u=d(u,V(V({},u),f)))}),u}function Th(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio;var s=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var d,u,h,f=V({},o),p=V({},r),y=V({},s);d=G(y),u=G(f),h===void 0&&(h=.001),(d===0||u===0?Math.abs(u-d)<h:Math.abs(u/d)<1+h&&Math.abs(u/d)>1-h)||(f=V(V({},f),_e({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:G(y),maximum:G(y)}})));var g=Mn(p=Be(p,f.width*n.width/(p.width*y.width)),e({visibleArea:p,type:"resize"}));return g!==1&&(p=Be(p,g),f=Be(f,g)),p=ce(p=be(p,yt(le(f),le(p))),e({visibleArea:p,type:"move"})),{coordinates:f=ce(f,Bn(Fe(p),c)),visibleArea:p}}function zh(t){var e=t.event,n=t.getAreaRestrictions,o=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=V({},r),d=V({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};d.width,o.width,G(o)>G(c)?(u.height=.8*o.height,u.width=u.height*G(c)):(u.width=.8*o.width,u.height=u.width*G(c));var h=Mn(d=Be(d,c.width*o.width/(d.width*u.width)),n({visibleArea:d,type:"resize"}));d=Be(d,h),h!==1&&(u.height/=h,u.width/=h),d=ce(d=be(d,yt(le(c),le(d))),n({visibleArea:d,type:"move"})),c=ce(c,Bn(Fe(d),a))}return{coordinates:c,visibleArea:d}}function Fh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.getAreaRestrictions,s=V({},o),a=V({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),d=Math.max(0,a.height-s.height);c>d?s=Be(s,Math.min(a.width/s.width,wt(s,r({visibleArea:s,type:"resize"})))):d>c&&(s=Be(s,Math.min(a.height/s.height,wt(s,r({visibleArea:s,type:"resize"}))))),s=ce(s=be(s,vn(bt(a,Fe(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function Dh(t){var e=t.imageSize,n=t.visibleArea,o=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-o.width/2,top:(n?n.top:0)+r.height/2-o.height/2}}function Lh(t){var e=t.imageSize,n=t.visibleArea,o=t.aspectRatio,r=t.sizeRestrictions,s=n||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,G(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return _e(V(V({},c),{aspectRatio:o,sizeRestrictions:r}))}function Oh(t){var e,n,o=t.imageSize,r=t.visibleArea,s=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,d=t.stencilSize,u=r||o;return G(u)>G(s)?n=(e=d.height*u.height/s.height)*G(d):e=(n=d.width*u.width/s.width)/G(d),_e({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function _h(t){var e=t.getAreaRestrictions,n=t.coordinates,o=t.imageSize,r=G(t.boundaries);if(n){var s={height:Math.max(n.height,o.height),width:Math.max(n.width,o.width)},a=Es({width:G(s)>r?s.width:s.height*r,height:G(s)>r?s.width/r:s.height},Li(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},d=_t(n,Fe(V({left:0,top:0},o))),u={};return!d.left&&!d.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!d.top&&!d.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),ce(c,u)}var h=G(o);return a={height:h>r?o.height:o.width/r,width:h>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function xn(t,e){return Ms(t,Fe(e))}function Hh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,d=e.scale,u=e.move,h=V({},o),f=V({},n),p=1,y=1,g=d.factor&&Math.abs(d.factor-1)>.001;h=be(h,{left:u.left||0,top:u.top||0});var v={stencil:{minimum:Math.max(r.minWidth?r.minWidth/f.width:0,r.minHeight?r.minHeight/f.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/f.width:1/0,r.maxHeight?r.maxHeight/f.height:1/0,wt(f,a))},area:{maximum:wt(h,s({visibleArea:h,type:"resize"}))}};d.factor&&g&&(d.factor<1?(y=Math.max(d.factor,v.stencil.minimum))>1&&(y=1):d.factor>1&&(y=Math.min(d.factor,Math.min(v.area.maximum,v.stencil.maximum)))<1&&(y=1)),y&&(h=Be(h,y,d.center));var b=n.left-o.left,x=o.width+o.left-(n.width+n.left),L=n.top-o.top,O=o.height+o.top-(n.height+n.top);return h=ce(h=be(h,bt(h,{left:a.left!==void 0?a.left-b*y:void 0,top:a.top!==void 0?a.top-L*y:void 0,bottom:a.bottom!==void 0?a.bottom+O*y:void 0,right:a.right!==void 0?a.right+x*y:void 0})),s({visibleArea:h,type:"move"})),f.width=f.width*y,f.height=f.height*y,f.left=h.left+b*y,f.top=h.top+L*y,f=ce(f,Bn(Fe(h),a)),d.factor&&g&&c&&(d.factor>1?p=Math.min(v.area.maximum,d.factor)/y:d.factor<1&&(p=Math.max(f.height/h.height,f.width/h.width,d.factor/y)),p!==1&&(h=be(h=ce(h=Be(h,p,d.factor>1?d.center:le(f)),s({visibleArea:h,type:"move"})),vn(bt(f,Fe(h)))))),{coordinates:f,visibleArea:h}}function qh(t){var e=t.aspectRatio,n=t.getAreaRestrictions,o=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,d=t.previousImageSize,u=t.angle,h=V({},o),f=V({},r),p=We(le(V({left:0,top:0},d)),u);return(h=V(V({},_e({sizeRestrictions:s,aspectRatio:e,width:h.width,height:h.height})),We(le(h),u))).left-=p.left-c.width/2+h.width/2,h.top-=p.top-c.height/2+h.height/2,f=Be(f,Mn(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=ce(h,a),visibleArea:f=ce(f=be(f,yt(le(h),le(o))),n({visibleArea:f,type:"move"}))}}function Uh(t){var e=t.flip,n=t.previousFlip,o=t.rotate,r=t.getAreaRestrictions,s=t.coordinates,a=t.visibleArea,c=t.imageSize,d=V({},s),u=V({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var p=We({left:c.width/2,top:c.height/2},-o),y=We(le(d),-o),g=We({left:h?p.left-(y.left-p.left):y.left,top:f?p.top-(y.top-p.top):y.top},o);d=be(d,yt(g,le(d))),y=We(le(u),-o),u=ce(u=be(u,yt(g=We({left:h?p.left-(y.left-p.left):y.left,top:f?p.top-(y.top-p.top):y.top},o),le(u))),r({visibleArea:u,type:"move"}))}return{coordinates:d,visibleArea:u}}function $s(t){var e=t.directions,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,d=V({},e),u=De(n,d).width,h=De(n,d).height;u<0&&(d.left<0&&d.right<0?(d.left=-(n.width-s.minWidth)/(d.left/d.right),d.right=-(n.width-s.minWidth)/(d.right/d.left)):d.left<0?d.left=-(n.width-s.minWidth):d.right<0&&(d.right=-(n.width-s.minWidth))),h<0&&(d.top<0&&d.bottom<0?(d.top=-(n.height-s.minHeight)/(d.top/d.bottom),d.bottom=-(n.height-s.minHeight)/(d.bottom/d.top)):d.top<0?d.top=-(n.height-s.minHeight):d.bottom<0&&(d.bottom=-(n.height-s.minHeight)));var f=_t(De(n,d),r);c&&(f.left&&f.left>0&&f.right===0?(d.right+=f.left,d.left-=f.left):f.right&&f.right>0&&f.left===0&&(d.left+=f.right,d.right-=f.right),f.top&&f.top>0&&f.bottom===0?(d.bottom+=f.top,d.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(d.top+=f.bottom,d.bottom-=f.bottom),f=_t(De(n,d),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(ze.forEach(function(v){var b=f[v];b&&d[v]&&(p[v]=Math.max(0,1-b/d[v]))}),a){var y=Math.min.apply(null,ze.map(function(v){return p[v]}));y!==1/0&&ze.forEach(function(v){d[v]*=y})}else ze.forEach(function(v){p[v]!==1/0&&(d[v]*=p[v])});if(u=De(n,d).width,h=De(n,d).height,d.right+d.left&&(u>s.maxWidth?p.width=(s.maxWidth-n.width)/(d.right+d.left):u<s.minWidth&&(p.width=(s.minWidth-n.width)/(d.right+d.left))),d.bottom+d.top&&(h>s.maxHeight?p.height=(s.maxHeight-n.height)/(d.bottom+d.top):h<s.minHeight&&(p.height=(s.minHeight-n.height)/(d.bottom+d.top))),a){var g=Math.min(p.width,p.height);g!==1/0&&ze.forEach(function(v){d[v]*=g})}else p.width!==1/0&&Nh.forEach(function(v){d[v]*=p.width}),p.height!==1/0&&Ih.forEach(function(v){d[v]*=p.height});return d}function $n(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var Wh=Ie("vue-simple-handler"),Gh=Ie("vue-simple-handler-wrapper"),_i={name:"SimpleHandler",components:{HandlerWrapper:bs},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(Me(t={},this.horizontalPosition,!!this.horizontalPosition),Me(t,this.verticalPosition,!!this.verticalPosition),Me(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),Me(t,"hover",this.hover),t);return{default:ee(Wh(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:ee(Gh(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};_i.render=function(t,e,n,o,r,s){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var jh=Ie("vue-simple-line"),Zh=Ie("vue-simple-line-wrapper"),Hi={name:"SimpleLine",components:{LineWrapper:Ss},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:ee(jh(Me({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:ee(Zh(Me({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Hi.render=function(t,e,n,o,r,s){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var qi=Ie("vue-bounding-box"),Yh=["east","west",null],Jh=["south","north",null],Ns={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return _i}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Hi}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return Yh.forEach(function(e){Jh.forEach(function(n){if(e!==n){var o=fs(e,n),r=o.name,s=o.classname;t.push({name:r,classname:s,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,o=this.linesWrappersClasses;return{root:qi(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:o}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:ee(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:ee(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,o=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var s={name:r.name,component:t.handlersComponent,class:ee(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:ee(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&o){var a=r.horizontalDirection,c=r.verticalDirection,d=a==="east"?n:a==="west"?0:n/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=qi("handler"),s.wrapperStyle={transform:"translate(".concat(d,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(s.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else s.wrapperClass=qi("handler",Me({},r.classname,!0));e.push(s)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var o,r=t.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=s:e==="east"&&(c.right+=s),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?o="width":n&&!e&&(o="height"),this.resizable&&this.$emit("resize",new Bh(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};Ns.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Xh=Ie("vue-draggable-area"),Is={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Xh()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=it(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):ws({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top;this.anchor={x:t.clientX-n,y:t.clientY-o}},processMove:function(t,e){var n=it(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&n.length===1&&this.$emit("move",new Ti({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Is.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};function Ui(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function Qh(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(d){d=d.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(d),h=u.length,f=new ArrayBuffer(h),p=new Uint8Array(f),y=0;y<h;y++)p[y]=u.charCodeAt(y);return f}(t));else if(/^blob:/i.test(t)){var o=new FileReader;o.onload=function(d){e(d.target.result)},s=t,a=function(d){o.readAsArrayBuffer(d)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(d){n(d)}var s,a,c})}function Rs(t){var e=t.rotate,n=t.flip,o=t.scaleX,r=t.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(n.horizontal?-1:1)+") ",s+=" scaleY("+r*(n.vertical?-1:1)+") "}function Kh(t){try{var e,n=new DataView(t),o=void 0,r=void 0,s=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,d=2;d+1<c;){if(n.getUint8(d)===255&&n.getUint8(d+1)===225){s=d;break}d++}if(s&&(o=s+10,function(y,g,v){var b,x="";for(b=g,v+=g;b<v;b++)x+=String.fromCharCode(y.getUint8(b));return x}(n,s+4,4)==="Exif")){var u=n.getUint16(o);if(((r=u===18761)||u===19789)&&n.getUint16(o+2,r)===42){var h=n.getUint32(o+4,r);h>=8&&(a=o+h)}}if(a){for(var f=n.getUint16(a,r),p=0;p<f;p++)if(d=a+12*p+2,n.getUint16(d,r)===274){d+=8,e=n.getUint16(d,r),n.setUint16(d,1,r);break}}return e}catch{return null}}function As(t,e){var n=e.getBoundingClientRect(),o=n.left,r=n.top,s={left:0,top:0},a=0;return t.forEach(function(c){s.left+=(c.clientX-o)/t.length,s.top+=(c.clientY-r)/t.length}),t.forEach(function(c){a+=ws({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:t.length}}var Vs={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Vi(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Ot({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=As(e,this.$refs.container),o=this.oldGeometricProperties;o.count===n.count&&o.count>1&&this.$emit("resize",new Ot({left:o.centerMass.left-n.centerMass.left,top:o.centerMass.top-n.centerMass.top},{factor:o.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),o=n.left,r=n.top,s=n.bottom,a=n.right;this.touches=it(t.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=As(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=it(t.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||ys(c)?c:c>0?1:-1),s={left:t.clientX-n,top:t.clientY-o};this.$emit("resize",new Ot({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};Vs.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[i.renderSlot(t.$slots,"default")],544)};var Wi={components:{TransformableImage:Vs},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Wi.render=function(t,e,n,o,r,s){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Nn=Ie("vue-preview"),Ps={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Nn({fill:this.fill}),wrapper:Nn("wrapper"),imageWrapper:Nn("image-wrapper"),image:ee(Nn("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,o=this.imageSize.height,r=vs({width:n,height:o},e.rotate),s={width:"".concat(n,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
|
|
42
|
-
`.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+Rs(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Ps.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var Ts={components:{Preview:Ps},inheritAttrs:!1};Ts.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Gi=Ie("vue-rectangle-stencil"),zs={name:"RectangleStencil",components:{StencilPreview:Ts,BoundingBox:Ns,DraggableArea:Is},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return _i}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Hi}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:ee(Gi({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:ee(Gi("preview"),this.previewClass),boundingBox:ee(Gi("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};zs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),d=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(d,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var ef=["transitions"],He=Ie("vue-advanced-cropper"),Fs={name:"Cropper",components:{BackgroundWrapper:Wi},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return zs}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Wi}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return Ah.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=V(V({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},d=V({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(d.left=0,d.right=0),s.heightFrozen&&(d.top=0,d.bottom=0),ze.forEach(function(F){u[F]||(d[F]=0)});var h=De(a,d=$s({coordinates:a,directions:d,sizeRestrictions:s,positionRestrictions:r})).width,f=De(a,d).height,p=c.preserveRatio?G(a):Di(h/f,o);if(p){var y=c.respectDirection;if(y||(y=a.width>=a.height||p===1?"width":"height"),y==="width"){var g=h/p-a.height;if(u.top&&u.bottom){var v=d.top,b=d.bottom;d.bottom=$n(g,b,v),d.top=$n(g,v,b)}else u.bottom?d.bottom=g:u.top?d.top=g:u.right?d.right=0:u.left&&(d.left=0)}else if(y==="height"){var x=a.width-f*p;if(u.left&&u.right){var L=d.left,O=d.right;d.left=-$n(x,L,O),d.right=-$n(x,O,L)}else u.left?d.left=-x:u.right?d.right=-x:u.top?d.top=0:u.bottom&&(d.bottom=0)}d=$s({directions:d,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=De(a,d).width,f=De(a,d).height,(p=c.preserveRatio?G(a):Di(h/f,o))&&Math.abs(p-h/f)>.001&&ze.forEach(function(F){u[F]||(d[F]=0)}),Oi({event:new Ti({left:-d.left,top:-d.top}),coordinates:{width:n.width+d.right+d.left,height:n.height+d.top+d.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Oi},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=G(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=V(V({},n),_e({width:n.width,height:n.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=ce(a=be(a,yt(le(n),le(a))),Bn(Fe(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=V({},e);s.height=s.width/G(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Be(s,Math.max(r.height/s.height,r.width/s.width)));var a=vn(bt(r,Fe(s=Be(s,Mn(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ce(s=be(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(G(n)>G(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:W({},Cs)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Pi(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Pi(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:oe(this.minWidth)?0:En(this.minWidth),minHeight:oe(this.minHeight)?0:En(this.minHeight),maxWidth:oe(this.maxWidth)?1/0:En(this.maxWidth),maxHeight:oe(this.maxHeight)?1/0:En(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,d=V(V({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(d.maxWidth=Math.min(d.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(d.maxHeight=Math.min(d.maxHeight,c.bottom-c.top));var u=Li(r),h=Es(a,u);return u.width<1/0&&(!d.maxWidth||d.maxWidth>h.width)&&(d.maxWidth=Math.min(d.maxWidth,h.width)),u.height<1/0&&(!d.maxHeight||d.maxHeight>h.height)&&(d.maxHeight=Math.min(d.maxHeight,h.height)),d.minWidth>d.maxWidth&&(d.minWidth=d.maxWidth,d.widthFrozen=!0),d.minHeight>d.maxHeight&&(d.minHeight=d.maxHeight,d.heightFrozen=!0),d}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=Li(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:He(),image:ee(He("image"),this.imageClass),stencil:He("stencil"),boundaries:ee(He("boundaries"),this.boundariesClass),stretcher:ee(He("stretcher")),background:ee(He("background"),this.backgroundClass),foreground:ee(He("foreground"),this.foregroundClass),imageWrapper:ee(He("image-wrapper")),cropperWrapper:ee(He("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+Rs(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Vi(this.update,this.debounce),this.debouncedDisableTransitions=Vi(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Ot({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Ot({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ce(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:xn(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Th:this.autoZoom?zh:Fh);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!ks(s.visibleArea,e)||!ks(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=vh(e,ef),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,d=s.changed;o&&d&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&d&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return V(V({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=V(V({},n),{directions:V({},n.directions)});return ze.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=V(V({},n),{directions:V({},n.directions)});return Rh.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,d,u){var h=u.rotate,f=u.flip,p={width:d.naturalWidth,height:d.naturalHeight},y=vs(p,h),g=c.getContext("2d");c.height=y.height,c.width=y.width,g.save();var v=We(le(V({left:0,top:0},p)),h);return g.translate(-(v.left-y.width/2),-(v.top-y.height/2)),g.rotate(h*Math.PI/180),g.translate(f.horizontal?p.width:0,f.vertical?p.height:0),g.scale(f.horizontal?-1:1,f.vertical?-1:1),g.drawImage(d,0,0,p.width,p.height),g.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(d){return u=d,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=_e({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,d,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(p.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(p.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(p.fillStyle=f.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var y=u.left<0?-u.left:0,g=u.top<0?-u.top:0;p.drawImage(d,u.left+y,u.top+g,u.width,u.height,y*(c.width/u.width),g*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?Vh(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?xn(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Ph({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Oh:Lh);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=gt(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||Dh,s=[o,function(a){var c=a.coordinates;return W({},gt(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,it(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(gt(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,d=s.clientWidth,u=c,h=a.width*c/a.height;return h>d&&(h=d,u=a.height*d/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||_h;t.visibleArea=gt(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=V({},n),a=G(o),s.width/s.height!==a&&(s.height=s.width/a),ce(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ps(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},d=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&d(c)==d(s))}(this.src)){var n=oe(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){Qh(t).then(function(s){var a=Kh(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?ms(n)||!ps(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var d=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(d):d.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,gt(this.defaultTransforms)?this.appliedImageTransforms=Ui(this.defaultTransforms()):kn(this.defaultTransforms)?this.appliedImageTransforms=Ui(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Ui({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=W(W({},this.appliedImageTransforms),{},{flip:W({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:xn(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:xn(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Hh(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,d=a.coordinates;this.visibleArea=c,this.coordinates=d,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(oe(e)&&(e=oe(r)?s:r),oe(n)&&(n=oe(r)?a:r),!t&&(oe(e)||oe(n))){var d=this.getStencilSize(),u=d?G(d):null;oe(e)&&(e=gs(u)?u:void 0),oe(n)&&(n=gs(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Di(G(r=gt(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=_e({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=_e({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:G(r),maximum:G(r)}})),r;var t,e,n,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return W({},Cs)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=Uh({flip:{horizontal:t?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,d=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=d,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=qh({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,d=this.processAutoZoom("rotateImage",a,c);a=d.visibleArea,c=d.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},tf={key:0,ref:"canvas",style:{display:"none"}},nf={key:1,ref:"sourceCanvas",style:{display:"none"}};Fs.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",tf,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",nf,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const of={class:"background-container"},rf={class:"tools-line"},sf={class:"line-block"},af={class:"dialog-footer"},ji=M(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=gi.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),d=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{d.value=!0;const y=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),y&&y.canvas.toBlob(g=>{var v;o("crop",{blob:g,src:(v=y.canvas)==null?void 0:v.toDataURL()})}),d.value=!1},p=y=>{var g;c.value=y.coordinates,u.value=(g=y.canvas)==null?void 0:g.toDataURL()};return(y,g)=>{const v=et,b=i.resolveComponent("el-form-item"),x=i.resolveComponent("el-form"),L=i.resolveComponent("el-button"),O=Dt;return i.openBlock(),i.createBlock(O,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",of,[i.createElementVNode("div",rf,[i.createElementVNode("div",sf,[i.createVNode(x,null,{default:i.withCtx(()=>[i.createVNode(b,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(v,{modelValue:i.unref(s),"onUpdate:modelValue":g[0]||(g[0]=F=>i.isRef(s)?s.value=F:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>g[1]||(g[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(Fs),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:p},null,8,["src","stencil-props"]),i.createElementVNode("div",af,[i.createVNode(L,{loading:i.unref(d),type:"success",onClick:f},{default:i.withCtx(()=>g[2]||(g[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-0707c63d"]]),Ds=M(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=we,d=pe,u=nt;return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:s.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(d,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(d,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-435691bb"]]),lf={class:"mainblock"},cf={class:"mainline"},Ls=M(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",lf,[i.createElementVNode("div",cf,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-a4bc6b16"]]),df={class:"message-title"},uf={class:"message-text"},In=M(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",df,i.toDisplayString(t.title),1),i.createElementVNode("div",uf,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-e3c1e672"]]),hf=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function ff(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const Os=M(hf,[["render",ff]]),mf=i.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),pf=["for"],gf={class:"inside-icon"};function yf(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",gf,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,pf),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-50a7d390><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-50a7d390></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-50a7d390></path></symbol></svg>',1))],64)}const _s=M(mf,[["render",yf],["__scopeId","data-v-50a7d390"]]),wf={width:"0",height:"0",class:"hidden"};function bf(t,e){return i.openBlock(),i.createElementBlock("svg",wf,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-left"},[i.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})],-1)]))}const Sf={render:bf},Cf={width:"0",height:"0",class:"hidden"};function kf(t,e){return i.openBlock(),i.createElementBlock("svg",Cf,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-right"},[i.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})],-1)]))}const Ef={render:kf},vf={class:"tab"},Mf={class:"rotate"},Bf={key:0,class:"icon-arrow"},xf={key:1,class:"icon-arrow"},Hs=M(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",vf,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",Mf,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createElementBlock("svg",xf,r[1]||(r[1]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]))):(i.openBlock(),i.createElementBlock("svg",Bf,r[0]||(r[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(i.unref(Sf)),i.createVNode(i.unref(Ef))],64))}}),[["__scopeId","data-v-2371e4d8"]]),$f={class:"add-block_body"},qs=M(i.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=yn;return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",$f,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-b93bc8b1"]]),Zi=M(i.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b89bdc7a"]]),Nf={class:"add-block_body"},Us=M(i.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=yn,r=Zi;return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Nf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-e59e418e"]]),If={class:"del-block_title"},Rf={class:"del-block_body"},Ws=M(i.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",If,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",Rf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-362b7b0d"]]),Af=["onClick"],Gs=M(i.defineComponent({__name:"PTabs",props:{tabs:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.tabs[0]),s=i.ref(window.innerWidth),a=i.ref(),c=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),d=()=>{s.value=window.innerWidth,c.value=a.value?a.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",d)),i.onUnmounted(()=>window.removeEventListener("resize",d));const u=i.computed(()=>`calc(100% - ${c.value}px + 1px)`),h=f=>{r.value=f,o("select",f)};return(f,p)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:a,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.tabs,y=>(i.openBlock(),i.createElementBlock("div",{key:y.id},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":y.id===i.unref(r).id,tab:i.unref(r).id!==y.id}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:g=>h(y)},i.toDisplayString(y.name),15,Af)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(u)})},[i.renderSlot(f.$slots,"default",{},void 0,!0)],4)],4))}}),[["__scopeId","data-v-5a83fbbf"]]),Vf=["id"],Pf=["for"],Tf={class:"left-field"},zf=["href","download"],Ff={key:1,class:"text-field__input"},Df={class:"right-field"},Lf=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new ie},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(t,{emit:e}){const n=t,o=e,r=q.CreateGuid(),s=q.CreateGuid(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!d(h.name)){R.Notification.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const d=u=>{let h=Br.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=we,p=Dn,y=pe;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,Vf),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Pf)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Tf,[i.createVNode(p,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,zf),i.createVNode(y,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Ft,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",Ff,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",Df,[i.createVNode(y,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),js=M(Lf,[["__scopeId","data-v-88abe1df"]]),Of={class:"bg"},Yi=M(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{R.Auth.Form.IsLogin()&&Ke.ToHome()};return(n,o)=>{const r=wn;return i.openBlock(),i.createElementBlock("div",Of,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-14e033ce"]]),_f=Object.freeze(Object.defineProperty({__proto__:null,default:Yi},Symbol.toStringTag,{value:"Module"})),Hf={},qf={style:{"text-align":"center"}};function Uf(t,e){return i.openBlock(),i.createElementBlock("div",qf,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const Ji=M(Hf,[["render",Uf]]),Wf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),Gf={class:"container"},jf={key:0,class:"result"},Zf={class:"list"},Yf=["onClick"],Xi=M(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function d(u){n("select",u)}return(u,h)=>{const f=Mi,p=qe;return i.openBlock(),i.createElementBlock("div",Gf,[i.createVNode(p,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>i.isRef(r)?r.value=y:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",jf,[i.createElementVNode("ul",Zf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),y=>(i.openBlock(),i.createElementBlock("li",{key:y.value,onClick:g=>d(y)},i.toDisplayString(y.label),9,Yf))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-58b78c5c"]]),Jf={class:"footer"},Zs=M(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(R.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=In,s=pe;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(R)).Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",Jf,[i.createVNode(s,{type:"primary",text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PHelp"in n?n.PHelp:i.unref(R)).Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PHelp"in n?n.PHelp:i.unref(R)).Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-cbdf027e"]]),Xf={};function Qf(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const Ys=M(Xf,[["render",Qf],["__scopeId","data-v-879cfd55"]]),Js=M(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(R.Notification.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=In;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(R)).Notification.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(R)).Notification.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(R)).Notification.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-e8d26012"]]),Kf={style:{display:"flex","justify-content":"center",width:"100%"}},em={class:"pag-number"},tm={class:"pag-ul"},nm={key:2},Xs=M(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=y=>y?"active":"neutral",r=y=>y?"not-active":"neutral",s=R.Paginator,a=i.ref(!1),c=i.ref(!1),d=e;s.count=n.store.Count();const u=async y=>{if(y!==s.curPage){if(y<1&&(y=1),y>s.pagesCount()&&(y=s.pagesCount()),!n.showConfirm)return await h(y);R.Dialog.Save().then(async()=>{d("save"),await h(y)}).catch(async()=>{R.Notification.Warning("Изменения не были сохранены"),d("cancel"),await h(y)})}},h=async(y,g)=>{s.setCurPage(y),K.Get().p.offset=(y-1)*s.limit,await n.store.FTSP(),p()},f=i.computed(()=>{const y=s.pagesCount();return y<8?Ae.GenerateNumsRange(2,y-1).filter(g=>g<y&&g>1):Ae.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(g=>g<y&&g>1)}),p=()=>{const y=document.querySelector(".el-table__body-wrapper"),g=document.querySelector("#list");y?y.scrollTo({top:0}):g&&g.scrollTo({top:0})};return i.onBeforeUnmount(()=>{K.Get().p.drop()}),(y,g)=>{const v=Bi,b=pe,x=$i,L=Ii,O=Ni,F=xi;return i.openBlock(),i.createElementBlock("div",Kf,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",em,[i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:g[0]||(g[0]=T=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(v)]),_:1},8,["type"]),i.createElementVNode("ul",tm,[i.createElementVNode("li",null,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:g[1]||(g[1]=T=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:g[3]||(g[3]=T=>a.value=!0),onMouseleave:g[4]||(g[4]=T=>a.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[2]||(g[2]=T=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(x,{key:0})):(i.openBlock(),i.createBlock(L,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),T=>(i.openBlock(),i.createElementBlock("li",{key:T},[i.createVNode(b,{skin:"pag",type:o(T===i.unref(s).curPage),text:T,onClick:Ee=>u(T)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:g[6]||(g[6]=T=>c.value=!0),onMouseleave:g[7]||(g[7]=T=>c.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[5]||(g[5]=T=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(O,{key:0})):(i.openBlock(),i.createBlock(L,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",nm,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:g[8]||(g[8]=T=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:g[9]||(g[9]=T=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(F)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-6645cd2f"]]),Qs=M(i.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=bi.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(p=>p.key===n.keyValue);return f&&(a.searchGroup=f),await bi.Search(a),a.searchObjects},d=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const p=Xi;return i.openBlock(),i.createBlock(p,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=y=>i.isRef(r)?r.value=y:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:d,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-11ab26af"]]),im={class:"mainblock-body"},om={class:"mainblock-footer"},Ks=M(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",im,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",om,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-a670fb4a"]]),rm={class:"right-slider-content"},sm={class:"right-slider-content-header"},am={class:"right-slider-content-box"},lm={class:"right-slider-button"},ea=M(i.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const d=we;return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(d,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(d,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",rm,[i.createElementVNode("div",sm,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",am,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",lm,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-495a90f9"]]),cm={class:"mainblock"},dm={class:"body-block"},um={class:"tab-block"},ta=M(i.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=d=>{o("toggle",d)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(d,u)=>(i.openBlock(),i.createElementBlock("div",cm,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(d.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(d.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",dm,[i.renderSlot(d.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",um,[i.renderSlot(d.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-eaeca0cc"]]),hm={class:"mainblock"},fm={class:"body"},mm={key:0,class:"title"},pm={class:"title-line"},gm={class:"icon-filter",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},ym={key:0,class:"help-block"},wm={key:0,class:"title"},bm={class:"title-line"},Sm={class:"icon-download",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},Cm={key:1,class:"icons"},na=M(i.defineComponent({__name:"RSContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"6000px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!1),r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 6000px)").matches),a=()=>{o.value=!1,r.value=!1},c=()=>{o.value=!o.value},d=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 6000px)").matches}),n.value=!0}),(u,h)=>{const f=vi,p=pe,y=Ei;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",hm,[o.value|r.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:h[0]||(h[0]=g=>a())})):i.createCommentVNode("",!0),i.createElementVNode("div",fm,[i.createElementVNode("div",{class:"visability-block",style:i.normalizeStyle({maxWidth:s.value?"100%":"300px"})},[i.renderSlot(u.$slots,"visability",{},void 0,!0)],4),i.createElementVNode("div",{class:"filter-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"10px":"",right:s.value?"0px":"",width:(s.value,"100%"),zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0",marginRight:s.value?o.value?"0":"-200%":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:(s.value,"rgba(0, 0, 0, 0.35) 0px 5px 5px"),height:(s.value,"60vh")})},[s.value?(i.openBlock(),i.createElementBlock("div",mm,[i.createElementVNode("div",pm,[(i.openBlock(),i.createElementBlock("svg",gm,h[5]||(h[5]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",style:{marginRight:"5px"},onClick:h[1]||(h[1]=g=>c())},h[6]||(h[6]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))]),i.renderSlot(u.$slots,"title-tools",{},void 0,!0)])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"filter",{},void 0,!0)],4),s.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ym)),i.createElementVNode("div",{class:"download-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"60px":"",right:s.value?"0px":"",width:s.value?"77px":"",zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0 0 0 10px",marginRight:s.value?r.value?"-2px":"-130px":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:s.value?"rgba(0, 0, 0, 0.35) 0px 5px 5px":"",height:s.value?"150px":""})},[s.value?(i.openBlock(),i.createElementBlock("div",wm,[i.createElementVNode("div",bm,[(i.openBlock(),i.createElementBlock("svg",Sm,h[7]||(h[7]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",onClick:h[2]||(h[2]=g=>d())},h[8]||(h[8]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))])])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"download",{},void 0,!0)],4),s.value?(i.openBlock(),i.createElementBlock("div",Cm,[i.createVNode(p,{skin:"icon",margin:"0 0 0 10px",onClick:h[3]||(h[3]=g=>c())},{default:i.withCtx(()=>[i.createVNode(f,{color:"#006BB4"})]),_:1}),i.createVNode(p,{skin:"icon",margin:"13px 0 0 10px",onClick:h[4]||(h[4]=g=>d())},{default:i.withCtx(()=>[i.createVNode(y,{color:"#006BB4"})]),_:1})])):i.createCommentVNode("",!0)])]),h[9]||(h[9]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M12 10.5857L16.95 5.63574L18.364 7.04974L13.414 11.9997L18.364 16.9497L16.95 18.3637L12 13.4137L7.04999 18.3637L5.63599 16.9497L10.586 11.9997L5.63599 7.04974L7.04999 5.63574L12 10.5857Z"})])],-1))],64)}}}),[["__scopeId","data-v-468150ac"]]),km=["label","value"],ia=M(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[fe.String]:"Текстовый ответ",[fe.Text]:"Развёрнутый текстовый ответ",[fe.Number]:"Числовой ответ",[fe.Date]:"Ответ в виде даты",[fe.Radio]:"Выбор одного из вариантов",[fe.Set]:"Выбор нескольких вариантов",[fe.File]:"Ответ в виде файла",[fe.MatrixRadio]:"Матрица с одним выбором",[fe.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=we,d=et;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(d,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,km)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-6be05cd5"]]),Em={class:"field"},oa=M(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),d=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const p=we,y=i.resolveComponent("el-input"),g=i.resolveComponent("el-form-item"),v=i.resolveComponent("el-form"),b=pe;return i.openBlock(),i.createBlock(v,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(nt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:d},{"open-inside-content":i.withCtx(()=>[i.createVNode(nt,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:i.withCtx(()=>[i.createElementVNode("div",Em,[i.createVNode(v,null,{default:i.withCtx(()=>[i.createVNode(g,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(b,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(p,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(p,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-890163ac"]]),vm=["label","value"],ra=M(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Te.GetDefault(),K.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Te.GetDefault(),K.Get().setSortModel(r.value),K.Get().p.drop(),o("load")},a=async c=>{K.Get().p.drop(),await s(c)};return(c,d)=>{var h;const u=et;return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":d[0]||(d[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:d[1]||(d[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(f,p)=>(i.openBlock(),i.createElementBlock("option",{key:p,label:f.label,value:f},null,8,vm))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03971699"]]),Mm=["label","value"],sa=M(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Te.GetDefault()});const r=async a=>{a||(o.value=Te.GetDefault()),K.Get().setSortModel(o.value),K.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const d=et;return i.openBlock(),i.createBlock(d,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,Mm))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-98d731ba"]]),Bm={class:"switch-container"},xm={class:"line"},$m={class:"line"},aa=M(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var y;return{color:(y=u.value)!=null&&y.valueEq(f)?"#006bb4":"#B0A4C0"}},d=e,u=i.ref(void 0),h=async f=>{var p;(p=u.value)!=null&&p.valueEq(f)||(K.Get().replaceF(f,u.value),u.value=f,d("load"))};return(f,p)=>{const y=we;return i.openBlock(),i.createElementBlock("div",Bm,[i.createElementVNode("div",xm,[i.createVNode(y,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:p[0]||(p[0]=g=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(y,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:p[1]||(p[1]=g=>h())},null,8,["style"]),i.createVNode(y,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:p[2]||(p[2]=g=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",$m,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:p[3]||(p[3]=g=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:p[4]||(p[4]=g=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:p[5]||(p[5]=g=>h(t.secondModel))},null,6),p[6]||(p[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-4776a738"]]),Nm={},Im={class:"flex"};function Rm(t,e){return i.openBlock(),i.createElementBlock("div",Im,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const la=M(Nm,[["render",Rm],["__scopeId","data-v-4d1abb74"]]),ca=M(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=we,d=pe,u=Lt,h=nt;return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(d,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-994f6522"]]),Am={class:"top-slider-content"},Vm={class:"center"},da=M(i.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(d=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",Am,[i.createElementVNode("div",Vm,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=d=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-fec4dfde"]]),Pm={id:"drop-area",class:"img-container"},Tm={key:0},zm=["src"],Fm={class:"tools-button"},Dm={class:"ins"},Lm={key:1},Om=["id"],ua=M(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:ie,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=q.CreateGuid(),a=i.ref(!1),c=i.ref(),d=b=>{const x=n.cropRatio?n.defaultRatio:0;gi.Open(bn.CreateCropper(b.url,x,n.fileInfo.id)),a.value=!0},u=()=>{R.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=b=>{n.fileInfo.setFile(b),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const b=document.getElementById("drop-area");b&&(b.addEventListener("dragover",x=>{p(x),b.classList.add("drag-over")}),b.addEventListener("dragleave",x=>{p(x),b.classList.remove("drag-over")}),b.addEventListener("dragenter",p),b.addEventListener("dragleave",p),b.addEventListener("drop",g),f=document.getElementById(s))});function p(b){b.preventDefault(),b.stopPropagation()}const y=()=>{f&&f.click()};function g(b){if(b.preventDefault(),!b.dataTransfer)return;const x=b.dataTransfer.files;x.length&&f&&(f.files=x,v())}const v=()=>{if(!f||!f.files||!f.files.length)return;const b=f.files[0];b.url=URL.createObjectURL(b),r.value=b,n.fileInfo.uploadNewFile(b),d(r.value)};return(b,x)=>{const L=pe,O=ji;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Pm,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",Tm,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,zm)],4),i.createElementVNode("div",Fm,[i.createElementVNode("div",Dm,[i.createVNode(L,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:x[0]||(x[0]=F=>d(i.unref(r)))}),i.createVNode(L,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:x[1]||(x[1]=F=>u())})])])])):(i.openBlock(),i.createElementBlock("div",Lm,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(L,{skin:"text",text:"Добавить","font-size":"20px",onClick:y})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:v},null,40,Om),t.withCrop?(i.openBlock(),i.createBlock(O,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:x[2]||(x[2]=F=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-61aa63c7"]]),_m=["Passport","PassportScan"],Hm=[...["PassportsStore","PassportScansStore"],_m],qm=["BaseStore","Contact","Static","Button","RouterGuard","Sizes","Human","FileInfo","Statuses","Email","FTSP","Arrays","Axios","brandColors","buildNameNumbers","Cache","CarouselSwipe","ClassHelper","Color","countRating","CreateSortModels","Cursor","DateFormat","DateMask","Dates","DatesFormatter","Dragger","Favourite","Extension","HttpClient","MakeCarousel","moveUp","moveDown","Period","PhoneService","Router","Scheduler","Scroll","Sorter","Strings","Time","TimeFormatter","Token","useConfirmLeavePage","validate","WaitElement","WebSocketClient","Hooks","ValueType","PHelp","FilterModel","SortModel"],Um=["AuthStore","ContactsStore","CropperStore","EmailsStore","FileInfosStore","FTSPPresetsStore","MenusStore","HumansStore","SchemasStore","PhonesStore","SearchStore","UserAccountsStore","ValueTypesStore"],Wm=["Orders"];class Gm extends nn{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Ro);l(this,"method",lt.Login);l(this,"id","field-auth-login")}}class Qi{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");E.BuildClass(this,e)}static Create(e,n){const o=new Qi;return o.id=E.CreateUUID(),o.name=e,o.label=n,o}}let jm=class extends Y{constructor(){super(Qi,"extracts")}};const Zm=new jm;class St{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);E.BuildClass(this,e)}static Create(e){const n=new St;return n.id=E.CreateUUID(),n.fieldId=e,n}}let Ym=class extends Y{constructor(){super(St,"answer-variants")}};const Jm=new Ym;class ha{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new ie);E.BuildClass(this,e)}}class Ct{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");E.BuildClass(this,e)}static Create(e,n){const o=new Ct;return o.id=de(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var Xm=Object.defineProperty,fa=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Xm(e,n,r),r};const Ki=class lo{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new ie);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);E.BuildClass(this,e)}static Create(e,n){const o=new lo;return o.id=de(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.filled=this.valueString.length>0}setNumber(e){this.valueNumber=e,this.filled=!0}setOther(e){this.valueOther=e,this.filled=this.valueOther.length>0}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(o=>lo.Create(o,n))}addFile(){const e=new ha;return e.id=de(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const o=Ct.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=Ct.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===n.id):!1}};fa([E.GetClassConstructor(Ct)],Ki.prototype,"selectedAnswerVariants"),fa([E.GetClassConstructor(ha)],Ki.prototype,"answerFiles");let Ht=Ki,Qm=class extends Y{constructor(){super(Ht,"field-fills")}};const Km=new Qm;class ep{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");E.BuildClass(this,e)}}class ma{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);E.BuildClass(this,e)}}class qt{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");E.BuildClass(this,e)}static Create(e){const n=new qt;return n.id=E.CreateUUID(),n.fieldId=e,n}}var tp=Object.defineProperty,Ut=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tp(e,n,r),r};const ot=class Pn{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new Hn);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);E.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new Pn;return n.id=E.CreateUUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(o=>o.id===e);return n?n.name:""}addRadioItem(e){const n=new St(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(o=>o.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ma(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new qt)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=St.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=Pn.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=qt.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new Pn(this);return e.id=E.CreateUUID(),e.answerVariants.forEach(n=>{n.id=E.CreateUUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const o=n.copy();return o.parentId=e.id,o}),e}};Ut([E.GetClassConstructor(St)],ot.prototype,"answerVariants"),Ut([E.GetClassConstructor(ep)],ot.prototype,"fieldExamples"),Ut([E.GetClassConstructor(qt)],ot.prototype,"fieldVariants"),Ut([E.GetClassConstructor(ma)],ot.prototype,"fieldMeasures"),Ut([E.GetClassConstructor(ot)],ot.prototype,"children");let eo=ot,np=class extends Y{constructor(){super(eo,"fields")}};const ip=new np;var op=Object.defineProperty,rp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&op(e,n,r),r};const pa=class Ta{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");E.BuildClass(this,e)}static Create(e){const n=new Ta;return n.id=E.CreateUUID(),n.formId=e.id,n.fieldFills.push(...Ht.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(o=>o.fieldId===e)}pushRegisterProperty(e){const n=new Ht;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=Ht.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.fieldVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};rp([E.GetClassConstructor(Ht)],pa.prototype,"fieldFills");let sp=pa,ap=class extends Y{constructor(){super(sp,"form-fills")}};const lp=new ap;var cp=Object.defineProperty,dp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&cp(e,n,r),r};const ga=class za{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");E.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new za;return n.id=E.CreateUUID(),n.formId=e,n}addField(){const e=eo.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};dp([E.GetClassConstructor(eo)],ga.prototype,"fields");let to=ga,up=class extends Y{constructor(){super(to,"form-sections")}};const hp=new up;var fp=Object.defineProperty,mp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&fp(e,n,r),r};const ya=class Fa{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);E.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Fa;return e.id=E.CreateUUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=to.Create(this.id);return this.formSections.push(e),$r.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};mp([E.GetClassConstructor(to)],ya.prototype,"formSections");let pp=ya,gp=class extends Y{constructor(){super(pp,"forms")}};const yp=new gp;let wp=class extends Y{constructor(){super(Ct,"selected-answer-variants")}};const bp=new wp;class Wt{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new ie);l(this,"order",0);E.BuildClass(this,e)}static Create(e){const n=new Wt;return n.id=E.CreateUUID(),n.passportId=e,n}}var Sp=Object.defineProperty,Cp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Sp(e,n,r),r};class no{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);E.BuildClass(this,e)}}Cp([E.GetClassConstructor(Wt)],no.prototype,"passportScans");let kp=class extends Y{constructor(){super(Wt,"passport-scans")}};const Ep=new kp;class vp extends Y{constructor(){super(no,"passports")}}const Mp=new vp,Bp={install:function(t){t.component("PButton",pe),t.component("PCheckBox",Fn),t.component("PDatePicker",go),t.component("PFlex",Dn),t.component("PInput",qe),t.component("PInputDate",mi),t.component("PInputNumber",Nr),t.component("PLeftSlider",Ir),t.component("PList",Rr),t.component("PListItem",Ar),t.component("PRadio",Vr),t.component("PRightSlider",Pr),t.component("PSelect",et),t.component("PSticky",yn),t.component("PString",we),t.component("PTextarea",Tr),t.component("PTopSlider",zr),t.component("IconDownload",Ei),t.component("IconFilter",vi),t.component("ArrowLeft",Bi),t.component("ArrowRight",xi),t.component("DoubleArrowLeft",$i),t.component("DoubleArrowRight",Ni),t.component("EllipsisSvg",Ii),t.component("IconArrowLeft",ss),t.component("IconCheckDefault",zn),t.component("IconClose",Ft),t.component("IconEdit",as),t.component("IconEmail",ls),t.component("IconMove",cs),t.component("IconPhone",ds),t.component("IconSearch",Mi),t.component("IconSelectArrow",pi),t.component("CollapseContainer",Os),t.component("CollapseItem",_s),t.component("VerticalCollapseContainer",Hs),t.component("PAdd",qs),t.component("PContainer",Zi),t.component("PContainerStickyHead",Us),t.component("PDel",Ws),t.component("PTabs",Gs),t.component("UploaderFile",js),t.component("AuthForm",wn),t.component("PModal",Dt),t.component("AuthPage",Yi),t.component("PageNotFound",Ji),t.component("AdaptiveContainer",co),t.component("AdaptiveContainerHorizontal",uo),t.component("AdminGallery",po),t.component("AuthModal",Fr),t.component("CarouselImages",Dr),t.component("ContactForm",Jr),t.component("ContextWindow",Xr),t.component("DateInputRangeV2",Kr),t.component("DateInputRange",Qr),t.component("DropList",es),t.component("EmailForm",Ci),t.component("FilterCheckbox",ts),t.component("FiltersButtonsSelect",ns),t.component("FilterSelect",is),t.component("FTSPPanel",os),t.component("GeneralItem",rs),t.component("GridContainer",Lt),t.component("ImageCropper",ji),t.component("InfoItem",nt),t.component("InfoItemSelectButtons",Ds),t.component("LeftRightContainer",Ls),t.component("MessageBody",In),t.component("PAutocomplete",Xi),t.component("PDialog",Zs),t.component("PhoneForm",ki),t.component("PLoader",Ys),t.component("PNotification",Js),t.component("PPagination",Xs),t.component("RemoteSearch",Qs),t.component("ResearcheContainer",Ks),t.component("RightSliderContainer",ea),t.component("RightTabsContainer",ta),t.component("RSContainer",na),t.component("SelectValueType",ia),t.component("SingleNameToggleForm",oa),t.component("SortList",ra),t.component("SortSelect",sa),t.component("Switch3Pos",aa),t.component("ThemeWrapper",la),t.component("ToggleInfoItem",ca),t.component("TopSliderContainer",da),t.component("UploaderImage",ua)}};m.AdaptiveContainer=co,m.AdaptiveContainerHorizontal=uo,m.AdminGallery=po,m.AnswerVariantsStore=Jm,m.Arrays=Ae,m.ArrowLeft=Bi,m.ArrowRight=xi,m.Auth=Po,m.AuthButtonLogin=qn,m.AuthButtonRegister=Un,m.AuthForm=wn,m.AuthFormSettings=Vo,m.AuthFormStatuses=Se,m.AuthMethods=lt,m.AuthModal=Fr,m.AuthPage=Yi,m.AuthStore=xu,m.Axios=zt,m.BaseStore=Y,m.Button=Ye,m.Cache=Rd,m.CarouselImages=Dr,m.CarouselSwipe=Ad,m.ClassHelper=E,m.CollapseContainer=Os,m.CollapseItem=_s,m.Color=Pd,m.Contact=at,m.ContactForm=Jr,m.ContactsStore=Nu,m.ContextWindow=Xr,m.CreateSortModels=No,m.CropperStore=gi,m.Cursor=zd,m.DateFormat=ht,m.DateInputRange=Qr,m.DateInputRange_v2=Kr,m.DateMask=qd,m.Dates=ui,m.DatesFormatter=Ve,m.DoubleArrowLeft=$i,m.DoubleArrowRight=Ni,m.Dragger=Ud,m.DropList=es,m.EllipsisSvg=Ii,m.Email=Ze,m.EmailField=on,m.EmailForm=Ci,m.EmailsStore=Lr,m.Extension=Br,m.ExtractsStore=Zm,m.FTSP=K,m.FTSPPanel=os,m.FTSPPresetsStore=Tu,m.Favourite=Wd,m.FieldFillsStore=Km,m.FieldsStore=ip,m.FileInfo=ie,m.FileInfosStore=Vu,m.FilterCheckbox=ts,m.FilterModel=On,m.FilterSelect=is,m.FiltersButtonsSelect=ns,m.FormFillsStore=lp,m.FormSectionsStore=hp,m.FormsStore=yp,m.GeneralItem=rs,m.GridContainer=Lt,m.Hooks=oc,m.HttpClient=ae,m.Human=_n,m.HumansStore=Fu,m.IconArrowLeft=ss,m.IconCheckDefault=zn,m.IconClose=Ft,m.IconDownload=Ei,m.IconEdit=as,m.IconEmail=ls,m.IconFilter=vi,m.IconMove=cs,m.IconPhone=ds,m.IconSearch=Mi,m.IconSelectArrow=pi,m.ImageCropper=ji,m.InfoItem=nt,m.InfoItemSelectButtons=Ds,m.LeftRightContainer=Ls,m.LoginField=Gm,m.MakeCarousel=xr,m.MenusStore=Ju,m.MessageBody=In,m.Orders=Pe,m.PAdd=qs,m.PAutocomplete=Xi,m.PButton=pe,m.PCheckBox=Fn,m.PContainer=Zi,m.PContainerStickyHead=Us,m.PDatePicker=go,m.PDel=Ws,m.PDialog=Zs,m.PFlex=Dn,m.PHelp=R,m.PInput=qe,m.PInputDate=mi,m.PInputNumber=Nr,m.PLeftSlider=Ir,m.PList=Rr,m.PListItem=Ar,m.PLoader=Ys,m.PModal=Dt,m.PNotification=Js,m.PPagination=Xs,m.PRadio=Vr,m.PRightSlider=Pr,m.PSelect=et,m.PSticky=yn,m.PString=we,m.PTabs=Gs,m.PTextarea=Tr,m.PTopSlider=zr,m.PageNotFound=Ji,m.Passport=no,m.PassportScan=Wt,m.PassportScansStore=Ep,m.PassportsStore=Mp,m.PasswordField=rn,m.PasswordRepeatField=Ao,m.Period=xt,m.PhoneForm=ki,m.PhoneService=hi,m.PhonesStore=Gr,m.RSContainer=na,m.RemoteSearch=Qs,m.ResearcheContainer=Ks,m.RightSliderContainer=ea,m.RightTabsContainer=ta,m.Router=Ke,m.RouterGuard=Yd,m.Scheduler=Jd,m.SchemasStore=nh,m.Scroll=Qd,m.SearchStore=bi,m.SelectValueType=ia,m.SelectedAnswerVariantsStore=bp,m.SingleNameToggleForm=oa,m.Sizes=Tn,m.SortList=ra,m.SortModel=en,m.SortSelect=sa,m.Sorter=$r,m.Static=fi,m.Statuses=ue,m.Strings=q,m.Switch3Pos=aa,m.ThemeWrapper=la,m.Time=_,m.Timer=Nt,m.ToggleInfoItem=ca,m.Token=Tt,m.TopSliderContainer=da,m.UploaderFile=js,m.UploaderImage=ua,m.UserAccountsStore=ah,m.ValueType=Hn,m.ValueTypesStore=ch,m.VerticalCollapseContainer=Hs,m.WaitElement=eu,m.WebSocketClient=nu,m.brandColors=Nd,m.buildNameNumbers=Id,m.classesNames=Da,m.countRating=Td,m.modulesNames=Hm,m.moveDown=jd,m.moveUp=Gd,m.servicesComponents=Bp,m.servicesNames=qm,m.servicesStoresNames=Um,m.typesNames=Wm,m.useConfirmLeavePage=Lo,m.validate=Kd,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
42
|
+
`.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+Rs(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Ps.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var Ts={components:{Preview:Ps},inheritAttrs:!1};Ts.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Gi=Ie("vue-rectangle-stencil"),zs={name:"RectangleStencil",components:{StencilPreview:Ts,BoundingBox:Ns,DraggableArea:Is},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return _i}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Hi}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:ee(Gi({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:ee(Gi("preview"),this.previewClass),boundingBox:ee(Gi("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};zs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),d=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(d,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var ef=["transitions"],He=Ie("vue-advanced-cropper"),Fs={name:"Cropper",components:{BackgroundWrapper:Wi},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return zs}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Wi}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return Ah.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=V(V({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},d=V({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(d.left=0,d.right=0),s.heightFrozen&&(d.top=0,d.bottom=0),ze.forEach(function(F){u[F]||(d[F]=0)});var h=De(a,d=$s({coordinates:a,directions:d,sizeRestrictions:s,positionRestrictions:r})).width,f=De(a,d).height,p=c.preserveRatio?G(a):Di(h/f,o);if(p){var y=c.respectDirection;if(y||(y=a.width>=a.height||p===1?"width":"height"),y==="width"){var g=h/p-a.height;if(u.top&&u.bottom){var v=d.top,b=d.bottom;d.bottom=$n(g,b,v),d.top=$n(g,v,b)}else u.bottom?d.bottom=g:u.top?d.top=g:u.right?d.right=0:u.left&&(d.left=0)}else if(y==="height"){var x=a.width-f*p;if(u.left&&u.right){var L=d.left,O=d.right;d.left=-$n(x,L,O),d.right=-$n(x,O,L)}else u.left?d.left=-x:u.right?d.right=-x:u.top?d.top=0:u.bottom&&(d.bottom=0)}d=$s({directions:d,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=De(a,d).width,f=De(a,d).height,(p=c.preserveRatio?G(a):Di(h/f,o))&&Math.abs(p-h/f)>.001&&ze.forEach(function(F){u[F]||(d[F]=0)}),Oi({event:new Ti({left:-d.left,top:-d.top}),coordinates:{width:n.width+d.right+d.left,height:n.height+d.top+d.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Oi},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=G(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=V(V({},n),_e({width:n.width,height:n.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=ce(a=be(a,yt(le(n),le(a))),Bn(Fe(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=V({},e);s.height=s.width/G(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Be(s,Math.max(r.height/s.height,r.width/s.width)));var a=vn(bt(r,Fe(s=Be(s,Mn(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ce(s=be(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(G(n)>G(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:W({},Cs)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Pi(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Pi(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:oe(this.minWidth)?0:En(this.minWidth),minHeight:oe(this.minHeight)?0:En(this.minHeight),maxWidth:oe(this.maxWidth)?1/0:En(this.maxWidth),maxHeight:oe(this.maxHeight)?1/0:En(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,d=V(V({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(d.maxWidth=Math.min(d.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(d.maxHeight=Math.min(d.maxHeight,c.bottom-c.top));var u=Li(r),h=Es(a,u);return u.width<1/0&&(!d.maxWidth||d.maxWidth>h.width)&&(d.maxWidth=Math.min(d.maxWidth,h.width)),u.height<1/0&&(!d.maxHeight||d.maxHeight>h.height)&&(d.maxHeight=Math.min(d.maxHeight,h.height)),d.minWidth>d.maxWidth&&(d.minWidth=d.maxWidth,d.widthFrozen=!0),d.minHeight>d.maxHeight&&(d.minHeight=d.maxHeight,d.heightFrozen=!0),d}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=Li(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:He(),image:ee(He("image"),this.imageClass),stencil:He("stencil"),boundaries:ee(He("boundaries"),this.boundariesClass),stretcher:ee(He("stretcher")),background:ee(He("background"),this.backgroundClass),foreground:ee(He("foreground"),this.foregroundClass),imageWrapper:ee(He("image-wrapper")),cropperWrapper:ee(He("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+Rs(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Vi(this.update,this.debounce),this.debouncedDisableTransitions=Vi(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Ot({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Ot({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ce(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:xn(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Th:this.autoZoom?zh:Fh);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!ks(s.visibleArea,e)||!ks(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=vh(e,ef),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,d=s.changed;o&&d&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&d&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return V(V({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=V(V({},n),{directions:V({},n.directions)});return ze.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=V(V({},n),{directions:V({},n.directions)});return Rh.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,d,u){var h=u.rotate,f=u.flip,p={width:d.naturalWidth,height:d.naturalHeight},y=vs(p,h),g=c.getContext("2d");c.height=y.height,c.width=y.width,g.save();var v=We(le(V({left:0,top:0},p)),h);return g.translate(-(v.left-y.width/2),-(v.top-y.height/2)),g.rotate(h*Math.PI/180),g.translate(f.horizontal?p.width:0,f.vertical?p.height:0),g.scale(f.horizontal?-1:1,f.vertical?-1:1),g.drawImage(d,0,0,p.width,p.height),g.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(d){return u=d,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=_e({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,d,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(p.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(p.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(p.fillStyle=f.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var y=u.left<0?-u.left:0,g=u.top<0?-u.top:0;p.drawImage(d,u.left+y,u.top+g,u.width,u.height,y*(c.width/u.width),g*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?Vh(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?xn(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Ph({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Oh:Lh);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=gt(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||Dh,s=[o,function(a){var c=a.coordinates;return W({},gt(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,it(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(gt(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,d=s.clientWidth,u=c,h=a.width*c/a.height;return h>d&&(h=d,u=a.height*d/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||_h;t.visibleArea=gt(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=V({},n),a=G(o),s.width/s.height!==a&&(s.height=s.width/a),ce(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ps(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},d=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&d(c)==d(s))}(this.src)){var n=oe(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){Qh(t).then(function(s){var a=Kh(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?ms(n)||!ps(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var d=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(d):d.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,gt(this.defaultTransforms)?this.appliedImageTransforms=Ui(this.defaultTransforms()):kn(this.defaultTransforms)?this.appliedImageTransforms=Ui(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Ui({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=W(W({},this.appliedImageTransforms),{},{flip:W({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:xn(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:xn(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Hh(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,d=a.coordinates;this.visibleArea=c,this.coordinates=d,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(oe(e)&&(e=oe(r)?s:r),oe(n)&&(n=oe(r)?a:r),!t&&(oe(e)||oe(n))){var d=this.getStencilSize(),u=d?G(d):null;oe(e)&&(e=gs(u)?u:void 0),oe(n)&&(n=gs(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Di(G(r=gt(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=_e({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=_e({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:G(r),maximum:G(r)}})),r;var t,e,n,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return W({},Cs)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=Uh({flip:{horizontal:t?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,d=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=d,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=qh({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,d=this.processAutoZoom("rotateImage",a,c);a=d.visibleArea,c=d.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},tf={key:0,ref:"canvas",style:{display:"none"}},nf={key:1,ref:"sourceCanvas",style:{display:"none"}};Fs.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",tf,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",nf,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const of={class:"background-container"},rf={class:"tools-line"},sf={class:"line-block"},af={class:"dialog-footer"},ji=M(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=gi.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),d=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{d.value=!0;const y=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),y&&y.canvas.toBlob(g=>{var v;o("crop",{blob:g,src:(v=y.canvas)==null?void 0:v.toDataURL()})}),d.value=!1},p=y=>{var g;c.value=y.coordinates,u.value=(g=y.canvas)==null?void 0:g.toDataURL()};return(y,g)=>{const v=et,b=i.resolveComponent("el-form-item"),x=i.resolveComponent("el-form"),L=i.resolveComponent("el-button"),O=Dt;return i.openBlock(),i.createBlock(O,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",of,[i.createElementVNode("div",rf,[i.createElementVNode("div",sf,[i.createVNode(x,null,{default:i.withCtx(()=>[i.createVNode(b,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(v,{modelValue:i.unref(s),"onUpdate:modelValue":g[0]||(g[0]=F=>i.isRef(s)?s.value=F:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>g[1]||(g[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(Fs),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:p},null,8,["src","stencil-props"]),i.createElementVNode("div",af,[i.createVNode(L,{loading:i.unref(d),type:"success",onClick:f},{default:i.withCtx(()=>g[2]||(g[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-0707c63d"]]),Ds=M(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=we,d=pe,u=nt;return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:s.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(d,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(d,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-435691bb"]]),lf={class:"mainblock"},cf={class:"mainline"},Ls=M(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",lf,[i.createElementVNode("div",cf,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-a4bc6b16"]]),df={class:"message-title"},uf={class:"message-text"},In=M(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",df,i.toDisplayString(t.title),1),i.createElementVNode("div",uf,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-e3c1e672"]]),hf=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function ff(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const Os=M(hf,[["render",ff]]),mf=i.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),pf=["for"],gf={class:"inside-icon"};function yf(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",gf,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,pf),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-50a7d390><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-50a7d390></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-50a7d390></path></symbol></svg>',1))],64)}const _s=M(mf,[["render",yf],["__scopeId","data-v-50a7d390"]]),wf={width:"0",height:"0",class:"hidden"};function bf(t,e){return i.openBlock(),i.createElementBlock("svg",wf,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-left"},[i.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})],-1)]))}const Sf={render:bf},Cf={width:"0",height:"0",class:"hidden"};function kf(t,e){return i.openBlock(),i.createElementBlock("svg",Cf,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-right"},[i.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})],-1)]))}const Ef={render:kf},vf={class:"tab"},Mf={class:"rotate"},Bf={key:0,class:"icon-arrow"},xf={key:1,class:"icon-arrow"},Hs=M(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",vf,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",Mf,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createElementBlock("svg",xf,r[1]||(r[1]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]))):(i.openBlock(),i.createElementBlock("svg",Bf,r[0]||(r[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(i.unref(Sf)),i.createVNode(i.unref(Ef))],64))}}),[["__scopeId","data-v-2371e4d8"]]),$f={class:"add-block_body"},qs=M(i.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=yn;return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",$f,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-b93bc8b1"]]),Zi=M(i.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b89bdc7a"]]),Nf={class:"add-block_body"},Us=M(i.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const o=yn,r=Zi;return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",Nf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-e59e418e"]]),If={class:"del-block_title"},Rf={class:"del-block_body"},Ws=M(i.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",If,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",Rf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-362b7b0d"]]),Af=["onClick"],Gs=M(i.defineComponent({__name:"PTabs",props:{tabs:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.tabs[0]),s=i.ref(window.innerWidth),a=i.ref(),c=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),d=()=>{s.value=window.innerWidth,c.value=a.value?a.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",d)),i.onUnmounted(()=>window.removeEventListener("resize",d));const u=i.computed(()=>`calc(100% - ${c.value}px + 1px)`),h=f=>{r.value=f,o("select",f)};return(f,p)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:a,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.tabs,y=>(i.openBlock(),i.createElementBlock("div",{key:y.id},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":y.id===i.unref(r).id,tab:i.unref(r).id!==y.id}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:g=>h(y)},i.toDisplayString(y.name),15,Af)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(u)})},[i.renderSlot(f.$slots,"default",{},void 0,!0)],4)],4))}}),[["__scopeId","data-v-5a83fbbf"]]),Vf=["id"],Pf=["for"],Tf={class:"left-field"},zf=["href","download"],Ff={key:1,class:"text-field__input"},Df={class:"right-field"},Lf=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new ie},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(t,{emit:e}){const n=t,o=e,r=q.CreateGuid(),s=q.CreateGuid(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!d(h.name)){R.Notification.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const d=u=>{let h=Br.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=we,p=Dn,y=pe;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,Vf),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Pf)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Tf,[i.createVNode(p,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,zf),i.createVNode(y,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Ft,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",Ff,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",Df,[i.createVNode(y,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),js=M(Lf,[["__scopeId","data-v-88abe1df"]]),Of={class:"bg"},Yi=M(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{R.Auth.Form.IsLogin()&&Ke.ToHome()};return(n,o)=>{const r=wn;return i.openBlock(),i.createElementBlock("div",Of,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-14e033ce"]]),_f=Object.freeze(Object.defineProperty({__proto__:null,default:Yi},Symbol.toStringTag,{value:"Module"})),Hf={},qf={style:{"text-align":"center"}};function Uf(t,e){return i.openBlock(),i.createElementBlock("div",qf,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const Ji=M(Hf,[["render",Uf]]),Wf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),Gf={class:"container"},jf={key:0,class:"result"},Zf={class:"list"},Yf=["onClick"],Xi=M(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function d(u){n("select",u)}return(u,h)=>{const f=Mi,p=qe;return i.openBlock(),i.createElementBlock("div",Gf,[i.createVNode(p,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>i.isRef(r)?r.value=y:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",jf,[i.createElementVNode("ul",Zf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),y=>(i.openBlock(),i.createElementBlock("li",{key:y.value,onClick:g=>d(y)},i.toDisplayString(y.label),9,Yf))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-58b78c5c"]]),Jf={class:"footer"},Zs=M(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(R.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=In,s=pe;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(R)).Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",Jf,[i.createVNode(s,{type:"primary",text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PHelp"in n?n.PHelp:i.unref(R)).Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PHelp"in n?n.PHelp:i.unref(R)).Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PHelp"in n?n.PHelp:i.unref(R)).Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-cbdf027e"]]),Xf={};function Qf(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const Ys=M(Xf,[["render",Qf],["__scopeId","data-v-879cfd55"]]),Js=M(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(R.Notification.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=In;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(R)).Notification.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(R)).Notification.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(R)).Notification.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-e8d26012"]]),Kf={style:{display:"flex","justify-content":"center",width:"100%"}},em={class:"pag-number"},tm={class:"pag-ul"},nm={key:2},Xs=M(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=y=>y?"active":"neutral",r=y=>y?"not-active":"neutral",s=R.Paginator,a=i.ref(!1),c=i.ref(!1),d=e;s.count=n.store.Count();const u=async y=>{if(y!==s.curPage){if(y<1&&(y=1),y>s.pagesCount()&&(y=s.pagesCount()),!n.showConfirm)return await h(y);R.Dialog.Save().then(async()=>{d("save"),await h(y)}).catch(async()=>{R.Notification.Warning("Изменения не были сохранены"),d("cancel"),await h(y)})}},h=async(y,g)=>{s.setCurPage(y),K.Get().p.offset=(y-1)*s.limit,await n.store.FTSP(),p()},f=i.computed(()=>{const y=s.pagesCount();return y<8?Ae.GenerateNumsRange(2,y-1).filter(g=>g<y&&g>1):Ae.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(g=>g<y&&g>1)}),p=()=>{const y=document.querySelector(".el-table__body-wrapper"),g=document.querySelector("#list");y?y.scrollTo({top:0}):g&&g.scrollTo({top:0})};return i.onBeforeUnmount(()=>{K.Get().p.drop()}),(y,g)=>{const v=Bi,b=pe,x=$i,L=Ii,O=Ni,F=xi;return i.openBlock(),i.createElementBlock("div",Kf,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",em,[i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:g[0]||(g[0]=T=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(v)]),_:1},8,["type"]),i.createElementVNode("ul",tm,[i.createElementVNode("li",null,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:g[1]||(g[1]=T=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:g[3]||(g[3]=T=>a.value=!0),onMouseleave:g[4]||(g[4]=T=>a.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[2]||(g[2]=T=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(x,{key:0})):(i.openBlock(),i.createBlock(L,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),T=>(i.openBlock(),i.createElementBlock("li",{key:T},[i.createVNode(b,{skin:"pag",type:o(T===i.unref(s).curPage),text:T,onClick:Ee=>u(T)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:g[6]||(g[6]=T=>c.value=!0),onMouseleave:g[7]||(g[7]=T=>c.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[5]||(g[5]=T=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(O,{key:0})):(i.openBlock(),i.createBlock(L,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",nm,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:g[8]||(g[8]=T=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:g[9]||(g[9]=T=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(F)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-6645cd2f"]]),Qs=M(i.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=bi.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(p=>p.key===n.keyValue);return f&&(a.searchGroup=f),await bi.Search(a),a.searchObjects},d=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const p=Xi;return i.openBlock(),i.createBlock(p,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=y=>i.isRef(r)?r.value=y:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:d,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-11ab26af"]]),im={class:"mainblock-body"},om={class:"mainblock-footer"},Ks=M(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",im,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",om,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-a670fb4a"]]),rm={class:"right-slider-content"},sm={class:"right-slider-content-header"},am={class:"right-slider-content-box"},lm={class:"right-slider-button"},ea=M(i.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const d=we;return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(d,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(d,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",rm,[i.createElementVNode("div",sm,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",am,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",lm,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-495a90f9"]]),cm={class:"mainblock"},dm={class:"body-block"},um={class:"tab-block"},ta=M(i.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=d=>{o("toggle",d)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(d,u)=>(i.openBlock(),i.createElementBlock("div",cm,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(d.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(d.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",dm,[i.renderSlot(d.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",um,[i.renderSlot(d.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-eaeca0cc"]]),hm={class:"mainblock"},fm={class:"body"},mm={key:0,class:"title"},pm={class:"title-line"},gm={class:"icon-filter",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},ym={key:0,class:"help-block"},wm={key:0,class:"title"},bm={class:"title-line"},Sm={class:"icon-download",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},Cm={key:1,class:"icons"},na=M(i.defineComponent({__name:"RSContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"6000px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!1),r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 6000px)").matches),a=()=>{o.value=!1,r.value=!1},c=()=>{o.value=!o.value},d=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 6000px)").matches}),n.value=!0}),(u,h)=>{const f=vi,p=pe,y=Ei;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",hm,[o.value|r.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:h[0]||(h[0]=g=>a())})):i.createCommentVNode("",!0),i.createElementVNode("div",fm,[i.createElementVNode("div",{class:"visability-block",style:i.normalizeStyle({maxWidth:s.value?"100%":"300px"})},[i.renderSlot(u.$slots,"visability",{},void 0,!0)],4),i.createElementVNode("div",{class:"filter-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"10px":"",right:s.value?"0px":"",width:(s.value,"100%"),zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0",marginRight:s.value?o.value?"0":"-200%":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:(s.value,"rgba(0, 0, 0, 0.35) 0px 5px 5px"),height:(s.value,"60vh")})},[s.value?(i.openBlock(),i.createElementBlock("div",mm,[i.createElementVNode("div",pm,[(i.openBlock(),i.createElementBlock("svg",gm,h[5]||(h[5]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",style:{marginRight:"5px"},onClick:h[1]||(h[1]=g=>c())},h[6]||(h[6]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))]),i.renderSlot(u.$slots,"title-tools",{},void 0,!0)])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"filter",{},void 0,!0)],4),s.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ym)),i.createElementVNode("div",{class:"download-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"60px":"",right:s.value?"0px":"",width:s.value?"77px":"",zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0 0 0 10px",marginRight:s.value?r.value?"-2px":"-130px":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:s.value?"rgba(0, 0, 0, 0.35) 0px 5px 5px":"",height:s.value?"150px":""})},[s.value?(i.openBlock(),i.createElementBlock("div",wm,[i.createElementVNode("div",bm,[(i.openBlock(),i.createElementBlock("svg",Sm,h[7]||(h[7]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",onClick:h[2]||(h[2]=g=>d())},h[8]||(h[8]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))])])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"download",{},void 0,!0)],4),s.value?(i.openBlock(),i.createElementBlock("div",Cm,[i.createVNode(p,{skin:"icon",margin:"0 0 0 10px",onClick:h[3]||(h[3]=g=>c())},{default:i.withCtx(()=>[i.createVNode(f,{color:"#006BB4"})]),_:1}),i.createVNode(p,{skin:"icon",margin:"13px 0 0 10px",onClick:h[4]||(h[4]=g=>d())},{default:i.withCtx(()=>[i.createVNode(y,{color:"#006BB4"})]),_:1})])):i.createCommentVNode("",!0)])]),h[9]||(h[9]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M12 10.5857L16.95 5.63574L18.364 7.04974L13.414 11.9997L18.364 16.9497L16.95 18.3637L12 13.4137L7.04999 18.3637L5.63599 16.9497L10.586 11.9997L5.63599 7.04974L7.04999 5.63574L12 10.5857Z"})])],-1))],64)}}}),[["__scopeId","data-v-468150ac"]]),km=["label","value"],ia=M(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[fe.String]:"Текстовый ответ",[fe.Text]:"Развёрнутый текстовый ответ",[fe.Number]:"Числовой ответ",[fe.Date]:"Ответ в виде даты",[fe.Radio]:"Выбор одного из вариантов",[fe.Set]:"Выбор нескольких вариантов",[fe.File]:"Ответ в виде файла",[fe.MatrixRadio]:"Матрица с одним выбором",[fe.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=we,d=et;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(d,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,km)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-6be05cd5"]]),Em={class:"field"},oa=M(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),d=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const p=we,y=i.resolveComponent("el-input"),g=i.resolveComponent("el-form-item"),v=i.resolveComponent("el-form"),b=pe;return i.openBlock(),i.createBlock(v,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(nt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:d},{"open-inside-content":i.withCtx(()=>[i.createVNode(nt,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:i.withCtx(()=>[i.createElementVNode("div",Em,[i.createVNode(v,null,{default:i.withCtx(()=>[i.createVNode(g,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(b,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(p,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(p,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-890163ac"]]),vm=["label","value"],ra=M(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Te.GetDefault(),K.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Te.GetDefault(),K.Get().setSortModel(r.value),K.Get().p.drop(),o("load")},a=async c=>{K.Get().p.drop(),await s(c)};return(c,d)=>{var h;const u=et;return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":d[0]||(d[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:d[1]||(d[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(f,p)=>(i.openBlock(),i.createElementBlock("option",{key:p,label:f.label,value:f},null,8,vm))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03971699"]]),Mm=["label","value"],sa=M(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Te.GetDefault()});const r=async a=>{a||(o.value=Te.GetDefault()),K.Get().setSortModel(o.value),K.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const d=et;return i.openBlock(),i.createBlock(d,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Te).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,Mm))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-98d731ba"]]),Bm={class:"switch-container"},xm={class:"line"},$m={class:"line"},aa=M(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var y;return{color:(y=u.value)!=null&&y.valueEq(f)?"#006bb4":"#B0A4C0"}},d=e,u=i.ref(void 0),h=async f=>{var p;(p=u.value)!=null&&p.valueEq(f)||(K.Get().replaceF(f,u.value),u.value=f,d("load"))};return(f,p)=>{const y=we;return i.openBlock(),i.createElementBlock("div",Bm,[i.createElementVNode("div",xm,[i.createVNode(y,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:p[0]||(p[0]=g=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(y,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:p[1]||(p[1]=g=>h())},null,8,["style"]),i.createVNode(y,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:p[2]||(p[2]=g=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",$m,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:p[3]||(p[3]=g=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:p[4]||(p[4]=g=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:p[5]||(p[5]=g=>h(t.secondModel))},null,6),p[6]||(p[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-4776a738"]]),Nm={},Im={class:"flex"};function Rm(t,e){return i.openBlock(),i.createElementBlock("div",Im,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const la=M(Nm,[["render",Rm],["__scopeId","data-v-4d1abb74"]]),ca=M(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=we,d=pe,u=Lt,h=nt;return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(d,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-994f6522"]]),Am={class:"top-slider-content"},Vm={class:"center"},da=M(i.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(d=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",Am,[i.createElementVNode("div",Vm,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=d=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-fec4dfde"]]),Pm={id:"drop-area",class:"img-container"},Tm={key:0},zm=["src"],Fm={class:"tools-button"},Dm={class:"ins"},Lm={key:1},Om=["id"],ua=M(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:ie,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=q.CreateGuid(),a=i.ref(!1),c=i.ref(),d=b=>{const x=n.cropRatio?n.defaultRatio:0;gi.Open(bn.CreateCropper(b.url,x,n.fileInfo.id)),a.value=!0},u=()=>{R.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=b=>{n.fileInfo.setFile(b),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const b=document.getElementById("drop-area");b&&(b.addEventListener("dragover",x=>{p(x),b.classList.add("drag-over")}),b.addEventListener("dragleave",x=>{p(x),b.classList.remove("drag-over")}),b.addEventListener("dragenter",p),b.addEventListener("dragleave",p),b.addEventListener("drop",g),f=document.getElementById(s))});function p(b){b.preventDefault(),b.stopPropagation()}const y=()=>{f&&f.click()};function g(b){if(b.preventDefault(),!b.dataTransfer)return;const x=b.dataTransfer.files;x.length&&f&&(f.files=x,v())}const v=()=>{if(!f||!f.files||!f.files.length)return;const b=f.files[0];b.url=URL.createObjectURL(b),r.value=b,n.fileInfo.uploadNewFile(b),d(r.value)};return(b,x)=>{const L=pe,O=ji;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Pm,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",Tm,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,zm)],4),i.createElementVNode("div",Fm,[i.createElementVNode("div",Dm,[i.createVNode(L,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:x[0]||(x[0]=F=>d(i.unref(r)))}),i.createVNode(L,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:x[1]||(x[1]=F=>u())})])])])):(i.openBlock(),i.createElementBlock("div",Lm,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(L,{skin:"text",text:"Добавить","font-size":"20px",onClick:y})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:v},null,40,Om),t.withCrop?(i.openBlock(),i.createBlock(O,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:x[2]||(x[2]=F=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-61aa63c7"]]),_m=["Passport","PassportScan"],Hm=[...["PassportsStore","PassportScansStore"],..._m],qm=["BaseStore","Contact","Static","Button","RouterGuard","Sizes","Human","FileInfo","Statuses","Email","FTSP","Arrays","Axios","brandColors","buildNameNumbers","Cache","CarouselSwipe","ClassHelper","Color","countRating","CreateSortModels","Cursor","DateFormat","DateMask","Dates","DatesFormatter","Dragger","Favourite","Extension","HttpClient","MakeCarousel","moveUp","moveDown","Period","PhoneService","Router","Scheduler","Scroll","Sorter","Strings","Time","TimeFormatter","Token","useConfirmLeavePage","validate","WaitElement","WebSocketClient","Hooks","ValueType","PHelp","FilterModel","SortModel"],Um=["AuthStore","ContactsStore","CropperStore","EmailsStore","FileInfosStore","FTSPPresetsStore","MenusStore","HumansStore","SchemasStore","PhonesStore","SearchStore","UserAccountsStore","ValueTypesStore"],Wm=["Orders"];class Gm extends nn{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Ro);l(this,"method",lt.Login);l(this,"id","field-auth-login")}}class Qi{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");E.BuildClass(this,e)}static Create(e,n){const o=new Qi;return o.id=E.CreateUUID(),o.name=e,o.label=n,o}}let jm=class extends Y{constructor(){super(Qi,"extracts")}};const Zm=new jm;class St{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);E.BuildClass(this,e)}static Create(e){const n=new St;return n.id=E.CreateUUID(),n.fieldId=e,n}}let Ym=class extends Y{constructor(){super(St,"answer-variants")}};const Jm=new Ym;class ha{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new ie);E.BuildClass(this,e)}}class Ct{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");E.BuildClass(this,e)}static Create(e,n){const o=new Ct;return o.id=de(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var Xm=Object.defineProperty,fa=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Xm(e,n,r),r};const Ki=class lo{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new ie);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);E.BuildClass(this,e)}static Create(e,n){const o=new lo;return o.id=de(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.filled=this.valueString.length>0}setNumber(e){this.valueNumber=e,this.filled=!0}setOther(e){this.valueOther=e,this.filled=this.valueOther.length>0}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(o=>lo.Create(o,n))}addFile(){const e=new ha;return e.id=de(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const o=Ct.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=Ct.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===n.id):!1}};fa([E.GetClassConstructor(Ct)],Ki.prototype,"selectedAnswerVariants"),fa([E.GetClassConstructor(ha)],Ki.prototype,"answerFiles");let Ht=Ki,Qm=class extends Y{constructor(){super(Ht,"field-fills")}};const Km=new Qm;class ep{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");E.BuildClass(this,e)}}class ma{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);E.BuildClass(this,e)}}class qt{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");E.BuildClass(this,e)}static Create(e){const n=new qt;return n.id=E.CreateUUID(),n.fieldId=e,n}}var tp=Object.defineProperty,Ut=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tp(e,n,r),r};const ot=class Pn{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new Hn);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);E.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new Pn;return n.id=E.CreateUUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(o=>o.id===e);return n?n.name:""}addRadioItem(e){const n=new St(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(o=>o.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ma(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new qt)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=St.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=Pn.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=qt.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new Pn(this);return e.id=E.CreateUUID(),e.answerVariants.forEach(n=>{n.id=E.CreateUUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const o=n.copy();return o.parentId=e.id,o}),e}};Ut([E.GetClassConstructor(St)],ot.prototype,"answerVariants"),Ut([E.GetClassConstructor(ep)],ot.prototype,"fieldExamples"),Ut([E.GetClassConstructor(qt)],ot.prototype,"fieldVariants"),Ut([E.GetClassConstructor(ma)],ot.prototype,"fieldMeasures"),Ut([E.GetClassConstructor(ot)],ot.prototype,"children");let eo=ot,np=class extends Y{constructor(){super(eo,"fields")}};const ip=new np;var op=Object.defineProperty,rp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&op(e,n,r),r};const pa=class Ta{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");E.BuildClass(this,e)}static Create(e){const n=new Ta;return n.id=E.CreateUUID(),n.formId=e.id,n.fieldFills.push(...Ht.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(o=>o.fieldId===e)}pushRegisterProperty(e){const n=new Ht;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=Ht.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.fieldVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};rp([E.GetClassConstructor(Ht)],pa.prototype,"fieldFills");let sp=pa,ap=class extends Y{constructor(){super(sp,"form-fills")}};const lp=new ap;var cp=Object.defineProperty,dp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&cp(e,n,r),r};const ga=class za{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");E.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new za;return n.id=E.CreateUUID(),n.formId=e,n}addField(){const e=eo.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};dp([E.GetClassConstructor(eo)],ga.prototype,"fields");let to=ga,up=class extends Y{constructor(){super(to,"form-sections")}};const hp=new up;var fp=Object.defineProperty,mp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&fp(e,n,r),r};const ya=class Fa{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);E.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Fa;return e.id=E.CreateUUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=to.Create(this.id);return this.formSections.push(e),$r.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};mp([E.GetClassConstructor(to)],ya.prototype,"formSections");let pp=ya,gp=class extends Y{constructor(){super(pp,"forms")}};const yp=new gp;let wp=class extends Y{constructor(){super(Ct,"selected-answer-variants")}};const bp=new wp;class Wt{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new ie);l(this,"order",0);E.BuildClass(this,e)}static Create(e){const n=new Wt;return n.id=E.CreateUUID(),n.passportId=e,n}}var Sp=Object.defineProperty,Cp=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Sp(e,n,r),r};class no{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);E.BuildClass(this,e)}}Cp([E.GetClassConstructor(Wt)],no.prototype,"passportScans");let kp=class extends Y{constructor(){super(Wt,"passport-scans")}};const Ep=new kp;class vp extends Y{constructor(){super(no,"passports")}}const Mp=new vp,Bp={install:function(t){t.component("PButton",pe),t.component("PCheckBox",Fn),t.component("PDatePicker",go),t.component("PFlex",Dn),t.component("PInput",qe),t.component("PInputDate",mi),t.component("PInputNumber",Nr),t.component("PLeftSlider",Ir),t.component("PList",Rr),t.component("PListItem",Ar),t.component("PRadio",Vr),t.component("PRightSlider",Pr),t.component("PSelect",et),t.component("PSticky",yn),t.component("PString",we),t.component("PTextarea",Tr),t.component("PTopSlider",zr),t.component("IconDownload",Ei),t.component("IconFilter",vi),t.component("ArrowLeft",Bi),t.component("ArrowRight",xi),t.component("DoubleArrowLeft",$i),t.component("DoubleArrowRight",Ni),t.component("EllipsisSvg",Ii),t.component("IconArrowLeft",ss),t.component("IconCheckDefault",zn),t.component("IconClose",Ft),t.component("IconEdit",as),t.component("IconEmail",ls),t.component("IconMove",cs),t.component("IconPhone",ds),t.component("IconSearch",Mi),t.component("IconSelectArrow",pi),t.component("CollapseContainer",Os),t.component("CollapseItem",_s),t.component("VerticalCollapseContainer",Hs),t.component("PAdd",qs),t.component("PContainer",Zi),t.component("PContainerStickyHead",Us),t.component("PDel",Ws),t.component("PTabs",Gs),t.component("UploaderFile",js),t.component("AuthForm",wn),t.component("PModal",Dt),t.component("AuthPage",Yi),t.component("PageNotFound",Ji),t.component("AdaptiveContainer",co),t.component("AdaptiveContainerHorizontal",uo),t.component("AdminGallery",po),t.component("AuthModal",Fr),t.component("CarouselImages",Dr),t.component("ContactForm",Jr),t.component("ContextWindow",Xr),t.component("DateInputRangeV2",Kr),t.component("DateInputRange",Qr),t.component("DropList",es),t.component("EmailForm",Ci),t.component("FilterCheckbox",ts),t.component("FiltersButtonsSelect",ns),t.component("FilterSelect",is),t.component("FTSPPanel",os),t.component("GeneralItem",rs),t.component("GridContainer",Lt),t.component("ImageCropper",ji),t.component("InfoItem",nt),t.component("InfoItemSelectButtons",Ds),t.component("LeftRightContainer",Ls),t.component("MessageBody",In),t.component("PAutocomplete",Xi),t.component("PDialog",Zs),t.component("PhoneForm",ki),t.component("PLoader",Ys),t.component("PNotification",Js),t.component("PPagination",Xs),t.component("RemoteSearch",Qs),t.component("ResearcheContainer",Ks),t.component("RightSliderContainer",ea),t.component("RightTabsContainer",ta),t.component("RSContainer",na),t.component("SelectValueType",ia),t.component("SingleNameToggleForm",oa),t.component("SortList",ra),t.component("SortSelect",sa),t.component("Switch3Pos",aa),t.component("ThemeWrapper",la),t.component("ToggleInfoItem",ca),t.component("TopSliderContainer",da),t.component("UploaderImage",ua)}};m.AdaptiveContainer=co,m.AdaptiveContainerHorizontal=uo,m.AdminGallery=po,m.AnswerVariantsStore=Jm,m.Arrays=Ae,m.ArrowLeft=Bi,m.ArrowRight=xi,m.Auth=Po,m.AuthButtonLogin=qn,m.AuthButtonRegister=Un,m.AuthForm=wn,m.AuthFormSettings=Vo,m.AuthFormStatuses=Se,m.AuthMethods=lt,m.AuthModal=Fr,m.AuthPage=Yi,m.AuthStore=xu,m.Axios=zt,m.BaseStore=Y,m.Button=Ye,m.Cache=Rd,m.CarouselImages=Dr,m.CarouselSwipe=Ad,m.ClassHelper=E,m.CollapseContainer=Os,m.CollapseItem=_s,m.Color=Pd,m.Contact=at,m.ContactForm=Jr,m.ContactsStore=Nu,m.ContextWindow=Xr,m.CreateSortModels=No,m.CropperStore=gi,m.Cursor=zd,m.DateFormat=ht,m.DateInputRange=Qr,m.DateInputRange_v2=Kr,m.DateMask=qd,m.Dates=ui,m.DatesFormatter=Ve,m.DoubleArrowLeft=$i,m.DoubleArrowRight=Ni,m.Dragger=Ud,m.DropList=es,m.EllipsisSvg=Ii,m.Email=Ze,m.EmailField=on,m.EmailForm=Ci,m.EmailsStore=Lr,m.Extension=Br,m.ExtractsStore=Zm,m.FTSP=K,m.FTSPPanel=os,m.FTSPPresetsStore=Tu,m.Favourite=Wd,m.FieldFillsStore=Km,m.FieldsStore=ip,m.FileInfo=ie,m.FileInfosStore=Vu,m.FilterCheckbox=ts,m.FilterModel=On,m.FilterSelect=is,m.FiltersButtonsSelect=ns,m.FormFillsStore=lp,m.FormSectionsStore=hp,m.FormsStore=yp,m.GeneralItem=rs,m.GridContainer=Lt,m.Hooks=oc,m.HttpClient=ae,m.Human=_n,m.HumansStore=Fu,m.IconArrowLeft=ss,m.IconCheckDefault=zn,m.IconClose=Ft,m.IconDownload=Ei,m.IconEdit=as,m.IconEmail=ls,m.IconFilter=vi,m.IconMove=cs,m.IconPhone=ds,m.IconSearch=Mi,m.IconSelectArrow=pi,m.ImageCropper=ji,m.InfoItem=nt,m.InfoItemSelectButtons=Ds,m.LeftRightContainer=Ls,m.LoginField=Gm,m.MakeCarousel=xr,m.MenusStore=Ju,m.MessageBody=In,m.Orders=Pe,m.PAdd=qs,m.PAutocomplete=Xi,m.PButton=pe,m.PCheckBox=Fn,m.PContainer=Zi,m.PContainerStickyHead=Us,m.PDatePicker=go,m.PDel=Ws,m.PDialog=Zs,m.PFlex=Dn,m.PHelp=R,m.PInput=qe,m.PInputDate=mi,m.PInputNumber=Nr,m.PLeftSlider=Ir,m.PList=Rr,m.PListItem=Ar,m.PLoader=Ys,m.PModal=Dt,m.PNotification=Js,m.PPagination=Xs,m.PRadio=Vr,m.PRightSlider=Pr,m.PSelect=et,m.PSticky=yn,m.PString=we,m.PTabs=Gs,m.PTextarea=Tr,m.PTopSlider=zr,m.PageNotFound=Ji,m.Passport=no,m.PassportScan=Wt,m.PassportScansStore=Ep,m.PassportsStore=Mp,m.PasswordField=rn,m.PasswordRepeatField=Ao,m.Period=xt,m.PhoneForm=ki,m.PhoneService=hi,m.PhonesStore=Gr,m.RSContainer=na,m.RemoteSearch=Qs,m.ResearcheContainer=Ks,m.RightSliderContainer=ea,m.RightTabsContainer=ta,m.Router=Ke,m.RouterGuard=Yd,m.Scheduler=Jd,m.SchemasStore=nh,m.Scroll=Qd,m.SearchStore=bi,m.SelectValueType=ia,m.SelectedAnswerVariantsStore=bp,m.SingleNameToggleForm=oa,m.Sizes=Tn,m.SortList=ra,m.SortModel=en,m.SortSelect=sa,m.Sorter=$r,m.Static=fi,m.Statuses=ue,m.Strings=q,m.Switch3Pos=aa,m.ThemeWrapper=la,m.Time=_,m.Timer=Nt,m.ToggleInfoItem=ca,m.Token=Tt,m.TopSliderContainer=da,m.UploaderFile=js,m.UploaderImage=ua,m.UserAccountsStore=ah,m.ValueType=Hn,m.ValueTypesStore=ch,m.VerticalCollapseContainer=Hs,m.WaitElement=eu,m.WebSocketClient=nu,m.brandColors=Nd,m.buildNameNumbers=Id,m.classesNames=Da,m.countRating=Td,m.modulesNames=Hm,m.moveDown=jd,m.moveUp=Gd,m.servicesComponents=Bp,m.servicesNames=qm,m.servicesStoresNames=Um,m.typesNames=Wm,m.useConfirmLeavePage=Lo,m.validate=Kd,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED