@sysvale/cuida 3.2.0 → 3.3.1

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.
@@ -29262,6 +29262,11 @@ const Wae = {
29262
29262
  type: String,
29263
29263
  default: "value",
29264
29264
  required: !1
29265
+ },
29266
+ returnValue: {
29267
+ type: Boolean,
29268
+ default: !1,
29269
+ required: !1
29265
29270
  }
29266
29271
  },
29267
29272
  data() {
@@ -29290,7 +29295,7 @@ const Wae = {
29290
29295
  watch: {
29291
29296
  modelValue: {
29292
29297
  handler(t, e) {
29293
- t !== e && (this.localValue = t);
29298
+ t !== e && (t instanceof Object ? this.localValue = t : this.localValue = { id: t, value: t });
29294
29299
  },
29295
29300
  immediate: !0
29296
29301
  },
@@ -29310,7 +29315,7 @@ const Wae = {
29310
29315
  handler(t) {
29311
29316
  this.localOptions.filter(
29312
29317
  (n) => JSON.stringify(n) === JSON.stringify(t)
29313
- ).length !== 0 && this.$emit("update:modelValue", t);
29318
+ ).length !== 0 && (this.returnValue ? this.$emit("update:modelValue", t[this.optionsField]) : this.$emit("update:modelValue", t));
29314
29319
  },
29315
29320
  deep: !0
29316
29321
  }
@@ -29372,7 +29377,7 @@ const Wae = {
29372
29377
  this.getLiInDOM(this.currentPos).classList.remove("highlight");
29373
29378
  }
29374
29379
  }
29375
- }, Yae = (t) => (Vc("data-v-c80f4297"), t = t(), Fc(), t), jae = {
29380
+ }, Yae = (t) => (Vc("data-v-8cdaaf89"), t = t(), Fc(), t), jae = {
29376
29381
  ref: "cds-select",
29377
29382
  class: "select"
29378
29383
  }, Uae = { class: "select__label" }, qae = {
@@ -29469,7 +29474,7 @@ function noe(t, e, n, i, s, r) {
29469
29474
  r.errorState && !n.disabled ? (w(), T("div", toe, te(n.errorMessage), 1)) : Q("", !0)
29470
29475
  ], 512);
29471
29476
  }
