Reddit Old Emotes 😀

subreddit emotes for old.reddit.com

// ==UserScript==
// @name        Reddit Old Emotes 😀
// @version     1.0
// @author      Agreasyforkuser
// @description subreddit emotes for old.reddit.com
// @match       https://*.reddit.com/*/comments/*
// @connect     www.reddit.com
// @icon        https://www.redditstatic.com/desktop2x/img/favicon/android-icon-192x192.png
// @grant       GM.xmlHttpRequest
// @grant       GM.getValue
// @grant       GM.setValue
// @require     https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @license     MIT
// @namespace https://greasyfork.org/users/1115027
// ==/UserScript==


(()=>{"use strict";var e={122:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(81),r=n.n(o),s=n(645),i=n.n(s),l=n(667),a=n.n(l),c=new URL(n(248),n.b),u=i()(r()),d=a()(c);u.push([e.id,".icon-btn[data-v-458c4444],a.settings-btn[data-v-458c4444]{display:none !important;background-size:50% 50%;background-color:#fff;background-repeat:no-repeat;background-position:center;border-radius:50%;cursor:pointer;display:block;transition:.25s;width:48px;height:48px;text-decoration:none;text-indent:-9999px;overflow:hidden}.icon-btn[data-v-458c4444]:hover,a.settings-btn[data-v-458c4444]:hover{background-color:#eee}.userscript-old-reddit-emotes *{background:none;outline:none;border:none;box-sizing:border-box;margin:0;padding:0;color:#111;font-size:15px;font-weight:normal;font-family:Arial,Helvetica,sans-serif;line-height:1.5;vertical-align:baseline}a.settings-btn[data-v-458c4444]{position:fixed;bottom:20px;right:20px;z-index:9999;background-image:url("+d+");box-shadow:rgba(11,11,11,.1) 0 2px 8px}a.settings-btn[data-v-458c4444]:hover{box-shadow:rgba(11,11,11,.4) 0 0px 8px}.dialog-wrapper[data-v-458c4444]{background:rgba(11,11,11,.4);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999}.dialog-wrapper>.dialog[data-v-458c4444]{background:#fff;padding:20px;border-radius:4px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);min-width:300px}",""]);const f=u},264:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(81),r=n.n(o),s=n(645),i=n.n(s)()(r());i.push([e.id,'.icon-btn[data-v-f76468b6]{background-size:50% 50%;background-color:#fff;background-repeat:no-repeat;background-position:center;border-radius:50%;cursor:pointer;display:block;transition:.25s;width:48px;height:48px;text-decoration:none;text-indent:-9999px;overflow:hidden}.icon-btn[data-v-f76468b6]:hover{background-color:#eee}.settings[data-v-f76468b6]{display:grid;gap:20px;max-height:80vh;overflow-y:auto}.group[data-v-f76468b6]{display:grid;gap:10px}.group[data-v-f76468b6]:not(:first-child){border-top:1px solid #ddd;padding-top:20px}.group.actions[data-v-f76468b6]{display:flex;gap:10px}.group.actions .hspace[data-v-f76468b6]{flex:1}h1[data-v-f76468b6]{font-size:24px;font-weight:bold}h2[data-v-f76468b6]{font-size:21px;font-weight:bold}a.project-url[data-v-f76468b6]{display:block;color:blue;text-decoration:none}a.project-url[data-v-f76468b6]:hover{text-decoration:underline}label[data-v-f76468b6]{cursor:pointer;font-weight:bold;align-items:center;display:grid;gap:10px;grid-template-columns:1fr 2fr;justify-items:left}input[data-v-f76468b6]{font-weight:normal;border:1px solid #ddd;border-radius:4px;padding:5px}input[data-v-f76468b6]:focus{border-color:#000}input[data-v-f76468b6]:not([type=checkbox]){width:100%}a.btn[data-v-f76468b6]{background-color:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer;display:inline-block;padding:5px 10px;text-decoration:none}a.btn[data-v-f76468b6]:hover{background-color:#eee}a.btn.positive[data-v-f76468b6]{background-color:green;border-color:#006400;color:#fff}a.btn.positive[data-v-f76468b6]:hover{background-color:#006400}.emotes[data-v-f76468b6]{display:grid;grid-template-columns:repeat(3, 1fr);row-gap:10px}.emotes .emote[data-v-f76468b6]{display:flex;align-items:center;gap:10px}.emotes .emote img[data-v-f76468b6]{display:block;width:20px;height:20px}.emotes .emote code[data-v-f76468b6]{font-family:"Courier New",Courier,monospace;line-height:20px;display:block}',""]);const l=i},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(i[a]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},667:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},81:e=>{e.exports=function(e){return e[1]}},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var s={},i=[],l=0;l<e.length;l++){var a=e[l],c=o.base?a[0]+o.base:a[0],u=s[c]||0,d="".concat(c," ").concat(u);s[c]=u+1;var f=n(d),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var h=r(p,o);o.byIndex=l,t.splice(l,0,{identifier:d,updater:h,references:1})}i.push(d)}return i}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=o(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var l=n(s[i]);t[l].references--}for(var a=o(e,r),c=0;c<s.length;c++){var u=n(s[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}s=a}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},744:(e,t)=>{t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}},248:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAB7klEQVR4Ae3YAWQbYRiH8SEIgiIoiiIYhsNQBKEIimAYgqIIgiIoAhiKoBgKCIKgGGAoAgiCYAiGAIJDEQSHfx8AR7+7e7+TfOUefgCBy/u+575UVVWV3qXDBYLuN5ThAcG2hzJsEGTnUA4JgqwN5dRCcN1BOXVx1GqI4OoJymkEVxFK6wxbCBuM0Ez9dRZQQQtEqRl6wBbCGjV49wilHDDDE+QhwQQvSKCUIbxq4QCdyBuaMPcCndgzTF1DAUjwzbJ1/kGedoghTwvTTjdaoodGapP1sYGMesjdvfFR38NVDY+QQR+5axgGeGBezdmmqKNwIyRQhlfDjG2gDAfcwasOdpBDG0XrQw5bfEcp/XAfG1NnkMM1SmsAfWAFa/Gx3liH7rVpbmdam4ZuoQ/EsNSAHDoopQj/IYcIRetBDmtcwqtb7KEMcxRtCWWIrcNcw3P5p9506ROMLQdMBe3RQ1YDJFBBN8jdGDKaI0K6Nl4ho5/IXQM7yEOMJVZ4gzysYD/1AbiCqSV0YjOYu4JOaI8LeDWFkLbAX8jTHGsIaWN4d449hBgTfE0dO8vAr9FNPe0pDhC2qKOUmrhx/GAdMyinXxmv2T00cNSGUE5dBFf3s39eb0E5JAi2BMqwQbD9gTJMEGw1dBzaqKqqKrF3DNQYrK6wOS0AAAAASUVORK5CYII="}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o](s,s.exports,n),s.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.b=document.baseURI||self.location.href,n.nc=void 0,(()=>{function e(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e<o.length;e++)n[o[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){return!!e||""===e}function r(e){if(x(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=E(o)?l(o):r(o);if(s)for(const e in s)t[e]=s[e]}return t}return E(e)||O(e)?e:void 0}const s=/;(?![^(]*\))/g,i=/:(.+)/;function l(e){const t={};return e.split(s).forEach((e=>{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(E(e))t=e;else if(x(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const c=e=>E(e)?e:null==e?"":x(e)||O(e)&&(e.toString===F||!A(e.toString))?JSON.stringify(e,u,2):String(e),u=(e,t)=>t&&t.__v_isRef?u(e,t.value):C(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:S(t)?{[`Set(${t.size})`]:[...t.values()]}:!O(t)||x(t)||j(t)?t:String(t),d={},f=[],p=()=>{},h=()=>!1,g=/^on[^a-z]/,v=e=>g.test(e),m=e=>e.startsWith("onUpdate:"),y=Object.assign,b=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_=Object.prototype.hasOwnProperty,w=(e,t)=>_.call(e,t),x=Array.isArray,C=e=>"[object Map]"===N(e),S=e=>"[object Set]"===N(e),A=e=>"function"==typeof e,E=e=>"string"==typeof e,k=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,T=e=>O(e)&&A(e.then)&&A(e.catch),F=Object.prototype.toString,N=e=>F.call(e),j=e=>"[object Object]"===N(e),M=e=>E(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,R=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),I=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L=/-(\w)/g,P=I((e=>e.replace(L,((e,t)=>t?t.toUpperCase():"")))),B=/\B([A-Z])/g,U=I((e=>e.replace(B,"-$1").toLowerCase())),V=I((e=>e.charAt(0).toUpperCase()+e.slice(1))),D=I((e=>e?`on${V(e)}`:"")),W=(e,t)=>!Object.is(e,t),G=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},H=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},z=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let q,Q;class K{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&Q&&(this.parent=Q,this.index=(Q.scopes||(Q.scopes=[])).push(this)-1)}run(e){if(this.active){const t=Q;try{return Q=this,e()}finally{Q=t}}}on(){Q=this}off(){Q=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function J(e){return new K(e)}const Y=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Z=e=>(e.w&oe)>0,X=e=>(e.n&oe)>0,ee=new WeakMap;let te,ne=0,oe=1;const re=Symbol(""),se=Symbol("");class ie{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t=Q){t&&t.active&&t.effects.push(e)}(this,n)}run(){if(!this.active)return this.fn();let e=te,t=ae;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=te,te=this,ae=!0,oe=1<<++ne,ne<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=oe})(this):le(this),this.fn()}finally{ne<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];Z(r)&&!X(r)?r.delete(e):t[n++]=r,r.w&=~oe,r.n&=~oe}t.length=n}})(this),oe=1<<--ne,te=this.parent,ae=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){te===this?this.deferStop=!0:this.active&&(le(this),this.onStop&&this.onStop(),this.active=!1)}}function le(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let ae=!0;const ce=[];function ue(){ce.push(ae),ae=!1}function de(){const e=ce.pop();ae=void 0===e||e}function fe(e,t,n){if(ae&&te){let t=ee.get(e);t||ee.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Y()),pe(o)}}function pe(e,t){let n=!1;ne<=30?X(e)||(e.n|=oe,n=!Z(e)):n=!e.has(te),n&&(e.add(te),te.deps.push(e))}function he(e,t,n,o,r,s){const i=ee.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&x(e))i.forEach(((e,t)=>{("length"===t||t>=o)&&l.push(e)}));else switch(void 0!==n&&l.push(i.get(n)),t){case"add":x(e)?M(n)&&l.push(i.get("length")):(l.push(i.get(re)),C(e)&&l.push(i.get(se)));break;case"delete":x(e)||(l.push(i.get(re)),C(e)&&l.push(i.get(se)));break;case"set":C(e)&&l.push(i.get(re))}if(1===l.length)l[0]&&ge(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);ge(Y(e))}}function ge(e,t){const n=x(e)?e:[...e];for(const e of n)e.computed&&ve(e);for(const e of n)e.computed||ve(e)}function ve(e,t){(e!==te||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const me=e("__proto__,__v_isRef,__isVue"),ye=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(k)),be=Se(),_e=Se(!1,!0),we=Se(!0),xe=Ce();function Ce(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=lt(this);for(let e=0,t=this.length;e<t;e++)fe(n,0,e+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(lt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ue();const n=lt(this)[t].apply(this,e);return de(),n}})),e}function Se(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?Xe:Ze:t?Ye:Je).get(n))return n;const s=x(n);if(!e&&s&&w(xe,o))return Reflect.get(xe,o,r);const i=Reflect.get(n,o,r);return(k(o)?ye.has(o):me(o))?i:(e||fe(n,0,o),t?i:pt(i)?s&&M(o)?i:i.value:O(i)?e?tt(i):et(i):i)}}function Ae(e=!1){return function(t,n,o,r){let s=t[n];if(rt(s)&&pt(s)&&!pt(o))return!1;if(!e&&!rt(o)&&(st(o)||(o=lt(o),s=lt(s)),!x(t)&&pt(s)&&!pt(o)))return s.value=o,!0;const i=x(t)&&M(n)?Number(n)<t.length:w(t,n),l=Reflect.set(t,n,o,r);return t===lt(r)&&(i?W(o,s)&&he(t,"set",n,o):he(t,"add",n,o)),l}}const Ee={get:be,set:Ae(),deleteProperty:function(e,t){const n=w(e,t),o=(e[t],Reflect.deleteProperty(e,t));return o&&n&&he(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return k(t)&&ye.has(t)||fe(e,0,t),n},ownKeys:function(e){return fe(e,0,x(e)?"length":re),Reflect.ownKeys(e)}},ke={get:we,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Oe=y({},Ee,{get:_e,set:Ae(!0)}),$e=e=>e,Te=e=>Reflect.getPrototypeOf(e);function Fe(e,t,n=!1,o=!1){const r=lt(e=e.__v_raw),s=lt(t);n||(t!==s&&fe(r,0,t),fe(r,0,s));const{has:i}=Te(r),l=o?$e:n?ut:ct;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Ne(e,t=!1){const n=this.__v_raw,o=lt(n),r=lt(e);return t||(e!==r&&fe(o,0,e),fe(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function je(e,t=!1){return e=e.__v_raw,!t&&fe(lt(e),0,re),Reflect.get(e,"size",e)}function Me(e){e=lt(e);const t=lt(this);return Te(t).has.call(t,e)||(t.add(e),he(t,"add",e,e)),this}function Re(e,t){t=lt(t);const n=lt(this),{has:o,get:r}=Te(n);let s=o.call(n,e);s||(e=lt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?W(t,i)&&he(n,"set",e,t):he(n,"add",e,t),this}function Ie(e){const t=lt(this),{has:n,get:o}=Te(t);let r=n.call(t,e);r||(e=lt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&he(t,"delete",e,void 0),s}function Le(){const e=lt(this),t=0!==e.size,n=e.clear();return t&&he(e,"clear",void 0,void 0),n}function Pe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=lt(s),l=t?$e:e?ut:ct;return!e&&fe(i,0,re),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Be(e,t,n){return function(...o){const r=this.__v_raw,s=lt(r),i=C(s),l="entries"===e||e===Symbol.iterator&&i,a="keys"===e&&i,c=r[e](...o),u=n?$e:t?ut:ct;return!t&&fe(s,0,a?se:re),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return"delete"!==e&&this}}function Ve(){const e={get(e){return Fe(this,e)},get size(){return je(this)},has:Ne,add:Me,set:Re,delete:Ie,clear:Le,forEach:Pe(!1,!1)},t={get(e){return Fe(this,e,!1,!0)},get size(){return je(this)},has:Ne,add:Me,set:Re,delete:Ie,clear:Le,forEach:Pe(!1,!0)},n={get(e){return Fe(this,e,!0)},get size(){return je(this,!0)},has(e){return Ne.call(this,e,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Pe(!0,!1)},o={get(e){return Fe(this,e,!0,!0)},get size(){return je(this,!0)},has(e){return Ne.call(this,e,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Pe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Be(r,!1,!1),n[r]=Be(r,!0,!1),t[r]=Be(r,!1,!0),o[r]=Be(r,!0,!0)})),[e,n,t,o]}const[De,We,Ge,He]=Ve();function ze(e,t){const n=t?e?He:Ge:e?We:De;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(w(n,o)&&o in t?n:t,o,r)}const qe={get:ze(!1,!1)},Qe={get:ze(!1,!0)},Ke={get:ze(!0,!1)},Je=new WeakMap,Ye=new WeakMap,Ze=new WeakMap,Xe=new WeakMap;function et(e){return rt(e)?e:nt(e,!1,Ee,qe,Je)}function tt(e){return nt(e,!0,ke,Ke,Ze)}function nt(e,t,n,o,r){if(!O(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>N(e).slice(8,-1))(l));var l;if(0===i)return e;const a=new Proxy(e,2===i?o:n);return r.set(e,a),a}function ot(e){return rt(e)?ot(e.__v_raw):!(!e||!e.__v_isReactive)}function rt(e){return!(!e||!e.__v_isReadonly)}function st(e){return!(!e||!e.__v_isShallow)}function it(e){return ot(e)||rt(e)}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function at(e){return H(e,"__v_skip",!0),e}const ct=e=>O(e)?et(e):e,ut=e=>O(e)?tt(e):e;function dt(e){ae&&te&&pe((e=lt(e)).dep||(e.dep=Y()))}function ft(e,t){(e=lt(e)).dep&&ge(e.dep)}function pt(e){return!(!e||!0!==e.__v_isRef)}function ht(e){return n=!1,pt(t=e)?t:new gt(t,n);var t,n}class gt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:lt(e),this._value=t?e:ct(e)}get value(){return dt(this),this._value}set value(e){e=this.__v_isShallow?e:lt(e),W(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:ct(e),ft(this))}}function vt(e){return pt(e)?e.value:e}const mt={get:(e,t,n)=>vt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return pt(r)&&!pt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function yt(e){return ot(e)?e:new Proxy(e,mt)}class bt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function _t(e,t,n){const o=e[t];return pt(o)?o:new bt(e,t,n)}class wt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ie(e,(()=>{this._dirty||(this._dirty=!0,ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=lt(this);return dt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function xt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(e){St(e,t,n)}return r}function Ct(e,t,n,o){if(A(e)){const r=xt(e,t,n,o);return r&&T(r)&&r.catch((e=>{St(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Ct(e[s],t,n,o));return r}function St(e,t,n,o=!0){if(t&&t.vnode,t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void xt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let At=!1,Et=!1;const kt=[];let Ot=0;const $t=[];let Tt=null,Ft=0;const Nt=[];let jt=null,Mt=0;const Rt=Promise.resolve();let It=null,Lt=null;function Pt(e){const t=It||Rt;return e?t.then(this?e.bind(this):e):t}function Bt(e){kt.length&&kt.includes(e,At&&e.allowRecurse?Ot+1:Ot)||e===Lt||(null==e.id?kt.push(e):kt.splice(function(e){let t=Ot+1,n=kt.length;for(;t<n;){const o=t+n>>>1;Gt(kt[o])<e?t=o+1:n=o}return t}(e.id),0,e),Ut())}function Ut(){At||Et||(Et=!0,It=Rt.then(Ht))}function Vt(e,t,n,o){x(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),Ut()}function Dt(e,t=null){if($t.length){for(Lt=t,Tt=[...new Set($t)],$t.length=0,Ft=0;Ft<Tt.length;Ft++)Tt[Ft]();Tt=null,Ft=0,Lt=null,Dt(e,t)}}function Wt(e){if(Dt(),Nt.length){const e=[...new Set(Nt)];if(Nt.length=0,jt)return void jt.push(...e);for(jt=e,jt.sort(((e,t)=>Gt(e)-Gt(t))),Mt=0;Mt<jt.length;Mt++)jt[Mt]();jt=null,Mt=0}}const Gt=e=>null==e.id?1/0:e.id;function Ht(e){Et=!1,At=!0,Dt(e),kt.sort(((e,t)=>Gt(e)-Gt(t)));try{for(Ot=0;Ot<kt.length;Ot++){const e=kt[Ot];e&&!1!==e.active&&xt(e,null,14)}}finally{Ot=0,kt.length=0,Wt(),At=!1,It=null,(kt.length||$t.length||Nt.length)&&Ht(e)}}function zt(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||d;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||d;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(z))}let l,a=o[l=D(t)]||o[l=D(P(t))];!a&&s&&(a=o[l=D(U(t))]),a&&Ct(a,e,6,r);const c=o[l+"Once"];if(c){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,Ct(c,e,6,r)}}function qt(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={};return s?(x(s)?s.forEach((e=>i[e]=null)):y(i,s),o.set(e,i),i):(o.set(e,null),null)}function Qt(e,t){return!(!e||!v(t))&&(t=t.slice(2).replace(/Once$/,""),w(e,t[0].toLowerCase()+t.slice(1))||w(e,U(t))||w(e,t))}new Set,new Map;let Kt=null,Jt=null;function Yt(e){const t=Kt;return Kt=e,Jt=e&&e.type.__scopeId||null,t}function Zt(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:a,emit:c,render:u,renderCache:d,data:f,setupState:p,ctx:h,inheritAttrs:g}=e;let v,y;const b=Yt(e);try{if(4&n.shapeFlag){const e=r||o;v=vo(u.call(e,e,d,s,p,f,h)),y=a}else{const e=t;v=vo(e.length>1?e(s,{attrs:a,slots:l,emit:c}):e(s,null)),y=t.props?a:Xt(a)}}catch(t){Zn.length=0,St(t,e,1),v=fo(Jn)}let _=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=_;e.length&&7&t&&(i&&e.some(m)&&(y=en(y,i)),_=po(_,y))}return n.dirs&&(_=po(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),v=_,Yt(b),v}const Xt=e=>{let t;for(const n in e)("class"===n||"style"===n||v(n))&&((t||(t={}))[n]=e[n]);return t},en=(e,t)=>{const n={};for(const o in e)m(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function tn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!Qt(n,s))return!0}return!1}function nn(e,t,n=!1){const o=xo||Kt;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&A(t)?t.call(o.proxy):t}}const on={};function rn(e,t,n){return function(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:i}=d){const l=xo;let a,c,u=!1,f=!1;if(pt(e)?(a=()=>e.value,u=st(e)):ot(e)?(a=()=>e,o=!0):x(e)?(f=!0,u=e.some((e=>ot(e)||st(e))),a=()=>e.map((e=>pt(e)?e.value:ot(e)?sn(e):A(e)?xt(e,l,2):void 0))):a=A(e)?t?()=>xt(e,l,2):()=>{if(!l||!l.isUnmounted)return c&&c(),Ct(e,l,3,[h])}:p,t&&o){const e=a;a=()=>sn(e())}let h=e=>{c=y.onStop=()=>{xt(e,l,4)}};if(ko)return h=p,t?n&&Ct(t,l,3,[a(),f?[]:void 0,h]):a(),p;let g=f?[]:on;const v=()=>{if(y.active)if(t){const e=y.run();(o||u||(f?e.some(((e,t)=>W(e,g[t]))):W(e,g)))&&(c&&c(),Ct(t,l,3,[e,g===on?void 0:g,h]),g=e)}else y.run()};let m;v.allowRecurse=!!t,m="sync"===r?v:"post"===r?()=>Gn(v,l&&l.suspense):()=>function(e){Vt(e,Tt,$t,Ft)}(v);const y=new ie(a,m);return t?n?v():g=y.run():"post"===r?Gn(y.run.bind(y),l&&l.suspense):y.run(),()=>{y.stop(),l&&l.scope&&b(l.scope.effects,y)}}(e,t,n)}function sn(e,t){if(!O(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),pt(e))sn(e.value,t);else if(x(e))for(let n=0;n<e.length;n++)sn(e[n],t);else if(S(e)||C(e))e.forEach((e=>{sn(e,t)}));else if(j(e))for(const n in e)sn(e[n],t);return e}const ln=[Function,Array],an={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ln,onEnter:ln,onAfterEnter:ln,onEnterCancelled:ln,onBeforeLeave:ln,onLeave:ln,onAfterLeave:ln,onLeaveCancelled:ln,onBeforeAppear:ln,onAppear:ln,onAfterAppear:ln,onAppearCancelled:ln},setup(e,{slots:t}){const n=Co(),o=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return bn((()=>{e.isMounted=!0})),_n((()=>{e.isUnmounting=!0})),e}();let r;return()=>{const s=t.default&&hn(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==Jn){i=t,e=!0;break}}const l=lt(e),{mode:a}=l;if(o.isLeaving)return dn(i);const c=fn(i);if(!c)return dn(i);const u=un(c,l,o,n);pn(c,u);const d=n.subTree,f=d&&fn(d);let p=!1;const{getTransitionKey:h}=c.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,p=!0)}if(f&&f.type!==Jn&&(!io(c,f)||p)){const e=un(f,l,o,n);if(pn(f,e),"out-in"===a)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},dn(i);"in-out"===a&&c.type!==Jn&&(e.delayLeave=(e,t,n)=>{cn(o,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function cn(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function un(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:h,onBeforeAppear:g,onAppear:v,onAfterAppear:m,onAppearCancelled:y}=t,b=String(e.key),_=cn(n,e),w=(e,t)=>{e&&Ct(e,o,9,t)},C=(e,t)=>{const n=t[1];w(e,t),x(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},S={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=g||l}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&io(e,s)&&s.el._leaveCb&&s.el._leaveCb(),w(o,[t])},enter(e){let t=a,o=c,s=u;if(!n.isMounted){if(!r)return;t=v||a,o=m||c,s=y||u}let i=!1;const l=e._enterCb=t=>{i||(i=!0,w(t?s:o,[e]),S.delayedLeave&&S.delayedLeave(),e._enterCb=void 0)};t?C(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();w(d,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),w(n?h:p,[t]),t._leaveCb=void 0,_[r]===e&&delete _[r])};_[r]=e,f?C(f,[t,i]):i()},clone:e=>un(e,t,n,o)};return S}function dn(e){if(mn(e))return(e=po(e)).children=null,e}function fn(e){return mn(e)?e.children?e.children[0]:void 0:e}function pn(e,t){6&e.shapeFlag&&e.component?pn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===Qn?(128&i.patchFlag&&r++,o=o.concat(hn(i.children,t,l))):(t||i.type!==Jn)&&o.push(null!=l?po(i,{key:l}):i)}if(r>1)for(let e=0;e<o.length;e++)o[e].patchFlag=-2;return o}function gn(e){return A(e)?{setup:e,name:e.name}:e}const vn=e=>!!e.type.__asyncLoader,mn=e=>e.type.__isKeepAlive;RegExp,RegExp;const yn=e=>(t,n=xo)=>(!ko||"sp"===e)&&function(e,t,n=xo,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ue(),So(n);const r=Ct(t,n,e,o);return Ao(),de(),r});return o?r.unshift(s):r.push(s),s}}(e,t,n),bn=(yn("bm"),yn("m")),_n=(yn("bu"),yn("u"),yn("bum")),wn=yn("um");function xn(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let a=l.dir[o];a&&(ue(),Ct(a,n,8,[e.el,l,e,t]),de())}}yn("sp"),yn("rtg"),yn("rtc");const Cn=Symbol();function Sn(e,t,n,o){let r;const s=n&&n[o];if(x(e)||E(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(O(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}const An=e=>e?Eo(e)?To(e)||e.proxy:An(e.parent):null,En=y(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>An(e.parent),$root:e=>An(e.root),$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>Bt(e.update)),$nextTick:e=>e.n||(e.n=Pt.bind(e.proxy)),$watch:e=>p}),kn={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:a}=e;let c;if("$"!==t[0]){const l=i[t];if(void 0!==l)switch(l){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==d&&w(o,t))return i[t]=1,o[t];if(r!==d&&w(r,t))return i[t]=2,r[t];if((c=e.propsOptions[0])&&w(c,t))return i[t]=3,s[t];if(n!==d&&w(n,t))return i[t]=4,n[t];i[t]=0}}const u=En[t];let f,p;return u?("$attrs"===t&&fe(e,0,t),u(e)):(f=l.__cssModules)&&(f=f[t])?f:n!==d&&w(n,t)?(i[t]=4,n[t]):(p=a.config.globalProperties,w(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==d&&w(r,t)?(r[t]=n,!0):o!==d&&w(o,t)?(o[t]=n,!0):!(w(e.props,t)||"$"===t[0]&&t.slice(1)in e||(s[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==d&&w(e,i)||t!==d&&w(t,i)||(l=s[0])&&w(l,i)||w(o,i)||w(En,i)||w(r.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function On(e,t,n,o){const[r,s]=e.propsOptions;let i,l=!1;if(t)for(let a in t){if(R(a))continue;const c=t[a];let u;r&&w(r,u=P(a))?s&&s.includes(u)?(i||(i={}))[u]=c:n[u]=c:Qt(e.emitsOptions,a)||a in o&&c===o[a]||(o[a]=c,l=!0)}if(s){const t=lt(n),o=i||d;for(let i=0;i<s.length;i++){const l=s[i];n[l]=$n(r,t,l,o[l],e,!w(o,l))}}return l}function $n(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=w(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&A(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(So(r),o=s[n]=e.call(null,t),Ao())}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==U(n)||(o=!0))}return o}function Tn(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,i={},l=[];if(!s)return o.set(e,f),f;if(x(s))for(let e=0;e<s.length;e++){const t=P(s[e]);Fn(t)&&(i[t]=d)}else if(s)for(const e in s){const t=P(e);if(Fn(t)){const n=s[e],o=i[t]=x(n)||A(n)?{type:n}:n;if(o){const e=Mn(Boolean,o.type),n=Mn(String,o.type);o[0]=e>-1,o[1]=n<0||e<n,(e>-1||w(o,"default"))&&l.push(t)}}}const a=[i,l];return o.set(e,a),a}function Fn(e){return"$"!==e[0]}function Nn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function jn(e,t){return Nn(e)===Nn(t)}function Mn(e,t){return x(t)?t.findIndex((t=>jn(t,e))):A(t)&&jn(t,e)?0:-1}const Rn=e=>"_"===e[0]||"$stable"===e,In=e=>x(e)?e.map(vo):[vo(e)],Ln=(e,t,n)=>{if(t._n)return t;const o=function(e,t=Kt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&no(-1);const r=Yt(t),s=e(...n);return Yt(r),o._d&&no(1),s};return o._n=!0,o._c=!0,o._d=!0,o}(((...e)=>In(t(...e))),n);return o._c=!1,o},Pn=(e,t,n)=>{const o=e._ctx;for(const n in e){if(Rn(n))continue;const r=e[n];if(A(r))t[n]=Ln(0,r,o);else if(null!=r){const e=In(r);t[n]=()=>e}}},Bn=(e,t)=>{const n=In(t);e.slots.default=()=>n};function Un(){return{app:null,config:{isNativeTag:h,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Vn=0;function Dn(e,t){return function(n,o=null){A(n)||(n=Object.assign({},n)),null==o||O(o)||(o=null);const r=Un(),s=new Set;let i=!1;const l=r.app={_uid:Vn++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Fo,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&A(e.install)?(s.add(e),e.install(l,...t)):A(e)&&(s.add(e),e(l,...t))),l),mixin:e=>l,component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,a,c){if(!i){const u=fo(n,o);return u.appContext=r,a&&t?t(u,s):e(u,s,c),i=!0,l._container=s,s.__vue_app__=l,To(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l)};return l}}function Wn(e,t,n,o,r=!1){if(x(e))return void e.forEach(((e,s)=>Wn(e,t&&(x(t)?t[s]:t),n,o,r)));if(vn(o)&&!r)return;const s=4&o.shapeFlag?To(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:a}=e,c=t&&t.r,u=l.refs===d?l.refs={}:l.refs,f=l.setupState;if(null!=c&&c!==a&&(E(c)?(u[c]=null,w(f,c)&&(f[c]=null)):pt(c)&&(c.value=null)),A(a))xt(a,l,12,[i,u]);else{const t=E(a),o=pt(a);if(t||o){const o=()=>{if(e.f){const n=t?u[a]:a.value;r?x(n)&&b(n,s):x(n)?n.includes(s)||n.push(s):t?(u[a]=[s],w(f,a)&&(f[a]=u[a])):(a.value=[s],e.k&&(u[e.k]=a.value))}else t?(u[a]=i,w(f,a)&&(f[a]=i)):pt(a)&&(a.value=i,e.k&&(u[e.k]=i))};i?(o.id=-1,Gn(o,n)):o()}}}const Gn=function(e,t){t&&t.pendingBranch?x(e)?t.effects.push(...e):t.effects.push(e):Vt(e,jt,Nt,Mt)};function Hn(e,t){(q||(q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{})).__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:h,nextSibling:g,setScopeId:v=p,cloneNode:m,insertStaticContent:b}=e,_=(e,t,n,o=null,r=null,s=null,i=!1,l=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!io(e,t)&&(o=te(e),J(e,r,s,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Kn:x(e,t,n,o);break;case Jn:C(e,t,n,o);break;case Yn:null==e&&S(t,n,o,i);break;case Qn:j(e,t,n,o,r,s,i,l,a);break;default:1&d?A(e,t,n,o,r,s,i,l,a):6&d?M(e,t,n,o,r,s,i,l,a):(64&d||128&d)&&c.process(e,t,n,o,r,s,i,l,a,oe)}null!=u&&r&&Wn(u,e&&e.ref,s,t||e,!t)},x=(e,t,n,r)=>{if(null==e)o(t.el=l(t.children),n,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},C=(e,t,n,r)=>{null==e?o(t.el=a(t.children||""),n,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=b(e.children,t,n,o,e.el,e.anchor)},A=(e,t,n,o,r,s,i,l,a)=>{i=i||"svg"===t.type,null==e?E(t,n,o,r,s,i,l,a):$(e,t,r,s,i,l,a)},E=(e,t,n,r,l,a,c,d)=>{let f,p;const{type:h,props:g,shapeFlag:v,transition:y,patchFlag:b,dirs:_}=e;if(e.el&&void 0!==m&&-1===b)f=e.el=m(e.el);else{if(f=e.el=i(e.type,a,g&&g.is,g),8&v?u(f,e.children):16&v&&O(e.children,f,null,r,l,a&&"foreignObject"!==h,c,d),_&&xn(e,null,r,"created"),g){for(const t in g)"value"===t||R(t)||s(f,t,null,g[t],a,e.children,r,l,ee);"value"in g&&s(f,"value",null,g.value),(p=g.onVnodeBeforeMount)&&bo(p,r,e)}k(f,e,e.scopeId,c,r)}_&&xn(e,null,r,"beforeMount");const w=(!l||l&&!l.pendingBranch)&&y&&!y.persisted;w&&y.beforeEnter(f),o(f,t,n),((p=g&&g.onVnodeMounted)||w||_)&&Gn((()=>{p&&bo(p,r,e),w&&y.enter(f),_&&xn(e,null,r,"mounted")}),l)},k=(e,t,n,o,r)=>{if(n&&v(e,n),o)for(let t=0;t<o.length;t++)v(e,o[t]);if(r&&t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}},O=(e,t,n,o,r,s,i,l,a=0)=>{for(let c=a;c<e.length;c++){const a=e[c]=l?mo(e[c]):vo(e[c]);_(null,a,t,n,o,r,s,i,l)}},$=(e,t,n,o,r,i,l)=>{const a=t.el=e.el;let{patchFlag:c,dynamicChildren:f,dirs:p}=t;c|=16&e.patchFlag;const h=e.props||d,g=t.props||d;let v;n&&zn(n,!1),(v=g.onVnodeBeforeUpdate)&&bo(v,n,t,e),p&&xn(t,e,n,"beforeUpdate"),n&&zn(n,!0);const m=r&&"foreignObject"!==t.type;if(f?F(e.dynamicChildren,f,a,n,o,m,i):l||D(e,t,a,null,n,o,m,i,!1),c>0){if(16&c)N(a,t,h,g,n,o,r);else if(2&c&&h.class!==g.class&&s(a,"class",null,g.class,r),4&c&&s(a,"style",h.style,g.style,r),8&c){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const l=i[t],c=h[l],u=g[l];u===c&&"value"!==l||s(a,l,c,u,r,e.children,n,o,ee)}}1&c&&e.children!==t.children&&u(a,t.children)}else l||null!=f||N(a,t,h,g,n,o,r);((v=g.onVnodeUpdated)||p)&&Gn((()=>{v&&bo(v,n,t,e),p&&xn(t,e,n,"updated")}),o)},F=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const a=e[l],c=t[l],u=a.el&&(a.type===Qn||!io(a,c)||70&a.shapeFlag)?h(a.el):n;_(a,c,u,null,o,r,s,i,!0)}},N=(e,t,n,o,r,i,l)=>{if(n!==o){for(const a in o){if(R(a))continue;const c=o[a],u=n[a];c!==u&&"value"!==a&&s(e,a,u,c,l,t.children,r,i,ee)}if(n!==d)for(const a in n)R(a)||a in o||s(e,a,n[a],null,l,t.children,r,i,ee);"value"in o&&s(e,"value",n.value,o.value)}},j=(e,t,n,r,s,i,a,c,u)=>{const d=t.el=e?e.el:l(""),f=t.anchor=e?e.anchor:l("");let{patchFlag:p,dynamicChildren:h,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(o(d,n,r),o(f,n,r),O(t.children,n,f,s,i,a,c,u)):p>0&&64&p&&h&&e.dynamicChildren?(F(e.dynamicChildren,h,n,s,i,a,c),(null!=t.key||s&&t===s.subTree)&&qn(e,t,!0)):D(e,t,n,f,s,i,a,c,u)},M=(e,t,n,o,r,s,i,l,a)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,a):I(t,n,o,r,s,i,a):L(e,t,a)},I=(e,t,n,o,r,s,i)=>{const l=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||_o,s={uid:wo++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new K(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Tn(o,r),emitsOptions:qt(o,r),emit:null,emitted:null,propsDefaults:d,inheritAttrs:o.inheritAttrs,ctx:d,data:d,props:d,attrs:d,slots:d,refs:d,setupState:d,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=zt.bind(null,s),e.ce&&e.ce(s),s}(e,o,r);if(mn(e)&&(l.ctx.renderer=oe),function(e,t=!1){ko=t;const{props:n,children:o}=e.vnode,r=Eo(e);(function(e,t,n,o=!1){const r={},s={};H(s,lo,1),e.propsDefaults=Object.create(null),On(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:nt(r,!1,Oe,Qe,Ye):e.type.props?e.props=r:e.props=s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=lt(t),H(t,"_",n)):Pn(t,e.slots={})}else e.slots={},t&&Bn(e,t);H(e.slots,lo,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=at(new Proxy(e.ctx,kn));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(fe(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}(e):null;So(e),ue();const r=xt(o,e,0,[e.props,n]);if(de(),Ao(),T(r)){if(r.then(Ao,Ao),t)return r.then((n=>{Oo(e,n,t)})).catch((t=>{St(t,e,0)}));e.asyncDep=r}else Oo(e,r,t)}else $o(e,t)}(e,t):void 0;ko=!1}(l),l.asyncDep){if(r&&r.registerDep(l,B),!e.el){const e=l.subTree=fo(Jn);C(null,e,t,n)}}else B(l,e,t,n,r,s,i)},L=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&a>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||tn(o,i,c):!!i);if(1024&a)return!0;if(16&a)return o?tn(o,i,c):!!i;if(8&a){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!Qt(c,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void V(o,t,n);o.next=t,function(e){const t=kt.indexOf(e);t>Ot&&kt.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},B=(e,t,n,o,r,s,i)=>{const l=e.effect=new ie((()=>{if(e.isMounted){let t,{next:n,bu:o,u:l,parent:a,vnode:c}=e,u=n;zn(e,!1),n?(n.el=c.el,V(e,n,i)):n=c,o&&G(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&bo(t,a,n,c),zn(e,!0);const d=Zt(e),f=e.subTree;e.subTree=d,_(f,d,h(f.el),te(f),e,r,s),n.el=d.el,null===u&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,d.el),l&&Gn(l,r),(t=n.props&&n.props.onVnodeUpdated)&&Gn((()=>bo(t,a,n,c)),r)}else{let i;const{el:l,props:a}=t,{bm:c,m:u,parent:d}=e,f=vn(t);if(zn(e,!1),c&&G(c),!f&&(i=a&&a.onVnodeBeforeMount)&&bo(i,d,t),zn(e,!0),l&&se){const n=()=>{e.subTree=Zt(e),se(l,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=Zt(e);_(null,i,n,o,e,r,s),t.el=i.el}if(u&&Gn(u,r),!f&&(i=a&&a.onVnodeMounted)){const e=t;Gn((()=>bo(i,d,e)),r)}(256&t.shapeFlag||d&&vn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&Gn(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>Bt(a)),e.scope),a=e.update=()=>l.run();a.id=e.uid,zn(e,!0),a()},V=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=lt(r),[a]=e.propsOptions;let c=!1;if(!(o||i>0)||16&i){let o;On(e,t,r,s)&&(c=!0);for(const s in l)t&&(w(t,s)||(o=U(s))!==s&&w(t,o))||(a?!n||void 0===n[s]&&void 0===n[o]||(r[s]=$n(a,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&w(t,e)||(delete s[e],c=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(Qt(e.emitsOptions,i))continue;const u=t[i];if(a)if(w(s,i))u!==s[i]&&(s[i]=u,c=!0);else{const t=P(i);r[t]=$n(a,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,c=!0)}}c&&he(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=d;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(y(r,t),n||1!==e||delete r._):(s=!t.$stable,Pn(t,r)),i=t}else t&&(Bn(e,t),i={default:1});if(s)for(const e in r)Rn(e)||e in i||delete r[e]})(e,t.children,n),ue(),Dt(void 0,e.update),de()},D=(e,t,n,o,r,s,i,l,a=!1)=>{const c=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void z(c,f,n,o,r,s,i,l,a);if(256&p)return void W(c,f,n,o,r,s,i,l,a)}8&h?(16&d&&ee(c,r,s),f!==c&&u(n,f)):16&d?16&h?z(c,f,n,o,r,s,i,l,a):ee(c,r,s,!0):(8&d&&u(n,""),16&h&&O(f,n,o,r,s,i,l,a))},W=(e,t,n,o,r,s,i,l,a)=>{t=t||f;const c=(e=e||f).length,u=t.length,d=Math.min(c,u);let p;for(p=0;p<d;p++){const o=t[p]=a?mo(t[p]):vo(t[p]);_(e[p],o,n,null,r,s,i,l,a)}c>u?ee(e,r,s,!0,!1,d):O(t,n,o,r,s,i,l,a,d)},z=(e,t,n,o,r,s,i,l,a)=>{let c=0;const u=t.length;let d=e.length-1,p=u-1;for(;c<=d&&c<=p;){const o=e[c],u=t[c]=a?mo(t[c]):vo(t[c]);if(!io(o,u))break;_(o,u,n,null,r,s,i,l,a),c++}for(;c<=d&&c<=p;){const o=e[d],c=t[p]=a?mo(t[p]):vo(t[p]);if(!io(o,c))break;_(o,c,n,null,r,s,i,l,a),d--,p--}if(c>d){if(c<=p){const e=p+1,d=e<u?t[e].el:o;for(;c<=p;)_(null,t[c]=a?mo(t[c]):vo(t[c]),n,d,r,s,i,l,a),c++}}else if(c>p)for(;c<=d;)J(e[c],r,s,!0),c++;else{const h=c,g=c,v=new Map;for(c=g;c<=p;c++){const e=t[c]=a?mo(t[c]):vo(t[c]);null!=e.key&&v.set(e.key,c)}let m,y=0;const b=p-g+1;let w=!1,x=0;const C=new Array(b);for(c=0;c<b;c++)C[c]=0;for(c=h;c<=d;c++){const o=e[c];if(y>=b){J(o,r,s,!0);continue}let u;if(null!=o.key)u=v.get(o.key);else for(m=g;m<=p;m++)if(0===C[m-g]&&io(o,t[m])){u=m;break}void 0===u?J(o,r,s,!0):(C[u-g]=c+1,u>=x?x=u:w=!0,_(o,t[u],n,null,r,s,i,l,a),y++)}const S=w?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const a=e.length;for(o=0;o<a;o++){const a=e[o];if(0!==a){if(r=n[n.length-1],e[r]<a){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<a?s=l+1:i=l;a<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}(C):f;for(m=S.length-1,c=b-1;c>=0;c--){const e=g+c,d=t[e],f=e+1<u?t[e+1].el:o;0===C[c]?_(null,d,n,f,r,s,i,l,a):w&&(m<0||c!==S[m]?Q(d,n,f,2):m--)}}},Q=(e,t,n,r,s=null)=>{const{el:i,type:l,transition:a,children:c,shapeFlag:u}=e;if(6&u)Q(e.component.subTree,t,n,r);else if(128&u)e.suspense.move(t,n,r);else if(64&u)l.move(e,t,n,oe);else if(l!==Qn)if(l!==Yn)if(2!==r&&1&u&&a)if(0===r)a.beforeEnter(i),o(i,t,n),Gn((()=>a.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=a,l=()=>o(i,t,n),c=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,c):c()}else o(i,t,n);else(({el:e,anchor:t},n,r)=>{let s;for(;e&&e!==t;)s=g(e),o(e,n,r),e=s;o(t,n,r)})(e,t,n);else{o(i,t,n);for(let e=0;e<c.length;e++)Q(c[e],t,n,r);o(e.anchor,t,n)}},J=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:a,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:f}=e;if(null!=l&&Wn(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const p=1&u&&f,h=!vn(e);let g;if(h&&(g=i&&i.onVnodeBeforeUnmount)&&bo(g,t,e),6&u)X(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);p&&xn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,oe,o):c&&(s!==Qn||d>0&&64&d)?ee(c,t,n,!1,!0):(s===Qn&&384&d||!r&&16&u)&&ee(a,t,n),o&&Y(e)}(h&&(g=i&&i.onVnodeUnmounted)||p)&&Gn((()=>{g&&bo(g,t,e),p&&xn(e,null,t,"unmounted")}),n)},Y=e=>{const{type:t,el:n,anchor:o,transition:s}=e;if(t===Qn)return void Z(n,o);if(t===Yn)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),r(e),e=n;r(t)})(e);const i=()=>{r(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},Z=(e,t)=>{let n;for(;e!==t;)n=g(e),r(e),e=n;r(t)},X=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&G(o),r.stop(),s&&(s.active=!1,J(i,e,t,n)),l&&Gn(l,t),Gn((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},ee=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)J(e[i],t,n,o,r)},te=e=>6&e.shapeFlag?te(e.component.subTree):128&e.shapeFlag?e.suspense.next():g(e.anchor||e.el),ne=(e,t,n)=>{null==e?t._vnode&&J(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),Wt(),t._vnode=e},oe={p:_,um:J,m:Q,r:Y,mt:I,mc:O,pc:D,pbc:F,n:te,o:e};let re,se;return t&&([re,se]=t(oe)),{render:ne,hydrate:re,createApp:Dn(ne,re)}}function zn({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function qn(e,t,n=!1){const o=e.children,r=t.children;if(x(o)&&x(r))for(let e=0;e<o.length;e++){const t=o[e];let s=r[e];1&s.shapeFlag&&!s.dynamicChildren&&((s.patchFlag<=0||32===s.patchFlag)&&(s=r[e]=mo(r[e]),s.el=t.el),n||qn(t,s))}}const Qn=Symbol(void 0),Kn=Symbol(void 0),Jn=Symbol(void 0),Yn=Symbol(void 0),Zn=[];let Xn=null;function eo(e=!1){Zn.push(Xn=e?null:[])}let to=1;function no(e){to+=e}function oo(e){return e.dynamicChildren=to>0?Xn||f:null,Zn.pop(),Xn=Zn[Zn.length-1]||null,to>0&&Xn&&Xn.push(e),e}function ro(e,t,n,o,r,s){return oo(uo(e,t,n,o,r,s,!0))}function so(e){return!!e&&!0===e.__v_isVNode}function io(e,t){return e.type===t.type&&e.key===t.key}const lo="__vInternal",ao=({key:e})=>null!=e?e:null,co=({ref:e,ref_key:t,ref_for:n})=>null!=e?E(e)||pt(e)||A(e)?{i:Kt,r:e,k:t,f:!!n}:e:null;function uo(e,t=null,n=null,o=0,r=null,s=(e===Qn?0:1),i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ao(t),ref:t&&co(t),scopeId:Jt,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(yo(a,n),128&s&&e.normalize(a)):n&&(a.shapeFlag|=E(n)?8:16),to>0&&!i&&Xn&&(a.patchFlag>0||6&s)&&32!==a.patchFlag&&Xn.push(a),a}const fo=function(e,t=null,n=null,o=0,s=null,i=!1){if(e&&e!==Cn||(e=Jn),so(e)){const o=po(e,t,!0);return n&&yo(o,n),to>0&&!i&&Xn&&(6&o.shapeFlag?Xn[Xn.indexOf(e)]=o:Xn.push(o)),o.patchFlag|=-2,o}if(l=e,A(l)&&"__vccOpts"in l&&(e=e.__vccOpts),t){t=function(e){return e?it(e)||lo in e?y({},e):e:null}(t);let{class:e,style:n}=t;e&&!E(e)&&(t.class=a(e)),O(n)&&(it(n)&&!x(n)&&(n=y({},n)),t.style=r(n))}var l;return uo(e,t,n,o,s,E(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:O(e)?4:A(e)?2:0,i,!0)};function po(e,t,n=!1){const{props:o,ref:s,patchFlag:i,children:l}=e,c=t?function(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=a([t.class,o.class]));else if("style"===e)t.style=r([t.style,o.style]);else if(v(e)){const n=t[e],r=o[e];!r||n===r||x(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ao(c),ref:t&&t.ref?n&&s?x(s)?s.concat(co(t)):[s,co(t)]:co(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Qn?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&po(e.ssContent),ssFallback:e.ssFallback&&po(e.ssFallback),el:e.el,anchor:e.anchor}}function ho(e=" ",t=0){return fo(Kn,null,e,t)}function go(e="",t=!1){return t?(eo(),oo(fo(Jn,null,e,n,o,!0))):fo(Jn,null,e);var n,o}function vo(e){return null==e||"boolean"==typeof e?fo(Jn):x(e)?fo(Qn,null,e.slice()):"object"==typeof e?mo(e):fo(Kn,null,String(e))}function mo(e){return null===e.el||e.memo?e:po(e)}function yo(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(x(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),yo(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||lo in t?3===o&&Kt&&(1===Kt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Kt}}else A(t)?(t={default:t,_ctx:Kt},n=32):(t=String(t),64&o?(n=16,t=[ho(t)]):n=8);e.children=t,e.shapeFlag|=n}function bo(e,t,n,o=null){Ct(e,t,7,[n,o])}const _o=Un();let wo=0;let xo=null;const Co=()=>xo||Kt,So=e=>{xo=e,e.scope.on()},Ao=()=>{xo&&xo.scope.off(),xo=null};function Eo(e){return 4&e.vnode.shapeFlag}let ko=!1;function Oo(e,t,n){A(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:O(t)&&(e.setupState=yt(t)),$o(e,n)}function $o(e,t,n){const o=e.type;e.render||(e.render=o.render||p)}function To(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(yt(at(e.exposed)),{get:(t,n)=>n in t?t[n]:n in En?En[n](e):void 0}))}Symbol("");const Fo="3.2.36";let No;const jo=e=>No=e,Mo=Symbol();function Ro(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var Io;!function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"}(Io||(Io={}));const Lo="undefined"!=typeof window,Po=(()=>"object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:"object"==typeof globalThis?globalThis:{HTMLElement:null})();function Bo(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Go(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Uo(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Vo(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Do="object"==typeof navigator?navigator:{userAgent:""},Wo=(()=>/Macintosh/.test(Do.userAgent)&&/AppleWebKit/.test(Do.userAgent)&&!/Safari/.test(Do.userAgent))(),Go=Lo?"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!Wo?function(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener","string"==typeof e?(o.href=e,o.origin!==location.origin?Uo(o.href)?Bo(e,t,n):(o.target="_blank",Vo(o)):Vo(o)):(o.href=URL.createObjectURL(e),setTimeout((function(){URL.revokeObjectURL(o.href)}),4e4),setTimeout((function(){Vo(o)}),0))}:"msSaveOrOpenBlob"in Do?function(e,t="download",n){if("string"==typeof e)if(Uo(e))Bo(e,t,n);else{const t=document.createElement("a");t.href=e,t.target="_blank",setTimeout((function(){Vo(t)}))}else navigator.msSaveOrOpenBlob(function(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return Bo(e,t,n);const r="application/octet-stream"===e.type,s=/constructor/i.test(String(Po.HTMLElement))||"safari"in Po,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&s||Wo)&&"undefined"!=typeof FileReader){const t=new FileReader;t.onloadend=function(){let e=t.result;if("string"!=typeof e)throw o=null,new Error("Wrong reader.result type");e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location.assign(e),o=null},t.readAsDataURL(e)}else{const t=URL.createObjectURL(e);o?o.location.assign(t):location.href=t,o=null,setTimeout((function(){URL.revokeObjectURL(t)}),4e4)}}:()=>{},Ho=()=>{};function zo(e,t,n,o=Ho){e.push(t);const r=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};return!n&&Co()&&wn(r),r}function qo(e,...t){e.slice().forEach((e=>{e(...t)}))}function Qo(e,t){for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];Ro(r)&&Ro(o)&&e.hasOwnProperty(n)&&!pt(o)&&!ot(o)?e[n]=Qo(r,o):e[n]=o}return e}const Ko=Symbol(),{assign:Jo}=Object;function Yo(e,t,n,o){const{state:r,actions:s,getters:i}=t,l=n.state.value[e];let a;return a=Zo(e,(function(){l||(n.state.value[e]=r?r():{});const t=function(e){const t=x(e)?new Array(e.length):{};for(const n in e)t[n]=_t(e,n);return t}(n.state.value[e]);return Jo(t,s,Object.keys(i||{}).reduce(((t,o)=>{return t[o]=at((r=()=>{jo(n);const t=n._s.get(e);return i[o].call(t,t)},function(e,t,n=!1){let o,r;const s=A(e);return s?(o=e,r=p):(o=e.get,r=e.set),new wt(o,r,s||!r,n)}(r,0,ko))),t;var r}),{}))}),t,n,0,!0),a.$reset=function(){const e=r?r():{};this.$patch((t=>{Jo(t,e)}))},a}function Zo(e,t,n={},o,r,s){let i;const l=Jo({actions:{}},n),a={deep:!0};let c,u,d,f=at([]),p=at([]);const h=o.state.value[e];let g;function v(t){let n;c=u=!1,"function"==typeof t?(t(o.state.value[e]),n={type:Io.patchFunction,storeId:e,events:d}):(Qo(o.state.value[e],t),n={type:Io.patchObject,payload:t,storeId:e,events:d});const r=g=Symbol();Pt().then((()=>{g===r&&(c=!0)})),u=!0,qo(f,n,o.state.value[e])}s||h||(o.state.value[e]={}),ht({});const m=Ho;function y(t,n){return function(){jo(o);const r=Array.from(arguments),s=[],i=[];function l(e){s.push(e)}function a(e){i.push(e)}let c;qo(p,{args:r,name:t,store:_,after:l,onError:a});try{c=n.apply(this&&this.$id===e?this:_,r)}catch(e){throw qo(i,e),e}return c instanceof Promise?c.then((e=>(qo(s,e),e))).catch((e=>(qo(i,e),Promise.reject(e)))):(qo(s,c),c)}}const b={_p:o,$id:e,$onAction:zo.bind(null,p),$patch:v,$reset:m,$subscribe(t,n={}){const r=zo(f,t,n.detached,(()=>s())),s=i.run((()=>rn((()=>o.state.value[e]),(o=>{("sync"===n.flush?u:c)&&t({storeId:e,type:Io.direct,events:d},o)}),Jo({},a,n))));return r},$dispose:function(){i.stop(),f=[],p=[],o._s.delete(e)}},_=et(Jo({},b));o._s.set(e,_);const w=o._e.run((()=>(i=J(),i.run((()=>t())))));for(const t in w){const n=w[t];if(pt(n)&&(!pt(C=n)||!C.effect)||ot(n))s||(!h||Ro(x=n)&&x.hasOwnProperty(Ko)||(pt(n)?n.value=h[t]:Qo(n,h[t])),o.state.value[e][t]=n);else if("function"==typeof n){const e=y(t,n);w[t]=e,l.actions[t]=n}}var x,C;return Jo(_,w),Jo(lt(_),w),Object.defineProperty(_,"$state",{get:()=>o.state.value[e],set:e=>{v((t=>{Jo(t,e)}))}}),o._p.forEach((e=>{Jo(_,i.run((()=>e({store:_,app:o._a,pinia:o,options:l}))))})),h&&s&&n.hydrate&&n.hydrate(_.$state,h),c=!0,u=!0,_}const Xo="undefined"!=typeof document?document:null,er=Xo&&Xo.createElement("template"),tr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?Xo.createElementNS("http://www.w3.org/2000/svg",e):Xo.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Xo.createTextNode(e),createComment:e=>Xo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{er.innerHTML=o?`<svg>${e}</svg>`:e;const r=er.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},nr=/\s*!important$/;function or(e,t,n){if(x(n))n.forEach((n=>or(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=sr[t];if(n)return n;let o=P(t);if("filter"!==o&&o in e)return sr[t]=o;o=V(o);for(let n=0;n<rr.length;n++){const r=rr[n]+o;if(r in e)return sr[t]=r}return t}(e,t);nr.test(n)?e.setProperty(U(o),n.replace(nr,""),"important"):e[o]=n}}const rr=["Webkit","Moz","ms"],sr={},ir="http://www.w3.org/1999/xlink",[lr,ar]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let cr=0;const ur=Promise.resolve(),dr=()=>{cr=0};const fr=/(?:Once|Passive|Capture)$/,pr=/^on[a-z]/;"undefined"!=typeof HTMLElement&&HTMLElement;const hr="transition",gr="animation",vr=(e,{slots:t})=>function(e,t,n){const o=arguments.length;return 2===o?O(t)&&!x(t)?so(t)?fo(e,null,[t]):fo(e,t):fo(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&so(n)&&(n=[n]),fo(e,t,n))}(an,function(e){const t={};for(const n in e)n in mr||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(O(e))return[_r(e.enter),_r(e.leave)];{const t=_r(e);return[t,t]}}(r),g=h&&h[0],v=h&&h[1],{onBeforeEnter:m,onEnter:b,onEnterCancelled:_,onLeave:w,onLeaveCancelled:x,onBeforeAppear:C=m,onAppear:S=b,onAppearCancelled:A=_}=t,E=(e,t,n)=>{xr(e,t?u:l),xr(e,t?c:i),n&&n()},k=(e,t)=>{e._isLeaving=!1,xr(e,d),xr(e,p),xr(e,f),t&&t()},$=e=>(t,n)=>{const r=e?S:b,i=()=>E(t,e,n);yr(r,[t,i]),Cr((()=>{xr(t,e?a:s),wr(t,e?u:l),br(r)||Ar(t,o,g,i)}))};return y(t,{onBeforeEnter(e){yr(m,[e]),wr(e,s),wr(e,i)},onBeforeAppear(e){yr(C,[e]),wr(e,a),wr(e,c)},onEnter:$(!1),onAppear:$(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>k(e,t);wr(e,d),document.body.offsetHeight,wr(e,f),Cr((()=>{e._isLeaving&&(xr(e,d),wr(e,p),br(w)||Ar(e,o,v,n))})),yr(w,[e,n])},onEnterCancelled(e){E(e,!1),yr(_,[e])},onAppearCancelled(e){E(e,!0),yr(A,[e])},onLeaveCancelled(e){k(e),yr(x,[e])}})}(e),t);vr.displayName="Transition";const mr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},yr=(vr.props=y({},an.props,mr),(e,t=[])=>{x(e)?e.forEach((e=>e(...t))):e&&e(...t)}),br=e=>!!e&&(x(e)?e.some((e=>e.length>1)):e.length>1);function _r(e){return z(e)}function wr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function xr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Cr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Sr=0;function Ar(e,t,n,o){const r=e._endId=++Sr,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=function(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),i=Er(r,s),l=o("animationDelay"),a=o("animationDuration"),c=Er(l,a);let u=null,d=0,f=0;return t===hr?i>0&&(u=hr,d=i,f=s.length):t===gr?c>0&&(u=gr,d=c,f=a.length):(d=Math.max(i,c),u=d>0?i>c?hr:gr:null,f=u?u===hr?s.length:a.length:0),{type:u,timeout:d,propCount:f,hasTransform:u===hr&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}(e,t);if(!i)return o();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,f),s()},f=t=>{t.target===e&&++u>=a&&d()};setTimeout((()=>{u<a&&d()}),l+1),e.addEventListener(c,f)}function Er(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>kr(t)+kr(e[n]))))}function kr(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}new WeakMap,new WeakMap;const Or=y({patchProp:(e,n,r,s,i=!1,l,a,c,u)=>{"class"===n?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,i):"style"===n?function(e,t,n){const o=e.style,r=E(n);if(n&&!r){for(const e in n)or(o,e,n[e]);if(t&&!E(t))for(const e in t)null==n[e]&&or(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,r,s):v(n)?m(n)||function(e,t,n,o,r=null){const s=e._vei||(e._vei={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(fr.test(e)){let n;for(t={};n=e.match(fr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[U(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||lr();(ar||o>=n.attached-1)&&Ct(function(e,t){if(x(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=cr||(ur.then(dr),cr=lr()),n}(o,r);!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,i,l)}else i&&(function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}(e,n,0,s,a):("."===n[0]?(n=n.slice(1),1):"^"===n[0]?(n=n.slice(1),0):function(e,t,n,o){return o?"innerHTML"===t||"textContent"===t||!!(t in e&&pr.test(t)&&A(n)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!pr.test(t)||!E(n))&&t in e))))}(e,n,s,i))?function(e,t,n,r,s,i,l){if("innerHTML"===t||"textContent"===t)return r&&l(r,s,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let a=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=o(n):null==n&&"string"===r?(n="",a=!0):"number"===r&&(n=0,a=!0)}try{e[t]=n}catch(e){}a&&e.removeAttribute(t)}(e,n,s,l,a,c,u):("true-value"===n?e._trueValue=s:"false-value"===n&&(e._falseValue=s),function(e,n,r,s,i){if(s&&n.startsWith("xlink:"))null==r?e.removeAttributeNS(ir,n.slice(6,n.length)):e.setAttributeNS(ir,n,r);else{const s=t(n);null==r||s&&!o(r)?e.removeAttribute(n):e.setAttribute(n,s?"":r)}}(e,n,s,i))}},tr);let $r;const Tr="Userscript Old Reddit Emotes 1.1.1";function Fr(e){return{logDebug:(...t)=>console.debug("userscript-old-reddit-emotes",e,...t),logInfo:(...t)=>console.info("userscript-old-reddit-emotes",e,...t),logWarn:(...t)=>console.warn("userscript-old-reddit-emotes",e,...t),logError:(...t)=>console.error("userscript-old-reddit-emotes",e,...t)}}var Nr=Object.defineProperty,jr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Ir=(e,t,n)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lr=(e,t)=>{for(var n in t||(t={}))Mr.call(t,n)&&Ir(e,n,t[n]);if(jr)for(var n of jr(t))Rr.call(t,n)&&Ir(e,n,t[n]);return e},Pr=(e,t,n)=>new Promise(((o,r)=>{var s=e=>{try{l(n.next(e))}catch(e){r(e)}},i=e=>{try{l(n.throw(e))}catch(e){r(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(s,i);l((n=n.apply(e,t)).next())}));const Br="__INITIAL_STATE__";const Ur=function(e,t,n){let o,r;const s="function"==typeof t;function i(e,n){const i=Co();return(e=e||i&&nn(Mo))&&jo(e),(e=No)._s.has(o)||(s?Zo(o,t,r,e):Yo(o,r,e)),e._s.get(o)}return o=e,r=s?void 0:t,i.$id=o,i}("Store",{state:function(){return{cachedEmotes:[]}},getters:{emotesBySubreddit:e=>{const t={};for(const n of e.cachedEmotes)n.subreddit in t||(t[n.subreddit]=[]),t[n.subreddit].push(n);return t}},actions:{load(){return Pr(this,null,(function*(){const{logInfo:e,logWarn:t}=Fr("store::Load");try{const t=(yield GM.getValue(Br,"{}"))||"{}",n=JSON.parse(t);this.$patch(Lr(Lr({},{cachedEmotes:[]}),n)),e(n)}catch(e){t(e)}}))},save(){return Pr(this,null,(function*(){const{logInfo:e,logWarn:t}=Fr("store::Save");try{const t=JSON.stringify(this.$state);yield GM.setValue(Br,t),e(JSON.parse(t))}catch(e){t(e)}}))},reset(){return Pr(this,null,(function*(){this.$reset(),yield this.save()}))},hasCachedEmote(e,t){return Boolean(this.cachedEmotes.find((n=>n.subredditName===e&&n.id===t)))},hasCachedAllEmotesInComment(e){for(const t of e.wrappedEmotes){const n=t.substring(1,t.length-1);if(!this.hasCachedEmote(e.subredditName,n))return!1}return!0},cacheEmotes(e){return Pr(this,null,(function*(){for(const t of e)this.hasCachedEmote(t.subredditName,t.id)||this.cachedEmotes.push(t);yield this.save()}))}}}),{logWarn:Vr}=Fr("getCommentsWithEmbeds"),{logInfo:Dr,logWarn:Wr}=Fr("fetchRedditCommentEmotes");function Gr(e){var t;const n=e[1].data.children[0].data.subreddit,o=Object.values(null!=(t=e[1].data.children[0].data.media_metadata)?t:{}),r=new Array;for(const e of o){const t=/emote\|(t5_\w+)\|(\d+)/.exec(e.id);if(!t||3!==t.length)continue;const o=t[1],s=t[2],i=e.s.u;i&&r.push({id:s,url:i,subredditName:o,subreddit:n})}return r}const{logWarn:Hr}=Fr("getCommentsWithEmotes"),{logWarn:zr}=Fr("injectEmotes");function qr(e,t){return`\n        <img\n            src="${e.url}"\n            width="${t?60:20}"\n            height="${t?60:20}"\n            title="${e.id}"\n            style="display: inline-block; vertical-align: middle; margin: 0 2px;"\n        >\n    `}function Qr(){const e=Ur();bn((()=>{return t=this,null,n=function*(){yield e.load();const t=function(){const e=new Array,t=$(".comment");for(const n of t){if($(n).hasClass("collapsed"))continue;if($(n).hasClass("deleted"))continue;const t=$(n).attr("data-permalink");if(!t){Hr("Failed to get permalink",n);continue}const o=$(n).attr("data-subreddit-fullname");if(!(null==o?void 0:o.startsWith("t5_"))){Hr("Failed to get subredditName",n);continue}const r=$(n).attr("data-fullname");if(!r){Hr("Failed to get commentName",n);continue}const s=$(n).find(".entry .md-container").filter(((e,t)=>$(t).siblings("input[name=thing_id]").val()===r)).find("> .md");if(1!==s.length){Hr("Failed to get $textNode",n);continue}const i=[...s.text().matchAll(/:\d+:/g)].map((e=>e[0]));e.push({commentName:r,permalink:t,subredditName:o,$textNode:s,wrappedEmotes:i})}return e}(),n=t.filter((t=>!e.hasCachedAllEmotesInComment(t))),o=yield function(e){return t=this,n=function*(){const t=function(e){const t=new Set,n=new Set;for(const o of e)for(const e of o.wrappedEmotes)t.has(e)||(t.add(e),n.add(new URL(`${o.permalink}.json`,"https://www.reddit.com").href));return[...n]}(e),n=new Array;for(const e of t){Dr("Fetching",e);const t=new Promise(((t,n)=>{GM.xmlHttpRequest({method:"GET",url:e,onload:e=>{try{const n=Gr(JSON.parse(e.responseText));t(n)}catch(e){Wr("Failed to parse Reddit API response",e),n(e)}},onerror:e=>{const t=`Failed to fetch Reddit API (${e.status} ${e.statusText}): ${e.responseText}`;Wr(t),n(new Error(t))}})}));n.push(...yield t)}return n},new Promise(((e,o)=>{var r=e=>{try{i(n.next(e))}catch(e){o(e)}},s=e=>{try{i(n.throw(e))}catch(e){o(e)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,s);i((n=n.apply(t,null)).next())}));var t,n}(n);yield e.cacheEmotes(o),function(e,t){for(const n of e){const e=n.$textNode.text().trim();for(const o of n.wrappedEmotes){const r=t.find((e=>`:${e.id}:`===o));if(!r){zr("Failed to match emote",o,n);continue}const s=e===o;n.$textNode.html(((e,t)=>t.replaceAll(o,qr(r,s))))}}}(t,e.cachedEmotes),function(e){var t;for(const n of e){const e=(null!=(t=n.$textNode.html().match(/&lt;image&gt;/g))?t:[]).length;n.$textNode.html(((t,n)=>{for(let t=0;t<e;t++)n=n.replace(/<a href="([\w\\/?=&:;.]+)" (.+)>&lt;image&gt;<\/a>/,'\n                    <a href="$1" $2>\n                        <img\n                            src="$1"\n                            title="$1"\n                            style="display: inline-block; vertical-align: middle;"\n                        >\n                    </a>\n                ');return n}))}}(function(){const e=new Array,t=$(".comment");for(const n of t){if($(n).hasClass("collapsed"))continue;if($(n).hasClass("deleted"))continue;const t=$(n).attr("data-permalink");if(!t){Vr("Failed to get permalink",n);continue}const o=$(n).attr("data-subreddit-fullname");if(!(null==o?void 0:o.startsWith("t5_"))){Vr("Failed to get subredditName",n);continue}const r=$(n).attr("data-fullname");if(!r){Vr("Failed to get commentName",n);continue}const s=$(n).find(".entry .md-container").filter(((e,t)=>$(t).siblings("input[name=thing_id]").val()===r)).find("> .md");1===s.length?s.text().includes("<image>")&&e.push({commentName:r,permalink:t,subredditName:o,$textNode:s,wrappedEmotes:[]}):Vr("Failed to get $textNode",n)}return e}())},new Promise(((e,o)=>{var r=e=>{try{i(n.next(e))}catch(e){o(e)}},s=e=>{try{i(n.throw(e))}catch(e){o(e)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,s);i((n=n.apply(t,null)).next())}));var t,n}))}const Kr={class:"settings"},Jr={class:"group"},Yr=["href"],Zr={class:"emotes"},Xr=["src","title"],es={class:"group actions"},ts=(e=>(Jt="data-v-f76468b6",e=e(),Jt=null,e))((()=>uo("div",{class:"hspace"},null,-1))),ns=gn({name:"UserscriptAppSettings",emits:["close"],setup(e){const t="https://github.com/Trinovantes/userscript-old-reddit-emotes",n=Ur();return(e,o)=>(eo(),ro("div",Kr,[uo("div",Jr,[uo("h1",null,c(vt(Tr)),1),uo("a",{href:vt(t),class:"project-url"},c(vt(t)),9,Yr)]),(eo(!0),ro(Qn,null,Sn(Object.entries(vt(n).emotesBySubreddit),(([e,t])=>(eo(),ro("div",{key:e,class:"group"},[uo("h2",null,"r/"+c(e),1),uo("div",Zr,[(eo(!0),ro(Qn,null,Sn(t,(e=>(eo(),ro("div",{key:e.id,class:"emote"},[uo("img",{src:e.url,title:e.id},null,8,Xr),uo("code",null,":"+c(e.id)+":",1)])))),128))])])))),128)),uo("div",es,[uo("a",{class:"btn positive",onClick:o[0]||(o[0]=t=>{vt(n).reset(),e.$emit("close")})}," Clear Cache "),ts,uo("a",{class:"btn",onClick:o[1]||(o[1]=t=>{vt(n).load(),e.$emit("close")})}," Cancel ")])]))}});var os=n(379),rs=n.n(os),ss=n(795),is=n.n(ss),ls=n(569),as=n.n(ls),cs=n(565),us=n.n(cs),ds=n(216),fs=n.n(ds),ps=n(589),hs=n.n(ps),gs=n(264),vs={};vs.styleTagTransform=hs(),vs.setAttributes=us(),vs.insert=as().bind(null,"head"),vs.domAPI=is(),vs.insertStyleElement=fs(),rs()(gs.Z,vs),gs.Z&&gs.Z.locals&&gs.Z.locals;var ms=n(744);const ys=(0,ms.Z)(ns,[["__scopeId","data-v-f76468b6"]]),bs={class:"userscript-old-reddit-emotes"},_s={key:0,class:"dialog-wrapper"},ws={class:"dialog"},xs=["title"],Cs=gn({name:"UserscriptApp",setup(e){const t=ht(!1);return Qr(),(e,n)=>(eo(),ro("div",bs,[t.value?(eo(),ro("div",_s,[uo("div",ws,[fo(ys,{onClose:n[0]||(n[0]=e=>t.value=!1)})])])):go("v-if",!0),uo("a",{class:"settings-btn",title:vt(Tr),onClick:n[1]||(n[1]=e=>t.value=!0)}," Settings ",8,xs)]))}});var Ss=n(122),As={};As.styleTagTransform=hs(),As.setAttributes=us(),As.insert=as().bind(null,"head"),As.domAPI=is(),As.insertStyleElement=fs(),rs()(Ss.Z,As),Ss.Z&&Ss.Z.locals&&Ss.Z.locals;const Es=(0,ms.Z)(Cs,[["__scopeId","data-v-458c4444"]]),{logInfo:ks}=Fr("isOldCommentsPage");(function(){return e=this,null,t=function*(){if(!(/reddit.com\/r\/\w+\/comments/.test(window.location.href)?!$("html").hasClass("theme-beta")||(ks("Not on old theme"),0):(ks("Not on comments page"),0)))return;yield $.when($.ready);const e="userscript-old-reddit-emotes";$("body").append(`<div id="${e}">`);const t=((...e)=>{const t=($r||($r=function(e){return Hn(e)}(Or))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){return E(e)?document.querySelector(e):e}(e);if(!o)return;const r=t._component;A(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t})(Es),n=function(){const e=J(!0),t=e.run((()=>ht({})));let n=[],o=[];const r=at({install(e){jo(r),r._a=e,e.provide(Mo,r),e.config.globalProperties.$pinia=r,o.forEach((e=>n.push(e))),o=[]},use(e){return this._a?n.push(e):o.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}();t.use(n),t.mount(`#${e}`)},new Promise(((n,o)=>{var r=e=>{try{i(t.next(e))}catch(e){o(e)}},s=e=>{try{i(t.throw(e))}catch(e){o(e)}},i=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,s);i((t=t.apply(e,null)).next())}));var e,t})().catch((e=>{console.warn("userscript-old-reddit-emotes",e)}))})()})();