1import{V as L,Z as B,ad as S,a6 as w,a7 as D,l as b,o as a,w as p,c as d,g as u,E as i,b as v,a8 as E,aa as R,r as l,F as K,a as y,n as I,t as P,G as A}from"./Dfl0qPmI.js";import{x as m}from"./CLs7nh7g.js";import{s as x}from"./KvuHg8iw.js";import $ from"./D1MO138z.js";import{F as O}from"./Bxrds6OV.js";import{s as V}from"./Jj08sDnY.js";import{u as Z,b as j}from"./DGARqZlU.js";import{s as F}from"./QjYCpqYP.js";import{f as T}from"./DWSF0ePb.js";import"./D9nLiQ4U.js";import"./Dn2zFMvu.js";import"./DX3L3qw8.js";import"./BlRutVz9.js";import"./C3mG1naf.js";import"./jc0MLXVe.js";var z=` 2 .p-drawer { 3 display: flex; 4 flex-direction: column; 5 transform: translate3d(0px, 0px, 0px); 6 position: relative; 7 transition: transform 0.3s; 8 background: dt('drawer.background'); 9 color: dt('drawer.color'); 10 border: 1px solid dt('drawer.border.color'); 11 box-shadow: dt('drawer.shadow'); 12 } 13 14 .p-drawer-content { 15 overflow-y: auto; 16 flex-grow: 1; 17 padding: dt('drawer.content.padding'); 18 } 19 20 .p-drawer-header { 21 display: flex; 22 align-items: center; 23 justify-content: space-between; 24 flex-shrink: 0; 25 padding: dt('drawer.header.padding'); 26 } 27 28 .p-drawer-footer { 29 padding: dt('drawer.footer.padding'); 30 } 31 32 .p-drawer-title { 33 font-weight: dt('drawer.title.font.weight'); 34 font-size: dt('drawer.title.font.size'); 35 } 36 37 .p-drawer-full .p-drawer { 38 transition: none; 39 transform: none; 40 width: 100vw !important; 41 height: 100vh !important; 42 max-height: 100%; 43 top: 0px !important; 44 left: 0px !important; 45 border-width: 1px; 46 } 47 48 .p-drawer-left .p-drawer-enter-from, 49 .p-drawer-left .p-drawer-leave-to { 50 transform: translateX(-100%); 51 } 52 53 .p-drawer-right .p-drawer-enter-from, 54 .p-drawer-right .p-drawer-leave-to { 55 transform: translateX(100%); 56 } 57 58 .p-drawer-top .p-drawer-enter-from, 59 .p-drawer-top .p-drawer-leave-to { 60 transform: translateY(-100%); 61 } 62 63 .p-drawer-bottom .p-drawer-enter-from, 64 .p-drawer-bottom .p-drawer-leave-to { 65 transform: translateY(100%); 66 } 67 68 .p-drawer-full .p-drawer-enter-from, 69 .p-drawer-full .p-drawer-leave-to { 70 opacity: 0; 71 } 72 73 .p-drawer-full .p-drawer-enter-active, 74 .p-drawer-full .p-drawer-leave-active { 75 transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); 76 } 77 78 .p-drawer-left .p-drawer { 79 width: 20rem; 80 height: 100%; 81 border-inline-end-width: 1px; 82 } 83 84 .p-drawer-right .p-drawer { 85 width: 20rem; 86 height: 100%; 87 border-inline-start-width: 1px; 88 } 89 90 .p-drawer-top .p-drawer { 91 height: 10rem; 92 width: 100%; 93 border-block-end-width: 1px; 94 } 95 96 .p-drawer-bottom .p-drawer { 97 height: 10rem; 98 width: 100%; 99 border-block-start-width: 1px; 100 } 101 102 .p-drawer-left .p-drawer-content, 103 .p-drawer-right .p-drawer-content, 104 .p-drawer-top .p-drawer-content, 105 .p-drawer-bottom .p-drawer-content { 106 width: 100%; 107 height: 100%; 108 } 109 110 .p-drawer-open { 111 display: flex; 112 } 113 114 .p-drawer-mask:dir(rtl) { 115 flex-direction: row-reverse; 116 } 117`,M={mask:function(t){var n=t.position,o=t.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",alignItems:n==="top"?"flex-start":n==="bottom"?"flex-end":"center",pointerEvents:o?"auto":"none"}},root:{pointerEvents:"auto"}},N={mask:function(t){var n=t.instance,o=t.props,s=["left","right","top","bottom"],r=s.find(function(f){return f===o.position});return["p-drawer-mask",{"p-overlay-mask p-overlay-mask-enter":o.modal,"p-drawer-open":n.containerVisible,"p-drawer-full":n.fullScreen},r?"p-drawer-".concat(r):""]},root:function(t){var n=t.instance;return["p-drawer p-component",{"p-drawer-full":n.fullScreen}]},header:"p-drawer-header",title:"p-drawer-title",pcCloseButton:"p-drawer-close-button",content:"p-drawer-content",footer:"p-drawer-footer"},U=L.extend({name:"drawer",style:z,classes:N,inlineStyles:M}),X={name:"BaseDrawer",extends:F,props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},header:{type:null,default:null},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeButtonProps:{type:Object,default:function(){return{severity:"secondary",text:!0,rounded:!0}}},closeIcon:{type:String,default:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},style:U,provide:function(){return{$pcDrawer:this,$parentInstance:this}}};function c(e){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(e)}function h(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e){var t=q(e,"string");return c(t)=="symbol"?t:t+""}function q(e,t){if(c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(c(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G={name:"Drawer",extends:X,inheritAttrs:!1,emits:["update:visible","show","after-show","hide","after-hide","before-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,footerContainer:null,closeButton:null,outsideClickListener:null,documentKeydownListener:null,wat
117ch:{dismissable:function(t){t?this.enableDocumentSettings():this.disableDocumentSettings()}},updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&m.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.bindDocumentKeyDownListener(),this.autoZIndex&&m.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings(),this.$emit("after-show")},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&S(this.mask,"p-overlay-mask-leave"),this.$emit("before-hide")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&m.clear(this.mask),this.unbindDocumentKeyDownListener(),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(t){this.dismissable&&this.modal&&this.mask===t.target&&this.hide()},focus:function(){var t=function(s){return s&&s.querySelector("[autofocus]")},n=this.$slots.header&&t(this.headerContainer);n||(n=this.$slots.default&&t(this.container),n||(n=this.$slots.footer&&t(this.footerContainer),n||(n=this.closeButton))),n&&B(n)},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&j()},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&Z()},onKeydown:function(t){t.code==="Escape"&&this.hide()},containerRef:function(t){this.container=t},maskRef:function(t){this.mask=t},contentRef:function(t){this.content=t},headerContainerRef:function(t){this.headerContainer=t},footerContainerRef:function(t){this.footerContainer=t},closeButtonRef:function(t){this.closeButton=t?t.$el:void 0},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeydown,document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(n){t.isOutsideClicked(n)&&t.hide()},document.addEventListener("click",this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener,!0),this.outsideClickListener=null)},isOutsideClicked:function(t){return this.container&&!this.container.contains(t.target)}},computed:{fullScreen:function(){return this.position==="full"},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return T(h(h(h({"full-screen":this.position==="full"},this.position,this.position),"open",this.containerVisible),"modal",this.modal))}},directives:{focustrap:O},components:{Button:$,Portal:V,TimesIcon:x}},W=["data-p"],H=["aria-modal","data-p"];function J(e,t,n,o,s,r){var f=w("Button"),k=w("Portal"),g=D("focustrap");return a(),b(k,null,{default:p(function(){return[s.containerVisible?(a(),d("div",i({key:0,ref:r.maskRef,onMousedown:t[0]||(t[0]=function(){return r.onMaskClick&&r.onMaskClick.apply(r,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),"data-p":r.dataP},e.ptm("mask")),[v(E,i({name:"p-drawer",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onBeforeLeave:r.onBeforeLeave,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave,appear:""},e.ptm("transition")),{default:p(function(){return[e.visible?R((a(),d("div",i({key:0,ref:r.containerRef,class:e.cx("root"),style:e.sx("root"),role:"complementary","aria-modal":e.modal,"data-p":r.dataP},e.ptmi("root")),[e.$slots.container?l(e.$slots,"container",{key:0,closeCallback:r.hide}):(a(),d(K,{key:1},[y("div",i({ref:r.headerContainerRef,class:e.cx("header")},e.ptm("header")),[l(e.$slots,"header",{class:I(e.cx("title"))},function(){return[e.header?(a(),d("div",i({key:0,class:e.cx("title")},e.ptm("title")),P(e.header),17)):u("",!0)]}),e.showCloseIcon?l(e.$slots,"closebutton",{key:0,closeCallback:r.hide},function(){return[v(f,i({ref:r.closeButtonRef,type:"button",class:e.cx("pcCloseButton"),"aria-label":r.closeAriaLabel,unstyled:e.unstyled,onClick:r.hide},e.closeButtonProps,{pt:e.ptm("pcCloseButton"),"data-pc-group-section":"iconcontainer"}),{icon:p(function(C){return[l(e.$slots,"closeicon",{},function(){return[(a(),b(A(e.closeIcon?"span":"TimesIcon"),i({class:[e.closeIcon,C.class]},e.ptm("pcCloseButton").icon),null,16,["class"]))]})]}),_:3},16,["class","aria-label","unstyled","onClick","pt"])]}):u("",!0)],16),y("div",i({ref:r.contentRef,class:e.cx("content")},e.ptm("content")),[l(e.$slots,"default")],16),e.$slots.footer?(a(),d("div",i({key:0,ref:r.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[l(e.$slots,"footer")],16)):u("",!0)],64))],16,H)),[[g]]):u("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16,W)):u("",!0)]}),_:3})}G.render=J;export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.