2024-10-27 07:35:17 +01:00
|
|
|
import{_ as Ne,r as d,e as h,f as a,g as u,h as s,i as e,n as E,W as R,k as b,p as y,C as O,m as r,U as G,l as c,F as ce,R as qe,u as De,$ as Pe,a as He,c as Ke,b as Qe,d as se,x as Ve,o as Re,J as T,P as ne,s as Q,D as ae,E as $e,V as Ge,H as M,t as k,j as Ee,w as Fe}from"./app-ClFPZZ4l.js";import{F as re}from"./Form-BU_UekyP.js";import{_ as ie}from"./OtpDisplay-BCFmhPMf.js";import{_ as je}from"./QrContentDisplay-ByKmcBd8.js";import{u as ze}from"./bus-D9XHlzlA.js";import"./Spinner-DbluacL6.js";/*! 2FAuth version 5.3.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const We=["for","innerHTML"],Je=["disabled","id","type","value","placeholder","maxlength"],Xe={key:0,class:"control"},Ye=["title"],Ze={class:"icon"},eo={key:1,class:"control"},oo=["title"],to={class:"icon has-text-danger"},lo=["innerHTML"],Ie=Object.assign({inheritAttrs:!1},{__name:"FormLockField",props:{modelValue:String,modelModifiers:{default:()=>({})},isEditMode:{type:Boolean,default:!1},label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],inputType:{type:String,default:"text"},placeholder:{type:String,default:""},help:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!0},maxLength:{type:Number,default:null}},emits:["input:modelValue"],setup(p,{emit:j}){const g=p,{inputId:q}=Ne(g.inputType,g.fieldName),m=d(g.isDisabled||g.isEditMode),F=d(!1),x=d(0),w=j;function o(f){let v=f.target.value;g.modelModifiers.trimAll&&(v=v.replace(/\s+/g,"")),w("update:modelValue",v)}function S(f){let v=f.target.value;F.value=v.includes(" "),w("update:modelValue",v)}function $(f){F.value=f.target.value.includes(" "),x.value+=1}return(f,v)=>{const D=h("FontAwesomeIcon"),P=h("FieldError");return a(),u(ce,null,[s("label",{for:e(q),class:"label",innerHTML:f.$t(p.label)},null,8,We),s("div",{class:E(["field has-addons mb-0",{"pt-3":p.hasOffset}])},[s("div",{class:E(["control",{"is-expanded":p.isExpanded}])},[(a(),u("input",R({key:e(x),disabled:e(m),id:e(q),type:p.inputType,class:"input",value:p.modelValue,placeholder:p.placeholder},f.$attrs,{onInput:S,onChange:o,onBlur:$,maxlength:p.maxLength}),null,16,Je))],2),p.isEditMode?(a(),b(e(G),{key:0},{default:y(({mode:V})=>[e(m)?(a(),u("div",Xe,[s("button",{type:"button",class:E(["button field-lock",{"is-dark":V=="dark"}]),onClick:v[0]||(v[0]=O(i=>m.value=!1,["stop"])),title:f.$t("twofaccounts.forms.unlock.title")},[s("span",Ze,[r(D,{icon:["fas","lock"]})])],10,Ye)])):(a(),u("div",eo,[s("button",{type:"button",class:E(["button field-unlock",{"is-dark":V=="dark"}]),onClick:v[1]||(v[1]=O(i=>m.value=!0,["stop"])),title:f.$t("twofaccounts.forms.lock.title")},[s("span",to,[r(D,{icon:["fas","lock-open"]})])],10,oo)]))]),_:1})):c("",!0)],2),e(F)?(a(),b(P,{key:0,error:f.$t("twofaccounts.forms.spaces_are_ignored"),field:"spaces",alertType:"is-warning"},null,8,["error"])):c("",!0),p.fieldError!=null?(a(),b(P,{key:1,error:p.fieldError,field:p.fieldName},null,8,["error","field"])):c("",!0),p.help?(a(),u("p",{key:2,class:"help",innerHTML:f.$t(p.help)},null,8,lo)):c("",!0)],64)}}}),so={class:"container preview has-text-centered"},no={class:"columns is-mobile"},ao={class:"column"},ro={key:1,class:"add-icon-button"},io={class:"columns is-mobile",role:"alert"},co={key:0,class:"column"},uo={class:"columns is-mobile"},fo={class:"column quickform-footer"},po={class:"field is-grouped is-grouped-centered"},mo={class:"control"},vo={key:0,class:"field is-grouped"},ho={class:"control"},go=["title"],_o={class:"file-cta"},yo={class:"file-icon"},wo={class:"file-label"},bo={class:"label"},ko={class:"field is-grouped"},Vo={key:0,class:"control"},$o={class:"icon is-small"},Eo={class:"control is-flex"},Fo={class:"file-cta"},Io={class:"file-icon"},Co={class:"file-label"},To=["src","alt"],Mo=["aria-label"],xo={class:"field"},So=["innerHTML"],Ao={key:3},Lo={key:0},Oo={class:"title is-4 mt-5 mb-2"},Uo={class:"help mb-4"},Bo={class:"control"},No={key:0,class:"control"},Ro={__name:"CreateUpdate",props:{twofaccountId:[Number,String]},setup
|