site
Version:
Site Engine is the world's first all-in-one engine to build a modern web site, game, or blog. No HTML or CSS knowledge required.
1 lines • 1.44 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./shared.manifest"),e=a(require("urijs")),r=a(require("./client.main"));function a(t){return t&&t.__esModule?t:{default:t}}var s,o,n,l;exports.default=(s=Symbol(),o=Symbol(),n=Symbol(),l=Symbol(),class{constructor(e){(e=>(()=>{var r,a,u,i,c,h,d,f,y;r=e.name,a=e.grantType,u=e.username,i=e.scope,c=e.authorizationUri,(0,t.assert)("string"==typeof r&&1<=(h=r.length)&&h<=100),(0,t.assert)("code"===a),(0,t.assert)("string"==typeof u&&1<=(d=u.length)&&d<=500),void 0!==i&&(()=>(0,t.assert)("string"==typeof i&&1<=(f=i.trim().length)&&f<=1e3))(),(0,t.assert)("string"==typeof c&&1<=(y=c.length)&&y<=2e3&&c.startsWith("https:")),this[s]=r,this[o]=u,this[n]=i,this[l]=c})())(e)}getName(){return(()=>(()=>this[s])())()}requestAuthorization(){return(()=>(()=>{var a,s,u;return a=function(t,e,r,a){return t(e)[r](e,...a)}(t.dotDot_573300145710716007,crypto.getRandomValues(new Uint8Array(16)),"toHex",[]),r.default.localMeta.oAuthState=a,r.default.localMeta.oAuthFinalUri=location.href,r.default.localMeta.oAuthName=null,r.default.localMeta.oAuthAccessToken=null,r.default.localMeta.oAuthAttachment=null,r.default.saveLocalMeta(),(s=new e.default(this[l])).setQuery({response_type:"code"}),s.setQuery({client_id:this[o]}),!function(t){return null!=t}(this[n])||(()=>s.setQuery({scope:this[n]}))(),s.setQuery({state:a}),u=s.toString(),r.default.openLink(u)})())()}});