1import{S as ke,B as we,a as Ze,I as ot,C as Re,N as il,b as rl,V as dl}from"./string_setting.QmUmmIFY.js";import{f as pe,L as bt,i as vt,_ as G,B as w,c as g,o as p,a as s,v as H,y as V,t as o,D as b,x as l,N as Be,e as ue,O as tt,J as Y,K as ee,Q as ul,R as cl,S as pl,U as ml,g as hl,V as fl,W as te,X as ae,Y as Pe,Z as Mo,w as h,E as $t,$ as gl,a0 as ts,a1 as bl,z as to,A as K,a2 as vl,a3 as $l,a4 as yl,a5 as kl,a6 as No,H as ss,a7 as wl,a8 as os,a9 as _e,P as yt,aa as Cl,b as ls,m as jo,ab as ht,F as Ge,l as ne,u as Q,G as Je,ac as Vl,h as Tl,ad as ns,ae as Ye,af as Sl,ag as qo,ah as Ll,ai as Pl,aj as zo,ak as _l,al as Il,am as Ho,an as El,ao as Wo,ap as Ko,aq as Go,ar as Ul,as as Jo,at as Al,au as Bl,av as Fl,aw as Ol,ax as Dl,ay as J,az as Qe,aA as Rl,aB as Ml,aC as Nl,aD as so,aE as jl,aF as Yo,aG as st,aH as kt,aI as ft,aJ as wt,aK as Qo,aL as dt,aM as ql,aN as xe,aO as as,aP as zl,aQ as Hl,aR as De,aS as oo,aT as Wl,aU as xt,p as Kl,aV as Gl,aW as Jl,aX as Yl,aY as Ql,aZ as Xl,a_ as Zl,a$ as $e,b0 as xl,b1 as ut,b2 as en,b3 as tn,b4 as sn,b5 as on,b6 as ln,b7 as nn,b8 as an,b9 as rn,ba as lo,bb as es,bc as dn,bd as Tt,be as de,bf as Oe,bg as un,bh as no,bi as ct,bj as cn,bk as pn,bl as mn,bm as hn,bn as fn,bo as gn,bp as bn,bq as vn,br as $n,bs as yn,bt as kn,bu as wn,bv as Cn,bw as Vn,bx as Tn,by as Sn,bz as Ln,bA as Pn,bB as _n,bC as In,bD as En,bE as Un,bF as An,bG as Bn,bH as Fn,bI as On,bJ as Dn,bK as Rn,bL as Mn,bM as Nn,bN as jn,bO as qn,bP as zn,bQ as Hn,bR as Wn,bS as Kn,bT as Gn,bU as Jn,bV as Yn,bW as Qn,bX as Xn,bY as Zn,bZ as xn,b_ as ea,b$ as ta,c0 as sa,c1 as oa,c2 as la}from"./main.qxCxIqDs.js";import{n as Ct,a as lt}from"./settings_modal.B74APXc5.js";pe.add(bt,vt);const na={props:{submitHandler:{type:Function,required:!0},submitButtonLabel:{type:String},successMessage:{type:String},errorMessage:{type:String}},data(){return{file:null,error:!1,success:!1,submitting:!1}},methods:{change(){this.file=this.$refs.input.files[0]},submit(){this.dismiss(),this.submitting=!0,this.submitHandler(this.file).then(()=>{this.success=!0}).catch(()=>{this.error=!0}).finally(()=>{this.submitting=!1})},dismiss(){this.success=!1,this.error=!1}}},aa={class:"importer btn-group"},ia={key:2},ra={key:3};function da(e,t,n,a,r,d){const i=w("FAIcon");return p(),g("div",aa,[s("form",null,[s("input",{ref:"input",class:"input",type:"file",onChange:t[0]||(t[0]=(...c)=>e.change&&e.change(...c))},null,544)]),e.submitting?(p(),H(i,{key:0,class:"importer-uploading",spin:"",icon:"circle-notch"})):(p(),g("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=(...c)=>e.submit&&e.submit(...c))},o(e.submitButtonLabel||e.$t("importer.import")),1)),e.success?(p(),g("div",ia,[s("button",{class:"button-unstyled",onClick:t[2]||(t[2]=(...c)=>e.dismiss&&e.dismiss(...c))},[l(i,{icon:"times"})]),t[4]||(t[4]=b(" "+o(" ")+" ",-1)),s("span",null,o(e.successMessage||e.$t("importer.success")),1)])):e.error?(p(),g("div",ra,[s("button",{class:"button-unstyled",onClick:t[3]||(t[3]=(...c)=>e.dismiss&&e.dismiss(...c))},[l(i,{icon:"times"})]),t[5]||(t[5]=b(" "+o(" ")+" ",-1)),s("span",null,o(e.errorMessage||e.$t("importer.error")),1)])):V("",!0)])}const ua=G(na,[["render",da]]);pe.add(bt);const ca={props:{getContent:{type:Function,required:!0},filename:{type:String,default:"export.csv"},exportButtonLabel:{type:String},processingMessage:{type:String}},data(){return{processing:!1}},methods:{process(){this.processing=!0,this.getContent().then(e=>{const t=document.createElement("a");t.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),t.setAttribute("download",this.filename),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),setTimeout(()=>{this.processing=!1},2e3)})}}},pa={class:"exporter"},ma={key:0};function ha(e,t,n,a,r,d){const i=w("FAIcon");return p(),g("div",pa,[e.processing?(p(),g("div",ma,[l(i,{icon:"circle-notch",size:"lg",spin:""}),s("span",null,o(e.processingMessage||e.$t("exporter.processing")),1)])):(p(),g("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=(...c)=>e.process&&e.process(...c))},o(e.exportButtonLabel||e.$t("exporter.export")),1))])}const fa=G(ca,[["render",ha]]),ga={data(){return{activeTab:"profile",newDomainToMute:"",listBackupsError:!1,addBackupError:!1,addedBackup:!1,backups:[]}},created(){tt().fetchTokens(),this.fetchBackups()},components:{Importer:ua,Exporter:fa,Checkbox:ue},computed:{...Be({backendInteractor:e=>e.api.backendInteractor,user:e=>e.users.currentUser})},methods:{getFollowsContent(){return this.backendInteractor.exportFriends({id:this.user.id}).then(this.generateExportableUsersContent)},getBlocksContent(){return this.backendInteractor.fetchBlocks().then(this.generateExportableUsersContent)},getMutesContent(){return this.backendInteractor.fetchMutes().then(this.generateExportableUsersContent)},importFollows(e){return this.backendInteractor.importFollows({file:e}).then(t=>{if(!t)throw new Error("failed")})},importBlocks(e){return this.backendInteractor.importBlocks({file:e}).then(t=>{if(!t)throw new Error("failed")})}
1,importMutes(e){return this.backendInteractor.importMutes({file:e}).then(t=>{if(!t)throw new Error("failed")})},generateExportableUsersContent(e){return e.map(t=>t&&t.is_local?t.screen_name+"@"+location.hostname:t.screen_name).join(` 2`)},addBackup(){this.$store.state.api.backendInteractor.addBackup().then(()=>{this.addedBackup=!0,this.addBackupError=!1}).catch(e=>{this.addedBackup=!1,this.addBackupError=e}).then(()=>this.fetchBackups())},fetchBackups(){this.$store.state.api.backendInteractor.listBackups().then(e=>{this.backups=e,this.listBackupsError=!1}).catch(e=>{this.listBackupsError=e.error})}}},ba=["label"],va={class:"setting-section"},$a={class:"setting-list"},ya={class:"importer-exporter"},ka={class:"importer-exporter"},wa={class:"importer-exporter"},Ca={class:"setting-list"},Va={key:0},Ta={key:1},Sa={class:"setting-list"},La={class:"actions"},Pa=["href"],_a={key:1},Ia={key:2},Ea={key:3},Ua={key:0,class:"alert error"},Aa=["title"];function Ba(e,t,n,a,r,d){const i=w("Importer"),c=w("Exporter"),m=w("FAIcon");return p(),g("div",{class:"data-import-export-tab",label:e.$t("settings.data_import_export_tab")},[s("div",va,[s("h3",null,o(e.$t("settings.import_export.title")),1),s("ul",$a,[s("li",null,[s("h4",null,o(e.$t("settings.import_export.follows")),1),s("p",null,o(e.$t("settings.import_followers_from_a_csv_file")),1),s("div",ya,[l(i,{"submit-handler":e.importFollows,"success-message":e.$t("settings.follows_imported"),"error-message":e.$t("settings.follow_import_error")},null,8,["submit-handler","success-message","error-message"]),l(c,{"get-content":e.getFollowsContent,filename:"friends.csv","export-button-label":e.$t("settings.follow_export_button")},null,8,["get-content","export-button-label"])])]),s("li",null,[s("h4",null,o(e.$t("settings.import_export.mutes")),1),s("p",null,o(e.$t("settings.import_mutes_from_a_csv_file")),1),s("div",ka,[l(i,{"submit-handler":e.importMutes,"success-message":e.$t("settings.mutes_imported"),"error-message":e.$t("settings.mute_import_error")},null,8,["submit-handler","success-message","error-message"]),l(c,{"get-content":e.getMutesContent,filename:"friends.csv","export-button-label":e.$t("settings.mute_export_button")},null,8,["get-content","export-button-label"])])]),s("li",null,[s("h4",null,o(e.$t("settings.import_export.blocks")),1),s("p",null,o(e.$t("settings.import_blocks_from_a_csv_file")),1),s("div",wa,[l(i,{"submit-handler":e.importBlocks,"success-message":e.$t("settings.blocks_imported"),"error-message":e.$t("settings.block_import_error")},null,8,["submit-handler","success-message","error-message"]),l(c,{"get-content":e.getBlocksContent,filename:"friends.csv","export-button-label":e.$t("settings.block_export_button")},null,8,["get-content","export-button-label"])])])]),s("h3",null,o(e.$t("settings.account_backup")),1),s("div",Ca,[s("p",null,o(e.$t("settings.account_backup_description")),1),s("button",{class:"btn button-default",onClick:t[0]||(t[0]=(...u)=>e.addBackup&&e.addBackup(...u))},o(e.$t("settings.add_backup")),1),e.addedBackup?(p(),g("p",Va,o(e.$t("settings.added_backup")),1)):V("",!0),e.addBackupError!==!1?(p(),g("p",Ta,o(e.$t("settings.add_backup_error",{error:e.addBackupError})),1)):V("",!0)]),s("table",Sa,[s("thead",null,[s("tr",null,[s("th",null,o(e.$t("settings.account_backup_table_head")),1),t[2]||(t[2]=s("th",null,null,-1))])]),s("tbody",null,[(p(!0),g(Y,null,ee(e.backups,u=>(p(),g("tr",{key:u.id},[s("td",null,o(u.inserted_at),1),s("td",La,[u.processed?(p(),g("a",{key:0,target:"_blank",href:u.url},o(e.$t("settings.download_backup")),9,Pa)):u.state==="running"?(p(),g("span",_a,o(e.$t("settings.backup_running",{number:u.processed_number},u.processed_number)),1)):u.state==="failed"?(p(),g("span",Ia,o(e.$t("settings.backup_failed")),1)):(p(),g("span",Ea,o(e.$t("settings.backup_not_ready")),1))])]))),128))])]),e.listBackupsError?(p(),g("div",Ua,[b(o(e.$t("settings.list_backups_error",{error:e.error}))+" ",1),s("button",{title:e.$t("settings.hide_list_backups_error_action"),onClick:t[1]||(t[1]=u=>e.listBackupsError=!1)},[l(m,{class:"fa-scale-110 fa-old-padding",icon:"times"})],8,Aa)])):V("",!0)])],8,ba)}const Fa=G(ga,[["render",Ba]]);var St,ao;function Oa(){if(ao)return St;ao=1;var e="Expected a function";function t(n){if(typeof n!="function")throw new TypeError(e);return function(){var a=arguments;switch(a.length){case 0:return!n.call(this);case 1:return!n.call(this,a[0]);case 2:return!n.call(this,a[0],a[1]);case 3:return!n.call(this,a[0],a[1],a[2])}return!n.apply(this,a)}}return St=t,St}
2var Lt,io;function Da(){if(io)return Lt;io=1;var e=ul(),t=cl(),n=pl(),a=ml(),r=Oa();function d(i,c){var m=a(i)?e:t;return m(i,r(n(c,3)))}return Lt=d,Lt}var Ra=Da();const ro=hl(Ra),Ma=500,Na={props:{query:{type:Function,required:!0},filter:{type:Function},placeholder:{type:String,default:"Search..."}},data(){return{term:"",timeout:null,results:[],resultsVisible:!1}},computed:{filtered(){return this.filter?this.filter(this.results):this.results}},watch:{term(e){this.fetchResults(e)}},methods:{fetchResults(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.results=[],e&&this.query(e).then(t=>{this.results=t})},Ma)},onInputClick(){this.resultsVisible=!0},onClickOutside(){this.resultsVisible=!1}}},ja={class:"autosuggest"},qa=["placeholder"],za={key:0,class:"panel autosuggest-results"};function Ha(e,t,n,a,r,d){const i=fl("click-outside");return te((p(),g("div",ja,[te(s("input",{"onUpdate:modelValue":t[0]||(t[0]=c=>e.term=c),placeholder:e.placeholder,class:"input autosuggest-input",onClick:t[1]||(t[1]=(...c)=>e.onInputClick&&e.onInputClick(...c))},null,8,qa),[[ae,e.term]]),e.resultsVisible&&e.filtered.length>0?(p(),g("div",za,[(p(!0),g(Y,null,ee(e.filtered,c=>Pe(e.$slots,"default",{item:c})),256))])):V("",!0)])),[[i,e.onClickOutside]])}const Wa=G(Na,[["render",Ha]]),Ka={props:["userId"],computed:{user(){return this.$store.getters.findUser(this.userId)},relationship(){return this.$store.getters.relationship(this.userId)},blocked(){return this.relationship.blocking},blockExpiryAvailable(){return this.user.block_expires_at!==void 0},blockExpiry(){return this.user.block_expires_at==null?this.$t("user_card.block_expires_forever"):this.$t("user_card.block_expires_at",[new Date(this.user.mute_expires_at).toLocaleString()])},...Be({blockExpirationSupported:e=>e.instance.blockExpiration})},components:{BasicUserCard:Mo},methods:{unblockUser(){this.$store.dispatch("unblockUser",this.user.id)},blockUser(){this.blockExpirationSupported?this.$refs.timedBlockDialog.optionallyPrompt():this.$store.dispatch("blockUser",{id:this.user.id})}}},Ga={class:"block-card-content-container"},Ja={key:0,class:"alert neutral"};function Ya(e,t,n,a,r,d){const i=w("UserTimedFilterModal"),c=w("basic-user-card");return p(),H(c,{user:e.user},{default:h(()=>[s("div",Ga,[e.blocked&&e.blockExpiryAvailable?(p(),g("span",Ja,o(e.blockExpiry),1)):V("",!0),t[2]||(t[2]=b(" "+o(" ")+" ",-1)),e.blocked?(p(),g("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=(...m)=>e.unblockUser&&e.unblockUser(...m))},o(e.$t("user_card.unblock")),1)):(p(),g("button",{key:2,class:"btn button-default",onClick:t[1]||(t[1]=(...m)=>e.blockUser&&e.blockUser(...m))},o(e.$t("user_card.block")),1))]),(p(),H($t,{to:"#modal"},[l(i,{ref:"timedBlockDialog",user:e.user,"is-mute":!1},null,8,["user"])]))]),_:1},8,["user"])}const Qa=G(Ka,[["render",Ya]]),Xa={props:["userId"],computed:{user(){return this.$store.getters.findUser(this.userId)},relationship(){return this.$store.getters.relationship(this.userId)},muted(){return this.relationship.muting},muteExpiryAvailable(){return this.user.mute_expires_at!==void 0},muteExpiry(){return this.user.mute_expires_at==null?this.$t("user_card.mute_expires_forever"):this.$t("user_card.mute_expires_at",[new Date(this.user.mute_expires_at).toLocaleString()])}},components:{BasicUserCard:Mo,UserTimedFilterModal:gl},methods:{unmuteUser(){this.$store.dispatch("unmuteUser",this.userId)},muteUser(){this.$refs.timedMuteDialog.optionallyPrompt()}}},Za={class:"mute-card-content-container"},xa={key:0,class:"alert neutral"};function ei(e,t,n,a,r,d){const i=w("UserTimedFilterModal"),c=w("basic-user-card");return p(),H(c,{user:e.user},{default:h(()=>[s("div",Za,[e.muted&&e.muteExpiryAvailable?(p(),g("span",xa,o(e.muteExpiry),1)):V("",!0),t[2]||(t[2]=b(" "+o(" ")+" ",-1)),e.muted?(p(),g("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=(...m)=>e.unmuteUser&&e.unmuteUser(...m))},o(e.$t("user_card.unmute")),1)):(p(),g("button",{key:2,class:"btn button-default",onClick:t[1]||(t[1]=(...m)=>e.muteUser&&e.muteUser(...m))},o(e.$t("user_card.mute")),1))]),(p(),H($t,{to:"#modal"},[l(i,{ref:"timedMuteDialog",user:e.user,"is-mute":!0},null,8,["user"])]))]),_:1},8,["user"])}const ti=G(Xa,[["render",ei]]),si={props:["domain"],components:{ProgressButton:ts},computed:{user(){return this.$store.state.users.currentUser},muted(){return this.user.domainMutes.includes(this.domain)}},methods:{unmuteDomain(){return this.$store.dispatch("unmuteDomain",this.domain)},muteDomain(){return this.$store.dispatch("muteDomain",this.domain)}}},oi={class:"domain-mute-card"},li={class:"domain-mute-card-domain"};function ni(e,t,n,a,r,d){const i=w("ProgressButton");return p(),g("div",oi,[s("div",li,o(e.domain),1),e.muted?(p(),H(i,{key:0,click:e.unmuteDomain,class:"btn button-default"},{progress:h(()=>[b(o(e.$t("domain_mute_card.unmute_progress")),1)]),default:h(()=>[b(o(e.$t("domain_mute_card.unmute"))+" ",1)]),_:1},8,["click"])):(p(),H(i,{key:1,click:e.muteDomain,class:"btn button-default"},{progress:h(()=>[b(o(e.$t("domain_mute_card.mute_progress")),1)]),default:h(()=>[b(o(e.$t("domain_mute_card.mute"))+" ",1)]),_:1},8,["click"]))])}const ai=G(si,[["render",ni]]),ii={components:{List:bl,Checkbox:ue},props:{items:{type:Array,default:()=>[]},getKey:{type:Function,default:e=>e.id}},data(){return{selected:[]}},computed:{allKeys(){return this.items.map(this.getKey)},filteredSelected(){return this.allKeys.filter(e=>this.selected.indexOf(e)!==-1)},allSelected(){return this.filteredSelected.length===this.items.length},noneSelected(){return this.filteredSelected.length===0},someSelected(){return!this.allSelected&&!this.noneSelected}},methods:{isSelected(e){return this.filteredSelected.indexOf(this.getKey(e))!==-1},toggle(e,t){const n=this.getKey(t),a=this.isSelected(n);e!==a&&(e?this.selected.push(n):this.selected.splice(this.selected.indexOf(n),1))},toggleAll(e){e?this.selected=this.allKeys.slice(0):this.selected=[]}}},ri={class:"selectable-list"},di={key:0,class:"selectable-list-header"},ui={class:"selectable-list-checkbox-wrapper"},ci={class:"selectable-list-header-actions"},pi=["onClick"],mi={class:"selectable-list-checkbox-wrapper"};function hi(e,t,n,a,r,d){const i=w("Checkbox"),c=w("List");return p(),g("div",ri,[e.items.length>0?(p(),g("div",di,[s("div",ui,[l(i,{"model-value":e.allSelected,indeterminate:e.someSelected,"onUpdate:modelValue":e.toggleAll},{default:h(()=>[b(o(e.$t("selectable_list.select_all")),1)]),_:1},8,["model-value","indeterminate","onUpdate:modelValue"])]),s("div",ci,[Pe(e.$slots,"header",{selected:e.filteredSelected})])])):V("",!0),l(c,{items:e.items,"get-key":e.getKey,"get-class":m=>e.isSelected(m)?"-active":""},{item:h(({item:m})=>[s("div",{class:K(["selectable-list-item-inner",{"selectable-list-item-selected-inner":e.isSelected(m)}]),onClick:to(u=>e.toggle(!e.isSelected(m),m),["stop"])},[s("div",mi,[l(i,{"model-value":e.isSelected(m),"onUpdate:modelValue":u=>e.toggle(u,m),onClick:t[0]||(t[0]=to(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])]),Pe(e.$slots,"item",{item:m})],10,pi)]),empty:h(()=>[Pe(e.$slots,"empty")]),_:3},8,["items","get-key","get-class"])])}const is=G(ii,[["render",hi]]);function fi(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!kl(e)}pe.add(bt);const gi=({fetch:e,select:t,childPropName:n="content",additionalPropNames:a=[]})=>r=>({props:[...Object.keys(vl(r)).filter(c=>c!==n).concat(a),"refresh"],data(){return{loading:!1,error:!1}},computed:{fetchedData(){return t(this.$props,this.$store)}},created(){(this.refresh||yl(this.fetchedData))&&this.fetchData()},methods:{fetchData(){this.loading||(this.loading=!0,this.error=!1,e(this.$props,this.$store).then(()=>{this.loading=!1}
2).catch(()=>{this.error=!0,this.loading=!1}))}},render(){if(!this.error&&!this.loading){const c={...this.$props,[n]:this.fetchedData},m=this.$slots;return l("div",{class:"with-subscription"},[l(r,c,fi(m)?m:{default:()=>[m]})])}else return l("div",{class:"with-subscription-loading"},[this.error?l("a",{onClick:this.fetchData,class:"alert error"},[this.$t("general.generic_error")]):l($l,{spin:!0,icon:"circle-notch"},null)])}}),bi=No({fetch:(e,t)=>t.dispatch("fetchBlocks"),select:(e,t)=>os(t.state.users.currentUser,"blockIds",[]),childPropName:"items"})(is),vi=No({fetch:(e,t)=>t.dispatch("fetchMutes"),select:(e,t)=>os(t.state.users.currentUser,"muteIds",[]),childPropName:"items"})(is),$i=gi({fetch:(e,t)=>t.dispatch("fetchDomainMutes"),select:(e,t)=>os(t.state.users.currentUser,"domainMutes",[]),childPropName:"items"})(is),yi={data(){return{activeTab:"profile"}},created(){tt().fetchTokens(),this.$store.dispatch("getKnownDomains")},components:{TabSwitcher:ss,BlockList:bi,MuteList:vi,DomainMuteList:$i,BlockCard:Qa,MuteCard:ti,DomainMuteCard:ai,ProgressButton:ts,Autosuggest:Wa,Checkbox:ue},computed:{knownDomains(){return this.$store.state.instance.knownDomains},user(){return this.$store.state.users.currentUser}},methods:{importFollows(e){return this.$store.state.api.backendInteractor.importFollows({file:e}).then(t=>{if(!t)throw new Error("failed")})},importBlocks(e){return this.$store.state.api.backendInteractor.importBlocks({file:e}).then(t=>{if(!t)throw new Error("failed")})},generateExportableUsersContent(e){return e.map(t=>t&&t.is_local?t.screen_name+"@"+location.hostname:t.screen_name).join(` 3`)},activateTab(e){this.activeTab=e},filterUnblockedUsers(e){return ro(e,t=>this.$store.getters.relationship(this.userId).blocking||t===this.user.id)},filterUnMutedUsers(e){return ro(e,t=>this.$store.getters.relationship(this.userId).muting||t===this.user.id)},queryUserIds(e){return this.$store.dispatch("searchUsers",{query:e}).then(t=>wl(t,"id"))},blockUsers(e){return this.$store.dispatch("blockUsers",e)},unblockUsers(e){return this.$store.dispatch("unblockUsers",e)},muteUsers(e){return this.$store.dispatch("muteUsers",e)},unmuteUsers(e){return this.$store.dispatch("unmuteUsers",e)},filterUnMutedDomains(e){return e.filter(t=>!this.user.domainMutes.includes(t))},queryKnownDomains(e){return new Promise(t=>{t(this.knownDomains.filter(n=>n.toLowerCase().includes(e)))})},unmuteDomains(e){return this.$store.dispatch("unmuteDomains",e)}}},ki=["label"],wi={class:"usersearch-wrapper"},Ci={class:"bulk-actions"},Vi=["label"],Ti=["label"],Si={class:"usersearch-wrapper"},Li={class:"bulk-actions"},Pi=["label"],_i={class:"domain-mute-form"},Ii={class:"bulk-actions"};function Ei(e,t,n,a,r,d){const i=w("BlockCard"),c=w("Autosuggest"),m=w("ProgressButton"),u=w("BlockList"),$=w("MuteCard"),k=w("MuteList"),v=w("DomainMuteCard"),y=w("DomainMuteList"),S=w("tab-switcher");return p(),H(S,{"scrollable-tabs":!0,class:"mutes-and-blocks-tab"},{default:h(()=>[s("div",{label:e.$t("settings.blocks_tab")},[s("div",wi,[l(c,{filter:e.filterUnblockedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_block")},{default:h(L=>[l(i,{"user-id":L.item},null,8,["user-id"])]),_:1},8,["filter","query","placeholder"])]),l(u,{refresh:!0,"get-key":L=>L},{header:h(({selected:L})=>[s("div",Ci,[L.length>0?(p(),H(m,{key:0,class:"btn button-default bulk-action-button",click:()=>e.blockUsers(L)},{progress:h(()=>[b(o(e.$t("user_card.block_progress")),1)]),default:h(()=>[b(o(e.$t("user_card.block"))+" ",1)]),_:2},1032,["click"])):V("",!0),L.length>0?(p(),H(m,{key:1,class:"btn button-default",click:()=>e.unblockUsers(L)},{progress:h(()=>[b(o(e.$t("user_card.unblock_progress")),1)]),default:h(()=>[b(o(e.$t("user_card.unblock"))+" ",1)]),_:2},1032,["click"])):V("",!0)])]),item:h(({item:L})=>[l(i,{"user-id":L},null,8,["user-id"])]),empty:h(()=>[b(o(e.$t("settings.no_blocks")),1)]),_:1},8,["get-key"])],8,ki),s("div",{label:e.$t("settings.mutes_tab")},[l(S,null,{default:h(()=>[s("div",{label:e.$t("settings.user_mutes")},[s("div",Si,[l(c,{filter:e.filterUnMutedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_mute")},{default:h(L=>[l($,{"user-id":L.item},null,8,["user-id"])]),_:1},8,["filter","query","placeholder"])]),l(k,{refresh:!0,"get-key":L=>L},{header:h(({selected:L})=>[s("div",Li,[L.length>0?(p(),H(m,{key:0,class:"btn button-default",click:()=>e.muteUsers(L)},{progress:h(()=>[b(o(e.$t("user_card.mute_progress")),1)]),default:h(()=>[b(o(e.$t("user_card.mute"))+" ",1)]),_:2},1032,["click"])):V("",!0),L.length>0?(p(),H(m,{key:1,class:"btn button-default",click:()=>e.unmuteUsers(L)},{progress:h(()=>[b(o(e.$t("user_card.unmute_progress")),1)]),default:h(()=>[b(o(e.$t("user_card.unmute"))+" ",1)]),_:2},1032,["click"])):V("",!0)])]),item:h(({item:L})=>[l($,{"user-id":L},null,8,["user-id"])]),empty:h(()=>[b(o(e.$t("settings.no_mutes")),1)]),_:1},8,["get-key"])],8,Ti),s("div",{label:e.$t("settings.domain_mutes")},[s("div",_i,[l(c,{filter:e.filterUnMutedDomains,query:e.queryKnownDomains,placeholder:e.$t("settings.type_domains_to_mute")},{default:h(L=>[l(v,{domain:L.item},null,8,["domain"])]),_:1},8,["filter","query","placeholder"])]),l(y,{refresh:!0,"get-key":L=>L},{header:h(({selected:L})=>[s("div",Ii,[L.length>0?(p(),H(m,{key:0,class:"btn button-default",click:()=>e.unmuteDomains(L)},{progress:h(()=>[b(o(e.$t("domain_mute_card.unmute_progress")),1)]),default:h(()=>[b(o(e.$t("domain_mute_card.unmute"))+" ",1)]),_:2},1032,["click"])):V("",!0)])]),item:h(({item:L})=>[l(v,{domain:L},null,8,["domain"])]),empty:h(()=>[b(o(e.$t("settings.no_mutes")),1)]),_:1},8,["get-key"])],8,Pi)]),_:1})],8,Vi)]),_:1})}const Ui=G(yi,[["render",Ei]]),Ai={data(){return{activeTab:"profile",notificationSettings:this.$store.state.users.currentUser.notification_settings,newDomainToMute:""}},components:{BooleanSetting:we},computed:{user(){return this.$store.state.users.currentUser},canReceiveReports(){return this.user?this.user.privileges.includes("reports_manage_reports"):!1},...ke()},methods:{updateNotificationSettings(){this.$store.state.api.backendInteractor.updateNotificationSettings({settings:this.notificationSettings})}}},Bi=["label"],Fi={class:"setting-section"},Oi={class:"setting-list"},Di={class:"sidenote"},Ri={class:"setting-section"},Mi={class:"setting-list"},Ni={key:0,class:"sidenote"},ji={class:"setting-list two-column"},qi={class:"setting-list"},zi={class:"setting-list"},Hi={class:"setting-list"},Wi={class:"setting-list"},Ki={class:"setting-list"},Gi={class:"setting-list"},Ji={class:"setting-list"},Yi={class:"setting-list"},Qi={class:"setting-list"},Xi={key:0},Zi={class:"setting-list"},xi={class:"setting-list suboptions"},er={key:0,class:"setting-section"},tr={class:"setting-list"},sr={class:"setting-list suboptions"},or={class:"sidenote"};function lr(e,t,n,a,r,d){const i=w("BooleanSetting");return p(),g("div",{label:e.$t("settings.notifications")},[s("div",Fi,[s("h3",null,o(e.$t("settings.notification_setting_annoyance")),1),s("ul",Oi,[s("li",null,[l(i,{path:"closingDrawerMarksAsSeen"},{default:h(()=>[b(o(e.$t("settings.notification_setting_drawer_marks_as_seen")),1)]),_:1})]),s("li",null,[l(i,{path:"ignoreInactionableSeen"},{default:h(()=>[b(o(e.$t("settings.notification_setting_ignore_inactionable_seen")),1)]),_:1}),s("p",Di,o(e.$t("settings.notification_setting_ignore_inactionable_seen_tip")),1)]),s("li",null,[l(i,{path:"unseenAtTop",expert
3:"1"},{default:h(()=>[b(o(e.$t("settings.notification_setting_unseen_at_top")),1)]),_:1})])])]),s("div",Ri,[s("h3",null,o(e.$t("settings.notification_setting_filters")),1),s("ul",Mi,[s("li",null,[l(i,{source:"profile",path:"blockNotificationsFromStrangers"},{default:h(()=>[b(o(e.$t("settings.notification_setting_block_from_strangers")),1)]),_:1})]),s("li",null,[s("h4",null,o(e.$t("settings.notification_visibility")),1),e.expertLevel>0?(p(),g("p",Ni,o(e.$t("settings.notification_setting_filters_chrome_push")),1)):V("",!0),s("ul",ji,[s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_mentions")),1),s("ul",qi,[s("li",null,[l(i,{path:"notificationVisibility.mentions"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.mentions"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_statuses")),1),s("ul",zi,[s("li",null,[l(i,{path:"notificationVisibility.statuses"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.statuses"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_likes")),1),s("ul",Hi,[s("li",null,[l(i,{path:"notificationVisibility.likes"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.likes"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_repeats")),1),s("ul",Wi,[s("li",null,[l(i,{path:"notificationVisibility.repeats"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.repeats"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_emoji_reactions")),1),s("ul",Ki,[s("li",null,[l(i,{path:"notificationVisibility.emojiReactions"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.emojiReactions"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_follows")),1),s("ul",Gi,[s("li",null,[l(i,{path:"notificationVisibility.follows"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.follows"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_follow_requests")),1),s("ul",Ji,[s("li",null,[l(i,{path:"notificationVisibility.followRequest"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.followRequest"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_moves")),1),s("ul",Yi,[s("li",null,[l(i,{path:"notificationVisibility.moves"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.moves"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),s("li",null,[s("h5",null,o(e.$t("settings.notification_visibility_polls")),1),s("ul",Qi,[s("li",null,[l(i,{path:"notificationVisibility.polls"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.polls"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])]),e.canReceiveReports?(p(),g("li",Xi,[s("h5",null,o(e.$t("settings.notification_visibility_reports")),1),s("ul",Zi,[s("li",null,[l(i,{path:"notificationVisibility.reports"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_in_column")),1)]),_:1})]),s("li",null,[l(i,{path:"notificationNative.reports"},{default:h(()=>[b(o(e.$t("settings.notification_visibility_native_notifications")),1)]),_:1})])])])):V("",!0)])]),s("li",null,[l(i,{path:"showExtraNotifications"},{default:h(()=>
3[b(o(e.$t("settings.notification_show_extra")),1)]),_:1}),s("ul",xi,[s("li",null,[l(i,{path:"showChatsInExtraNotifications",disabled:!e.mergedConfig.showExtraNotifications},{default:h(()=>[b(o(e.$t("settings.notification_extra_chats")),1)]),_:1},8,["disabled"])]),s("li",null,[l(i,{path:"showAnnouncementsInExtraNotifications",disabled:!e.mergedConfig.showExtraNotifications},{default:h(()=>[b(o(e.$t("settings.notification_extra_announcements")),1)]),_:1},8,["disabled"])]),s("li",null,[l(i,{path:"showFollowRequestsInExtraNotifications",disabled:!e.mergedConfig.showExtraNotifications},{default:h(()=>[b(o(e.$t("settings.notification_extra_follow_requests")),1)]),_:1},8,["disabled"])]),s("li",null,[l(i,{path:"showExtraNotificationsTip",disabled:!e.mergedConfig.showExtraNotifications},{default:h(()=>[b(o(e.$t("settings.notification_extra_tip")),1)]),_:1},8,["disabled"])])])])])]),e.expertLevel>0?(p(),g("div",er,[s("h3",null,o(e.$t("settings.notification_setting_privacy")),1),s("ul",tr,[s("li",null,[l(i,{path:"webPushNotifications",expert:"1"},{default:h(()=>[b(o(e.$t("settings.enable_web_push_notifications")),1)]),_:1}),s("ul",sr,[s("li",null,[l(i,{path:"webPushAlwaysShowNotifications",disabled:!e.mergedConfig.webPushNotifications},{default:h(()=>[b(o(e.$t("settings.enable_web_push_always_show")),1)]),_:1},8,["disabled"]),s("p",{class:K([{faint:!e.mergedConfig.webPushNotifications},"sidenote"])},o(e.$t("settings.enable_web_push_always_show_tip")),3)])])]),s("li",null,[l(i,{source:"profile",path:"webPushHideContents",expert:"1"},{default:h(()=>[b(o(e.$t("settings.notification_setting_hide_notification_contents")),1)]),_:1})])])])):V("",!0),s("p",or,[s("ul",null,[s("li",null,o(e.$t("settings.notification_mutes")),1),s("li",null,o(e.$t("settings.notification_blocks")),1)])])],8,Bi)}const nr=G(Ai,[["render",lr]]),ar=["cm","mm","in","px","pt","pc","em","ex","ch","rem","vw","vh","vmin","vmax","%"],ir={...Ze,components:{...Ze.components,Select:_e},props:{...Ze.props,min:Number,units:{type:Array,default:()=>ar},unitSet:{type:String,default:"none"},step:{type:Number,default:1},resetDefault:{type:Object,default:null}},computed:{...Ze.computed,stateUnit(){return typeof this.state=="string"?this.state.replace(/[0-9,.]+/,""):""},stateValue(){return typeof this.state=="string"?this.state.replace(/[^0-9,.]+/,""):""}},methods:{...Ze.methods,getUnitString(e){return this.unitSet==="none"?e:this.$t(["settings","units",this.unitSet,e].join("."))},updateValue(e){this.configSink(this.path,parseFloat(e.target.value)+this.stateUnit)},updateUnit(e){let t=this.stateValue;const n=e.target.value;if(this.resetDefault){const a=this.resetDefault[n];a!=null&&(t=a)}this.configSink(this.path,t+n)}}},rr={key:0,class:"UnitSetting setting-item"},dr=["for"],ur={class:"no-break setting-control"},cr=["id","step","disabled","min","value"],pr=["value"];function mr(e,t,n,a,r,d){const i=w("ModifiedIndicator"),c=w("Select");return e.matchesExpertLevel?(p(),g("span",rr,[s("label",{for:e.path,class:"setting-label size-label"},[l(i,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"]),t[1]||(t[1]=b(" "+o(" ")+" ",-1)),Pe(e.$slots,"default")],8,dr),s("span",ur,[s("input",{id:e.path,class:"input number-input",type:"number",step:e.step,disabled:e.disabled,min:e.min||0,value:e.stateValue,onChange:t[0]||(t[0]=(...m)=>e.updateValue&&e.updateValue(...m))},null,40,cr),l(c,{id:e.path,"model-value":e.stateUnit,disabled:e.disabled,class:"unit-input unstyled",onChange:e.updateUnit},{default:h(()=>[(p(!0),g(Y,null,ee(e.units,m=>(p(),g("option",{key:m,value:m},o(e.getUnitString(m)),9,pr))),128))]),_:1},8,["id","model-value","disabled","onChange"])]),t[2]||(t[2]=b(" "+o(" "),-1))])):V("",!0)}const Xe=G(ir,[["render",mr]]);pe.add(Cl);const hr={components:{Popover:yt}},fr={class:"HelpIndicator"},gr={class:"help-tooltip"};function br(e,t,n,a,r,d){const i=w("FAIcon"),c=w("Popover");return p(),g("span",fr,[l(c,{trigger:"click","trigger-attrs":{"aria-label":e.$t("settings.setting_changed")}},{trigger:h(()=>[t[0]||(t[0]=b(" Â ",-1)),l(i,{icon:"circle-question"})]),content:h(()=>[s("div",gr,[Pe(e.$slots,"default")])]),_:3},8,["trigger-attrs"])])}const Xo=G(hr,[["render",br]]),vr=new Set(["word","regexp","user","user_regexp"]),$r={data(){return{replyVisibilityOptions:["all","following","self"].map(e=>({key:e,value:e,label:this.$t(`settings.reply_visibility_${e}`)})),muteBlockLv1Options:["ask","forever","temporarily"].map(e=>({key:e,value:e,label:this.$t(`user_card.mute_block_${e}`)})),muteFiltersDraftObject:ne.cloneDeep(Ge().prefsStorage.simple.muteFilters),muteFiltersDraftDirty:Object.fromEntries(Object.entries(Ge().prefsStorage.simple.muteFilters).map(([e])=>[e,!1])),exportedFilter:null,filterImporter:lt({validator(e){return!(Array.isArray(e)||!vr.has(e.type))},onImport:e=>{const{enabled:t=!0,expires:n=null,hide:a=!1,name:r="",value:d=""}=e;this.createFilter({enabled:t,expires:n,hide:a,name:r,value:d})},onImportFailure(e){console.error("Failure importing filter:",e),Q().pushGlobalNotice({messageKey:"settings.filter.import_failure",level:"error"})}}),filterExporter:Ct({filename:"pleromafe_mute-filter",getExportedObject:()=>this.exportedFilter})}},components:{BooleanSetting:we,ChoiceSetting:Re,UnitSetting:Xe,IntegerSetting:ot,Checkbox:ue,Select:_e,HelpIndicator:Xo},computed:{instanceSpecificPanelPresent(){return this.$store.state.instance.showInstanceSpecificPanel},...ke(),...jo(Ge,{muteFilters:e=>Object.entries(e.prefsStorage.simple.muteFilters),muteFiltersObject:e=>e.prefsStorage.simple.muteFilters}),...Be({blockExpirationSupported:e=>e.instance.blockExpiration}),onMuteDefaultActionLv1:{get(){const e=this.$store.state.config.onMuteDefaultAction;return e==="ask"||e==="forever"?e:"temporarily"},set(e){let t=e;e!=="ask"&&e!=="forever"&&(t="14d"),this.$store.dispatch("setOption",{name:"onMuteDefaultAction",value:t})}},onBlockDefaultActionLv1:{get(){const e=this.$store.state.config.onBlockDefaultAction;return e==="ask"||e==="forever"?e:"temporarily"},set(e){let t=e;e!=="ask"&&e!=="forever"&&(t="14d"),this.$store.dispatch("setOption",{name:"onBlockDefaultAction",value:t})}},muteFiltersDraft(){return Object.entries(this.muteFiltersDraftObject)},muteFiltersExpired(){const e=Date.now();return Object.entries(this.muteFiltersDraftObject).filter(([,{expires:t}])=>t!=null&&t<=e)}},methods:{...ls(Ge,["setPreference","unsetPreference","pushServerSideStorage"]),getDatetimeLocal(e){const t=new Date(e),n=new Intl.NumberFormat("en-US",{minimumIntegerDigits:2});return[t.getFullYear(),"-",n.format(t.getMonth()+1),"-",n.format(t.getDate()),"T",n.format(t.getHours()),":",n.format(t.getMinutes())].join("")},checkRegexValid(e){const t=this.muteFiltersObject[e];if(t.type!=="regexp"||t.type!=="user_regexp")return!0;const{value:n}=t;let a=!0;try{new RegExp(n)}catch{a=!1,console.error("Invalid RegExp: "+n)}return a},createFilter(e={type:"word",value:"",name:"New Filter",enabled:!0,expires:null,hide:!1}){const t=ht();e.order=this.muteFilters.length+2,this.muteFiltersDraftObject[t]=e,this.setPreference({path:"simple.muteFilters."+t,value:e}),this.pushServerSideStorage()},exportFilter(e){this.exportedFilter={...this.muteFiltersDraftObject[e]},delete this.exportedFilter.order,this.filterExporter.exportData()},importFilter(){this.filterImporter.importData()},copyFilter(e){const t={...this.muteFiltersDraftObject[e]},n=ht();this.muteFiltersDraftObject[n]=t,this.setPreference({path:"simple.muteFilters."+n,value:t}),this.pushServerSideStorage()},deleteFilter(e){delete this.muteFiltersDraftObject[e],this.unsetPreference({path:"simple.muteFilters."+e,value:null}),this.pushServerSideStorage()},purgeExpiredFilters(){this.muteFiltersExpired.forEach(([e])=>{delete this.muteFiltersDraftObject[e],this.unsetPreference({path:"simple.muteFilters."+e,value:null})}),this.pushServerSideStorage()},updateFilter(e,t,n){const a={...this.muteFiltersDraftObject[e]};if(t==="expires-never")if(n)a.expires=null;else{const d=Date.now()+12096e5;a.expires=d}else if(t==="expires"){const r=Date.parse(n);a.expires=r.valueOf()}else a[t]=n;this.muteFiltersDraftObject[e]=a,this.muteFiltersDraftDirty[e]=!0},saveFilter(e){this.setPreference({path:"simple.muteFilters."+e,value:this.muteFiltersDraftObject[e]}),this.pushServerSideStorage(),this.muteFiltersDraftDirty[e]=!1}},watch:{replyVisibility(){this.$store.dispatch("queueFlushAll")}}},yr={class:"filtering-tab"},kr={class:"setting-section"},wr={class:"setting-list"},Cr={class:"setting-item"},Vr={class:"setting-label"},Tr=["value"],Sr={key:0,class:"setting-list suboptions"},Lr={key:0},Pr={class:"setting-item"},_r={class:"setting-label"},Ir=["value"],Er={key:0,class:"setting-list suboptions"},Ur={class:"setting-list suboptions"},Ar={class:"muteFiltersActions"},Br={class:"total"},Fr={class:"muteFilterContainer"},Or={class:"filter-name"},Dr=["for"],Rr=["id","value","onInput"],Mr={key:0,class:"alert neutral"},Nr={class:"filter-enabled"},jr={class:"filter-type filter-field"},qr=["for"],zr=["href"],Hr={value:"word"},Wr={value:"regexp"},Kr={value:"user"},Gr={value:"user_regexp"},Jr={class:"filter-value filter-field"},Yr=["for"],Qr=["id","value","onInput"],Xr={class:"filter-expires filter-field"},Zr=["for"],xr={class:"filter-field-value"},ed=["id","disabled","value","onInput"],td={key:0,class:"alert error"},sd={class:"filter-buttons"},od=["onClick"],ld=["onClick"],nd=["onClick"],ad=["disabled","onClick"],id={class:"muteFiltersActionsBottom"},rd={class:"total"},dd=["disabled"];function ud(e,t,n,a,r,d){const i=w("ChoiceSetting"),c=w("Select"),m=w("UnitSetting"),u=w("BooleanSetting"),$=w("Checkbox"),k=w("i18n-t"),v=w("HelpIndicator");return p(),g("div",yr,[s("div",kr,[s("h3",null,o(e.$t("settings.filter.mute_filter")),1),s("ul",wr,[s("li",null,[e.user?(p(),H(i,{key:0,id:"replyVisibility",path:"replyVisibility",options:e.replyVisibilityOptions},{default:h(()=>[b(o(e.$t("settings.replies_in_timeline")),1)]),_:1},8,["options"])):V("",!0)]),s("li",null,[s("span",Cr,[s("span",Vr,o(e.$t("user_card.default_mute_expiration")),1),l(c,{id:"onMuteDefaultActionLv1",modelValue:e.onMuteDefaultActionLv1,"onUpdate:modelValue":t[0]||(t[0]=y=>e.onMuteDefaultActionLv1=y)},{default:h(()=>[(p(!0),g(Y,null,ee(e.muteBlockLv1Options,y=>(p(),g("option",{key:y.key,value:y.value},o(y.label),9,Tr))),128))]),_:1},8,["modelValue"])]),e.onMuteDefaultActionLv1==="temporarily"?(p(),g("ul",Sr,[s("li",null,[l(m,{path:"onMuteDefaultAction","unit-set":"time",units:["s","m","h","d"],min:0},{default:h(()=>[b(o(e.$t("user_card.default_expiration_time")),1)]),_:1})])])):V("",!0)]),e.blockExpirationSupported?(p(),g("li",Lr,[s("span",Pr,[s("span",_r,o(e.$t("user_card.default_block_expiration")),1),l(c,{id:"onBlockDefaultActionLv1",modelValue:e.onBlockDefaultActionLv1,"onUpdate:modelValue":t[1]||(t[1]=y=>e.onBlockDefaultActionLv1=y),class:"setting-control"},{default:h(()=>[(p(!0),g(Y,null,ee(e.muteBlockLv1Options,y=>(p(),g("option",{key:y.key,value:y.value},o(y.label),9,Ir))),128))]),_:1},8,["modelValue"])]),e.onBlockDefaultActionLv1==="temporarily"?(p(),g("ul",Er,[s("li",null,[l(m,{path:"onBlockDefaultAction","unit-set":"time",units:["s","m","h","d"],min:0},{default:h(()=>[b(o(e.$t("user_card.default_expiration_time")),1)]),_:1})])])):V("",!0)])):V("",!0),s("li",null,[l(u,{path:"hideFilteredStatuses"},{default:h(()=>[b(o(e.$t("settings.hide_muted_statuses")),1)]),_:1}),s("ul",Ur,[s("li",null,[l(u,{"parent-path":"hideFilteredStatuses","parent-invert":!0,path:"hideWordFilteredPosts",expert
3:"1"},{default:h(()=>[b(o(e.$t("settings.hide_filtered_statuses")),1)]),_:1})]),s("li",null,[e.user?(p(),H(u,{key:0,"parent-path":"hideFilteredStatuses","parent-invert":!0,path:"hideMutedThreads"},{default:h(()=>[b(o(e.$t("settings.hide_muted_threads")),1)]),_:1})):V("",!0)]),s("li",null,[e.user?(p(),H(u,{key:0,"parent-path":"hideFilteredStatuses","parent-invert":!0,path:"hideMutedPosts"},{default:h(()=>[b(o(e.$t("settings.hide_muted_posts")),1)]),_:1})):V("",!0)])])]),s("li",null,[l(u,{path:"muteBotStatuses"},{default:h(()=>[b(o(e.$t("settings.mute_bot_posts")),1)]),_:1})]),s("li",null,[l(u,{path:"muteSensitiveStatuses"},{default:h(()=>[b(o(e.$t("settings.mute_sensitive_posts")),1)]),_:1})]),s("li",null,[s("h3",null,o(e.$t("settings.filter.custom_filters")),1),s("p",Ar,[s("span",Br,o(e.$t("settings.filter.total_count",{count:e.muteFiltersDraft.length})),1),s("button",{class:"add-button button-default",type:"button",onClick:t[2]||(t[2]=y=>e.createFilter())},o(e.$t("settings.filter.new")),1),s("button",{class:"add-button button-default",type:"button",onClick:t[3]||(t[3]=y=>e.importFilter())},o(e.$t("settings.filter.import")),1)]),s("div",Fr,[(p(!0),g(Y,null,ee(e.muteFiltersDraft,y=>(p(),g("div",{key:y[0],class:"mute-filter",style:Je({order:y[1].order})},[s("div",Or,[s("label",{for:"filterName"+y[0]},o(e.$t("settings.filter.name")),9,Dr),t[5]||(t[5]=b(" "+o(" ")+" ",-1)),s("input",{id:"filterName"+y[0],class:"input",value:y[1].name,onInput:S=>e.updateFilter(y[0],"name",S.target.value)},null,40,Rr),y[1].expires!==null&&Date.now()>y[1].expires?(p(),g("span",Mr,o(e.$t("settings.filter.expired")),1)):V("",!0)]),s("div",Nr,[l($,{id:"filterHide"+y[0],"model-value":y[1].hide,name:"filterHide"+y[0],"onUpdate:modelValue":S=>e.updateFilter(y[0],"hide",S)},{default:h(()=>[b(o(e.$t("settings.filter.hide")),1)]),_:2},1032,["id","model-value","name","onUpdate:modelValue"]),t[6]||(t[6]=b(" "+o(" ")+" ",-1)),l($,{id:"filterEnabled"+y[0],"model-value":y[1].enabled,name:"filterEnabled"+y[0],"onUpdate:modelValue":S=>e.updateFilter(y[0],"enabled",S)},{default:h(()=>[b(o(e.$t("settings.enabled")),1)]),_:2},1032,["id","model-value","name","onUpdate:modelValue"])]),s("div",jr,[s("label",{for:"filterType"+y[0]},[l(v,null,{default:h(()=>[s("p",null,o(e.$t("settings.filter.help.word")),1),s("p",null,o(e.$t("settings.filter.help.user")),1),l(k,{keypath:"settings.filter.help.regexp",tag:"p"},{link:h(()=>[s("a",{href:e.$t("settings.filter.help.regexp_url"),target:"_blank"},o(e.$t("settings.filter.help.regexp_link")),9,zr)]),_:1})]),_:1}),b(" "+o(e.$t("settings.filter.type")),1)],8,qr),l(c,{id:"filterType"+y[0],class:"filter-field-value","model-value":y[1].type,"onUpdate:modelValue":S=>e.updateFilter(y[0],"type",S)},{default:h(()=>[s("option",Hr,o(e.$t("settings.filter.plain")),1),s("option",Wr,o(e.$t("settings.filter.regexp")),1),s("option",Kr,o(e.$t("settings.filter.user")),1),s("option",Gr,o(e.$t("settings.filter.user_regexp")),1)]),_:2},1032,["id","model-value","onUpdate:modelValue"])]),s("div",Jr,[s("label",{for:"filterValue"+y[0]},o(e.$t("settings.filter.value")),9,Yr),t[7]||(t[7]=b(" "+o(" ")+" ",-1)),s("input",{id:"filterValue"+y[0],class:"input filter-field-value",value:y[1].value,onInput:S=>e.updateFilter(y[0],"value",S.target.value)},null,40,Qr)]),s("div",Xr,[s("label",{for:"filterExpires"+y[0]},o(e.$t("settings.filter.expires")),9,Zr),t[9]||(t[9]=b(" "+o(" ")+" ",-1)),s("div",xr,[s("input",{id:"filterExpires"+y[0],class:K(["input",{disabled:y[1].expires===null}]),type:"datetime-local",disabled:y[1].expires===null,value:y[1].expires?e.getDatetimeLocal(y[1].expires):null,onInput:S=>e.updateFilter(y[0],"expires",S.target.value)},null,42,ed),t[8]||(t[8]=b(" "+o(" ")+" ",-1)),l($,{id:"filterExpiresNever"+y[0],"model-value":y[1].expires===null,name:"filterExpiresNever"+y[0],class:"input-inset input-boolean never","onUpdate:modelValue":S=>e.updateFilter(y[0],"expires-never",S)},{default:h(()=>[b(o(e.$t("settings.filter.never_expires")),1)]),_:2},1032,["id","model-value","name","onUpdate:modelValue"])])]),e.checkRegexValid(y[0])?V("",!0):(p(),g("div",td,o(e.$t("settings.filter.regexp_error")),1)),s("div",sd,[s("button",{class:"delete-button button-default -danger",type:"button",onClick:S=>e.deleteFilter(y[0])},o(e.$t("settings.filter.delete")),9,od),s("button",{class:"export-button button-default",type:"button",onClick:S=>e.exportFilter(y[0])},o(e.$t("settings.filter.export")),9,ld),s("button",{class:"copy-button button-default",type:"button",onClick:S=>e.copyFilter(y[0])},o(e.$t("settings.filter.copy")),9,nd),s("button",{class:K(["save-button button-default",{disabled:!e.muteFiltersDraftDirty[y[0]]}]),disabled:!e.muteFiltersDraftDirty[y[0]],type:"button",onClick:S=>e.saveFilter(y[0])},o(e.$t("settings.filter.save")),11,ad)])],4))),128))]),s("p",id,[s("span",rd,o(e.$t("settings.filter.expired_count",{count:e.muteFiltersExpired.length})),1),s("button",{class:K(["add-button button-default",{disabled:e.muteFiltersExpired.length===0}]),type:"button",disabled:e.muteFiltersExpired.length===0,onClick:t[4]||(t[4]=y=>e.purgeExpiredFilters())},o(e.$t("settings.filter.purge_expired")),11,dd)])])])])])}const cd=G($r,[["render",ud]]),pd={props:{backupCodes:{type:Object,default:()=>
3({inProgress:!1,codes:[]})}},data:()=>({}),computed:{inProgress(){return this.backupCodes.inProgress},ready(){return this.backupCodes.codes.length>0},displayTitle(){return this.inProgress||this.ready}}},md={class:"mfa-backup-codes"},hd={key:0},fd={key:1},gd={class:"alert warning"},bd={class:"backup-codes"};function vd(e,t,n,a,r,d){return p(),g("div",md,[e.displayTitle?(p(),g("h4",hd,o(e.$t("settings.mfa.recovery_codes")),1)):V("",!0),e.inProgress?(p(),g("i",fd,o(e.$t("settings.mfa.waiting_a_recovery_codes")),1)):V("",!0),e.ready?(p(),g(Y,{key:2},[s("p",gd,o(e.$t("settings.mfa.recovery_codes_warning")),1),s("ul",bd,[(p(!0),g(Y,null,ee(e.backupCodes.codes,i=>(p(),g("li",{key:i},o(i),1))),128))])],64)):V("",!0)])}const $d=G(pd,[["render",vd]]),yd={props:["disabled"],data:()=>({}),methods:{confirm(){this.$emit("confirm")},cancel(){this.$emit("cancel")}}},kd=["disabled"],wd=["disabled"];function Cd(e,t,n,a,r,d){return p(),g("div",null,[Pe(e.$slots,"default"),s("button",{class:"btn button-default",disabled:e.disabled,onClick:t[0]||(t[0]=(...i)=>e.confirm&&e.confirm(...i))},o(e.$t("general.confirm")),9,kd),s("button",{class:"btn button-default",disabled:e.disabled,onClick:t[1]||(t[1]=(...i)=>e.cancel&&e.cancel(...i))},o(e.$t("general.cancel")),9,wd)])}const Zo=G(yd,[["render",Cd]]),Vd={props:["settings"],data:()=>({error:!1,currentPassword:"",deactivate:!1,inProgress:!1}),components:{confirm:Zo},computed:{isActivated(){return this.settings.totp},...Be({backendInteractor:e=>e.api.backendInteractor})},methods:{doActivate(){this.$emit("activate")},cancelDeactivate(){this.deactivate=!1},doDeactivate(){this.error=null,this.deactivate=!0},confirmDeactivate(){this.error=null,this.inProgress=!0,this.backendInteractor.mfaDisableOTP({password:this.currentPassword}).then(e=>{if(this.inProgress=!1,e.error){this.error=e.error;return}this.deactivate=!1,this.$emit("deactivate")})}}},Td={class:"method-item"},Sd=["disabled"],Ld={key:1,class:"alert error"};function Pd(e,t,n,a,r,d){const i=w("confirm");return p(),g("div",null,[s("div",Td,[s("strong",null,o(e.$t("settings.mfa.otp")),1),e.isActivated?V("",!0):(p(),g("button",{key:0,class:"btn button-default",onClick:t[0]||(t[0]=(...c)=>e.doActivate&&e.doActivate(...c))},o(e.$t("general.enable")),1)),e.isActivated?(p(),g("button",{key:1,class:"btn button-default",disabled:e.deactivate,onClick:t[1]||(t[1]=(...c)=>e.doDeactivate&&e.doDeactivate(...c))},o(e.$t("general.disable")),9,Sd)):V("",!0)]),e.deactivate?(p(),H(i,{key:0,disabled:e.inProgress,onConfirm:e.confirmDeactivate,onCancel:e.cancelDeactivate},{default:h(()=>[b(o(e.$t("settings.enter_current_password_to_confirm"))+": ",1),te(s("input",{"onUpdate:modelValue":t[2]||(t[2]=c=>e.currentPassword=c),type:"password",class:"input"},null,512),[[ae,e.currentPassword]])]),_:1},8,["disabled","onConfirm","onCancel"])):V("",!0),e.error?(p(),g("div",Ld,o(e.error),1)):V("",!0)])}const _d=G(Vd,[["render",Pd]]);var Ke={},Pt,uo;function Id(){return uo||(uo=1,Pt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Pt}var _t={},Ae={},co;function Me(){if(co)return Ae;co=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ae.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return a*4+17},Ae.getSymbolTotalCodewords=function(a){return t[a]},Ae.getBCHDigit=function(n){let a=0;for(;n!==0;)a++,n>>>=1;return a},Ae.setToSJISFunction=function(a){if(typeof a!="function")throw new Error('"toSJISFunc" is not a valid function.');e=a},Ae.isKanjiModeEnabled=function(){return typeof e<"u"},Ae.toSJIS=function(a){return e(a)},Ae}var It={},po;function rs(){return po||(po=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(a){return a&&typeof a.bit<"u"&&a.bit>=0&&a.bit<4},e.from=function(a,r){if(e.isValid(a))return a;try{return t(a)}catch{return r}}}(It)),It}var Et,mo;function Ed(){if(mo)return Et;mo=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let a=0;a<n;a++)this.putBit((t>>>n-a-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Et=e,Et}var Ut,ho;function Ud(){if(ho)return Ut;ho=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,a,r){const d=t*this.size+n;this.data[d]=a,r&&(this.reservedBit[d]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,a){this.data[t*this.size+n]^=a},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Ut=e,Ut}var At={},fo;function Ad(){return fo||(fo=1,function(e){const t=Me().getSymbolSize;
vendor: 18,959 bytes, lines 3-9
3e.getRowColCoords=function(a){if(a===1)return[];const r=Math.floor(a/7)+2,d=t(a),i=d===145?26:Math.ceil((d-13)/(2*r-2))*2,c=[d-7];for(let m=1;m<r-1;m++)c[m]=c[m-1]-i;return c.push(6),c.reverse()},e.getPositions=function(a){const r=[],d=e.getRowColCoords(a),i=d.length;for(let c=0;c<i;c++)for(let m=0;m<i;m++)c===0&&m===0||c===0&&m===i-1||c===i-1&&m===0||r.push([d[c],d[m]]);return r}}(At)),At}var Bt={},go;function Bd(){if(go)return Bt;go=1;const e=Me().getSymbolSize,t=7;return Bt.getPositions=function(a){const r=e(a);return[[0,0],[r-t,0],[0,r-t]]},Bt}var Ft={},bo;function Fd(){return bo||(bo=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const d=r.size;let i=0,c=0,m=0,u=null,$=null;for(let k=0;k<d;k++){c=m=0,u=$=null;for(let v=0;v<d;v++){let y=r.get(k,v);y===u?c++:(c>=5&&(i+=t.N1+(c-5)),u=y,c=1),y=r.get(v,k),y===$?m++:(m>=5&&(i+=t.N1+(m-5)),$=y,m=1)}c>=5&&(i+=t.N1+(c-5)),m>=5&&(i+=t.N1+(m-5))}return i},e.getPenaltyN2=function(r){const d=r.size;let i=0;for(let c=0;c<d-1;c++)for(let m=0;m<d-1;m++){const u=r.get(c,m)+r.get(c,m+1)+r.get(c+1,m)+r.get(c+1,m+1);(u===4||u===0)&&i++}return i*t.N2},e.getPenaltyN3=function(r){const d=r.size;let i=0,c=0,m=0;for(let u=0;u<d;u++){c=m=0;for(let $=0;$<d;$++)c=c<<1&2047|r.get(u,$),$>=10&&(c===1488||c===93)&&i++,m=m<<1&2047|r.get($,u),$>=10&&(m===1488||m===93)&&i++}return i*t.N3},e.getPenaltyN4=function(r){let d=0;const i=r.data.length;for(let m=0;m<i;m++)d+=r.data[m];return Math.abs(Math.ceil(d*100/i/5)-10)*t.N4};function n(a,r,d){switch(a){case e.Patterns.PATTERN000:return(r+d)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return d%3===0;case e.Patterns.PATTERN011:return(r+d)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(d/3))%2===0;case e.Patterns.PATTERN101:return r*d%2+r*d%3===0;case e.Patterns.PATTERN110:return(r*d%2+r*d%3)%2===0;case e.Patterns.PATTERN111:return(r*d%3+(r+d)%2)%2===0;default:throw new Error("bad maskPattern:"+a)}}e.applyMask=function(r,d){const i=d.size;for(let c=0;c<i;c++)for(let m=0;m<i;m++)d.isReserved(m,c)||d.xor(m,c,n(r,m,c))},e.getBestMask=function(r,d){const i=Object.keys(e.Patterns).length;let c=0,m=1/0;for(let u=0;u<i;u++){d(u),e.applyMask(u,r);const $=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(u,r),$<m&&(m=$,c=u)}return c}}(Ft)),Ft}var pt={},vo;function xo(){if(vo)return pt;vo=1;const e=rs(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return pt.getBlocksCount=function(r,d){switch(d){case e.L:return t[(r-1)*4+0];case e.M:return t[(r-1)*4+1];case e.Q:return t[(r-1)*4+2];case e.H:return t[(r-1)*4+3];default:return}},pt.getTotalCodewordsCount=function(r,d){switch(d){case e.L:return n[(r-1)*4+0];case e.M:return n[(r-1)*4+1];case e.Q:return n[(r-1)*4+2];case e.H:return n[(r-1)*4+3];default:return}},pt}var Ot={},et={},$o;function Od(){if($o)return et;$o=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let a=1;for(let r=0;r<255;r++)e[r]=a,t[a]=r,a<<=1,a&256&&(a^=285);for(let r=255;r<512;r++)e[r]=e[r-255]}(),et.log=function(a){if(a<1)throw new Error("log("+a+")");return t[a]},et.exp=function(a){return e[a]},et.mul=function(a,r){return a===0||r===0?0:e[t[a]+t[r]]},et}var yo;function Dd(){return yo||(yo=1,function(e){const t=Od();e.mul=function(a,r){const d=new Uint8Array(a.length+r.length-1);for(let i=0;i<a.length;i++)for(let c=0;c<r.length;c++)d[i+c]^=t.mul(a[i],r[c]);return d},e.mod=function(a,r){let d=new Uint8Array(a);for(;d.length-r.length>=0;){const i=d[0];for(let m=0;m<r.length;m++)d[m]^=t.mul(r[m],i);let c=0;for(;c<d.length&&d[c]===0;)c++;d=d.slice(c)}return d},e.generateECPolynomial=function(a){let r=new Uint8Array([1]);for(let d=0;d<a;d++)r=e.mul(r,new Uint8Array([1,t.exp(d)]));return r}}(Ot)),Ot}var Dt,ko;function Rd(){if(ko)return Dt;ko=1;const e=Dd();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(a){this.degree=a,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(a){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(a.length+this.degree);r.set(a);const d=e.mod(r,this.genPoly),i=this.degree-d.length;if(i>0){const c=new Uint8Array(this.degree);return c.set(d,i),c}return d},Dt=t,Dt}var Rt={},Mt={},Nt={},wo;function el(){return wo||(wo=1,Nt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Nt}var ye={},Co;function tl(){if(Co)return ye;Co=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const a="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r 4]))+`;ye.KANJI=new RegExp(n,"g"),ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ye.BYTE=new RegExp(a,"g"),ye.NUMERIC=new RegExp(e,"g"),ye.ALPHANUMERIC=new RegExp(t,"g");const r=new RegExp("^"+n+"$"),d=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ye.testKanji=function(m){return r.test(m)},ye.testNumeric=function(m){return d.test(m)},ye.testAlphanumeric=function(m){return i.test(m)},ye}var Vo;function Ne(){return Vo||(Vo=1,function(e){const t=el(),n=tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(d,i){if(!d.ccBits)throw new Error("Invalid mode: "+d);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?d.ccBits[0]:i<27?d.ccBits[1]:d.ccBits[2]},e.getBestModeForData=function(d){return n.testNumeric(d)?e.NUMERIC:n.testAlphanumeric(d)?e.ALPHANUMERIC:n.testKanji(d)?e.KANJI:e.BYTE},e.toString=function(d){if(d&&d.id)return d.id;throw new Error("Invalid mode")},e.isValid=function(d){return d&&d.bit&&d.ccBits};function a(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(d,i){if(e.isValid(d))return d;try{return a(d)}catch{return i}}}(Mt)),Mt}var To;function Md(){return To||(To=1,function(e){const t=Me(),n=xo(),a=rs(),r=Ne(),d=el(),i=7973,c=t.getBCHDigit(i);function m(v,y,S){for(let L=1;L<=40;L++)if(y<=e.getCapacity(L,S,v))return L}function u(v,y){return r.getCharCountIndicator(v,y)+4}function $(v,y){let S=0;return v.forEach(function(L){const P=u(L.mode,y);S+=P+L.getBitsLength()}),S}function k(v,y){for(let S=1;S<=40;S++)if($(v,S)<=e.getCapacity(S,y,r.MIXED))return S}e.from=function(y,S){return d.isValid(y)?parseInt(y,10):S},e.getCapacity=function(y,S,L){if(!d.isValid(y))throw new Error("Invalid QR Code version");typeof L>"u"&&(L=r.BYTE);const P=t.getSymbolTotalCodewords(y),E=n.getTotalCodewordsCount(y,S),j=(P-E)*8;if(L===r.MIXED)return j;const R=j-u(L,y);switch(L){case r.NUMERIC:return Math.floor(R/10*3);case r.ALPHANUMERIC:return Math.floor(R/11*2);case r.KANJI:return Math.floor(R/13);case r.BYTE:default:return Math.floor(R/8)}},e.getBestVersionForData=function(y,S){let L;const P=a.from(S,a.M);if(Array.isArray(y)){if(y.length>1)return k(y,P);if(y.length===0)return 1;L=y[0]}else L=y;return m(L.mode,L.getLength(),P)},e.getEncodedBits=function(y){if(!d.isValid(y)||y<7)throw new Error("Invalid QR Code version");let S=y<<12;for(;t.getBCHDigit(S)-c>=0;)S^=i<<t.getBCHDigit(S)-c;return y<<12|S}}(Rt)),Rt}var jt={},So;function Nd(){if(So)return jt;So=1;const e=Me(),t=1335,n=21522,a=e.getBCHDigit(t);return jt.getEncodedBits=function(d,i){const c=d.bit<<3|i;let m=c<<10;for(;e.getBCHDigit(m)-a>=0;)m^=t<<e.getBCHDigit(m)-a;return(c<<10|m)^n},jt}var qt={},zt,Lo;function jd(){if(Lo)return zt;Lo=1;const e=Ne();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(a){return 10*Math.floor(a/3)+(a%3?a%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(a){let r,d,i;for(r=0;r+3<=this.data.length;r+=3)d=this.data.substr(r,3),i=parseInt(d,10),a.put(i,10);const c=this.data.length-r;c>0&&(d=this.data.substr(r),i=parseInt(d,10),a.put(i,c*3+1))},zt=t,zt}var Ht,Po;function qd(){if(Po)return Ht;Po=1;const e=Ne(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(a){this.mode=e.ALPHANUMERIC,this.data=a}return n.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let d;for(d=0;d+2<=this.data.length;d+=2){let i=t.indexOf(this.data[d])*45;i+=t.indexOf(this.data[d+1]),r.put(i,11)}this.data.length%2&&r.put(t.indexOf(this.data[d]),6)},Ht=n,Ht}var Wt,_o;function zd(){if(_o)return Wt;_o=1;const e=Ne();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(a){return a*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let a=0,r=this.data.length;a<r;a++)n.put(this.data[a],8)},Wt=t,Wt}var Kt,Io;function Hd(){if(Io)return Kt;Io=1;const e=Ne(),t=Me();function n(a){this.mode=e.KANJI,this.data=a}return n.getBitsLength=function(r){return r*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(a){let r;for(r=0;r<this.data.length;r++){let d=t.toSJIS(this.data[r]);if(d>=33088&&d<=40956)d-=33088;else if(d>=57408&&d<=60351)d-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+` 5Make sure your charset is UTF-8`);d=(d>>>8&255)*192+(d&255),a.put(d,13)}},Kt=n,Kt}var Gt={exports:{}},Eo;function Wd(){return Eo||(Eo=1,function(e){var t={single_source_shortest_paths:function(n,a,r){var d={},i={};i[a]=0;var c=t.PriorityQueue.make();c.push(a,0);for(var m,u,$,k,v,y,S,L,P;!c.empty();){m=c.pop(),u=m.value,k=m.cost,v=n[u]||{};for($ in v)v.hasOwnProperty($)&&(y=v[$],S=k+y,L=i[$],P=typeof i[$]>"u",(P||L>S)&&(i[$]=S,c.push($,S),d[$]=u))}if(typeof r<"u"&&typeof i[r]>"u"){var E=["Could not find a path from ",a," to ",r,"."].join("");throw new Error(E)}return d},extract_shortest_path_from_predecessor_list:function(n,a){for(var r=[],d=a;d;)r.push(d),n[d],d=n[d];return r.reverse(),r},find_path:function(n,a,r){var d=t.single_source_shortest_paths(n,a,r);return t.extract_shortest_path_from_predecessor_list(d,r)},PriorityQueue:{make:function(n){var a=t.PriorityQueue,r={},d;n=n||{};for(d in a)a.hasOwnProperty(d)&&(r[d]=a[d]);return r.queue=[],r.sorter=n.sorter||a.default_sorter,r},default_sorter:function(n,a){return n.cost-a.cost},push:function(n,a){var r={value:n,cost:a};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Gt)),Gt.exports}var Uo;function Kd(){return Uo||(Uo=1,function(e){const t=Ne(),n=jd(),a=qd(),r=zd(),d=Hd(),i=tl(),c=Me(),m=Wd();function u(E){return unescape(encodeURIComponent(E)).length}function $(E,j,R){const A=[];let X;for(;(X=E.exec(R))!==null;)A.push({data:X[0],index:X.index,mode:j,length:X[0].length});return A}function k(E){const j=$(i.NUMERIC,t.NUMERIC,E),R=$(i.ALPHANUMERIC,t.ALPHANUMERIC,E);let A,X;return c.isKanjiModeEnabled()?(A=$(i.BYTE,t.BYTE,E),X=$(i.KANJI,t.KANJI,E)):(A=$(i.BYTE_KANJI,t.BYTE,E),X=[]),j.concat(R,A,X).sort(function(O,D){return O.index-D.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function v(E,j){switch(j){case t.NUMERIC:return n.getBitsLength(E);case t.ALPHANUMERIC:return a.getBitsLength(E);case t.KANJI:return d.getBitsLength(E);case t.BYTE:return r.getBitsLength(E)}}function y(E){return E.reduce(function(j,R){const A=j.length-1>=0?j[j.length-1]:null;return A&&A.mode===R.mode?(j[j.length-1].data+=R.data,j):(j.push(R),j)},[])}function S(E){const j=[];for(let R=0;R<E.length;R++){const A=E[R];switch(A.mode){case t.NUMERIC:j.push([A,{data:A.data,mode:t.ALPHANUMERIC,length:A.length},{data:A.data,mode:t.BYTE,length:A.length}]);break;case t.ALPHANUMERIC:j.push([A,{data:A.data,mode:t.BYTE,length:A.length}]);break;case t.KANJI:j.push([A,{data:A.data,mode:t.BYTE,length:u(A.data)}]);break;case t.BYTE:j.push([{data:A.data,mode:t.BYTE,length:u(A.data)}])}}return j}function L(E,j){const R={},A={start:{}};let X=["start"];for(let C=0;C<E.length;C++){const O=E[C],D=[];for(let U=0;U<O.length;U++){const M=O[U],q=""+C+U;D.push(q),R[q]={node:M,lastCount:0},A[q]={};for(let z=0;z<X.length;z++){const _=X[z];R[_]&&R[_].node.mode===M.mode?(A[_][q]=v(R[_].lastCount+M.length,M.mode)-v(R[_].lastCount,M.mode),R[_].lastCount+=M.length):(R[_]&&(R[_].lastCount=M.length),A[_][q]=v(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,j))}}X=D}for(let C=0;C<X.length;C++)A[X[C]].end=0;return{map:A,table:R}}function P(E,j){let R;const A=t.getBestModeForData(E);if(R=t.from(j,A),R!==t.BYTE&&R.bit<A.bit)throw new Error('"'+E+'" cannot be encoded with mode '+t.toString(R)+`. 6 Suggested mode is: `+t.toString(A));switch(R===t.KANJI&&!c.isKanjiModeEnabled()&&(R=t.BYTE),R){case t.NUMERIC:return new n(E);case t.ALPHANUMERIC:return new a(E);case t.KANJI:return new d(E);case t.BYTE:return new r(E)}}e.fromArray=function(j){return j.reduce(function(R,A){return typeof A=="string"?R.push(P(A,null)):A.data&&R.push(P(A.data,A.mode)),R},[])},e.fromString=function(j,R){const A=k(j,c.isKanjiModeEnabled()),X=S(A),C=L(X,R),O=m.find_path(C.map,"start","end"),D=[];for(let U=1;U<O.length-1;U++)D.push(C.table[O[U]].node);return e.fromArray(y(D))},e.rawSplit=function(j){return e.fromArray(k(j,c.isKanjiModeEnabled()))}}(qt)),qt}var Ao;function Gd(){if(Ao)return _t;Ao=1;const e=Me(),t=rs(),n=Ed(),a=Ud(),r=Ad(),d=Bd(),i=Fd(),c=xo(),m=Rd(),u=Md(),$=Nd(),k=Ne(),v=Kd();function y(C,O){const D=C.size,U=d.getPositions(O);for(let M=0;M<U.length;M++){const q=U[M][0],z=U[M][1];for(let _=-1;_<=7;_++)if(!(q+_<=-1||D<=q+_))for(let N=-1;N<=7;N++)z+N<=-1||D<=z+N||(_>=0&&_<=6&&(N===0||N===6)||N>=0&&N<=6&&(_===0||_===6)||_>=2&&_<=4&&N>=2&&N<=4?C.set(q+_,z+N,!0,!0):C.set(q+_,z+N,!1,!0))}}function S(C){const O=C.size;for(let D=8;D<O-8;D++){const U=D%2===0;C.set(D,6,U,!0),C.set(6,D,U,!0)}}function L(C,O){const D=r.getPositions(O);for(let U=0;U<D.length;U++){const M=D[U][0],q=D[U][1];for(let z=-2;z<=2;z++)for(let _=-2;_<=2;_++)z===-2||z===2||_===-2||_===2||z===0&&_===0?C.set(M+z,q+_,!0,!0):C.set(M+z,q+_,!1,!0)}}function P(C,O){const D=C.size,U=u.getEncodedBits(O);let M,q,z;for(let _=0;_<18;_++)M=Math.floor(_/3),q=_%3+D-8-3,z=(U>>_&1)===1,C.set(M,q,z,!0),C.set(q,M,z,!0)}function E(C,O,D){const U=C.size,M=$.getEncodedBits(O,D);let q,z;for(q=0;q<15;q++)z=(M>>q&1)===1,q<6?C.set(q,8,z,!0):q<8?C.set(q+1,8,z,!0):C.set(U-15+q,8,z,!0),q<8?C.set(8,U-q-1,z,!0):q<9?C.set(8,15-q-1+1,z,!0):C.set(8,15-q-1,z,!0);C.set(U-8,8,1,!0)}function j(C,O){const D=C.size;let U=-1,M=D-1,q=7,z=0;for(let _=D-1;_>0;_-=2)for(_===6&&_--;;){for(let N=0;N<2;N++)if(!C.isReserved(M,_-N)){let ie=!1;z<O.length&&(ie=(O[z]>>>q&1)===1),C.set(M,_-N,ie),q--,q===-1&&(z++,q=7)}if(M+=U,M<0||D<=M){M-=U,U=-U;break}}}function R(C,O,D){const U=new n;D.forEach(function(N){U.put(N.mode.bit,4),U.put(N.getLength(),k.getCharCountIndicator(N.mode,C)),N.write(U)});const M=e.getSymbolTotalCodewords(C),q=c.getTotalCodewordsCount(C,O),z=(M-q)*8;for(U.getLengthInBits()+4<=z&&U.put(0,4);U.getLengthInBits()%8!==0;)U.putBit(0);const _=(z-U.getLengthInBits())/8;for(let N=0;N<_;N++)U.put(N%2?17:236,8);return A(U,C,O)}function A(C,O,D){const U=e.getSymbolTotalCodewords(O),M=c.getTotalCodewordsCount(O,D),q=U-M,z=c.getBlocksCount(O,D),_=U%z,N=z-_,ie=Math.floor(U/z),fe=Math.floor(q/z),je=fe+1,ge=ie-fe,qe=new m(ge);let Ie=0;const Ce=new Array(z),Ve=new Array(z);let Ee=0;const Fe=new Uint8Array(C.buffer);for(let le=0;le<z;le++){const Te=le<N?fe:je;Ce[le]=Fe.slice(Ie,Ie+Te),Ve[le]=qe.encode(Ce[le]),Ie+=Te,Ee=Math.max(Ee,Te)}const Ue=new Uint8Array(U);let me=0,oe,re;for(oe=0;oe<Ee;oe++)for(re=0;re<z;re++)oe<Ce[re].length&&(Ue[me++]=Ce[re][oe]);for(oe=0;oe<ge;oe++)for(re=0;re<z;re++)Ue[me++]=Ve[re][oe];return Ue}function X(C,O,D,U){let M;if(Array.isArray(C))M=v.fromArray(C);else if(typeof C=="string"){let ie=O;if(!ie){const fe=v.rawSplit(C);ie=u.getBestVersionForData(fe,D)}M=v.fromString(C,ie||40)}else throw new Error("Invalid data");const q=u.getBestVersionForData(M,D);if(!q)throw new Error("The amount of data is too big to be stored in a QR Code");if(!O)O=q;else if(O<q)throw new Error(` 7The chosen QR Code version cannot contain this amount of data. 8Minimum version required to store current data is: `+q+`. 9`);const z=R(O,D,M),_=e.getSymbolSize(O),N=new a(_);return y(N,O),S(N),L(N,O),E(N,D,0),O>=7&&P(N,O),j(N,z),isNaN(U)&&(U=i.getBestMask(N,E.bind(null,N,D))),i.applyMask(U,N),E(N,D,U),{modules:N,version:O,errorCorrectionLevel:D,maskPattern:U,segments:M}}return _t.create=function(O,D){if(typeof O>"u"||O==="")throw new Error("No input text");let U=t.M,M,q;return typeof D<"u"&&(U=t.from(D.errorCorrectionLevel,t.M),M=u.from(D.version),q=i.from(D.maskPattern),D.toSJISFunc&&e.setToSJISFunction(D.toSJISFunc)),X(O,M,U,q)},_t}var Jt={},Yt={},Bo;function sl(){return Bo||(Bo=1,function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="str
9ing")throw new Error("Color should be defined as hex string");let a=n.slice().replace("#","").split("");if(a.length<3||a.length===5||a.length>8)throw new Error("Invalid hex color: "+n);(a.length===3||a.length===4)&&(a=Array.prototype.concat.apply([],a.map(function(d){return[d,d]}))),a.length===6&&a.push("F","F");const r=parseInt(a.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+a.slice(0,6).join("")}}e.getOptions=function(a){a||(a={}),a.color||(a.color={});const r=typeof a.margin>"u"||a.margin===null||a.margin<0?4:a.margin,d=a.width&&a.width>=21?a.width:void 0,i=a.scale||4;return{width:d,scale:d?4:i,margin:r,color:{dark:t(a.color.dark||"#000000ff"),light:t(a.color.light||"#ffffffff")},type:a.type,rendererOpts:a.rendererOpts||{}}},e.getScale=function(a,r){return r.width&&r.width>=a+r.margin*2?r.width/(a+r.margin*2):r.scale},e.getImageWidth=function(a,r){const d=e.getScale(a,r);return Math.floor((a+r.margin*2)*d)},e.qrToImageData=function(a,r,d){const i=r.modules.size,c=r.modules.data,m=e.getScale(i,d),u=Math.floor((i+d.margin*2)*m),$=d.margin*m,k=[d.color.light,d.color.dark];for(let v=0;v<u;v++)for(let y=0;y<u;y++){let S=(v*u+y)*4,L=d.color.light;if(v>=$&&y>=$&&v<u-$&&y<u-$){const P=Math.floor((v-$)/m),E=Math.floor((y-$)/m);L=k[c[P*i+E]?1:0]}a[S++]=L.r,a[S++]=L.g,a[S++]=L.b,a[S]=L.a}}}(Yt)),Yt}var Fo;function Jd(){return Fo||(Fo=1,function(e){const t=sl();function n(r,d,i){r.clearRect(0,0,d.width,d.height),d.style||(d.style={}),d.height=i,d.width=i,d.style.height=i+"px",d.style.width=i+"px"}function a(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(d,i,c){let m=c,u=i;typeof m>"u"&&(!i||!i.getContext)&&(m=i,i=void 0),i||(u=a()),m=t.getOptions(m);const $=t.getImageWidth(d.modules.size,m),k=u.getContext("2d"),v=k.createImageData($,$);return t.qrToImageData(v.data,d,m),n(k,u,$),k.putImageData(v,0,0),u},e.renderToDataURL=function(d,i,c){let m=c;typeof m>"u"&&(!i||!i.getContext)&&(m=i,i=void 0),m||(m={});const u=e.render(d,i,m),$=m.type||"image/png",k=m.rendererOpts||{};return u.toDataURL($,k.quality)}}(Jt)),Jt}var Qt={},Oo;function Yd(){if(Oo)return Qt;Oo=1;const e=sl();function t(r,d){const i=r.a/255,c=d+'="'+r.hex+'"';return i<1?c+" "+d+'-opacity="'+i.toFixed(2).slice(1)+'"':c}function n(r,d,i){let c=r+d;return typeof i<"u"&&(c+=" "+i),c}function a(r,d,i){let c="",m=0,u=!1,$=0;for(let k=0;k<r.length;k++){const v=Math.floor(k%d),y=Math.floor(k/d);!v&&!u&&(u=!0),r[k]?($++,k>0&&v>0&&r[k-1]||(c+=u?n("M",v+i,.5+y+i):n("m",m,0),m=0,u=!1),v+1<d&&r[k+1]||(c+=n("h",$),$=0)):m++}return c}return Qt.render=function(d,i,c){const m=e.getOptions(i),u=d.modules.size,$=d.modules.data,k=u+m.margin*2,v=m.color.light.a?"<path "+t(m.color.light,"fill")+' d="M0 0h'+k+"v"+k+'H0z"/>':"",y="<path "+t(m.color.dark,"stroke")+' d="'+a($,u,m.margin)+'"/>',S='viewBox="0 0 '+k+" "+k+'"',P='<svg xmlns="http://www.w3.org/2000/svg" '+(m.width?'width="'+m.width+'" height="'+m.width+'" ':"")+S+' shape-rendering="crispEdges">'+v+y+`</svg> 10`;return typeof c=="function"&&c(null,P),P},Qt}var Do;function Qd(){if(Do)return Ke;Do=1;const e=Id(),t=Gd(),n=Jd(),a=Yd();function r(d,i,c,m,u){const $=[].slice.call(arguments,1),k=$.length,v=typeof $[k-1]=="function";if(!v&&!e())throw new Error("Callback required as last argument");if(v){if(k<2)throw new Error("Too few arguments provided");k===2?(u=c,c=i,i=m=void 0):k===3&&(i.getContext&&typeof u>"u"?(u=m,m=void 0):(u=m,m=c,c=i,i=void 0))}else{if(k<1)throw new Error("Too few arguments provided");return k===1?(c=i,i=m=void 0):k===2&&!i.getContext&&(m=c,c=i,i=void 0),new Promise(function(y,S){try{const L=t.create(c,m);y(d(L,i,m))}catch(L){S(L)}})}try{const y=t.create(c,m);u(null,d(y,i,m))}catch(y){u(y)}}return Ke.create=t.create,Ke.toCanvas=r.bind(null,n.render),Ke.toDataURL=r.bind(null,n.renderToDataURL),Ke.toString=r.bind(null,function(d,i,c){return a.render(d,c)}),Ke}var Xt=Qd();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const Ro="ready";var Xd=Vl({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[Ro],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),n=()=>{this.$emit(Ro,this.$el)};switch(this.tag){case"canvas":Xt.toCanvas(this.$el,t,e,a=>{if(a)throw a;n()});break;case"img":Xt.toDataURL(t,e,(a,r)=>{if(a)throw a;this.$el.src=r,this.$el.onload=n});break;case"svg":Xt.toString(t,e,(a,r)=>{if(a)throw a;const d=document.createElement("div");d.innerHTML=r;const i=d.querySelector("svg");if(i){const{attributes:c,childNodes:m}=i;
10Object.keys(c).forEach(u=>{const $=c[Number(u)];this.$el.setAttribute($.name,$.value)}),Object.keys(m).forEach(u=>{const $=m[Number(u)];this.$el.appendChild($.cloneNode(!0))}),n()}});break}}},render(){return Tl(this.tag,this.$slots.default)}});const Zd={data:()=>({settings:{available:!1,enabled:!1,totp:!1},setupState:{state:"",setupOTPState:""},backupCodes:{getNewCodes:!1,inProgress:!1,codes:[]},otpSettings:{provisioning_uri:"",key:""},currentPassword:null,otpConfirmToken:null,error:null,readyInit:!1}),components:{"recovery-codes":$d,"totp-item":_d,qrcode:Xd,confirm:Zo},computed:{canSetupOTP(){return(this.setupInProgress&&this.backupCodesPrepared||this.settings.enabled)&&!this.settings.totp&&!this.setupOTPInProgress},setupInProgress(){return this.setupState.state!==""&&this.setupState.state!=="complete"},setupOTPInProgress(){return this.setupState.state==="setupOTP"&&!this.completedOTP},prepareOTP(){return this.setupState.setupOTPState==="prepare"},confirmOTP(){return this.setupState.setupOTPState==="confirm"},completedOTP(){return this.setupState.setupOTPState==="completed"},backupCodesPrepared(){return!this.backupCodes.inProgress&&this.backupCodes.codes.length>0},confirmNewBackupCodes(){return this.backupCodes.getNewCodes},...Be({backendInteractor:e=>e.api.backendInteractor})},methods:{activateOTP(){this.settings.enabled||(this.setupState.state="getBackupcodes",this.fetchBackupCodes())},fetchBackupCodes(){return this.backupCodes.inProgress=!0,this.backupCodes.codes=[],this.backendInteractor.generateMfaBackupCodes().then(e=>{this.backupCodes.codes=e.codes,this.backupCodes.inProgress=!1})},getBackupCodes(){this.backupCodes.getNewCodes=!0},confirmBackupCodes(){this.fetchBackupCodes().then(()=>{this.backupCodes.getNewCodes=!1})},cancelBackupCodes(){this.backupCodes.getNewCodes=!1},setupOTP(){this.setupState.state="setupOTP",this.setupState.setupOTPState="prepare",this.backendInteractor.mfaSetupOTP().then(e=>{this.otpSettings=e,this.setupState.setupOTPState="confirm"})},doConfirmOTP(){this.error=null,this.backendInteractor.mfaConfirmOTP({token:this.otpConfirmToken,password:this.currentPassword}).then(e=>{if(e.error){this.error=e.error;return}this.completeSetup()})},completeSetup(){this.setupState.setupOTPState="complete",this.setupState.state="complete",this.currentPassword=null,this.error=null,this.fetchSettings()},cancelSetup(){this.setupState.setupOTPState="",this.setupState.state="",this.currentPassword=null,this.error=null},async fetchSettings(){const e=await this.backendInteractor.settingsMFA();if(!e.error)return this.settings=e.settings,this.settings.available=!0,e}},mounted(){this.fetchSettings().then(()=>{this.readyInit=!0})}},xd={key:0,class:"setting-section mfa-settings"},eu={class:"mfa-heading"},tu={key:0,class:"setting-section"},su={key:0},ou={key:2},lu={class:"warning"},nu={key:1},au={key:0},iu={key:1},ru={class:"setup-otp"},du={class:"qr-code"},uu={class:"verify"},cu={class:"confirm-otp-actions"},pu={key:0,class:"alert error"};function mu(e,t,n,a,r,d){const i=w("totp-item"),c=w("recovery-codes"),m=w("confirm"),u=w("qrcode");return e.readyInit&&e.settings.available?(p(),g("div",xd,[s("div",eu,[s("h2",null,o(e.$t("settings.mfa.title")),1)]),s("div",null,[e.setupInProgress?V("",!0):(p(),g("div",tu,[s("h3",null,o(e.$t("settings.mfa.authentication_methods")),1),l(i,{settings:e.settings,onDeactivate:e.fetchSettings,onActivate:e.activateOTP},null,8,["settings","onDeactivate","onActivate"]),t[7]||(t[7]=s("br",null,null,-1)),e.settings.enabled?(p(),g("div",su,[e.confirmNewBackupCodes?V("",!0):(p(),H(c,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.confirmNewBackupCodes?V("",!0):(p(),g("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=(...$)=>e.getBackupCodes&&e.getBackupCodes(...$))},o(e.$t("settings.mfa.generate_new_recovery_codes")),1)),e.confirmNewBackupCodes?(p(),g("div",ou,[l(m,{disabled:e.backupCodes.inProgress,onConfirm:e.confirmBackupCodes,onCancel:e.cancelBackupCodes},{default:h(()=>[s("p",lu,o(e.$t("settings.mfa.warning_of_generate_new_codes")),1)]),_:1},8,["disabled","onConfirm","onCancel"])])):V("",!0)])):V("",!0)])),e.setupInProgress?(p(),g("div",nu,[s("h3",null,o(e.$t("settings.mfa.setup_otp")),1
10),e.setupOTPInProgress?V("",!0):(p(),H(c,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.canSetupOTP?(p(),g("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=(...$)=>e.cancelSetup&&e.cancelSetup(...$))},o(e.$t("general.cancel")),1)):V("",!0),e.canSetupOTP?(p(),g("button",{key:2,class:"btn button-default",onClick:t[2]||(t[2]=(...$)=>e.setupOTP&&e.setupOTP(...$))},o(e.$t("settings.mfa.setup_otp")),1)):V("",!0),e.setupOTPInProgress?(p(),g(Y,{key:3},[e.prepareOTP?(p(),g("i",au,o(e.$t("settings.mfa.wait_pre_setup_otp")),1)):V("",!0),e.confirmOTP?(p(),g("div",iu,[s("div",ru,[s("div",du,[s("h4",null,o(e.$t("settings.mfa.scan.title")),1),s("p",null,o(e.$t("settings.mfa.scan.desc")),1),l(u,{value:e.otpSettings.provisioning_uri,options:{width:200}},null,8,["value"]),s("p",null,o(e.$t("settings.mfa.scan.secret_code"))+": "+o(e.otpSettings.key),1)]),s("div",uu,[s("h4",null,o(e.$t("general.verify")),1),s("p",null,o(e.$t("settings.mfa.verify.desc")),1),te(s("input",{"onUpdate:modelValue":t[3]||(t[3]=$=>e.otpConfirmToken=$),type:"text",class:"input"},null,512),[[ae,e.otpConfirmToken]]),s("p",null,o(e.$t("settings.enter_current_password_to_confirm"))+":",1),te(s("input",{"onUpdate:modelValue":t[4]||(t[4]=$=>e.currentPassword=$),type:"password",class:"input"},null,512),[[ae,e.currentPassword]]),s("div",cu,[s("button",{class:"btn button-default",onClick:t[5]||(t[5]=(...$)=>e.doConfirmOTP&&e.doConfirmOTP(...$))},o(e.$t("settings.mfa.confirm_and_enable")),1),s("button",{class:"btn button-default",onClick:t[6]||(t[6]=(...$)=>e.cancelSetup&&e.cancelSetup(...$))},o(e.$t("general.cancel")),1)]),e.error?(p(),g("div",pu,o(e.error),1)):V("",!0)])])])):V("",!0)],64)):V("",!0)])):V("",!0)])])):V("",!0)}const hu=G(Zd,[["render",mu]]),fu={data(){return{newEmail:"",changeEmailError:!1,changeEmailPassword:"",changedEmail:!1,deletingAccount:!1,deleteAccountConfirmPasswordInput:"",deleteAccountError:!1,changePasswordInputs:["","",""],changedPassword:!1,changePasswordError:!1,moveAccountTarget:"",moveAccountPassword:"",movedAccount:!1,moveAccountError:!1,aliases:[],listAliasesError:!1,addAliasTarget:"",addedAlias:!1,addAliasError:!1}},created(){tt().fetchTokens(),this.fetchAliases()},components:{ProgressButton:ts,Mfa:hu,Checkbox:ue},computed:{user(){return this.$store.state.users.currentUser},pleromaExtensionsAvailable(){return this.$store.state.instance.pleromaExtensionsAvailable},oauthTokens(){return tt().tokens.map(e=>({id:e.id,appName:e.app_name,validUntil:new Date(e.valid_until).toLocaleDateString(ns.internalToBrowserLocale(this.$i18n.locale))}))}},methods:{confirmDelete(){this.deletingAccount=!0},deleteAccount(){this.$store.state.api.backendInteractor.deleteAccount({password:this.deleteAccountConfirmPasswordInput}).then(e=>{e.status==="success"?(this.$store.dispatch("logout"),this.$router.push({name:"root"})):this.deleteAccountError=e.error})},changePassword(){const e={password:this.changePasswordInputs[0],newPassword:this.changePasswordInputs[1],newPasswordConfirmation:this.changePasswordInputs[2]};this.$store.state.api.backendInteractor.changePassword(e).then(t=>{t.status==="success"?(this.changedPassword=!0,this.changePasswordError=!1,this.logout()):(this.changedPassword=!1,this.changePasswordError=t.error)})},changeEmail(){const e={email:this.newEmail,password:this.changeEmailPassword};this.$store.state.api.backendInteractor.changeEmail(e).then(t=>{t.status==="success"?(this.changedEmail=!0,this.changeEmailError=!1):(this.changedEmail=!1,this.changeEmailError=t.error)})},moveAccount(){const e={targetAccount:this.moveAccountTarget,password:this.moveAccountPassword};this.$store.state.api.backendInteractor.moveAccount(e).then(t=>{t.status==="success"?(this.movedAccount=!0,this.moveAccountError=!1):(this.movedAccount=!1,this.moveAccountError=t.error)})},removeAlias(e){this.$store.state.api.backendInteractor.deleteAlias({alias:e}).then(()=>this.fetchAliases())},addAlias(){this.$store.state.api.backendInteractor.addAlias({alias:this.addAliasTarget}).then(()=>{this.addedAlias=!0,this.addAliasError=!1,this.addAliasTarget=""}).catch(e=>{this.addedAlias=!1,this.addAliasError=e}).then(()=>this.fetchAliases())},fetchAliases(){this.$store.state.api.backendInteractor.listAliases().then(e=>{this.aliases=e.aliases,this.listAliasesError=!1}
10).catch(e=>{this.listAliasesError=e.error})},logout(){this.$store.dispatch("logout"),this.$router.replace("/")},revokeToken(e){window.confirm(`${this.$i18n.t("settings.revoke_token")}?`)&&tt().revokeToken(e)}}},gu=["label"],bu={class:"setting-section"},vu={class:"setting-list"},$u={key:0},yu={class:"setting-section"},ku={class:"setting-list"},wu={key:0},Cu={key:1},Vu={key:2},Tu={class:"setting-section"},Su={class:"actions"},Lu=["onClick"],Pu={key:0,class:"alert error"},_u={key:1},Iu={key:2},Eu={class:"setting-section"},Uu={class:"oauth-tokens"},Au={class:"actions"},Bu=["onClick"],Fu={class:"setting-section"},Ou={key:0},Du={key:1},Ru={class:"setting-section"},Mu={key:0},Nu={key:1},ju={key:2},qu={key:3};function zu(e,t,n,a,r,d){const i=w("FAIcon"),c=w("i18n-t"),m=w("mfa");return p(),g("div",{label:e.$t("settings.security_tab")},[s("div",bu,[s("h3",null,o(e.$t("settings.change_email")),1),s("ul",vu,[s("li",null,[s("h4",null,o(e.$t("settings.new_email")),1),te(s("input",{"onUpdate:modelValue":t[0]||(t[0]=u=>e.newEmail=u),type:"email",autocomplete:"email",class:"input"},null,512),[[ae,e.newEmail]])]),s("li",null,[s("h4",null,o(e.$t("settings.current_password")),1),te(s("input",{"onUpdate:modelValue":t[1]||(t[1]=u=>e.changeEmailPassword=u),type:"password",autocomplete:"current-password",class:"input"},null,512),[[ae,e.changeEmailPassword]])]),s("li",null,[s("button",{class:"btn button-default",onClick:t[2]||(t[2]=(...u)=>e.changeEmail&&e.changeEmail(...u))},o(e.$t("settings.save")),1)]),s("li",null,[e.changedEmail?(p(),g("p",$u,o(e.$t("settings.changed_email")),1)):V("",!0),e.changeEmailError!==!1?(p(),g(Y,{key:1},[s("p",null,o(e.$t("settings.change_email_error")),1),s("p",null,o(e.changeEmailError),1)],64)):V("",!0)])])]),s("div",yu,[s("h3",null,o(e.$t("settings.change_password")),1),s("ul",ku,[s("li",null,[s("h4",null,o(e.$t("settings.current_password")),1),te(s("input",{"onUpdate:modelValue":t[3]||(t[3]=u=>e.changePasswordInputs[0]=u),type:"password",class:"input"},null,512),[[ae,e.changePasswordInputs[0]]])]),s("li",null,[s("h4",null,o(e.$t("settings.new_password")),1),te(s("input",{"onUpdate:modelValue":t[4]||(t[4]=u=>e.changePasswordInputs[1]=u),type:"password",class:"input"},null,512),[[ae,e.changePasswordInputs[1]]])]),s("li",null,[s("h4",null,o(e.$t("settings.confirm_new_password")),1),te(s("input",{"onUpdate:modelValue":t[5]||(t[5]=u=>e.changePasswordInputs[2]=u),type:"password",class:"input"},null,512),[[ae,e.changePasswordInputs[2]]])]),s("li",null,[s("button",{class:"btn button-default",onClick:t[6]||(t[6]=(...u)=>e.changePassword&&e.changePassword(...u))},o(e.$t("settings.save")),1)]),s("li",null,[e.changedPassword?(p(),g("p",wu,o(e.$t("settings.changed_password")),1)):e.changePasswordError!==!1?(p(),g("p",Cu,o(e.$t("settings.change_password_error")),1)):V("",!0),e.changePasswordError?(p(),g("p",Vu,o(e.changePasswordError),1)):V("",!0)])])]),s("div",Tu,[s("h3",null,o(e.$t("settings.account_alias")),1),s("table",null,[s("thead",null,[s("tr",null,[s("th",null,o(e.$t("settings.account_alias_table_head")),1),t[16]||(t[16]=s("th",null,null,-1))])]),s("tbody",null,[(p(!0),g(Y,null,ee(e.aliases,u=>(p(),g("tr",{key:u},[s("td",null,o(u),1),s("td",Su,[s("button",{class:"btn button-default",onClick:$=>e.removeAlias(u)},o(e.$t("settings.remove_alias")),9,Lu)])]))),128))])]),e.listAliasesError?(p(),g("div",Pu,[b(o(e.$t("settings.list_aliases_error",{error:e.error}))+" ",1),l(i,{class:"fa-scale-110 fa-old-padding",icon:"times",title:e.$t("settings.hide_list_aliases_error_action"),onClick:t[7]||(t[7]=u=>e.listAliasesError=!1)},null,8,["title"])])):V("",!0),s("div",null,[l(c,{scope:"global",keypath:"settings.new_alias_target",tag:"p"},{default:h(()=>[...t[17]||(t[17]=[s("code",{place:"example"}," [email protected] ",-1)])]),_:1}),te(s("input",{"onUpdate:modelValue":t[8]||(t[8]=u=>e.addAliasTarget=u),class:"input"},null,512),[[ae,e.addAliasTarget]])]),s("button",{class:"btn button-default",onClick:t[9]||(t[9]=(...u)=>e.addAlias&&e.addAlias(...u))},o(e.$t("settings.save")),1),e.addedAlias?(p(),g("p",_u,o(e.$t("settings.added_alias")),1)):V("",!0),e.addAliasError!==!1?(p(),g("p",Iu,o(e.$t("settings.add_alias_error",{error:e.addAliasError})),1)):V("",!0)]),s("div",Eu,[s("h3",null,o(e.$t("settings.oauth_tokens")),1),s("table",Uu,[s("thead",null,[s("tr",null,[s("th",null,o(e.$t("settings.app_name")),1),s("th",null,o(e.$t("settings.val
10id_until")),1),t[18]||(t[18]=s("th",null,null,-1))])]),s("tbody",null,[(p(!0),g(Y,null,ee(e.oauthTokens,u=>(p(),g("tr",{key:u.id},[s("td",null,o(u.appName),1),s("td",null,o(u.validUntil),1),s("td",Au,[s("button",{class:"btn button-default",onClick:$=>e.revokeToken(u.id)},o(e.$t("settings.revoke_token")),9,Bu)])]))),128))])])]),l(m),s("div",Fu,[s("h3",null,o(e.$t("settings.move_account")),1),s("p",null,o(e.$t("settings.move_account_notes")),1),s("div",null,[l(c,{keypath:"settings.move_account_target",tag:"p",scope:"global"},{example:h(()=>[...t[19]||(t[19]=[s("code",null," [email protected] ",-1)])]),_:1}),te(s("input",{"onUpdate:modelValue":t[10]||(t[10]=u=>e.moveAccountTarget=u),class:"input"},null,512),[[ae,e.moveAccountTarget]])]),s("div",null,[s("p",null,o(e.$t("settings.current_password")),1),te(s("input",{"onUpdate:modelValue":t[11]||(t[11]=u=>e.moveAccountPassword=u),type:"password",autocomplete:"current-password",class:"input"},null,512),[[ae,e.moveAccountPassword]])]),s("button",{class:"btn button-default",onClick:t[12]||(t[12]=(...u)=>e.moveAccount&&e.moveAccount(...u))},o(e.$t("settings.save")),1),e.movedAccount?(p(),g("p",Ou,o(e.$t("settings.moved_account")),1)):V("",!0),e.moveAccountError!==!1?(p(),g("p",Du,o(e.$t("settings.move_account_error",{error:e.moveAccountError})),1)):V("",!0)]),s("div",Ru,[s("h3",null,o(e.$t("settings.delete_account")),1),e.deletingAccount?V("",!0):(p(),g("p",Mu,o(e.$t("settings.delete_account_description")),1)),e.deletingAccount?(p(),g("div",Nu,[s("p",null,o(e.$t("settings.delete_account_instructions")),1),s("p",null,o(e.$t("login.password")),1),te(s("input",{"onUpdate:modelValue":t[13]||(t[13]=u=>e.deleteAccountConfirmPasswordInput=u),type:"password",class:"input"},null,512),[[ae,e.deleteAccountConfirmPasswordInput]]),s("button",{class:"btn button-default",onClick:t[14]||(t[14]=(...u)=>e.deleteAccount&&e.deleteAccount(...u))},o(e.$t("settings.delete_account")),1)])):V("",!0),e.deleteAccountError!==!1?(p(),g("p",ju,o(e.$t("settings.delete_account_error")),1)):V("",!0),e.deleteAccountError?(p(),g("p",qu,o(e.deleteAccountError),1)):V("",!0),e.deletingAccount?V("",!0):(p(),g("button",{key:4,class:"btn button-default",onClick:t[15]||(t[15]=(...u)=>e.confirmDelete&&e.confirmDelete(...u))},o(e.$t("settings.delete_account")),1))])],8,gu)}const Hu=G(fu,[["render",zu]]);pe.add(vt,qo,bt);const Wu={data(){return{locked:this.$store.state.users.currentUser.locked}},components:{UserCard:Sl,Checkbox:ue,BooleanSetting:we,ProfileSettingIndicator:Ye},computed:{user(){return this.$store.state.users.currentUser},...ke()},methods:{updateProfile(){const e={locked:this.locked};this.$store.state.api.backendInteractor.updateProfile({params:e}).then(t=>{this.$store.commit("addNewUsers",[t]),this.$store.commit("setCurrentUser",t)}).catch(t=>{this.displayUploadError(t)})}},watch:{locked(){this.updateProfile()}}},Ku={class:"profile-tab"},Gu={class:"setting-section profile-edit"},Ju={class:"setting-section"},Yu={class:"setting-list"},Qu={class:"setting-item"},Xu={class:"setting-list suboptions"},Zu={class:"setting-list suboptions"};function xu(e,t,n,a,r,d){const i=w("UserCard"),c=w("ProfileSettingIndicator"),m=w("Checkbox"),u=w("BooleanSetting");return p(),g("div",Ku,[s("div",Gu,[l(i,{"user-id":e.user.id,editable:!0,switcher:!1},null,8,["user-id"])]),s("div",Ju,[s("h3",null,o(e.$t("settings.account_privacy")),1),s("ul",Yu,[s("li",null,[s("div",Qu,[l(m,{modelValue:e.locked,"onUpdate:modelValue":t[0]||(t[0]=$=>e.locked=$),class:"setting-label setting-control custom-boolean-setting"},{default:h(()=>[l(c,{"is-profile":!0}),b(" "+o(e.$t("settings.lock_account_description")),1)]),_:1},8,["modelValue"])])]),s("li",null,[l(u,{source:"profile",path:"discoverable"},{default:h(()=>[b(o(e.$t("settings.discoverable")),1)]),_:1})]),s("li",null,[l(u,{source:"profile",path:"allowFollowingMove"},{default:h(()=>[b(o(e.$t("settings.allow_following_move")),1)]),_:1})]),s("li",null,[l(u,{source:"profile",path:"hideFavorites"},{default:h(()=>[b(o(e.$t("settings.hide_favorites_description")),1)]),_:1})]),s("li",null,[l(u,{source:"profile",path:"hideFollowers"},{default:h(()=>[b(o(e.$t("settings.hide_followers_description")),1)]),_:1}),s("ul",Xu,[s("li",null,[l(u,{source:"profile",path:"hideFollowersCount","parent-path":"hideFollowers"},{default:h(()=>[b(o(e.$t("settings.hide_followers_count_description")),1)]),_:1})])])]),s("li",null,[l(u,{source:"profile",path:"hideFollows"},{default:h(()=>[b(o(e.$t("settings.hide_follows_description")),1)]),_:1}),s("ul",Zu,[s("li",null,[l(u,{source:"profile",path:"hideFollowsCount","parent-path":"hideFollows"},{default:h(()=>[b(o(e.$t("settings.hide_follows_count_description")),1)]),_:1})])])])])])])}const ec=G(Wu,[["render",xu]]),tc={components:{NumberSetting:il}};function sc(e,t,n,a,r,d){const i=w("NumberSetting");return p(),H(i,Ll(Pl(e.$attrs)),{default:h(()=>[Pe(e.$slots,"default")]),_:3},16)}const ds=G(tc,[["render",sc]]);pe.add(zo,_l,Il);const oc={components:{Select:_e,Checkbox:ue,Popover:yt},props:["name","label","modelValue","fallback","options","no-inherit"],mounted(){Q().queryLocalFonts()},emits:["update:modelValue"],data(){return{manualEntry:!1,availableOptions:[this.noInherit?"":"inherit","serif","sans-serif","monospace",...this.options||[]].filter(e=>e)}},methods:{toggleManualEntry(){this.manualEntry=!this.manualEntry}},computed:{present(){return typeof this.modelValue<"u"},localFontsList(){return Q().localFonts},localFontsSize(){var e;return(e=Q().localFonts)==null?void 0:e.length}}},lc={class:"font-control"},nc={class:"setting-item"},ac={key:0,class:"font-input setting-item"},ic=["id","for"],rc=["id","for"],dc={key:2,class:"btn-group"},uc=["title"],cc=["id","model-value"],pc={key:3,class:"font-selector btn-group"},mc=["title"],hc=["label"],fc=["value"],gc=["label"],bc=["value"],vc=["label"],$c={disabled:""},yc={disabled:""};function kc(e,t,n,a,r,d){var $,k;const i=w("i18n-t"),c=w("Checkbox"),m=w("FAIcon"),u=w("Select");return p(),g("div",lc,[s("div",nc,[typeof e.fallback<"u"?(p(),H(c,{key:0,id:e.name+"-o",class:"font-checkbox setting-control setting-label","model-value":e.present,onChange:t[0]||(t[0]=v=>e.$emit("update:modelValue",typeof e.modelValue>"u"?e.fallback:void 0))},{default:h(()=>[l(i,{scope:"global",keypath:"settings.style.fonts.override",tag:"span"},{default:h(()=>[s("span",null,o(e.label),1)]),_:1})]),_:1}
10,8,["id","model-value"])):V("",!0)]),t[7]||(t[7]=b(" "+o(" ")+" ",-1)),($=e.modelValue)!=null&&$.family?(p(),g("div",ac,[e.manualEntry?(p(),g("label",{key:0,id:e.name+"-label",for:e.manualEntry?e.name:e.name+"-font-switcher",class:"label"},[l(i,{keypath:"settings.style.themes3.font.entry",tag:"span",scope:"global"},{fontFamily:h(()=>[...t[5]||(t[5]=[s("code",null,"font-family",-1)])]),_:1})],8,ic)):(p(),g("label",{key:1,id:e.name+"-label",for:e.manualEntry?e.name:e.name+"-font-switcher",class:"label"},o(e.$t("settings.style.themes3.font.select")),9,rc)),t[6]||(t[6]=b(" "+o(" ")+" ",-1)),e.manualEntry?(p(),g("span",dc,[s("button",{class:"btn button-default",title:e.$t("settings.style.themes3.font.lookup_local_fonts"),onClick:t[1]||(t[1]=(...v)=>e.toggleManualEntry&&e.toggleManualEntry(...v))},[l(m,{"fixed-width":"",icon:"font"})],8,uc),s("input",{id:e.name,"model-value":e.modelValue.family,class:"input custom-font",type:"text","on:update:modelValue":t[2]||(t[2]=v=>e.$emit("update:modelValue",{...e.modelValue||{},family:v.target.value}))},null,40,cc)])):(p(),g("span",pc,[s("button",{class:"btn button-default",title:e.$t("settings.style.themes3.font.enter_manually"),onClick:t[3]||(t[3]=(...v)=>e.toggleManualEntry&&e.toggleManualEntry(...v))},[l(m,{"fixed-width":"",icon:"keyboard"})],8,mc),l(u,{id:e.name+"-local-font-switcher","model-value":(k=e.modelValue)==null?void 0:k.family,class:"custom-font","onUpdate:modelValue":t[4]||(t[4]=v=>e.$emit("update:modelValue",{...e.modelValue||{},family:v}))},{default:h(()=>[s("optgroup",{label:e.$t("settings.style.themes3.font.group-builtin")},[(p(!0),g(Y,null,ee(e.availableOptions,v=>(p(),g("option",{key:v,value:v,style:Je({fontFamily:v==="inherit"?null:v})},o(e.$t("settings.style.themes3.font.builtin."+v)),13,fc))),128))],8,hc),e.localFontsSize>0?(p(),g("optgroup",{key:0,label:e.$t("settings.style.themes3.font.group-local")},[(p(!0),g(Y,null,ee(e.localFontsList,v=>(p(),g("option",{key:v,value:v,style:Je({fontFamily:v})},o(v),13,bc))),128))],8,gc)):(p(),g("optgroup",{key:1,label:e.$t("settings.style.themes3.font.group-local")},[s("option",$c,o(e.$t("settings.style.themes3.font.local-unavailable1")),1),s("option",yc,o(e.$t("settings.style.themes3.font.local-unavailable2")),1)],8,vc))]),_:1},8,["id","model-value"])]))])):V("",!0)])}const Vt=G(oc,[["render",kc]]),wc={props:{parentCollapsed:{required:!0,type:Boolean}},data(){return{absoluteTime12hOptions:["24h","12h"].map(e=>({key:e,value:e,label:this.$t(`settings.absolute_time_format_12h_${e}`)})),emailLanguage:this.$store.state.users.currentUser.language||[""]}},components:{BooleanSetting:we,ChoiceSetting:Re,UnitSetting:Xe,FloatSetting:ds,FontControl:Vt,InterfaceLanguageSwitcher:Ho,ProfileSettingIndicator:Ye},computed:{language:{get:function(){return this.$store.getters.mergedConfig.interfaceLanguage},set:function(e){this.$store.dispatch("setOption",{name:"interfaceLanguage",value:e})}},...ke(),...Be({blockExpirationSupported:e=>e.instance.blockExpiration})},methods:{updateProfile(){const e={language:ns.internalToBackendLocaleMulti(this.emailLanguage)};this.$store.state.api.backendInteractor.updateProfile({params:e}).then(t=>{this.$store.commit("addNewUsers",[t]),this.$store.commit("setCurrentUser",t)})},updateFont(e,t){this.$store.dispatch("setOption",{name:"theme3hacks",value:{...this.mergedConfig.theme3hacks,fonts:{...this.mergedConfig.theme3hacks.fonts,[e]:t}}})}}},Cc={class:"setting-section"},Vc={class:"setting-list"},Tc={class:"setting-list"},Sc={class:"sidenote"},Lc={class:"setting-list suboptions"},Pc={class:"setting-list"},_c={class:"setting-list suboptions"},Ic={key:0},Ec={key:1,class:"setting-list"},Uc={class:"select-multiple"},Ac={class:"label"},Bc={class:"option-list"},Fc={key:0};function Oc(e,t,n,a,r,d){const i=w("interface-language-switcher"),c=w("ProfileSettingIndicator"),m=w("BooleanSetting"),u=w("ChoiceSetting"),$=w("UnitSetting"),k=w("i18n-t"),v=w("FontControl"),y=w("FloatSetting");return p(),g("div",null,[s("div",Cc,[s("h3",null,o(e.$t("settings.format_and_language")),1),s("ul",Vc,[s("h4",null,o(e.$t("settings.interfaceLanguage")),1),l(i,{modelValue:e.language,"onUpdate:modelValue":t[0]||(t[0]=S=>e.language=S),class:"lang-selector",onUpdate:t[1]||(t[1]=S=>e.language=S)},null,8,["modelValue"]),s("h4",null,[b(o(e.$t("settings.email_language"))+" "+o(" ")+" ",1),l(c,{"is-profile":!0})]),l(i,{modelValue:e.emailLanguage,"onUpdate:modelValue":[t[2]||(t[2]=S=>e.emailLanguage=S),t[3]||(t[3]=S=>e.updateProfile())],class:"lang-selector",profile:!0},null,8,["modelValue"]),s("li",null,[l(m,{path:"useAbsoluteTimeFormat"},{default:h(()=>[b(o(e.$t("settings.absolute_time_format")),1)]),_:1})]),s("li",null,[l(u,{id:"absoluteTime12h",path:"absoluteTime12h",options:e.absoluteTime12hOptions},{default:h(()=>[b(o(e.$t("settings.absolute_time_format_12h")),1)]),_:1},8,["options"])])]),s("h3",null,o(e.$t("settings.scale_and_font")),1),s("ul",Tc,[s("li",null,[l($,{path:"textSize",step:.1,units:["px","rem"],"reset-default":{px:14,rem:1},"timed-apply-mode":""},{default:h(()=>[b(o(e.$t("settings.text_size")),1)]),_:1}),s("p",Sc,[l(k,{scope:"global",keypath:"settings.text_size_tip",tag:"span"},{default:h(()=>[...t[6]||(t[6]=[s("code",null,"px",-1),s("code",null,"rem",-1)])]),_:1}),t[8]||(t[8]=s("br",null,null,-1)),l(k,{scope:"global",keypath:"settings.text_size_tip2",tag:"span"},{default:h(()=>[...t[7]||(t[7]=[s("code",null,"14px",-1)])]),_:1})])]),s("li",null,[l(v,{"model-value":e.mergedConfig.theme3hacks.fonts.interface,name:"ui",label:e.$t("settings.style.fonts.components_inline.interface"),fallback:{family:"sans-serif"},"no-inherit":"1","onUpdate:modelValue":t[4]||(t[4]=S=>e.updateFont("interface",S))},null,8,["model-value","label"])]),s("li",null,[l(v,{"model-value":e.mergedConfig.theme3hacks.fonts.input,n
10ame:"input",fallback:{family:"inherit"},label:e.$t("settings.style.fonts.components_inline.input"),"onUpdate:modelValue":t[5]||(t[5]=S=>e.updateFont("input",S))},null,8,["model-value","label"])]),s("li",null,[l($,{path:"emojiSize",step:.1,units:["px","rem"],"reset-default":{px:32,rem:2.2}},{default:h(()=>[b(o(e.$t("settings.emoji_size")),1)]),_:1}),s("ul",Lc,[s("li",null,[e.user?(p(),H(y,{key:0,path:"emojiReactionsScale"},{default:h(()=>[b(o(e.$t("settings.emoji_reactions_scale")),1)]),_:1})):V("",!0)])])])]),s("h3",null,o(e.$t("settings.timelines")),1),s("ul",Pc,[s("li",null,[l(m,{path:"streaming"},{default:h(()=>[b(o(e.$t("settings.streaming")),1)]),_:1}),s("ul",_c,[s("li",null,[l(m,{path:"pauseOnUnfocused","parent-path":"streaming"},{default:h(()=>[b(o(e.$t("settings.pause_on_unfocused")),1)]),_:1})])])]),s("li",null,[l(m,{path:"useStreamingApi",expert:"1"},{default:h(()=>[b(o(e.$t("settings.useStreamingApi")),1)]),_:1})])]),e.expertLevel>0?(p(),g("h3",Ic,o(e.$t("settings.confirmations")),1)):V("",!0),e.expertLevel>0?(p(),g("ul",Ec,[s("li",Uc,[s("h4",Ac,o(e.$t("settings.confirm_dialogs")),1),s("ul",Bc,[s("li",null,[l(m,{path:"modalOnRepeat"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_repeat")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnUnfollow"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_unfollow")),1)]),_:1})]),e.blockExpirationSupported?V("",!0):(p(),g("li",Fc,[l(m,{path:"modalOnBlock"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_block")),1)]),_:1})])),s("li",null,[l(m,{path:"modalOnMuteConversation"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_mute_conversation")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnMuteDomain"},{default:h(()=>
10[b(o(e.$t("settings.confirm_dialogs_mute_domain")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnDelete"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_delete")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnLogout"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_logout")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnApproveFollow"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_approve_follow")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnDenyFollow"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_deny_follow")),1)]),_:1})]),s("li",null,[l(m,{path:"modalOnRemoveUserFromFollowers"},{default:h(()=>[b(o(e.$t("settings.confirm_dialogs_remove_follower")),1)]),_:1})])])])])):V("",!0)])])}const Dc=G(wc,[["render",Oc]]),Rc={props:{parentCollapsed:{required:!0,type:Boolean}},data(){return{conversationDisplayOptions:["tree","linear"].map(e=>({key:e,value:e,label:this.$t(`settings.conversation_display_${e}`)})),conversationOtherRepliesButtonOptions:["below","inside"].map(e=>({key:e,value:e,label:this.$t(`settings.conversation_other_replies_button_${e}`)})),mentionLinkDisplayOptions:["short","full_for_remote","full"].map(e=>({key:e,value:e,label:this.$t(`settings.mention_link_display_${e}`)})),userPopoverAvatarActionOptions:["close","zoom","open"].map(e=>({key:e,value:e,label:this.$t(`settings.user_popover_avatar_action_${e}`)})),unsavedPostActionOptions:["save","discard","confirm"].map(e=>({key:e,value:e,label:this.$t(`settings.unsaved_post_action_${e}`)})),loopSilentAvailable:Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype,"mozHasAudio")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"webkitAudioDecodedByteCount")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"audioTracks")}},components:{BooleanSetting:we,ChoiceSetting:Re,IntegerSetting:ot,FontControl:Vt,ProfileSettingIndicator:Ye},computed:{...ke()},methods:{updateFont(e,t){this.$store.dispatch("setOption",{name:"theme3hacks",value:{...this.mergedConfig.theme3hacks,fonts:{...this.mergedConfig.theme3hacks.fonts,[e]:t}}})}}},Mc={class:"posts-tab"},Nc={class:"setting-section"},jc={class:"setting-list"},qc={key:0,class:"setting-list suboptions"},zc={class:"greentext"},Hc={class:"setting-list"},Wc={class:"setting-list suboptions"},Kc={key:0},Gc={key:1,class:"setting-list suboptions"},Jc={class:"setting-list"},Yc={class:"setting-list suboptions"},Qc={class:"setting-list suboptions"},Xc={key:0,class:"unavailable"},Zc={key:0},xc={key:1,class:"setting-list"},ep={key:0};function tp(e,t,n,a,r,d){const i=w("BooleanSetting"),c=w("ChoiceSetting"),m=w("IntegerSetting"),u=w("FontControl"),$=w("i18n-t"),k=w("UnitSetting"),v=w("FAIcon");return p(),g("div",Mc,[s("div",Nc,[s("h3",null,o(e.$t("settings.posts_appearance")),1),s("ul",jc,[s("li",null,[l(i,{path:"collapseMessageWithSubject"},{default:h(()=>[b(o(e.$t("settings.collapse_subject")),1)]),_:1})]),s("li",null,[l(c,{id:"conversationDisplay",path:"conversationDisplay",options:e.conversationDisplayOptions},{default:h(()=>[b(o(e.$t("settings.conversation_display")),1)]),_:1},8,["options"]),e.mergedConfig.conversationDisplay!=="linear"?(p(),g("ul",qc,[s("li",null,[l(i,{path:"conversationTreeAdvanced"},{default:h(()=>[b(o(e.$t("settings.tree_advanced")),1)]),_:1})]),s("li",null,[l(i,{path:"conversationTreeFadeAncestors",expert:1},{default:h(()=>[b(o(e.$t("settings.tree_fade_ancestors")),1)]),_:1})]),s("li",null,[l(m,{path:"maxDepthInThread",min:3,expert:1},{default:h(()=>[b(o(e.$t("settings.max_depth_in_thread")),1)]),_:1})]),s("li",null,[l(c,{id:"conversationOtherRepliesButton",path:"conversationOtherRepliesButton",options:e.conversationOtherRepliesButtonOptions,expert:1},{default:h(()=>[b(o(e.$t("settings.conversation_other_replies_button")),1)]),_:1},8,["options"])])])):V("",!0)]),s("li",null,[l(u,{"model-value":e.mergedConfig.theme3hacks.fonts.post,name:"post",fallback:{family:"inherit"},label:e.$t("settings.style.fonts.components.post"),"onUpdate:modelValue":t[0]||(t[0]=y=>e.updateFont("post",y))},null,8,["model-value","label"])]),s("li",null,[l(u,{"model-value":e.mergedConfig.theme3hacks.fonts.monospace,name:"postCode",fallback:{family:"monospace"},label:e.$t("settings.style.fonts.components.monospace"),"onUpdate:modelValue":t[1]||(t[1]=y=>e.updateFont("monospace",y))},null,8,["model-value","label"])]),s("li",null,[l(i,{path:"greentext"},{default:h(()=>[l($,{keypath:"settings.plaintext_quotes",tag:"span"},{default:h(()=>[s("span",zc,o(e.$t("settings.greentext_quotes")),1)]),_:1})]),_:1})]),s("li",null,[l(i,{path:"emojiReactionsOnTimeline",expert:"1"},{default:h(()=>[b(o(e.$t("settings.emoji_reactions_on_timeline")),1)]),_:1})])]),s("h3",null,o(e.$t("settings.mention_links")),1),s("ul",Hc,[s("li",null,[l(c,{id:"mentionLinkDisplay",path:"mentionLinkDisplay",options:e.mentionLinkDisplayOptions},{default:h(()=>[b(o(e.$t("settings.mention_link_display")),1)]),_:1},8,["options"]),s("ul",Wc,[s("li",null,[e.mergedConfig.mentionLinkDisplay!=="short"?(p(),H(i,{key:0,path:"mentionLinkFadeDomain"},{default:h(()=>
10[b(o(e.$t("settings.mention_link_fade_domain")),1)]),_:1})):V("",!0)])])]),s("li",null,[l(i,{path:"mentionLinkShowTooltip",expert:"1"},{default:h(()=>[b(o(e.$t("settings.mention_link_use_tooltip")),1)]),_:1})]),s("li",null,[l(i,{path:"mentionLinkShowAvatar"},{default:h(()=>[b(o(e.$t("settings.mention_link_show_avatar")),1)]),_:1})]),e.user?(p(),g("li",Kc,[l(i,{path:"mentionLinkBoldenYou",expert:"1"},{default:h(()=>[b(o(e.$t("settings.mention_link_bolden_you")),1)]),_:1})])):V("",!0),s("li",null,[e.user?(p(),H(i,{key:0,source:"profile",path:"stripRichContent",expert:"1"},{default:h(()=>[b(o(e.$t("settings.no_rich_text_description")),1)]),_:1})):V("",!0),e.mergedConfig.useAbsoluteTimeFormat?(p(),g("ul",Gc,[s("li",null,[l(k,{path:"absoluteTimeFormatMinAge","unit-set":"time",units:["s","m","h","d"],min:0},{default:h(()=>[b(o(e.$t("settings.absolute_time_format_min_age")),1)]),_:1})])])):V("",!0)])]),s("h3",null,o(e.$t("settings.attachments")),1),s("ul",Jc,[s("li",null,[l(i,{path:"stopGifs"},{default:h(()=>[b(o(e.$t("settings.stop_gifs")),1)]),_:1})]),s("li",null,[l(i,{path:"hideNsfw"},{default:h(()=>[b(o(e.$t("settings.nsfw_clickthrough")),1)]),_:1}),s("ul",Yc,[s("li",null,[l(i,{path:"preloadImage",expert:"1","parent-path":"hideNsfw"},{default:h(()=>[b(o(e.$t("settings.preload_images")),1)]),_:1})]),s("li",null,[l(i,{path:"useOneClickNsfw",expert:"1","parent-path":"hideNsfw"},{default:h(()=>[b(o(e.$t("settings.use_one_click_nsfw")),1)]),_:1})])])]),s("li",null,[l(i,{path:"loopVideo",expert:"1"},{default:h(()=>[b(o(e.$t("settings.loop_video")),1)]),_:1}),s("ul",Qc,[s("li",null,[l(i,{path:"loopVideoSilentOnly",expert:"1","parent-path":"loopVideo",disabled:!e.loopSilentAvailable},{default:h(()=>[b(o(e.$t("settings.loop_video_silent_only")),1)]),_:1},8,["disabled"]),e.loopSilentAvailable?V("",!0):(p(),g("div",Xc,[l(v,{icon:"globe"}),b("! "+o(e.$t("settings.limited_availability")),1)]))])])]),s("li",null,[l(i,{path:"playVideosInModal",expert:"1"},{default:h(()=>[b(o(e.$t("settings.play_videos_in_modal")),1)]),_:1})]),s("li",null,[l(i,{path:"useContainFit",expert:"1"},{default:h(()=>[b(o(e.$t("settings.use_contain_fit")),1)]),_:1})])]),e.expertLevel>0?(p(),g("h3",Zc,o(e.$t("settings.fun")),1)):V("",!0),e.expertLevel>0?(p(),g("ul",xc,[e.user?(p(),g("li",ep,[l(i,{path:"mentionLinkShowYous"},{default:h(()=>[b(o(e.$t("settings.show_yous")),1)]),_:1})])):V("",!0)])):V("",!0)])])}const sp=G(Rc,[["render",tp]]);pe.add(Ul,Jo,Al,Bl,Fl);const op={props:{parentCollapsed:{required:!0,type:Boolean}},data(){return{subjectLineOptions:["email","noop","masto"].map(e=>({key:e,value:e,label:this.$t(`settings.subject_line_${e==="masto"?"mastodon":e}`)})),conversationDisplayOptions:["tree","linear"].map(e=>({key:e,value:e,label:this.$t(`settings.conversation_display_${e}`)})),absoluteTime12hOptions:["24h","12h"].map(e=>({key:e,value:e,label:this.$t(`settings.absolute_time_format_12h_${e}`)})),conversationOtherRepliesButtonOptions:["below","inside"].map(e=>({key:e,value:e,label:this.$t(`settings.conversation_other_replies_button_${e}`)})),mentionLinkDisplayOptions:["short","full_for_remote","full"].map(e=>({key:e,value:e,label:this.$t(`settings.mention_link_display_${e}`)})),userPopoverAvatarActionOptions:["close","zoom","open"].map(e=>({key:e,value:e,label:this.$t(`settings.user_popover_avatar_action_${e}`)})),unsavedPostActionOptions:["save","discard","confirm"].map(e=>({key:e,value:e,label:this.$t(`settings.unsaved_post_action_${e}`)})),loopSilentAvailable:Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype,"mozHasAudio")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"webkitAudioDecodedByteCount")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"audioTracks"),emailLanguage:this.$store.state.users.currentUser.language||[""]}},components:{BooleanSetting:we,ChoiceSetting:Re,IntegerSetting:ot,FloatSetting:ds,UnitSetting:Xe,InterfaceLanguageSwitcher:Ho,ProfileSettingIndicator:Ye,ScopeSelector:El,Select:_e,FontControl:Vt},computed:{postFormats(){return this.$store.state.instance.postFormats||[]},postContentOptions(){return this.postFormats.map(e=>({key:e,value:e,label:this.$t(`post_status.content_type["${e}"]`)}))},language:{get:function(){return this.$store.getters.mergedConfig.interfaceLanguage},set:function(e){this.$store.dispatch("setOption",{name:"interfaceLanguage",value:e})}},...ke(),...Be({blockExpirationSupported:e=>e.instance.blockExpiration})},methods:{changeDefaultScope(e){this.$store.dispatch("setProfileOption",{name:"defaultScope",value:e})},clearCache(e){Go(e).then(()=>{this.$store.dispatch("settingsSaved",{success:!0})}).catch(t=>{this.$store.dispatch("settingsSaved",{error:t})})},tooSmall(){this.$emit("tooSmall")},tooBig(){this.$emit("tooBig")},getNavMode(){return this.$refs.tabSwitcher.getNavMode()},clearAssetCache(){this.clearCache(Ko)},clearEmojiCache(){this.clearCache(Wo)},updateProfile(){const e={language:ns.internalToBackendLocaleMulti(this.emailLanguage)};this.$store.state.api.backendInteractor.updateProfile({params:e}).then(t=>{this.$store.commit("addNewUsers",[t]),this.$store.commit("setCurrentUser",t)})},updateFont(e,t){this.$store.dispatch("setOption",{name:"theme3hacks",value:{...this.mergedConfig.theme3hacks,fonts:{...this.mergedConfig.theme3hacks.fonts,[e]:t}}})}}},lp=["label"],np={class:"setting-section"},ap={class:"setting-list"},ip={class:"setting-item",for:"default-vis"},rp={class:"setting-label"},dp={key:0}
10,up={key:1},cp={class:"setting-list"},pp={key:0},mp={class:"setting-list"},hp={class:"setting-list suboptions"};function fp(e,t,n,a,r,d){const i=w("ProfileSettingIndicator"),c=w("ScopeSelector"),m=w("BooleanSetting"),u=w("ChoiceSetting");return p(),g("div",{label:e.$t("settings.posts")},[s("div",np,[s("h3",null,o(e.$t("settings.general")),1),s("ul",ap,[s("li",null,[s("label",ip,[s("span",rp,[l(i,{"is-profile":!0}),b(" "+o(e.$t("settings.default_vis")),1)]),l(c,{class:"scope-selector setting-control","show-all":!0,"user-default":e.$store.state.profileConfig.defaultScope,"initial-scope":e.$store.state.profileConfig.defaultScope,"on-scope-change":e.changeDefaultScope,unstyled:!1,uns:""},null,8,["user-default","initial-scope","on-scope-change"])])]),s("li",null,[l(m,{path:"sensitiveByDefault"},{default:h(()=>[b(o(e.$t("settings.sensitive_by_default")),1)]),_:1})]),e.postFormats.length>0?(p(),g("li",dp,[l(u,{id:"postContentType",path:"postContentType",options:e.postContentOptions},{default:h(()=>[b(o(e.$t("settings.default_post_status_content_type")),1)]),_:1},8,["options"])])):V("",!0),s("li",null,[l(m,{path:"padEmoji"},{default:h(()=>[b(o(e.$t("settings.pad_emoji")),1)]),_:1})]),s("li",null,[l(m,{path:"autocompleteSelect",expert:"1"},{default:h(()=>[b(o(e.$t("settings.autocomplete_select_first")),1)]),_:1})]),s("li",null,[l(m,{path:"autoSaveDraft"},{default:h(()=>[b(o(e.$t("settings.auto_save_draft")),1)]),_:1})]),e.mergedConfig.autoSaveDraft?V("",!0):(p(),g("li",up,[l(u,{id:"unsavedPostAction",path:"unsavedPostAction",options:e.unsavedPostActionOptions,expert:"1"},{default:h(()=>[b(o(e.$t("settings.unsaved_post_action")),1)]),_:1},8,["options"])]))]),s("h3",null,o(e.$t("settings.replies")),1),s("ul",cp,[s("li",null,[l(m,{path:"scopeCopy"},{default:h(()=>[b(o(e.$t("settings.scope_copy")),1)]),_:1})]),s("li",null,[l(u,{id:"subjectLineBehavior",path:"subjectLineBehavior",options:e.subjectLineOptions},{default:h(()=>[b(o(e.$t("settings.subject_line_behavior")),1)]),_:1},8,["options"])])]),e.expertLevel>0?(p(),g("h3",pp,o(e.$t("settings.attachments")),1)):V("",!0),s("ul",mp,[s("li",null,[l(m,{path:"imageCompression",expert:"1"},{default:h(()=>[b(o(e.$t("settings.image_compression")),1)]),_:1}),s("ul",hp,[s("li",null,[l(m,{path:"alwaysUseJpeg",expert:"1","parent-path":"imageCompression"},{default:h(()=>[b(o(e.$t("settings.always_use_jpeg")),1)]),_:1})])])])])])],8,lp)}const gp=G(op,[["render",fp]]),bp={components:{BooleanSetting:we,ChoiceSetting:Re,UnitSetting:Xe,IntegerSetting:ot,Checkbox:ue,Select:_e,HelpIndicator:Xo},computed:{instanceSpecificPanelPresent(){return this.$store.state.instance.showInstanceSpecificPanel},...ke(),...jo(Ge,{muteFilters:e=>Object.entries(e.prefsStorage.simple.muteFilters),muteFiltersObject:e=>e.prefsStorage.simple.muteFilters}),...Be({blockExpirationSupported:e=>e.instance.blockExpiration}),onMuteDefaultActionLv1:{get(){const e=this.$store.state.config.onMuteDefaultAction;return e==="ask"||e==="forever"?e:"temporarily"},set(e){let t=e;e!=="ask"&&e!=="forever"&&(t="14d"),this.$store.dispatch("setOption",{name:"onMuteDefaultAction",value:t})}},onBlockDefaultActionLv1:{get(){const e=this.$store.state.config.onBlockDefaultAction;return e==="ask"||e==="forever"?e:"temporarily"},set(e){let t=e;e!=="ask"&&e!=="forever"&&(t="14d"),this.$store.dispatch("setOption",{name:"onBlockDefaultAction",value:t})}},muteFiltersDraft(){return Object.entries(this.muteFiltersDraftObject)},muteFiltersExpired(){const e=Date.now();return Object.entries(this.muteFiltersDraftObject).filter(([,{expires:t}])=>t!=null&&t<=e)}},methods:{...ls(Ge,["setPreference","unsetPreference","pushServerSideStorage"]),getDatetimeLocal(e){const t=new Date(e),n=new Intl.NumberFormat("en-US",{minimumIntegerDigits:2});return[t.getFullYear(),"-",n.format(t.getMonth()+1),"-",n.format(t.getDate()),"T",n.format(t.getHours()),":",n.format(t.getMinutes())].join("")},checkRegexValid(e){const t=this.muteFiltersObject[e];if(t.type!=="regexp"||t.type!=="user_regexp")return!0;const{value:n}=t;let a=!0;try{new RegExp(n)}catch{a=!1,console.error("Invalid RegExp: "+n)}return a},createFilter(e={type:"word",value:"",name:"New Filter",enabled:!0,expires:null,hide:!1}){const t=ht();e.order=this.muteFilters.length+2,this.muteFiltersDraftObject[t]=e,this.setPreference({path:"simple.muteFilters."+t,value:e}),this.pushServerSideStorage()},exportFilter(e){this.exportedFilter={...this.muteFiltersDraftObject[e]},delete this.exportedFilter.order,this.filterExporter.exportData()},importFilter(){this.filterImporter.importData()},copyFilter(e){const t={...this.muteFiltersDraftObject[e]},n=ht();this.muteFiltersDraftObject[n]=t,this.setPreference({path:"simple.muteFilters."+n,value:t}),this.pushServerSideStorage()},deleteFilter(e){delete this.muteFiltersDraftObject[e],this.unsetPreference({path:"simple.muteFilters."+e,value:null}),this.pushServerSideStorage()},purgeExpiredFilters(){this.muteFiltersExpired.forEach(([e])=>{delete this.muteFiltersDraftObject[e],this.unsetPreference({path:"simple.muteFilters."+e,value:null})}),this.pushServerSideStorage()},updateFilter(e,t,n){const a={...this.muteFiltersDraftObject[e]};if(t==="expires-never")if(n)a.expires=null;else{const d=Date.now()+12096e5;a.expires=d}else if(t==="expires"){const r=Date.parse(n);a.expires=r.valueOf()}else a[t]=n;this.muteFiltersDraftObject[e]=a,this.muteFiltersDraftDirty[e]=!0},saveFilter(e){this.setPreference({path:"simple.muteFilters."+e,value:this.muteFiltersDraftObject[e]}),this.pushServerSideStorage(),this.muteFiltersDraftDirty[e]=!1}},watch:{replyVisibility(){this.$store.dispatch("queueFlushAll")}}},vp={class:"clutter-tab"},$p={class:"setting-section"},yp={class:"setting-list"},kp={class:"setting-list suboptions"},wp={class:"setting-list"},Cp={key:0};function Vp(e,t,n,a,r,d){const i=w("BooleanSetting"),c=w("UnitSetting"),m=w("IntegerSetting");return p(),g("div",vp,[s("div",$p,[s("h3",null,o(e.$t("settings.interface")),1),s("ul",yp,[s("li",null,[l(i,{path:"alwaysShowSubjectInput"},{default:h(()=>[b(o(e.$t("settings.subject_input_always_show")),1)]),_:1})]),s("li",null,[l(i,{path:"minimalScopesMode"},{default:h(()=>[b(o(e.$t("settings.minimal_scopes_mode")),1)]),_:1})]),s("li",null,[l(i,{path:"hidePostStats"},{default:h(()=>[b(o(e.$t("settings.hide_post_stats")),1)]),_:1})]),s("li",null,[l(i,{path:"hideUserStats"},{default:h(()=>[b(o(e.$t("settings.hide_user_stats")),1)]),_:1})]),s("li",null,[l(i,{path:"hideBotIndication"},{default:h(()=>[b(o(e.$t("settings.hide_actor_type_indication")),1)]),_:1})]),s("li",null,[l(i,{path:"hideScrobbles"},{default:h(()=>[b(o(e.$t("settings.hide_scrobbles")),1)]),_:1}),s("ul",kp,[s("li",null,[l(c,{key:"hideScrobblesAfter",path:"hideScrobblesAfter",units:["m","h","d"],"unit-set":"time"},{default:h(()=>[b(o(e.$t("settings.hide_scrobbles_after")),1)]),_:1})])])])]),s("h3",null,o(e.$t("settings.attachments")),1),s("ul",wp,[s("li",null,[l(m,{path:"maxThumbnails",min:0},{default:h(()=>[b(o(e.$t("settings.max_thumbnails")),1)]),_:1})]),s("li",null,[l(i,{path:"hideAttachments"},{default:h(()=>[b(o(e.$t("settings.hide_attachments_in_tl")),1)]),_:1})]),s("li",null,[l(i,{path:"hideAttachmentsInConv"},{default:h(()=>
10[b(o(e.$t("settings.hide_attachments_in_convo")),1)]),_:1})]),s("li",null,[l(i,{path:"userCardHidePersonalMarks"},{default:h(()=>[b(o(e.$t("settings.user_card_hide_personal_marks")),1)]),_:1})]),e.instanceShoutboxPresent?(p(),g("li",Cp,[l(i,{path:"hideShoutbox"},{default:h(()=>[b(o(e.$t("settings.hide_shoutbox")),1)]),_:1})])):V("",!0)])])])}const Tp=G(bp,[["render",Vp]]),Sp={props:{parentCollapsed:{required:!0,type:Boolean}},data(){return{thirdColumnModeOptions:["none","notifications","postform"].map(e=>({key:e,value:e,label:this.$t(`settings.third_column_mode_${e}`)}))}},components:{BooleanSetting:we,ChoiceSetting:Re,UnitSetting:Xe,ProfileSettingIndicator:Ye},computed:{postFormats(){return this.$store.state.instance.postFormats||[]},instanceShoutboxPresent(){return this.$store.state.instance.shoutAvailable},columns(){const e=this.$store.getters.mergedConfig.thirdColumnMode,t=e==="none"?[]:["notifs"];return this.$store.getters.mergedConfig.sidebarRight||e==="postform"?[...t,"content","sidebar"]:["sidebar","content",...t]},...ke()}},Lp=["label"],Pp={class:"setting-section"},_p={class:"setting-list"},Ip={class:"setting-list"},Ep={key:0},Up={key:1},Ap={class:"column-settings"};function Bp(e,t,n,a,r,d){const i=w("BooleanSetting"),c=w("UnitSetting"),m=w("ChoiceSetting");return p(),g("div",{label:e.$t("settings.layout")},[s("div",Pp,[s("h3",null,o(e.$t("settings.general")),1),s("ul",_p,[s("li",null,[l(i,{path:"modalMobileCenter"},{default:h(()=>[b(o(e.$t("settings.mobile_center_dialog")),1)]),_:1})]),s("li",null,[l(i,{path:"alwaysShowNewPostButton",expert:"1"},{default:h(()=>[b(o(e.$t("settings.always_show_post_button")),1)]),_:1})]),s("li",null,[l(i,{path:"autohideFloatingPostButton",expert:"1"},{default:h(()=>[b(o(e.$t("settings.autohide_floating_post_button")),1)]),_:1})]),s("li",null,[l(i,{path:"userPopoverOverlay",expert:"1"},{default:h(()=>[b(o(e.$t("settings.user_popover_avatar_overlay")),1)]),_:1})]),s("li",null,[l(i,{path:"userCardLeftJustify"},{default:h(()=>[b(o(e.$t("settings.user_card_left_justify")),1)]),_:1})]),s("li",null,[l(c,{path:"themeEditorMinWidth",units:["px","rem"],expert:"1"},{default:h(()=>[b(o(e.$t("settings.theme_editor_min_width")),1)]),_:1})]),s("li",null,[l(c,{path:"navbarSize",step:.1,units:["px","rem"],"reset-default":{px:55,rem:3.5}},{default:h(()=>[b(o(e.$t("settings.navbar_size")),1)]),_:1})])]),s("h3",null,o(e.$t("settings.columns")),1),s("ul",Ip,[s("li",null,[l(i,{path:"disableStickyHeaders"},{default:h(()=>[b(o(e.$t("settings.disable_sticky_headers")),1)]),_:1})]),s("li",null,[l(i,{path:"showScrollbars"},{default:h(()=>[b(o(e.$t("settings.show_scrollbars")),1)]),_:1})]),e.instanceSpecificPanelPresent?(p(),g("li",Ep,[l(i,{path:"hideISP"},{default:h(()=>[b(o(e.$t("settings.hide_isp")),1)]),_:1})])):V("",!0),s("li",null,[l(c,{path:"panelHeaderSize",step:.1,units:["px","rem"],"reset-default":{px:52,rem:3.2},"timed-apply-mode":""},{default:h(()=>[b(o(e.$t("settings.panel_header_size")),1)]),_:1})]),s("li",null,[l(i,{path:"sidebarRight"},{default:h(()=>[b(o(e.$t("settings.right_sidebar")),1)]),_:1})]),s("li",null,[l(i,{path:"navbarColumnStretch"},{default:h(()=>[b(o(e.$t("settings.navbar_column_stretch")),1)]),_:1})]),s("li",null,[e.user?(p(),H(m,{key:0,id:"thirdColumnMode",path:"thirdColumnMode",options:e.thirdColumnModeOptions},{default:h(()=>[b(o(e.$t("settings.third_column_mode")),1)]),_:1},8,["options"])):V("",!0)]),e.expertLevel>0?(p(),g("li",Up,[s("h4",null,o(e.$t("settings.column_sizes")),1),s("div",Ap,[(p(!0),g(Y,null,ee(e.columns,u=>(p(),H(c,{key:u,path:u+"ColumnWidth",units:e.horizontalUnits,expert:"1"},{default:h(()=>[b(o(e.$t("settings.column_sizes_"+u)),1)]),_:2},1032,["path","units"]))),128))])])):V("",!0)])])],8,Lp)}const Fp=G(Sp,[["render",Bp]]),Op={class:"palette"},Dp={class:"buttons"},Rp={class:"buttons"},Mp=["disabled"],ol={__name:"palette_editor",props:["modelValue","compact","apply","disabled"],emits:["update:modelValue","applyPalette"],setup(e,{emit:t}){pe.add(Ol,Dl);const n=["bg","fg","text","link","accent","cRed","cBlue","cGreen","cOrange","wallpaper"],a=e,r=t,d=()=>n.reduce((S,L)=>a.modelValue[L]==null?S:{...S,[L]:a.modelValue[L]},{}),i=Ct({filename:"pleroma_palette",extension:"json",getExportedObject:d}),c=lt({accept:".json",onImport(S){r("update:modelValue",S)}}),m=()=>{i.exportData()},u=()=>{c.importData()},$=()=>{r("applyPalette",d())},k=J(()=>Q().layoutType==="mobile"),v=S=>{if(S==="accent")return a.modelValue.link;if(S==="link")return a.modelValue.accent;if(S.startsWith("extra"))return"#FF00FF";if(S.startsWith("wallpaper"))return"#008080"},y=(S,L)=>{r("update:modelValue",{...a.modelValue,[S]:L})};return(S,L)=>{const P=w("FAIcon");return p(),g("div",{class:K(["PaletteEditor",{"-compact":e.compact,"-apply":e.apply,"-mobile":k.value}])},[s("div",Op,[(p(),g(Y,null,ee(n,E=>l(Qe,{key:E,name:E,"model-value":a.modelValue[E],fallback:v(E),label:S.$t("settings.style.themes3.palette."+E),"onUpdate:modelValue":j=>y(E,j)},null,8,["name","model-value","fallback","label","onUpdate:modelValue"])),64))]),s("div",D
10p,[s("button",{class:"btn button-default palette-import-button",onClick:u},[l(P,{icon:"file-import"}),b(" "+o(S.$t("settings.style.themes3.palette.import")),1)]),s("button",{class:"btn button-default palette-export-button",onClick:m},[l(P,{icon:"file-export"}),b(" "+o(S.$t("settings.style.themes3.palette.export")),1)])]),s("div",Rp,[e.apply?(p(),g("button",{key:0,class:K(["btn button-default palette-apply-button",{disabled:e.disabled}]),disabled:e.disabled,onClick:$},o(S.$t("settings.style.themes3.palette.apply")),11,Mp)):V("",!0)])],2)}}};pe.add(vt,Rl,Ml,Nl);const Np={components:{Checkbox:ue}},jp={class:"theme-preview-container"},qp={class:"panel dummy"},zp={class:"panel-heading"},Hp={class:"title"},Wp={class:"faint"},Kp={class:"alert error"},Gp={class:"btn button-default"},Jp={class:"panel-body theme-preview-content"},Yp={class:"post"},Qp={class:"content"},Xp={style:{"font-family":"var(--postCodeFont)"}},Zp={style:{color:"var(--link)"}},xp={class:"icons"},em={class:"after-post"},tm={class:"content"},sm={style:{color:"var(--linkFaint)"}},om={class:"alert error"},lm=["value"],nm={class:"actions"},am={class:"btn button-default"};function im(e,t,n,a,r,d){const i=w("i18n-t"),c=w("FAIcon"),m=w("Checkbox");return p(),g("div",jp,[t[4]||(t[4]=s("div",{class:"underlay underlay-preview"},null,-1)),s("div",qp,[s("div",zp,[s("h1",Hp,[b(o(e.$t("settings.style.preview.header"))+" ",1),t[0]||(t[0]=s("span",{class:"badge -notification"}," 99 ",-1))]),s("span",Wp,o(e.$t("settings.style.preview.header_faint")),1),s("span",Kp,o(e.$t("settings.style.preview.error")),1),s("button",Gp,o(e.$t("settings.style.preview.button")),1)]),s("div",Jp,[s("div",Yp,[t[1]||(t[1]=s("div",{class:"avatar still-image","aria-hidden":"true"}," ( ͡° ÍÊ Í¡Â°) ",-1)),s("div",Qp,[s("h4",null,o(e.$t("settings.style.preview.content")),1),l(i,{scope:"global",keypath:"settings.style.preview.text"},{default:h(()=>[s("code",Xp,o(e.$t("settings.style.preview.mono")),1),s("a",Zp,o(e.$t("settings.style.preview.link")),1)]),_:1}),s("div",xp,[l(c,{"fixed-width":"",style:{color:"var(--cBlue)"},class:"fa-scale-110 fa-old-padding",icon:"reply"}),l(c,{"fixed-width":"",style:{color:"var(--cGreen)"},class:"fa-scale-110 fa-old-padding",icon:"retweet"}),l(c,{"fixed-width":"",style:{color:"var(--cOrange)"},class:"fa-scale-110 fa-old-padding",icon:"star"}),l(c,{"fixed-width":"",style:{color:"var(--cRed)"},class:"fa-scale-110 fa-old-padding",icon:"times"})])])]),s("div",em,[t[2]||(t[2]=s("div",{class:"avatar-alt","aria-hidden":"true"}," :^) ",-1)),s("div",tm,[l(i,{keypath:"settings.style.preview.fine_print",tag:"span",class:"faint",scope:"global"},{default:h(()=>[s("a",sm,o(e.$t("settings.style.preview.faint_link")),1)]),_:1})])]),t[3]||(t[3]=s("div",{class:"separator"},null,-1)),s("span",om,o(e.$t("settings.style.preview.error")),1),s("input",{value:e.$t("settings.style.preview.input"),type:"text",class:"input"},null,8,lm),s("div",nm,[l(m,null,{default:h(()=>[b(o(e.$t("settings.style.preview.checkbox")),1)]),_:1}),s("button",am,o(e.$t("settings.style.preview.button")),1)])])])])}const us=G(Np,[["render",im]]),rm={data(){return{availableThemesV3:[],availableThemesV2:[],bundledPalettes:[],compilationCache:{},fileImporter:lt({accept:".json, .iss",validator:this.importValidator,onImport:this.onImport,parser:this.importParser,onImportFailure:this.onImportFailure}),palettesKeys:["bg","fg","link","text","cRed","cGreen","cBlue","cOrange"],userPalette:{},intersectionObserver:null,forcedRoundnessOptions:["disabled","sharp","nonsharp","round"].map((e,t)=>({key:e,value:t-1,label:this.$t(`settings.style.themes3.hacks.forced_roundness_mode_${e}`)})),underlayOverrideModes:["none","opaque","transparent"].map(e=>({key:e,value:e,label:this.$t(`settings.style.themes3.hacks.underlay_override_mode_${e}`)})),backgroundUploading:!1,background:null,backgroundPreview:null}},components:{BooleanSetting:we,ChoiceSetting:Re,IntegerSetting:ot,FloatSetting:ds,UnitSetting:Xe,ProfileSettingIndicator:Ye,Preview:us,PaletteEditor:ol},mounted(){Q().getThemeData();const e=t=>{const n=t[0].toUpperCase()+t.slice(1),a=this.$store.state.instance[`${t}sIndex`];let r;return a?r=Promise.resolve(a):r=Q()[`fetch${n}sIndex`](),r.then(d=>Object.entries(d).map(([i,c])=>[i,c()]))};e("style").then(t=>{t.forEach(([n,a])=>a.then(r=>{const d=r.find(i=>i.component==="@meta");this.availableThemesV3.push({key:n,data:r,name:d.directives.name,version:"v3"})}))}),e("theme").then(t=>{t.forEach(([n,a])=>a.then(r=>{r?Array.isArray(r)?console.warn(`Theme with key ${n} is a v1 theme and should be moved to static/palettes/index.json`):!r.source&&!r.theme?console.warn(`Theme with key ${n} is malformed`):this.availableThemesV2.push({key:n,data:r,name:r.name,version:"v2"}):console.warn(`Theme with key ${n} is empty or malformed`)}))}),this.userPalette=Q().paletteDataUsed||{},e("palette").then(t=>{t.forEach(([n,a])=>a.then(r=>{let d;if(Array.isArray(r)){const[i,c,m,u,$,k="#FF0000",v="#00FF00",y="#0000FF",S="#E3FF00"]=r;d={key:n,name:i,bg:c,fg:m,text:u,link:$,cRed:k,cBlue:y,cGreen:v,cOrange:S}}else d={key:n,...r};d.key.startsWith("style.")||this.bundledPalettes.push(d)}))}),this.previewTheme("stock","v3"),window.IntersectionObserver?this.intersectionObserver=new IntersectionObserver((t,n)=>{t.forEach(({target:a,isIntersecting:r})=>{if(!r)return;const d=this.availableStyles.find(i=>i.key===a.dataset.themeKey);this.$nextTick(()=>{d&&this.previewTheme(d.key,d.version,d.data)}),n.unobserve(a)})},{root:this.$refs.themeList}
10):this.availableStyles.forEach(t=>this.previewTheme(t.key,t.version,t.data))},updated(){this.$nextTick(()=>{this.$refs.themeList.querySelectorAll(".theme-preview").forEach(e=>{this.intersectionObserver.observe(e)})})},watch:{paletteDataUsed(){this.userPalette=this.paletteDataUsed||{}}},computed:{isDefaultBackground(){return!this.$store.state.users.currentUser.background_image},switchInProgress(){return Q().themeChangeInProgress},paletteDataUsed(){return Q().paletteDataUsed},availableStyles(){return[...this.availableThemesV3,...this.availableThemesV2]},availablePalettes(){return[...this.bundledPalettes,...this.stylePalettes]},stylePalettes(){const e=Q().styleDataUsed||[];if(!e&&e.length===0)return;const t=e.find(a=>a.component==="@meta");return e.filter(a=>a.component.startsWith("@palette")).map(a=>{const{variant:r,directives:d}=a,{bg:i,fg:c,text:m,link:u,accent:$,cRed:k,cBlue:v,cGreen:y,cOrange:S,wallpaper:L}=d,P={name:`${t.directives.name||this.$t("settings.style.themes3.palette.imported")}: ${r}`,key:`style.${r.toLowerCase().replace(/ /g,"_")}`,bg:i,fg:c,text:m,link:u,accent:$,cRed:k,cBlue:v,cGreen:y,cOrange:S,wallpaper:L};return Object.fromEntries(Object.entries(P).filter(([,E])=>E))})},noIntersectionObserver(){return!window.IntersectionObserver},instanceWallpaper(){this.$store.state.instance.background},instanceWallpaperUsed(){return this.$store.state.instance.background&&!this.$store.state.users.currentUser.background_image},customThemeVersion(){const{themeVersion:e}=Q();return e},isCustomThemeUsed(){const{customTheme:e,customThemeSource:t}=this.mergedConfig;return e!=null||t!=null},isCustomStyleUsed(){const{styleCustomData:e}=this.mergedConfig;return e!=null},...ke()},methods:{importFile(){this.fileImporter.importData()},importParser(e,t){if(t.endsWith(".json"))return JSON.parse(e);if(t.endsWith(".iss"))return Qo(e)},onImport(e,t){t.endsWith(".json")?Q().setThemeCustom(e.source||e.theme):t.endsWith(".iss")&&Q().setStyleCustom(e)},onImportFailure(e){console.error("Failure importing theme:",e),Q().pushGlobalNotice({messageKey:"settings.invalid_theme_imported",level:"error"})},importValidator(e,t){if(t.endsWith(".json")){const n=e._pleroma_theme_version;return n>=1||n<=2}else if(t.endsWith(".iss"))return!(!Array.isArray(e)||e.length<1||e.find(n=>n.component==="@meta")==null)},isThemeActive(e){return e===(this.mergedConfig.theme||this.$store.state.instance.theme)},isStyleActive(e){return e===(this.mergedConfig.style||this.$store.state.instance.style)},isPaletteActive(e){return e===(this.mergedConfig.palette||this.$store.state.instance.palette)},...ls(Q,["setStyle","setTheme"]),setPalette(e,t){Q().setPalette(e),this.userPalette=t},setPaletteCustom(e){Q().setPaletteCustom(e),this.userPalette=e},resetTheming(){Q().setStyle("stock")},previewTheme(e,t,n){let a;if(this.compilationCache[e])a=this.compilationCache[e];else if(n){if(t==="v2"){const d=jl(n),i=Yo(d);a=st({inputRuleset:i,ultimateBackgroundColor:"#000000",liteMode:!0,debug:!0,onlyNormalState:!0})}else if(t==="v3"){const d=n.find(c=>c.component==="@palette");let i;if(d){const{directives:c}=d;c.link=c.link||c.accent,c.accent=c.accent||c.link,i={component:"Root",directives:Object.fromEntries(Object.entries(c).filter(([m])=>m&&m!=="name").map(([m,u])=>["--"+m,"color | "+u]))}}else i=null;a=st({inputRuleset:[...n,i].filter(c=>c),ultimateBackgroundColor:"#000000",liteMode:!0,onlyNormalState:!0})}}else a=st({inputRuleset:[],ultimateBackgroundColor:"#000000",liteMode:!0,onlyNormalState:!0});this.compilationCache[e]||(this.compilationCache[e]=a);const r=kt("appearance-tab-previews",90);r.addRule(["#theme-preview-",e,` { 11`,ft(a.eager).join(` 12`),` 13}`].join("")),r.ready=!0,wt()},uploadFile(e,t){const n=t.target.files[0];if(!n)return;if(n.size>this.$store.state.instance[e+"limit"]){const r=so.fileSizeFormat(n.size),d=so.fileSizeFormat(this.$store.state.instance[e+"limit"]);Q().pushGlobalNotice({messageKey:"upload.error.message",messageArgs:[this.$t("upload.error.file_too_big",{filesize:r.num,filesizeunit:r.unit,allowedsize:d.num,allowedsizeunit:d.unit})],level:"error"});return}const a=new FileReader;a.onload=({target:r})=>{const d=r.result;this[e+"Preview"]=d,this[e]=n},a.readAsDataURL(n)}
13,resetBackground(){window.confirm(this.$t("settings.reset_background_confirm"))&&this.submitBackground("")},resetUploadedBackground(){this.backgroundPreview=null},submitBackground(e){!this.backgroundPreview&&e!==""||(this.backgroundUploading=!0,this.$store.state.api.backendInteractor.updateProfileImages({background:e}).then(t=>{this.$store.commit("addNewUsers",[t]),this.$store.commit("setCurrentUser",t),this.backgroundPreview=null}).catch(this.displayUploadError).finally(()=>{this.backgroundUploading=!1}))}}},dm=["label"],um=["label"],cm={ref:"themeList",class:"theme-list"},pm=["disabled"],mm={class:"theme-name"},hm={key:0,disabled:"",class:"button-default theme-preview toggled"},fm={class:"theme-name"},gm={key:1,disabled:"",class:"button-default theme-preview toggled"},bm={class:"theme-name"},vm=["data-theme-key","disabled","onClick"],$m={class:"theme-name"},ym={class:"alert neutral version"},km={class:"import-file-container"},wm=["disabled"],Cm={key:0,class:"palettes-container"},Vm={key:0},Tm={class:"palettes"},Sm=["disabled","onClick"],Lm={class:"palette-label"},Pm={class:"palette-preview"},_m=["disabled","onClick"],Im={class:"palette-label"},Em={class:"palette-preview"},Um={key:0},Am={key:1,class:"alert neutral theme-notice unsupported-theme-v2"},Bm={class:"banner-background"},Fm={class:"banner-background-preview"},Om={class:"fun-monitor"},Dm={class:"fun-monitor-display-bezel button-default"},Rm={class:"fun-monitor-display-screen input"},Mm=["src"],Nm={key:1,class:"wallpaper"},jm={key:2,class:"fun-monitor-display-uploading"},qm={class:"banner-background-input"},zm={class:"custom-bg-control"},Hm=["disabled"],Wm=["disabled"],Km=["title"],Gm={class:"alert neutral theme-notice"},Jm={class:"setting-list"},Ym={key:0};function Qm(e,t,n,a,r,d){var k;const i=w("preview"),c=w("FAIcon"),m=w("PaletteEditor"),u=w("ChoiceSetting"),$=w("BooleanSetting");return p(),g("div",{class:"appearance-tab",label:e.$t("settings.interface"),icon:"table-columns"},[s("div",{class:"setting-section",label:e.$t("settings.theme"),icon:"paintbrush"},[s("h3",null,o(e.$t("settings.style.style_section")),1),s("ul",cm,[s("button",{class:K(["button-default theme-preview",{toggled:e.isStyleActive("stock"),disabled:e.switchInProgress}]),"data-theme-key":"stock",disabled:e.switchInProgress,onClick:t[0]||(t[0]=(...v)=>e.resetTheming&&e.resetTheming(...v))},[l(i,{id:"theme-preview-stock"}),s("span",mm,[b(o(e.$t("settings.style.stock_theme_used"))+" ",1),t[8]||(t[8]=s("span",{class:"alert neutral version"},"v3",-1))])],10,pm),e.isCustomThemeUsed?(p(),g("button",hm,[l(i),s("span",fm,[b(o(e.$t("settings.style.custom_theme_used"))+" ",1),t[9]||(t[9]=s("span",{class:"alert neutral version"},"v2",-1))])])):V("",!0),e.isCustomStyleUsed?(p(),g("button",gm,[l(i),s("span",bm,[b(o(e.$t("settings.style.custom_style_used"))+" ",1),t[10]||(t[10]=s("span",{class:"alert neutral version"},"v3",-1))])])):V("",!0),(p(!0),g(Y,null,ee(e.availableStyles,v=>(p(),g("button",{key:v.key,"data-theme-key":v.key,class:K(["button-default theme-preview",{toggled:e.isThemeActive(v.key),disabled:e.switchInProgress}]),disabled:e.switchInProgress,onClick:y=>v.version==="v2"?e.setTheme(v.key):e.setStyle(v.key)},[l(i,{id:"theme-preview-"+v.key},null,8,["id"]),s("span",$m,[b(o(v.name)+" ",1),s("span",ym,o(v.version),1)])],10,vm))),128))],512),s("div",km,[s("button",{class:K(["btn button-default",{disabled:e.switchInProgress}]),disabled:e.switchInProgress,onClick:t[1]||(t[1]=(...v)=>e.importFile&&e.importFile(...v))},[l(c,{icon:"folder-open"}),b(" "+o(e.$t("settings.style.themes3.editor.load_style")),1)],10,wm),s("h4",null,o(e.$t("settings.style.themes3.palette.label")),1),e.customThemeVersion==="v3"?(p(),g("div",Cm,[((k=e.stylePalettes)==null?void 0:k.length)>0?(p(),g("h5",Vm,o(e.$t("settings.style.themes3.palette.style")),1)):V("",!0),s("div",Tm,[(p(!0),g(Y,null,ee(e.stylePalettes||[],v=>(p(),g("button",{key:v.name,class:K(["btn button-default palette-entry",{toggled:e.isPaletteActive(v.key),disabled:e.switchInProgress}]),disabled:e.switchInProgress,onClick:()=>e.setPalette(v.key,v)},[s("div",Lm,[s("label",null,o(v.name??e.$t("settings.style.themes3.palette.user")),1)]),s("div",Pm,[(p(!0),g(Y,null,ee(e.palettesKeys,y=>(p(),g("span",{key:y,class:"palette-square",style:Je({backgroundColor:v[y],border:"1px solid "+(v[y]??"var(--text)")})},null,4))),128))])],10,Sm))),128)),s("h5",null,o(e.$t("settings.style.themes3.palette.bundled")),1),(p(!0),g(Y,null,ee(e.bundledPalettes,v=>(p(),g("button",{key:v.name,class:K(["btn button-default palette-entry",{toggled:e.isPaletteActive(v.key),disabled:e.switchInProgress}]),disabled:e.switchInProgress,onClick:()=>e.setPalette(v.key,v)},[s("div",Im,[s("label",null,o(v.name),1)]),s("div",Em,[(p(!0),g(Y,null,ee(e.palettesKeys,y=>(p(),g("span",{key:y,class:"palette-square",style:Je({backgroundColor:v[y],border:"1px solid "+(v[y]??"var(--text)")})},null,4))),128))])],10,_m))),128))])])):V("",!0),s("div",null,[e.customThemeVersion==="v3"?(p(),g(Y,{key:0},[e.expertLevel>0?(p(),g("h5",Um,o(e.$t("settings.style.themes3.palette.user")),1)):V("",!0),e.expertLevel>0?(p(),H(m,{key:1,modelValue:e.userPalette,"onUpdate:modelValue":t[2]||(t[2]=v=>e.userPalette=v),class:"userPalette",compact:!0,apply:!0,disabled:e.switchInProgress,onApplyPalette:t[3]||(t[3]=v=>e.setPaletteCustom(v))},null,8,["modelValue","disabled"])):V("",!0)],64)):e.customThemeVersion==="v2"?(p(),g("div",Am,o(e.$t("settings.style.themes3.palette.v2_unsupported")),1)):V("",!0)])]),s("h3",null,o(e.$t("settings.background")),1),s("div",Bm,[s("div",Fm,[s("div",Om,[t[12]||(t[12]=s("div",{class:"fun-monitor-stand button-default"},null,-1)),t[13]||(t[13]=s("div",{class:"fun-monitor-neck button-default"},null,-1)),s("div",Dm,[s("div",Rm,[e.backgroundPreview||e.user.background_image||e.instanceWallpaper?(p(),g("img",{key:0,class:"fun-monitor-display-screen-image",src:e.backgroundPreview||e.user.background_image||e.instanceWallpaper},null,8,Mm)):(p(),g("div",Nm)),t[11]||(t[11]=s("div",{class:"fun-monitor-display-screen-overlay input"},null,-1)),e.backgroundUploading?(p(),g("div",jm,[l(c,{class:"fun-monitor-display-screen-uploading",spin:"",icon:"circle-notch"})])):V("",!0)])])])]),s("div",qm,[s("h4",null,o(e.$t("settings.set_new_background")),1),s("input",{type:"file",class:"input",onChange:t[4]||(t[4]=v=>e.uploadFile("background",v))},null,32),s("div",zm,[s("button",{disabled:!e.backgroundPreview,class:"btn button-default",onClick:t[5]||(t[5]=v=>
13e.submitBackground(e.background))},o(e.$t("settings.save")),9,Hm),s("button",{disabled:!e.backgroundPreview,class:"btn button-default",onClick:t[6]||(t[6]=(...v)=>e.resetUploadedBackground&&e.resetUploadedBackground(...v))},o(e.$t("settings.reset")),9,Wm)]),e.isDefaultBackground?V("",!0):(p(),g("button",{key:0,class:"btn button-default reset-button",title:e.$t("settings.reset_profile_background"),onClick:t[7]||(t[7]=(...v)=>e.resetBackground&&e.resetBackground(...v))},o(e.$t("settings.reset_profile_background")),9,Km))])]),s("h3",null,o(e.$t("settings.visual_tweaks")),1),s("div",Gm,o(e.$t("settings.style.visual_tweaks_section_note")),1),s("ul",Jm,[s("li",null,[l(u,{id:"forcedRoundness",path:"forcedRoundness",options:e.forcedRoundnessOptions},{default:h(()=>[b(o(e.$t("settings.style.themes3.hacks.force_interface_roundness")),1)]),_:1},8,["options"])]),s("li",null,[l(u,{id:"underlayOverride",path:"theme3hacks.underlay",options:e.underlayOverrideModes},{default:h(()=>[b(o(e.$t("settings.style.themes3.hacks.underlay_overrides")),1)]),_:1},8,["options"])]),e.instanceWallpaperUsed?(p(),g("li",Ym,[l($,{path:"hideInstanceWallpaper"},{default:h(()=>[b(o(e.$t("settings.hide_wallpaper")),1)]),_:1})])):V("",!0)])],8,um)],8,dm)}const Xm=G(rm,[["render",Qm]]),Zm="https://git.pleroma.social/pleroma/pleroma-fe/commit/",xm={data(){const e=this.$store.state.instance;return{backendVersion:e.backendVersion,backendRepository:e.backendRepository,frontendVersion:e.frontendVersion}},components:{BooleanSetting:we},computed:{frontendVersionLink(){return Zm+this.frontendVersion},...ke()},methods:{clearAssetCache(){this.clearCache(Ko)},clearEmojiCache(){this.clearCache(Wo)},clearCache(e){Go(e).then(()=>{this.$store.dispatch("settingsSaved",{success:!0})}).catch(t=>{this.$store.dispatch("settingsSaved",{error:t})})}}},eh=["label"],th={class:"setting-section"},sh={class:"setting-list"},oh=["href"],lh=["href"],nh={class:"setting-list"},ah={class:"setting-item"},ih={class:"cache-buttons"};function rh(e,t,n,a,r,d){const i=w("BooleanSetting");return p(),g("div",{label:e.$t("settings.developer"),class:"developer-tab"},[s("div",th,[s("h3",null,o(e.$t("settings.version.title")),1),s("dl",sh,[s("dt",null,o(e.$t("settings.version.backend_version")),1),s("dd",null,[s("a",{href:e.backendRepository,target:"_blank"},o(e.backendVersion),9,oh)]),s("dt",null,o(e.$t("settings.version.frontend_version")),1),s("dd",null,[s("a",{href:e.frontendVersionLink,target:"_blank"},o(e.frontendVersion),9,lh)])]),s("h3",null,o(e.$t("settings.debug")),1),s("ul",nh,[s("li",null,[l(i,{path:"virtualScrolling"},{default:h(()=>[b(o(e.$t("settings.virtual_scrolling")),1)]),_:1})]),s("li",null,[l(i,{path:"themeDebug",expert:1},{default:h(()=>[b(o(e.$t("settings.theme_debug")),1)]),_:1}
13)]),s("li",null,[l(i,{path:"forceThemeRecompilation",expert:1},{default:h(()=>[b(o(e.$t("settings.force_theme_recompilation_debug")),1)]),_:1})]),s("h4",null,o(e.$t("settings.cache")),1),s("li",null,[s("div",ah,[s("div",ih,[s("button",{class:"btn button-default",onClick:t[0]||(t[0]=(...c)=>e.clearAssetCache&&e.clearAssetCache(...c))},o(e.$t("settings.clear_asset_cache")),1),s("button",{class:"btn button-default",onClick:t[1]||(t[1]=(...c)=>e.clearEmojiCache&&e.clearEmojiCache(...c))},o(e.$t("settings.clear_emoji_cache")),1)])])])])])],8,eh)}const dh=G(xm,[["render",rh]]),uh={props:["name","modelValue","fallback","disabled","label","max","min","step","hardMin","hardMax"],emits:["update:modelValue"],computed:{present(){return typeof this.modelValue<"u"}}},ch=["id","for"],ph=["id","aria-labelledby","checked"],mh=["for"],hh=["id","value","disabled","max","min","step"],fh=["id","aria-labelledby","value","disabled","max","min","step"];function gh(e,t,n,a,r,d){return p(),g("div",{class:K(["range-control style-control",{disabled:!d.present||n.disabled}])},[s("label",{id:n.name+"-label",for:n.name,class:"label"},o(n.label),9,ch),typeof n.fallback<"u"?(p(),g("input",{key:0,id:n.name+"-o","aria-labelledby":n.name+"-label",class:"input -checkbox opt visible-for-screenreader-only",type:"checkbox",checked:d.present,onChange:t[0]||(t[0]=i=>e.$emit("update:modelValue",d.present?void 0:n.fallback))},null,40,ph)):V("",!0),typeof n.fallback<"u"?(p(),g("label",{key:1,class:"opt-l",for:n.name+"-o","aria-hidden":!0},null,8,mh)):V("",!0),s("input",{id:n.name,class:"input input-number",type:"range",value:n.modelValue||n.fallback,disabled:!d.present||n.disabled,max:n.max||n.hardMax||100,min:n.min||n.hardMin||0,step:n.step||1,onInput:t[1]||(t[1]=i=>e.$emit("update:modelValue",i.target.value))},null,40,hh),s("input",{id:n.name+"-numeric",class:"input input-number",type:"number","aria-labelledby":n.name+"-label",value:n.modelValue||n.fallback,disabled:!d.present||n.disabled,max:n.hardMax,min:n.hardMin,step:n.step||1,onInput:t[2]||(t[2]=i=>e.$emit("update:modelValue",i.target.value))},null,40,fh)],2)}const bh=G(uh,[["render",gh]]),vh={components:{Checkbox:ue},props:["name","label","modelValue","fallback","disabled"],emits:["update:modelValue"],computed:{present(){return typeof this.modelValue<"u"}}},$h=["for"],yh=["id","value","disabled"];function kh(e,t,n,a,r,d){const i=w("Checkbox");return p(),g("div",{class:K(["opacity-control style-control",{disabled:!d.present||n.disabled}])},[s("label",{for:n.name,class:K(["label",{faint:!d.present||n.disabled}])},o(n.label||e.$t("settings.style.themes3.editor.opacity")),11,$h),typeof n.fallback<"u"?(p(),H(i,{key:0,"model-value":d.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=c=>e.$emit("update:modelValue",d.present?void 0:n.fallback))},null,8,["model-value","disabled"])):V("",!0),s("input",{id:n.name,class:K(["input input-number",{disabled:!d.present||n.disabled}]),type:"number",value:n.modelValue||n.fallback,disabled:!d.present||n.disabled,max:"1",min:"0",step:".05",onInput:t[1]||(t[1]=c=>e.$emit("update:modelValue",c.target.value))},null,42,yh)],2)}const cs=G(vh,[["render",kh]]),wh={class:"SelectMotion btn-group"},Ch=["disabled"],Vh=["disabled"],Th=["disabled"],Sh=["disabled"],ps={__name:"select_motion",props:{modelValue:{type:Array,required:!0},selectedId:{type:Number,required:!0},disabled:{type:Boolean,default:!1},getAddValue:{type:Function,required:!0}},emits:["update:modelValue","update:selectedId"],setup(e,{emit:t}){const n=e,a=t,r=J(()=>n.selectedId>0),d=J(()=>n.modelValue[n.selectedId]!=null),i=async()=>{const k=[...n.modelValue],v=k.splice(n.selectedId,1)[0];k.splice(n.selectedId-1,0,v),a("update:modelValue",k),await dt(),a("update:selectedId",n.selectedId-1)},c=J(()=>n.selectedId<n.modelValue.length-1),m=async()=>{const k=[...n.modelValue],v=k.splice(n.selectedId.value,1)[0];k.splice(n.selectedId+1,0,v),a("update:modelValue",k),await dt(),a("update:selectedId",n.selectedId+1)},u=async()=>{const k=[...n.modelValue,n.getAddValue()];a("update:modelValue",k),await dt(),a("update:selectedId",Math.max(k.length-1,0))},$=async()=>{const k=[...n.modelValue];k.splice(n.selectedId,1),a("update:modelValue",k),await dt(),a("update:selectedId",k.length===0?void 0:Math.max(n.selectedId-1,0))};return(k,v)=>{const y=w("FAIcon");return p(),g("div",wh,[s("button",{class:"btn button-default",disabled:e.disabled,onClick:u},[l(y,{"fixed-width":"",icon:"plus"})],8,Ch),s("button",{class:K(["btn button-default",{disabled:e.disabled||!r.value}]),disabled:e.disabled||!r.value,onClick:i},[l(y,{"fixed-width":"",icon:"chevron-up"})],10,Vh),s("button",{class:K(["btn button-default",{disabled:e.disabled||!c.value}]),disabled:e.disabled||!c.value,onClick:m},[l(y,{"fixed-width":"",icon:"chevron-down"})],10,Th),s("button",{class:K(["btn button-default",{disabled:e.disabled||!d.value}]),disabled:e.disabled||!d.value,onClick:$},[l(y,{"fixed-width":"",icon:"times"})],10,Sh)])}}},Lh={components:{Checkbox:ue,ColorInput:Qe},props:["shadow","shadowControl","previewClass","previewStyle","previewCss","disabled","invali
13d","noColorControl"],emits:["update:shadow"],data(){return{colorOverride:void 0,lightGrid:!1,zoom:100,randomSeed:ql()}},mounted(){this.update()},computed:{hideControls(){return typeof this.shadow=="string"}},watch:{previewCss(){this.update()},previewStyle(){this.update()},zoom(){this.update()}},methods:{updateProperty(e,t){this.$emit("update:shadow",{axis:e,value:Number(t)})},update(){const e=kt("style-component-preview",90);e.clear();const t=[this.previewCss];this.colorOverride&&t.push(`--background: ${this.colorOverride}`);const n=["#component-preview-",this.randomSeed,` { 14`,`.preview-block { 15`,`zoom: ${this.zoom/100};`,this.previewStyle,` 16}`,` 17}`].join("");e.addRule(n),e.addRule(["#component-preview-",this.randomSeed,` { 18`,...t,` 19}`].join("")),e.ready=!0,wt()}}},Ph=["id"],_h={class:"x-shift-number"},Ih=["value","disabled"],Eh={class:"y-shift-number"},Uh=["value","disabled"],Ah=["value","disabled"],Bh=["value","disabled"],Fh={key:0,class:"invalid-container"},Oh={class:"alert error invalid-label"},Dh={class:"assists"},Rh={class:"style-control"},Mh={class:"label"};function Nh(e,t,n,a,r,d){var m,u,$,k;const i=w("Checkbox"),c=w("ColorInput");return p(),g("div",{id:"component-preview-"+e.randomSeed,class:K(["ComponentPreview",{"-shadow-controls":e.shadowControl}])},[te(s("label",{role:"heading",class:K(["header",{faint:e.disabled}])},o(e.$t("settings.style.shadows.offset")),3),[[xe,e.shadowControl]]),te(s("label",_h,[b(o(e.$t("settings.style.shadows.offset-x"))+" ",1),s("input",{value:(m=e.shadow)==null?void 0:m.x,disabled:e.disabled,class:K([{disabled:e.disabled},"input input-number"]),type:"number",onInput:t[0]||(t[0]=v=>e.updateProperty("x",v.target.value))},null,42,Ih)],512),[[xe,e.shadowControl&&!e.hideControls]]),te(s("label",Eh,[b(o(e.$t("settings.style.shadows.offset-y"))+" ",1),s("input",{value:(u=e.shadow)==null?void 0:u.y,disabled:e.disabled,class:K([{disabled:e.disabled},"input input-number"]),type:"number",onInput:t[1]||(t[1]=v=>e.updateProperty("y",v.target.value))},null,42,Uh)],512),[[xe,e.shadowControl&&!e.hideControls]]),te(s("input",{value:($=e.shadow)==null?void 0:$.x,disabled:e.disabled,class:K([{disabled:e.disabled},"input input-range x-shift-slider"]),type:"range",max:"20",min:"-20",onInput:t[2]||(t[2]=v=>e.updateProperty("x",v.target.value))},null,42,Ah),[[xe,e.shadowControl&&!e.hideControls]]),te(s("input",{value:(k=e.shadow)==null?void 0:k.y,disabled:e.disabled,class:K([{disabled:e.disabled},"input input-range y-shift-slider"]),type:"range",max:"20",min:"-20",onInput:t[3]||(t[3]=v=>e.updateProperty("y",v.target.value))},null,42,Bh),[[xe,e.shadowControl&&!e.hideControls]]),s("div",{class:K(["preview-window",{"-light-grid":e.lightGrid}])},[s("div",{class:K(["preview-block",e.previewClass])},o(e.$t("settings.style.themes3.editor.test_string")),3),e.invali
19d?(p(),g("div",Fh,[s("div",Oh,o(e.$t("settings.style.themes3.editor.invalid")),1)])):V("",!0)],2),s("div",Dh,[l(i,{modelValue:e.lightGrid,"onUpdate:modelValue":t[4]||(t[4]=v=>e.lightGrid=v),name:"lightGrid",class:"input-light-grid"},{default:h(()=>[b(o(e.$t("settings.style.shadows.light_grid")),1)]),_:1},8,["modelValue"]),s("div",Rh,[s("label",Mh,o(e.$t("settings.style.shadows.zoom")),1),te(s("input",{"onUpdate:modelValue":t[5]||(t[5]=v=>e.zoom=v),class:"input input-number y-shift-number",type:"number"},null,512),[[ae,e.zoom]])]),e.noColorControl?V("",!0):(p(),H(c,{key:0,modelValue:e.colorOverride,"onUpdate:modelValue":t[6]||(t[6]=v=>e.colorOverride=v),class:"input-color-input",fallback:"#606060",compact:!0,label:e.$t("settings.style.shadows.color_override")},null,8,["modelValue","label"]))])],10,Ph)}const ll=G(Lh,[["render",Nh]]),gt=e=>{if(typeof e=="object"){const t=e.inset?"inset ":"",n=e.name?` #${e.name} `:"",a=`${t}${e.x} ${e.y} ${e.blur} ${e.spread} ${e.color} / ${e.alpha}${n}`;return as(a),a}else return e},jh=e=>e.map(t=>{if(Object.keys(t.directives||{}).length===0)return!1;const n=zl(t).reverse().map(r=>{const{component:d}=r,i=r.variant==null||r.variant==="normal"?"":"."+r.variant,c=(r.state||[]).filter(m=>m!=="normal");return`${d}${i}${c.map(m=>":"+m).join("")}`}).join(" "),a=Object.entries(t.directives).map(([r,d])=>{if(r.startsWith("--")){const[i,c]=d.split("|");switch(i){case"shadow":return` ${r}: ${i.trim()} | ${c.map(gt).map(m=>m.trim()).join(", ")}`;default:return` ${r}: ${i.trim()} | ${c.trim()}`}}else switch(r){case"shadow":return d.length>0?` ${r}: ${d.map(gt).join(", ")}`:` ${r}: none`;default:return` ${r}: ${d}`}});return`${n} { 20${a.join(`; 21`)} 22}`}).filter(t=>t).join(` 23 24`);pe.add(Kl,Gl,vt,qo);const mt=e=>{if(typeof e=="object")return{x:0,y:0,blur:0,spread:0,inset:!1,color:"#000000",alpha:1,...e};if(typeof e=="string")return e},qh={props:["modelValue","fallback","separateInset","noPreview","disabled","staticVars","compact"],emits:["update:modelValue","subShadowSelected"],data(){return{selectedId:0,invalid:!1}},components:{ColorInput:Qe,OpacityInput:cs,Select:_e,SelectMotion:ps,Checkbox:ue,Popover:yt,ComponentPreview:ll},computed:{cValue:{get(){return(this.modelValue??this.fallback??[]).map(mt)},set(e){this.$emit("update:modelValue",e)}},selectedType:{get(){return typeof this.selected},set(e){this.selected=mt(e==="object"?{}:"")}},selected:{get(){const e=this.cValue[this.selectedId];return e&&typeof e=="object"?{...e}:typeof e=="string"?e:null},set(e){this.cValue[this.selectedId]=mt(e),this.$emit("update:modelValue",this.cValue)}},present(){return this.selected!=null&&this.modelValue!=null},shadowsAreNull(){return this.modelValue==null},currentFallback(){var e;return(e=this.fallback)==null?void 0:e[this.selectedId]},getColorFallback(){var e,t;if(this.staticVars&&((e=this.selected)!=null&&e.color))try{const n=xt(this.selected.color,{dynamicVars:{},staticVars:this.staticVars},!0);return n?De(n):null}catch(n){return console.warn(n),null}else return(t=this.currentFallback)==null?void 0:t.color},style(){try{let e;this.cValue.map(r=>gt(r)).join(",").split(/,/).map(as);const a=ne.flattenDeep(Hl(this.cValue,{dynamicVars:{},staticVars:this.staticVars})).map(r=>({...r,color:De(r.color)}));return this.separateInset?e={filter:Wl(a),boxShadow:oo(a,!0)}:e={boxShadow:oo(a)},this.invalid=!1,e}catch(e){console.error("Invalid shadow",e),this.invalid=!0}}},watch:{selected(){this.$emit("subShadowSelected",this.selectedId)}},methods:{getNewSubshadow(){return mt(this.selected)},onSelectChange(e){this.selectedId=e},getSubshadowLabel(e,t){if(typeof e=="object")return(e==null?void 0:e.name)??this.$t("settings.style.shadows.shadow_id",{value:t});if(typeof e=="string")return e||this.$t("settings.style.shadows.empty_expression")},updateProperty:ne.throttle(function(e,t){this.cValue[this.selectedId][e]=t,e==="inset"&&t===!1&&this.separateInset&&(this.cValue[this.selectedId].spread=0),this.$emit("update:modelValue",this.cValue)},100)}},zh={class:"shadow-switcher"},Hh=["value"],Wh={class:"shadow-tweak"},Kh={value:"object"},Gh={value:"string"},Jh=["disabled"],Yh=["value","disabled"],Qh=["disabled"],Xh=["disabled"],Zh=["value","disabled"],xh=["value","disabled"],ef=["value","disabled"],tf=["value","disabled"],sf={class:"inset-alert alert warning"},of={class:"inset-tooltip tooltip"};function lf(e,t,n,a,r,d){var L,P,E,j,R,A,X,C,O,D,U,M,q,z;const i=w("ComponentPreview"),c=w("Select"),m=w("SelectMotion"),u=w("Checkbox"),$=w("ColorInput"),k=w("OpacityInput"),v=w("i18n-t"),y=w("FAIcon"),S=w("Popover");return p(),g("div",{class:K(["ShadowControl label shadow-control",{disabled:e.disabled||!e.present,"-no-preview":e.noPreview,"-compact":e.compact}])},[e.noPreview?V("",!0):(p(),H(i,{key:0,invalid:e.invalid,class:"shadow-preview","shadow-control":!0,shadow:e.selected,"preview-style":e.style,disabled:e.disabled||!e.present,"onUpdate:shadow":t[0]||(t[0]=({axis:_,value:N})=>e.updateProperty(_,N))}
24,null,8,["invalid","shadow","preview-style","disabled"])),s("div",zh,[l(c,{id:"shadow-list",modelValue:e.selectedId,"onUpdate:modelValue":t[1]||(t[1]=_=>e.selectedId=_),class:"shadow-list",size:"4",disabled:e.disabled||e.shadowsAreNull},{default:h(()=>[(p(!0),g(Y,null,ee(e.cValue,(_,N)=>(p(),g("option",{key:N,value:N,class:K({"-active":N===Number(e.selectedId)})},o(e.getSubshadowLabel(_,N)),11,Hh))),128))]),_:1},8,["modelValue","disabled"]),l(m,{modelValue:e.cValue,"onUpdate:modelValue":t[2]||(t[2]=_=>e.cValue=_),"selected-id":e.selectedId,"get-add-value":e.getNewSubshadow,disabled:e.disabled,"onUpdate:selectedId":e.onSelectChange},null,8,["modelValue","selected-id","get-add-value","disabled","onUpdate:selectedId"])]),s("div",Wh,[l(c,{modelValue:e.selectedType,"onUpdate:modelValue":t[3]||(t[3]=_=>e.selectedType=_),disabled:e.disabled||!e.present},{default:h(()=>[s("option",Kh,o(e.$t("settings.style.shadows.raw")),1),s("option",Gh,o(e.$t("settings.style.shadows.expression")),1)]),_:1},8,["modelValue","disabled"]),e.selectedType==="string"?te((p(),g("textarea",{key:0,"onUpdate:modelValue":t[4]||(t[4]=_=>e.selected=_),class:K(["input shadow-expression",{disabled:e.disabled||e.shadowsAreNull}]),disabled:e.disabled||e.shadowsAreNull},null,10,Jh)),[[ae,e.selected]]):e.selectedType==="object"?(p(),g(Y,{key:1},[s("div",{class:K([{disabled:e.disabled||!e.present},"name-control style-control"])},[s("label",{for:"name",class:K(["label",{faint:e.disabled||!e.present}])},o(e.$t("settings.style.shadows.name")),3),s("input",{id:"name",value:(L=e.selected)==null?void 0:L.name,disabled:e.disabled||!e.present,class:K([{disabled:e.disabled||!e.present},"input input-string"]),name:"name",onInput:t[5]||(t[5]=_=>e.updateProperty("name",_.target.value))},null,42,Yh)],2),s("div",{disabled:e.disabled||!e.present,class:"inset-control style-control"},[l(u,{id:"inset",value:(P=e.selected)==null?void 0:P.inset,disabled:e.disabled||!e.present,name:"inset",class:"input-inset input-boolean",onInput:t[6]||(t[6]=_=>e.updateProperty("inset",_.target.checked))},{before:h(()=>[b(o(e.$t("settings.style.shadows.inset")),1)]),_:1},8,["value","disabled"])],8,Qh),s("div",{disabled:e.disabled||!e.present,class:K([{disabled:e.disabled||!e.present},"blur-control style-control"])},[s("label",{for:"blur",class:K(["label",{faint:e.disabled||!e.present}])},o(e.$t("settings.style.shadows.blur")),3),s("input",{id:"blur",value:(E=e.selected)==null?void 0:E.blur,disabled:e.disabled||!e.present,class:K([{disabled:e.disabled||!e.present},"input input-range"]),name:"blur",type:"range",max:"20",min:"0",onInput:t[7]||(t[7]=_=>e.updateProperty("blur",_.target.value))},null,42,Zh),s("input",{value:(j=e.selected)==null?void 0:j.blur,class:K(["input input-number -small",{disabled:e.disabled||!e.present}]),disabled:e.disabled||!e.present,type:"number",min:"0",onInput:t[8]||(t[8]=_=>e.updateProperty("blur",_.target.value))},null,42,xh)],10,Xh),s("div",{class:K(["spread-control style-control",{disabled:e.disabled||!e.present||e.separateInset&&!((R=e.selected)!=null&&R.inset)}])},[s("label",{for:"spread",class:K(["label",{faint:e.disabled||!e.present||e.separateInset&&!((A=e.selected)!=null&&A.inset)}])},o(e.$t("settings.style.shadows.spread")),3),s("input",{id:"spread",value:(X=e.selected)==null?void 0:X.spread,class:K([{disabled:e.disabled||!e.present||e.separateInset&&!((C=e.selected)!=null&&C.inset)},"input input-range"]),disabled:e.disabled||!e.present||e.separateInset&&!((O=e.selected)!=null&&O.inset),name:"spread",type:"range",max:"20",min:"-20",onInput:t[9]||(t[9]=_=>e.updateProperty("spread",_.target.value))},null,42,ef),s("input",{value:(D=e.selected)==null?void 0:D.spread,class:K(["input input-number -small",{disabled:e.disabled||!e.present||e.separateInset&&!((U=e.selected)!=null&&U.inset)}]),disabled:e.disabled||!e.present||e.separateInset&&!((M=e.selected)!=null&&M.inset),type:"number",onInput:t[10]||(t[10]=_=>e.updateProperty("spread",_.target.value))},null,42,tf)],2),l($,{"model-value":(q=e.selected)==null?void 0:q.color,disabled:e.disabled||!e.present,label:e.$t("settings.style.common.color"),fallback:e.getColorFallback,compact:!0,"show-optional-checkbox":!1,name:"shadow","onUpdate:modelValue":t[11]||(t[11]=_=>e.updateProperty("color",_))},null,8,["model-value","disabled","label","fallback"]),l(k,{"model-value":(z=e.selected)==null?void 0:z.alpha,disabled:e.disabled||!e.present,"onUpdate:modelValue":t[12]||(t[12]=_=>e.updateProperty("alpha",_))},null,8,["model-value","disabled"]),l(v,{scope:"global",keypath:"settings.style.shadows.hintV3",class:K({faint:e.disabled||!e.present}),tag:"p"},{default:h(()=>[...t[13]||(t[13]=[s("code",null,"--variable,mod",-1)])]),_:1},8,["class"]),e.separateInset?(p(),H(S,{key:0,trigger:"hover"},{trigger:h(()=>[s("div",sf,[l(y,{icon:"exclamation-triangle"}),b(" Â "+o(e.$t("settings.style.shadows.filter_hint.avatar_inset_short")),1)])]),content:h(()=>[s("div",of,[l(v,{scope:"global",keypath:"settings.style.shadows.filter_hint.always_drop_shadow",tag:"p"},{default:h(()=>[...t[14]||(t[14]=[s("code",null,"filter: drop-shadow()",-1)])]),_:1}),s("p",null,o(e.$t("settings.style.shadows.filter_hint.avatar_inset")),1),l(v,{scope:"global",keypath:"settings.style.shadows.filter_hint.drop_shadow_syntax",tag:"p"},{default:h(()=>[...t[15]||(t[15]=[s("code",null,"drop-shadow",-1),s("code",null,"spread-radius",-1),s("code",null,"inset",
24-1)])]),_:1}),l(v,{scope:"global",keypath:"settings.style.shadows.filter_hint.inset_classic",tag:"p"},{default:h(()=>[...t[16]||(t[16]=[s("code",null,"box-shadow",-1)])]),_:1}),s("p",null,o(e.$t("settings.style.shadows.filter_hint.spread_zero")),1)])]),_:1})):V("",!0)],64)):V("",!0)])],2)}const ms=G(qh,[["render",lf]]),nf={class:"tooltip"},nl={__name:"tooltip",props:["text"],setup(e){const t=e;return(n,a)=>(p(),H(yt,{trigger:"hover"},{trigger:h(()=>[Pe(n.$slots,"default")]),content:h(()=>[s("div",nf,o(t.text),1)]),_:3}))}};pe.add(Jl,zo,Yl);const af={components:{Tooltip:nl},props:{large:{required:!1,type:Boolean,default:!1},contrast:{required:!1,type:Object,default:()=>({})},showRatio:{required:!1,type:Boolean,default:!1}},computed:{hint(){const e=this.contrast.aaa?"aaa":this.contrast.aa?"aa":"bad",t=this.$t(`settings.style.common.contrast.level.${e}`),n=this.$t("settings.style.common.contrast.context.text"),a=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:a})},hint_18pt(){const e=this.contrast.laaa?"aaa":this.contrast.laa?"aa":"bad",t=this.$t(`settings.style.common.contrast.level.${e}`),n=this.$t("settings.style.common.contrast.context.18pt"),a=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:a})}}},rf={key:0,class:"contrast-ratio"},df={key:0},uf={key:0},cf={key:1},pf={key:2},mf={key:0},hf={key:1},ff={key:2};function gf(e,t,n,a,r,d){const i=w("FAIcon"),c=w("Tooltip");return n.contrast?(p(),g("span",rf,[n.showRatio?(p(),g("span",df,o(n.contrast.text),1)):V("",!0),l(c,{text:d.hint,class:"rating"},{default:h(()=>[n.contrast.aaa?(p(),g("span",uf,[l(i,{icon:"thumbs-up",size:n.showRatio?"lg":""},null,8,["size"])])):V("",!0),!n.contrast.aaa&&n.contrast.aa?(p(),g("span",cf,[l(i,{icon:"adjust",size:n.showRatio?"lg":""},null,8,["size"])])):V("",!0),!n.contrast.aaa&&!n.contrast.aa?(p(),g("span",pf,[l(i,{icon:"exclamation-triangle",size:n.showRatio?"lg":""},null,8,["size"])])):V("",!0)]),_:1},8,["text"]),n.contrast&&n.large?(p(),H(c,{key:1,text:d.hint_18pt,class:"rating"},{default:h(()=>[n.contrast.laaa?(p(),g("span",mf,[l(i,{icon:"thumbs-up",size:n.showRatio?"large":""},null,8,["size"])])):V("",!0),!n.contrast.laaa&&n.contrast.laa?(p(),g("span",hf,[l(i,{icon:"adjust",size:n.showRatio?"lg":""},null,8,["size"])])):V("",!0),!n.contrast.laaa&&!n.contrast.laa?(p(),g("span",ff,[l(i,{icon:"exclamation-triangle",size:n.showRatio?"lg":""},null,8,["size"])])):V("",!0)]),_:1},8,["text"])):V("",!0)])):V("",!0)}const al=G(af,[["render",gf]]),bf=["bg","fg","text","link","cRed","cGreen","cBlue","cOrange"].map(e=>e+"ColorLocal"),vf=e=>e.startsWith("--")||e==="transparent"?e:es(e),$f={data(){return{themeImporter:lt({validator:this.importValidator,onImport:this.onImport,onImportFailure:this.onImportFailure}),themeExporter:Ct({filename:"pleroma_theme",getExportedObject:()=>this.exportedTheme}),availableStyles:[],selected:"",selectedTheme:this.$store.getters.mergedConfig.theme,themeWarning:void 0,tempImportFile:void 0,engineVersion:0,previewTheme:{},shadowsInvalid:!0,colorsInvalid:!0,radiiInvalid:!0,keepColor:!1,keepShadows:!1,keepOpacity:!1,keepRoundness:!1,keepFonts:!1,...Object.keys(ut).map(e=>[e,""]).reduce((e,[t,n])=>({...e,[t+"ColorLocal"]:n}),{}),...Object.keys(lo).map(e=>[e,""]).reduce((e,[t,n])=>({...e,[t+"OpacityLocal"]:n}),{}),shadowSelected:void 0,shadowsLocal:{},fontsLocal:{},btnRadiusLocal:"",inputRadiusLocal:"",checkboxRadiusLocal:"",panelRadiusLocal:"",avatarRadiusLocal:"",avatarAltRadiusLocal:"",attachmentRadiusLocal:"",tooltipRadiusLocal:"",chatMessageRadiusLocal:""}},created(){const e=this.$store.state.instance.themesIndex;let t;e?t=Promise.resolve(e):t=Q().fetchThemesIndex(),t.then(n=>{Object.values(n).forEach(a=>{a().then(r=>r&&this.availableStyles.push(r))})})},mounted(){typeof this.shadowSelected>"u"&&(this.shadowSelected=this.shadowsAvailable[0])},computed:{themeWarningHelp(){if(!this.themeWarning)return;const e=this.$t,t="settings.style.switcher.help.",{origin:n,themeEngineVersion:a,type:r,noActionsPossible:d}=this.themeWarning;if(n==="file"){if(a===2&&r==="wrong_version")return e(t+"v2_imported");if(a>$e||a<$e)return e(t+"future_version_imported")+" "+e(d?t+"snapshot_missing":t+"snapshot_present")}else if(n==="localStorage"){if(r==="snapshot_source_mismatch")return e(t+"snapshot_source_mismatch");if(a===2)return e(t+"upgraded_from_v2");if(a>$e)return e(t+"fe_downgraded")+" "+e(d?t+"migration_snapshot_ok":t+"migration_snapshot_gone");if(a<$e)return e(t+"fe_upgraded")+" "+e(d?t+"migration_snapshot_ok":t+"migration_snapshot_gone")}},selectedVersion(){return Array.isArray(this.selectedTheme)?1:2},currentColors(){return Object.keys(ut).map(e=>[e,this[e+"ColorLocal"]]).reduce((e,[t,n])=>({...e,[t]:n}),{})},currentOpacity(){return Object.keys(lo).map(e=>[e,this[e+"OpacityLocal"]]).reduce((e,[t,n])=>({...e,[t]:n}),{})},currentRadii(){return{btn:this.btnRadiusLocal,input:this.inputRadiusLocal,checkbox:this.checkboxRadiusLocal,panel:this.panelRadiusLocal,avatar:this.avatarRadiusLocal,avatarAlt:this.avatarAltRadiusLocal,tooltip:this.tooltipRadiusLocal,attachment:this.attachmentRadiusLocal,chatMessage:this.chatMessageRadiusLocal}},previewContrast(){try{if(!this.previewTheme.colors.bg)return{};const e=this.previewTheme.colors,t=this.previewTheme.opacity;if(!e.bg)return{};const n=d=>({text:d.toPrecision(3)+":1",aa:d>=4.5,aaa:d>=7,laa:d>=3,laaa:d>=4.5}),a=Object.entries(e).reduce((d,[i,c])=>({...d,[i]:vf(c)}),{}),r=Object.entries(ut).reduce((d,[i,c])=>{const m=i==="text"||i==="link";if(!(m||typeof c=="object"&&c!==null&&c.textColor))return d;const{layer:$,variant:k}=m?{layer:"bg"}:c,v=k||$,y=nn(v),S=[i,...v==="bg"?["cRed","cGreen","cBlue","cOrange"]:[]],L=an($,k||$,y,a,t);return L.flat().some(P=>P==null)?d:{...d,...S.reduce((P,E)=>{const j=m?"bg"+E[0].toUpperCase()+E.slice(1):E;return{...P,[j]:rn(a[E],L,a[E])}},{})}},{});return Object.entries(r).reduce((d,[i,c])=>(d[i]=n(c),d),{})}
24catch(e){return console.warn("Failure computing contrasts",e),{}}},themeDataUsed(){return Q().themeDataUsed},shadowsAvailable(){return Object.keys(ln).sort()},currentShadowOverriden:{get(){return!!this.currentShadow},set(e){e?this.shadowsLocal[this.shadowSelected]=(this.currentShadowFallback||[]).map(t=>({name:null,x:0,y:0,blur:0,spread:0,inset:!1,color:"#000000",alpha:1,...t})):delete this.shadowsLocal[this.shadowSelected]}},currentShadowFallback(){return(this.previewTheme.shadows||{})[this.shadowSelected]},currentShadow:{get(){return this.shadowsLocal[this.shadowSelected]},set(e){this.shadowsLocal[this.shadowSelected]=e}},themeValid(){return!this.shadowsInvalid&&!this.colorsInvalid&&!this.radiiInvalid},exportedTheme(){const e=!this.keepFonts&&!this.keepShadows&&!this.keepOpacity&&!this.keepRoundness&&!this.keepColor,t={themeEngineVersion:$e};return(this.keepFonts||e)&&(t.fonts=this.fontsLocal),(this.keepShadows||e)&&(t.shadows=this.shadowsLocal),(this.keepOpacity||e)&&(t.opacity=this.currentOpacity),(this.keepColor||e)&&(t.colors=this.currentColors),(this.keepRoundness||e)&&(t.radii=this.currentRadii),{_pleroma_theme_version:2,theme:{themeEngineVersion:$e,...this.previewTheme},source:t}},isActive(){const e=this.$parent;return e?e.isActive("theme"):!1}},components:{ColorInput:Qe,OpacityInput:cs,RangeInput:bh,ContrastRatio:al,ShadowControl:ms,FontControl:Vt,TabSwitcher:ss,Preview:us,Checkbox:ue,Select:_e},methods:{loadTheme({theme:e,source:t,_pleroma_theme_version:n},a,r=!1){this.dismissWarning();const d=a==="localStorage"&&!e.colors?"l1":n,i=(e||{}).themeEngineVersion,c=(t||{}).themeEngineVersion||2,m=c===$e,u=e!==void 0&&t!==void 0&&c!==i,$=t&&r||!e;!(m&&!u)&&!$&&d!=="l1"&&a!=="defaults"&&(u&&a==="localStorage"?this.themeWarning={origin:a,themeEngineVersion:c,type:"snapshot_source_mismatch"}:e?m||(this.themeWarning={origin:a,noActionsPossible:!t,themeEngineVersion:c,type:"wrong_version"}):this.themeWarning={origin:a,noActionsPossible:!0,themeEngineVersion:c,type:"no_snapshot_old_version"}),this.normalizeLocalState(e,d,t,$)},forceLoadLocalStorage(){this.loadThemeFromLocalStorage(!0)},dismissWarning(){this.themeWarning=void 0,this.tempImportFile=void 0},forceLoad(){const{origin:e}=this.themeWarning;switch(e){case"localStorage":this.loadThemeFromLocalStorage(!0);break;case"file":this.onImport(this.tempImportFile,!0);break}this.dismissWarning()},forceSnapshot(){const{origin:e}=this.themeWarning;switch(e){case"localStorage":this.loadThemeFromLocalStorage(!1,!0);break;case"file":console.error("Forcing snapshot from file is not supported yet");break}this.dismissWarning()},loadThemeFromLocalStorage(e=!1){var n;const t=(n=this.themeDataUsed)==null?void 0:n.source;t&&this.loadTheme({theme:t},"localStorage",e)},setCustomTheme(){Q().setThemeV2({customTheme:{ignore:!0,themeFileVersion:this.selectedVersion,themeEngineVersion:$e,...this.previewTheme},customThemeSource:{themeFileVersion:this.selectedVersion,themeEngineVersion:$e,shadows:this.shadowsLocal,fonts:this.fontsLocal,opacity:this.currentOpacity,colors:this.currentColors,radii:this.currentRadii}})},updatePreviewColors(){const e=on({opacity:this.currentOpacity,colors:this.currentColors});this.previewTheme.colors=e.theme.colors,this.previewTheme.opacity=e.theme.opacity},updatePreviewShadows(){this.previewTheme.shadows=tn({shadows:this.shadowsLocal,opacity:this.previewTheme.opacity,themeEngineVersion:this.engineVersion},this.previewTheme.colors,sn(this.previewTheme.colors.bg)<.5?1:-1).theme.shadows},importTheme(){this.themeImporter.importData()},exportTheme(){this.themeExporter.exportData()},onImport(e,t=!1){this.tempImportFile=e,this.loadTheme(e,"file",t)},onImportFailure(){Q().pushGlobalNotice({messageKey:"settings.invalid_theme_imported",level:"error"})},importValidator(e){const t=e._pleroma_theme_version;return t>=1||t<=2},clearAll(){this.loadThemeFromLocalStorage()},clearV1(){Object.keys(this.$data).filter(e=>e.endsWith("ColorLocal")||e.endsWith("OpacityLocal")).filter(e=>!bf.includes(e)).forEach(e=>{this.$data[e]=void 0})},clearRoundness(){Object.keys(this.$data).filter(e=>
24e.endsWith("RadiusLocal")).forEach(e=>{this.$data[e]=void 0})},clearOpacity(){Object.keys(this.$data).filter(e=>e.endsWith("OpacityLocal")).forEach(e=>{this.$data[e]=void 0})},clearShadows(){this.shadowsLocal={}},clearFonts(){this.fontsLocal={}},normalizeLocalState(e,t=0,n,a=!1){let r;typeof n<"u"&&(a||(n==null?void 0:n.themeEngineVersion)===$e)?(r=n,t=n.themeEngineVersion):r=e;const d=r.radii||r,i=r.opacity,c=r.shadows||{},m=r.fonts||{},u=r.themeEngineVersion?r.colors||r:xl(r.colors||r);if(t===0&&(r.version&&(t=r.version),typeof u.text>"u"&&typeof u.fg<"u"&&(t=1),typeof u.text<"u"&&typeof u.fg<"u"&&(t=2)),this.engineVersion=t,t===1&&(this.fgColorLocal=De(u.btn),this.textColorLocal=De(u.fg)),!this.keepColor){this.clearV1();const $=new Set(t!==1?Object.keys(ut):[]);(t===1||t==="l1")&&$.add("bg").add("link").add("cRed").add("cBlue").add("cGreen").add("cOrange"),$.forEach(k=>{const v=u[k],y=De(u[k]);this[k+"ColorLocal"]=y==="#aN"?v:y})}i&&!this.keepOpacity&&(this.clearOpacity(),Object.entries(i).forEach(([$,k])=>{typeof k>"u"||k===null||Number.isNaN(k)||(this[$+"OpacityLocal"]=k)})),this.keepRoundness||(this.clearRoundness(),Object.entries(d).forEach(([$,k])=>{const v=$.endsWith("Radius")?$.split("Radius")[0]:$;this[v+"RadiusLocal"]=k})),this.keepShadows||(this.clearShadows(),t===2?this.shadowsLocal=en(c,this.previewTheme.opacity):this.shadowsLocal=c,this.updatePreviewColors(),this.updatePreviewShadows(),this.shadowSelected=this.shadowsAvailable[0]),this.keepFonts||(this.clearFonts(),this.fontsLocal=m)},updateTheme3Preview(){const e=Yo(this.previewTheme),t=st({inputRuleset:e,ultimateBackgroundColor:"#000000",liteMode:!0}),n=kt("theme-tab-overall-preview",90),a=Zl(ft(t.eager),"&").join(` 25`);n.clear(),n.addRule(`#theme-preview { 26`+a+` 27}`),n.ready=!0,wt()}},watch:{themeDataUsed(){this.loadThemeFromLocalStorage()},currentRadii(){try{this.previewTheme.radii=Xl({radii:this.currentRadii}).theme.radii,this.radiiInvalid=!1}catch(e){this.radiiInvalid=!0,console.warn(e)}},shadowsLocal:{handler(){try{this.updatePreviewShadows(),this.shadowsInvalid=!1}catch(e){this.shadowsInvalid=!0,console.warn(e)}},deep:!0},fontsLocal:{handler(){try{this.previewTheme.fonts=Ql({fonts:this.fontsLocal}).theme.fonts,this.fontsInvalid=!1}catch(e){this.fontsInvalid=!0,console.warn(e)}},deep:!0},currentColors(){try{this.updatePreviewColors(),this.colorsInvalid=!1}catch(e){this.colorsInvalid=!0,console.warn(e)}},currentOpacity(){try{this.updatePreviewColors()}catch(e){console.warn(e)}},selected(){this.selectedTheme=Object.entries(this.availableStyles).find(([,e])=>Array.isArray(e)?e[0]===this.selected:e.name===this.selected)[1]},selectedTheme(){this.dismissWarning(),this.selectedVersion===1?(this.keepRoundness||this.clearRoundness(),this.keepShadows||this.clearShadows(),this.keepOpacity||this.clearOpacity(),this.keepColor||(this.clearV1(),this.bgColorLocal=this.selectedTheme[1],this.fgColorLocal=this.selectedTheme[2],this.textColorLocal=this.selectedTheme[3],this.linkColorLocal=this.selectedTheme[4],this.cRedColorLocal=this.selectedTheme[5],this.cGreenColorLocal=this.selectedTheme[6],this.cBlueColorLocal=this.selectedTheme[7],this.cOrangeColorLocal=this.selectedTheme[8])):this.selectedVersion>=2&&this.normalizeLocalState(this.selectedTheme.theme,2,this.selectedTheme.source)}}},yf={class:"old-theme-tab"},kf={class:"alert warning deprecation-warning"},wf={class:"presets-container"},Cf={class:"save-load"},Vf={key:0,class:"theme-warning"},Tf={class:"alert warning"},Sf={class:"buttons"},Lf={class:"top"},Pf={class:"presets"},_f={for:"preset-switcher",class:"select"},If=["value"],Ef={class:"export-import"},Uf={class:"save-load-options"},Af={class:"keep-option"},Bf={class:"keep-option"},Ff={class:"keep-option"},Of={class:"keep-option"},Df={class:"keep-option"},Rf=["label"],Mf={class:"tab-header"},Nf={class:"tab-header-buttons"},jf={class:"color-item"},qf={class:"color-item"},zf={class:"color-item"},Hf={class:"color-item"},Wf=["label"],Kf={class:"tab-header"},Gf={class:"color-item"},Jf={class:"color-item"},Yf={class:"color-item"},Qf={class:"color-item"},Xf={class:"color-item"},Zf={class:"color-item"},xf={class:"color-item"},eg={class:"color-item"},tg={class:"color-item"},sg={class:"color-item"},og={class:"color-item"},lg={class:"color-item"},ng={class:"color-item"},ag={class:"color-item"},ig={class:"color-item"},rg={class:"color-item"},dg={class:"color-item"},ug={class:"color-item"},cg=["label"],pg={class:"tab-header"},mg=["label"],hg={class:"tab-header shadow-selector"},fg={class:"select-container"},gg=["value"],bg={class:"override"},vg=["label"],$g={class:"tab-header"},yg={class:"apply-container"},kg=["disabled"];function wg(e,t,n,a,r,d){const i=w("Select"),c=w("Checkbox"),m=w("preview"),u=w("ColorInput"),$=w("OpacityInput"),k=w("ContrastRatio"),v=w("RangeInput"),y=w("ShadowControl"),S=w("FontControl"),L=w("tab-switcher");return p(),g("div",yf,[s("div",kf,o(e.$t("settings.style.themes2_outdated")),1),s("div",wf,[s("div",Cf,[e.themeWarning?(p(),g("div",Vf,[s("div",Tf,o(e.themeWarningHelp),1),s("div",Sf,[e.themeWarning.type==="snapshot_source_mismatch"?(p(),g(Y,{key:0},[s("button",{class:"btn button-default",onClick:t[0]||(t[0]=(...P)=>e.forceLoad&&e.forceLoad(...P))},o(e.$t("settings.style.switcher.use_source")),1),s("button",{class:"btn button-default",onClick:t[1]||(t[1]=(...P)=>e.forceSnapshot&&e.forceSnapshot(...P))},o(e.$t("settings.style.switcher.use_snapshot")),1)],64)):e.themeWarning.noActionsPossible?(p(),g("button",{key:1,class:"btn button-default",onClick:t[2]||(t[2]=(...P)=>e.dismissWarning&&e.dismissWarning(...P))},o(e.$t("general.dismiss")),1)):(p(),g(Y,{key:2},[s("button",{class:"btn button-default",onClick:t[3]||(t[3]=(...P)=>e.forceLoad&&e.forceLoad(...P))},o(e.$t("settings.style.switcher.load_theme")),1),s("button",{class:"btn button-default",onClick:t[4]||(t[4]=(...P)=>e.dismissWarning&&e.dismissWarning(...P))},o(e.$t("settings.style.switcher.keep_as_is")),1)],64))])])):V("",!0),s("div",Lf,[s("div",Pf,[b(o(e.$t("settings.presets"))+" ",1),s("label",_f,[l(i,{id:"preset-switcher",modelValue:e.selected,"onUpdate:modelValue":t[5]||(t[5]=P=>e.selected=P),class:"preset-switcher"},{default:h(()=>[(p(!0),g(Y,null,ee(e.availableStyles,P=>(p(),g("option",{key:P.name,value:P.name||P[0],style:Je({backgroundColor:P[1]||(P.theme||P.source).colors.bg,color:P[3]||(P.theme||P.source).colors.text})},o(P[0]||P.name),13,If))),128))]),_:1},8,["modelValue"])])]),s("div",Ef,[s("button",{class:"btn button-default",onClick:t[6]||(t[6]=(...P)=>e.importTheme&&e.importTheme(...P))},o(e.$t("settings.import_theme")),1),s("button",{class:"btn button-default",onClick:t[7]||(t[7]=(...P)=>e.exportTheme&&e.exportTheme(...P))},o(e.$t("settings.export_theme")),1)])])]),s("div",Uf,[s("span",Af,[l(c,{modelValue:e.keepColor,"onUpdate:modelValue":t[8]||(t[8]=P=>e.keepColor=P)},{default:h(()=>[b(o(e.$t("settings.style.switcher.keep_color")),1)]),_:1},8,["modelValue"])]),s("span",Bf,[l(c,{modelValue:e.keepShadows,"onUpdate:modelValue":t[9]||(t[9]=P=>e.keepShadows=P)},{default:h(()=>[b(o(e.$t("settings.style.switcher.keep_shadows")),1)]),_:1},8,["modelValue"])]),s("span",Ff,[l(c,{modelValue:e.keepOpacity,"onUpdate:modelValue":t[10]||(t[10]=P=>e.keepOpacity=P)},{default:h(()=>[b(o(e.$t("settings.style.switcher.keep_opacity")),1)]),_:1},8,["modelValue"])]),s("span",Of,[l(c,{modelValue:e.keepRoundness,"onUpdate:modelValue":t[11]||(t[11]=P=>e.keepRoundness=P)},{default:h(()=>[b(o(e.$t("settings.style.switcher.keep_roundness")),1)]),_:1},8,["modelValue"])]),s("span",Df,[l(c,{modelValue:e.keepFonts,"onUpdate:modelValue":t[12]||(t[12]=P=>e.keepFonts=P)},{default:h(()=>[b(o(e.$t("settings.style.switcher.keep_fonts")),1)]),_:1},8,["modelValue"])]),s("p",null,o(e.$t("settings.style.switcher.save_load_hint")),1)])]),l(m,{id:"theme-preview"}),s("div",null,[s("button",{class:"btn button-default",onClick:t[13]||(t[13]=(...P)=>e.updateTheme3Preview&&e.updateTheme3Preview(...P))},o(e.$t("settings.style.update_preview")),1)]),(p(),H(dn,null,[l(L,{key:"style-tweak"},{default:h(()=>{var P,E,j,R,A,X,C,O,D,U,M,q,z,_,N,ie,fe,je,ge,qe,Ie,Ce,Ve,Ee,Fe,Ue,me,oe,re,le,Te,ze,He,T,I,B,F,W,se,x,Z,Se,ve,he,ce,Le,be,We,nt,at,it,rt,hs,fs,gs,bs,vs,$s,ys,ks,ws,Cs,Vs,Ts,Ss,Ls,Ps,_s,Is,Es,Us,As,Bs,Fs,Os,Ds,Rs,Ms,Ns,js,qs,zs,Hs,Ws,Ks,Gs,Js,Ys,Qs,Xs,Zs,xs,eo;return[s("div",{label:e.$t("settings.style.common_colors._tab_label"),class:"color-container"},[s("div",Mf,[s("p",null,o(e.$t("settings.theme_help")),1),s("div",Nf,[s("button",{class:"btn button-default",onClick:t[14]||(t[14]=(...f)=>e.clearOpacity&&e.clearOpacity(...f))},o(e.$t("settings.style.switcher.clear_opacity")),1),s("button",{class:"btn button-default",onClick:t[15]||(t[15]=(...f)=>e.clearV1&&e.clearV1(...f))},o(e.$t("settings.style.switcher.clear_all")),1)])]),s("p",null,o(e.$t("settings.theme_help_v2_1")),1),s("h4",null,o(e.$t("settings.style.common_colors.main")),1
27),s("div",jf,[l(u,{modelValue:e.bgColorLocal,"onUpdate:modelValue":t[16]||(t[16]=f=>e.bgColorLocal=f),name:"bgColor",label:e.$t("settings.background")},null,8,["modelValue","label"]),l($,{modelValue:e.bgOpacityLocal,"onUpdate:modelValue":t[17]||(t[17]=f=>e.bgOpacityLocal=f),name:"bgOpacity",fallback:(P=e.previewTheme.opacity)==null?void 0:P.bg},null,8,["modelValue","fallback"]),l(u,{modelValue:e.textColorLocal,"onUpdate:modelValue":t[18]||(t[18]=f=>e.textColorLocal=f),name:"textColor",label:e.$t("settings.text")},null,8,["modelValue","label"]),l(k,{contrast:e.previewContrast.bgText},null,8,["contrast"]),l(u,{modelValue:e.accentColorLocal,"onUpdate:modelValue":t[19]||(t[19]=f=>e.accentColorLocal=f),name:"accentColor",fallback:(E=e.previewTheme.colors)==null?void 0:E.link,label:e.$t("settings.accent"),"show-optional-checkbox":typeof e.linkColorLocal<"u"},null,8,["modelValue","fallback","label","show-optional-checkbox"]),l(u,{modelValue:e.linkColorLocal,"onUpdate:modelValue":t[20]||(t[20]=f=>e.linkColorLocal=f),name:"linkColor",fallback:(j=e.previewTheme.colors)==null?void 0:j.accent,label:e.$t("settings.links"),"show-optional-checkbox":typeof e.accentColorLocal<"u"},null,8,["modelValue","fallback","label","show-optional-checkbox"]),l(k,{contrast:e.previewContrast.bgLink},null,8,["contrast"])]),s("div",qf,[l(u,{modelValue:e.fgColorLocal,"onUpdate:modelValue":t[21]||(t[21]=f=>e.fgColorLocal=f),name:"fgColor",label:e.$t("settings.foreground")},null,8,["modelValue","label"]),l(u,{modelValue:e.fgTextColorLocal,"onUpdate:modelValue":t[22]||(t[22]=f=>e.fgTextColorLocal=f),name:"fgTextColor",label:e.$t("settings.text"),fallback:(R=e.previewTheme.colors)==null?void 0:R.fgText},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.fgLinkColorLocal,"onUpdate:modelValue":t[23]||(t[23]=f=>e.fgLinkColorLocal=f),name:"fgLinkColor",label:e.$t("settings.links"),fallback:(A=e.previewTheme.colors)==null?void 0:A.fgLink},null,8,["modelValue","label","fallback"]),s("p",null,o(e.$t("settings.style.common_colors.foreground_hint")),1)]),s("h4",null,o(e.$t("settings.style.common_colors.rgbo")),1),s("div",zf,[l(u,{modelValue:e.cRedColorLocal,"onUpdate:modelValue":t[24]||(t[24]=f=>e.cRedColorLocal=f),name:"cRedColor",label:e.$t("settings.cRed")},null,8,["modelValue","label"]),l(k,{contrast:e.previewContrast.bgCRed},null,8,["contrast"]),l(u,{modelValue:e.cBlueColorLocal,"onUpdate:modelValue":t[25]||(t[25]=f=>e.cBlueColorLocal=f),name:"cBlueColor",label:e.$t("settings.cBlue")},null,8,["modelValue","label"]),l(k,{contrast:e.previewContrast.bgCBlue},null,8,["contrast"])]),s("div",Hf,[l(u,{modelValue:e.cGreenColorLocal,"onUpdate:modelValue":t[26]||(t[26]=f=>e.cGreenColorLocal=f),name:"cGreenColor",label:e.$t("settings.cGreen")},null,8,["modelValue","label"]),l(k,{contrast:e.previewContrast.bgCGreen},null,8,["contrast"]),l(u,{modelValue:e.cOrangeColorLocal,"onUpdate:modelValue":t[27]||(t[27]=f=>e.cOrangeColorLocal=f),name:"cOrangeColor",label:e.$t("settings.cOrange")},null,8,["modelValue","label"]),l(k,{contrast:e.previewContrast.bgCOrange},null,8,["contrast"])]),s("p",null,o(e.$t("settings.theme_help_v2_2")),1)],8,Rf),s("div",{label:e.$t("settings.style.advanced_colors._tab_label"),class:"color-container"},[s("div",Kf,[s("p",null,o(e.$t("settings.theme_help")),1),s("button",{class:"btn button-default",onClick:t[28]||(t[28]=(...f)=>e.clearOpacity&&e.clearOpacity(...f))},o(e.$t("settings.style.switcher.clear_opacity")),1),s("button",{class:"btn button-default",onClick:t[29]||(t[29]=(...f)=>e.clearV1&&e.clearV1(...f))},o(e.$t("settings.style.switcher.clear_all")),1)]),s("div",Gf,[s("h4",null,o(e.$t("settings.style.advanced_colors.post")),1),l(u,{modelValue:e.postLinkColorLocal,"onUpdate:modelValue":t[30]||(t[30]=f=>e.postLinkColorLocal=f),name:"postLinkColor",fallback:(X=e.previewTheme.colors)==null?void 0:X.accent,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.postLink},null,8,["contrast"]),l(u,{modelValue:e.postGreentextColorLocal,"onUpdate:modelValue":t[31]||(t[31]=f=>e.postGreentextColorLocal=f),name:"postGreentextColor",fallback:(C=e.previewTheme.colors)==null?void 0:C.cGreen,label:e.$t("settings.greentext")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.postGreentext},null,8,["contrast"]),s("h4",null,o(e.$t("settings.style.advanced_colors.alert")),1),l(u,{modelValue:e.alertErrorColorLocal,"onUpdate:modelValue":t[32]||(t[32]=f=>e.alertErrorColorLocal=f),name:"alertError",label:e.$t("settings.style.advanced_colors.alert_error"),fallback:(O=e.previewTheme.colors)==null?void 0:O.alertError},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.alertErrorTextColorLocal,"onUpdate:modelValue":t[33]||(t[33]=f=>e.alertErrorTextColorLocal=f),name:"alertErrorText",label:e.$t("settings.text"),fallback:(D=e.previewTheme.colors)==null?void 0:D.alertErrorText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.alertErrorText,large:""},null,8,["contrast"]),l(u,{modelValue:e.alertWarningColorLocal,"onUpdate:modelValue":t[34]||(t[34]=f=>e.alertWarningColorLocal=f),name:"alertWarning",label:e.$t("settings.style.advanced_colors.alert_warning"),fallback:(U=e.previewTheme.colors)==null?void 0:U.alertWarning},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.alertWarningTextColorLocal,"onUpdate:modelValue":t[35]||(t[35]=f=>e.alertWarningTextColorLocal=f),name:"alertWarningText",label:e.$t("settings.text"),fallback:(M=e.previewTheme.colors)==null?void 0:M.alertWarningText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.alertWarningText,large:""},null,8,["contrast"]),l(u,{modelValue:e.alertNeutralColorLocal,"onUpdate:modelValue":t[36]||(t[36]=f=>e.alertNeutralColorLocal=f),name:"alertNeutral",label:e.$t("settings.style.advanced_colors.alert_neutral"),fallback:(q=e.previewTheme.colors)==null?void 0:q.alertNeutral},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.alertNeutralTextColorLocal,"onUpdate:modelValue":t[37]||(t[37]=f=>e.alertNeutralTextColorLocal=f),name:"alertNeutralText",label:e.$t("settings.text"),fallback:(z=e.previewTheme.colors)==null?void 0:z.alertNeutralText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.alertNeutralText,large:""},null,8,["contrast"]),l($,{modelValue:e.alertOpacityLocal,"onUpdate:modelValue":t[38]||(t[38]=f=>e.alertOpacityLocal=f),name:"alertOpacity",fallback:(_=e.previewTheme.opacity)==null?void 0:_.alert},null,8,["modelValue","fallback"])]),s("div",Jf,[s("h4",null,o(e.$t("settings.style.advanced_colors.badge")),1),l(u,{modelValue:e.badgeNotificationColorLocal,"onUpdate:modelValue":t[39]||(t[39]=f=>e.badgeNotificationColorLocal=f),name:"badgeNotification",label:e.$t("settings.style.advanced_colors.badge_notification"),fallback:(N=e.previewTheme.colors)==null?void 0:N.badgeNotification},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.badgeNotificationTextColorLocal,"onUpdate:modelValue":t[40]||(t[40]=f=>e.badgeNotificationTextColorLocal=f),name:"badgeNotificationText",label:e.$t("settings.text"),fallback:(ie=e.previewTheme.colors)==null?void 0:ie.badgeNotificationText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.badgeNotificationText,large:""},null,8,["contrast"])]),s("div",Yf,[s("h4",null,o(e.$t("settings.style.advanced_colors.panel_header")),1),l(u,{modelValue:e.panelColorLocal,"onUpdate:modelValue":t[41]||(t[41]=f=>e.panelColorLocal=f),name:"panelColor",fallback:(fe=e.previewTheme.colors)==null?void 0:fe.panel,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l($,{modelValue:e.panelOpacityLocal,"onUpdate:modelValue":t[42]||(t[42]=f=>e.panelOpacityLocal=f),name:"panelOpacity",fallback:(je=e.previewTheme.opacity)==null?void 0:je.panel,disabled:e.panelColorLocal==="transparent"},null,8,["modelValue","fallback","disabled"]),l(u,{modelValue:e.panelTextColorLocal,"onUpdate:modelValue":t[43]||(t[43]=f=>e.panelTextColorLocal=f),name:"panelTextColor",fallback:(ge=e.previewTheme.colors)==null?void 0:ge.panelText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.panelText,large:""},null,8,["contrast"]),l(u,{modelValue:e.panelLinkColorLocal,"onUpdate:modelValue":t[44]||(t[44]=f=>e.panelLinkColorLocal=f),name:"panelLinkColor",fallback:(qe=e.previewTheme.colors)==null?void 0:qe.panelLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.panelLink,large:""},null,8,["contrast"])]),s("div",Qf,[s("h4",null,o(e.$t("settings.style.advanced_colors.top_bar")),1),l(u,{modelValue:e.topBarColorLocal,"onUpdate:modelValue":t[45]||(t[45]=f=>e.topBarColorLocal=f),name:"topBarColor",fallback:(Ie=e.previewTheme.colors)==null?void 0:Ie.topBar,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.topBarTextColorLocal,"onUpdate:modelValue":t[46]||(t[46]=f=>e.topBarTextColorLocal=f),name:"topBarTextColor",fallback:(Ce=e.previewTheme.colors)==null?void 0:Ce.topBarText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.topBarText},null,8,["contrast"]),l(u,{modelValue:e.topBarLinkColorLocal,"onUpdate:modelValue":t[47]||(t[47]=f=>e.topBarLinkColorLocal=f),name:"topBarLinkColor",fallback:(Ve=e.previewTheme.colors)==null?void 0:Ve.topBarLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.topBarLink},null,8,["contrast"])]),s("div",Xf,[s("h4",null,o(e.$t("settings.style.advanced_colors.inputs")),1),l(u,{modelValue:e.inputColorLocal,"onUpdate:modelValue":t[48]||(t[48]=f=>e.inputColorLocal=f),name:"inputColor",fallback:(Ee=e.previewTheme.colors)==null?void 0:Ee.input,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l($,{modelValue:e.inputOpacityLocal,"onUpdate:modelValue":t[49]||(t[49]=f=>e.inputOpacityLocal=f),name:"inputOpacity",fallback:(Fe=e.previewTheme.opacity)==null?void 0:Fe.input,disabled:e.inputColorLocal==="transparent"},null,8,["modelValue","fallback","disabled"]),l(u,{modelValue:e.inputTextColorLocal,"onUpdate:modelValue":t[50]||(t[50]=f=>e.inputTextColorLocal=f),name:"inputTextColor",fallback:(Ue=e.previewTheme.colors)==null?void 0:Ue.inputText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.inputText},null,8,["contrast"])]),s("div",Zf,[s("h4",null,o(e.$t("settings.style.advanced_colors.buttons")),1
27),l(u,{modelValue:e.btnColorLocal,"onUpdate:modelValue":t[51]||(t[51]=f=>e.btnColorLocal=f),name:"btnColor",fallback:(me=e.previewTheme.colors)==null?void 0:me.btn,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l($,{modelValue:e.btnOpacityLocal,"onUpdate:modelValue":t[52]||(t[52]=f=>e.btnOpacityLocal=f),name:"btnOpacity",fallback:(oe=e.previewTheme.opacity)==null?void 0:oe.btn,disabled:e.btnColorLocal==="transparent"},null,8,["modelValue","fallback","disabled"]),l(u,{modelValue:e.btnTextColorLocal,"onUpdate:modelValue":t[53]||(t[53]=f=>e.btnTextColorLocal=f),name:"btnTextColor",fallback:(re=e.previewTheme.colors)==null?void 0:re.btnText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnText},null,8,["contrast"]),l(u,{modelValue:e.btnPanelTextColorLocal,"onUpdate:modelValue":t[54]||(t[54]=f=>e.btnPanelTextColorLocal=f),name:"btnPanelTextColor",fallback:(le=e.previewTheme.colors)==null?void 0:le.btnPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnPanelText},null,8,["contrast"]),l(u,{modelValue:e.btnTopBarTextColorLocal,"onUpdate:modelValue":t[55]||(t[55]=f=>e.btnTopBarTextColorLocal=f),name:"btnTopBarTextColor",fallback:(Te=e.previewTheme.colors)==null?void 0:Te.btnTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnTopBarText},null,8,["contrast"]),s("h5",null,o(e.$t("settings.style.advanced_colors.pressed")),1),l(u,{modelValue:e.btnPressedColorLocal,"onUpdate:modelValue":t[56]||(t[56]=f=>e.btnPressedColorLocal=f),name:"btnPressedColor",fallback:(ze=e.previewTheme.colors)==null?void 0:ze.btnPressed,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.btnPressedTextColorLocal,"onUpdate:modelValue":t[57]||(t[57]=f=>e.btnPressedTextColorLocal=f),name:"btnPressedTextColor",fallback:(He=e.previewTheme.colors)==null?void 0:He.btnPressedText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnPressedText},null,8,["contrast"]),l(u,{modelValue:e.btnPressedPanelTextColorLocal,"onUpdate:modelValue":t[58]||(t[58]=f=>e.btnPressedPanelTextColorLocal=f),name:"btnPressedPanelTextColor",fallback:(T=e.previewTheme.colors)==null?void 0:T.btnPressedPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnPressedPanelText},null,8,["contrast"]),l(u,{modelValue:e.btnPressedTopBarTextColorLocal,"onUpdate:modelValue":t[59]||(t[59]=f=>e.btnPressedTopBarTextColorLocal=f),name:"btnPressedTopBarTextColor",fallback:(I=e.previewTheme.colors)==null?void 0:I.btnPressedTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnPressedTopBarText},null,8,["contrast"]),s("h5",null,o(e.$t("settings.style.advanced_colors.disabled")),1),l(u,{modelValue:e.btnDisabledColorLocal,"onUpdate:modelValue":t[60]||(t[60]=f=>e.btnDisabledColorLocal=f),name:"btnDisabledColor",fallback:(B=e.previewTheme.colors)==null?void 0:B.btnDisabled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.btnDisabledTextColorLocal,"onUpdate:modelValue":t[61]||(t[61]=f=>e.btnDisabledTextColorLocal=f),name:"btnDisabledTextColor",fallback:(F=e.previewTheme.colors)==null?void 0:F.btnDisabledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.btnDisabledPanelTextColorLocal,"onUpdate:modelValue":t[62]||(t[62]=f=>e.btnDisabledPanelTextColorLocal=f),name:"btnDisabledPanelTextColor",fallback:(W=e.previewTheme.colors)==null?void 0:W.btnDisabledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.btnDisabledTopBarTextColorLocal,"onUpdate:modelValue":t[63]||(t[63]=f=>e.btnDisabledTopBarTextColorLocal=f),name:"btnDisabledTopBarTextColor",fallback:(se=e.previewTheme.colors)==null?void 0:se.btnDisabledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),s("h5",null,o(e.$t("settings.style.advanced_colors.toggled")),1),l(u,{modelValue:e.btnToggledColorLocal,"onUpdate:modelValue":t[64]||(t[64]=f=>e.btnToggledColorLocal=f),name:"btnToggledColor",fallback:(x=e.previewTheme.colors)==null?void 0:x.btnToggled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.btnToggledTextColorLocal,"onUpdate:modelValue":t[65]||(t[65]=f=>e.btnToggledTextColorLocal=f),name:"btnToggledTextColor",fallback:(Z=e.previewTheme.colors)==null?void 0:Z.btnToggledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnToggledText},null,8,["contrast"]),l(u,{modelValue:e.btnToggledPanelTextColorLocal,"onUpdate:modelValue":t[66]||(t[66]=f=>e.btnToggledPanelTextColorLocal=f),name:"btnToggledPanelTextColor",fallback:(Se=e.previewTheme.colors)==null?void 0:Se.btnToggledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnToggledPanelText},null,8,["contrast"]),l(u,{modelValue:e.btnToggledTopBarTextColorLocal,"onUpdate:modelValue":t[67]||(t[67]=f=>e.btnToggledTopBarTextColorLocal=f),name:"btnToggledTopBarTextColor",fallback:(ve=e.previewTheme.colors)==null?void 0:ve.btnToggledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.btnToggledTopBarText},null,8,["contrast"])]),s("div",xf,[s("h4",null,o(e.$t("settings.style.advanced_colors.tabs")),1),l(u,{modelValue:e.tabColorLocal,"onUpdate:modelValue":t[68]||(t[68]=f=>e.tabColorLocal=f),name:"tabColor",fallback:(he=e.previewTheme.colors)==null?void 0:he.tab,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.tabTextColorLocal,"onUpdate:modelValue":t[69]||(t[69]=f=>e.tabTextColorLocal=f),name:"tabTextColor",fallback:(ce=e.previewTheme.colors)==null?void 0:ce.tabText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.tabText},null,8,["contrast"]),l(u,{modelValue:e.tabActiveTextColorLocal,"onUpdate:modelValue":t[70]||
27(t[70]=f=>e.tabActiveTextColorLocal=f),name:"tabActiveTextColor",fallback:(Le=e.previewTheme.colors)==null?void 0:Le.tabActiveText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(k,{contrast:e.previewContrast.tabActiveText},null,8,["contrast"])]),s("div",eg,[s("h4",null,o(e.$t("settings.style.advanced_colors.borders")),1),l(u,{modelValue:e.borderColorLocal,"onUpdate:modelValue":t[71]||(t[71]=f=>e.borderColorLocal=f),name:"borderColor",fallback:(be=e.previewTheme.colors)==null?void 0:be.border,label:e.$t("settings.style.common.color")},null,8,["modelValue","fallback","label"]),l($,{modelValue:e.borderOpacityLocal,"onUpdate:modelValue":t[72]||(t[72]=f=>e.borderOpacityLocal=f),name:"borderOpacity",fallback:(We=e.previewTheme.opacity)==null?void 0:We.border,disabled:e.borderColorLocal==="transparent"},null,8,["modelValue","fallback","disabled"])]),s("div",tg,[s("h4",null,o(e.$t("settings.style.advanced_colors.faint_text")),1),l(u,{modelValue:e.faintColorLocal,"onUpdate:modelValue":t[73]||(t[73]=f=>e.faintColorLocal=f),name:"faintColor",fallback:(nt=e.previewTheme.colors)==null?void 0:nt.faint,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.faintLinkColorLocal,"onUpdate:modelValue":t[74]||(t[74]=f=>e.faintLinkColorLocal=f),name:"faintLinkColor",fallback:(at=e.previewTheme.colors)==null?void 0:at.faintLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.panelFaintColorLocal,"onUpdate:modelValue":t[75]||(t[75]=f=>e.panelFaintColorLocal=f),name:"panelFaintColor",fallback:(it=e.previewTheme.colors)==null?void 0:it.panelFaint,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),l($,{modelValue:e.faintOpacityLocal,"onUpdate:modelValue":t[76]||(t[76]=f=>e.faintOpacityLocal=f),name:"faintOpacity",fallback:(rt=e.previewTheme.opacity)==null?void 0:rt.faint},null,8,["modelValue","fallback"])]),s("div",sg,[s("h4",null,o(e.$t("settings.style.advanced_colors.underlay")),1),l(u,{modelValue:e.underlayColorLocal,"onUpdate:modelValue":t[77]||(t[77]=f=>e.underlayColorLocal=f),name:"underlay",label:e.$t("settings.style.advanced_colors.underlay"),fallback:(hs=e.previewTheme.colors)==null?void 0:hs.underlay},null,8,["modelValue","label","fallback"]),l($,{modelValue:e.underlayOpacityLocal,"onUpdate:modelValue":t[78]||(t[78]=f=>e.underlayOpacityLocal=f),name:"underlayOpacity",fallback:(fs=e.previewTheme.opacity)==null?void 0:fs.underlay,disabled:e.underlayOpacityLocal==="transparent"},null,8,["modelValue","fallback","disabled"])]),s("div",og,[s("h4",null,o(e.$t("settings.style.advanced_colors.wallpaper")),1),l(u,{modelValue:e.wallpaperColorLocal,"onUpdate:modelValue":t[79]||(t[79]=f=>e.wallpaperColorLocal=f),name:"wallpaper",label:e.$t("settings.style.advanced_colors.wallpaper"),fallback:(gs=e.previewTheme.colors)==null?void 0:gs.wallpaper},null,8,["modelValue","label","fallback"])]),s("div",lg,[s("h4",null,o(e.$t("settings.style.advanced_colors.poll")),1),l(u,{modelValue:e.pollColorLocal,"onUpdate:modelValue":t[80]||(t[80]=f=>e.pollColorLocal=f),name:"poll",label:e.$t("settings.background"),fallback:(bs=e.previewTheme.colors)==null?void 0:bs.poll},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.pollTextColorLocal,"onUpdate:modelValue":t[81]||(t[81]=f=>e.pollTextColorLocal=f),name:"pollText",label:e.$t("settings.text"),fallback:(vs=e.previewTheme.colors)==null?void 0:vs.pollText},null,8,["modelValue","label","fallback"])]),s("div",ng,[s("h4",null,o(e.$t("settings.style.advanced_colors.icons")),1),l(u,{modelValue:e.iconColorLocal,"onUpdate:modelValue":t[82]||(t[82]=f=>e.iconColorLocal=f),name:"icon",label:e.$t("settings.style.advanced_colors.icons"),fallback:($s=e.previewTheme.colors)==null?void 0:$s.icon},null,8,["modelValue","label","fallback"])]),s("div",ag,[s("h4",null,o(e.$t("settings.style.advanced_colors.highlight")),1),l(u,{modelValue:e.highlightColorLocal,"onUpdate:modelValue":t[83]||(t[83]=f=>e.highlightColorLocal=f),name:"highlight",label:e.$t("settings.background"),fallback:(ys=e.previewTheme.colors)==null?void 0:ys.highlight},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.highlightTextColorLocal,"onUpdate:modelValue":t[84]||(t[84]=f=>e.highlightTextColorLocal=f),name:"highlightText",label:e.$t("settings.text"),fallback:(ks=e.previewTheme.colors)==null?void 0:ks.highlightText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.highlightText},null,8,["contrast"]),l(u,{modelValue:e.highlightLinkColorLocal,"onUpdate:modelValue":t[85]||(t[85]=f=>e.highlightLinkColorLocal=f),name:"highlightLink",label:e.$t("settings.links"),fallback:(ws=e.previewTheme.colors)==null?void 0:ws.highlightLink},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.highlightLink},null,8,["contrast"])]),s("div",ig,[s("h4",null,o(e.$t("settings.style.advanced_colors.popover")),1),l(u,{modelValue:e.popoverColorLocal,"onUpdate:modelValue":t[86]||(t[86]=f=>e.popoverColorLocal=f),name:"popover",label:e.$t("settings.background"),fallback:(Cs=e.previewTheme.colors)==null?void 0:Cs.popover},null,8,["modelValue","label","fallback"]),l($,{modelValue:e.popoverOpacityLocal,"onUpdate:modelValue":t[87]||(t[87]=f=>e.popoverOpacityLocal=f),name:"popoverOpacity",fallback:(Vs=e.previewTheme.opacity)==null?void 0:Vs.popover,disabled:e.popoverOpacityLocal==="transparent"},null,8,["modelValue","fallback","disabled"]),l(u,{modelValue:e.popoverTextColorLocal,"onUpdate:modelValue":t[88]||(t[88]=f=>e.popoverTextColorLocal=f),name:"popoverText",label:e.$t("settings.text"),fallback:(Ts=e.previewTheme.colors)==null?void 0:Ts.popoverText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.popoverText},null,8,["contrast"]),l(u,{modelValue:e.popoverLinkColorLocal,"onUpdate:modelValue":t[89]||(t[89]=f=>e.popoverLinkColorLocal=f),name:"popoverLink",label:e.$t("settings.links"),fallback:(Ss=e.previewTheme.colors)==null?void 0:Ss.popoverLink},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.popoverLink},null,8,["contrast"])]),s("div",rg,[s("h4",null,o(e.$t("settings.style.advanced_colors.selectedPost")),1),l(u,{modelValue:e.selectedPostColorLocal,"onUpdate:modelValue":t[90]||(t[90]=f=>e.selectedPostColorLocal=f),name:"selectedPost",label:e.$t("settings.background"),fallback:(Ls=e.previewTheme.colors)==null?void 0:Ls.selectedPost},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.selectedPostTextColorLocal,"onUpdate:modelValue":t[91]||(t[91]=f=>e.selectedPostTextColorLocal=f),name:"selectedPostText",label:e.$t("settings.text"),fallback:(Ps=e.previewTheme.colors)==null?void 0:Ps.selectedPostText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.selectedPostText},null,8,["contrast"]),l(u,{modelValue:e.selectedPostLinkColorLocal,"onUpdate:modelValue":t[92]||(t[92]=f=>e.selectedPostLinkColorLocal=f),name:"selectedPostLink",label:e.$t("settings.links"),fallback:(_s=e.previewTheme.colors)==null?void 0:_s.selectedPostLink},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.selectedPostLink},null,8,["contrast"])]),s("div",dg,[s("h4",null,o(e.$t("settings.style.advanced_colors.selectedMenu")),1),l(u,{modelValue:e.selectedMenuColorLocal,"onUpdate:modelValue":t[93]||(t[93]=f=>e.selectedMenuColorLocal=f),name:"selectedMenu",label:e.$t("settings.background"),fallback:(Is=e.previewTheme.colors)==null?void 0:Is.selectedMenu},null,8,["modelValue","label","fallback"]),l(u,{modelValue:e.selectedMenuTextColorLocal,"onUpdate:modelValue":t[94]||(t[94]=f=>e.selectedMenuTextColorLocal=f),name:"selectedMenuText",label:e.$t("settings.text"),fallback:(Es=e.previewTheme.colors)==null?void 0:Es.selectedMenuText},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.selectedMenuText},null,8,["contrast"]),l(u,{modelValue:e.selectedMenuLinkColorLocal,"onUpdate:modelValue":t[95]||(t[95]=f=>e.selectedMenuLinkColorLocal=f),name:"selectedMenuLink",label:e.$t("settings.links"),fallback:(Us=e.previewTheme.colors)==null?void 0:Us.selectedMenuLink},null,8,["modelValue","label","fallback"]),l(k,{contrast:e.previewContrast.selectedMenuLink},null,8,["contrast"])]),s("div",ug,[s("h4",null,o(e.$t("chats.chats")),1),l(u,{modelValue:e.chatBgColorLocal,"onUpdate:modelValue":t[96]||(t[96]=f=>e.chatBgColorLocal=f),name:"chatBgColor",fallback:(As=e.previewTheme.colors)==null?void 0:As.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),s("h5",null,o(e.$t("settings.style.advanced_colors.chat.incoming")),1),l(u,{modelValue:e.chatMessageIncomingBgColorLocal,"onUpdate:modelValue":t[97]||(t[97]=f=>e.chatMessageIncomingBgColorLocal=f),name:"chatMessageIncomingBgColor",fallback:(Bs=e.previewTheme.colors)==null?void 0:Bs.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageIncomingTextColorLocal,"onUpdate:modelValue":t[98]||(t[98]=f=>e.chatMessageIncomingTextColorLocal=f),name:"chatMessageIncomingTextColor",fallback:(Fs=e.previewTheme.colors)==null?void 0:Fs.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageIncomingLinkColorLocal,"onUpdate:modelValue":t[99]||(t[99]=f=>e.chatMessageIncomingLinkColorLocal=f),name:"chatMessageIncomingLinkColor",fallback:(Os=e.previewTheme.colors)==null?void 0:Os.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageIncomingBorderColorLocal,"onUpdate:modelValue":t[100]||(t[100]=f=>e.chatMessageIncomingBorderColorLocal=f),name:"chatMessageIncomingBorderLinkColor",fallback:(Ds=e.previewTheme.colors)==null?void 0:Ds.fg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"]),s("h5",null,o(e.$t("settings.style.advanced_colors.chat.outgoing")),1),l(u,{modelValue:e.chatMessageOutgoingBgColorLocal,"onUpdate:modelValue":t[101]||(t[101]=f=>e.chatMessageOutgoingBgColorLocal=f),name:"chatMessageOutgoingBgColor",fallback:(Rs=e.previewTheme.colors)==null?void 0:Rs.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageOutgoingTextColorLocal,"onUpdate:modelValue":t[102]||(t[102]=f=>e.chatMessageOutgoingTextColorLocal=f),name:"chatMessageOutgoingTextColor",fallback:(Ms=e.previewTheme.colors)==null?void 0:Ms.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageOutgoingLinkColorLocal,"onUpdate:modelValue":t[103]||(t[103]=f=>e.chatMessageOutgoingLinkColorLocal=f),name:"chatMessageOutgoingLinkColor",fallback:(Ns=e.previewTheme.colors)==null?void 0:Ns.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),l(u,{modelValue:e.chatMessageOutgoingBorderColorLocal,"onUpdate:modelValue":t[104]||(t[104]=f=>e.chatMessageOutgoingBorderColorLocal=f),name:"chatMessageOutgoingBorderLinkColor",fallback:(js=e.previewTheme.colors)==null?void 0:js.bg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"])])],8,Wf),s("div",{label:e.$t("settings.style.radii._tab_label"),class:"radius-container"},[s("div",pg,[s("p",null,o(e.$t("settings.radii_help")),1),s("button",{class:"btn button-default",onClick:t[105]||(t[105]=(...f)=>e.clearRoundness&&e.clearRoundness(...f))},o(e.$t("settings.style.switcher.clear_all")),1)]),l(v,{modelValue:e.btnRadiusLocal,"onUpdate:modelValue":t[106]||(t[106]=f=>e.btnRadiusLocal=f),name:"btnRadius",label:e.$t("settings.btnRadius"),fallback:(qs=e.previewTheme.radii)==null?void 0:qs.btn,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.inputRadiusLocal,"onUpdate:modelValue":t[107]||(t[107]=f=>e.inputRadiusLocal=f),name:"inputRadius",label:e.$t("settings.inputRadius"),fallback:(zs=e.previewTheme.radii)==null?void 0:zs.input,max:"9","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.checkboxRadiusLocal,"onUpdate:modelValue":t[108]||(t[108]=f=>e.checkboxRadiusLocal=f),name:"checkboxRadius",label:e.$t("settings.checkboxRadius"),fallback:(Hs=e.previewTheme.radii)==null?void 0:Hs.checkbox,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.panelRadiusLocal,"onUpdate:modelValue":t[109]||(t[109]=f=>e.panelRadiusLocal=f),name:"panelRadius",label:e.$t("settings.panelRadius"),fallback:(Ws=e.previewTheme.radii)==null?void 0:Ws.panel,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.avatarRadiusLocal,"onUpdate:modelValue":t[110]||(t[110]=f=>e.avatarRadiusLocal=f),name:"avatarRadius",label:e.$t("settings.avatarRadius"),fallback:(Ks=e.previewTheme.radii)==null?void 0:Ks.avatar,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.avatarAltRadiusLocal,"onUpdate:modelValue":t[111]||(t[111]=f=>e.avatarAltRadiusLocal=f),name:"avatarAltRadius",label:e.$t("settings.avatarAltRadius"),fallback:(Gs=e.previewTheme.radii)==null?void 0:Gs.avatarAlt,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.attachmentRadiusLocal,"onUpdate:modelValue":t[112]||(t[112]=f=>e.attachmentRadiusLocal=f),name:"attachmentRadius",label:e.$t("settings.attachmentRadius"),fallback:(Js=e.previewTheme.radii)==null?void 0:Js.attachment,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.tooltipRadiusLocal,"onUpdate:modelValue":t[113]||(t[113]=f=>e.tooltipRadiusLocal=f),name:"tooltipRadius",label:e.$t("settings.tooltipRadius"),fallback:(Ys=e.previewTheme.radii)==null?void 0:Ys.tooltip,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),l(v,{modelValue:e.chatMessageRadiusLocal,"onUpdate:modelValue":t[114]||(t[114]=f=>e.chatMessageRadiusLocal=f),name:"chatMessageRadius",label:e.$t("settings.chatMessageRadius"),fallback:((
27Qs=e.previewTheme.radii)==null?void 0:Qs.chatMessage)||2,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"])],8,cg),s("div",{label:e.$t("settings.style.shadows._tab_label"),class:"shadow-container"},[s("div",hg,[s("div",fg,[b(o(e.$t("settings.style.shadows.component"))+" "+o(" ")+" ",1),l(i,{id:"shadow-switcher",modelValue:e.shadowSelected,"onUpdate:modelValue":t[115]||(t[115]=f=>e.shadowSelected=f),class:"shadow-switcher"},{default:h(()=>[(p(!0),g(Y,null,ee(e.shadowsAvailable,f=>(p(),g("option",{key:f,value:f},o(e.$t("settings.style.shadows.components."+f)),9,gg))),128))]),_:1},8,["modelValue"])]),s("div",bg,[l(c,{id:"override",modelValue:e.currentShadowOverriden,"onUpdate:modelValue":t[116]||(t[116]=f=>e.currentShadowOverriden=f),name:"override",class:"input-override"},{default:h(()=>[b(o(e.$t("settings.style.shadows.override")),1)]),_:1},8,["modelValue"])]),s("button",{class:"btn button-default",onClick:t[117]||(t[117]=(...f)=>e.clearShadows&&e.clearShadows(...f))},o(e.$t("settings.style.switcher.clear_all")),1)]),l(y,{modelValue:e.currentShadow,"onUpdate:modelValue":t[118]||(t[118]=f=>e.currentShadow=f),"separate-inset":e.shadowSelected==="avatar"||e.shadowSelected==="avatarStatus",fallback:e.currentShadowFallback,"static-vars":e.previewTheme.colors,compact:!0},null,8,["modelValue","separate-inset","fallback","static-vars"])],8,mg),s("div",{label:e.$t("settings.style.fonts._tab_label"),class:"fonts-container"},[s("div",$g,[s("p",null,o(e.$t("settings.style.fonts.help")),1),s("button",{class:"btn button-default",onClick:t[119]||(t[119]=(...f)=>e.clearFonts&&e.clearFonts(...f))},o(e.$t("settings.style.switcher.clear_all")),1)]),l(S,{modelValue:e.fontsLocal.interface,"onUpdate:modelValue":t[120]||(t[120]=f=>e.fontsLocal.interface=f),name:"ui",label:e.$t("settings.style.fonts.components.interface"),fallback:(Xs=e.previewTheme.fonts)==null?void 0:Xs.interface,"no-inherit":"1"},null,8,["modelValue","label","fallback"]),l(S,{modelValue:e.fontsLocal.input,"onUpdate:modelValue":t[121]||(t[121]=f=>e.fontsLocal.input=f),name:"input",label:e.$t("settings.style.fonts.components.input"),fallback:(Zs=e.previewTheme.fonts)==null?void 0:Zs.input},null,8,["modelValue","label","fallback"]),l(S,{modelValue:e.fontsLocal.post,"onUpdate:modelValue":t[122]||(t[122]=f=>e.fontsLocal.post=f),name:"post",label:e.$t("settings.style.fonts.components.post"),fallback:(xs=e.previewTheme.fonts)==null?void 0:xs.post},null,8,["modelValue","label","fallback"]),l(S,{modelValue:e.fontsLocal.postCode,"onUpdate:modelValue":t[123]||(t[123]=f=>e.fontsLocal.postCode=f),name:"postCode",label:e.$t("settings.style.fonts.components.postCode"),fallback:(eo=e.previewTheme.fonts)==null?void 0:eo.postCode},null,8,["modelValue","label","fallback"])],8,vg)]}),_:1})],1024)),e.isActive?(p(),H($t,{key:0,to:"#unscrolled-content"},[s("div",yg,[s("button",{class:"btn button-default submit",disabled:!e.themeValid,onClick:t[124]||(t[124]=(...P)=>e.setCustomTheme&&e.setCustomTheme(...P))},o(e.$t("general.apply")),9,kg),s("button",{class:"btn button-default",onClick:t[125]||(t[125]=(...P)=>e.clearAll&&e.clearAll(...P))},o(e.$t("settings.style.switcher.reset")),1)])])):V("",!0)])}const Cg=G($f,[["render",wg]]),Vg={components:{Checkbox:ue},props:["name","label","modelValue","fallback","disabled"],emits:["update:modelValue"],computed:{present(){return typeof this.modelValue<"u"}}},Tg=["for"],Sg=["id","value","disabled"];function Lg(e,t,n,a,r,d){const i=w("Checkbox");return p(),g("div",{class:K(["roundness-control style-control",{disabled:!d.present||n.disabled}])},[s("label",{for:n.name,class:K(["label",{faint:!d.present||n.disabled}])},o(n.label),11,Tg),typeof n.fallback<"u"?(p(),H(i,{key:0,"model-value":d.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=c=>e.$emit("update:modelValue",d.present?void 0:n.fallback))},null,8,["model-value","disabled"])):V("",!0),s("input",{id:n.name,class:K(["input input-number",{disabled:!d.present||n.disabled}]),type:"number",value:n.modelValue||n.fallback,disabled:!d.present||n.disabled,max:"999",min:"0",step:"1",onInput:t[1]||(t[1]=c=>e.$emit("update:modelValue",c.target.value))},null,42,Sg)],2)}const Pg=G(Vg,[["render",Lg]]),_g={components:{Select:_e,SelectMotion:ps,ShadowControl:ms,ColorInput:Qe},props:["modelValue"],emits:["update:modelValue"],setup(e,t){const n={},a=t.emit;n.emit=a,n.computeColor=Tt("computeColor"),n.staticVars=Tt("staticVars");const r=de(0);n.selectedVirtualDirectiveId=r;const d=J({get(){return e.modelValue[r.value]},set(u){const $=[...e.modelValue];$[r.value]=u,a("update:modelValue",$)}});n.selectedVirtualDirective=d,n.selectedVirtualDirectiveValType=J({get(){return e.modelValue[r.value].valType},set(u){const $=u;let k;switch(u){case"shadow":k="0 0 0 #000000 / 1";break;case"color":k="#000000";break;default:k="none"}const v=e.modelValue[r.value].name;e.modelValue[r.value]={name:v,value:k,valType:$}}});const i=de(!0),c=de({});n.draftVirtualDirective=c;const m=Tt("normalizeShadows");return Oe(d,u=>{switch(u.valType){case"shadow":{if(Array.isArray(u.value))c.value=m(u.value);else{const $=u.value.split(/,/g).map(k=>k.trim());c.value=m($)}break}case"color":c.value=u.value;break;default:c.value=u.value;break}},{immediate:!0}),Oe(c,u=>{try{switch(d.value.valType){case"shadow":{e.modelValue[r.value].value=u.map($=>gt($)).join(", ");break}default:e.modelValue[r.value].value=u}i.value=!0}catch($){console.error("Invalid virtual directive value",$),i.value=!1}},{immediate:!0}),n.getNewVirtualDirective=()=>({name:"newDirective",valType:"generic",value:"foobar"}),n}},Ig={class:"setting-section list-editor variables-editor"},Eg={class:"list-select-label",for:"variables-selector"},Ug=["value"],Ag={class:"list-edit-area"},Bg={class:"variable-selector"},Fg={class:"variable-name-label",for:"variables-selector"},Og={class:"variable-type-label",for:"variables-selector"},Dg={value:"shadow"},Rg={value:"color"},Mg={value:"generic"};function Ng(e,t,n,a,r,d){const i=w("Select"),c=w("SelectMotion"),m=w("ShadowControl"),u=w("ColorInput");return p(),g("div",Ig,[s("label",Eg,o(e.$t("settings.style.themes3.editor.variables.label"))+" "+o(" "),1),l(i,{id:"variables-selector",modelValue:e.selectedVirtualDirectiveId,"onUpdate:modelValue":t[0]||(t[0]=$=>e.selectedVirtualDirectiveId=$),class:"list-select",size:"20"},{default:h(()=>[(p(!0),g(Y,null,ee(e.modelValue,($,k)=>(p(),g("option",{key:$.name,value:k},o($.name),9,Ug))),128))]),_:1},8,["modelValue"]),l(c,{class:"list-select-movement","model-value":e.modelValue,"selected-id":e.selectedVirtualDirectiveId,"get-add-value":e.getNewVirtualDirective,"onUpdate:modelValue":t[1]||(t[1]=$=>e.emit("update:modelValue",$)),"onUpdate:selectedId":t[2]||(t[2]=$=>e.selectedVirtualDirectiveId=$)},null,8,["model-value","selected-id","get-add-value"]),s("div",Ag,[s("div",Bg,[s("label",Fg,o(e.$t("settings.style.themes3.editor.variables.name_label"))+" "+o(" "),1),te(s("input",{"onUpdate:modelValue":t[3]||(t[3]=$=>e.selectedVirtualDirective.name=$),class:"input"},null,512),[[ae,e.selectedVirtualDirective.name]]),s("label",Og,o(e.$t("settings.style.themes3.editor.variables.type_label"))+" "+o(" "),1),l(i,{modelValue:e.selectedVirtualDirectiveValType,"onUpdate:modelValue":t[4]||(t[4]=$=>e.selectedVirtualDirectiveValType=$)},{default:h(()=>[s("option",Dg,o(e.$t("settings.style.themes3.editor.variables.type_shadow")),1),s("option",Rg,o(e.$t("settings.style.themes3.editor.variables.type_color")),1),s("option",Mg,o(e.$t("settings.style.themes3.editor.variables.type_generic")),1
27)]),_:1},8,["modelValue"])]),e.selectedVirtualDirectiveValType==="shadow"?(p(),H(m,{key:0,modelValue:e.draftVirtualDirective,"onUpdate:modelValue":t[5]||(t[5]=$=>e.draftVirtualDirective=$),"static-vars":e.staticVars,compact:!0},null,8,["modelValue","static-vars"])):V("",!0),e.selectedVirtualDirectiveValType==="color"?(p(),H(u,{key:1,modelValue:e.draftVirtualDirective,"onUpdate:modelValue":t[6]||(t[6]=$=>e.draftVirtualDirective=$),name:"virtual-directive-color",fallback:e.computeColor(e.draftVirtualDirective),label:e.$t("settings.style.themes3.editor.variables.virtual_color"),"hide-optional-checkbox":!0},null,8,["modelValue","fallback","label"])):V("",!0)])])}const jg=G(_g,[["render",Ng]]),Zt=e=>["normal",...(e==null?void 0:e.filter(t=>t!=="normal"))||[]].join(":");pe.add(jn,qn,zn,Hn,Wn);const qg={components:{Select:_e,SelectMotion:ps,Checkbox:ue,Tooltip:nl,StringSetting:rl,ComponentPreview:ll,TabSwitcher:ss,ShadowControl:ms,ColorInput:Qe,PaletteEditor:ol,OpacityInput:cs,RoundnessInput:Pg,ContrastRatio:al,Preview:us,VirtualDirectivesTab:jg},setup(){const e={},t=Q(),n=de(t.styleDataUsed||{}),a=J(()=>t.styleDataUsed);Oe([a],()=>{Ve(t.styleDataUsed)},{once:!0}),e.isActive=J(()=>{const T=un().parent.ctx;return T?T.isActive("style"):!1}),e.name=de(""),e.author=de(""),e.license=de(""),e.website=de("");const r=J(()=>["@meta {",` name: ${e.name.value};`,` author: ${e.author.value};`,` license: ${e.license.value};`,` website: ${e.website.value};`,"}"].join(` 28`)),d=J(()=>({component:"@meta",directives:{name:e.name.value,author:e.author.value,license:e.license.value,website:e.website.value}})),i=no([{name:"default",bg:"#121a24",fg:"#182230",text:"#b9b9ba",link:"#d8a070",accent:"#d8a070",cRed:"#FF0000",cBlue:"#0095ff",cGreen:"#0fa00f",cOrange:"#ffa500"},{name:"light",bg:"#f2f6f9",fg:"#d6dfed",text:"#304055",underlay:"#5d6086",accent:"#f55b1b",cBlue:"#0095ff",cRed:"#d31014",cGreen:"#0fa00f",cOrange:"#ffa500",border:"#d8e6f9"}]);e.palettes=i;const c=T=>{i.splice(0,i.length),i.push(...T)};e.onPalettesUpdate=c;const m=de(0),u=J({get(){return i[m.value]},set(T){i[m.value]=T}});e.selectedPaletteId=m,e.selectedPalette=u,ct("selectedPalette",u),Oe([u],()=>oe()),e.getNewPalette=()=>({name:"new palette",bg:"#121a24",fg:"#182230",text:"#b9b9ba",link:"#d8a070",accent:"#d8a070",cRed:"#FF0000",cBlue:"#0095ff",cGreen:"#0fa00f",cOrange:"#ffa500"});const $=J(()=>i.map(T=>{const{name:I,...B}=T;return{component:"@palette",variant:I,directives:Object.entries(B).filter(([F,W])=>W&&F).reduce((F,[W,se])=>({...F,[W]:se}),{})}})),k=J(()=>i.map(({name:T,...I})=>{const B=Object.entries(I).filter(([F,W])=>W&&F).map(([F,W])=>` ${F}: ${W};`).join(` 29`);return`@palette.${T} { 30${B} 31}`}).join(` 32 33`)),v=Object.assign({"/src/components/alert.style.js":Mn,"/src/components/badge.style.js":Rn,"/src/components/border.style.js":Dn,"/src/components/button.style.js":On,"/src/components/button_unstyled.style.js":Fn,"/src/components/chat/chat.style.js":Bn,"/src/components/chat_message/chat_message.style.js":An,"/src/components/fun_text.style.js":Un,"/src/components/icon.style.js":En,"/src/components/input.style.js":In,"/src/components/link.style.js":_n,"/src/components/menu_item.style.js":Pn,"/src/components/mobile_drawer.style.js":Ln,"/src/components/modal/modals.style.js":Sn,"/src/components/notification/notification.style.js":Tn,"/src/components/panel.style.js":Vn,"/src/components/panel_header.style.js":Cn,"/src/components/poll/poll_graph.style.js":wn,"/src/components/popover.style.js":kn,"/src/components/root.style.js":yn,"/src/components/scrollbar.style.js":$n,"/src/components/scrollbar_element.style.js":vn,"/src/components/status/post.style.js":bn,"/src/components/tab_switcher/tab.style.js":gn,"/src/components/text.style.js":fn,"/src/components/top_bar.style.js":hn,"/src/components/underlay.style.js":mn,"/src/components/user_avatar/avatar.style.js":pn,"/src/components/user_card/user_card.style.js":cn}),y=Object.keys(v),S=new Map(y.map(T=>[T,v[T].default]).filter(([,T])=>!T.virtual&&!T.notEditable));e.componentsMap=S;const L=[...S.keys()];e.componentKeys=L;const P=de(S.keys().next().value);
33e.selectedComponentKey=P;const E=J(()=>S.get(P.value)),j=J(()=>E.value.name);e.selectedComponentVariants=J(()=>Object.keys({normal:null,...E.value.variants||{}})),e.selectedComponentStates=J(()=>Object.keys({normal:null,...E.value.states||{}}).filter(I=>I!=="normal"));const R=de("normal");e.selectedVariant=R;const A=no(new Set);e.selectedState=A,e.updateSelectedStates=(T,I)=>{I?A.add(T):A.delete(T)},Oe(j,()=>{R.value="normal",A.clear()});const C=(T,I={})=>T.reduce((B,F)=>{const{parent:W,component:se}=F,x=W??F,Z=!!W,Se=Z?F:null,{component:ve,variant:he="normal",state:ce=[]}=x,Le=`${Z?ve:se}.${he}.${Zt(ce)}`;let be=ne.get(B,Le);if(be||(ne.set(B,Le,{}),be=ne.get(B,Le)),Z){be._children=be._children??{};const{component:We,variant:nt="normal",state:at=[],directives:it}=Se,rt=`${We}.${nt}.${Zt(at)}`;ne.set(be._children,rt,{directives:it})}else be.directives=x.directives;return B},I),O=J(()=>{const T={};return L.forEach(I=>{const B=S.get(I),{defaultRules:F,name:W}=B;C(F.map(se=>({...se,component:W})),T)}),T});e.componentHas=T=>{var I;return!!((I=E.value.validInnerComponents)!=null&&I.find(B=>B===T))};const D=(T,I)=>{const B=T?`._children.${T}.normal.normal`:"";return`${j.value}.${R.value}.${Zt([...A])}${B}.directives.${I}`},U=(T,I,B="")=>J({get(){return ne.get(n.value,D(T,I))!=null},set(F){if(F){const W=ne.get(O.value,D(T,I));ne.set(n.value,D(T,I),W??B)}else ne.unset(n.value,D(T,I));e.updateOverallPreview()}}),M=(T,I,B=F=>F)=>J({get(){let F;const W=O.value,se=n.value,x=D(T,I);return F=ne.get(se,x),F===""?F:(F||(F=ne.get(W,x)),B(F))},set(F){F!=null?ne.set(n.value,D(T,I),F):ne.unset(n.value,D(T,I)),e.updateOverallPreview()}});e.editedBackgroundColor=M(null,"background"),e.isBackgroundColorPresent=U(null,"background","#FFFFFF"),e.editedOpacity=M(null,"opacity"),e.isOpacityPresent=U(null,"opacity",1),e.editedRoundness=M(null,"roundness"),e.isRoundnessPresent=U(null,"roundness","0"),e.editedTextColor=M("Text","textColor"),e.isTextColorPresent=U("Text","textColor","#000000"),e.editedTextAuto=M("Text","textAuto"),e.isTextAutoPresent=U("Text","textAuto","#000000"),e.editedLinkColor=M("Link","textColor"),e.isLinkColorPresent=U("Link","textColor","#000080"),e.editedIconColor=M("Icon","textColor"),e.isIconColorPresent=U("Icon","textColor","#909090"),e.editedBorderColor=M("Border","textColor"),e.isBorderColorPresent=U("Border","textColor","#909090");const q=(T,I)=>{try{const B=es(T),F=es(I),W=Nn(B,F);return{ratio:W,text:W.toPrecision(3)+":1",aa:W>=4.5,aaa:W>=7,laa:W>=3,laaa:W>=4.5}}catch(B){return console.warn("Failure computing contrast",B),{error:B}}},z=T=>T==null?void 0:T.map(I=>{if(typeof I=="object")return I;if(typeof I=="string")try{return as(I)}catch(B){return console.warn(B),I}return null});ct("normalizeShadows",z);const _=M(null,"shadow",z);e.editedShadow=_;const N=de(null);e.editedSubShadowId=N;const ie=J(()=>_.value==null||N.value==null?null:_.value[N.value]);e.editedSubShadow=ie,e.isShadowPresent=U(null,"shadow",[]),e.onSubShadow=T=>{T!=null?N.value=T:ie.value=null},e.updateSubShadow=(T,I)=>{if(!ie.value||N.value==null)return;const B=[..._.value];B[N.value]={...B[N.value],[T]:I},_.value=B},e.isShadowTabOpen=de(!1),e.onTabSwitch=T=>{e.isShadowTabOpen.value=T==="shadow"},e.editorHintStyle=J(()=>{const T=E.value.editor,I=[];return T&&Object.keys(T).length>0&&(T.aspect!=null&&I.push(`aspect-ratio: ${T.aspect} !important;`),T.border!=null&&I.push(`border-width: ${T.border}px !important;`)),I.join("; ")});const fe=J(()=>{const T=[],I=(B,F={},W)=>{Object.entries(F||{}).forEach(([x,Z])=>{Object.entries(Z).forEach(([ve,he])=>{const ce=ve.split(/:/g),Le={component:B,variant:x,state:ce,directives:he.directives||{}};W&&(Le.parent={component:W}),T.push(Le),W||Object.entries(he._children||{}).forEach(([be,We])=>I(be,We,B))})})};return[...S.values()].forEach(({name:B})=>{I(B,n.value[B])}),T}),je=[...S.values()].map(T=>T.defaultRules.filter(I=>I.component==="Root").map(I=>Object.entries(I.directives)).flat()).filter(T=>T).flat().map(([T,I])=>{const[B,F]=I.split("|");return{name:T.substring(2),valType:B==null?void 0:B.trim(),value:F==null?void 0:F.trim()}}),ge=de(je);e.virtualDirectives=ge,e.updateVirtualDirectives=T=>{ge.value=T};const qe=J(()=>({component:"Root",directives:Object.fromEntries(ge.value.map(T=>[`--${T.name}`,`${T.valType} | ${T.value}`]))})),Ie=J(()=>["Root {",...ge.value.filter(T=>T.name&&T.valType&&T.value).map(T=>` --${T.name}: ${T.valType} | ${T.value};`),"}"].join(` 34`));e.computeColor=T=>{let I;try{if(I=xt(T,{dynamicVars:Te.value,staticVars:ze.value}),I)return De(I)}catch(B){console.warn(B)}return null},ct("computeColor",e.computeColor),e.contrast=J(()=>q(e.computeColor(He.value.background),e.computeColor(He.value.text)));const Ce=Ct({filename:()=>e.name.value??"pleroma_theme",mime:"text/plain",extension:"iss",getExportedObject:()=>Ue.value}),Ve=T=>{const I=T.filter(Z=>Z.component.startsWith("@")),B=T.find(Z=>
34Z.component==="Root"),F=T.filter(Z=>!Z.component.startsWith("@")&&Z.component!=="Root"),W=I.find(Z=>Z.component==="@meta").directives,se=I.filter(Z=>Z.component==="@palette");e.name.value=W.name,e.license.value=W.license,e.author.value=W.author,e.website.value=W.website;const x=Object.entries(B.directives).map(([Z,Se])=>{const[ve,he]=Se.split("|").map(ce=>ce.trim());return{name:Z.substring(2),valType:ve,value:he}});ge.value=x,c(se.map(Z=>({name:Z.variant,...Z.directives}))),n.value=C(F),e.updateOverallPreview()},Ee=lt({accept:".iss",parser(T){return Qo(T)},onImportFailure(T){console.error("Failure importing style:",T),Q().pushGlobalNotice({messageKey:"settings.invalid_theme_imported",level:"error"})},onImport:Ve}),Fe=J(()=>[d.value,...$.value,qe.value,...fe.value]),Ue=J(()=>[r.value,k.value,Ie.value,jh(fe.value)].join(` 35 36`));e.clearStyle=()=>{Ve(t.styleDataUsed)},e.exportStyle=()=>{Ce.exportData()},e.importStyle=()=>{Ee.importData()},e.applyStyle=()=>{Q().setStyleCustom(Fe.value)};const me=de([]);e.overallPreviewRules=me,Oe([me],()=>{let T=null;try{T=ft(me.value).map(B=>B.replace("html","&"))}catch(B){console.error(B);return}const I=kt("style-tab-overall-preview",90);I.clear(),I.addRule([`#edited-style-preview { 37`,T.join(` 38`),` 39}`].join("")),I.ready=!0,wt()});const oe=ne.throttle(()=>{try{me.value=st({inputRuleset:[...Fe.value,{component:"Root",directives:Object.fromEntries(Object.entries(u.value).filter(([T,I])=>T&&I&&T!=="name").map(([T,I])=>[`--${T}`,`color | ${I}`]))}],ultimateBackgroundColor:"#000000",debug:!0}).eager}catch(T){return console.error("Could not compile preview theme",T),null}},1e3),re=(T,I)=>T.replace(I,".preview-block").replace(":active",".preview-active").replace(":hover",".preview-hover").replace(":active",".preview-active").replace(":focus",".preview-focus").replace(":focus-within",".preview-focus-within").replace(":disabled",".preview-disabled"),le=J(()=>{const T=me.value.filter(F=>{var he;const W=F.component===j.value,se=((he=F.parent)==null?void 0:he.component)===j.value;if(!W&&!se)return!1;const x=se?F.parent:F;if(x.component!==j.value||x.variant!==R.value)return!1;const Z=new Set(x.state.filter(ce=>ce!=="normal")),Se=[...Z].filter(ce=>!A.has(ce)),ve=[...A].filter(ce=>!Z.has(ce));return Se.length+ve.length===0}),B=[...T].filter(F=>F.component===j.value).sort((F,W)=>{const se=F.selector.split(/ /g).length,x=W.selector.split(/ /g).length;return se-x})[0].selector;return T.filter(F=>F.selector.startsWith(B))});e.previewClass=J(()=>{var I;const T=[];return((I=E.value.variants)!=null&&I.normal||R.value!=="normal")&&T.push(E.value.variants[R.value]),A.size>0&&A.forEach(B=>{const F=E.value.states[B];T.push(re(F))}),T.map(B=>B.substring(1)).join("")}),e.previewCss=J(()=>{try{const T=le.value[0].selector;return ft(le.value).map(B=>re(B,T)).join(` 40`)}catch(T){return console.error("Invalid ruleset",T),null}});const Te=J(()=>le.value[0].dynamicVars),ze=J(()=>{const T=me.value.find(F=>F.component==="Root"),I=Object.entries(T.directives),B={};return I.filter(([F,W])=>F.startsWith("--")&&W.startsWith("color | ")).map(([F,W])=>[F.substring(2),W.substring(8)]).forEach(([F,W])=>{B[F]=xt(W,{dynamicVars:{},staticVars:B})}),B});ct("staticVars",ze),e.staticVars=ze;const He=J(()=>{var B,F,W,se;const T=Te.value.stacked,I=typeof T=="string"?T:De(T);return{text:(B=le.value.find(x=>x.component==="Text"))==null?void 0:B.virtualDirectives["--text"],link:(F=le.value.find(x=>x.component==="Link"))==null?void 0:F.virtualDirectives["--link"],border:(W=le.value.find(x=>x.component==="Border"))==null?void 0:W.virtualDirectives["--border"],icon:(se=le.value.find(x=>x.component==="Icon"))==null?void 0:se.virtualDirectives["--icon"],background:I}});return e.previewColors=He,e.updateOverallPreview=oe,oe(),Oe([n.value,i,u,A,R],oe),e}},zg={class:"StyleTab"},Hg={class:"setting-section heading"},Wg={class:"meta-preview"},Kg={class:"style-actions-container"},Gg={class:"style-actions"},Jg={class:"setting-list style-metadata"},Yg=["label"],Qg={class:"component-selector"},Xg={for:"component-selector"},Zg=["value"],xg={key:0,class:"variant-selector"},eb={for:"variant-selector"},tb=["value"],sb={key:1,class:"state-selector"},ob={class:"state-selector-list"},lb={class:"preview-container"},nb=["label"],ab={key:2,class:"style-control suboption"},ib={value:"no-preserve"},rb={value:"no-auto"},db={value:"preserve"},ub={key:4,class:"style-control suboption"},cb={class:"label"},pb={key:5},mb=["label"],hb=["label"],fb={class:"list-select-label",for:"palette-selector"},gb=["value"],bb={class:"list-edit-area"};function vb(e,t,n,a,r,d){const i=w("Preview"),c=w("FAIcon"),m=w("StringSetting"),u=w("Select"),$=w("Checkbox"),k=w("ComponentPreview"),v=w("ColorInput"),y=w("Tooltip"),S=w("ContrastRatio"),L=w("OpacityInput"),P=w("RoundnessInput"),E=w("ShadowControl"),j=w("tab-switcher"),R=w("SelectMotion"),A=w("PaletteEditor"),X=w("VirtualDirectivesTab");return p(),g("div",zg,[s("div",Hg,[s("div",Wg,[l(i,{id:"edited-style-preview"}),e.isActive?(p(),H($t,{key:0,to:"#unscrolled-content"},[s("div",Kg,[s("div",Gg,[s("button",{class:"btn button-default button-new",onClick:t[0]||(t[0]=(...C)=>e.clearStyle&&e.clearStyle(...C))},[l(c,{icon:"arrows-rotate"}),b(" "+o(e.$t("settings.style.themes3.editor.reset_style")),1)]),s("button",{class:"btn button-default button-load",onClick:t[1]||(t[1]=(...C)=>e.importStyle&&e.importStyle(...C))},[l(c,{icon:"folder-open"}),b(" "+o(e.$t("settings.style.themes3.editor.load_style")),1)]),s("button",{class:"btn button-default button-save",onClick:t[2]||(t[2]=(...C)=>e.exportStyle&&e.exportStyle(...C))},[l(c,{icon:"floppy-disk"}),b(" "+o(e.$t("settings.style.themes3.editor.save_style")),1)]),s("button",{class:"btn button-default button-apply",onClick:t[3]||(t[3]=(...C)=>e.applyStyle&&e.applyStyle(...C))},[l(c,{icon:"check"}),b(" "+o(e.$t("settings.style.themes3.editor.apply_preview")),1)])])])])):V("",!0),s("ul",Jg,[s("li",null,[l(m,{modelValue:e.name,"onUpdate:modelValue":t[4]||(t[4]=C=>e.name=C),class:"meta-field"},{default:h(()=>[b(o(e.$t("settings.style.themes3.editor.style_name")),1)]),_:1},8,["modelValue"])]),s("li",null,[l(m,{modelValue:e.author,"onUpdate:modelValue":t[5]||(t[5]=C=>e.author=C),class:"meta-field"},{default:h(()=>[b(o(e.$t("settings.style.themes3.editor.style_author")),1)]),_:1},8,["modelValue"])]),s("li",null,[l(m,{modelValue:e.license,"onUpdate:modelValue":t[6]||(t[6]=C=>e.license=C),class:"meta-field"},{default:h(()=>[b(o(e.$t("settings.style.themes3.editor.style_license")),1)]),_:1},8,["modelValue"])]),s("li",null,[l(m,{modelValue:e.website,"onUpdate:modelValue":t[7]||(t[7]=C=>e.website=C),class:"meta-field"},{default:h(()=>[b(o(e.$t("settings.style.themes3.editor.style_website")),1)]),_:1},8,["modelValue"])])])])]),l(j,null,{default:h(()=>
40[s("div",{key:"component",class:"setting-section component-editor",label:e.$t("settings.style.themes3.editor.component_tab"),"full-width":!0},[s("div",Qg,[s("label",Xg,o(e.$t("settings.style.themes3.editor.component_selector"))+" "+o(" "),1),l(u,{id:"component-selector",modelValue:e.selectedComponentKey,"onUpdate:modelValue":t[8]||(t[8]=C=>e.selectedComponentKey=C)},{default:h(()=>[(p(!0),g(Y,null,ee(e.componentKeys,C=>(p(),g("option",{key:"component-"+C,value:C},o(e.componentsMap.get(C).name),9,Zg))),128))]),_:1},8,["modelValue"])]),e.selectedComponentVariants.length>1?(p(),g("div",xg,[s("label",eb,o(e.$t("settings.style.themes3.editor.variant_selector")),1),l(u,{modelValue:e.selectedVariant,"onUpdate:modelValue":t[9]||(t[9]=C=>e.selectedVariant=C)},{default:h(()=>[(p(!0),g(Y,null,ee(e.selectedComponentVariants,C=>(p(),g("option",{key:"component-variant-"+C,value:C},o(C),9,tb))),128))]),_:1},8,["modelValue"])])):V("",!0),e.selectedComponentStates.length>0?(p(),g("div",sb,[s("label",null,o(e.$t("settings.style.themes3.editor.states_selector")),1),s("ul",ob,[(p(!0),g(Y,null,ee(e.selectedComponentStates,C=>(p(),g("li",{key:"component-state-"+C},[l($,{value:e.selectedState.has(C),"onUpdate:modelValue":O=>e.updateSelectedStates(C,O)},{default:h(()=>[b(o(C),1)]),_:2},1032,["value","onUpdate:modelValue"])]))),128))])])):V("",!0),s("div",lb,[l(k,{class:"component-preview","show-text":e.componentHas("Text"),"shadow-control":e.isShadowTabOpen,"preview-class":e.previewClass,"preview-style":e.editorHintStyle,"preview-css":e.previewCss,disabled:!e.editedSubShadow&&typeof e.editedShadow!="string",shadow:e.editedSubShadow,"no-color-control":!0,"onUpdate:shadow":t[10]||(t[10]=({axis:C,value:O})=>e.updateSubShadow(C,O))},null,8,["show-text","shadow-control","preview-class","preview-style","preview-css","disabled","shadow"])]),l(j,{ref:"tabSwitcher",class:"component-settings","on-switch":e.onTabSwitch},{default:h(()=>[s("div",{key:"main",class:"editor-tab",label:e.$t("settings.style.themes3.editor.main_tab")},[l(v,{modelValue:e.editedBackgroundColor,"onUpdate:modelValue":t[11]||(t[11]=C=>e.editedBackgroundColor=C),name:"component-background-color",fallback:e.computeColor(e.editedBackgroundColor)??e.previewColors.background,disabled:!e.isBackgroundColorPresent,label:e.$t("settings.style.themes3.editor.background"),"hide-optional-checkbox":!0},null,8,["modelValue","fallback","disabled","label"]),l(y,{text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isBackgroundColorPresent,"onUpdate:modelValue":t[12]||(t[12]=C=>e.isBackgroundColorPresent=C)},null,8,["modelValue"])]),_:1},8,["text"]),e.componentHas("Text")?(p(),H(v,{key:0,modelValue:e.editedTextColor,"onUpdate:modelValue":t[13]||(t[13]=C=>e.editedTextColor=C),name:"component-text-color",fallback:e.computeColor(e.editedTextColor)??e.previewColors.text,label:e.$t("settings.style.themes3.editor.text_color"),disabled:!e.isTextColorPresent,"hide-optional-checkbox":!0},null,8,["modelValue","fallback","label","disabled"])):V("",!0),e.componentHas("Text")?(p(),H(y,{key:1,text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isTextColorPresent,"onUpdate:modelValue":t[14]||(t[14]=C=>e.isTextColorPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])):V("",!0),e.componentHas("Text")?(p(),g("div",ab,[s("label",{for:"textAuto",class:K(["label",{faint:!e.isTextAutoPresent}])},o(e.$t("settings.style.themes3.editor.text_auto.label")),3),l(u,{id:"textAuto",modelValue:e.editedTextAuto,"onUpdate:modelValue":t[15]||(t[15]=C=>e.editedTextAuto=C),disabled:!e.isTextAutoPresent},{default:h(()=>[s("option",ib,o(e.$t("settings.style.themes3.editor.text_auto.no-preserve")),1),s("option",rb,o(e.$t("settings.style.themes3.editor.text_auto.no-auto")),1),s("option",db,o(e.$t("settings.style.themes3.editor.text_auto.preserve")),1)]),_:1},8,["modelValue","disabled"])])):V("",!0),e.componentHas("Text")?(p(),H(y,{key:3,text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isTextAutoPresent,"onUpdate:modelValue":t[16]||(t[16]=C=>e.isTextAutoPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])):V("",!0),e.componentHas("Text")?(p(),g("div",ub,[s("label",cb,o(e.$t("settings.style.themes3.editor.contrast")),1),l(S,{"show-ratio":!0,
40contrast:e.contrast},null,8,["contrast"])])):V("",!0),e.componentHas("Text")?(p(),g("div",pb)):V("",!0),e.componentHas("Link")?(p(),H(v,{key:6,modelValue:e.editedLinkColor,"onUpdate:modelValue":t[17]||(t[17]=C=>e.editedLinkColor=C),name:"component-link-color",fallback:e.computeColor(e.editedLinkColor)??e.previewColors.link,label:e.$t("settings.style.themes3.editor.link_color"),disabled:!e.isLinkColorPresent,"hide-optional-checkbox":!0},null,8,["modelValue","fallback","label","disabled"])):V("",!0),e.componentHas("Link")?(p(),H(y,{key:7,text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isLinkColorPresent,"onUpdate:modelValue":t[18]||(t[18]=C=>e.isLinkColorPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])):V("",!0),e.componentHas("Icon")?(p(),H(v,{key:8,modelValue:e.editedIconColor,"onUpdate:modelValue":t[19]||(t[19]=C=>e.editedIconColor=C),name:"component-icon-color",fallback:e.computeColor(e.editedIconColor)??e.previewColors.icon,label:e.$t("settings.style.themes3.editor.icon_color"),disabled:!e.isIconColorPresent,"hide-optional-checkbox":!0},null,8,["modelValue","fallback","label","disabled"])):V("",!0),e.componentHas("Icon")?(p(),H(y,{key:9,text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isIconColorPresent,"onUpdate:modelValue":t[20]||(t[20]=C=>e.isIconColorPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])):V("",!0),e.componentHas("Border")?(p(),H(v,{key:10,modelValue:e.editedBorderColor,"onUpdate:modelValue":t[21]||(t[21]=C=>e.editedBorderColor=C),name:"component-border-color",fallback:e.computeColor(e.editedBorderColor)??e.previewColors.border,label:e.$t("settings.style.themes3.editor.border_color"),disabled:!e.isBorderColorPresent,"hide-optional-checkbox":!0},null,8,["modelValue","fallback","label","disabled"])):V("",!0),e.componentHas("Border")?(p(),H(y,{key:11,text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isBorderColorPresent,"onUpdate:modelValue":t[22]||(t[22]=C=>e.isBorderColorPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])):V("",!0),l(L,{modelValue:e.editedOpacity,"onUpdate:modelValue":t[23]||(t[23]=C=>e.editedOpacity=C),name:"component-opacity",disabled:!e.isOpacityPresent,label:e.$t("settings.style.themes3.editor.opacity")},null,8,["modelValue","disabled","label"]),l(y,{text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isOpacityPresent,"onUpdate:modelValue":t[24]||(t[24]=C=>e.isOpacityPresent=C)},null,8,["modelValue"])]),_:1},8,["text"]),l(P,{modelValue:e.editedRoundness,"onUpdate:modelValue":t[25]||(t[25]=C=>e.editedRoundness=C),name:"component-roundness",disabled:!e.isRoundnessPresent,label:e.$t("settings.style.themes3.editor.roundness")},null,8,["modelValue","disabled","label"]),l(y,{text:e.$t("settings.style.themes3.editor.include_in_rule")},{default:h(()=>[l($,{modelValue:e.isRoundnessPresent,"onUpdate:modelValue":t[26]||(t[26]=C=>e.isRoundnessPresent=C)},null,8,["modelValue"])]),_:1},8,["text"])],8,nb),s("div",{key:"shadow",class:"editor-tab shadow-tab",label:e.$t("settings.style.themes3.editor.shadows_tab")},[l($,{modelValue:e.isShadowPresent,"onUpdate:modelValue":t[27]||(t[27]=C=>e.isShadowPresent=C),class:"style-control"},{default:h(()=>[b(o(e.$t("settings.style.themes3.editor.include_in_rule")),1)]),_:1},8,["modelValue"]),l(E,{modelValue:e.editedShadow,"onUpdate:modelValue":t[28]||(t[28]=C=>e.editedShadow=C),disabled:!e.isShadowPresent,"no-preview":!0,compact:!0,"static-vars":e.staticVars,onSubShadowSelected:e.onSubShadow},null,8,["modelValue","disabled","static-vars","onSubShadowSelected"])],8,mb)]),_:1},8,["on-switch"])],8,Yg),s("div",{key:"palette",label:e.$t("settings.style.themes3.editor.palette_tab"),class:"setting-section list-editor palette-editor","full-width":!0},[s("label",fb,o(e.$t("settings.style.themes3.palette.label"))+" "+o(" "),1),l(u,{id:"palette-selector",modelValue:e.selectedPaletteId,"onUpdate:modelValue":t[29]||(t[29]=C=>e.selectedPaletteId=C),class:"list-select",size:"4"},{default:h(()=>[(p(!0),g(Y,null,ee(e.palettes,(C,O)=>(p(),g("option",{key:C.name,value:O},o(C.name),9,gb))),128))]),_:1},8,["modelValue"]),l(R,{class:"list-select-movement","model-value":e.palettes,"selected-id":e.selectedPaletteId,"get-add-value":e.getNewPalette,"onUpdate:modelValue":e.onPalettesUpdate,"onUpdate:selectedId":t[30]||(t[30]=C=>e.selectedPaletteId=C)},null,8,["model-value","selected-id","get-add-value","onUpdate:modelValue"]),s("div",bb,[l(m,{modelValue:e.selectedPalette.name,"onUpdate:modelValue":t[31]||(t[31]=C=>e.selectedPalette.name=C),class:"palette-name-input"},{default:h(()=>[b(o(e.$t("settings.style.themes3.palette.name_label")),1)]),_:1},8,["modelValue"]),l(A,{modelValue:e.selectedPalette,"onUpdate:modelValue":t[32]||(t[32]=C=>e.selectedPalette=C),class:"palette-editor-single"},null,8,["modelValue"])])],8,hb),l(X,{key:"variables",label:e.$t("settings.style.themes3.editor.variables_tab"),"model-value":e.virtualDirectives,"full-width":!0,"onUpdate:modelValue":e.updateVirtualDirectives},null,8,["label","model-value","onUpdate:modelValue"])]),_:1})])}const $b=G(qg,[["render",vb]]);pe.add(Kn,Gn,Jo,Jn,Yn,Qn,Xn,Zn,xn,ea,ta,sa,oa,la);const yb={components:{VerticalTabSwitcher:dl,DataImportExportTab:Fa,MutesAndBlocksTab:Ui,NotificationsTab:nr,FilteringTab:cd,SecurityTab:Hu,ProfileTab:ec,GeneralTab:Dc,PostsTab:sp,ComposingTab:gp,ClutterTab:Tp,LayoutTab:Fp,AppearanceTab:Xm,StyleTab:$b,DeveloperTab:dh,OldThemeTab:Cg},computed:{isLoggedIn(){return!!this.$store.state.users.currentUser},open(){return Q().settingsModalState!=="hidden"},bodyLock(){return Q().settingsModalState==="visible"},expertLevel(){return this.$store.state.config.expertLevel}},data(){return{navCollapsed:!1,navHideHeader:!1}},methods:{onOpen(){const e=Q().settingsModalTargetTab;if(e){const t=this.$refs.tabSwitcher.$slots.default().findIndex(n=>n.props&&n.props["data-tab-name"]===e);t>=0&&this.$refs.tabSwitcher.setTab(t)}Q().clearSettingsModalTargetTab()}},mounted(){this.onOpen()},watch:{open:function(e){e&&this.onOpen()}}},kb=["label"],wb=["label"],Cb=["label"],Vb=["label"],Tb=["label"],Sb=["label"],Lb=["label"],Pb=["label"],_b=["label"],Ib=["label"],Eb=["label"],Ub=["label"],Ab=["label"],Bb=["label"],Fb=["label"];function Ob(e,t,n,a,r,d){const i=w("GeneralTab"),c=w("ProfileTab"),m=w("ComposingTab"),u=w("PostsTab"),$=w("AppearanceTab"),k=w("LayoutTab"),v=w("NotificationsTab"),y=w("FilteringTab"),S=w("MutesAndBlocksTab"),L=w("ClutterTab"),P=w("SecurityTab"),E=w("DataImportExportTab"),j=w("StyleTab"),R=w("OldThemeTab"),A=w("DeveloperTab"),X=w("vertical-tab-switcher");return p(),H(X,{ref:"tabSwitcher",class:"settings_tab-switcher","scrollable-tabs":!0,"child-collapsed":e.childCollapsed,"body-scroll-lock":e.bodyLock,"hide-header":e.navHideHeader},{default:h(()=>[s("div",{label:e.$t("settings.general"),icon:"wrench","data-tab-name":"general"},[l(i)],8,kb),e.isLoggedIn?(p(),g("div",{key:0,label:e.$t("settings.profile_tab"),icon:"user","data-tab-name":"profile","full-width":!0},[l(c)],8,wb)):V("",!0),e.isLoggedIn?(p(),g("div",{key:1,label:e.$t("settings.composing"),icon:"pen-alt","data-tab-name":"composing","delay-render":!0},[l(m)],8,Cb)):V("",!0),s("div",{label:e.$t("settings.posts"),icon:"message","data-tab-name":"posts","delay-render":!0},[l(u)],8,Vb),s("div",{"full-width":!0,label:e.$t("settings.appearance"),icon:"window-restore","data-tab-name":"appearance","delay-render":!0},[l($)],8,Tb),s("div",{label:e.$t("settings.layout"),icon:"table-columns","data-tab-name":"layout","delay-render":!0},[l(k)],8,Sb),e.isLoggedIn?(p(),g("div",{key:2,"full-width":!0,label:e.$t("settings.notifications"),icon:"bell","data-tab-name":"notifications"},[l(v)],8,Lb)):V("",!0),s("div",{label:e.$t("settings.filtering"),icon:"filter","data-tab-name":"filtering"},[l(y)],8,Pb),e.isLoggedIn?(p(),g("div",{key:3,label:e.$t("settings.mutes_and_blocks"),icon:"eye-slash","data-tab-name":"mutesAndBlocks","full-width":!0,"full-height":!0},[l(S)],8,_b)):V("",!0),s("div",{label:e.$t("settings.clutter"),icon:"broom","data-tab-name":"clutter"},[l(L)],8,Ib),e.isLoggedIn?(p(),g("div",{key:4,label:e.$t("settings.security_tab"),icon:"lock","data-tab-name":"security"},[l(P)],8,Eb)):V("",!0),e.isLoggedIn?(p(),g("div",{key:5,label:e.$t("settings.data_import_export_tab"),icon:"download","data-tab-name":"dataImportExport"},[l(E)],8,Ub)):V("",!0),e.expertLevel>0?(p(),g("div",{key:6,label:e.$t("settings.style.themes3.editor.title"),icon:"palette","data-tab-name":"style","delay-render":!0,"full-width":!0},[l(j)],8,Ab)):V("",!0),e.expertLevel>0?(p(),g("div",{key:7,label:e.$t("settings.theme_old"),icon:"paint-brush","data-tab-name":"theme","delay-render":!0,"full-width":!0},[l(R)],8,Bb)):V("",!0),e.expertLevel>0?(p(),g("div",{key:8,label:e.$t("settings.developer"),icon:"code","data-tab-name":"developer"},[l(A)],8,Fb)):V("",!0)]),_:1},8,["child-collapsed","body-scroll-lock","hide-header"])}const Nb=G(yb,[["render",Ob]]);export{Nb as default}; 41//# sourceMappingURL=settings_modal_user_content.D-dohGjw.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.