1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,43602,49897,52239,87212,99127],{89511(_,y,i){_.exports=i(55882)},49897(_,y,i){"use strict";i.r(y),i.d(y,{del:()=>P,get:()=>A,head:()=>t,patch:()=>r,post:()=>e,put:()=>s});var u=i(91749),h=i.n(u),l=i(65303),f=i(17459),o=i.n(f),g=i(68636),I=i.n(g);const p=config.relative_path+"/api/v3";async function O(n,c){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:p+n.url,n.headers=n.headers||{},n.headers["x-return-to"]||(n.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof c=="function"){E(n).then(a=>c(null,a),a=>c(a));return}try{return await E(n)}catch(a){if(a.message===await f.translate("[[error:api.401]]",config.userLang)){const{url:d}=await(0,u.fire)("filter:admin.reauth",{url:"login"}),w=await f.translate("[[error:api.reauth-required]]",config.userLang);(0,l.confirm)(w,v=>{v&&(g.setItem("location-hash",window.location.hash),ajaxify.go(d))})}throw a}}async function E(n){const{url:c}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,u.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const a=await fetch(c,n),{headers:d}=a;if(d.get("x-redirect"))return E({url:d.get("x-redirect"),...n});const w=d.get("content-type"),v=w&&w.startsWith("application/json");let m;if(n.method!=="HEAD"&&(v?m=await a.json():m=await a.text()),!a.ok){if(m){const b=v&&(m.status?.message||m.error||""),C=typeof m=="string"?m:a.statusText||`[[error:api.${a.status}]]`;throw new Error(v&&b?b:C)}throw new Error(a.statusText)}return v&&m&&m.hasOwnProperty("status")&&m.hasOwnProperty("response")?m.response:m}function A(n,c,a){return O({url:n+(c&&Object.keys(c).length?"?"+$.param(c):"")},a)}function t(n,c,a){return O({url:n+(c&&Object.keys(c).length?"?"+$.param(c):""),method:"HEAD"},a)}function e(n,c,a,d){return D("POST",n,c,a,d)}function r(n,c,a,d){return D("PATCH",n,c,a,d)}function s(n,c,a,d){return D("PUT",n,c,a,d)}function P(n,c,a,d){return D("DELETE",n,c,a,d)}function D(n,c,a,d,w){return typeof d=="function"&&(w=d,d={}),O({url:c,method:n,data:a,headers:{"x-csrf-token":config.csrf_token,...d}},w)}},65303(_,y,i){"use strict";i.r(y),i.d(y,{alert:()=>g,confirm:()=>I,dialog:()=>o,prompt:()=>p,promptPassword:()=>O});var u=i(33530),h=i.n(u),l=i(17459),f=i.n(l);u.setDefaults({locale:config.userLang}),l.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{u.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),u.setLocale(config.userLang)});async function o(t){const[e,r,s]=await Promise.all([l.translate(t.title||""),E(t)||"",A(t.buttons)]);return u.dialog({...t,title:e,message:r,buttons:s})}async function g(t,e){const[r,s]=await Promise.all([t&&t.title?l.translate(t.title):null,E(t)]);return e=typeof e=="function"?e:t.callback,u.alert({...t,title:r,message:s,callback:e})}async function I(t,e){const[r,s]=await Promise.all([t&&t.title?l.translate(t.title):null,E(t)]);return e=typeof e=="function"?e:t.callback,u.confirm({...t,title:r,message:s,callback:e})}async function p(t,e){const[r,s]=await Promise.all([l.translate(typeof t=="string"?t:t.title),t&&t.message?E(t):null]);return e=typeof e=="function"?e:t.callback,u.prompt({...t,title:r,message:s,callback:e})}async function O(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{p({...t,inputType:"password",required:!0,value:"",callback:e})})}function E(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:l.translate(e||"")}async function A(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async r=>({...r,label:await l.translateKey(r.label)})))}},68636(_,y,i){"use strict";var u;u=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(o,g){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=g},h.prototype.getItem=function(o){return o=String(o),this._keys.indexOf(o)===-1?null:this._store[o]},h.prototype.removeItem=function(o){o=String(o),this._keys=this._keys.filter(function(g){return g!==o}),this._store[o]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(o){return o=parseInt(o,10)||0,this._keys[o]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let l;const f=Date.now().toString();try{if(l=window.localStorage,l.setItem(f,f),l.getItem(f)!==f)throw Error("localStorage behaved unexpectedly");return l.removeItem(f),l}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(l=window.sessionStorage,l.setItem(f,f),l.getItem(f)!==f)throw Error("sessionStorage behaved unexpectedly");return l.removeItem(f),l}catch(g){return console.warn(g),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(y,i,y,_),u!==void 0&&(_.exports=u)},55882(_,y,i){"use strict";var u,h;u=[i(49897),i(29930),i(91749)],h=(function(l,f,o){function g(t){if(!t)return"";const e=new Uint8Array(t);let r="";return e.forEach(P=>{r+=String.fromCharCode(P)}),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function I(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=e.length%4?"=".repeat(4-e.length%4):"",s=atob(e+r);return Uint8Array.from(s,P=>P.charCodeAt(0))}function p(t){return t instanceof Uint8Array?t:I(t)}function O(t){const e=JSON.parse(JSON.stringify(ajaxify.data.authnOptions||{}));e.challenge=I(e.challenge);const r=t||e.allowCredentials;return r&&(e.allowCredentials=r.map(s=>({...s,id:p(s.id)}))),e}function E(t){return{authResponse:{id:t.id,rawId:g(t.rawId),response:{authenticatorData:g(t.response.authenticatorData),clientDataJSON:g(t.response.clientDataJSON),signature:g(t.response.signature),userHandle:g(t.response.userHandle)},clientExtensionResults:t.getClientExtensionResults()}}}function A(t,e){l.post(`/plugins/2factor/authn/verify${document.location.search}`,t).then(({next:r})=>{e&&e(r)}
1).catch(r=>{f.error(r),ajaxify.refresh()})}return Plugin.verify=async(t,e)=>{const r=new AbortController;o.on("action:ajaxify.start",()=>{r.abort()});const s=O(t),P=await navigator.credentials.get({publicKey:s,signal:r.signal}),D=E(P);A(D,e)},Plugin.init=async()=>{const t=document.getElementById("deviceSelect"),e=document.getElementById("authBtn");if(t&&e)e.addEventListener("click",async()=>{const r=t.value;e.disabled=!0;try{await Plugin.verify([{id:r,type:"public-key"}],s=>{document.location=s})}catch(s){s.code!==20&&f.alert({title:"[[2factor:title]]",message:s.message,timeout:2500}),e.disabled=!1}});else try{await Plugin.verify(null,r=>{document.location=r})}catch(r){r.code!==20&&f.alert({title:"[[2factor:title]]",message:r.message,timeout:2500});const s=document.getElementById("statusIcon");s.classList.remove("fa-spinner"),s.classList.remove("fa-spin"),s.classList.add("fa-times"),s.classList.add("text-danger")}},Plugin}).apply(y,u),h!==void 0&&(_.exports=h)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.