cmc_fe/dist/js/83.37aa53f6.js

2 lines
48 KiB
JavaScript
Raw Normal View History

2023-01-19 13:44:49 +01:00
"use strict";(self["webpackChunkcmc_fe"]=self["webpackChunkcmc_fe"]||[]).push([[83],{6705:function(e,t,l){l.r(t),l.d(t,{default:function(){return St}});var a=l(3396),o=l(7139),n=l(7312),r=l(9752),i=l(1332),u=l(1888),s=l(1334),c=l(9242),d=l(320),p=l(3122),m=l(8587);const v=(0,d.a)({name:"VDialogTransition",props:{target:Object},setup(e,t){let{slots:l}=t;const o={onBeforeEnter(e){e.style.pointerEvents="none",e.style.visibility="hidden"},async onEnter(t,l){var a;await new Promise((e=>requestAnimationFrame(e))),await new Promise((e=>requestAnimationFrame(e))),t.style.visibility="";const{x:o,y:n,sx:r,sy:i,speed:u}=h(e.target,t),s=(0,p.j)(t,[{transform:`translate(${o}px, ${n}px) scale(${r}, ${i})`,opacity:0},{transform:""}],{duration:225*u,easing:m.uX});null==(a=f(t))||a.forEach((e=>{(0,p.j)(e,[{opacity:0},{opacity:0,offset:.33},{opacity:1}],{duration:450*u,easing:m.Ly})})),s.finished.then((()=>l()))},onAfterEnter(e){e.style.removeProperty("pointer-events")},onBeforeLeave(e){e.style.pointerEvents="none"},async onLeave(t,l){var a;await new Promise((e=>requestAnimationFrame(e)));const{x:o,y:n,sx:r,sy:i,speed:u}=h(e.target,t),s=(0,p.j)(t,[{transform:""},{transform:`translate(${o}px, ${n}px) scale(${r}, ${i})`,opacity:0}],{duration:125*u,easing:m.x0});s.finished.then((()=>l())),null==(a=f(t))||a.forEach((e=>{(0,p.j)(e,[{},{opacity:0,offset:.2},{opacity:0}],{duration:250*u,easing:m.Ly})}))},onAfterLeave(e){e.style.removeProperty("pointer-events")}};return()=>e.target?(0,a.Wm)(c.uT,(0,a.dG)({name:"dialog-transition"},o,{css:!1}),l):(0,a.Wm)(c.uT,{name:"dialog-transition"},l)}});function f(e){var t;const l=null==(t=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))?void 0:t.children;return l&&[...l]}function h(e,t){const l=e.getBoundingClientRect(),a=(0,p.G)(t),[o,n]=getComputedStyle(t).transformOrigin.split(" ").map((e=>parseFloat(e))),[r,i]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let u=l.left+l.width/2;"left"===r||"left"===i?u-=l.width/2:"right"!==r&&"right"!==i||(u+=l.width/2);let s=l.top+l.height/2;"top"===r||"top"===i?s-=l.height/2:"bottom"!==r&&"bottom"!==i||(s+=l.height/2);const c=l.width/a.width,d=l.height/a.height,m=Math.max(1,c,d),v=c/m||0,f=d/m||0,h=a.width*a.height/(window.innerWidth*window.innerHeight),g=h>.12?Math.min(1.5,10*(h-.12)+1):1;return{x:u-(o+a.left),y:s-(n+a.top),sx:v,sy:f,speed:g}}var g=l(836),y=l(8551),_=l(8717),w=l(5975),k=l(3185),b=l(4870),C=l(2385),V=l(9888);const W=(0,d.e)()({name:"VDialog",props:{fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...(0,y.BU)({origin:"center center",scrollStrategy:"block",transition:{component:v},zIndex:2400})},emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:l}=t;const o=(0,_.z)(e,"modelValue"),{scopeId:n}=(0,w.a)(),r=(0,b.iH)();function i(e){var t,l;const a=e.relatedTarget,o=e.target;if(a!==o&&null!=(t=r.value)&&t.contentEl&&null!=(l=r.value)&&l.globalTop&&![document,r.value.contentEl].includes(o)&&!r.value.contentEl.contains(o)){const e=[...r.value.contentEl.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.matches('[tabindex="-1"]')));if(!e.length)return;const t=e[0],l=e[e.length-1];a===t?l.focus():t.focus()}}return C.BR&&(0,a.YP)((()=>o.value&&e.retainFocus),(e=>{e?document.addEventListener("focusin",i):document.removeEventListener("focusin",i)}),{immediate:!0}),(0,a.YP)(o,(async e=>{var t,l;(await(0,a.Y3)(),e)?null==(t=r.value.contentEl)||t.focus({preventScroll:!0}):null==(l=r.value.activatorEl)||l.focus({preventScroll:!0})})),(0,V.L)((()=>{const[t]=(0,y.Fe)(e);return(0,a.Wm)(y.yc,(0,a.dG)({ref:r,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable}]},t,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e,"aria-role":"dialog","aria-modal":"true",activatorProps:(0,a.dG)({"aria-haspopup":"dialog","aria-expanded":String(o.value)},e.activatorProps)},n),{activator:l.activator,default:function(){for(var e,t=arguments.length,o=new Array
//# sourceMappingURL=83.37aa53f6.js.map