29472
- const ioe = /* @__PURE__ */ _e(Wae, [["render", noe], ["__scopeId", "data-v-c80f4297"]]);
29477
+ const ioe = /* @__PURE__ */ _e(Wae, [["render", noe], ["__scopeId", "data-v-8cdaaf89"]]);
29473
29478
  const soe = {
29474
29479
  components: {
29475
29480
  CdsIcon: nn,
@@ -29621,7 +29626,7 @@ function goe(t, e, n, i, s, r) {
29621
29626
  I("div", coe, [
29622
29627
  (w(!0), T(je, null, st(d.items, (p, g) => (w(), T("div", {
29623
29628
  key: `${g}-${p.name}-item`,
29624
- class: W(["side-bar__subitem", r.isActive(p) ? "side-bar__subitem--active" : "side-bar__subitem--inactive"]),
29629
+ class: W(["side-bar__subitem", r.isActive(p) && (p == null ? void 0 : p.type) !== "external" ? "side-bar__subitem--active" : "side-bar__subitem--inactive"]),
29625
29630
  onClick: (v) => r.handleClick(v, p)
29626
29631
  }, [
29627
29632
  !!p.type && p.type === "external" ? (w(), T("a", {
@@ -39,7 +39,7 @@
39
39
  a 15.9155 15.9155 0 0 1 0 31.831
40
40
  a 15.9155 15.9155 0 0 1 0 -31.831`},null,8,kq),a.createElementVNode("path",{class:a.normalizeClass(`progress-circular__ring-progress--${n.variant}`),"stroke-dasharray":r.normalizedDashArray,"stroke-width":r.stroke-1,style:a.normalizeStyle(r.circleIndicatorStyle),d:`M18 2.0845
41
41
  a 15.9155 15.9155 0 0 1 0 31.831
42
- a 15.9155 15.9155 0 0 1 0 -31.831`},null,14,xq),n.noLabel?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("text",{key:0,x:"18",y:"21.7",class:a.normalizeClass(r.labelClass)},a.toDisplayString(r.label),3))],2)}const Sq=oe(wq,[["render",Cq]]),Yce="",Uh={props:{modelValue:{default:null,required:!0},value:{default:null,required:!0},variant:{type:String,default:"green"},label:{type:String,default:"radio content"},disabled:{type:Boolean,default:!1}},data(){return{uniqueId:Math.random()}},computed:{isChecked(){return this.modelValue===this.value},cursorType(){return this.disabled?"default":"pointer"}}},kv=()=>{a.useCssVars(t=>({"3208a1c7":t.cursorType}))},xv=Uh.setup;Uh.setup=xv?(t,e)=>(kv(),xv(t,e)):kv;const Mq=Uh,Oq={class:"cds-radio__container"},Dq=["id","value","disabled","name","checked"],Eq=["for"],Tq=["disabled"];function Iq(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("span",Oq,[a.createElementVNode("input",{id:`${s.uniqueId}-${n.value}`,type:"radio",class:a.normalizeClass(["cds-radio",`cds-radio--${n.variant}`]),value:n.value,disabled:n.disabled,name:t.$attrs.name,checked:r.isChecked,onChange:e[0]||(e[0]=o=>t.$emit("update:modelValue",o.target.value))},null,42,Dq),a.createElementVNode("label",{class:"cds-radio__label",for:`${s.uniqueId}-${n.value}`},[a.renderSlot(t.$slots,"default",{},()=>[a.createElementVNode("span",{class:"cds-radio__label-text",disabled:n.disabled},a.toDisplayString(n.label),9,Tq)])],8,Eq)])}const Bq=oe(Mq,[["render",Iq]]),jce="",Aq={props:{modelValue:{default:null,required:!0},options:{type:Array,default:()=>[],required:!0},disabled:{type:Boolean,default:!1,required:!1},inline:{type:Boolean,default:!1,description:"When true, the radio buttons will be displayed in a row.",required:!1}},data(){return{selected:this.modelValue}},watch:{selected(t){this.$emit("update:modelValue",t)},modelValue:{handler(t){this.selected=t},immediate:!0}}},Vq={id:"radioButton"},$q=["disabled","for"],Nq=["id","value","disabled"],zq=["for"];function Pq(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("span",Vq,[a.createElementVNode("div",{class:a.normalizeClass({"button-group":n.inline})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.options,(o,c)=>(a.openBlock(),a.createElementBlock("div",{key:o.value,class:a.normalizeClass({"radio-button__container--vertical":n.inline&&c>0})},[a.createElementVNode("label",{class:"radio-button",disabled:o.disabled||n.disabled,for:o.value},[a.withDirectives(a.createElementVNode("input",{id:o.value,"onUpdate:modelValue":e[0]||(e[0]=d=>s.selected=d),type:"radio",value:o.value,disabled:o.disabled||n.disabled},null,8,Nq),[[a.vModelRadio,s.selected]]),a.createElementVNode("label",{class:"radio-button__content",for:o.value},a.toDisplayString(o.text),9,zq)],8,$q)],2))),128))],2)])}const Lq=oe(Aq,[["render",Pq]]),Uce="",Fq={components:{CdsIcon:$t,CdsLinkButton:F_},props:{modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Busque..."},fluid:{type:Boolean,default:!1,required:!1}},data(){return{internalValue:"",isBeingFocused:!1}},computed:{hasSlots(){return!!Object.keys(this.$slots).length},stepperInputDynamicClass(){return(this.fluid?"search-input--fluid":"search-input").concat(" ",this.disabled?"search-input--disabled":"")},inputClass(){return this.fluid?"search-input__field--fluid":"search-input__field"}},methods:{handleInput(t){this.$emit("update:modelValue",t.target.value)}}},Rq=["value","placeholder","disabled"];function Hq(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",{class:a.normalizeClass(r.stepperInputDynamicClass)},[a.createVNode(o,{name:"search-outline",class:"search-input__search-icon"}),a.createElementVNode("input",{id:"cds-search-input",value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,class:a.normalizeClass(r.inputClass),onFocus:e[0]||(e[0]=c=>s.isBeingFocused=!0),onBlur:e[1]||(e[1]=c=>s.isBeingFocused=!1),onInput:e[2]||(e[2]=(...c)=>r.handleInput&&r.handleInput(...c))},null,42,Rq),n.modelValue?(a.openBlock(),a.createBlock(o,{key:0,name:"x-outline",width:"18",height:"18",class:"search-input__close-icon",onClick:e[3]||(e[3]=c=>s.internalValue="")})):a.createCommentVNode("",!0)],2)])}const Wq=oe(Fq,[["render",Hq],["__scopeId","data-v-06cf65a5"]]),qce="",Yq={components:{CdsIcon:$t,CdsTooltip:$h},props:{segments:{type:Array,default:()=>[]},withIcon:{type:Boolean,default:!1},segmentsTooltipText:{type:Array,default:()=>[]}},data(){return{activeSegment:""}},mounted(){this.activeSegment=this.segments[0]},methods:{handleClick(t,e){this.activeSegment=t,this.$emit("click",this.activeSegment,e)}}},jq={class:"segment-control"},Uq=["onClick"],qq={key:1};function Gq(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("cds-tooltip");return a.openBlock(),a.createElementBlock("div",jq,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.segments,(d,h)=>(a.openBlock(),a.createElementBlock("button",{key:h,class:a.normalizeClass(["segment-control__button",{"segment-control__button--active":d===s.activeSegment,"segment-control__button--inactive":d!==s.activeSegment}]),onClick:f=>r.handleClick(d,h)},[n.withIcon?(a.openBlock(),a.createBlock(c,{key:0,text:n.segmentsTooltipText[h]},{default:a.withCtx(()=>[a.createVNode(o,{height:"20",width:"20",name:d},null,8,["name"])]),_:2},1032,["text"])):(a.openBlock(),a.createElementBlock("span",qq,a.toDisplayString(d),1))],10,Uq))),128))])}const Kq=oe(Yq,[["render",Gq]]);function Cv(t=""){const e="\xC0\xC1\xC2\xC3\xC4\xC5\xE0\xE1\xE2\xE3\xE4\xE5\xD2\xD3\xD4\xD5\xD5\xD6\xD8\xF2\xF3\xF4\xF5\xF6\xF8\xC8\xC9\xCA\xCB\xE8\xE9\xEA\xEB\xF0\xC7\xE7\xD0\xCC\xCD\xCE\xCF\xEC\xED\xEE\xEF\xD9\xDA\xDB\xDC\xF9\xFA\xFB\xFC\xD1\xF1\u0160\u0161\u0178\xFF\xFD\u017D\u017E",n="AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz",i=t.length;let s=t.split(""),r;for(let o=0;o<i;o+=1)r=e.indexOf(t[o]),r!==-1&&(s[o]=n[r]);return s=s.join(""),s=s.split(".").join(""),s=s.split("-").join(""),s=s.split("/").join(""),s}const Gce="",Zq={components:{CdsIcon:$t},props:{label:{type:String,default:"Label",required:!0},placeholder:{type:String,default:"Selecione...",required:!1},options:{type:Array,default:()=>[],required:!0},modelValue:{type:[Array,Object],required:!0},state:{type:String,default:"default"},required:{type:Boolean,default:!1,required:!1},errorMessage:{type:String,default:"Valor inv\xE1lido"},searchable:{type:Boolean,default:!1,required:!1},width:{type:String,default:"default",required:!1},fluid:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},tooltip:{type:String,default:null},tooltipIcon:{type:String,default:"info-outline"},optionsField:{type:String,default:"value",required:!1}},data(){return{currentPos:0,active:!1,id:null,allowSearch:!1,localOptions:[],pristineOptions:[],localValue:"",selectElement:"",direction:"down",uniqueKey:v1()}},computed:{errorState(){return this.state==="invalid"},inputClass(){let t="";return this.active&&this.direction==="down"?t="select__input--opened-down":this.active&&this.direction==="up"?t="select__input--opened-up":t="select__input--closed",this.disabled?t+=" select__input--disabled":this.state==="valid"?t+=" select__input--valid":this.state==="invalid"&&(t+=" select__input--invalid"),t+=` select__input--${t8.find(e=>e===this.width)}`,t+=this.fluid?" select__input--fluid":" select__input--fit",t+=this.searchable?" select__input--searchable":"",t}},watch:{modelValue:{handler(t,e){t!==e&&(this.localValue=t)},immediate:!0},options:{handler(t,e){t!==e&&(this.localOptions=t,this.pristineOptions=t)},immediate:!0},searchable:{handler(t,e){t!==e&&(this.allowSearch=t)},immediate:!0},localValue:{handler(t){this.localOptions.filter(n=>JSON.stringify(n)===JSON.stringify(t)).length!==0&&this.$emit("update:modelValue",t)},deep:!0}},mounted(){this.id=`cds-select-${this.uniqueKey}`,this.selectElement=this.$refs["cds-select"]},methods:{filterOptions(){const t=Cv(this.localValue[this.optionsField]),e=new RegExp(t,"i");this.localOptions=this.options.filter(n=>Cv(n[this.optionsField]).search(e)>=0)},activeSelection(){this.disabled||this.$nextTick().then(()=>{const t=this.localOptions[this.currentPos];this.$refs[`${t[this.optionsField]}-${this.currentPos}`][0].classList.add("highlight")})},activateSelectionOnEnter(){this.disabled||(this.active=!this.active,typeof this.localOptions[this.currentPos]>"u"?this.localOptions=this.pristineOptions:this.localValue=m1(this.localOptions[this.currentPos]),this.$refs["select-input"].blur())},activateSelectionOnClick(){let t=this.selectElement.getBoundingClientRect();t.top+t.height+286<window.innerHeight?this.direction="down":this.direction="up",!this.disabled&&(this.active=!this.active)},hide(){this.localOptions=this.pristineOptions,this.active=!1},selectItem(){this.localValue=m1(this.localOptions[this.currentPos])},getLiInDOM(t){const e=this.localOptions[t];return this.$refs[`${e[this.optionsField]}-${t}`][0]},handleOptionVisibility(t,e,n){const i=t.getBoundingClientRect(),s=this.$refs["select-options"],r=s.getBoundingClientRect();n==="up"&&i.top<=r.top&&(s.scrollTop+=e),n==="down"&&i.top>=r.bottom&&(s.scrollTop+=e)},highlightOnArrowDown(){if(this.currentPos===this.localOptions.length-1)return;this.currentPos+=1;const t=this.getLiInDOM(this.currentPos),e=this.getLiInDOM(this.currentPos-1);t.classList.add("highlight"),e.classList.remove("highlight"),this.handleOptionVisibility(t,37,"down")},highlightOnArrowUp(){if(this.currentPos===0)return;const t=this.getLiInDOM(this.currentPos),e=this.getLiInDOM(this.currentPos-1);t.classList.remove("highlight"),e.classList.add("highlight"),this.handleOptionVisibility(t,-37,"up"),this.currentPos-=1},highlightOnMouseOver(t){this.currentPos=t,this.getLiInDOM(this.currentPos).classList.add("highlight")},unhighlightOnMouseOut(){this.getLiInDOM(this.currentPos).classList.remove("highlight")}}},Xq=t=>(a.pushScopeId("data-v-c80f4297"),t=t(),a.popScopeId(),t),Jq={ref:"cds-select",class:"select"},Qq={class:"select__label"},eG={class:"label__content",for:"cds-select"},tG={key:0,class:"label__required-indicator"},nG=["id","onkeypress","placeholder","disabled","readonly"],iG={key:0,class:"option__container"},sG=["onMouseover"],rG={key:1,class:"option__container"},aG=[Xq(()=>a.createElementVNode("li",{class:"option__text--muted"}," Nenhuma op\xE7\xE3o encontrada ",-1))],oG={key:0,class:"select__error-message"};function lG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveDirective("cdstip");return a.openBlock(),a.createElementBlock("div",Jq,[a.createElementVNode("label",Qq,[a.createElementVNode("div",eG,[a.createElementVNode("span",null,a.toDisplayString(n.label),1),n.required?(a.openBlock(),a.createElementBlock("span",tG," * ")):a.createCommentVNode("",!0),n.tooltip?a.withDirectives((a.openBlock(),a.createBlock(o,{key:1,name:n.tooltipIcon,height:"20",width:"20",class:"label__icon"},null,8,["name"])),[[c,n.tooltip]]):a.createCommentVNode("",!0)])]),a.createElementVNode("div",{class:a.normalizeClass(["select__container",n.fluid?"select__container--fluid":"select__container--fit"])},[a.withDirectives(a.createElementVNode("input",{id:t.$attrs.id||s.id,ref:"select-input","onUpdate:modelValue":e[0]||(e[0]=d=>s.localValue[n.optionsField]=d),type:"text",autocomplete:"off",onkeypress:`return ${s.allowSearch};`,class:a.normalizeClass(r.inputClass),placeholder:n.placeholder,disabled:n.disabled,readonly:!n.searchable,onKeydown:[e[1]||(e[1]=a.withKeys(a.withModifiers((...d)=>r.activateSelectionOnEnter&&r.activateSelectionOnEnter(...d),["prevent"]),["enter"])),e[2]||(e[2]=a.withKeys(a.withModifiers((...d)=>r.highlightOnArrowDown&&r.highlightOnArrowDown(...d),["prevent"]),["arrow-down"])),e[3]||(e[3]=a.withKeys(a.withModifiers((...d)=>r.highlightOnArrowUp&&r.highlightOnArrowUp(...d),["prevent"]),["arrow-up"]))],onClick:e[4]||(e[4]=(...d)=>r.activateSelectionOnClick&&r.activateSelectionOnClick(...d)),onInput:e[5]||(e[5]=(...d)=>r.filterOptions&&r.filterOptions(...d)),onFocus:e[6]||(e[6]=(...d)=>r.activeSelection&&r.activeSelection(...d)),onBlur:e[7]||(e[7]=(...d)=>r.hide&&r.hide(...d))},null,42,nG),[[a.vModelText,s.localValue[n.optionsField]]]),a.withDirectives(a.createElementVNode("div",{ref:"select-options",class:a.normalizeClass(["select__options",{"select__options--thin":n.width==="thin","select__options--default":n.width==="default","select__options--wide":n.width==="wide","select__options--fluid":n.fluid,"select__options--down":s.direction==="down","select__options--up":s.direction==="up"}])},[s.localOptions.length>0?(a.openBlock(),a.createElementBlock("ul",iG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.localOptions,(d,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,ref_for:!0,ref:`${d[n.optionsField]}-${h}`,class:"option__text",onMousedown:e[8]||(e[8]=(...f)=>r.selectItem&&r.selectItem(...f)),onMouseover:f=>r.highlightOnMouseOver(h),onMouseout:e[9]||(e[9]=f=>r.unhighlightOnMouseOut())},a.toDisplayString(d[n.optionsField]),41,sG))),128))])):(a.openBlock(),a.createElementBlock("ul",rG,aG))],2),[[a.vShow,s.active]]),a.createElementVNode("span",{class:a.normalizeClass(s.active?"select__chevron--opened":"select__chevron--closed")},null,2)],2),r.errorState&&!n.disabled?(a.openBlock(),a.createElementBlock("div",oG,a.toDisplayString(n.errorMessage),1)):a.createCommentVNode("",!0)],512)}const cG=oe(Zq,[["render",lG],["__scopeId","data-v-c80f4297"]]),Zce="",dG={components:{CdsIcon:$t,CdsAvatar:w1},props:{items:{type:Array,default:()=>[],required:!0,validator:t=>!t.filter(n=>{const i=Xt(n.path)&&Xt(n.route),s=Xt(n.items)||n.items.filter(r=>Xt(r.path)&&Xt(r.route)).length;return Xt(n.label)||s&&i}).length},activeItem:{type:Object,default:()=>({}),required:!0},showLogout:{type:Boolean,default:!0},userName:{type:String,default:""},userRole:{type:String,default:""},userPicture:{type:String,default:null}},data(){return{internalActiveItem:{},colorOptions:jr}},watch:{items:{handler(t){const e=t.filter(n=>n.name===this.activeItem.name);[this.internalActiveItem]=e.length?e:t},immediate:!0},activeItem:{handler(t){this.internalActiveItem=t},immediate:!0}},mounted(){this.internalActiveItem=this.activeItem},methods:{colorHexCode:Fl,handleClick(t,e){this.internalActiveItem=e,this.$emit("sidebar-click",this.internalActiveItem)},isActive(t){let e=!1,n=!1;return!!t.items&&t.items.length>0&&(e=t.items.some(i=>Ll(i,this.internalActiveItem))),n=Ll(this.internalActiveItem,t),e||n},resolveRoute({route:t,path:e}){const n=Xt(t)?e:t;return n instanceof String?{path:n}:n},routerPushTo(t){return this.resolveRoute(t)?this.resolveRoute(t).path:null}}},uG={class:"side-bar"},hG={class:"side-bar__logo"},fG=["onClick"],pG={key:0,class:"side-bar__subitem-container"},mG={class:"side-bar__subitems"},gG=["onClick"],_G=["href"],vG={class:"side-bar__footer"},yG={class:"side-bar__avatar"},bG=a.createElementVNode("span",null,"Sair",-1);function wG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("router-link"),d=a.resolveComponent("cds-avatar");return a.openBlock(),a.createElementBlock("div",uG,[a.createElementVNode("div",null,[a.createElementVNode("div",hG,[a.renderSlot(t.$slots,"logo")]),a.createElementVNode("ul",{class:a.normalizeClass({"side-bar__container":n.items.length>=1})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.items,(h,f)=>(a.openBlock(),a.createElementBlock("li",{key:`${f}-${h.name}-item`,role:"presentation"},[a.createElementVNode("div",{class:a.normalizeClass(["side-bar__item-container",r.isActive(h)?"side-bar__item-container--active":"side-bar__item-container--inactive"])},[!!h.items||h.type==="link"?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["side-bar__item",r.isActive(h)?"side-bar__item--active":"side-bar__item--inactive"]),onClick:m=>r.handleClick(m,h)},[a.createElementVNode("div",null,[a.createVNode(o,{name:h.icon,width:"20",height:"20"},null,8,["name"]),a.createElementVNode("span",null,a.toDisplayString(h.label),1)]),!!h.items&&h.items.length>0?(a.openBlock(),a.createBlock(o,{key:0,name:"caret-down-outline",class:a.normalizeClass({item__caret:r.isActive(h)}),width:"16",height:"16"},null,8,["class"])):a.createCommentVNode("",!0)],10,fG)):(a.openBlock(),a.createBlock(c,{key:1,to:r.routerPushTo(h),class:a.normalizeClass(["side-bar__item",r.isActive(h)?"side-bar__item--active":"side-bar__item--inactive"]),onClick:m=>r.handleClick(m,h)},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(o,{name:h.icon,width:"20",height:"20"},null,8,["name"]),a.createElementVNode("span",null,a.toDisplayString(h.label),1)]),!!h.items&&h.items.length>0?(a.openBlock(),a.createBlock(o,{key:0,name:"caret-down-outline",class:a.normalizeClass({item__caret:r.isActive(h)}),width:"16",height:"16"},null,8,["class"])):a.createCommentVNode("",!0)]),_:2},1032,["to","class","onClick"]))],2),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[!!h.items&&h.items.length>0&&r.isActive(h)?(a.openBlock(),a.createElementBlock("div",pG,[a.createElementVNode("div",mG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.items,(m,g)=>(a.openBlock(),a.createElementBlock("div",{key:`${g}-${m.name}-item`,class:a.normalizeClass(["side-bar__subitem",r.isActive(m)?"side-bar__subitem--active":"side-bar__subitem--inactive"]),onClick:v=>r.handleClick(v,m)},[!!m.type&&m.type==="external"?(a.openBlock(),a.createElementBlock("a",{key:0,class:"side-bar__subitem-link",target:"_blank",rel:"noopener noreferrer",href:m.route.path},[a.createTextVNode(a.toDisplayString(m.label)+" ",1),a.createVNode(o,{height:"16",width:"16",name:"open-in-new-tab-outline"})],8,_G)):(a.openBlock(),a.createBlock(c,{key:1,class:"side-bar__subitem-link",to:r.routerPushTo(m)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(m.label),1)]),_:2},1032,["to"]))],10,gG))),128))])])):a.createCommentVNode("",!0)]),_:2},1024)]))),128))],2)]),a.createElementVNode("div",vG,[a.createElementVNode("div",yG,[a.createVNode(d,{src:n.userPicture,name:n.userName,variant:"white",size:"lg"},null,8,["src","name"]),a.createElementVNode("div",null,[a.createElementVNode("p",null,a.toDisplayString(n.userName),1),a.createElementVNode("p",null,a.toDisplayString(n.userRole),1)])]),a.createElementVNode("ul",null,[n.showLogout?(a.openBlock(),a.createElementBlock("li",{key:0,class:"side-bar__logout-button",onClick:e[0]||(e[0]=h=>t.$emit("logout",!0))},[a.createVNode(o,{name:"logout-outline",width:"20",height:"20"}),bG])):a.createCommentVNode("",!0)])])])}const kG=oe(dG,[["render",wG]]),Xce="",qh={components:{CdsIcon:$t,CdsBox:bl,CdsClickable:Ls},props:{title:{type:String,default:null},modelValue:{type:Boolean,default:!1,required:!0},withOverlay:{type:Boolean,default:!1},size:{type:String,default:"md"},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1}},data(){return{sassColorVariables:Gs}},computed:{overlayColor(){const t=this.withOverlay?this.sassColorVariables.n900:"transparent";return`rgba(${this.hexToRgb(t)}, 0.4)`},sideSheetWidth(){let t="328px";switch(this.size){case"xl":t="840px";break;case"lg":t="700px";break;case"md":t="500px";break;default:t="340px";break}return t}},watch:{modelValue(t){if(!t){this.dettachKeyupEvent();return}this.attachKeyupEvent()}},created(){this.attachKeyupEvent()},beforeUnmount(){this.dettachKeyupEvent()},methods:{hexToRgb:k0,shouldCloseOnBackdrop(){this.noCloseOnBackdrop||this.$emit("update:modelValue",!this.modelValue)},shouldCloseOnEsc(){this.noCloseOnEsc||this.$emit("update:modelValue",!this.modelValue)},keyupListener(t){t.keyCode===e8.ESC&&this.shouldCloseOnEsc()},attachKeyupEvent(){window.addEventListener("keyup",this.keyupListener)},dettachKeyupEvent(){window.removeEventListener("keyup",this.keyupListener)}}},Sv=()=>{a.useCssVars(t=>({11828368:t.overlayColor,"9d05acda":t.sideSheetWidth}))},Mv=qh.setup;qh.setup=Mv?(t,e)=>(Sv(),Mv(t,e)):Sv;const xG=qh,CG={class:"side-sheet__header"};function SG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("cds-clickable"),d=a.resolveComponent("cds-box");return n.modelValue?(a.openBlock(),a.createElementBlock("div",{key:0,class:"side-sheet__overlay",tabindex:"0",onClick:e[3]||(e[3]=(...h)=>r.shouldCloseOnBackdrop&&r.shouldCloseOnBackdrop(...h))},[a.createVNode(d,{padding:"5",class:"side-sheet__container",elevated:"",fluid:"",onClick:e[2]||(e[2]=a.withModifiers(()=>{},["stop"]))},{default:a.withCtx(()=>[a.createElementVNode("header",null,[a.renderSlot(t.$slots,"header",{},()=>[a.createElementVNode("div",CG,[a.createElementVNode("h3",null,a.toDisplayString(n.title),1),a.createElementVNode("div",{class:"side-sheet__close-icon",onClick:e[1]||(e[1]=(...h)=>t.closeHandle&&t.closeHandle(...h))},[a.createVNode(c,{clickable:""},{default:a.withCtx(()=>[a.createVNode(o,{height:"20",width:"20",name:"x-outline",onClick:e[0]||(e[0]=a.withModifiers(h=>t.$emit("update:modelValue",!n.modelValue),["stop"]))})]),_:1})])])],!0)]),a.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3})])):a.createCommentVNode("",!0)}const MG=oe(xG,[["render",SG],["__scopeId","data-v-54ccf7a0"]]),Jce="",Gh={props:{width:{type:String,default:"20"},height:{type:String,default:"16"},fluid:{type:Boolean,default:!1},shape:{type:String,default:"square",validate:t=>["circle","square"].includes(t)}},computed:{computedStyle(){return this.shape==="circle"?{"--width":`${this.width}px`,"--height":`${this.width}px`}:this.fluid?{"--width":"100%","--height":this.height!=="16"?`${this.height}px`:"100%"}:{"--width":`${this.width}px`,"--height":`${this.height}px`}},resolveShape(){return this.shape==="circle"?"50%":"6px"}}},Ov=()=>{a.useCssVars(t=>({"02fe74e9":t.resolveShape}))},Dv=Gh.setup;Gh.setup=Dv?(t,e)=>(Ov(),Dv(t,e)):Ov;const OG=Gh;function DG(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("div",{class:"skeleton__container",style:a.normalizeStyle(r.computedStyle)},null,4)}const EG=oe(OG,[["render",DG],["__scopeId","data-v-5298dc58"]]),Qce="",TG={props:{width:{type:String,required:!1},height:{type:String,required:!1,default:"16"}},computed:{computedStyle(){return{"--width":`${this.width}px`,"--height":`${this.height}px`}}}};function IG(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("div",{class:"skeleton__container",style:a.normalizeStyle(r.computedStyle)},null,4)}const BG=oe(TG,[["render",IG],["__scopeId","data-v-d39e7029"]]),ede="",AG={components:{CdsIcon:$t},props:{steps:{type:Array,default:()=>[],required:!0,description:`Um array com objetos com as propriedades 'label', 'inProcessing',
42
+ a 15.9155 15.9155 0 0 1 0 -31.831`},null,14,xq),n.noLabel?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("text",{key:0,x:"18",y:"21.7",class:a.normalizeClass(r.labelClass)},a.toDisplayString(r.label),3))],2)}const Sq=oe(wq,[["render",Cq]]),Yce="",Uh={props:{modelValue:{default:null,required:!0},value:{default:null,required:!0},variant:{type:String,default:"green"},label:{type:String,default:"radio content"},disabled:{type:Boolean,default:!1}},data(){return{uniqueId:Math.random()}},computed:{isChecked(){return this.modelValue===this.value},cursorType(){return this.disabled?"default":"pointer"}}},kv=()=>{a.useCssVars(t=>({"3208a1c7":t.cursorType}))},xv=Uh.setup;Uh.setup=xv?(t,e)=>(kv(),xv(t,e)):kv;const Mq=Uh,Oq={class:"cds-radio__container"},Dq=["id","value","disabled","name","checked"],Eq=["for"],Tq=["disabled"];function Iq(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("span",Oq,[a.createElementVNode("input",{id:`${s.uniqueId}-${n.value}`,type:"radio",class:a.normalizeClass(["cds-radio",`cds-radio--${n.variant}`]),value:n.value,disabled:n.disabled,name:t.$attrs.name,checked:r.isChecked,onChange:e[0]||(e[0]=o=>t.$emit("update:modelValue",o.target.value))},null,42,Dq),a.createElementVNode("label",{class:"cds-radio__label",for:`${s.uniqueId}-${n.value}`},[a.renderSlot(t.$slots,"default",{},()=>[a.createElementVNode("span",{class:"cds-radio__label-text",disabled:n.disabled},a.toDisplayString(n.label),9,Tq)])],8,Eq)])}const Bq=oe(Mq,[["render",Iq]]),jce="",Aq={props:{modelValue:{default:null,required:!0},options:{type:Array,default:()=>[],required:!0},disabled:{type:Boolean,default:!1,required:!1},inline:{type:Boolean,default:!1,description:"When true, the radio buttons will be displayed in a row.",required:!1}},data(){return{selected:this.modelValue}},watch:{selected(t){this.$emit("update:modelValue",t)},modelValue:{handler(t){this.selected=t},immediate:!0}}},Vq={id:"radioButton"},$q=["disabled","for"],Nq=["id","value","disabled"],zq=["for"];function Pq(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("span",Vq,[a.createElementVNode("div",{class:a.normalizeClass({"button-group":n.inline})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.options,(o,c)=>(a.openBlock(),a.createElementBlock("div",{key:o.value,class:a.normalizeClass({"radio-button__container--vertical":n.inline&&c>0})},[a.createElementVNode("label",{class:"radio-button",disabled:o.disabled||n.disabled,for:o.value},[a.withDirectives(a.createElementVNode("input",{id:o.value,"onUpdate:modelValue":e[0]||(e[0]=d=>s.selected=d),type:"radio",value:o.value,disabled:o.disabled||n.disabled},null,8,Nq),[[a.vModelRadio,s.selected]]),a.createElementVNode("label",{class:"radio-button__content",for:o.value},a.toDisplayString(o.text),9,zq)],8,$q)],2))),128))],2)])}const Lq=oe(Aq,[["render",Pq]]),Uce="",Fq={components:{CdsIcon:$t,CdsLinkButton:F_},props:{modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Busque..."},fluid:{type:Boolean,default:!1,required:!1}},data(){return{internalValue:"",isBeingFocused:!1}},computed:{hasSlots(){return!!Object.keys(this.$slots).length},stepperInputDynamicClass(){return(this.fluid?"search-input--fluid":"search-input").concat(" ",this.disabled?"search-input--disabled":"")},inputClass(){return this.fluid?"search-input__field--fluid":"search-input__field"}},methods:{handleInput(t){this.$emit("update:modelValue",t.target.value)}}},Rq=["value","placeholder","disabled"];function Hq(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",{class:a.normalizeClass(r.stepperInputDynamicClass)},[a.createVNode(o,{name:"search-outline",class:"search-input__search-icon"}),a.createElementVNode("input",{id:"cds-search-input",value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,class:a.normalizeClass(r.inputClass),onFocus:e[0]||(e[0]=c=>s.isBeingFocused=!0),onBlur:e[1]||(e[1]=c=>s.isBeingFocused=!1),onInput:e[2]||(e[2]=(...c)=>r.handleInput&&r.handleInput(...c))},null,42,Rq),n.modelValue?(a.openBlock(),a.createBlock(o,{key:0,name:"x-outline",width:"18",height:"18",class:"search-input__close-icon",onClick:e[3]||(e[3]=c=>s.internalValue="")})):a.createCommentVNode("",!0)],2)])}const Wq=oe(Fq,[["render",Hq],["__scopeId","data-v-06cf65a5"]]),qce="",Yq={components:{CdsIcon:$t,CdsTooltip:$h},props:{segments:{type:Array,default:()=>[]},withIcon:{type:Boolean,default:!1},segmentsTooltipText:{type:Array,default:()=>[]}},data(){return{activeSegment:""}},mounted(){this.activeSegment=this.segments[0]},methods:{handleClick(t,e){this.activeSegment=t,this.$emit("click",this.activeSegment,e)}}},jq={class:"segment-control"},Uq=["onClick"],qq={key:1};function Gq(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("cds-tooltip");return a.openBlock(),a.createElementBlock("div",jq,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.segments,(d,h)=>(a.openBlock(),a.createElementBlock("button",{key:h,class:a.normalizeClass(["segment-control__button",{"segment-control__button--active":d===s.activeSegment,"segment-control__button--inactive":d!==s.activeSegment}]),onClick:f=>r.handleClick(d,h)},[n.withIcon?(a.openBlock(),a.createBlock(c,{key:0,text:n.segmentsTooltipText[h]},{default:a.withCtx(()=>[a.createVNode(o,{height:"20",width:"20",name:d},null,8,["name"])]),_:2},1032,["text"])):(a.openBlock(),a.createElementBlock("span",qq,a.toDisplayString(d),1))],10,Uq))),128))])}const Kq=oe(Yq,[["render",Gq]]);function Cv(t=""){const e="\xC0\xC1\xC2\xC3\xC4\xC5\xE0\xE1\xE2\xE3\xE4\xE5\xD2\xD3\xD4\xD5\xD5\xD6\xD8\xF2\xF3\xF4\xF5\xF6\xF8\xC8\xC9\xCA\xCB\xE8\xE9\xEA\xEB\xF0\xC7\xE7\xD0\xCC\xCD\xCE\xCF\xEC\xED\xEE\xEF\xD9\xDA\xDB\xDC\xF9\xFA\xFB\xFC\xD1\xF1\u0160\u0161\u0178\xFF\xFD\u017D\u017E",n="AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz",i=t.length;let s=t.split(""),r;for(let o=0;o<i;o+=1)r=e.indexOf(t[o]),r!==-1&&(s[o]=n[r]);return s=s.join(""),s=s.split(".").join(""),s=s.split("-").join(""),s=s.split("/").join(""),s}const Gce="",Zq={components:{CdsIcon:$t},props:{label:{type:String,default:"Label",required:!0},placeholder:{type:String,default:"Selecione...",required:!1},options:{type:Array,default:()=>[],required:!0},modelValue:{type:[Array,Object],required:!0},state:{type:String,default:"default"},required:{type:Boolean,default:!1,required:!1},errorMessage:{type:String,default:"Valor inv\xE1lido"},searchable:{type:Boolean,default:!1,required:!1},width:{type:String,default:"default",required:!1},fluid:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},tooltip:{type:String,default:null},tooltipIcon:{type:String,default:"info-outline"},optionsField:{type:String,default:"value",required:!1},returnValue:{type:Boolean,default:!1,required:!1}},data(){return{currentPos:0,active:!1,id:null,allowSearch:!1,localOptions:[],pristineOptions:[],localValue:"",selectElement:"",direction:"down",uniqueKey:v1()}},computed:{errorState(){return this.state==="invalid"},inputClass(){let t="";return this.active&&this.direction==="down"?t="select__input--opened-down":this.active&&this.direction==="up"?t="select__input--opened-up":t="select__input--closed",this.disabled?t+=" select__input--disabled":this.state==="valid"?t+=" select__input--valid":this.state==="invalid"&&(t+=" select__input--invalid"),t+=` select__input--${t8.find(e=>e===this.width)}`,t+=this.fluid?" select__input--fluid":" select__input--fit",t+=this.searchable?" select__input--searchable":"",t}},watch:{modelValue:{handler(t,e){t!==e&&(t instanceof Object?this.localValue=t:this.localValue={id:t,value:t})},immediate:!0},options:{handler(t,e){t!==e&&(this.localOptions=t,this.pristineOptions=t)},immediate:!0},searchable:{handler(t,e){t!==e&&(this.allowSearch=t)},immediate:!0},localValue:{handler(t){this.localOptions.filter(n=>JSON.stringify(n)===JSON.stringify(t)).length!==0&&(this.returnValue?this.$emit("update:modelValue",t[this.optionsField]):this.$emit("update:modelValue",t))},deep:!0}},mounted(){this.id=`cds-select-${this.uniqueKey}`,this.selectElement=this.$refs["cds-select"]},methods:{filterOptions(){const t=Cv(this.localValue[this.optionsField]),e=new RegExp(t,"i");this.localOptions=this.options.filter(n=>Cv(n[this.optionsField]).search(e)>=0)},activeSelection(){this.disabled||this.$nextTick().then(()=>{const t=this.localOptions[this.currentPos];this.$refs[`${t[this.optionsField]}-${this.currentPos}`][0].classList.add("highlight")})},activateSelectionOnEnter(){this.disabled||(this.active=!this.active,typeof this.localOptions[this.currentPos]>"u"?this.localOptions=this.pristineOptions:this.localValue=m1(this.localOptions[this.currentPos]),this.$refs["select-input"].blur())},activateSelectionOnClick(){let t=this.selectElement.getBoundingClientRect();t.top+t.height+286<window.innerHeight?this.direction="down":this.direction="up",!this.disabled&&(this.active=!this.active)},hide(){this.localOptions=this.pristineOptions,this.active=!1},selectItem(){this.localValue=m1(this.localOptions[this.currentPos])},getLiInDOM(t){const e=this.localOptions[t];return this.$refs[`${e[this.optionsField]}-${t}`][0]},handleOptionVisibility(t,e,n){const i=t.getBoundingClientRect(),s=this.$refs["select-options"],r=s.getBoundingClientRect();n==="up"&&i.top<=r.top&&(s.scrollTop+=e),n==="down"&&i.top>=r.bottom&&(s.scrollTop+=e)},highlightOnArrowDown(){if(this.currentPos===this.localOptions.length-1)return;this.currentPos+=1;const t=this.getLiInDOM(this.currentPos),e=this.getLiInDOM(this.currentPos-1);t.classList.add("highlight"),e.classList.remove("highlight"),this.handleOptionVisibility(t,37,"down")},highlightOnArrowUp(){if(this.currentPos===0)return;const t=this.getLiInDOM(this.currentPos),e=this.getLiInDOM(this.currentPos-1);t.classList.remove("highlight"),e.classList.add("highlight"),this.handleOptionVisibility(t,-37,"up"),this.currentPos-=1},highlightOnMouseOver(t){this.currentPos=t,this.getLiInDOM(this.currentPos).classList.add("highlight")},unhighlightOnMouseOut(){this.getLiInDOM(this.currentPos).classList.remove("highlight")}}},Xq=t=>(a.pushScopeId("data-v-8cdaaf89"),t=t(),a.popScopeId(),t),Jq={ref:"cds-select",class:"select"},Qq={class:"select__label"},eG={class:"label__content",for:"cds-select"},tG={key:0,class:"label__required-indicator"},nG=["id","onkeypress","placeholder","disabled","readonly"],iG={key:0,class:"option__container"},sG=["onMouseover"],rG={key:1,class:"option__container"},aG=[Xq(()=>a.createElementVNode("li",{class:"option__text--muted"}," Nenhuma op\xE7\xE3o encontrada ",-1))],oG={key:0,class:"select__error-message"};function lG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveDirective("cdstip");return a.openBlock(),a.createElementBlock("div",Jq,[a.createElementVNode("label",Qq,[a.createElementVNode("div",eG,[a.createElementVNode("span",null,a.toDisplayString(n.label),1),n.required?(a.openBlock(),a.createElementBlock("span",tG," * ")):a.createCommentVNode("",!0),n.tooltip?a.withDirectives((a.openBlock(),a.createBlock(o,{key:1,name:n.tooltipIcon,height:"20",width:"20",class:"label__icon"},null,8,["name"])),[[c,n.tooltip]]):a.createCommentVNode("",!0)])]),a.createElementVNode("div",{class:a.normalizeClass(["select__container",n.fluid?"select__container--fluid":"select__container--fit"])},[a.withDirectives(a.createElementVNode("input",{id:t.$attrs.id||s.id,ref:"select-input","onUpdate:modelValue":e[0]||(e[0]=d=>s.localValue[n.optionsField]=d),type:"text",autocomplete:"off",onkeypress:`return ${s.allowSearch};`,class:a.normalizeClass(r.inputClass),placeholder:n.placeholder,disabled:n.disabled,readonly:!n.searchable,onKeydown:[e[1]||(e[1]=a.withKeys(a.withModifiers((...d)=>r.activateSelectionOnEnter&&r.activateSelectionOnEnter(...d),["prevent"]),["enter"])),e[2]||(e[2]=a.withKeys(a.withModifiers((...d)=>r.highlightOnArrowDown&&r.highlightOnArrowDown(...d),["prevent"]),["arrow-down"])),e[3]||(e[3]=a.withKeys(a.withModifiers((...d)=>r.highlightOnArrowUp&&r.highlightOnArrowUp(...d),["prevent"]),["arrow-up"]))],onClick:e[4]||(e[4]=(...d)=>r.activateSelectionOnClick&&r.activateSelectionOnClick(...d)),onInput:e[5]||(e[5]=(...d)=>r.filterOptions&&r.filterOptions(...d)),onFocus:e[6]||(e[6]=(...d)=>r.activeSelection&&r.activeSelection(...d)),onBlur:e[7]||(e[7]=(...d)=>r.hide&&r.hide(...d))},null,42,nG),[[a.vModelText,s.localValue[n.optionsField]]]),a.withDirectives(a.createElementVNode("div",{ref:"select-options",class:a.normalizeClass(["select__options",{"select__options--thin":n.width==="thin","select__options--default":n.width==="default","select__options--wide":n.width==="wide","select__options--fluid":n.fluid,"select__options--down":s.direction==="down","select__options--up":s.direction==="up"}])},[s.localOptions.length>0?(a.openBlock(),a.createElementBlock("ul",iG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.localOptions,(d,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,ref_for:!0,ref:`${d[n.optionsField]}-${h}`,class:"option__text",onMousedown:e[8]||(e[8]=(...f)=>r.selectItem&&r.selectItem(...f)),onMouseover:f=>r.highlightOnMouseOver(h),onMouseout:e[9]||(e[9]=f=>r.unhighlightOnMouseOut())},a.toDisplayString(d[n.optionsField]),41,sG))),128))])):(a.openBlock(),a.createElementBlock("ul",rG,aG))],2),[[a.vShow,s.active]]),a.createElementVNode("span",{class:a.normalizeClass(s.active?"select__chevron--opened":"select__chevron--closed")},null,2)],2),r.errorState&&!n.disabled?(a.openBlock(),a.createElementBlock("div",oG,a.toDisplayString(n.errorMessage),1)):a.createCommentVNode("",!0)],512)}const cG=oe(Zq,[["render",lG],["__scopeId","data-v-8cdaaf89"]]),Zce="",dG={components:{CdsIcon:$t,CdsAvatar:w1},props:{items:{type:Array,default:()=>[],required:!0,validator:t=>!t.filter(n=>{const i=Xt(n.path)&&Xt(n.route),s=Xt(n.items)||n.items.filter(r=>Xt(r.path)&&Xt(r.route)).length;return Xt(n.label)||s&&i}).length},activeItem:{type:Object,default:()=>({}),required:!0},showLogout:{type:Boolean,default:!0},userName:{type:String,default:""},userRole:{type:String,default:""},userPicture:{type:String,default:null}},data(){return{internalActiveItem:{},colorOptions:jr}},watch:{items:{handler(t){const e=t.filter(n=>n.name===this.activeItem.name);[this.internalActiveItem]=e.length?e:t},immediate:!0},activeItem:{handler(t){this.internalActiveItem=t},immediate:!0}},mounted(){this.internalActiveItem=this.activeItem},methods:{colorHexCode:Fl,handleClick(t,e){this.internalActiveItem=e,this.$emit("sidebar-click",this.internalActiveItem)},isActive(t){let e=!1,n=!1;return!!t.items&&t.items.length>0&&(e=t.items.some(i=>Ll(i,this.internalActiveItem))),n=Ll(this.internalActiveItem,t),e||n},resolveRoute({route:t,path:e}){const n=Xt(t)?e:t;return n instanceof String?{path:n}:n},routerPushTo(t){return this.resolveRoute(t)?this.resolveRoute(t).path:null}}},uG={class:"side-bar"},hG={class:"side-bar__logo"},fG=["onClick"],pG={key:0,class:"side-bar__subitem-container"},mG={class:"side-bar__subitems"},gG=["onClick"],_G=["href"],vG={class:"side-bar__footer"},yG={class:"side-bar__avatar"},bG=a.createElementVNode("span",null,"Sair",-1);function wG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("router-link"),d=a.resolveComponent("cds-avatar");return a.openBlock(),a.createElementBlock("div",uG,[a.createElementVNode("div",null,[a.createElementVNode("div",hG,[a.renderSlot(t.$slots,"logo")]),a.createElementVNode("ul",{class:a.normalizeClass({"side-bar__container":n.items.length>=1})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.items,(h,f)=>(a.openBlock(),a.createElementBlock("li",{key:`${f}-${h.name}-item`,role:"presentation"},[a.createElementVNode("div",{class:a.normalizeClass(["side-bar__item-container",r.isActive(h)?"side-bar__item-container--active":"side-bar__item-container--inactive"])},[!!h.items||h.type==="link"?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["side-bar__item",r.isActive(h)?"side-bar__item--active":"side-bar__item--inactive"]),onClick:m=>r.handleClick(m,h)},[a.createElementVNode("div",null,[a.createVNode(o,{name:h.icon,width:"20",height:"20"},null,8,["name"]),a.createElementVNode("span",null,a.toDisplayString(h.label),1)]),!!h.items&&h.items.length>0?(a.openBlock(),a.createBlock(o,{key:0,name:"caret-down-outline",class:a.normalizeClass({item__caret:r.isActive(h)}),width:"16",height:"16"},null,8,["class"])):a.createCommentVNode("",!0)],10,fG)):(a.openBlock(),a.createBlock(c,{key:1,to:r.routerPushTo(h),class:a.normalizeClass(["side-bar__item",r.isActive(h)?"side-bar__item--active":"side-bar__item--inactive"]),onClick:m=>r.handleClick(m,h)},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(o,{name:h.icon,width:"20",height:"20"},null,8,["name"]),a.createElementVNode("span",null,a.toDisplayString(h.label),1)]),!!h.items&&h.items.length>0?(a.openBlock(),a.createBlock(o,{key:0,name:"caret-down-outline",class:a.normalizeClass({item__caret:r.isActive(h)}),width:"16",height:"16"},null,8,["class"])):a.createCommentVNode("",!0)]),_:2},1032,["to","class","onClick"]))],2),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[!!h.items&&h.items.length>0&&r.isActive(h)?(a.openBlock(),a.createElementBlock("div",pG,[a.createElementVNode("div",mG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.items,(m,g)=>(a.openBlock(),a.createElementBlock("div",{key:`${g}-${m.name}-item`,class:a.normalizeClass(["side-bar__subitem",r.isActive(m)&&(m==null?void 0:m.type)!=="external"?"side-bar__subitem--active":"side-bar__subitem--inactive"]),onClick:v=>r.handleClick(v,m)},[!!m.type&&m.type==="external"?(a.openBlock(),a.createElementBlock("a",{key:0,class:"side-bar__subitem-link",target:"_blank",rel:"noopener noreferrer",href:m.route.path},[a.createTextVNode(a.toDisplayString(m.label)+" ",1),a.createVNode(o,{height:"16",width:"16",name:"open-in-new-tab-outline"})],8,_G)):(a.openBlock(),a.createBlock(c,{key:1,class:"side-bar__subitem-link",to:r.routerPushTo(m)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(m.label),1)]),_:2},1032,["to"]))],10,gG))),128))])])):a.createCommentVNode("",!0)]),_:2},1024)]))),128))],2)]),a.createElementVNode("div",vG,[a.createElementVNode("div",yG,[a.createVNode(d,{src:n.userPicture,name:n.userName,variant:"white",size:"lg"},null,8,["src","name"]),a.createElementVNode("div",null,[a.createElementVNode("p",null,a.toDisplayString(n.userName),1),a.createElementVNode("p",null,a.toDisplayString(n.userRole),1)])]),a.createElementVNode("ul",null,[n.showLogout?(a.openBlock(),a.createElementBlock("li",{key:0,class:"side-bar__logout-button",onClick:e[0]||(e[0]=h=>t.$emit("logout",!0))},[a.createVNode(o,{name:"logout-outline",width:"20",height:"20"}),bG])):a.createCommentVNode("",!0)])])])}const kG=oe(dG,[["render",wG]]),Xce="",qh={components:{CdsIcon:$t,CdsBox:bl,CdsClickable:Ls},props:{title:{type:String,default:null},modelValue:{type:Boolean,default:!1,required:!0},withOverlay:{type:Boolean,default:!1},size:{type:String,default:"md"},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1}},data(){return{sassColorVariables:Gs}},computed:{overlayColor(){const t=this.withOverlay?this.sassColorVariables.n900:"transparent";return`rgba(${this.hexToRgb(t)}, 0.4)`},sideSheetWidth(){let t="328px";switch(this.size){case"xl":t="840px";break;case"lg":t="700px";break;case"md":t="500px";break;default:t="340px";break}return t}},watch:{modelValue(t){if(!t){this.dettachKeyupEvent();return}this.attachKeyupEvent()}},created(){this.attachKeyupEvent()},beforeUnmount(){this.dettachKeyupEvent()},methods:{hexToRgb:k0,shouldCloseOnBackdrop(){this.noCloseOnBackdrop||this.$emit("update:modelValue",!this.modelValue)},shouldCloseOnEsc(){this.noCloseOnEsc||this.$emit("update:modelValue",!this.modelValue)},keyupListener(t){t.keyCode===e8.ESC&&this.shouldCloseOnEsc()},attachKeyupEvent(){window.addEventListener("keyup",this.keyupListener)},dettachKeyupEvent(){window.removeEventListener("keyup",this.keyupListener)}}},Sv=()=>{a.useCssVars(t=>({11828368:t.overlayColor,"9d05acda":t.sideSheetWidth}))},Mv=qh.setup;qh.setup=Mv?(t,e)=>(Sv(),Mv(t,e)):Sv;const xG=qh,CG={class:"side-sheet__header"};function SG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveComponent("cds-clickable"),d=a.resolveComponent("cds-box");return n.modelValue?(a.openBlock(),a.createElementBlock("div",{key:0,class:"side-sheet__overlay",tabindex:"0",onClick:e[3]||(e[3]=(...h)=>r.shouldCloseOnBackdrop&&r.shouldCloseOnBackdrop(...h))},[a.createVNode(d,{padding:"5",class:"side-sheet__container",elevated:"",fluid:"",onClick:e[2]||(e[2]=a.withModifiers(()=>{},["stop"]))},{default:a.withCtx(()=>[a.createElementVNode("header",null,[a.renderSlot(t.$slots,"header",{},()=>[a.createElementVNode("div",CG,[a.createElementVNode("h3",null,a.toDisplayString(n.title),1),a.createElementVNode("div",{class:"side-sheet__close-icon",onClick:e[1]||(e[1]=(...h)=>t.closeHandle&&t.closeHandle(...h))},[a.createVNode(c,{clickable:""},{default:a.withCtx(()=>[a.createVNode(o,{height:"20",width:"20",name:"x-outline",onClick:e[0]||(e[0]=a.withModifiers(h=>t.$emit("update:modelValue",!n.modelValue),["stop"]))})]),_:1})])])],!0)]),a.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3})])):a.createCommentVNode("",!0)}const MG=oe(xG,[["render",SG],["__scopeId","data-v-54ccf7a0"]]),Jce="",Gh={props:{width:{type:String,default:"20"},height:{type:String,default:"16"},fluid:{type:Boolean,default:!1},shape:{type:String,default:"square",validate:t=>["circle","square"].includes(t)}},computed:{computedStyle(){return this.shape==="circle"?{"--width":`${this.width}px`,"--height":`${this.width}px`}:this.fluid?{"--width":"100%","--height":this.height!=="16"?`${this.height}px`:"100%"}:{"--width":`${this.width}px`,"--height":`${this.height}px`}},resolveShape(){return this.shape==="circle"?"50%":"6px"}}},Ov=()=>{a.useCssVars(t=>({"02fe74e9":t.resolveShape}))},Dv=Gh.setup;Gh.setup=Dv?(t,e)=>(Ov(),Dv(t,e)):Ov;const OG=Gh;function DG(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("div",{class:"skeleton__container",style:a.normalizeStyle(r.computedStyle)},null,4)}const EG=oe(OG,[["render",DG],["__scopeId","data-v-5298dc58"]]),Qce="",TG={props:{width:{type:String,required:!1},height:{type:String,required:!1,default:"16"}},computed:{computedStyle(){return{"--width":`${this.width}px`,"--height":`${this.height}px`}}}};function IG(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("div",{class:"skeleton__container",style:a.normalizeStyle(r.computedStyle)},null,4)}const BG=oe(TG,[["render",IG],["__scopeId","data-v-d39e7029"]]),ede="",AG={components:{CdsIcon:$t},props:{steps:{type:Array,default:()=>[],required:!0,description:`Um array com objetos com as propriedades 'label', 'inProcessing',
43
43
  'error' e 'completed'. A 'label' \xE9 o texto que descreve o passo,
44
44
  e as demais props s\xE3o booleanas e representam o status do passo.`},vertical:{type:Boolean,default:!1,required:!1},value:{type:Number,default:1,required:!0},disableOnClick:{type:Boolean,default:!1}},data(){return{internalValue:this.value-1}},watch:{internalValue(t){this.$emit("input",t+1)},value:{handler(t){this.internalValue=t-1},immediate:!0}},methods:{circleStyle(t,e){const n=this.disableOnClick?"":"stepper__step--clickable";return t.inProcessing?`stepper__step--in-processing ${n}`:t.error?`stepper__step--error ${n}`:t.completed?`stepper__step--completed ${n}`:e===this.internalValue?`stepper__step--active ${n}`:` stepper__step--muted ${n}`},changeStep(t){this.disableOnClick||(this.internalValue=t)},dividerStyle(t){const e=this.vertical?"vertical-":"";if(t<0)return`stepper__${e}divider--default`;const n=t===this.steps.length-1,i=t===0,s=t-1,r=t+1;return!n&&this.steps[t].completed&&this.steps[r].completed?`stepper__${e}divider--completed`:!n&&t>0&&this.steps[t].completed&&this.steps[s].completed||!n&&i&&this.steps[t].completed?`stepper__${e}divider--in-progress`:`stepper__${e}divider--default`},stepSectionStyle(t){let e="";return e+=t!==this.steps.length-1?"stepper__step-section ":"",e+=this.vertical?"stepper__step-section--vertical":"",e},labelStyle(t){let e="";return e+=t===this.internalValue?"stepper__step-label--active":"stepper__step-label--muted",e+=this.vertical?"":" stepper__step-label--horizontal",e+=this.disableOnClick?"":" stepper__step--clickable",e}}},VG=t=>(a.pushScopeId("data-v-6046312d"),t=t(),a.popScopeId(),t),$G={class:"stepper__edge"},NG=["onClick"],zG=["id","onClick"],PG={key:2,class:"stepper__processing-icon"},LG=[VG(()=>a.createElementVNode("svg",{width:"19",height:"22",viewBox:"0 0 19 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18.78 16.6325C17.738 18.0472 16.3457 19.1664 14.7402 19.8799C13.1346 20.5935 11.3709 20.8769 9.62259 20.7023C7.87428 20.5276 6.20151 19.901 4.76877 18.884C3.33604 17.867 2.19266 16.4945 1.45107 14.9017C0.709475 13.3089 0.395207 11.5504 0.539162 9.79934C0.683116 8.04824 1.28034 6.36474 2.2721 4.9144C3.26387 3.46406 4.61603 2.2968 6.19562 1.52741C7.77522 0.758019 9.52787 0.412981 11.2812 0.526225L10.6287 10.6288L18.78 16.6325Z",fill:"#3A7EDF"})],-1))],FG={key:3,class:"stepper__icon-text"},RG={key:0,class:"stepper__edge-container"},HG={class:"stepper__edge"};function WG(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(n.vertical?"stepper--vertical":"stepper")},[a.createElementVNode("div",{class:a.normalizeClass(n.vertical?"stepper__edge-container--vertical":"stepper__edge-container")},[a.createElementVNode("div",$G,[a.createElementVNode("div",{class:a.normalizeClass(r.dividerStyle(-1))},null,2)])],2),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.steps,(c,d)=>(a.openBlock(),a.createElementBlock("div",{key:d,class:a.normalizeClass(r.stepSectionStyle(d))},[n.vertical?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["stepper__step-label--vertical",r.labelStyle(d)]),onClick:h=>r.changeStep(d)},[a.createElementVNode("small",null,a.toDisplayString(c.label),1)],10,NG)):a.createCommentVNode("",!0),a.createElementVNode("div",{id:`step-${d+1}`,class:a.normalizeClass(n.vertical?"stepper__icon-container--vertical":"stepper__icon-container"),onClick:h=>r.changeStep(d)},[a.createElementVNode("div",{class:a.normalizeClass(["stepper__icon-circle",r.circleStyle(c,d)])},[c.completed?(a.openBlock(),a.createBlock(o,{key:0,height:"32",width:"32",name:"check-outline"})):c.error?(a.openBlock(),a.createBlock(o,{key:1,height:"32",width:"32",name:"x-outline"})):c.inProcessing?(a.openBlock(),a.createElementBlock("div",PG,LG)):(a.openBlock(),a.createElementBlock("span",FG,a.toDisplayString(d+1),1))],2),a.createElementVNode("div",{class:a.normalizeClass(r.dividerStyle(d))},null,2)],10,zG),n.vertical?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["stepper__step-label",r.labelStyle(d)])},[a.createElementVNode("small",null,a.toDisplayString(c.label),1)],2))],2))),128)),n.vertical?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",RG,[a.createElementVNode("div",HG,[a.createElementVNode("div",{class:a.normalizeClass(r.dividerStyle(-1))},null,2)])]))],2)}const YG=oe(AG,[["render",WG],["__scopeId","data-v-6046312d"]]);var Ev={exports:{}};(function(t){t.exports=function(e){var n={};function i(s){if(n[s])return n[s].exports;var r=n[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=n,i.d=function(s,r,o){i.o(s,r)||Object.defineProperty(s,r,{enumerable:!0,get:o})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,r){if(r&1&&(s=i(s)),r&8||r&4&&typeof s=="object"&&s&&s.__esModule)return s;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:s}),r&2&&typeof s!="string")for(var c in s)i.d(o,c,function(d){return s[d]}.bind(null,c));return o},i.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(r,"a",r),r},i.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},i.p="",i(i.s="fae3")}({"01f9":function(e,n,i){var s=i("2d00"),r=i("5ca1"),o=i("2aba"),c=i("32e9"),d=i("84f2"),h=i("41a0"),f=i("7f20"),m=i("38fd"),g=i("2b4c")("iterator"),v=!([].keys&&"next"in[].keys()),b="@@iterator",x="keys",k="values",O=function(){return this};e.exports=function(T,N,C,B,$,L,F){h(C,N,B);var q=function(fe){if(!v&&fe in ie)return ie[fe];switch(fe){case x:return function(){return new C(this,fe)};case k:return function(){return new C(this,fe)}}return function(){return new C(this,fe)}},ee=N+" Iterator",ne=$==k,K=!1,ie=T.prototype,pe=ie[g]||ie[b]||$&&ie[$],J=pe||q($),ue=$?ne?q("entries"):J:void 0,he=N=="Array"&&ie.entries||pe,_e,be,R;if(he&&(R=m(he.call(new T)),R!==Object.prototype&&R.next&&(f(R,ee,!0),!s&&typeof R[g]!="function"&&c(R,g,O))),ne&&pe&&pe.name!==k&&(K=!0,J=function(){return pe.call(this)}),(!s||F)&&(v||K||!ie[g])&&c(ie,g,J),d[N]=J,d[ee]=O,$)if(_e={values:ne?J:q(k),keys:L?J:q(x),entries:ue},F)for(be in _e)be in ie||o(ie,be,_e[be]);else r(r.P+r.F*(v||K),N,_e);return _e}},"0d58":function(e,n,i){var s=i("ce10"),r=i("e11e");e.exports=Object.keys||function(c){return s(c,r)}},1495:function(e,n,i){var s=i("86cc"),r=i("cb7c"),o=i("0d58");e.exports=i("9e1e")?Object.defineProperties:function(d,h){r(d);for(var f=o(h),m=f.length,g=0,v;m>g;)s.f(d,v=f[g++],h[v]);return d}},"230e":function(e,n,i){var s=i("d3f4"),r=i("7726").document,o=s(r)&&s(r.createElement);e.exports=function(c){return o?r.createElement(c):{}}},"2aba":function(e,n,i){var s=i("7726"),r=i("32e9"),o=i("69a8"),c=i("ca5a")("src"),d=i("fa5b"),h="toString",f=(""+d).split(h);i("8378").inspectSource=function(m){return d.call(m)},(e.exports=function(m,g,v,b){var x=typeof v=="function";x&&(o(v,"name")||r(v,"name",g)),m[g]!==v&&(x&&(o(v,c)||r(v,c,m[g]?""+m[g]:f.join(String(g)))),m===s?m[g]=v:b?m[g]?m[g]=v:r(m,g,v):(delete m[g],r(m,g,v)))})(Function.prototype,h,function(){return typeof this=="function"&&this[c]||d.call(this)})},"2aeb":function(e,n,i){var s=i("cb7c"),r=i("1495"),o=i("e11e"),c=i("613b")("IE_PROTO"),d=function(){},h="prototype",f=function(){var m=i("230e")("iframe"),g=o.length,v="<",b=">",x;for(m.style.display="none",i("fab2").appendChild(m),m.src="javascript:",x=m.contentWindow.document,x.open(),x.write(v+"script"+b+"document.F=Object"+v+"/script"+b),x.close(),f=x.F;g--;)delete f[h][o[g]];return f()};e.exports=Object.create||function(g,v){var b;return g!==null?(d[h]=s(g),b=new d,d[h]=null,b[c]=g):b=f(),v===void 0?b:r(b,v)}},"2b4c":function(e,n,i){var s=i("5537")("wks"),r=i("ca5a"),o=i("7726").Symbol,c=typeof o=="function",d=e.exports=function(h){return s[h]||(s[h]=c&&o[h]||(c?o:r)("Symbol."+h))};d.store=s},"2d00":function(e,n){e.exports=!1},"2d95":function(e,n){var i={}.toString;e.exports=function(s){return i.call(s).slice(8,-1)}},"32e9":function(e,n,i){var s=i("86cc"),r=i("4630");e.exports=i("9e1e")?function(o,c,d){return s.f(o,c,r(1,d))}:function(o,c,d){return o[c]=d,o}},"38fd":function(e,n,i){var s=i("69a8"),r=i("4bf8"),o=i("613b")("IE_PROTO"),c=Object.prototype;e.exports=Object.getPrototypeOf||function(d){return d=r(d),s(d,o)?d[o]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?c:null}},"41a0":function(e,n,i){var s=i("2aeb"),r=i("4630"),o=i("7f20"),c={};i("32e9")(c,i("2b4c")("iterator"),function(){return this}),e.exports=function(d,h,f){d.prototype=s(c,{next:r(1,f)}),o(d,h+" Iterator")}},4588:function(e,n){var i=Math.ceil,s=Math.floor;e.exports=function(r){return isNaN(r=+r)?0:(r>0?s:i)(r)}},4630:function(e,n){e.exports=function(i,s){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:s}}},"4bf8":function(e,n,i){var s=i("be13");e.exports=function(r){return Object(s(r))}},5537:function(e,n,i){var s=i("8378"),r=i("7726"),o="__core-js_shared__",c=r[o]||(r[o]={});(e.exports=function(d,h){return c[d]||(c[d]=h!==void 0?h:{})})("versions",[]).push({version:s.version,mode:i("2d00")?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,n,i){var s=i("7726"),r=i("8378"),o=i("32e9"),c=i("2aba"),d=i("9b43"),h="prototype",f=function(m,g,v){var b=m&f.F,x=m&f.G,k=m&f.S,O=m&f.P,T=m&f.B,N=x?s:k?s[g]||(s[g]={}):(s[g]||{})[h],C=x?r:r[g]||(r[g]={}),B=C[h]||(C[h]={}),$,L,F,q;x&&(v=g);for($ in v)L=!b&&N&&N[$]!==void 0,F=(L?N:v)[$],q=T&&L?d(F,s):O&&typeof F=="function"?d(Function.call,F):F,N&&c(N,$,F,m&f.U),C[$]!=F&&o(C,$,q),O&&B[$]!=F&&(B[$]=F)};s.core=r,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,e.exports=f},"613b":function(e,n,i){var s=i("5537")("keys"),r=i("ca5a");e.exports=function(o){return s[o]||(s[o]=r(o))}},"626a":function(e,n,i){var s=i("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(r){return s(r)=="String"?r.split(""):Object(r)}},6821:function(e,n,i){var s=i("626a"),r=i("be13");e.exports=function(o){return s(r(o))}},"69a8":function(e,n){var i={}.hasOwnProperty;e.exports=function(s,r){return i.call(s,r)}},"6a99":function(e,n,i){var s=i("d3f4");e.exports=function(r,o){if(!s(r))return r;var c,d;if(o&&typeof(c=r.toString)=="function"&&!s(d=c.call(r))||typeof(c=r.valueOf)=="function"&&!s(d=c.call(r))||!o&&typeof(c=r.toString)=="function"&&!s(d=c.call(r)))return d;throw TypeError("Can't convert object to primitive value")}},7726:function(e,n){var i=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},"77f1":function(e,n,i){var s=i("4588"),r=Math.max,o=Math.min;e.exports=function(c,d){return c=s(c),c<0?r(c+d,0):o(c,d)}},"79e5":function(e,n){e.exports=function(i){try{return!!i()}catch{return!0}}},"7f20":function(e,n,i){var s=i("86cc").f,r=i("69a8"),o=i("2b4c")("toStringTag");e.exports=function(c,d,h){c&&!r(c=h?c:c.prototype,o)&&s(c,o,{configurable:!0,value:d})}},"7f7f":function(e,n,i){var s=i("86cc").f,r=Function.prototype,o=/^\s*function ([^ (]*)/,c="name";c in r||i("9e1e")&&s(r,c,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch{return""}}})},8378:function(e,n){var i=e.exports={version:"2.6.12"};typeof __e=="number"&&(__e=i)},"84f2":function(e,n){e.exports={}},"86cc":function(e,n,i){var s=i("cb7c"),r=i("c69a"),o=i("6a99"),c=Object.defineProperty;n.f=i("9e1e")?Object.defineProperty:function(h,f,m){if(s(h),f=o(f,!0),s(m),r)try{return c(h,f,m)}catch{}if("get"in m||"set"in m)throw TypeError("Accessors not supported!");return"value"in m&&(h[f]=m.value),h}},"9b43":function(e,n,i){var s=i("d8e8");e.exports=function(r,o,c){if(s(r),o===void 0)return r;switch(c){case 1:return function(d){return r.call(o,d)};case 2:return function(d,h){return r.call(o,d,h)};case 3:return function(d,h,f){return r.call(o,d,h,f)}}return function(){return r.apply(o,arguments)}}},"9c6c":function(e,n,i){var s=i("2b4c")("unscopables"),r=Array.prototype;r[s]==null&&i("32e9")(r,s,{}),e.exports=function(o){r[s][o]=!0}},"9def":function(e,n,i){var s=i("4588"),r=Math.min;e.exports=function(o){return o>0?r(s(o),9007199254740991):0}},"9e1e":function(e,n,i){e.exports=!i("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},ac6a:function(e,n,i){for(var s=i("cadf"),r=i("0d58"),o=i("2aba"),c=i("7726"),d=i("32e9"),h=i("84f2"),f=i("2b4c"),m=f("iterator"),g=f("toStringTag"),v=h.Array,b={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},x=r(b),k=0;k<x.length;k++){var O=x[k],T=b[O],N=c[O],C=N&&N.prototype,B;if(C&&(C[m]||d(C,m,v),C[g]||d(C,g,O),h[O]=v,T))for(B in s)C[B]||o(C,B,s[B],!0)}},be13:function(e,n){e.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},c366:function(e,n,i){var s=i("6821"),r=i("9def"),o=i("77f1");e.exports=function(c){return function(d,h,f){var m=s(d),g=r(m.length),v=o(f,g),b;if(c&&h!=h){for(;g>v;)if(b=m[v++],b!=b)return!0}else for(;g>v;v++)if((c||v in m)&&m[v]===h)return c||v||0;return!c&&-1}}},c69a:function(e,n,i){e.exports=!i("9e1e")&&!i("79e5")(function(){return Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a!=7})},ca5a:function(e,n){var i=0,s=Math.random();e.exports=function(r){return"Symbol(".concat(r===void 0?"":r,")_",(++i+s).toString(36))}},cadf:function(e,n,i){var s=i("9c6c"),r=i("d53b"),o=i("84f2"),c=i("6821");e.exports=i("01f9")(Array,"Array",function(d,h){this._t=c(d),this._i=0,this._k=h},function(){var d=this._t,h=this._k,f=this._i++;return!d||f>=d.length?(this._t=void 0,r(1)):h=="keys"?r(0,f):h=="values"?r(0,d[f]):r(0,[f,d[f]])},"values"),o.Arguments=o.Array,s("keys"),s("values"),s("entries")},cb7c:function(e,n,i){var s=i("d3f4");e.exports=function(r){if(!s(r))throw TypeError(r+" is not an object!");return r}},ce10:function(e,n,i){var s=i("69a8"),r=i("6821"),o=i("c366")(!1),c=i("613b")("IE_PROTO");e.exports=function(d,h){var f=r(d),m=0,g=[],v;for(v in f)v!=c&&s(f,v)&&g.push(v);for(;h.length>m;)s(f,v=h[m++])&&(~o(g,v)||g.push(v));return g}},d3f4:function(e,n){e.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},d53b:function(e,n){e.exports=function(i,s){return{value:s,done:!!i}}},d8e8:function(e,n){e.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},e11e:function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f6fd:function(e,n){(function(i){var s="currentScript",r=i.getElementsByTagName("script");s in i||Object.defineProperty(i,s,{get:function(){try{throw new Error}catch(d){var o,c=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(d.stack)||[!1])[1];for(o in r)if(r[o].src==c||r[o].readyState=="interactive")return r[o];return null}}})})(document)},fa5b:function(e,n,i){e.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(e,n,i){var s=i("7726").document;e.exports=s&&s.documentElement},fae3:function(e,n,i){if(i.r(n),i.d(n,"longClickDirective",function(){return o}),typeof window<"u"){i("f6fd");var s;(s=window.document.currentScript)&&(s=s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=s[1])}i("ac6a"),i("7f7f");var r=function(c){var d=c.delay,h=d===void 0?400:d,f=c.interval,m=f===void 0?50:f;return{beforeMount:function(v,b,x,k){if(typeof b.value!="function"){var O=x.context.name,T="[longclick:] provided expression '".concat(b.expression,"' is not a function, but has to be");O&&(T+="Found in component '".concat(O,"' ")),console.warn(T)}var N=null,C=null,B=function(q){b.value(q)},$=function(q){q.type==="click"&&q.button!==0||N===null&&(N=setTimeout(function(){m&&m>0&&(C=setInterval(function(){B(q)},m)),B(q)},h))},L=function(){N!==null&&(clearTimeout(N),N=null),C&&(clearInterval(C),C=null)};["mousedown","touchstart"].forEach(function(F){v.addEventListener(F,$,{passive:!0})}),["click","mouseout","touchend","touchcancel"].forEach(function(F){v.addEventListener(F,L,{passive:!0})})},created:function(){},mounted:function(){},beforeUpdate:function(){},updated:function(){},beforeUnmount:function(){},unmounted:function(){}}},o=r}})})(Ev);const nde="",jG=Ev.exports.longClickDirective({delay:400,interval:50}),UG={components:{CdsIcon:$t},directives:{longclick:jG},props:{modelValue:{type:[Number,String],default:0},max:{type:[Number,String],default:Number.MAX_SAFE_INTEGER},min:{type:[Number,String],default:Number.MIN_SAFE_INTEGER},label:{type:String,default:"Label"},required:{type:Boolean,default:!1},width:{type:String,default:"default",required:!1},disabled:{type:Boolean,default:!1},state:{type:String,default:"default"},errorMessage:{type:String,default:"Valor inv\xE1lido"}},data(){return{internalValue:this.modelValue,isBeingFocused:!1}},computed:{hasSlots(){return!!Object.keys(this.$slots).length},errorState(){return this.state==="invalid"},stepperInputDynamicClass(){let t="";return this.isBeingFocused?this.disabled||(this.state==="default"?t+=" stepper-input--focused":this.state==="valid"?t+=" stepper-input--focused-valid":this.state==="invalid"&&(t+=" stepper-input--focused-invalid")):(t="stepper-input",this.disabled?t+=" stepper-input--disabled":this.state==="valid"?t+=" stepper-input--valid":this.state==="invalid"&&(t+=" stepper-input--invalid")),t}},watch:{modelValue(t){this.internalValue=t},internalValue(t){t||(this.internalValue=0),typeof t=="string"&&(this.internalValue=+this.internalValue),t<this.min?(this.internalValue=this.min,this.$emit("invalid-number",`'O campo n\xE3o pode ser menor que ${parseInt(this.min,10)}.'`)):t>this.max?(this.internalValue=this.max,this.$emit("invalid-number",`'O campo n\xE3o pode ser maior que ${parseInt(this.max,10)}.'`)):this.$emit("update:modelValue",parseInt(t,10))}},methods:{changeValue(t){this.internalValue=parseInt(this.internalValue)+t}}},qG={key:0},GG={key:1,class:"stepper-input__label"},KG={class:"label__content",for:"stepper-input"},ZG={key:0,class:"label__required-indicator"},XG=["disabled"],JG={class:"stepper-input__icon-container"},QG=["disabled"],eK=["disabled"],tK={key:0,class:"stepper-input__error-message"};function nK(t,e,n,i,s,r){const o=a.resolveComponent("cds-icon"),c=a.resolveDirective("longclick");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("span",null,[r.hasSlots?(a.openBlock(),a.createElementBlock("span",qG,[a.renderSlot(t.$slots,"label",{},void 0,!0)])):(a.openBlock(),a.createElementBlock("label",GG,[a.createElementVNode("div",KG,[a.createElementVNode("span",null,a.toDisplayString(n.label),1),n.required?(a.openBlock(),a.createElementBlock("span",ZG," * ")):a.createCommentVNode("",!0)])]))]),a.createElementVNode("div",{class:a.normalizeClass(r.stepperInputDynamicClass)},[a.withDirectives(a.createElementVNode("input",{id:"stepper-input","onUpdate:modelValue":e[0]||(e[0]=d=>s.internalValue=d),disabled:n.disabled,class:a.normalizeClass(["stepper-input__field",{"stepper-input__field--thin":n.width==="thin","stepper-input__field--default":n.width==="default","stepper-input__field--wide":n.width=="wide"}]),type:"number",onFocus:e[1]||(e[1]=d=>s.isBeingFocused=!0),onBlur:e[2]||(e[2]=d=>s.isBeingFocused=!1)},null,42,XG),[[a.vModelText,s.internalValue]]),a.createElementVNode("div",JG,[a.withDirectives((a.openBlock(),a.createElementBlock("button",{disabled:n.disabled,class:"stepper-input__icon--plus",tabindex:"-1",onFocus:e[3]||(e[3]=d=>s.isBeingFocused=!0),onBlur:e[4]||(e[4]=d=>s.isBeingFocused=!1),onClick:e[5]||(e[5]=d=>r.changeValue(1))},[a.createVNode(o,{height:"16",width:"16",name:"plus-outline"})],40,QG)),[[c,()=>r.changeValue(1)]]),a.withDirectives((a.openBlock(),a.createElementBlock("button",{disabled:n.disabled,class:"stepper-input__icon--minus",tabindex:"-1",onFocus:e[6]||(e[6]=d=>s.isBeingFocused=!0),onBlur:e[7]||(e[7]=d=>s.isBeingFocused=!1),onClick:e[8]||(e[8]=d=>r.changeValue(-1))},[a.createVNode(o,{height:"16",width:"16",name:"minus-outline"})],40,eK)),[[c,()=>r.changeValue(-1)]])])],2),r.errorState&&!n.disabled?(a.openBlock(),a.createElementBlock("div",tK,a.toDisplayString(n.errorMessage),1)):a.createCommentVNode("",!0)])}const iK=oe(UG,[["render",nK],["__scopeId","data-v-f77e7bd8"]]),ide="",sK={props:{modelValue:{type:Boolean,default:!1,required:!0},small:{type:Boolean,default:!1},variant:{type:String,default:"green"},large:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1}},data(){return{isActive:this.modelValue,internalFocus:this.focused}},computed:{toggleSwitchSize(){return this.small===this.large?"switch--medium":this.small?"switch--small":"switch--large"}},watch:{modelValue(t,e){t!==e&&(this.isActive=t)}},methods:{handleClick(){this.$emit("update:modelValue",!this.isActive)}}},rK=["disabled"];function aK(t,e,n,i,s,r){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("label",{class:a.normalizeClass(["switch",r.toggleSwitchSize])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>s.isActive=o),type:"checkbox",disabled:n.disabled,onClick:e[1]||(e[1]=(...o)=>r.handleClick&&r.handleClick(...o))},null,8,rK),[[a.vModelCheckbox,s.isActive]]),a.createElementVNode("span",{tabindex:"0",class:a.normalizeClass(["switch__slider",[`switch__slider--${n.variant}`,{[`switch__slider--active-focused--${n.variant}`]:s.internalFocus&&s.isActive&&!n.disabled,"switch__slider--inactive-focused":s.internalFocus&&!s.isActive&&!n.disabled,"switch__slider--small":n.small&&n.small!==n.large,"switch__slider--large":n.large&&n.small!==n.large,"switch__slider--medium":n.small===n.large}]]),onFocusout:e[2]||(e[2]=o=>s.internalFocus=!1),onFocusin:e[3]||(e[3]=o=>s.internalFocus=!0)},null,34)],2)])}const oK=oe(sK,[["render",aK],["__scopeId","data-v-4ec199d7"]]);var Gr={exports:{}};/**
45
45
  * @license