PageSourceSearch

https://c-squared.shop/assets/TmlNewPopup.9484a938.js

js c-squared.shop collected 2026-09-29 09:21:13 UTC 10,086 bytes, 2 lines download raw bytes

1import{D as a,E as d,G as p,N as C,S as l,H as c,f as m,U as r,a9 as w,R as h,Q as g,V as y,W as b,a4 as I,a0 as D,a3 as O,a5 as x,O as $,P as S,a1 as B,u as A,a6 as E}from"./vue.00f7c436.js";import{o as N}from"./overlay-mixin.781011c3.js";import{aU as L,O as P,_ as k,x as R,ad as M,B as j}from"./index.474d7b13.js";import{f as V}from"./faTrashAlt.e4dbf726.js";import{f as H}from"./faArrowLeft.9c68f767.js";import K from"./TmlStages.a3978bc8.js";import"./sentry.09480738.js";import"./faTrashCan.b4d805e3.js";const T={props:{title:{type:[String,Number],required:!1},options:{type:Object,required:!1}},data(){return{faTimes:L.faTimes,faTrashAlt:V.faTrashAlt,faArrowLeft:H.faArrowLeft}},inject:["popupOptions"],computed:{showBackIcon(){return this.options&&typeof this.options.showBackIcon<"u"?this.options.showBackIcon:this.$options.name==="MultiStaged"?this.firstStage===null?!1:!this.firstStage||this.maxDevice("md"):this.maxDevice("md")&&this.popupOptions.fill},showCloseIcon(){return this.options&&typeof this.options.showCloseIcon<"u"?this.options.showCloseIcon:(!this.maxDevice("md")||!this.popupOptions.fill)&&!this.popupOptions.immutable},showDeleteIcon(){return this.options?this.options.showDeleteIcon:!1}},methods:{maxDevice:P,close(){this.$emit("close")},_onPopState(){this.$options.name==="MultiStaged"&&!this.firstStage?this.prev():this.close()},slotOccupied(e){if(!this.$slots[e])return!1;const t=this.$slots[e]();return t?t.some(o=>o&&!this.isEmptyVNode(o)):!1},isEmptyVNode(e){var t;return!(e.el||Array.isArray(e.children)&&((t=e.children)==null?void 0:t.length))}},created(){window.addEventListener("popstate",this._onPopState,!1)},beforeUnmount(){window.removeEventListener("popstate",this._onPopState,!1)}};const q={name:"Blank",mixins:[T]},U={class:"blank-layout popup-content"};function G(e,t,o,n,u,s){return a(),d("div",U,[p(e.$slots,"content",{},void 0,!0)])}const W=k(q,[["render",G],["__scopeId","data-v-6289c770"]]);const Q={name:"Standard",mixins:[T],inject:["popupOptions","setTitle"],created(){this.setTitle()},methods:{emitBackAndClose(){this.$emit("back"),this.$emit("close")},onRightIconClick(){this.showCloseIcon&&this.$emit("close"),this.showDeleteIcon&&this.$emit("delete")}}},F={class:"flex flex-col w-full h-full"},J={class:"flex items-center flex-1"},X={class:"py-2"};function Y(e,t,o,n,u,s){const v=C("font-awesome-icon");return a(),d("div",F,[l("div",{class:c(["flex flex-col w-full",{fill:s.popupOptions.fill}])},[l("div",{class:c(["flex items-between px-4",{fill:s.popupOptions.fill}])},[l("div",J,[m(y,{name:"text-fade",mode:"out-in"},{default:r(()=>[e.showBackIcon?(a(),d("span",{key:0,class:"action flex items-center h-full py-2 px-4 cursor-pointer",style:{marginLeft:"-1em"},role:"button",tabindex:"0","aria-label":"Close",title:"Back",onClick:t[0]||(t[0]=(...f)=>e.close&&e.close(...f)),onKeyup:t[1]||(t[1]=w((...f)=>e.close&&e.close(...f),["enter"]))},[m(v,{icon:e.faArrowLeft,size:"lg",style:h({height:e.maxDevice("md")?"1.5rem":"1.75rem",width:e.maxDevice("md")?"1.5rem":"1.75rem"})},null,8,["icon","style"])],32)):g("",!0)]),_:1}),l("div",X,[m(y,{name:"text-fade",mode:"out-in"},{default:r(()=>[(a(),b(O(e.maxDevice("md")?"h3":"h2"),{key:e.title,class:"mb-0"},{default:r(()=>[I(D(e.title),1)]),_:1}))]),_:1})])]),e.showCloseIcon||e.showDeleteIcon?(a(),d("span",{key:0,class:"action flex items-center h-full py-2 px-4 cursor-pointer",role:"button",tabindex:"0","aria-label":"Close",title:"Close",style:{marginRight:"-1em"},onClick:t[2]||(t[2]=(...f)=>s.onRightIconClick&&s.onRightIconClick(...f)),onKeyup:t[3]||(t[3]=w((...f)=>s.onRightIconClick&&s.onRightIconClick(...f),["enter"]))},[m(v,{icon:e.showCloseIcon?e.faTimes:e.faTrashAlt,style:h({height:e.maxDevice("md")?"1.5rem":"1.75rem",width:e.maxDevice("md")?"1.5rem":"1.75rem"})},null,8,["icon","style"])],32)):g("",!0)],2)],2),p(e.$slots,"before-content",{},void 0,!0),l("div",{class:c(["popup-content relative flex flex-col w-full",{"p-0":s.popupOptions.noContentPadding,"px-4 pb-4":!s.popupOptions.noContentPadding,"no-overflow":s.popupOptions.noContentOverflow}])},[p(e.$slots,"content",{},void 0,!0)],2),l("div",{class:c([{"px-4 pt-0 pb-4":e.slotOccupied("footer"),"p-0":!e.slotOccupied("footer")},"popup-footer block w-full pt-0"])},[p(e.$slots,"footer",{},void 0,!0)],2)])}const Z=k(Q,[["render",Y],["__scopeId","data-v-786a4925"]]);const _={name:"MultiStaged",components:{TmlStages:K},mixins:[T],inject:["setTitle"],props:{stage:{type:[String,Number]}},data(){return{firstStage:null,lastStage:null,elementState:{},stagesCode:R()}},methods:{goBack(e){this.firstStage?this.close():this.prev(),this.$emit("back",e)},handleChange({firstStage:e,lastStage:t,index:o,name:n,title:u}){this.firstStage=e,this.lastStage=t,this.elementState={firstStage:e,lastStage:t,index:o,name:n,title:u},this.setTitle(u),this.$emit("stage-change",{firstStage:e,lastStage:t,index:o,name:n,title:u})},next(){this.$refs["popup-stages"].next()},prev(){this.$refs["popup-stages"].prev()},go(e){this.$refs["popup-stages"].go(e)}}},ee={class:"flex flex-col w-full h-full"},te={class:"flex flex-col w-full h-full overflow-hidden"},oe={class:"flex items-center flex-1"},se={class:"py-2"},ne={class:"popup-content relative flex flex-col w-full px-4 pb-4"};function ie(e,t,o,n,u,s){const v=C("font-awesome-icon"),f=C("tml-stages");return a(),d("div",ee,[l("div",te,[l("div",{class:c(["flex items-between px-4",{fill:e.popupOptions.fill}])},[l("div",oe,[m(y,{name:"text-fade",mode:"out-in"},{default:r(()=>[e.showBackIcon?(a(),d("span",{key:0,class:"action flex items-center h-full py-2 px-4 cursor-pointer",style:{marginLeft:"-1em"},role:"button",tabindex:"0","aria-label":"Close",title:"Back",onClick:t[0]||(t[0]=(...i)=>s.goBack&&s.goBack(...i)),onKeyup:t[1]||(t[1]=w((...i)=>s.goBack&&s.goBack(...i),["enter"]))}
1,[m(v,{icon:e.faArrowLeft,size:"lg",style:h({height:e.maxDevice("md")?"1.5rem":"1.75rem",width:e.maxDevice("md")?"1.5rem":"1.75rem"})},null,8,["icon","style"])],32)):g("",!0)]),_:1}),l("div",se,[m(y,{name:"text-fade",mode:"out-in"},{default:r(()=>[(a(),b(O(e.maxDevice("md")?"h3":"h2"),{key:e.title,class:"mb-0"},{default:r(()=>[I(D(e.title),1)]),_:1}))]),_:1})])]),e.showCloseIcon?(a(),d("span",{key:0,class:"action flex items-center h-full py-2 px-4 cursor-pointer",role:"button","aria-label":"Close",tabindex:"0",title:"Close",style:{marginRight:"-1em"},onClick:t[2]||(t[2]=i=>e.$emit("close")),onKeyup:t[3]||(t[3]=w(i=>e.$emit("close"),["enter"]))},[m(v,{icon:e.faTimes,style:h({height:e.maxDevice("md")?"1.5rem":"1.75rem",width:e.maxDevice("md")?"1.5rem":"1.75rem"})},null,8,["icon","style"])],32)):g("",!0)],2),p(e.$slots,"before-content",{},void 0,!0),l("div",ne,[m(f,{ref:"popup-stages",code:u.stagesCode,stage:o.stage,onStageChange:s.handleChange,onNext:t[4]||(t[4]=i=>e.$emit("next",i)),onPrev:t[5]||(t[5]=i=>e.$emit("prev",i)),onBack:s.goBack,onGo:t[6]||(t[6]=i=>e.$emit("go",i)),onNoPrevious:t[7]||(t[7]=i=>e.$emit("close")),onAfterStageTransitionEnter:t[8]||(t[8]=i=>e.$emit("after-stage-transition-enter"))},{default:r(()=>[p(e.$slots,"content",x({ref:"child"},{next:s.next,prev:s.prev,go:s.go,elementState:u.elementState}),void 0,!0)]),_:3},8,["code","stage","onStageChange","onBack"])])]),l("div",{class:c(["block w-full",{"p-4 pt-0":e.slotOccupied("footer"),"p-0":!e.slotOccupied("footer")}])},[p(e.$slots,"footer",$(S({next:s.next,prev:s.prev,go:s.go,elementState:u.elementState})),void 0,!0)],2)])}const le=k(_,[["render",ie],["__scopeId","data-v-147ed1a9"]]),z={Blank:W,Standard:Z,MultiStaged:le};const ae={name:"TmlNewPopup",mixins:[N],expose:["close","open","toggle","setTitle"],provide(){const{fill:e,immutable:t,size:o,layoutOptions:n}=this.$props;return{popupOptions:{fill:e,immutable:t,size:o,...n},setTitle:this.setTitle}},props:{layout:{type:String,required:!0},layoutOptions:{type:Object,required:!1},size:{type:String,default:"dynamic"},height:{type:String,default:"70vh"},fill:{type:Boolean,default:!0},showMobileNav:Boolean},data(){return{elementState:null,layouts:Object.values(z).map(e=>M(e.name))}},computed:{layoutComponentName(){return j(this.layout).replace(/\W/,"")}},watch:{title(e){e&&this.setTitle(e)}},created(){if(this.layout&&!this.layouts.includes(this.layout))throw new Error(`Unknown popup layout: ${this.layout}`);window.addEventListener("resize",this.onResize)},beforeMount(){this.onResize()},unmounted(){window.removeEventListener("resize",this.onResize)},methods:{stageChange(e){this.elementState=e,this.$emit("stage-change",e)},onResize(){this.maxHeight=window.innerHeight}}},re=Object.assign(ae,{setup(e){return(t,o)=>(a(),b(y,{name:"popup-fade-out",onLeave:o[3]||(o[3]=n=>t.$emit("leave")),onBeforeLeave:o[4]||(o[4]=n=>t.$emit("before-leave")),onAfterLeave:o[5]||(o[5]=n=>t.$emit("after-leave")),onEnter:o[6]||(o[6]=n=>t.$emit("enter"))},{default:r(()=>[t.isOpen?(a(),d("div",{key:t.name,class:c(["popup-background flex justify-center items-center",{isOpen:t.isOpen}]),style:h({bottom:e.showMobileNav?"64px":null})},[t.isOpen?(a(),d("div",{key:0,class:"popup-container flex flex-col justify-center items-center w-full h-full",onMousedown:o[2]||(o[2]=B(n=>t._onMouseDown(n,!0),["stop"]))},[l("div",{class:c(["popup flex flex-col items-center",{fill:e.fill,layout:e.layout,[e.size]:e.size}]),style:h({height:e.height,maxHeight:t.maxHeight}),onMousedown:o[1]||(o[1]=B(n=>t._onMouseDown(n,!1),["stop"]))},[(a(),b(O(A(z)[t.layoutComponentName]),x({title:t.popupTitle,stage:t.overlayStage,options:e.layoutOptions},E(t.$listeners),{onClose:t.close,onStageChange:t.stageChange,onAfterStageTransitionEnter:o[0]||(o[0]=n=>t.$emit("after-stage-transition-enter"))}),{"before-content":r(()=>[p(t.$slots,"before-content",{},void 0,!0)]),content:r(n=>[p(t.$slots,"content",$(S({...n,close:t.close,back:t.$emit("back")})),void 0,!0)]),footer:r(n=>[p(t.$slots,"footer",$(S({...n,close:t.close,back:t.$emit("back")})),void 0,!0)]),_:3},16,["title","stage","options","onClose","onStageChange"]))],38)],32)):g("",!0)],6)):g("",!0)]),_:3}))}}),ve=k(re,[["__scopeId","data-v-8fbd827c"]]);export{ve as default};
2//# sourceMappingURL=TmlNewPopup.9484a938.js.map

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.