Skip to content

Instantly share code, notes, and snippets.

@nicoandmee
Last active July 22, 2024 13:26
Show Gist options
  • Save nicoandmee/023e9ca99eeb3e071bdb14a068cf0b68 to your computer and use it in GitHub Desktop.
Save nicoandmee/023e9ca99eeb3e071bdb14a068cf0b68 to your computer and use it in GitHub Desktop.
Surfingkeys config 7/22/2024, 7:26:20 AM
(()=>{var e={838:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,a,o){return r=n()?Reflect.construct:function(e,n,r){var a=[null];a.push.apply(a,n);var o=new(Function.bind.apply(e,a));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function a(e){return o(e)||i(e)||s(e)||c()}function o(e){if(Array.isArray(e))return l(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=Object.hasOwnProperty,d=Object.setPrototypeOf,u=Object.isFrozen,m=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,g=Object.freeze,f=Object.seal,b=Object.create,w="undefined"!=typeof Reflect&&Reflect,y=w.apply,k=w.construct;y||(y=function(e,t,n){return e.apply(t,n)}),g||(g=function(e){return e}),f||(f=function(e){return e}),k||(k=function(e,t){return r(e,a(t))});var v=O(Array.prototype.forEach),x=O(Array.prototype.pop),S=O(Array.prototype.push),$=O(String.prototype.toLowerCase),_=O(String.prototype.toString),T=O(String.prototype.match),C=O(String.prototype.replace),L=O(String.prototype.indexOf),R=O(String.prototype.trim),A=O(RegExp.prototype.test),E=N(TypeError);function O(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return y(e,t,r)}}function N(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(e,n)}}function I(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:$,d&&d(e,null);for(var a=t.length;a--;){var o=t[a];if("string"==typeof o){var i=n(o);i!==o&&(u(t)||(t[a]=i),o=i)}e[o]=!0}return e}function q(e){var t,n=b(null);for(t in e)!0===y(p,e,[t])&&(n[t]=e[t]);return n}function U(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return O(n.get);if("function"==typeof n.value)return O(n.value)}e=m(e)}function r(e){return console.warn("fallback value for",e),null}return r}var D=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),H=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=g(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),j=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=g(["#text"]),B=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=g(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=f(/<%[\w\W]*|[\w\W]*%>/gm),Y=f(/\${[\w\W]*}/gm),Z=f(/^data-[\-\w.\u00B7-\uFFFF]/),Q=f(/^aria-[\-\w]+$/),X=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=f(/^(?:\w+script|data):/i),te=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=f(/^html$/i),re=function(){return"undefined"==typeof window?null:window},ae=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,a="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(a)&&(r=n.currentScript.getAttribute(a));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function oe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re(),n=function(e){return oe(e)};if(n.version="2.4.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.Element,p=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,m=t.HTMLFormElement,h=t.DOMParser,f=t.trustedTypes,b=c.prototype,w=U(b,"cloneNode"),y=U(b,"nextSibling"),k=U(b,"childNodes"),O=U(b,"parentNode");if("function"==typeof s){var N=o.createElement("template");N.content&&N.content.ownerDocument&&(o=N.content.ownerDocument)}var ie=ae(f,r),se=ie?ie.createHTML(""):"",le=o,ce=le.implementation,pe=le.createNodeIterator,de=le.createDocumentFragment,ue=le.getElementsByTagName,me=r.importNode,he={};try{he=q(o).documentMode?o.documentMode:{}}catch(e){}var ge={};n.isSupported="function"==typeof O&&ce&&void 0!==ce.createHTMLDocument&&9!==he;var fe,be,we=W,ye=K,ke=Y,ve=Z,xe=Q,Se=ee,$e=te,_e=X,Te=null,Ce=I({},[].concat(a(D),a(M),a(H),a(F),a(z))),Le=null,Re=I({},[].concat(a(B),a(V),a(G),a(J))),Ae=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Oe=null,Ne=!0,Ie=!0,qe=!1,Ue=!0,De=!1,Me=!1,He=!1,Pe=!1,Fe=!1,je=!1,ze=!1,Be=!0,Ve=!1,Ge="user-content-",Je=!0,We=!1,Ke={},Ye=null,Ze=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Qe=null,Xe=I({},["audio","video","img","source","image","track"]),et=null,tt=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nt="http://www.w3.org/1998/Math/MathML",rt="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml",ot=at,it=!1,st=null,lt=I({},[nt,rt,at],_),ct=["application/xhtml+xml","text/html"],pt="text/html",dt=null,ut=o.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(t){dt&&dt===t||(t&&"object"===e(t)||(t={}),t=q(t),fe=fe=-1===ct.indexOf(t.PARSER_MEDIA_TYPE)?pt:t.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===fe?_:$,Te="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,be):Ce,Le="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,be):Re,st="ALLOWED_NAMESPACES"in t?I({},t.ALLOWED_NAMESPACES,_):lt,et="ADD_URI_SAFE_ATTR"in t?I(q(tt),t.ADD_URI_SAFE_ATTR,be):tt,Qe="ADD_DATA_URI_TAGS"in t?I(q(Xe),t.ADD_DATA_URI_TAGS,be):Xe,Ye="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,be):Ze,Ee="FORBID_TAGS"in t?I({},t.FORBID_TAGS,be):{},Oe="FORBID_ATTR"in t?I({},t.FORBID_ATTR,be):{},Ke="USE_PROFILES"in t&&t.USE_PROFILES,Ne=!1!==t.ALLOW_ARIA_ATTR,Ie=!1!==t.ALLOW_DATA_ATTR,qe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,De=t.SAFE_FOR_TEMPLATES||!1,Me=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,je=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,Pe=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ve=t.SANITIZE_NAMED_PROPS||!1,Je=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,_e=t.ALLOWED_URI_REGEXP||_e,ot=t.NAMESPACE||at,Ae=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&mt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&mt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Ie=!1),je&&(Fe=!0),Ke&&(Te=I({},a(z)),Le=[],!0===Ke.html&&(I(Te,D),I(Le,B)),!0===Ke.svg&&(I(Te,M),I(Le,V),I(Le,J)),!0===Ke.svgFilters&&(I(Te,H),I(Le,V),I(Le,J)),!0===Ke.mathMl&&(I(Te,F),I(Le,G),I(Le,J))),t.ADD_TAGS&&(Te===Ce&&(Te=q(Te)),I(Te,t.ADD_TAGS,be)),t.ADD_ATTR&&(Le===Re&&(Le=q(Le)),I(Le,t.ADD_ATTR,be)),t.ADD_URI_SAFE_ATTR&&I(et,t.ADD_URI_SAFE_ATTR,be),t.FORBID_CONTENTS&&(Ye===Ze&&(Ye=q(Ye)),I(Ye,t.FORBID_CONTENTS,be)),Je&&(Te["#text"]=!0),Me&&I(Te,["html","head","body"]),Te.table&&(I(Te,["tbody"]),delete Ee.tbody),g&&g(t),dt=t)},gt=I({},["mi","mo","mn","ms","mtext"]),ft=I({},["foreignobject","desc","title","annotation-xml"]),bt=I({},["title","style","font","a","script"]),wt=I({},M);I(wt,H),I(wt,P);var yt=I({},F);I(yt,j);var kt=function(e){var t=O(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});var n=$(e.tagName),r=$(t.tagName);return!!st[e.namespaceURI]&&(e.namespaceURI===rt?t.namespaceURI===at?"svg"===n:t.namespaceURI===nt?"svg"===n&&("annotation-xml"===r||gt[r]):Boolean(wt[n]):e.namespaceURI===nt?t.namespaceURI===at?"math"===n:t.namespaceURI===rt?"math"===n&&ft[r]:Boolean(yt[n]):e.namespaceURI===at?!(t.namespaceURI===rt&&!ft[r])&&!(t.namespaceURI===nt&&!gt[r])&&!yt[n]&&(bt[n]||!wt[n]):!("application/xhtml+xml"!==fe||!st[e.namespaceURI]))},vt=function(e){S(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},xt=function(e,t){try{S(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){S(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Le[e])if(Fe||je)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){var t,n;if(Pe)e="<remove></remove>"+e;else{var r=T(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===fe&&ot===at&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=ie?ie.createHTML(e):e;if(ot===at)try{t=(new h).parseFromString(a,fe)}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(ot,"template",null);try{t.documentElement.innerHTML=it?se:a}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),ot===at?ue.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},$t=function(e){return pe.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},_t=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Ct=function(e,t,r){ge[e]&&v(ge[e],(function(e){e.call(n,t,r,dt)}))},Lt=function(e){var t;if(Ct("beforeSanitizeElements",e,null),_t(e))return vt(e),!0;if(A(/[\u0080-\uFFFF]/,e.nodeName))return vt(e),!0;var r=be(e.nodeName);if(Ct("uponSanitizeElement",e,{tagName:r,allowedTags:Te}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&(!Tt(e.content)||!Tt(e.content.firstElementChild))&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return vt(e),!0;if("select"===r&&A(/<template/i,e.innerHTML))return vt(e),!0;if(!Te[r]||Ee[r]){if(!Ee[r]&&At(r)){if(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,r))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(r))return!1}if(Je&&!Ye[r]){var a=O(e)||e.parentNode,o=k(e)||e.childNodes;if(o&&a)for(var i=o.length-1;i>=0;--i)a.insertBefore(w(o[i],!0),y(e))}return vt(e),!0}return e instanceof c&&!kt(e)?(vt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,t=C(t,we," "),t=C(t,ye," "),t=C(t,ke," "),e.textContent!==t&&(S(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ct("afterSanitizeElements",e,null),!1):(vt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Ie&&!Oe[t]&&A(ve,t));else if(Ne&&A(xe,t));else if(!Le[t]||Oe[t]){if(!(At(e)&&(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&A(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(et[t]);else if(A(_e,C(n,$e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==L(n,"data:")||!Qe[e])if(qe&&!A(Se,C(n,$e,"")));else if(n)return!1;return!0},At=function(e){return e.indexOf("-")>0},Et=function(t){var r,a,o,i;Ct("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};for(i=s.length;i--;){var c=r=s[i],p=c.name,d=c.namespaceURI;if(a="value"===p?r.value:R(r.value),o=be(p),l.attrName=o,l.attrValue=a,l.keepAttr=!0,l.forceKeepAttr=void 0,Ct("uponSanitizeAttribute",t,l),a=l.attrValue,!l.forceKeepAttr&&(xt(p,t),l.keepAttr))if(Ue||!A(/\/>/i,a)){De&&(a=C(a,we," "),a=C(a,ye," "),a=C(a,ke," "));var u=be(t.nodeName);if(Rt(u,o,a)){if(!Ve||"id"!==o&&"name"!==o||(xt(p,t),a=Ge+a),ie&&"object"===e(f)&&"function"==typeof f.getAttributeType)if(d);else switch(f.getAttributeType(u,o)){case"TrustedHTML":a=ie.createHTML(a);break;case"TrustedScriptURL":a=ie.createScriptURL(a)}try{d?t.setAttributeNS(d,p,a):t.setAttribute(p,a),x(n.removed)}catch(e){}}}else xt(p,t)}Ct("afterSanitizeAttributes",t,null)}},Ot=function e(t){var n,r=$t(t);for(Ct("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ct("uponSanitizeShadowNode",n,null),Lt(n)||(n.content instanceof i&&e(n.content),Et(n));Ct("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(a){var o,s,c,p,d,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((it=!a)&&(a="\x3c!--\x3e"),"string"!=typeof a&&!Tt(a)){if("function"!=typeof a.toString)throw E("toString is not a function");if("string"!=typeof(a=a.toString()))throw E("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof a)return t.toStaticHTML(a);if(Tt(a))return t.toStaticHTML(a.outerHTML)}return a}if(He||ht(u),n.removed=[],"string"==typeof a&&(We=!1),We){if(a.nodeName){var m=be(a.nodeName);if(!Te[m]||Ee[m])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof l)1===(s=(o=St("\x3c!----\x3e")).ownerDocument.importNode(a,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!Fe&&!De&&!Me&&-1===a.indexOf("<"))return ie&&ze?ie.createHTML(a):a;if(!(o=St(a)))return Fe?null:ze?se:""}o&&Pe&&vt(o.firstChild);for(var h=$t(We?a:o);c=h.nextNode();)3===c.nodeType&&c===p||Lt(c)||(c.content instanceof i&&Ot(c.content),Et(c),p=c);if(p=null,We)return a;if(Fe){if(je)for(d=de.call(o.ownerDocument);o.firstChild;)d.appendChild(o.firstChild);else d=o;return(Le.shadowroot||Le.shadowrootmod)&&(d=me.call(r,d,!0)),d}var g=Me?o.outerHTML:o.innerHTML;return Me&&Te["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&A(ne,o.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+g),De&&(g=C(g,we," "),g=C(g,ye," "),g=C(g,ke," ")),ie&&ze?ie.createHTML(g):g},n.setConfig=function(e){ht(e),He=!0},n.clearConfig=function(){dt=null,He=!1},n.isValidAttribute=function(e,t,n){dt||ht({});var r=be(e),a=be(t);return Rt(r,a,n)},n.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],S(ge[e],t))},n.removeHook=function(e){if(ge[e])return x(ge[e])},n.removeHooks=function(e){ge[e]&&(ge[e]=[])},n.removeAllHooks=function(){ge={}},n}return oe()}()},400:(e,t,n)=>{"use strict";const r=n(998),a=n(134);t.all=r,t.check=e=>(e=(e||"").toString().toLowerCase(),r.includes(e)),t.oddballs=e=>e&&e in a?a[e]:Object.keys(a).sort()},134:e=>{"use strict";e.exports='{\r\n\t"avatars": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"assets": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"bookmarks": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"checks": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"conversations": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"labels": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"media": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"nodes": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"owners": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"page": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"registry": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"seats": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"shared": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"tasks": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\t"uploads": {"reserved": true, "taken": true, "typical": true, "included": false},\r\n\r\n\t"account": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/settings/profile", "included": true},\r\n\t"apps": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/marketplace", "included": true},\r\n\t"blog": {"reserved": true, "taken": false, "typical": false, "redirect": "https://blog.github.com", "included": true},\r\n\t"c": {"reserved": true, "taken": false, "typical": false, "redirect": "https://support.github.com/", "included": true},\r\n\t"contact": {"reserved": true, "taken": false, "typical": false, "redirect": "https://support.github.com/", "included": true},\r\n\t"contributing": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/about/careers", "included": true},\r\n\t"customer": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/business/customers", "included": true},\r\n\t"customers": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/business/customers", "included": true},\r\n\t"developer": {"reserved": true, "taken": false, "typical": false, "redirect": "https://developer.github.com", "included": true},\r\n\t"edu": {"reserved": true, "taken": false, "typical": false, "redirect": "https://education.github.com", "included": true},\r\n\t"guides": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com", "included": true},\r\n\t"help": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com", "included": true},\r\n\t"launch": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/search", "included": true},\r\n\t"mac": {"reserved": true, "taken": false, "typical": false, "redirect": "https://desktop.github.com", "included": true},\r\n\t"mirrors": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/about-github-mirrors/", "included": true},\r\n\t"pages": {"reserved": true, "taken": false, "typical": false, "redirect": "https://pages.github.com", "included": true},\r\n\t"plans": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/pricing", "included": true},\r\n\t"press": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/about/press", "included": true},\r\n\t"readme": {"reserved": true, "taken": false, "typical": false, "included": true},\r\n\t"repositories": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/trending", "included": true},\r\n\t"resources": {"reserved": true, "taken": false, "typical": false, "redirect": "https://resources.github.com", "included": true},\r\n\t"security": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-security/", "included": true},\r\n\t"settings": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/settings/profile", "included": true},\r\n\t"signup": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/join", "included": true},\r\n\t"terms": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-terms-of-service/", "included": true},\r\n\t"topic": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/topics", "included": true},\r\n\t"tos": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-terms-of-service/", "included": true},\r\n\t"training": {"reserved": true, "taken": false, "typical": false, "redirect": "https://services.github.com", "included": true},\r\n\t"users": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com", "included": true},\r\n\t"wiki": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com", "included": true},\r\n\t"windows": {"reserved": true, "taken": false, "typical": false, "redirect": "https://desktop.github.com", "included": true},\r\n\r\n\t"advisories": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "GitHub Advisory Database"},\r\n\t"collections": {"reserved": true, "taken": false, "typical": false, "included": true, "notes": "Curated lists of GitHub repos"},\r\n\t"dashboard-feed": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "GitHub dashboard feed"},\r\n\t"hovercards": {"reserved": true, "taken": false, "typical": false, "included": true, "notes": "HTTP ERROR 406"},\r\n\t"inbox": {"reserved": true, "taken": true, "typical": false, "redirect": "https://github.com/410", "included": true, "notes": "410 ERROR"},\r\n\t"invalid-email-address": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "HTTP ERROR 404"},\r\n\t"suggestions": {"reserved": true, "taken": false, "typical": false, "included": true},\r\n\t"suspended": {"reserved": true, "taken": true, "typical": false, "redirect": "https://github.com", "included": true, "notes": "Page behaviour depends on whether you\'re logged in or if your account is actually suspended"},\r\n\r\n\t"case-studies": {"reserved": false, "taken": true, "typical": false, "included": true},\r\n\t"watching": {"reserved": false, "taken": true, "typical": false, "included": true},\r\n\t"save-net-neutrality": {"reserved": false, "taken": true, "typical": false, "included": true},\r\n\r\n\t"ghost": {"reserved": false, "taken": true, "typical": true, "included": true},\r\n\r\n\t"status": {"reserved": true, "taken": false, "typical": false, "included": true}\r\n}\r\n'},998:e=>{"use strict";e.exports='[\r\n "300",\r\n "302",\r\n "400",\r\n "401",\r\n "402",\r\n "403",\r\n "404",\r\n "405",\r\n "406",\r\n "407",\r\n "408",\r\n "409",\r\n "410",\r\n "411",\r\n "412",\r\n "413",\r\n "414",\r\n "415",\r\n "416",\r\n "417",\r\n "418",\r\n "419",\r\n "420",\r\n "421",\r\n "422",\r\n "423",\r\n "424",\r\n "425",\r\n "426",\r\n "427",\r\n "428",\r\n "429",\r\n "430",\r\n "431",\r\n "500",\r\n "501",\r\n "502",\r\n "503",\r\n "504",\r\n "505",\r\n "506",\r\n "507",\r\n "508",\r\n "509",\r\n "510",\r\n "511",\r\n "693",\r\n "694",\r\n "695",\r\n "900",\r\n "about",\r\n "access",\r\n "account",\r\n "admin",\r\n "advisories",\r\n "anonymous",\r\n "any",\r\n "api",\r\n "apps",\r\n "attributes",\r\n "auth",\r\n "billing",\r\n "blob",\r\n "blog",\r\n "bounty",\r\n "branches",\r\n "business",\r\n "businesses",\r\n "c",\r\n "cache",\r\n "case-studies",\r\n "categories",\r\n "central",\r\n "certification",\r\n "changelog",\r\n "chat",\r\n "cla",\r\n "cloud",\r\n "codereview",\r\n "collection",\r\n "collections",\r\n "comments",\r\n "commit",\r\n "commits",\r\n "community",\r\n "companies",\r\n "compare",\r\n "contact",\r\n "contributing",\r\n "cookbook",\r\n "coupons",\r\n "customer-stories",\r\n "customer",\r\n "customers",\r\n "dashboard-feed",\r\n "dashboard",\r\n "dashboards",\r\n "design",\r\n "develop",\r\n "developer",\r\n "diff",\r\n "discover",\r\n "discussions",\r\n "docs",\r\n "downloads",\r\n "downtime",\r\n "editor",\r\n "editors",\r\n "edu",\r\n "enterprise",\r\n "events",\r\n "explore",\r\n "featured",\r\n "features",\r\n "files",\r\n "fixtures",\r\n "forked",\r\n "garage",\r\n "ghost",\r\n "gist",\r\n "gists",\r\n "graphs",\r\n "guide",\r\n "guides",\r\n "help",\r\n "help-wanted",\r\n "home",\r\n "hooks",\r\n "hosting",\r\n "hovercards",\r\n "identity",\r\n "images",\r\n "inbox",\r\n "individual",\r\n "info",\r\n "integration",\r\n "interfaces",\r\n "introduction",\r\n "invalid-email-address",\r\n "investors",\r\n "issues",\r\n "jobs",\r\n "join",\r\n "journal",\r\n "journals",\r\n "lab",\r\n "labs",\r\n "languages",\r\n "launch",\r\n "layouts",\r\n "learn",\r\n "legal",\r\n "library",\r\n "linux",\r\n "listings",\r\n "lists",\r\n "login",\r\n "logos",\r\n "logout",\r\n "mac",\r\n "maintenance",\r\n "malware",\r\n "man",\r\n "marketplace",\r\n "mention",\r\n "mentioned",\r\n "mentioning",\r\n "mentions",\r\n "migrating",\r\n "milestones",\r\n "mine",\r\n "mirrors",\r\n "mobile",\r\n "navigation",\r\n "network",\r\n "new",\r\n "news",\r\n "none",\r\n "nonprofit",\r\n "nonprofits",\r\n "notices",\r\n "notifications",\r\n "oauth",\r\n "offer",\r\n "open-source",\r\n "organisations",\r\n "organizations",\r\n "orgs",\r\n "pages",\r\n "partners",\r\n "payments",\r\n "personal",\r\n "plans",\r\n "plugins",\r\n "popular",\r\n "popularity",\r\n "posts",\r\n "press",\r\n "pricing",\r\n "professional",\r\n "projects",\r\n "pulls",\r\n "raw",\r\n "readme",\r\n "recommendations",\r\n "redeem",\r\n "releases",\r\n "render",\r\n "reply",\r\n "repositories",\r\n "resources",\r\n "restore",\r\n "revert",\r\n "save-net-neutrality",\r\n "saved",\r\n "scraping",\r\n "search",\r\n "security",\r\n "services",\r\n "sessions",\r\n "settings",\r\n "shareholders",\r\n "shop",\r\n "showcases",\r\n "signin",\r\n "signup",\r\n "site",\r\n "spam",\r\n "sponsors",\r\n "ssh",\r\n "staff",\r\n "starred",\r\n "stars",\r\n "static",\r\n "status",\r\n "statuses",\r\n "storage",\r\n "store",\r\n "stories",\r\n "styleguide",\r\n "subscriptions",\r\n "suggest",\r\n "suggestion",\r\n "suggestions",\r\n "support",\r\n "suspended",\r\n "talks",\r\n "teach",\r\n "teacher",\r\n "teachers",\r\n "teaching",\r\n "team",\r\n "teams",\r\n "ten",\r\n "terms",\r\n "timeline",\r\n "topic",\r\n "topics",\r\n "tos",\r\n "tour",\r\n "train",\r\n "training",\r\n "translations",\r\n "tree",\r\n "trending",\r\n "updates",\r\n "username",\r\n "users",\r\n "visualization",\r\n "w",\r\n "watching",\r\n "wiki",\r\n "windows",\r\n "works-with",\r\n "www0",\r\n "www1",\r\n "www2",\r\n "www3",\r\n "www4",\r\n "www5",\r\n "www6",\r\n "www7",\r\n "www8",\r\n "www9"\r\n]\r\n'}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(()=>{"use strict";const e=()=>{if(-1!==window.navigator.userAgent.indexOf("Chrome"))return"Chrome";if(0===window.navigator.vendor.indexOf("Apple Computer, Inc.")){return/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1?"Safari-iOS":"Safari"}return-1!==window.navigator.userAgent.indexOf("Firefox")?"Firefox":"Chrome"},t="undefined"==typeof window?{}:"undefined"!=typeof api?{v1:!0,...api}:{v1:!1,getBrowserName:e,RUNTIME,Clipboard,Normal,Hints,Visual,Front,insertJS:Normal.insertJS,addSearchAlias:addSearchAliasX,aceVimMap,addVimMapKey,cmap,imap,imapkey,getClickableElements,getFormData,map,unmap,unmapAllExcept,iunmap,vunmap,mapkey,readText,removeSearchAlias,searchSelectedWith,tabOpenLink,vmap,vmapkey};var r=n(400);const a={crunchbase:"",google_cs:"AIzaSyDSc6lADAURez0Dl9BKcwlrYV6zb5QojJs",google_yt:"AIzaSyCIRN6kHTGFABfdDzwA2M7BdpOz5BiUuus",wolframalpha:"",domainr:"18cffef341msh21358904326422ep10bd31jsnda2649a3cbe4",alternativeTo:"",google_cx_ex:"65f6a233959ec4562",google_cx_af:"72db069dbcfb14ad6",google_cx_al:"65aec8d98a5394c9f",google_cx_no:"60d886841b821401e",google_cx_cs:"5631bd769b1024c83",google_cx_jq:"04ab5af0010924f0e",google_cx_gg:"d4d7e03d7d5ca4117"},o=e=>`https://doi.org/${e}`;var i=n(838);class s extends Map{set(e,t){return super.set(e,t),t}}class l extends WeakMap{set(e,t){return super.set(e,t),t}}const c=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,p=/<([a-z]+[a-z0-9:._-]*)([^>]*?)(\/?)>/g,d=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,u=/[\x01\x02]/g,m=(e,t)=>111===e.nodeType?1/t<0?t?(({firstChild:e,lastChild:t})=>{const n=document.createRange();return n.setStartAfter(e),n.setEndAfter(t),n.deleteContents(),e})(e):e.lastChild:t?e.valueOf():e.firstChild:e,{isArray:h}=Array,{indexOf:g,slice:f}=[];let b=!1;class w{constructor(e,t){b=!0,this._=(...n)=>e(...n,t)}}const y=e=>null==e?e:e.valueOf(),k=(e,t)=>{let n,r,a=t.slice(2);return!(t in e)&&(r=t.toLowerCase())in e&&(a=r.slice(2)),t=>{const r=h(t)?t:[t,!1];n!==r[0]&&(n&&e.removeEventListener(a,n,r[1]),(n=r[0])&&e.addEventListener(a,n,r[1]))}},{isArray:v,prototype:x}=Array,{indexOf:S}=x,{createDocumentFragment:_,createElement:T,createElementNS:C,createTextNode:L,createTreeWalker:R,importNode:A}=new Proxy({},{get:(e,t)=>document[t].bind(document)});let E;const O=(e,t)=>t?(e=>{E||(E=C("http://www.w3.org/2000/svg","svg")),E.innerHTML=e;const t=_();return t.append(...E.childNodes),t})(e):(e=>{const t=T("template");return t.innerHTML=e,t.content})(e),N=({childNodes:e},t)=>e[t],I=(e,t,n)=>((e,t,n,r,a)=>{const o=n.length;let i=t.length,s=o,l=0,c=0,p=null;for(;l<i||c<s;)if(i===l){const t=s<o?c?r(n[c-1],-0).nextSibling:r(n[s-c],0):a;for(;c<s;)e.insertBefore(r(n[c++],1),t)}else if(s===c)for(;l<i;)p&&p.has(t[l])||e.removeChild(r(t[l],-1)),l++;else if(t[l]===n[c])l++,c++;else if(t[i-1]===n[s-1])i--,s--;else if(t[l]===n[s-1]&&n[c]===t[i-1]){const a=r(t[--i],-1).nextSibling;e.insertBefore(r(n[c++],1),r(t[l++],-1).nextSibling),e.insertBefore(r(n[--s],1),a),t[i]=n[s]}else{if(!p){p=new Map;let e=c;for(;e<s;)p.set(n[e],e++)}if(p.has(t[l])){const a=p.get(t[l]);if(c<a&&a<s){let o=l,d=1;for(;++o<i&&o<s&&p.get(t[o])===a+d;)d++;if(d>a-c){const o=r(t[l],0);for(;c<a;)e.insertBefore(r(n[c++],1),o)}else e.replaceChild(r(n[c++],1),r(t[l++],-1))}else l++}else e.removeChild(r(t[l++],-1))}return n})(e.parentNode,t,n,m,e),q=(e,t)=>{switch(t[0]){case"?":return((e,t,n)=>r=>{const a=!!y(r);n!==a&&((n=a)?e.setAttribute(t,""):e.removeAttribute(t))})(e,t.slice(1),!1);case".":return((e,t)=>"dataset"===t?(({dataset:e})=>t=>{for(const n in t){const r=t[n];null==r?delete e[n]:e[n]=r}})(e):n=>{e[t]=n})(e,t.slice(1));case"@":return k(e,"on"+t.slice(1));case"o":if("n"===t[1])return k(e,t)}switch(t){case"ref":return(e=>{let t;return n=>{t!==n&&(t=n,"function"==typeof n?n(e):n.current=e)}})(e);case"aria":return(e=>t=>{for(const n in t){const r="role"===n?n:`aria-${n}`,a=t[n];null==a?e.removeAttribute(r):e.setAttribute(r,a)}})(e)}return((e,t)=>{let n,r=!0;const a=document.createAttributeNS(null,t);return o=>{const i=b&&o instanceof w?o._(e,t):y(o);n!==i&&(null==(n=i)?r||(e.removeAttributeNode(a),r=!0):(a.value=i,r&&(e.setAttributeNodeNS(a),r=!1)))}})(e,t)};function U(e){const{type:t,path:n}=e,r=n.reduceRight(N,this);return"node"===t?(e=>{let t,n,r=[];const a=o=>{switch(typeof o){case"string":case"number":case"boolean":t!==o&&(t=o,n||(n=L("")),n.data=o,r=I(e,r,[n]));break;case"object":case"undefined":if(null==o){t!=o&&(t=o,r=I(e,r,[]));break}if(v(o)){t=o,0===o.length?r=I(e,r,[]):"object"==typeof o[0]?r=I(e,r,o):a(String(o));break}if(t!==o)if("ELEMENT_NODE"in o)t=o,r=I(e,r,11===o.nodeType?[...o.childNodes]:[o]);else{const e=o.valueOf();e!==o&&a(e)}break;case"function":a(o(e))}};return a})(r):"attr"===t?q(r,e.name):(e=>{let t;return n=>{const r=y(n);t!=r&&(t=r,e.textContent=null==r?"":r)}})(r)}const D=e=>{const t=[];let{parentNode:n}=e;for(;n;)t.push(S.call(n.childNodes,e)),e=n,({parentNode:n}=e);return t},M="isµ",H=new l,P=/^(?:textarea|script|style|title|plaintext|xmp)$/,F=(e,t)=>{const n="svg"===e,r=((e,t,n)=>{let r=0;return e.join("").trim().replace(p,((e,t,r,a)=>{let o=t+r.replace(d,"=$2$1").trimEnd();return a.length&&(o+=n||c.test(t)?" /":"></"+t),"<"+o+">"})).replace(u,(e=>""===e?"\x3c!--"+t+r+++"--\x3e":t+r++))})(t,M,n),a=O(r,n),o=R(a,129),i=[],s=t.length-1;let l=0,m=`${M}${l}`;for(;l<s;){const e=o.nextNode();if(!e)throw`bad template: ${r}`;if(8===e.nodeType)e.data===m&&(i.push({type:"node",path:D(e)}),m=`${M}${++l}`);else{for(;e.hasAttribute(m);)i.push({type:"attr",path:D(e),name:e.getAttribute(m)}),e.removeAttribute(m),m=`${M}${++l}`;P.test(e.localName)&&e.textContent.trim()===`\x3c!--${m}--\x3e`&&(e.textContent="",i.push({type:"text",path:D(e)}),m=`${M}${++l}`)}}return{content:a,nodes:i}},j=(e,t)=>{const{content:n,nodes:r}=H.get(t)||H.set(t,F(e,t)),a=A(n,!0);return{content:a,updates:r.map(U,a)}},z=(e,{type:t,template:n,values:r})=>{const a=B(e,r);let{entry:o}=e;o&&o.template===n&&o.type===t||(e.entry=o=((e,t)=>{const{content:n,updates:r}=j(e,t);return{type:e,template:t,content:n,updates:r,wire:null}})(t,n));const{content:i,updates:s,wire:l}=o;for(let e=0;e<a;e++)s[e](r[e]);return l||(o.wire=(e=>{const{firstChild:t,lastChild:n}=e;if(t===n)return n||e;const{childNodes:r}=e,a=[...r];return{ELEMENT_NODE:1,nodeType:111,firstChild:t,lastChild:n,valueOf:()=>(r.length!==a.length&&e.append(...a),e)}})(i))},B=({stack:e},t)=>{const{length:n}=t;for(let r=0;r<n;r++){const n=t[r];n instanceof V?t[r]=z(e[r]||(e[r]={stack:[],entry:null,wire:null}),n):v(n)?B(e[r]||(e[r]={stack:[],entry:null,wire:null}),n):e[r]=null}return n<e.length&&e.splice(n),n};class V{constructor(e,t,n){this.type=e,this.template=t,this.values=n}}const G=e=>{const t=new l;return Object.assign(((t,...n)=>new V(e,t,n)),{for(n,r){const a=t.get(n)||t.set(n,new s);return a.get(r)||a.set(r,(t=>(n,...r)=>z(t,{type:e,template:n,values:r}))({stack:[],entry:null,wire:null}))},node:(t,...n)=>z({stack:[],entry:null,wire:null},new V(e,t,n)).valueOf()})},J=(new l,G("html")),{Hints:W,RUNTIME:K}=(G("svg"),t),Y={},Z=e=>(...t)=>new Promise(((n,r)=>{try{e(...t,n)}catch(e){r(e)}}));Y.promisify=Z;const Q=Z(K);Y.runtime=Q,Y.runtimeHttpRequest=async(e,t)=>(await Q("request",{...t,url:e})).text,Y.getURLPath=({count:e=0,domain:t=!1}={})=>{let n=window.location.pathname.slice(1);return e&&(n=n.split("/").slice(0,e).join("/")),t&&(n=`${window.location.hostname}/${n}`),n},Y.getMap=(e,t)=>t.split("").reduce(((e,t)=>e[t]||e),e.mappings).meta||null,Y.escapeHTML=e=>{const t=document.createElement("span");return t.textContent=e,t.innerHTML};const X={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};Y.escapeForAlias=e=>String(e).replace(/[&<>"'`=/]/g,(e=>X[e])),Y.escapeRegExp=e=>e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),Y.until=(e,t=(e=>e),n=50,r=50)=>new Promise(((a,o)=>{const i=(s=0)=>{const l=e();t(l)?a(l):s>n?o(new Error("until: timeout")):setTimeout((()=>i(s+1)),r)};i()}));const[ee,te]=(()=>{if("undefined"!=typeof browser)return[browser.storage.local.get,browser.storage.local.set];if("undefined"!=typeof chrome)return[chrome.storage.local.get,chrome.storage.local.set].map((e=>Y.promisify(e.bind(chrome.storage.local))));const e=()=>new Error("local storage unavailable: unsupported environment");return[e,e]})();Y.localStorage={},Y.localStorage.fullkey=e=>`surfingkeys-conf.${e}`,Y.localStorage.get=async e=>{const t=Y.localStorage.fullkey(e);return(await ee(t))[t]},Y.localStorage.set=async(e,t)=>{const n=Y.localStorage.fullkey(e);return te({[n]:t})},Y.getElement=e=>t.getClickableElements(e)[0],Y.dispatchMouseClicks=(e=[])=>new Set(e.map((e=>e.href))).forEach((e=>t.RUNTIME("openLink",{tab:{tabbed:!0,active:!1},url:e}))),Y.darkReaderEnabled=()=>document.querySelector("style.darkreader")||document.querySelector("style#dark-reader-style"),Y.htmlUnsafe=e=>J.node([e]),Y.htmlPurify=(e,t={USE_PROFILES:{html:!0}})=>Y.htmlUnsafe(i.sanitize(e,t)),Y.htmlNode=(e,...t)=>J.node(e,...t),Y.htmlForEach=e=>e.map((e=>J.for(e)`${e}`)),Y.html=(e,...t)=>Y.htmlNode(e,...t).outerHTML,Y.suggestionItem=(e={})=>(t,...n)=>({html:Y.html(t,...n),props:e}),Y.createSuggestionItem=(e,t={})=>{const n=document.createElement("li");return n.innerHTML=e,{html:n.outerHTML,props:t}},Y.urlItem=(e,t,{desc:n=null,query:r=null}={})=>{const a=n&&n.length>0?(Array.isArray(n)?n:[n]).map((e=>Y.htmlNode`<div>${e}</div>`)):[];return Y.suggestionItem({url:t,query:r??e})`
<div>
<div style="font-weight: bold">${e}</div>
${Y.htmlForEach(a)}
<div style="opacity: 0.7; line-height: 1.3em">${t}</div>
</div>
`},Y.elementExists=e=>null!==document.querySelector(e),Y.defaultSelector="a[href]:not([href^=javascript])",Y.querySelectorFiltered=(e=Y.defaultSelector,t=(()=>!0))=>[...document.querySelectorAll(e)].filter(t),Y.createHints=(e=Y.defaultSelector,t=W.dispatchMouseClick,n={})=>new Promise((r=>{W.create(e,((...e)=>{r(...e),"function"==typeof t&&t(...e)}),n)})),Y.createHintsFiltered=(e,t,...n)=>{Y.createHints(Y.querySelectorFiltered(t,e),...n)},Y.isRectVisibleInViewport=e=>e.height>0&&e.width>0&&e.bottom>=0&&e.right>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth),Y.isElementInViewport=e=>e.offsetHeight>0&&e.offsetWidth>0&&!e.getAttribute("disabled")&&Y.isRectVisibleInViewport(e.getBoundingClientRect()),Y.getDuckduckgoFaviconUrl=e=>{const t=e instanceof URL?e:new URL(e);return new URL(`https://icons.duckduckgo.com/ip3/${t.hostname}.ico`).href},Y.prettyDate=e=>{const t=((new Date).getTime()-e.getTime())/1e3,n=Math.floor(t/86400);if(Number.isNaN(n)||n<0)return"";const[r,a]=0===n&&(t<60&&[null,"just now"]||t<3600&&[Math.floor(t/60),"minute"]||t<86400&&[Math.floor(t/3600),"hour"])||1===n&&[null,"yesterday"]||n<7&&[n,"day"]||n<30&&[Math.round(n/7),"week"]||n<365&&[Math.round(n/30),"month"]||[Math.round(n/365),"year"];return`${r??""}${r?" ":""}${a}${(r??0)>1?"s":""}${r?" ago":""}`};Y.cleanupUrl=()=>{let e=document.title;const t=location.href,n=location.hostname,r=location.pathname;let a="";if(n.includes("www.alfredforum.com")&&(e=e.replace("- Discussion & Help - Alfred App Community Forum","")),"github.com"===n){const t=/pull\/\d+$/;if(/issues\/\d+$/.test(r)){const t=/\/(.*)\/issues\/(\d+)$/.exec(r),[,n,a]=t;e=`${n}#${a}`}else if(t.test(r)){const t=/\/(.*)\/pull\/(\d+)$/.exec(r),[,n,a]=t;e=`${n} PR #${a}`}else{const e=document.querySelector("#repo-stars-counter-star"),t=e&&e.innerText.trim()||"0";a=t.endsWith("k")||parseInt(t)>99?`${t}★ `:""}}return`${a}[${e}](${((e,t=!0)=>/http[^#\?]*/.exec(e)[0])(t,doCleanup)})`};const ne=Y,{tabOpenLink:re,open:ae,Front:oe,Hints:ie,Normal:se,RUNTIME:le,Clipboard:ce}=t,pe={openSyncAdmin:()=>re("https://app.sync.automatiq.com/admin"),openPromptPerf:()=>re("https://promptperfect.jina.ai/prompts"),openXSS:()=>re("https://xss.is/"),openFireship:()=>re("https://fireship.io/courses"),openCodeCrafters:()=>re("https://app.codecrafters.io/catalog"),openDuolingo:()=>re("https://www.duolingo.com/"),openLeetCode:()=>re("https://leetcode.com/problemset/all/'"),openIFTTT:()=>re("https://ifttt.com/explore"),openPipedream:()=>re("https://pipedream.com/@nicoandmemes/projects"),openHckrNews:()=>re("https://hckrnews.com/"),openSnippetGenerator:()=>re("https://vscodesnippetgenerator.azurewebsites.net/"),openSourcegraph:()=>re("https://sourcegraph.com/search"),openUserStyles:()=>re("https://userstyles.world/"),openPocket:()=>re("https://getpocket.com/my-list"),openReadwiseReader:()=>re("https://read.readwise.io/new"),openRaycastStore:()=>re("https://raycast.com/store"),openMatterQueue:()=>re("https://web.getmatter.com/list/queue"),openRaindrop:()=>re("https://app.raindrop.io/my/-1"),openOneTab:()=>{"Chrome"===t.getBrowserName()?re("chrome-extension://chphlpgkkbolifaimnlloiipkdnihall/onetab.html"):re("moz-extension://59b912fc-f318-419e-99a7-76469dc200ce/onetab.html")},openProxySwitchOmega:()=>{"Chrome"===t.getBrowserName()?re("chrome-extension://padekgcemlokbadohgkifijomclgjgif/options.html"):re("moz-extension://f1f9076e-23c8-496e-a9c3-205956daadbc/options.html")},openTabStash:()=>re("moz-extension://825ee6ee-5a48-466f-8bb6-3d1561e538d3/stash-list.html"),openToby:()=>re("chrome-extension://gfdcgfhkelkdmglklfbndgopaihmoeci/toby.html"),openChromeShortcuts:()=>re("chrome://extensions/shortcuts/"),openChromeFlags:()=>re("chrome://flags/"),openChromeSettings:()=>re("chrome://settings/"),openMozillaAddons:()=>re("https://addons.mozilla.org/en-US/firefox/"),openMozillaSettings:()=>re("about:preferences"),openWorkEmail:()=>re("https://mail.google.com/mail/u/1/#inbox"),openPersonalEmail:()=>re("https://mail.google.com/mail/u/0/#inbox"),openLegacyEmail:()=>re("https://mail.google.com/mail/u/3/#inbox"),openStoryAndComments:({story:e,link:t,comments:n}={})=>{ie.create(e,(e=>{ne.dispatchMouseClicks([ne.getElement(`*[id="${e.id}"] ${t}`),ne.getElement(`*[id="${e.id}"] ${n}`)])}))},moveTabNextToTab:(e,t,n=!1)=>browser.tabs.move(e,{windowId:t.windowId,index:t.index-(n?1:0)}),dispatchEvents:(e,t,...n)=>n.forEach((n=>{const r=document.createEvent(e);r.initEvent(n,!0,!0),t.dispatchEvent(r)}))};pe.dispatchMouseEvents=pe.dispatchEvents.bind(void 0,["MouseEvents"]),pe.scrollToHash=(e=null)=>{const t=(e||document.location.hash).replace("#",""),n=document.getElementById(t)||document.querySelector(`[name="${t}"]`);n&&n.scrollIntoView({behavior:"smooth"})},pe.displayPasswords=()=>{[...document.querySelectorAll("input[type=password]")].forEach((e=>{e.setAttribute("type","text")}))},pe.openLocalHost=()=>{const e=[9222,9706].map((e=>({title:`localhost:${e}`,url:`http://localhost:${e}`})));oe.openOmnibar({type:"UserURLs",extra:e})},pe.tabActivateOrCreate=e=>{le("getTabs",{queryInfo:{url:e,currentWindow:!0}},(({tabs:t})=>{if(!Array.isArray(t))throw new Error(`tabs is not Array: ${JSON.stringify(t)}`);const n=t?.[0]?.id;null!=n?le("focusTab",{tabId:n}):re(e)}))},pe.saveSessionAndQuit=()=>{le("createSession",{name:"LAST"}),le("quit")},pe.restoreLastSession=()=>{le("openSession",{name:"LAST"})},pe.restoreSession=e=>{le("openSession",{name:e})},pe.createSession=e=>{le("createSession",{name:e})},pe.vimEditURL=()=>oe.showEditor(window.location.href,(e=>{pe.openLink(e)}),"url"),pe.getOrgLink=()=>`[[${window.location.href}][${document.title}]]`;let de={g:"https://github.com/nicoandmee",i:"https://github.com/issues/assigned",a:"https://app.sync.automatiq.com/admin",p:"http://getpocket.com/a/queue/"};pe.jumpToVimMark=e=>{let n=de[e];if(void 0!==n)for(var r of("string"==typeof n&&(n=[n]),n)){var a={url:r,scrollLeft:0,scrollTop:0,tab:{tabbed:!1,active:!1}};t.RUNTIME("openLink",a)}else se.jumpVIMark(e,!0)},pe.downloadImage=()=>{t.Hints.create("img",(function(e){chrome.downloads.download({url:e.src,saveAs:!0}),console.log(e)}))},pe.getMarkdownLink=({title:e=document.title,href:t=window.location.href}={})=>`[${e}](${t})`,pe.editCurrentURLNeovimCurrentTab=()=>{oe.showEditor(window.location.href,(function(e){window.location.href=e}),"url")};const ue="http://centralops.net/co/DomainDossier.aspx";function me(e=!0){if(!window.location.href.includes("sourcegraph.com"))return;document.querySelector(".NewSearchContent-module__new-filters")&&document.querySelector(".NewSearchContent-module__new-filters").remove();const t=[...document.querySelectorAll("button, [type=button]")].filter((e=>["Hide preview","Preview"].includes(e.innerText.trim())));(()=>{const n=t.findIndex((e=>"Hide preview"===e.innerText.trim())),r=n+1,a=n-1;if(e&&r<t.length){t.at(r).click()}else if(!e&&a>=0){t.at(a).click()}})(),document.querySelector('div[aria-label="File sidebar"]').style.width="100%"}pe.shodanUrl=({hostname:e=window.location.hostname}={})=>`https://www.shodan.io/host/${e}`,pe.getWhoisUrl=({hostname:e=window.location.hostname}={})=>`${ue}?dom_whois=true&addr=${e}`,pe.getDnsInfoUrl=({hostname:e=window.location.hostname,all:t=!1}={})=>`${ue}?dom_dns=true&addr=${e}${t?"?dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true":""}`,pe.getGoogleCacheUrl=({href:e=window.location.href}={})=>`https://webcache.googleusercontent.com/search?q=cache:${e}`,pe.get12ftUrl=({href:e=window.location.href}={})=>`https://12ft.io/${e}`,pe.getWaybackUrl=({href:e=window.location.href}={})=>`https://web.archive.org/web/*/${e}`,pe.getSummaryUrl=({href:e=window.location.href}={})=>`https://kagi.com/summarizer/index.html?${new URLSearchParams({url:e})}`,pe.openAnchor=({newTab:e=!1,active:t=!0,prop:n="href"}={})=>r=>pe.openLink(r[n],{newTab:e,active:t}),pe.openLink=(e,{newTab:t=!1,active:n=!0}={})=>{t?le("openLink",{tab:{tabbed:!0,active:n},url:e instanceof URL?e.href:e}):window.location.assign(e)},pe.copyLastElementInURL=()=>{const e=window.location.href.split("/"),n=e[e.length-1].split("#")[0].split("?")[0];n?(t.Clipboard.write(n),t.Front.showBanner(`Copied ${n} to the clipboard.`)):t.Front.showBanner("No last element was found.")},pe.jiraToThings=()=>{[...document.querySelectorAll("h1:first-child")].at(0).innerText.trim(),[...document.querySelectorAll('div[data-testid="issue.views.field.rich-text.description"]')].at(0).innerText.trim();var e=document.getElementById("jira-issue-header").getElementsByTagName("a"),t=e[e.length-1],n=document.querySelector('h1[data-test-id="issue.views.issue-base.foundation.summary.heading"]');if(t&&n){console.log("OK to proceed");var r=encodeURIComponent(`[${t.textContent}] ${n.textContent}`),a=encodeURIComponent(t.href),o=encodeURIComponent("SYNC"),i=encodeURIComponent("Work"),s=encodeURIComponent(["Deployed","Done"].join("\n")),l=encodeURIComponent(["Jira"].join(","));window.location.href=`things:///add?title=${r}&notes=${a}&checklist-items=${s}&tags=${l}&list=${o}&heading=${i}`}else alert("This doesn't look like a Jira issue!")},pe.editSettings=()=>re(chrome.extension.getURL("/pages/options.html")),pe.openNeovim=()=>re(chrome.extension.getURL("/pages/neovim.html")),pe.openHypothesis=()=>{t.insertJS((function(){window.hypothesisConfig=function(){return{showHighlights:!0,appType:"bookmarklet"}};var e=document,t=e.createElement("script");t.setAttribute("src","https://hypothes.is/embed.js"),e.body.appendChild(t)}),(function(){t.Front.showBanner("Loaded hypothes.is!")}))},pe.followInoreader=()=>{},pe.toThings=({href:e=window.location.href}={})=>{const n=document.title,r=`Link:${e}`;window.open(`things:///add?title=${n}&notes=${r}&list=Backlog&heading=Someday&show-quick-entry=true&reveal=true&tags=${["web"].join(",")}`,"_blank"),t.Front.showBanner("Sent to Things: "+r)},pe.addLinkToThings=e=>{const{selectionText:n,linkUrl:r}=e;window.open(`things:///add?title=${n}&show-quick-entry=true&notes=Link:${r}`,"_blank"),t.Front.showBanner("Sent to Things: "+n)},pe.addToAnyBox=({href:e=window.location.href}={})=>{window.open(`anybox://download?url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved tab to AnyBox: "+e)},pe.addToInstapaper=({href:e=window.location.href}={})=>{const n=document.createElement("script");n.innerHTML="(() => { var d=document;try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u='+encodeURIComponent(d.location.href);}catch(e){alert('Please wait until the page has loaded.');} })()",document.body.appendChild(n),t.Front.showBanner("Saved page to Instapaper: "+e)},pe.addToReadwise=({href:e=window.location.href}={})=>{window.open(`https://readwise.io/save?title=${encodeURIComponent(document.title)}&url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved page to Readwise: "+title+" "+e)},pe.addToOmnivore=({href:e=window.location.href}={})=>{window.open(`https://omnivore.app/api/save?url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved page to Omnivore: "+e)},pe.copyCurrentURLToObsidian=()=>{const e=new URL(window.location.href);const n=`[${window.document.title.replace(/(<|>)/g,"\\$1")}](${e.href})`,r="obsidian://advanced-uri?vault=content&daily=true&mode=append&data="+n;window.open(r,"_blank"),t.Front.showBanner("Sent to Obsidian: "+n)},pe.togglePdfViewer=()=>chrome.storage.local.get("noPdfViewer",(e=>{e.noPdfViewer?chrome.storage.local.remove("noPdfViewer",(()=>{oe.showBanner("PDF viewer enabled.")})):chrome.storage.local.set({noPdfViewer:1},(()=>{oe.showBanner("PDF viewer disabled.")}))})),pe.previewLink=()=>ne.createHints("a[href]",(e=>oe.showEditor(e.href,(e=>pe.openLink(e)),"url"))),pe.scrollElement=(e,t)=>{pe.dispatchMouseEvents(e,"mousedown"),se.scroll(t)},pe.lf={},pe.lf.searchAgentId=(e,t=9883)=>{const n=`https://logflare.app/sources/${t}/search?querystring=${encodeURIComponent(e)}&tailing%3F=true`;re(n)},pe.copyImdbId=()=>{if(!window.location.hostname.includes("imdb.com"))return;const e=/imdb\.com\/title\/(tt\d+)/.exec(window.location.href);if(null===e||2!==e.length)return;const n=`imdb:${e[1]}`;t.Clipboard.write(n),t.Front.showBanner(`Copied title id [${n}] to the clipboard.`)},pe.paginateIMDB=()=>{const e=document.querySelector("span.ipc-see-more__text");e&&(e.click(),setTimeout((()=>{pe.paginateIMDB()}),1e3))},pe.copyTVDBId=()=>{if(!window.location.hostname.includes("thetvdb.com"))return;if(document.querySelector("div#series_basic_info li:nth-child(1) > span")){let e=document.querySelector("div#series_basic_info li:nth-child(1) > span").innerText;e=`tvdb:${e}`,t.Clipboard.write(e),t.Front.showBanner(`Copied series id [${e}] to the clipboard.`)}},pe.az={},pe.az.viewProduct=()=>{const e=/^([-\w]+[.])*amazon.\w+$/,t=/^(?:.*\/)*(?:dp|gp\/product)(?:\/(\w{10})).*/,n={};document.querySelectorAll("a[href]").forEach((r=>{const a=new URL(r.href);if(0===a.hash.length&&e.test(a.hostname)){const e=t.exec(a.pathname);if(null===e||2!==e.length)return;if(!ne.isElementInViewport(r))return;const o=e[1];if(void 0!==n[o]&&!(0===n[o].text.trim().length&&r.text.trim().length>0))return;n[o]=r}})),ie.create(Object.values(n),ie.dispatchMouseClick)},pe.viewGodoc=()=>pe.openLink(`https://godoc.org/${ne.getURLPath({count:2,domain:!0})}`,{newTab:!0}),pe.sg={},pe.sg.openSourcegraphFromExt=()=>{if("github.com"!==window.location.hostname&&"sourcegraph.com"!==window.location.hostname)return void alert(`This bookmarklet may only be used on GitHub.com or Sourcegraph.com, not ${window.location.hostname}.`);const e=[["^/([^/]+)/([^/]+)/tree/([^/]+)$","/github.com/$1/$2@$3","^/github.com/([^/]+)/([^/@]+)@([^/]+)$","/$1/$2/tree/$3"],["^/([^/]+)/([^/]+)/tree/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/tree/$4","^/github.com/([^/]+)/([^/@]+)@([^/]+)/-/tree/(.+)$","/$1/$2/tree/$3/$4"],["^/([^/]+)/([^/]+)/blob/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/blob/$4","",""],["^/([^/]+)/([^/]+)$","/github.com/$1/$2","^/github.com/([^/]+)/([^/]+)$","/$1/$2"],["^/([^/]+)$","/$1","^/([^/]+)$","/$1"]];let{pathname:t}=window.location;"sourcegraph.com"===window.location.hostname&&(0===t.indexOf("/sourcegraph.com/")?t=t.replace("/sourcegraph.com/","/github.com/"):0===t.indexOf("/sourcegraph/")&&(t=`/github.com${t}`));for(let a=0;a<e.length;a++){const o=e[a];if("github.com"===window.location.hostname){if(""===o[0])continue;var n=new RegExp(o[0]);if(t.match(n)){var r=t.replace(n,o[1]);return void(window.location=`https://sourcegraph.com${r}`)}}else{if(""===o[2])continue;n=new RegExp(o[2]);if(t.match(n)){r=t.replace(n,o[3]);return void(window.location=`https://github.com${r}`)}}}},pe.sg.viewOnGithub=()=>{const e=document.querySelector('a[aria-label="View on GitHub"]');e&&e.click()},pe.sg.toggleSidebar=()=>{const e=document.querySelector('button[aria-label="Show sidebar"],button[aria-label="Hide sidebar"]');e&&e.click()},pe.sg.prevNext=()=>{me(!0)},pe.sg.prevPrev=()=>{me(!1)},pe.sg.openPreviewed=()=>{let e=document.querySelector(".NewSearchContent-module__preview .AnchorLink-module__anchor-link");e&&pe.openLink(e.href,{newTab:!0,active:!1})},pe.sg.openCodeOnHost=()=>{let e=document.querySelector("#go-to-code-host");if(e){let n=e.getAttribute("href");t.Clipboard.write(n)}},pe.sg.copyBlobContent=()=>{let e=document.querySelector('div[aria-label="File blob"]');if(e){let n=e.innerText.trim().split("\n"),r=document.querySelector(".cm-lineNumbers").innerText.trim().split("\n");n=n.slice().splice(0,r.length),console.debug(n);let a=n.join("\n");t.Clipboard.write(a),t.Front.showBanner(`Copied ${n.length} lines to the clipboard.`)}},pe.sg.viewFileHistory=()=>{[...document.querySelectorAll("a.RepoHeaderActions-module__action")].find((e=>e.innerText.trim().includes("History")))},pe.sg.downloadRaw=()=>{document.querySelector("mdi-icon Icon-module__icon-inline LoadingSpinner-module__loading-spinner,div[aria-label='Loading']"),[...document.querySelectorAll("button[data-reach-menu-button]")].filter((e=>"…"===e.innerText.trim()))},pe.sg.copyAllRepos=()=>{Object.entries(window.localStorage).forEach((([e,t])=>{e.startsWith("user-history:")&&!e.includes("anonymous")&&(console.log(e),console.log(JSON.parse(t)))}))},pe.go={},pe.go.parseLocation=()=>{const e=new URL(window.location.href),t=e.searchParams.get("q"),n=e.pathname.split("/"),r={type:"unknown",url:e,query:t};if("www.google.com"===e.hostname)if(n.length<=1)r.type="home";else if("search"===n[1])switch(e.searchParams.get("tbm")){case"vid":r.type="videos";break;case"isch":r.type="images";break;case"nws":r.type="news";break;default:r.type="web"}else"maps"===n[1]&&(r.type="maps","search"===n[2]&&void 0!==n[3]?r.query=n[3]:void 0!==n[2]&&(r.query=n[2]));return r},pe.kagi={},pe.kagi.openKagiInGoogle=()=>{location.href.startsWith("https://kagi.com/search?")&&(location.href=`https://www.google.com/search?q=${new URL(location.href).searchParams.get("q")}`)},pe.gh={},pe.gh.viewGoDoc=()=>re(`https://godoc.org/${getURLPath(2,!0)}`),pe.gh.downloadGistFiles=()=>{[...document.querySelectorAll(".Button--secondary")].filter((e=>e.innerText.trim().includes("Raw"))).map((e=>e.href)).forEach((e=>{t.Clipboard.write(e),pe.openLink(e,{newTab:!0,active:!1})}))},pe.gh.star=({toggle:e=!1}={})=>async()=>{const t=e=>"none"===window.getComputedStyle(e).display||!!e.parentElement&&t(e.parentElement),n=Array.from(document.querySelectorAll("div.starring-container")).filter((e=>!t(e)));let r;switch(n.length){case 0:return;case 1:[r]=n;break;default:try{r=await ne.createHints(n,{action:null})}catch(e){return}}const a=r.parentElement.parentElement?.matches("ul.pagehead-actions")?window.location.pathname:new URL(r.parentElement.querySelector("form").action).pathname,o=r.classList.contains("on"),i=a.slice(1).split("/").slice(0,2).join("/");let s="★",l="starred",c="is";(o&&e||!o&&!e)&&(l=`un${l}`,s="☆"),e&&(c="has been",r.querySelector(o?".starred button, button.starred":".unstarred button, button.unstarred").click()),oe.showBanner(`${s} Repository ${i} ${c} ${l}!`)},pe.gh.parseRepo=(e=window.location.href,t=!1)=>{let n;try{n=e instanceof URL?e:new URL(e)}catch(t){n=new URL(`https://github.com/${e}`)}const[a,o,...i]=n.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return["github.com","gist.github.com","raw.githubusercontent.com"].includes(n.hostname)&&"string"==typeof a&&a.length>0&&"string"==typeof o&&o.length>0&&(s||!1===t)&&/^([a-zA-Z0-9]+-?)+$/.test(a)&&!r.check(a)?{type:"repo",user:a,repo:o,owner:a,name:o,href:e,url:n,repoBase:`${a}/${o}`,repoRoot:s,repoPath:i}:null},pe.gh.parseUser=(e=window.location.href,t=!1)=>{const n=e instanceof URL?e:new URL(e),[a,...o]=n.pathname.split("/").filter((e=>""!==e)),i=0===o.length;return n.origin===window.location.origin&&"string"==typeof a&&a.length>0&&(!1===t||0===o.length)&&/^([a-zA-Z0-9]+-?)+$/.test(a)&&!r.check(a)?{type:"user",name:a,user:a,href:e,url:n,userRoot:i,userPath:o}:null},pe.gh.parseFile=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,o,i,...s]=t.pathname.split("/").filter((e=>""!==e));if(!(t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"string"==typeof o&&("blob"===o||"tree"===o)&&"string"==typeof i&&i.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!r.check(n)))return null;const l={type:"file",user:n,repo:a,pathType:o,commitHash:i,isDirectory:"tree"===o,href:e,url:t,filePath:s,repoBase:`/${n}/${a}`};return l.rawUrl=l.isDirectory?null:`https://raw.githubusercontent.com/${l.user}/${l.repo}/${l.commitHash}/${l.filePath.join("/")}`,l},pe.gh.parseCommit=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,o,i]=t.pathname.split("/").filter((e=>""!==e));return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"string"==typeof o&&"commit"===o&&"string"==typeof i&&i.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!r.check(n)?{type:"commit",user:n,repo:a,commitHash:i,href:e,url:t}:null},pe.gh.parseIssue=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,o,...i]=t.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"issues"===o&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!r.check(n)?{href:e,url:t,...s?{type:"issues",issuePath:i}:{type:"issue",number:i[0],issuePath:i}}:null},pe.gh.parsePull=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,o,...i]=t.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&/^pulls?$/.test(o)&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!r.check(n)?{href:e,url:t,...s?{type:"pulls",pullPath:i}:{type:"pull",number:i[0],pullPath:i}}:null},pe.gh.isUser=(e=window.location.href,t=!0)=>null!==pe.gh.parseUser(e,t),pe.gh.isRepo=(e=window.location.href,t=!0)=>null!==pe.gh.parseRepo(e,t),pe.gh.isFile=(e=window.location.href)=>null!==pe.gh.parseFile(e),pe.gh.isCommit=(e=window.location.href)=>null!==pe.gh.parseCommit(e),pe.gh.isIssue=(e=window.location.href)=>null!==pe.gh.parseIssue(e),pe.gh.isPull=(e=window.location.href)=>null!==pe.gh.parsePull(e),pe.gh.openRepo=()=>ne.createHintsFiltered((e=>pe.gh.isRepo(e.href))),pe.gh.openUser=()=>ne.createHintsFiltered((e=>pe.gh.isUser(e.href))),pe.gh.openFile=()=>ne.createHintsFiltered((e=>pe.gh.isFile(e.href))),pe.gh.openCommit=()=>ne.createHintsFiltered((e=>pe.gh.isCommit(e.href))),pe.gh.openIssue=()=>ne.createHintsFiltered((e=>pe.gh.isIssue(e.href))),pe.gh.openPull=()=>ne.createHintsFiltered((e=>pe.gh.isPull(e.href))),pe.gh.openPage=e=>pe.openLink(`https://github.com/${e}`),pe.gh.openRepoPage=e=>{const t=pe.gh.parseRepo();null!==t&&pe.gh.openPage(`${t.repoBase}${e}`)},pe.gh.openRepoOwner=()=>{const e=pe.gh.parseRepo();null!==e&&pe.gh.openPage(`${e.owner}`)},pe.gh.openGithubPagesRepo=()=>{const e=window.location.hostname.split(".")[0],t=window.location.pathname.split("/")[1]??"";pe.gh.openPage(`${e}/${t}`)},pe.gh.fetchStars=(e="nicoandmee")=>get(`https://api.github.com/users/${e}/starred`).then((e=>{if(void 0!==e){console.log({raw:e});const t=e.map((e=>({origin_user:e.owner.login,origin_id:e.id,origin_url:e.html_url,origin_created_at:e.created_at,content:e.description,title:e.name,tags:e.topics.concat(e.language),meta:{isFork:e.fork,git_url:e.git_url,ssh_url:e.ssh_url,repo_name:e.name,repo_full_name:e.full_name}})));console.log({starred:t})}})),pe.gh.openSourceFile=()=>{const e=window.location.pathname.split("/");pe.gh.openPage(`${[...e.slice(1,3),"tree",...e.slice(3)].join("/")}`)},pe.gh.openProfile=()=>pe.gh.openPage(`${document.querySelector("meta[name='user-login']").content}`),pe.gh.toggleLangStats=()=>document.querySelector(".repository-lang-stats-graph").click(),pe.gh.expandAllInFeed=()=>{let e=document.querySelectorAll("svg[aria-label=Expand]");Array.from(e).map((e=>e.parentElement.parentElement)).forEach((e=>e.click()))},pe.gh.goParent=()=>{const e=window.location.pathname.split("/").filter((e=>""!==e)),t=(()=>{const[t,n,r]=e;switch(e.length){case 0:return!1;case 4:switch(r){case"blob":case"tree":return[t,n];case"pull":return[t,n,"pulls"]}break;case 5:if("blob"===r)return[t,n]}return e.slice(0,e.length-1)})();if(!1!==t){const e=`${window.location.origin}/${t.join("/")}`;pe.openLink(e)}},pe.gh.viewSourceGraphInSameTab=()=>pe.gh.viewSourceGraph(!1),pe.gh.viewSourceGraph=(e=void 0)=>{if(ne.elementExists('a[title="View repository on Sourcegraph"]'))return void document.querySelector('a[title="View repository on Sourcegraph"]').click();const t=new URL("https://sourcegraph.com/github.com");let n=null;if(null!==(n=pe.gh.parseFile(window.location.href))){const e=n.filePath.join("/");if(t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}/-/${n.pathType}/${e}`,""!==window.location.hash)t.hash=window.location.hash;else if(!ne.isElementInViewport(document.querySelector("#L1")))for(const e of document.querySelectorAll(".js-line-number"))if(ne.isElementInViewport(e)){t.hash=e.id;break}}else null!==(n=pe.gh.parseCommit(window.location.href))?t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}`:null!==(n=pe.gh.parseRepo(window.location.href))?t.pathname+=`/${n.user}/${n.repo}`:t.pathname="";let r=!1;e||(r=!0),pe.openLink(t.href,{newTab:r})},pe.gh.openInDev=({newTab:e=!1}={})=>{const t=new URL(window.location.href);t.hostname="github.dev",pe.openLink(t.href,{newTab:e})},pe.gh.selectFile=async({files:e=!0,directories:t=!0}={})=>{if(!e&&!t)throw new Error("At least one of 'files' or 'directories' must be true");const n=n=>n&&!(!t&&n.isDirectory||!e&&!n.isDirectory);let r=pe.gh.parseFile();if(n(r))return r;if(null===pe.gh.parseRepo())throw new Error("Not a repository");const a=ne.createHintsFiltered((e=>{const t=pe.gh.parseFile(e.href);return t&&!1===t.isDirectory}),null);if(r=pe.gh.parseFile(a.href),!n(r))throw new Error("Not a file");return r},pe.gh.openFileFromClipboard=async({newTab:e=!0}={})=>{const t=await navigator.clipboard.readText();if("string"!=typeof t||0===t.length)return;const n=window.location.href,r={user:null,repo:null,commitHash:"master"},a=pe.gh.parseFile(n);if(null!==a)r.user=a.user,r.repo=a.repo,r.commitHash=a.commitHash;else{const e=pe.gh.parseCommit(n);if(null!==e)r.user=e.user,r.repo=e.repo,r.commitHash=e.commitHash;else{const e=pe.gh.parseRepo(n);if(null!==e)return;r.user=e.user,r.repo=e.repo}}pe.openLink(`https://github.com/${r.user}/${r.repo}/tree/${r.commitHash}/${t}`,{newTab:e})},pe.gl={},pe.gl.star=()=>{const e=window.location.pathname.slice(1).split("/").slice(0,2).join("/"),t=document.querySelector(".btn.star-btn > span");t.click();const n=`${t.textContent.toLowerCase()}red`;let r="☆";"starred"===n&&(r="★"),oe.showBanner(`${r} Repository ${e} ${n}`)},pe.tw={},pe.tw.openUser=()=>ne.createHints([].concat([...document.querySelectorAll("a[role='link'] img[src^='https://pbs.twimg.com/profile_images']")].map((e=>e.closest("a"))),[...document.querySelectorAll("a[role='link']")].filter((e=>e.text.match(/^@/))))),pe.by={},pe.by.copyDID=()=>{ne.createHints("img[src*='/did:plc:']",(e=>{const[t,n]=e.src.match("/(did:.*)/");n&&ce.write(n)}))},pe.by.copyPostID=()=>{ne.createHints('a[href*="/post/"]',(e=>{const[t,n]=e.pathname.match(/^\/profile\/[^/]+\/post\/(\w+)/);n&&ce.write(n)}))},pe.re={},pe.re.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll(".noncollapsed.comment")).filter((e=>ne.isElementInViewport(e)));e.length>0&&e[0].querySelector(".expand").click()},pe.hn={},pe.hn.goParent=()=>{const e=document.querySelector(".navs>a[href^='item']");e&&pe.openLink(e.href)},pe.hn.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll("a.togg")).filter((e=>"[–]"===e.innerText&&ne.isElementInViewport(e)));e.length>0&&e[0].click()},pe.hn.goPage=(e=1)=>{let t;try{t=new URL(window.location.href)}catch(e){return}let n=t.searchParams.get("p");null!==n&&""!==n||(n="1");const r=parseInt(n,10);if(Number.isNaN(r))return;const a=r+e;a<1||(t.searchParams.set("p",a),pe.openLink(t.href))},pe.hn.openLinkAndComments=e=>{const t=e.querySelector(".titleline>a").href,n=e.nextElementSibling.querySelector("a[href^='item']:not(.titlelink)").href;pe.openLink(n,{newTab:!0}),pe.openLink(t,{newTab:!0})},pe.feedbin={},pe.feedbin.subscribe=()=>{re("https://feedbin.com/?subscribe="+encodeURIComponent(window.location.href))},pe.ph={},pe.ph.openExternal=()=>{ie.create("ul[class^='postsList_'] > li > div[class^='item_']",(e=>pe.openLink(e.querySelector("div[class^='meta_'] > div[class^='actions_'] > div[class^='minorActions_'] > a:nth-child(1)").href,{newTab:!0})))},pe.wp={},pe.wp.toggleSimple=()=>{const e=new URL(window.location.href);e.hostname=e.hostname.split(".").map(((e,t)=>0===t?"simple"===e?"":"simple":e)).filter((e=>""!==e)).join("."),pe.openLink(e.href)},pe.wp.viewWikiRank=()=>{const e=document.location.hostname.split("."),t=e.length>2&&"www"!==e[0]?e[0]:"en",n=document.location.pathname.split("/");if(n.length<3||"wiki"!==n[1])return;const r=n.slice(2).join("/");pe.openLink(`https://wikirank.net/${t}/${r}`,{newTab:!0})},pe.wp.markdownSummary=()=>`> ${[e=>[...e.querySelectorAll("sup")].map((e=>e.remove())),e=>[...e.querySelectorAll("b")].forEach((e=>{e.innerText=`**${e.innerText}**`})),e=>[...e.querySelectorAll("i")].forEach((e=>{e.innerText=`_${e.innerText}_`}))].reduce(((e,t)=>(t(e),e)),document.querySelector("#mw-content-text p:not([class]):not([id])").cloneNode(!0)).innerText.trim()}\n\n— ${pe.getMarkdownLink()}`,pe.re={},pe.re.focusSearch=()=>pe.dispatchMouseEvents(document.getElementById("docsearch"),"mousedown","click"),pe.re.scrollSidebar=e=>pe.scrollElement(document.getElementById("sidebar-content"),e),pe.re.scrollContent=e=>pe.scrollElement(document.body,e),pe.dv={},pe.dv.scrollSidebar=e=>pe.scrollElement(document.querySelector("._list"),e),pe.dv.scrollContent=e=>pe.scrollElement(document.querySelector("._content"),e),pe.yt={},pe.yt.getCurrentTimestamp=()=>{const[e,t,n=0]=document.querySelector("#ytd-player .ytp-time-current")?.innerText?.split(":")?.reverse()?.map(Number)??[0,0,0];return[e,t,n]},pe.yt.getCurrentTimestampSeconds=()=>{const[e,t,n]=pe.yt.getCurrentTimestamp();return 60*n*60+60*t+e},pe.yt.getCurrentTimestampHuman=()=>{const[e,t,n]=pe.yt.getCurrentTimestamp(),r=e=>`${e}`.padStart(2,"0");return n>0?`${n}:${r(t)}:${r(e)}`:`${t}:${r(e)}`},pe.yt.getShortLink=()=>`https://youtu.be/${new URLSearchParams(window.location.search).get("v")}`,pe.yt.getCurrentTimestampLink=()=>`${pe.yt.getShortLink()}?t=${pe.yt.getCurrentTimestampSeconds()}`,pe.yt.getCurrentTimestampMarkdownLink=()=>pe.getMarkdownLink({title:`${document.querySelector("#ytd-player .ytp-title").innerText} @ ${pe.yt.getCurrentTimestampHuman()} - YouTube`,href:pe.yt.getCurrentTimestampLink()}),pe.doi={},pe.doi.providers={},pe.doi.providers.meta_citation_doi=()=>document.querySelector("meta[name=citation_doi]")?.content,pe.doi.providers.meta_dcIdentifier_doi=()=>document.querySelector("meta[name='dc.Identifier'][scheme=doi]")?.content,pe.doi.getLink=e=>{if(!o)return void oe.showBanner("DOI Handler not confingured (see conf.priv.example.js)");const t=e();if(t)return o(t);oe.showBanner("DOI not found")},pe.cg={},pe.cg.getNewChatLink=()=>[...document.querySelectorAll("a")].find((e=>"New chat"===e.innerText)),pe.cg.newChat=async()=>{const e=pe.cg.getNewChatLink();if(e){(await(async e=>(e.click(),await ne.until((()=>[...document.querySelectorAll('li[class*="group/toggle"]')].find((e=>"GPT-4"===e.innerText))))))(e)).querySelector("button>div").click()}else location.assign("https://chat.openai.com/?model=gpt-4")},pe.cg.getChatLinks=()=>pe.cg.getNewChatLink().parentElement.nextSibling.nextSibling.querySelectorAll("a");const he=pe,ge={categories:{help:0,mouseClick:1,scroll:2,tabs:3,pageNav:4,sessions:5,searchSelectedWith:6,clipboard:7,omnibar:8,visualMode:9,vimMarks:10,settings:11,chromeURLs:12,proxy:13,misc:14,insertMode:15}},{categories:fe}=ge,{Clipboard:be,Front:we,tabOpenLink:ye}=t,ke={mappings:["gk","gn","sb","sw","ob","oe","ow","oy","cp",";cp",";ap","spa","spb","spd","sps","spc","spi","sfr","zQ","zz","zR","od","ab","Q","q","ag","af","yj",";s","yp","p","<Ctrl-j>","<Ctrl-h>"]},ve={};ve.global=[{alias:"F",map:"gf",category:fe.mouseClick,description:"Open a link in non-active new tab"},{alias:"zf",category:fe.mouseClick,description:"Open link URL in vim editor",callback:he.previewLink},{alias:"ZZ",category:fe.sessions,description:"Save current session and quit",callback:he.saveSessionAndQuit},{alias:"ZR",category:fe.sessions,description:"Restore last session",callback:he.restoreLastSession},{alias:"Zl",category:fe.sessions,description:"List saved sessions",callback:()=>{runtime.command({action:"getSessions"},(function(e){Omnibar.listResults(Object.keys(e.sessions),(function(e){return $("<li></li>").html(e)}))}))}},{alias:"Zo",category:fe.misc,description:"Capture URL to Things",callback:he.toThings},{alias:"w",map:"k",category:fe.scroll,description:"Scroll up"},{alias:"s",map:"j",category:fe.scroll,description:"Scroll down"},{alias:"K",map:"e",category:fe.scroll,description:"Scroll half page up"},{alias:"J",map:"d",category:fe.scroll,description:"Scroll half page down"},{alias:"gh",category:fe.scroll,description:"Scroll to element targeted by URL hash",callback:he.scrollToHash},{alias:"gi",category:fe.pageNav,description:"Edit current URL with vim editor",callback:he.vimEditURL},{alias:"gI",category:fe.pageNav,description:"View image in new tab",callback:()=>ne.createHints("img",(e=>he.openLink(e.src)))},{alias:"g.",category:fe.pageNav,description:"Go to parent domain",callback:()=>{const e=window.location.host.split("."),t=(e.length>2?e.slice(1):e).join(".");he.openLink(`${window.location.protocol}//${t}`)}},{alias:"gn",category:fe.misc,description:"Jump to vim-like mark in new tab",callback:he.jumpToVimMark},{alias:"yp",category:fe.clipboard,description:"Copy URL path of current page",callback:()=>be.write(window.location.href)},{alias:"yO",category:fe.misc,description:"Copy current page's link to obsidian",callback:()=>he.copyCurrentURLToObsidian()},{alias:"yI",category:fe.clipboard,description:"Copy Image URL",callback:()=>ne.createHints("img",(e=>be.write(e.src)))},{alias:"yA",category:fe.clipboard,description:"Copy link as Markdown",callback:()=>ne.createHints("a[href]",(e=>be.write(`[${e.innerText}](${e.href})`)))},{alias:"yM",category:fe.clipboard,description:"Copy page URL/Title as Markdown link",callback:()=>be.write(he.getMarkdownLink())},{alias:"yT",category:fe.tabs,description:"Duplicate current tab (non-active new tab)",callback:()=>he.openLink(window.location.href,{newTab:!0,active:!1})},{alias:";q",category:fe.misc,description:"Insert jquery library on current page",callback:()=>Normal.insertJS("//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js")},{alias:"yl",category:fe.tabs,description:"Copy last element in URL",callback:he.copyLastElementInURL},{alias:";se",category:fe.settings,description:"Edit SK Settings",callback:he.editSettings},{alias:"gs",category:fe.chromeURLs,description:"Open Chrome Shortcuts",callback:he.openChromeShortcuts},{alias:"gz",category:fe.misc,description:"Open Proxy SwitchyOmega",callback:he.openProxySwitchOmega},{alias:"gk",category:fe.misc,description:"Open Toby",callback:he.openToby},{alias:"=W",category:fe.misc,description:"Lookup whois information for domain",callback:()=>he.openLink(he.getWhoisUrl(),{newTab:!0})},{alias:"=d",category:fe.misc,description:"Lookup dns information for domain",callback:()=>he.openLink(he.getDnsInfoUrl(),{newTab:!0})},{alias:"=D",category:fe.misc,description:"Lookup all information for domain",callback:()=>he.openLink(he.getDnsInfoUrl({all:!0}),{newTab:!0})},{alias:"=c",category:fe.misc,description:"Show Google's cached version of page",callback:()=>he.openLink(he.getGoogleCacheUrl(),{newTab:!0})},{alias:"=p",category:fe.misc,description:"Remove popups, banners, and ads from any website.",callback:()=>he.openLink(he.get12ftUrl(),{newTab:!1})},{alias:"=a",category:fe.misc,description:"Show Archive.org Wayback Machine for page",callback:()=>he.openLink(he.getWaybackUrl(),{newTab:!0})},{alias:"=S",category:fe.misc,description:"View summary for page",callback:()=>he.openLink(he.getSummaryUrl(),{newTab:!0})},{alias:"=t",category:fe.misc,description:"Add to Things",callback:he.toThings},{alias:"=A",category:fe.misc,description:"Add current URL to Anybox",callback:he.addToAnyBox},{alias:"=I",category:fe.misc,description:"Add current URL to readwise",callback:he.addToReadwise},{alias:"=O",category:fe.misc,description:"Add current URL to Omnivore",callback:he.addToOmnivore},{alias:";pd",category:fe.misc,description:"Toggle PDF viewer from SurfingKeys",callback:he.togglePdfViewer},{alias:";dI",category:fe.misc,description:"Download image to",callback:()=>{t.Hints.create("img",(function(e){t.RUNTIME("download",{url:e.src,saveAs:!0})}))}},{alias:"gxE",map:"gxt",category:fe.tabs,description:"Close tab to left"},{alias:"gxR",map:"gxT",category:fe.tabs,description:"Close tab to right"},{alias:"F",map:"gf",category:fe.mouseClick,description:"Open a link in non-active new tab"},{alias:"ol",category:fe.omnibar,description:"Open localhost",callback:he.openLocalHost},{alias:"oh",category:fe.omnibar,description:"Open URL from history",callback:()=>we.openOmnibar({type:"History"})},{alias:"oc",category:fe.omnibar,description:"Search grep.app",callback:()=>we.openOmnibar({type:"SearchEngine",extra:"gr"})}],ve["imdb.com"]=[{alias:"yt",description:"Copy IMDB title identifier",callback:he.copyImdbId}],ve["thetvdb.com"]=[{alias:"yt",description:"Copy TVDB title identifier",callback:he.copyTVDBId}],ve["amazon.com"]=[{alias:"a",description:"View product",callback:he.az.viewProduct},{alias:"c",description:"Add to Cart",callback:()=>ne.createHints("#add-to-cart-button")},{alias:"R",description:"View Product Reviews",callback:()=>he.openLink("#customerReviews")},{alias:"Q",description:"View Product Q&A",callback:()=>he.openLink("#Ask")},{alias:"A",description:"Open Account page",callback:()=>he.openLink("/gp/css/homepage.html")},{alias:"C",description:"Open Cart page",callback:()=>he.openLink("/gp/cart/view.html")},{alias:"O",description:"Open Orders page",callback:()=>he.openLink("/gp/css/order-history")}];const xe=["a h3","h3 a","a[href^='/search']:not(.fl):not(#pnnext,#pnprev):not([role]):not(.hide-focus-ring)","g-scrolling-carousel a",".rc > div:nth-child(2) a",".kno-rdesc a",".kno-fv a",".isv-r > a:first-child",".dbsr > a:first-child",".X5OiLe",".WlydOe",".fl"].join(",");ve["www.google.com"]=[{alias:"a",description:"Open search result",callback:()=>ne.createHints(xe)},{alias:"A",description:"Open search result (new tab)",callback:()=>ne.createHints(xe,he.openAnchor({newTab:!0,active:!1}))}],ve["algolia.com"]=[{alias:"a",description:"Open search result",callback:()=>ne.createHints(".item-main h2>a:first-child")}],ve["atlassian.net"]=[{alias:"t",description:"Copy issue to Things",callback:()=>he.jiraToThings()}],ve["youtube.com"]=[{leader:"",alias:"A",description:"Open video",callback:()=>ne.createHints("*[id='video-title']",he.openAnchor({newTab:!0}))},{leader:"",alias:"C",description:"Open channel",callback:()=>ne.createHints("*[id='byline']")},{leader:"",alias:"gH",description:"Goto homepage",callback:()=>he.openLink("https://www.youtube.com/feed/subscriptions?flow=2")},{leader:"",alias:"F",description:"Toggle fullscreen",callback:()=>he.dispatchMouseEvents(document.querySelector("#movie_player.ytp-fullscreen-button"),"mousedown","click")},{leader:"",alias:"Yt",description:"Copy YouTube video link for current time",callback:()=>be.write(he.yt.getCurrentTimestampLink())},{leader:"",alias:"Ym",description:"Copy YouTube video markdown link for current time",callback:()=>be.write(he.yt.getCurrentTimestampMarkdownLink())}],ve["sourcegraph.com"]=[{alias:"]",description:"Preview next search result",callback:he.sg.prevNext},{alias:"[",description:"Preview previous search result",callback:he.sg.prevPrev},{alias:"O",description:"Open currently previewed search result",callback:he.sg.openPreviewed},{alias:"1",description:"Toggle sidebar",callback:he.sg.toggleSidebar}],ve["github.com"]=[{alias:";rr",description:"Download associated gist files (raw)",callback:he.gh.downloadGistFiles},{alias:"A",description:"Open repository Actions page",callback:()=>he.gh.openRepoPage("/actions")},{alias:"C",description:"Open repository Commits page",callback:()=>he.gh.openRepoPage("/commits")},{alias:"I",description:"Open repository Issues page",callback:()=>he.gh.openRepoPage("/issues")},{alias:"N",description:"Open notifications page",callback:()=>he.gh.openPage("/notifications")},{alias:"P",description:"Open repository Pull Requests page",callback:()=>he.gh.openRepoPage("/pulls")},{alias:"R",description:"Open Repository page",callback:()=>he.gh.openRepoPage("/")},{alias:"S",description:"Open repository Settings page",callback:()=>he.gh.openRepoPage("/settings")},{alias:"W",description:"Open repository Wiki page",callback:()=>he.gh.openRepoPage("/wiki")},{alias:"X",description:"Open repository Security page",callback:()=>he.gh.openRepoPage("/security")},{alias:"O",description:"Open repository Owner's profile page",callback:he.gh.openRepoOwner},{alias:"M",description:"Open your profile page ('Me')",callback:he.gh.openProfile},{alias:"a",description:"View Repository",callback:he.gh.openRepo},{alias:"u",description:"View User",callback:he.gh.openUser},{alias:"f",description:"View File",callback:he.gh.openFile},{alias:"c",description:"View Commit",callback:he.gh.openCommit},{alias:"i",description:"View Issue",callback:he.gh.openIssue},{alias:"p",description:"View Pull Request",callback:he.gh.openPull},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{leader:"",alias:"gu",description:"Go up one path in the URL (GitHub)",callback:he.gh.goParent},{alias:"s",description:"Toggle Star",callback:he.gh.star({toggle:!0})},{alias:"yy",description:"Copy repository name (owner/repo)",callback:async()=>be.write(ne.getURLPath({count:2}))},{alias:"l",description:"Expand all in gh feed",callback:he.gh.expandAllInFeed},{alias:"D",description:"Open in github.dev (new tab)",callback:()=>he.gh.openInDev({newTab:!0})},{alias:"View GoDoc for Project",description:"Open go.dev documentation for the project",callback:he.gh.viewGoDoc},{alias:"G",description:"View on SourceGraph",callback:he.gh.viewSourceGraph},{alias:"g",description:"View on SourceGraph (Preserve Tab)",callback:he.gh.viewSourceGraphInSameTab},{alias:"r",description:"View live raw version of file",callback:()=>he.gh.selectFile({directories:!1}).then((e=>he.openLink(e.rawUrl,{newTab:!0})))},{alias:"yr",description:"Copy raw link to file",callback:()=>he.gh.selectFile({directories:!1}).then((e=>be.write(e.rawUrl)))},{alias:"yf",description:"Copy link to file",callback:()=>he.gh.selectFile().then((e=>be.write(e.url)))},{alias:"gcp",description:"Open clipboard string as file path in repo",callback:he.gh.openFileFromClipboard}],ve["raw.githubusercontent.com"]=[{alias:"R",description:"Open Repository page",callback:()=>he.gh.openRepoPage("/")},{alias:"F",description:"Open Source File",callback:he.gh.openSourceFile}],ve["github.io"]=[{alias:"R",description:"Open Repository page",callback:()=>he.gh.openGithubPagesRepo()}],ve["gitlab.com"]=[{alias:"s",description:"Toggle Star",callback:he.gl.star},{alias:"y",description:"Copy Project Path",callback:()=>be.write(ne.getURLPath({count:2}))},{alias:"Y",description:"Copy Project Path (including domain)",callback:()=>be.write(ne.getURLPath({count:2,domain:!0}))},{alias:"D",description:"View GoDoc for Project",callback:he.viewGodoc}],ve["lobste.rs"]=[{alias:"f",description:"Open Link and Comments [Lobsters]",path:/^(page.*)?$/,callback:()=>he.openStoryAndComments({story:"li.story",link:"a.u-url",comments:".comments_label a"})}],ve["twitter.com"]=[{alias:"f",description:"Follow user",callback:()=>ne.createHints("div[role='button'][data-testid$='follow']")},{alias:"s",description:"Like tweet",callback:()=>ne.createHints("div[role='button'][data-testid$='like']")},{alias:"R",description:"Retweet",callback:()=>ne.createHints("div[role='button'][data-testid$='retweet']")},{alias:"c",description:"Comment/Reply",callback:()=>ne.createHints("div[role='button'][data-testid='reply']")},{alias:"T",description:"New tweet",callback:()=>document.querySelector("a[role='button'][data-testid='SideNav_NewTweet_Button']").click()},{alias:"u",description:"Goto user",callback:he.tw.openUser},{alias:"t",description:"Goto tweet",callback:()=>ne.createHints("article, article div[data-focusable='true'][role='link'][tabindex='0']")}],ve["bsky.app"]=[{alias:"d",description:"Copy user DID",callback:he.by.copyDID},{alias:"p",description:"Copy user post ID",callback:he.by.copyPostID}],ve["reddit.com"]=[{alias:"x",description:"Collapse comment",callback:()=>ne.createHints(".expand")},{alias:"X",description:"Collapse next comment",callback:he.re.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>ne.createHints(".arrow.up")},{alias:"S",description:"Downvote",callback:()=>ne.createHints(".arrow.down")},{alias:"e",description:"Expand expando",callback:()=>ne.createHints(".expando-button")},{alias:"a",description:"View post (link)",callback:()=>ne.createHints(".title")},{alias:"A",description:"View post (link) (non-active new tab)",callback:()=>ne.createHints(".title",he.openAnchor({newTab:!0,active:!1}))},{alias:"c",description:"View post (comments)",callback:()=>ne.createHints(".comments")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>ne.createHints(".comments",he.openAnchor({newTab:!0,active:!1}))}],ve["news.ycombinator.com"]=[{alias:"x",description:"Collapse comment",callback:()=>ne.createHints(".togg")},{alias:"X",description:"Collapse next comment",callback:he.hn.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>ne.createHints(".votearrow[title='upvote']")},{alias:"S",description:"Downvote",callback:()=>ne.createHints(".votearrow[title='downvote']")},{alias:"a",description:"View post (link)",callback:()=>ne.createHints(".titleline>a")},{alias:"A",description:"View post (link and comments)",callback:()=>ne.createHints(".athing",he.hn.openLinkAndComments)},{alias:"c",description:"View post (comments)",callback:()=>ne.createHints(".subline>a[href^='item']")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>ne.createHints(".subline>a[href^='item']",he.openAnchor({newTab:!0,active:!1}))},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{leader:"",alias:"gp",description:"Go to parent",callback:he.hn.goParent},{leader:"",alias:"]]",description:"Next page",callback:()=>he.hn.goPage(1)},{leader:"",alias:"[[",description:"Prev page",callback:()=>he.hn.goPage(-1)}],ve["producthunt.com"]=[{alias:"a",description:"View product (external)",callback:he.ph.openExternal},{alias:"v",description:"View product",callback:()=>ne.createHints("ul[class^='postsList_'] > li > div[class^='item_'] > a")},{alias:"s",description:"Upvote product",callback:()=>ne.createHints("button[data-test='vote-button']")}],ve["wikipedia.org"]=[{alias:"s",description:"Toggle simple version of current article",callback:he.wp.toggleSimple},{alias:"a",description:"View page",callback:()=>ne.createHints("#bodyContent :not(sup):not(.mw-editsection) > a:not([rel=nofollow])")},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{alias:"ys",description:"Copy article summary as Markdown",callback:()=>be.write(he.wp.markdownSummary())},{alias:"R",description:"View WikiRank for current article",callback:he.wp.viewWikiRank}],ve["craigslist.org"]=[{alias:"a",description:"View listing",callback:()=>ne.createHints("a.result-title")}],ve["stackoverflow.com"]=[{alias:"a",description:"View question",callback:()=>ne.createHints("a.question-hyperlink")}],ve["aur.archlinux.org"]=[{alias:"a",description:"View package",callback:()=>ne.createHints("a[href^='/packages/'][href$='/']")}];const Se="/docs(/.*)?";ve["rescript-lang.org"]=[{leader:"",alias:"i",description:"Focus search field",path:`(${Se})?$`,callback:he.re.focusSearch},{alias:"a",description:"Open docs link",path:Se,callback:()=>ne.createHints("a[href^='/docs/']")},{alias:"L",description:"Open language manual",callback:()=>he.openLink("/docs/manual/latest/introduction")},{alias:"R",description:"Open ReScript + React docs",callback:()=>he.openLink("/docs/react/latest/introduction")},{alias:"G",description:"Open GenType docs",callback:()=>he.openLink("/docs/gentype/latest/introduction")},{alias:"P",description:"Open package index",callback:()=>he.openLink("/packages")},{alias:"Y",description:"Open playground",callback:()=>he.openLink("/try")},{alias:"S",description:"Open syntax lookup",callback:()=>he.openLink("/syntax-lookup")},{alias:"F",description:"Open community forum",callback:()=>he.openLink("https://forum.rescript-lang.org/")},{alias:"A",description:"Open API docs",callback:()=>he.openLink("/docs/manual/latest/api")},{alias:"J",description:"Open JS API docs",callback:()=>he.openLink("/docs/manual/latest/api/js")},{alias:"B",description:"Open Belt API docs",callback:()=>he.openLink("/docs/manual/latest/api/belt")},{alias:"D",description:"Open DOM API docs",callback:()=>he.openLink("/docs/manual/latest/api/dom")},{leader:"",alias:"w",description:"Scroll sidebar up",path:Se,callback:()=>he.re.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",path:Se,callback:()=>he.re.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",path:Se,callback:()=>he.re.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",path:Se,callback:()=>he.re.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",path:Se,callback:()=>he.re.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",path:Se,callback:()=>he.re.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",path:Se,callback:()=>he.re.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",path:Se,callback:()=>he.re.scrollContent("pageDown")}],ve["devdocs.io"]=[{leader:"",alias:"w",description:"Scroll sidebar up",callback:()=>he.dv.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",callback:()=>he.dv.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",callback:()=>he.dv.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",callback:()=>he.dv.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",callback:()=>he.dv.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",callback:()=>he.dv.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",callback:()=>he.dv.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",callback:()=>he.dv.scrollContent("pageDown")}],ve["ebay.com"]=[{alias:"fs",description:"Fakespot",callback:he.fakeSpot}],ve["kagi.com"]=[{alias:"gg",description:"Open kagi search result in Google",callback:he.kagi.openKagiInGoogle}],ve["chat.openai.com"]=[{alias:"n",description:"New chat",callback:()=>he.cg.newChat()},{alias:"a",description:"Open chat",callback:()=>ne.createHints([...he.cg.getChatLinks()])}];const $e=(e,t=he.doi.providers.meta_citation_doi)=>{ve[e]||(ve[e]=[]),ve[e].push({alias:"O",description:"Open DOI",callback:()=>{const e=he.doi.getLink(t);e&&he.openLink(e,{newTab:!0})},hide:!0})};o&&($e("aaai.org"),$e("academic.oup.com"),$e("aeaweb.org"),$e("aging-us.com"),$e("ahajournals.org",he.doi.providers.meta_dcIdentifier_doi),$e("ajnr.org"),$e("annualreviews.org",he.doi.providers.meta_dcIdentifier_doi),$e("apa.org",(()=>document.querySelector(".citation a")?.innerText?.replace(/^https:\/\/doi\.org\//,""))),$e("ashpublications.org"),$e("asnjournals.org"),$e("biomedcentral.com"),$e("bmj.com"),$e("brill.com"),$e("cambridge.org"),$e("cell.com"),$e("cmaj.ca"),$e("cochranelibrary.com"),$e("diabetesjournals.org"),$e("direct.mit.edu"),$e("dl.acm.org",he.doi.providers.meta_dcIdentifier_doi),$e("elifesciences.org",(()=>document.querySelector("meta[name='dc.identifier']")?.content?.replace(/^doi:/,""))),$e("embopress.org"),$e("emerald.com",he.doi.providers.meta_dcIdentifier_doi),$e("episciences.org"),$e("epubs.siam.org",he.doi.providers.meta_dcIdentifier_doi),$e("ersjournals.com"),$e("europepmc.org"),$e("frontiersin.org"),$e("future-science.com",he.doi.providers.meta_dcIdentifier_doi),$e("go.gale.com"),$e("ieee.org",(()=>document.querySelector(".stats-document-abstract-doi a")?.innerText)),$e("ingentaconnect.com",(()=>document.querySelector("meta[name='DC.identifier']")?.content?.replace(/^info:doi\//,""))),$e("jacc.or",he.doi.providers.meta_dcIdentifier_doi),$e("jamanetwork.com"),$e("jci.org"),$e("jfdc.cnic.cn"),$e("jlr.org"),$e("jneurosci.org"),$e("journals.lww.com"),$e("journals.physiology.org",he.doi.providers.meta_dcIdentifier_doi),$e("journals.plos.org"),$e("journals.sagepub.com",he.doi.providers.meta_dcIdentifier_doi),$e("journals.uchicago.edu",he.doi.providers.meta_dcIdentifier_doi),$e("jst.go.jp"),$e("karger.com"),$e("koreascience.kr"),$e("koreascience.or.kr"),$e("liebertpub.com",he.doi.providers.meta_dcIdentifier_doi),$e("mdpi.com"),$e("msp.org",(()=>document.querySelector(".paper-doi a")?.innerText)),$e("nature.com"),$e("nejm.org",he.doi.providers.meta_dcIdentifier_doi),$e("nowpublishers.com"),$e("nsf.gov"),$e("ocl-journal.org"),$e("onlinelibrary.wiley.com"),$e("pnas.org"),$e("ncbi.nlm.nih.gov"),$e("pubs.acs.org",he.doi.providers.meta_dcIdentifier_doi),$e("pubs.geoscienceworld.org"),$e("pubs.rsna.org",he.doi.providers.meta_dcIdentifier_doi),$e("research.manchester.ac.uk"),$e("royalsocietypublishing.org",he.doi.providers.meta_dcIdentifier_doi),$e("rupress.org"),$e("science.org",he.doi.providers.meta_dcIdentifier_doi),$e("sciencedirect.com"),$e("scitation.org"),$e("spandidos-publications.com"),$e("spiedigitallibrary.org"),$e("springer.com"),$e("synapse.koreamed.org"),$e("tandfonline.com",he.doi.providers.meta_dcIdentifier_doi),$e("thelancet.com"),$e("worldscientific.com",he.doi.providers.meta_dcIdentifier_doi));const _e={"wikipedia.org":["wiktionary.org","wikiquote.org","wikisource.org","wikimedia.org","mediawiki.org","wikivoyage.org","wikibooks.org","wikinews.org","wikiversity.org","wikidata.org","wiki.archlinux.org"],"stackoverflow.com":["stackexchange.com","serverfault.com","superuser.com","askubuntu.com","stackapps.com","mathoverflow.net"]};console.dir({unmaps:ke,maps:ve,aliases:_e},{depth:null});const Te={unmaps:ke,maps:ve,aliases:_e},{htmlPurify:Ce,htmlNode:Le,htmlForEach:Re,suggestionItem:Ae,urlItem:Ee,prettyDate:Oe,getDuckduckgoFaviconUrl:Ne,localStorage:Ie,runtimeHttpRequest:qe,escapeForAlias:Ue,createSuggestionItem:De}=ne,Me="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%20enable-background%3D%22new%200%200%2056%2056%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23eee%22%20d%3D%22M0%200h56v56h-56z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23999%22%20d%3D%22M36.4%2013.5h-18.6v24.9c0%201.4.9%202.3%202.3%202.3h18.7v-25c.1-1.4-1-2.2-2.4-2.2zm-6.2%203.5h5.1v6.4h-5.1v-6.4zm-8.8%200h6v1.8h-6v-1.8zm0%204.6h6v1.8h-6v-1.8zm0%2015.5v-1.8h13.8v1.8h-13.8zm13.8-4.5h-13.8v-1.8h13.8v1.8zm0-4.7h-13.8v-1.8h13.8v1.8z%22%2F%3E%0A%3C%2Fsvg%3E%0A",He="undefined"!=typeof navigator?navigator.language:"",Pe={},Fe=e=>{let t="https://google.com/favicon.ico";return e.favicon?t=e.favicon:e.domain?t=Ne(`https://${e.domain}`):e.search&&(t=Ne(e.search)),{favicon:t,compl:`https://www.googleapis.com/customsearch/v1?key=${a.google_cs}&cx=${a[`google_cx_${e.alias}`]}&q=`,search:`https://cse.google.com/cse/publicurl?cx=${a[`google_cx_${e.alias}`]}&q=`,callback:e=>JSON.parse(e.text).items.map((e=>Ae({url:e.link})`
<div>
<div class="title"><strong>${Ce(e.htmlTitle)}</strong></div>
<div>${Ce(e.htmlSnippet)}</div>
</div>
`)),priv:!0,...e}};Pe.nx={alias:"nx",name:"nixpkg",search:"https://search.nixos.org/packages?channel=unstable&query="},Pe.trakt={alias:"trkt",name:"Trakt.tv",domain:"trakt.tv",search:"https://trakt.tv/search?query="},Pe.tv={alias:"mv",domain:"imdb.com",name:"IMDB",search:"https://www.imdb.com/find?s=all&q="},Pe.al=Fe({alias:"al",name:"archlinux",search:"https://www.archlinux.org/packages/?arch=x86_64&q="}),Pe.au={alias:"au",name:"AUR",search:"https://aur.archlinux.org/packages/?O=0&SeB=nd&outdated=&SB=v&SO=d&PP=100&do_Search=Go&K=",compl:"https://aur.archlinux.org/rpc?v=5&type=suggest&arg="},Pe.au.callback=e=>JSON.parse(e.text).map((e=>Ee(e,`https://aur.archlinux.org/packages/${e}`))),Pe.aw={alias:"aw",name:"archwiki",search:"https://wiki.archlinux.org/index.php?go=go&search=",compl:"https://wiki.archlinux.org/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},Pe.aw.callback=e=>JSON.parse(e.text)[1],Pe.af=Fe({alias:"af",name:"archforums",domain:"bbs.archlinux.org"}),Pe.mk={alias:"mk",name:"mankier",search:"https://www.mankier.com/?q=",compl:"https://www.mankier.com/api/v2/suggest/?exclude_sections=&q=",callback:e=>JSON.parse(e.text).results.map((e=>Ae({url:e.url})`
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px">
<div>
<div class="title"><strong>${e.text}</strong></div>
<div class="title">${e.description??""}</div>
</div>
</div>
`))},Pe.lg={alias:"lg",name:"libgen",search:"https://libgen.is/search.php?req="},Pe.cs=Fe({alias:"cs",name:"chromestore",search:"https://chrome.google.com/webstore/search/"});const je=e=>JSON.parse(e.text).results.map((e=>{let{name:t}=e;"object"==typeof t&&(void 0!==t[navigator.language]?t=t[navigator.language]:[t]=Object.values(t));let n="";switch(e.type){case"extension":n+="🧩 ";break;case"statictheme":n+="🖌 "}return Ae({url:e.url})`
<div style="padding:5px;display:grid;grid-template-columns:2em 1fr;grid-gap:15px">
<img style="width:2em" src="${e.icon_url}">
<div>
<div class="title"><strong>${n}${t}</strong></div>
</div>
</div>
`}));Pe.fa={alias:"fa",name:"firefox-addons",search:`https://addons.mozilla.org/${He}/firefox/search/?q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?q=",callback:je},Pe.ft={alias:"ft",name:"firefox-themes",search:`https://addons.mozilla.org/${He}/firefox/search/?type=statictheme&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=statictheme&q=",callback:je},Pe.fe={alias:"fe",name:"firefox-extensions",search:`https://addons.mozilla.org/${He}/firefox/search/?type=extension&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=extension&q=",callback:je},Pe.so={alias:"so",name:"stackoverflow",search:"https://stackoverflow.com/search?q=",compl:"https://api.stackexchange.com/2.2/search/advanced?pagesize=10&order=desc&sort=relevance&site=stackoverflow&q="},Pe.so.callback=e=>JSON.parse(e.text).items.map((e=>Ee(`[${e.score}] ${e.title}`,e.link,{query:!1}))),Pe.se={alias:"se",name:"stackexchange",search:"https://stackexchange.com/search?q="},Pe.se.callback=e=>JSON.parse(e.text).map((e=>e.phrase.replace(/^!stackexchange /,""))),Pe.sg={alias:"sg",name:"Sourcegraph",search:"https://sourcegraph.com/search?q=",compl:"https://sourcegraph.com/.api/graphql?SuggestionsRepo"},Pe.dh={alias:"dh",name:"dockerhub",search:"https://hub.docker.com/search/?page=1&q=",compl:"https://hub.docker.com/v2/search/repositories/?page_size=20&query="},Pe.dh.callback=e=>JSON.parse(e.text).results.map((e=>{let t="",n=e.repo_name;return t+=`[★${e.star_count}] `,t+=`[↓${e.pull_count}] `,-1===n.indexOf("/")&&(n=`_/${n}`),Ae({url:`https://hub.docker.com/r/${n}`})`
<div>
<div class="title"><strong>${n}</strong></div>
<div>${t}</div>
<div>${e.short_description}</div>
</div>
`})),Pe.gh={alias:"gh",name:"github",search:"https://github.com/search?q=",compl:"https://api.github.com/search/repositories?sort=stars&order=desc&q="},Pe.gh.callback=e=>JSON.parse(e.text).items.map((e=>{let t="";return e.stargazers_count&&(t+=`[★${parseInt(e.stargazers_count,10)}] `),Ee(t+e.full_name,e.html_url,{query:e.full_name,desc:e.description})})),Pe.gst={alias:"gst",name:"Gist [JS]",search:"https://gist.github.com/search?l=JavaScript&q=",compl:"https://api.github.com/gists/public?&l=JavaScript&q=per_page=20&q=",favicon:Ne("https://gist.github.com"),callback:e=>JSON.parse(e.text).map((e=>{const t=e.description?e.description:"No description";return Ae({url:e.html_url})`
<div>
<div class="title"><strong>${e.owner.login}/${e.files[Object.keys(e.files)[0]].filename}</strong></div>
<div>${t}</div>
</div>
`}))},Pe.vw={alias:"vw",name:"vimwiki",search:"https://vim.fandom.com/wiki/Special:Search?query=",compl:"https://vim.fandom.com/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},Pe.vw.callback=e=>JSON.parse(e.text)[1].map((e=>Ee(e,`https://vim.fandom.com/wiki/${encodeURIComponent(e)}`,{query:!1}))),Pe.az={alias:"az",name:"amazon",search:"https://smile.amazon.com/s/?field-keywords=",compl:"https://completion.amazon.com/search/complete?method=completion&mkt=1&search-alias=aps&q="},Pe.az.callback=e=>JSON.parse(e.text)[1],Pe.cr={alias:"cr",name:"crates",search:"https://crates.io/search?q=",compl:"https://crates.io/api/v1/crates?q=",callback:e=>JSON.parse(e.text).crates.map((e=>{const t=`[${e.num_downloads} downloads]`;return Ae({url:e.documentation})`
<div>
<div class="title"><strong>${e.name}</strong></div>
<div>${e.description}</div>
<div>${t}</div>
</div>
`}))},Pe.cl={alias:"cl",name:"craigslist",search:"https://www.craigslist.org/search/sss?query=",compl:"https://www.craigslist.org/suggest?v=12&type=search&cat=sss&area=1&term="},Pe.cl.callback=e=>JSON.parse(e.text),Pe.eb={alias:"eb",name:"ebay",search:"https://www.ebay.com/sch/i.html?_nkw=",compl:"https://autosug.ebay.com/autosug?callback=0&sId=0&kwd="},Pe.eb.callback=e=>JSON.parse(e.text).res.sug,Pe.un={alias:"un",name:"unicode",search:"https://unicode-table.com/en/search/?q=",compl:"http://localhost:9919/s/unicode?q=",local:!0},Pe.ri={alias:"ri",name:"reddit",search:"https://old.reddit.com/r/"},Pe.usw={alias:"usw",name:"userstyles.world",search:"https://userstyles.world/search?q="},Pe.un.callback=e=>{const t=JSON.parse(e.text).slice(0,20),n="font-family: monospace; background-color: rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.4); border-radius: 5px; padding: 2px 4px; opacity: 70%";return t.map((({symbol:e,name:t,value:r})=>{return Ae({url:`https://unicode-table.com/en/${r}`,copy:e})`
<div>
<span style="font-size: 2em; font-weight: bold; min-width: 1em; margin-left: 0.5em; display: inline-block">${e}</span>
<span style="${n}">U+${r}</span>
<span style="${n}">&amp;#${parseInt(r,16)};</span>
<span>${a=t.toLowerCase(),a.split(" ").map((e=>`${e[0]?.toUpperCase()??""}${e.length>1?e.slice(1):""}`)).join(" ")}</span>
</div>
`;var a}))},Pe.gr={alias:"gr",name:"grep",search:"https://grep.app/search?q=",compl:"https://grep.app/search?q=",callback:e=>JSON.parse(e.text).map((function(e){return e.phrase}))};const ze=(e,t={})=>{const n={maxDefs:-1,ellipsis:!1,...t};return e.map((e=>{const t=[];let r="";if((n.maxDefs<=-1||n.maxDefs>0)&&e.defs&&e.defs.length>0){for(const r of e.defs.slice(0,n.maxDefs<=-1?void 0:n.maxDefs)){const e=r.split("\t"),n=`(${e[0]})`,a=e[1];t.push(`<span><em>${n}</em> ${a}</span>`)}n.ellipsis&&e.defs.length>n.maxDefs&&t.push("<span><em>&hellip;</em></span>"),r=`<div>${t.join("<br />")}</div>`}return Ae({url:`${n.wordBaseURL}${e.word}`})`
<div>
<div class="title"><strong>${e.word}</strong></div>
${Ce(r)}
</div>
`}))};Pe.de={alias:"de",name:"define",search:"http://onelook.com/?w=",compl:"https://api.datamuse.com/words?md=d&sp=%s*",opts:{maxDefs:16,ellipsis:!0,wordBaseURL:"http://onelook.com/?w="}},Pe.de.callback=e=>{const t=JSON.parse(e.text);return ze(t,Pe.de.opts)},Pe.th={alias:"th",name:"thesaurus",search:"https://www.onelook.com/thesaurus/?s=",compl:"https://api.datamuse.com/words?md=d&ml=%s",opts:{maxDefs:3,ellipsis:!0,wordBaseURL:"http://onelook.com/thesaurus/?s="}},Pe.th.callback=e=>{const t=JSON.parse(e.text);return ze(t,Pe.th.opts)},Pe.wp={alias:"wp",name:"wikipedia",search:"https://en.wikipedia.org/w/index.php?search=",compl:"https://en.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&prop=info|pageprops%7Cpageimages%7Cdescription&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=100&pilimit=6&inprop=url&gpssearch="},Pe.wp.callback=e=>Object.values(JSON.parse(e.text).query.pages).map((e=>{const t=e.thumbnail?e.thumbnail.source:Me;return Ae({url:e.fullurl})`
<div style="padding:5px;display:grid;grid-template-columns:60px 1fr;grid-gap:15px">
<img style="width:60px" src="${t}">
<div>
<div class="title"><strong>${e.title}</strong></div>
<div class="title">${e.description??""}</div>
</div>
</div>
`})),Pe.wa={alias:"wa",name:"wolframalpha",search:"http://www.wolframalpha.com/input/?i=",compl:`http://api.wolframalpha.com/v2/query?appid=${a.wolframalpha}&format=plaintext,image&output=json&reinterpret=true&input=%s`,priv:!0},Pe.wa.callback=(e,{query:t})=>{const n=JSON.parse(e.text).queryresult;if(n.error)return[Ae({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Error</strong> (Code ${n.error.code})</div>
<div class="title">${n.error.msg}</div>
</div>
`];if(!n.success)return n.tips?[Ae({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>No Results</strong></div>
<div class="title">${n.tips.text}</div>
</div>
`]:n.didyoumeans?n.didyoumeans.map((e=>Ae({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Did you mean...?</strong></div>
<div class="title">${e.val}</div>
</div>
`)):[Ae({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Error</strong></div>
<div class="title">An unknown error occurred.</div>
</div>
`];const r=[];return n.pods.forEach((e=>{const n={title:e.title,values:[],url:`http://www.wolframalpha.com/input/?i=${encodeURIComponent(t)}`};e.numsubpods>0&&(e.subpods[0].plaintext&&(n.url=encodeURIComponent(e.subpods[0].plaintext),n.copy=e.subpods[0].plaintext),e.subpods.forEach((e=>{let t="";e.title&&(t=Le`<strong>${e.title}</strong>: `),e.img?t=Le`
<div>${t}</div>
<div>
<img
src="${e.img.src}"
width="${e.img.width}"
height="${e.img.height}"
style="margin-top: 6px; padding: 12px; border-radius: 12px; background: white"
>
</div>
`:e.plaintext&&(t=`${t}${e.plaintext}`),t&&(t=Le`<div class="title">${t}</div>`),n.values.push(t)}))),n.values.length>0&&r.push(n)})),r.map((e=>Ae({url:e.url,copy:e.copy,query:e.query})`
<div>
<div class="title"><strong>${e.title}</strong></div>
${Re(e.values)}
</div>`))},Pe.go={alias:"go",name:"google",search:"https://www.google.com/search?q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&q="},Pe.go.callback=e=>JSON.parse(e.text)[1],Pe.gi={alias:"gi",name:"google-images",search:"https://www.google.com/search?tbm=isch&q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&ds=i&q=",callback:Pe.go.callback},Pe.ka={alias:"ka",name:"kagi",search:"https://kagi.com/search?q=",compl:"https://kagi.com/autosuggest?q=",callback:e=>JSON.parse(e.text).map((e=>{const t=new URL("https://kagi.com/search");return t.searchParams.append("q",e.t),e.goto&&(t.href=e.goto),Ae({url:t.href})`
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px">
<img style="width: 32px" src="${e.img?new URL(e.img,"https://kagi.com"):Me}" />
<div>
<div class="title"><strong>${e.t}</strong></div>
<div class="title">${e.txt??""}</div>
</div>
</div>
`}))},Pe.rs={alias:"rs",name:"docs.rs",search:"https://docs.rs/releases/search?query="},Pe.hx={alias:"hx",name:"hex",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hx&search="},Pe.hx.callback=e=>JSON.parse(e.text).map((e=>Ae({url:e.html_url})`
<div>
<div class="title">${e.repository}/<strong>${e.name}</strong></div>
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div>
<div>${e.meta?.description??""}</div>
</div>
`)),Pe.hd={alias:"hd",name:"hexdocs",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hd&search="},Pe.hd.callback=e=>JSON.parse(e.text).map((e=>Ae({url:`https://hexdocs.pm/${encodeURIComponent(e.name)}`})`
<div>
<div class="title">${e.repository}/<strong>${e.name}</strong></div>
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div>
<div>${e.meta?.description??""}</div>
</div>
`)),Pe.gg=Fe({alias:"gg",name:"golang",domain:"golang.org"}),Pe.gp={alias:"gp",name:"gopkg",search:"https://pkg.go.dev/search?q=htmlq&m=package",compl:"https://pkg.go.dev/search?q=",callback:e=>JSON.parse(e.text).Results.map((e=>{const t=new URL("https://pkg.go.dev");return t.searchParams.append("q",e.Name),Ae({url:t.href})`
<div>
<div class="title"><strong>${e.Name}</strong></div>
<div>${e.Synopsis}</div>
</div>
`}))},Pe.tw={alias:"tw",name:"twitter",search:"https://twitter.com/search?q=",compl:"https://twitter.com/i/search/typeahead.json?count=10&filters=true&q="},Pe.tw.callback=e=>JSON.parse(e.text).topics.map((e=>De(e.topic,{url:`https://twitter.com/search?q=${encodeURIComponent(e.topic)}`}))),Pe.no=Fe({alias:"no",name:"node",domain:"nodejs.org"}),Pe.md={alias:"md",name:"mdn",search:"https://developer.mozilla.org/en-US/search?q=",compl:"https://developer.mozilla.org/api/v1/search?q=",callback:e=>JSON.parse(e.text).documents.map((e=>De(`\n <div>\n <div class="title"><strong>${e.title}</strong></div>\n <div style="font-size:0.8em"><em>${e.slug}</em></div>\n <div>${e.summary}</div>\n </div>\n `,{url:`https://developer.mozilla.org/${e.locale}/docs/${e.slug}`})))},Pe.np={alias:"np",name:"npm",search:"https://www.npmjs.com/search?q=",compl:"https://api.npms.io/v2/search/suggestions?size=20&q=",favicon:Ne("https://www.npmjs.com")},Pe.np.callback=e=>JSON.parse(e.text).map((e=>{let t="",n="",r="",a="";return e.package.description&&(n=Ue(e.package.description)),e.score&&e.score.final&&(a=Math.round(5*Number(e.score.final)),r="⭐".repeat(a)+"☆".repeat(5-a)),e.flags&&Object.keys(e.flags).forEach((e=>{t+=`[<span style='color:#ff4d00'>⚑</span> ${Ue(e)}] `})),De(`\n <div>\n <style>.title>em { font-weight: bold; }</style>\n <div class="title">${e.highlight}</div>\n <div>\n <span style="font-size:1.5em;line-height:1em">${r}</span>\n <span>${t}</span>\n </div>\n <div>${n}</div>\n </div>\n `,{url:e.package.links.npm})})),Pe.ts={alias:"ts",name:"typescript",domain:"www.typescriptlang.org",search:"https://duckduckgo.com/?q=site%3Awww.typescriptlang.org+",compl:"https://bgcdyoiyz5-dsn.algolia.net/1/indexes/typescriptlang?x-algolia-application-id=BGCDYOIYZ5&x-algolia-api-key=37ee06fa68db6aef451a490df6df7c60&query=",favicon:"https://www.typescriptlang.org/favicon-32x32.png"},Pe.ts.callback=async e=>{const t=JSON.parse(e.text);return Object.entries(t.hits.reduce(((e,t)=>{const n=t.hierarchy.lvl0;return e[n]||(e[n]=[]),e[n].push(t),e}),{})).sort((([e],[t])=>e.localeCompare(t))).flatMap((([e,t])=>t.map((e=>{console.log(e);const t=e.type,n=Object.entries(e.hierarchy).reduce(((t,[n,r])=>r&&n!==e.type?`${t?t+" > ":""}${r}`:t),""),r=e.hierarchy[t],a=e.content;return Ae({url:e.url})`
<div>
<div style="font-weight: bold">
<span style="opacity: 0.6">${Ce(n)}${r?" > ":""}</span>
<span style="">${Ce(r)}</span>
</div>
<div>${Ce(a)}</div>
<div style="opacity: 0.6; line-height: 1.3em">${Ce(e.url)}</div>
</div>
`}))))},Pe.lb={alias:"lb",name:"lobsters",domain:"lobste.rs",search:"https://lobste.rs/search?what=comments&order=newest&q="},Pe.dt={alias:"dto",name:"DEV",domain:"dev.to",search:"https://dev.to/search&sort_by=published_at&sort_direction=desc&q="},Pe.rd={alias:"rd",name:"raindrop",domain:"app.raindrop.io",search:"https://api.raindrop.io/v1/raindrops/0?sort=-created&perpage=10&search=",callback:e=>JSON.parse(e.text).items.map((e=>{const t=e.title,n=e.link,r=new URL(n).hostname;return Ae({url:n})`
<div>
<div class="title"><strong>${t}</strong></div>
<div>${r}</div>
</div>
`}))},Pe.br={alias:"br",name:"brew",domain:"formulae.brew.sh",search:"https://formulae.brew.sh/search/",compl:"https://formulae.brew.sh/api/formula.json",favicon:"https://formulae.brew.sh/assets/img/homebrew-256x256.png",callback:e=>JSON.parse(e.text).map((e=>{const t=e.name,n=e.desc;return Ae({url:`https://formulae.brew.sh/formula/${e.name}`})`
<div>
<div class="title"><strong>${t}</strong></div>
<div>${n}</div>
</div>
`}))},Pe.hn={alias:"hn",name:"hackernews",domain:"news.ycombinator.com",search:"https://hn.algolia.com/?query=",compl:"https://hn.algolia.com/api/v1/search?tags=(story,comment)&query=",callback:e=>JSON.parse(e.text).hits.map((e=>{let t="",n="";switch(e.points&&(n+=`[↑${e.points}] `),e.num_comments&&(n+=`[↲${e.num_comments}] `),e._tags[0]){case"story":t=e.title;break;case"comment":t=e.comment_text;break;default:t=e.objectID}const r=`https://news.ycombinator.com/item?id=${encodeURIComponent(e.objectID)}`;return Ae({url:r})`
<div>
<div class="title">${n}${t}</div>
<div class="url">${r}</div>
</div>
`}))},Pe.lr={alias:"lr",name:"luarocks",domain:"luarocks.org",search:"https://luarocks.org/search?q="},Pe.re={alias:"re",name:"reddit",search:"https://www.reddit.com/search?sort=relevance&t=all&q=",compl:"https://api.reddit.com/search?syntax=plain&sort=relevance&limit=20&q="},Pe.re.thumbs={default:"https://i.imgur.com/VCm94xa.png",image:"https://i.imgur.com/OaAUUaQ.png",nsfw:"https://i.imgur.com/lnmJrXP.png",self:"https://i.imgur.com/KQ8uYZz.png",spoiler:"https://i.imgur.com/gx2tGsv.png"},Pe.re.callback=async(e,{query:t})=>{const[n,r,a,o=""]=t.match(/^\s*\/?(r\/[a-zA-Z0-9_]+)(\s+(.*))?/)??[null,null,null,t];if(r&&o)e={text:await qe(`https://api.reddit.com/${encodeURIComponent(r)}/search?syntax=plain&sort=relevance&restrict_sr=on&limit=20&q=${encodeURIComponent(o)}`)};else if(r){const e=await qe(`https://www.reddit.com/api/search_reddit_names.json?typeahead=true&exact=false&query=${encodeURIComponent(r)}`);return JSON.parse(e).names.map((e=>Ee(`r/${e}`,`https://reddit.com/r/${encodeURIComponent(e)}`,{query:`r/${e}`})))}return JSON.parse(e.text).data.children.map((({data:e})=>{const t=e.thumbnail?.match(/^https?:\/\//)?e.thumbnail:Pe.re.thumbs[e.thumbnail]??Pe.re.thumbs.default,n=Oe(new Date(1e3*parseInt(e.created,10)));return Ae({url:encodeURI(`https://reddit.com${e.permalink}`)})`
<div style="display: flex; flex-direction: row">
<img style="width: 70px; height: 50px; margin-right: 0.8em" alt="thumbnail" src="${t}">
<div>
<div>
<strong><span style="font-size: 1.2em; margin-right: 0.2em">↑</span>${e.score}</strong> ${e.title} <span style="font-size: 0.8em; opacity: 60%">(${e.domain})</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="color: opacity: 70%">r/${e.subreddit}</span> • <span style="color: opacity: 70%">${e.num_comments??"unknown"}</span> <span style="opacity: 60%">comments</span> • <span style="opacity: 60%">submitted ${n} by</span> <span style="color: opacity: 70%">${e.author}</span></span>
</div>
</div>
</div>
`}))},Pe.ol={alias:"ol",name:"OpenLibrary",domain:"openlibrary.org",search:"https://openlibrary.org/search?q=",compl:"https://openlibrary.org/search.json?q=",callback:e=>JSON.parse(e.text).docs.map((e=>{const t=e.author_name?.[0]??"unknown",n=e.title,r=e.first_publish_year??"unknown";return Ae({url:`https://openlibrary.org${e.key}`})`
<div>
<div class="title"><strong>${n}</strong></div>
<div class="title">${t} • ${r}</div>
</div>
`}))},Pe.devv={alias:"dvai",name:"devv.ai",domain:"devv.ai",search:"https://devv.ai/search/",favicon:"https://devv.ai/favicon.ico"},Pe.lf={alias:"lf",name:"logflare",domain:"logflare.app",search:"https://logflare.app/sources/9883/search?tailing%3F=true&querystring="},Pe.yt={alias:"yt",name:"youtube",search:"https://www.youtube.com/search?q=",compl:`https://www.googleapis.com/youtube/v3/search?maxResults=20&part=snippet&type=video,channel&key=${a.google_yt}&safeSearch=none&q=`,priv:!0},Pe.yt.callback=e=>JSON.parse(e.text).items.map((e=>{const t=e.snippet.thumbnails.default;switch(e.id.kind){case"youtube#channel":return Ae({url:`https://youtube.com/channel/${e.id.channelId}`})`
<div style="display: flex; flex-direction: row">
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}">
<div>
<div>
<strong>${e.snippet.channelTitle}</strong>
</div>
<div>
<span>${e.snippet.description}</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="opacity: 70%">channel</span></span>
</div>
</div>
</div>
`;case"youtube#video":const n=Oe(new Date(e.snippet.publishTime));return Ae({url:`https://youtu.be/${encodeURIComponent(e.id.videoId)}`})`
<div style="display: flex; flex-direction: row">
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}">
<div>
<div>
<strong>${Ce(e.snippet.title)}</strong>
</div>
<div>
<span>${Ce(e.snippet.description)}</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="opacity: 70%">video</span> <span style="opacity: 60%">by</span> <span style="opacity: 70%">${e.snippet.channelTitle}</span> • <span style="opacity: 70%">${n}</span></span>
</div>
</div>
</div>
`;default:return null}})).filter((e=>!!e));const Be={settings:{hintAlign:"left",hintCharacters:"qwertasdfgzxcvb",omnibarSuggestionTimeout:500,richHintsForKeystroke:1,defaultSearchEngine:"g",enableAutoFocus:!0,modeAfterYank:"Normal",smoothScroll:!0,tabsMRUOrder:!0,omnibarHistoryCacheSize:1e3,tabsThreshold:0,theme:'\n.sk_theme input {\n font-family: "Jetbrains Mono";\n}\n.sk_theme .url {\n font-size: 12px;\n}\n#sk_omnibarSearchResult li div.url {\n font-weight: normal;\n}\n.sk_theme .omnibar_timestamp {\n font-size: 9px;\n font-weight: bold;\n}\n#sk_omnibarSearchArea input {\n font-size: 12px;\n}\n.sk_theme .omnibar_visitcount {\n font-size: 13px;\n font-weight: bold;\n}\nbody {\n font-family: "Jetbrains Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n font-size: 12px;\n}\nkbd {\n font: 11px "Jetbrains Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n}\n#sk_omnibarSearchArea .prompt, #sk_omnibarSearchArea .resultPage {\n font-size: 12px;\n}\n.sk_theme {\n background: #282a36;\n color: #f8f8f2;\n}\n.sk_theme tbody {\n color: #ff5555;\n}\n.sk_theme input {\n color: #ffb86c;\n}\n.sk_theme .url {\n color: #6272a4;\n}\n#sk_omnibarSearchResult>ul>li {\n background: #282a36;\n}\n#sk_omnibarSearchResult ul li:nth-child(odd) {\n background: #282a36;\n}\n.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {\n background: #282a36;\n}\n.sk_theme .annotation {\n color: #6272a4;\n}\n.sk_theme .focused {\n background: #44475a !important;\n}\n.sk_theme kbd {\n background: #f8f8f2;\n color: #44475a;\n}\n.sk_theme .frame {\n background: #8178DE9E;\n}\n.sk_theme .omnibar_highlight {\n color: #8be9fd;\n}\n.sk_theme .omnibar_folder {\n color: #ff79c6;\n}\n.sk_theme .omnibar_timestamp {\n color: #bd93f9;\n}\n.sk_theme .omnibar_visitcount {\n color: #f1fa8c;\n}\n.sk_theme .prompt, .sk_theme .resultPage {\n color: #50fa7b;\n}\n.sk_theme .feature_name {\n color: #ff5555;\n}\n.sk_omnibar_middle #sk_omnibarSearchArea {\n border-bottom: 1px solid #282a36;\n}\n#sk_status {\n border: 1px solid #282a36;\n}\n#sk_richKeystroke {\n background: #282a36;\n box-shadow: 0px 2px 10px rgba(40, 42, 54, 0.8);\n}\n#sk_richKeystroke kbd>.candidates {\n color: #ff5555;\n}\n#sk_keystroke {\n background-color: #282a36;\n color: #f8f8f2;\n}\nkbd {\n border: solid 1px #f8f8f2;\n border-bottom-color: #f8f8f2;\n box-shadow: inset 0 -1px 0 #f8f8f2;\n}\n#sk_frame {\n border: 4px solid #ff5555;\n background: #8178DE9E;\n box-shadow: 0px 0px 10px #DA3C0DCC;\n}\n#sk_banner {\n border: 1px solid #8be9fd;\n background: rgb(139, 233, 253);\n}\ndiv.sk_tabs_bg {\n background: #f8f8f2;\n}\ndiv.sk_tab {\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6272a4), color-stop(100%,#44475a));\n}\ndiv.sk_tab_title {\n color: #f8f8f2;\n}\ndiv.sk_tab_url {\n color: #8be9fd;\n}\ndiv.sk_tab_hint {\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1fa8c), color-stop(100%,#ffb86c));\n color: #282a36;\n border: solid 1px #282a36;\n}\n#sk_bubble {\n border: 1px solid #f8f8f2;\n color: #282a36;\n background-color: #f8f8f2;\n}\n#sk_bubble * {\n color: #282a36 !important;\n}\ndiv.sk_arrow[dir=down]>div:nth-of-type(1) {\n border-top: 12px solid #f8f8f2;\n}\ndiv.sk_arrow[dir=up]>div:nth-of-type(1) {\n border-bottom: 12px solid #f8f8f2;\n}\ndiv.sk_arrow[dir=down]>div:nth-of-type(2) {\n border-top: 10px solid #f8f8f2;\n}\ndiv.sk_arrow[dir=up]>div:nth-of-type(2) {\n border-bottom: 10px solid #f8f8f2;\n}\n#sk_omnibar {\n width: 100%;\n left: 0%;\n}\n',blocklistPattern:/.* mail.google.com.*|jira\.*|(www\.overleaf\.com)|(act\.hoyoverse\.com)|outlook\.office(?:365|)\.com|fireship\.io |console\.aws\.amazon\.com | calendar\.google\.com |.* read.readwise.io.*|.* app.shortwave.com.*|.* omnivore\.app\/ home.*|.* docs\.google\.com.*|.* duolingo\.com.*|.*udemy\.com.*/i},keys:Te,searchEngines:Pe,siteleader:"<Space>",searchleader:"a",logLevels:["error"]},{categories:Ve}=ge,{mapkey:Ge,map:Je,unmap:We,Clipboard:Ke,Front:Ye,removeSearchAlias:Ze,addSearchAlias:Qe,Hints:Xe,Visual:et}=t,tt=(e,t,n)=>{const r=Object.entries(t).flatMap((([t,n])=>n.flatMap((n=>({[n]:e[t]}))))),a=Object.assign({},e,...r);Object.entries(a).forEach((([e,t])=>t.forEach((t=>((e,t,n)=>{const{alias:r,callback:a,leader:o=("global"===e?"":n),category:i=Ve.misc,description:s="",path:l="(/.*)?"}=t,c={},p=`${o}${r}`;if("global"!==e){const t=e.replace(".","\\.");c.domain=new RegExp(`^http(s)?://(([a-zA-Z0-9-_]+\\.)*)(${t})${l}`)}const d=`#${i} ${s}`;void 0!==t.map?Je(r,t.map):Ge(p,d,a,c)})(e,t,n)))))},nt=async()=>{if(window.surfingKeys=t,Be.settings&&Object.assign(settings,"function"==typeof Be.settings?Be.settings():Be.settings),Be.logLevels&&await chrome.storage.local.set({logLevels:Be.logLevels}),Be.keys&&Be.keys.unmaps){const{unmaps:e}=Be.keys;e.mappings&&e.mappings.forEach((e=>We(e))),e.searchAliases&&Object.entries(e.searchAliases).forEach((([e,t])=>{t.forEach((t=>Ze(t,e)))}))}var e,n;if(Be.searchEngines&&(e=Be.searchEngines,n=Be.searchleader??"o",Object.values(e).forEach((e=>{const t={favicon_url:e.favicon,skipMaps:!0};Qe(e.alias,e.name,e.search,"",e.compl,e.callback,void 0,t),Ge(`${n}${e.alias}`,`#8Search ${e.name}`,(()=>Ye.openOmnibar({type:"SearchEngine",extra:e.alias}))),Ge(`c${n}${e.alias}`,`#8Search ${e.name} with clipboard contents`,(()=>{Ke.read((t=>{Ye.openOmnibar({type:"SearchEngine",pref:t.data,extra:e.alias})}))}))}))),Be.keys&&Be.keys.maps){const{keys:e}=Be,{maps:t,aliases:n={}}=e;tt(t,n,Be.siteleader)}};"undefined"!=typeof window&&nt()})()})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment