mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-04-28 17:18:59 +00:00
3 lines
30 KiB
JavaScript
3 lines
30 KiB
JavaScript
import{s as je,f as L,g as C,h as z,d as y,j as S,i as D,x as J,A as Re,X as Dt,l as x,m as K,v as w,n as Q,y as ce,a as H,c as M,H as _t,D as pt,Y as gt,u as Oe,N as mt,w as Ke,Z as Tt,M as $t,K as Pt,z as qt,o as Bt,L as Ft,e as fe,p as Je}from"./scheduler.0b1efdfb.js";import{S as He,i as Me,g as re,t as U,c as oe,a as F,b as ge,d as me,m as ve,e as ke}from"./index.432346bf.js";import{e as Ie,u as jt,o as Rt}from"./each.feaf31ff.js";import{b as Ge,c as We,K as Ht}from"./keymap-codes.eabace12.js";import{L as Ue}from"./i18n-svelte.2f86c749.js";import{A as Mt,b as Ye}from"./Action.7fea7c9d.js";var T;function Le(e){return typeof e<"u"?e:!0}function Ve(e){const t=Array(e);for(let n=0;n<e;n++)t[n]=O();return t}function O(){return Object.create(null)}function Gt(e,t){return t.length-e.length}function b(e){return typeof e=="string"}function ee(e){return typeof e=="object"}function be(e){return typeof e=="function"}function vt(e,t){var n=Ut;if(e&&(t&&(e=Ce(e,t)),this.H&&(e=Ce(e,this.H)),this.J&&1<e.length&&(e=Ce(e,this.J)),n||n==="")){if(t=e.split(n),this.filter){e=this.filter,n=t.length;const i=[];for(let s=0,l=0;s<n;s++){const o=t[s];o&&!e[o]&&(i[l++]=o)}e=i}else e=t;return e}return e}const Ut=/[\p{Z}\p{S}\p{P}\p{C}]+/u,bt=/[\u0300-\u036f]/g;function Xe(e,t){const n=Object.keys(e),i=n.length,s=[];let l="",o=0;for(let r=0,c,f;r<i;r++)c=n[r],(f=e[c])?(s[o++]=P(t?"(?!\\b)"+c+"(\\b|_)":c),s[o++]=f):l+=(l?"|":"")+c;return l&&(s[o++]=P(t?"(?!\\b)("+l+")(\\b|_)":"("+l+")"),s[o]=""),s}function Ce(e,t){for(let n=0,i=t.length;n<i&&(e=e.replace(t[n],t[n+1]),e);n+=2);return e}function P(e){return new RegExp(e,"g")}function kt(e){let t="",n="";for(let i=0,s=e.length,l;i<s;i++)(l=e[i])!==n&&(t+=n=l);return t}var xt={encode:yt,F:!1,G:""};function yt(e){return vt.call(this,(""+e).toLowerCase(),!1)}const At={},ne={};function wt(e){de(e,"add"),de(e,"append"),de(e,"search"),de(e,"update"),de(e,"remove")}function de(e,t){e[t+"Async"]=function(){const n=this,i=arguments;var s=i[i.length-1];let l;return be(s)&&(l=s,delete i[i.length-1]),s=new Promise(function(o){setTimeout(function(){n.async=!0;const r=n[t].apply(n,i);n.async=!1,o(r)})}),l?(s.then(l),this):s}}function Et(e,t,n,i){const s=e.length;let l=[],o,r,c=0;i&&(i=[]);for(let f=s-1;0<=f;f--){const h=e[f],a=h.length,_=O();let v=!o;for(let u=0;u<a;u++){const d=h[u],k=d.length;if(k)for(let A=0,g,p;A<k;A++)if(p=d[A],o){if(o[p]){if(!f){if(n)n--;else if(l[c++]=p,c===t)return l}(f||i)&&(_[p]=1),v=!0}if(i&&(g=(r[p]||0)+1,r[p]=g,g<s)){const j=i[g-2]||(i[g-2]=[]);j[j.length]=p}}else _[p]=1}if(i)o||(r=_);else if(!v)return[];o=_}if(i)for(let f=i.length-1,h,a;0<=f;f--){h=i[f],a=h.length;for(let _=0,v;_<a;_++)if(v=h[_],!o[v]){if(n)n--;else if(l[c++]=v,c===t)return l;o[v]=1}}return l}function Kt(e,t){const n=O(),i=O(),s=[];for(let l=0;l<e.length;l++)n[e[l]]=1;for(let l=0,o;l<t.length;l++){o=t[l];for(let r=0,c;r<o.length;r++)c=o[r],n[c]&&!i[c]&&(i[c]=1,s[s.length]=c)}return s}function ze(e){this.l=e!==!0&&e,this.cache=O(),this.h=[]}function St(e,t,n){ee(e)&&(e=e.query);let i=this.cache.get(e);return i||(i=this.search(e,t,n),this.cache.set(e,i)),i}ze.prototype.set=function(e,t){if(!this.cache[e]){var n=this.h.length;for(n===this.l?delete this.cache[this.h[n-1]]:n++,--n;0<n;n--)this.h[n]=this.h[n-1];this.h[0]=e}this.cache[e]=t};ze.prototype.get=function(e){const t=this.cache[e];if(this.l&&t&&(e=this.h.indexOf(e))){const n=this.h[e-1];this.h[e-1]=this.h[e],this.h[e]=n}return t};const Jt={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function Lt(e,t,n,i,s,l,o,r){setTimeout(function(){const c=e(n?n+"."+i:i,JSON.stringify(o));c&&c.then?c.then(function(){t.export(e,t,n,s,l+1,r)}):t.export(e,t,n,s,l+1,r)})}function te(e,t){if(!(this instanceof te))return new te(e);var n;if(e){b(e)?e=Jt[e]:(n=e.preset)&&(e=Object.assign({},n[n],e)),n=e.charset;var i=e.lang;b(n)&&(n.indexOf(":")===-1&&(n+=":default"),n=ne[n]),b(i)&&(i=At[i])}else e={};let s,l,o=e.context||{};if(this.encode=e.encode||n&&n.encode||yt,this.register=t||O(),this.D=s=e.resolution||9,this.G=t=n&&n.G||e.tokenize||"strict",this.depth=t==="strict"&&o.depth,this.l=Le(o.bidirectional),this.s=l=Le(e.optimize),this.m=Le(e.fastupdate),this.B=e.minlength||1,this.C=e.boost,this.map=l?Ve(s):O(),this.A=s=o.resolution||1,this.h=l?Ve(s):O(),this.F=n&&n.F||e.rtl,this.H=(t=e.matcher||i&&i.H)&&Xe(t,!1),this.J=(t=e.stemmer||i&&i.J)&&Xe(t,!0),n=t=e.filter||i&&i.filter){n=t,i=O();for(let r=0,c=n.length;r<c;r++)i[n[r]]=1;n=i}this.filter=n,this.cache=(t=e.cache)&&new ze(t)}T=te.prototype;T.append=function(e,t){return this.add(e,t,!0)};T.add=function(e,t,n,i){if(t&&(e||e===0)){if(!i&&!n&&this.register[e])return this.update(e,t);if(t=this.encode(t),i=t.length){const f=O(),h=O(),a=this.depth,_=this.D;for(let v=0;v<i;v++){let u=t[this.F?i-1-v:v];var s=u.length;if(u&&s>=this.B&&(a||!h[u])){var l=Ee(_,i,v),o="";switch(this.G){case"full":if(2<s){for(l=0;l<s;l++)for(var r=s;r>l;r--)if(r-l>=this.B){var c=Ee(_,i,v,s,l);o=u.substring(l,r),_e(this,h,o,c,e,n)}break}case"reverse":if(1<s){for(r=s-1;0<r;r--)o=u[r]+o,o.length>=this.B&&_e(this,h,o,Ee(_,i,v,s,r),e,n);o=""}case"forward":if(1<s){for(r=0;r<s;r++)o+=u[r],o.length>=this.B&&_e(this,h,o,l,e,n);break}default:if(this.C&&(l=Math.min(l/this.C(t,u,v)|0,_-1)),_e(this,h,u,l,e,n),a&&1<i&&v<i-1){for(s=O(),o=this.A,l=u,r=Math.min(a+1,i-v),s[l]=1,c=1;c<r;c++)if((u=t[this.F?i-1-v-c:v+c])&&u.length>=this.B&&!s[u]){s[u]=1;const d=this.l&&u>l;_e(this,f,d?l:u,Ee(o+(i/2>o?0:1),i,v,r-1,c-1),e,n,d?u:l)}}}}}this.m||(this.register[e]=1)}}return this};function Ee(e,t,n,i,s){return n&&1<e?t+(i||0)<=e?n+(s||0):(e-1)/(t+(i||0))*(n+(s||0))+1|0:0}function _e(e,t,n,i,s,l,o){let r=o?e.h:e.map;(!t[n]||o&&!t[n][o])&&(e.s&&(r=r[i]),o?(t=t[n]||(t[n]=O()),t[o]=1,r=r[o]||(r[o]=O())):t[n]=1,r=r[n]||(r[n]=[]),e.s||(r=r[i]||(r[i]=[])),l&&r.includes(s)||(r[r.length]=s,e.m&&(e=e.register[s]||(e.register[s]=[]),e[e.length]=r)))}T.search=function(e,t,n){n||(!t&&ee(e)?(n=e,e=n.query):ee(t)&&(n=t));let i=[],s,l,o=0;if(n){e=n.query||e,t=n.limit,o=n.offset||0;var r=n.context;l=n.suggest}if(e&&(e=this.encode(""+e),s=e.length,1<s)){n=O();var c=[];for(let h=0,a=0,_;h<s;h++)if((_=e[h])&&_.length>=this.B&&!n[_])if(this.s||l||this.map[_])c[a++]=_,n[_]=1;else return i;e=c,s=e.length}if(!s)return i;t||(t=100),r=this.depth&&1<s&&r!==!1,n=0;let f;r?(f=e[0],n=1):1<s&&e.sort(Gt);for(let h,a;n<s;n++){if(a=e[n],r?(h=Ze(this,i,l,t,o,s===2,a,f),l&&h===!1&&i.length||(f=a)):h=Ze(this,i,l,t,o,s===1,a),h)return h;if(l&&n===s-1){if(c=i.length,!c){if(r){r=0,n=-1;continue}return i}if(c===1)return Ct(i[0],t,o)}}return Et(i,t,o,l)};function Ze(e,t,n,i,s,l,o,r){let c=[],f=r?e.h:e.map;if(e.s||(f=Qe(f,o,r,e.l)),f){let h=0;const a=Math.min(f.length,r?e.A:e.D);for(let _=0,v=0,u,d;_<a&&!((u=f[_])&&(e.s&&(u=Qe(u,o,r,e.l)),s&&u&&l&&(d=u.length,d<=s?(s-=d,u=null):(u=u.slice(s),s=0)),u&&(c[h++]=u,l&&(v+=u.length,v>=i))));_++);if(h){if(l)return Ct(c,i,0);t[t.length]=c;return}}return!n&&c}function Ct(e,t,n){return e=e.length===1?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function Qe(e,t,n,i){return n?(i=i&&t>n,e=(e=e[i?t:n])&&e[i?n:t]):e=e[t],e}T.contain=function(e){return!!this.register[e]};T.update=function(e,t){return this.remove(e).add(e,t)};T.remove=function(e,t){const n=this.register[e];if(n){if(this.m)for(let i=0,s;i<n.length;i++)s=n[i],s.splice(s.indexOf(e),1);else Ne(this.map,e,this.D,this.s),this.depth&&Ne(this.h,e,this.A,this.s);if(t||delete this.register[e],this.cache){t=this.cache;for(let i=0,s,l;i<t.h.length;i++)l=t.h[i],s=t.cache[l],s.includes(e)&&(t.h.splice(i--,1),delete t.cache[l])}}return this};function Ne(e,t,n,i,s){let l=0;if(e.constructor===Array)if(s)t=e.indexOf(t),t!==-1?1<e.length&&(e.splice(t,1),l++):l++;else{s=Math.min(e.length,n);for(let o=0,r;o<s;o++)(r=e[o])&&(l=Ne(r,t,n,i,s),i||l||delete e[o])}else for(let o in e)(l=Ne(e[o],t,n,i,s))||delete e[o];return l}T.searchCache=St;T.export=function(e,t,n,i,s,l){let o=!0;typeof l>"u"&&(o=new Promise(f=>{l=f}));let r,c;switch(s||(s=0)){case 0:if(r="reg",this.m){c=O();for(let f in this.register)c[f]=1}else c=this.register;break;case 1:r="cfg",c={doc:0,opt:this.s?1:0};break;case 2:r="map",c=this.map;break;case 3:r="ctx",c=this.h;break;default:typeof n>"u"&&l&&l();return}return Lt(e,t||this,n,r,i,s,c,l),o};T.import=function(e,t){if(t)switch(b(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}};wt(te.prototype);function Wt(e){e=e.data;var t=self._index;const n=e.args;var i=e.task;switch(i){case"init":i=e.options||{},e=e.factory,t=i.encode,i.cache=!1,t&&t.indexOf("function")===0&&(i.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(i),delete self.FlexSearch):self._index=new te(i);break;default:e=e.id,t=t[i].apply(t,n),postMessage(i==="search"?{id:e,msg:t}:{id:e})}}let et=0;function he(e){if(!(this instanceof he))return new he(e);var t;e?be(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());const n=typeof window>"u"&&self.exports,i=this;this.o=Yt(t,n,e.worker),this.h=O(),this.o&&(n?this.o.on("message",function(s){i.h[s.id](s.msg),delete i.h[s.id]}):this.o.onmessage=function(s){s=s.data,i.h[s.id](s.msg),delete i.h[s.id]},this.o.postMessage({task:"init",factory:t,options:e}))}ye("add");ye("append");ye("search");ye("update");ye("remove");function ye(e){he.prototype[e]=he.prototype[e+"Async"]=function(){const t=this,n=[].slice.call(arguments);var i=n[n.length-1];let s;return be(i)&&(s=i,n.splice(n.length-1,1)),i=new Promise(function(l){setTimeout(function(){t.h[++et]=l,t.o.postMessage({task:e,id:et,args:n})})}),s?(i.then(s),this):i}}function Yt(e,t,n){let i;try{i=t?new(require("worker_threads")).Worker(__dirname+"/node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+Wt.toString()],{type:"text/javascript"}))):new Worker(b(n)?n:"worker/worker.js",{type:"module"})}catch{}return i}function pe(e){if(!(this instanceof pe))return new pe(e);var t=e.document||e.doc||e,n;this.K=[],this.h=[],this.A=[],this.register=O(),this.key=(n=t.key||t.id)&&Se(n,this.A)||"id",this.m=Le(e.fastupdate),this.C=(n=t.store)&&n!==!0&&[],this.store=n&&O(),this.I=(n=t.tag)&&Se(n,this.A),this.l=n&&O(),this.cache=(n=e.cache)&&new ze(n),e.cache=!1,this.o=e.worker,this.async=!1,n=O();let i=t.index||t.field||t;b(i)&&(i=[i]);for(let s=0,l,o;s<i.length;s++)l=i[s],b(l)||(o=l,l=l.field),o=ee(o)?Object.assign({},e,o):e,this.o&&(n[l]=new he(o),n[l].o||(this.o=!1)),this.o||(n[l]=new te(o,this.register)),this.K[s]=Se(l,this.A),this.h[s]=l;if(this.C)for(e=t.store,b(e)&&(e=[e]),t=0;t<e.length;t++)this.C[t]=Se(e[t],this.A);this.index=n}function Se(e,t){const n=e.split(":");let i=0;for(let s=0;s<n.length;s++)e=n[s],0<=e.indexOf("[]")&&(e=e.substring(0,e.length-2))&&(t[i]=!0),e&&(n[i++]=e);return i<n.length&&(n.length=i),1<i?n:n[0]}function qe(e,t){if(b(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function Be(e,t,n,i,s){if(e=e[s],i===n.length-1)t[s]=e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)Be(e,t,n,i,s);else t=t[s]||(t[s]=O()),s=n[++i],Be(e,t,n,i,s)}function Fe(e,t,n,i,s,l,o,r){if(e=e[o])if(i===t.length-1){if(e.constructor===Array){if(n[i]){for(t=0;t<e.length;t++)s.add(l,e[t],!0,!0);return}e=e.join(" ")}s.add(l,e,r,!0)}else if(e.constructor===Array)for(o=0;o<e.length;o++)Fe(e,t,n,i,s,l,o,r);else o=t[++i],Fe(e,t,n,i,s,l,o,r)}T=pe.prototype;T.add=function(e,t,n){if(ee(e)&&(t=e,e=qe(t,this.key)),t&&(e||e===0)){if(!n&&this.register[e])return this.update(e,t);for(let i=0,s,l;i<this.h.length;i++)l=this.h[i],s=this.K[i],b(s)&&(s=[s]),Fe(t,s,this.A,0,this.index[l],e,s[0],n);if(this.I){let i=qe(t,this.I),s=O();b(i)&&(i=[i]);for(let l=0,o,r;l<i.length;l++)if(o=i[l],!s[o]&&(s[o]=1,r=this.l[o]||(this.l[o]=[]),!n||!r.includes(e))&&(r[r.length]=e,this.m)){const c=this.register[e]||(this.register[e]=[]);c[c.length]=r}}if(this.store&&(!n||!this.store[e])){let i;if(this.C){i=O();for(let s=0,l;s<this.C.length;s++)l=this.C[s],b(l)?i[l]=t[l]:Be(t,i,l,0,l[0])}this.store[e]=i||t}}return this};T.append=function(e,t){return this.add(e,t,!0)};T.update=function(e,t){return this.remove(e).add(e,t)};T.remove=function(e){if(ee(e)&&(e=qe(e,this.key)),this.register[e]){for(var t=0;t<this.h.length&&(this.index[this.h[t]].remove(e,!this.o),!this.m);t++);if(this.I&&!this.m)for(let n in this.l){t=this.l[n];const i=t.indexOf(e);i!==-1&&(1<t.length?t.splice(i,1):delete this.l[n])}this.store&&delete this.store[e],delete this.register[e]}return this};T.search=function(e,t,n,i){n||(!t&&ee(e)?(n=e,e=""):ee(t)&&(n=t,t=0));let s=[],l=[],o,r,c,f,h,a,_=0;if(n)if(n.constructor===Array)c=n,n=null;else{if(e=n.query||e,c=(o=n.pluck)||n.index||n.field,f=n.tag,r=this.store&&n.enrich,h=n.bool==="and",t=n.limit||t||100,a=n.offset||0,f&&(b(f)&&(f=[f]),!e)){for(let u=0,d;u<f.length;u++)(d=Vt.call(this,f[u],t,a,r))&&(s[s.length]=d,_++);return _?s:[]}b(c)&&(c=[c])}c||(c=this.h),h=h&&(1<c.length||f&&1<f.length);const v=!i&&(this.o||this.async)&&[];for(let u=0,d,k,A;u<c.length;u++){let g;if(k=c[u],b(k)||(g=k,k=g.field,e=g.query||e,t=g.limit||t,r=g.enrich||r),v)v[u]=this.index[k].searchAsync(e,t,g||n);else{if(i?d=i[u]:d=this.index[k].search(e,t,g||n),A=d&&d.length,f&&A){const p=[];let j=0;h&&(p[0]=[d]);for(let W=0,Y,$;W<f.length;W++)Y=f[W],(A=($=this.l[Y])&&$.length)&&(j++,p[p.length]=h?[$]:$);j&&(d=h?Et(p,t||100,a||0):Kt(d,p),A=d.length)}if(A)l[_]=k,s[_++]=d;else if(h)return[]}}if(v){const u=this;return new Promise(function(d){Promise.all(v).then(function(k){d(u.search(e,t,n,k))})})}if(!_)return[];if(o&&(!r||!this.store))return s[0];for(let u=0,d;u<l.length;u++){if(d=s[u],d.length&&r&&(d=It.call(this,d)),o)return d;s[u]={field:l[u],result:d}}return s};function Vt(e,t,n,i){let s=this.l[e],l=s&&s.length-n;if(l&&0<l)return(l>t||n)&&(s=s.slice(n,n+t)),i&&(s=It.call(this,s)),{tag:e,result:s}}function It(e){const t=Array(e.length);for(let n=0,i;n<e.length;n++)i=e[n],t[n]={id:i,doc:this.store[i]};return t}T.contain=function(e){return!!this.register[e]};T.get=function(e){return this.store[e]};T.set=function(e,t){return this.store[e]=t,this};T.searchCache=St;T.export=function(e,t,n,i,s,l){let o;if(typeof l>"u"&&(o=new Promise(r=>{l=r})),s||(s=0),i||(i=0),i<this.h.length){const r=this.h[i],c=this.index[r];t=this,setTimeout(function(){c.export(e,t,s?r:"",i,s++,l)||(i++,s=1,t.export(e,t,r,i,s,l))})}else{let r,c;switch(s){case 1:r="tag",c=this.l,n=null;break;case 2:r="store",c=this.store,n=null;break;default:l();return}Lt(e,this,n,r,i,s,c,l)}return o};T.import=function(e,t){if(t)switch(b(t)&&(t=JSON.parse(t)),e){case"tag":this.l=t;break;case"reg":this.m=!1,this.register=t;for(let i=0,s;i<this.h.length;i++)s=this.index[this.h[i]],s.register=t,s.m=!1;break;case"store":this.store=t;break;default:e=e.split(".");const n=e[0];e=e[1],n&&e&&this.index[n].import(e,t)}};wt(pe.prototype);var Xt={encode:Nt,F:!1,G:""};const Zt=[P("[àáâãäå]"),"a",P("[èéêë]"),"e",P("[ìíîï]"),"i",P("[òóôõöő]"),"o",P("[ùúûüű]"),"u",P("[ýŷÿ]"),"y",P("ñ"),"n",P("[çc]"),"k",P("ß"),"s",P(" & ")," and "];function Nt(e){var t=e=""+e;return t.normalize&&(t=t.normalize("NFD").replace(bt,"")),vt.call(this,t.toLowerCase(),!e.normalize&&Zt)}var Qt={encode:Ot,F:!1,G:"strict"};const en=/[^a-z0-9]+/,tt={b:"p",v:"f",w:"f",z:"s",x:"s",ß:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Ot(e){e=Nt.call(this,e).join(" ");const t=[];if(e){const n=e.split(en),i=n.length;for(let s=0,l,o=0;s<i;s++)if((e=n[s])&&(!this.filter||!this.filter[e])){l=e[0];let r=tt[l]||l,c=r;for(let f=1;f<e.length;f++){l=e[f];const h=tt[l]||l;h&&h!==c&&(r+=h,c=h)}t[o++]=r}}return t}var tn={encode:zt,F:!1,G:""};const nn=[P("ae"),"a",P("oe"),"o",P("sh"),"s",P("th"),"t",P("ph"),"f",P("pf"),"f",P("(?![aeo])h(?![aeo])"),"",P("(?!^[aeo])h(?!^[aeo])"),""];function zt(e,t){return e&&(e=Ot.call(this,e).join(" "),2<e.length&&(e=Ce(e,nn)),t||(1<e.length&&(e=kt(e)),e&&(e=e.split(" ")))),e||[]}var sn={encode:rn,F:!1,G:""};const ln=P("(?!\\b)[aeo]");function rn(e){return e&&(e=zt.call(this,e,!0),1<e.length&&(e=e.replace(ln,"")),1<e.length&&(e=kt(e)),e&&(e=e.split(" "))),e||[]}ne["latin:default"]=xt;ne["latin:simple"]=Xt;ne["latin:balance"]=Qt;ne["latin:advanced"]=tn;ne["latin:extra"]=sn;const on={Index:te,Document:pe,Worker:he,registerCharset:function(e,t){ne[e]=t},registerLanguage:function(e,t){At[e]=t}};function cn(e){let t,n,i=e[0].toString(16)+"",s;return{c(){t=L("span"),n=x("0x"),s=x(i),this.h()},l(l){t=C(l,"SPAN",{class:!0});var o=z(t);n=K(o,"0x"),s=K(o,i),o.forEach(y),this.h()},h(){S(t,"class","key")},m(l,o){D(l,t,o),w(t,n),w(t,s)},p(l,o){o&1&&i!==(i=l[0].toString(16)+"")&&Q(s,i)},i:ce,o:ce,d(l){l&&y(t)}}}function fn(e){let t,n,i=(e[0].title||"")+"",s,l,o,r,c,f,h,a;function _(g,p){if(g[0].variant==="left")return un;if(g[0].variant==="right")return hn}let v=_(e),u=v&&v(e),d=e[0].description&&nt(e),k=e[0].category?.name==="ASCII Macros"&&it(e),A=e[0].category?.name==="CP-1252"&&st(e);return h=new Mt({props:{display:"keys",action:e[0]}}),{c(){t=L("div"),n=L("b"),s=x(i),l=H(),u&&u.c(),o=H(),d&&d.c(),r=H(),k&&k.c(),c=H(),A&&A.c(),f=H(),ge(h.$$.fragment),this.h()},l(g){t=C(g,"DIV",{class:!0});var p=z(t);n=C(p,"B",{});var j=z(n);s=K(j,i),l=M(j),u&&u.l(j),j.forEach(y),o=M(p),d&&d.l(p),r=M(p),k&&k.l(p),c=M(p),A&&A.l(p),p.forEach(y),f=M(g),me(h.$$.fragment,g),this.h()},h(){S(t,"class","title svelte-z1pntr")},m(g,p){D(g,t,p),w(t,n),w(n,s),w(n,l),u&&u.m(n,null),w(t,o),d&&d.m(t,null),w(t,r),k&&k.m(t,null),w(t,c),A&&A.m(t,null),D(g,f,p),ve(h,g,p),a=!0},p(g,p){(!a||p&1)&&i!==(i=(g[0].title||"")+"")&&Q(s,i),v!==(v=_(g))&&(u&&u.d(1),u=v&&v(g),u&&(u.c(),u.m(n,null))),g[0].description?d?d.p(g,p):(d=nt(g),d.c(),d.m(t,r)):d&&(d.d(1),d=null),g[0].category?.name==="ASCII Macros"?k?k.p(g,p):(k=it(g),k.c(),k.m(t,c)):k&&(k.d(1),k=null),g[0].category?.name==="CP-1252"?A?A.p(g,p):(A=st(g),A.c(),A.m(t,null)):A&&(A.d(1),A=null);const j={};p&1&&(j.action=g[0]),h.$set(j)},i(g){a||(F(h.$$.fragment,g),a=!0)},o(g){U(h.$$.fragment,g),a=!1},d(g){g&&(y(t),y(f)),u&&u.d(),d&&d.d(),k&&k.d(),A&&A.d(),ke(h,g)}}}function hn(e){let t;return{c(){t=x("(Right)")},l(n){t=K(n,"(Right)")},m(n,i){D(n,t,i)},d(n){n&&y(t)}}}function un(e){let t;return{c(){t=x("(Left)")},l(n){t=K(n,"(Left)")},m(n,i){D(n,t,i)},d(n){n&&y(t)}}}function nt(e){let t,n=e[0].description+"",i;return{c(){t=L("i"),i=x(n)},l(s){t=C(s,"I",{});var l=z(t);i=K(l,n),l.forEach(y)},m(s,l){D(s,t,l),w(t,i)},p(s,l){l&1&&n!==(n=s[0].description+"")&&Q(i,n)},d(s){s&&y(t)}}}function it(e){let t,n,i=e[1].actionSearch.SHIFT_WARNING()+"";return{c(){t=L("span"),n=new _t(!1),this.h()},l(s){t=C(s,"SPAN",{class:!0});var l=z(t);n=pt(l,!1),l.forEach(y),this.h()},h(){n.a=null,S(t,"class","warning svelte-z1pntr")},m(s,l){D(s,t,l),n.m(i,t)},p(s,l){l&2&&i!==(i=s[1].actionSearch.SHIFT_WARNING()+"")&&n.p(i)},d(s){s&&y(t)}}}function st(e){let t,n,i=e[1].actionSearch.ALT_CODE_WARNING()+"";return{c(){t=L("span"),n=new _t(!1),this.h()},l(s){t=C(s,"SPAN",{class:!0});var l=z(t);n=pt(l,!1),l.forEach(y),this.h()},h(){n.a=null,S(t,"class","warning svelte-z1pntr")},m(s,l){D(s,t,l),n.m(i,t)},p(s,l){l&2&&i!==(i=s[1].actionSearch.ALT_CODE_WARNING()+"")&&n.p(i)},d(s){s&&y(t)}}}function an(e){let t,n,i,s,l,o;const r=[fn,cn],c=[];function f(h,a){return typeof h[0]=="object"?0:1}return n=f(e),i=c[n]=r[n](e),{c(){t=L("button"),i.c(),this.h()},l(h){t=C(h,"BUTTON",{class:!0});var a=z(t);i.l(a),a.forEach(y),this.h()},h(){S(t,"class","svelte-z1pntr")},m(h,a){D(h,t,a),c[n].m(t,null),s=!0,l||(o=J(t,"click",e[3]),l=!0)},p(h,[a]){let _=n;n=f(h),n===_?c[n].p(h,a):(re(),U(c[_],1,1,()=>{c[_]=null}),oe(),i=c[n],i?i.p(h,a):(i=c[n]=r[n](h),i.c()),F(i,1),i.m(t,null))},i(h){s||(F(i),s=!0)},o(h){U(i),s=!1},d(h){h&&y(t),c[n].d(),l=!1,o()}}}function dn(e,t,n){let i,s;Re(e,Ue,r=>n(1,s=r));let{id:l}=t;function o(r){Dt.call(this,e,r)}return e.$$set=r=>{"id"in r&&n(2,l=r.id)},e.$$.update=()=>{e.$$.dirty&4&&n(0,i=typeof l=="number"?Ge.get(l)??l:l)},[i,s,l,o]}class De extends He{constructor(t){super(),Me(this,t,dn,an,je,{id:2})}}function lt(e,t,n){const i=e.slice();return i[29]=t[n],i}function Pe(e){const t=e.slice(),n=t[2].length===0?Array.from(Ge,([i])=>i):t[2];return t[28]=n,t}function rt(e,t,n){const i=e.slice();return i[32]=t[n],i}function ot(e){let t,n=e[32].name+"",i,s,l,o,r;return l=gt(e[18][0]),{c(){t=L("label"),i=x(n),s=L("input"),this.h()},l(c){t=C(c,"LABEL",{class:!0});var f=z(t);i=K(f,n),s=C(f,"INPUT",{name:!0,type:!0,class:!0}),f.forEach(y),this.h()},h(){S(s,"name","category"),S(s,"type","radio"),s.__value=new Set(Object.keys(e[32].actions).map(Number)),mt(s,s.__value),S(s,"class","svelte-1x90noz"),S(t,"class","svelte-1x90noz"),l.p(s)},m(c,f){D(c,t,f),w(t,i),w(t,s),s.checked=s.__value===e[7],o||(r=J(s,"change",e[19]),o=!0)},p(c,f){f[0]&128&&(s.checked=s.__value===c[7])},d(c){c&&y(t),l.r(),o=!1,r()}}}function ct(e){let t,n,i=e[8].actionSearch.CURRENT_ACTION()+"",s,l,o,r,c,f;o=new De({props:{id:e[0]}});let h=e[1]&&ft(e);return{c(){t=L("aside"),n=L("h3"),s=x(i),l=H(),ge(o.$$.fragment),r=H(),h&&h.c(),c=fe(),this.h()},l(a){t=C(a,"ASIDE",{class:!0});var _=z(t);n=C(_,"H3",{class:!0});var v=z(n);s=K(v,i),v.forEach(y),l=M(_),me(o.$$.fragment,_),_.forEach(y),r=M(a),h&&h.l(a),c=fe(),this.h()},h(){S(n,"class","svelte-1x90noz"),S(t,"class","svelte-1x90noz")},m(a,_){D(a,t,_),w(t,n),w(n,s),w(t,l),ve(o,t,null),D(a,r,_),h&&h.m(a,_),D(a,c,_),f=!0},p(a,_){(!f||_[0]&256)&&i!==(i=a[8].actionSearch.CURRENT_ACTION()+"")&&Q(s,i);const v={};_[0]&1&&(v.id=a[0]),o.$set(v),a[1]?h?(h.p(a,_),_[0]&2&&F(h,1)):(h=ft(a),h.c(),F(h,1),h.m(c.parentNode,c)):h&&(re(),U(h,1,1,()=>{h=null}),oe())},i(a){f||(F(o.$$.fragment,a),F(h),f=!0)},o(a){U(o.$$.fragment,a),U(h),f=!1},d(a){a&&(y(t),y(r),y(c)),ke(o),h&&h.d(a)}}}function ft(e){let t,n,i=e[8].actionSearch.NEXT_ACTION()+"",s,l,o,r;return o=new De({props:{id:e[1]}}),{c(){t=L("aside"),n=L("h3"),s=x(i),l=H(),ge(o.$$.fragment),this.h()},l(c){t=C(c,"ASIDE",{class:!0});var f=z(t);n=C(f,"H3",{class:!0});var h=z(n);s=K(h,i),h.forEach(y),l=M(f),me(o.$$.fragment,f),f.forEach(y),this.h()},h(){S(n,"class","svelte-1x90noz"),S(t,"class","svelte-1x90noz")},m(c,f){D(c,t,f),w(t,n),w(n,s),w(t,l),ve(o,t,null),r=!0},p(c,f){(!r||f[0]&256)&&i!==(i=c[8].actionSearch.NEXT_ACTION()+"")&&Q(s,i);const h={};f[0]&2&&(h.id=c[1]),o.$set(h)},i(c){r||(F(o.$$.fragment,c),r=!0)},o(c){U(o.$$.fragment,c),r=!1},d(c){c&&y(t),ke(o)}}}function ht(e){let t,n,i="Exact match",s,l,o;return l=new De({props:{id:e[3]}}),l.$on("click",e[20]),{c(){t=L("li"),n=L("i"),n.textContent=i,s=H(),ge(l.$$.fragment),this.h()},l(r){t=C(r,"LI",{class:!0});var c=z(t);n=C(c,"I",{class:!0,"data-svelte-h":!0}),Oe(n)!=="svelte-5qeiac"&&(n.textContent=i),s=M(c),me(l.$$.fragment,c),c.forEach(y),this.h()},h(){S(n,"class","svelte-1x90noz"),S(t,"class","exact svelte-1x90noz")},m(r,c){D(r,t,c),w(t,n),w(t,s),ve(l,t,null),o=!0},p(r,c){const f={};c[0]&8&&(f.id=r[3]),l.$set(f)},i(r){o||(F(l.$$.fragment,r),o=!0)},o(r){U(l.$$.fragment,r),o=!1},d(r){r&&y(t),ke(l)}}}function ut(e){let t;function n(l,o){return l[4]>=2**5&&l[4]<2**13?pn:_n}let i=n(e),s=i(e);return{c(){s.c(),t=fe()},l(l){s.l(l),t=fe()},m(l,o){s.m(l,o),D(l,t,o)},p(l,o){i===(i=n(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(t.parentNode,t)))},d(l){l&&y(t),s.d(l)}}}function _n(e){let t,n="Action code is out of range";return{c(){t=L("li"),t.textContent=n,this.h()},l(i){t=C(i,"LI",{class:!0,"data-svelte-h":!0}),Oe(t)!=="svelte-vlyulj"&&(t.textContent=n),this.h()},h(){S(t,"class","svelte-1x90noz")},m(i,s){D(i,t,s)},p:ce,d(i){i&&y(t)}}}function pn(e){let t,n,i="USE CODE",s,l;return{c(){t=L("li"),n=L("button"),n.textContent=i,this.h()},l(o){t=C(o,"LI",{class:!0});var r=z(t);n=C(r,"BUTTON",{"data-svelte-h":!0}),Oe(n)!=="svelte-1v2c76y"&&(n.textContent=i),r.forEach(y),this.h()},h(){S(t,"class","svelte-1x90noz")},m(o,r){D(o,t,r),w(t,n),s||(l=J(n,"click",e[21]),s=!0)},p:ce,d(o){o&&y(t),s=!1,l()}}}function at(e){let t=[],n=new Map,i,s,l=Ie(e[7]?e[28].filter(e[22]):e[28]);const o=r=>r[29];for(let r=0;r<l.length;r+=1){let c=lt(e,l,r),f=o(c);n.set(f,t[r]=dt(f,c))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();i=fe()},l(r){for(let c=0;c<t.length;c+=1)t[c].l(r);i=fe()},m(r,c){for(let f=0;f<t.length;f+=1)t[f]&&t[f].m(r,c);D(r,i,c),s=!0},p(r,c){c[0]&1156&&(l=Ie(r[7]?r[28].filter(r[22]):r[28]),re(),t=jt(t,c,o,1,r,l,n,i.parentNode,Rt,dt,i,lt),oe())},i(r){if(!s){for(let c=0;c<l.length;c+=1)F(t[c]);s=!0}},o(r){for(let c=0;c<t.length;c+=1)U(t[c]);s=!1},d(r){r&&y(i);for(let c=0;c<t.length;c+=1)t[c].d(r)}}}function dt(e,t){let n,i,s;function l(){return t[23](t[29])}return i=new De({props:{id:t[29]}}),i.$on("click",l),{key:e,first:null,c(){n=L("li"),ge(i.$$.fragment),this.h()},l(o){n=C(o,"LI",{class:!0});var r=z(n);me(i.$$.fragment,r),r.forEach(y),this.h()},h(){S(n,"class","svelte-1x90noz"),this.first=n},m(o,r){D(o,n,r),ve(i,n,null),s=!0},p(o,r){t=o;const c={};r[0]&132&&(c.id=t[29]),i.$set(c)},i(o){s||(F(i.$$.fragment,o),s=!0)},o(o){U(i.$$.fragment,o),s=!1},d(o){o&&y(n),ke(i)}}}function gn(e){let t,n,i,s,l,o,r,c=e[8].actionSearch.DELETE()+"",f,h,a,_="close",v,u,d,k,A=e[8].actionSearch.filter.ALL()+"",g,p,j,W,Y,$,ie,se,V,ue,ae,Ae,Z=Ie(We),m=[];for(let E=0;E<Z.length;E+=1)m[E]=ot(rt(e,Z,E));let I=e[0]!==void 0&&ct(e),q=e[3]!==void 0&&ht(e),G=!e[3]&&e[4]&&ut(e),B=(e[7]!==void 0||e[2].length>0)&&at(Pe(e));return ue=gt(e[18][0]),{c(){t=L("dialog"),n=L("div"),i=L("div"),s=L("input"),o=H(),r=L("button"),f=x(c),h=H(),a=L("button"),a.textContent=_,u=H(),d=L("fieldset"),k=L("label"),g=x(A),p=L("input"),j=H();for(let E=0;E<m.length;E+=1)m[E].c();W=H(),I&&I.c(),Y=H(),$=L("ul"),q&&q.c(),ie=H(),G&&G.c(),se=H(),B&&B.c(),this.h()},l(E){t=C(E,"DIALOG",{class:!0});var R=z(t);n=C(R,"DIV",{class:!0});var N=z(n);i=C(N,"DIV",{class:!0});var X=z(i);s=C(X,"INPUT",{type:!0,placeholder:!0,class:!0}),o=M(X),r=C(X,"BUTTON",{});var xe=z(r);f=K(xe,c),xe.forEach(y),h=M(X),a=C(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Oe(a)!=="svelte-fusoje"&&(a.textContent=_),X.forEach(y),u=M(N),d=C(N,"FIELDSET",{class:!0});var we=z(d);k=C(we,"LABEL",{class:!0});var Te=z(k);g=K(Te,A),p=C(Te,"INPUT",{name:!0,type:!0,class:!0}),Te.forEach(y),j=M(we);for(let $e=0;$e<m.length;$e+=1)m[$e].l(we);we.forEach(y),W=M(N),I&&I.l(N),Y=M(N),$=C(N,"UL",{class:!0});var le=z($);q&&q.l(le),ie=M(le),G&&G.l(le),se=M(le),B&&B.l(le),le.forEach(y),N.forEach(y),R.forEach(y),this.h()},h(){S(s,"type","search"),S(s,"placeholder",l=e[8].actionSearch.PLACEHOLDER()),S(s,"class","svelte-1x90noz"),S(a,"class","icon"),S(i,"class","search-row svelte-1x90noz"),p.checked=!0,S(p,"name","category"),S(p,"type","radio"),p.__value=void 0,mt(p,p.__value),S(p,"class","svelte-1x90noz"),S(k,"class","svelte-1x90noz"),S(d,"class","filters svelte-1x90noz"),S($,"class","svelte-1x90noz"),S(n,"class","content svelte-1x90noz"),t.open=!0,S(t,"class","svelte-1x90noz"),ue.p(p)},m(E,R){D(E,t,R),w(t,n),w(n,i),w(i,s),e[13](s),w(i,o),w(i,r),w(r,f),w(i,h),w(i,a),w(n,u),w(n,d),w(d,k),w(k,g),w(k,p),p.checked=p.__value===e[7],w(d,j);for(let N=0;N<m.length;N+=1)m[N]&&m[N].m(d,null);w(n,W),I&&I.m(n,null),w(n,Y),w(n,$),q&&q.m($,null),w($,ie),G&&G.m($,null),w($,se),B&&B.m($,null),e[24]($),V=!0,ae||(Ae=[J(window,"keydown",e[11]),J(s,"input",e[9]),J(s,"keypress",e[14]),J(r,"click",e[15]),Ke(Ye.call(null,r,{shortcut:"shift+esc"})),Ke(v=Ye.call(null,a,{title:e[8].modal.CLOSE(),shortcut:"esc"})),J(a,"click",e[16]),J(p,"change",e[17]),J(t,"click",Tt(e[25]))],ae=!0)},p(E,R){if((!V||R[0]&256&&l!==(l=E[8].actionSearch.PLACEHOLDER()))&&S(s,"placeholder",l),(!V||R[0]&256)&&c!==(c=E[8].actionSearch.DELETE()+"")&&Q(f,c),v&&$t(v.update)&&R[0]&256&&v.update.call(null,{title:E[8].modal.CLOSE(),shortcut:"esc"}),(!V||R[0]&256)&&A!==(A=E[8].actionSearch.filter.ALL()+"")&&Q(g,A),R[0]&128&&(p.checked=p.__value===E[7]),R[0]&128){Z=Ie(We);let N;for(N=0;N<Z.length;N+=1){const X=rt(E,Z,N);m[N]?m[N].p(X,R):(m[N]=ot(X),m[N].c(),m[N].m(d,null))}for(;N<m.length;N+=1)m[N].d(1);m.length=Z.length}E[0]!==void 0?I?(I.p(E,R),R[0]&1&&F(I,1)):(I=ct(E),I.c(),F(I,1),I.m(n,Y)):I&&(re(),U(I,1,1,()=>{I=null}),oe()),E[3]!==void 0?q?(q.p(E,R),R[0]&8&&F(q,1)):(q=ht(E),q.c(),F(q,1),q.m($,ie)):q&&(re(),U(q,1,1,()=>{q=null}),oe()),!E[3]&&E[4]?G?G.p(E,R):(G=ut(E),G.c(),G.m($,se)):G&&(G.d(1),G=null),E[7]!==void 0||E[2].length>0?B?(B.p(Pe(E),R),R[0]&132&&F(B,1)):(B=at(Pe(E)),B.c(),F(B,1),B.m($,null)):B&&(re(),U(B,1,1,()=>{B=null}),oe())},i(E){V||(F(I),F(q),F(B),V=!0)},o(E){U(I),U(q),U(B),V=!1},d(E){E&&y(t),e[13](null),Pt(m,E),I&&I.d(),q&&q.d(),G&&G.d(),B&&B.d(),e[24](null),ue.r(),ae=!1,qt(Ae)}}}function mn(e,t,n){let i;Re(e,Ue,m=>n(8,i=m));let{currentAction:s=void 0}=t,{nextAction:l=void 0}=t;Bt(()=>{d.focus()});const o=new on.Index({tokenize:"full"});r();async function r(){for(const[,m]of Ge)await o?.addAsync(m.code,`${m.title||""} ${m.variant||""} ${m.category} ${m.id||""} ${m.description||""}`)}async function c(){n(2,a=await o.searchAsync(d.value)),n(3,_=Ht.get(d.value)?.code),n(4,v=Number(d.value))}function f(m){m!==void 0&&u("select",m)}function h(m){if(m.shiftKey&&m.key==="Enter")u("select",_);else if(m.key==="ArrowDown"){const I=k.querySelector("li:focus-within")?.nextSibling??k.querySelector("li:not(.exact)");I instanceof HTMLLIElement&&I.querySelector("button")?.focus()}else if(m.key==="ArrowUp"){const I=k.querySelector("li:focus-within")?.previousSibling??k.querySelector("li:not(.exact)");I instanceof HTMLLIElement&&I.querySelector("button")?.focus()}else{d.focus();return}m.preventDefault()}let a=[],_,v=Number.NaN;const u=Ft();let d,k,A;const g=[[]];function p(m){Je[m?"unshift":"push"](()=>{d=m,n(5,d)})}const j=m=>{m.key==="Enter"&&f(_)},W=()=>f(0),Y=()=>u("close");function $(){A=this.__value,n(7,A)}function ie(){A=this.__value,n(7,A)}const se=()=>f(_),V=()=>f(v),ue=m=>A.has(m),ae=m=>f(m);function Ae(m){Je[m?"unshift":"push"](()=>{k=m,n(6,k)})}const Z=()=>u("close");return e.$$set=m=>{"currentAction"in m&&n(0,s=m.currentAction),"nextAction"in m&&n(1,l=m.nextAction)},[s,l,a,_,v,d,k,A,i,c,f,h,u,p,j,W,Y,$,g,ie,se,V,ue,ae,Ae,Z]}class Cn extends He{constructor(t){super(),Me(this,t,mn,gn,je,{currentAction:0,nextAction:1},null,[-1,-1])}}function vn(e){let t=e[0].share.URL_COPIED()+"",n;return{c(){n=x(t)},l(i){n=K(i,t)},m(i,s){D(i,n,s)},p(i,[s]){s&1&&t!==(t=i[0].share.URL_COPIED()+"")&&Q(n,t)},i:ce,o:ce,d(i){i&&y(n)}}}function kn(e,t,n){let i;return Re(e,Ue,s=>n(0,i=s)),[i]}class In extends He{constructor(t){super(),Me(this,t,kn,vn,je,{})}}export{Cn as A,on as F,In as S};
|
|
//# sourceMappingURL=SharePopup.8e9b677a.js.map
|