mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-12 10:10:59 +01:00
7 lines
55 KiB
JavaScript
Vendored
7 lines
55 KiB
JavaScript
Vendored
import{u as Ft,m as y,d as C,e as g,F as Qe,E as ct,j as k,k as P,n as W,t as I,f as p,U as De,g as Re,I as gn,l as ie,r as te,J as it,K as vn,y as bn,p as Rt,h as ye,i as z,L as Jt,M as _n,N as wn,D as Ye,O as Yt,P as rt,Q as yn,a as En,R as Sn,S as Dn,b as kn,T as Cn,s as _t,x as $n,o as Tn,H as wt,C as Te,V as On,z as yt,W as In,w as Et,X as Xe,A as zt,Y as An}from"./app-D4Udf6Mm.js";import{_ as Mn,a as xn,b as Pn}from"./OtpDisplay-D2QMFFL_.js";import{_ as Nn}from"./SearchBox-B-38rGG5.js";import{u as Fn}from"./bus-RVphoWuw.js";import"./Spinner-DHClvaFf.js";/*! 2FAuth version 5.4.1 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Rn={id:"groupSwitch",class:"container groups"},Bn={class:"columns is-centered"},Gn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Ln={class:"columns is-multiline"},Xn=["onClick"],Yn={class:"columns is-centered"},zn={class:"column has-text-centered"},Un={__name:"GroupSwitch",props:{showGroupSwitch:Boolean,groups:Array},emits:["update:showGroupSwitch"],setup(o,{emit:e}){const n=Ft(),t=e;function i(r){n.preferences.activeGroup=r,n.preferences.rememberActiveGroup&&gn.updatePreference("activeGroup",r),t("update:showGroupSwitch",!1)}return(r,s)=>{const l=ie("RouterLink"),u=ie("ButtonBackCloseCancel"),a=ie("VueFooter");return y(),C("div",Rn,[g("div",Bn,[g("div",Gn,[g("div",Ln,[(y(!0),C(Qe,null,ct(o.groups,f=>(y(),C("div",{class:"column is-full",key:f.id},[k(p(De),null,{default:P(({mode:c})=>[g("button",{class:W(["button is-fullwidth",{"is-dark has-text-light is-outlined":c=="dark"}]),onClick:E=>i(f.id)},I(f.name),11,Xn)]),_:2},1024)]))),128))]),g("div",Yn,[g("div",zn,[k(l,{to:{name:"groups"}},{default:P(()=>[Re(I(r.$t("groups.manage_groups")),1)]),_:1})])])])]),k(a,{showButtons:!0},{default:P(()=>[k(u,{action:"close",useLinkTag:!1,onClosed:s[0]||(s[0]=f=>r.$emit("update:showGroupSwitch",!1))})]),_:1})])}}},Hn={class:"container group-selector"},qn={class:"columns is-centered is-multiline"},Wn={class:"column is-full has-text-centered"},Vn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},jn={class:"columns is-multiline"},Kn=["onClick"],Qn={key:0,class:"is-italic"},Zn={key:1},Jn={class:"columns is-centered"},eo={class:"column has-text-centered"},to={class:"control"},no={__name:"DestinationGroupSelector",props:{showDestinationGroupSelector:Boolean,selectedAccountsIds:Array,groups:Array},emits:["update:showDestinationGroupSelector","accounts-moved"],setup(o,{emit:e}){const n=o,t=te(null),i=e;async function r(){t.value===0?await it.withdraw(n.selectedAccountsIds):await vn.assign(n.selectedAccountsIds,t.value),i("accounts-moved")}return(s,l)=>{const u=ie("RouterLink"),a=ie("ButtonBackCloseCancel"),f=ie("VueFooter");return y(),C("div",Hn,[g("div",qn,[g("div",Wn,I(s.$t("groups.move_selected_to")),1),g("div",Vn,[g("div",jn,[(y(!0),C(Qe,null,ct(o.groups,c=>(y(),C("div",{class:"column is-full",key:c.id},[k(p(De),null,{default:P(({mode:E})=>[g("button",{class:W(["button is-fullwidth",{"is-link":p(t)===c.id,"is-dark has-text-light is-outlined":E=="dark"}]),onClick:D=>t.value=c.id},[c.id===0?(y(),C("span",Qn,I(s.$t("groups.no_group")),1)):(y(),C("span",Zn,I(c.name),1))],10,Kn)]),_:2},1024)]))),128))]),g("div",Jn,[g("div",eo,[k(u,{to:{name:"groups"}},{default:P(()=>[Re(I(s.$t("groups.manage_groups")),1)]),_:1})])])])]),k(f,{showButtons:!0},{default:P(()=>[g("p",to,[g("button",{class:"button is-link is-rounded",onClick:r},I(s.$t("commons.move")),1)]),k(a,{action:"cancel",useLinkTag:!1,onCanceled:l[0]||(l[0]=c=>s.$emit("update:showDestinationGroupSelector",!1))})]),_:1})])}}},oo={class:"toolbar has-text-centered"},io={class:"columns"},ro={class:"column has-nowrap px-0"},so={class:"has-text-grey mr-1"},ao=["title"],lo=["title"],uo=["title"],co=["title"],fo={__name:"Toolbar",props:{selectedCount:Number},setup(o){return(e,n)=>{const t=ie("FontAwesomeIcon");return y(),C("div",oo,[g("div",io,[g("div",ro,[g("span",so,I(e.$t("commons.x_selected",{count:o.selectedCount})),1),g("button",{id:"btnUnselectAll",onClick:n[0]||(n[0]=i=>e.$emit("clear-selected")),class:"clear-selection delete mr-4",style:bn({visibility:o.selectedCount>0?"visible":"hidden"}),title:e.$t("commons.clear_selection")},null,12,ao),g("button",{id:"btnSelectAll",onClick:n[1]||(n[1]=i=>e.$emit("select-all")),class:"button mr-5 has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.select_all")},[g("span",null,I(e.$t("commons.check_all")),1),k(t,{class:"ml-1",icon:["fas","check-square"]})],8,lo),g("button",{id:"btnSortAscending",onClick:n[2]||(n[2]=i=>e.$emit("sort-asc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_ascending")},[k(t,{icon:["fas","sort-alpha-down"]})],8,uo),g("button",{id:"btnSortDescending",onClick:n[3]||(n[3]=i=>e.$emit("sort-desc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_descending")},[k(t,{icon:["fas","sort-alpha-up"]})],8,co)])])])}}},po={key:0,class:"control"},ho={class:"icon is-small"},mo={key:1,class:"control"},go={key:2,class:"control"},vo=["disabled","title"],bo={key:3,class:"control"},_o=["disabled"],wo={key:4,class:"control"},yo=["disabled","title"],Eo={__name:"ActionButtons",props:{inManagementMode:Boolean,areDisabled:Boolean},emits:["update:inManagementMode","move-button-clicked","delete-button-clicked","export-button-clicked"],setup(o,{emit:e}){const n=Rt(),t=Ft();function i(){t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="advancedForm"?n.push({name:"createAccount"}):t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="livescan"?n.push({name:"capture"}):n.push({name:"start"})}return(r,s)=>{const l=ie("FontAwesomeIcon");return y(),ye(p(De),null,{default:P(({mode:u})=>[o.inManagementMode?z("",!0):(y(),C("p",po,[g("button",{class:"button is-link is-rounded is-focus",onClick:i},[g("span",null,I(r.$t("commons.new")),1),g("span",ho,[k(l,{icon:["fas","qrcode"]})])])])),o.inManagementMode?z("",!0):(y(),C("p",mo,[g("button",{id:"btnManage",class:W(["button is-rounded",{"is-dark":u=="dark"}]),onClick:s[0]||(s[0]=a=>r.$emit("update:inManagementMode",!0))},I(r.$t("commons.manage")),3)])),o.inManagementMode?(y(),C("p",go,[g("button",{id:"btnMove",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[1]||(s[1]=a=>r.$emit("move-button-clicked")),title:r.$t("groups.move_selected_to_group")},I(r.$t("commons.move")),11,vo)])):z("",!0),o.inManagementMode?(y(),C("p",bo,[g("button",{id:"btnDelete",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[2]||(s[2]=a=>r.$emit("delete-button-clicked"))},I(r.$t("commons.delete")),11,_o)])):z("",!0),o.inManagementMode?(y(),C("p",wo,[g("button",{id:"btnExport",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[3]||(s[3]=a=>r.$emit("export-button-clicked")),title:r.$t("twofaccounts.export_selected_accounts")},I(r.$t("commons.export")),11,yo)])):z("",!0)]),_:1})}}},So={class:"block"},Do={class:"has-text-weight-bold has-text-grey"},ko={class:"is-size-7-mobile"},Co=["href"],$o=["title"],To={class:"block"},Oo={class:"has-text-weight-bold has-text-grey"},Io={class:"is-size-7-mobile"},Ao=["title"],Mo={__name:"ExportButtons",emits:["export-twofauth-format","export-otpauth-format"],setup(o,{emit:e}){Rt();const n=Jt("2fauth");return(t,i)=>(y(),C(Qe,null,[g("div",So,[k(p(De),null,{default:P(({mode:r})=>[g("p",Do,I(t.$t("twofaccounts.twofauth_export_format_sub")),1)]),_:1}),g("p",ko,[Re(I(t.$t("twofaccounts.twofauth_export_format_desc"))+" "+I(t.$t("twofaccounts.twofauth_export_format_url"))+" ",1),g("a",{id:"lnkExportSchemaUrl",class:"is-link",tabindex:"0",href:p(n).urls.exportSchemaUrl,target:"_blank"},I(t.$t("twofaccounts.twofauth_export_schema")),9,Co)]),g("button",{id:"btnExport2FAuth",class:"button is-link is-rounded is-focus my-3",onClick:i[0]||(i[0]=r=>t.$emit("export-twofauth-format")),title:t.$t("twofaccounts.twofauth_export_format_sub")},I(t.$t("twofaccounts.twofauth_export_format")),9,$o)]),g("div",To,[g("p",Oo,I(t.$t("twofaccounts.otpauth_export_format_sub")),1),g("p",Io,I(t.$t("twofaccounts.otpauth_export_format_desc")),1),g("button",{id:"btnExportOtpauth",class:"button is-link is-rounded is-focus my-3",onClick:i[1]||(i[1]=r=>t.$emit("export-otpauth-format")),title:t.$t("twofaccounts.otpauth_export_format_sub")},I(t.$t("twofaccounts.otpauth_export_format")),9,Ao)])],64))}};/**!
|
||
* Sortable 1.15.2
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/function Ut(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),n.push.apply(n,t)}return n}function he(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ut(Object(n),!0).forEach(function(t){xo(o,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})}return o}function st(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?st=function(e){return typeof e}:st=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(o)}function xo(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function ve(){return ve=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}return o},ve.apply(this,arguments)}function Po(o,e){if(o==null)return{};var n={},t=Object.keys(o),i,r;for(r=0;r<t.length;r++)i=t[r],!(e.indexOf(i)>=0)&&(n[i]=o[i]);return n}function No(o,e){if(o==null)return{};var n=Po(o,e),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i<r.length;i++)t=r[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}var Fo="1.15.2";function ge(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var be=ge(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ze=ge(/Edge/i),Ht=ge(/firefox/i),qe=ge(/safari/i)&&!ge(/chrome/i)&&!ge(/android/i),en=ge(/iP(ad|od|hone)/i),tn=ge(/chrome/i)&&ge(/android/i),nn={capture:!1,passive:!1};function O(o,e,n){o.addEventListener(e,n,!be&&nn)}function T(o,e,n){o.removeEventListener(e,n,!be&&nn)}function ft(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ro(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function de(o,e,n,t){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&ft(o,e):ft(o,e))||t&&o===n)return o;if(o===n)break}while(o=Ro(o))}return null}var qt=/\s+/g;function ne(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var t=(" "+o.className+" ").replace(qt," ").replace(" "+e+" "," ");o.className=(t+(n?" "+e:"")).replace(qt," ")}}function b(o,e,n){var t=o&&o.style;if(t){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in t)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),t[e]=n+(typeof n=="string"?"":"px")}}function Be(o,e){var n="";if(typeof o=="string")n=o;else do{var t=b(o,"transform");t&&t!=="none"&&(n=t+" "+n)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function on(o,e,n){if(o){var t=o.getElementsByTagName(e),i=0,r=t.length;if(n)for(;i<r;i++)n(t[i],i);return t}return[]}function pe(){var o=document.scrollingElement;return o||document.documentElement}function R(o,e,n,t,i){if(!(!o.getBoundingClientRect&&o!==window)){var r,s,l,u,a,f,c;if(o!==window&&o.parentNode&&o!==pe()?(r=o.getBoundingClientRect(),s=r.top,l=r.left,u=r.bottom,a=r.right,f=r.height,c=r.width):(s=0,l=0,u=window.innerHeight,a=window.innerWidth,f=window.innerHeight,c=window.innerWidth),(e||n)&&o!==window&&(i=i||o.parentNode,!be))do if(i&&i.getBoundingClientRect&&(b(i,"transform")!=="none"||n&&b(i,"position")!=="static")){var E=i.getBoundingClientRect();s-=E.top+parseInt(b(i,"border-top-width")),l-=E.left+parseInt(b(i,"border-left-width")),u=s+r.height,a=l+r.width;break}while(i=i.parentNode);if(t&&o!==window){var D=Be(i||o),S=D&&D.a,$=D&&D.d;D&&(s/=$,l/=S,c/=S,f/=$,u=s+f,a=l+c)}return{top:s,left:l,bottom:u,right:a,width:c,height:f}}}function Wt(o,e,n){for(var t=ke(o,!0),i=R(o)[e];t;){var r=R(t)[n],s=void 0;if(s=i>=r,!s)return t;if(t===pe())break;t=ke(t,!1)}return!1}function Ge(o,e,n,t){for(var i=0,r=0,s=o.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==_.ghost&&(t||s[r]!==_.dragged)&&de(s[r],n.draggable,o,!1)){if(i===e)return s[r];i++}r++}return null}function Bt(o,e){for(var n=o.lastElementChild;n&&(n===_.ghost||b(n,"display")==="none"||e&&!ft(n,e));)n=n.previousElementSibling;return n||null}function ae(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==_.clone&&(!e||ft(o,e))&&n++;return n}function Vt(o){var e=0,n=0,t=pe();if(o)do{var i=Be(o),r=i.a,s=i.d;e+=o.scrollLeft*r,n+=o.scrollTop*s}while(o!==t&&(o=o.parentNode));return[e,n]}function Bo(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var t in e)if(e.hasOwnProperty(t)&&e[t]===o[n][t])return Number(n)}return-1}function ke(o,e){if(!o||!o.getBoundingClientRect)return pe();var n=o,t=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=b(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return pe();if(t||e)return n;t=!0}}while(n=n.parentNode);return pe()}function Go(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function St(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var We;function rn(o,e){return function(){if(!We){var n=arguments,t=this;n.length===1?o.call(t,n[0]):o.apply(t,n),We=setTimeout(function(){We=void 0},e)}}}function Lo(){clearTimeout(We),We=void 0}function sn(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function an(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}function ln(o,e,n){var t={};return Array.from(o.children).forEach(function(i){var r,s,l,u;if(!(!de(i,e.draggable,o,!1)||i.animated||i===n)){var a=R(i);t.left=Math.min((r=t.left)!==null&&r!==void 0?r:1/0,a.left),t.top=Math.min((s=t.top)!==null&&s!==void 0?s:1/0,a.top),t.right=Math.max((l=t.right)!==null&&l!==void 0?l:-1/0,a.right),t.bottom=Math.max((u=t.bottom)!==null&&u!==void 0?u:-1/0,a.bottom)}}),t.width=t.right-t.left,t.height=t.bottom-t.top,t.x=t.left,t.y=t.top,t}var re="Sortable"+new Date().getTime();function Xo(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(i){if(!(b(i,"display")==="none"||i===_.ghost)){o.push({target:i,rect:R(i)});var r=he({},o[o.length-1].rect);if(i.thisAnimationDuration){var s=Be(i,!0);s&&(r.top-=s.f,r.left-=s.e)}i.fromRect=r}})}},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(Bo(o,{target:t}),1)},animateAll:function(t){var i=this;if(!this.options.animation){clearTimeout(e),typeof t=="function"&&t();return}var r=!1,s=0;o.forEach(function(l){var u=0,a=l.target,f=a.fromRect,c=R(a),E=a.prevFromRect,D=a.prevToRect,S=l.rect,$=Be(a,!0);$&&(c.top-=$.f,c.left-=$.e),a.toRect=c,a.thisAnimationDuration&&St(E,c)&&!St(f,c)&&(S.top-c.top)/(S.left-c.left)===(f.top-c.top)/(f.left-c.left)&&(u=zo(S,E,D,i.options)),St(c,f)||(a.prevFromRect=f,a.prevToRect=c,u||(u=i.options.animation),i.animate(a,S,c,u)),u&&(r=!0,s=Math.max(s,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof t=="function"&&t()},s):typeof t=="function"&&t(),o=[]},animate:function(t,i,r,s){if(s){b(t,"transition",""),b(t,"transform","");var l=Be(this.el),u=l&&l.a,a=l&&l.d,f=(i.left-r.left)/(u||1),c=(i.top-r.top)/(a||1);t.animatingX=!!f,t.animatingY=!!c,b(t,"transform","translate3d("+f+"px,"+c+"px,0)"),this.forRepaintDummy=Yo(t),b(t,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){b(t,"transition",""),b(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},s)}}}}function Yo(o){return o.offsetWidth}function zo(o,e,n,t){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*t.animation}var xe=[],Dt={initializeByDefault:!0},Je={mount:function(e){for(var n in Dt)Dt.hasOwnProperty(n)&&!(n in e)&&(e[n]=Dt[n]);xe.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),xe.push(e)},pluginEvent:function(e,n,t){var i=this;this.eventCanceled=!1,t.cancel=function(){i.eventCanceled=!0};var r=e+"Global";xe.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](he({sortable:n},t)),n.options[s.pluginName]&&n[s.pluginName][e]&&n[s.pluginName][e](he({sortable:n},t)))})},initializePlugins:function(e,n,t,i){xe.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var a=new l(e,n,e.options);a.sortable=e,a.options=e.options,e[u]=a,ve(t,a.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var s=this.modifyOption(e,r,e.options[r]);typeof s<"u"&&(e.options[r]=s)}},getEventProperties:function(e,n){var t={};return xe.forEach(function(i){typeof i.eventProperties=="function"&&ve(t,i.eventProperties.call(n[i.pluginName],e))}),t},modifyOption:function(e,n,t){var i;return xe.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(e[r.pluginName],t))}),i}};function Uo(o){var e=o.sortable,n=o.rootEl,t=o.name,i=o.targetEl,r=o.cloneEl,s=o.toEl,l=o.fromEl,u=o.oldIndex,a=o.newIndex,f=o.oldDraggableIndex,c=o.newDraggableIndex,E=o.originalEvent,D=o.putSortable,S=o.extraEventProperties;if(e=e||n&&n[re],!!e){var $,L=e.options,K="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!be&&!Ze?$=new CustomEvent(t,{bubbles:!0,cancelable:!0}):($=document.createEvent("Event"),$.initEvent(t,!0,!0)),$.to=s||n,$.from=l||n,$.item=i||n,$.clone=r,$.oldIndex=u,$.newIndex=a,$.oldDraggableIndex=f,$.newDraggableIndex=c,$.originalEvent=E,$.pullMode=D?D.lastPutMode:void 0;var B=he(he({},S),Je.getEventProperties(t,e));for(var X in B)$[X]=B[X];n&&n.dispatchEvent($),L[K]&&L[K].call(e,$)}}var Ho=["evt"],Q=function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=No(t,Ho);Je.pluginEvent.bind(_)(e,n,he({dragEl:d,parentEl:x,ghostEl:w,rootEl:A,nextEl:Ae,lastDownEl:at,cloneEl:M,cloneHidden:Se,dragStarted:ze,putSortable:Y,activeSortable:_.active,originalEvent:i,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:oe,newDraggableIndex:Ee,hideGhostForTarget:fn,unhideGhostForTarget:pn,cloneNowHidden:function(){Se=!0},cloneNowShown:function(){Se=!1},dispatchSortableEvent:function(l){j({sortable:n,name:l,originalEvent:i})}},r))};function j(o){Uo(he({putSortable:Y,cloneEl:M,targetEl:d,rootEl:A,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:oe,newDraggableIndex:Ee},o))}var d,x,w,A,Ae,at,M,Se,Fe,oe,Ve,Ee,et,Y,Ne=!1,pt=!1,ht=[],Oe,ue,kt,Ct,jt,Kt,ze,Pe,je,Ke=!1,tt=!1,lt,q,$t=[],Mt=!1,mt=[],vt=typeof document<"u",nt=en,Qt=Ze||be?"cssFloat":"float",qo=vt&&!tn&&!en&&"draggable"in document.createElement("div"),un=function(){if(vt){if(be)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),dn=function(e,n){var t=b(e),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Ge(e,0,n),s=Ge(e,1,n),l=r&&b(r),u=s&&b(s),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+R(r).width,f=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+R(s).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||a>=i&&t[Qt]==="none"||s&&t[Qt]==="none"&&a+f>i)?"vertical":"horizontal"},Wo=function(e,n,t){var i=t?e.left:e.top,r=t?e.right:e.bottom,s=t?e.width:e.height,l=t?n.left:n.top,u=t?n.right:n.bottom,a=t?n.width:n.height;return i===l||r===u||i+s/2===l+a/2},Vo=function(e,n){var t;return ht.some(function(i){var r=i[re].options.emptyInsertThreshold;if(!(!r||Bt(i))){var s=R(i),l=e>=s.left-r&&e<=s.right+r,u=n>=s.top-r&&n<=s.bottom+r;if(l&&u)return t=i}}),t},cn=function(e){function n(r,s){return function(l,u,a,f){var c=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,u,a,f),s)(l,u,a,f);var E=(s?l:u).options.group.name;return r===!0||typeof r=="string"&&r===E||r.join&&r.indexOf(E)>-1}}var t={},i=e.group;(!i||st(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=n(i.pull,!0),t.checkPut=n(i.put),t.revertClone=i.revertClone,e.group=t},fn=function(){!un&&w&&b(w,"display","none")},pn=function(){!un&&w&&b(w,"display","")};vt&&!tn&&document.addEventListener("click",function(o){if(pt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),pt=!1,!1},!0);var Ie=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Vo(e.clientX,e.clientY);if(n){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[re]._onDragOver(t)}}},jo=function(e){d&&d.parentNode[re]._isOutsideThisEl(e.target)};function _(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=ve({},e),o[re]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return dn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};Je.initializePlugins(this,o,n);for(var t in n)!(t in e)&&(e[t]=n[t]);cn(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:qo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(o,"pointerdown",this._onTapStart):(O(o,"mousedown",this._onTapStart),O(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(o,"dragover",this),O(o,"dragenter",this)),ht.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ve(this,Xo())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,i=this.options,r=i.preventOnFilter,s=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=i.filter;if(oi(t),!d&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&qe&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=de(u,i.draggable,t,!1),!(u&&u.animated)&&at!==u)){if(Fe=ae(u),Ve=ae(u,i.draggable),typeof f=="function"){if(f.call(this,e,u,this)){j({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:t,fromEl:t}),Q("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(c){if(c=de(a,c.trim(),t,!1),c)return j({sortable:n,rootEl:c,name:"filter",targetEl:u,fromEl:t,toEl:t}),Q("filter",n,{evt:e}),!0}),f)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!de(a,i.handle,t,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,t){var i=this,r=i.el,s=i.options,l=r.ownerDocument,u;if(t&&!d&&t.parentNode===r){var a=R(t);if(A=r,d=t,x=d.parentNode,Ae=d.nextSibling,at=t,et=s.group,_.dragged=d,Oe={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},jt=Oe.clientX-a.left,Kt=Oe.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",u=function(){if(Q("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ht&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,n),j({sortable:i,name:"choose",originalEvent:e}),ne(d,s.chosenClass,!0)},s.ignore.split(",").forEach(function(f){on(d,f.trim(),Tt)}),O(l,"dragover",Ie),O(l,"mousemove",Ie),O(l,"touchmove",Ie),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),Ht&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),Q("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ze||be))){if(_.eventCanceled){this._onDrop();return}O(l,"mouseup",i._disableDelayedDrag),O(l,"touchend",i._disableDelayedDrag),O(l,"touchcancel",i._disableDelayedDrag),O(l,"mousemove",i._delayedDragTouchMoveHandler),O(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&O(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,s.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&Tt(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._disableDelayedDrag),T(e,"touchend",this._disableDelayedDrag),T(e,"touchcancel",this._disableDelayedDrag),T(e,"mousemove",this._delayedDragTouchMoveHandler),T(e,"touchmove",this._delayedDragTouchMoveHandler),T(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):n?O(document,"touchmove",this._onTouchMove):O(document,"mousemove",this._onTouchMove):(O(d,"dragend",this),O(A,"dragstart",this._onDragStart));try{document.selection?ut(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,A&&d){Q("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",jo);var t=this.options;!e&&ne(d,t.dragClass,!1),ne(d,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,fn();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY),e!==n);)n=e;if(d.parentNode[re]._isOutsideThisEl(e),n)do{if(n[re]){var t=void 0;if(t=n[re]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);pn()}},_onTouchMove:function(e){if(Oe){var n=this.options,t=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,s=w&&Be(w,!0),l=w&&s&&s.a,u=w&&s&&s.d,a=nt&&q&&Vt(q),f=(r.clientX-Oe.clientX+i.x)/(l||1)+(a?a[0]-$t[0]:0)/(l||1),c=(r.clientY-Oe.clientY+i.y)/(u||1)+(a?a[1]-$t[1]:0)/(u||1);if(!_.active&&!Ne){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(w){s?(s.e+=f-(kt||0),s.f+=c-(Ct||0)):s={a:1,b:0,c:0,d:1,e:f,f:c};var E="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(w,"webkitTransform",E),b(w,"mozTransform",E),b(w,"msTransform",E),b(w,"transform",E),kt=f,Ct=c,ue=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!w){var e=this.options.fallbackOnBody?document.body:A,n=R(d,!0,nt,!0,e),t=this.options;if(nt){for(q=e;b(q,"position")==="static"&&b(q,"transform")==="none"&&q!==document;)q=q.parentNode;q!==document.body&&q!==document.documentElement?(q===document&&(q=pe()),n.top+=q.scrollTop,n.left+=q.scrollLeft):q=pe(),$t=Vt(q)}w=d.cloneNode(!0),ne(w,t.ghostClass,!1),ne(w,t.fallbackClass,!0),ne(w,t.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",n.top),b(w,"left",n.left),b(w,"width",n.width),b(w,"height",n.height),b(w,"opacity","0.8"),b(w,"position",nt?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),_.ghost=w,e.appendChild(w),b(w,"transform-origin",jt/parseInt(w.style.width)*100+"% "+Kt/parseInt(w.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,i=e.dataTransfer,r=t.options;if(Q("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}Q("setupClone",this),_.eventCanceled||(M=an(d),M.removeAttribute("id"),M.draggable=!1,M.style["will-change"]="",this._hideClone(),ne(M,this.options.chosenClass,!1),_.clone=M),t.cloneId=ut(function(){Q("clone",t),!_.eventCanceled&&(t.options.removeCloneOnHide||A.insertBefore(M,d),t._hideClone(),j({sortable:t,name:"clone"}))}),!n&&ne(d,r.dragClass,!0),n?(pt=!0,t._loopId=setInterval(t._emulateDragOver,50)):(T(document,"mouseup",t._onDrop),T(document,"touchend",t._onDrop),T(document,"touchcancel",t._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(t,i,d)),O(document,"drop",t),b(d,"transform","translateZ(0)")),Ne=!0,t._dragStartId=ut(t._dragStarted.bind(t,n,e)),O(document,"selectstart",t),ze=!0,qe&&b(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,t=e.target,i,r,s,l=this.options,u=l.group,a=_.active,f=et===u,c=l.sort,E=Y||a,D,S=this,$=!1;if(Mt)return;function L(v,m){Q(v,S,he({evt:e,isOwner:f,axis:D?"vertical":"horizontal",revert:s,dragRect:i,targetRect:r,canSort:c,fromSortable:E,target:t,completed:B,onMove:function(ee,V){return ot(A,n,d,i,ee,R(ee),e,V)},changed:X},m))}function K(){L("dragOverAnimationCapture"),S.captureAnimationState(),S!==E&&E.captureAnimationState()}function B(v){return L("dragOverCompleted",{insertion:v}),v&&(f?a._hideClone():a._showClone(S),S!==E&&(ne(d,Y?Y.options.ghostClass:a.options.ghostClass,!1),ne(d,l.ghostClass,!0)),Y!==S&&S!==_.active?Y=S:S===_.active&&Y&&(Y=null),E===S&&(S._ignoreWhileAnimating=t),S.animateAll(function(){L("dragOverAnimationComplete"),S._ignoreWhileAnimating=null}),S!==E&&(E.animateAll(),E._ignoreWhileAnimating=null)),(t===d&&!d.animated||t===n&&!t.animated)&&(Pe=null),!l.dragoverBubble&&!e.rootEl&&t!==document&&(d.parentNode[re]._isOutsideThisEl(e.target),!v&&Ie(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),$=!0}function X(){oe=ae(d),Ee=ae(d,l.draggable),j({sortable:S,name:"change",toEl:n,newIndex:oe,newDraggableIndex:Ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),t=de(t,l.draggable,n,!0),L("dragOver"),_.eventCanceled)return $;if(d.contains(e.target)||t.animated&&t.animatingX&&t.animatingY||S._ignoreWhileAnimating===t)return B(!1);if(pt=!1,a&&!l.disabled&&(f?c||(s=x!==A):Y===this||(this.lastPutMode=et.checkPull(this,a,d,e))&&u.checkPut(this,a,d,e))){if(D=this._getDirection(e,t)==="vertical",i=R(d),L("dragOverValid"),_.eventCanceled)return $;if(s)return x=A,K(),this._hideClone(),L("revert"),_.eventCanceled||(Ae?A.insertBefore(d,Ae):A.appendChild(d)),B(!0);var U=Bt(n,l.draggable);if(!U||Jo(e,D,this)&&!U.animated){if(U===d)return B(!1);if(U&&n===e.target&&(t=U),t&&(r=R(t)),ot(A,n,d,i,t,r,e,!!t)!==!1)return K(),U&&U.nextSibling?n.insertBefore(d,U.nextSibling):n.appendChild(d),x=n,X(),B(!0)}else if(U&&Zo(e,D,this)){var le=Ge(n,0,l,!0);if(le===d)return B(!1);if(t=le,r=R(t),ot(A,n,d,i,t,r,e,!1)!==!1)return K(),n.insertBefore(d,le),x=n,X(),B(!0)}else if(t.parentNode===n){r=R(t);var Z=0,ce,Ce=d.parentNode!==n,H=!Wo(d.animated&&d.toRect||i,t.animated&&t.toRect||r,D),_e=D?"top":"left",J=Wt(t,"top","top")||Wt(d,"top","top"),$e=J?J.scrollTop:void 0;Pe!==t&&(ce=r[_e],Ke=!1,tt=!H&&l.invertSwap||Ce),Z=ei(e,t,r,D,H?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,tt,Pe===t);var se;if(Z!==0){var me=ae(d);do me-=Z,se=x.children[me];while(se&&(b(se,"display")==="none"||se===w))}if(Z===0||se===t)return B(!1);Pe=t,je=Z;var we=t.nextElementSibling,fe=!1;fe=Z===1;var Me=ot(A,n,d,i,t,r,e,fe);if(Me!==!1)return(Me===1||Me===-1)&&(fe=Me===1),Mt=!0,setTimeout(Qo,30),K(),fe&&!we?n.appendChild(d):t.parentNode.insertBefore(d,fe?we:t),J&&sn(J,0,$e-J.scrollTop),x=d.parentNode,ce!==void 0&&!tt&&(lt=Math.abs(ce-R(t)[_e])),X(),B(!0)}if(n.contains(d))return B(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){T(document,"mousemove",this._onTouchMove),T(document,"touchmove",this._onTouchMove),T(document,"pointermove",this._onTouchMove),T(document,"dragover",Ie),T(document,"mousemove",Ie),T(document,"touchmove",Ie)},_offUpEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._onDrop),T(e,"touchend",this._onDrop),T(e,"pointerup",this._onDrop),T(e,"touchcancel",this._onDrop),T(document,"selectstart",this)},_onDrop:function(e){var n=this.el,t=this.options;if(oe=ae(d),Ee=ae(d,t.draggable),Q("drop",this,{evt:e}),x=d&&d.parentNode,oe=ae(d),Ee=ae(d,t.draggable),_.eventCanceled){this._nulling();return}Ne=!1,tt=!1,Ke=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),xt(this.cloneId),xt(this._dragStartId),this.nativeDraggable&&(T(document,"drop",this),T(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),qe&&b(document.body,"user-select",""),b(d,"transform",""),e&&(ze&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(A===x||Y&&Y.lastPutMode!=="clone")&&M&&M.parentNode&&M.parentNode.removeChild(M),d&&(this.nativeDraggable&&T(d,"dragend",this),Tt(d),d.style["will-change"]="",ze&&!Ne&&ne(d,Y?Y.options.ghostClass:this.options.ghostClass,!1),ne(d,this.options.chosenClass,!1),j({sortable:this,name:"unchoose",toEl:x,newIndex:null,newDraggableIndex:null,originalEvent:e}),A!==x?(oe>=0&&(j({rootEl:x,name:"add",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"remove",toEl:x,originalEvent:e}),j({rootEl:x,name:"sort",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),Y&&Y.save()):oe!==Fe&&oe>=0&&(j({sortable:this,name:"update",toEl:x,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),_.active&&((oe==null||oe===-1)&&(oe=Fe,Ee=Ve),j({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Q("nulling",this),A=d=x=w=Ae=M=at=Se=Oe=ue=ze=oe=Ee=Fe=Ve=Pe=je=Y=et=_.dragged=_.ghost=_.clone=_.active=null,mt.forEach(function(e){e.checked=!0}),mt.length=kt=Ct=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Ko(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,i=0,r=t.length,s=this.options;i<r;i++)n=t[i],de(n,s.draggable,this.el,!1)&&e.push(n.getAttribute(s.dataIdAttr)||ni(n));return e},sort:function(e,n){var t={},i=this.el;this.toArray().forEach(function(r,s){var l=i.children[s];de(l,this.options.draggable,i,!1)&&(t[r]=l)},this),n&&this.captureAnimationState(),e.forEach(function(r){t[r]&&(i.removeChild(t[r]),i.appendChild(t[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return de(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(n===void 0)return t[e];var i=Je.modifyOption(this,e,n);typeof i<"u"?t[e]=i:t[e]=n,e==="group"&&cn(t)},destroy:function(){Q("destroy",this);var e=this.el;e[re]=null,T(e,"mousedown",this._onTapStart),T(e,"touchstart",this._onTapStart),T(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(T(e,"dragover",this),T(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ht.splice(ht.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Se){if(Q("hideClone",this),_.eventCanceled)return;b(M,"display","none"),this.options.removeCloneOnHide&&M.parentNode&&M.parentNode.removeChild(M),Se=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Se){if(Q("showClone",this),_.eventCanceled)return;d.parentNode==A&&!this.options.group.revertClone?A.insertBefore(M,d):Ae?A.insertBefore(M,Ae):A.appendChild(M),this.options.group.revertClone&&this.animate(d,M),b(M,"display",""),Se=!1}}};function Ko(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function ot(o,e,n,t,i,r,s,l){var u,a=o[re],f=a.options.onMove,c;return window.CustomEvent&&!be&&!Ze?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=o,u.dragged=n,u.draggedRect=t,u.related=i||e,u.relatedRect=r||R(e),u.willInsertAfter=l,u.originalEvent=s,o.dispatchEvent(u),f&&(c=f.call(a,u,s)),c}function Tt(o){o.draggable=!1}function Qo(){Mt=!1}function Zo(o,e,n){var t=R(Ge(n.el,0,n.options,!0)),i=ln(n.el,n.options,w),r=10;return e?o.clientX<i.left-r||o.clientY<t.top&&o.clientX<t.right:o.clientY<i.top-r||o.clientY<t.bottom&&o.clientX<t.left}function Jo(o,e,n){var t=R(Bt(n.el,n.options.draggable)),i=ln(n.el,n.options,w),r=10;return e?o.clientX>i.right+r||o.clientY>t.bottom&&o.clientX>t.left:o.clientY>i.bottom+r||o.clientX>t.right&&o.clientY>t.top}function ei(o,e,n,t,i,r,s,l){var u=t?o.clientY:o.clientX,a=t?n.height:n.width,f=t?n.top:n.left,c=t?n.bottom:n.right,E=!1;if(!s){if(l&<<a*i){if(!Ke&&(je===1?u>f+a*r/2:u<c-a*r/2)&&(Ke=!0),Ke)E=!0;else if(je===1?u<f+lt:u>c-lt)return-je}else if(u>f+a*(1-i)/2&&u<c-a*(1-i)/2)return ti(e)}return E=E||s,E&&(u<f+a*r/2||u>c-a*r/2)?u>f+a/2?1:-1:0}function ti(o){return ae(d)<ae(o)?1:-1}function ni(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,t=0;n--;)t+=e.charCodeAt(n);return t.toString(36)}function oi(o){mt.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var t=e[n];t.checked&&mt.push(t)}}function ut(o){return setTimeout(o,0)}function xt(o){return clearTimeout(o)}vt&&O(document,"touchmove",function(o){(_.active||Ne)&&o.cancelable&&o.preventDefault()});_.utils={on:O,off:T,css:b,find:on,is:function(e,n){return!!de(e,n,e,!1)},extend:Go,throttle:rn,closest:de,toggleClass:ne,clone:an,index:ae,nextTick:ut,cancelNextTick:xt,detectDirection:dn,getChild:Ge};_.get=function(o){return o[re]};_.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(_.utils=he(he({},_.utils),t.utils)),Je.mount(t)})};_.create=function(o,e){return new _(o,e)};_.version=Fo;var F=[],Ue,Pt,Nt=!1,Ot,It,gt,He;function ii(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var t=n.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):t.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var t=n.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):(T(document,"pointermove",this._handleFallbackAutoScroll),T(document,"touchmove",this._handleFallbackAutoScroll),T(document,"mousemove",this._handleFallbackAutoScroll)),Zt(),dt(),Lo()},nulling:function(){gt=Pt=Ue=Nt=He=Ot=It=null,F.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,t){var i=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,s);if(gt=n,t||this.options.forceAutoScrollFallback||Ze||be||qe){At(n,this.options,l,t);var u=ke(l,!0);Nt&&(!He||r!==Ot||s!==It)&&(He&&Zt(),He=setInterval(function(){var a=ke(document.elementFromPoint(r,s),!0);a!==u&&(u=a,dt()),At(n,i.options,a,t)},10),Ot=r,It=s)}else{if(!this.options.bubbleScroll||ke(l,!0)===pe()){dt();return}At(n,this.options,ke(l,!1),!1)}}},ve(o,{pluginName:"scroll",initializeByDefault:!0})}function dt(){F.forEach(function(o){clearInterval(o.pid)}),F=[]}function Zt(){clearInterval(He)}var At=rn(function(o,e,n,t){if(e.scroll){var i=(o.touches?o.touches[0]:o).clientX,r=(o.touches?o.touches[0]:o).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=pe(),a=!1,f;Pt!==n&&(Pt=n,dt(),Ue=e.scroll,f=e.scrollFn,Ue===!0&&(Ue=ke(n,!0)));var c=0,E=Ue;do{var D=E,S=R(D),$=S.top,L=S.bottom,K=S.left,B=S.right,X=S.width,U=S.height,le=void 0,Z=void 0,ce=D.scrollWidth,Ce=D.scrollHeight,H=b(D),_e=D.scrollLeft,J=D.scrollTop;D===u?(le=X<ce&&(H.overflowX==="auto"||H.overflowX==="scroll"||H.overflowX==="visible"),Z=U<Ce&&(H.overflowY==="auto"||H.overflowY==="scroll"||H.overflowY==="visible")):(le=X<ce&&(H.overflowX==="auto"||H.overflowX==="scroll"),Z=U<Ce&&(H.overflowY==="auto"||H.overflowY==="scroll"));var $e=le&&(Math.abs(B-i)<=s&&_e+X<ce)-(Math.abs(K-i)<=s&&!!_e),se=Z&&(Math.abs(L-r)<=s&&J+U<Ce)-(Math.abs($-r)<=s&&!!J);if(!F[c])for(var me=0;me<=c;me++)F[me]||(F[me]={});(F[c].vx!=$e||F[c].vy!=se||F[c].el!==D)&&(F[c].el=D,F[c].vx=$e,F[c].vy=se,clearInterval(F[c].pid),($e!=0||se!=0)&&(a=!0,F[c].pid=setInterval((function(){t&&this.layer===0&&_.active._onTouchMove(gt);var we=F[this.layer].vy?F[this.layer].vy*l:0,fe=F[this.layer].vx?F[this.layer].vx*l:0;typeof f=="function"&&f.call(_.dragged.parentNode[re],fe,we,o,gt,F[this.layer].el)!=="continue"||sn(F[this.layer].el,fe,we)}).bind({layer:c}),24))),c++}while(e.bubbleScroll&&E!==u&&(E=ke(E,!1)));Nt=a}},30),hn=function(e){var n=e.originalEvent,t=e.putSortable,i=e.dragEl,r=e.activeSortable,s=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(n){var a=t||r;l();var f=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,c=document.elementFromPoint(f.clientX,f.clientY);u(),a&&!a.el.contains(c)&&(s("spill"),this.onSpill({dragEl:i,putSortable:t}))}};function Gt(){}Gt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var i=Ge(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:hn};ve(Gt,{pluginName:"revertOnSpill"});function Lt(){}Lt.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable,i=t||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:hn};ve(Lt,{pluginName:"removeOnSpill"});_.mount(new ii);_.mount(Lt,Gt);function ri(o,e,n={}){let t;const{document:i=yn,...r}=n,s={onUpdate:f=>{mn(e,f.oldIndex,f.newIndex)}},l=()=>{const f=i==null?void 0:i.querySelector(o);!f||t!==void 0||(t=new _(f,{...s,...r}))},u=()=>{t==null||t.destroy(),t=void 0},a=(f,c)=>{if(c!==void 0)t==null||t.option(f,c);else return t==null?void 0:t.option(f)};return _n(l),wn(u),{stop:u,start:l,option:a}}function mn(o,e,n){const t=Ye(o),i=t?[...Yt(o)]:Yt(o);if(n>=0&&n<i.length){const r=i.splice(e,1)[0];rt(()=>{i.splice(n,0,r),t&&(o.value=i)})}}const si={key:2,class:"header"},ai={class:"columns is-gapless is-mobile is-centered"},li={class:"column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},ui={key:1,class:"has-text-centered"},di={class:"columns"},ci={key:0,class:"column"},fi=["title"],pi={key:1,class:"column"},hi=["title"],mi={key:3},gi={class:"accounts"},vi={class:"tfa-container"},bi={key:0,class:"tfa-cell tfa-checkbox"},_i={class:"field"},wi=["id","value","name"],yi=["for","onKeypress"],Ei=["onClick","onKeyup"],Si={class:"tfa-text has-ellipsis"},Di=["src"],ki=["src"],Ci={class:"has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},$i={class:"has-text-right"},Ti={key:0},Oi={key:0,class:"has-nowrap has-text-grey has-text-centered is-size-5"},Ii=["onClick","onKeyup","title"],Ai={key:1},Mi=["onClick","title"],xi={class:"has-text-right"},Pi=["onClick"],Ni={key:0,class:"tfa-cell tfa-edit has-text-grey"},Fi={key:0,class:"drag-handle tfa-cell tfa-dots has-text-grey"},Yi={__name:"Accounts",setup(o){const e=Jt("2fauth"),n=Rt(),t=En(),i=Ft(),r=Fn(),s=Sn(),{copy:l,copied:u}=Dn({legacy:!0}),a=kn(),f=Cn(),c=te(!1),E=te(!1),D=te(!1),S=te(!1);te(!1);const $=te(!1),L=te(null),K=te(null),B=te(null),X=te({otp_type:"",account:"",service:"",icon:""}),U=te([]),le=te([]);_t(c,v=>{var m;v==!1&&((m=B.value)==null||m.clearOTP())}),_t(()=>a.items,v=>{r.inManagementMode&&ce()}),_t(()=>r.inManagementMode,v=>{v&&ce()});const Z=$n(()=>!a.isEmpty&&!D.value&&!S.value);Tn(async()=>{i.preferences.getOtpOnRequest?a.fetch().then(()=>{a.backendWasNewer&&t.info({text:wt("commons.data_refreshed_to_reflect_server_changes"),duration:1e4})}):we(),f.fetch()});function ce(){ri("#dv",a.filtered,{animation:200,handle:".drag-handle",onUpdate:v=>{const m=a.filtered[v.oldIndex].id,G=a.items.findIndex(ee=>ee.id==m);mn(a.items,G,v.newIndex),rt(()=>{a.saveOrder()})}})}function Ce(){a.fetch(),a.selectNone(),S.value=!1,t.success({text:wt("twofaccounts.accounts_moved")})}function H(v){X.value.otp_type=v.otp_type,X.value.service=v.service,X.value.account=v.account,X.value.icon=v.icon,rt().then(()=>{c.value=!0,B.value.show(v.id)})}function _e(v){r.inManagementMode?a.select(v.id):!i.preferences.getOtpOnRequest&&v.otp_type.includes("totp")?J(v.otp.password):H(v)}function J(v){l(v),u&&(i.preferences.kickUserAfter==-1&&i.logout({kicked:!0}),i.preferences.clearSearchOnCopy&&(a.filter=""),i.preferences.viewDefaultGroupOnCopy&&(i.preferences.activeGroup=i.preferences.defaultGroup==-1?i.preferences.activeGroup:i.preferences.defaultGroup),t.success({text:wt("commons.copied_to_clipboard")}))}async function $e(v){it.getOtpById(v.id).then(m=>{let G=m.data;if(J(G.password),G.otp_type=="hotp"){let ee=accounts.value.find(V=>V.id==v.id);ee!=null&&(ee.counter=G.counter)}})}function se(v,m){le.value.filter(G=>G.props.period==v||v==null).forEach(G=>{G.turnOn(m)})}function me(v){le.value.filter(m=>m.props.period==v||v==null).forEach(m=>{m.turnOff()})}async function we(v){$.value=!0,me(v);let m;v==null?(L.value=-1,m=it.getAll(!0)):(L.value=v,m=it.getByIds(a.accountIdsWithPeriod(v).join(","),!0)),m.then(G=>{let ee=0;G.data.forEach(V=>{if(V.otp_type==="totp"){const Le=a.items.findIndex(bt=>bt.id===V.id);a.items[Le]==null?a.items.push(V):a.items[Le].otp=V.otp,ee=V.otp.generated_at}}),U.value.forEach(V=>{(V.props.period==v||v==null)&&rt().then(()=>{V.startLoop(ee)})})}).finally(()=>{$.value=!1,L.value=null})}async function fe(){await a.deleteSelected(),a.isEmpty&&(r.inManagementMode=!1,n.push({name:"start"}))}function Me(){r.inManagementMode=!1,a.selectNone()}return(v,m)=>{const G=ie("FontAwesomeIcon"),ee=ie("Modal"),V=ie("font-awesome-icon"),Le=ie("RouterLink"),bt=ie("VueFooter");return y(),C("div",null,[p(D)?(y(),ye(Un,{key:0,showGroupSwitch:p(D),"onUpdate:showGroupSwitch":m[0]||(m[0]=h=>Ye(D)?D.value=h:null),groups:p(f).items,"onUpdate:groups":m[1]||(m[1]=h=>p(f).items=h)},null,8,["showGroupSwitch","groups"])):z("",!0),p(S)?(y(),ye(no,{key:1,showDestinationGroupSelector:p(S),"onUpdate:showDestinationGroupSelector":m[2]||(m[2]=h=>Ye(S)?S.value=h:null),selectedAccountsIds:p(a).selectedIds,"onUpdate:selectedAccountsIds":m[3]||(m[3]=h=>p(a).selectedIds=h),groups:p(f).items,onAccountsMoved:Ce},null,8,["showDestinationGroupSelector","selectedAccountsIds","groups"])):z("",!0),p(Z)||p(D)?(y(),C("div",si,[g("div",ai,[g("div",li,[k(Nn,{keyword:p(a).filter,"onUpdate:keyword":m[4]||(m[4]=h=>p(a).filter=h)},null,8,["keyword"]),p(r).inManagementMode?(y(),ye(fo,{key:0,selectedCount:p(a).selectedCount,onClearSelected:m[5]||(m[5]=h=>p(a).selectNone()),onSelectAll:m[6]||(m[6]=h=>p(a).selectAll()),onSortAsc:m[7]||(m[7]=h=>p(a).sortAsc()),onSortDesc:m[8]||(m[8]=h=>p(a).sortDesc())},null,8,["selectedCount"])):(y(),C("div",ui,[g("div",di,[k(p(De),null,{default:P(({mode:h})=>[p(D)?(y(),C("div",ci,[g("button",{id:"btnHideGroupSwitch",title:v.$t("groups.hide_group_selector"),tabindex:"1",class:W(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[9]||(m[9]=Te(N=>D.value=!p(D),["stop"]))},I(v.$t("groups.select_accounts_to_show")),11,fi)])):(y(),C("div",pi,[g("button",{id:"btnShowGroupSwitch",title:v.$t("groups.show_group_selector"),tabindex:"1",class:W(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[10]||(m[10]=Te(N=>D.value=!p(D),["stop"]))},[Re(I(p(f).current)+" ("+I(p(a).filteredCount)+") ",1),k(G,{icon:["fas","caret-down"]})],10,hi)]))]),_:1})])]))])])])):z("",!0),k(ee,{modelValue:p(E),"onUpdate:modelValue":m[13]||(m[13]=h=>Ye(E)?E.value=h:null),isFullHeight:!0},{default:P(()=>[k(Mo,{onExportTwofauthFormat:m[11]||(m[11]=h=>p(a).export()),onExportOtpauthFormat:m[12]||(m[12]=h=>p(a).export("otpauth"))})]),_:1},8,["modelValue"]),k(ee,{modelValue:p(c),"onUpdate:modelValue":m[16]||(m[16]=h=>Ye(c)?c.value=h:null)},{default:P(()=>[k(Mn,On({ref_key:"otpDisplay",ref:B},p(X),{onPleaseCloseMe:m[14]||(m[14]=h=>c.value=!1),onPleaseClearSearch:m[15]||(m[15]=h=>p(a).filter="")}),null,16)]),_:1},8,["modelValue"]),p(i).preferences.getOtpOnRequest?z("",!0):(y(),C("span",mi,[(y(!0),C(Qe,null,ct(p(a).periods,h=>(y(),ye(xn,{key:h.period,autostart:!1,period:h.period,generated_at:h.generated_at,onLoopEnded:N=>we(h.period),onLoopStarted:N=>se(h.period,N),onSteppedUp:N=>se(h.period,N),ref_for:!0,ref_key:"looperRefs",ref:U},null,8,["period","generated_at","onLoopEnded","onLoopStarted","onSteppedUp"]))),128))])),p(Z)?(y(),C("div",{key:4,class:W(["container",p(r).inManagementMode?"is-edit-mode":""])},[g("div",gi,[g("span",{id:"dv",class:W(["columns is-multiline",{"is-centered":p(i).preferences.displayMode==="grid"}])},[(y(!0),C(Qe,null,ct(p(a).filtered,h=>(y(),C("div",{class:W([[p(i).preferences.displayMode==="grid"?"tfa-grid":"tfa-list"],"column is-narrow"]),key:h.id},[g("div",vi,[k(Xe,{name:"slideCheckbox"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",bi,[g("div",_i,[k(p(De),null,{default:P(({mode:N})=>[yt(g("input",{class:W(["is-checkradio is-small",N=="dark"?"is-white":"is-info"]),id:"ckb_"+h.id,value:h.id,type:"checkbox",name:"ckb_"+h.id,"onUpdate:modelValue":m[17]||(m[17]=Xt=>p(a).selectedIds=Xt)},null,10,wi),[[In,p(a).selectedIds]])]),_:2},1024),g("label",{tabindex:"0",for:"ckb_"+h.id,onKeypress:Et(Te(N=>p(a).select(h.id),["prevent"]),["space"])},null,40,yi)])])):z("",!0)]),_:2},1024),g("div",{tabindex:"0",class:"tfa-cell tfa-content is-size-3 is-size-4-mobile",onClick:[Te(N=>_e(h),["exact"]),Te(N=>$e(h),["ctrl"])],onKeyup:Et(N=>_e(h),["enter"]),role:"button"},[g("div",Si,[h.icon&&p(i).preferences.showAccountsIcons?(y(),C("img",{key:0,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/icons/"+h.icon,alt:""},null,8,Di)):h.icon==null&&p(i).preferences.showAccountsIcons?(y(),C("img",{key:1,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/noicon.svg",alt:""},null,8,ki)):z("",!0),Re(" "+I(h.service?h.service:v.$t("twofaccounts.no_service")),1),p(s).useEncryption&&h.account===v.$t("errors.indecipherable")?(y(),ye(G,{key:2,class:"has-text-danger is-size-5 ml-2",icon:["fas","exclamation-circle"]})):z("",!0),g("span",Ci,I(h.account),1)])],40,Ei),k(Xe,{name:"popLater"},{default:P(()=>[yt(g("div",$i,[h.otp!=null?(y(),C("span",Ti,[p($)==!0&&(p(L)==-1||p(L)==h.period)?(y(),C("span",Oi,[k(G,{icon:["fas","circle-notch"],spin:""})])):(y(),C("span",{key:1,class:"always-on-otp is-clickable has-nowrap has-text-grey is-size-5 ml-4",onClick:N=>J(h.otp.password),onKeyup:Et(N=>J(h.otp.password),["enter"]),title:v.$t("commons.copy_to_clipboard")},I(p(An)(h.otp.password,p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP&&p(K)==h.id)),41,Ii)),h.otp_type.includes("totp")?(y(),ye(Pn,{key:2,class:W("condensed"),ref_for:!0,ref_key:"dotsRefs",ref:le,period:h.period},null,8,["period"])):z("",!0)])):(y(),C("span",Ai,[k(p(De),null,{default:P(({mode:N})=>[g("button",{class:W(["button tag",N=="dark"?"is-dark":"is-white"]),onClick:Xt=>H(h),title:v.$t("twofaccounts.import.import_this_account")},I(v.$t("commons.generate")),11,Mi)]),_:2},1024)]))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024),p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP?(y(),ye(Xe,{key:0,name:"popLater"},{default:P(()=>[yt(g("div",xi,[p(K)==h.id?(y(),C("button",{key:0,class:"pr-0 button is-ghost has-text-grey-dark",onClick:m[18]||(m[18]=Te(N=>K.value=null,["stop"]))},[k(V,{icon:["fas","eye"]})])):(y(),C("button",{key:1,class:"pr-0 button is-ghost has-text-grey-dark",onClick:Te(N=>K.value=h.id,["stop"])},[k(V,{icon:["fas","eye-slash"]})],8,Pi))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024)):z("",!0),k(Xe,{name:"fadeInOut"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",Ni,[k(p(De),null,{default:P(({mode:N})=>[k(Le,{to:{name:"editAccount",params:{twofaccountId:h.id}},class:W(["tag is-rounded mr-1",N=="dark"?"is-dark":"is-white"])},{default:P(()=>[Re(I(v.$t("commons.edit")),1)]),_:2},1032,["to","class"]),k(Le,{to:{name:"showQRcode",params:{twofaccountId:h.id}},class:W(["tag is-rounded",N=="dark"?"is-dark":"is-white"]),title:v.$t("twofaccounts.show_qrcode")},{default:P(()=>[k(G,{icon:["fas","qrcode"]})]),_:2},1032,["to","class","title"])]),_:2},1024)])):z("",!0)]),_:2},1024),k(Xe,{name:"fadeInOut"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",Fi,[k(G,{icon:["fas","bars"]})])):z("",!0)]),_:1})])],2))),128))],2)]),k(bt,{showButtons:!0,internalFooterType:p(r).inManagementMode&&!p(S)?"doneButton":"navLinks",onDoneButtonClicked:Me},{default:P(()=>[k(Eo,{inManagementMode:p(r).inManagementMode,"onUpdate:inManagementMode":m[19]||(m[19]=h=>p(r).inManagementMode=h),areDisabled:p(a).hasNoneSelected,onMoveButtonClicked:m[20]||(m[20]=h=>S.value=!0),onDeleteButtonClicked:fe,onExportButtonClicked:m[21]||(m[21]=h=>E.value=!0)},null,8,["inManagementMode","areDisabled"])]),_:1},8,["internalFooterType"])],2)):z("",!0)])}}};export{Yi as default};
|