mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).doip=t()}}((function(){return function t(e,r,o){function s(n,a){if(!r[n]){if(!e[n]){var c="function"==typeof require&&require;if(!a&&c)return c(n,!0);if(i)return i(n,!0);var u=new Error("Cannot find module '"+n+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[n]={exports:{}};e[n][0].call(l.exports,(function(t){return s(e[n][1][t]||t)}),l,l.exports,t,e,r,o)}return r[n].exports}for(var i="function"==typeof require&&require,n=0;n<o.length;n++)s(o[n]);return s}({1:[function(t,e,r){"use strict";const o=t("./core");class s extends Error{constructor(t,...e){let r;super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,s),this.name="StatusError",this.message=t.statusMessage,this.statusCode=t.status,this.res=t,this.json=t.json.bind(t),this.text=t.text.bind(t),this.arrayBuffer=t.arrayBuffer.bind(t);Object.defineProperty(this,"responseBody",{get:()=>(r||(r=this.arrayBuffer()),r)}),this.headers={};for(const[e,r]of t.headers.entries())this.headers[e.toLowerCase()]=r}}e.exports=o(((t,e,r,o,i)=>async(n,a,c={})=>{n=i+(n||"");let u=new URL(n);if(o||(o={}),u.username&&(o.Authorization="Basic "+btoa(u.username+":"+u.password),u=new URL(u.protocol+"//"+u.host+u.pathname+u.search)),"https:"!==u.protocol&&"http:"!==u.protocol)throw new Error("Unknown protocol, "+u.protocol);if(a)if(a instanceof ArrayBuffer||ArrayBuffer.isView(a)||"string"==typeof a);else{if("object"!=typeof a)throw new Error("Unknown body type.");a=JSON.stringify(a),o["Content-Type"]="application/json"}c=new Headers({...o||{},...c});const l=await fetch(u,{method:e,headers:c,body:a});if(l.statusCode=l.status,!t.has(l.status))throw new s(l);return"json"===r?l.json():"buffer"===r?l.arrayBuffer():"string"===r?l.text():l}))},{"./core":2}],2:[function(t,e,r){"use strict";const o=new Set(["json","buffer","string"]);e.exports=t=>(...e)=>{const r=new Set;let s,i,n,a="";return e.forEach((t=>{if("string"==typeof t)if(t.toUpperCase()===t){if(s){throw new Error(`Can't set method to ${t}, already set to ${s}.`)}s=t}else if(t.startsWith("http:")||t.startsWith("https:"))a=t;else{if(!o.has(t))throw new Error("Unknown encoding, "+t);i=t}else if("number"==typeof t)r.add(t);else{if("object"!=typeof t)throw new Error("Unknown type: "+typeof t);if(Array.isArray(t)||t instanceof Set)t.forEach((t=>r.add(t)));else{if(n)throw new Error("Cannot set headers twice.");n=t}}})),s||(s="GET"),0===r.size&&r.add(200),t(r,s,i,n,a)}},{}],3:[function(t,e,r){},{}],4:[function(t,e,r){"use strict";e.exports=t=>{if("[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}},{}],5:[function(t,e,r){"use strict";const o=t("is-plain-obj"),{hasOwnProperty:s}=Object.prototype,{propertyIsEnumerable:i}=Object,n=(t,e,r)=>Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0}),a=this,c={concatArrays:!1,ignoreUndefined:!1},u=t=>{const e=[];for(const r in t)s.call(t,r)&&e.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(t);for(const o of r)i.call(t,o)&&e.push(o)}return e};function l(t){return Array.isArray(t)?function(t){const e=t.slice(0,0);return u(t).forEach((r=>{n(e,r,l(t[r]))})),e}(t):o(t)?function(t){const e=null===Object.getPrototypeOf(t)?Object.create(null):{};return u(t).forEach((r=>{n(e,r,l(t[r]))})),e}(t):t}const p=(t,e,r,o)=>(r.forEach((r=>{void 0===e[r]&&o.ignoreUndefined||(r in t&&t[r]!==Object.getPrototypeOf(t)?n(t,r,h(t[r],e[r],o)):n(t,r,l(e[r])))})),t);function h(t,e,r){return r.concatArrays&&Array.isArray(t)&&Array.isArray(e)?((t,e,r)=>{let o=t.slice(0,0),i=0;return[t,e].forEach((e=>{const a=[];for(let r=0;r<e.length;r++)s.call(e,r)&&(a.push(String(r)),n(o,i++,e===t?e[r]:l(e[r])));o=p(o,e,u(e).filter((t=>!a.includes(t))),r)})),o})(t,e,r):o(e)&&o(t)?p(t,e,u(e),r):l(e)}e.exports=function(...t){const e=h(l(c),this!==a&&this||{},c);let r={_:{}};for(const s of t)if(void 0!==s){if(!o(s))throw new TypeError("`"+s+"` is not an Option Object");r=h(r,{_:s},e)}return r._}},{"is-plain-obj":4}],6:[function(t,e,r){!function(t){"use strict";t.exports.is_uri=r,t.exports.is_http_uri=o,t.exports.is_https_uri=s,t.exports.is_web_uri=i,t.exports.isUri=r,t.exports.isHttpUri=o,t.exports.isHttpsUri=s,t.exports.isWebUri=i;var e=function(t){return t.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(t){if(t&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(t)&&!/%[^0-9a-f]/i.test(t)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(t)){var r,o,s,i,n,a="",c="";if(a=(r=e(t))[1],o=r[2],s=r[3],i=r[4],n=r[5],a&&a.length&&s.length>=0){if(o&&o.length){if(0!==s.length&&!/^\//.test(s))return}else if(/^\/\//.test(s))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(a.toLowerCase()))return c+=a+":",o&&o.length&&(c+="//"+o),c+=s,i&&i.length&&(c+="?"+i),n&&n.length&&(c+="#"+n),c}}}function o(t,o){if(r(t)){var s,i,n,a,c="",u="",l="",p="";if(c=(s=e(t))[1],u=s[2],i=s[3],n=s[4],a=s[5],c){if(o){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(l=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),p+=c+":",p+="//"+u,l&&(p+=l),p+=i,n&&n.length&&(p+="?"+n),a&&a.length&&(p+="#"+a),p}}}function s(t){return o(t,!0)}function i(t){return o(t)||s(t)}}(e)},{}],7:[function(t,e,r){const o=t("./utils"),s=(t,e,r,o,i)=>{let n;if(t.isVerified||!e)return t;if(Array.isArray(e))return e.forEach(((e,n)=>{t=s(t,e,r,o,i)})),t;if(0==r.length){switch(i){default:case"contains":n=new RegExp(o.replace("[","\\[").replace("]","\\]"),"gi"),t.isVerified=n.test(e.replace(/\r?\n|\r/,""));break;case"equals":t.isVerified=e.replace(/\r?\n|\r/,"").toLowerCase()==o.toLowerCase();break;case"oneOf":n=new RegExp(o,"gi"),t.isVerified=n.test(e.join("|"))}return t}try{r[0]}catch(e){return t.errors.push("err_data_structure_incorrect"),t}return t=s(t,e[r[0]],r.slice(1),o,i)};r.run=(t,e)=>{let r={isVerified:!1,errors:[]};switch(e.proof.format){case"json":r=s(r,t,e.claim.path,o.generateClaim(e.claim.fingerprint,e.claim.format),e.claim.relation);break;case"text":re=new RegExp(o.generateClaim(e.claim.fingerprint,e.claim.format),"gi"),r=re.test(t.replace(/\r?\n|\r/,""))}return r}},{"./utils":24}],8:[function(t,e,r){const o=t("merge-options"),s=t("valid-url"),i=t("./serviceproviders"),n=t("./claimVerification"),a=t("./utils");r.verify=async(t,e,r)=>{e||(e=null),r||(r={});if(r=o({returnMatchesOnly:!1,proxyPolicy:"adaptive",doipProxyHostname:"proxy.keyoxide.org"},r),!s.isUri(t))throw new Error("Not a valid URI");const a=i.match(t,r);if("returnMatchesOnly"in r&&r.returnMatchesOnly)return a;let c,u,l,p,h=!1,d=0;for(;!h&&d<a.length;)p=a[d],p.claim.fingerprint=e,u=null,l=p.customRequestHandler instanceof Function?await p.customRequestHandler(p,r):!p.proof.useProxy||"proxyPolicy"in r&&!r.useProxyWhenNeeded?await i.directRequestHandler(p,r):await i.proxyRequestHandler(p,r),l&&(c=n.run(l,p),0==c.errors.length&&(h=!0)),d++;return c||(c={isVerified:!1}),{isVerified:c.isVerified,serviceproviderData:p}},r.serviceproviders=i,r.claimVerification=n,r.utils=a},{"./claimVerification":7,"./serviceproviders":9,"./utils":24,"merge-options":5,"valid-url":6}],9:[function(t,e,r){const o=t("bent")("GET"),s=t("./utils"),i=["dns","xmpp","twitter","reddit","liberapay","hackernews","lobsters","devto","gitea","gitlab","github","mastodon","fediverse","discourse"],n={dns:t("./serviceproviders/dns"),xmpp:t("./serviceproviders/xmpp"),twitter:t("./serviceproviders/twitter"),reddit:t("./serviceproviders/reddit"),liberapay:t("./serviceproviders/liberapay"),hackernews:t("./serviceproviders/hackernews"),lobsters:t("./serviceproviders/lobsters"),devto:t("./serviceproviders/devto"),gitea:t("./serviceproviders/gitea"),gitlab:t("./serviceproviders/gitlab"),github:t("./serviceproviders/github"),mastodon:t("./serviceproviders/mastodon"),fediverse:t("./serviceproviders/fediverse"),discourse:t("./serviceproviders/discourse")};r.list=i,r.data=n,r.match=(t,e)=>{let r,o=[];return i.forEach(((s,i)=>{r=n[s],r.reURI.test(t)&&o.push(r.processURI(t,e))})),o},r.directRequestHandler=async(t,e)=>{const r=await o(t.proof.fetch?t.proof.fetch:t.proof.uri,null,{Accept:"application/json"});switch(t.proof.format){case"json":return await r.json();case"text":return await r.text();default:throw new Error("No specified proof data format")}},r.proxyRequestHandler=async(t,e)=>{const r=t.proof.fetch?t.proof.fetch:t.proof.uri,i=await o(s.generateProxyURL(t.proof.format,r,e),null,{Accept:"application/json"});return(await i.json()).content}},{"./serviceproviders/devto":10,"./serviceproviders/discourse":11,"./serviceproviders/dns":12,"./serviceproviders/fediverse":13,"./serviceproviders/gitea":14,"./serviceproviders/github":15,"./serviceproviders/gitlab":16,"./serviceproviders/hackernews":17,"./serviceproviders/liberapay":18,"./serviceproviders/lobsters":19,"./serviceproviders/mastodon":20,"./serviceproviders/reddit":21,"./serviceproviders/twitter":22,"./serviceproviders/xmpp":23,"./utils":24,bent:1}],10:[function(t,e,r){const o=/^https:\/\/dev\.to\/(.*)\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"devto"},profile:{display:r[1],uri:"https://dev.to/"+r[1],qr:null},proof:{uri:t,fetch:`https://dev.to/api/articles/${r[1]}/${r[2]}`,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"message",path:["body_markdown"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://dev.to/alice/post",shouldMatch:!0},{uri:"https://dev.to/alice/post/",shouldMatch:!0},{uri:"https://domain.org/alice/post",shouldMatch:!1}]},{}],11:[function(t,e,r){const o=/^https:\/\/(.*)\/u\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"discourse"},profile:{display:`${r[2]}@${r[1]}`,uri:t,qr:null},proof:{uri:t,fetch:`https://${r[1]}/u/${r[2]}.json`,useProxy:!0,format:"json"},claim:{fingerprint:null,format:"message",path:["user","bio_raw"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://domain.org/u/alice",shouldMatch:!0},{uri:"https://domain.org/u/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]},{}],12:[function(t,e,r){const o=t("dns"),s=t("bent")("GET"),i=t("../utils"),n=/^dns:([a-zA-Z0-9\.\-\_]*)(?:\?(.*))?/,a=async(t,e)=>{if("resolveTxt"in o){const e=async()=>new Promise(((e,r)=>{o.resolveTxt(t.profile.display,((t,o)=>{t&&r(t),e(o)}))}));return{hostname:t.profile.display,records:{txt:await e()}}}{const e=await s(t.proof.uri,null,{Accept:"application/json"});return await e.json()}};r.reURI=n,r.processURI=(t,e)=>{e||(e={});const r=t.match(n);return{serviceprovider:{type:"web",name:"dns"},profile:{display:r[1],uri:"https://"+r[1],qr:null},proof:{uri:i.generateProxyURL("dns",r[1]),fetch:null,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"uri",path:["records","txt"],relation:"contains"},customRequestHandler:a}},r.tests=[{uri:"dns:domain.org",shouldMatch:!0},{uri:"dns:domain.org?type=TXT",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]},{"../utils":24,bent:1,dns:3}],13:[function(t,e,r){const o=/^https:\/\/(.*)\/users\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"fediverse"},profile:{display:`@${r[2]}@${r[1]}`,uri:t,qr:null},proof:{uri:t,fetch:null,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"fingerprint",path:["summary"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://domain.org/users/alice",shouldMatch:!0},{uri:"https://domain.org/users/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]},{}],14:[function(t,e,r){const o=/^https:\/\/(.*)\/(.*)\/gitea_proof\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"gitea"},profile:{display:`${r[2]}@${r[1]}`,uri:`https://${r[1]}/${r[2]}`,qr:null},proof:{uri:t,fetch:`https://${r[1]}/api/v1/repos/${r[2]}/gitea_proof`,useProxy:!0,format:"json"},claim:{fingerprint:null,format:"message",path:["description"],relation:"equals"},customRequestHandler:null}},r.tests=[{uri:"https://domain.org/alice/gitea_proof",shouldMatch:!0},{uri:"https://domain.org/alice/gitea_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]},{}],15:[function(t,e,r){const o=/^https:\/\/gist\.github\.com\/(.*)\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"github"},profile:{display:r[1],uri:"https://github.com/"+r[1],qr:null},proof:{uri:t,fetch:"https://api.github.com/gists/"+r[2],useProxy:!1,format:"json"},claim:{fingerprint:null,format:"message",path:["files","openpgp.md","content"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://gist.github.com/Alice/123456789",shouldMatch:!0},{uri:"https://gist.github.com/Alice/123456789/",shouldMatch:!0},{uri:"https://domain.org/Alice/123456789",shouldMatch:!1}]},{}],16:[function(t,e,r){const o=t("bent")("GET"),s=/^https:\/\/(.*)\/(.*)\/gitlab_proof\/?/,i=async(t,e)=>{const r=t.proof.uri.match(s),i=`https://${r[1]}/api/v4/users?username=${r[2]}`,n=await o(i,"json",{Accept:"application/json"}),a=(await n.json()).find((t=>t.username===r[2]));if(!a)throw new Error("No user with username "+r[2]);const c=`https://${r[1]}/api/v4/users/${a.id}/projects`,u=await o(c,{},{Accept:"application/json"}),l=(await u.json()).find((t=>"gitlab_proof"===t.path));if(!l)throw new Error("No project at "+t.proof.uri);return l};r.reURI=s,r.processURI=(t,e)=>{e||(e={});const r=t.match(s);return{serviceprovider:{type:"web",name:"gitlab"},profile:{display:`${r[2]}@${r[1]}`,uri:`https://${r[1]}/${r[2]}`,qr:null},proof:{uri:t,fetch:null,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"message",path:["description"],relation:"equals"},customRequestHandler:i}},r.tests=[{uri:"https://gitlab.domain.org/alice/gitlab_proof",shouldMatch:!0},{uri:"https://gitlab.domain.org/alice/gitlab_proof/",shouldMatch:!0},{uri:"https://domain.org/alice/other_proof",shouldMatch:!1}]},{bent:1}],17:[function(t,e,r){const o=/^https:\/\/news\.ycombinator\.com\/user\?id=(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"hackernews"},profile:{display:r[1],uri:t,qr:null},proof:{uri:`https://hacker-news.firebaseio.com/v0/user/${r[1]}.json`,fetch:null,useProxy:!0,format:"json"},claim:{fingerprint:null,format:"uri",path:["about"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://news.ycombinator.com/user?id=Alice",shouldMatch:!0},{uri:"https://news.ycombinator.com/user?id=Alice/",shouldMatch:!0},{uri:"https://domain.org/user?id=Alice",shouldMatch:!1}]},{}],18:[function(t,e,r){const o=/^https:\/\/liberapay\.com\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"liberapay"},profile:{display:r[1],uri:t,qr:null},proof:{uri:t,fetch:`https://liberapay.com/${r[1]}/public.json`,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"message",path:["statements","content"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://liberapay.com/alice",shouldMatch:!0},{uri:"https://liberapay.com/alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]},{}],19:[function(t,e,r){const o=/^https:\/\/lobste\.rs\/u\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"lobsters"},profile:{display:r[1],uri:t,qr:null},proof:{uri:`https://lobste.rs/u/${r[1]}.json`,fetch:null,useProxy:!0,format:"json"},claim:{fingerprint:null,format:"message",path:["about"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://lobste.rs/u/Alice",shouldMatch:!0},{uri:"https://lobste.rs/u/Alice/",shouldMatch:!0},{uri:"https://domain.org/u/Alice",shouldMatch:!1}]},{}],20:[function(t,e,r){const o=/^https:\/\/(.*)\/@(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"mastodon"},profile:{display:`@${r[2]}@${r[1]}`,uri:t,qr:null},proof:{uri:t,fetch:null,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"fingerprint",path:["attachment","value"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://domain.org/@alice",shouldMatch:!0},{uri:"https://domain.org/@alice/",shouldMatch:!0},{uri:"https://domain.org/alice",shouldMatch:!1}]},{}],21:[function(t,e,r){const o=/^https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\/?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"reddit"},profile:{display:r[1],uri:"https://www.reddit.com/user/"+r[1],qr:null},proof:{uri:t,fetch:`https://www.reddit.com/user/${r[1]}/comments/${r[2]}.json`,useProxy:!0,format:"json"},claim:{fingerprint:null,format:"message",path:["data","children","data","selftext"],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://www.reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://www.reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post",shouldMatch:!0},{uri:"https://reddit.com/user/Alice/comments/123456/post/",shouldMatch:!0},{uri:"https://domain.org/user/Alice/comments/123456/post",shouldMatch:!1}]},{}],22:[function(t,e,r){const o=/^https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"web",name:"twitter"},profile:{display:"@"+r[1],uri:"https://twitter.com/"+r[1],qr:null},proof:{uri:t,fetch:`https://mobile.twitter.com/${r[1]}/status/${r[2]}`,useProxy:!1,format:"text"},claim:{fingerprint:null,format:"message",path:[],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"https://twitter.com/alice/status/1234567890123456789",shouldMatch:!0},{uri:"https://twitter.com/alice/status/1234567890123456789/",shouldMatch:!0},{uri:"https://domain.org/alice/status/1234567890123456789",shouldMatch:!1}]},{}],23:[function(t,e,r){const o=/^xmpp:([a-zA-Z0-9\.\-\_]*)@([a-zA-Z0-9\.\-\_]*)(?:\?(.*))?/;r.reURI=o,r.processURI=(t,e)=>{e||(e={});const r=t.match(o);return{serviceprovider:{type:"communication",name:"xmpp"},profile:{display:`${r[1]}@${r[2]}`,uri:t,qr:t},proof:{uri:"xmppVcardServerDomain"in e?`https://${e.xmppVcardServerDomain}/api/vcard/${r[1]}@${r[2]}/DESC`:null,fetch:null,useProxy:!1,format:"json"},claim:{fingerprint:null,format:"message",path:[],relation:"contains"},customRequestHandler:null}},r.tests=[{uri:"xmpp:alice@domain.org",shouldMatch:!0},{uri:"xmpp:alice@domain.org?omemo-sid-123456789=A1B2C3D4E5F6G7H8I9",shouldMatch:!0},{uri:"https://domain.org",shouldMatch:!1}]},{}],24:[function(t,e,r){r.generateProxyURL=(t,e,r)=>r&&r.doipProxyHostname?`https://${r.doipProxyHostname}/api/1/get/${t}/${encodeURIComponent(e)}`:null,r.generateClaim=(t,e)=>{switch(e){case"uri":return"openpgp4fpr:"+t;case"message":return`[Verifying my OpenPGP key: openpgp4fpr:${t}]`;case"fingerprint":return t;default:throw new Error("No valid claim format")}}},{}]},{},[8])(8)}));
|