1?"loop "+(t.loop-i)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",o)}t.loop=1}function gn(e,t){const n=t.stack,o=e?t.rp1:t.rp2,r=(e?t.z0:t.z1)[o],s=t.fv,a=t.pv,i=n.pop(),l=t.z2[t.contours[i]];let c=l;exports.DEBUG&&console.log(t.step,"SHC["+e+"]",i);const u=a.distance(r,r,!1,!0);do{c!==r&&s.setRelative(c,c,u,a),c=c.nextPointOnContour}while(c!==l)}function mn(e,t){const n=t.stack,o=e?t.rp1:t.rp2,r=(e?t.z0:t.z1)[o],s=t.fv,a=t.pv,i=n.pop();let l,c;switch(exports.DEBUG&&console.log(t.step,"SHZ["+e+"]",i),i){case 0:l=t.tZone;break;case 1:l=t.gZone;break;default:throw new Error("Invalid zone")}const u=a.distance(r,r,!1,!0),p=l.length-2;for(let e=0;e",i),t.stack.push(Math.round(64*i))}function xn(e,t){const n=t.stack,o=n.pop(),r=t.fv,s=t.pv,a=t.ppem,i=t.deltaBase+16*(e-1),l=t.deltaShift,c=t.z0;exports.DEBUG&&console.log(t.step,"DELTAP["+e+"]",o,n);for(let e=0;e>4)!==a)continue;let u=(15&o)-8;u>=0&&u++,exports.DEBUG&&console.log(t.step,"DELTAPFIX",e,"by",u*l);const p=c[e];r.setRelative(p,p,u*l,s)}}function Un(e,t){const n=t.stack,o=n.pop();exports.DEBUG&&console.log(t.step,"ROUND[]"),n.push(64*t.round(o/64))}function Tn(e,t){const n=t.stack,o=n.pop(),r=t.ppem,s=t.deltaBase+16*(e-1),a=t.deltaShift;exports.DEBUG&&console.log(t.step,"DELTAC["+e+"]",o,n);for(let e=0;e>4)!==r)continue;let i=(15&o)-8;i>=0&&i++;const l=i*a;exports.DEBUG&&console.log(t.step,"DELTACFIX",e,"by",l),t.cvt[e]+=l}}function En(e,t){const n=t.stack,o=n.pop(),r=n.pop(),s=t.z2[o],a=t.z1[r];let i,l;exports.DEBUG&&console.log("SDPVTL["+e+"]",o,r),e?(i=s.y-a.y,l=a.x-s.x):(i=a.x-s.x,l=a.y-s.y),t.dpv=Kt(i,l)}function On(e,t){const n=t.stack,o=t.prog;let r=t.ip;exports.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(let t=0;t=0?1:-1,m=Math.abs(m),e&&(v=s.cvt[i],o&&Math.abs(m-v)":"_")+(o?"R":"_")+(0===r?"Gr":1===r?"Bl":2===r?"Wh":"")+"]",e?i+"("+s.cvt[i]+","+v+")":"",l,"(d =",g,"->",y*m,")"),s.rp1=s.rp0,s.rp2=l,t&&(s.rp0=l)}function Rn(e){(e=e||{}).empty||(Nt(e.familyName,"When creating a new Font object, familyName is required."),Nt(e.styleName,"When creating a new Font object, styleName is required."),Nt(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Nt(e.ascender,"When creating a new Font object, ascender is required."),Nt(e.descender,"When creating a new Font object, descender is required."),Nt(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||e.familyName+e.styleName},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Ie.GlyphSet(this,e.glyphs||[]),this.encoding=new ve(this),this.substitution=new It(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new zt(this):void 0}})}function Dn(e,t){const n=JSON.stringify(e);let o=256;for(let e in t){let r=parseInt(e);if(r&&!(r<256)){if(JSON.stringify(t[e])===n)return r;o<=r&&(o=r+1)}}return t[o]=e,o}function Cn(e,t,n){const o=Dn(t.name,n);return[{name:"tag_"+e,type:"TAG",value:t.tag},{name:"minValue_"+e,type:"FIXED",value:t.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:t.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:t.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:o}]}function Ln(e,t,n){const o={},r=new pe.Parser(e,t);return o.tag=r.parseTag(),o.minValue=r.parseFixed(),o.defaultValue=r.parseFixed(),o.maxValue=r.parseFixed(),r.skip("uShort",1),o.name=n[r.parseUShort()]||{},o}function In(e,t,n,o){const r=[{name:"nameID_"+e,type:"USHORT",value:Dn(t.name,o)},{name:"flags_"+e,type:"USHORT",value:0}];for(let o=0;o2)return;const n=this.font;let o=this._prepState;if(!o||o.ppem!==t){let e=this._fpgmState;if(!e){nn.prototype=tn,e=this._fpgmState=new nn("fpgm",n.tables.fpgm),e.funcs=[],e.font=n,exports.DEBUG&&(console.log("---EXEC FPGM---"),e.step=-1);try{At(e)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}nn.prototype=e,o=this._prepState=new nn("prep",n.tables.prep),o.ppem=t;const r=n.tables.cvt;if(r){const e=o.cvt=new Array(r.length),s=t/n.unitsPerEm;for(let t=0;t1))try{return Ft(e,o)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}},Ft=function(e,t){const n=t.ppem/t.font.unitsPerEm,o=n;let r,s,a,i=e.components;if(nn.prototype=t,i){const l=t.font;s=[],r=[];for(let e=0;e1?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",a,r),o.setRelative(i,i,r),o.touch(i)}e.loop=1},function(e){const t=e.stack,n=e.rp1,o=e.rp2;let r=e.loop;const s=e.z0[n],a=e.z1[o],i=e.fv,l=e.dpv,c=e.z2;for(;r--;){const u=t.pop(),p=c[u];exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-r)+": ":"")+"IP[]",u,n,"<->",o),i.interpolate(p,s,a,l),i.touch(p)}e.loop=1},yn.bind(void 0,0),yn.bind(void 0,1),function(e){const t=e.stack,n=e.rp0,o=e.z0[n];let r=e.loop;const s=e.fv,a=e.pv,i=e.z1;for(;r--;){const n=t.pop(),l=i[n];exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-r)+": ":"")+"ALIGNRP[]",n),s.setRelative(l,o,0,a),s.touch(l)}e.loop=1},function(e){exports.DEBUG&&console.log(e.step,"RTDG[]"),e.round=qt},vn.bind(void 0,0),vn.bind(void 0,1),function(e){const t=e.prog;let n=e.ip;const o=e.stack,r=t[++n];exports.DEBUG&&console.log(e.step,"NPUSHB[]",r);for(let e=0;en?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"GTEQ[]",n,o),t.push(o>=n?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"EQ[]",n,o),t.push(n===o?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"NEQ[]",n,o),t.push(n!==o?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ODD[]",n),t.push(Math.trunc(n)%2?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"EVEN[]",n),t.push(Math.trunc(n)%2?0:1)},function(e){let t=e.stack.pop();exports.DEBUG&&console.log(e.step,"IF[]",t),t||(rn(e,!0),exports.DEBUG&&console.log(e.step,"EIF[]"))},function(e){exports.DEBUG&&console.log(e.step,"EIF[]")},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"AND[]",n,o),t.push(n&&o?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"OR[]",n,o),t.push(n||o?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"NOT[]",n),t.push(n?0:1)},xn.bind(void 0,1),function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"ADD[]",n,o),t.push(o+n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"SUB[]",n,o),t.push(o-n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"DIV[]",n,o),t.push(64*o/n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MUL[]",n,o),t.push(o*n/64)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ABS[]",n),t.push(Math.abs(n))},function(e){const t=e.stack;let n=t.pop();exports.DEBUG&&console.log(e.step,"NEG[]",n),t.push(-n)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"FLOOR[]",n),t.push(64*Math.floor(n/64))},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"CEILING[]",n),t.push(64*Math.ceil(n/64))},Un.bind(void 0,0),Un.bind(void 0,1),Un.bind(void 0,2),Un.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"WCVTF[]",n,o),e.cvt[o]=n*e.ppem/e.font.unitsPerEm},xn.bind(void 0,2),xn.bind(void 0,3),Tn.bind(void 0,1),Tn.bind(void 0,2),Tn.bind(void 0,3),function(e){let t,n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SROUND[]",n),e.round=Yt,192&n){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*t},function(e){let t,n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"S45ROUND[]",n),e.round=Yt,192&n){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*t},void 0,void 0,function(e){exports.DEBUG&&console.log(e.step,"ROFF[]"),e.round=_t},void 0,function(e){exports.DEBUG&&console.log(e.step,"RUTG[]"),e.round=Vt},function(e){exports.DEBUG&&console.log(e.step,"RDTG[]"),e.round=jt},pn,pn,void 0,void 0,void 0,void 0,void 0,function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SCANCTRL[]",t)},En.bind(void 0,0),En.bind(void 0,1),function(e){const t=e.stack,n=t.pop();let o=0;exports.DEBUG&&console.log(e.step,"GETINFO[]",n),1&n&&(o=35),32&n&&(o|=4096),t.push(o)},void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop(),r=t.pop();exports.DEBUG&&console.log(e.step,"ROLL[]"),t.push(o),t.push(n),t.push(r)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MAX[]",n,o),t.push(Math.max(o,n))},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MIN[]",n,o),t.push(Math.min(o,n))},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SCANTYPE[]",t)},function(e){const t=e.stack.pop();let n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"INSTCTRL[]",t,n),t){case 1:return void(e.inhibitGridFit=!!n);case 2:return void(e.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,On.bind(void 0,1),On.bind(void 0,2),On.bind(void 0,3),On.bind(void 0,4),On.bind(void 0,5),On.bind(void 0,6),On.bind(void 0,7),On.bind(void 0,8),wn.bind(void 0,1),wn.bind(void 0,2),wn.bind(void 0,3),wn.bind(void 0,4),wn.bind(void 0,5),wn.bind(void 0,6),wn.bind(void 0,7),wn.bind(void 0,8),kn.bind(void 0,0,0,0,0,0),kn.bind(void 0,0,0,0,0,1),kn.bind(void 0,0,0,0,0,2),kn.bind(void 0,0,0,0,0,3),kn.bind(void 0,0,0,0,1,0),kn.bind(void 0,0,0,0,1,1),kn.bind(void 0,0,0,0,1,2),kn.bind(void 0,0,0,0,1,3),kn.bind(void 0,0,0,1,0,0),kn.bind(void 0,0,0,1,0,1),kn.bind(void 0,0,0,1,0,2),kn.bind(void 0,0,0,1,0,3),kn.bind(void 0,0,0,1,1,0),kn.bind(void 0,0,0,1,1,1),kn.bind(void 0,0,0,1,1,2),kn.bind(void 0,0,0,1,1,3),kn.bind(void 0,0,1,0,0,0),kn.bind(void 0,0,1,0,0,1),kn.bind(void 0,0,1,0,0,2),kn.bind(void 0,0,1,0,0,3),kn.bind(void 0,0,1,0,1,0),kn.bind(void 0,0,1,0,1,1),kn.bind(void 0,0,1,0,1,2),kn.bind(void 0,0,1,0,1,3),kn.bind(void 0,0,1,1,0,0),kn.bind(void 0,0,1,1,0,1),kn.bind(void 0,0,1,1,0,2),kn.bind(void 0,0,1,1,0,3),kn.bind(void 0,0,1,1,1,0),kn.bind(void 0,0,1,1,1,1),kn.bind(void 0,0,1,1,1,2),kn.bind(void 0,0,1,1,1,3),kn.bind(void 0,1,0,0,0,0),kn.bind(void 0,1,0,0,0,1),kn.bind(void 0,1,0,0,0,2),kn.bind(void 0,1,0,0,0,3),kn.bind(void 0,1,0,0,1,0),kn.bind(void 0,1,0,0,1,1),kn.bind(void 0,1,0,0,1,2),kn.bind(void 0,1,0,0,1,3),kn.bind(void 0,1,0,1,0,0),kn.bind(void 0,1,0,1,0,1),kn.bind(void 0,1,0,1,0,2),kn.bind(void 0,1,0,1,0,3),kn.bind(void 0,1,0,1,1,0),kn.bind(void 0,1,0,1,1,1),kn.bind(void 0,1,0,1,1,2),kn.bind(void 0,1,0,1,1,3),kn.bind(void 0,1,1,0,0,0),kn.bind(void 0,1,1,0,0,1),kn.bind(void 0,1,1,0,0,2),kn.bind(void 0,1,1,0,0,3),kn.bind(void 0,1,1,0,1,0),kn.bind(void 0,1,1,0,1,1),kn.bind(void 0,1,1,0,1,2),kn.bind(void 0,1,1,0,1,3),kn.bind(void 0,1,1,1,0,0),kn.bind(void 0,1,1,1,0,1),kn.bind(void 0,1,1,1,0,2),kn.bind(void 0,1,1,1,0,3),kn.bind(void 0,1,1,1,1,0),kn.bind(void 0,1,1,1,1,1),kn.bind(void 0,1,1,1,1,2),kn.bind(void 0,1,1,1,1,3)],Rn.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},Rn.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},Rn.prototype.charToGlyph=function(e){const t=this.charToGlyphIndex(e);let n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},Rn.prototype.stringToGlyphs=function(e,t){t=t||this.defaultRenderOptions;const n=[];for(let t=0;t>1;e1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");const n=255&e.parseUShort();if(e.skip("uShort"),0===n){const n=e.parseUShort();e.skip("uShort",3);for(let o=0;o{const t=jn.loadSync(e);Qn.font=t,Qn.ascender=t.ascender,Qn.descender=t.descender}};const Kn=$n.options,Jn=function(e,t){return Math.round(e+Math.random()*(t-e))};const eo=function(e,t){return{text:(e+t).toString(),equation:e+"+"+t}},to=function(e,t){return{text:(e-t).toString(),equation:e+"-"+t}};function no(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}var oo={int:Jn,greyColor:function(e,t){const n=Jn(e=e||1,t=t||9).toString(16);return`#${n}${n}${n}`},captchaText:function(e){"number"==typeof e&&(e={size:e});const t=(e=e||{}).size||4,n=e.ignoreChars||"";let o=-1,r="",s=e.charPreset||Kn.charPreset;n&&(s=function(e,t){return e.split("").filter(e=>-1===t.indexOf(e))}(s,n));const a=s.length-1;for(;++o>16,o=t>>8&255,r=255&t,s=Math.max(n,o,r),a=Math.min(n,o,r);return(s+a)/510}(e):1;let r,s;o>=.5?(r=Math.round(100*o)-45,s=Math.round(100*o)-25):(r=Math.round(100*o)+25,s=Math.round(100*o)+45);const a=Jn(r,s)/100,i=a<.5?a*(a+n):a+n-a*n,l=2*a-i,c=Math.floor(255*no(l,i,t+1/3)),u=Math.floor(255*no(l,i,t));return"#"+(Math.floor(255*no(l,i,t-1/3))|u<<8|c<<16|1<<24).toString(16).slice(1)}};const ro=$n.options,so=function(e,t){e=e||oo.captchaText();const n=(t=Object.assign({},ro,t)).width,o=t.height,r=t.background||t.backgroundColor;r&&(t.color=!0);const s=r?``:"",a=[].concat(function(e,t,n){const o=n.color,r=[],s=n.inverse?7:1,a=n.inverse?15:9;let i=-1;for(;++i`)}return r}(n,o,t)).concat(function(e,t,n,o,r){const s=e.length,a=(t-2)/(s+1),i=o.inverse?10:0,l=o.inverse?14:4;let u=-1;const p=[],h=r||o.color?oo.color(o.background):oo.greyColor(i,l);for(;++u`)}return p}(e,n,o,t)).sort(()=>Math.random()-.5).join("");return`${``};var ao=so,io=oo.captchaText,lo=function(e){const t=e.text||oo.captchaText(e);return{text:t,data:so(t,e)}},co=function(e){const t=oo.mathExpr(e.mathMin,e.mathMax,e.mathOperator);return{text:t.text,data:so(t.equation,e)}},uo=ro,po=$n.loadFont;ao.randomText=io,ao.create=lo,ao.createMathExpr=co,ao.options=uo,ao.loadFont=po;var ho=ao;const fo=Object.prototype.toString;function go(e){return"[object Object]"===fo.call(e)}function mo(){"development"===process.env.NODE_ENV&&console.log(...arguments)}const yo=async function(){};function vo(e){return yo.constructor===e.constructor?async function(){const t=await e.apply(this,arguments);return go(t)&&(t.msg&&(t.message=t.msg,t.errMsg=t.msg),0===t.code?t.errCode=t.code:t.errCode=s[t.code]||t.code),t}:function(){const t=e.apply(this,arguments);return go(t)&&(t.msg&&(t.message=t.msg,t.errMsg=t.msg),0===t.code?t.errCode=t.code:t.errCode=s[t.code]||t.code),t}}const bo=uniCloud.database(),So=bo.collection("opendb-verify-codes");class xo{async setVerifyCode({clientIP:e,deviceId:t,code:n,expiresDate:o,scene:r}){if(!t)return{code:10101,msg:"deviceId不可为空"};if(!n)return{code:10102,msg:"验证码不可为空"};o||(o=180);const s=Date.now(),a={device_uuid:t,scene:r,code:n.toLocaleLowerCase(),state:0,ip:e,created_date:s,expired_date:s+1e3*o};return mo("addRes",await So.add(a)),{code:0,deviceId:t}}async verifyCode({deviceId:e,code:t,scene:n}){if(!e)return{code:10101,msg:"deviceId不可为空"};if(!t)return{code:10102,msg:"验证码不可为空"};const o=Date.now(),r={device_uuid:e,scene:n,code:t.toLocaleLowerCase(),state:0},s=await So.where(r).orderBy("created_date","desc").limit(1).get();if(mo("verifyRecord:",s),s&&s.data&&s.data.length>0){const e=s.data[0];if(e.expired_date{e.scene&&delete e.scene,this.pluginConfig.scene[n]=Object.assign({},t,e[n])})}}}{constructor(){super(),this.DEVICEID2opts={}}mergeConfig(e){const t=go(this.pluginConfig.scene)?this.pluginConfig.scene[e.scene]:e.scene;return Object.assign({},go(t)?t:this.pluginConfig,e)}async create(e={}){if(!e.scene)throw new Error("scene验证码场景不可为空");e=this.mergeConfig(e);let{scene:t,expiresDate:n,deviceId:o,clientIP:r,...s}=e;if(o=o||__ctx__.DEVICEID,r=r||__ctx__.CLIENTIP,!o)throw new Error("deviceId不可为空");const a=new xo;try{const{text:i,base64:l}=function(e={}){const{uniPlatform:t=""}=e;let n;n=e.mathExpr?ho.createMathExpr(e):ho.create(e);let o="data:image/svg+xml;utf8,"+n.data.replace(/#/g,"%23");return(!t||["mp-toutiao","h5","web","app","app-plus"].indexOf(t)>-1)&&(o=o.replace(/"/g,"'").replace(//g,"%3E")),{text:n.text,base64:o}}(s),c=await a.setVerifyCode({clientIP:r,deviceId:o,code:i,expiresDate:n,scene:t});return c.code>0?{...c,code:10001}:(this.DEVICEID2opts[o]=e,{code:0,msg:"验证码获取成功",captchaBase64:l})}catch(e){return{code:10001,msg:"验证码生成失败:"+e.message}}}async verify({deviceId:e,captcha:t,scene:n}){if(!(e=e||__ctx__.DEVICEID))throw new Error("deviceId不可为空");if(!n)throw new Error("scene验证码场景不可为空");const o=new xo;try{const r=await o.verifyCode({deviceId:e,code:t,scene:n});return r.code>0?r:{code:0,msg:"验证码通过"}}catch(e){return{code:10002,msg:"验证码校验失败:"+e.message}}}async refresh(e={}){let{scene:t,expiresDate:n,deviceId:o,...r}=e;if(o=o||__ctx__.DEVICEID,!o)throw new Error("deviceId不可为空");if(!t)throw new Error("scene验证码场景不可为空");const s=await So.where(bo.command.or([{device_uuid:o,scene:t},{deviceId:o,scene:t}])).orderBy("created_date","desc").limit(1).get();if(s&&s.data&&s.data.length>0){const e=s.data[0];await So.doc(e._id).update({state:2}),Object.keys(r).length>0&&(this.DEVICEID2opts[o]=Object.assign({},this.DEVICEID2opts[o],r));let a={};try{a=await this.create(Object.assign({},this.DEVICEID2opts[o],{deviceId:o,scene:t,expiresDate:n}))}catch(e){return{code:50403,msg:e.message}}return a.code>0?{...a,code:50403}:{code:0,msg:"验证码刷新成功",captchaBase64:a.captchaBase64}}return{code:10003,msg:`验证码刷新失败:无此设备在 ${t} 场景信息,请重新获取`}}}const Eo=new xo;Object.keys(Eo).forEach(e=>{To.prototype[e]=vo(Eo[e])});const Oo=new To,wo=new Proxy(Oo,{get(e,t){if(t in e)return"function"==typeof e[t]?vo(e[t]).bind(wo):e[t]}});module.exports=wo;
diff --git a/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/node_modules/uni-config-center/index.js b/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/node_modules/uni-config-center/index.js
new file mode 100644
index 0000000..00ba62f
--- /dev/null
+++ b/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/node_modules/uni-config-center/index.js
@@ -0,0 +1 @@
+"use strict";var t=require("fs"),r=require("path");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),o=e(r),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var u=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t,r){var e="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof i&&i&&i.Object===Object&&i,h="object"==typeof self&&self&&self.Object===Object&&self,p=l||h||Function("return this")(),_=r&&!r.nodeType&&r,v=_&&t&&!t.nodeType&&t,d=v&&v.exports===_,y=d&&l.process,g=function(){try{var t=v&&v.require&&v.require("util").types;return t||y&&y.binding&&y.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var w,O,m,A=Array.prototype,z=Function.prototype,M=Object.prototype,x=p["__core-js_shared__"],C=z.toString,F=M.hasOwnProperty,U=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",S=M.toString,I=C.call(Object),P=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=d?p.Buffer:void 0,q=p.Symbol,E=p.Uint8Array,$=T?T.allocUnsafe:void 0,D=(O=Object.getPrototypeOf,m=Object,function(t){return O(m(t))}),k=Object.create,B=M.propertyIsEnumerable,N=A.splice,L=q?q.toStringTag:void 0,R=function(){try{var t=vt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=T?T.isBuffer:void 0,V=Math.max,W=Date.now,H=vt(p,"Map"),J=vt(Object,"create"),K=function(){function t(){}return function(r){if(!xt(r))return{};if(k)return k(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1},X.prototype.set=function(t,r){var e=this.__data__,n=nt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(H||X),string:new Q}},Y.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},Y.prototype.get=function(t){return _t(this,t).get(t)},Y.prototype.has=function(t){return _t(this,t).has(t)},Y.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,r){var e=this.__data__;if(e instanceof X){var n=e.__data__;if(!H||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Y(n)}return e.set(t,r),this.size=e.size,this};var it,ut=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[it?u:++n];if(!1===r(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=F.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=S.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return S.call(t)}(t)}function at(t){return Ct(t)&&ct(t)==o}function ft(t){return!(!xt(t)||function(t){return!!U&&U in t}(t))&&(zt(t)?P:a).test(function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=yt(t),e=[];for(var n in t)("constructor"!=n||!r&&F.call(t,n))&&e.push(n);return e}function lt(t,r,e,n,o){t!==r&&ut(r,(function(i,u){if(o||(o=new Z),xt(i))!function(t,r,e,n,o,i,u){var a=gt(t,e),f=gt(r,e),s=u.get(f);if(s)return void rt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,h=void 0===l;if(h){var p=Ot(f),_=!p&&At(f),v=!p&&!_&&Ft(f);l=f,p||_||v?Ot(a)?l=a:Ct(j=a)&&mt(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function jt(t,r){return t===r||t!=t&&r!=r}var wt=at(function(){return arguments}())?at:function(t){return Ct(t)&&F.call(t,"callee")&&!B.call(t,"callee")},Ot=Array.isArray;function mt(t){return null!=t&&Mt(t.length)&&!zt(t)}var At=G||function(){return!1};function zt(t){if(!xt(t))return!1;var r=ct(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function Ct(t){return null!=t&&"object"==typeof t}var Ft=b?function(t){return function(r){return t(r)}}(b):function(t){return Ct(t)&&Mt(t.length)&&!!s[ct(t)]};function Ut(t){return mt(t)?tt(t,!0):st(t)}var St,It=(St=function(t,r,e){lt(t,r,e)},ht((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=St.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?mt(e)&&dt(r,e.length):"string"==n&&r in e)&&jt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++ec.call(t,r);class f{constructor({pluginId:t,defaultConfig:r={},customMerge:e,root:n}){this.pluginId=t,this.defaultConfig=r,this.pluginConfigPath=o.default.resolve(n||__dirname,t),this.customMerge=e,this._config=void 0}resolve(t){return o.default.resolve(this.pluginConfigPath,t)}hasFile(t){return n.default.existsSync(this.resolve(t))}requireFile(t){try{return require(this.resolve(t))}catch(t){if("MODULE_NOT_FOUND"===t.code)return;throw t}}_getUserConfig(){return this.requireFile("config.json")}config(t,r){if(!this._config){const t=this._getUserConfig();this._config=Array.isArray(t)?t:(this.customMerge||u)(this.defaultConfig,t)}let e=this._config;return t?function(t,r,e){if("number"==typeof r)return t[r];if("symbol"==typeof r)return a(t,r)?t[r]:e;const n="string"!=typeof(o=r)?o:o.split(".").reduce(((t,r)=>(r.split(/\[([^}]+)\]/g).forEach((r=>r&&t.push(r))),t)),[]);var o;let i=t;for(let t=0;t uni-config-center
+ return await uniCaptcha[action]({
+ scene, //来源客户端传递,表示:使用场景值,用于防止不同功能的验证码混用
+ uniPlatform: platform
+ })
+ }
+}
diff --git a/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package-lock.json b/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package-lock.json
new file mode 100644
index 0000000..45dadb2
--- /dev/null
+++ b/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package-lock.json
@@ -0,0 +1,4 @@
+{
+ "name": "uni-captcha-co",
+ "lockfileVersion": 1
+}
diff --git a/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package.json b/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package.json
new file mode 100644
index 0000000..b5188c3
--- /dev/null
+++ b/uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "uni-captcha-co",
+ "dependencies": {
+ "uni-captcha": "file:../common/uni-captcha",
+ "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
+ },
+ "extensions": {
+ "uni-cloud-jql": {}
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/index.js b/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/index.js
new file mode 100644
index 0000000..da9a36c
--- /dev/null
+++ b/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/index.js
@@ -0,0 +1 @@
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("crypto"),t=require("path");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("fs");var o=s(e),n=s(t);const i="uni-cloud-s2s",r={code:5e4,message:"Config error"},c={code:51e3,message:"Access denied"};class a extends Error{constructor(e){super(e.message),this.errMsg=e.message||"",this.code=this.errCode=e.code,this.errSubject=e.subject,this.forceReturn=e.forceReturn||!1,this.cause=e.cause,Object.defineProperties(this,{message:{get(){return this.errMsg},set(e){this.errMsg=e}}})}toJSON(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJSON?this.cause.toJSON(e):this.cause}}}const d=Object.prototype.toString;const h=50002,u=Object.create(null);["string","boolean","number","null"].forEach((e=>{u[e]=function(t,s){if(function(e){return d.call(e).slice(8,-1).toLowerCase()}(t)!==e)return{code:h,message:`${s} is invalid`}}}));const f="Unicloud-S2s-Authorization";class g{constructor(e){const{config:t}=e||{};this.config=t;const{connectCode:s}=t||{};if(this.connectCode=s,!s||"string"!=typeof s)throw new a({subject:i,code:r.code,message:"Invalid connectCode in config"})}getHeadersValue(e={},t,s){const o=Object.keys(e||{}).find((e=>e.toLowerCase()===t.toLowerCase()));return o?e[o]:s}verifyHttpInfo(e){const t=this.getHeadersValue(e.headers,f,""),[s="",o=""]=t.split(" ");if(s.toLowerCase()==="CONNECTCODE".toLowerCase()&&o===this.config.connectCode)return!0;throw new a({subject:i,code:c.code,message:`Invalid CONNECTCODE in headers['${f}']`})}getSecureHeaders(e){return{[f]:`CONNECTCODE ${this.config.connectCode}`}}}function l(e){return function(t){const{content:s,signKey:n}=t||{};return o.default.createHash(e).update(s+"\n"+n).digest("hex")}}const p={md5:l("md5"),sha1:l("sha1"),sha256:l("md5"),"hmac-sha256":function(e){const{content:t,signKey:s}=e||{};return o.default.createHmac("sha256",s).update(t).digest("hex")}};function m(e){const{timestamp:t,data:s={},signKey:o,hashMethod:n="hmac-sha256"}=e||{},i=p[n],r=["number","string","boolean"],c=Object.keys(s).sort(),a=[];for(let e=0;ee.toLowerCase()===t.toLowerCase()));return o?e[o]:s}getHttpData(e){const t=e.httpMethod.toLowerCase(),s=this.getHttpHeaders(e),o=this.getHeadersValue(s,"Content-Type","");if("get"===t)return e.queryStringParameters;if("post"!==t)throw new a({subject:i,code:c.code,message:`Invalid http method, expected "POST" or "get", got "${t}"`});if(0===o.indexOf("application/json"))return JSON.parse(e.body);if(0===o.indexOf("application/x-www-form-urlencoded"))return require("querystring").parse(e.body);throw new a({subject:i,code:c.code,message:`Invalid content type of POST method, expected "application/json" or "application/x-www-form-urlencoded", got "${o}"`})}verifyHttpInfo(e){const t=e.headers||{},s=this.getHeadersValue(t,"Unicloud-S2s-Timestamp","0");let[o,n]=this.getHeadersValue(t,"Unicloud-S2s-Signature","").split(" ");if(o=o.toLowerCase(),o!==this.hashMethod)throw new a({subject:i,code:c.code,message:`Invalid hash method, expected "${this.hashMethod}", got "${o}"`});const r=parseInt(s),d=Date.now();if(Math.abs(d-r)>1e3*this.timeDiffTolerance)throw new a({subject:i,code:c.code,message:`Invalid timestamp, server timestamp is ${d}, ${r} exceed max timeDiffTolerance(${this.timeDiffTolerance} seconds)`});return m({timestamp:r,data:this.getHttpData(e),signKey:this.signKey,hashMethod:this.hashMethod})===n}getSecureHeaders(e){const{data:t}=e||{},s=Date.now(),o=m({timestamp:s,data:t,signKey:this.signKey,hashMethod:this.hashMethod});return{"Unicloud-S2s-Timestamp":s+"","Unicloud-S2s-Signature":this.hashMethod+" "+o}}}const y=require("uni-config-center")({pluginId:i});class b{constructor(){this.config=y.config();const e=n.default.resolve(require.resolve("uni-config-center"),i,"config.json");if(!this.config)throw new a({subject:i,code:r.code,message:`${i} config required, please check your config file: ${e}`});if("connectCode"===this.config.type)this.verifier=new g({config:this.config});else{if(!function(e){return"sign"===e.type}(this.config))throw new a({subject:i,code:r.code,message:`Invalid ${i} config, expected policy is "code" or "sign", got ${this.config.policy}`});this.verifier=new w({config:this.config})}}verifyHttpInfo(e){if(!e)throw new a({subject:i,code:c.code,message:"Access denied, httpInfo required"});return this.verifier.verifyHttpInfo(e)}getSecureHeaders(e){return this.verifier.getSecureHeaders(e)}}exports.getSecureHeaders=function(e){return(new b).getSecureHeaders(e)},exports.verifyHttpInfo=function(e){const t=(new b).verifyHttpInfo(e);if(!t)throw new a({subject:i,code:c.code,message:c.message});return t};
diff --git a/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/node_modules/uni-config-center/index.js b/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/node_modules/uni-config-center/index.js
new file mode 100644
index 0000000..00ba62f
--- /dev/null
+++ b/uni_modules/uni-cloud-s2s/uniCloud/cloudfunctions/common/uni-cloud-s2s/node_modules/uni-config-center/index.js
@@ -0,0 +1 @@
+"use strict";var t=require("fs"),r=require("path");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),o=e(r),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var u=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t,r){var e="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof i&&i&&i.Object===Object&&i,h="object"==typeof self&&self&&self.Object===Object&&self,p=l||h||Function("return this")(),_=r&&!r.nodeType&&r,v=_&&t&&!t.nodeType&&t,d=v&&v.exports===_,y=d&&l.process,g=function(){try{var t=v&&v.require&&v.require("util").types;return t||y&&y.binding&&y.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var w,O,m,A=Array.prototype,z=Function.prototype,M=Object.prototype,x=p["__core-js_shared__"],C=z.toString,F=M.hasOwnProperty,U=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",S=M.toString,I=C.call(Object),P=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=d?p.Buffer:void 0,q=p.Symbol,E=p.Uint8Array,$=T?T.allocUnsafe:void 0,D=(O=Object.getPrototypeOf,m=Object,function(t){return O(m(t))}),k=Object.create,B=M.propertyIsEnumerable,N=A.splice,L=q?q.toStringTag:void 0,R=function(){try{var t=vt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=T?T.isBuffer:void 0,V=Math.max,W=Date.now,H=vt(p,"Map"),J=vt(Object,"create"),K=function(){function t(){}return function(r){if(!xt(r))return{};if(k)return k(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1},X.prototype.set=function(t,r){var e=this.__data__,n=nt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(H||X),string:new Q}},Y.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},Y.prototype.get=function(t){return _t(this,t).get(t)},Y.prototype.has=function(t){return _t(this,t).has(t)},Y.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,r){var e=this.__data__;if(e instanceof X){var n=e.__data__;if(!H||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Y(n)}return e.set(t,r),this.size=e.size,this};var it,ut=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[it?u:++n];if(!1===r(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=F.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=S.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return S.call(t)}(t)}function at(t){return Ct(t)&&ct(t)==o}function ft(t){return!(!xt(t)||function(t){return!!U&&U in t}(t))&&(zt(t)?P:a).test(function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=yt(t),e=[];for(var n in t)("constructor"!=n||!r&&F.call(t,n))&&e.push(n);return e}function lt(t,r,e,n,o){t!==r&&ut(r,(function(i,u){if(o||(o=new Z),xt(i))!function(t,r,e,n,o,i,u){var a=gt(t,e),f=gt(r,e),s=u.get(f);if(s)return void rt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,h=void 0===l;if(h){var p=Ot(f),_=!p&&At(f),v=!p&&!_&&Ft(f);l=f,p||_||v?Ot(a)?l=a:Ct(j=a)&&mt(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function jt(t,r){return t===r||t!=t&&r!=r}var wt=at(function(){return arguments}())?at:function(t){return Ct(t)&&F.call(t,"callee")&&!B.call(t,"callee")},Ot=Array.isArray;function mt(t){return null!=t&&Mt(t.length)&&!zt(t)}var At=G||function(){return!1};function zt(t){if(!xt(t))return!1;var r=ct(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function Ct(t){return null!=t&&"object"==typeof t}var Ft=b?function(t){return function(r){return t(r)}}(b):function(t){return Ct(t)&&Mt(t.length)&&!!s[ct(t)]};function Ut(t){return mt(t)?tt(t,!0):st(t)}var St,It=(St=function(t,r,e){lt(t,r,e)},ht((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=St.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?mt(e)&&dt(r,e.length):"string"==n&&r in e)&&jt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++ec.call(t,r);class f{constructor({pluginId:t,defaultConfig:r={},customMerge:e,root:n}){this.pluginId=t,this.defaultConfig=r,this.pluginConfigPath=o.default.resolve(n||__dirname,t),this.customMerge=e,this._config=void 0}resolve(t){return o.default.resolve(this.pluginConfigPath,t)}hasFile(t){return n.default.existsSync(this.resolve(t))}requireFile(t){try{return require(this.resolve(t))}catch(t){if("MODULE_NOT_FOUND"===t.code)return;throw t}}_getUserConfig(){return this.requireFile("config.json")}config(t,r){if(!this._config){const t=this._getUserConfig();this._config=Array.isArray(t)?t:(this.customMerge||u)(this.defaultConfig,t)}let e=this._config;return t?function(t,r,e){if("number"==typeof r)return t[r];if("symbol"==typeof r)return a(t,r)?t[r]:e;const n="string"!=typeof(o=r)?o:o.split(".").reduce(((t,r)=>(r.split(/\[([^}]+)\]/g).forEach((r=>r&&t.push(r))),t)),[]);var o;let i=t;for(let t=0;t
+
+ {{unicode}}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.css b/uni_modules/uni-icons/components/uni-icons/uniicons.css
new file mode 100644
index 0000000..2f56eab
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/uniicons.css
@@ -0,0 +1,663 @@
+.uniui-color:before {
+ content: "\e6cf";
+}
+
+.uniui-wallet:before {
+ content: "\e6b1";
+}
+
+.uniui-settings-filled:before {
+ content: "\e6ce";
+}
+
+.uniui-auth-filled:before {
+ content: "\e6cc";
+}
+
+.uniui-shop-filled:before {
+ content: "\e6cd";
+}
+
+.uniui-staff-filled:before {
+ content: "\e6cb";
+}
+
+.uniui-vip-filled:before {
+ content: "\e6c6";
+}
+
+.uniui-plus-filled:before {
+ content: "\e6c7";
+}
+
+.uniui-folder-add-filled:before {
+ content: "\e6c8";
+}
+
+.uniui-color-filled:before {
+ content: "\e6c9";
+}
+
+.uniui-tune-filled:before {
+ content: "\e6ca";
+}
+
+.uniui-calendar-filled:before {
+ content: "\e6c0";
+}
+
+.uniui-notification-filled:before {
+ content: "\e6c1";
+}
+
+.uniui-wallet-filled:before {
+ content: "\e6c2";
+}
+
+.uniui-medal-filled:before {
+ content: "\e6c3";
+}
+
+.uniui-gift-filled:before {
+ content: "\e6c4";
+}
+
+.uniui-fire-filled:before {
+ content: "\e6c5";
+}
+
+.uniui-refreshempty:before {
+ content: "\e6bf";
+}
+
+.uniui-location-filled:before {
+ content: "\e6af";
+}
+
+.uniui-person-filled:before {
+ content: "\e69d";
+}
+
+.uniui-personadd-filled:before {
+ content: "\e698";
+}
+
+.uniui-back:before {
+ content: "\e6b9";
+}
+
+.uniui-forward:before {
+ content: "\e6ba";
+}
+
+.uniui-arrow-right:before {
+ content: "\e6bb";
+}
+
+.uniui-arrowthinright:before {
+ content: "\e6bb";
+}
+
+.uniui-arrow-left:before {
+ content: "\e6bc";
+}
+
+.uniui-arrowthinleft:before {
+ content: "\e6bc";
+}
+
+.uniui-arrow-up:before {
+ content: "\e6bd";
+}
+
+.uniui-arrowthinup:before {
+ content: "\e6bd";
+}
+
+.uniui-arrow-down:before {
+ content: "\e6be";
+}
+
+.uniui-arrowthindown:before {
+ content: "\e6be";
+}
+
+.uniui-bottom:before {
+ content: "\e6b8";
+}
+
+.uniui-arrowdown:before {
+ content: "\e6b8";
+}
+
+.uniui-right:before {
+ content: "\e6b5";
+}
+
+.uniui-arrowright:before {
+ content: "\e6b5";
+}
+
+.uniui-top:before {
+ content: "\e6b6";
+}
+
+.uniui-arrowup:before {
+ content: "\e6b6";
+}
+
+.uniui-left:before {
+ content: "\e6b7";
+}
+
+.uniui-arrowleft:before {
+ content: "\e6b7";
+}
+
+.uniui-eye:before {
+ content: "\e651";
+}
+
+.uniui-eye-filled:before {
+ content: "\e66a";
+}
+
+.uniui-eye-slash:before {
+ content: "\e6b3";
+}
+
+.uniui-eye-slash-filled:before {
+ content: "\e6b4";
+}
+
+.uniui-info-filled:before {
+ content: "\e649";
+}
+
+.uniui-reload:before {
+ content: "\e6b2";
+}
+
+.uniui-micoff-filled:before {
+ content: "\e6b0";
+}
+
+.uniui-map-pin-ellipse:before {
+ content: "\e6ac";
+}
+
+.uniui-map-pin:before {
+ content: "\e6ad";
+}
+
+.uniui-location:before {
+ content: "\e6ae";
+}
+
+.uniui-starhalf:before {
+ content: "\e683";
+}
+
+.uniui-star:before {
+ content: "\e688";
+}
+
+.uniui-star-filled:before {
+ content: "\e68f";
+}
+
+.uniui-calendar:before {
+ content: "\e6a0";
+}
+
+.uniui-fire:before {
+ content: "\e6a1";
+}
+
+.uniui-medal:before {
+ content: "\e6a2";
+}
+
+.uniui-font:before {
+ content: "\e6a3";
+}
+
+.uniui-gift:before {
+ content: "\e6a4";
+}
+
+.uniui-link:before {
+ content: "\e6a5";
+}
+
+.uniui-notification:before {
+ content: "\e6a6";
+}
+
+.uniui-staff:before {
+ content: "\e6a7";
+}
+
+.uniui-vip:before {
+ content: "\e6a8";
+}
+
+.uniui-folder-add:before {
+ content: "\e6a9";
+}
+
+.uniui-tune:before {
+ content: "\e6aa";
+}
+
+.uniui-auth:before {
+ content: "\e6ab";
+}
+
+.uniui-person:before {
+ content: "\e699";
+}
+
+.uniui-email-filled:before {
+ content: "\e69a";
+}
+
+.uniui-phone-filled:before {
+ content: "\e69b";
+}
+
+.uniui-phone:before {
+ content: "\e69c";
+}
+
+.uniui-email:before {
+ content: "\e69e";
+}
+
+.uniui-personadd:before {
+ content: "\e69f";
+}
+
+.uniui-chatboxes-filled:before {
+ content: "\e692";
+}
+
+.uniui-contact:before {
+ content: "\e693";
+}
+
+.uniui-chatbubble-filled:before {
+ content: "\e694";
+}
+
+.uniui-contact-filled:before {
+ content: "\e695";
+}
+
+.uniui-chatboxes:before {
+ content: "\e696";
+}
+
+.uniui-chatbubble:before {
+ content: "\e697";
+}
+
+.uniui-upload-filled:before {
+ content: "\e68e";
+}
+
+.uniui-upload:before {
+ content: "\e690";
+}
+
+.uniui-weixin:before {
+ content: "\e691";
+}
+
+.uniui-compose:before {
+ content: "\e67f";
+}
+
+.uniui-qq:before {
+ content: "\e680";
+}
+
+.uniui-download-filled:before {
+ content: "\e681";
+}
+
+.uniui-pyq:before {
+ content: "\e682";
+}
+
+.uniui-sound:before {
+ content: "\e684";
+}
+
+.uniui-trash-filled:before {
+ content: "\e685";
+}
+
+.uniui-sound-filled:before {
+ content: "\e686";
+}
+
+.uniui-trash:before {
+ content: "\e687";
+}
+
+.uniui-videocam-filled:before {
+ content: "\e689";
+}
+
+.uniui-spinner-cycle:before {
+ content: "\e68a";
+}
+
+.uniui-weibo:before {
+ content: "\e68b";
+}
+
+.uniui-videocam:before {
+ content: "\e68c";
+}
+
+.uniui-download:before {
+ content: "\e68d";
+}
+
+.uniui-help:before {
+ content: "\e679";
+}
+
+.uniui-navigate-filled:before {
+ content: "\e67a";
+}
+
+.uniui-plusempty:before {
+ content: "\e67b";
+}
+
+.uniui-smallcircle:before {
+ content: "\e67c";
+}
+
+.uniui-minus-filled:before {
+ content: "\e67d";
+}
+
+.uniui-micoff:before {
+ content: "\e67e";
+}
+
+.uniui-closeempty:before {
+ content: "\e66c";
+}
+
+.uniui-clear:before {
+ content: "\e66d";
+}
+
+.uniui-navigate:before {
+ content: "\e66e";
+}
+
+.uniui-minus:before {
+ content: "\e66f";
+}
+
+.uniui-image:before {
+ content: "\e670";
+}
+
+.uniui-mic:before {
+ content: "\e671";
+}
+
+.uniui-paperplane:before {
+ content: "\e672";
+}
+
+.uniui-close:before {
+ content: "\e673";
+}
+
+.uniui-help-filled:before {
+ content: "\e674";
+}
+
+.uniui-paperplane-filled:before {
+ content: "\e675";
+}
+
+.uniui-plus:before {
+ content: "\e676";
+}
+
+.uniui-mic-filled:before {
+ content: "\e677";
+}
+
+.uniui-image-filled:before {
+ content: "\e678";
+}
+
+.uniui-locked-filled:before {
+ content: "\e668";
+}
+
+.uniui-info:before {
+ content: "\e669";
+}
+
+.uniui-locked:before {
+ content: "\e66b";
+}
+
+.uniui-camera-filled:before {
+ content: "\e658";
+}
+
+.uniui-chat-filled:before {
+ content: "\e659";
+}
+
+.uniui-camera:before {
+ content: "\e65a";
+}
+
+.uniui-circle:before {
+ content: "\e65b";
+}
+
+.uniui-checkmarkempty:before {
+ content: "\e65c";
+}
+
+.uniui-chat:before {
+ content: "\e65d";
+}
+
+.uniui-circle-filled:before {
+ content: "\e65e";
+}
+
+.uniui-flag:before {
+ content: "\e65f";
+}
+
+.uniui-flag-filled:before {
+ content: "\e660";
+}
+
+.uniui-gear-filled:before {
+ content: "\e661";
+}
+
+.uniui-home:before {
+ content: "\e662";
+}
+
+.uniui-home-filled:before {
+ content: "\e663";
+}
+
+.uniui-gear:before {
+ content: "\e664";
+}
+
+.uniui-smallcircle-filled:before {
+ content: "\e665";
+}
+
+.uniui-map-filled:before {
+ content: "\e666";
+}
+
+.uniui-map:before {
+ content: "\e667";
+}
+
+.uniui-refresh-filled:before {
+ content: "\e656";
+}
+
+.uniui-refresh:before {
+ content: "\e657";
+}
+
+.uniui-cloud-upload:before {
+ content: "\e645";
+}
+
+.uniui-cloud-download-filled:before {
+ content: "\e646";
+}
+
+.uniui-cloud-download:before {
+ content: "\e647";
+}
+
+.uniui-cloud-upload-filled:before {
+ content: "\e648";
+}
+
+.uniui-redo:before {
+ content: "\e64a";
+}
+
+.uniui-images-filled:before {
+ content: "\e64b";
+}
+
+.uniui-undo-filled:before {
+ content: "\e64c";
+}
+
+.uniui-more:before {
+ content: "\e64d";
+}
+
+.uniui-more-filled:before {
+ content: "\e64e";
+}
+
+.uniui-undo:before {
+ content: "\e64f";
+}
+
+.uniui-images:before {
+ content: "\e650";
+}
+
+.uniui-paperclip:before {
+ content: "\e652";
+}
+
+.uniui-settings:before {
+ content: "\e653";
+}
+
+.uniui-search:before {
+ content: "\e654";
+}
+
+.uniui-redo-filled:before {
+ content: "\e655";
+}
+
+.uniui-list:before {
+ content: "\e644";
+}
+
+.uniui-mail-open-filled:before {
+ content: "\e63a";
+}
+
+.uniui-hand-down-filled:before {
+ content: "\e63c";
+}
+
+.uniui-hand-down:before {
+ content: "\e63d";
+}
+
+.uniui-hand-up-filled:before {
+ content: "\e63e";
+}
+
+.uniui-hand-up:before {
+ content: "\e63f";
+}
+
+.uniui-heart-filled:before {
+ content: "\e641";
+}
+
+.uniui-mail-open:before {
+ content: "\e643";
+}
+
+.uniui-heart:before {
+ content: "\e639";
+}
+
+.uniui-loop:before {
+ content: "\e633";
+}
+
+.uniui-pulldown:before {
+ content: "\e632";
+}
+
+.uniui-scan:before {
+ content: "\e62a";
+}
+
+.uniui-bars:before {
+ content: "\e627";
+}
+
+.uniui-cart-filled:before {
+ content: "\e629";
+}
+
+.uniui-checkbox:before {
+ content: "\e62b";
+}
+
+.uniui-checkbox-filled:before {
+ content: "\e62c";
+}
+
+.uniui-shop:before {
+ content: "\e62f";
+}
+
+.uniui-headphones:before {
+ content: "\e630";
+}
+
+.uniui-cart:before {
+ content: "\e631";
+}
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
new file mode 100644
index 0000000..835f33b
Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ
diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json
new file mode 100644
index 0000000..d1c4e77
--- /dev/null
+++ b/uni_modules/uni-icons/package.json
@@ -0,0 +1,86 @@
+{
+ "id": "uni-icons",
+ "displayName": "uni-icons 图标",
+ "version": "1.3.5",
+ "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "icon",
+ "图标"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.2.14"
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": ["uni-scss"],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md
new file mode 100644
index 0000000..86234ba
--- /dev/null
+++ b/uni_modules/uni-icons/readme.md
@@ -0,0 +1,8 @@
+## Icons 图标
+> **组件名:uni-icons**
+> 代码块: `uIcons`
+
+用于展示 icons 图标 。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/node_modules/uni-config-center/index.js b/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/node_modules/uni-config-center/index.js
new file mode 100644
index 0000000..00ba62f
--- /dev/null
+++ b/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/node_modules/uni-config-center/index.js
@@ -0,0 +1 @@
+"use strict";var t=require("fs"),r=require("path");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),o=e(r),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var u=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t,r){var e="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof i&&i&&i.Object===Object&&i,h="object"==typeof self&&self&&self.Object===Object&&self,p=l||h||Function("return this")(),_=r&&!r.nodeType&&r,v=_&&t&&!t.nodeType&&t,d=v&&v.exports===_,y=d&&l.process,g=function(){try{var t=v&&v.require&&v.require("util").types;return t||y&&y.binding&&y.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var w,O,m,A=Array.prototype,z=Function.prototype,M=Object.prototype,x=p["__core-js_shared__"],C=z.toString,F=M.hasOwnProperty,U=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",S=M.toString,I=C.call(Object),P=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=d?p.Buffer:void 0,q=p.Symbol,E=p.Uint8Array,$=T?T.allocUnsafe:void 0,D=(O=Object.getPrototypeOf,m=Object,function(t){return O(m(t))}),k=Object.create,B=M.propertyIsEnumerable,N=A.splice,L=q?q.toStringTag:void 0,R=function(){try{var t=vt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=T?T.isBuffer:void 0,V=Math.max,W=Date.now,H=vt(p,"Map"),J=vt(Object,"create"),K=function(){function t(){}return function(r){if(!xt(r))return{};if(k)return k(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1},X.prototype.set=function(t,r){var e=this.__data__,n=nt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(H||X),string:new Q}},Y.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},Y.prototype.get=function(t){return _t(this,t).get(t)},Y.prototype.has=function(t){return _t(this,t).has(t)},Y.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,r){var e=this.__data__;if(e instanceof X){var n=e.__data__;if(!H||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Y(n)}return e.set(t,r),this.size=e.size,this};var it,ut=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[it?u:++n];if(!1===r(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=F.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=S.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return S.call(t)}(t)}function at(t){return Ct(t)&&ct(t)==o}function ft(t){return!(!xt(t)||function(t){return!!U&&U in t}(t))&&(zt(t)?P:a).test(function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=yt(t),e=[];for(var n in t)("constructor"!=n||!r&&F.call(t,n))&&e.push(n);return e}function lt(t,r,e,n,o){t!==r&&ut(r,(function(i,u){if(o||(o=new Z),xt(i))!function(t,r,e,n,o,i,u){var a=gt(t,e),f=gt(r,e),s=u.get(f);if(s)return void rt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,h=void 0===l;if(h){var p=Ot(f),_=!p&&At(f),v=!p&&!_&&Ft(f);l=f,p||_||v?Ot(a)?l=a:Ct(j=a)&&mt(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function jt(t,r){return t===r||t!=t&&r!=r}var wt=at(function(){return arguments}())?at:function(t){return Ct(t)&&F.call(t,"callee")&&!B.call(t,"callee")},Ot=Array.isArray;function mt(t){return null!=t&&Mt(t.length)&&!zt(t)}var At=G||function(){return!1};function zt(t){if(!xt(t))return!1;var r=ct(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function Ct(t){return null!=t&&"object"==typeof t}var Ft=b?function(t){return function(r){return t(r)}}(b):function(t){return Ct(t)&&Mt(t.length)&&!!s[ct(t)]};function Ut(t){return mt(t)?tt(t,!0):st(t)}var St,It=(St=function(t,r,e){lt(t,r,e)},ht((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=St.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?mt(e)&&dt(r,e.length):"string"==n&&r in e)&&jt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++ec.call(t,r);class f{constructor({pluginId:t,defaultConfig:r={},customMerge:e,root:n}){this.pluginId=t,this.defaultConfig=r,this.pluginConfigPath=o.default.resolve(n||__dirname,t),this.customMerge=e,this._config=void 0}resolve(t){return o.default.resolve(this.pluginConfigPath,t)}hasFile(t){return n.default.existsSync(this.resolve(t))}requireFile(t){try{return require(this.resolve(t))}catch(t){if("MODULE_NOT_FOUND"===t.code)return;throw t}}_getUserConfig(){return this.requireFile("config.json")}config(t,r){if(!this._config){const t=this._getUserConfig();this._config=Array.isArray(t)?t:(this.customMerge||u)(this.defaultConfig,t)}let e=this._config;return t?function(t,r,e){if("number"==typeof r)return t[r];if("symbol"==typeof r)return a(t,r)?t[r]:e;const n="string"!=typeof(o=r)?o:o.split(".").reduce(((t,r)=>(r.split(/\[([^}]+)\]/g).forEach((r=>r&&t.push(r))),t)),[]);var o;let i=t;for(let t=0;t (c ? c.toUpperCase() : ''))
+}
+
+function camel2snake (value) {
+ return value.replace(isCamelCase, str => '_' + str.toLowerCase())
+}
+
+function parseObjectKeys (obj, type) {
+ let parserReg, parser
+ switch (type) {
+ case 'snake2camel':
+ parser = snake2camel
+ parserReg = isSnakeCase
+ break
+ case 'camel2snake':
+ parser = camel2snake
+ parserReg = isCamelCase
+ break
+ }
+ for (const key in obj) {
+ if (hasOwn(obj, key)) {
+ if (parserReg.test(key)) {
+ const keyCopy = parser(key)
+ obj[keyCopy] = obj[key]
+ delete obj[key]
+ if (isPlainObject(obj[keyCopy])) {
+ obj[keyCopy] = parseObjectKeys(obj[keyCopy], type)
+ } else if (Array.isArray(obj[keyCopy])) {
+ obj[keyCopy] = obj[keyCopy].map((item) => {
+ return parseObjectKeys(item, type)
+ })
+ }
+ }
+ }
+ }
+ return obj
+}
+
+function snake2camelJson (obj) {
+ return parseObjectKeys(obj, 'snake2camel')
+}
+
+function camel2snakeJson (obj) {
+ return parseObjectKeys(obj, 'camel2snake')
+}
+
+function getOffsetDate (offset) {
+ return new Date(
+ Date.now() + (new Date().getTimezoneOffset() + (offset || 0) * 60) * 60000
+ )
+}
+
+function getDateStr (date, separator = '-') {
+ date = date || new Date()
+ const dateArr = []
+ dateArr.push(date.getFullYear())
+ dateArr.push(('00' + (date.getMonth() + 1)).substr(-2))
+ dateArr.push(('00' + date.getDate()).substr(-2))
+ return dateArr.join(separator)
+}
+
+function getTimeStr (date, separator = ':') {
+ date = date || new Date()
+ const timeArr = []
+ timeArr.push(('00' + date.getHours()).substr(-2))
+ timeArr.push(('00' + date.getMinutes()).substr(-2))
+ timeArr.push(('00' + date.getSeconds()).substr(-2))
+ return timeArr.join(separator)
+}
+
+function getFullTimeStr (date) {
+ date = date || new Date()
+ return getDateStr(date) + ' ' + getTimeStr(date)
+}
+
+function getDistinctArray (arr) {
+ return Array.from(new Set(arr))
+}
+
+/**
+ * 拼接url
+ * @param {string} base 基础路径
+ * @param {string} path 在基础路径上拼接的路径
+ * @returns
+ */
+function resolveUrl (base, path) {
+ if (/^https?:/.test(path)) {
+ return path
+ }
+ return base + path
+}
+
+function getVerifyCode (len = 6) {
+ let code = ''
+ for (let i = 0; i < len; i++) {
+ code += Math.floor(Math.random() * 10)
+ }
+ return code
+}
+
+function coverMobile (mobile) {
+ if (typeof mobile !== 'string') {
+ return mobile
+ }
+ return mobile.slice(0, 3) + '****' + mobile.slice(7)
+}
+
+function getNonceStr (length = 16) {
+ let str = ''
+ while (str.length < length) {
+ str += Math.random().toString(32).substring(2)
+ }
+ return str.substring(0, length)
+}
+
+try {
+ require('lodash.merge')
+} catch (error) {
+ console.error('uni-id-co缺少依赖,请在uniCloud/cloudfunctions/uni-id-co目录执行 npm install 安装依赖')
+ throw error
+}
+
+function isMatchUserApp (userAppList, matchAppList) {
+ if (userAppList === undefined || userAppList === null) {
+ return true
+ }
+ if (getType(userAppList) !== 'array') {
+ return false
+ }
+ if (userAppList.includes('*')) {
+ return true
+ }
+ if (getType(matchAppList) === 'string') {
+ matchAppList = [matchAppList]
+ }
+ return userAppList.some(item => matchAppList.includes(item))
+}
+
+function checkIdCard (idCardNumber) {
+ if (!idCardNumber || typeof idCardNumber !== 'string' || idCardNumber.length !== 18) return false
+
+ const coefficient = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
+ const checkCode = [1, 0, 'x', 9, 8, 7, 6, 5, 4, 3, 2]
+ const code = idCardNumber.substring(17)
+
+ let sum = 0
+ for (let i = 0; i < 17; i++) {
+ sum += Number(idCardNumber.charAt(i)) * coefficient[i]
+ }
+
+ return checkCode[sum % 11].toString() === code.toLowerCase()
+}
+
+function catchAwait (fn, finallyFn) {
+ if (!fn) return [new Error('no function')]
+
+ if (Promise.prototype.finally === undefined) {
+ // eslint-disable-next-line no-extend-native
+ Promise.prototype.finally = function (finallyFn) {
+ return this.then(
+ res => Promise.resolve(finallyFn()).then(() => res),
+ error => Promise.resolve(finallyFn()).then(() => { throw error })
+ )
+ }
+ }
+
+ return fn
+ .then((data) => [undefined, data])
+ .catch((error) => [error])
+ .finally(() => typeof finallyFn === 'function' && finallyFn())
+}
+
+function dataDesensitization (value = '', options = {}) {
+ const { onlyLast = false } = options
+ const [firstIndex, middleIndex, lastIndex] = onlyLast ? [0, 0, -1] : [0, 1, -1]
+
+ if (!value) return value
+ const first = value.slice(firstIndex, middleIndex)
+ const middle = value.slice(middleIndex, lastIndex)
+ const last = value.slice(lastIndex)
+ const star = Array.from(new Array(middle.length), (v) => '*').join('')
+
+ return first + star + last
+}
+
+function getCurrentDateTimestamp (date = Date.now(), targetTimezone = 8) {
+ const oneHour = 60 * 60 * 1000
+ return parseInt((date + targetTimezone * oneHour) / (24 * oneHour)) * (24 * oneHour) - targetTimezone * oneHour
+}
+
+module.exports = {
+ getType,
+ isValidString,
+ batchFindObjctValue,
+ isPlainObject,
+ isFn,
+ getDistinctArray,
+ getFullTimeStr,
+ resolveUrl,
+ getOffsetDate,
+ camel2snakeJson,
+ snake2camelJson,
+ getExtension,
+ getVerifyCode,
+ coverMobile,
+ getNonceStr,
+ isMatchUserApp,
+ checkIdCard,
+ catchAwait,
+ dataDesensitization,
+ getCurrentDateTimestamp
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/common/validator.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/common/validator.js
new file mode 100644
index 0000000..e14600c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/common/validator.js
@@ -0,0 +1,439 @@
+const {
+ isValidString,
+ getType
+} = require('./utils.js')
+const {
+ ERROR
+} = require('./error')
+
+const baseValidator = Object.create(null)
+
+baseValidator.username = function (username) {
+ const errCode = ERROR.INVALID_USERNAME
+ if (!isValidString(username)) {
+ return {
+ errCode
+ }
+ }
+ if (/^\d+$/.test(username)) {
+ // 用户名不能为纯数字
+ return {
+ errCode
+ }
+ };
+ if (!/^[a-zA-Z0-9_-]+$/.test(username)) {
+ // 用户名仅能使用数字、字母、“_”及“-”
+ return {
+ errCode
+ }
+ }
+}
+
+baseValidator.password = function (password) {
+ const errCode = ERROR.INVALID_PASSWORD
+ if (!isValidString(password)) {
+ return {
+ errCode
+ }
+ }
+ if (password.length < 6) {
+ // 密码长度不能小于6
+ return {
+ errCode
+ }
+ }
+}
+
+baseValidator.mobile = function (mobile) {
+ const errCode = ERROR.INVALID_MOBILE
+ if (getType(mobile) !== 'string') {
+ return {
+ errCode
+ }
+ }
+ if (mobile && !/^1\d{10}$/.test(mobile)) {
+ return {
+ errCode
+ }
+ }
+}
+
+baseValidator.email = function (email) {
+ const errCode = ERROR.INVALID_EMAIL
+ if (getType(email) !== 'string') {
+ return {
+ errCode
+ }
+ }
+ if (email && !/@/.test(email)) {
+ return {
+ errCode
+ }
+ }
+}
+
+baseValidator.nickname = function (nickname) {
+ const errCode = ERROR.INVALID_NICKNAME
+ if (nickname.indexOf('@') !== -1) {
+ // 昵称不允许含@
+ return {
+ errCode
+ }
+ };
+ if (/^\d+$/.test(nickname)) {
+ // 昵称不能为纯数字
+ return {
+ errCode
+ }
+ };
+ if (nickname.length > 100) {
+ // 昵称不可超过100字符
+ return {
+ errCode
+ }
+ }
+}
+
+const baseType = ['string', 'boolean', 'number', 'null'] // undefined不会由客户端提交上来
+
+baseType.forEach((type) => {
+ baseValidator[type] = function (val) {
+ if (getType(val) === type) {
+ return
+ }
+ return {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+})
+
+function tokenize(name) {
+ let i = 0
+ const result = []
+ let token = ''
+ while (i < name.length) {
+ const char = name[i]
+ switch (char) {
+ case '|':
+ case '<':
+ case '>':
+ token && result.push(token)
+ result.push(char)
+ token = ''
+ break
+ default:
+ token += char
+ break
+ }
+ i++
+ if (i === name.length && token) {
+ result.push(token)
+ }
+ }
+ return result
+}
+
+/**
+ * 处理validator名
+ * @param {string} name
+ */
+function parseValidatorName(name) {
+ const tokenList = tokenize(name)
+ let i = 0
+ let currentToken = tokenList[i]
+ const result = {
+ type: 'root',
+ children: [],
+ parent: null
+ }
+ let lastRealm = result
+ while (currentToken) {
+ switch (currentToken) {
+ case 'array': {
+ const currentRealm = {
+ type: 'array',
+ children: [],
+ parent: lastRealm
+ }
+ lastRealm.children.push(currentRealm)
+ lastRealm = currentRealm
+ break
+ }
+ case '<':
+ if (lastRealm.type !== 'array') {
+ throw new Error('Invalid validator token "<"')
+ }
+ break
+ case '>':
+ if (lastRealm.type !== 'array') {
+ throw new Error('Invalid validator token ">"')
+ }
+ lastRealm = lastRealm.parent
+ break
+ case '|':
+ if (lastRealm.type !== 'array' && lastRealm.type !== 'root') {
+ throw new Error('Invalid validator token "|"')
+ }
+ break
+ default:
+ lastRealm.children.push({
+ type: currentToken
+ })
+ break
+ }
+ i++
+ currentToken = tokenList[i]
+ }
+ return result
+}
+
+function getRuleCategory(rule) {
+ switch (rule.type) {
+ case 'array':
+ return 'array'
+ case 'root':
+ return 'root'
+ default:
+ return 'base'
+ }
+}
+
+function isMatchUnionType(val, rule) {
+ if (!rule.children || rule.children.length === 0) {
+ return true
+ }
+ const children = rule.children
+ for (let i = 0; i < children.length; i++) {
+ const child = children[i]
+ const category = getRuleCategory(child)
+ let pass = false
+ switch (category) {
+ case 'base':
+ pass = isMatchBaseType(val, child)
+ break
+ case 'array':
+ pass = isMatchArrayType(val, child)
+ break
+ default:
+ break
+ }
+ if (pass) {
+ return true
+ }
+ }
+ return false
+}
+
+function isMatchBaseType(val, rule) {
+ if (typeof baseValidator[rule.type] !== 'function') {
+ throw new Error(`invalid schema type: ${rule.type}`)
+ }
+ const validateRes = baseValidator[rule.type](val)
+ if (validateRes && validateRes.errCode) {
+ return false
+ }
+ return true
+}
+
+function isMatchArrayType(arr, rule) {
+ if (getType(arr) !== 'array') {
+ return false
+ }
+ if (rule.children && rule.children.length && arr.some(item => !isMatchUnionType(item, rule))) {
+ return false
+ }
+ return true
+}
+
+// 特殊符号 https://www.ibm.com/support/pages/password-strength-rules ~!@#$%^&*_-+=`|\(){}[]:;"'<>,.?/
+// const specialChar = '~!@#$%^&*_-+=`|\(){}[]:;"\'<>,.?/'
+// const specialCharRegExp = /^[~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]$/
+// for (let i = 0, arr = specialChar.split(''); i < arr.length; i++) {
+// const char = arr[i]
+// if (!specialCharRegExp.test(char)) {
+// throw new Error('check special character error: ' + char)
+// }
+// }
+
+// 密码强度表达式
+const passwordRules = {
+ // 密码必须包含大小写字母、数字和特殊符号
+ super: /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
+ // 密码必须包含字母、数字和特殊符号
+ strong: /^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
+ // 密码必须为字母、数字和特殊符号任意两种的组合
+ medium: /^(?![0-9]+$)(?![a-zA-Z]+$)(?![~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]+$)[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
+ // 密码必须包含字母和数字
+ weak: /^(?=.*[0-9])(?=.*[a-zA-Z])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{6,16}$/,
+
+}
+
+function createPasswordVerifier({
+ passwordStrength = ''
+} = {}) {
+ return function (password) {
+ const passwordRegExp = passwordRules[passwordStrength]
+ if (!passwordRegExp) {
+ throw new Error('Invalid password strength config: ' + passwordStrength)
+ }
+ const errCode = ERROR.INVALID_PASSWORD
+ if (!isValidString(password)) {
+ return {
+ errCode
+ }
+ }
+ if (!passwordRegExp.test(password)) {
+ return {
+ errCode: errCode + '-' + passwordStrength
+ }
+ }
+ }
+}
+
+function isEmpty(value) {
+ return value === undefined ||
+ value === null ||
+ (typeof value === 'string' && value.trim() === '')
+}
+
+class Validator {
+ constructor({
+ passwordStrength = ''
+ } = {}) {
+ this.baseValidator = baseValidator
+ this.customValidator = Object.create(null)
+ if (passwordStrength) {
+ this.mixin(
+ 'password',
+ createPasswordVerifier({
+ passwordStrength
+ })
+ )
+ }
+ }
+
+ mixin(type, handler) {
+ this.customValidator[type] = handler
+ }
+
+ getRealBaseValidator(type) {
+ return this.customValidator[type] || this.baseValidator[type]
+ }
+
+ get validator() {
+ return new Proxy({}, {
+ get: (_, prop) => {
+ if (typeof prop !== 'string') {
+ return
+ }
+ const realBaseValidator = this.getRealBaseValidator(prop)
+ if (realBaseValidator) {
+ return realBaseValidator
+ }
+ const rule = parseValidatorName(prop)
+ return function (val) {
+ if (!isMatchUnionType(val, rule)) {
+ return {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+ }
+ }
+ })
+ }
+
+ validate(value = {}, schema = {}) {
+ for (const schemaKey in schema) {
+ let schemaValue = schema[schemaKey]
+ if (getType(schemaValue) === 'string') {
+ schemaValue = {
+ required: true,
+ type: schemaValue
+ }
+ }
+ const {
+ required,
+ type
+ } = schemaValue
+ // value内未传入了schemaKey或对应值为undefined
+ if (isEmpty(value[schemaKey])) {
+ if (required) {
+ return {
+ errCode: ERROR.PARAM_REQUIRED,
+ errMsgValue: {
+ param: schemaKey
+ },
+ schemaKey
+ }
+ } else {
+ //delete value[schemaKey]
+ continue
+ }
+ }
+ const validateMethod = this.validator[type]
+ if (!validateMethod) {
+ throw new Error(`invalid schema type: ${type}`)
+ }
+ const validateRes = validateMethod(value[schemaKey])
+ if (validateRes) {
+ validateRes.schemaKey = schemaKey
+ return validateRes
+ }
+ }
+ }
+}
+
+function checkClientInfo(clientInfo) {
+ const stringNotRequired = {
+ required: false,
+ type: 'string'
+ }
+ const numberNotRequired = {
+ required: false,
+ type: 'number'
+ }
+ const numberOrStringNotRequired = {
+ required: false,
+ type: 'number|string'
+ }
+ const schema = {
+ uniPlatform: 'string',
+ appId: 'string',
+ deviceId: stringNotRequired,
+ osName: stringNotRequired,
+ locale: stringNotRequired,
+ clientIP: stringNotRequired,
+ appName: stringNotRequired,
+ appVersion: stringNotRequired,
+ appVersionCode: numberOrStringNotRequired,
+ channel: numberOrStringNotRequired,
+ userAgent: stringNotRequired,
+ uniIdToken: stringNotRequired,
+ deviceBrand: stringNotRequired,
+ deviceModel: stringNotRequired,
+ osVersion: stringNotRequired,
+ osLanguage: stringNotRequired,
+ osTheme: stringNotRequired,
+ romName: stringNotRequired,
+ romVersion: stringNotRequired,
+ devicePixelRatio: numberNotRequired,
+ windowWidth: numberNotRequired,
+ windowHeight: numberNotRequired,
+ screenWidth: numberNotRequired,
+ screenHeight: numberNotRequired
+ }
+ const validateRes = new Validator().validate(clientInfo, schema)
+ if (validateRes) {
+ if (validateRes.errCode === ERROR.PARAM_REQUIRED) {
+ console.warn('- 如果使用HBuilderX运行本地云函数/云对象功能时出现此提示,请改为使用客户端调用本地云函数方式调试,或更新HBuilderX到3.4.12及以上版本。\n- 如果是缺少clientInfo.appId,请检查项目manifest.json内是否配置了DCloud AppId')
+ throw new Error(`"clientInfo.${validateRes.schemaKey}" is required.`)
+ } else {
+ throw new Error(`Invalid client info: clienInfo.${validateRes.schemaKey}`)
+ }
+ }
+}
+
+module.exports = {
+ Validator,
+ checkClientInfo
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/config/permission.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/config/permission.js
new file mode 100644
index 0000000..229a264
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/config/permission.js
@@ -0,0 +1,90 @@
+// 各接口权限配置,未配置接口表示允许任何用户访问(包括未登录用户)
+module.exports = {
+ // 管理接口
+ addUser: {
+ // auth: true // 已登录用户方可操作,配置角色或权限时此项可不写
+ role: ['admin'] // 允许进行此操作的角色,包含任一角色均可操作。
+ // permission: [] // 允许进行此操作的权限,包含任一权限均可操作。
+ // 权限角色均配置时,用户拥有任一权限或任一角色均可操作
+ },
+ updateUser: {
+ role: ['admin']
+ },
+ authorizeAppLogin: {
+ role: ['admin']
+ },
+ removeAuthorizedApp: {
+ role: ['admin']
+ },
+ setAuthorizedApp: {
+ role: ['admin']
+ },
+
+ // 用户接口
+ closeAccount: {
+ auth: true
+ },
+ updatePwd: {
+ auth: true
+ },
+ logout: {
+ auth: true
+ },
+ bindMobileBySms: {
+ auth: true
+ },
+ bindMobileByUniverify: {
+ auth: true
+ },
+ bindMobileByMpWeixin: {
+ auth: true
+ },
+ bindAlipay: {
+ auth: true
+ },
+ bindApple: {
+ auth: true
+ },
+ bindQQ: {
+ auth: true
+ },
+ bindWeixin: {
+ auth: true
+ },
+ acceptInvite: {
+ auth: true
+ },
+ getInvitedUser: {
+ auth: true
+ },
+ setPushCid: {
+ auth: true
+ },
+ getAccountInfo: {
+ auth: true
+ },
+ unbindWeixin: {
+ auth: true
+ },
+ unbindAlipay: {
+ auth: true
+ },
+ unbindQQ: {
+ auth: true
+ },
+ unbindApple: {
+ auth: true
+ },
+ setPwd: {
+ auth: true
+ },
+ getFrvCertifyId: {
+ auth: true
+ },
+ getFrvAuthResult: {
+ auth: true
+ },
+ getRealNameInfo: {
+ auth: true
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js
new file mode 100644
index 0000000..147432c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js
@@ -0,0 +1,694 @@
+const uniIdCommon = require('uni-id-common')
+const uniCaptcha = require('uni-captcha')
+const {
+ getType,
+ checkIdCard
+} = require('./common/utils')
+const {
+ checkClientInfo,
+ Validator
+} = require('./common/validator')
+const ConfigUtils = require('./lib/utils/config')
+const {
+ isUniIdError,
+ ERROR
+} = require('./common/error')
+const middleware = require('./middleware/index')
+const universal = require('./common/universal')
+
+const {
+ registerAdmin,
+ registerUser,
+ registerUserByEmail
+} = require('./module/register/index')
+const {
+ addUser,
+ updateUser
+} = require('./module/admin/index')
+const {
+ login,
+ loginBySms,
+ loginByUniverify,
+ loginByWeixin,
+ loginByAlipay,
+ loginByQQ,
+ loginByApple,
+ loginByWeixinMobile
+} = require('./module/login/index')
+const {
+ logout
+} = require('./module/logout/index')
+const {
+ bindMobileBySms,
+ bindMobileByUniverify,
+ bindMobileByMpWeixin,
+ bindAlipay,
+ bindApple,
+ bindQQ,
+ bindWeixin,
+ unbindWeixin,
+ unbindAlipay,
+ unbindQQ,
+ unbindApple
+} = require('./module/relate/index')
+const {
+ setPwd,
+ updatePwd,
+ resetPwdBySms,
+ resetPwdByEmail,
+ closeAccount,
+ getAccountInfo,
+ getRealNameInfo
+} = require('./module/account/index')
+const {
+ createCaptcha,
+ refreshCaptcha,
+ sendSmsCode,
+ sendEmailCode
+} = require('./module/verify/index')
+const {
+ refreshToken,
+ setPushCid,
+ secureNetworkHandshakeByWeixin
+} = require('./module/utils/index')
+const {
+ getInvitedUser,
+ acceptInvite
+} = require('./module/fission')
+const {
+ authorizeAppLogin,
+ removeAuthorizedApp,
+ setAuthorizedApp
+} = require('./module/multi-end')
+const {
+ getSupportedLoginType
+} = require('./module/dev/index')
+const {
+ externalRegister,
+ externalLogin,
+ updateUserInfoByExternal
+} = require('./module/external')
+const {
+ getFrvCertifyId,
+ getFrvAuthResult
+} = require('./module/facial-recognition-verify')
+
+module.exports = {
+ async _before () {
+ // 支持 callFunction 与 URL化
+ universal.call(this)
+
+ const clientInfo = this.getUniversalClientInfo()
+ /**
+ * 检查clientInfo,无appId和uniPlatform时本云对象无法正常运行
+ * 此外需要保证用到的clientInfo字段均经过类型检查
+ * clientInfo由客户端上传并非完全可信,clientInfo内除clientIP、userAgent、source外均为客户端上传参数
+ * 否则可能会出现一些意料外的情况
+ */
+ checkClientInfo(clientInfo)
+ let clientPlatform = clientInfo.uniPlatform
+ // 统一platform名称
+ switch (clientPlatform) {
+ case 'app':
+ case 'app-plus':
+ clientPlatform = 'app'
+ break
+ case 'web':
+ case 'h5':
+ clientPlatform = 'web'
+ break
+ default:
+ break
+ }
+
+ this.clientPlatform = clientPlatform
+
+ // 挂载uni-id实例到this上,方便后续调用
+ this.uniIdCommon = uniIdCommon.createInstance({
+ clientInfo
+ })
+
+ // 包含uni-id配置合并等功能的工具集
+ this.configUtils = new ConfigUtils({
+ context: this
+ })
+ this.config = this.configUtils.getPlatformConfig()
+ this.hooks = this.configUtils.getHooks()
+
+ this.validator = new Validator({
+ passwordStrength: this.config.passwordStrength
+ })
+
+ // 扩展 validator 增加 验证身份证号码合法性
+ this.validator.mixin('idCard', function (idCard) {
+ if (!checkIdCard(idCard)) {
+ return {
+ errCode: ERROR.INVALID_ID_CARD
+ }
+ }
+ })
+ this.validator.mixin('realName', function (realName) {
+ if (
+ typeof realName !== 'string' ||
+ realName.length < 2 ||
+ !/^[\u4e00-\u9fa5]{1,10}(·?[\u4e00-\u9fa5]{1,10}){0,5}$/.test(realName)
+ ) {
+ return {
+ errCode: ERROR.INVALID_REAL_NAME
+ }
+ }
+ })
+ /**
+ * 示例:覆盖密码验证规则
+ */
+ // this.validator.mixin('password', function (password) {
+ // if (typeof password !== 'string' || password.length < 10) {
+ // // 调整为密码长度不能小于10
+ // return {
+ // errCode: ERROR.INVALID_PASSWORD
+ // }
+ // }
+ // })
+ /**
+ * 示例:新增验证规则
+ */
+ // this.validator.mixin('timestamp', function (timestamp) {
+ // if (typeof timestamp !== 'number' || timestamp > Date.now()) {
+ // return {
+ // errCode: ERROR.INVALID_PARAM
+ // }
+ // }
+ // })
+ // // 新增规则同样可以在数组验证规则中使用
+ // this.validator.valdate({
+ // timestamp: 123456789
+ // }, {
+ // timestamp: 'timestamp'
+ // })
+ // this.validator.valdate({
+ // timestampList: [123456789, 123123123123]
+ // }, {
+ // timestampList: 'array'
+ // })
+ // // 甚至更复杂的写法
+ // this.validator.valdate({
+ // timestamp: [123456789, 123123123123]
+ // }, {
+ // timestamp: 'timestamp|array'
+ // })
+
+ // 挂载uni-captcha到this上,方便后续调用
+ this.uniCaptcha = uniCaptcha
+ Object.defineProperty(this, 'uniOpenBridge', {
+ get () {
+ return require('uni-open-bridge-common')
+ }
+ })
+
+ // 挂载中间件
+ this.middleware = {}
+ for (const mwName in middleware) {
+ this.middleware[mwName] = middleware[mwName].bind(this)
+ }
+
+ // 国际化
+ const messages = require('./lang/index')
+ const fallbackLocale = 'zh-Hans'
+ const i18n = uniCloud.initI18n({
+ locale: clientInfo.locale,
+ fallbackLocale,
+ messages: JSON.parse(JSON.stringify(messages))
+ })
+ if (!messages[i18n.locale]) {
+ i18n.setLocale(fallbackLocale)
+ }
+ this.t = i18n.t.bind(i18n)
+
+ this.response = {}
+
+ // 请求鉴权验证
+ await this.middleware.verifyRequestSign()
+
+ // 通用权限校验模块
+ await this.middleware.accessControl()
+ },
+ _after (error, result) {
+ if (error) {
+ // 处理中间件内抛出的标准响应对象
+ if (error.errCode && getType(error) === 'object') {
+ const errCode = error.errCode
+ if (!isUniIdError(errCode)) {
+ return error
+ }
+ return {
+ errCode,
+ errMsg: error.errMsg || this.t(errCode, error.errMsgValue)
+ }
+ }
+ throw error
+ }
+ return Object.assign(this.response, result)
+ },
+ /**
+ * 注册管理员
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#register-admin
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @returns
+ */
+ registerAdmin,
+ /**
+ * 新增用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#add-user
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {Array} params.authorizedApp 允许登录的AppID列表
+ * @param {Array} params.role 用户角色列表
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {Array} params.tags 用户标签
+ * @param {Number} params.status 用户状态
+ * @returns
+ */
+ addUser,
+ /**
+ * 修改用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#update-user
+ * @param {Object} params
+ * @param {String} params.id 要更新的用户id
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {Array} params.authorizedApp 允许登录的AppID列表
+ * @param {Array} params.role 用户角色列表
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {Array} params.tags 用户标签
+ * @param {Number} params.status 用户状态
+ * @returns
+ */
+ updateUser,
+ /**
+ * 授权用户登录应用
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#authorize-app-login
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {String} params.appId 授权的应用的AppId
+ * @returns
+ */
+ authorizeAppLogin,
+ /**
+ * 移除用户登录授权
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#remove-authorized-app
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {String} params.appId 取消授权的应用的AppId
+ * @returns
+ */
+ removeAuthorizedApp,
+ /**
+ * 设置用户允许登录的应用列表
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-authorized-app
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {Array} params.appIdList 允许登录的应用AppId列表
+ * @returns
+ */
+ setAuthorizedApp,
+ /**
+ * 注册普通用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#register-user
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.nickname 昵称
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ registerUser,
+ /**
+ * 通过邮箱+验证码注册用户
+ * @param {Object} params
+ * @param {String} params.email 邮箱
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {String} params.code 邮箱验证码
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ registerUserByEmail,
+ /**
+ * 用户名密码登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {String} params.password 密码
+ * @param {String} params.captcha 图形验证码
+ * @returns
+ */
+ login,
+ /**
+ * 短信验证码登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-sms
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.code 短信验证码
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginBySms,
+ /**
+ * App端一键登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-univerify
+ * @param {Object} params
+ * @param {String} params.access_token APP端一键登录返回的access_token
+ * @param {String} params.openid APP端一键登录返回的openid
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginByUniverify,
+ /**
+ * 微信登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-weixin
+ * @param {Object} params
+ * @param {String} params.code 微信登录返回的code
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginByWeixin,
+ /**
+ * 支付宝登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-alipay
+ * @param {Object} params
+ * @param {String} params.code 支付宝小程序客户端登录返回的code
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginByAlipay,
+ /**
+ * QQ登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-qq
+ * @param {Object} params
+ * @param {String} params.code QQ小程序登录返回的code参数
+ * @param {String} params.accessToken App端QQ登录返回的accessToken参数
+ * @param {String} params.accessTokenExpired accessToken过期时间,由App端QQ登录返回的expires_in参数计算而来,单位:毫秒
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginByQQ,
+ /**
+ * 苹果登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-apple
+ * @param {Object} params
+ * @param {String} params.identityToken 苹果登录返回的identityToken
+ * @param {String} params.nickname 用户昵称
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ loginByApple,
+ loginByWeixinMobile,
+ /**
+ * 用户退出登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#logout
+ * @returns
+ */
+ logout,
+ /**
+ * 通过短信验证码绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-sms
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.code 短信验证码
+ * @param {String} params.captcha 图形验证码
+ * @returns
+ */
+ bindMobileBySms,
+ /**
+ * 通过一键登录绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-univerify
+ * @param {Object} params
+ * @param {String} params.openid APP端一键登录返回的openid
+ * @param {String} params.access_token APP端一键登录返回的access_token
+ * @returns
+ */
+ bindMobileByUniverify,
+ /**
+ * 通过微信绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-mp-weixin
+ * @param {Object} params
+ * @param {String} params.encryptedData 微信获取手机号返回的加密信息
+ * @param {String} params.iv 微信获取手机号返回的初始向量
+ * @returns
+ */
+ bindMobileByMpWeixin,
+ /**
+ * 绑定微信
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-weixin
+ * @param {Object} params
+ * @param {String} params.code 微信登录返回的code
+ * @returns
+ */
+ bindWeixin,
+ /**
+ * 绑定QQ
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-qq
+ * @param {Object} params
+ * @param {String} params.code 小程序端QQ登录返回的code
+ * @param {String} params.accessToken APP端QQ登录返回的accessToken
+ * @param {String} params.accessTokenExpired accessToken过期时间,由App端QQ登录返回的expires_in参数计算而来,单位:毫秒
+ * @returns
+ */
+ bindQQ,
+ /**
+ * 绑定支付宝账号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-alipay
+ * @param {Object} params
+ * @param {String} params.code 支付宝小程序登录返回的code参数
+ * @returns
+ */
+ bindAlipay,
+ /**
+ * 绑定苹果账号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-apple
+ * @param {Object} params
+ * @param {String} params.identityToken 苹果登录返回identityToken
+ * @returns
+ */
+ bindApple,
+ /**
+ * 更新密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#update-pwd
+ * @param {object} params
+ * @param {string} params.oldPassword 旧密码
+ * @param {string} params.newPassword 新密码
+ * @returns {object}
+ */
+ updatePwd,
+ /**
+ * 通过短信验证码重置密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#reset-pwd-by-sms
+ * @param {object} params
+ * @param {string} params.mobile 手机号
+ * @param {string} params.mobile 短信验证码
+ * @param {string} params.password 密码
+ * @param {string} params.captcha 图形验证码
+ * @returns {object}
+ */
+ resetPwdBySms,
+ /**
+ * 通过邮箱验证码重置密码
+ * @param {object} params
+ * @param {string} params.email 邮箱
+ * @param {string} params.code 邮箱验证码
+ * @param {string} params.password 密码
+ * @param {string} params.captcha 图形验证码
+ * @returns {object}
+ */
+ resetPwdByEmail,
+ /**
+ * 注销账户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#close-account
+ * @returns
+ */
+ closeAccount,
+ /**
+ * 获取账户账户简略信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-account-info
+ */
+ getAccountInfo,
+ /**
+ * 创建图形验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#create-captcha
+ * @param {Object} params
+ * @param {String} params.scene 图形验证码使用场景
+ * @returns
+ */
+ createCaptcha,
+ /**
+ * 刷新图形验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#refresh-captcha
+ * @param {Object} params
+ * @param {String} params.scene 图形验证码使用场景
+ * @returns
+ */
+ refreshCaptcha,
+ /**
+ * 发送短信验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#send-sms-code
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.scene 短信验证码使用场景
+ * @returns
+ */
+ sendSmsCode,
+ /**
+ * 发送邮箱验证码
+ * @tutorial 需自行实现功能
+ * @param {Object} params
+ * @param {String} params.email 邮箱
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.scene 短信验证码使用场景
+ * @returns
+ */
+ sendEmailCode,
+ /**
+ * 刷新token
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#refresh-token
+ */
+ refreshToken,
+ /**
+ * 接受邀请
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#accept-invite
+ * @param {Object} params
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+ acceptInvite,
+ /**
+ * 获取受邀用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-invited-user
+ * @param {Object} params
+ * @param {Number} params.level 获取受邀用户的级数,1表示直接邀请的用户
+ * @param {Number} params.limit 返回数据大小
+ * @param {Number} params.offset 返回数据偏移
+ * @param {Boolean} params.needTotal 是否需要返回总数
+ * @returns
+ */
+ getInvitedUser,
+ /**
+ * 更新device表的push_clien_id
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-push-cid
+ * @param {object} params
+ * @param {string} params.pushClientId 客户端pushClientId
+ * @returns
+ */
+ setPushCid,
+ /**
+ * 获取支持的登录方式
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-supported-login-type
+ * @returns
+ */
+ getSupportedLoginType,
+
+ /**
+ * 解绑微信
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-weixin
+ * @returns
+ */
+ unbindWeixin,
+ /**
+ * 解绑支付宝
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-alipay
+ * @returns
+ */
+ unbindAlipay,
+ /**
+ * 解绑QQ
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq
+ * @returns
+ */
+ unbindQQ,
+ /**
+ * 解绑Apple
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-apple
+ * @returns
+ */
+ unbindApple,
+ /**
+ * 安全网络握手,目前仅处理微信小程序安全网络握手
+ */
+ secureNetworkHandshakeByWeixin,
+ /**
+ * 设置密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-pwd
+ * @returns
+ */
+ setPwd,
+ /**
+ * 外部注册用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-register
+ * @param {object} params
+ * @param {string} params.externalUid 业务系统的用户id
+ * @param {string} params.nickname 昵称
+ * @param {string} params.gender 性别
+ * @param {string} params.avatar 头像
+ * @returns {object}
+ */
+ externalRegister,
+ /**
+ * 外部用户登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-login
+ * @param {object} params
+ * @param {string} params.userId uni-id体系用户id
+ * @param {string} params.externalUid 业务系统的用户id
+ * @returns {object}
+ */
+ externalLogin,
+ /**
+ * 使用 userId 或 externalUid 获取用户信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-update-userinfo
+ * @param {object} params
+ * @param {string} params.userId uni-id体系的用户id
+ * @param {string} params.externalUid 业务系统的用户id
+ * @param {string} params.nickname 昵称
+ * @param {string} params.gender 性别
+ * @param {string} params.avatar 头像
+ * @returns {object}
+ */
+ updateUserInfoByExternal,
+ /**
+ * 获取认证ID
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-frv-certify-id
+ * @param {Object} params
+ * @param {String} params.realName 真实姓名
+ * @param {String} params.idCard 身份证号码
+ * @returns
+ */
+ getFrvCertifyId,
+ /**
+ * 查询认证结果
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-frv-auth-result
+ * @param {Object} params
+ * @param {String} params.certifyId 认证ID
+ * @param {String} params.needAlivePhoto 是否获取认证照片,Y_O (原始图片)、Y_M(虚化,背景马赛克)、N(不返图)
+ * @returns
+ */
+ getFrvAuthResult,
+ /**
+ * 获取实名信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-realname-info
+ * @param {Object} params
+ * @param {Boolean} params.decryptData 是否解密数据
+ * @returns
+ */
+ getRealNameInfo
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/en.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/en.js
new file mode 100644
index 0000000..6825461
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/en.js
@@ -0,0 +1,62 @@
+const word = {
+ login: 'login',
+ 'verify-mobile': 'verify phone number'
+}
+
+const sentence = {
+ 'uni-id-account-exists': 'Account exists',
+ 'uni-id-account-not-exists': 'Account does not exists',
+ 'uni-id-account-not-exists-in-current-app': 'Account does not exists in current app',
+ 'uni-id-account-conflict': 'User account conflict',
+ 'uni-id-account-banned': 'Account has been banned',
+ 'uni-id-account-auditing': 'Account audit in progress',
+ 'uni-id-account-audit-failed': 'Account audit failed',
+ 'uni-id-account-closed': 'Account has been closed',
+ 'uni-id-captcha-required': 'Captcha required',
+ 'uni-id-password-error': 'Password error',
+ 'uni-id-password-error-exceed-limit': 'The number of password errors is excessive',
+ 'uni-id-invalid-username': 'Invalid username',
+ 'uni-id-invalid-password': 'invalid password',
+ 'uni-id-invalid-password-super': 'Passwords must have 8-16 characters and contain uppercase letters, lowercase letters, numbers, and symbols.',
+ 'uni-id-invalid-password-strong': 'Passwords must have 8-16 characters and contain letters, numbers and symbols.',
+ 'uni-id-invalid-password-medium': 'Passwords must have 8-16 characters and contain at least two of the following: letters, numbers, and symbols.',
+ 'uni-id-invalid-password-weak': 'Passwords must have 6-16 characters and contain letters and numbers.',
+ 'uni-id-invalid-mobile': 'Invalid mobile phone number',
+ 'uni-id-invalid-email': 'Invalid email address',
+ 'uni-id-invalid-nickname': 'Invalid nickname',
+ 'uni-id-invalid-param': 'Invalid parameter',
+ 'uni-id-param-required': 'Parameter required: {param}',
+ 'uni-id-get-third-party-account-failed': 'Get third party account failed',
+ 'uni-id-get-third-party-user-info-failed': 'Get third party user info failed',
+ 'uni-id-mobile-verify-code-error': 'Verify code error or expired',
+ 'uni-id-email-verify-code-error': 'Verify code error or expired',
+ 'uni-id-admin-exists': 'Administrator exists',
+ 'uni-id-permission-error': 'Permission denied',
+ 'uni-id-system-error': 'System error',
+ 'uni-id-set-invite-code-failed': 'Set invite code failed',
+ 'uni-id-invalid-invite-code': 'Invalid invite code',
+ 'uni-id-change-inviter-forbidden': 'Change inviter is not allowed',
+ 'uni-id-bind-conflict': 'This account has been bound',
+ 'uni-id-admin-exist-in-other-apps': 'Administrator is registered in other consoles',
+ 'uni-id-unbind-failed': 'Please bind first and then unbind',
+ 'uni-id-unbind-not-supported': 'Unbinding is not supported',
+ 'uni-id-unbind-mobile-not-exists': 'This is the only way to login at the moment, please bind your phone number and then try to unbind',
+ 'uni-id-unbind-password-not-exists': 'Please set a password first',
+ 'uni-id-unsupported-request': 'Unsupported request',
+ 'uni-id-illegal-request': 'Illegal request',
+ 'uni-id-config-field-required': 'Config field required: {field}',
+ 'uni-id-config-field-invalid': 'Config field: {field} is invalid',
+ 'uni-id-frv-fail': 'Real name certify failed',
+ 'uni-id-frv-processing': 'Waiting for face recognition',
+ 'uni-id-realname-verified': 'This account has been verified',
+ 'uni-id-idcard-exists': 'The ID number has been bound to the account',
+ 'uni-id-invalid-idcard': 'ID number is invalid',
+ 'uni-id-invalid-realname': 'The name can only be Chinese characters',
+ 'uni-id-unknown-error': 'unknown error',
+ 'uni-id-realname-verify-upper-limit': 'The number of real-name certify on the day has reached the upper limit'
+}
+
+module.exports = {
+ ...word,
+ ...sentence
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/index.js
new file mode 100644
index 0000000..1f22998
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/index.js
@@ -0,0 +1,22 @@
+let lang = {
+ 'zh-Hans': require('./zh-hans'),
+ en: require('./en')
+}
+
+function mergeLanguage (lang1, lang2) {
+ const localeList = Object.keys(lang1)
+ localeList.push(...Object.keys(lang2))
+ const result = {}
+ for (let i = 0; i < localeList.length; i++) {
+ const locale = localeList[i]
+ result[locale] = Object.assign({}, lang1[locale], lang2[locale])
+ }
+ return result
+}
+
+try {
+ const langPath = require.resolve('uni-config-center/uni-id/lang/index.js')
+ lang = mergeLanguage(lang, require(langPath))
+} catch (error) { }
+
+module.exports = lang
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/zh-hans.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/zh-hans.js
new file mode 100644
index 0000000..911ce20
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lang/zh-hans.js
@@ -0,0 +1,64 @@
+const word = {
+ login: '登录',
+ 'verify-mobile': '验证手机号'
+}
+
+const sentence = {
+ 'uni-id-token-expired': '登录状态失效,token已过期',
+ 'uni-id-check-token-failed': 'token校验未通过',
+ 'uni-id-account-exists': '此账号已注册',
+ 'uni-id-account-not-exists': '此账号未注册',
+ 'uni-id-account-not-exists-in-current-app': '此账号未在该应用注册',
+ 'uni-id-account-conflict': '用户账号冲突',
+ 'uni-id-account-banned': '此账号已封禁',
+ 'uni-id-account-auditing': '此账号正在审核中',
+ 'uni-id-account-audit-failed': '此账号审核失败',
+ 'uni-id-account-closed': '此账号已注销',
+ 'uni-id-captcha-required': '请输入图形验证码',
+ 'uni-id-password-error': '密码错误',
+ 'uni-id-password-error-exceed-limit': '密码错误次数过多,请稍后再试',
+ 'uni-id-invalid-username': '用户名不合法',
+ 'uni-id-invalid-password': '密码不合法',
+ 'uni-id-invalid-password-super': '密码必须包含大小写字母、数字和特殊符号,长度8-16位',
+ 'uni-id-invalid-password-strong': '密码必须包含字母、数字和特殊符号,长度8-16位不合法',
+ 'uni-id-invalid-password-medium': '密码必须为字母、数字和特殊符号任意两种的组合,长度8-16位',
+ 'uni-id-invalid-password-weak': '密码必须包含字母和数字,长度6-16位',
+ 'uni-id-invalid-mobile': '手机号码不合法',
+ 'uni-id-invalid-email': '邮箱不合法',
+ 'uni-id-invalid-nickname': '昵称不合法',
+ 'uni-id-invalid-param': '参数错误',
+ 'uni-id-param-required': '缺少参数: {param}',
+ 'uni-id-get-third-party-account-failed': '获取第三方账号失败',
+ 'uni-id-get-third-party-user-info-failed': '获取用户信息失败',
+ 'uni-id-mobile-verify-code-error': '手机验证码错误或已过期',
+ 'uni-id-email-verify-code-error': '邮箱验证码错误或已过期',
+ 'uni-id-admin-exists': '超级管理员已存在',
+ 'uni-id-permission-error': '权限错误',
+ 'uni-id-system-error': '系统错误',
+ 'uni-id-set-invite-code-failed': '设置邀请码失败',
+ 'uni-id-invalid-invite-code': '邀请码不可用',
+ 'uni-id-change-inviter-forbidden': '禁止修改邀请人',
+ 'uni-id-bind-conflict': '此账号已被绑定',
+ 'uni-id-admin-exist-in-other-apps': '超级管理员已在其他控制台注册',
+ 'uni-id-unbind-failed': '请先绑定后再解绑',
+ 'uni-id-unbind-not-supported': '不支持解绑',
+ 'uni-id-unbind-mobile-not-exists': '这是当前唯一登录方式,请绑定手机号后再尝试解绑',
+ 'uni-id-unbind-password-not-exists': '请先设置密码在尝试解绑',
+ 'uni-id-unsupported-request': '不支持的请求方式',
+ 'uni-id-illegal-request': '非法请求',
+ 'uni-id-frv-fail': '实名认证失败',
+ 'uni-id-frv-processing': '等待人脸识别',
+ 'uni-id-realname-verified': '该账号已实名认证',
+ 'uni-id-idcard-exists': '该证件号码已绑定账号',
+ 'uni-id-invalid-idcard': '身份证号码不合法',
+ 'uni-id-invalid-realname': '姓名只能是汉字',
+ 'uni-id-unknown-error': '未知错误',
+ 'uni-id-realname-verify-upper-limit': '当日实名认证次数已达上限',
+ 'uni-id-config-field-required': '缺少配置项: {field}',
+ 'uni-id-config-field-invalid': '配置项: {field}无效'
+}
+
+module.exports = {
+ ...word,
+ ...sentence
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/README.md b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/README.md
new file mode 100644
index 0000000..47d8c4c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/README.md
@@ -0,0 +1,3 @@
+# 说明
+
+此目录内为uni-id-co基础能力,不建议直接修改。如果你发现有些逻辑加入会更好,或者此部分代码有Bug可以向我们提交PR,仓库地址:[]()。如果有特殊的需求也可以在[论坛](https://ask.dcloud.net.cn/)提出,我们可以讨论下如何实现。
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/index.js
new file mode 100644
index 0000000..dbec081
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/index.js
@@ -0,0 +1,16 @@
+const AlipayBase = require('../alipayBase')
+const protocols = require('./protocols')
+module.exports = class Auth extends AlipayBase {
+ constructor (options) {
+ super(options)
+ this._protocols = protocols
+ }
+
+ async code2Session (code) {
+ const result = await this._exec('alipay.system.oauth.token', {
+ grantType: 'authorization_code',
+ code
+ })
+ return result
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/protocols.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/protocols.js
new file mode 100644
index 0000000..cff351d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/account/protocols.js
@@ -0,0 +1,10 @@
+module.exports = {
+ code2Session: {
+ // args (fromArgs) {
+ // return fromArgs
+ // },
+ returnValue: {
+ openid: 'userId'
+ }
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/alipayBase.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/alipayBase.js
new file mode 100644
index 0000000..1462b04
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/alipay/alipayBase.js
@@ -0,0 +1,231 @@
+const {
+ camel2snakeJson,
+ snake2camelJson,
+ getOffsetDate,
+ getFullTimeStr
+} = require('../../../common/utils')
+const crypto = require('crypto')
+
+const ALIPAY_ALGORITHM_MAPPING = {
+ RSA: 'RSA-SHA1',
+ RSA2: 'RSA-SHA256'
+}
+
+module.exports = class AlipayBase {
+ constructor (options = {}) {
+ if (!options.appId) throw new Error('appId required')
+ if (!options.privateKey) throw new Error('privateKey required')
+ const defaultOptions = {
+ gateway: 'https://openapi.alipay.com/gateway.do',
+ timeout: 5000,
+ charset: 'utf-8',
+ version: '1.0',
+ signType: 'RSA2',
+ timeOffset: -new Date().getTimezoneOffset() / 60,
+ keyType: 'PKCS8'
+ }
+
+ if (options.sandbox) {
+ options.gateway = 'https://openapi.alipaydev.com/gateway.do'
+ }
+
+ this.options = Object.assign({}, defaultOptions, options)
+
+ const privateKeyType =
+ this.options.keyType === 'PKCS8' ? 'PRIVATE KEY' : 'RSA PRIVATE KEY'
+
+ this.options.privateKey = this._formatKey(
+ this.options.privateKey,
+ privateKeyType
+ )
+ if (this.options.alipayPublicKey) {
+ this.options.alipayPublicKey = this._formatKey(
+ this.options.alipayPublicKey,
+ 'PUBLIC KEY'
+ )
+ }
+ }
+
+ _formatKey (key, type) {
+ return `-----BEGIN ${type}-----\n${key}\n-----END ${type}-----`
+ }
+
+ _formatUrl (url, params) {
+ let requestUrl = url
+ // 需要放在 url 中的参数列表
+ const urlArgs = [
+ 'app_id',
+ 'method',
+ 'format',
+ 'charset',
+ 'sign_type',
+ 'sign',
+ 'timestamp',
+ 'version',
+ 'notify_url',
+ 'return_url',
+ 'auth_token',
+ 'app_auth_token'
+ ]
+
+ for (const key in params) {
+ if (urlArgs.indexOf(key) > -1) {
+ const val = encodeURIComponent(params[key])
+ requestUrl = `${requestUrl}${requestUrl.includes('?') ? '&' : '?'
+ }${key}=${val}`
+ // 删除 postData 中对应的数据
+ delete params[key]
+ }
+ }
+
+ return { execParams: params, url: requestUrl }
+ }
+
+ _getSign (method, params) {
+ const bizContent = params.bizContent || null
+ delete params.bizContent
+
+ const signParams = Object.assign({
+ method,
+ appId: this.options.appId,
+ charset: this.options.charset,
+ version: this.options.version,
+ signType: this.options.signType,
+ timestamp: getFullTimeStr(getOffsetDate(this.options.timeOffset))
+ }, params)
+
+ if (bizContent) {
+ signParams.bizContent = JSON.stringify(camel2snakeJson(bizContent))
+ }
+
+ // params key 驼峰转下划线
+ const decamelizeParams = camel2snakeJson(signParams)
+
+ // 排序
+ const signStr = Object.keys(decamelizeParams)
+ .sort()
+ .map((key) => {
+ let data = decamelizeParams[key]
+ if (Array.prototype.toString.call(data) !== '[object String]') {
+ data = JSON.stringify(data)
+ }
+ return `${key}=${data}`
+ })
+ .join('&')
+
+ // 计算签名
+ const sign = crypto
+ .createSign(ALIPAY_ALGORITHM_MAPPING[this.options.signType])
+ .update(signStr, 'utf8')
+ .sign(this.options.privateKey, 'base64')
+
+ return Object.assign(decamelizeParams, { sign })
+ }
+
+ async _exec (method, params = {}, option = {}) {
+ // 计算签名
+ const signData = this._getSign(method, params)
+ const { url, execParams } = this._formatUrl(this.options.gateway, signData)
+ const { status, data } = await uniCloud.httpclient.request(url, {
+ method: 'POST',
+ data: execParams,
+ // 按 text 返回(为了验签)
+ dataType: 'text',
+ timeout: this.options.timeout
+ })
+ if (status !== 200) throw new Error('request fail')
+ /**
+ * 示例响应格式
+ * {"alipay_trade_precreate_response":
+ * {"code": "10000","msg": "Success","out_trade_no": "111111","qr_code": "https:\/\/"},
+ * "sign": "abcde="
+ * }
+ * 或者
+ * {"error_response":
+ * {"code":"40002","msg":"Invalid Arguments","sub_code":"isv.code-invalid","sub_msg":"授权码code无效"},
+ * }
+ */
+ const result = JSON.parse(data)
+ const responseKey = `${method.replace(/\./g, '_')}_response`
+ const response = result[responseKey]
+ const errorResponse = result.error_response
+ if (response) {
+ // 按字符串验签
+ const validateSuccess = option.validateSign ? this._checkResponseSign(data, responseKey) : true
+ if (validateSuccess) {
+ if (!response.code || response.code === '10000') {
+ const errCode = 0
+ const errMsg = response.msg || ''
+ return {
+ errCode,
+ errMsg,
+ ...snake2camelJson(response)
+ }
+ }
+ const msg = response.sub_code ? `${response.sub_code} ${response.sub_msg}` : `${response.msg || 'unkonwn error'}`
+ throw new Error(msg)
+ } else {
+ throw new Error('check sign error')
+ }
+ } else if (errorResponse) {
+ throw new Error(errorResponse.sub_msg || errorResponse.msg || 'request fail')
+ }
+
+ throw new Error('request fail')
+ }
+
+ _checkResponseSign (signStr, responseKey) {
+ if (!this.options.alipayPublicKey || this.options.alipayPublicKey === '') {
+ console.warn('options.alipayPublicKey is empty')
+ // 支付宝公钥不存在时不做验签
+ return true
+ }
+
+ // 带验签的参数不存在时返回失败
+ if (!signStr) { return false }
+
+ // 根据服务端返回的结果截取需要验签的目标字符串
+ const validateStr = this._getSignStr(signStr, responseKey)
+ // 服务端返回的签名
+ const serverSign = JSON.parse(signStr).sign
+
+ // 参数存在,并且是正常的结果(不包含 sub_code)时才验签
+ const verifier = crypto.createVerify(ALIPAY_ALGORITHM_MAPPING[this.options.signType])
+ verifier.update(validateStr, 'utf8')
+ return verifier.verify(this.options.alipayPublicKey, serverSign, 'base64')
+ }
+
+ _getSignStr (originStr, responseKey) {
+ // 待签名的字符串
+ let validateStr = originStr.trim()
+ // 找到 xxx_response 开始的位置
+ const startIndex = originStr.indexOf(`${responseKey}"`)
+ // 找到最后一个 “"sign"” 字符串的位置(避免)
+ const lastIndex = originStr.lastIndexOf('"sign"')
+
+ /**
+ * 删除 xxx_response 及之前的字符串
+ * 假设原始字符串为
+ * {"xxx_response":{"code":"10000"},"sign":"jumSvxTKwn24G5sAIN"}
+ * 删除后变为
+ * :{"code":"10000"},"sign":"jumSvxTKwn24G5sAIN"}
+ */
+ validateStr = validateStr.substr(startIndex + responseKey.length + 1)
+
+ /**
+ * 删除最后一个 "sign" 及之后的字符串
+ * 删除后变为
+ * :{"code":"10000"},
+ * {} 之间就是待验签的字符串
+ */
+ validateStr = validateStr.substr(0, lastIndex)
+
+ // 删除第一个 { 之前的任何字符
+ validateStr = validateStr.replace(/^[^{]*{/g, '{')
+
+ // 删除最后一个 } 之后的任何字符
+ validateStr = validateStr.replace(/\}([^}]*)$/g, '}')
+
+ return validateStr
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/account/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/account/index.js
new file mode 100644
index 0000000..0e51b4d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/account/index.js
@@ -0,0 +1,76 @@
+const rsaPublicKeyPem = require('../rsa-public-key-pem')
+let authKeysCache = null
+
+module.exports = class Auth {
+ constructor (options) {
+ this.options = Object.assign({
+ baseUrl: 'https://appleid.apple.com',
+ timeout: 10000
+ }, options)
+ }
+
+ async _fetch (url, options) {
+ const { baseUrl } = this.options
+ return uniCloud.httpclient.request(baseUrl + url, options)
+ }
+
+ async verifyIdentityToken (identityToken) {
+ // 解密出kid,拿取key
+ const jwtHeader = identityToken.split('.')[0]
+ const { kid } = JSON.parse(Buffer.from(jwtHeader, 'base64').toString())
+ let authKeys
+ if (authKeysCache) {
+ authKeys = authKeysCache
+ } else {
+ authKeys = await this.getAuthKeys()
+ authKeysCache = authKeys
+ }
+ const usedKey = authKeys.find(item => item.kid === kid)
+
+ /**
+ * identityToken 格式
+ *
+ * {
+ * iss: 'https://appleid.apple.com',
+ * aud: 'io.dcloud.hellouniapp',
+ * exp: 1610626724,
+ * iat: 1610540324,
+ * sub: '000628.30119d332d9b45a3be4a297f9391fd5c.0403',
+ * c_hash: 'oFfgewoG36cJX00KUbj45A',
+ * email: 'x2awmap99s@privaterelay.appleid.com',
+ * email_verified: 'true',
+ * is_private_email: 'true',
+ * auth_time: 1610540324,
+ * nonce_supported: true
+ * }
+ */
+ const payload = require('jsonwebtoken').verify(
+ identityToken,
+ rsaPublicKeyPem(usedKey.n, usedKey.e),
+ {
+ algorithms: usedKey.alg
+ }
+ )
+
+ if (payload.iss !== 'https://appleid.apple.com' || payload.aud !== this.options.bundleId) {
+ throw new Error('Invalid identity token')
+ }
+
+ return {
+ openid: payload.sub,
+ email: payload.email,
+ emailVerified: payload.email_verified === 'true',
+ isPrivateEmail: payload.is_private_email === 'true'
+ }
+ }
+
+ async getAuthKeys () {
+ const { status, data } = await this._fetch('/auth/keys', {
+ method: 'GET',
+ dataType: 'json',
+ timeout: this.options.timeout
+ })
+ if (status !== 200) throw new Error('request https://appleid.apple.com/auth/keys fail')
+ return data.keys
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/rsa-public-key-pem.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/rsa-public-key-pem.js
new file mode 100644
index 0000000..e1dbb31
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/rsa-public-key-pem.js
@@ -0,0 +1,64 @@
+// http://stackoverflow.com/questions/18835132/xml-to-pem-in-node-js
+/* eslint-disable camelcase */
+function rsaPublicKeyPem (modulus_b64, exponent_b64) {
+ const modulus = Buffer.from(modulus_b64, 'base64')
+ const exponent = Buffer.from(exponent_b64, 'base64')
+
+ let modulus_hex = modulus.toString('hex')
+ let exponent_hex = exponent.toString('hex')
+
+ modulus_hex = prepadSigned(modulus_hex)
+ exponent_hex = prepadSigned(exponent_hex)
+
+ const modlen = modulus_hex.length / 2
+ const explen = exponent_hex.length / 2
+
+ const encoded_modlen = encodeLengthHex(modlen)
+ const encoded_explen = encodeLengthHex(explen)
+ const encoded_pubkey = '30' +
+ encodeLengthHex(
+ modlen +
+ explen +
+ encoded_modlen.length / 2 +
+ encoded_explen.length / 2 + 2
+ ) +
+ '02' + encoded_modlen + modulus_hex +
+ '02' + encoded_explen + exponent_hex
+
+ const der_b64 = Buffer.from(encoded_pubkey, 'hex').toString('base64')
+
+ const pem = '-----BEGIN RSA PUBLIC KEY-----\n' +
+ der_b64.match(/.{1,64}/g).join('\n') +
+ '\n-----END RSA PUBLIC KEY-----\n'
+
+ return pem
+}
+
+function prepadSigned (hexStr) {
+ const msb = hexStr[0]
+ if (msb < '0' || msb > '7') {
+ return '00' + hexStr
+ } else {
+ return hexStr
+ }
+}
+
+function toHex (number) {
+ const nstr = number.toString(16)
+ if (nstr.length % 2) return '0' + nstr
+ return nstr
+}
+
+// encode ASN.1 DER length field
+// if <=127, short form
+// if >=128, long form
+function encodeLengthHex (n) {
+ if (n <= 127) return toHex(n)
+ else {
+ const n_hex = toHex(n)
+ const length_of_length_byte = 128 + n_hex.length / 2 // 0x80+numbytes
+ return toHex(length_of_length_byte) + n_hex
+ }
+}
+
+module.exports = rsaPublicKeyPem
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/index.js
new file mode 100644
index 0000000..149c7de
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/index.js
@@ -0,0 +1,36 @@
+const WxAccount = require('./weixin/account/index')
+const QQAccount = require('./qq/account/index')
+const AliAccount = require('./alipay/account/index')
+const AppleAccount = require('./apple/account/index')
+
+const createApi = require('./share/create-api')
+
+module.exports = {
+ initWeixin: function () {
+ const oauthConfig = this.configUtils.getOauthConfig({ provider: 'weixin' })
+ return createApi(WxAccount, {
+ appId: oauthConfig.appid,
+ secret: oauthConfig.appsecret
+ })
+ },
+ initQQ: function () {
+ const oauthConfig = this.configUtils.getOauthConfig({ provider: 'qq' })
+ return createApi(QQAccount, {
+ appId: oauthConfig.appid,
+ secret: oauthConfig.appsecret
+ })
+ },
+ initAlipay: function () {
+ const oauthConfig = this.configUtils.getOauthConfig({ provider: 'alipay' })
+ return createApi(AliAccount, {
+ appId: oauthConfig.appid,
+ privateKey: oauthConfig.privateKey
+ })
+ },
+ initApple: function () {
+ const oauthConfig = this.configUtils.getOauthConfig({ provider: 'apple' })
+ return createApi(AppleAccount, {
+ bundleId: oauthConfig.bundleId
+ })
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/account/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/account/index.js
new file mode 100644
index 0000000..9b4879a
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/account/index.js
@@ -0,0 +1,97 @@
+const {
+ UniCloudError
+} = require('../../../../common/error')
+const {
+ resolveUrl
+} = require('../../../../common/utils')
+const {
+ callQQOpenApi
+} = require('../normalize')
+
+module.exports = class Auth {
+ constructor (options) {
+ this.options = Object.assign({
+ baseUrl: 'https://graph.qq.com',
+ timeout: 5000
+ }, options)
+ }
+
+ async _requestQQOpenapi ({ name, url, data, options }) {
+ const defaultOptions = {
+ method: 'GET',
+ dataType: 'json',
+ dataAsQueryString: true,
+ timeout: this.options.timeout
+ }
+ const result = await callQQOpenApi({
+ name: `auth.${name}`,
+ url: resolveUrl(this.options.baseUrl, url),
+ data,
+ options,
+ defaultOptions
+ })
+ return result
+ }
+
+ async getUserInfo ({
+ accessToken,
+ openid
+ } = {}) {
+ const url = '/user/get_user_info'
+ const result = await this._requestQQOpenapi({
+ name: 'getUserInfo',
+ url,
+ data: {
+ oauthConsumerKey: this.options.appId,
+ accessToken,
+ openid
+ }
+ })
+ return {
+ nickname: result.nickname,
+ avatar: result.figureurl_qq_1
+ }
+ }
+
+ async getOpenidByToken ({
+ accessToken
+ } = {}) {
+ const url = '/oauth2.0/me'
+ const result = await this._requestQQOpenapi({
+ name: 'getOpenidByToken',
+ url,
+ data: {
+ accessToken,
+ unionid: 1,
+ fmt: 'json'
+ }
+ })
+ if (result.clientId !== this.options.appId) {
+ throw new UniCloudError({
+ code: 'APPID_NOT_MATCH',
+ message: 'appid not match'
+ })
+ }
+ return {
+ openid: result.openid,
+ unionid: result.unionid
+ }
+ }
+
+ async code2Session ({
+ code
+ } = {}) {
+ const url = 'https://api.q.qq.com/sns/jscode2session'
+ const result = await this._requestQQOpenapi({
+ name: 'getOpenidByToken',
+ url,
+ data: {
+ grant_type: 'authorization_code',
+ appid: this.options.appId,
+ secret: this.options.secret,
+ js_code: code
+ }
+ })
+ return result
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/account/protocol.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/account/protocol.js
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/normalize.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/normalize.js
new file mode 100644
index 0000000..fcfdc1e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/qq/normalize.js
@@ -0,0 +1,85 @@
+const {
+ UniCloudError
+} = require('../../../common/error')
+const {
+ camel2snakeJson,
+ snake2camelJson
+} = require('../../../common/utils')
+
+function generateApiResult (apiName, data) {
+ if (data.ret || data.error) {
+ // 这三种都是qq的错误码规范
+ const code = data.ret || data.error || data.errcode || -2
+ const message = data.msg || data.error_description || data.errmsg || `${apiName} fail`
+ throw new UniCloudError({
+ code,
+ message
+ })
+ } else {
+ delete data.ret
+ delete data.msg
+ delete data.error
+ delete data.error_description
+ delete data.errcode
+ delete data.errmsg
+ return {
+ ...data,
+ errMsg: `${apiName} ok`,
+ errCode: 0
+ }
+ }
+}
+
+function nomalizeError (apiName, error) {
+ throw new UniCloudError({
+ code: error.code || -2,
+ message: error.message || `${apiName} fail`
+ })
+}
+
+async function callQQOpenApi ({
+ name,
+ url,
+ data,
+ options,
+ defaultOptions
+}) {
+ options = Object.assign({}, defaultOptions, options, { data: camel2snakeJson(Object.assign({}, data)) })
+ let result
+ try {
+ result = await uniCloud.httpclient.request(url, options)
+ } catch (e) {
+ return nomalizeError(name, e)
+ }
+ let resData = result.data
+ const contentType = result.headers['content-type']
+ if (
+ Buffer.isBuffer(resData) &&
+ (contentType.indexOf('text/plain') === 0 ||
+ contentType.indexOf('application/json') === 0)
+ ) {
+ try {
+ resData = JSON.parse(resData.toString())
+ } catch (e) {
+ resData = resData.toString()
+ }
+ } else if (Buffer.isBuffer(resData)) {
+ resData = {
+ buffer: resData,
+ contentType
+ }
+ }
+ return snake2camelJson(
+ generateApiResult(
+ name,
+ resData || {
+ errCode: -2,
+ errMsg: 'Request failed'
+ }
+ )
+ )
+}
+
+module.exports = {
+ callQQOpenApi
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/share/create-api.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/share/create-api.js
new file mode 100644
index 0000000..c58f1e8
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/share/create-api.js
@@ -0,0 +1,73 @@
+const {
+ isFn,
+ isPlainObject
+} = require('../../../common/utils')
+
+// 注意:不进行递归处理
+function parseParams (params = {}, rule) {
+ if (!rule || !params) {
+ return params
+ }
+ const internalKeys = ['_pre', '_purify', '_post']
+ // 转换之前的处理
+ if (rule._pre) {
+ params = rule._pre(params)
+ }
+ // 净化参数
+ let purify = { shouldDelete: new Set([]) }
+ if (rule._purify) {
+ const _purify = rule._purify
+ for (const purifyKey in _purify) {
+ _purify[purifyKey] = new Set(_purify[purifyKey])
+ }
+ purify = Object.assign(purify, _purify)
+ }
+ if (isPlainObject(rule)) {
+ for (const key in rule) {
+ const parser = rule[key]
+ if (isFn(parser) && internalKeys.indexOf(key) === -1) {
+ params[key] = parser(params)
+ } else if (typeof parser === 'string' && internalKeys.indexOf(key) === -1) {
+ // 直接转换属性名称的删除旧属性名
+ params[key] = params[parser]
+ purify.shouldDelete.add(parser)
+ }
+ }
+ } else if (isFn(rule)) {
+ params = rule(params)
+ }
+
+ if (purify.shouldDelete) {
+ for (const item of purify.shouldDelete) {
+ delete params[item]
+ }
+ }
+
+ // 转换之后的处理
+ if (rule._post) {
+ params = rule._post(params)
+ }
+
+ return params
+}
+
+function createApi (ApiClass, options) {
+ const apiInstance = new ApiClass(options)
+ return new Proxy(apiInstance, {
+ get: function (obj, prop) {
+ if (typeof obj[prop] === 'function' && prop.indexOf('_') !== 0 && obj._protocols && obj._protocols[prop]) {
+ const protocol = obj._protocols[prop]
+ return async function (params) {
+ params = parseParams(params, protocol.args)
+ let result = await obj[prop](params)
+ result = parseParams(result, protocol.returnValue)
+ return result
+ }
+ } else {
+ return obj[prop]
+ }
+ }
+ })
+}
+
+module.exports = createApi
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/account/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/account/index.js
new file mode 100644
index 0000000..7ecea84
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/account/index.js
@@ -0,0 +1,111 @@
+const {
+ callWxOpenApi,
+ buildUrl
+} = require('../normalize')
+
+module.exports = class Auth {
+ constructor (options) {
+ this.options = Object.assign({
+ baseUrl: 'https://api.weixin.qq.com',
+ timeout: 5000
+ }, options)
+ }
+
+ async _requestWxOpenapi ({ name, url, data, options }) {
+ const defaultOptions = {
+ method: 'GET',
+ dataType: 'json',
+ dataAsQueryString: true,
+ timeout: this.options.timeout
+ }
+ const result = await callWxOpenApi({
+ name: `auth.${name}`,
+ url: `${this.options.baseUrl}${buildUrl(url, data)}`,
+ data,
+ options,
+ defaultOptions
+ })
+ return result
+ }
+
+ async code2Session (code) {
+ const url = '/sns/jscode2session'
+ const result = await this._requestWxOpenapi({
+ name: 'code2Session',
+ url,
+ data: {
+ grant_type: 'authorization_code',
+ appid: this.options.appId,
+ secret: this.options.secret,
+ js_code: code
+ }
+ })
+ return result
+ }
+
+ async getOauthAccessToken (code) {
+ const url = '/sns/oauth2/access_token'
+ const result = await this._requestWxOpenapi({
+ name: 'getOauthAccessToken',
+ url,
+ data: {
+ grant_type: 'authorization_code',
+ appid: this.options.appId,
+ secret: this.options.secret,
+ code
+ }
+ })
+ if (result.expiresIn) {
+ result.expired = Date.now() + result.expiresIn * 1000
+ // delete result.expiresIn
+ }
+ return result
+ }
+
+ async getUserInfo ({
+ accessToken,
+ openid
+ } = {}) {
+ const url = '/sns/userinfo'
+ const {
+ nickname,
+ headimgurl: avatar
+ } = await this._requestWxOpenapi({
+ name: 'getUserInfo',
+ url,
+ data: {
+ accessToken,
+ openid,
+ appid: this.options.appId,
+ secret: this.options.secret,
+ scope: 'snsapi_userinfo'
+ }
+ })
+ return {
+ nickname,
+ avatar
+ }
+ }
+
+ async getPhoneNumber (accessToken, code) {
+ const url = `/wxa/business/getuserphonenumber?access_token=${accessToken}`
+ const { phoneInfo } = await this._requestWxOpenapi({
+ name: 'getPhoneNumber',
+ url,
+ data: {
+ code
+ },
+ options: {
+ method: 'POST',
+ dataAsQueryString: false,
+ headers: {
+ 'content-type': 'application/json'
+ }
+ }
+ })
+
+ return {
+ purePhoneNumber: phoneInfo.purePhoneNumber
+ }
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/normalize.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/normalize.js
new file mode 100644
index 0000000..908d916
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/normalize.js
@@ -0,0 +1,95 @@
+const {
+ UniCloudError
+} = require('../../../common/error')
+const {
+ camel2snakeJson, snake2camelJson
+} = require('../../../common/utils')
+
+function generateApiResult (apiName, data) {
+ if (data.errcode) {
+ throw new UniCloudError({
+ code: data.errcode || -2,
+ message: data.errmsg || `${apiName} fail`
+ })
+ } else {
+ delete data.errcode
+ delete data.errmsg
+ return {
+ ...data,
+ errMsg: `${apiName} ok`,
+ errCode: 0
+ }
+ }
+}
+
+function nomalizeError (apiName, error) {
+ throw new UniCloudError({
+ code: error.code || -2,
+ message: error.message || `${apiName} fail`
+ })
+}
+
+// 微信openapi接口接收蛇形(snake case)参数返回蛇形参数,这里进行转化,如果是formdata里面的参数需要在对应api实现时就转为蛇形
+async function callWxOpenApi ({
+ name,
+ url,
+ data,
+ options,
+ defaultOptions
+}) {
+ let result = {}
+ // 获取二维码的接口wxacode.get和wxacode.getUnlimited不可以传入access_token(可能有其他接口也不可以),否则会返回data format error
+ const dataCopy = camel2snakeJson(Object.assign({}, data))
+ if (dataCopy && dataCopy.access_token) {
+ delete dataCopy.access_token
+ }
+ try {
+ options = Object.assign({}, defaultOptions, options, { data: dataCopy })
+ result = await uniCloud.httpclient.request(url, options)
+ } catch (e) {
+ return nomalizeError(name, e)
+ }
+
+ // 有几个接口成功返回buffer失败返回json,对这些接口统一成返回buffer,然后分别解析
+ let resData = result.data
+ const contentType = result.headers['content-type']
+ if (
+ Buffer.isBuffer(resData) &&
+ (contentType.indexOf('text/plain') === 0 ||
+ contentType.indexOf('application/json') === 0)
+ ) {
+ try {
+ resData = JSON.parse(resData.toString())
+ } catch (e) {
+ resData = resData.toString()
+ }
+ } else if (Buffer.isBuffer(resData)) {
+ resData = {
+ buffer: resData,
+ contentType
+ }
+ }
+ return snake2camelJson(
+ generateApiResult(
+ name,
+ resData || {
+ errCode: -2,
+ errMsg: 'Request failed'
+ }
+ )
+ )
+}
+
+function buildUrl (url, data) {
+ let query = ''
+ if (data && data.accessToken) {
+ const divider = url.indexOf('?') > -1 ? '&' : '?'
+ query = `${divider}access_token=${data.accessToken}`
+ }
+ return `${url}${query}`
+}
+
+module.exports = {
+ callWxOpenApi,
+ buildUrl
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/utils.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/utils.js
new file mode 100644
index 0000000..c141016
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/third-party/weixin/utils.js
@@ -0,0 +1,87 @@
+const crypto = require('crypto')
+const {
+ isPlainObject
+} = require('../../../common/utils')
+
+// 退款通知解密key=md5(key)
+function decryptData (encryptedData, key, iv = '') {
+ // 解密
+ const decipher = crypto.createDecipheriv('aes-128-cbc', key, iv)
+ // 设置自动 padding 为 true,删除填充补位
+ decipher.setAutoPadding(true)
+ let decoded = decipher.update(encryptedData, 'base64', 'utf8')
+ decoded += decipher.final('utf8')
+ return decoded
+}
+
+function md5 (str, encoding = 'utf8') {
+ return crypto
+ .createHash('md5')
+ .update(str, encoding)
+ .digest('hex')
+}
+
+function sha256 (str, key, encoding = 'utf8') {
+ return crypto
+ .createHmac('sha256', key)
+ .update(str, encoding)
+ .digest('hex')
+}
+
+function getSignStr (obj) {
+ return Object.keys(obj)
+ .filter(key => key !== 'sign' && obj[key] !== undefined && obj[key] !== '')
+ .sort()
+ .map(key => key + '=' + obj[key])
+ .join('&')
+}
+
+function getNonceStr (length = 16) {
+ let str = ''
+ while (str.length < length) {
+ str += Math.random().toString(32).substring(2)
+ }
+ return str.substring(0, length)
+}
+
+// 简易版Object转XML,只可在微信支付时使用,不支持嵌套
+function buildXML (obj, rootName = 'xml') {
+ const content = Object.keys(obj).map(item => {
+ if (isPlainObject(obj[item])) {
+ return `<${item}>${item}>`
+ } else {
+ return `<${item}>${item}>`
+ }
+ })
+ return `<${rootName}>${content.join('')}${rootName}>`
+}
+
+function isXML (str) {
+ const reg = /^(<\?xml.*\?>)?(\r?\n)*(.|\r?\n)*<\/xml>$/i
+ return reg.test(str.trim())
+};
+
+// 简易版XML转Object,只可在微信支付时使用,不支持嵌套
+function parseXML (xml) {
+ const xmlReg = /<(?:xml|root).*?>([\s|\S]*)<\/(?:xml|root)>/
+ const str = xmlReg.exec(xml)[1]
+ const obj = {}
+ const nodeReg = /<(.*?)>(?:){0,1}<\/.*?>/g
+ let matches = null
+ // eslint-disable-next-line no-cond-assign
+ while ((matches = nodeReg.exec(str))) {
+ obj[matches[1]] = matches[2]
+ }
+ return obj
+}
+
+module.exports = {
+ decryptData,
+ md5,
+ sha256,
+ getSignStr,
+ getNonceStr,
+ buildXML,
+ parseXML,
+ isXML
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/account.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/account.js
new file mode 100644
index 0000000..1fd25f0
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/account.js
@@ -0,0 +1,98 @@
+const {
+ dbCmd,
+ userCollection
+} = require('../../common/constants')
+const {
+ USER_IDENTIFIER
+} = require('../../common/constants')
+const {
+ batchFindObjctValue,
+ getType,
+ isMatchUserApp
+} = require('../../common/utils')
+
+/**
+ * 查询满足条件的用户
+ * @param {Object} params
+ * @param {Object} params.userQuery 用户唯一标识组成的查询条件
+ * @param {Object} params.authorizedApp 用户允许登录的应用
+ * @returns userMatched 满足条件的用户列表
+ */
+async function findUser (params = {}) {
+ const {
+ userQuery,
+ authorizedApp = []
+ } = params
+ const condition = getUserQueryCondition(userQuery)
+ if (condition.length === 0) {
+ throw new Error('Invalid user query')
+ }
+ const authorizedAppType = getType(authorizedApp)
+ if (authorizedAppType !== 'string' && authorizedAppType !== 'array') {
+ throw new Error('Invalid authorized app')
+ }
+
+ let finalQuery
+
+ if (condition.length === 1) {
+ finalQuery = condition[0]
+ } else {
+ finalQuery = dbCmd.or(condition)
+ }
+ const userQueryRes = await userCollection.where(finalQuery).get()
+ return {
+ total: userQueryRes.data.length,
+ userMatched: userQueryRes.data.filter(item => {
+ return isMatchUserApp(item.dcloud_appid, authorizedApp)
+ })
+ }
+}
+
+function getUserIdentifier (userRecord = {}) {
+ const keys = Object.keys(USER_IDENTIFIER)
+ return batchFindObjctValue(userRecord, keys)
+}
+
+function getUserQueryCondition (userRecord = {}) {
+ const userIdentifier = getUserIdentifier(userRecord)
+ const condition = []
+ for (const key in userIdentifier) {
+ const value = userIdentifier[key]
+ if (!value) {
+ // 过滤所有value为假值的条件,在查询用户时没有意义
+ continue
+ }
+ const queryItem = {
+ [key]: value
+ }
+ // 为兼容用户老数据用户名及邮箱需要同时查小写及原始大小写数据
+ if (key === 'mobile') {
+ queryItem.mobile_confirmed = 1
+ } else if (key === 'email') {
+ queryItem.email_confirmed = 1
+ const email = userIdentifier.email
+ if (email.toLowerCase() !== email) {
+ condition.push({
+ email: email.toLowerCase(),
+ email_confirmed: 1
+ })
+ }
+ } else if (key === 'username') {
+ const username = userIdentifier.username
+ if (username.toLowerCase() !== username) {
+ condition.push({
+ username: username.toLowerCase()
+ })
+ }
+ } else if (key === 'identities') {
+ queryItem.identities = dbCmd.elemMatch(value)
+ }
+ condition.push(queryItem)
+ }
+ return condition
+}
+
+module.exports = {
+ findUser,
+ getUserIdentifier
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/captcha.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/captcha.js
new file mode 100644
index 0000000..0dd620e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/captcha.js
@@ -0,0 +1,76 @@
+const {
+ ERROR
+} = require('../../common/error')
+
+async function getNeedCaptcha ({
+ uid,
+ username,
+ mobile,
+ email,
+ type = 'login',
+ limitDuration = 7200000, // 两小时
+ limitTimes = 3 // 记录次数
+} = {}) {
+ const db = uniCloud.database()
+ const dbCmd = db.command
+ // 当用户最近“2小时内(limitDuration)”登录失败达到3次(limitTimes)时。要求用户提交验证码
+ const now = Date.now()
+ const uniIdLogCollection = db.collection('uni-id-log')
+ const userIdentifier = {
+ user_id: uid,
+ username,
+ mobile,
+ email
+ }
+
+ let totalKey = 0; let deleteKey = 0
+ for (const key in userIdentifier) {
+ totalKey++
+ if (!userIdentifier[key] || typeof userIdentifier[key] !== 'string') {
+ deleteKey++
+ delete userIdentifier[key]
+ }
+ }
+
+ if (deleteKey === totalKey) {
+ throw new Error('System error') // 正常情况下不会进入此条件,但是考虑到后续会有其他开发者修改此云对象,在此处做一个判断
+ }
+
+ const {
+ data: recentRecord
+ } = await uniIdLogCollection.where({
+ ip: this.getUniversalClientInfo().clientIP,
+ ...userIdentifier,
+ type,
+ create_date: dbCmd.gt(now - limitDuration)
+ })
+ .orderBy('create_date', 'desc')
+ .limit(limitTimes)
+ .get()
+ return recentRecord.length === limitTimes && recentRecord.every(item => item.state === 0)
+}
+
+async function verifyCaptcha (params = {}) {
+ const {
+ captcha,
+ scene
+ } = params
+ if (!captcha) {
+ throw {
+ errCode: ERROR.CAPTCHA_REQUIRED
+ }
+ }
+ const payload = await this.uniCaptcha.verify({
+ deviceId: this.getUniversalClientInfo().deviceId,
+ captcha,
+ scene
+ })
+ if (payload.errCode) {
+ throw payload
+ }
+}
+
+module.exports = {
+ getNeedCaptcha,
+ verifyCaptcha
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js
new file mode 100644
index 0000000..48d5688
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js
@@ -0,0 +1,135 @@
+const {
+ getWeixinPlatform
+} = require('./weixin')
+const createConfig = require('uni-config-center')
+
+const requiredConfig = {
+ 'web.weixin-h5': ['appid', 'appsecret'],
+ 'web.weixin-web': ['appid', 'appsecret'],
+ 'app.weixin': ['appid', 'appsecret'],
+ 'mp-weixin.weixin': ['appid', 'appsecret'],
+ 'app.qq': ['appid', 'appsecret'],
+ 'mp-alipay.alipay': ['appid', 'privateKey'],
+ 'app.apple': ['bundleId']
+}
+
+const uniIdConfig = createConfig({
+ pluginId: 'uni-id'
+})
+
+class ConfigUtils {
+ constructor ({
+ context
+ } = {}) {
+ this.context = context
+ this.clientInfo = context.getUniversalClientInfo()
+ const {
+ appId,
+ uniPlatform
+ } = this.clientInfo
+ this.appId = appId
+ switch (uniPlatform) {
+ case 'app':
+ case 'app-plus':
+ this.platform = 'app'
+ break
+ case 'web':
+ case 'h5':
+ this.platform = 'web'
+ break
+ default:
+ this.platform = uniPlatform
+ break
+ }
+ }
+
+ getConfigArray () {
+ let configContent
+ try {
+ configContent = require('uni-config-center/uni-id/config.json')
+ } catch (error) {
+ throw new Error('Invalid config file\n' + error.message)
+ }
+ if (configContent[0]) {
+ return Object.values(configContent)
+ }
+ configContent.isDefaultConfig = true
+ return [configContent]
+ }
+
+ getAppConfig () {
+ const configArray = this.getConfigArray()
+ return configArray.find(item => item.dcloudAppid === this.appId) || configArray.find(item => item.isDefaultConfig)
+ }
+
+ getPlatformConfig () {
+ const appConfig = this.getAppConfig()
+ if (!appConfig) {
+ throw new Error(
+ `Config for current app (${this.appId}) was not found, please check your config file or client appId`)
+ }
+ const platform = this.platform
+ if (
+ (this.platform === 'app' && appConfig['app-plus']) ||
+ (this.platform === 'web' && appConfig.h5)
+ ) {
+ throw new Error(
+ `Client platform is ${this.platform}, but ${this.platform === 'web' ? 'h5' : 'app-plus'} was found in config. Please refer to: https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary?id=m-to-co`
+ )
+ }
+
+ const defaultConfig = {
+ tokenExpiresIn: 7200,
+ tokenExpiresThreshold: 1200,
+ passwordErrorLimit: 6,
+ passwordErrorRetryTime: 3600
+ }
+ return Object.assign(defaultConfig, appConfig, appConfig[platform])
+ }
+
+ getOauthProvider ({
+ provider
+ } = {}) {
+ const clientPlatform = this.platform
+ let oatuhProivder = provider
+ if (provider === 'weixin' && clientPlatform === 'web') {
+ const weixinPlatform = getWeixinPlatform.call(this.context)
+ if (weixinPlatform === 'h5' || weixinPlatform === 'web') {
+ oatuhProivder = 'weixin-' + weixinPlatform // weixin-h5 公众号,weixin-web pc端
+ }
+ }
+ return oatuhProivder
+ }
+
+ getOauthConfig ({
+ provider
+ } = {}) {
+ const config = this.getPlatformConfig()
+ const clientPlatform = this.platform
+ const oatuhProivder = this.getOauthProvider({
+ provider
+ })
+ const requireConfigKey = requiredConfig[`${clientPlatform}.${oatuhProivder}`] || []
+ if (!config.oauth || !config.oauth[oatuhProivder]) {
+ throw new Error(`Config param required: ${clientPlatform}.oauth.${oatuhProivder}`)
+ }
+ const oauthConfig = config.oauth[oatuhProivder]
+ requireConfigKey.forEach((item) => {
+ if (!oauthConfig[item]) {
+ throw new Error(`Config param required: ${clientPlatform}.oauth.${oatuhProivder}.${item}`)
+ }
+ })
+ return oauthConfig
+ }
+
+ getHooks () {
+ if (uniIdConfig.hasFile('hooks/index.js')) {
+ return require(
+ uniIdConfig.resolve('hooks/index.js')
+ )
+ }
+ return {}
+ }
+}
+
+module.exports = ConfigUtils
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/fission.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/fission.js
new file mode 100644
index 0000000..84233c3
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/fission.js
@@ -0,0 +1,192 @@
+const {
+ dbCmd,
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+/**
+ * 获取随机邀请码,邀请码由大写字母加数字组成,由于存在手动输入邀请码的场景,从可选字符中去除 0、1、I、O
+ * @param {number} len 邀请码长度,默认6位
+ * @returns {string} 随机邀请码
+ */
+function getRandomInviteCode (len = 6) {
+ const charArr = ['2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
+ let code = ''
+ for (let i = 0; i < len; i++) {
+ code += charArr[Math.floor(Math.random() * charArr.length)]
+ }
+ return code
+}
+
+/**
+ * 获取可用的邀请码,至多尝试十次以获取可用邀请码。从10亿可选值中随机,碰撞概率较低
+ * 也有其他方案可以尝试,比如在数据库内设置一个从0开始计数的数字,每次调用此方法时使用updateAndReturn使数字加1并返回加1后的值,根据这个值生成对应的邀请码,比如(22222A + 1 == 22222B),此方式性能理论更好,但是不适用于旧项目
+ * @param {object} param
+ * @param {string} param.inviteCode 初始随机邀请码
+ */
+async function getValidInviteCode () {
+ let retry = 10
+ let code
+ let codeValid = false
+ while (retry > 0 && !codeValid) {
+ retry--
+ code = getRandomInviteCode()
+ const getUserRes = await userCollection.where({
+ my_invite_code: code
+ }).limit(1).get()
+ if (getUserRes.data.length === 0) {
+ codeValid = true
+ break
+ }
+ }
+ if (!codeValid) {
+ throw {
+ errCode: ERROR.SET_INVITE_CODE_FAILED
+ }
+ }
+ return code
+}
+
+/**
+ * 根据邀请码查询邀请人
+ * @param {object} param
+ * @param {string} param.inviteCode 邀请码
+ * @param {string} param.queryUid 受邀人id,非空时校验不可被下家或自己邀请
+ * @returns
+ */
+async function findUserByInviteCode ({
+ inviteCode,
+ queryUid
+} = {}) {
+ if (typeof inviteCode !== 'string') {
+ throw {
+ errCode: ERROR.SYSTEM_ERROR
+ }
+ }
+ // 根据邀请码查询邀请人
+ let getInviterRes
+ if (queryUid) {
+ getInviterRes = await userCollection.where({
+ _id: dbCmd.neq(queryUid),
+ inviter_uid: dbCmd.not(dbCmd.all([queryUid])),
+ my_invite_code: inviteCode
+ }).get()
+ } else {
+ getInviterRes = await userCollection.where({
+ my_invite_code: inviteCode
+ }).get()
+ }
+ if (getInviterRes.data.length > 1) {
+ // 正常情况下不可能进入此条件,以防用户自行修改数据库出错,在此做出判断
+ throw {
+ errCode: ERROR.SYSTEM_ERROR
+ }
+ }
+ const inviterRecord = getInviterRes.data[0]
+ if (!inviterRecord) {
+ throw {
+ errCode: ERROR.INVALID_INVITE_CODE
+ }
+ }
+ return inviterRecord
+}
+
+/**
+ * 根据邀请码生成邀请信息
+ * @param {object} param
+ * @param {string} param.inviteCode 邀请码
+ * @param {string} param.queryUid 受邀人id,非空时校验不可被下家或自己邀请
+ * @returns
+ */
+async function generateInviteInfo ({
+ inviteCode,
+ queryUid
+} = {}) {
+ const inviterRecord = await findUserByInviteCode({
+ inviteCode,
+ queryUid
+ })
+ // 倒叙拼接当前用户邀请链
+ const inviterUid = inviterRecord.inviter_uid || []
+ inviterUid.unshift(inviterRecord._id)
+ return {
+ inviterUid,
+ inviteTime: Date.now()
+ }
+}
+
+/**
+ * 检查当前用户是否可以接受邀请,如果可以返回用户记录
+ * @param {string} uid
+ */
+async function checkInviteInfo (uid) {
+ // 检查当前用户是否已有邀请人
+ const getUserRes = await userCollection.doc(uid).field({
+ my_invite_code: true,
+ inviter_uid: true
+ }).get()
+ const userRecord = getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ if (userRecord.inviter_uid && userRecord.inviter_uid.length > 0) {
+ throw {
+ errCode: ERROR.CHANGE_INVITER_FORBIDDEN
+ }
+ }
+ return userRecord
+}
+
+/**
+ * 指定用户接受邀请码邀请
+ * @param {object} param
+ * @param {string} param.uid 用户uid
+ * @param {string} param.inviteCode 邀请人的邀请码
+ * @returns
+ */
+async function acceptInvite ({
+ uid,
+ inviteCode
+} = {}) {
+ await checkInviteInfo(uid)
+ const {
+ inviterUid,
+ inviteTime
+ } = await generateInviteInfo({
+ inviteCode,
+ queryUid: uid
+ })
+
+ if (inviterUid === uid) {
+ throw {
+ errCode: ERROR.INVALID_INVITE_CODE
+ }
+ }
+
+ // 更新当前用户的邀请人信息
+ await userCollection.doc(uid).update({
+ inviter_uid: inviterUid,
+ invite_time: inviteTime
+ })
+
+ // 更新当前用户邀请的用户的邀请人信息,这步可能较为耗时
+ await userCollection.where({
+ inviter_uid: uid
+ }).update({
+ inviter_uid: dbCmd.push(inviterUid)
+ })
+
+ return {
+ errCode: 0,
+ errMsg: ''
+ }
+}
+
+module.exports = {
+ acceptInvite,
+ generateInviteInfo,
+ getValidInviteCode
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/login.js
new file mode 100644
index 0000000..ea8532d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/login.js
@@ -0,0 +1,246 @@
+const {
+ findUser
+} = require('./account')
+const {
+ userCollection,
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ logout
+} = require('./logout')
+const PasswordUtils = require('./password')
+
+async function realPreLogin (params = {}) {
+ const {
+ user
+ } = params
+ const appId = this.getUniversalClientInfo().appId
+ const {
+ total,
+ userMatched
+ } = await findUser({
+ userQuery: user,
+ authorizedApp: appId
+ })
+ if (userMatched.length === 0) {
+ if (total > 0) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS_IN_CURRENT_APP
+ }
+ }
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ } else if (userMatched.length > 1) {
+ throw {
+ errCode: ERROR.ACCOUNT_CONFLICT
+ }
+ }
+ const userRecord = userMatched[0]
+ checkLoginUserRecord(userRecord)
+ return userRecord
+}
+
+async function preLogin (params = {}) {
+ const {
+ user
+ } = params
+ try {
+ const user = await realPreLogin.call(this, params)
+ return user
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ data: user,
+ type: LOG_TYPE.LOGIN
+ })
+ throw error
+ }
+}
+
+async function preLoginWithPassword (params = {}) {
+ const {
+ user,
+ password
+ } = params
+ try {
+ const userRecord = await realPreLogin.call(this, params)
+ const {
+ passwordErrorLimit,
+ passwordErrorRetryTime
+ } = this.config
+ const {
+ clientIP
+ } = this.getUniversalClientInfo()
+ // 根据ip地址,密码错误次数过多,锁定登录
+ let loginIPLimit = userRecord.login_ip_limit || []
+ // 清理无用记录
+ loginIPLimit = loginIPLimit.filter(item => item.last_error_time > Date.now() - passwordErrorRetryTime * 1000)
+ let currentIPLimit = loginIPLimit.find(item => item.ip === clientIP)
+ if (currentIPLimit && currentIPLimit.error_times >= passwordErrorLimit) {
+ throw {
+ errCode: ERROR.PASSWORD_ERROR_EXCEED_LIMIT
+ }
+ }
+ const passwordUtils = new PasswordUtils({
+ userRecord,
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+
+ const {
+ success: checkPasswordSuccess,
+ refreshPasswordInfo
+ } = passwordUtils.checkUserPassword({
+ password
+ })
+ if (!checkPasswordSuccess) {
+ // 更新用户ip对应的密码错误记录
+ if (!currentIPLimit) {
+ currentIPLimit = {
+ ip: clientIP,
+ error_times: 1,
+ last_error_time: Date.now()
+ }
+ loginIPLimit.push(currentIPLimit)
+ } else {
+ currentIPLimit.error_times++
+ currentIPLimit.last_error_time = Date.now()
+ }
+ await userCollection.doc(userRecord._id).update({
+ login_ip_limit: loginIPLimit
+ })
+ throw {
+ errCode: ERROR.PASSWORD_ERROR
+ }
+ }
+ const extraData = {}
+ if (refreshPasswordInfo) {
+ extraData.password = refreshPasswordInfo.passwordHash
+ extraData.password_secret_version = refreshPasswordInfo.version
+ }
+
+ const currentIPLimitIndex = loginIPLimit.indexOf(currentIPLimit)
+ if (currentIPLimitIndex > -1) {
+ loginIPLimit.splice(currentIPLimitIndex, 1)
+ }
+ extraData.login_ip_limit = loginIPLimit
+ return {
+ user: userRecord,
+ extraData
+ }
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ data: user,
+ type: LOG_TYPE.LOGIN
+ })
+ throw error
+ }
+}
+
+function checkLoginUserRecord (user) {
+ switch (user.status) {
+ case undefined:
+ case 0:
+ break
+ case 1:
+ throw {
+ errCode: ERROR.ACCOUNT_BANNED
+ }
+ case 2:
+ throw {
+ errCode: ERROR.ACCOUNT_AUDITING
+ }
+ case 3:
+ throw {
+ errCode: ERROR.ACCOUNT_AUDIT_FAILED
+ }
+ case 4:
+ throw {
+ errCode: ERROR.ACCOUNT_CLOSED
+ }
+ default:
+ break
+ }
+}
+
+async function thirdPartyLogin (params = {}) {
+ const {
+ user
+ } = params
+ return {
+ mobileConfirmed: !!user.mobile_confirmed,
+ emailConfirmed: !!user.email_confirmed
+ }
+}
+
+async function postLogin (params = {}) {
+ const {
+ user,
+ extraData,
+ isThirdParty = false
+ } = params
+ const {
+ clientIP
+ } = this.getUniversalClientInfo()
+ const uniIdToken = this.getUniversalUniIdToken()
+ const uid = user._id
+ const updateData = {
+ last_login_date: Date.now(),
+ last_login_ip: clientIP,
+ ...extraData
+ }
+ const createTokenRes = await this.uniIdCommon.createToken({
+ uid
+ })
+
+ const {
+ errCode,
+ token,
+ tokenExpired
+ } = createTokenRes
+ if (errCode) {
+ throw createTokenRes
+ }
+
+ if (uniIdToken) {
+ try {
+ await logout.call(this)
+ } catch (error) {}
+ }
+
+ await userCollection.doc(uid).update(updateData)
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: LOG_TYPE.LOGIN
+ })
+ return {
+ errCode: 0,
+ newToken: {
+ token,
+ tokenExpired
+ },
+ uid,
+ ...(
+ isThirdParty
+ ? thirdPartyLogin({
+ user
+ })
+ : {}
+ ),
+ passwordConfirmed: !!user.password
+ }
+}
+
+module.exports = {
+ preLogin,
+ postLogin,
+ checkLoginUserRecord,
+ preLoginWithPassword
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/logout.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/logout.js
new file mode 100644
index 0000000..ddcbb97
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/logout.js
@@ -0,0 +1,49 @@
+const {
+ dbCmd,
+ LOG_TYPE,
+ deviceCollection,
+ userCollection
+} = require('../../common/constants')
+
+async function logout () {
+ const {
+ deviceId
+ } = this.getUniversalClientInfo()
+ const uniIdToken = this.getUniversalUniIdToken()
+ const payload = await this.uniIdCommon.checkToken(
+ uniIdToken,
+ {
+ autoRefresh: false
+ }
+ )
+ if (payload.errCode) {
+ throw payload
+ }
+ const uid = payload.uid
+
+ // 删除token
+ await userCollection.doc(uid).update({
+ token: dbCmd.pull(uniIdToken)
+ })
+
+ // 仅当device表的device_id和user_id均对应时才进行更新
+ await deviceCollection.where({
+ device_id: deviceId,
+ user_id: uid
+ }).update({
+ token_expired: 0
+ })
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: LOG_TYPE.LOGOUT
+ })
+ return {
+ errCode: 0
+ }
+}
+
+module.exports = {
+ logout
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/password.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/password.js
new file mode 100644
index 0000000..0e46757
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/password.js
@@ -0,0 +1,261 @@
+const {
+ getType
+} = require('../../common/utils')
+const crypto = require('crypto')
+const createConfig = require('uni-config-center')
+const shareConfig = createConfig({
+ pluginId: 'uni-id'
+})
+let customPassword = {}
+if (shareConfig.hasFile('custom-password.js')) {
+ customPassword = shareConfig.requireFile('custom-password.js') || {}
+}
+
+const passwordAlgorithmMap = {
+ UNI_ID_HMAC_SHA1: 'hmac-sha1',
+ UNI_ID_HMAC_SHA256: 'hmac-sha256',
+ UNI_ID_CUSTOM: 'custom'
+}
+
+const passwordAlgorithmKeyMap = Object.keys(passwordAlgorithmMap).reduce((res, item) => {
+ res[passwordAlgorithmMap[item]] = item
+ return res
+}, {})
+
+const passwordExtMethod = {
+ [passwordAlgorithmMap.UNI_ID_HMAC_SHA1]: {
+ verify ({ password }) {
+ const { password_secret_version: passwordSecretVersion } = this.userRecord
+
+ const passwordSecret = this._getSecretByVersion({
+ version: passwordSecretVersion
+ })
+
+ const { passwordHash } = this.encrypt({
+ password,
+ passwordSecret
+ })
+
+ return passwordHash === this.userRecord.password
+ },
+ encrypt ({ password, passwordSecret }) {
+ const { value: secret, version } = passwordSecret
+ const hmac = crypto.createHmac('sha1', secret.toString('ascii'))
+
+ hmac.update(password)
+
+ return {
+ passwordHash: hmac.digest('hex'),
+ version
+ }
+ }
+ },
+ [passwordAlgorithmMap.UNI_ID_HMAC_SHA256]: {
+ verify ({ password }) {
+ const parse = this._parsePassword()
+ const passwordHash = crypto.createHmac(parse.algorithm, parse.salt).update(password).digest('hex')
+
+ return passwordHash === parse.hash
+ },
+ encrypt ({ password, passwordSecret }) {
+ const { version } = passwordSecret
+
+ // 默认使用 sha256 加密算法
+ const salt = crypto.randomBytes(10).toString('hex')
+ const sha256Hash = crypto.createHmac(passwordAlgorithmMap.UNI_ID_HMAC_SHA256.substring(5), salt).update(password).digest('hex')
+ const algorithm = passwordAlgorithmKeyMap[passwordAlgorithmMap.UNI_ID_HMAC_SHA256]
+ // B 为固定值,对应 PasswordMethodMaps 中的 sha256算法
+ // hash 格式 $[PasswordMethodFlagMapsKey]$[salt size]$[salt][Hash]
+ const passwordHash = `$${algorithm}$${salt.length}$${salt}${sha256Hash}`
+
+ return {
+ passwordHash,
+ version
+ }
+ }
+ },
+ [passwordAlgorithmMap.UNI_ID_CUSTOM]: {
+ verify ({ password, passwordSecret }) {
+ if (!customPassword.verifyPassword) throw new Error('verifyPassword method not found in custom password file')
+
+ // return true or false
+ return customPassword.verifyPassword({
+ password,
+ passwordSecret,
+ userRecord: this.userRecord,
+ clientInfo: this.clientInfo
+ })
+ },
+ encrypt ({ password, passwordSecret }) {
+ if (!customPassword.encryptPassword) throw new Error('encryptPassword method not found in custom password file')
+
+ // return object<{passwordHash: string, version: number}>
+ return customPassword.encryptPassword({
+ password,
+ passwordSecret,
+ clientInfo: this.clientInfo
+ })
+ }
+ }
+}
+
+class PasswordUtils {
+ constructor ({
+ userRecord = {},
+ clientInfo,
+ passwordSecret
+ } = {}) {
+ if (!clientInfo) throw new Error('Invalid clientInfo')
+ if (!passwordSecret) throw new Error('Invalid password secret')
+
+ this.clientInfo = clientInfo
+ this.userRecord = userRecord
+ this.passwordSecret = this.prePasswordSecret(passwordSecret)
+ }
+
+ /**
+ * passwordSecret 预处理
+ * @param passwordSecret
+ * @return {*[]}
+ */
+ prePasswordSecret (passwordSecret) {
+ const newPasswordSecret = []
+ if (getType(passwordSecret) === 'string') {
+ newPasswordSecret.push({
+ value: passwordSecret,
+ type: passwordAlgorithmMap.UNI_ID_HMAC_SHA1
+ })
+ } else if (getType(passwordSecret) === 'array') {
+ for (const secret of passwordSecret.sort((a, b) => a.version - b.version)) {
+ newPasswordSecret.push({
+ ...secret,
+ // 没有 type 设置默认 type hmac-sha1
+ type: secret.type || passwordAlgorithmMap.UNI_ID_HMAC_SHA1
+ })
+ }
+ } else {
+ throw new Error('Invalid password secret')
+ }
+
+ return newPasswordSecret
+ }
+
+ /**
+ * 获取最新加密密钥
+ * @return {*}
+ * @private
+ */
+ _getLastestSecret () {
+ return this.passwordSecret[this.passwordSecret.length - 1]
+ }
+
+ _getOldestSecret () {
+ return this.passwordSecret[0]
+ }
+
+ _getSecretByVersion ({ version } = {}) {
+ if (!version && version !== 0) {
+ return this._getOldestSecret()
+ }
+ if (this.passwordSecret.length === 1) {
+ return this.passwordSecret[0]
+ }
+ return this.passwordSecret.find(item => item.version === version)
+ }
+
+ /**
+ * 获取密码的验证/加密方法
+ * @param passwordSecret
+ * @return {*[]}
+ * @private
+ */
+ _getPasswordExt (passwordSecret) {
+ const ext = passwordExtMethod[passwordSecret.type]
+ if (!ext) {
+ throw new Error(`暂不支持 ${passwordSecret.type} 类型的加密算法`)
+ }
+
+ const passwordExt = Object.create(null)
+
+ for (const key in ext) {
+ passwordExt[key] = ext[key].bind(Object.assign(this, Object.keys(ext).reduce((res, item) => {
+ if (item !== key) {
+ res[item] = ext[item].bind(this)
+ }
+ return res
+ }, {})))
+ }
+
+ return passwordExt
+ }
+
+ _parsePassword () {
+ const [algorithmKey = '', cost = 0, hashStr = ''] = this.userRecord.password.split('$').filter(key => key)
+ const algorithm = passwordAlgorithmMap[algorithmKey] ? passwordAlgorithmMap[algorithmKey].substring(5) : null
+ const salt = hashStr.substring(0, Number(cost))
+ const hash = hashStr.substring(Number(cost))
+
+ return {
+ algorithm,
+ salt,
+ hash
+ }
+ }
+
+ /**
+ * 生成加密后的密码
+ * @param {String} password 密码
+ */
+ generatePasswordHash ({ password }) {
+ if (!password) throw new Error('Invalid password')
+
+ const passwordSecret = this._getLastestSecret()
+ const ext = this._getPasswordExt(passwordSecret)
+
+ const { passwordHash, version } = ext.encrypt({
+ password,
+ passwordSecret
+ })
+
+ return {
+ passwordHash,
+ version
+ }
+ }
+
+ /**
+ * 密码校验
+ * @param {String} password
+ * @param {Boolean} autoRefresh
+ * @return {{refreshPasswordInfo: {version: *, passwordHash: *}, success: boolean}|{success: boolean}}
+ */
+ checkUserPassword ({ password, autoRefresh = true }) {
+ if (!password) throw new Error('Invalid password')
+
+ const { password_secret_version: passwordSecretVersion } = this.userRecord
+ const passwordSecret = this._getSecretByVersion({
+ version: passwordSecretVersion
+ })
+ const ext = this._getPasswordExt(passwordSecret)
+
+ const success = ext.verify({ password, passwordSecret })
+
+ if (!success) {
+ return {
+ success: false
+ }
+ }
+
+ let refreshPasswordInfo
+ if (autoRefresh && passwordSecretVersion !== this._getLastestSecret().version) {
+ refreshPasswordInfo = this.generatePasswordHash({ password })
+ }
+
+ return {
+ success: true,
+ refreshPasswordInfo
+ }
+ }
+}
+
+module.exports = PasswordUtils
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js
new file mode 100644
index 0000000..7ea612d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js
@@ -0,0 +1,152 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+function getQQPlatform () {
+ const platform = this.clientPlatform
+ switch (platform) {
+ case 'app':
+ case 'app-plus':
+ return 'app'
+ case 'mp-qq':
+ return 'mp'
+ default:
+ throw new Error('Unsupported qq platform')
+ }
+}
+
+async function saveQQUserKey ({
+ openid,
+ sessionKey, // QQ小程序用户sessionKey
+ accessToken, // App端QQ用户accessToken
+ accessTokenExpired // App端QQ用户accessToken过期时间
+} = {}) {
+ // 微信公众平台、开放平台refreshToken有效期均为30天(微信没有在网络请求里面返回30天这个值,务必注意未来可能出现调整,需及时更新此处逻辑)。
+ // 此前QQ开放平台有调整过accessToken的过期时间:[access_token有效期由90天缩短至30天](https://wiki.connect.qq.com/%E3%80%90qq%E4%BA%92%E8%81%94%E3%80%91access_token%E6%9C%89%E6%95%88%E6%9C%9F%E8%B0%83%E6%95%B4)
+ const appId = this.getUniversalClientInfo().appId
+ const qqPlatform = getQQPlatform.call(this)
+ const keyObj = {
+ dcloudAppid: appId,
+ openid,
+ platform: 'qq-' + qqPlatform
+ }
+ switch (qqPlatform) {
+ case 'mp':
+ await this.uniOpenBridge.setSessionKey(keyObj, {
+ session_key: sessionKey
+ }, 30 * 24 * 60 * 60)
+ break
+ case 'app':
+ case 'h5':
+ case 'web':
+ await this.uniOpenBridge.setUserAccessToken(keyObj, {
+ access_token: accessToken,
+ access_token_expired: accessTokenExpired
+ }, accessTokenExpired
+ ? Math.floor((accessTokenExpired - Date.now()) / 1000)
+ : 30 * 24 * 60 * 60
+ )
+ break
+ default:
+ break
+ }
+}
+
+function generateQQCache ({
+ sessionKey, // QQ小程序用户sessionKey
+ accessToken, // App端QQ用户accessToken
+ accessTokenExpired // App端QQ用户accessToken过期时间
+} = {}) {
+ const platform = getQQPlatform.call(this)
+ let cache
+ switch (platform) {
+ case 'app':
+ cache = {
+ access_token: accessToken,
+ access_token_expired: accessTokenExpired
+ }
+ break
+ case 'mp':
+ cache = {
+ session_key: sessionKey
+ }
+ break
+ default:
+ throw new Error('Unsupported qq platform')
+ }
+ return {
+ third_party: {
+ [`${platform}_qq`]: cache
+ }
+ }
+}
+
+function getQQOpenid ({
+ userRecord
+} = {}) {
+ const qqPlatform = getQQPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+ const qqOpenidObj = userRecord.qq_openid
+ if (!qqOpenidObj) {
+ return
+ }
+ return qqOpenidObj[`${qqPlatform}_${appId}`] || qqOpenidObj[qqPlatform]
+}
+
+async function getQQCacheFallback ({
+ userRecord,
+ key
+} = {}) {
+ const platform = getQQPlatform.call(this)
+ const thirdParty = userRecord && userRecord.third_party
+ if (!thirdParty) {
+ return
+ }
+ const qqCache = thirdParty[`${platform}_qq`]
+ return qqCache && qqCache[key]
+}
+
+async function getQQCache ({
+ uid,
+ userRecord,
+ key
+} = {}) {
+ const qqPlatform = getQQPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+
+ if (!userRecord) {
+ const getUserRes = await userCollection.doc(uid).get()
+ userRecord = getUserRes.data[0]
+ }
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ const openid = getQQOpenid.call(this, {
+ userRecord
+ })
+ const getCacheMethod = qqPlatform === 'mp' ? 'getSessionKey' : 'getUserAccessToken'
+ const userKey = await this.uniOpenBridge[getCacheMethod]({
+ dcloudAppid: appId,
+ platform: 'qq-' + qqPlatform,
+ openid
+ })
+ if (userKey) {
+ return userKey[key]
+ }
+ return getQQCacheFallback({
+ userRecord,
+ key
+ })
+}
+
+module.exports = {
+ getQQPlatform,
+ generateQQCache,
+ getQQCache,
+ saveQQUserKey
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
new file mode 100644
index 0000000..d937610
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
@@ -0,0 +1,229 @@
+const {
+ userCollection,
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ findUser
+} = require('./account')
+const {
+ getValidInviteCode,
+ generateInviteInfo
+} = require('./fission')
+const {
+ logout
+} = require('./logout')
+const PasswordUtils = require('./password')
+const merge = require('lodash.merge')
+
+async function realPreRegister (params = {}) {
+ const {
+ user
+ } = params
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: user,
+ authorizedApp: this.getUniversalClientInfo().appId
+ })
+ if (userMatched.length > 0) {
+ throw {
+ errCode: ERROR.ACCOUNT_EXISTS
+ }
+ }
+}
+
+async function preRegister (params = {}) {
+ try {
+ await realPreRegister.call(this, params)
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.REGISTER
+ })
+ throw error
+ }
+}
+
+async function preRegisterWithPassword (params = {}) {
+ const {
+ user,
+ password
+ } = params
+ await preRegister.call(this, {
+ user
+ })
+ const passwordUtils = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+ const {
+ passwordHash,
+ version
+ } = passwordUtils.generatePasswordHash({
+ password
+ })
+ const extraData = {
+ password: passwordHash,
+ password_secret_version: version
+ }
+ return {
+ user,
+ extraData
+ }
+}
+
+async function thirdPartyRegister ({
+ user = {}
+} = {}) {
+ return {
+ mobileConfirmed: !!(user.mobile && user.mobile_confirmed) || false,
+ emailConfirmed: !!(user.email && user.email_confirmed) || false
+ }
+}
+
+async function postRegister (params = {}) {
+ const {
+ user,
+ extraData = {},
+ isThirdParty = false,
+ inviteCode
+ } = params
+ const {
+ appId,
+ appName,
+ appVersion,
+ appVersionCode,
+ channel,
+ scene,
+ clientIP,
+ osName
+ } = this.getUniversalClientInfo()
+ const uniIdToken = this.getUniversalUniIdToken()
+
+ merge(user, extraData)
+
+ const registerChannel = channel || scene
+ user.register_env = {
+ appid: appId || '',
+ uni_platform: this.clientPlatform || '',
+ os_name: osName || '',
+ app_name: appName || '',
+ app_version: appVersion || '',
+ app_version_code: appVersionCode || '',
+ channel: registerChannel ? registerChannel + '' : '', // channel可能为数字,统一存为字符串
+ client_ip: clientIP || ''
+ }
+
+ user.register_date = Date.now()
+ user.dcloud_appid = [appId]
+
+ if (user.username) {
+ user.username = user.username.toLowerCase()
+ }
+ if (user.email) {
+ user.email = user.email.toLowerCase()
+ }
+
+ const {
+ autoSetInviteCode, // 注册时自动设置邀请码
+ forceInviteCode, // 必须有邀请码才允许注册,注意此逻辑不可对admin生效
+ userRegisterDefaultRole // 用户注册时配置的默认角色
+ } = this.config
+ if (autoSetInviteCode) {
+ user.my_invite_code = await getValidInviteCode()
+ }
+
+ // 如果用户注册默认角色配置存在且不为空数组
+ if (userRegisterDefaultRole && userRegisterDefaultRole.length) {
+ // 将用户已有的角色和配置的默认角色合并成一个数组,并去重
+ user.role = Array.from(new Set([...(user.role || []), ...userRegisterDefaultRole]))
+ }
+
+ const isAdmin = user.role && user.role.includes('admin')
+
+ if (forceInviteCode && !isAdmin && !inviteCode) {
+ throw {
+ errCode: ERROR.INVALID_INVITE_CODE
+ }
+ }
+
+ if (inviteCode) {
+ const {
+ inviterUid,
+ inviteTime
+ } = await generateInviteInfo({
+ inviteCode
+ })
+ user.inviter_uid = inviterUid
+ user.invite_time = inviteTime
+ }
+
+ if (uniIdToken) {
+ try {
+ await logout.call(this)
+ } catch (error) { }
+ }
+
+ const beforeRegister = this.hooks.beforeRegister
+ let userRecord = user
+ if (beforeRegister) {
+ userRecord = await beforeRegister({
+ userRecord,
+ clientInfo: this.getUniversalClientInfo()
+ })
+ }
+
+ const {
+ id: uid
+ } = await userCollection.add(userRecord)
+
+ const createTokenRes = await this.uniIdCommon.createToken({
+ uid
+ })
+
+ const {
+ errCode,
+ token,
+ tokenExpired
+ } = createTokenRes
+
+ if (errCode) {
+ throw createTokenRes
+ }
+
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: LOG_TYPE.REGISTER
+ })
+
+ return {
+ errCode: 0,
+ uid,
+ newToken: {
+ token,
+ tokenExpired
+ },
+ ...(
+ isThirdParty
+ ? thirdPartyRegister({
+ user: {
+ ...userRecord,
+ _id: uid
+ }
+ })
+ : {}
+ ),
+ passwordConfirmed: !!userRecord.password
+ }
+}
+
+module.exports = {
+ preRegister,
+ preRegisterWithPassword,
+ postRegister
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js
new file mode 100644
index 0000000..8431551
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js
@@ -0,0 +1,164 @@
+const {
+ findUser
+} = require('./account')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ userCollection, dbCmd, USER_IDENTIFIER
+} = require('../../common/constants')
+const {
+ getUserIdentifier
+} = require('../../lib/utils/account')
+
+const {
+ batchFindObjctValue
+} = require('../../common/utils')
+const merge = require('lodash.merge')
+
+/**
+ *
+ * @param {object} param
+ * @param {string} param.uid 用户id
+ * @param {string} param.bindAccount 要绑定的三方账户、手机号或邮箱
+ */
+async function preBind ({
+ uid,
+ bindAccount,
+ logType
+} = {}) {
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: bindAccount,
+ authorizedApp: this.getUniversalClientInfo().appId
+ })
+ if (userMatched.length > 0) {
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: logType,
+ success: false
+ })
+ throw {
+ errCode: ERROR.BIND_CONFLICT
+ }
+ }
+}
+
+async function postBind ({
+ uid,
+ extraData = {},
+ bindAccount,
+ logType
+} = {}) {
+ await userCollection.doc(uid).update(merge(bindAccount, extraData))
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: logType
+ })
+ return {
+ errCode: 0
+ }
+}
+
+async function preUnBind ({
+ uid,
+ unBindAccount,
+ logType
+}) {
+ const notUnBind = ['username', 'mobile', 'email']
+ const userIdentifier = getUserIdentifier(unBindAccount)
+ const condition = Object.keys(userIdentifier).reduce((res, key) => {
+ if (userIdentifier[key]) {
+ if (notUnBind.includes(key)) {
+ throw {
+ errCode: ERROR.UNBIND_NOT_SUPPORTED
+ }
+ }
+
+ res.push({
+ [key]: userIdentifier[key]
+ })
+ }
+
+ return res
+ }, [])
+ const currentUnBindAccount = Object.keys(userIdentifier).reduce((res, key) => {
+ if (userIdentifier[key]) {
+ res.push(key)
+ }
+ return res
+ }, [])
+ const { data: users } = await userCollection.where(dbCmd.and(
+ { _id: uid },
+ dbCmd.or(condition)
+ )).get()
+
+ if (users.length <= 0) {
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: logType,
+ success: false
+ })
+ throw {
+ errCode: ERROR.UNBIND_FAIL
+ }
+ }
+
+ const [user] = users
+ const otherAccounts = batchFindObjctValue(user, Object.keys(USER_IDENTIFIER).filter(key => !notUnBind.includes(key) && !currentUnBindAccount.includes(key)))
+ let hasOtherAccountBind = false
+
+ for (const key in otherAccounts) {
+ if (otherAccounts[key]) {
+ hasOtherAccountBind = true
+ break
+ }
+ }
+
+ // 如果没有其他第三方登录方式
+ if (!hasOtherAccountBind) {
+ // 存在用户名或者邮箱但是没有设置过没密码就提示设置密码
+ if ((user.username || user.email) && !user.password) {
+ throw {
+ errCode: ERROR.UNBIND_PASSWORD_NOT_EXISTS
+ }
+ }
+ // 账号任何登录方式都没有就优先绑定手机号
+ if (!user.mobile) {
+ throw {
+ errCode: ERROR.UNBIND_MOBILE_NOT_EXISTS
+ }
+ }
+ }
+}
+
+async function postUnBind ({
+ uid,
+ unBindAccount,
+ logType
+}) {
+ await userCollection.doc(uid).update(unBindAccount)
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: logType
+ })
+ return {
+ errCode: 0
+ }
+}
+
+module.exports = {
+ preBind,
+ postBind,
+ preUnBind,
+ postUnBind
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js
new file mode 100644
index 0000000..21c70e9
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js
@@ -0,0 +1,81 @@
+const {
+ setMobileVerifyCode
+} = require('./verify-code')
+const {
+ getVerifyCode
+} = require('../../common/utils')
+
+/**
+ * 发送短信
+ * @param {object} param
+ * @param {string} param.mobile 手机号
+ * @param {object} param.code 可选,验证码
+ * @param {object} param.scene 短信场景
+ * @param {object} param.templateId 可选,短信模板id
+ * @returns
+ */
+async function sendSmsCode ({
+ mobile,
+ code,
+ scene,
+ templateId
+} = {}) {
+ const requiredParams = [
+ 'name',
+ 'smsKey',
+ 'smsSecret',
+ 'codeExpiresIn'
+ ]
+ const smsConfig = (this.config.service && this.config.service.sms) || {}
+ for (let i = 0; i < requiredParams.length; i++) {
+ const key = requiredParams[i]
+ if (!smsConfig[key]) {
+ throw new Error(`Missing config param: service.sms.${key}`)
+ }
+ }
+ if (!code) {
+ code = getVerifyCode()
+ }
+ let action
+ switch (scene) {
+ case 'login-by-sms':
+ action = this.t('login')
+ break
+ default:
+ action = this.t('verify-mobile')
+ break
+ }
+ const sceneConfig = (smsConfig.scene || {})[scene] || {}
+ if (!templateId) {
+ templateId = sceneConfig.templateId
+ }
+ if (!templateId) {
+ throw new Error('"templateId" is required')
+ }
+ const codeExpiresIn = sceneConfig.codeExpiresIn || smsConfig.codeExpiresIn
+ await setMobileVerifyCode.call(this, {
+ mobile,
+ code,
+ expiresIn: codeExpiresIn,
+ scene
+ })
+ await uniCloud.sendSms({
+ smsKey: smsConfig.smsKey,
+ smsSecret: smsConfig.smsSecret,
+ phone: mobile,
+ templateId,
+ data: {
+ name: smsConfig.name,
+ code,
+ action,
+ expMinute: '' + Math.round(codeExpiresIn / 60)
+ }
+ })
+ return {
+ errCode: 0
+ }
+}
+
+module.exports = {
+ sendSmsCode
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/unified-login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/unified-login.js
new file mode 100644
index 0000000..eac7a51
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/unified-login.js
@@ -0,0 +1,106 @@
+const {
+ checkLoginUserRecord,
+ postLogin
+} = require('./login')
+const {
+ postRegister
+} = require('./register')
+const {
+ findUser
+} = require('./account')
+const {
+ ERROR
+} = require('../../common/error')
+
+async function realPreUnifiedLogin (params = {}) {
+ const {
+ user,
+ type
+ } = params
+ const appId = this.getUniversalClientInfo().appId
+ const {
+ total,
+ userMatched
+ } = await findUser({
+ userQuery: user,
+ authorizedApp: appId
+ })
+ if (userMatched.length === 0) {
+ if (type === 'login') {
+ if (total > 0) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS_IN_CURRENT_APP
+ }
+ }
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ return {
+ type: 'register',
+ user
+ }
+ } if (userMatched.length === 1) {
+ if (type === 'register') {
+ throw {
+ errCode: ERROR.ACCOUNT_EXISTS
+ }
+ }
+ const userRecord = userMatched[0]
+ checkLoginUserRecord(userRecord)
+ return {
+ type: 'login',
+ user: userRecord
+ }
+ } else if (userMatched.length > 1) {
+ throw {
+ errCode: ERROR.ACCOUNT_CONFLICT
+ }
+ }
+}
+
+async function preUnifiedLogin (params = {}) {
+ try {
+ const result = await realPreUnifiedLogin.call(this, params)
+ return result
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false
+ })
+ throw error
+ }
+}
+
+async function postUnifiedLogin (params = {}) {
+ const {
+ user,
+ extraData = {},
+ isThirdParty = false,
+ type,
+ inviteCode
+ } = params
+ let result
+ if (type === 'login') {
+ result = await postLogin.call(this, {
+ user,
+ extraData,
+ isThirdParty
+ })
+ } else if (type === 'register') {
+ result = await postRegister.call(this, {
+ user,
+ extraData,
+ isThirdParty,
+ inviteCode
+ })
+ }
+ return {
+ ...result,
+ type
+ }
+}
+
+module.exports = {
+ preUnifiedLogin,
+ postUnifiedLogin
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js
new file mode 100644
index 0000000..33c17c0
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js
@@ -0,0 +1,27 @@
+async function getPhoneNumber ({
+ // eslint-disable-next-line camelcase
+ access_token,
+ openid
+} = {}) {
+ const requiredParams = ['apiKey', 'apiSecret']
+ const univerifyConfig = (this.config.service && this.config.service.univerify) || {}
+ for (let i = 0; i < requiredParams.length; i++) {
+ const key = requiredParams[i]
+ if (!univerifyConfig[key]) {
+ throw new Error(`Missing config param: service.univerify.${key}`)
+ }
+ }
+ return uniCloud.getPhoneNumber({
+ provider: 'univerify',
+ appid: this.getUniversalClientInfo().appId,
+ apiKey: univerifyConfig.apiKey,
+ apiSecret: univerifyConfig.apiSecret,
+ // eslint-disable-next-line camelcase
+ access_token,
+ openid
+ })
+}
+
+module.exports = {
+ getPhoneNumber
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/update-user-info.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/update-user-info.js
new file mode 100644
index 0000000..ced33b9
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/update-user-info.js
@@ -0,0 +1,25 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ USER_STATUS
+} = require('../../common/constants')
+async function setUserStatus (uid, status) {
+ const updateData = {
+ status
+ }
+ if (status !== USER_STATUS.NORMAL) {
+ updateData.valid_token_date = Date.now()
+ }
+ await userCollection.doc(uid).update({
+ status
+ })
+ // TODO 此接口尚不完善,例如注销后其他客户端可能存在有效token,支持Redis后此处会补充额外逻辑
+ return {
+ errCode: 0
+ }
+}
+
+module.exports = {
+ setUserStatus
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/utils.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/utils.js
new file mode 100644
index 0000000..7d3e0f3
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/utils.js
@@ -0,0 +1,18 @@
+let redisEnable = null
+function getRedisEnable() {
+ // 未用到的时候不调用redis接口,节省一些连接数
+ if (redisEnable !== null) {
+ return redisEnable
+ }
+ try {
+ uniCloud.redis()
+ redisEnable = true
+ } catch (error) {
+ redisEnable = false
+ }
+ return redisEnable
+}
+
+module.exports = {
+ getRedisEnable
+}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/verify-code.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/verify-code.js
new file mode 100644
index 0000000..b11bc02
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/verify-code.js
@@ -0,0 +1,152 @@
+const {
+ dbCmd,
+ verifyCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ getVerifyCode
+} = require('../../common/utils')
+
+async function setVerifyCode ({
+ mobile,
+ email,
+ code,
+ expiresIn,
+ scene
+} = {}) {
+ const now = Date.now()
+ const record = {
+ mobile,
+ email,
+ scene,
+ code: code || getVerifyCode(),
+ state: 0,
+ ip: this.getUniversalClientInfo().clientIP,
+ created_date: now,
+ expired_date: now + expiresIn * 1000
+ }
+ await verifyCollection.add(record)
+ return {
+ errCode: 0
+ }
+}
+
+async function setEmailVerifyCode ({
+ email,
+ code,
+ expiresIn,
+ scene
+} = {}) {
+ email = email && email.trim()
+ if (!email) {
+ throw {
+ errCode: ERROR.INVALID_EMAIL
+ }
+ }
+ email = email.toLowerCase()
+ return setVerifyCode.call(this, {
+ email,
+ code,
+ expiresIn,
+ scene
+ })
+}
+
+async function setMobileVerifyCode ({
+ mobile,
+ code,
+ expiresIn,
+ scene
+} = {}) {
+ mobile = mobile && mobile.trim()
+ if (!mobile) {
+ throw {
+ errCode: ERROR.INVALID_MOBILE
+ }
+ }
+ return setVerifyCode.call(this, {
+ mobile,
+ code,
+ expiresIn,
+ scene
+ })
+}
+
+async function verifyEmailCode ({
+ email,
+ code,
+ scene
+} = {}) {
+ email = email && email.trim()
+ if (!email) {
+ throw {
+ errCode: ERROR.INVALID_EMAIL
+ }
+ }
+ email = email.toLowerCase()
+ const {
+ data: codeRecord
+ } = await verifyCollection.where({
+ email,
+ scene,
+ code,
+ state: 0,
+ expired_date: dbCmd.gt(Date.now())
+ }).limit(1).get()
+
+ if (codeRecord.length === 0) {
+ throw {
+ errCode: ERROR.EMAIL_VERIFY_CODE_ERROR
+ }
+ }
+ await verifyCollection.doc(codeRecord[0]._id).update({
+ state: 1
+ })
+ return {
+ errCode: 0
+ }
+}
+
+async function verifyMobileCode ({
+ mobile,
+ code,
+ scene
+} = {}) {
+ mobile = mobile && mobile.trim()
+ if (!mobile) {
+ throw {
+ errCode: ERROR.INVALID_MOBILE
+ }
+ }
+ const {
+ data: codeRecord
+ } = await verifyCollection.where({
+ mobile,
+ scene,
+ code,
+ state: 0,
+ expired_date: dbCmd.gt(Date.now())
+ }).limit(1).get()
+
+ if (codeRecord.length === 0) {
+ throw {
+ errCode: ERROR.MOBILE_VERIFY_CODE_ERROR
+ }
+ }
+
+ await verifyCollection.doc(codeRecord[0]._id).update({
+ state: 1
+ })
+ return {
+ errCode: 0
+ }
+}
+
+module.exports = {
+ verifyEmailCode,
+ verifyMobileCode,
+ setEmailVerifyCode,
+ setMobileVerifyCode
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js
new file mode 100644
index 0000000..98eb370
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js
@@ -0,0 +1,234 @@
+const crypto = require('crypto')
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ getRedisEnable
+} = require('./utils')
+const {
+ openDataCollection
+} = require('../../common/constants')
+
+function decryptWeixinData ({
+ encryptedData,
+ sessionKey,
+ iv
+} = {}) {
+ const oauthConfig = this.configUtils.getOauthConfig({
+ provider: 'weixin'
+ })
+ const decipher = crypto.createDecipheriv(
+ 'aes-128-cbc',
+ Buffer.from(sessionKey, 'base64'),
+ Buffer.from(iv, 'base64')
+ )
+ // 设置自动 padding 为 true,删除填充补位
+ decipher.setAutoPadding(true)
+ let decoded
+ decoded = decipher.update(encryptedData, 'base64', 'utf8')
+ decoded += decipher.final('utf8')
+ decoded = JSON.parse(decoded)
+ if (decoded.watermark.appid !== oauthConfig.appid) {
+ throw new Error('Invalid wechat appid in decode content')
+ }
+ return decoded
+}
+
+function getWeixinPlatform () {
+ const platform = this.clientPlatform
+ const userAgent = this.getUniversalClientInfo().userAgent
+ switch (platform) {
+ case 'app':
+ case 'app-plus':
+ return 'app'
+ case 'mp-weixin':
+ return 'mp'
+ case 'h5':
+ case 'web':
+ return userAgent.indexOf('MicroMessenger') > -1 ? 'h5' : 'web'
+ default:
+ throw new Error('Unsupported weixin platform')
+ }
+}
+
+async function saveWeixinUserKey ({
+ openid,
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ accessTokenExpired // App端微信用户accessToken过期时间
+} = {}) {
+ // 微信公众平台、开放平台refreshToken有效期均为30天(微信没有在网络请求里面返回30天这个值,务必注意未来可能出现调整,需及时更新此处逻辑)。
+ // 此前QQ开放平台有调整过accessToken的过期时间:[access_token有效期由90天缩短至30天](https://wiki.connect.qq.com/%E3%80%90qq%E4%BA%92%E8%81%94%E3%80%91access_token%E6%9C%89%E6%95%88%E6%9C%9F%E8%B0%83%E6%95%B4)
+
+ const appId = this.getUniversalClientInfo().appId
+ const weixinPlatform = getWeixinPlatform.call(this)
+ const keyObj = {
+ dcloudAppid: appId,
+ openid,
+ platform: 'weixin-' + weixinPlatform
+ }
+ switch (weixinPlatform) {
+ case 'mp':
+ await this.uniOpenBridge.setSessionKey(keyObj, {
+ session_key: sessionKey
+ }, 30 * 24 * 60 * 60)
+ break
+ case 'app':
+ case 'h5':
+ case 'web':
+ await this.uniOpenBridge.setUserAccessToken(keyObj, {
+ access_token: accessToken,
+ refresh_token: refreshToken,
+ access_token_expired: accessTokenExpired
+ }, 30 * 24 * 60 * 60)
+ break
+ default:
+ break
+ }
+}
+
+async function saveSecureNetworkCache ({
+ code,
+ openid,
+ unionid,
+ sessionKey
+}) {
+ const {
+ appId
+ } = this.getUniversalClientInfo()
+ const key = `uni-id:${appId}:weixin-mp:code:${code}:secure-network-cache`
+ const value = JSON.stringify({
+ openid,
+ unionid,
+ session_key: sessionKey
+ })
+ // 此处存储的是code的缓存,设置有效期和token一致
+ const expiredSeconds = this.config.tokenExpiresIn || 3 * 24 * 60 * 60
+
+ await openDataCollection.doc(key).set({
+ value,
+ expired: Date.now() + expiredSeconds * 1000
+ })
+ const isRedisEnable = getRedisEnable()
+ if (isRedisEnable) {
+ const redis = uniCloud.redis()
+ await redis.set(key, value, 'EX', expiredSeconds)
+ }
+}
+
+function generateWeixinCache ({
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ accessTokenExpired // App端微信用户accessToken过期时间
+} = {}) {
+ const platform = getWeixinPlatform.call(this)
+ let cache
+ switch (platform) {
+ case 'app':
+ case 'h5':
+ case 'web':
+ cache = {
+ access_token: accessToken,
+ refresh_token: refreshToken,
+ access_token_expired: accessTokenExpired
+ }
+ break
+ case 'mp':
+ cache = {
+ session_key: sessionKey
+ }
+ break
+ default:
+ throw new Error('Unsupported weixin platform')
+ }
+ return {
+ third_party: {
+ [`${platform}_weixin`]: cache
+ }
+ }
+}
+
+function getWeixinOpenid ({
+ userRecord
+} = {}) {
+ const weixinPlatform = getWeixinPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+ const wxOpenidObj = userRecord.wx_openid
+ if (!wxOpenidObj) {
+ return
+ }
+ return wxOpenidObj[`${weixinPlatform}_${appId}`] || wxOpenidObj[weixinPlatform]
+}
+
+async function getWeixinCacheFallback ({
+ userRecord,
+ key
+} = {}) {
+ const platform = getWeixinPlatform.call(this)
+ const thirdParty = userRecord && userRecord.third_party
+ if (!thirdParty) {
+ return
+ }
+ const weixinCache = thirdParty[`${platform}_weixin`]
+ return weixinCache && weixinCache[key]
+}
+
+async function getWeixinCache ({
+ uid,
+ userRecord,
+ key
+} = {}) {
+ const weixinPlatform = getWeixinPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+ if (!userRecord) {
+ const getUserRes = await userCollection.doc(uid).get()
+ userRecord = getUserRes.data[0]
+ }
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ const openid = getWeixinOpenid.call(this, {
+ userRecord
+ })
+ const getCacheMethod = weixinPlatform === 'mp' ? 'getSessionKey' : 'getUserAccessToken'
+ const userKey = await this.uniOpenBridge[getCacheMethod]({
+ dcloudAppid: appId,
+ platform: 'weixin-' + weixinPlatform,
+ openid
+ })
+ if (userKey) {
+ return userKey[key]
+ }
+ return getWeixinCacheFallback({
+ userRecord,
+ key
+ })
+}
+
+async function getWeixinAccessToken () {
+ const weixinPlatform = getWeixinPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+
+ const cache = await this.uniOpenBridge.getAccessToken({
+ dcloudAppid: appId,
+ platform: 'weixin-' + weixinPlatform
+ })
+
+ return cache.access_token
+}
+module.exports = {
+ decryptWeixinData,
+ getWeixinPlatform,
+ generateWeixinCache,
+ getWeixinCache,
+ saveWeixinUserKey,
+ getWeixinAccessToken,
+ saveSecureNetworkCache
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/access-control.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/access-control.js
new file mode 100644
index 0000000..e333fe0
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/access-control.js
@@ -0,0 +1,59 @@
+const methodPermission = require('../config/permission')
+const {
+ ERROR
+} = require('../common/error')
+
+function isAccessAllowed (user, setting) {
+ const {
+ role: userRole = [],
+ permission: userPermission = []
+ } = user
+ const {
+ role: settingRole = [],
+ permission: settingPermission = []
+ } = setting
+ if (userRole.includes('admin')) {
+ return
+ }
+ if (
+ settingRole.length > 0 &&
+ settingRole.every(item => !userRole.includes(item))
+ ) {
+ throw {
+ errCode: ERROR.PERMISSION_ERROR
+ }
+ }
+ if (
+ settingPermission.length > 0 &&
+ settingPermission.every(item => !userPermission.includes(item))
+ ) {
+ throw {
+ errCode: ERROR.PERMISSION_ERROR
+ }
+ }
+}
+
+module.exports = async function () {
+ const methodName = this.getMethodName()
+ if (!(methodName in methodPermission)) {
+ return
+ }
+ const {
+ auth,
+ role,
+ permission
+ } = methodPermission[methodName]
+ if (auth || role || permission) {
+ await this.middleware.auth()
+ }
+ if (role && role.length === 0) {
+ throw new Error('[AccessControl]Empty role array is not supported')
+ }
+ if (permission && permission.length === 0) {
+ throw new Error('[AccessControl]Empty permission array is not supported')
+ }
+ return isAccessAllowed(this.authInfo, {
+ role,
+ permission
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/auth.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/auth.js
new file mode 100644
index 0000000..1915335
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/auth.js
@@ -0,0 +1,17 @@
+module.exports = async function () {
+ if (this.authInfo) { // 多次执行auth时如果第一次成功后续不再执行
+ return
+ }
+ const token = this.getUniversalUniIdToken()
+ const payload = await this.uniIdCommon.checkToken(token)
+ if (payload.errCode) {
+ throw payload
+ }
+ this.authInfo = payload
+ if (payload.token) {
+ this.response.newToken = {
+ token: payload.token,
+ tokenExpired: payload.tokenExpired
+ }
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/index.js
new file mode 100644
index 0000000..9f7c958
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/index.js
@@ -0,0 +1,8 @@
+module.exports = {
+ auth: require('./auth'),
+ uniIdLog: require('./uni-id-log'),
+ validate: require('./validate'),
+ accessControl: require('./access-control'),
+ verifyRequestSign: require('./verify-request-sign'),
+ ...require('./rbac')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/rbac.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/rbac.js
new file mode 100644
index 0000000..f42ef8d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/rbac.js
@@ -0,0 +1,39 @@
+const {
+ ERROR
+} = require('../common/error')
+
+function hasRole (...roleList) {
+ const userRole = this.authInfo.role || []
+ if (userRole.includes('admin')) {
+ return
+ }
+ const isMatch = roleList.every(roleItem => {
+ return userRole.includes(roleItem)
+ })
+ if (!isMatch) {
+ throw {
+ errCode: ERROR.PERMISSION_ERROR
+ }
+ }
+}
+
+function hasPermission (...permissionList) {
+ const userRole = this.authInfo.role || []
+ const userPermission = this.authInfo.permission || []
+ if (userRole.includes('admin')) {
+ return
+ }
+ const isMatch = permissionList.every(permissionItem => {
+ return userPermission.includes(permissionItem)
+ })
+ if (!isMatch) {
+ throw {
+ errCode: ERROR.PERMISSION_ERROR
+ }
+ }
+}
+
+module.exports = {
+ hasRole,
+ hasPermission
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/uni-id-log.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/uni-id-log.js
new file mode 100644
index 0000000..ca6927d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/uni-id-log.js
@@ -0,0 +1,39 @@
+const db = uniCloud.database()
+module.exports = async function ({
+ data = {},
+ success = true,
+ type = 'login'
+} = {}) {
+ const now = Date.now()
+ const uniIdLogCollection = db.collection('uni-id-log')
+ const requiredDataKeyList = ['user_id', 'username', 'email', 'mobile']
+ const dataCopy = {}
+ for (let i = 0; i < requiredDataKeyList.length; i++) {
+ const key = requiredDataKeyList[i]
+ if (key in data && typeof data[key] === 'string') {
+ dataCopy[key] = data[key]
+ }
+ }
+ const {
+ appId,
+ clientIP,
+ deviceId,
+ userAgent
+ } = this.getUniversalClientInfo()
+ const logData = {
+ appid: appId,
+ device_id: deviceId,
+ ip: clientIP,
+ type,
+ ua: userAgent,
+ create_date: now,
+ ...dataCopy
+ }
+
+ if (success) {
+ logData.state = 1
+ } else {
+ logData.state = 0
+ }
+ return uniIdLogCollection.add(logData)
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/validate.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/validate.js
new file mode 100644
index 0000000..52ff047
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/validate.js
@@ -0,0 +1,7 @@
+module.exports = function (value = {}, schema = {}) {
+ const validateRes = this.validator.validate(value, schema)
+ if (validateRes) {
+ delete validateRes.schemaKey
+ throw validateRes
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/verify-request-sign.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/verify-request-sign.js
new file mode 100644
index 0000000..1c12edc
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/verify-request-sign.js
@@ -0,0 +1,82 @@
+const crypto = require('crypto')
+const createConfig = require('uni-config-center')
+const { verifyHttpInfo } = require('uni-cloud-s2s')
+
+const { ERROR } = require('../common/error')
+const s2sConfig = createConfig({
+ pluginId: 'uni-cloud-s2s'
+})
+const needSignFunctions = new Set([
+ 'externalRegister',
+ 'externalLogin',
+ 'updateUserInfoByExternal'
+])
+
+module.exports = function () {
+ const methodName = this.getMethodName()
+ const { source } = this.getUniversalClientInfo()
+
+ // 指定接口需要鉴权
+ if (!needSignFunctions.has(methodName)) return
+
+ // 非 HTTP 方式请求拒绝访问
+ if (source !== 'http') {
+ throw {
+ errCode: ERROR.ILLEGAL_REQUEST
+ }
+ }
+
+ // 支持 uni-cloud-s2s 验证请求
+ if (s2sConfig.hasFile('config.json')) {
+ try {
+ if (!verifyHttpInfo(this.getHttpInfo())) {
+ throw {
+ errCode: ERROR.ILLEGAL_REQUEST
+ }
+ }
+ } catch (e) {
+ if (e.errSubject === 'uni-cloud-s2s') {
+ throw {
+ errCode: ERROR.ILLEGAL_REQUEST,
+ errMsg: e.errMsg
+ }
+ }
+ throw e
+ }
+
+ return
+ }
+
+ if (!this.config.requestAuthSecret || typeof this.config.requestAuthSecret !== 'string') {
+ throw {
+ errCode: ERROR.CONFIG_FIELD_REQUIRED,
+ errMsgValue: {
+ field: 'requestAuthSecret'
+ }
+ }
+ }
+
+ const timeout = 20 * 1000 // 请求超过20秒不能再请求,防止重放攻击
+ const { headers, body: _body } = this.getHttpInfo()
+ const { 'uni-id-nonce': nonce, 'uni-id-timestamp': timestamp, 'uni-id-signature': signature } = headers
+ const body = JSON.parse(_body).params || {}
+ const bodyStr = Object.keys(body)
+ .sort()
+ .filter(item => typeof body[item] !== 'object')
+ .map(item => `${item}=${body[item]}`)
+ .join('&')
+
+ if (isNaN(Number(timestamp)) || (Number(timestamp) + timeout) < Date.now()) {
+ throw {
+ errCode: ERROR.ILLEGAL_REQUEST
+ }
+ }
+
+ const reSignature = crypto.createHmac('sha256', `${this.config.requestAuthSecret + nonce}`).update(`${timestamp}${bodyStr}`).digest('hex')
+
+ if (signature !== reSignature.toUpperCase()) {
+ throw {
+ errCode: ERROR.ILLEGAL_REQUEST
+ }
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/close-account.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/close-account.js
new file mode 100644
index 0000000..f1bdf96
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/close-account.js
@@ -0,0 +1,16 @@
+const {
+ setUserStatus
+} = require('../../lib/utils/update-user-info')
+const {
+ USER_STATUS
+} = require('../../common/constants')
+
+/**
+ * 注销账户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#close-account
+ * @returns
+ */
+module.exports = async function () {
+ const { uid } = this.authInfo
+ return setUserStatus(uid, USER_STATUS.CLOSED)
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-account-info.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-account-info.js
new file mode 100644
index 0000000..7b8599a
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-account-info.js
@@ -0,0 +1,69 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+function isUsernameSet (userRecord) {
+ return !!userRecord.username
+}
+function isNicknameSet (userRecord) {
+ return !!userRecord.nickname
+}
+function isPasswordSet (userRecord) {
+ return !!userRecord.password
+}
+function isMobileBound (userRecord) {
+ return !!(userRecord.mobile && userRecord.mobile_confirmed)
+}
+function isEmailBound (userRecord) {
+ return !!(userRecord.email && userRecord.email_confirmed)
+}
+function isWeixinBound (userRecord) {
+ return !!(
+ userRecord.wx_unionid ||
+ Object.keys(userRecord.wx_openid || {}).length
+ )
+}
+function isQQBound (userRecord) {
+ return !!(
+ userRecord.qq_unionid ||
+ Object.keys(userRecord.qq_openid || {}).length
+ )
+}
+function isAlipayBound (userRecord) {
+ return !!userRecord.ali_openid
+}
+function isAppleBound (userRecord) {
+ return !!userRecord.apple_openid
+}
+
+/**
+ * 获取账户账户简略信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-account-info
+ */
+module.exports = async function () {
+ const {
+ uid
+ } = this.authInfo
+ const getUserRes = await userCollection.doc(uid).get()
+ const userRecord = getUserRes && getUserRes.data && getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ return {
+ errCode: 0,
+ isUsernameSet: isUsernameSet(userRecord),
+ isNicknameSet: isNicknameSet(userRecord),
+ isPasswordSet: isPasswordSet(userRecord),
+ isMobileBound: isMobileBound(userRecord),
+ isEmailBound: isEmailBound(userRecord),
+ isWeixinBound: isWeixinBound(userRecord),
+ isQQBound: isQQBound(userRecord),
+ isAlipayBound: isAlipayBound(userRecord),
+ isAppleBound: isAppleBound(userRecord)
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-realname-info.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-realname-info.js
new file mode 100644
index 0000000..0ea8f05
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/get-realname-info.js
@@ -0,0 +1,45 @@
+const { userCollection } = require('../../common/constants')
+const { ERROR } = require('../../common/error')
+const { decryptData } = require('../../common/sensitive-aes-cipher')
+const { dataDesensitization } = require('../../common/utils')
+
+/**
+ * 获取实名信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-realname-info
+ * @param {Object} params
+ * @param {Boolean} params.decryptData 是否解密数据
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ decryptData: {
+ required: false,
+ type: 'boolean'
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const { decryptData: isDecryptData = true } = params
+
+ const {
+ uid
+ } = this.authInfo
+ const getUserRes = await userCollection.doc(uid).get()
+ const userRecord = getUserRes && getUserRes.data && getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+
+ const { realname_auth: realNameAuth = {} } = userRecord
+
+ return {
+ errCode: 0,
+ type: realNameAuth.type,
+ authStatus: realNameAuth.auth_status,
+ realName: isDecryptData ? dataDesensitization(decryptData.call(this, realNameAuth.real_name), { onlyLast: true }) : realNameAuth.real_name,
+ identity: isDecryptData ? dataDesensitization(decryptData.call(this, realNameAuth.identity)) : realNameAuth.identity
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/index.js
new file mode 100644
index 0000000..0e55385
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/index.js
@@ -0,0 +1,9 @@
+module.exports = {
+ setPwd: require('./set-pwd'),
+ updatePwd: require('./update-pwd'),
+ resetPwdBySms: require('./reset-pwd-by-sms'),
+ resetPwdByEmail: require('./reset-pwd-by-email'),
+ closeAccount: require('./close-account'),
+ getAccountInfo: require('./get-account-info'),
+ getRealNameInfo: require('./get-realname-info')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js
new file mode 100644
index 0000000..20c6219
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js
@@ -0,0 +1,128 @@
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ getNeedCaptcha,
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ verifyEmailCode
+} = require('../../lib/utils/verify-code')
+const {
+ userCollection,
+ EMAIL_SCENE,
+ CAPTCHA_SCENE,
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ findUser
+} = require('../../lib/utils/account')
+const PasswordUtils = require('../../lib/utils/password')
+
+/**
+ * 通过邮箱验证码重置密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#reset-pwd-by-email
+ * @param {object} params
+ * @param {string} params.email 邮箱
+ * @param {string} params.code 邮箱验证码
+ * @param {string} params.password 密码
+ * @param {string} params.captcha 图形验证码
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ email: 'email',
+ code: 'string',
+ password: 'password',
+ captcha: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ email,
+ code,
+ password,
+ captcha
+ } = params
+
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ email,
+ type: LOG_TYPE.RESET_PWD_BY_EMAIL
+ })
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.RESET_PWD_BY_EMAIL
+ })
+ }
+ try {
+ // 验证手机号验证码,验证不通过时写入失败日志
+ await verifyEmailCode({
+ email,
+ code,
+ scene: EMAIL_SCENE.RESET_PWD_BY_EMAIL
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ data: {
+ email
+ },
+ type: LOG_TYPE.RESET_PWD_BY_EMAIL,
+ success: false
+ })
+ throw error
+ }
+ // 根据手机号查找匹配的用户
+ const {
+ total,
+ userMatched
+ } = await findUser.call(this, {
+ userQuery: {
+ email
+ },
+ authorizedApp: [this.getUniversalClientInfo().appId]
+ })
+ if (userMatched.length === 0) {
+ if (total > 0) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS_IN_CURRENT_APP
+ }
+ }
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ } else if (userMatched.length > 1) {
+ throw {
+ errCode: ERROR.ACCOUNT_CONFLICT
+ }
+ }
+ const { _id: uid } = userMatched[0]
+ const {
+ passwordHash,
+ version
+ } = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ }).generatePasswordHash({
+ password
+ })
+ // 更新用户密码
+ await userCollection.doc(uid).update({
+ password: passwordHash,
+ password_secret_version: version,
+ valid_token_date: Date.now()
+ })
+
+ // 写入成功日志
+ await this.middleware.uniIdLog({
+ data: {
+ email
+ },
+ type: LOG_TYPE.RESET_PWD_BY_SMS
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js
new file mode 100644
index 0000000..bc10dc8
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js
@@ -0,0 +1,128 @@
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ getNeedCaptcha,
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ verifyMobileCode
+} = require('../../lib/utils/verify-code')
+const {
+ userCollection,
+ SMS_SCENE,
+ CAPTCHA_SCENE,
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ findUser
+} = require('../../lib/utils/account')
+const PasswordUtils = require('../../lib/utils/password')
+
+/**
+ * 通过短信验证码重置密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#reset-pwd-by-sms
+ * @param {object} params
+ * @param {string} params.mobile 手机号
+ * @param {string} params.mobile 短信验证码
+ * @param {string} params.password 密码
+ * @param {string} params.captcha 图形验证码
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ mobile: 'mobile',
+ code: 'string',
+ password: 'password',
+ captcha: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ mobile,
+ code,
+ password,
+ captcha
+ } = params
+
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ mobile,
+ type: LOG_TYPE.RESET_PWD_BY_SMS
+ })
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.RESET_PWD_BY_SMS
+ })
+ }
+ try {
+ // 验证手机号验证码,验证不通过时写入失败日志
+ await verifyMobileCode({
+ mobile,
+ code,
+ scene: SMS_SCENE.RESET_PWD_BY_SMS
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ data: {
+ mobile
+ },
+ type: LOG_TYPE.RESET_PWD_BY_SMS,
+ success: false
+ })
+ throw error
+ }
+ // 根据手机号查找匹配的用户
+ const {
+ total,
+ userMatched
+ } = await findUser.call(this, {
+ userQuery: {
+ mobile
+ },
+ authorizedApp: [this.getUniversalClientInfo().appId]
+ })
+ if (userMatched.length === 0) {
+ if (total > 0) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS_IN_CURRENT_APP
+ }
+ }
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ } else if (userMatched.length > 1) {
+ throw {
+ errCode: ERROR.ACCOUNT_CONFLICT
+ }
+ }
+ const { _id: uid } = userMatched[0]
+ const {
+ passwordHash,
+ version
+ } = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ }).generatePasswordHash({
+ password
+ })
+ // 更新用户密码
+ await userCollection.doc(uid).update({
+ password: passwordHash,
+ password_secret_version: version,
+ valid_token_date: Date.now()
+ })
+
+ // 写入成功日志
+ await this.middleware.uniIdLog({
+ data: {
+ mobile
+ },
+ type: LOG_TYPE.RESET_PWD_BY_SMS
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/set-pwd.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/set-pwd.js
new file mode 100644
index 0000000..f33c6f4
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/set-pwd.js
@@ -0,0 +1,83 @@
+const { userCollection, SMS_SCENE, LOG_TYPE, CAPTCHA_SCENE } = require('../../common/constants')
+const { ERROR } = require('../../common/error')
+const { verifyMobileCode } = require('../../lib/utils/verify-code')
+const PasswordUtils = require('../../lib/utils/password')
+const { getNeedCaptcha, verifyCaptcha } = require('../../lib/utils/captcha')
+
+module.exports = async function (params = {}) {
+ const schema = {
+ password: 'password',
+ code: 'string',
+ captcha: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+
+ const { password, code, captcha } = params
+ const uid = this.authInfo.uid
+ const getUserRes = await userCollection.doc(uid).get()
+ const userRecord = getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ mobile: userRecord.mobile
+ })
+
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.SET_PWD_BY_SMS
+ })
+ }
+
+ try {
+ // 验证手机号验证码,验证不通过时写入失败日志
+ await verifyMobileCode({
+ mobile: userRecord.mobile,
+ code,
+ scene: SMS_SCENE.SET_PWD_BY_SMS
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ data: {
+ mobile: userRecord.mobile
+ },
+ type: LOG_TYPE.SET_PWD_BY_SMS,
+ success: false
+ })
+ throw error
+ }
+
+ const {
+ passwordHash,
+ version
+ } = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ }).generatePasswordHash({
+ password
+ })
+
+ // 更新用户密码
+ await userCollection.doc(uid).update({
+ password: passwordHash,
+ password_secret_version: version
+ })
+
+ await this.middleware.uniIdLog({
+ data: {
+ mobile: userRecord.mobile
+ },
+ type: LOG_TYPE.SET_PWD_BY_SMS
+ })
+
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/update-pwd.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/update-pwd.js
new file mode 100644
index 0000000..97fd1be
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/update-pwd.js
@@ -0,0 +1,69 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const PasswordUtils = require('../../lib/utils/password')
+/**
+ * 更新密码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#update-pwd
+ * @param {object} params
+ * @param {string} params.oldPassword 旧密码
+ * @param {string} params.newPassword 新密码
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ oldPassword: 'string', // 防止密码规则调整导致旧密码无法更新
+ newPassword: 'password'
+ }
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ const getUserRes = await userCollection.doc(uid).get()
+ const userRecord = getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ const {
+ oldPassword,
+ newPassword
+ } = params
+ const passwordUtils = new PasswordUtils({
+ userRecord,
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+
+ const {
+ success: checkPasswordSuccess
+ } = passwordUtils.checkUserPassword({
+ password: oldPassword,
+ autoRefresh: false
+ })
+
+ if (!checkPasswordSuccess) {
+ throw {
+ errCode: ERROR.PASSWORD_ERROR
+ }
+ }
+
+ const {
+ passwordHash,
+ version
+ } = passwordUtils.generatePasswordHash({
+ password: newPassword
+ })
+
+ await userCollection.doc(uid).update({
+ password: passwordHash,
+ password_secret_version: version,
+ valid_token_date: Date.now() // refreshToken时会校验,如果创建token时间在此时间点之前,则拒绝下发新token,返回token失效错误码
+ })
+ // 执行更新密码操作后客户端应将用户退出重新登录
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/add-user.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/add-user.js
new file mode 100644
index 0000000..330fd37
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/add-user.js
@@ -0,0 +1,131 @@
+const {
+ findUser
+} = require('../../lib/utils/account')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ userCollection
+} = require('../../common/constants')
+const PasswordUtils = require('../../lib/utils/password')
+
+/**
+ * 新增用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#add-user
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {Array} params.authorizedApp 允许登录的AppID列表
+ * @param {Array} params.role 用户角色列表
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {Array} params.tags 用户标签
+ * @param {Number} params.status 用户状态
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ username: 'username',
+ password: 'password',
+ authorizedApp: {
+ required: false,
+ type: 'array'
+ }, // 指定允许登录的app,传空数组或不传时表示可以不可以在任何端登录
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ role: {
+ require: false,
+ type: 'array'
+ },
+ mobile: {
+ required: false,
+ type: 'mobile'
+ },
+ email: {
+ required: false,
+ type: 'email'
+ },
+ tags: {
+ required: false,
+ type: 'array'
+ },
+ status: {
+ required: false,
+ type: 'number'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ username,
+ password,
+ authorizedApp,
+ nickname,
+ role,
+ mobile,
+ email,
+ tags,
+ status
+ } = params
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: {
+ username,
+ mobile,
+ email
+ },
+ authorizedApp
+ })
+ if (userMatched.length) {
+ throw {
+ errCode: ERROR.ACCOUNT_EXISTS
+ }
+ }
+ const passwordUtils = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+ const {
+ passwordHash,
+ version
+ } = passwordUtils.generatePasswordHash({
+ password
+ })
+ const data = {
+ username,
+ password: passwordHash,
+ password_secret_version: version,
+ dcloud_appid: authorizedApp || [],
+ nickname,
+ role: role || [],
+ mobile,
+ email,
+ tags: tags || [],
+ status
+ }
+ if (email) {
+ data.email_confirmed = 1
+ }
+ if (mobile) {
+ data.mobile_confirmed = 1
+ }
+
+ // 触发 beforeRegister 钩子
+ const beforeRegister = this.hooks.beforeRegister
+ let userRecord = data
+ if (beforeRegister) {
+ userRecord = await beforeRegister({
+ userRecord,
+ clientInfo: this.getUniversalClientInfo()
+ })
+ }
+
+ await userCollection.add(userRecord)
+ return {
+ errCode: 0,
+ errMsg: ''
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/index.js
new file mode 100644
index 0000000..c8830f5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/index.js
@@ -0,0 +1,4 @@
+module.exports = {
+ addUser: require('./add-user'),
+ updateUser: require('./update-user')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/update-user.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/update-user.js
new file mode 100644
index 0000000..ed2f7b6
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/admin/update-user.js
@@ -0,0 +1,138 @@
+const {
+ findUser
+} = require('../../lib/utils/account')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ userCollection
+} = require('../../common/constants')
+const PasswordUtils = require('../../lib/utils/password')
+
+/**
+ * 修改用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#update-user
+ * @param {Object} params
+ * @param {String} params.uid 要更新的用户id
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {Array} params.authorizedApp 允许登录的AppID列表
+ * @param {Array} params.role 用户角色列表
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {Array} params.tags 用户标签
+ * @param {Number} params.status 用户状态
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: 'string',
+ username: 'username',
+ password: {
+ required: false,
+ type: 'password'
+ },
+ authorizedApp: {
+ required: false,
+ type: 'array'
+ }, // 指定允许登录的app,传空数组或不传时表示可以不可以在任何端登录
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ role: {
+ require: false,
+ type: 'array'
+ },
+ mobile: {
+ required: false,
+ type: 'mobile'
+ },
+ email: {
+ required: false,
+ type: 'email'
+ },
+ tags: {
+ required: false,
+ type: 'array'
+ },
+ status: {
+ required: false,
+ type: 'number'
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const {
+ uid,
+ username,
+ password,
+ authorizedApp,
+ nickname,
+ role,
+ mobile,
+ email,
+ tags,
+ status
+ } = params
+
+ // 更新的用户数据字段
+ const data = {
+ username,
+ dcloud_appid: authorizedApp,
+ nickname,
+ role,
+ mobile,
+ email,
+ tags,
+ status
+ }
+
+ const realData = Object.keys(data).reduce((res, key) => {
+ const item = data[key]
+ if (item !== undefined) {
+ res[key] = item
+ }
+ return res
+ }, {})
+
+ // 更新用户名时验证用户名是否重新
+ if (username) {
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: {
+ username
+ },
+ authorizedApp
+ })
+ if (userMatched.filter(user => user._id !== uid).length) {
+ throw {
+ errCode: ERROR.ACCOUNT_EXISTS
+ }
+ }
+ }
+ if (password) {
+ const passwordUtils = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+ const {
+ passwordHash,
+ version
+ } = passwordUtils.generatePasswordHash({
+ password
+ })
+
+ realData.password = passwordHash
+ realData.password_secret_version = version
+ }
+
+ await userCollection.doc(uid).update(realData)
+
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js
new file mode 100644
index 0000000..476e234
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js
@@ -0,0 +1,71 @@
+function isMobileCodeSupported () {
+ const config = this.config
+ return !!(config.service && config.service.sms && config.service.sms.smsKey)
+}
+
+function isUniverifySupport () {
+ const config = this.config
+ return !!(config.service && config.service.univerify && config.service.univerify.apiKey)
+}
+
+function isWeixinSupported () {
+ this.configUtils.getOauthConfig({
+ provider: 'weixin'
+ })
+ return true
+}
+
+function isQQSupported () {
+ this.configUtils.getOauthConfig({
+ provider: 'qq'
+ })
+ return true
+}
+
+function isAppleSupported () {
+ this.configUtils.getOauthConfig({
+ provider: 'apple'
+ })
+ return true
+}
+
+function isAlipaySupported () {
+ this.configUtils.getOauthConfig({
+ provider: 'alipay'
+ })
+ return true
+}
+
+const loginTypeTester = {
+ 'mobile-code': isMobileCodeSupported,
+ univerify: isUniverifySupport,
+ weixin: isWeixinSupported,
+ qq: isQQSupported,
+ apple: isAppleSupported,
+ alipay: isAlipaySupported
+}
+
+/**
+ * 获取支持的登录方式
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-supported-login-type
+ * @returns
+ */
+module.exports = async function () {
+ const supportedLoginType = [
+ 'username-password',
+ 'mobile-password',
+ 'email-password'
+ ]
+ for (const type in loginTypeTester) {
+ try {
+ if (loginTypeTester[type].call(this)) {
+ supportedLoginType.push(type)
+ }
+ } catch (error) { }
+ }
+ return {
+ errCode: 0,
+ errMsg: '',
+ supportedLoginType
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/index.js
new file mode 100644
index 0000000..e22f9f2
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/index.js
@@ -0,0 +1,3 @@
+module.exports = {
+ getSupportedLoginType: require('./get-supported-login-type')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/index.js
new file mode 100644
index 0000000..6fa597f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ externalRegister: require('./register'),
+ externalLogin: require('./login'),
+ updateUserInfoByExternal: require('./update-user-info')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/login.js
new file mode 100644
index 0000000..af13013
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/login.js
@@ -0,0 +1,68 @@
+const { preLogin, postLogin } = require('../../lib/utils/login')
+const { EXTERNAL_DIRECT_CONNECT_PROVIDER } = require('../../common/constants')
+const { ERROR } = require('../../common/error')
+
+/**
+ * 外部用户登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-login
+ * @param {object} params
+ * @param {string} params.uid uni-id体系用户id
+ * @param {string} params.externalUid 业务系统的用户id
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: {
+ required: false,
+ type: 'string'
+ },
+ externalUid: {
+ required: false,
+ type: 'string'
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const {
+ uid,
+ externalUid
+ } = params
+
+ if (!uid && !externalUid) {
+ throw {
+ errCode: ERROR.PARAM_REQUIRED,
+ errMsgValue: {
+ param: 'uid or externalUid'
+ }
+ }
+ }
+
+ let query
+ if (uid) {
+ query = {
+ _id: uid
+ }
+ } else {
+ query = {
+ identities: {
+ provider: EXTERNAL_DIRECT_CONNECT_PROVIDER,
+ uid: externalUid
+ }
+ }
+ }
+
+ const user = await preLogin.call(this, {
+ user: query
+ })
+
+ const result = await postLogin.call(this, {
+ user
+ })
+
+ return {
+ errCode: result.errCode,
+ newToken: result.newToken,
+ uid: result.uid
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/register.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/register.js
new file mode 100644
index 0000000..1b2279c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/register.js
@@ -0,0 +1,93 @@
+const url = require('url')
+const { preRegister, postRegister } = require('../../lib/utils/register')
+const { EXTERNAL_DIRECT_CONNECT_PROVIDER } = require('../../common/constants')
+
+/**
+ * 外部注册用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-register
+ * @param {object} params
+ * @param {string} params.externalUid 业务系统的用户id
+ * @param {string} params.nickname 昵称
+ * @param {number} params.gender 性别
+ * @param {string} params.avatar 头像
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ externalUid: 'string',
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ gender: {
+ required: false,
+ type: 'number'
+ },
+ avatar: {
+ required: false,
+ type: 'string'
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const {
+ externalUid,
+ avatar,
+ gender,
+ nickname
+ } = params
+
+ await preRegister.call(this, {
+ user: {
+ identities: {
+ provider: EXTERNAL_DIRECT_CONNECT_PROVIDER,
+ uid: externalUid
+ }
+ }
+ })
+
+ const extraData = {}
+
+ if (avatar) {
+ // eslint-disable-next-line n/no-deprecated-api
+ const avatarPath = url.parse(avatar).pathname
+ const extName = avatarPath.indexOf('.') > -1 ? avatarPath.split('.').pop() : ''
+
+ extraData.avatar_file = {
+ name: avatarPath,
+ extname: extName,
+ url: avatar
+ }
+ }
+
+ const result = await postRegister.call(this, {
+ user: {
+ avatar,
+ gender,
+ nickname,
+ identities: [
+ {
+ provider: EXTERNAL_DIRECT_CONNECT_PROVIDER,
+ userInfo: {
+ avatar,
+ gender,
+ nickname
+ },
+ uid: externalUid
+ }
+ ]
+ },
+ extraData
+ })
+
+ return {
+ errCode: result.errCode,
+ newToken: result.newToken,
+ externalUid,
+ avatar,
+ gender,
+ nickname,
+ uid: result.uid
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/update-user-info.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/update-user-info.js
new file mode 100644
index 0000000..a91fe9f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/external/update-user-info.js
@@ -0,0 +1,208 @@
+const url = require('url')
+const { userCollection, EXTERNAL_DIRECT_CONNECT_PROVIDER } = require('../../common/constants')
+const { ERROR } = require('../../common/error')
+const { findUser } = require('../../lib/utils/account')
+const PasswordUtils = require('../../lib/utils/password')
+
+/**
+ * 使用 uid 或 externalUid 获取用户信息
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external-update-userinfo
+ * @param {object} params
+ * @param {string} params.uid uni-id体系的用户id
+ * @param {string} params.externalUid 业务系统的用户id
+ * @param {string} params.nickname 昵称
+ * @param {string} params.gender 性别
+ * @param {string} params.avatar 头像
+ * @returns {object}
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: {
+ required: false,
+ type: 'string'
+ },
+ externalUid: {
+ required: false,
+ type: 'string'
+ },
+ username: {
+ required: false,
+ type: 'string'
+ },
+ password: {
+ required: false,
+ type: 'password'
+ },
+ authorizedApp: {
+ required: false,
+ type: 'array'
+ }, // 指定允许登录的app,传空数组或不传时表示可以不可以在任何端登录
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ role: {
+ require: false,
+ type: 'array'
+ },
+ mobile: {
+ required: false,
+ type: 'mobile'
+ },
+ email: {
+ required: false,
+ type: 'email'
+ },
+ tags: {
+ required: false,
+ type: 'array'
+ },
+ status: {
+ required: false,
+ type: 'number'
+ },
+ gender: {
+ required: false,
+ type: 'number'
+ },
+ avatar: {
+ required: false,
+ type: 'string'
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const {
+ uid,
+ externalUid,
+ username,
+ password,
+ authorizedApp,
+ nickname,
+ role,
+ mobile,
+ email,
+ tags,
+ status,
+ avatar,
+ gender
+ } = params
+
+ if (!uid && !externalUid) {
+ throw {
+ errCode: ERROR.PARAM_REQUIRED,
+ errMsgValue: {
+ param: 'uid or externalUid'
+ }
+ }
+ }
+
+ let query
+ if (uid) {
+ query = {
+ _id: uid
+ }
+ } else {
+ query = {
+ identities: {
+ provider: EXTERNAL_DIRECT_CONNECT_PROVIDER,
+ uid: externalUid
+ }
+ }
+ }
+
+ const users = await userCollection.where(query).get()
+ const user = users.data && users.data[0]
+ if (!user) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+
+ // 更新的用户数据字段
+ const data = {
+ username,
+ dcloud_appid: authorizedApp,
+ nickname,
+ role,
+ mobile,
+ email,
+ tags,
+ status,
+ avatar,
+ gender
+ }
+
+ const realData = Object.keys(data).reduce((res, key) => {
+ const item = data[key]
+ if (item !== undefined) {
+ res[key] = item
+ }
+ return res
+ }, {})
+
+ // 更新用户名时验证用户名是否重新
+ if (username) {
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: {
+ username
+ },
+ authorizedApp
+ })
+ if (userMatched.filter(user => user._id !== uid).length) {
+ throw {
+ errCode: ERROR.ACCOUNT_EXISTS
+ }
+ }
+ }
+ if (password) {
+ const passwordUtils = new PasswordUtils({
+ clientInfo: this.getUniversalClientInfo(),
+ passwordSecret: this.config.passwordSecret
+ })
+ const {
+ passwordHash,
+ version
+ } = passwordUtils.generatePasswordHash({
+ password
+ })
+
+ realData.password = passwordHash
+ realData.password_secret_version = version
+ }
+
+ if (avatar) {
+ // eslint-disable-next-line n/no-deprecated-api
+ const avatarPath = url.parse(avatar).pathname
+ const extName = avatarPath.indexOf('.') > -1 ? avatarPath.split('.').pop() : ''
+
+ realData.avatar_file = {
+ name: avatarPath,
+ extname: extName,
+ url: avatar
+ }
+ }
+
+ if (user.identities.length) {
+ const identity = user.identities.find(item => item.provider === EXTERNAL_DIRECT_CONNECT_PROVIDER)
+
+ if (identity) {
+ identity.userInfo = {
+ avatar,
+ gender,
+ nickname
+ }
+ }
+
+ realData.identities = user.identities
+ }
+
+ await userCollection.where(query).update(realData)
+
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-auth-result.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-auth-result.js
new file mode 100644
index 0000000..0b37b4e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-auth-result.js
@@ -0,0 +1,135 @@
+const { userCollection, REAL_NAME_STATUS, frvLogsCollection } = require('../../common/constants')
+const { dataDesensitization, catchAwait } = require('../../common/utils')
+const { encryptData, decryptData } = require('../../common/sensitive-aes-cipher')
+const { ERROR } = require('../../common/error')
+
+/**
+ * 查询认证结果
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-frv-auth-result
+ * @param {Object} params
+ * @param {String} params.certifyId 认证ID
+ * @returns
+ */
+module.exports = async function (params) {
+ const schema = {
+ certifyId: 'string'
+ }
+
+ this.middleware.validate(params, schema)
+
+ const { uid } = this.authInfo // 从authInfo中取出uid属性
+ const { certifyId } = params // 从params中取出certifyId属性
+
+ const user = await userCollection.doc(uid).get() // 根据uid查询用户信息
+ const userInfo = user.data && user.data[0] // 从查询结果中获取userInfo对象
+
+ // 如果用户不存在,抛出账户不存在的错误
+ if (!userInfo) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+
+ const { realname_auth: realNameAuth = {} } = userInfo
+
+ // 如果用户已经实名认证,抛出已实名认证的错误
+ if (realNameAuth.auth_status === REAL_NAME_STATUS.CERTIFIED) {
+ throw {
+ errCode: ERROR.REAL_NAME_VERIFIED
+ }
+ }
+
+ // 初始化实人认证服务
+ const frvManager = uniCloud.getFacialRecognitionVerifyManager({
+ requestId: this.getUniCloudRequestId()
+ })
+
+ // 调用frvManager的getAuthResult方法,获取认证结果
+ const [error, res] = await catchAwait(frvManager.getAuthResult({
+ certifyId
+ }))
+
+ // 如果出现错误,抛出未知错误并打印日志
+ if (error) {
+ console.log(ERROR.UNKNOWN_ERROR, 'error: ', error)
+ throw error
+ }
+
+ // 如果认证状态为“PROCESSING”,抛出认证正在处理中的错误
+ if (res.authState === 'PROCESSING') {
+ throw {
+ errCode: ERROR.FRV_PROCESSING
+ }
+ }
+
+ // 如果认证状态为“FAIL”,更新认证日志的状态并抛出认证失败的错误
+ if (res.authState === 'FAIL') {
+ await frvLogsCollection.where({
+ certify_id: certifyId
+ }).update({
+ status: REAL_NAME_STATUS.CERTIFY_FAILED
+ })
+
+ console.log(ERROR.FRV_FAIL, 'error: ', res)
+ throw {
+ errCode: ERROR.FRV_FAIL
+ }
+ }
+
+ // 如果认证状态不为“SUCCESS”,抛出未知错误并打印日志
+ if (res.authState !== 'SUCCESS') {
+ console.log(ERROR.UNKNOWN_ERROR, 'source res: ', res)
+ throw {
+ errCode: ERROR.UNKNOWN_ERROR
+ }
+ }
+
+ // 根据certifyId查询认证记录
+ const frvLogs = await frvLogsCollection.where({
+ certify_id: certifyId
+ }).get()
+
+ const log = frvLogs.data && frvLogs.data[0]
+
+ const updateData = {
+ realname_auth: {
+ auth_status: REAL_NAME_STATUS.CERTIFIED,
+ real_name: log.real_name,
+ identity: log.identity,
+ auth_date: Date.now(),
+ type: 0
+ }
+ }
+
+ // 如果获取到了认证照片的地址,则会对其进行下载,并使用uniCloud.uploadFile方法将其上传到云存储,并将上传后的fileID保存起来。
+ if (res.pictureUrl) {
+ const pictureRes = await uniCloud.httpclient.request(res.pictureUrl)
+ if (pictureRes.status < 400) {
+ const {
+ fileID
+ } = await uniCloud.uploadFile({
+ cloudPath: `user/id-card/${uid}.b64`,
+ fileContent: Buffer.from(encryptData.call(this, pictureRes.data.toString('base64')))
+ })
+ updateData.realname_auth.in_hand = fileID
+ }
+ }
+
+ await Promise.all([
+ // 更新用户认证状态
+ userCollection.doc(uid).update(updateData),
+ // 更新实人认证记录状态
+ frvLogsCollection.where({
+ certify_id: certifyId
+ }).update({
+ status: REAL_NAME_STATUS.CERTIFIED
+ })
+ ])
+
+ return {
+ errCode: 0,
+ authStatus: REAL_NAME_STATUS.CERTIFIED,
+ realName: dataDesensitization(decryptData.call(this, log.real_name), { onlyLast: true }), // 对姓名进行脱敏处理
+ identity: dataDesensitization(decryptData.call(this, log.identity)) // 对身份证号进行脱敏处理
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-certify-id.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-certify-id.js
new file mode 100644
index 0000000..cb8b48b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/get-certify-id.js
@@ -0,0 +1,99 @@
+const { userCollection, REAL_NAME_STATUS, frvLogsCollection, dbCmd } = require('../../common/constants')
+const { ERROR } = require('../../common/error')
+const { encryptData } = require('../../common/sensitive-aes-cipher')
+const { getCurrentDateTimestamp } = require('../../common/utils')
+
+// const CertifyIdExpired = 25 * 60 * 1000 // certifyId 过期时间为30分钟,在25分时置为过期
+
+/**
+ * 获取认证ID
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-frv-certify-id
+ * @param {Object} params
+ * @param {String} params.realName 真实姓名
+ * @param {String} params.idCard 身份证号码
+ * @param {String} params.metaInfo 客户端初始化时返回的metaInfo
+ * @returns
+ */
+module.exports = async function (params) {
+ const schema = {
+ realName: 'realName',
+ idCard: 'idCard',
+ metaInfo: 'string'
+ }
+
+ this.middleware.validate(params, schema)
+
+ const { realName: originalRealName, idCard: originalIdCard, metaInfo } = params // 解构出传入参数的真实姓名、身份证号码、其他元数据
+ const realName = encryptData.call(this, originalRealName) // 对真实姓名进行加密处理
+ const idCard = encryptData.call(this, originalIdCard) // 对身份证号码进行加密处理
+
+ const { uid } = this.authInfo // 获取当前用户的 ID
+ const idCardCertifyLimit = this.config.idCardCertifyLimit || 1 // 获取身份证认证限制次数,默认为1次
+ const realNameCertifyLimit = this.config.realNameCertifyLimit || 5 // 获取实名认证限制次数,默认为5次
+ const frvNeedAlivePhoto = this.config.frvNeedAlivePhoto || false // 是否需要拍摄活体照片,默认为 false
+
+ const user = await userCollection.doc(uid).get() // 获取用户信息
+ const userInfo = user.data && user.data[0] // 获取用户信息对象中的实名认证信息
+ const { realname_auth: realNameAuth = {} } = userInfo // 解构出实名认证信息中的认证状态对象,默认为空对象
+
+ // 如果用户已经实名认证过,不能再次认证
+ if (realNameAuth.auth_status === REAL_NAME_STATUS.CERTIFIED) {
+ throw {
+ errCode: ERROR.REAL_NAME_VERIFIED
+ }
+ }
+
+ // 查询已经使用同一个身份证认证的账号数量,如果超过限制则不能认证
+ const idCardAccount = await userCollection.where({
+ realname_auth: {
+ type: 0, // 用户认证状态是个人
+ auth_status: REAL_NAME_STATUS.CERTIFIED, // 认证状态为已认证
+ identity: idCard // 身份证号码和传入参数的身份证号码相同
+ }
+ }).get()
+ if (idCardAccount.data.length >= idCardCertifyLimit) {
+ throw {
+ errCode: ERROR.ID_CARD_EXISTS
+ }
+ }
+
+ // 查询用户今天已经进行的实名认证次数,如果超过限制则不能认证
+ const userFrvLogs = await frvLogsCollection.where({
+ user_id: uid,
+ created_date: dbCmd.gt(getCurrentDateTimestamp()) // 查询今天的认证记录
+ }).get()
+
+ // 限制用户每日认证次数
+ if (userFrvLogs.data && userFrvLogs.data.length >= realNameCertifyLimit) {
+ throw {
+ errCode: ERROR.REAL_NAME_VERIFY_UPPER_LIMIT
+ }
+ }
+
+ // 初始化实人认证服务
+ const frvManager = uniCloud.getFacialRecognitionVerifyManager({
+ requestId: this.getUniCloudRequestId() // 获取当前
+ })
+ // 调用实人认证服务,获取认证 ID
+ const res = await frvManager.getCertifyId({
+ realName: originalRealName,
+ idCard: originalIdCard,
+ needPicture: frvNeedAlivePhoto,
+ metaInfo
+ })
+
+ // 将认证记录插入到实名认证日志中
+ await frvLogsCollection.add({
+ user_id: uid,
+ certify_id: res.certifyId,
+ real_name: realName,
+ identity: idCard,
+ status: REAL_NAME_STATUS.WAITING_CERTIFIED,
+ created_date: Date.now()
+ })
+
+ // 返回认证ID
+ return {
+ certifyId: res.certifyId
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/index.js
new file mode 100644
index 0000000..63f6b1f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/facial-recognition-verify/index.js
@@ -0,0 +1,4 @@
+module.exports = {
+ getFrvCertifyId: require('./get-certify-id'),
+ getFrvAuthResult: require('./get-auth-result')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/accept-invite.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/accept-invite.js
new file mode 100644
index 0000000..2461e06
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/accept-invite.js
@@ -0,0 +1,25 @@
+const {
+ acceptInvite
+} = require('../../lib/utils/fission')
+
+/**
+ * 接受邀请
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#accept-invite
+ * @param {Object} params
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ inviteCode: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ inviteCode
+ } = params
+ const uid = this.authInfo.uid
+ return acceptInvite({
+ uid,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/get-invited-user.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/get-invited-user.js
new file mode 100644
index 0000000..93d4671
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/get-invited-user.js
@@ -0,0 +1,80 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ coverMobile
+} = require('../../common/utils')
+
+/**
+ * 获取受邀用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-invited-user
+ * @param {Object} params
+ * @param {Number} params.level 获取受邀用户的级数,1表示直接邀请的用户
+ * @param {Number} params.limit 返回数据大小
+ * @param {Number} params.offset 返回数据偏移
+ * @param {Boolean} params.needTotal 是否需要返回总数
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ level: 'number',
+ limit: {
+ required: false,
+ type: 'number'
+ },
+ offset: {
+ required: false,
+ type: 'number'
+ },
+ needTotal: {
+ required: false,
+ type: 'boolean'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ level,
+ limit = 20,
+ offset = 0,
+ needTotal = false
+ } = params
+ const uid = this.authInfo.uid
+ const query = {
+ [`inviter_uid.${level - 1}`]: uid
+ }
+ const getUserRes = await userCollection.where(query)
+ .field({
+ _id: true,
+ avatar: true,
+ avatar_file: true,
+ username: true,
+ nickname: true,
+ mobile: true,
+ invite_time: true
+ })
+ .orderBy('invite_time', 'desc')
+ .skip(offset)
+ .limit(limit)
+ .get()
+
+ const invitedUser = getUserRes.data.map(item => {
+ return {
+ uid: item._id,
+ username: item.username,
+ nickname: item.nickname,
+ mobile: coverMobile(item.mobile),
+ inviteTime: item.invite_time,
+ avatar: item.avatar,
+ avatarFile: item.avatar_file
+ }
+ })
+ const result = {
+ errCode: 0,
+ invitedUser
+ }
+ if (needTotal) {
+ const getTotalRes = await userCollection.where(query).count()
+ result.total = getTotalRes.total
+ }
+ return result
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/index.js
new file mode 100644
index 0000000..4a9bee1
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/index.js
@@ -0,0 +1,4 @@
+module.exports = {
+ acceptInvite: require('./accept-invite'),
+ getInvitedUser: require('./get-invited-user')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/index.js
new file mode 100644
index 0000000..f65f58b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/index.js
@@ -0,0 +1,20 @@
+module.exports = {
+ login: require('./login'),
+ loginBySms: require('./login-by-sms'),
+ loginByUniverify: require('./login-by-univerify'),
+ loginByWeixin: require('./login-by-weixin'),
+ loginByAlipay: require('./login-by-alipay'),
+ loginByQQ: require('./login-by-qq'),
+ loginByApple: require('./login-by-apple'),
+ loginByBaidu: require('./login-by-baidu'),
+ loginByDingtalk: require('./login-by-dingtalk'),
+ loginByToutiao: require('./login-by-toutiao'),
+ loginByDouyin: require('./login-by-douyin'),
+ loginByWeibo: require('./login-by-weibo'),
+ loginByTaobao: require('./login-by-taobao'),
+ loginByEmailLink: require('./login-by-email-link'),
+ loginByEmailCode: require('./login-by-email-code'),
+ loginByFacebook: require('./login-by-facebook'),
+ loginByGoogle: require('./login-by-google'),
+ loginByWeixinMobile: require('./login-by-weixin-mobile')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-alipay.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-alipay.js
new file mode 100644
index 0000000..d5d4631
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-alipay.js
@@ -0,0 +1,70 @@
+const {
+ initAlipay
+} = require('../../lib/third-party/index')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+
+/**
+ * 支付宝登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-alipay
+ * @param {Object} params
+ * @param {String} params.code 支付宝小程序客户端登录返回的code
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: 'string',
+ inviteCode: {
+ type: 'string',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ code,
+ inviteCode
+ } = params
+ const alipayApi = initAlipay.call(this)
+ let getAlipayAccountResult
+ try {
+ getAlipayAccountResult = await alipayApi.code2Session(code)
+ } catch (error) {
+ console.error(error)
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid
+ } = getAlipayAccountResult
+
+ const {
+ type,
+ user
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ ali_openid: openid
+ }
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {},
+ isThirdParty: true,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-apple.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-apple.js
new file mode 100644
index 0000000..5f39e62
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-apple.js
@@ -0,0 +1,77 @@
+const {
+ initApple
+} = require('../../lib/third-party/index')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+
+/**
+ * 苹果登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-apple
+ * @param {Object} params
+ * @param {String} params.identityToken 苹果登录返回的identityToken
+ * @param {String} params.nickname 用户昵称
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ identityToken: 'string',
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ inviteCode: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ identityToken,
+ nickname,
+ inviteCode
+ } = params
+ const appleApi = initApple.call(this)
+ let verifyResult
+ try {
+ verifyResult = await appleApi.verifyIdentityToken(identityToken)
+ } catch (error) {
+ console.error(error)
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+ const {
+ openid
+ } = verifyResult
+
+ const {
+ type,
+ user
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ apple_openid: openid
+ }
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ nickname
+ },
+ isThirdParty: true,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-baidu.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-baidu.js
new file mode 100644
index 0000000..856449d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-baidu.js
@@ -0,0 +1,9 @@
+/**
+ * 百度登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByBaidu] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-dingtalk.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-dingtalk.js
new file mode 100644
index 0000000..afe1f01
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-dingtalk.js
@@ -0,0 +1,9 @@
+/**
+ * 钉钉登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByDingtalk] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-douyin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-douyin.js
new file mode 100644
index 0000000..8cd4ab5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-douyin.js
@@ -0,0 +1,9 @@
+/**
+ * 抖音登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByDouyin] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-code.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-code.js
new file mode 100644
index 0000000..c3af08f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-code.js
@@ -0,0 +1,9 @@
+/**
+ * 邮箱验证码登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByEmailCode] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-link.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-link.js
new file mode 100644
index 0000000..0ebbf3a
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-email-link.js
@@ -0,0 +1,9 @@
+/**
+ * 邮箱点击链接登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByEmailLink] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-facebook.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-facebook.js
new file mode 100644
index 0000000..5c93bd4
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-facebook.js
@@ -0,0 +1,9 @@
+/**
+ * Facebook登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByFacebook] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-google.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-google.js
new file mode 100644
index 0000000..8054ece
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-google.js
@@ -0,0 +1,9 @@
+/**
+ * Google登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByGoogle] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-qq.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-qq.js
new file mode 100644
index 0000000..7d2f588
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-qq.js
@@ -0,0 +1,165 @@
+const {
+ initQQ
+} = require('../../lib/third-party/index')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ getQQPlatform,
+ generateQQCache,
+ saveQQUserKey
+} = require('../../lib/utils/qq')
+const url = require('url')
+
+/**
+ * QQ登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-qq
+ * @param {Object} params
+ * @param {String} params.code QQ小程序登录返回的code参数
+ * @param {String} params.accessToken App端QQ登录返回的accessToken参数
+ * @param {String} params.accessTokenExpired accessToken过期时间,由App端QQ登录返回的expires_in参数计算而来,单位:毫秒
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: {
+ type: 'string',
+ required: false
+ },
+ accessToken: {
+ type: 'string',
+ required: false
+ },
+ accessTokenExpired: {
+ type: 'number',
+ required: false
+ },
+ inviteCode: {
+ type: 'string',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ code,
+ accessToken,
+ accessTokenExpired,
+ inviteCode
+ } = params
+ const {
+ appId
+ } = this.getUniversalClientInfo()
+ const qqApi = initQQ.call(this)
+ const qqPlatform = getQQPlatform.call(this)
+ let apiName
+ switch (qqPlatform) {
+ case 'mp':
+ apiName = 'code2Session'
+ break
+ case 'app':
+ apiName = 'getOpenidByToken'
+ break
+ default:
+ throw new Error('Unsupported qq platform')
+ }
+ let getQQAccountResult
+ try {
+ getQQAccountResult = await qqApi[apiName]({
+ code,
+ accessToken
+ })
+ } catch (error) {
+ console.error(error)
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid,
+ unionid,
+ // 保存下面的字段
+ sessionKey // QQ小程序用户sessionKey
+ } = getQQAccountResult
+
+ const {
+ type,
+ user
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ qq_openid: {
+ [qqPlatform]: openid
+ },
+ qq_unionid: unionid
+ }
+ })
+ const extraData = {
+ qq_openid: {
+ [`${qqPlatform}_${appId}`]: openid
+ },
+ qq_unionid: unionid
+ }
+ if (type === 'register' && qqPlatform !== 'mp') {
+ const {
+ nickname,
+ avatar
+ } = await qqApi.getUserInfo({
+ accessToken,
+ openid
+ })
+ // eslint-disable-next-line n/no-deprecated-api
+ const extName = url.parse(avatar).pathname.split('.').pop()
+ const cloudPath = `user/avatar/${openid.slice(-8) + Date.now()}-avatar.${extName}`
+ const getAvatarRes = await uniCloud.httpclient.request(avatar)
+ if (getAvatarRes.status >= 400) {
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_USER_INFO_FAILED
+ }
+ }
+ const {
+ fileID
+ } = await uniCloud.uploadFile({
+ cloudPath,
+ fileContent: getAvatarRes.data
+ })
+ extraData.nickname = nickname
+ extraData.avatar_file = {
+ name: cloudPath,
+ extname: extName,
+ url: fileID
+ }
+ }
+ await saveQQUserKey.call(this, {
+ openid,
+ sessionKey,
+ accessToken,
+ accessTokenExpired
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ ...extraData,
+ ...generateQQCache.call(this, {
+ openid,
+ sessionKey, // QQ小程序用户sessionKey
+ accessToken, // App端QQ用户accessToken
+ accessTokenExpired // App端QQ用户accessToken过期时间
+ })
+ },
+ isThirdParty: true,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js
new file mode 100644
index 0000000..915e9b6
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js
@@ -0,0 +1,99 @@
+const {
+ getNeedCaptcha,
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ verifyMobileCode
+} = require('../../lib/utils/verify-code')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ CAPTCHA_SCENE,
+ SMS_SCENE,
+ LOG_TYPE
+} = require('../../common/constants')
+
+/**
+ * 短信验证码登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-sms
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.code 短信验证码
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ mobile: 'mobile',
+ code: 'string',
+ captcha: {
+ required: false,
+ type: 'string'
+ },
+ inviteCode: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ mobile,
+ code,
+ captcha,
+ inviteCode
+ } = params
+
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ mobile
+ })
+
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.LOGIN_BY_SMS
+ })
+ }
+
+ try {
+ await verifyMobileCode({
+ mobile,
+ code,
+ scene: SMS_SCENE.LOGIN_BY_SMS
+ })
+ } catch (error) {
+ console.log(error, {
+ mobile,
+ code,
+ type: SMS_SCENE.LOGIN_BY_SMS
+ })
+ await this.middleware.uniIdLog({
+ success: false,
+ data: {
+ mobile
+ },
+ type: LOG_TYPE.LOGIN
+ })
+ throw error
+ }
+
+ const {
+ type,
+ user
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ mobile
+ }
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ isThirdParty: false,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-taobao.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-taobao.js
new file mode 100644
index 0000000..6a6d599
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-taobao.js
@@ -0,0 +1,9 @@
+/**
+ * 淘宝登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByTaobao] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-toutiao.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-toutiao.js
new file mode 100644
index 0000000..133aadb
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-toutiao.js
@@ -0,0 +1,9 @@
+/**
+ * 头条登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByToutiao] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-univerify.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-univerify.js
new file mode 100644
index 0000000..53e681c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-univerify.js
@@ -0,0 +1,69 @@
+const {
+ getPhoneNumber
+} = require('../../lib/utils/univerify')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+
+/**
+ * App端一键登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-univerify
+ * @param {Object} params
+ * @param {String} params.access_token APP端一键登录返回的access_token
+ * @param {String} params.openid APP端一键登录返回的openid
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ access_token: 'string',
+ openid: 'string',
+ inviteCode: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ // eslint-disable-next-line camelcase
+ access_token,
+ openid,
+ inviteCode
+ } = params
+
+ let mobile
+ try {
+ const phoneInfo = await getPhoneNumber.call(this, {
+ // eslint-disable-next-line camelcase
+ access_token,
+ openid
+ })
+ mobile = phoneInfo.phoneNumber
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw error
+ }
+ const {
+ user,
+ type
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ mobile
+ }
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weibo.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weibo.js
new file mode 100644
index 0000000..496cdb4
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weibo.js
@@ -0,0 +1,9 @@
+/**
+ * 微博登录
+ * @param {Object} params
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[loginByWeibo] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin-mobile.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin-mobile.js
new file mode 100644
index 0000000..c27c2b2
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin-mobile.js
@@ -0,0 +1,106 @@
+const {
+ initWeixin
+} = require('../../lib/third-party/index')
+const {
+ getWeixinAccessToken
+} = require('../../lib/utils/weixin')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+
+/**
+ * 微信授权手机号登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-weixin-mobile
+ * @param {Object} params
+ * @param {String} params.phoneCode 微信手机号返回的code
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ phoneCode: 'string',
+ inviteCode: {
+ type: 'string',
+ required: false
+ }
+ }
+
+ this.middleware.validate(params, schema)
+
+ const { phoneCode, inviteCode } = params
+
+ const weixinApi = initWeixin.call(this)
+ let mobile
+
+ try {
+ const accessToken = await getWeixinAccessToken.call(this)
+ const mobileRes = await weixinApi.getPhoneNumber(accessToken, phoneCode)
+ mobile = mobileRes.purePhoneNumber
+ } catch (error) {
+ console.error(error)
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const { type, user } = await preUnifiedLogin.call(this, {
+ user: {
+ mobile
+ }
+ })
+
+ let extraData = {
+ mobile_confirmed: 1
+ }
+
+ if (type === 'login') {
+ // 绑定手机号
+ if (!user.mobile_confirmed) {
+ const bindAccount = {
+ mobile
+ }
+ await preBind.call(this, {
+ uid: user._id,
+ bindAccount,
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ await postBind.call(this, {
+ uid: user._id,
+ bindAccount,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ extraData = {
+ ...extraData,
+ ...bindAccount
+ }
+ }
+ }
+
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ ...extraData
+ },
+ isThirdParty: false,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin.js
new file mode 100644
index 0000000..b50f9a5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-weixin.js
@@ -0,0 +1,176 @@
+const {
+ initWeixin
+} = require('../../lib/third-party/index')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preUnifiedLogin,
+ postUnifiedLogin
+} = require('../../lib/utils/unified-login')
+const {
+ generateWeixinCache,
+ getWeixinPlatform,
+ saveWeixinUserKey,
+ saveSecureNetworkCache
+} = require('../../lib/utils/weixin')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const url = require('url')
+
+/**
+ * 微信登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login-by-weixin
+ * @param {Object} params
+ * @param {String} params.code 微信登录返回的code
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: 'string',
+ inviteCode: {
+ type: 'string',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ code,
+ inviteCode,
+ // 内部参数,暂不暴露
+ secureNetworkCache = false
+ } = params
+ const {
+ appId
+ } = this.getUniversalClientInfo()
+ const weixinApi = initWeixin.call(this)
+ const weixinPlatform = getWeixinPlatform.call(this)
+ let apiName
+ switch (weixinPlatform) {
+ case 'mp':
+ apiName = 'code2Session'
+ break
+ case 'app':
+ case 'h5':
+ case 'web':
+ apiName = 'getOauthAccessToken'
+ break
+ default:
+ throw new Error('Unsupported weixin platform')
+ }
+ let getWeixinAccountResult
+ try {
+ getWeixinAccountResult = await weixinApi[apiName](code)
+ } catch (error) {
+ console.error(error)
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.LOGIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid,
+ unionid,
+ // 保存下面四个字段
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ expired: accessTokenExpired // App端微信用户accessToken过期时间
+ } = getWeixinAccountResult
+
+ if (secureNetworkCache) {
+ if (weixinPlatform !== 'mp') {
+ throw new Error('Unsupported weixin platform, expect mp-weixin')
+ }
+ await saveSecureNetworkCache.call(this, {
+ code,
+ openid,
+ unionid,
+ sessionKey
+ })
+ }
+
+ const {
+ type,
+ user
+ } = await preUnifiedLogin.call(this, {
+ user: {
+ wx_openid: {
+ [weixinPlatform]: openid
+ },
+ wx_unionid: unionid
+ }
+ })
+ const extraData = {
+ wx_openid: {
+ [`${weixinPlatform}_${appId}`]: openid
+ },
+ wx_unionid: unionid
+ }
+ if (type === 'register' && weixinPlatform !== 'mp') {
+ const {
+ nickname,
+ avatar
+ } = await weixinApi.getUserInfo({
+ accessToken,
+ openid
+ })
+
+ if (avatar) {
+ // eslint-disable-next-line n/no-deprecated-api
+ const avatarPath = url.parse(avatar).pathname
+ const extName = avatarPath.indexOf('.') > -1 ? url.parse(avatar).pathname.split('.').pop() : 'jpg'
+ const cloudPath = `user/avatar/${openid.slice(-8) + Date.now()}-avatar.${extName}`
+ const getAvatarRes = await uniCloud.httpclient.request(avatar)
+ if (getAvatarRes.status >= 400) {
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_USER_INFO_FAILED
+ }
+ }
+
+ const {
+ fileID
+ } = await uniCloud.uploadFile({
+ cloudPath,
+ fileContent: getAvatarRes.data
+ })
+
+ extraData.avatar_file = {
+ name: cloudPath,
+ extname: extName,
+ url: fileID
+ }
+ }
+
+ extraData.nickname = nickname
+ }
+ await saveWeixinUserKey.call(this, {
+ openid,
+ sessionKey,
+ accessToken,
+ refreshToken,
+ accessTokenExpired
+ })
+ return postUnifiedLogin.call(this, {
+ user,
+ extraData: {
+ ...extraData,
+ ...generateWeixinCache.call(this, {
+ openid,
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ accessTokenExpired // App端微信用户accessToken过期时间
+ })
+ },
+ isThirdParty: true,
+ type,
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js
new file mode 100644
index 0000000..97e9cfe
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js
@@ -0,0 +1,94 @@
+const {
+ preLoginWithPassword,
+ postLogin
+} = require('../../lib/utils/login')
+const {
+ getNeedCaptcha,
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ CAPTCHA_SCENE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+/**
+ * 用户名密码登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#login
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.mobile 手机号
+ * @param {String} params.email 邮箱
+ * @param {String} params.password 密码
+ * @param {String} params.captcha 图形验证码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ username: {
+ required: false,
+ type: 'username'
+ },
+ mobile: {
+ required: false,
+ type: 'mobile'
+ },
+ email: {
+ required: false,
+ type: 'email'
+ },
+ password: 'password',
+ captcha: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ username,
+ mobile,
+ email,
+ password,
+ captcha
+ } = params
+ if (!username && !mobile && !email) {
+ throw {
+ errCode: ERROR.INVALID_USERNAME
+ }
+ } else if (
+ (username && email) ||
+ (username && mobile) ||
+ (email && mobile)
+ ) {
+ throw {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ username,
+ mobile,
+ email
+ })
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.LOGIN_BY_PWD
+ })
+ }
+ const {
+ user,
+ extraData
+ } = await preLoginWithPassword.call(this, {
+ user: {
+ username,
+ mobile,
+ email
+ },
+ password
+ })
+ return postLogin.call(this, {
+ user,
+ extraData
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/index.js
new file mode 100644
index 0000000..544be2b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/index.js
@@ -0,0 +1,3 @@
+module.exports = {
+ logout: require('./logout')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/logout.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/logout.js
new file mode 100644
index 0000000..7d491c6
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/logout/logout.js
@@ -0,0 +1,15 @@
+const {
+ logout
+} = require('../../lib/utils/logout')
+
+/**
+ * 用户退出登录
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#logout
+ * @returns
+ */
+module.exports = async function () {
+ await logout.call(this)
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/authorize-app-login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/authorize-app-login.js
new file mode 100644
index 0000000..8f8a167
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/authorize-app-login.js
@@ -0,0 +1,37 @@
+const {
+ isAuthorizeApproved
+} = require('./utils')
+const {
+ dbCmd,
+ userCollection
+} = require('../../common/constants')
+
+/**
+ * 授权用户登录应用
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#authorize-app-login
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {String} params.appId 授权的应用的AppId
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: 'string',
+ appId: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ uid,
+ appId
+ } = params
+ await isAuthorizeApproved({
+ uid,
+ appIdList: [appId]
+ })
+ await userCollection.doc(uid).update({
+ dcloud_appid: dbCmd.push(appId)
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/index.js
new file mode 100644
index 0000000..ce9cc7b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ authorizeAppLogin: require('./authorize-app-login'),
+ removeAuthorizedApp: require('./remove-authorized-app'),
+ setAuthorizedApp: require('./set-authorized-app')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/remove-authorized-app.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/remove-authorized-app.js
new file mode 100644
index 0000000..df82184
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/remove-authorized-app.js
@@ -0,0 +1,30 @@
+const {
+ dbCmd,
+ userCollection
+} = require('../../common/constants')
+
+/**
+ * 移除用户登录授权
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#remove-authorized-app
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {String} params.appId 取消授权的应用的AppId
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: 'string',
+ appId: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ uid,
+ appId
+ } = params
+ await userCollection.doc(uid).update({
+ dcloud_appid: dbCmd.pull(appId)
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/set-authorized-app.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/set-authorized-app.js
new file mode 100644
index 0000000..a438ef9
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/set-authorized-app.js
@@ -0,0 +1,36 @@
+const {
+ isAuthorizeApproved
+} = require('./utils')
+const {
+ userCollection
+} = require('../../common/constants')
+
+/**
+ * 设置用户允许登录的应用列表
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-authorized-app
+ * @param {Object} params
+ * @param {String} params.uid 用户id
+ * @param {Array} params.appIdList 允许登录的应用AppId列表
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ uid: 'string',
+ appIdList: 'array'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ uid,
+ appIdList
+ } = params
+ await isAuthorizeApproved({
+ uid,
+ appIdList
+ })
+ await userCollection.doc(uid).update({
+ dcloud_appid: appIdList
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/utils.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/utils.js
new file mode 100644
index 0000000..4ee4e26
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/multi-end/utils.js
@@ -0,0 +1,38 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ findUser
+} = require('../../lib/utils/account')
+
+async function isAuthorizeApproved ({
+ uid,
+ appIdList
+} = {}) {
+ const getUserRes = await userCollection.doc(uid).get()
+ const userRecord = getUserRes.data[0]
+ if (!userRecord) {
+ throw {
+ errCode: ERROR.ACCOUNT_NOT_EXISTS
+ }
+ }
+ const {
+ userMatched
+ } = await findUser({
+ userQuery: userRecord,
+ authorizedApp: appIdList
+ })
+
+ if (userMatched.some(item => item._id !== uid)) {
+ throw {
+ errCode: ERROR.ACCOUNT_CONFLICT
+ }
+ }
+}
+
+module.exports = {
+ isAuthorizeApproved
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/index.js
new file mode 100644
index 0000000..64ff603
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ registerUser: require('./register-user'),
+ registerAdmin: require('./register-admin'),
+ registerUserByEmail: require('./register-user-by-email')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js
new file mode 100644
index 0000000..5e122ab
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js
@@ -0,0 +1,72 @@
+const {
+ userCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ preRegisterWithPassword,
+ postRegister
+} = require('../../lib/utils/register')
+
+/**
+ * 注册管理员
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#register-admin
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ username: 'username',
+ password: 'password',
+ nickname: {
+ type: 'nickname',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ username,
+ password,
+ nickname
+ } = params
+ const getAdminRes = await userCollection.where({
+ role: 'admin'
+ }).limit(1).get()
+ if (getAdminRes.data.length > 0) {
+ const [admin] = getAdminRes.data
+ const appId = this.getUniversalClientInfo().appId
+
+ if (!admin.dcloud_appid || (admin.dcloud_appid && admin.dcloud_appid.includes(appId))) {
+ return {
+ errCode: ERROR.ADMIN_EXISTS,
+ errMsg: this.t('uni-id-admin-exists')
+ }
+ } else {
+ return {
+ errCode: ERROR.ADMIN_EXISTS,
+ errMsg: this.t('uni-id-admin-exist-in-other-apps')
+ }
+ }
+ }
+ const {
+ user,
+ extraData
+ } = await preRegisterWithPassword.call(this, {
+ user: {
+ username
+ },
+ password
+ })
+ return postRegister.call(this, {
+ user,
+ extraData: {
+ ...extraData,
+ nickname,
+ role: ['admin']
+ }
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user-by-email.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user-by-email.js
new file mode 100644
index 0000000..b52c1d2
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user-by-email.js
@@ -0,0 +1,87 @@
+const {
+ postRegister,
+ preRegisterWithPassword
+} = require('../../lib/utils/register')
+const {
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ CAPTCHA_SCENE,
+ EMAIL_SCENE,
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ verifyEmailCode
+} = require('../../lib/utils/verify-code')
+
+/**
+ * 通过邮箱+验证码注册普通用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#register-user-by-email
+ * @param {Object} params
+ * @param {String} params.email 邮箱
+ * @param {String} params.password 密码
+ * @param {String} params.nickname 昵称
+ * @param {String} params.code 邮箱验证码
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ email: 'email',
+ password: 'password',
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ code: 'string',
+ inviteCode: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ email,
+ password,
+ nickname,
+ code,
+ inviteCode
+ } = params
+
+ try {
+ // 验证邮箱验证码,验证不通过时写入失败日志
+ await verifyEmailCode({
+ email,
+ code,
+ scene: EMAIL_SCENE.REGISTER
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ data: {
+ email
+ },
+ type: LOG_TYPE.REGISTER,
+ success: false
+ })
+ throw error
+ }
+
+ const {
+ user,
+ extraData
+ } = await preRegisterWithPassword.call(this, {
+ user: {
+ email
+ },
+ password
+ })
+ return postRegister.call(this, {
+ user,
+ extraData: {
+ ...extraData,
+ nickname,
+ email_confirmed: 1
+ },
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user.js
new file mode 100644
index 0000000..130dece
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-user.js
@@ -0,0 +1,68 @@
+const {
+ postRegister,
+ preRegisterWithPassword
+} = require('../../lib/utils/register')
+const {
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ CAPTCHA_SCENE
+} = require('../../common/constants')
+
+/**
+ * 注册普通用户
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#register-user
+ * @param {Object} params
+ * @param {String} params.username 用户名
+ * @param {String} params.password 密码
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.nickname 昵称
+ * @param {String} params.inviteCode 邀请码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ username: 'username',
+ password: 'password',
+ captcha: 'string',
+ nickname: {
+ required: false,
+ type: 'nickname'
+ },
+ inviteCode: {
+ required: false,
+ type: 'string'
+ }
+ }
+ this.middleware.validate(params, schema)
+ const {
+ username,
+ password,
+ nickname,
+ captcha,
+ inviteCode
+ } = params
+
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.REGISTER
+ })
+
+ const {
+ user,
+ extraData
+ } = await preRegisterWithPassword.call(this, {
+ user: {
+ username
+ },
+ password
+ })
+ return postRegister.call(this, {
+ user,
+ extraData: {
+ ...extraData,
+ nickname
+ },
+ inviteCode
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-alipay.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-alipay.js
new file mode 100644
index 0000000..bdb451b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-alipay.js
@@ -0,0 +1,63 @@
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ initAlipay
+} = require('../../lib/third-party/index')
+
+/**
+ * 绑定支付宝账号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-alipay
+ * @param {Object} params
+ * @param {String} params.code 支付宝小程序登录返回的code参数
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ const {
+ code
+ } = params
+ const alipayApi = initAlipay.call(this)
+ let getAlipayAccountResult
+ try {
+ getAlipayAccountResult = await alipayApi().code2Session(code)
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.BIND_ALIPAY
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid
+ } = getAlipayAccountResult
+
+ const bindAccount = {
+ ali_openid: openid
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_APPLE
+ })
+ return postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {},
+ logType: LOG_TYPE.BIND_APPLE
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-apple.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-apple.js
new file mode 100644
index 0000000..eb87f8b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-apple.js
@@ -0,0 +1,62 @@
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ initApple
+} = require('../../lib/third-party/index')
+
+/**
+ * 绑定苹果账号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-apple
+ * @param {Object} params
+ * @param {String} params.identityToken 苹果登录返回identityToken
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ identityToken: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ const {
+ identityToken
+ } = params
+ const appleApi = initApple.call(this)
+ let verifyResult
+ try {
+ verifyResult = await appleApi.verifyIdentityToken(identityToken)
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.BIND_APPLE
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+ const {
+ openid
+ } = verifyResult
+
+ const bindAccount = {
+ apple_openid: openid
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_APPLE
+ })
+ return postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {},
+ logType: LOG_TYPE.BIND_APPLE
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-mp-weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-mp-weixin.js
new file mode 100644
index 0000000..f4c2bd0
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-mp-weixin.js
@@ -0,0 +1,104 @@
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ decryptWeixinData,
+ getWeixinCache, getWeixinAccessToken
+} = require('../../lib/utils/weixin')
+const { initWeixin } = require('../../lib/third-party')
+const { ERROR } = require('../../common/error')
+
+/**
+ * 通过微信绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-mp-weixin
+ * @param {Object} params
+ * @param {String} params.encryptedData 微信获取手机号返回的加密信息
+ * @param {String} params.iv 微信获取手机号返回的初始向量
+ * @param {String} params.code 微信获取手机号返回的code
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ /**
+ * 微信小程序的规则是客户端应先使用checkSession接口检测上次获取的sessionKey是否仍有效
+ * 如果有效则直接使用上次存储的sessionKey即可
+ * 如果无效应重新调用login接口再次刷新sessionKey
+ * 因此此接口不应直接使用客户端login获取的code,只能使用缓存的sessionKey
+ */
+ const schema = {
+ encryptedData: {
+ required: false,
+ type: 'string'
+ },
+ iv: {
+ required: false,
+ type: 'string'
+ },
+ code: {
+ required: false,
+ type: 'string'
+ }
+ }
+ const {
+ encryptedData,
+ iv,
+ code
+ } = params
+ this.middleware.validate(params, schema)
+
+ if ((!encryptedData && !iv) && !code) {
+ return {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+
+ const uid = this.authInfo.uid
+
+ let mobile
+ if (code) {
+ // 区分客户端类型 小程序还是App
+ const accessToken = await getWeixinAccessToken.call(this)
+ const weixinApi = initWeixin.call(this)
+ const res = await weixinApi.getPhoneNumber(accessToken, code)
+
+ mobile = res.purePhoneNumber
+ } else {
+ const sessionKey = await getWeixinCache.call(this, {
+ uid,
+ key: 'session_key'
+ })
+ if (!sessionKey) {
+ throw new Error('Session key not found')
+ }
+ const res = decryptWeixinData.call(this, {
+ encryptedData,
+ sessionKey,
+ iv
+ })
+
+ mobile = res.purePhoneNumber
+ }
+
+ const bindAccount = {
+ mobile
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ await postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js
new file mode 100644
index 0000000..1640c2d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js
@@ -0,0 +1,92 @@
+const {
+ getNeedCaptcha,
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ LOG_TYPE,
+ SMS_SCENE,
+ CAPTCHA_SCENE
+} = require('../../common/constants')
+const {
+ verifyMobileCode
+} = require('../../lib/utils/verify-code')
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+
+/**
+ * 通过短信验证码绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-sms
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.code 短信验证码
+ * @param {String} params.captcha 图形验证码
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ mobile: 'mobile',
+ code: 'string',
+ captcha: {
+ type: 'string',
+ required: false
+ }
+ }
+ const {
+ mobile,
+ code,
+ captcha
+ } = params
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+
+ // 判断是否需要验证码
+ const needCaptcha = await getNeedCaptcha.call(this, {
+ uid,
+ type: LOG_TYPE.BIND_MOBILE
+ })
+ if (needCaptcha) {
+ await verifyCaptcha.call(this, {
+ captcha,
+ scene: CAPTCHA_SCENE.BIND_MOBILE_BY_SMS
+ })
+ }
+
+ try {
+ // 验证手机号验证码,验证不通过时写入失败日志
+ await verifyMobileCode({
+ mobile,
+ code,
+ scene: SMS_SCENE.BIND_MOBILE_BY_SMS
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ data: {
+ user_id: uid
+ },
+ type: LOG_TYPE.BIND_MOBILE,
+ success: false
+ })
+ throw error
+ }
+ const bindAccount = {
+ mobile
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ await postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-univerify.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-univerify.js
new file mode 100644
index 0000000..2970c61
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-univerify.js
@@ -0,0 +1,70 @@
+const {
+ getPhoneNumber
+} = require('../../lib/utils/univerify')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+
+/**
+ * 通过一键登录绑定手机号
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-mobile-by-univerify
+ * @param {Object} params
+ * @param {String} params.openid APP端一键登录返回的openid
+ * @param {String} params.access_token APP端一键登录返回的access_token
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ openid: 'string',
+ access_token: 'string'
+ }
+ const {
+ openid,
+ // eslint-disable-next-line camelcase
+ access_token
+ } = params
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ let mobile
+ try {
+ const phoneInfo = await getPhoneNumber.call(this, {
+ // eslint-disable-next-line camelcase
+ access_token,
+ openid
+ })
+ mobile = phoneInfo.phoneNumber
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ data: {
+ user_id: uid
+ },
+ type: LOG_TYPE.BIND_MOBILE
+ })
+ throw error
+ }
+
+ const bindAccount = {
+ mobile
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ await postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {
+ mobile_confirmed: 1
+ },
+ logType: LOG_TYPE.BIND_MOBILE
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-qq.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-qq.js
new file mode 100644
index 0000000..574f917
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-qq.js
@@ -0,0 +1,110 @@
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ initQQ
+} = require('../../lib/third-party/index')
+const {
+ generateQQCache,
+ getQQPlatform,
+ saveQQUserKey
+} = require('../../lib/utils/qq')
+
+/**
+ * 绑定QQ
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-qq
+ * @param {Object} params
+ * @param {String} params.code 小程序端QQ登录返回的code
+ * @param {String} params.accessToken APP端QQ登录返回的accessToken
+ * @param {String} params.accessTokenExpired accessToken过期时间,由App端QQ登录返回的expires_in参数计算而来,单位:毫秒
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: {
+ type: 'string',
+ required: false
+ },
+ accessToken: {
+ type: 'string',
+ required: false
+ },
+ accessTokenExpired: {
+ type: 'number',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ const {
+ code,
+ accessToken,
+ accessTokenExpired
+ } = params
+ const qqPlatform = getQQPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+ const qqApi = initQQ.call(this)
+ const clientPlatform = this.clientPlatform
+ const apiName = clientPlatform === 'mp-qq' ? 'code2Session' : 'getOpenidByToken'
+ let getQQAccountResult
+ try {
+ getQQAccountResult = await qqApi[apiName]({
+ code,
+ accessToken
+ })
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.BIND_QQ
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid,
+ unionid,
+ // 保存下面四个字段
+ sessionKey // 微信小程序用户sessionKey
+ } = getQQAccountResult
+
+ const bindAccount = {
+ qq_openid: {
+ [qqPlatform]: openid
+ },
+ qq_unionid: unionid
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_QQ
+ })
+ await saveQQUserKey.call(this, {
+ openid,
+ sessionKey,
+ accessToken,
+ accessTokenExpired
+ })
+ return postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {
+ qq_openid: {
+ [`${qqPlatform}_${appId}`]: openid
+ },
+ ...generateQQCache.call(this, {
+ openid,
+ sessionKey
+ })
+ },
+ logType: LOG_TYPE.BIND_QQ
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-weixin.js
new file mode 100644
index 0000000..d649478
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-weixin.js
@@ -0,0 +1,100 @@
+const {
+ preBind,
+ postBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE
+} = require('../../common/constants')
+const {
+ generateWeixinCache,
+ saveWeixinUserKey,
+ getWeixinPlatform
+} = require('../../lib/utils/weixin')
+const {
+ initWeixin
+} = require('../../lib/third-party/index')
+const {
+ ERROR
+} = require('../../common/error')
+
+/**
+ * 绑定微信
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#bind-weixin
+ * @param {Object} params
+ * @param {String} params.code 微信登录返回的code
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const uid = this.authInfo.uid
+ const {
+ code
+ } = params
+ const weixinPlatform = getWeixinPlatform.call(this)
+ const appId = this.getUniversalClientInfo().appId
+
+ const weixinApi = initWeixin.call(this)
+ const clientPlatform = this.clientPlatform
+ const apiName = clientPlatform === 'mp-weixin' ? 'code2Session' : 'getOauthAccessToken'
+ let getWeixinAccountResult
+ try {
+ getWeixinAccountResult = await weixinApi[apiName](code)
+ } catch (error) {
+ await this.middleware.uniIdLog({
+ success: false,
+ type: LOG_TYPE.BIND_WEIXIN
+ })
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+
+ const {
+ openid,
+ unionid,
+ // 保存下面四个字段
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ expired: accessTokenExpired // App端微信用户accessToken过期时间
+ } = getWeixinAccountResult
+
+ const bindAccount = {
+ wx_openid: {
+ [weixinPlatform]: openid
+ },
+ wx_unionid: unionid
+ }
+ await preBind.call(this, {
+ uid,
+ bindAccount,
+ logType: LOG_TYPE.BIND_WEIXIN
+ })
+ await saveWeixinUserKey.call(this, {
+ openid,
+ sessionKey,
+ accessToken,
+ refreshToken,
+ accessTokenExpired
+ })
+ return postBind.call(this, {
+ uid,
+ bindAccount,
+ extraData: {
+ wx_openid: {
+ [`${weixinPlatform}_${appId}`]: openid
+ },
+ ...generateWeixinCache.call(this, {
+ openid,
+ sessionKey, // 微信小程序用户sessionKey
+ accessToken, // App端微信用户accessToken
+ refreshToken, // App端微信用户refreshToken
+ accessTokenExpired // App端微信用户accessToken过期时间
+ })
+ },
+ logType: LOG_TYPE.BIND_WEIXIN
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/index.js
new file mode 100644
index 0000000..4d99c02
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/index.js
@@ -0,0 +1,13 @@
+module.exports = {
+ bindMobileBySms: require('./bind-mobile-by-sms'),
+ bindMobileByUniverify: require('./bind-mobile-by-univerify'),
+ bindMobileByMpWeixin: require('./bind-mobile-by-mp-weixin'),
+ bindAlipay: require('./bind-alipay'),
+ bindApple: require('./bind-apple'),
+ bindQQ: require('./bind-qq'),
+ bindWeixin: require('./bind-weixin'),
+ unbindWeixin: require('./unbind-weixin'),
+ unbindAlipay: require('./unbind-alipay'),
+ unbindQQ: require('./unbind-qq'),
+ unbindApple: require('./unbind-apple')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-alipay.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-alipay.js
new file mode 100644
index 0000000..67bb43b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-alipay.js
@@ -0,0 +1,32 @@
+const {
+ preUnBind,
+ postUnBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE, dbCmd
+} = require('../../common/constants')
+
+/**
+ * 解绑支付宝
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-alipay
+ * @returns
+ */
+module.exports = async function () {
+ const { uid } = this.authInfo
+
+ await preUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ ali_openid: dbCmd.exists(true)
+ },
+ logType: LOG_TYPE.UNBIND_ALIPAY
+ })
+
+ return await postUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ ali_openid: dbCmd.remove()
+ },
+ logType: LOG_TYPE.UNBIND_ALIPAY
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-apple.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-apple.js
new file mode 100644
index 0000000..111c1bf
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-apple.js
@@ -0,0 +1,32 @@
+const {
+ preUnBind,
+ postUnBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE, dbCmd
+} = require('../../common/constants')
+
+/**
+ * 解绑apple
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-apple
+ * @returns
+ */
+module.exports = async function () {
+ const { uid } = this.authInfo
+
+ await preUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ apple_openid: dbCmd.exists(true)
+ },
+ logType: LOG_TYPE.UNBIND_APPLE
+ })
+
+ return await postUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ apple_openid: dbCmd.remove()
+ },
+ logType: LOG_TYPE.UNBIND_APPLE
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-qq.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-qq.js
new file mode 100644
index 0000000..0c9704c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-qq.js
@@ -0,0 +1,33 @@
+const {
+ preUnBind,
+ postUnBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE, dbCmd
+} = require('../../common/constants')
+/**
+ * 解绑QQ
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq
+ * @returns
+ */
+module.exports = async function () {
+ const { uid } = this.authInfo
+
+ await preUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ qq_openid: dbCmd.exists(true),
+ qq_unionid: dbCmd.exists(true)
+ },
+ logType: LOG_TYPE.UNBIND_QQ
+ })
+
+ return await postUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ qq_openid: dbCmd.remove(),
+ qq_unionid: dbCmd.remove()
+ },
+ logType: LOG_TYPE.UNBIND_QQ
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-weixin.js
new file mode 100644
index 0000000..2248327
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/unbind-weixin.js
@@ -0,0 +1,38 @@
+const {
+ preUnBind,
+ postUnBind
+} = require('../../lib/utils/relate')
+const {
+ LOG_TYPE, dbCmd
+} = require('../../common/constants')
+const {
+ getWeixinPlatform
+} = require('../../lib/utils/weixin')
+
+/**
+ * 解绑微信
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-weixin
+ * @returns
+ */
+module.exports = async function () {
+ const { uid } = this.authInfo
+ // const weixinPlatform = getWeixinPlatform.call(this)
+
+ await preUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ wx_openid: dbCmd.exists(true),
+ wx_unionid: dbCmd.exists(true)
+ },
+ logType: LOG_TYPE.UNBIND_WEIXIN
+ })
+
+ return await postUnBind.call(this, {
+ uid,
+ unBindAccount: {
+ wx_openid: dbCmd.remove(),
+ wx_unionid: dbCmd.remove()
+ },
+ logType: LOG_TYPE.UNBIND_WEIXIN
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/index.js
new file mode 100644
index 0000000..0ec67a5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ refreshToken: require('./refresh-token'),
+ setPushCid: require('./set-push-cid'),
+ secureNetworkHandshakeByWeixin: require('./secure-network-handshake-by-weixin')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/refresh-token.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/refresh-token.js
new file mode 100644
index 0000000..b12f1f0
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/refresh-token.js
@@ -0,0 +1,24 @@
+/**
+ * 刷新token
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#refresh-token
+ */
+module.exports = async function () {
+ const refreshTokenRes = await this.uniIdCommon.refreshToken({
+ token: this.getUniversalUniIdToken()
+ })
+ const {
+ errCode,
+ token,
+ tokenExpired
+ } = refreshTokenRes
+ if (errCode) {
+ throw refreshTokenRes
+ }
+ return {
+ errCode: 0,
+ newToken: {
+ token,
+ tokenExpired
+ }
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/secure-network-handshake-by-weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/secure-network-handshake-by-weixin.js
new file mode 100644
index 0000000..82ea0b3
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/secure-network-handshake-by-weixin.js
@@ -0,0 +1,73 @@
+const {
+ ERROR
+} = require('../../common/error')
+const {
+ initWeixin
+} = require('../../lib/third-party/index')
+const {
+ saveWeixinUserKey,
+ saveSecureNetworkCache
+} = require('../../lib/utils/weixin')
+const loginByWeixin = require('../login/login-by-weixin')
+/**
+ * 微信安全网络握手
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-push-cid
+ * @param {object} params
+ * @param {string} params.code 微信登录返回的code
+ * @param {boolean} params.callLoginByWeixin 是否同时调用一次微信登录
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ code: 'string',
+ callLoginByWeixin: {
+ type: 'boolean',
+ required: false
+ }
+ }
+ this.middleware.validate(params, schema)
+ let platform = this.clientPlatform
+ if (platform !== 'mp-weixin') {
+ throw new Error(`[secureNetworkHandshake] platform ${platform} is not supported`)
+ }
+ const {
+ code,
+ callLoginByWeixin = false
+ } = params
+ if (callLoginByWeixin) {
+ return loginByWeixin.call(this, {
+ code,
+ secureNetworkCache: true
+ })
+ }
+
+ const weixinApi = initWeixin.call(this)
+ let getWeixinAccountResult
+ try {
+ getWeixinAccountResult = await weixinApi.code2Session(code)
+ } catch (error) {
+ console.error(error)
+ throw {
+ errCode: ERROR.GET_THIRD_PARTY_ACCOUNT_FAILED
+ }
+ }
+ const {
+ openid,
+ unionid,
+ sessionKey // 微信小程序用户sessionKey
+ } = getWeixinAccountResult
+ await saveSecureNetworkCache.call(this, {
+ code,
+ openid,
+ unionid,
+ sessionKey
+ })
+ await saveWeixinUserKey.call(this, {
+ openid,
+ sessionKey
+ })
+
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js
new file mode 100644
index 0000000..9e08183
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js
@@ -0,0 +1,132 @@
+const {
+ deviceCollection
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+async function setOpendbDevice ({
+ pushClientId
+} = {}) {
+ // 仅新增,如果存在进行更新操作
+ const {
+ appId,
+ deviceId,
+ deviceBrand,
+ deviceModel,
+ osName,
+ osVersion,
+ osLanguage,
+ osTheme,
+ devicePixelRatio,
+ windowWidth,
+ windowHeight,
+ screenWidth,
+ screenHeight,
+ romName,
+ romVersion
+ } = this.getUniversalClientInfo()
+ const platform = this.clientPlatform
+ const now = Date.now()
+
+ const db = uniCloud.database()
+ const opendbDeviceCollection = db.collection('opendb-device')
+ const getDeviceRes = await opendbDeviceCollection.where({
+ device_id: deviceId
+ }).get()
+ const data = {
+ appid: appId,
+ device_id: deviceId,
+ vendor: deviceBrand,
+ model: deviceModel,
+ uni_platform: platform,
+ os_name: osName,
+ os_version: osVersion,
+ os_language: osLanguage,
+ os_theme: osTheme,
+ pixel_ratio: devicePixelRatio,
+ window_width: windowWidth,
+ window_height: windowHeight,
+ screen_width: screenWidth,
+ screen_height: screenHeight,
+ rom_name: romName,
+ rom_version: romVersion,
+ last_update_date: now,
+ push_clientid: pushClientId
+ }
+ if (getDeviceRes.data.length > 0) {
+ await opendbDeviceCollection.where({
+ device_id: deviceId
+ }).update(data)
+ return
+ }
+ data.create_date = now
+ await opendbDeviceCollection.add(data)
+}
+
+/**
+ * 更新device表的push_clien_id
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#set-push-cid
+ * @param {object} params
+ * @param {string} params.pushClientId 客户端pushClientId
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ pushClientId: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ deviceId,
+ appId,
+ osName
+ } = this.getUniversalClientInfo()
+ let platform = this.clientPlatform
+ if (platform === 'app') {
+ platform += osName
+ }
+
+ const {
+ uid,
+ exp
+ } = this.authInfo
+ const { pushClientId } = params
+ const tokenExpired = exp * 1000
+ const getDeviceRes = await deviceCollection.where({
+ device_id: deviceId
+ }).get()
+ // console.log(getDeviceRes)
+ if (getDeviceRes.data.length > 1) {
+ return {
+ errCode: ERROR.SYSTEM_ERROR
+ }
+ }
+ const deviceRecord = getDeviceRes.data[0]
+ await setOpendbDevice.call(this, {
+ pushClientId
+ })
+ if (!deviceRecord) {
+ await deviceCollection.add({
+ user_id: uid,
+ device_id: deviceId,
+ token_expired: tokenExpired,
+ push_clientid: pushClientId,
+ appid: appId
+ })
+ return {
+ errCode: 0
+ }
+ }
+
+ await deviceCollection.where({
+ device_id: deviceId
+ }).update({
+ user_id: uid,
+ token_expired: tokenExpired,
+ push_clientid: pushClientId,
+ appid: appId
+ })
+ return {
+ errCode: 0
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/create-captcha.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/create-captcha.js
new file mode 100644
index 0000000..c3f7d81
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/create-captcha.js
@@ -0,0 +1,35 @@
+const {
+ CAPTCHA_SCENE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+/**
+ * 创建图形验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#create-captcha
+ * @param {Object} params
+ * @param {String} params.scene 图形验证码使用场景
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ scene: 'string'
+ }
+ this.middleware.validate(params, schema)
+
+ const { deviceId, platform } = this.getUniversalClientInfo()
+ const {
+ scene
+ } = params
+ if (!(Object.values(CAPTCHA_SCENE).includes(scene))) {
+ throw {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+ return this.uniCaptcha.create({
+ deviceId,
+ scene,
+ uniPlatform: platform
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/index.js
new file mode 100644
index 0000000..fba3524
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/index.js
@@ -0,0 +1,7 @@
+module.exports = {
+ createCaptcha: require('./create-captcha'),
+ refreshCaptcha: require('./refresh-captcha'),
+ sendSmsCode: require('./send-sms-code'),
+ sendEmailLink: require('./send-email-link'),
+ sendEmailCode: require('./send-email-code')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/refresh-captcha.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/refresh-captcha.js
new file mode 100644
index 0000000..fafdc6b
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/refresh-captcha.js
@@ -0,0 +1,36 @@
+const {
+ CAPTCHA_SCENE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+/**
+ * 刷新图形验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#refresh-captcha
+ * @param {Object} params
+ * @param {String} params.scene 图形验证码使用场景
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ scene: 'string'
+ }
+ this.middleware.validate(params, schema)
+
+ const { deviceId, platform } = this.getUniversalClientInfo()
+
+ const {
+ scene
+ } = params
+ if (!(Object.values(CAPTCHA_SCENE).includes(scene))) {
+ throw {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+ return this.uniCaptcha.refresh({
+ deviceId,
+ scene,
+ uniPlatform: platform
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-code.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-code.js
new file mode 100644
index 0000000..1a6304d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-code.js
@@ -0,0 +1,60 @@
+const {
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ EMAIL_SCENE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+/**
+ * 发送邮箱验证码,可用于登录、注册、绑定邮箱、修改密码等操作
+ * @tutorial
+ * @param {Object} params
+ * @param {String} params.email 邮箱
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.scene 使用场景
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ email: 'email',
+ captcha: 'string',
+ scene: 'string'
+ }
+ this.middleware.validate(params, schema)
+
+ const {
+ email,
+ captcha,
+ scene
+ } = params
+
+ if (!(Object.values(EMAIL_SCENE).includes(scene))) {
+ throw {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+
+ await verifyCaptcha.call(this, {
+ scene: 'send-email-code',
+ captcha
+ })
+
+ // -- 测试代码
+ await require('../../lib/utils/verify-code')
+ .setEmailVerifyCode.call(this, {
+ email,
+ code: '123456',
+ expiresIn: 180,
+ scene
+ })
+ return {
+ errCode: 'uni-id-invalid-mail-template',
+ errMsg: `已启动测试模式,直接使用:123456作为邮箱验证码即可。\n如果是正式项目,需自行实现发送邮件的相关功能`
+ }
+ // -- 测试代码
+
+
+ //发送邮件--需自行实现
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-link.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-link.js
new file mode 100644
index 0000000..f643434
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-email-link.js
@@ -0,0 +1,12 @@
+/**
+ * 发送邮箱链接,可用于登录、注册、绑定邮箱、修改密码等操作
+ * @tutorial
+ * @param {Object} params
+ * @param {String} params.email 邮箱
+ * @param {String} params.scene 使用场景
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ // 此接口暂未实现,欢迎向我们提交pr
+ throw new Error('api[sendEmailLink] is not yet implemented')
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-sms-code.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-sms-code.js
new file mode 100644
index 0000000..b392e7e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-sms-code.js
@@ -0,0 +1,71 @@
+const {
+ sendSmsCode
+} = require('../../lib/utils/sms')
+const {
+ verifyCaptcha
+} = require('../../lib/utils/captcha')
+const {
+ SMS_SCENE
+} = require('../../common/constants')
+const {
+ ERROR
+} = require('../../common/error')
+
+/**
+ * 发送短信验证码
+ * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#send-sms-code
+ * @param {Object} params
+ * @param {String} params.mobile 手机号
+ * @param {String} params.captcha 图形验证码
+ * @param {String} params.scene 短信验证码使用场景
+ * @returns
+ */
+module.exports = async function (params = {}) {
+ const schema = {
+ mobile: 'mobile',
+ captcha: 'string',
+ scene: 'string'
+ }
+ this.middleware.validate(params, schema)
+ const {
+ mobile,
+ captcha,
+ scene
+ } = params
+ if (!(Object.values(SMS_SCENE).includes(scene))) {
+ throw {
+ errCode: ERROR.INVALID_PARAM
+ }
+ }
+ await verifyCaptcha.call(this, {
+ scene: 'send-sms-code',
+ captcha
+ })
+
+ // -- 测试代码
+ const {
+ templateId
+ } = (this.config.service &&
+ this.config.service.sms &&
+ this.config.service.sms.scene &&
+ this.config.service.sms.scene[scene]) || {}
+ if (!templateId) {
+ await require('../../lib/utils/verify-code')
+ .setMobileVerifyCode.call(this, {
+ mobile: params.mobile,
+ code: '123456',
+ expiresIn: 180,
+ scene
+ })
+ return {
+ errCode: 'uni-id-invalid-sms-template-id',
+ errMsg: `未找到scene=${scene},的短信模版templateId。\n已启动测试模式,直接使用:123456作为短信验证码即可。\n如果是正式项目,请在路径:/common/uni-config-center/uni-id/config.json中service->sms中配置密钥等信息\n更多详情:https://uniapp.dcloud.io/uniCloud/uni-id.html#config`
+ }
+ }
+ // -- 测试代码
+
+ return sendSmsCode.call(this, {
+ mobile,
+ scene
+ })
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn
new file mode 100644
index 0000000..c31c430
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
+ ret=$?
+else
+ node "$basedir/../acorn/bin/acorn" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.cmd
new file mode 100644
index 0000000..3c863f5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\acorn\bin\acorn" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.ps1
new file mode 100644
index 0000000..759f820
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/acorn.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../acorn/bin/acorn" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint
new file mode 100644
index 0000000..3bb2761
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
+ ret=$?
+else
+ node "$basedir/../eslint/bin/eslint.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.cmd
new file mode 100644
index 0000000..1c5e51c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\eslint\bin\eslint.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.ps1
new file mode 100644
index 0000000..ee32767
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/eslint.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../eslint/bin/eslint.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml
new file mode 100644
index 0000000..4537030
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
+ ret=$?
+else
+ node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.cmd
new file mode 100644
index 0000000..9597bdf
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.ps1
new file mode 100644
index 0000000..728b322
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/js-yaml.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5
new file mode 100644
index 0000000..882cecd
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
+ ret=$?
+else
+ node "$basedir/../json5/lib/cli.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.cmd
new file mode 100644
index 0000000..b030d83
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\json5\lib\cli.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.ps1
new file mode 100644
index 0000000..585f9ad
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/json5.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../json5/lib/cli.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which
new file mode 100644
index 0000000..cd9503c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../which/bin/node-which" "$@"
+ ret=$?
+else
+ node "$basedir/../which/bin/node-which" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.cmd
new file mode 100644
index 0000000..7060445
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\which\bin\node-which" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.ps1
new file mode 100644
index 0000000..60d6560
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/node-which.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../which/bin/node-which" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve
new file mode 100644
index 0000000..fc0df5e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
+ ret=$?
+else
+ node "$basedir/../resolve/bin/resolve" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.cmd
new file mode 100644
index 0000000..084c0b1
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\resolve\bin\resolve" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.ps1
new file mode 100644
index 0000000..12d6724
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/resolve.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../resolve/bin/resolve" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf
new file mode 100644
index 0000000..a3e9f71
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
+ ret=$?
+else
+ node "$basedir/../rimraf/bin.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.cmd
new file mode 100644
index 0000000..698f4ba
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\rimraf\bin.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.ps1
new file mode 100644
index 0000000..a244a80
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/rimraf.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../rimraf/bin.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver
new file mode 100644
index 0000000..10497aa
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+else
+ node "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.cmd b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.cmd
new file mode 100644
index 0000000..eb3aaa1
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\semver\bin\semver" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.ps1 b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.ps1
new file mode 100644
index 0000000..a3315ff
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/.bin/semver.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../semver/bin/semver" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/LICENSE b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/LICENSE
new file mode 100644
index 0000000..842218c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2016, Jon Schlinkert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/README.md b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/README.md
new file mode 100644
index 0000000..3abb882
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/README.md
@@ -0,0 +1,182 @@
+# word-wrap [![NPM version](https://img.shields.io/npm/v/word-wrap.svg?style=flat)](https://www.npmjs.com/package/word-wrap) [![NPM monthly downloads](https://img.shields.io/npm/dm/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![NPM total downloads](https://img.shields.io/npm/dt/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/word-wrap.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/word-wrap)
+
+> Wrap words to a specified length.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save word-wrap
+```
+
+## Usage
+
+```js
+var wrap = require('word-wrap');
+
+wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
+```
+
+Results in:
+
+```
+ Lorem ipsum dolor sit amet, consectetur adipiscing
+ elit, sed do eiusmod tempor incididunt ut labore
+ et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut
+ aliquip ex ea commodo consequat.
+```
+
+## Options
+
+![image](https://cloud.githubusercontent.com/assets/383994/6543728/7a381c08-c4f6-11e4-8b7d-b6ba197569c9.png)
+
+### options.width
+
+Type: `Number`
+
+Default: `50`
+
+The width of the text before wrapping to a new line.
+
+**Example:**
+
+```js
+wrap(str, {width: 60});
+```
+
+### options.indent
+
+Type: `String`
+
+Default: `` (none)
+
+The string to use at the beginning of each line.
+
+**Example:**
+
+```js
+wrap(str, {indent: ' '});
+```
+
+### options.newline
+
+Type: `String`
+
+Default: `\n`
+
+The string to use at the end of each line.
+
+**Example:**
+
+```js
+wrap(str, {newline: '\n\n'});
+```
+
+### options.escape
+
+Type: `function`
+
+Default: `function(str){return str;}`
+
+An escape function to run on each line after splitting them.
+
+**Example:**
+
+```js
+var xmlescape = require('xml-escape');
+wrap(str, {
+ escape: function(string){
+ return xmlescape(string);
+ }
+});
+```
+
+### options.trim
+
+Type: `Boolean`
+
+Default: `false`
+
+Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line.
+
+**Example:**
+
+```js
+wrap(str, {trim: true});
+```
+
+### options.cut
+
+Type: `Boolean`
+
+Default: `false`
+
+Break a word between any two letters when the word is longer than the specified width.
+
+**Example:**
+
+```js
+wrap(str, {cut: true});
+```
+
+## About
+
+### Related projects
+
+* [common-words](https://www.npmjs.com/package/common-words): Updated list (JSON) of the 100 most common words in the English language. Useful for… [more](https://github.com/jonschlinkert/common-words) | [homepage](https://github.com/jonschlinkert/common-words "Updated list (JSON) of the 100 most common words in the English language. Useful for excluding these words from arrays.")
+* [shuffle-words](https://www.npmjs.com/package/shuffle-words): Shuffle the words in a string and optionally the letters in each word using the… [more](https://github.com/jonschlinkert/shuffle-words) | [homepage](https://github.com/jonschlinkert/shuffle-words "Shuffle the words in a string and optionally the letters in each word using the Fisher-Yates algorithm. Useful for creating test fixtures, benchmarking samples, etc.")
+* [unique-words](https://www.npmjs.com/package/unique-words): Return the unique words in a string or array. | [homepage](https://github.com/jonschlinkert/unique-words "Return the unique words in a string or array.")
+* [wordcount](https://www.npmjs.com/package/wordcount): Count the words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/jonschlinkert/wordcount "Count the words in a string. Support for english, CJK and Cyrillic.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 43 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 2 | [lordvlad](https://github.com/lordvlad) |
+| 2 | [hildjj](https://github.com/hildjj) |
+| 1 | [danilosampaio](https://github.com/danilosampaio) |
+| 1 | [2fd](https://github.com/2fd) |
+| 1 | [toddself](https://github.com/toddself) |
+| 1 | [wolfgang42](https://github.com/wolfgang42) |
+| 1 | [zachhale](https://github.com/zachhale) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 02, 2017._
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.d.ts b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.d.ts
new file mode 100644
index 0000000..1acd425
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.d.ts
@@ -0,0 +1,50 @@
+/**
+ * Wrap words to a specified length.
+ */
+export = wrap;
+
+declare function wrap(str: string, options?: wrap.IOptions): string;
+
+declare namespace wrap {
+ export interface IOptions {
+
+ /**
+ * The width of the text before wrapping to a new line.
+ * @default ´50´
+ */
+ width?: number;
+
+ /**
+ * The string to use at the beginning of each line.
+ * @default ´´ (none)
+ */
+ indent?: string;
+
+ /**
+ * The string to use at the end of each line.
+ * @default ´\n´
+ */
+ newline?: string;
+
+ /**
+ * An escape function to run on each line after splitting them.
+ * @default (str: string) => string;
+ */
+ escape?: (str: string) => string;
+
+ /**
+ * Trim trailing whitespace from the returned string.
+ * This option is included since .trim() would also strip
+ * the leading indentation from the first line.
+ * @default true
+ */
+ trim?: boolean;
+
+ /**
+ * Break a word between any two letters when the word is longer
+ * than the specified width.
+ * @default false
+ */
+ cut?: boolean;
+ }
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.js
new file mode 100644
index 0000000..461a17c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/index.js
@@ -0,0 +1,52 @@
+/*!
+ * word-wrap
+ *
+ * Copyright (c) 2014-2023, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+function trimTabAndSpaces(str) {
+ const lines = str.split('\n');
+ const trimmedLines = lines.map((line) => line.trimEnd());
+ return trimmedLines.join('\n');
+}
+
+module.exports = function(str, options) {
+ options = options || {};
+ if (str == null) {
+ return str;
+ }
+
+ var width = options.width || 50;
+ var indent = (typeof options.indent === 'string')
+ ? options.indent
+ : '';
+
+ var newline = options.newline || '\n' + indent;
+ var escape = typeof options.escape === 'function'
+ ? options.escape
+ : identity;
+
+ var regexString = '.{1,' + width + '}';
+ if (options.cut !== true) {
+ regexString += '([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)';
+ }
+
+ var re = new RegExp(regexString, 'g');
+ var lines = str.match(re) || [];
+ var result = indent + lines.map(function(line) {
+ if (line.slice(-1) === '\n') {
+ line = line.slice(0, line.length - 1);
+ }
+ return escape(line);
+ }).join(newline);
+
+ if (options.trim === true) {
+ result = trimTabAndSpaces(result);
+ }
+ return result;
+};
+
+function identity(str) {
+ return str;
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/package.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/package.json
new file mode 100644
index 0000000..56e4d84
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@aashutoshrathi/word-wrap/package.json
@@ -0,0 +1,142 @@
+{
+ "_from": "@aashutoshrathi/word-wrap@^1.2.3",
+ "_id": "@aashutoshrathi/word-wrap@1.2.6",
+ "_inBundle": false,
+ "_integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "_location": "/@aashutoshrathi/word-wrap",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@aashutoshrathi/word-wrap@^1.2.3",
+ "name": "@aashutoshrathi/word-wrap",
+ "escapedName": "@aashutoshrathi%2fword-wrap",
+ "scope": "@aashutoshrathi",
+ "rawSpec": "^1.2.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.3"
+ },
+ "_requiredBy": [
+ "/optionator"
+ ],
+ "_resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "_shasum": "bd9154aec9983f77b3a034ecaa015c2e4201f6cf",
+ "_spec": "@aashutoshrathi/word-wrap@^1.2.3",
+ "_where": "C:\\Users\\Lenovo\\AppData\\Local\\Temp\\HBuilder X-P1XkOA\\uni-id-co\\node_modules\\optionator",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/aashutoshrathi/word-wrap/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Aashutosh Rathi",
+ "email": "aashutoshrathi@gmail.com"
+ },
+ {
+ "name": "Danilo Sampaio",
+ "email": "danilo.sampaio@gmail.com",
+ "url": "localhost:8080"
+ },
+ {
+ "name": "Fede Ramirez",
+ "email": "i@2fd.me",
+ "url": "https://2fd.github.io"
+ },
+ {
+ "name": "Joe Hildebrand",
+ "email": "joe-github@cursive.net",
+ "url": "https://twitter.com/hildjj"
+ },
+ {
+ "name": "Jon Schlinkert",
+ "email": "jon.schlinkert@sellside.com",
+ "url": "http://twitter.com/jonschlinkert"
+ },
+ {
+ "name": "Todd Kennedy",
+ "url": "https://tck.io"
+ },
+ {
+ "name": "Waldemar Reusch",
+ "url": "https://github.com/lordvlad"
+ },
+ {
+ "name": "Wolfgang Faust",
+ "url": "http://www.linestarve.com"
+ },
+ {
+ "name": "Zach Hale",
+ "email": "zachhale@gmail.com",
+ "url": "http://zachhale.com"
+ }
+ ],
+ "deprecated": false,
+ "description": "Wrap words to a specified length.",
+ "devDependencies": {
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^10.2.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/aashutoshrathi/word-wrap",
+ "keywords": [
+ "break",
+ "carriage",
+ "line",
+ "new-line",
+ "newline",
+ "return",
+ "soft",
+ "text",
+ "word",
+ "word-wrap",
+ "words",
+ "wrap"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "@aashutoshrathi/word-wrap",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/aashutoshrathi/word-wrap.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "typings": "index.d.ts",
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ },
+ "related": {
+ "list": [
+ "common-words",
+ "shuffle-words",
+ "unique-words",
+ "wordcount"
+ ]
+ },
+ "reflinks": [
+ "verb",
+ "verb-generate-readme"
+ ]
+ },
+ "version": "1.2.6"
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/LICENSE b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/LICENSE
new file mode 100644
index 0000000..883ee1f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Toru Nagashima
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/README.md b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/README.md
new file mode 100644
index 0000000..90552a9
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/README.md
@@ -0,0 +1,37 @@
+# @eslint-community/eslint-utils
+
+[![npm version](https://img.shields.io/npm/v/@eslint-community/eslint-utils.svg)](https://www.npmjs.com/package/@eslint-community/eslint-utils)
+[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/eslint-utils.svg)](http://www.npmtrends.com/@eslint-community/eslint-utils)
+[![Build Status](https://github.com/eslint-community/eslint-utils/workflows/CI/badge.svg)](https://github.com/eslint-community/eslint-utils/actions)
+[![Coverage Status](https://codecov.io/gh/eslint-community/eslint-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/eslint-utils)
+
+## 🏁 Goal
+
+This package provides utility functions and classes for make ESLint custom rules.
+
+For examples:
+
+- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
+- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
+
+## 📖 Usage
+
+See [documentation](https://eslint-community.github.io/eslint-utils).
+
+## 📰 Changelog
+
+See [releases](https://github.com/eslint-community/eslint-utils/releases).
+
+## ❤️ Contributing
+
+Welcome contributing!
+
+Please use GitHub's Issues/PRs.
+
+### Development Tools
+
+- `npm test` runs tests and measures coverage.
+- `npm run clean` removes the coverage result of `npm test` command.
+- `npm run coverage` shows the coverage result of the last `npm test` command.
+- `npm run lint` runs ESLint.
+- `npm run watch` runs tests on each file change.
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js
new file mode 100644
index 0000000..156015e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js
@@ -0,0 +1,2068 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var eslintVisitorKeys = require('eslint-visitor-keys');
+
+/**
+ * Get the innermost scope which contains a given location.
+ * @param {Scope} initialScope The initial scope to search.
+ * @param {Node} node The location to search.
+ * @returns {Scope} The innermost scope.
+ */
+function getInnermostScope(initialScope, node) {
+ const location = node.range[0];
+
+ let scope = initialScope;
+ let found = false;
+ do {
+ found = false;
+ for (const childScope of scope.childScopes) {
+ const range = childScope.block.range;
+
+ if (range[0] <= location && location < range[1]) {
+ scope = childScope;
+ found = true;
+ break
+ }
+ }
+ } while (found)
+
+ return scope
+}
+
+/**
+ * Find the variable of a given name.
+ * @param {Scope} initialScope The scope to start finding.
+ * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.
+ * @returns {Variable|null} The found variable or null.
+ */
+function findVariable(initialScope, nameOrNode) {
+ let name = "";
+ let scope = initialScope;
+
+ if (typeof nameOrNode === "string") {
+ name = nameOrNode;
+ } else {
+ name = nameOrNode.name;
+ scope = getInnermostScope(scope, nameOrNode);
+ }
+
+ while (scope != null) {
+ const variable = scope.set.get(name);
+ if (variable != null) {
+ return variable
+ }
+ scope = scope.upper;
+ }
+
+ return null
+}
+
+/**
+ * Negate the result of `this` calling.
+ * @param {Token} token The token to check.
+ * @returns {boolean} `true` if the result of `this(token)` is `false`.
+ */
+function negate0(token) {
+ return !this(token) //eslint-disable-line no-invalid-this
+}
+
+/**
+ * Creates the negate function of the given function.
+ * @param {function(Token):boolean} f - The function to negate.
+ * @returns {function(Token):boolean} Negated function.
+ */
+function negate(f) {
+ return negate0.bind(f)
+}
+
+/**
+ * Checks if the given token is a PunctuatorToken with the given value
+ * @param {Token} token - The token to check.
+ * @param {string} value - The value to check.
+ * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.
+ */
+function isPunctuatorTokenWithValue(token, value) {
+ return token.type === "Punctuator" && token.value === value
+}
+
+/**
+ * Checks if the given token is an arrow token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an arrow token.
+ */
+function isArrowToken(token) {
+ return isPunctuatorTokenWithValue(token, "=>")
+}
+
+/**
+ * Checks if the given token is a comma token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comma token.
+ */
+function isCommaToken(token) {
+ return isPunctuatorTokenWithValue(token, ",")
+}
+
+/**
+ * Checks if the given token is a semicolon token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a semicolon token.
+ */
+function isSemicolonToken(token) {
+ return isPunctuatorTokenWithValue(token, ";")
+}
+
+/**
+ * Checks if the given token is a colon token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a colon token.
+ */
+function isColonToken(token) {
+ return isPunctuatorTokenWithValue(token, ":")
+}
+
+/**
+ * Checks if the given token is an opening parenthesis token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening parenthesis token.
+ */
+function isOpeningParenToken(token) {
+ return isPunctuatorTokenWithValue(token, "(")
+}
+
+/**
+ * Checks if the given token is a closing parenthesis token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing parenthesis token.
+ */
+function isClosingParenToken(token) {
+ return isPunctuatorTokenWithValue(token, ")")
+}
+
+/**
+ * Checks if the given token is an opening square bracket token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening square bracket token.
+ */
+function isOpeningBracketToken(token) {
+ return isPunctuatorTokenWithValue(token, "[")
+}
+
+/**
+ * Checks if the given token is a closing square bracket token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing square bracket token.
+ */
+function isClosingBracketToken(token) {
+ return isPunctuatorTokenWithValue(token, "]")
+}
+
+/**
+ * Checks if the given token is an opening brace token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening brace token.
+ */
+function isOpeningBraceToken(token) {
+ return isPunctuatorTokenWithValue(token, "{")
+}
+
+/**
+ * Checks if the given token is a closing brace token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing brace token.
+ */
+function isClosingBraceToken(token) {
+ return isPunctuatorTokenWithValue(token, "}")
+}
+
+/**
+ * Checks if the given token is a comment token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comment token.
+ */
+function isCommentToken(token) {
+ return ["Block", "Line", "Shebang"].includes(token.type)
+}
+
+const isNotArrowToken = negate(isArrowToken);
+const isNotCommaToken = negate(isCommaToken);
+const isNotSemicolonToken = negate(isSemicolonToken);
+const isNotColonToken = negate(isColonToken);
+const isNotOpeningParenToken = negate(isOpeningParenToken);
+const isNotClosingParenToken = negate(isClosingParenToken);
+const isNotOpeningBracketToken = negate(isOpeningBracketToken);
+const isNotClosingBracketToken = negate(isClosingBracketToken);
+const isNotOpeningBraceToken = negate(isOpeningBraceToken);
+const isNotClosingBraceToken = negate(isClosingBraceToken);
+const isNotCommentToken = negate(isCommentToken);
+
+/**
+ * Get the `(` token of the given function node.
+ * @param {Node} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {Token} `(` token.
+ */
+function getOpeningParenOfParams(node, sourceCode) {
+ return node.id
+ ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)
+ : sourceCode.getFirstToken(node, isOpeningParenToken)
+}
+
+/**
+ * Get the location of the given function node for reporting.
+ * @param {Node} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {string} The location of the function node for reporting.
+ */
+function getFunctionHeadLocation(node, sourceCode) {
+ const parent = node.parent;
+ let start = null;
+ let end = null;
+
+ if (node.type === "ArrowFunctionExpression") {
+ const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken);
+
+ start = arrowToken.loc.start;
+ end = arrowToken.loc.end;
+ } else if (
+ parent.type === "Property" ||
+ parent.type === "MethodDefinition" ||
+ parent.type === "PropertyDefinition"
+ ) {
+ start = parent.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ } else {
+ start = node.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ }
+
+ return {
+ start: { ...start },
+ end: { ...end },
+ }
+}
+
+/* globals globalThis, global, self, window */
+
+const globalObject =
+ typeof globalThis !== "undefined"
+ ? globalThis
+ : typeof self !== "undefined"
+ ? self
+ : typeof window !== "undefined"
+ ? window
+ : typeof global !== "undefined"
+ ? global
+ : {};
+
+const builtinNames = Object.freeze(
+ new Set([
+ "Array",
+ "ArrayBuffer",
+ "BigInt",
+ "BigInt64Array",
+ "BigUint64Array",
+ "Boolean",
+ "DataView",
+ "Date",
+ "decodeURI",
+ "decodeURIComponent",
+ "encodeURI",
+ "encodeURIComponent",
+ "escape",
+ "Float32Array",
+ "Float64Array",
+ "Function",
+ "Infinity",
+ "Int16Array",
+ "Int32Array",
+ "Int8Array",
+ "isFinite",
+ "isNaN",
+ "isPrototypeOf",
+ "JSON",
+ "Map",
+ "Math",
+ "NaN",
+ "Number",
+ "Object",
+ "parseFloat",
+ "parseInt",
+ "Promise",
+ "Proxy",
+ "Reflect",
+ "RegExp",
+ "Set",
+ "String",
+ "Symbol",
+ "Uint16Array",
+ "Uint32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "undefined",
+ "unescape",
+ "WeakMap",
+ "WeakSet",
+ ]),
+);
+const callAllowed = new Set(
+ [
+ Array.isArray,
+ Array.of,
+ Array.prototype.at,
+ Array.prototype.concat,
+ Array.prototype.entries,
+ Array.prototype.every,
+ Array.prototype.filter,
+ Array.prototype.find,
+ Array.prototype.findIndex,
+ Array.prototype.flat,
+ Array.prototype.includes,
+ Array.prototype.indexOf,
+ Array.prototype.join,
+ Array.prototype.keys,
+ Array.prototype.lastIndexOf,
+ Array.prototype.slice,
+ Array.prototype.some,
+ Array.prototype.toString,
+ Array.prototype.values,
+ typeof BigInt === "function" ? BigInt : undefined,
+ Boolean,
+ Date,
+ Date.parse,
+ decodeURI,
+ decodeURIComponent,
+ encodeURI,
+ encodeURIComponent,
+ escape,
+ isFinite,
+ isNaN,
+ isPrototypeOf,
+ Map,
+ Map.prototype.entries,
+ Map.prototype.get,
+ Map.prototype.has,
+ Map.prototype.keys,
+ Map.prototype.values,
+ ...Object.getOwnPropertyNames(Math)
+ .filter((k) => k !== "random")
+ .map((k) => Math[k])
+ .filter((f) => typeof f === "function"),
+ Number,
+ Number.isFinite,
+ Number.isNaN,
+ Number.parseFloat,
+ Number.parseInt,
+ Number.prototype.toExponential,
+ Number.prototype.toFixed,
+ Number.prototype.toPrecision,
+ Number.prototype.toString,
+ Object,
+ Object.entries,
+ Object.is,
+ Object.isExtensible,
+ Object.isFrozen,
+ Object.isSealed,
+ Object.keys,
+ Object.values,
+ parseFloat,
+ parseInt,
+ RegExp,
+ Set,
+ Set.prototype.entries,
+ Set.prototype.has,
+ Set.prototype.keys,
+ Set.prototype.values,
+ String,
+ String.fromCharCode,
+ String.fromCodePoint,
+ String.raw,
+ String.prototype.at,
+ String.prototype.charAt,
+ String.prototype.charCodeAt,
+ String.prototype.codePointAt,
+ String.prototype.concat,
+ String.prototype.endsWith,
+ String.prototype.includes,
+ String.prototype.indexOf,
+ String.prototype.lastIndexOf,
+ String.prototype.normalize,
+ String.prototype.padEnd,
+ String.prototype.padStart,
+ String.prototype.slice,
+ String.prototype.startsWith,
+ String.prototype.substr,
+ String.prototype.substring,
+ String.prototype.toLowerCase,
+ String.prototype.toString,
+ String.prototype.toUpperCase,
+ String.prototype.trim,
+ String.prototype.trimEnd,
+ String.prototype.trimLeft,
+ String.prototype.trimRight,
+ String.prototype.trimStart,
+ Symbol.for,
+ Symbol.keyFor,
+ unescape,
+ ].filter((f) => typeof f === "function"),
+);
+const callPassThrough = new Set([
+ Object.freeze,
+ Object.preventExtensions,
+ Object.seal,
+]);
+
+/** @type {ReadonlyArray]>} */
+const getterAllowed = [
+ [Map, new Set(["size"])],
+ [
+ RegExp,
+ new Set([
+ "dotAll",
+ "flags",
+ "global",
+ "hasIndices",
+ "ignoreCase",
+ "multiline",
+ "source",
+ "sticky",
+ "unicode",
+ ]),
+ ],
+ [Set, new Set(["size"])],
+];
+
+/**
+ * Get the property descriptor.
+ * @param {object} object The object to get.
+ * @param {string|number|symbol} name The property name to get.
+ */
+function getPropertyDescriptor(object, name) {
+ let x = object;
+ while ((typeof x === "object" || typeof x === "function") && x !== null) {
+ const d = Object.getOwnPropertyDescriptor(x, name);
+ if (d) {
+ return d
+ }
+ x = Object.getPrototypeOf(x);
+ }
+ return null
+}
+
+/**
+ * Check if a property is getter or not.
+ * @param {object} object The object to check.
+ * @param {string|number|symbol} name The property name to check.
+ */
+function isGetter(object, name) {
+ const d = getPropertyDescriptor(object, name);
+ return d != null && d.get != null
+}
+
+/**
+ * Get the element values of a given node list.
+ * @param {Node[]} nodeList The node list to get values.
+ * @param {Scope|undefined} initialScope The initial scope to find variables.
+ * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.
+ */
+function getElementValues(nodeList, initialScope) {
+ const valueList = [];
+
+ for (let i = 0; i < nodeList.length; ++i) {
+ const elementNode = nodeList[i];
+
+ if (elementNode == null) {
+ valueList.length = i + 1;
+ } else if (elementNode.type === "SpreadElement") {
+ const argument = getStaticValueR(elementNode.argument, initialScope);
+ if (argument == null) {
+ return null
+ }
+ valueList.push(...argument.value);
+ } else {
+ const element = getStaticValueR(elementNode, initialScope);
+ if (element == null) {
+ return null
+ }
+ valueList.push(element.value);
+ }
+ }
+
+ return valueList
+}
+
+/**
+ * Returns whether the given variable is never written to after initialization.
+ * @param {import("eslint").Scope.Variable} variable
+ * @returns {boolean}
+ */
+function isEffectivelyConst(variable) {
+ const refs = variable.references;
+
+ const inits = refs.filter((r) => r.init).length;
+ const reads = refs.filter((r) => r.isReadOnly()).length;
+ if (inits === 1 && reads + inits === refs.length) {
+ // there is only one init and all other references only read
+ return true
+ }
+ return false
+}
+
+const operations = Object.freeze({
+ ArrayExpression(node, initialScope) {
+ const elements = getElementValues(node.elements, initialScope);
+ return elements != null ? { value: elements } : null
+ },
+
+ AssignmentExpression(node, initialScope) {
+ if (node.operator === "=") {
+ return getStaticValueR(node.right, initialScope)
+ }
+ return null
+ },
+
+ //eslint-disable-next-line complexity
+ BinaryExpression(node, initialScope) {
+ if (node.operator === "in" || node.operator === "instanceof") {
+ // Not supported.
+ return null
+ }
+
+ const left = getStaticValueR(node.left, initialScope);
+ const right = getStaticValueR(node.right, initialScope);
+ if (left != null && right != null) {
+ switch (node.operator) {
+ case "==":
+ return { value: left.value == right.value } //eslint-disable-line eqeqeq
+ case "!=":
+ return { value: left.value != right.value } //eslint-disable-line eqeqeq
+ case "===":
+ return { value: left.value === right.value }
+ case "!==":
+ return { value: left.value !== right.value }
+ case "<":
+ return { value: left.value < right.value }
+ case "<=":
+ return { value: left.value <= right.value }
+ case ">":
+ return { value: left.value > right.value }
+ case ">=":
+ return { value: left.value >= right.value }
+ case "<<":
+ return { value: left.value << right.value }
+ case ">>":
+ return { value: left.value >> right.value }
+ case ">>>":
+ return { value: left.value >>> right.value }
+ case "+":
+ return { value: left.value + right.value }
+ case "-":
+ return { value: left.value - right.value }
+ case "*":
+ return { value: left.value * right.value }
+ case "/":
+ return { value: left.value / right.value }
+ case "%":
+ return { value: left.value % right.value }
+ case "**":
+ return { value: left.value ** right.value }
+ case "|":
+ return { value: left.value | right.value }
+ case "^":
+ return { value: left.value ^ right.value }
+ case "&":
+ return { value: left.value & right.value }
+
+ // no default
+ }
+ }
+
+ return null
+ },
+
+ CallExpression(node, initialScope) {
+ const calleeNode = node.callee;
+ const args = getElementValues(node.arguments, initialScope);
+
+ if (args != null) {
+ if (calleeNode.type === "MemberExpression") {
+ if (calleeNode.property.type === "PrivateIdentifier") {
+ return null
+ }
+ const object = getStaticValueR(calleeNode.object, initialScope);
+ if (object != null) {
+ if (
+ object.value == null &&
+ (object.optional || node.optional)
+ ) {
+ return { value: undefined, optional: true }
+ }
+ const property = getStaticPropertyNameValue(
+ calleeNode,
+ initialScope,
+ );
+
+ if (property != null) {
+ const receiver = object.value;
+ const methodName = property.value;
+ if (callAllowed.has(receiver[methodName])) {
+ return { value: receiver[methodName](...args) }
+ }
+ if (callPassThrough.has(receiver[methodName])) {
+ return { value: args[0] }
+ }
+ }
+ }
+ } else {
+ const callee = getStaticValueR(calleeNode, initialScope);
+ if (callee != null) {
+ if (callee.value == null && node.optional) {
+ return { value: undefined, optional: true }
+ }
+ const func = callee.value;
+ if (callAllowed.has(func)) {
+ return { value: func(...args) }
+ }
+ if (callPassThrough.has(func)) {
+ return { value: args[0] }
+ }
+ }
+ }
+ }
+
+ return null
+ },
+
+ ConditionalExpression(node, initialScope) {
+ const test = getStaticValueR(node.test, initialScope);
+ if (test != null) {
+ return test.value
+ ? getStaticValueR(node.consequent, initialScope)
+ : getStaticValueR(node.alternate, initialScope)
+ }
+ return null
+ },
+
+ ExpressionStatement(node, initialScope) {
+ return getStaticValueR(node.expression, initialScope)
+ },
+
+ Identifier(node, initialScope) {
+ if (initialScope != null) {
+ const variable = findVariable(initialScope, node);
+
+ // Built-in globals.
+ if (
+ variable != null &&
+ variable.defs.length === 0 &&
+ builtinNames.has(variable.name) &&
+ variable.name in globalObject
+ ) {
+ return { value: globalObject[variable.name] }
+ }
+
+ // Constants.
+ if (variable != null && variable.defs.length === 1) {
+ const def = variable.defs[0];
+ if (
+ def.parent &&
+ def.type === "Variable" &&
+ (def.parent.kind === "const" ||
+ isEffectivelyConst(variable)) &&
+ // TODO(mysticatea): don't support destructuring here.
+ def.node.id.type === "Identifier"
+ ) {
+ return getStaticValueR(def.node.init, initialScope)
+ }
+ }
+ }
+ return null
+ },
+
+ Literal(node) {
+ //istanbul ignore if : this is implementation-specific behavior.
+ if ((node.regex != null || node.bigint != null) && node.value == null) {
+ // It was a RegExp/BigInt literal, but Node.js didn't support it.
+ return null
+ }
+ return { value: node.value }
+ },
+
+ LogicalExpression(node, initialScope) {
+ const left = getStaticValueR(node.left, initialScope);
+ if (left != null) {
+ if (
+ (node.operator === "||" && Boolean(left.value) === true) ||
+ (node.operator === "&&" && Boolean(left.value) === false) ||
+ (node.operator === "??" && left.value != null)
+ ) {
+ return left
+ }
+
+ const right = getStaticValueR(node.right, initialScope);
+ if (right != null) {
+ return right
+ }
+ }
+
+ return null
+ },
+
+ MemberExpression(node, initialScope) {
+ if (node.property.type === "PrivateIdentifier") {
+ return null
+ }
+ const object = getStaticValueR(node.object, initialScope);
+ if (object != null) {
+ if (object.value == null && (object.optional || node.optional)) {
+ return { value: undefined, optional: true }
+ }
+ const property = getStaticPropertyNameValue(node, initialScope);
+
+ if (property != null) {
+ if (!isGetter(object.value, property.value)) {
+ return { value: object.value[property.value] }
+ }
+
+ for (const [classFn, allowed] of getterAllowed) {
+ if (
+ object.value instanceof classFn &&
+ allowed.has(property.value)
+ ) {
+ return { value: object.value[property.value] }
+ }
+ }
+ }
+ }
+ return null
+ },
+
+ ChainExpression(node, initialScope) {
+ const expression = getStaticValueR(node.expression, initialScope);
+ if (expression != null) {
+ return { value: expression.value }
+ }
+ return null
+ },
+
+ NewExpression(node, initialScope) {
+ const callee = getStaticValueR(node.callee, initialScope);
+ const args = getElementValues(node.arguments, initialScope);
+
+ if (callee != null && args != null) {
+ const Func = callee.value;
+ if (callAllowed.has(Func)) {
+ return { value: new Func(...args) }
+ }
+ }
+
+ return null
+ },
+
+ ObjectExpression(node, initialScope) {
+ const object = {};
+
+ for (const propertyNode of node.properties) {
+ if (propertyNode.type === "Property") {
+ if (propertyNode.kind !== "init") {
+ return null
+ }
+ const key = getStaticPropertyNameValue(
+ propertyNode,
+ initialScope,
+ );
+ const value = getStaticValueR(propertyNode.value, initialScope);
+ if (key == null || value == null) {
+ return null
+ }
+ object[key.value] = value.value;
+ } else if (
+ propertyNode.type === "SpreadElement" ||
+ propertyNode.type === "ExperimentalSpreadProperty"
+ ) {
+ const argument = getStaticValueR(
+ propertyNode.argument,
+ initialScope,
+ );
+ if (argument == null) {
+ return null
+ }
+ Object.assign(object, argument.value);
+ } else {
+ return null
+ }
+ }
+
+ return { value: object }
+ },
+
+ SequenceExpression(node, initialScope) {
+ const last = node.expressions[node.expressions.length - 1];
+ return getStaticValueR(last, initialScope)
+ },
+
+ TaggedTemplateExpression(node, initialScope) {
+ const tag = getStaticValueR(node.tag, initialScope);
+ const expressions = getElementValues(
+ node.quasi.expressions,
+ initialScope,
+ );
+
+ if (tag != null && expressions != null) {
+ const func = tag.value;
+ const strings = node.quasi.quasis.map((q) => q.value.cooked);
+ strings.raw = node.quasi.quasis.map((q) => q.value.raw);
+
+ if (func === String.raw) {
+ return { value: func(strings, ...expressions) }
+ }
+ }
+
+ return null
+ },
+
+ TemplateLiteral(node, initialScope) {
+ const expressions = getElementValues(node.expressions, initialScope);
+ if (expressions != null) {
+ let value = node.quasis[0].value.cooked;
+ for (let i = 0; i < expressions.length; ++i) {
+ value += expressions[i];
+ value += node.quasis[i + 1].value.cooked;
+ }
+ return { value }
+ }
+ return null
+ },
+
+ UnaryExpression(node, initialScope) {
+ if (node.operator === "delete") {
+ // Not supported.
+ return null
+ }
+ if (node.operator === "void") {
+ return { value: undefined }
+ }
+
+ const arg = getStaticValueR(node.argument, initialScope);
+ if (arg != null) {
+ switch (node.operator) {
+ case "-":
+ return { value: -arg.value }
+ case "+":
+ return { value: +arg.value } //eslint-disable-line no-implicit-coercion
+ case "!":
+ return { value: !arg.value }
+ case "~":
+ return { value: ~arg.value }
+ case "typeof":
+ return { value: typeof arg.value }
+
+ // no default
+ }
+ }
+
+ return null
+ },
+});
+
+/**
+ * Get the value of a given node if it's a static value.
+ * @param {Node} node The node to get.
+ * @param {Scope|undefined} initialScope The scope to start finding variable.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.
+ */
+function getStaticValueR(node, initialScope) {
+ if (node != null && Object.hasOwnProperty.call(operations, node.type)) {
+ return operations[node.type](node, initialScope)
+ }
+ return null
+}
+
+/**
+ * Get the static value of property name from a MemberExpression node or a Property node.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.
+ */
+function getStaticPropertyNameValue(node, initialScope) {
+ const nameNode = node.type === "Property" ? node.key : node.property;
+
+ if (node.computed) {
+ return getStaticValueR(nameNode, initialScope)
+ }
+
+ if (nameNode.type === "Identifier") {
+ return { value: nameNode.name }
+ }
+
+ if (nameNode.type === "Literal") {
+ if (nameNode.bigint) {
+ return { value: nameNode.bigint }
+ }
+ return { value: String(nameNode.value) }
+ }
+
+ return null
+}
+
+/**
+ * Get the value of a given node if it's a static value.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.
+ */
+function getStaticValue(node, initialScope = null) {
+ try {
+ return getStaticValueR(node, initialScope)
+ } catch (_error) {
+ return null
+ }
+}
+
+/**
+ * Get the value of a given node if it's a literal or a template literal.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.
+ * @returns {string|null} The value of the node, or `null`.
+ */
+function getStringIfConstant(node, initialScope = null) {
+ // Handle the literals that the platform doesn't support natively.
+ if (node && node.type === "Literal" && node.value === null) {
+ if (node.regex) {
+ return `/${node.regex.pattern}/${node.regex.flags}`
+ }
+ if (node.bigint) {
+ return node.bigint
+ }
+ }
+
+ const evaluated = getStaticValue(node, initialScope);
+ return evaluated && String(evaluated.value)
+}
+
+/**
+ * Get the property name from a MemberExpression node or a Property node.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.
+ * @returns {string|null} The property name of the node.
+ */
+function getPropertyName(node, initialScope) {
+ switch (node.type) {
+ case "MemberExpression":
+ if (node.computed) {
+ return getStringIfConstant(node.property, initialScope)
+ }
+ if (node.property.type === "PrivateIdentifier") {
+ return null
+ }
+ return node.property.name
+
+ case "Property":
+ case "MethodDefinition":
+ case "PropertyDefinition":
+ if (node.computed) {
+ return getStringIfConstant(node.key, initialScope)
+ }
+ if (node.key.type === "Literal") {
+ return String(node.key.value)
+ }
+ if (node.key.type === "PrivateIdentifier") {
+ return null
+ }
+ return node.key.name
+
+ // no default
+ }
+
+ return null
+}
+
+/**
+ * Get the name and kind of the given function node.
+ * @param {ASTNode} node - The function node to get.
+ * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.
+ * @returns {string} The name and kind of the function node.
+ */
+// eslint-disable-next-line complexity
+function getFunctionNameWithKind(node, sourceCode) {
+ const parent = node.parent;
+ const tokens = [];
+ const isObjectMethod = parent.type === "Property" && parent.value === node;
+ const isClassMethod =
+ parent.type === "MethodDefinition" && parent.value === node;
+ const isClassFieldMethod =
+ parent.type === "PropertyDefinition" && parent.value === node;
+
+ // Modifiers.
+ if (isClassMethod || isClassFieldMethod) {
+ if (parent.static) {
+ tokens.push("static");
+ }
+ if (parent.key.type === "PrivateIdentifier") {
+ tokens.push("private");
+ }
+ }
+ if (node.async) {
+ tokens.push("async");
+ }
+ if (node.generator) {
+ tokens.push("generator");
+ }
+
+ // Kinds.
+ if (isObjectMethod || isClassMethod) {
+ if (parent.kind === "constructor") {
+ return "constructor"
+ }
+ if (parent.kind === "get") {
+ tokens.push("getter");
+ } else if (parent.kind === "set") {
+ tokens.push("setter");
+ } else {
+ tokens.push("method");
+ }
+ } else if (isClassFieldMethod) {
+ tokens.push("method");
+ } else {
+ if (node.type === "ArrowFunctionExpression") {
+ tokens.push("arrow");
+ }
+ tokens.push("function");
+ }
+
+ // Names.
+ if (isObjectMethod || isClassMethod || isClassFieldMethod) {
+ if (parent.key.type === "PrivateIdentifier") {
+ tokens.push(`#${parent.key.name}`);
+ } else {
+ const name = getPropertyName(parent);
+ if (name) {
+ tokens.push(`'${name}'`);
+ } else if (sourceCode) {
+ const keyText = sourceCode.getText(parent.key);
+ if (!keyText.includes("\n")) {
+ tokens.push(`[${keyText}]`);
+ }
+ }
+ }
+ } else if (node.id) {
+ tokens.push(`'${node.id.name}'`);
+ } else if (
+ parent.type === "VariableDeclarator" &&
+ parent.id &&
+ parent.id.type === "Identifier"
+ ) {
+ tokens.push(`'${parent.id.name}'`);
+ } else if (
+ (parent.type === "AssignmentExpression" ||
+ parent.type === "AssignmentPattern") &&
+ parent.left &&
+ parent.left.type === "Identifier"
+ ) {
+ tokens.push(`'${parent.left.name}'`);
+ } else if (
+ parent.type === "ExportDefaultDeclaration" &&
+ parent.declaration === node
+ ) {
+ tokens.push("'default'");
+ }
+
+ return tokens.join(" ")
+}
+
+const typeConversionBinaryOps = Object.freeze(
+ new Set([
+ "==",
+ "!=",
+ "<",
+ "<=",
+ ">",
+ ">=",
+ "<<",
+ ">>",
+ ">>>",
+ "+",
+ "-",
+ "*",
+ "/",
+ "%",
+ "|",
+ "^",
+ "&",
+ "in",
+ ]),
+);
+const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"]));
+
+/**
+ * Check whether the given value is an ASTNode or not.
+ * @param {any} x The value to check.
+ * @returns {boolean} `true` if the value is an ASTNode.
+ */
+function isNode(x) {
+ return x !== null && typeof x === "object" && typeof x.type === "string"
+}
+
+const visitor = Object.freeze(
+ Object.assign(Object.create(null), {
+ $visit(node, options, visitorKeys) {
+ const { type } = node;
+
+ if (typeof this[type] === "function") {
+ return this[type](node, options, visitorKeys)
+ }
+
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+
+ $visitChildren(node, options, visitorKeys) {
+ const { type } = node;
+
+ for (const key of visitorKeys[type] || eslintVisitorKeys.getKeys(node)) {
+ const value = node[key];
+
+ if (Array.isArray(value)) {
+ for (const element of value) {
+ if (
+ isNode(element) &&
+ this.$visit(element, options, visitorKeys)
+ ) {
+ return true
+ }
+ }
+ } else if (
+ isNode(value) &&
+ this.$visit(value, options, visitorKeys)
+ ) {
+ return true
+ }
+ }
+
+ return false
+ },
+
+ ArrowFunctionExpression() {
+ return false
+ },
+ AssignmentExpression() {
+ return true
+ },
+ AwaitExpression() {
+ return true
+ },
+ BinaryExpression(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ typeConversionBinaryOps.has(node.operator) &&
+ (node.left.type !== "Literal" || node.right.type !== "Literal")
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ CallExpression() {
+ return true
+ },
+ FunctionExpression() {
+ return false
+ },
+ ImportExpression() {
+ return true
+ },
+ MemberExpression(node, options, visitorKeys) {
+ if (options.considerGetters) {
+ return true
+ }
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.property.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ MethodDefinition(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ NewExpression() {
+ return true
+ },
+ Property(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ PropertyDefinition(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ UnaryExpression(node, options, visitorKeys) {
+ if (node.operator === "delete") {
+ return true
+ }
+ if (
+ options.considerImplicitTypeConversion &&
+ typeConversionUnaryOps.has(node.operator) &&
+ node.argument.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ UpdateExpression() {
+ return true
+ },
+ YieldExpression() {
+ return true
+ },
+ }),
+);
+
+/**
+ * Check whether a given node has any side effect or not.
+ * @param {Node} node The node to get.
+ * @param {SourceCode} sourceCode The source code object.
+ * @param {object} [options] The option object.
+ * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.
+ * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.
+ * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.
+ * @returns {boolean} `true` if the node has a certain side effect.
+ */
+function hasSideEffect(
+ node,
+ sourceCode,
+ { considerGetters = false, considerImplicitTypeConversion = false } = {},
+) {
+ return visitor.$visit(
+ node,
+ { considerGetters, considerImplicitTypeConversion },
+ sourceCode.visitorKeys || eslintVisitorKeys.KEYS,
+ )
+}
+
+/**
+ * Get the left parenthesis of the parent node syntax if it exists.
+ * E.g., `if (a) {}` then the `(`.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {Token|null} The left parenthesis of the parent node syntax
+ */
+function getParentSyntaxParen(node, sourceCode) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+ case "CallExpression":
+ case "NewExpression":
+ if (parent.arguments.length === 1 && parent.arguments[0] === node) {
+ return sourceCode.getTokenAfter(
+ parent.callee,
+ isOpeningParenToken,
+ )
+ }
+ return null
+
+ case "DoWhileStatement":
+ if (parent.test === node) {
+ return sourceCode.getTokenAfter(
+ parent.body,
+ isOpeningParenToken,
+ )
+ }
+ return null
+
+ case "IfStatement":
+ case "WhileStatement":
+ if (parent.test === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "ImportExpression":
+ if (parent.source === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "SwitchStatement":
+ if (parent.discriminant === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "WithStatement":
+ if (parent.object === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ default:
+ return null
+ }
+}
+
+/**
+ * Check whether a given node is parenthesized or not.
+ * @param {number} times The number of parantheses.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is parenthesized the given times.
+ */
+/**
+ * Check whether a given node is parenthesized or not.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is parenthesized.
+ */
+function isParenthesized(
+ timesOrNode,
+ nodeOrSourceCode,
+ optionalSourceCode,
+) {
+ let times, node, sourceCode, maybeLeftParen, maybeRightParen;
+ if (typeof timesOrNode === "number") {
+ times = timesOrNode | 0;
+ node = nodeOrSourceCode;
+ sourceCode = optionalSourceCode;
+ if (!(times >= 1)) {
+ throw new TypeError("'times' should be a positive integer.")
+ }
+ } else {
+ times = 1;
+ node = timesOrNode;
+ sourceCode = nodeOrSourceCode;
+ }
+
+ if (
+ node == null ||
+ // `Program` can't be parenthesized
+ node.parent == null ||
+ // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`
+ (node.parent.type === "CatchClause" && node.parent.param === node)
+ ) {
+ return false
+ }
+
+ maybeLeftParen = maybeRightParen = node;
+ do {
+ maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen);
+ maybeRightParen = sourceCode.getTokenAfter(maybeRightParen);
+ } while (
+ maybeLeftParen != null &&
+ maybeRightParen != null &&
+ isOpeningParenToken(maybeLeftParen) &&
+ isClosingParenToken(maybeRightParen) &&
+ // Avoid false positive such as `if (a) {}`
+ maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&
+ --times > 0
+ )
+
+ return times === 0
+}
+
+/**
+ * @author Toru Nagashima
+ * See LICENSE file in root directory for full license.
+ */
+
+const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu;
+
+/** @type {WeakMap} */
+const internal = new WeakMap();
+
+/**
+ * Check whether a given character is escaped or not.
+ * @param {string} str The string to check.
+ * @param {number} index The location of the character to check.
+ * @returns {boolean} `true` if the character is escaped.
+ */
+function isEscaped(str, index) {
+ let escaped = false;
+ for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {
+ escaped = !escaped;
+ }
+ return escaped
+}
+
+/**
+ * Replace a given string by a given matcher.
+ * @param {PatternMatcher} matcher The pattern matcher.
+ * @param {string} str The string to be replaced.
+ * @param {string} replacement The new substring to replace each matched part.
+ * @returns {string} The replaced string.
+ */
+function replaceS(matcher, str, replacement) {
+ const chunks = [];
+ let index = 0;
+
+ /** @type {RegExpExecArray} */
+ let match = null;
+
+ /**
+ * @param {string} key The placeholder.
+ * @returns {string} The replaced string.
+ */
+ function replacer(key) {
+ switch (key) {
+ case "$$":
+ return "$"
+ case "$&":
+ return match[0]
+ case "$`":
+ return str.slice(0, match.index)
+ case "$'":
+ return str.slice(match.index + match[0].length)
+ default: {
+ const i = key.slice(1);
+ if (i in match) {
+ return match[i]
+ }
+ return key
+ }
+ }
+ }
+
+ for (match of matcher.execAll(str)) {
+ chunks.push(str.slice(index, match.index));
+ chunks.push(replacement.replace(placeholder, replacer));
+ index = match.index + match[0].length;
+ }
+ chunks.push(str.slice(index));
+
+ return chunks.join("")
+}
+
+/**
+ * Replace a given string by a given matcher.
+ * @param {PatternMatcher} matcher The pattern matcher.
+ * @param {string} str The string to be replaced.
+ * @param {(...strs[])=>string} replace The function to replace each matched part.
+ * @returns {string} The replaced string.
+ */
+function replaceF(matcher, str, replace) {
+ const chunks = [];
+ let index = 0;
+
+ for (const match of matcher.execAll(str)) {
+ chunks.push(str.slice(index, match.index));
+ chunks.push(String(replace(...match, match.index, match.input)));
+ index = match.index + match[0].length;
+ }
+ chunks.push(str.slice(index));
+
+ return chunks.join("")
+}
+
+/**
+ * The class to find patterns as considering escape sequences.
+ */
+class PatternMatcher {
+ /**
+ * Initialize this matcher.
+ * @param {RegExp} pattern The pattern to match.
+ * @param {{escaped:boolean}} options The options.
+ */
+ constructor(pattern, { escaped = false } = {}) {
+ if (!(pattern instanceof RegExp)) {
+ throw new TypeError("'pattern' should be a RegExp instance.")
+ }
+ if (!pattern.flags.includes("g")) {
+ throw new Error("'pattern' should contains 'g' flag.")
+ }
+
+ internal.set(this, {
+ pattern: new RegExp(pattern.source, pattern.flags),
+ escaped: Boolean(escaped),
+ });
+ }
+
+ /**
+ * Find the pattern in a given string.
+ * @param {string} str The string to find.
+ * @returns {IterableIterator} The iterator which iterate the matched information.
+ */
+ *execAll(str) {
+ const { pattern, escaped } = internal.get(this);
+ let match = null;
+ let lastIndex = 0;
+
+ pattern.lastIndex = 0;
+ while ((match = pattern.exec(str)) != null) {
+ if (escaped || !isEscaped(str, match.index)) {
+ lastIndex = pattern.lastIndex;
+ yield match;
+ pattern.lastIndex = lastIndex;
+ }
+ }
+ }
+
+ /**
+ * Check whether the pattern is found in a given string.
+ * @param {string} str The string to check.
+ * @returns {boolean} `true` if the pattern was found in the string.
+ */
+ test(str) {
+ const it = this.execAll(str);
+ const ret = it.next();
+ return !ret.done
+ }
+
+ /**
+ * Replace a given string.
+ * @param {string} str The string to be replaced.
+ * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.
+ * @returns {string} The replaced string.
+ */
+ [Symbol.replace](str, replacer) {
+ return typeof replacer === "function"
+ ? replaceF(this, String(str), replacer)
+ : replaceS(this, String(str), String(replacer))
+ }
+}
+
+const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u;
+const has = Function.call.bind(Object.hasOwnProperty);
+
+const READ = Symbol("read");
+const CALL = Symbol("call");
+const CONSTRUCT = Symbol("construct");
+const ESM = Symbol("esm");
+
+const requireCall = { require: { [CALL]: true } };
+
+/**
+ * Check whether a given variable is modified or not.
+ * @param {Variable} variable The variable to check.
+ * @returns {boolean} `true` if the variable is modified.
+ */
+function isModifiedGlobal(variable) {
+ return (
+ variable == null ||
+ variable.defs.length !== 0 ||
+ variable.references.some((r) => r.isWrite())
+ )
+}
+
+/**
+ * Check if the value of a given node is passed through to the parent syntax as-is.
+ * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.
+ * @param {Node} node A node to check.
+ * @returns {boolean} `true` if the node is passed through.
+ */
+function isPassThrough(node) {
+ const parent = node.parent;
+
+ switch (parent && parent.type) {
+ case "ConditionalExpression":
+ return parent.consequent === node || parent.alternate === node
+ case "LogicalExpression":
+ return true
+ case "SequenceExpression":
+ return parent.expressions[parent.expressions.length - 1] === node
+ case "ChainExpression":
+ return true
+
+ default:
+ return false
+ }
+}
+
+/**
+ * The reference tracker.
+ */
+class ReferenceTracker {
+ /**
+ * Initialize this tracker.
+ * @param {Scope} globalScope The global scope.
+ * @param {object} [options] The options.
+ * @param {"legacy"|"strict"} [options.mode="strict"] The mode to determine the ImportDeclaration's behavior for CJS modules.
+ * @param {string[]} [options.globalObjectNames=["global","globalThis","self","window"]] The variable names for Global Object.
+ */
+ constructor(
+ globalScope,
+ {
+ mode = "strict",
+ globalObjectNames = ["global", "globalThis", "self", "window"],
+ } = {},
+ ) {
+ this.variableStack = [];
+ this.globalScope = globalScope;
+ this.mode = mode;
+ this.globalObjectNames = globalObjectNames.slice(0);
+ }
+
+ /**
+ * Iterate the references of global variables.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateGlobalReferences(traceMap) {
+ for (const key of Object.keys(traceMap)) {
+ const nextTraceMap = traceMap[key];
+ const path = [key];
+ const variable = this.globalScope.set.get(key);
+
+ if (isModifiedGlobal(variable)) {
+ continue
+ }
+
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ nextTraceMap,
+ true,
+ );
+ }
+
+ for (const key of this.globalObjectNames) {
+ const path = [];
+ const variable = this.globalScope.set.get(key);
+
+ if (isModifiedGlobal(variable)) {
+ continue
+ }
+
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ traceMap,
+ false,
+ );
+ }
+ }
+
+ /**
+ * Iterate the references of CommonJS modules.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateCjsReferences(traceMap) {
+ for (const { node } of this.iterateGlobalReferences(requireCall)) {
+ const key = getStringIfConstant(node.arguments[0]);
+ if (key == null || !has(traceMap, key)) {
+ continue
+ }
+
+ const nextTraceMap = traceMap[key];
+ const path = [key];
+
+ if (nextTraceMap[READ]) {
+ yield {
+ node,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iteratePropertyReferences(node, path, nextTraceMap);
+ }
+ }
+
+ /**
+ * Iterate the references of ES modules.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateEsmReferences(traceMap) {
+ const programNode = this.globalScope.block;
+
+ for (const node of programNode.body) {
+ if (!IMPORT_TYPE.test(node.type) || node.source == null) {
+ continue
+ }
+ const moduleId = node.source.value;
+
+ if (!has(traceMap, moduleId)) {
+ continue
+ }
+ const nextTraceMap = traceMap[moduleId];
+ const path = [moduleId];
+
+ if (nextTraceMap[READ]) {
+ yield { node, path, type: READ, info: nextTraceMap[READ] };
+ }
+
+ if (node.type === "ExportAllDeclaration") {
+ for (const key of Object.keys(nextTraceMap)) {
+ const exportTraceMap = nextTraceMap[key];
+ if (exportTraceMap[READ]) {
+ yield {
+ node,
+ path: path.concat(key),
+ type: READ,
+ info: exportTraceMap[READ],
+ };
+ }
+ }
+ } else {
+ for (const specifier of node.specifiers) {
+ const esm = has(nextTraceMap, ESM);
+ const it = this._iterateImportReferences(
+ specifier,
+ path,
+ esm
+ ? nextTraceMap
+ : this.mode === "legacy"
+ ? { default: nextTraceMap, ...nextTraceMap }
+ : { default: nextTraceMap },
+ );
+
+ if (esm) {
+ yield* it;
+ } else {
+ for (const report of it) {
+ report.path = report.path.filter(exceptDefault);
+ if (
+ report.path.length >= 2 ||
+ report.type !== READ
+ ) {
+ yield report;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Iterate the references for a given variable.
+ * @param {Variable} variable The variable to iterate that references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @param {boolean} shouldReport = The flag to report those references.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateVariableReferences(variable, path, traceMap, shouldReport) {
+ if (this.variableStack.includes(variable)) {
+ return
+ }
+ this.variableStack.push(variable);
+ try {
+ for (const reference of variable.references) {
+ if (!reference.isRead()) {
+ continue
+ }
+ const node = reference.identifier;
+
+ if (shouldReport && traceMap[READ]) {
+ yield { node, path, type: READ, info: traceMap[READ] };
+ }
+ yield* this._iteratePropertyReferences(node, path, traceMap);
+ }
+ } finally {
+ this.variableStack.pop();
+ }
+ }
+
+ /**
+ * Iterate the references for a given AST node.
+ * @param rootNode The AST node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ //eslint-disable-next-line complexity
+ *_iteratePropertyReferences(rootNode, path, traceMap) {
+ let node = rootNode;
+ while (isPassThrough(node)) {
+ node = node.parent;
+ }
+
+ const parent = node.parent;
+ if (parent.type === "MemberExpression") {
+ if (parent.object === node) {
+ const key = getPropertyName(parent);
+ if (key == null || !has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: parent,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iteratePropertyReferences(
+ parent,
+ path,
+ nextTraceMap,
+ );
+ }
+ return
+ }
+ if (parent.type === "CallExpression") {
+ if (parent.callee === node && traceMap[CALL]) {
+ yield { node: parent, path, type: CALL, info: traceMap[CALL] };
+ }
+ return
+ }
+ if (parent.type === "NewExpression") {
+ if (parent.callee === node && traceMap[CONSTRUCT]) {
+ yield {
+ node: parent,
+ path,
+ type: CONSTRUCT,
+ info: traceMap[CONSTRUCT],
+ };
+ }
+ return
+ }
+ if (parent.type === "AssignmentExpression") {
+ if (parent.right === node) {
+ yield* this._iterateLhsReferences(parent.left, path, traceMap);
+ yield* this._iteratePropertyReferences(parent, path, traceMap);
+ }
+ return
+ }
+ if (parent.type === "AssignmentPattern") {
+ if (parent.right === node) {
+ yield* this._iterateLhsReferences(parent.left, path, traceMap);
+ }
+ return
+ }
+ if (parent.type === "VariableDeclarator") {
+ if (parent.init === node) {
+ yield* this._iterateLhsReferences(parent.id, path, traceMap);
+ }
+ }
+ }
+
+ /**
+ * Iterate the references for a given Pattern node.
+ * @param {Node} patternNode The Pattern node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateLhsReferences(patternNode, path, traceMap) {
+ if (patternNode.type === "Identifier") {
+ const variable = findVariable(this.globalScope, patternNode);
+ if (variable != null) {
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ traceMap,
+ false,
+ );
+ }
+ return
+ }
+ if (patternNode.type === "ObjectPattern") {
+ for (const property of patternNode.properties) {
+ const key = getPropertyName(property);
+
+ if (key == null || !has(traceMap, key)) {
+ continue
+ }
+
+ const nextPath = path.concat(key);
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: property,
+ path: nextPath,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iterateLhsReferences(
+ property.value,
+ nextPath,
+ nextTraceMap,
+ );
+ }
+ return
+ }
+ if (patternNode.type === "AssignmentPattern") {
+ yield* this._iterateLhsReferences(patternNode.left, path, traceMap);
+ }
+ }
+
+ /**
+ * Iterate the references for a given ModuleSpecifier node.
+ * @param {Node} specifierNode The ModuleSpecifier node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateImportReferences(specifierNode, path, traceMap) {
+ const type = specifierNode.type;
+
+ if (type === "ImportSpecifier" || type === "ImportDefaultSpecifier") {
+ const key =
+ type === "ImportDefaultSpecifier"
+ ? "default"
+ : specifierNode.imported.name;
+ if (!has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: specifierNode,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iterateVariableReferences(
+ findVariable(this.globalScope, specifierNode.local),
+ path,
+ nextTraceMap,
+ false,
+ );
+
+ return
+ }
+
+ if (type === "ImportNamespaceSpecifier") {
+ yield* this._iterateVariableReferences(
+ findVariable(this.globalScope, specifierNode.local),
+ path,
+ traceMap,
+ false,
+ );
+ return
+ }
+
+ if (type === "ExportSpecifier") {
+ const key = specifierNode.local.name;
+ if (!has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: specifierNode,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ }
+ }
+}
+
+ReferenceTracker.READ = READ;
+ReferenceTracker.CALL = CALL;
+ReferenceTracker.CONSTRUCT = CONSTRUCT;
+ReferenceTracker.ESM = ESM;
+
+/**
+ * This is a predicate function for Array#filter.
+ * @param {string} name A name part.
+ * @param {number} index The index of the name.
+ * @returns {boolean} `false` if it's default.
+ */
+function exceptDefault(name, index) {
+ return !(index === 1 && name === "default")
+}
+
+var index = {
+ CALL,
+ CONSTRUCT,
+ ESM,
+ findVariable,
+ getFunctionHeadLocation,
+ getFunctionNameWithKind,
+ getInnermostScope,
+ getPropertyName,
+ getStaticValue,
+ getStringIfConstant,
+ hasSideEffect,
+ isArrowToken,
+ isClosingBraceToken,
+ isClosingBracketToken,
+ isClosingParenToken,
+ isColonToken,
+ isCommaToken,
+ isCommentToken,
+ isNotArrowToken,
+ isNotClosingBraceToken,
+ isNotClosingBracketToken,
+ isNotClosingParenToken,
+ isNotColonToken,
+ isNotCommaToken,
+ isNotCommentToken,
+ isNotOpeningBraceToken,
+ isNotOpeningBracketToken,
+ isNotOpeningParenToken,
+ isNotSemicolonToken,
+ isOpeningBraceToken,
+ isOpeningBracketToken,
+ isOpeningParenToken,
+ isParenthesized,
+ isSemicolonToken,
+ PatternMatcher,
+ READ,
+ ReferenceTracker,
+};
+
+exports.CALL = CALL;
+exports.CONSTRUCT = CONSTRUCT;
+exports.ESM = ESM;
+exports.PatternMatcher = PatternMatcher;
+exports.READ = READ;
+exports.ReferenceTracker = ReferenceTracker;
+exports["default"] = index;
+exports.findVariable = findVariable;
+exports.getFunctionHeadLocation = getFunctionHeadLocation;
+exports.getFunctionNameWithKind = getFunctionNameWithKind;
+exports.getInnermostScope = getInnermostScope;
+exports.getPropertyName = getPropertyName;
+exports.getStaticValue = getStaticValue;
+exports.getStringIfConstant = getStringIfConstant;
+exports.hasSideEffect = hasSideEffect;
+exports.isArrowToken = isArrowToken;
+exports.isClosingBraceToken = isClosingBraceToken;
+exports.isClosingBracketToken = isClosingBracketToken;
+exports.isClosingParenToken = isClosingParenToken;
+exports.isColonToken = isColonToken;
+exports.isCommaToken = isCommaToken;
+exports.isCommentToken = isCommentToken;
+exports.isNotArrowToken = isNotArrowToken;
+exports.isNotClosingBraceToken = isNotClosingBraceToken;
+exports.isNotClosingBracketToken = isNotClosingBracketToken;
+exports.isNotClosingParenToken = isNotClosingParenToken;
+exports.isNotColonToken = isNotColonToken;
+exports.isNotCommaToken = isNotCommaToken;
+exports.isNotCommentToken = isNotCommentToken;
+exports.isNotOpeningBraceToken = isNotOpeningBraceToken;
+exports.isNotOpeningBracketToken = isNotOpeningBracketToken;
+exports.isNotOpeningParenToken = isNotOpeningParenToken;
+exports.isNotSemicolonToken = isNotSemicolonToken;
+exports.isOpeningBraceToken = isOpeningBraceToken;
+exports.isOpeningBracketToken = isOpeningBracketToken;
+exports.isOpeningParenToken = isOpeningParenToken;
+exports.isParenthesized = isParenthesized;
+exports.isSemicolonToken = isSemicolonToken;
+//# sourceMappingURL=index.js.map
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js.map b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js.map
new file mode 100644
index 0000000..bcadeff
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @param {Token} token - The token to check.\n * @param {string} value - The value to check.\n * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n ...Object.getOwnPropertyNames(Math)\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {import(\"eslint\").Scope.Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: left.value ** right.value }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" ||\n isEffectivelyConst(variable)) &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (!isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(property.value)\n ) {\n return { value: object.value[property.value] }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (nameNode.bigint) {\n return { value: nameNode.bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = node.parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {},\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {},\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":["getKeys","KEYS"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;AAClC;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;AAChD;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAAK,QAAQ,KAAK,CAAC;AACnB;AACA,IAAI,OAAO,KAAK;AAChB;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,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c;AAClB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs
new file mode 100644
index 0000000..54b2581
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs
@@ -0,0 +1,2027 @@
+import { getKeys, KEYS } from 'eslint-visitor-keys';
+
+/**
+ * Get the innermost scope which contains a given location.
+ * @param {Scope} initialScope The initial scope to search.
+ * @param {Node} node The location to search.
+ * @returns {Scope} The innermost scope.
+ */
+function getInnermostScope(initialScope, node) {
+ const location = node.range[0];
+
+ let scope = initialScope;
+ let found = false;
+ do {
+ found = false;
+ for (const childScope of scope.childScopes) {
+ const range = childScope.block.range;
+
+ if (range[0] <= location && location < range[1]) {
+ scope = childScope;
+ found = true;
+ break
+ }
+ }
+ } while (found)
+
+ return scope
+}
+
+/**
+ * Find the variable of a given name.
+ * @param {Scope} initialScope The scope to start finding.
+ * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.
+ * @returns {Variable|null} The found variable or null.
+ */
+function findVariable(initialScope, nameOrNode) {
+ let name = "";
+ let scope = initialScope;
+
+ if (typeof nameOrNode === "string") {
+ name = nameOrNode;
+ } else {
+ name = nameOrNode.name;
+ scope = getInnermostScope(scope, nameOrNode);
+ }
+
+ while (scope != null) {
+ const variable = scope.set.get(name);
+ if (variable != null) {
+ return variable
+ }
+ scope = scope.upper;
+ }
+
+ return null
+}
+
+/**
+ * Negate the result of `this` calling.
+ * @param {Token} token The token to check.
+ * @returns {boolean} `true` if the result of `this(token)` is `false`.
+ */
+function negate0(token) {
+ return !this(token) //eslint-disable-line no-invalid-this
+}
+
+/**
+ * Creates the negate function of the given function.
+ * @param {function(Token):boolean} f - The function to negate.
+ * @returns {function(Token):boolean} Negated function.
+ */
+function negate(f) {
+ return negate0.bind(f)
+}
+
+/**
+ * Checks if the given token is a PunctuatorToken with the given value
+ * @param {Token} token - The token to check.
+ * @param {string} value - The value to check.
+ * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.
+ */
+function isPunctuatorTokenWithValue(token, value) {
+ return token.type === "Punctuator" && token.value === value
+}
+
+/**
+ * Checks if the given token is an arrow token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an arrow token.
+ */
+function isArrowToken(token) {
+ return isPunctuatorTokenWithValue(token, "=>")
+}
+
+/**
+ * Checks if the given token is a comma token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comma token.
+ */
+function isCommaToken(token) {
+ return isPunctuatorTokenWithValue(token, ",")
+}
+
+/**
+ * Checks if the given token is a semicolon token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a semicolon token.
+ */
+function isSemicolonToken(token) {
+ return isPunctuatorTokenWithValue(token, ";")
+}
+
+/**
+ * Checks if the given token is a colon token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a colon token.
+ */
+function isColonToken(token) {
+ return isPunctuatorTokenWithValue(token, ":")
+}
+
+/**
+ * Checks if the given token is an opening parenthesis token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening parenthesis token.
+ */
+function isOpeningParenToken(token) {
+ return isPunctuatorTokenWithValue(token, "(")
+}
+
+/**
+ * Checks if the given token is a closing parenthesis token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing parenthesis token.
+ */
+function isClosingParenToken(token) {
+ return isPunctuatorTokenWithValue(token, ")")
+}
+
+/**
+ * Checks if the given token is an opening square bracket token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening square bracket token.
+ */
+function isOpeningBracketToken(token) {
+ return isPunctuatorTokenWithValue(token, "[")
+}
+
+/**
+ * Checks if the given token is a closing square bracket token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing square bracket token.
+ */
+function isClosingBracketToken(token) {
+ return isPunctuatorTokenWithValue(token, "]")
+}
+
+/**
+ * Checks if the given token is an opening brace token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening brace token.
+ */
+function isOpeningBraceToken(token) {
+ return isPunctuatorTokenWithValue(token, "{")
+}
+
+/**
+ * Checks if the given token is a closing brace token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing brace token.
+ */
+function isClosingBraceToken(token) {
+ return isPunctuatorTokenWithValue(token, "}")
+}
+
+/**
+ * Checks if the given token is a comment token or not.
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comment token.
+ */
+function isCommentToken(token) {
+ return ["Block", "Line", "Shebang"].includes(token.type)
+}
+
+const isNotArrowToken = negate(isArrowToken);
+const isNotCommaToken = negate(isCommaToken);
+const isNotSemicolonToken = negate(isSemicolonToken);
+const isNotColonToken = negate(isColonToken);
+const isNotOpeningParenToken = negate(isOpeningParenToken);
+const isNotClosingParenToken = negate(isClosingParenToken);
+const isNotOpeningBracketToken = negate(isOpeningBracketToken);
+const isNotClosingBracketToken = negate(isClosingBracketToken);
+const isNotOpeningBraceToken = negate(isOpeningBraceToken);
+const isNotClosingBraceToken = negate(isClosingBraceToken);
+const isNotCommentToken = negate(isCommentToken);
+
+/**
+ * Get the `(` token of the given function node.
+ * @param {Node} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {Token} `(` token.
+ */
+function getOpeningParenOfParams(node, sourceCode) {
+ return node.id
+ ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)
+ : sourceCode.getFirstToken(node, isOpeningParenToken)
+}
+
+/**
+ * Get the location of the given function node for reporting.
+ * @param {Node} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {string} The location of the function node for reporting.
+ */
+function getFunctionHeadLocation(node, sourceCode) {
+ const parent = node.parent;
+ let start = null;
+ let end = null;
+
+ if (node.type === "ArrowFunctionExpression") {
+ const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken);
+
+ start = arrowToken.loc.start;
+ end = arrowToken.loc.end;
+ } else if (
+ parent.type === "Property" ||
+ parent.type === "MethodDefinition" ||
+ parent.type === "PropertyDefinition"
+ ) {
+ start = parent.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ } else {
+ start = node.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ }
+
+ return {
+ start: { ...start },
+ end: { ...end },
+ }
+}
+
+/* globals globalThis, global, self, window */
+
+const globalObject =
+ typeof globalThis !== "undefined"
+ ? globalThis
+ : typeof self !== "undefined"
+ ? self
+ : typeof window !== "undefined"
+ ? window
+ : typeof global !== "undefined"
+ ? global
+ : {};
+
+const builtinNames = Object.freeze(
+ new Set([
+ "Array",
+ "ArrayBuffer",
+ "BigInt",
+ "BigInt64Array",
+ "BigUint64Array",
+ "Boolean",
+ "DataView",
+ "Date",
+ "decodeURI",
+ "decodeURIComponent",
+ "encodeURI",
+ "encodeURIComponent",
+ "escape",
+ "Float32Array",
+ "Float64Array",
+ "Function",
+ "Infinity",
+ "Int16Array",
+ "Int32Array",
+ "Int8Array",
+ "isFinite",
+ "isNaN",
+ "isPrototypeOf",
+ "JSON",
+ "Map",
+ "Math",
+ "NaN",
+ "Number",
+ "Object",
+ "parseFloat",
+ "parseInt",
+ "Promise",
+ "Proxy",
+ "Reflect",
+ "RegExp",
+ "Set",
+ "String",
+ "Symbol",
+ "Uint16Array",
+ "Uint32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "undefined",
+ "unescape",
+ "WeakMap",
+ "WeakSet",
+ ]),
+);
+const callAllowed = new Set(
+ [
+ Array.isArray,
+ Array.of,
+ Array.prototype.at,
+ Array.prototype.concat,
+ Array.prototype.entries,
+ Array.prototype.every,
+ Array.prototype.filter,
+ Array.prototype.find,
+ Array.prototype.findIndex,
+ Array.prototype.flat,
+ Array.prototype.includes,
+ Array.prototype.indexOf,
+ Array.prototype.join,
+ Array.prototype.keys,
+ Array.prototype.lastIndexOf,
+ Array.prototype.slice,
+ Array.prototype.some,
+ Array.prototype.toString,
+ Array.prototype.values,
+ typeof BigInt === "function" ? BigInt : undefined,
+ Boolean,
+ Date,
+ Date.parse,
+ decodeURI,
+ decodeURIComponent,
+ encodeURI,
+ encodeURIComponent,
+ escape,
+ isFinite,
+ isNaN,
+ isPrototypeOf,
+ Map,
+ Map.prototype.entries,
+ Map.prototype.get,
+ Map.prototype.has,
+ Map.prototype.keys,
+ Map.prototype.values,
+ ...Object.getOwnPropertyNames(Math)
+ .filter((k) => k !== "random")
+ .map((k) => Math[k])
+ .filter((f) => typeof f === "function"),
+ Number,
+ Number.isFinite,
+ Number.isNaN,
+ Number.parseFloat,
+ Number.parseInt,
+ Number.prototype.toExponential,
+ Number.prototype.toFixed,
+ Number.prototype.toPrecision,
+ Number.prototype.toString,
+ Object,
+ Object.entries,
+ Object.is,
+ Object.isExtensible,
+ Object.isFrozen,
+ Object.isSealed,
+ Object.keys,
+ Object.values,
+ parseFloat,
+ parseInt,
+ RegExp,
+ Set,
+ Set.prototype.entries,
+ Set.prototype.has,
+ Set.prototype.keys,
+ Set.prototype.values,
+ String,
+ String.fromCharCode,
+ String.fromCodePoint,
+ String.raw,
+ String.prototype.at,
+ String.prototype.charAt,
+ String.prototype.charCodeAt,
+ String.prototype.codePointAt,
+ String.prototype.concat,
+ String.prototype.endsWith,
+ String.prototype.includes,
+ String.prototype.indexOf,
+ String.prototype.lastIndexOf,
+ String.prototype.normalize,
+ String.prototype.padEnd,
+ String.prototype.padStart,
+ String.prototype.slice,
+ String.prototype.startsWith,
+ String.prototype.substr,
+ String.prototype.substring,
+ String.prototype.toLowerCase,
+ String.prototype.toString,
+ String.prototype.toUpperCase,
+ String.prototype.trim,
+ String.prototype.trimEnd,
+ String.prototype.trimLeft,
+ String.prototype.trimRight,
+ String.prototype.trimStart,
+ Symbol.for,
+ Symbol.keyFor,
+ unescape,
+ ].filter((f) => typeof f === "function"),
+);
+const callPassThrough = new Set([
+ Object.freeze,
+ Object.preventExtensions,
+ Object.seal,
+]);
+
+/** @type {ReadonlyArray]>} */
+const getterAllowed = [
+ [Map, new Set(["size"])],
+ [
+ RegExp,
+ new Set([
+ "dotAll",
+ "flags",
+ "global",
+ "hasIndices",
+ "ignoreCase",
+ "multiline",
+ "source",
+ "sticky",
+ "unicode",
+ ]),
+ ],
+ [Set, new Set(["size"])],
+];
+
+/**
+ * Get the property descriptor.
+ * @param {object} object The object to get.
+ * @param {string|number|symbol} name The property name to get.
+ */
+function getPropertyDescriptor(object, name) {
+ let x = object;
+ while ((typeof x === "object" || typeof x === "function") && x !== null) {
+ const d = Object.getOwnPropertyDescriptor(x, name);
+ if (d) {
+ return d
+ }
+ x = Object.getPrototypeOf(x);
+ }
+ return null
+}
+
+/**
+ * Check if a property is getter or not.
+ * @param {object} object The object to check.
+ * @param {string|number|symbol} name The property name to check.
+ */
+function isGetter(object, name) {
+ const d = getPropertyDescriptor(object, name);
+ return d != null && d.get != null
+}
+
+/**
+ * Get the element values of a given node list.
+ * @param {Node[]} nodeList The node list to get values.
+ * @param {Scope|undefined} initialScope The initial scope to find variables.
+ * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.
+ */
+function getElementValues(nodeList, initialScope) {
+ const valueList = [];
+
+ for (let i = 0; i < nodeList.length; ++i) {
+ const elementNode = nodeList[i];
+
+ if (elementNode == null) {
+ valueList.length = i + 1;
+ } else if (elementNode.type === "SpreadElement") {
+ const argument = getStaticValueR(elementNode.argument, initialScope);
+ if (argument == null) {
+ return null
+ }
+ valueList.push(...argument.value);
+ } else {
+ const element = getStaticValueR(elementNode, initialScope);
+ if (element == null) {
+ return null
+ }
+ valueList.push(element.value);
+ }
+ }
+
+ return valueList
+}
+
+/**
+ * Returns whether the given variable is never written to after initialization.
+ * @param {import("eslint").Scope.Variable} variable
+ * @returns {boolean}
+ */
+function isEffectivelyConst(variable) {
+ const refs = variable.references;
+
+ const inits = refs.filter((r) => r.init).length;
+ const reads = refs.filter((r) => r.isReadOnly()).length;
+ if (inits === 1 && reads + inits === refs.length) {
+ // there is only one init and all other references only read
+ return true
+ }
+ return false
+}
+
+const operations = Object.freeze({
+ ArrayExpression(node, initialScope) {
+ const elements = getElementValues(node.elements, initialScope);
+ return elements != null ? { value: elements } : null
+ },
+
+ AssignmentExpression(node, initialScope) {
+ if (node.operator === "=") {
+ return getStaticValueR(node.right, initialScope)
+ }
+ return null
+ },
+
+ //eslint-disable-next-line complexity
+ BinaryExpression(node, initialScope) {
+ if (node.operator === "in" || node.operator === "instanceof") {
+ // Not supported.
+ return null
+ }
+
+ const left = getStaticValueR(node.left, initialScope);
+ const right = getStaticValueR(node.right, initialScope);
+ if (left != null && right != null) {
+ switch (node.operator) {
+ case "==":
+ return { value: left.value == right.value } //eslint-disable-line eqeqeq
+ case "!=":
+ return { value: left.value != right.value } //eslint-disable-line eqeqeq
+ case "===":
+ return { value: left.value === right.value }
+ case "!==":
+ return { value: left.value !== right.value }
+ case "<":
+ return { value: left.value < right.value }
+ case "<=":
+ return { value: left.value <= right.value }
+ case ">":
+ return { value: left.value > right.value }
+ case ">=":
+ return { value: left.value >= right.value }
+ case "<<":
+ return { value: left.value << right.value }
+ case ">>":
+ return { value: left.value >> right.value }
+ case ">>>":
+ return { value: left.value >>> right.value }
+ case "+":
+ return { value: left.value + right.value }
+ case "-":
+ return { value: left.value - right.value }
+ case "*":
+ return { value: left.value * right.value }
+ case "/":
+ return { value: left.value / right.value }
+ case "%":
+ return { value: left.value % right.value }
+ case "**":
+ return { value: left.value ** right.value }
+ case "|":
+ return { value: left.value | right.value }
+ case "^":
+ return { value: left.value ^ right.value }
+ case "&":
+ return { value: left.value & right.value }
+
+ // no default
+ }
+ }
+
+ return null
+ },
+
+ CallExpression(node, initialScope) {
+ const calleeNode = node.callee;
+ const args = getElementValues(node.arguments, initialScope);
+
+ if (args != null) {
+ if (calleeNode.type === "MemberExpression") {
+ if (calleeNode.property.type === "PrivateIdentifier") {
+ return null
+ }
+ const object = getStaticValueR(calleeNode.object, initialScope);
+ if (object != null) {
+ if (
+ object.value == null &&
+ (object.optional || node.optional)
+ ) {
+ return { value: undefined, optional: true }
+ }
+ const property = getStaticPropertyNameValue(
+ calleeNode,
+ initialScope,
+ );
+
+ if (property != null) {
+ const receiver = object.value;
+ const methodName = property.value;
+ if (callAllowed.has(receiver[methodName])) {
+ return { value: receiver[methodName](...args) }
+ }
+ if (callPassThrough.has(receiver[methodName])) {
+ return { value: args[0] }
+ }
+ }
+ }
+ } else {
+ const callee = getStaticValueR(calleeNode, initialScope);
+ if (callee != null) {
+ if (callee.value == null && node.optional) {
+ return { value: undefined, optional: true }
+ }
+ const func = callee.value;
+ if (callAllowed.has(func)) {
+ return { value: func(...args) }
+ }
+ if (callPassThrough.has(func)) {
+ return { value: args[0] }
+ }
+ }
+ }
+ }
+
+ return null
+ },
+
+ ConditionalExpression(node, initialScope) {
+ const test = getStaticValueR(node.test, initialScope);
+ if (test != null) {
+ return test.value
+ ? getStaticValueR(node.consequent, initialScope)
+ : getStaticValueR(node.alternate, initialScope)
+ }
+ return null
+ },
+
+ ExpressionStatement(node, initialScope) {
+ return getStaticValueR(node.expression, initialScope)
+ },
+
+ Identifier(node, initialScope) {
+ if (initialScope != null) {
+ const variable = findVariable(initialScope, node);
+
+ // Built-in globals.
+ if (
+ variable != null &&
+ variable.defs.length === 0 &&
+ builtinNames.has(variable.name) &&
+ variable.name in globalObject
+ ) {
+ return { value: globalObject[variable.name] }
+ }
+
+ // Constants.
+ if (variable != null && variable.defs.length === 1) {
+ const def = variable.defs[0];
+ if (
+ def.parent &&
+ def.type === "Variable" &&
+ (def.parent.kind === "const" ||
+ isEffectivelyConst(variable)) &&
+ // TODO(mysticatea): don't support destructuring here.
+ def.node.id.type === "Identifier"
+ ) {
+ return getStaticValueR(def.node.init, initialScope)
+ }
+ }
+ }
+ return null
+ },
+
+ Literal(node) {
+ //istanbul ignore if : this is implementation-specific behavior.
+ if ((node.regex != null || node.bigint != null) && node.value == null) {
+ // It was a RegExp/BigInt literal, but Node.js didn't support it.
+ return null
+ }
+ return { value: node.value }
+ },
+
+ LogicalExpression(node, initialScope) {
+ const left = getStaticValueR(node.left, initialScope);
+ if (left != null) {
+ if (
+ (node.operator === "||" && Boolean(left.value) === true) ||
+ (node.operator === "&&" && Boolean(left.value) === false) ||
+ (node.operator === "??" && left.value != null)
+ ) {
+ return left
+ }
+
+ const right = getStaticValueR(node.right, initialScope);
+ if (right != null) {
+ return right
+ }
+ }
+
+ return null
+ },
+
+ MemberExpression(node, initialScope) {
+ if (node.property.type === "PrivateIdentifier") {
+ return null
+ }
+ const object = getStaticValueR(node.object, initialScope);
+ if (object != null) {
+ if (object.value == null && (object.optional || node.optional)) {
+ return { value: undefined, optional: true }
+ }
+ const property = getStaticPropertyNameValue(node, initialScope);
+
+ if (property != null) {
+ if (!isGetter(object.value, property.value)) {
+ return { value: object.value[property.value] }
+ }
+
+ for (const [classFn, allowed] of getterAllowed) {
+ if (
+ object.value instanceof classFn &&
+ allowed.has(property.value)
+ ) {
+ return { value: object.value[property.value] }
+ }
+ }
+ }
+ }
+ return null
+ },
+
+ ChainExpression(node, initialScope) {
+ const expression = getStaticValueR(node.expression, initialScope);
+ if (expression != null) {
+ return { value: expression.value }
+ }
+ return null
+ },
+
+ NewExpression(node, initialScope) {
+ const callee = getStaticValueR(node.callee, initialScope);
+ const args = getElementValues(node.arguments, initialScope);
+
+ if (callee != null && args != null) {
+ const Func = callee.value;
+ if (callAllowed.has(Func)) {
+ return { value: new Func(...args) }
+ }
+ }
+
+ return null
+ },
+
+ ObjectExpression(node, initialScope) {
+ const object = {};
+
+ for (const propertyNode of node.properties) {
+ if (propertyNode.type === "Property") {
+ if (propertyNode.kind !== "init") {
+ return null
+ }
+ const key = getStaticPropertyNameValue(
+ propertyNode,
+ initialScope,
+ );
+ const value = getStaticValueR(propertyNode.value, initialScope);
+ if (key == null || value == null) {
+ return null
+ }
+ object[key.value] = value.value;
+ } else if (
+ propertyNode.type === "SpreadElement" ||
+ propertyNode.type === "ExperimentalSpreadProperty"
+ ) {
+ const argument = getStaticValueR(
+ propertyNode.argument,
+ initialScope,
+ );
+ if (argument == null) {
+ return null
+ }
+ Object.assign(object, argument.value);
+ } else {
+ return null
+ }
+ }
+
+ return { value: object }
+ },
+
+ SequenceExpression(node, initialScope) {
+ const last = node.expressions[node.expressions.length - 1];
+ return getStaticValueR(last, initialScope)
+ },
+
+ TaggedTemplateExpression(node, initialScope) {
+ const tag = getStaticValueR(node.tag, initialScope);
+ const expressions = getElementValues(
+ node.quasi.expressions,
+ initialScope,
+ );
+
+ if (tag != null && expressions != null) {
+ const func = tag.value;
+ const strings = node.quasi.quasis.map((q) => q.value.cooked);
+ strings.raw = node.quasi.quasis.map((q) => q.value.raw);
+
+ if (func === String.raw) {
+ return { value: func(strings, ...expressions) }
+ }
+ }
+
+ return null
+ },
+
+ TemplateLiteral(node, initialScope) {
+ const expressions = getElementValues(node.expressions, initialScope);
+ if (expressions != null) {
+ let value = node.quasis[0].value.cooked;
+ for (let i = 0; i < expressions.length; ++i) {
+ value += expressions[i];
+ value += node.quasis[i + 1].value.cooked;
+ }
+ return { value }
+ }
+ return null
+ },
+
+ UnaryExpression(node, initialScope) {
+ if (node.operator === "delete") {
+ // Not supported.
+ return null
+ }
+ if (node.operator === "void") {
+ return { value: undefined }
+ }
+
+ const arg = getStaticValueR(node.argument, initialScope);
+ if (arg != null) {
+ switch (node.operator) {
+ case "-":
+ return { value: -arg.value }
+ case "+":
+ return { value: +arg.value } //eslint-disable-line no-implicit-coercion
+ case "!":
+ return { value: !arg.value }
+ case "~":
+ return { value: ~arg.value }
+ case "typeof":
+ return { value: typeof arg.value }
+
+ // no default
+ }
+ }
+
+ return null
+ },
+});
+
+/**
+ * Get the value of a given node if it's a static value.
+ * @param {Node} node The node to get.
+ * @param {Scope|undefined} initialScope The scope to start finding variable.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.
+ */
+function getStaticValueR(node, initialScope) {
+ if (node != null && Object.hasOwnProperty.call(operations, node.type)) {
+ return operations[node.type](node, initialScope)
+ }
+ return null
+}
+
+/**
+ * Get the static value of property name from a MemberExpression node or a Property node.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.
+ */
+function getStaticPropertyNameValue(node, initialScope) {
+ const nameNode = node.type === "Property" ? node.key : node.property;
+
+ if (node.computed) {
+ return getStaticValueR(nameNode, initialScope)
+ }
+
+ if (nameNode.type === "Identifier") {
+ return { value: nameNode.name }
+ }
+
+ if (nameNode.type === "Literal") {
+ if (nameNode.bigint) {
+ return { value: nameNode.bigint }
+ }
+ return { value: String(nameNode.value) }
+ }
+
+ return null
+}
+
+/**
+ * Get the value of a given node if it's a static value.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.
+ * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.
+ */
+function getStaticValue(node, initialScope = null) {
+ try {
+ return getStaticValueR(node, initialScope)
+ } catch (_error) {
+ return null
+ }
+}
+
+/**
+ * Get the value of a given node if it's a literal or a template literal.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.
+ * @returns {string|null} The value of the node, or `null`.
+ */
+function getStringIfConstant(node, initialScope = null) {
+ // Handle the literals that the platform doesn't support natively.
+ if (node && node.type === "Literal" && node.value === null) {
+ if (node.regex) {
+ return `/${node.regex.pattern}/${node.regex.flags}`
+ }
+ if (node.bigint) {
+ return node.bigint
+ }
+ }
+
+ const evaluated = getStaticValue(node, initialScope);
+ return evaluated && String(evaluated.value)
+}
+
+/**
+ * Get the property name from a MemberExpression node or a Property node.
+ * @param {Node} node The node to get.
+ * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.
+ * @returns {string|null} The property name of the node.
+ */
+function getPropertyName(node, initialScope) {
+ switch (node.type) {
+ case "MemberExpression":
+ if (node.computed) {
+ return getStringIfConstant(node.property, initialScope)
+ }
+ if (node.property.type === "PrivateIdentifier") {
+ return null
+ }
+ return node.property.name
+
+ case "Property":
+ case "MethodDefinition":
+ case "PropertyDefinition":
+ if (node.computed) {
+ return getStringIfConstant(node.key, initialScope)
+ }
+ if (node.key.type === "Literal") {
+ return String(node.key.value)
+ }
+ if (node.key.type === "PrivateIdentifier") {
+ return null
+ }
+ return node.key.name
+
+ // no default
+ }
+
+ return null
+}
+
+/**
+ * Get the name and kind of the given function node.
+ * @param {ASTNode} node - The function node to get.
+ * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.
+ * @returns {string} The name and kind of the function node.
+ */
+// eslint-disable-next-line complexity
+function getFunctionNameWithKind(node, sourceCode) {
+ const parent = node.parent;
+ const tokens = [];
+ const isObjectMethod = parent.type === "Property" && parent.value === node;
+ const isClassMethod =
+ parent.type === "MethodDefinition" && parent.value === node;
+ const isClassFieldMethod =
+ parent.type === "PropertyDefinition" && parent.value === node;
+
+ // Modifiers.
+ if (isClassMethod || isClassFieldMethod) {
+ if (parent.static) {
+ tokens.push("static");
+ }
+ if (parent.key.type === "PrivateIdentifier") {
+ tokens.push("private");
+ }
+ }
+ if (node.async) {
+ tokens.push("async");
+ }
+ if (node.generator) {
+ tokens.push("generator");
+ }
+
+ // Kinds.
+ if (isObjectMethod || isClassMethod) {
+ if (parent.kind === "constructor") {
+ return "constructor"
+ }
+ if (parent.kind === "get") {
+ tokens.push("getter");
+ } else if (parent.kind === "set") {
+ tokens.push("setter");
+ } else {
+ tokens.push("method");
+ }
+ } else if (isClassFieldMethod) {
+ tokens.push("method");
+ } else {
+ if (node.type === "ArrowFunctionExpression") {
+ tokens.push("arrow");
+ }
+ tokens.push("function");
+ }
+
+ // Names.
+ if (isObjectMethod || isClassMethod || isClassFieldMethod) {
+ if (parent.key.type === "PrivateIdentifier") {
+ tokens.push(`#${parent.key.name}`);
+ } else {
+ const name = getPropertyName(parent);
+ if (name) {
+ tokens.push(`'${name}'`);
+ } else if (sourceCode) {
+ const keyText = sourceCode.getText(parent.key);
+ if (!keyText.includes("\n")) {
+ tokens.push(`[${keyText}]`);
+ }
+ }
+ }
+ } else if (node.id) {
+ tokens.push(`'${node.id.name}'`);
+ } else if (
+ parent.type === "VariableDeclarator" &&
+ parent.id &&
+ parent.id.type === "Identifier"
+ ) {
+ tokens.push(`'${parent.id.name}'`);
+ } else if (
+ (parent.type === "AssignmentExpression" ||
+ parent.type === "AssignmentPattern") &&
+ parent.left &&
+ parent.left.type === "Identifier"
+ ) {
+ tokens.push(`'${parent.left.name}'`);
+ } else if (
+ parent.type === "ExportDefaultDeclaration" &&
+ parent.declaration === node
+ ) {
+ tokens.push("'default'");
+ }
+
+ return tokens.join(" ")
+}
+
+const typeConversionBinaryOps = Object.freeze(
+ new Set([
+ "==",
+ "!=",
+ "<",
+ "<=",
+ ">",
+ ">=",
+ "<<",
+ ">>",
+ ">>>",
+ "+",
+ "-",
+ "*",
+ "/",
+ "%",
+ "|",
+ "^",
+ "&",
+ "in",
+ ]),
+);
+const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"]));
+
+/**
+ * Check whether the given value is an ASTNode or not.
+ * @param {any} x The value to check.
+ * @returns {boolean} `true` if the value is an ASTNode.
+ */
+function isNode(x) {
+ return x !== null && typeof x === "object" && typeof x.type === "string"
+}
+
+const visitor = Object.freeze(
+ Object.assign(Object.create(null), {
+ $visit(node, options, visitorKeys) {
+ const { type } = node;
+
+ if (typeof this[type] === "function") {
+ return this[type](node, options, visitorKeys)
+ }
+
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+
+ $visitChildren(node, options, visitorKeys) {
+ const { type } = node;
+
+ for (const key of visitorKeys[type] || getKeys(node)) {
+ const value = node[key];
+
+ if (Array.isArray(value)) {
+ for (const element of value) {
+ if (
+ isNode(element) &&
+ this.$visit(element, options, visitorKeys)
+ ) {
+ return true
+ }
+ }
+ } else if (
+ isNode(value) &&
+ this.$visit(value, options, visitorKeys)
+ ) {
+ return true
+ }
+ }
+
+ return false
+ },
+
+ ArrowFunctionExpression() {
+ return false
+ },
+ AssignmentExpression() {
+ return true
+ },
+ AwaitExpression() {
+ return true
+ },
+ BinaryExpression(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ typeConversionBinaryOps.has(node.operator) &&
+ (node.left.type !== "Literal" || node.right.type !== "Literal")
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ CallExpression() {
+ return true
+ },
+ FunctionExpression() {
+ return false
+ },
+ ImportExpression() {
+ return true
+ },
+ MemberExpression(node, options, visitorKeys) {
+ if (options.considerGetters) {
+ return true
+ }
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.property.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ MethodDefinition(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ NewExpression() {
+ return true
+ },
+ Property(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ PropertyDefinition(node, options, visitorKeys) {
+ if (
+ options.considerImplicitTypeConversion &&
+ node.computed &&
+ node.key.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ UnaryExpression(node, options, visitorKeys) {
+ if (node.operator === "delete") {
+ return true
+ }
+ if (
+ options.considerImplicitTypeConversion &&
+ typeConversionUnaryOps.has(node.operator) &&
+ node.argument.type !== "Literal"
+ ) {
+ return true
+ }
+ return this.$visitChildren(node, options, visitorKeys)
+ },
+ UpdateExpression() {
+ return true
+ },
+ YieldExpression() {
+ return true
+ },
+ }),
+);
+
+/**
+ * Check whether a given node has any side effect or not.
+ * @param {Node} node The node to get.
+ * @param {SourceCode} sourceCode The source code object.
+ * @param {object} [options] The option object.
+ * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.
+ * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.
+ * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.
+ * @returns {boolean} `true` if the node has a certain side effect.
+ */
+function hasSideEffect(
+ node,
+ sourceCode,
+ { considerGetters = false, considerImplicitTypeConversion = false } = {},
+) {
+ return visitor.$visit(
+ node,
+ { considerGetters, considerImplicitTypeConversion },
+ sourceCode.visitorKeys || KEYS,
+ )
+}
+
+/**
+ * Get the left parenthesis of the parent node syntax if it exists.
+ * E.g., `if (a) {}` then the `(`.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {Token|null} The left parenthesis of the parent node syntax
+ */
+function getParentSyntaxParen(node, sourceCode) {
+ const parent = node.parent;
+
+ switch (parent.type) {
+ case "CallExpression":
+ case "NewExpression":
+ if (parent.arguments.length === 1 && parent.arguments[0] === node) {
+ return sourceCode.getTokenAfter(
+ parent.callee,
+ isOpeningParenToken,
+ )
+ }
+ return null
+
+ case "DoWhileStatement":
+ if (parent.test === node) {
+ return sourceCode.getTokenAfter(
+ parent.body,
+ isOpeningParenToken,
+ )
+ }
+ return null
+
+ case "IfStatement":
+ case "WhileStatement":
+ if (parent.test === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "ImportExpression":
+ if (parent.source === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "SwitchStatement":
+ if (parent.discriminant === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ case "WithStatement":
+ if (parent.object === node) {
+ return sourceCode.getFirstToken(parent, 1)
+ }
+ return null
+
+ default:
+ return null
+ }
+}
+
+/**
+ * Check whether a given node is parenthesized or not.
+ * @param {number} times The number of parantheses.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is parenthesized the given times.
+ */
+/**
+ * Check whether a given node is parenthesized or not.
+ * @param {Node} node The AST node to check.
+ * @param {SourceCode} sourceCode The source code object to get tokens.
+ * @returns {boolean} `true` if the node is parenthesized.
+ */
+function isParenthesized(
+ timesOrNode,
+ nodeOrSourceCode,
+ optionalSourceCode,
+) {
+ let times, node, sourceCode, maybeLeftParen, maybeRightParen;
+ if (typeof timesOrNode === "number") {
+ times = timesOrNode | 0;
+ node = nodeOrSourceCode;
+ sourceCode = optionalSourceCode;
+ if (!(times >= 1)) {
+ throw new TypeError("'times' should be a positive integer.")
+ }
+ } else {
+ times = 1;
+ node = timesOrNode;
+ sourceCode = nodeOrSourceCode;
+ }
+
+ if (
+ node == null ||
+ // `Program` can't be parenthesized
+ node.parent == null ||
+ // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`
+ (node.parent.type === "CatchClause" && node.parent.param === node)
+ ) {
+ return false
+ }
+
+ maybeLeftParen = maybeRightParen = node;
+ do {
+ maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen);
+ maybeRightParen = sourceCode.getTokenAfter(maybeRightParen);
+ } while (
+ maybeLeftParen != null &&
+ maybeRightParen != null &&
+ isOpeningParenToken(maybeLeftParen) &&
+ isClosingParenToken(maybeRightParen) &&
+ // Avoid false positive such as `if (a) {}`
+ maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&
+ --times > 0
+ )
+
+ return times === 0
+}
+
+/**
+ * @author Toru Nagashima
+ * See LICENSE file in root directory for full license.
+ */
+
+const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu;
+
+/** @type {WeakMap} */
+const internal = new WeakMap();
+
+/**
+ * Check whether a given character is escaped or not.
+ * @param {string} str The string to check.
+ * @param {number} index The location of the character to check.
+ * @returns {boolean} `true` if the character is escaped.
+ */
+function isEscaped(str, index) {
+ let escaped = false;
+ for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {
+ escaped = !escaped;
+ }
+ return escaped
+}
+
+/**
+ * Replace a given string by a given matcher.
+ * @param {PatternMatcher} matcher The pattern matcher.
+ * @param {string} str The string to be replaced.
+ * @param {string} replacement The new substring to replace each matched part.
+ * @returns {string} The replaced string.
+ */
+function replaceS(matcher, str, replacement) {
+ const chunks = [];
+ let index = 0;
+
+ /** @type {RegExpExecArray} */
+ let match = null;
+
+ /**
+ * @param {string} key The placeholder.
+ * @returns {string} The replaced string.
+ */
+ function replacer(key) {
+ switch (key) {
+ case "$$":
+ return "$"
+ case "$&":
+ return match[0]
+ case "$`":
+ return str.slice(0, match.index)
+ case "$'":
+ return str.slice(match.index + match[0].length)
+ default: {
+ const i = key.slice(1);
+ if (i in match) {
+ return match[i]
+ }
+ return key
+ }
+ }
+ }
+
+ for (match of matcher.execAll(str)) {
+ chunks.push(str.slice(index, match.index));
+ chunks.push(replacement.replace(placeholder, replacer));
+ index = match.index + match[0].length;
+ }
+ chunks.push(str.slice(index));
+
+ return chunks.join("")
+}
+
+/**
+ * Replace a given string by a given matcher.
+ * @param {PatternMatcher} matcher The pattern matcher.
+ * @param {string} str The string to be replaced.
+ * @param {(...strs[])=>string} replace The function to replace each matched part.
+ * @returns {string} The replaced string.
+ */
+function replaceF(matcher, str, replace) {
+ const chunks = [];
+ let index = 0;
+
+ for (const match of matcher.execAll(str)) {
+ chunks.push(str.slice(index, match.index));
+ chunks.push(String(replace(...match, match.index, match.input)));
+ index = match.index + match[0].length;
+ }
+ chunks.push(str.slice(index));
+
+ return chunks.join("")
+}
+
+/**
+ * The class to find patterns as considering escape sequences.
+ */
+class PatternMatcher {
+ /**
+ * Initialize this matcher.
+ * @param {RegExp} pattern The pattern to match.
+ * @param {{escaped:boolean}} options The options.
+ */
+ constructor(pattern, { escaped = false } = {}) {
+ if (!(pattern instanceof RegExp)) {
+ throw new TypeError("'pattern' should be a RegExp instance.")
+ }
+ if (!pattern.flags.includes("g")) {
+ throw new Error("'pattern' should contains 'g' flag.")
+ }
+
+ internal.set(this, {
+ pattern: new RegExp(pattern.source, pattern.flags),
+ escaped: Boolean(escaped),
+ });
+ }
+
+ /**
+ * Find the pattern in a given string.
+ * @param {string} str The string to find.
+ * @returns {IterableIterator} The iterator which iterate the matched information.
+ */
+ *execAll(str) {
+ const { pattern, escaped } = internal.get(this);
+ let match = null;
+ let lastIndex = 0;
+
+ pattern.lastIndex = 0;
+ while ((match = pattern.exec(str)) != null) {
+ if (escaped || !isEscaped(str, match.index)) {
+ lastIndex = pattern.lastIndex;
+ yield match;
+ pattern.lastIndex = lastIndex;
+ }
+ }
+ }
+
+ /**
+ * Check whether the pattern is found in a given string.
+ * @param {string} str The string to check.
+ * @returns {boolean} `true` if the pattern was found in the string.
+ */
+ test(str) {
+ const it = this.execAll(str);
+ const ret = it.next();
+ return !ret.done
+ }
+
+ /**
+ * Replace a given string.
+ * @param {string} str The string to be replaced.
+ * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.
+ * @returns {string} The replaced string.
+ */
+ [Symbol.replace](str, replacer) {
+ return typeof replacer === "function"
+ ? replaceF(this, String(str), replacer)
+ : replaceS(this, String(str), String(replacer))
+ }
+}
+
+const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u;
+const has = Function.call.bind(Object.hasOwnProperty);
+
+const READ = Symbol("read");
+const CALL = Symbol("call");
+const CONSTRUCT = Symbol("construct");
+const ESM = Symbol("esm");
+
+const requireCall = { require: { [CALL]: true } };
+
+/**
+ * Check whether a given variable is modified or not.
+ * @param {Variable} variable The variable to check.
+ * @returns {boolean} `true` if the variable is modified.
+ */
+function isModifiedGlobal(variable) {
+ return (
+ variable == null ||
+ variable.defs.length !== 0 ||
+ variable.references.some((r) => r.isWrite())
+ )
+}
+
+/**
+ * Check if the value of a given node is passed through to the parent syntax as-is.
+ * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.
+ * @param {Node} node A node to check.
+ * @returns {boolean} `true` if the node is passed through.
+ */
+function isPassThrough(node) {
+ const parent = node.parent;
+
+ switch (parent && parent.type) {
+ case "ConditionalExpression":
+ return parent.consequent === node || parent.alternate === node
+ case "LogicalExpression":
+ return true
+ case "SequenceExpression":
+ return parent.expressions[parent.expressions.length - 1] === node
+ case "ChainExpression":
+ return true
+
+ default:
+ return false
+ }
+}
+
+/**
+ * The reference tracker.
+ */
+class ReferenceTracker {
+ /**
+ * Initialize this tracker.
+ * @param {Scope} globalScope The global scope.
+ * @param {object} [options] The options.
+ * @param {"legacy"|"strict"} [options.mode="strict"] The mode to determine the ImportDeclaration's behavior for CJS modules.
+ * @param {string[]} [options.globalObjectNames=["global","globalThis","self","window"]] The variable names for Global Object.
+ */
+ constructor(
+ globalScope,
+ {
+ mode = "strict",
+ globalObjectNames = ["global", "globalThis", "self", "window"],
+ } = {},
+ ) {
+ this.variableStack = [];
+ this.globalScope = globalScope;
+ this.mode = mode;
+ this.globalObjectNames = globalObjectNames.slice(0);
+ }
+
+ /**
+ * Iterate the references of global variables.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateGlobalReferences(traceMap) {
+ for (const key of Object.keys(traceMap)) {
+ const nextTraceMap = traceMap[key];
+ const path = [key];
+ const variable = this.globalScope.set.get(key);
+
+ if (isModifiedGlobal(variable)) {
+ continue
+ }
+
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ nextTraceMap,
+ true,
+ );
+ }
+
+ for (const key of this.globalObjectNames) {
+ const path = [];
+ const variable = this.globalScope.set.get(key);
+
+ if (isModifiedGlobal(variable)) {
+ continue
+ }
+
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ traceMap,
+ false,
+ );
+ }
+ }
+
+ /**
+ * Iterate the references of CommonJS modules.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateCjsReferences(traceMap) {
+ for (const { node } of this.iterateGlobalReferences(requireCall)) {
+ const key = getStringIfConstant(node.arguments[0]);
+ if (key == null || !has(traceMap, key)) {
+ continue
+ }
+
+ const nextTraceMap = traceMap[key];
+ const path = [key];
+
+ if (nextTraceMap[READ]) {
+ yield {
+ node,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iteratePropertyReferences(node, path, nextTraceMap);
+ }
+ }
+
+ /**
+ * Iterate the references of ES modules.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *iterateEsmReferences(traceMap) {
+ const programNode = this.globalScope.block;
+
+ for (const node of programNode.body) {
+ if (!IMPORT_TYPE.test(node.type) || node.source == null) {
+ continue
+ }
+ const moduleId = node.source.value;
+
+ if (!has(traceMap, moduleId)) {
+ continue
+ }
+ const nextTraceMap = traceMap[moduleId];
+ const path = [moduleId];
+
+ if (nextTraceMap[READ]) {
+ yield { node, path, type: READ, info: nextTraceMap[READ] };
+ }
+
+ if (node.type === "ExportAllDeclaration") {
+ for (const key of Object.keys(nextTraceMap)) {
+ const exportTraceMap = nextTraceMap[key];
+ if (exportTraceMap[READ]) {
+ yield {
+ node,
+ path: path.concat(key),
+ type: READ,
+ info: exportTraceMap[READ],
+ };
+ }
+ }
+ } else {
+ for (const specifier of node.specifiers) {
+ const esm = has(nextTraceMap, ESM);
+ const it = this._iterateImportReferences(
+ specifier,
+ path,
+ esm
+ ? nextTraceMap
+ : this.mode === "legacy"
+ ? { default: nextTraceMap, ...nextTraceMap }
+ : { default: nextTraceMap },
+ );
+
+ if (esm) {
+ yield* it;
+ } else {
+ for (const report of it) {
+ report.path = report.path.filter(exceptDefault);
+ if (
+ report.path.length >= 2 ||
+ report.type !== READ
+ ) {
+ yield report;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Iterate the references for a given variable.
+ * @param {Variable} variable The variable to iterate that references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @param {boolean} shouldReport = The flag to report those references.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateVariableReferences(variable, path, traceMap, shouldReport) {
+ if (this.variableStack.includes(variable)) {
+ return
+ }
+ this.variableStack.push(variable);
+ try {
+ for (const reference of variable.references) {
+ if (!reference.isRead()) {
+ continue
+ }
+ const node = reference.identifier;
+
+ if (shouldReport && traceMap[READ]) {
+ yield { node, path, type: READ, info: traceMap[READ] };
+ }
+ yield* this._iteratePropertyReferences(node, path, traceMap);
+ }
+ } finally {
+ this.variableStack.pop();
+ }
+ }
+
+ /**
+ * Iterate the references for a given AST node.
+ * @param rootNode The AST node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ //eslint-disable-next-line complexity
+ *_iteratePropertyReferences(rootNode, path, traceMap) {
+ let node = rootNode;
+ while (isPassThrough(node)) {
+ node = node.parent;
+ }
+
+ const parent = node.parent;
+ if (parent.type === "MemberExpression") {
+ if (parent.object === node) {
+ const key = getPropertyName(parent);
+ if (key == null || !has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: parent,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iteratePropertyReferences(
+ parent,
+ path,
+ nextTraceMap,
+ );
+ }
+ return
+ }
+ if (parent.type === "CallExpression") {
+ if (parent.callee === node && traceMap[CALL]) {
+ yield { node: parent, path, type: CALL, info: traceMap[CALL] };
+ }
+ return
+ }
+ if (parent.type === "NewExpression") {
+ if (parent.callee === node && traceMap[CONSTRUCT]) {
+ yield {
+ node: parent,
+ path,
+ type: CONSTRUCT,
+ info: traceMap[CONSTRUCT],
+ };
+ }
+ return
+ }
+ if (parent.type === "AssignmentExpression") {
+ if (parent.right === node) {
+ yield* this._iterateLhsReferences(parent.left, path, traceMap);
+ yield* this._iteratePropertyReferences(parent, path, traceMap);
+ }
+ return
+ }
+ if (parent.type === "AssignmentPattern") {
+ if (parent.right === node) {
+ yield* this._iterateLhsReferences(parent.left, path, traceMap);
+ }
+ return
+ }
+ if (parent.type === "VariableDeclarator") {
+ if (parent.init === node) {
+ yield* this._iterateLhsReferences(parent.id, path, traceMap);
+ }
+ }
+ }
+
+ /**
+ * Iterate the references for a given Pattern node.
+ * @param {Node} patternNode The Pattern node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateLhsReferences(patternNode, path, traceMap) {
+ if (patternNode.type === "Identifier") {
+ const variable = findVariable(this.globalScope, patternNode);
+ if (variable != null) {
+ yield* this._iterateVariableReferences(
+ variable,
+ path,
+ traceMap,
+ false,
+ );
+ }
+ return
+ }
+ if (patternNode.type === "ObjectPattern") {
+ for (const property of patternNode.properties) {
+ const key = getPropertyName(property);
+
+ if (key == null || !has(traceMap, key)) {
+ continue
+ }
+
+ const nextPath = path.concat(key);
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: property,
+ path: nextPath,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iterateLhsReferences(
+ property.value,
+ nextPath,
+ nextTraceMap,
+ );
+ }
+ return
+ }
+ if (patternNode.type === "AssignmentPattern") {
+ yield* this._iterateLhsReferences(patternNode.left, path, traceMap);
+ }
+ }
+
+ /**
+ * Iterate the references for a given ModuleSpecifier node.
+ * @param {Node} specifierNode The ModuleSpecifier node to iterate references.
+ * @param {string[]} path The current path.
+ * @param {object} traceMap The trace map.
+ * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
+ */
+ *_iterateImportReferences(specifierNode, path, traceMap) {
+ const type = specifierNode.type;
+
+ if (type === "ImportSpecifier" || type === "ImportDefaultSpecifier") {
+ const key =
+ type === "ImportDefaultSpecifier"
+ ? "default"
+ : specifierNode.imported.name;
+ if (!has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: specifierNode,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ yield* this._iterateVariableReferences(
+ findVariable(this.globalScope, specifierNode.local),
+ path,
+ nextTraceMap,
+ false,
+ );
+
+ return
+ }
+
+ if (type === "ImportNamespaceSpecifier") {
+ yield* this._iterateVariableReferences(
+ findVariable(this.globalScope, specifierNode.local),
+ path,
+ traceMap,
+ false,
+ );
+ return
+ }
+
+ if (type === "ExportSpecifier") {
+ const key = specifierNode.local.name;
+ if (!has(traceMap, key)) {
+ return
+ }
+
+ path = path.concat(key); //eslint-disable-line no-param-reassign
+ const nextTraceMap = traceMap[key];
+ if (nextTraceMap[READ]) {
+ yield {
+ node: specifierNode,
+ path,
+ type: READ,
+ info: nextTraceMap[READ],
+ };
+ }
+ }
+ }
+}
+
+ReferenceTracker.READ = READ;
+ReferenceTracker.CALL = CALL;
+ReferenceTracker.CONSTRUCT = CONSTRUCT;
+ReferenceTracker.ESM = ESM;
+
+/**
+ * This is a predicate function for Array#filter.
+ * @param {string} name A name part.
+ * @param {number} index The index of the name.
+ * @returns {boolean} `false` if it's default.
+ */
+function exceptDefault(name, index) {
+ return !(index === 1 && name === "default")
+}
+
+var index = {
+ CALL,
+ CONSTRUCT,
+ ESM,
+ findVariable,
+ getFunctionHeadLocation,
+ getFunctionNameWithKind,
+ getInnermostScope,
+ getPropertyName,
+ getStaticValue,
+ getStringIfConstant,
+ hasSideEffect,
+ isArrowToken,
+ isClosingBraceToken,
+ isClosingBracketToken,
+ isClosingParenToken,
+ isColonToken,
+ isCommaToken,
+ isCommentToken,
+ isNotArrowToken,
+ isNotClosingBraceToken,
+ isNotClosingBracketToken,
+ isNotClosingParenToken,
+ isNotColonToken,
+ isNotCommaToken,
+ isNotCommentToken,
+ isNotOpeningBraceToken,
+ isNotOpeningBracketToken,
+ isNotOpeningParenToken,
+ isNotSemicolonToken,
+ isOpeningBraceToken,
+ isOpeningBracketToken,
+ isOpeningParenToken,
+ isParenthesized,
+ isSemicolonToken,
+ PatternMatcher,
+ READ,
+ ReferenceTracker,
+};
+
+export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, index as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken };
+//# sourceMappingURL=index.mjs.map
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs.map b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs.map
new file mode 100644
index 0000000..24ffb8e
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @param {Token} token - The token to check.\n * @param {string} value - The value to check.\n * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n ...Object.getOwnPropertyNames(Math)\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {import(\"eslint\").Scope.Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: left.value ** right.value }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" ||\n isEffectivelyConst(variable)) &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (!isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(property.value)\n ) {\n return { value: object.value[property.value] }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (nameNode.bigint) {\n return { value: nameNode.bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = node.parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {},\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {},\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;AAClC;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;AAChD;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAAK,QAAQ,KAAK,CAAC;AACnB;AACA,IAAI,OAAO,KAAK;AAChB;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU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;AACvB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;"}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/package.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/package.json
new file mode 100644
index 0000000..93ee30a
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/eslint-utils/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "@eslint-community/eslint-utils@^4.2.0",
+ "_id": "@eslint-community/eslint-utils@4.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "_location": "/@eslint-community/eslint-utils",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@eslint-community/eslint-utils@^4.2.0",
+ "name": "@eslint-community/eslint-utils",
+ "escapedName": "@eslint-community%2feslint-utils",
+ "scope": "@eslint-community",
+ "rawSpec": "^4.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.2.0"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "_shasum": "a23514e8fb9af1269d5f7788aa556798d61c6b59",
+ "_spec": "@eslint-community/eslint-utils@^4.2.0",
+ "_where": "C:\\Users\\Lenovo\\AppData\\Local\\Temp\\HBuilder X-P1XkOA\\uni-id-co\\node_modules\\eslint",
+ "author": {
+ "name": "Toru Nagashima"
+ },
+ "bugs": {
+ "url": "https://github.com/eslint-community/eslint-utils/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "deprecated": false,
+ "description": "Utilities for ESLint plugins.",
+ "devDependencies": {
+ "@eslint-community/eslint-plugin-mysticatea": "^15.2.0",
+ "c8": "^7.12.0",
+ "dot-prop": "^6.0.1",
+ "eslint": "^8.28.0",
+ "mocha": "^9.2.2",
+ "npm-run-all": "^4.1.5",
+ "opener": "^1.5.2",
+ "prettier": "2.8.4",
+ "rimraf": "^3.0.2",
+ "rollup": "^2.79.1",
+ "rollup-plugin-sourcemaps": "^0.6.3",
+ "semver": "^7.3.8",
+ "vitepress": "^1.0.0-alpha.40",
+ "warun": "^1.0.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "exports": {
+ ".": {
+ "import": "./index.mjs",
+ "require": "./index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "index.*"
+ ],
+ "homepage": "https://github.com/eslint-community/eslint-utils#readme",
+ "keywords": [
+ "eslint"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "module": "index.mjs",
+ "name": "@eslint-community/eslint-utils",
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint-community/eslint-utils.git"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "clean": "rimraf .nyc_output coverage index.*",
+ "coverage": "opener ./coverage/lcov-report/index.html",
+ "docs:build": "vitepress build docs",
+ "docs:watch": "vitepress dev docs",
+ "format": "npm run -s format:prettier -- --write",
+ "format:check": "npm run -s format:prettier -- --check",
+ "format:prettier": "prettier .",
+ "lint": "eslint .",
+ "postversion": "git push && git push --tags",
+ "prebuild": "npm run -s clean",
+ "preversion": "npm test && npm run -s build",
+ "prewatch": "npm run -s clean",
+ "test": "c8 mocha --reporter dot \"test/*.mjs\"",
+ "watch": "warun \"{src,test}/**/*.mjs\" -- npm run -s test:mocha"
+ },
+ "sideEffects": false,
+ "version": "4.4.0"
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/LICENSE b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/LICENSE
new file mode 100644
index 0000000..883ee1f
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Toru Nagashima
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/README.md b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/README.md
new file mode 100644
index 0000000..9728af5
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/README.md
@@ -0,0 +1,177 @@
+# @eslint-community/regexpp
+
+[![npm version](https://img.shields.io/npm/v/@eslint-community/regexpp.svg)](https://www.npmjs.com/package/@eslint-community/regexpp)
+[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/regexpp.svg)](http://www.npmtrends.com/@eslint-community/regexpp)
+[![Build Status](https://github.com/eslint-community/regexpp/workflows/CI/badge.svg)](https://github.com/eslint-community/regexpp/actions)
+[![codecov](https://codecov.io/gh/eslint-community/regexpp/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/regexpp)
+
+A regular expression parser for ECMAScript.
+
+## 💿 Installation
+
+```bash
+$ npm install @eslint-community/regexpp
+```
+
+- require Node@^12.0.0 || ^14.0.0 || >=16.0.0.
+
+## 📖 Usage
+
+```ts
+import {
+ AST,
+ RegExpParser,
+ RegExpValidator,
+ RegExpVisitor,
+ parseRegExpLiteral,
+ validateRegExpLiteral,
+ visitRegExpAST
+} from "@eslint-community/regexpp"
+```
+
+### parseRegExpLiteral(source, options?)
+
+Parse a given regular expression literal then make AST object.
+
+This is equivalent to `new RegExpParser(options).parseLiteral(source)`.
+
+- **Parameters:**
+ - `source` (`string | RegExp`) The source code to parse.
+ - `options?` ([`RegExpParser.Options`]) The options to parse.
+- **Return:**
+ - The AST of the regular expression.
+
+### validateRegExpLiteral(source, options?)
+
+Validate a given regular expression literal.
+
+This is equivalent to `new RegExpValidator(options).validateLiteral(source)`.
+
+- **Parameters:**
+ - `source` (`string`) The source code to validate.
+ - `options?` ([`RegExpValidator.Options`]) The options to validate.
+
+### visitRegExpAST(ast, handlers)
+
+Visit each node of a given AST.
+
+This is equivalent to `new RegExpVisitor(handlers).visit(ast)`.
+
+- **Parameters:**
+ - `ast` ([`AST.Node`]) The AST to visit.
+ - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
+
+### RegExpParser
+
+#### new RegExpParser(options?)
+
+- **Parameters:**
+ - `options?` ([`RegExpParser.Options`]) The options to parse.
+
+#### parser.parseLiteral(source, start?, end?)
+
+Parse a regular expression literal.
+
+- **Parameters:**
+ - `source` (`string`) The source code to parse. E.g. `"/abc/g"`.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+- **Return:**
+ - The AST of the regular expression.
+
+#### parser.parsePattern(source, start?, end?, flags?)
+
+Parse a regular expression pattern.
+
+- **Parameters:**
+ - `source` (`string`) The source code to parse. E.g. `"abc"`.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+ - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode.
+- **Return:**
+ - The AST of the regular expression pattern.
+
+#### parser.parseFlags(source, start?, end?)
+
+Parse a regular expression flags.
+
+- **Parameters:**
+ - `source` (`string`) The source code to parse. E.g. `"gim"`.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+- **Return:**
+ - The AST of the regular expression flags.
+
+### RegExpValidator
+
+#### new RegExpValidator(options)
+
+- **Parameters:**
+ - `options` ([`RegExpValidator.Options`]) The options to validate.
+
+#### validator.validateLiteral(source, start, end)
+
+Validate a regular expression literal.
+
+- **Parameters:**
+ - `source` (`string`) The source code to validate.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+
+#### validator.validatePattern(source, start, end, flags)
+
+Validate a regular expression pattern.
+
+- **Parameters:**
+ - `source` (`string`) The source code to validate.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+ - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode.
+
+#### validator.validateFlags(source, start, end)
+
+Validate a regular expression flags.
+
+- **Parameters:**
+ - `source` (`string`) The source code to validate.
+ - `start?` (`number`) The start index in the source code. Default is `0`.
+ - `end?` (`number`) The end index in the source code. Default is `source.length`.
+
+### RegExpVisitor
+
+#### new RegExpVisitor(handlers)
+
+- **Parameters:**
+ - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
+
+#### visitor.visit(ast)
+
+Validate a regular expression literal.
+
+- **Parameters:**
+ - `ast` ([`AST.Node`]) The AST to visit.
+
+## 📰 Changelog
+
+- [GitHub Releases](https://github.com/eslint-community/regexpp/releases)
+
+## 🍻 Contributing
+
+Welcome contributing!
+
+Please use GitHub's Issues/PRs.
+
+### Development Tools
+
+- `npm test` runs tests and measures coverage.
+- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`.
+- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`.
+- `npm run lint` runs ESLint.
+- `npm run update:test` updates test fixtures.
+- `npm run update:ids` updates `src/unicode/ids.ts`.
+- `npm run watch` runs tests with `--watch` option.
+
+[`AST.Node`]: src/ast.ts#L4
+[`RegExpParser.Options`]: src/parser.ts#L743
+[`RegExpValidator.Options`]: src/validator.ts#L220
+[`RegExpVisitor.Handlers`]: src/visitor.ts#L291
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.d.ts b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.d.ts
new file mode 100644
index 0000000..7ce7edb
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.d.ts
@@ -0,0 +1,1044 @@
+// Generated by dts-bundle v0.7.3
+
+declare module "@eslint-community/regexpp" {
+ import * as AST from "@eslint-community/regexpp/ast";
+ import { RegExpParser } from "@eslint-community/regexpp/parser";
+ import { RegExpValidator } from "@eslint-community/regexpp/validator";
+ import { RegExpVisitor } from "@eslint-community/regexpp/visitor";
+ export { AST, RegExpParser, RegExpValidator };
+ /**
+ * Parse a given regular expression literal then make AST object.
+ * @param source The source code to parse.
+ * @param options The options to parse.
+ * @returns The AST of the regular expression.
+ */
+ export function parseRegExpLiteral(
+ source: RegExp | string,
+ options?: RegExpParser.Options
+ ): AST.RegExpLiteral;
+ /**
+ * Validate a given regular expression literal.
+ * @param source The source code to validate.
+ * @param options The options to validate.
+ */
+ export function validateRegExpLiteral(
+ source: string,
+ options?: RegExpValidator.Options
+ ): void;
+ export function visitRegExpAST(
+ node: AST.Node,
+ handlers: RegExpVisitor.Handlers
+ ): void;
+}
+
+declare module "@eslint-community/regexpp/ast" {
+ /**
+ * The type which includes all nodes.
+ */
+ export type Node = BranchNode | LeafNode;
+ /**
+ * The type which includes all branch nodes.
+ */
+ export type BranchNode =
+ | Alternative
+ | CapturingGroup
+ | CharacterClass
+ | CharacterClassRange
+ | ClassIntersection
+ | ClassStringDisjunction
+ | ClassSubtraction
+ | ExpressionCharacterClass
+ | Group
+ | LookaroundAssertion
+ | Pattern
+ | Quantifier
+ | RegExpLiteral
+ | StringAlternative;
+ /**
+ * The type which includes all leaf nodes.
+ */
+ export type LeafNode =
+ | Backreference
+ | BoundaryAssertion
+ | Character
+ | CharacterSet
+ | Flags;
+ /**
+ * The type which includes all atom nodes.
+ */
+ export type Element = Assertion | QuantifiableElement | Quantifier;
+ /**
+ * The type which includes all atom nodes that Quantifier node can have as children.
+ */
+ export type QuantifiableElement =
+ | Backreference
+ | CapturingGroup
+ | Character
+ | CharacterClass
+ | CharacterSet
+ | ExpressionCharacterClass
+ | Group
+ | LookaheadAssertion;
+ /**
+ * The type which includes all character class atom nodes.
+ */
+ export type CharacterClassElement =
+ | ClassRangesCharacterClassElement
+ | UnicodeSetsCharacterClassElement;
+ export type ClassRangesCharacterClassElement =
+ | Character
+ | CharacterClassRange
+ | CharacterUnicodePropertyCharacterSet
+ | EscapeCharacterSet;
+ export type UnicodeSetsCharacterClassElement =
+ | Character
+ | CharacterClassRange
+ | ClassStringDisjunction
+ | EscapeCharacterSet
+ | ExpressionCharacterClass
+ | UnicodePropertyCharacterSet
+ | UnicodeSetsCharacterClass;
+ /**
+ * The type which defines common properties for all node types.
+ */
+ export interface NodeBase {
+ /** The node type. */
+ type: Node["type"];
+ /** The parent node. */
+ parent: Node["parent"];
+ /** The 0-based index that this node starts. */
+ start: number;
+ /** The 0-based index that this node ends. */
+ end: number;
+ /** The raw text of this node. */
+ raw: string;
+ }
+ /**
+ * The root node.
+ */
+ export interface RegExpLiteral extends NodeBase {
+ type: "RegExpLiteral";
+ parent: null;
+ pattern: Pattern;
+ flags: Flags;
+ }
+ /**
+ * The pattern.
+ */
+ export interface Pattern extends NodeBase {
+ type: "Pattern";
+ parent: RegExpLiteral | null;
+ alternatives: Alternative[];
+ }
+ /**
+ * The alternative.
+ * E.g. `a|b`
+ */
+ export interface Alternative extends NodeBase {
+ type: "Alternative";
+ parent: CapturingGroup | Group | LookaroundAssertion | Pattern;
+ elements: Element[];
+ }
+ /**
+ * The uncapturing group.
+ * E.g. `(?:ab)`
+ */
+ export interface Group extends NodeBase {
+ type: "Group";
+ parent: Alternative | Quantifier;
+ alternatives: Alternative[];
+ }
+ /**
+ * The capturing group.
+ * E.g. `(ab)`, `(?ab)`
+ */
+ export interface CapturingGroup extends NodeBase {
+ type: "CapturingGroup";
+ parent: Alternative | Quantifier;
+ name: string | null;
+ alternatives: Alternative[];
+ references: Backreference[];
+ }
+ /**
+ * The lookaround assertion.
+ */
+ export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion;
+ /**
+ * The lookahead assertion.
+ * E.g. `(?=ab)`, `(?!ab)`
+ */
+ export interface LookaheadAssertion extends NodeBase {
+ type: "Assertion";
+ parent: Alternative | Quantifier;
+ kind: "lookahead";
+ negate: boolean;
+ alternatives: Alternative[];
+ }
+ /**
+ * The lookbehind assertion.
+ * E.g. `(?<=ab)`, `(?`
+ */
+ export interface Backreference extends NodeBase {
+ type: "Backreference";
+ parent: Alternative | Quantifier;
+ ref: number | string;
+ resolved: CapturingGroup;
+ }
+ /**
+ * The flags.
+ */
+ export interface Flags extends NodeBase {
+ type: "Flags";
+ parent: RegExpLiteral | null;
+ dotAll: boolean;
+ global: boolean;
+ hasIndices: boolean;
+ ignoreCase: boolean;
+ multiline: boolean;
+ sticky: boolean;
+ unicode: boolean;
+ unicodeSets: boolean;
+ }
+ export {};
+}
+
+declare module "@eslint-community/regexpp/parser" {
+ import type {
+ Flags,
+ RegExpLiteral,
+ Pattern,
+ } from "@eslint-community/regexpp/ast";
+ import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions";
+ export namespace RegExpParser {
+ /**
+ * The options for RegExpParser construction.
+ */
+ interface Options {
+ /**
+ * The flag to disable Annex B syntax. Default is `false`.
+ */
+ strict?: boolean;
+ /**
+ * ECMAScript version. Default is `2024`.
+ * - `2015` added `u` and `y` flags.
+ * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion,
+ * and Unicode Property Escape.
+ * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes.
+ * - `2022` added `d` flag.
+ * - `2023` added more valid Unicode Property Escapes.
+ * - `2024` added `v` flag.
+ */
+ ecmaVersion?: EcmaVersion;
+ }
+ }
+ export class RegExpParser {
+ /**
+ * Initialize this parser.
+ * @param options The options of parser.
+ */
+ constructor(options?: RegExpParser.Options);
+ /**
+ * Parse a regular expression literal. E.g. "/abc/g"
+ * @param source The source code to parse.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @returns The AST of the given regular expression.
+ */
+ parseLiteral(source: string, start?: number, end?: number): RegExpLiteral;
+ /**
+ * Parse a regular expression flags. E.g. "gim"
+ * @param source The source code to parse.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @returns The AST of the given flags.
+ */
+ parseFlags(source: string, start?: number, end?: number): Flags;
+ /**
+ * Parse a regular expression pattern. E.g. "abc"
+ * @param source The source code to parse.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @param flags The flags.
+ * @returns The AST of the given pattern.
+ */
+ parsePattern(
+ source: string,
+ start?: number,
+ end?: number,
+ flags?: {
+ unicode?: boolean;
+ unicodeSets?: boolean;
+ }
+ ): Pattern;
+ /**
+ * @deprecated Backward compatibility
+ * Use object `flags` instead of boolean `uFlag`.
+ *
+ * @param source The source code to parse.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @param uFlag The flag to set unicode mode.
+ * @returns The AST of the given pattern.
+ */
+ parsePattern(
+ source: string,
+ start?: number,
+ end?: number,
+ uFlag?: boolean
+ ): Pattern;
+ }
+}
+
+declare module "@eslint-community/regexpp/validator" {
+ import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions";
+ export type RegExpValidatorSourceContext = {
+ readonly source: string;
+ readonly start: number;
+ readonly end: number;
+ readonly kind: "flags" | "literal" | "pattern";
+ };
+ export namespace RegExpValidator {
+ /**
+ * The options for RegExpValidator construction.
+ */
+ interface Options {
+ /**
+ * The flag to disable Annex B syntax. Default is `false`.
+ */
+ strict?: boolean;
+ /**
+ * ECMAScript version. Default is `2024`.
+ * - `2015` added `u` and `y` flags.
+ * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion,
+ * and Unicode Property Escape.
+ * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes.
+ * - `2022` added `d` flag.
+ * - `2023` added more valid Unicode Property Escapes.
+ * - `2024` added `v` flag.
+ */
+ ecmaVersion?: EcmaVersion;
+ /**
+ * A function that is called when the validator entered a RegExp literal.
+ * @param start The 0-based index of the first character.
+ */
+ onLiteralEnter?: (start: number) => void;
+ /**
+ * A function that is called when the validator left a RegExp literal.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onLiteralLeave?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator found flags.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param flags.global `g` flag.
+ * @param flags.ignoreCase `i` flag.
+ * @param flags.multiline `m` flag.
+ * @param flags.unicode `u` flag.
+ * @param flags.sticky `y` flag.
+ * @param flags.dotAll `s` flag.
+ * @param flags.hasIndices `d` flag.
+ * @param flags.unicodeSets `v` flag.
+ */
+ onRegExpFlags?: (
+ start: number,
+ end: number,
+ flags: {
+ global: boolean;
+ ignoreCase: boolean;
+ multiline: boolean;
+ unicode: boolean;
+ sticky: boolean;
+ dotAll: boolean;
+ hasIndices: boolean;
+ unicodeSets: boolean;
+ }
+ ) => void;
+ /**
+ * A function that is called when the validator found flags.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param global `g` flag.
+ * @param ignoreCase `i` flag.
+ * @param multiline `m` flag.
+ * @param unicode `u` flag.
+ * @param sticky `y` flag.
+ * @param dotAll `s` flag.
+ * @param hasIndices `d` flag.
+ *
+ * @deprecated Use `onRegExpFlags` instead.
+ */
+ onFlags?: (
+ start: number,
+ end: number,
+ global: boolean,
+ ignoreCase: boolean,
+ multiline: boolean,
+ unicode: boolean,
+ sticky: boolean,
+ dotAll: boolean,
+ hasIndices: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator entered a pattern.
+ * @param start The 0-based index of the first character.
+ */
+ onPatternEnter?: (start: number) => void;
+ /**
+ * A function that is called when the validator left a pattern.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onPatternLeave?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator entered a disjunction.
+ * @param start The 0-based index of the first character.
+ */
+ onDisjunctionEnter?: (start: number) => void;
+ /**
+ * A function that is called when the validator left a disjunction.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onDisjunctionLeave?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator entered an alternative.
+ * @param start The 0-based index of the first character.
+ * @param index The 0-based index of alternatives in a disjunction.
+ */
+ onAlternativeEnter?: (start: number, index: number) => void;
+ /**
+ * A function that is called when the validator left an alternative.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param index The 0-based index of alternatives in a disjunction.
+ */
+ onAlternativeLeave?: (start: number, end: number, index: number) => void;
+ /**
+ * A function that is called when the validator entered an uncapturing group.
+ * @param start The 0-based index of the first character.
+ */
+ onGroupEnter?: (start: number) => void;
+ /**
+ * A function that is called when the validator left an uncapturing group.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onGroupLeave?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator entered a capturing group.
+ * @param start The 0-based index of the first character.
+ * @param name The group name.
+ */
+ onCapturingGroupEnter?: (start: number, name: string | null) => void;
+ /**
+ * A function that is called when the validator left a capturing group.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param name The group name.
+ */
+ onCapturingGroupLeave?: (
+ start: number,
+ end: number,
+ name: string | null
+ ) => void;
+ /**
+ * A function that is called when the validator found a quantifier.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param min The minimum number of repeating.
+ * @param max The maximum number of repeating.
+ * @param greedy The flag to choose the longest matching.
+ */
+ onQuantifier?: (
+ start: number,
+ end: number,
+ min: number,
+ max: number,
+ greedy: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator entered a lookahead/lookbehind assertion.
+ * @param start The 0-based index of the first character.
+ * @param kind The kind of the assertion.
+ * @param negate The flag which represents that the assertion is negative.
+ */
+ onLookaroundAssertionEnter?: (
+ start: number,
+ kind: "lookahead" | "lookbehind",
+ negate: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator left a lookahead/lookbehind assertion.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the assertion.
+ * @param negate The flag which represents that the assertion is negative.
+ */
+ onLookaroundAssertionLeave?: (
+ start: number,
+ end: number,
+ kind: "lookahead" | "lookbehind",
+ negate: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator found an edge boundary assertion.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the assertion.
+ */
+ onEdgeAssertion?: (
+ start: number,
+ end: number,
+ kind: "end" | "start"
+ ) => void;
+ /**
+ * A function that is called when the validator found a word boundary assertion.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the assertion.
+ * @param negate The flag which represents that the assertion is negative.
+ */
+ onWordBoundaryAssertion?: (
+ start: number,
+ end: number,
+ kind: "word",
+ negate: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator found a dot.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the character set.
+ */
+ onAnyCharacterSet?: (start: number, end: number, kind: "any") => void;
+ /**
+ * A function that is called when the validator found a character set escape.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the character set.
+ * @param negate The flag which represents that the character set is negative.
+ */
+ onEscapeCharacterSet?: (
+ start: number,
+ end: number,
+ kind: "digit" | "space" | "word",
+ negate: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator found a Unicode proerty escape.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param kind The kind of the character set.
+ * @param key The property name.
+ * @param value The property value.
+ * @param negate The flag which represents that the character set is negative.
+ * @param strings If true, the given property is property of strings.
+ */
+ onUnicodePropertyCharacterSet?: (
+ start: number,
+ end: number,
+ kind: "property",
+ key: string,
+ value: string | null,
+ negate: boolean,
+ strings: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator found a character.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param value The code point of the character.
+ */
+ onCharacter?: (start: number, end: number, value: number) => void;
+ /**
+ * A function that is called when the validator found a backreference.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param ref The key of the referred capturing group.
+ */
+ onBackreference?: (
+ start: number,
+ end: number,
+ ref: number | string
+ ) => void;
+ /**
+ * A function that is called when the validator entered a character class.
+ * @param start The 0-based index of the first character.
+ * @param negate The flag which represents that the character class is negative.
+ * @param unicodeSets `true` if unicodeSets mode.
+ */
+ onCharacterClassEnter?: (
+ start: number,
+ negate: boolean,
+ unicodeSets: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator left a character class.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param negate The flag which represents that the character class is negative.
+ */
+ onCharacterClassLeave?: (
+ start: number,
+ end: number,
+ negate: boolean
+ ) => void;
+ /**
+ * A function that is called when the validator found a character class range.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param min The minimum code point of the range.
+ * @param max The maximum code point of the range.
+ */
+ onCharacterClassRange?: (
+ start: number,
+ end: number,
+ min: number,
+ max: number
+ ) => void;
+ /**
+ * A function that is called when the validator found a class intersection.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onClassIntersection?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator found a class subtraction.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onClassSubtraction?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator entered a class string disjunction.
+ * @param start The 0-based index of the first character.
+ */
+ onClassStringDisjunctionEnter?: (start: number) => void;
+ /**
+ * A function that is called when the validator left a class string disjunction.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ */
+ onClassStringDisjunctionLeave?: (start: number, end: number) => void;
+ /**
+ * A function that is called when the validator entered a string alternative.
+ * @param start The 0-based index of the first character.
+ * @param index The 0-based index of alternatives in a disjunction.
+ */
+ onStringAlternativeEnter?: (start: number, index: number) => void;
+ /**
+ * A function that is called when the validator left a string alternative.
+ * @param start The 0-based index of the first character.
+ * @param end The next 0-based index of the last character.
+ * @param index The 0-based index of alternatives in a disjunction.
+ */
+ onStringAlternativeLeave?: (
+ start: number,
+ end: number,
+ index: number
+ ) => void;
+ }
+ }
+ /**
+ * The regular expression validator.
+ */
+ export class RegExpValidator {
+ /**
+ * Initialize this validator.
+ * @param options The options of validator.
+ */
+ constructor(options?: RegExpValidator.Options);
+ /**
+ * Validate a regular expression literal. E.g. "/abc/g"
+ * @param source The source code to validate.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ */
+ validateLiteral(source: string, start?: number, end?: number): void;
+ /**
+ * Validate a regular expression flags. E.g. "gim"
+ * @param source The source code to validate.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ */
+ validateFlags(source: string, start?: number, end?: number): void;
+ /**
+ * Validate a regular expression pattern. E.g. "abc"
+ * @param source The source code to validate.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @param flags The flags.
+ */
+ validatePattern(
+ source: string,
+ start?: number,
+ end?: number,
+ flags?: {
+ unicode?: boolean;
+ unicodeSets?: boolean;
+ }
+ ): void;
+ /**
+ * @deprecated Backward compatibility
+ * Use object `flags` instead of boolean `uFlag`.
+ * @param source The source code to validate.
+ * @param start The start index in the source code.
+ * @param end The end index in the source code.
+ * @param uFlag The flag to set unicode mode.
+ */
+ validatePattern(
+ source: string,
+ start?: number,
+ end?: number,
+ uFlag?: boolean
+ ): void;
+ }
+}
+
+declare module "@eslint-community/regexpp/visitor" {
+ import type {
+ Alternative,
+ Assertion,
+ Backreference,
+ CapturingGroup,
+ Character,
+ CharacterClass,
+ CharacterClassRange,
+ CharacterSet,
+ ClassIntersection,
+ ClassStringDisjunction,
+ ClassSubtraction,
+ ExpressionCharacterClass,
+ Flags,
+ Group,
+ Node,
+ Pattern,
+ Quantifier,
+ RegExpLiteral,
+ StringAlternative,
+ } from "@eslint-community/regexpp/ast";
+ /**
+ * The visitor to walk on AST.
+ */
+ export class RegExpVisitor {
+ /**
+ * Initialize this visitor.
+ * @param handlers Callbacks for each node.
+ */
+ constructor(handlers: RegExpVisitor.Handlers);
+ /**
+ * Visit a given node and descendant nodes.
+ * @param node The root node to visit tree.
+ */
+ visit(node: Node): void;
+ }
+ export namespace RegExpVisitor {
+ interface Handlers {
+ onAlternativeEnter?: (node: Alternative) => void;
+ onAlternativeLeave?: (node: Alternative) => void;
+ onAssertionEnter?: (node: Assertion) => void;
+ onAssertionLeave?: (node: Assertion) => void;
+ onBackreferenceEnter?: (node: Backreference) => void;
+ onBackreferenceLeave?: (node: Backreference) => void;
+ onCapturingGroupEnter?: (node: CapturingGroup) => void;
+ onCapturingGroupLeave?: (node: CapturingGroup) => void;
+ onCharacterEnter?: (node: Character) => void;
+ onCharacterLeave?: (node: Character) => void;
+ onCharacterClassEnter?: (node: CharacterClass) => void;
+ onCharacterClassLeave?: (node: CharacterClass) => void;
+ onCharacterClassRangeEnter?: (node: CharacterClassRange) => void;
+ onCharacterClassRangeLeave?: (node: CharacterClassRange) => void;
+ onCharacterSetEnter?: (node: CharacterSet) => void;
+ onCharacterSetLeave?: (node: CharacterSet) => void;
+ onClassIntersectionEnter?: (node: ClassIntersection) => void;
+ onClassIntersectionLeave?: (node: ClassIntersection) => void;
+ onClassStringDisjunctionEnter?: (node: ClassStringDisjunction) => void;
+ onClassStringDisjunctionLeave?: (node: ClassStringDisjunction) => void;
+ onClassSubtractionEnter?: (node: ClassSubtraction) => void;
+ onClassSubtractionLeave?: (node: ClassSubtraction) => void;
+ onExpressionCharacterClassEnter?: (
+ node: ExpressionCharacterClass
+ ) => void;
+ onExpressionCharacterClassLeave?: (
+ node: ExpressionCharacterClass
+ ) => void;
+ onFlagsEnter?: (node: Flags) => void;
+ onFlagsLeave?: (node: Flags) => void;
+ onGroupEnter?: (node: Group) => void;
+ onGroupLeave?: (node: Group) => void;
+ onPatternEnter?: (node: Pattern) => void;
+ onPatternLeave?: (node: Pattern) => void;
+ onQuantifierEnter?: (node: Quantifier) => void;
+ onQuantifierLeave?: (node: Quantifier) => void;
+ onRegExpLiteralEnter?: (node: RegExpLiteral) => void;
+ onRegExpLiteralLeave?: (node: RegExpLiteral) => void;
+ onStringAlternativeEnter?: (node: StringAlternative) => void;
+ onStringAlternativeLeave?: (node: StringAlternative) => void;
+ }
+ }
+}
+
+declare module "@eslint-community/regexpp/ecma-versions" {
+ export type EcmaVersion =
+ | 5
+ | 2015
+ | 2016
+ | 2017
+ | 2018
+ | 2019
+ | 2020
+ | 2021
+ | 2022
+ | 2023
+ | 2024;
+ export const latestEcmaVersion = 2024;
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js
new file mode 100644
index 0000000..28fa5a1
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js
@@ -0,0 +1,2752 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var ast = /*#__PURE__*/Object.freeze({
+ __proto__: null
+});
+
+const latestEcmaVersion = 2024;
+
+let largeIdStartRanges = undefined;
+let largeIdContinueRanges = undefined;
+function isIdStart(cp) {
+ if (cp < 0x41)
+ return false;
+ if (cp < 0x5b)
+ return true;
+ if (cp < 0x61)
+ return false;
+ if (cp < 0x7b)
+ return true;
+ return isLargeIdStart(cp);
+}
+function isIdContinue(cp) {
+ if (cp < 0x30)
+ return false;
+ if (cp < 0x3a)
+ return true;
+ if (cp < 0x41)
+ return false;
+ if (cp < 0x5b)
+ return true;
+ if (cp === 0x5f)
+ return true;
+ if (cp < 0x61)
+ return false;
+ if (cp < 0x7b)
+ return true;
+ return isLargeIdStart(cp) || isLargeIdContinue(cp);
+}
+function isLargeIdStart(cp) {
+ return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges()));
+}
+function isLargeIdContinue(cp) {
+ return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges()));
+}
+function initLargeIdStartRanges() {
+ return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk 2e8 f1 15v 3t6 6 38f");
+}
+function initLargeIdContinueRanges() {
+ return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2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5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n");
+}
+function isInRange(cp, ranges) {
+ let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0;
+ while (l < r) {
+ i = ((l + r) / 2) | 0;
+ min = ranges[2 * i];
+ max = ranges[2 * i + 1];
+ if (cp < min) {
+ r = i;
+ }
+ else if (cp > max) {
+ l = i + 1;
+ }
+ else {
+ return true;
+ }
+ }
+ return false;
+}
+function restoreRanges(data) {
+ let last = 0;
+ return data.split(" ").map((s) => (last += parseInt(s, 36) | 0));
+}
+
+class DataSet {
+ constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024) {
+ this._raw2018 = raw2018;
+ this._raw2019 = raw2019;
+ this._raw2020 = raw2020;
+ this._raw2021 = raw2021;
+ this._raw2022 = raw2022;
+ this._raw2023 = raw2023;
+ this._raw2024 = raw2024;
+ }
+ get es2018() {
+ var _a;
+ return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" "))));
+ }
+ get es2019() {
+ var _a;
+ return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" "))));
+ }
+ get es2020() {
+ var _a;
+ return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" "))));
+ }
+ get es2021() {
+ var _a;
+ return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" "))));
+ }
+ get es2022() {
+ var _a;
+ return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" "))));
+ }
+ get es2023() {
+ var _a;
+ return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" "))));
+ }
+ get es2024() {
+ var _a;
+ return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" "))));
+ }
+}
+const gcNameSet = new Set(["General_Category", "gc"]);
+const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]);
+const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "");
+const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz", "");
+const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "");
+function isValidUnicodeProperty(version, name, value) {
+ if (gcNameSet.has(name)) {
+ return version >= 2018 && gcValueSets.es2018.has(value);
+ }
+ if (scNameSet.has(name)) {
+ return ((version >= 2018 && scValueSets.es2018.has(value)) ||
+ (version >= 2019 && scValueSets.es2019.has(value)) ||
+ (version >= 2020 && scValueSets.es2020.has(value)) ||
+ (version >= 2021 && scValueSets.es2021.has(value)) ||
+ (version >= 2022 && scValueSets.es2022.has(value)) ||
+ (version >= 2023 && scValueSets.es2023.has(value)));
+ }
+ return false;
+}
+function isValidLoneUnicodeProperty(version, value) {
+ return ((version >= 2018 && binPropertySets.es2018.has(value)) ||
+ (version >= 2019 && binPropertySets.es2019.has(value)) ||
+ (version >= 2021 && binPropertySets.es2021.has(value)));
+}
+
+const BACKSPACE = 0x08;
+const CHARACTER_TABULATION = 0x09;
+const LINE_FEED = 0x0a;
+const LINE_TABULATION = 0x0b;
+const FORM_FEED = 0x0c;
+const CARRIAGE_RETURN = 0x0d;
+const EXCLAMATION_MARK = 0x21;
+const NUMBER_SIGN = 0x23;
+const DOLLAR_SIGN = 0x24;
+const PERCENT_SIGN = 0x25;
+const AMPERSAND = 0x26;
+const LEFT_PARENTHESIS = 0x28;
+const RIGHT_PARENTHESIS = 0x29;
+const ASTERISK = 0x2a;
+const PLUS_SIGN = 0x2b;
+const COMMA = 0x2c;
+const HYPHEN_MINUS = 0x2d;
+const FULL_STOP = 0x2e;
+const SOLIDUS = 0x2f;
+const DIGIT_ZERO = 0x30;
+const DIGIT_ONE = 0x31;
+const DIGIT_SEVEN = 0x37;
+const DIGIT_NINE = 0x39;
+const COLON = 0x3a;
+const SEMICOLON = 0x3b;
+const LESS_THAN_SIGN = 0x3c;
+const EQUALS_SIGN = 0x3d;
+const GREATER_THAN_SIGN = 0x3e;
+const QUESTION_MARK = 0x3f;
+const COMMERCIAL_AT = 0x40;
+const LATIN_CAPITAL_LETTER_A = 0x41;
+const LATIN_CAPITAL_LETTER_B = 0x42;
+const LATIN_CAPITAL_LETTER_D = 0x44;
+const LATIN_CAPITAL_LETTER_F = 0x46;
+const LATIN_CAPITAL_LETTER_P = 0x50;
+const LATIN_CAPITAL_LETTER_S = 0x53;
+const LATIN_CAPITAL_LETTER_W = 0x57;
+const LATIN_CAPITAL_LETTER_Z = 0x5a;
+const LOW_LINE = 0x5f;
+const LATIN_SMALL_LETTER_A = 0x61;
+const LATIN_SMALL_LETTER_B = 0x62;
+const LATIN_SMALL_LETTER_C = 0x63;
+const LATIN_SMALL_LETTER_D = 0x64;
+const LATIN_SMALL_LETTER_F = 0x66;
+const LATIN_SMALL_LETTER_G = 0x67;
+const LATIN_SMALL_LETTER_I = 0x69;
+const LATIN_SMALL_LETTER_K = 0x6b;
+const LATIN_SMALL_LETTER_M = 0x6d;
+const LATIN_SMALL_LETTER_N = 0x6e;
+const LATIN_SMALL_LETTER_P = 0x70;
+const LATIN_SMALL_LETTER_Q = 0x71;
+const LATIN_SMALL_LETTER_R = 0x72;
+const LATIN_SMALL_LETTER_S = 0x73;
+const LATIN_SMALL_LETTER_T = 0x74;
+const LATIN_SMALL_LETTER_U = 0x75;
+const LATIN_SMALL_LETTER_V = 0x76;
+const LATIN_SMALL_LETTER_W = 0x77;
+const LATIN_SMALL_LETTER_X = 0x78;
+const LATIN_SMALL_LETTER_Y = 0x79;
+const LATIN_SMALL_LETTER_Z = 0x7a;
+const LEFT_SQUARE_BRACKET = 0x5b;
+const REVERSE_SOLIDUS = 0x5c;
+const RIGHT_SQUARE_BRACKET = 0x5d;
+const CIRCUMFLEX_ACCENT = 0x5e;
+const GRAVE_ACCENT = 0x60;
+const LEFT_CURLY_BRACKET = 0x7b;
+const VERTICAL_LINE = 0x7c;
+const RIGHT_CURLY_BRACKET = 0x7d;
+const TILDE = 0x7e;
+const ZERO_WIDTH_NON_JOINER = 0x200c;
+const ZERO_WIDTH_JOINER = 0x200d;
+const LINE_SEPARATOR = 0x2028;
+const PARAGRAPH_SEPARATOR = 0x2029;
+const MIN_CODE_POINT = 0x00;
+const MAX_CODE_POINT = 0x10ffff;
+function isLatinLetter(code) {
+ return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) ||
+ (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z));
+}
+function isDecimalDigit(code) {
+ return code >= DIGIT_ZERO && code <= DIGIT_NINE;
+}
+function isOctalDigit(code) {
+ return code >= DIGIT_ZERO && code <= DIGIT_SEVEN;
+}
+function isHexDigit(code) {
+ return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) ||
+ (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) ||
+ (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F));
+}
+function isLineTerminator(code) {
+ return (code === LINE_FEED ||
+ code === CARRIAGE_RETURN ||
+ code === LINE_SEPARATOR ||
+ code === PARAGRAPH_SEPARATOR);
+}
+function isValidUnicode(code) {
+ return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT;
+}
+function digitToInt(code) {
+ if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) {
+ return code - LATIN_SMALL_LETTER_A + 10;
+ }
+ if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) {
+ return code - LATIN_CAPITAL_LETTER_A + 10;
+ }
+ return code - DIGIT_ZERO;
+}
+function isLeadSurrogate(code) {
+ return code >= 0xd800 && code <= 0xdbff;
+}
+function isTrailSurrogate(code) {
+ return code >= 0xdc00 && code <= 0xdfff;
+}
+function combineSurrogatePair(lead, trail) {
+ return (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000;
+}
+
+const legacyImpl = {
+ at(s, end, i) {
+ return i < end ? s.charCodeAt(i) : -1;
+ },
+ width(c) {
+ return 1;
+ },
+};
+const unicodeImpl = {
+ at(s, end, i) {
+ return i < end ? s.codePointAt(i) : -1;
+ },
+ width(c) {
+ return c > 0xffff ? 2 : 1;
+ },
+};
+class Reader {
+ constructor() {
+ this._impl = legacyImpl;
+ this._s = "";
+ this._i = 0;
+ this._end = 0;
+ this._cp1 = -1;
+ this._w1 = 1;
+ this._cp2 = -1;
+ this._w2 = 1;
+ this._cp3 = -1;
+ this._w3 = 1;
+ this._cp4 = -1;
+ }
+ get source() {
+ return this._s;
+ }
+ get index() {
+ return this._i;
+ }
+ get currentCodePoint() {
+ return this._cp1;
+ }
+ get nextCodePoint() {
+ return this._cp2;
+ }
+ get nextCodePoint2() {
+ return this._cp3;
+ }
+ get nextCodePoint3() {
+ return this._cp4;
+ }
+ reset(source, start, end, uFlag) {
+ this._impl = uFlag ? unicodeImpl : legacyImpl;
+ this._s = source;
+ this._end = end;
+ this.rewind(start);
+ }
+ rewind(index) {
+ const impl = this._impl;
+ this._i = index;
+ this._cp1 = impl.at(this._s, this._end, index);
+ this._w1 = impl.width(this._cp1);
+ this._cp2 = impl.at(this._s, this._end, index + this._w1);
+ this._w2 = impl.width(this._cp2);
+ this._cp3 = impl.at(this._s, this._end, index + this._w1 + this._w2);
+ this._w3 = impl.width(this._cp3);
+ this._cp4 = impl.at(this._s, this._end, index + this._w1 + this._w2 + this._w3);
+ }
+ advance() {
+ if (this._cp1 !== -1) {
+ const impl = this._impl;
+ this._i += this._w1;
+ this._cp1 = this._cp2;
+ this._w1 = this._w2;
+ this._cp2 = this._cp3;
+ this._w2 = impl.width(this._cp2);
+ this._cp3 = this._cp4;
+ this._w3 = impl.width(this._cp3);
+ this._cp4 = impl.at(this._s, this._end, this._i + this._w1 + this._w2 + this._w3);
+ }
+ }
+ eat(cp) {
+ if (this._cp1 === cp) {
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eat2(cp1, cp2) {
+ if (this._cp1 === cp1 && this._cp2 === cp2) {
+ this.advance();
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eat3(cp1, cp2, cp3) {
+ if (this._cp1 === cp1 && this._cp2 === cp2 && this._cp3 === cp3) {
+ this.advance();
+ this.advance();
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+}
+
+class RegExpSyntaxError extends SyntaxError {
+ constructor(srcCtx, flags, index, message) {
+ let source = "";
+ if (srcCtx.kind === "literal") {
+ const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end);
+ if (literal) {
+ source = `: ${literal}`;
+ }
+ }
+ else if (srcCtx.kind === "pattern") {
+ const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end);
+ const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`;
+ source = `: /${pattern}/${flagsText}`;
+ }
+ super(`Invalid regular expression${source}: ${message}`);
+ this.index = index;
+ }
+}
+
+const binPropertyOfStringSets = new Set([
+ "Basic_Emoji",
+ "Emoji_Keycap_Sequence",
+ "RGI_Emoji_Modifier_Sequence",
+ "RGI_Emoji_Flag_Sequence",
+ "RGI_Emoji_Tag_Sequence",
+ "RGI_Emoji_ZWJ_Sequence",
+ "RGI_Emoji",
+]);
+function isValidLoneUnicodePropertyOfString(version, value) {
+ return version >= 2024 && binPropertyOfStringSets.has(value);
+}
+
+const SYNTAX_CHARACTER = new Set([
+ CIRCUMFLEX_ACCENT,
+ DOLLAR_SIGN,
+ REVERSE_SOLIDUS,
+ FULL_STOP,
+ ASTERISK,
+ PLUS_SIGN,
+ QUESTION_MARK,
+ LEFT_PARENTHESIS,
+ RIGHT_PARENTHESIS,
+ LEFT_SQUARE_BRACKET,
+ RIGHT_SQUARE_BRACKET,
+ LEFT_CURLY_BRACKET,
+ RIGHT_CURLY_BRACKET,
+ VERTICAL_LINE,
+]);
+const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([
+ AMPERSAND,
+ EXCLAMATION_MARK,
+ NUMBER_SIGN,
+ DOLLAR_SIGN,
+ PERCENT_SIGN,
+ ASTERISK,
+ PLUS_SIGN,
+ COMMA,
+ FULL_STOP,
+ COLON,
+ SEMICOLON,
+ LESS_THAN_SIGN,
+ EQUALS_SIGN,
+ GREATER_THAN_SIGN,
+ QUESTION_MARK,
+ COMMERCIAL_AT,
+ CIRCUMFLEX_ACCENT,
+ GRAVE_ACCENT,
+ TILDE,
+]);
+const CLASS_SET_SYNTAX_CHARACTER = new Set([
+ LEFT_PARENTHESIS,
+ RIGHT_PARENTHESIS,
+ LEFT_SQUARE_BRACKET,
+ RIGHT_SQUARE_BRACKET,
+ LEFT_CURLY_BRACKET,
+ RIGHT_CURLY_BRACKET,
+ SOLIDUS,
+ HYPHEN_MINUS,
+ REVERSE_SOLIDUS,
+ VERTICAL_LINE,
+]);
+const CLASS_SET_RESERVED_PUNCTUATOR = new Set([
+ AMPERSAND,
+ HYPHEN_MINUS,
+ EXCLAMATION_MARK,
+ NUMBER_SIGN,
+ PERCENT_SIGN,
+ COMMA,
+ COLON,
+ SEMICOLON,
+ LESS_THAN_SIGN,
+ EQUALS_SIGN,
+ GREATER_THAN_SIGN,
+ COMMERCIAL_AT,
+ GRAVE_ACCENT,
+ TILDE,
+]);
+function isSyntaxCharacter(cp) {
+ return SYNTAX_CHARACTER.has(cp);
+}
+function isClassSetReservedDoublePunctuatorCharacter(cp) {
+ return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp);
+}
+function isClassSetSyntaxCharacter(cp) {
+ return CLASS_SET_SYNTAX_CHARACTER.has(cp);
+}
+function isClassSetReservedPunctuator(cp) {
+ return CLASS_SET_RESERVED_PUNCTUATOR.has(cp);
+}
+function isIdentifierStartChar(cp) {
+ return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE;
+}
+function isIdentifierPartChar(cp) {
+ return (isIdContinue(cp) ||
+ cp === DOLLAR_SIGN ||
+ cp === ZERO_WIDTH_NON_JOINER ||
+ cp === ZERO_WIDTH_JOINER);
+}
+function isUnicodePropertyNameCharacter(cp) {
+ return isLatinLetter(cp) || cp === LOW_LINE;
+}
+function isUnicodePropertyValueCharacter(cp) {
+ return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp);
+}
+class RegExpValidator {
+ constructor(options) {
+ this._reader = new Reader();
+ this._unicodeMode = false;
+ this._unicodeSetsMode = false;
+ this._nFlag = false;
+ this._lastIntValue = 0;
+ this._lastRange = {
+ min: 0,
+ max: Number.POSITIVE_INFINITY,
+ };
+ this._lastStrValue = "";
+ this._lastAssertionIsQuantifiable = false;
+ this._numCapturingParens = 0;
+ this._groupNames = new Set();
+ this._backreferenceNames = new Set();
+ this._srcCtx = null;
+ this._options = options !== null && options !== void 0 ? options : {};
+ }
+ validateLiteral(source, start = 0, end = source.length) {
+ this._srcCtx = { source, start, end, kind: "literal" };
+ this._unicodeSetsMode = this._unicodeMode = this._nFlag = false;
+ this.reset(source, start, end);
+ this.onLiteralEnter(start);
+ if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) {
+ const flagStart = this.index;
+ const unicode = source.includes("u", flagStart);
+ const unicodeSets = source.includes("v", flagStart);
+ this.validateFlagsInternal(source, flagStart, end);
+ this.validatePatternInternal(source, start + 1, flagStart - 1, {
+ unicode,
+ unicodeSets,
+ });
+ }
+ else if (start >= end) {
+ this.raise("Empty");
+ }
+ else {
+ const c = String.fromCodePoint(this.currentCodePoint);
+ this.raise(`Unexpected character '${c}'`);
+ }
+ this.onLiteralLeave(start, end);
+ }
+ validateFlags(source, start = 0, end = source.length) {
+ this._srcCtx = { source, start, end, kind: "flags" };
+ this.validateFlagsInternal(source, start, end);
+ }
+ validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ this._srcCtx = { source, start, end, kind: "pattern" };
+ this.validatePatternInternal(source, start, end, uFlagOrFlags);
+ }
+ validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end);
+ this._unicodeMode = mode.unicodeMode;
+ this._nFlag = mode.nFlag;
+ this._unicodeSetsMode = mode.unicodeSetsMode;
+ this.reset(source, start, end);
+ this.consumePattern();
+ if (!this._nFlag &&
+ this.ecmaVersion >= 2018 &&
+ this._groupNames.size > 0) {
+ this._nFlag = true;
+ this.rewind(start);
+ this.consumePattern();
+ }
+ }
+ validateFlagsInternal(source, start, end) {
+ const existingFlags = new Set();
+ let global = false;
+ let ignoreCase = false;
+ let multiline = false;
+ let sticky = false;
+ let unicode = false;
+ let dotAll = false;
+ let hasIndices = false;
+ let unicodeSets = false;
+ for (let i = start; i < end; ++i) {
+ const flag = source.charCodeAt(i);
+ if (existingFlags.has(flag)) {
+ this.raise(`Duplicated flag '${source[i]}'`, { index: start });
+ }
+ existingFlags.add(flag);
+ if (flag === LATIN_SMALL_LETTER_G) {
+ global = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_I) {
+ ignoreCase = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_M) {
+ multiline = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_U &&
+ this.ecmaVersion >= 2015) {
+ unicode = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_Y &&
+ this.ecmaVersion >= 2015) {
+ sticky = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_S &&
+ this.ecmaVersion >= 2018) {
+ dotAll = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_D &&
+ this.ecmaVersion >= 2022) {
+ hasIndices = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_V &&
+ this.ecmaVersion >= 2024) {
+ unicodeSets = true;
+ }
+ else {
+ this.raise(`Invalid flag '${source[i]}'`, { index: start });
+ }
+ }
+ this.onRegExpFlags(start, end, {
+ global,
+ ignoreCase,
+ multiline,
+ unicode,
+ sticky,
+ dotAll,
+ hasIndices,
+ unicodeSets,
+ });
+ }
+ _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) {
+ let unicode = false;
+ let unicodeSets = false;
+ if (uFlagOrFlags && this.ecmaVersion >= 2015) {
+ if (typeof uFlagOrFlags === "object") {
+ unicode = Boolean(uFlagOrFlags.unicode);
+ if (this.ecmaVersion >= 2024) {
+ unicodeSets = Boolean(uFlagOrFlags.unicodeSets);
+ }
+ }
+ else {
+ unicode = uFlagOrFlags;
+ }
+ }
+ if (unicode && unicodeSets) {
+ this.raise("Invalid regular expression flags", {
+ index: sourceEnd + 1,
+ unicode,
+ unicodeSets,
+ });
+ }
+ const unicodeMode = unicode || unicodeSets;
+ const nFlag = (unicode && this.ecmaVersion >= 2018) ||
+ unicodeSets ||
+ Boolean(this._options.strict && this.ecmaVersion >= 2023);
+ const unicodeSetsMode = unicodeSets;
+ return { unicodeMode, nFlag, unicodeSetsMode };
+ }
+ get strict() {
+ return Boolean(this._options.strict) || this._unicodeMode;
+ }
+ get ecmaVersion() {
+ var _a;
+ return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion;
+ }
+ onLiteralEnter(start) {
+ if (this._options.onLiteralEnter) {
+ this._options.onLiteralEnter(start);
+ }
+ }
+ onLiteralLeave(start, end) {
+ if (this._options.onLiteralLeave) {
+ this._options.onLiteralLeave(start, end);
+ }
+ }
+ onRegExpFlags(start, end, flags) {
+ if (this._options.onRegExpFlags) {
+ this._options.onRegExpFlags(start, end, flags);
+ }
+ if (this._options.onFlags) {
+ this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices);
+ }
+ }
+ onPatternEnter(start) {
+ if (this._options.onPatternEnter) {
+ this._options.onPatternEnter(start);
+ }
+ }
+ onPatternLeave(start, end) {
+ if (this._options.onPatternLeave) {
+ this._options.onPatternLeave(start, end);
+ }
+ }
+ onDisjunctionEnter(start) {
+ if (this._options.onDisjunctionEnter) {
+ this._options.onDisjunctionEnter(start);
+ }
+ }
+ onDisjunctionLeave(start, end) {
+ if (this._options.onDisjunctionLeave) {
+ this._options.onDisjunctionLeave(start, end);
+ }
+ }
+ onAlternativeEnter(start, index) {
+ if (this._options.onAlternativeEnter) {
+ this._options.onAlternativeEnter(start, index);
+ }
+ }
+ onAlternativeLeave(start, end, index) {
+ if (this._options.onAlternativeLeave) {
+ this._options.onAlternativeLeave(start, end, index);
+ }
+ }
+ onGroupEnter(start) {
+ if (this._options.onGroupEnter) {
+ this._options.onGroupEnter(start);
+ }
+ }
+ onGroupLeave(start, end) {
+ if (this._options.onGroupLeave) {
+ this._options.onGroupLeave(start, end);
+ }
+ }
+ onCapturingGroupEnter(start, name) {
+ if (this._options.onCapturingGroupEnter) {
+ this._options.onCapturingGroupEnter(start, name);
+ }
+ }
+ onCapturingGroupLeave(start, end, name) {
+ if (this._options.onCapturingGroupLeave) {
+ this._options.onCapturingGroupLeave(start, end, name);
+ }
+ }
+ onQuantifier(start, end, min, max, greedy) {
+ if (this._options.onQuantifier) {
+ this._options.onQuantifier(start, end, min, max, greedy);
+ }
+ }
+ onLookaroundAssertionEnter(start, kind, negate) {
+ if (this._options.onLookaroundAssertionEnter) {
+ this._options.onLookaroundAssertionEnter(start, kind, negate);
+ }
+ }
+ onLookaroundAssertionLeave(start, end, kind, negate) {
+ if (this._options.onLookaroundAssertionLeave) {
+ this._options.onLookaroundAssertionLeave(start, end, kind, negate);
+ }
+ }
+ onEdgeAssertion(start, end, kind) {
+ if (this._options.onEdgeAssertion) {
+ this._options.onEdgeAssertion(start, end, kind);
+ }
+ }
+ onWordBoundaryAssertion(start, end, kind, negate) {
+ if (this._options.onWordBoundaryAssertion) {
+ this._options.onWordBoundaryAssertion(start, end, kind, negate);
+ }
+ }
+ onAnyCharacterSet(start, end, kind) {
+ if (this._options.onAnyCharacterSet) {
+ this._options.onAnyCharacterSet(start, end, kind);
+ }
+ }
+ onEscapeCharacterSet(start, end, kind, negate) {
+ if (this._options.onEscapeCharacterSet) {
+ this._options.onEscapeCharacterSet(start, end, kind, negate);
+ }
+ }
+ onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) {
+ if (this._options.onUnicodePropertyCharacterSet) {
+ this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings);
+ }
+ }
+ onCharacter(start, end, value) {
+ if (this._options.onCharacter) {
+ this._options.onCharacter(start, end, value);
+ }
+ }
+ onBackreference(start, end, ref) {
+ if (this._options.onBackreference) {
+ this._options.onBackreference(start, end, ref);
+ }
+ }
+ onCharacterClassEnter(start, negate, unicodeSets) {
+ if (this._options.onCharacterClassEnter) {
+ this._options.onCharacterClassEnter(start, negate, unicodeSets);
+ }
+ }
+ onCharacterClassLeave(start, end, negate) {
+ if (this._options.onCharacterClassLeave) {
+ this._options.onCharacterClassLeave(start, end, negate);
+ }
+ }
+ onCharacterClassRange(start, end, min, max) {
+ if (this._options.onCharacterClassRange) {
+ this._options.onCharacterClassRange(start, end, min, max);
+ }
+ }
+ onClassIntersection(start, end) {
+ if (this._options.onClassIntersection) {
+ this._options.onClassIntersection(start, end);
+ }
+ }
+ onClassSubtraction(start, end) {
+ if (this._options.onClassSubtraction) {
+ this._options.onClassSubtraction(start, end);
+ }
+ }
+ onClassStringDisjunctionEnter(start) {
+ if (this._options.onClassStringDisjunctionEnter) {
+ this._options.onClassStringDisjunctionEnter(start);
+ }
+ }
+ onClassStringDisjunctionLeave(start, end) {
+ if (this._options.onClassStringDisjunctionLeave) {
+ this._options.onClassStringDisjunctionLeave(start, end);
+ }
+ }
+ onStringAlternativeEnter(start, index) {
+ if (this._options.onStringAlternativeEnter) {
+ this._options.onStringAlternativeEnter(start, index);
+ }
+ }
+ onStringAlternativeLeave(start, end, index) {
+ if (this._options.onStringAlternativeLeave) {
+ this._options.onStringAlternativeLeave(start, end, index);
+ }
+ }
+ get index() {
+ return this._reader.index;
+ }
+ get currentCodePoint() {
+ return this._reader.currentCodePoint;
+ }
+ get nextCodePoint() {
+ return this._reader.nextCodePoint;
+ }
+ get nextCodePoint2() {
+ return this._reader.nextCodePoint2;
+ }
+ get nextCodePoint3() {
+ return this._reader.nextCodePoint3;
+ }
+ reset(source, start, end) {
+ this._reader.reset(source, start, end, this._unicodeMode);
+ }
+ rewind(index) {
+ this._reader.rewind(index);
+ }
+ advance() {
+ this._reader.advance();
+ }
+ eat(cp) {
+ return this._reader.eat(cp);
+ }
+ eat2(cp1, cp2) {
+ return this._reader.eat2(cp1, cp2);
+ }
+ eat3(cp1, cp2, cp3) {
+ return this._reader.eat3(cp1, cp2, cp3);
+ }
+ raise(message, context) {
+ var _a, _b, _c;
+ throw new RegExpSyntaxError(this._srcCtx, {
+ unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode),
+ unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode,
+ }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message);
+ }
+ eatRegExpBody() {
+ const start = this.index;
+ let inClass = false;
+ let escaped = false;
+ for (;;) {
+ const cp = this.currentCodePoint;
+ if (cp === -1 || isLineTerminator(cp)) {
+ const kind = inClass ? "character class" : "regular expression";
+ this.raise(`Unterminated ${kind}`);
+ }
+ if (escaped) {
+ escaped = false;
+ }
+ else if (cp === REVERSE_SOLIDUS) {
+ escaped = true;
+ }
+ else if (cp === LEFT_SQUARE_BRACKET) {
+ inClass = true;
+ }
+ else if (cp === RIGHT_SQUARE_BRACKET) {
+ inClass = false;
+ }
+ else if ((cp === SOLIDUS && !inClass) ||
+ (cp === ASTERISK && this.index === start)) {
+ break;
+ }
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ consumePattern() {
+ const start = this.index;
+ this._numCapturingParens = this.countCapturingParens();
+ this._groupNames.clear();
+ this._backreferenceNames.clear();
+ this.onPatternEnter(start);
+ this.consumeDisjunction();
+ const cp = this.currentCodePoint;
+ if (this.currentCodePoint !== -1) {
+ if (cp === RIGHT_PARENTHESIS) {
+ this.raise("Unmatched ')'");
+ }
+ if (cp === REVERSE_SOLIDUS) {
+ this.raise("\\ at end of pattern");
+ }
+ if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) {
+ this.raise("Lone quantifier brackets");
+ }
+ const c = String.fromCodePoint(cp);
+ this.raise(`Unexpected character '${c}'`);
+ }
+ for (const name of this._backreferenceNames) {
+ if (!this._groupNames.has(name)) {
+ this.raise("Invalid named capture referenced");
+ }
+ }
+ this.onPatternLeave(start, this.index);
+ }
+ countCapturingParens() {
+ const start = this.index;
+ let inClass = false;
+ let escaped = false;
+ let count = 0;
+ let cp = 0;
+ while ((cp = this.currentCodePoint) !== -1) {
+ if (escaped) {
+ escaped = false;
+ }
+ else if (cp === REVERSE_SOLIDUS) {
+ escaped = true;
+ }
+ else if (cp === LEFT_SQUARE_BRACKET) {
+ inClass = true;
+ }
+ else if (cp === RIGHT_SQUARE_BRACKET) {
+ inClass = false;
+ }
+ else if (cp === LEFT_PARENTHESIS &&
+ !inClass &&
+ (this.nextCodePoint !== QUESTION_MARK ||
+ (this.nextCodePoint2 === LESS_THAN_SIGN &&
+ this.nextCodePoint3 !== EQUALS_SIGN &&
+ this.nextCodePoint3 !== EXCLAMATION_MARK))) {
+ count += 1;
+ }
+ this.advance();
+ }
+ this.rewind(start);
+ return count;
+ }
+ consumeDisjunction() {
+ const start = this.index;
+ let i = 0;
+ this.onDisjunctionEnter(start);
+ do {
+ this.consumeAlternative(i++);
+ } while (this.eat(VERTICAL_LINE));
+ if (this.consumeQuantifier(true)) {
+ this.raise("Nothing to repeat");
+ }
+ if (this.eat(LEFT_CURLY_BRACKET)) {
+ this.raise("Lone quantifier brackets");
+ }
+ this.onDisjunctionLeave(start, this.index);
+ }
+ consumeAlternative(i) {
+ const start = this.index;
+ this.onAlternativeEnter(start, i);
+ while (this.currentCodePoint !== -1 && this.consumeTerm()) {
+ }
+ this.onAlternativeLeave(start, this.index, i);
+ }
+ consumeTerm() {
+ if (this._unicodeMode || this.strict) {
+ return (this.consumeAssertion() ||
+ (this.consumeAtom() && this.consumeOptionalQuantifier()));
+ }
+ return ((this.consumeAssertion() &&
+ (!this._lastAssertionIsQuantifiable ||
+ this.consumeOptionalQuantifier())) ||
+ (this.consumeExtendedAtom() && this.consumeOptionalQuantifier()));
+ }
+ consumeOptionalQuantifier() {
+ this.consumeQuantifier();
+ return true;
+ }
+ consumeAssertion() {
+ const start = this.index;
+ this._lastAssertionIsQuantifiable = false;
+ if (this.eat(CIRCUMFLEX_ACCENT)) {
+ this.onEdgeAssertion(start, this.index, "start");
+ return true;
+ }
+ if (this.eat(DOLLAR_SIGN)) {
+ this.onEdgeAssertion(start, this.index, "end");
+ return true;
+ }
+ if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) {
+ this.onWordBoundaryAssertion(start, this.index, "word", true);
+ return true;
+ }
+ if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) {
+ this.onWordBoundaryAssertion(start, this.index, "word", false);
+ return true;
+ }
+ if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) {
+ const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN);
+ let negate = false;
+ if (this.eat(EQUALS_SIGN) ||
+ (negate = this.eat(EXCLAMATION_MARK))) {
+ const kind = lookbehind ? "lookbehind" : "lookahead";
+ this.onLookaroundAssertionEnter(start, kind, negate);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this._lastAssertionIsQuantifiable = !lookbehind && !this.strict;
+ this.onLookaroundAssertionLeave(start, this.index, kind, negate);
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeQuantifier(noConsume = false) {
+ const start = this.index;
+ let min = 0;
+ let max = 0;
+ let greedy = false;
+ if (this.eat(ASTERISK)) {
+ min = 0;
+ max = Number.POSITIVE_INFINITY;
+ }
+ else if (this.eat(PLUS_SIGN)) {
+ min = 1;
+ max = Number.POSITIVE_INFINITY;
+ }
+ else if (this.eat(QUESTION_MARK)) {
+ min = 0;
+ max = 1;
+ }
+ else if (this.eatBracedQuantifier(noConsume)) {
+ ({ min, max } = this._lastRange);
+ }
+ else {
+ return false;
+ }
+ greedy = !this.eat(QUESTION_MARK);
+ if (!noConsume) {
+ this.onQuantifier(start, this.index, min, max, greedy);
+ }
+ return true;
+ }
+ eatBracedQuantifier(noError) {
+ const start = this.index;
+ if (this.eat(LEFT_CURLY_BRACKET)) {
+ if (this.eatDecimalDigits()) {
+ const min = this._lastIntValue;
+ let max = min;
+ if (this.eat(COMMA)) {
+ max = this.eatDecimalDigits()
+ ? this._lastIntValue
+ : Number.POSITIVE_INFINITY;
+ }
+ if (this.eat(RIGHT_CURLY_BRACKET)) {
+ if (!noError && max < min) {
+ this.raise("numbers out of order in {} quantifier");
+ }
+ this._lastRange = { min, max };
+ return true;
+ }
+ }
+ if (!noError && (this._unicodeMode || this.strict)) {
+ this.raise("Incomplete quantifier");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeAtom() {
+ return (this.consumePatternCharacter() ||
+ this.consumeDot() ||
+ this.consumeReverseSolidusAtomEscape() ||
+ Boolean(this.consumeCharacterClass()) ||
+ this.consumeUncapturingGroup() ||
+ this.consumeCapturingGroup());
+ }
+ consumeDot() {
+ if (this.eat(FULL_STOP)) {
+ this.onAnyCharacterSet(this.index - 1, this.index, "any");
+ return true;
+ }
+ return false;
+ }
+ consumeReverseSolidusAtomEscape() {
+ const start = this.index;
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeAtomEscape()) {
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeUncapturingGroup() {
+ const start = this.index;
+ if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) {
+ this.onGroupEnter(start);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this.onGroupLeave(start, this.index);
+ return true;
+ }
+ return false;
+ }
+ consumeCapturingGroup() {
+ const start = this.index;
+ if (this.eat(LEFT_PARENTHESIS)) {
+ let name = null;
+ if (this.ecmaVersion >= 2018) {
+ if (this.consumeGroupSpecifier()) {
+ name = this._lastStrValue;
+ }
+ }
+ else if (this.currentCodePoint === QUESTION_MARK) {
+ this.raise("Invalid group");
+ }
+ this.onCapturingGroupEnter(start, name);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this.onCapturingGroupLeave(start, this.index, name);
+ return true;
+ }
+ return false;
+ }
+ consumeExtendedAtom() {
+ return (this.consumeDot() ||
+ this.consumeReverseSolidusAtomEscape() ||
+ this.consumeReverseSolidusFollowedByC() ||
+ Boolean(this.consumeCharacterClass()) ||
+ this.consumeUncapturingGroup() ||
+ this.consumeCapturingGroup() ||
+ this.consumeInvalidBracedQuantifier() ||
+ this.consumeExtendedPatternCharacter());
+ }
+ consumeReverseSolidusFollowedByC() {
+ const start = this.index;
+ if (this.currentCodePoint === REVERSE_SOLIDUS &&
+ this.nextCodePoint === LATIN_SMALL_LETTER_C) {
+ this._lastIntValue = this.currentCodePoint;
+ this.advance();
+ this.onCharacter(start, this.index, REVERSE_SOLIDUS);
+ return true;
+ }
+ return false;
+ }
+ consumeInvalidBracedQuantifier() {
+ if (this.eatBracedQuantifier(true)) {
+ this.raise("Nothing to repeat");
+ }
+ return false;
+ }
+ consumePatternCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 && !isSyntaxCharacter(cp)) {
+ this.advance();
+ this.onCharacter(start, this.index, cp);
+ return true;
+ }
+ return false;
+ }
+ consumeExtendedPatternCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 &&
+ cp !== CIRCUMFLEX_ACCENT &&
+ cp !== DOLLAR_SIGN &&
+ cp !== REVERSE_SOLIDUS &&
+ cp !== FULL_STOP &&
+ cp !== ASTERISK &&
+ cp !== PLUS_SIGN &&
+ cp !== QUESTION_MARK &&
+ cp !== LEFT_PARENTHESIS &&
+ cp !== RIGHT_PARENTHESIS &&
+ cp !== LEFT_SQUARE_BRACKET &&
+ cp !== VERTICAL_LINE) {
+ this.advance();
+ this.onCharacter(start, this.index, cp);
+ return true;
+ }
+ return false;
+ }
+ consumeGroupSpecifier() {
+ if (this.eat(QUESTION_MARK)) {
+ if (this.eatGroupName()) {
+ if (!this._groupNames.has(this._lastStrValue)) {
+ this._groupNames.add(this._lastStrValue);
+ return true;
+ }
+ this.raise("Duplicate capture group name");
+ }
+ this.raise("Invalid group");
+ }
+ return false;
+ }
+ consumeAtomEscape() {
+ if (this.consumeBackreference() ||
+ this.consumeCharacterClassEscape() ||
+ this.consumeCharacterEscape() ||
+ (this._nFlag && this.consumeKGroupName())) {
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ return false;
+ }
+ consumeBackreference() {
+ const start = this.index;
+ if (this.eatDecimalEscape()) {
+ const n = this._lastIntValue;
+ if (n <= this._numCapturingParens) {
+ this.onBackreference(start - 1, this.index, n);
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeCharacterClassEscape() {
+ var _a;
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_D)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "digit", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_D)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "digit", true);
+ return {};
+ }
+ if (this.eat(LATIN_SMALL_LETTER_S)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "space", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_S)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "space", true);
+ return {};
+ }
+ if (this.eat(LATIN_SMALL_LETTER_W)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "word", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_W)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "word", true);
+ return {};
+ }
+ let negate = false;
+ if (this._unicodeMode &&
+ this.ecmaVersion >= 2018 &&
+ (this.eat(LATIN_SMALL_LETTER_P) ||
+ (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) {
+ this._lastIntValue = -1;
+ let result = null;
+ if (this.eat(LEFT_CURLY_BRACKET) &&
+ (result = this.eatUnicodePropertyValueExpression()) &&
+ this.eat(RIGHT_CURLY_BRACKET)) {
+ if (negate && result.strings) {
+ this.raise("Invalid property name");
+ }
+ this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false);
+ return { mayContainStrings: result.strings };
+ }
+ this.raise("Invalid property name");
+ }
+ return null;
+ }
+ consumeCharacterEscape() {
+ const start = this.index;
+ if (this.eatControlEscape() ||
+ this.eatCControlLetter() ||
+ this.eatZero() ||
+ this.eatHexEscapeSequence() ||
+ this.eatRegExpUnicodeEscapeSequence() ||
+ (!this.strict &&
+ !this._unicodeMode &&
+ this.eatLegacyOctalEscapeSequence()) ||
+ this.eatIdentityEscape()) {
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ return false;
+ }
+ consumeKGroupName() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_K)) {
+ if (this.eatGroupName()) {
+ const groupName = this._lastStrValue;
+ this._backreferenceNames.add(groupName);
+ this.onBackreference(start - 1, this.index, groupName);
+ return true;
+ }
+ this.raise("Invalid named reference");
+ }
+ return false;
+ }
+ consumeCharacterClass() {
+ const start = this.index;
+ if (this.eat(LEFT_SQUARE_BRACKET)) {
+ const negate = this.eat(CIRCUMFLEX_ACCENT);
+ this.onCharacterClassEnter(start, negate, this._unicodeSetsMode);
+ const result = this.consumeClassContents();
+ if (!this.eat(RIGHT_SQUARE_BRACKET)) {
+ if (this.currentCodePoint === -1) {
+ this.raise("Unterminated character class");
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (negate && result.mayContainStrings) {
+ this.raise("Negated character class may contain strings");
+ }
+ this.onCharacterClassLeave(start, this.index, negate);
+ return result;
+ }
+ return null;
+ }
+ consumeClassContents() {
+ if (this._unicodeSetsMode) {
+ if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) {
+ return {};
+ }
+ const result = this.consumeClassSetExpression();
+ return result;
+ }
+ const strict = this.strict || this._unicodeMode;
+ for (;;) {
+ const rangeStart = this.index;
+ if (!this.consumeClassAtom()) {
+ break;
+ }
+ const min = this._lastIntValue;
+ if (!this.eat(HYPHEN_MINUS)) {
+ continue;
+ }
+ this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS);
+ if (!this.consumeClassAtom()) {
+ break;
+ }
+ const max = this._lastIntValue;
+ if (min === -1 || max === -1) {
+ if (strict) {
+ this.raise("Invalid character class");
+ }
+ continue;
+ }
+ if (min > max) {
+ this.raise("Range out of order in character class");
+ }
+ this.onCharacterClassRange(rangeStart, this.index, min, max);
+ }
+ return {};
+ }
+ consumeClassAtom() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 &&
+ cp !== REVERSE_SOLIDUS &&
+ cp !== RIGHT_SQUARE_BRACKET) {
+ this.advance();
+ this._lastIntValue = cp;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeClassEscape()) {
+ return true;
+ }
+ if (!this.strict &&
+ this.currentCodePoint === LATIN_SMALL_LETTER_C) {
+ this._lastIntValue = REVERSE_SOLIDUS;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeClassEscape() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_B)) {
+ this._lastIntValue = BACKSPACE;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this._unicodeMode && this.eat(HYPHEN_MINUS)) {
+ this._lastIntValue = HYPHEN_MINUS;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ let cp = 0;
+ if (!this.strict &&
+ !this._unicodeMode &&
+ this.currentCodePoint === LATIN_SMALL_LETTER_C &&
+ (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) {
+ this.advance();
+ this.advance();
+ this._lastIntValue = cp % 0x20;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ return (Boolean(this.consumeCharacterClassEscape()) ||
+ this.consumeCharacterEscape());
+ }
+ consumeClassSetExpression() {
+ const start = this.index;
+ let mayContainStrings = false;
+ let result = null;
+ if (this.consumeClassSetCharacter()) {
+ if (this.consumeClassSetRangeFromOperator(start)) {
+ this.consumeClassUnionRight({});
+ return {};
+ }
+ mayContainStrings = false;
+ }
+ else if ((result = this.consumeClassSetOperand())) {
+ mayContainStrings = result.mayContainStrings;
+ }
+ else {
+ const cp = this.currentCodePoint;
+ if (cp === REVERSE_SOLIDUS) {
+ this.advance();
+ this.raise("Invalid escape");
+ }
+ if (cp === this.nextCodePoint &&
+ isClassSetReservedDoublePunctuatorCharacter(cp)) {
+ this.raise("Invalid set operation in character class");
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (this.eat2(AMPERSAND, AMPERSAND)) {
+ while (this.currentCodePoint !== AMPERSAND &&
+ (result = this.consumeClassSetOperand())) {
+ this.onClassIntersection(start, this.index);
+ if (!result.mayContainStrings) {
+ mayContainStrings = false;
+ }
+ if (this.eat2(AMPERSAND, AMPERSAND)) {
+ continue;
+ }
+ return { mayContainStrings };
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) {
+ while (this.consumeClassSetOperand()) {
+ this.onClassSubtraction(start, this.index);
+ if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) {
+ continue;
+ }
+ return { mayContainStrings };
+ }
+ this.raise("Invalid character in character class");
+ }
+ return this.consumeClassUnionRight({ mayContainStrings });
+ }
+ consumeClassUnionRight(leftResult) {
+ let mayContainStrings = leftResult.mayContainStrings;
+ for (;;) {
+ const start = this.index;
+ if (this.consumeClassSetCharacter()) {
+ this.consumeClassSetRangeFromOperator(start);
+ continue;
+ }
+ const result = this.consumeClassSetOperand();
+ if (result) {
+ if (result.mayContainStrings) {
+ mayContainStrings = true;
+ }
+ continue;
+ }
+ break;
+ }
+ return { mayContainStrings };
+ }
+ consumeClassSetRangeFromOperator(start) {
+ const currentStart = this.index;
+ const min = this._lastIntValue;
+ if (this.eat(HYPHEN_MINUS)) {
+ if (this.consumeClassSetCharacter()) {
+ const max = this._lastIntValue;
+ if (min === -1 || max === -1) {
+ this.raise("Invalid character class");
+ }
+ if (min > max) {
+ this.raise("Range out of order in character class");
+ }
+ this.onCharacterClassRange(start, this.index, min, max);
+ return true;
+ }
+ this.rewind(currentStart);
+ }
+ return false;
+ }
+ consumeClassSetOperand() {
+ let result = null;
+ if ((result = this.consumeNestedClass())) {
+ return result;
+ }
+ if ((result = this.consumeClassStringDisjunction())) {
+ return result;
+ }
+ if (this.consumeClassSetCharacter()) {
+ return {};
+ }
+ return null;
+ }
+ consumeNestedClass() {
+ const start = this.index;
+ if (this.eat(LEFT_SQUARE_BRACKET)) {
+ const negate = this.eat(CIRCUMFLEX_ACCENT);
+ this.onCharacterClassEnter(start, negate, true);
+ const result = this.consumeClassContents();
+ if (!this.eat(RIGHT_SQUARE_BRACKET)) {
+ this.raise("Unterminated character class");
+ }
+ if (negate && result.mayContainStrings) {
+ this.raise("Negated character class may contain strings");
+ }
+ this.onCharacterClassLeave(start, this.index, negate);
+ return result;
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ const result = this.consumeCharacterClassEscape();
+ if (result) {
+ return result;
+ }
+ this.rewind(start);
+ }
+ return null;
+ }
+ consumeClassStringDisjunction() {
+ const start = this.index;
+ if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) {
+ this.onClassStringDisjunctionEnter(start);
+ let i = 0;
+ let mayContainStrings = false;
+ do {
+ if (this.consumeClassString(i++).mayContainStrings) {
+ mayContainStrings = true;
+ }
+ } while (this.eat(VERTICAL_LINE));
+ if (this.eat(RIGHT_CURLY_BRACKET)) {
+ this.onClassStringDisjunctionLeave(start, this.index);
+ return { mayContainStrings };
+ }
+ this.raise("Unterminated class string disjunction");
+ }
+ return null;
+ }
+ consumeClassString(i) {
+ const start = this.index;
+ let count = 0;
+ this.onStringAlternativeEnter(start, i);
+ while (this.currentCodePoint !== -1 &&
+ this.consumeClassSetCharacter()) {
+ count++;
+ }
+ this.onStringAlternativeLeave(start, this.index, i);
+ return { mayContainStrings: count !== 1 };
+ }
+ consumeClassSetCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== this.nextCodePoint ||
+ !isClassSetReservedDoublePunctuatorCharacter(cp)) {
+ if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) {
+ this._lastIntValue = cp;
+ this.advance();
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeCharacterEscape()) {
+ return true;
+ }
+ if (isClassSetReservedPunctuator(this.currentCodePoint)) {
+ this._lastIntValue = this.currentCodePoint;
+ this.advance();
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_B)) {
+ this._lastIntValue = BACKSPACE;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatGroupName() {
+ if (this.eat(LESS_THAN_SIGN)) {
+ if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) {
+ return true;
+ }
+ this.raise("Invalid capture group name");
+ }
+ return false;
+ }
+ eatRegExpIdentifierName() {
+ if (this.eatRegExpIdentifierStart()) {
+ this._lastStrValue = String.fromCodePoint(this._lastIntValue);
+ while (this.eatRegExpIdentifierPart()) {
+ this._lastStrValue += String.fromCodePoint(this._lastIntValue);
+ }
+ return true;
+ }
+ return false;
+ }
+ eatRegExpIdentifierStart() {
+ const start = this.index;
+ const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020;
+ let cp = this.currentCodePoint;
+ this.advance();
+ if (cp === REVERSE_SOLIDUS &&
+ this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
+ cp = this._lastIntValue;
+ }
+ else if (forceUFlag &&
+ isLeadSurrogate(cp) &&
+ isTrailSurrogate(this.currentCodePoint)) {
+ cp = combineSurrogatePair(cp, this.currentCodePoint);
+ this.advance();
+ }
+ if (isIdentifierStartChar(cp)) {
+ this._lastIntValue = cp;
+ return true;
+ }
+ if (this.index !== start) {
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpIdentifierPart() {
+ const start = this.index;
+ const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020;
+ let cp = this.currentCodePoint;
+ this.advance();
+ if (cp === REVERSE_SOLIDUS &&
+ this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
+ cp = this._lastIntValue;
+ }
+ else if (forceUFlag &&
+ isLeadSurrogate(cp) &&
+ isTrailSurrogate(this.currentCodePoint)) {
+ cp = combineSurrogatePair(cp, this.currentCodePoint);
+ this.advance();
+ }
+ if (isIdentifierPartChar(cp)) {
+ this._lastIntValue = cp;
+ return true;
+ }
+ if (this.index !== start) {
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatCControlLetter() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_C)) {
+ if (this.eatControlLetter()) {
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatZero() {
+ if (this.currentCodePoint === DIGIT_ZERO &&
+ !isDecimalDigit(this.nextCodePoint)) {
+ this._lastIntValue = 0;
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eatControlEscape() {
+ if (this.eat(LATIN_SMALL_LETTER_F)) {
+ this._lastIntValue = FORM_FEED;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_N)) {
+ this._lastIntValue = LINE_FEED;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_R)) {
+ this._lastIntValue = CARRIAGE_RETURN;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_T)) {
+ this._lastIntValue = CHARACTER_TABULATION;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_V)) {
+ this._lastIntValue = LINE_TABULATION;
+ return true;
+ }
+ return false;
+ }
+ eatControlLetter() {
+ const cp = this.currentCodePoint;
+ if (isLatinLetter(cp)) {
+ this.advance();
+ this._lastIntValue = cp % 0x20;
+ return true;
+ }
+ return false;
+ }
+ eatRegExpUnicodeEscapeSequence(forceUFlag = false) {
+ const start = this.index;
+ const uFlag = forceUFlag || this._unicodeMode;
+ if (this.eat(LATIN_SMALL_LETTER_U)) {
+ if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) ||
+ this.eatFixedHexDigits(4) ||
+ (uFlag && this.eatRegExpUnicodeCodePointEscape())) {
+ return true;
+ }
+ if (this.strict || uFlag) {
+ this.raise("Invalid unicode escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpUnicodeSurrogatePairEscape() {
+ const start = this.index;
+ if (this.eatFixedHexDigits(4)) {
+ const lead = this._lastIntValue;
+ if (isLeadSurrogate(lead) &&
+ this.eat(REVERSE_SOLIDUS) &&
+ this.eat(LATIN_SMALL_LETTER_U) &&
+ this.eatFixedHexDigits(4)) {
+ const trail = this._lastIntValue;
+ if (isTrailSurrogate(trail)) {
+ this._lastIntValue = combineSurrogatePair(lead, trail);
+ return true;
+ }
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpUnicodeCodePointEscape() {
+ const start = this.index;
+ if (this.eat(LEFT_CURLY_BRACKET) &&
+ this.eatHexDigits() &&
+ this.eat(RIGHT_CURLY_BRACKET) &&
+ isValidUnicode(this._lastIntValue)) {
+ return true;
+ }
+ this.rewind(start);
+ return false;
+ }
+ eatIdentityEscape() {
+ const cp = this.currentCodePoint;
+ if (this.isValidIdentityEscape(cp)) {
+ this._lastIntValue = cp;
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ isValidIdentityEscape(cp) {
+ if (cp === -1) {
+ return false;
+ }
+ if (this._unicodeMode) {
+ return isSyntaxCharacter(cp) || cp === SOLIDUS;
+ }
+ if (this.strict) {
+ return !isIdContinue(cp);
+ }
+ if (this._nFlag) {
+ return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K);
+ }
+ return cp !== LATIN_SMALL_LETTER_C;
+ }
+ eatDecimalEscape() {
+ this._lastIntValue = 0;
+ let cp = this.currentCodePoint;
+ if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) {
+ do {
+ this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO);
+ this.advance();
+ } while ((cp = this.currentCodePoint) >= DIGIT_ZERO &&
+ cp <= DIGIT_NINE);
+ return true;
+ }
+ return false;
+ }
+ eatUnicodePropertyValueExpression() {
+ const start = this.index;
+ if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) {
+ const key = this._lastStrValue;
+ if (this.eatUnicodePropertyValue()) {
+ const value = this._lastStrValue;
+ if (isValidUnicodeProperty(this.ecmaVersion, key, value)) {
+ return {
+ key,
+ value: value || null,
+ };
+ }
+ this.raise("Invalid property name");
+ }
+ }
+ this.rewind(start);
+ if (this.eatLoneUnicodePropertyNameOrValue()) {
+ const nameOrValue = this._lastStrValue;
+ if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) {
+ return {
+ key: "General_Category",
+ value: nameOrValue || null,
+ };
+ }
+ if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) {
+ return {
+ key: nameOrValue,
+ value: null,
+ };
+ }
+ if (this._unicodeSetsMode &&
+ isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) {
+ return {
+ key: nameOrValue,
+ value: null,
+ strings: true,
+ };
+ }
+ this.raise("Invalid property name");
+ }
+ return null;
+ }
+ eatUnicodePropertyName() {
+ this._lastStrValue = "";
+ while (isUnicodePropertyNameCharacter(this.currentCodePoint)) {
+ this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
+ this.advance();
+ }
+ return this._lastStrValue !== "";
+ }
+ eatUnicodePropertyValue() {
+ this._lastStrValue = "";
+ while (isUnicodePropertyValueCharacter(this.currentCodePoint)) {
+ this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
+ this.advance();
+ }
+ return this._lastStrValue !== "";
+ }
+ eatLoneUnicodePropertyNameOrValue() {
+ return this.eatUnicodePropertyValue();
+ }
+ eatHexEscapeSequence() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_X)) {
+ if (this.eatFixedHexDigits(2)) {
+ return true;
+ }
+ if (this._unicodeMode || this.strict) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatDecimalDigits() {
+ const start = this.index;
+ this._lastIntValue = 0;
+ while (isDecimalDigit(this.currentCodePoint)) {
+ this._lastIntValue =
+ 10 * this._lastIntValue + digitToInt(this.currentCodePoint);
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ eatHexDigits() {
+ const start = this.index;
+ this._lastIntValue = 0;
+ while (isHexDigit(this.currentCodePoint)) {
+ this._lastIntValue =
+ 16 * this._lastIntValue + digitToInt(this.currentCodePoint);
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ eatLegacyOctalEscapeSequence() {
+ if (this.eatOctalDigit()) {
+ const n1 = this._lastIntValue;
+ if (this.eatOctalDigit()) {
+ const n2 = this._lastIntValue;
+ if (n1 <= 3 && this.eatOctalDigit()) {
+ this._lastIntValue = n1 * 64 + n2 * 8 + this._lastIntValue;
+ }
+ else {
+ this._lastIntValue = n1 * 8 + n2;
+ }
+ }
+ else {
+ this._lastIntValue = n1;
+ }
+ return true;
+ }
+ return false;
+ }
+ eatOctalDigit() {
+ const cp = this.currentCodePoint;
+ if (isOctalDigit(cp)) {
+ this.advance();
+ this._lastIntValue = cp - DIGIT_ZERO;
+ return true;
+ }
+ this._lastIntValue = 0;
+ return false;
+ }
+ eatFixedHexDigits(length) {
+ const start = this.index;
+ this._lastIntValue = 0;
+ for (let i = 0; i < length; ++i) {
+ const cp = this.currentCodePoint;
+ if (!isHexDigit(cp)) {
+ this.rewind(start);
+ return false;
+ }
+ this._lastIntValue = 16 * this._lastIntValue + digitToInt(cp);
+ this.advance();
+ }
+ return true;
+ }
+}
+
+const DUMMY_PATTERN = {};
+const DUMMY_FLAGS = {};
+const DUMMY_CAPTURING_GROUP = {};
+function isClassSetOperand(node) {
+ return (node.type === "Character" ||
+ node.type === "CharacterSet" ||
+ node.type === "CharacterClass" ||
+ node.type === "ExpressionCharacterClass" ||
+ node.type === "ClassStringDisjunction");
+}
+class RegExpParserState {
+ constructor(options) {
+ var _a;
+ this._node = DUMMY_PATTERN;
+ this._expressionBuffer = null;
+ this._flags = DUMMY_FLAGS;
+ this._backreferences = [];
+ this._capturingGroups = [];
+ this.source = "";
+ this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict);
+ this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion;
+ }
+ get pattern() {
+ if (this._node.type !== "Pattern") {
+ throw new Error("UnknownError");
+ }
+ return this._node;
+ }
+ get flags() {
+ if (this._flags.type !== "Flags") {
+ throw new Error("UnknownError");
+ }
+ return this._flags;
+ }
+ onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) {
+ this._flags = {
+ type: "Flags",
+ parent: null,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ global,
+ ignoreCase,
+ multiline,
+ unicode,
+ sticky,
+ dotAll,
+ hasIndices,
+ unicodeSets,
+ };
+ }
+ onPatternEnter(start) {
+ this._node = {
+ type: "Pattern",
+ parent: null,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ this._backreferences.length = 0;
+ this._capturingGroups.length = 0;
+ }
+ onPatternLeave(start, end) {
+ this._node.end = end;
+ this._node.raw = this.source.slice(start, end);
+ for (const reference of this._backreferences) {
+ const ref = reference.ref;
+ const group = typeof ref === "number"
+ ? this._capturingGroups[ref - 1]
+ : this._capturingGroups.find((g) => g.name === ref);
+ reference.resolved = group;
+ group.references.push(reference);
+ }
+ }
+ onAlternativeEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "Assertion" &&
+ parent.type !== "CapturingGroup" &&
+ parent.type !== "Group" &&
+ parent.type !== "Pattern") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "Alternative",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ elements: [],
+ };
+ parent.alternatives.push(this._node);
+ }
+ onAlternativeLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onGroupEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "Group",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ parent.elements.push(this._node);
+ }
+ onGroupLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Group" || node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onCapturingGroupEnter(start, name) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "CapturingGroup",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ name,
+ alternatives: [],
+ references: [],
+ };
+ parent.elements.push(this._node);
+ this._capturingGroups.push(this._node);
+ }
+ onCapturingGroupLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "CapturingGroup" ||
+ node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onQuantifier(start, end, min, max, greedy) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const element = parent.elements.pop();
+ if (element == null ||
+ element.type === "Quantifier" ||
+ (element.type === "Assertion" && element.kind !== "lookahead")) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "Quantifier",
+ parent,
+ start: element.start,
+ end,
+ raw: this.source.slice(element.start, end),
+ min,
+ max,
+ greedy,
+ element,
+ };
+ parent.elements.push(node);
+ element.parent = node;
+ }
+ onLookaroundAssertionEnter(start, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const node = (this._node = {
+ type: "Assertion",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ kind,
+ negate,
+ alternatives: [],
+ });
+ parent.elements.push(node);
+ }
+ onLookaroundAssertionLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Assertion" || node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onEdgeAssertion(start, end, kind) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Assertion",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ });
+ }
+ onWordBoundaryAssertion(start, end, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Assertion",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ negate,
+ });
+ }
+ onAnyCharacterSet(start, end, kind) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "CharacterSet",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ });
+ }
+ onEscapeCharacterSet(start, end, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "CharacterSet",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ negate,
+ });
+ }
+ onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ const base = {
+ type: "CharacterSet",
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ key,
+ };
+ if (strings) {
+ if ((parent.type === "CharacterClass" && !parent.unicodeSets) ||
+ negate ||
+ value !== null) {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
+ }
+ else {
+ parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
+ }
+ }
+ onCharacter(start, end, value) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" &&
+ parent.type !== "CharacterClass" &&
+ parent.type !== "StringAlternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Character",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ value,
+ });
+ }
+ onBackreference(start, end, ref) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "Backreference",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ ref,
+ resolved: DUMMY_CAPTURING_GROUP,
+ };
+ parent.elements.push(node);
+ this._backreferences.push(node);
+ }
+ onCharacterClassEnter(start, negate, unicodeSets) {
+ const parent = this._node;
+ const base = {
+ type: "CharacterClass",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ unicodeSets,
+ negate,
+ elements: [],
+ };
+ if (parent.type === "Alternative") {
+ const node = Object.assign(Object.assign({}, base), { parent });
+ this._node = node;
+ parent.elements.push(node);
+ }
+ else if (parent.type === "CharacterClass" &&
+ parent.unicodeSets &&
+ unicodeSets) {
+ const node = Object.assign(Object.assign({}, base), { parent,
+ unicodeSets });
+ this._node = node;
+ parent.elements.push(node);
+ }
+ else {
+ throw new Error("UnknownError");
+ }
+ }
+ onCharacterClassLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "CharacterClass" ||
+ (node.parent.type !== "Alternative" &&
+ node.parent.type !== "CharacterClass")) {
+ throw new Error("UnknownError");
+ }
+ const parent = node.parent;
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = parent;
+ const expression = this._expressionBuffer;
+ if ((expression === null || expression === void 0 ? void 0 : expression.parent) !== node) {
+ return;
+ }
+ if (node.elements.length > 0) {
+ throw new Error("UnknownError");
+ }
+ this._expressionBuffer = null;
+ const newNode = {
+ type: "ExpressionCharacterClass",
+ parent,
+ start: node.start,
+ end: node.end,
+ raw: node.raw,
+ negate: node.negate,
+ expression,
+ };
+ expression.parent = newNode;
+ if (node !== parent.elements.pop()) {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push(newNode);
+ }
+ onCharacterClassRange(start, end) {
+ const parent = this._node;
+ if (parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ const elements = parent.elements;
+ const max = elements.pop();
+ if (!max || max.type !== "Character") {
+ throw new Error("UnknownError");
+ }
+ if (!parent.unicodeSets) {
+ const hyphen = elements.pop();
+ if (!hyphen ||
+ hyphen.type !== "Character" ||
+ hyphen.value !== HYPHEN_MINUS) {
+ throw new Error("UnknownError");
+ }
+ }
+ const min = elements.pop();
+ if (!min || min.type !== "Character") {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "CharacterClassRange",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ min,
+ max,
+ };
+ min.parent = node;
+ max.parent = node;
+ elements.push(node);
+ }
+ onClassIntersection(start, end) {
+ var _a;
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ const right = parent.elements.pop();
+ const left = (_a = this._expressionBuffer) !== null && _a !== void 0 ? _a : parent.elements.pop();
+ if (!left ||
+ !right ||
+ left.type === "ClassSubtraction" ||
+ (left.type !== "ClassIntersection" && !isClassSetOperand(left)) ||
+ !isClassSetOperand(right)) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "ClassIntersection",
+ parent: parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ left,
+ right,
+ };
+ left.parent = node;
+ right.parent = node;
+ this._expressionBuffer = node;
+ }
+ onClassSubtraction(start, end) {
+ var _a;
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ const right = parent.elements.pop();
+ const left = (_a = this._expressionBuffer) !== null && _a !== void 0 ? _a : parent.elements.pop();
+ if (!left ||
+ !right ||
+ left.type === "ClassIntersection" ||
+ (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) ||
+ !isClassSetOperand(right)) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "ClassSubtraction",
+ parent: parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ left,
+ right,
+ };
+ left.parent = node;
+ right.parent = node;
+ this._expressionBuffer = node;
+ }
+ onClassStringDisjunctionEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "ClassStringDisjunction",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ parent.elements.push(this._node);
+ }
+ onClassStringDisjunctionLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "ClassStringDisjunction" ||
+ node.parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onStringAlternativeEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "ClassStringDisjunction") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "StringAlternative",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ elements: [],
+ };
+ parent.alternatives.push(this._node);
+ }
+ onStringAlternativeLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "StringAlternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+}
+class RegExpParser {
+ constructor(options) {
+ this._state = new RegExpParserState(options);
+ this._validator = new RegExpValidator(this._state);
+ }
+ parseLiteral(source, start = 0, end = source.length) {
+ this._state.source = source;
+ this._validator.validateLiteral(source, start, end);
+ const pattern = this._state.pattern;
+ const flags = this._state.flags;
+ const literal = {
+ type: "RegExpLiteral",
+ parent: null,
+ start,
+ end,
+ raw: source,
+ pattern,
+ flags,
+ };
+ pattern.parent = literal;
+ flags.parent = literal;
+ return literal;
+ }
+ parseFlags(source, start = 0, end = source.length) {
+ this._state.source = source;
+ this._validator.validateFlags(source, start, end);
+ return this._state.flags;
+ }
+ parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ this._state.source = source;
+ this._validator.validatePattern(source, start, end, uFlagOrFlags);
+ return this._state.pattern;
+ }
+}
+
+class RegExpVisitor {
+ constructor(handlers) {
+ this._handlers = handlers;
+ }
+ visit(node) {
+ switch (node.type) {
+ case "Alternative":
+ this.visitAlternative(node);
+ break;
+ case "Assertion":
+ this.visitAssertion(node);
+ break;
+ case "Backreference":
+ this.visitBackreference(node);
+ break;
+ case "CapturingGroup":
+ this.visitCapturingGroup(node);
+ break;
+ case "Character":
+ this.visitCharacter(node);
+ break;
+ case "CharacterClass":
+ this.visitCharacterClass(node);
+ break;
+ case "CharacterClassRange":
+ this.visitCharacterClassRange(node);
+ break;
+ case "CharacterSet":
+ this.visitCharacterSet(node);
+ break;
+ case "ClassIntersection":
+ this.visitClassIntersection(node);
+ break;
+ case "ClassStringDisjunction":
+ this.visitClassStringDisjunction(node);
+ break;
+ case "ClassSubtraction":
+ this.visitClassSubtraction(node);
+ break;
+ case "ExpressionCharacterClass":
+ this.visitExpressionCharacterClass(node);
+ break;
+ case "Flags":
+ this.visitFlags(node);
+ break;
+ case "Group":
+ this.visitGroup(node);
+ break;
+ case "Pattern":
+ this.visitPattern(node);
+ break;
+ case "Quantifier":
+ this.visitQuantifier(node);
+ break;
+ case "RegExpLiteral":
+ this.visitRegExpLiteral(node);
+ break;
+ case "StringAlternative":
+ this.visitStringAlternative(node);
+ break;
+ default:
+ throw new Error(`Unknown type: ${node.type}`);
+ }
+ }
+ visitAlternative(node) {
+ if (this._handlers.onAlternativeEnter) {
+ this._handlers.onAlternativeEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onAlternativeLeave) {
+ this._handlers.onAlternativeLeave(node);
+ }
+ }
+ visitAssertion(node) {
+ if (this._handlers.onAssertionEnter) {
+ this._handlers.onAssertionEnter(node);
+ }
+ if (node.kind === "lookahead" || node.kind === "lookbehind") {
+ node.alternatives.forEach(this.visit, this);
+ }
+ if (this._handlers.onAssertionLeave) {
+ this._handlers.onAssertionLeave(node);
+ }
+ }
+ visitBackreference(node) {
+ if (this._handlers.onBackreferenceEnter) {
+ this._handlers.onBackreferenceEnter(node);
+ }
+ if (this._handlers.onBackreferenceLeave) {
+ this._handlers.onBackreferenceLeave(node);
+ }
+ }
+ visitCapturingGroup(node) {
+ if (this._handlers.onCapturingGroupEnter) {
+ this._handlers.onCapturingGroupEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onCapturingGroupLeave) {
+ this._handlers.onCapturingGroupLeave(node);
+ }
+ }
+ visitCharacter(node) {
+ if (this._handlers.onCharacterEnter) {
+ this._handlers.onCharacterEnter(node);
+ }
+ if (this._handlers.onCharacterLeave) {
+ this._handlers.onCharacterLeave(node);
+ }
+ }
+ visitCharacterClass(node) {
+ if (this._handlers.onCharacterClassEnter) {
+ this._handlers.onCharacterClassEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onCharacterClassLeave) {
+ this._handlers.onCharacterClassLeave(node);
+ }
+ }
+ visitCharacterClassRange(node) {
+ if (this._handlers.onCharacterClassRangeEnter) {
+ this._handlers.onCharacterClassRangeEnter(node);
+ }
+ this.visitCharacter(node.min);
+ this.visitCharacter(node.max);
+ if (this._handlers.onCharacterClassRangeLeave) {
+ this._handlers.onCharacterClassRangeLeave(node);
+ }
+ }
+ visitCharacterSet(node) {
+ if (this._handlers.onCharacterSetEnter) {
+ this._handlers.onCharacterSetEnter(node);
+ }
+ if (this._handlers.onCharacterSetLeave) {
+ this._handlers.onCharacterSetLeave(node);
+ }
+ }
+ visitClassIntersection(node) {
+ if (this._handlers.onClassIntersectionEnter) {
+ this._handlers.onClassIntersectionEnter(node);
+ }
+ this.visit(node.left);
+ this.visit(node.right);
+ if (this._handlers.onClassIntersectionLeave) {
+ this._handlers.onClassIntersectionLeave(node);
+ }
+ }
+ visitClassStringDisjunction(node) {
+ if (this._handlers.onClassStringDisjunctionEnter) {
+ this._handlers.onClassStringDisjunctionEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onClassStringDisjunctionLeave) {
+ this._handlers.onClassStringDisjunctionLeave(node);
+ }
+ }
+ visitClassSubtraction(node) {
+ if (this._handlers.onClassSubtractionEnter) {
+ this._handlers.onClassSubtractionEnter(node);
+ }
+ this.visit(node.left);
+ this.visit(node.right);
+ if (this._handlers.onClassSubtractionLeave) {
+ this._handlers.onClassSubtractionLeave(node);
+ }
+ }
+ visitExpressionCharacterClass(node) {
+ if (this._handlers.onExpressionCharacterClassEnter) {
+ this._handlers.onExpressionCharacterClassEnter(node);
+ }
+ this.visit(node.expression);
+ if (this._handlers.onExpressionCharacterClassLeave) {
+ this._handlers.onExpressionCharacterClassLeave(node);
+ }
+ }
+ visitFlags(node) {
+ if (this._handlers.onFlagsEnter) {
+ this._handlers.onFlagsEnter(node);
+ }
+ if (this._handlers.onFlagsLeave) {
+ this._handlers.onFlagsLeave(node);
+ }
+ }
+ visitGroup(node) {
+ if (this._handlers.onGroupEnter) {
+ this._handlers.onGroupEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onGroupLeave) {
+ this._handlers.onGroupLeave(node);
+ }
+ }
+ visitPattern(node) {
+ if (this._handlers.onPatternEnter) {
+ this._handlers.onPatternEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onPatternLeave) {
+ this._handlers.onPatternLeave(node);
+ }
+ }
+ visitQuantifier(node) {
+ if (this._handlers.onQuantifierEnter) {
+ this._handlers.onQuantifierEnter(node);
+ }
+ this.visit(node.element);
+ if (this._handlers.onQuantifierLeave) {
+ this._handlers.onQuantifierLeave(node);
+ }
+ }
+ visitRegExpLiteral(node) {
+ if (this._handlers.onRegExpLiteralEnter) {
+ this._handlers.onRegExpLiteralEnter(node);
+ }
+ this.visitPattern(node.pattern);
+ this.visitFlags(node.flags);
+ if (this._handlers.onRegExpLiteralLeave) {
+ this._handlers.onRegExpLiteralLeave(node);
+ }
+ }
+ visitStringAlternative(node) {
+ if (this._handlers.onStringAlternativeEnter) {
+ this._handlers.onStringAlternativeEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onStringAlternativeLeave) {
+ this._handlers.onStringAlternativeLeave(node);
+ }
+ }
+}
+
+function parseRegExpLiteral(source, options) {
+ return new RegExpParser(options).parseLiteral(String(source));
+}
+function validateRegExpLiteral(source, options) {
+ new RegExpValidator(options).validateLiteral(source);
+}
+function visitRegExpAST(node, handlers) {
+ new RegExpVisitor(handlers).visit(node);
+}
+
+exports.AST = ast;
+exports.RegExpParser = RegExpParser;
+exports.RegExpValidator = RegExpValidator;
+exports.parseRegExpLiteral = parseRegExpLiteral;
+exports.validateRegExpLiteral = validateRegExpLiteral;
+exports.visitRegExpAST = visitRegExpAST;
+//# sourceMappingURL=index.js.map
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js.map b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js.map
new file mode 100644
index 0000000..cf18a15
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/unicode/src/unicode/properties-of-strings.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;AAYO,MAAM,iBAAiB,GAAG,IAAI;;ACRrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAAU,EAAA;IAChC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;AAC1B,IAAA,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;AAC7B,CAAC;AAEK,SAAU,YAAY,CAAC,EAAU,EAAA;IACnC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,KAA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AC,IAAI,CAAC,CAAA;AAChD,SAAA;KACJ;AACJ;;AClRe,SAAA,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B,EAAA;AAE9B,IAAA,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;AACjE,CAAC;AAOe,SAAA,qBAAqB,CACjC,MAAc,EACd,OAAiC,EAAA;IAEjC,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AACxD,CAAC;AAEe,SAAA,cAAc,CAC1B,IAAc,EACd,QAAgC,EAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC3C;;;;;;;;;"}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs
new file mode 100644
index 0000000..c3ab305
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs
@@ -0,0 +1,2743 @@
+var ast = /*#__PURE__*/Object.freeze({
+ __proto__: null
+});
+
+const latestEcmaVersion = 2024;
+
+let largeIdStartRanges = undefined;
+let largeIdContinueRanges = undefined;
+function isIdStart(cp) {
+ if (cp < 0x41)
+ return false;
+ if (cp < 0x5b)
+ return true;
+ if (cp < 0x61)
+ return false;
+ if (cp < 0x7b)
+ return true;
+ return isLargeIdStart(cp);
+}
+function isIdContinue(cp) {
+ if (cp < 0x30)
+ return false;
+ if (cp < 0x3a)
+ return true;
+ if (cp < 0x41)
+ return false;
+ if (cp < 0x5b)
+ return true;
+ if (cp === 0x5f)
+ return true;
+ if (cp < 0x61)
+ return false;
+ if (cp < 0x7b)
+ return true;
+ return isLargeIdStart(cp) || isLargeIdContinue(cp);
+}
+function isLargeIdStart(cp) {
+ return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges()));
+}
+function isLargeIdContinue(cp) {
+ return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges()));
+}
+function initLargeIdStartRanges() {
+ return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk 2e8 f1 15v 3t6 6 38f");
+}
+function initLargeIdContinueRanges() {
+ return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 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 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n");
+}
+function isInRange(cp, ranges) {
+ let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0;
+ while (l < r) {
+ i = ((l + r) / 2) | 0;
+ min = ranges[2 * i];
+ max = ranges[2 * i + 1];
+ if (cp < min) {
+ r = i;
+ }
+ else if (cp > max) {
+ l = i + 1;
+ }
+ else {
+ return true;
+ }
+ }
+ return false;
+}
+function restoreRanges(data) {
+ let last = 0;
+ return data.split(" ").map((s) => (last += parseInt(s, 36) | 0));
+}
+
+class DataSet {
+ constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024) {
+ this._raw2018 = raw2018;
+ this._raw2019 = raw2019;
+ this._raw2020 = raw2020;
+ this._raw2021 = raw2021;
+ this._raw2022 = raw2022;
+ this._raw2023 = raw2023;
+ this._raw2024 = raw2024;
+ }
+ get es2018() {
+ var _a;
+ return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" "))));
+ }
+ get es2019() {
+ var _a;
+ return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" "))));
+ }
+ get es2020() {
+ var _a;
+ return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" "))));
+ }
+ get es2021() {
+ var _a;
+ return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" "))));
+ }
+ get es2022() {
+ var _a;
+ return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" "))));
+ }
+ get es2023() {
+ var _a;
+ return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" "))));
+ }
+ get es2024() {
+ var _a;
+ return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" "))));
+ }
+}
+const gcNameSet = new Set(["General_Category", "gc"]);
+const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]);
+const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "");
+const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz", "");
+const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "");
+function isValidUnicodeProperty(version, name, value) {
+ if (gcNameSet.has(name)) {
+ return version >= 2018 && gcValueSets.es2018.has(value);
+ }
+ if (scNameSet.has(name)) {
+ return ((version >= 2018 && scValueSets.es2018.has(value)) ||
+ (version >= 2019 && scValueSets.es2019.has(value)) ||
+ (version >= 2020 && scValueSets.es2020.has(value)) ||
+ (version >= 2021 && scValueSets.es2021.has(value)) ||
+ (version >= 2022 && scValueSets.es2022.has(value)) ||
+ (version >= 2023 && scValueSets.es2023.has(value)));
+ }
+ return false;
+}
+function isValidLoneUnicodeProperty(version, value) {
+ return ((version >= 2018 && binPropertySets.es2018.has(value)) ||
+ (version >= 2019 && binPropertySets.es2019.has(value)) ||
+ (version >= 2021 && binPropertySets.es2021.has(value)));
+}
+
+const BACKSPACE = 0x08;
+const CHARACTER_TABULATION = 0x09;
+const LINE_FEED = 0x0a;
+const LINE_TABULATION = 0x0b;
+const FORM_FEED = 0x0c;
+const CARRIAGE_RETURN = 0x0d;
+const EXCLAMATION_MARK = 0x21;
+const NUMBER_SIGN = 0x23;
+const DOLLAR_SIGN = 0x24;
+const PERCENT_SIGN = 0x25;
+const AMPERSAND = 0x26;
+const LEFT_PARENTHESIS = 0x28;
+const RIGHT_PARENTHESIS = 0x29;
+const ASTERISK = 0x2a;
+const PLUS_SIGN = 0x2b;
+const COMMA = 0x2c;
+const HYPHEN_MINUS = 0x2d;
+const FULL_STOP = 0x2e;
+const SOLIDUS = 0x2f;
+const DIGIT_ZERO = 0x30;
+const DIGIT_ONE = 0x31;
+const DIGIT_SEVEN = 0x37;
+const DIGIT_NINE = 0x39;
+const COLON = 0x3a;
+const SEMICOLON = 0x3b;
+const LESS_THAN_SIGN = 0x3c;
+const EQUALS_SIGN = 0x3d;
+const GREATER_THAN_SIGN = 0x3e;
+const QUESTION_MARK = 0x3f;
+const COMMERCIAL_AT = 0x40;
+const LATIN_CAPITAL_LETTER_A = 0x41;
+const LATIN_CAPITAL_LETTER_B = 0x42;
+const LATIN_CAPITAL_LETTER_D = 0x44;
+const LATIN_CAPITAL_LETTER_F = 0x46;
+const LATIN_CAPITAL_LETTER_P = 0x50;
+const LATIN_CAPITAL_LETTER_S = 0x53;
+const LATIN_CAPITAL_LETTER_W = 0x57;
+const LATIN_CAPITAL_LETTER_Z = 0x5a;
+const LOW_LINE = 0x5f;
+const LATIN_SMALL_LETTER_A = 0x61;
+const LATIN_SMALL_LETTER_B = 0x62;
+const LATIN_SMALL_LETTER_C = 0x63;
+const LATIN_SMALL_LETTER_D = 0x64;
+const LATIN_SMALL_LETTER_F = 0x66;
+const LATIN_SMALL_LETTER_G = 0x67;
+const LATIN_SMALL_LETTER_I = 0x69;
+const LATIN_SMALL_LETTER_K = 0x6b;
+const LATIN_SMALL_LETTER_M = 0x6d;
+const LATIN_SMALL_LETTER_N = 0x6e;
+const LATIN_SMALL_LETTER_P = 0x70;
+const LATIN_SMALL_LETTER_Q = 0x71;
+const LATIN_SMALL_LETTER_R = 0x72;
+const LATIN_SMALL_LETTER_S = 0x73;
+const LATIN_SMALL_LETTER_T = 0x74;
+const LATIN_SMALL_LETTER_U = 0x75;
+const LATIN_SMALL_LETTER_V = 0x76;
+const LATIN_SMALL_LETTER_W = 0x77;
+const LATIN_SMALL_LETTER_X = 0x78;
+const LATIN_SMALL_LETTER_Y = 0x79;
+const LATIN_SMALL_LETTER_Z = 0x7a;
+const LEFT_SQUARE_BRACKET = 0x5b;
+const REVERSE_SOLIDUS = 0x5c;
+const RIGHT_SQUARE_BRACKET = 0x5d;
+const CIRCUMFLEX_ACCENT = 0x5e;
+const GRAVE_ACCENT = 0x60;
+const LEFT_CURLY_BRACKET = 0x7b;
+const VERTICAL_LINE = 0x7c;
+const RIGHT_CURLY_BRACKET = 0x7d;
+const TILDE = 0x7e;
+const ZERO_WIDTH_NON_JOINER = 0x200c;
+const ZERO_WIDTH_JOINER = 0x200d;
+const LINE_SEPARATOR = 0x2028;
+const PARAGRAPH_SEPARATOR = 0x2029;
+const MIN_CODE_POINT = 0x00;
+const MAX_CODE_POINT = 0x10ffff;
+function isLatinLetter(code) {
+ return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) ||
+ (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z));
+}
+function isDecimalDigit(code) {
+ return code >= DIGIT_ZERO && code <= DIGIT_NINE;
+}
+function isOctalDigit(code) {
+ return code >= DIGIT_ZERO && code <= DIGIT_SEVEN;
+}
+function isHexDigit(code) {
+ return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) ||
+ (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) ||
+ (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F));
+}
+function isLineTerminator(code) {
+ return (code === LINE_FEED ||
+ code === CARRIAGE_RETURN ||
+ code === LINE_SEPARATOR ||
+ code === PARAGRAPH_SEPARATOR);
+}
+function isValidUnicode(code) {
+ return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT;
+}
+function digitToInt(code) {
+ if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) {
+ return code - LATIN_SMALL_LETTER_A + 10;
+ }
+ if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) {
+ return code - LATIN_CAPITAL_LETTER_A + 10;
+ }
+ return code - DIGIT_ZERO;
+}
+function isLeadSurrogate(code) {
+ return code >= 0xd800 && code <= 0xdbff;
+}
+function isTrailSurrogate(code) {
+ return code >= 0xdc00 && code <= 0xdfff;
+}
+function combineSurrogatePair(lead, trail) {
+ return (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000;
+}
+
+const legacyImpl = {
+ at(s, end, i) {
+ return i < end ? s.charCodeAt(i) : -1;
+ },
+ width(c) {
+ return 1;
+ },
+};
+const unicodeImpl = {
+ at(s, end, i) {
+ return i < end ? s.codePointAt(i) : -1;
+ },
+ width(c) {
+ return c > 0xffff ? 2 : 1;
+ },
+};
+class Reader {
+ constructor() {
+ this._impl = legacyImpl;
+ this._s = "";
+ this._i = 0;
+ this._end = 0;
+ this._cp1 = -1;
+ this._w1 = 1;
+ this._cp2 = -1;
+ this._w2 = 1;
+ this._cp3 = -1;
+ this._w3 = 1;
+ this._cp4 = -1;
+ }
+ get source() {
+ return this._s;
+ }
+ get index() {
+ return this._i;
+ }
+ get currentCodePoint() {
+ return this._cp1;
+ }
+ get nextCodePoint() {
+ return this._cp2;
+ }
+ get nextCodePoint2() {
+ return this._cp3;
+ }
+ get nextCodePoint3() {
+ return this._cp4;
+ }
+ reset(source, start, end, uFlag) {
+ this._impl = uFlag ? unicodeImpl : legacyImpl;
+ this._s = source;
+ this._end = end;
+ this.rewind(start);
+ }
+ rewind(index) {
+ const impl = this._impl;
+ this._i = index;
+ this._cp1 = impl.at(this._s, this._end, index);
+ this._w1 = impl.width(this._cp1);
+ this._cp2 = impl.at(this._s, this._end, index + this._w1);
+ this._w2 = impl.width(this._cp2);
+ this._cp3 = impl.at(this._s, this._end, index + this._w1 + this._w2);
+ this._w3 = impl.width(this._cp3);
+ this._cp4 = impl.at(this._s, this._end, index + this._w1 + this._w2 + this._w3);
+ }
+ advance() {
+ if (this._cp1 !== -1) {
+ const impl = this._impl;
+ this._i += this._w1;
+ this._cp1 = this._cp2;
+ this._w1 = this._w2;
+ this._cp2 = this._cp3;
+ this._w2 = impl.width(this._cp2);
+ this._cp3 = this._cp4;
+ this._w3 = impl.width(this._cp3);
+ this._cp4 = impl.at(this._s, this._end, this._i + this._w1 + this._w2 + this._w3);
+ }
+ }
+ eat(cp) {
+ if (this._cp1 === cp) {
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eat2(cp1, cp2) {
+ if (this._cp1 === cp1 && this._cp2 === cp2) {
+ this.advance();
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eat3(cp1, cp2, cp3) {
+ if (this._cp1 === cp1 && this._cp2 === cp2 && this._cp3 === cp3) {
+ this.advance();
+ this.advance();
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+}
+
+class RegExpSyntaxError extends SyntaxError {
+ constructor(srcCtx, flags, index, message) {
+ let source = "";
+ if (srcCtx.kind === "literal") {
+ const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end);
+ if (literal) {
+ source = `: ${literal}`;
+ }
+ }
+ else if (srcCtx.kind === "pattern") {
+ const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end);
+ const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`;
+ source = `: /${pattern}/${flagsText}`;
+ }
+ super(`Invalid regular expression${source}: ${message}`);
+ this.index = index;
+ }
+}
+
+const binPropertyOfStringSets = new Set([
+ "Basic_Emoji",
+ "Emoji_Keycap_Sequence",
+ "RGI_Emoji_Modifier_Sequence",
+ "RGI_Emoji_Flag_Sequence",
+ "RGI_Emoji_Tag_Sequence",
+ "RGI_Emoji_ZWJ_Sequence",
+ "RGI_Emoji",
+]);
+function isValidLoneUnicodePropertyOfString(version, value) {
+ return version >= 2024 && binPropertyOfStringSets.has(value);
+}
+
+const SYNTAX_CHARACTER = new Set([
+ CIRCUMFLEX_ACCENT,
+ DOLLAR_SIGN,
+ REVERSE_SOLIDUS,
+ FULL_STOP,
+ ASTERISK,
+ PLUS_SIGN,
+ QUESTION_MARK,
+ LEFT_PARENTHESIS,
+ RIGHT_PARENTHESIS,
+ LEFT_SQUARE_BRACKET,
+ RIGHT_SQUARE_BRACKET,
+ LEFT_CURLY_BRACKET,
+ RIGHT_CURLY_BRACKET,
+ VERTICAL_LINE,
+]);
+const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([
+ AMPERSAND,
+ EXCLAMATION_MARK,
+ NUMBER_SIGN,
+ DOLLAR_SIGN,
+ PERCENT_SIGN,
+ ASTERISK,
+ PLUS_SIGN,
+ COMMA,
+ FULL_STOP,
+ COLON,
+ SEMICOLON,
+ LESS_THAN_SIGN,
+ EQUALS_SIGN,
+ GREATER_THAN_SIGN,
+ QUESTION_MARK,
+ COMMERCIAL_AT,
+ CIRCUMFLEX_ACCENT,
+ GRAVE_ACCENT,
+ TILDE,
+]);
+const CLASS_SET_SYNTAX_CHARACTER = new Set([
+ LEFT_PARENTHESIS,
+ RIGHT_PARENTHESIS,
+ LEFT_SQUARE_BRACKET,
+ RIGHT_SQUARE_BRACKET,
+ LEFT_CURLY_BRACKET,
+ RIGHT_CURLY_BRACKET,
+ SOLIDUS,
+ HYPHEN_MINUS,
+ REVERSE_SOLIDUS,
+ VERTICAL_LINE,
+]);
+const CLASS_SET_RESERVED_PUNCTUATOR = new Set([
+ AMPERSAND,
+ HYPHEN_MINUS,
+ EXCLAMATION_MARK,
+ NUMBER_SIGN,
+ PERCENT_SIGN,
+ COMMA,
+ COLON,
+ SEMICOLON,
+ LESS_THAN_SIGN,
+ EQUALS_SIGN,
+ GREATER_THAN_SIGN,
+ COMMERCIAL_AT,
+ GRAVE_ACCENT,
+ TILDE,
+]);
+function isSyntaxCharacter(cp) {
+ return SYNTAX_CHARACTER.has(cp);
+}
+function isClassSetReservedDoublePunctuatorCharacter(cp) {
+ return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp);
+}
+function isClassSetSyntaxCharacter(cp) {
+ return CLASS_SET_SYNTAX_CHARACTER.has(cp);
+}
+function isClassSetReservedPunctuator(cp) {
+ return CLASS_SET_RESERVED_PUNCTUATOR.has(cp);
+}
+function isIdentifierStartChar(cp) {
+ return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE;
+}
+function isIdentifierPartChar(cp) {
+ return (isIdContinue(cp) ||
+ cp === DOLLAR_SIGN ||
+ cp === ZERO_WIDTH_NON_JOINER ||
+ cp === ZERO_WIDTH_JOINER);
+}
+function isUnicodePropertyNameCharacter(cp) {
+ return isLatinLetter(cp) || cp === LOW_LINE;
+}
+function isUnicodePropertyValueCharacter(cp) {
+ return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp);
+}
+class RegExpValidator {
+ constructor(options) {
+ this._reader = new Reader();
+ this._unicodeMode = false;
+ this._unicodeSetsMode = false;
+ this._nFlag = false;
+ this._lastIntValue = 0;
+ this._lastRange = {
+ min: 0,
+ max: Number.POSITIVE_INFINITY,
+ };
+ this._lastStrValue = "";
+ this._lastAssertionIsQuantifiable = false;
+ this._numCapturingParens = 0;
+ this._groupNames = new Set();
+ this._backreferenceNames = new Set();
+ this._srcCtx = null;
+ this._options = options !== null && options !== void 0 ? options : {};
+ }
+ validateLiteral(source, start = 0, end = source.length) {
+ this._srcCtx = { source, start, end, kind: "literal" };
+ this._unicodeSetsMode = this._unicodeMode = this._nFlag = false;
+ this.reset(source, start, end);
+ this.onLiteralEnter(start);
+ if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) {
+ const flagStart = this.index;
+ const unicode = source.includes("u", flagStart);
+ const unicodeSets = source.includes("v", flagStart);
+ this.validateFlagsInternal(source, flagStart, end);
+ this.validatePatternInternal(source, start + 1, flagStart - 1, {
+ unicode,
+ unicodeSets,
+ });
+ }
+ else if (start >= end) {
+ this.raise("Empty");
+ }
+ else {
+ const c = String.fromCodePoint(this.currentCodePoint);
+ this.raise(`Unexpected character '${c}'`);
+ }
+ this.onLiteralLeave(start, end);
+ }
+ validateFlags(source, start = 0, end = source.length) {
+ this._srcCtx = { source, start, end, kind: "flags" };
+ this.validateFlagsInternal(source, start, end);
+ }
+ validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ this._srcCtx = { source, start, end, kind: "pattern" };
+ this.validatePatternInternal(source, start, end, uFlagOrFlags);
+ }
+ validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end);
+ this._unicodeMode = mode.unicodeMode;
+ this._nFlag = mode.nFlag;
+ this._unicodeSetsMode = mode.unicodeSetsMode;
+ this.reset(source, start, end);
+ this.consumePattern();
+ if (!this._nFlag &&
+ this.ecmaVersion >= 2018 &&
+ this._groupNames.size > 0) {
+ this._nFlag = true;
+ this.rewind(start);
+ this.consumePattern();
+ }
+ }
+ validateFlagsInternal(source, start, end) {
+ const existingFlags = new Set();
+ let global = false;
+ let ignoreCase = false;
+ let multiline = false;
+ let sticky = false;
+ let unicode = false;
+ let dotAll = false;
+ let hasIndices = false;
+ let unicodeSets = false;
+ for (let i = start; i < end; ++i) {
+ const flag = source.charCodeAt(i);
+ if (existingFlags.has(flag)) {
+ this.raise(`Duplicated flag '${source[i]}'`, { index: start });
+ }
+ existingFlags.add(flag);
+ if (flag === LATIN_SMALL_LETTER_G) {
+ global = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_I) {
+ ignoreCase = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_M) {
+ multiline = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_U &&
+ this.ecmaVersion >= 2015) {
+ unicode = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_Y &&
+ this.ecmaVersion >= 2015) {
+ sticky = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_S &&
+ this.ecmaVersion >= 2018) {
+ dotAll = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_D &&
+ this.ecmaVersion >= 2022) {
+ hasIndices = true;
+ }
+ else if (flag === LATIN_SMALL_LETTER_V &&
+ this.ecmaVersion >= 2024) {
+ unicodeSets = true;
+ }
+ else {
+ this.raise(`Invalid flag '${source[i]}'`, { index: start });
+ }
+ }
+ this.onRegExpFlags(start, end, {
+ global,
+ ignoreCase,
+ multiline,
+ unicode,
+ sticky,
+ dotAll,
+ hasIndices,
+ unicodeSets,
+ });
+ }
+ _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) {
+ let unicode = false;
+ let unicodeSets = false;
+ if (uFlagOrFlags && this.ecmaVersion >= 2015) {
+ if (typeof uFlagOrFlags === "object") {
+ unicode = Boolean(uFlagOrFlags.unicode);
+ if (this.ecmaVersion >= 2024) {
+ unicodeSets = Boolean(uFlagOrFlags.unicodeSets);
+ }
+ }
+ else {
+ unicode = uFlagOrFlags;
+ }
+ }
+ if (unicode && unicodeSets) {
+ this.raise("Invalid regular expression flags", {
+ index: sourceEnd + 1,
+ unicode,
+ unicodeSets,
+ });
+ }
+ const unicodeMode = unicode || unicodeSets;
+ const nFlag = (unicode && this.ecmaVersion >= 2018) ||
+ unicodeSets ||
+ Boolean(this._options.strict && this.ecmaVersion >= 2023);
+ const unicodeSetsMode = unicodeSets;
+ return { unicodeMode, nFlag, unicodeSetsMode };
+ }
+ get strict() {
+ return Boolean(this._options.strict) || this._unicodeMode;
+ }
+ get ecmaVersion() {
+ var _a;
+ return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion;
+ }
+ onLiteralEnter(start) {
+ if (this._options.onLiteralEnter) {
+ this._options.onLiteralEnter(start);
+ }
+ }
+ onLiteralLeave(start, end) {
+ if (this._options.onLiteralLeave) {
+ this._options.onLiteralLeave(start, end);
+ }
+ }
+ onRegExpFlags(start, end, flags) {
+ if (this._options.onRegExpFlags) {
+ this._options.onRegExpFlags(start, end, flags);
+ }
+ if (this._options.onFlags) {
+ this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices);
+ }
+ }
+ onPatternEnter(start) {
+ if (this._options.onPatternEnter) {
+ this._options.onPatternEnter(start);
+ }
+ }
+ onPatternLeave(start, end) {
+ if (this._options.onPatternLeave) {
+ this._options.onPatternLeave(start, end);
+ }
+ }
+ onDisjunctionEnter(start) {
+ if (this._options.onDisjunctionEnter) {
+ this._options.onDisjunctionEnter(start);
+ }
+ }
+ onDisjunctionLeave(start, end) {
+ if (this._options.onDisjunctionLeave) {
+ this._options.onDisjunctionLeave(start, end);
+ }
+ }
+ onAlternativeEnter(start, index) {
+ if (this._options.onAlternativeEnter) {
+ this._options.onAlternativeEnter(start, index);
+ }
+ }
+ onAlternativeLeave(start, end, index) {
+ if (this._options.onAlternativeLeave) {
+ this._options.onAlternativeLeave(start, end, index);
+ }
+ }
+ onGroupEnter(start) {
+ if (this._options.onGroupEnter) {
+ this._options.onGroupEnter(start);
+ }
+ }
+ onGroupLeave(start, end) {
+ if (this._options.onGroupLeave) {
+ this._options.onGroupLeave(start, end);
+ }
+ }
+ onCapturingGroupEnter(start, name) {
+ if (this._options.onCapturingGroupEnter) {
+ this._options.onCapturingGroupEnter(start, name);
+ }
+ }
+ onCapturingGroupLeave(start, end, name) {
+ if (this._options.onCapturingGroupLeave) {
+ this._options.onCapturingGroupLeave(start, end, name);
+ }
+ }
+ onQuantifier(start, end, min, max, greedy) {
+ if (this._options.onQuantifier) {
+ this._options.onQuantifier(start, end, min, max, greedy);
+ }
+ }
+ onLookaroundAssertionEnter(start, kind, negate) {
+ if (this._options.onLookaroundAssertionEnter) {
+ this._options.onLookaroundAssertionEnter(start, kind, negate);
+ }
+ }
+ onLookaroundAssertionLeave(start, end, kind, negate) {
+ if (this._options.onLookaroundAssertionLeave) {
+ this._options.onLookaroundAssertionLeave(start, end, kind, negate);
+ }
+ }
+ onEdgeAssertion(start, end, kind) {
+ if (this._options.onEdgeAssertion) {
+ this._options.onEdgeAssertion(start, end, kind);
+ }
+ }
+ onWordBoundaryAssertion(start, end, kind, negate) {
+ if (this._options.onWordBoundaryAssertion) {
+ this._options.onWordBoundaryAssertion(start, end, kind, negate);
+ }
+ }
+ onAnyCharacterSet(start, end, kind) {
+ if (this._options.onAnyCharacterSet) {
+ this._options.onAnyCharacterSet(start, end, kind);
+ }
+ }
+ onEscapeCharacterSet(start, end, kind, negate) {
+ if (this._options.onEscapeCharacterSet) {
+ this._options.onEscapeCharacterSet(start, end, kind, negate);
+ }
+ }
+ onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) {
+ if (this._options.onUnicodePropertyCharacterSet) {
+ this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings);
+ }
+ }
+ onCharacter(start, end, value) {
+ if (this._options.onCharacter) {
+ this._options.onCharacter(start, end, value);
+ }
+ }
+ onBackreference(start, end, ref) {
+ if (this._options.onBackreference) {
+ this._options.onBackreference(start, end, ref);
+ }
+ }
+ onCharacterClassEnter(start, negate, unicodeSets) {
+ if (this._options.onCharacterClassEnter) {
+ this._options.onCharacterClassEnter(start, negate, unicodeSets);
+ }
+ }
+ onCharacterClassLeave(start, end, negate) {
+ if (this._options.onCharacterClassLeave) {
+ this._options.onCharacterClassLeave(start, end, negate);
+ }
+ }
+ onCharacterClassRange(start, end, min, max) {
+ if (this._options.onCharacterClassRange) {
+ this._options.onCharacterClassRange(start, end, min, max);
+ }
+ }
+ onClassIntersection(start, end) {
+ if (this._options.onClassIntersection) {
+ this._options.onClassIntersection(start, end);
+ }
+ }
+ onClassSubtraction(start, end) {
+ if (this._options.onClassSubtraction) {
+ this._options.onClassSubtraction(start, end);
+ }
+ }
+ onClassStringDisjunctionEnter(start) {
+ if (this._options.onClassStringDisjunctionEnter) {
+ this._options.onClassStringDisjunctionEnter(start);
+ }
+ }
+ onClassStringDisjunctionLeave(start, end) {
+ if (this._options.onClassStringDisjunctionLeave) {
+ this._options.onClassStringDisjunctionLeave(start, end);
+ }
+ }
+ onStringAlternativeEnter(start, index) {
+ if (this._options.onStringAlternativeEnter) {
+ this._options.onStringAlternativeEnter(start, index);
+ }
+ }
+ onStringAlternativeLeave(start, end, index) {
+ if (this._options.onStringAlternativeLeave) {
+ this._options.onStringAlternativeLeave(start, end, index);
+ }
+ }
+ get index() {
+ return this._reader.index;
+ }
+ get currentCodePoint() {
+ return this._reader.currentCodePoint;
+ }
+ get nextCodePoint() {
+ return this._reader.nextCodePoint;
+ }
+ get nextCodePoint2() {
+ return this._reader.nextCodePoint2;
+ }
+ get nextCodePoint3() {
+ return this._reader.nextCodePoint3;
+ }
+ reset(source, start, end) {
+ this._reader.reset(source, start, end, this._unicodeMode);
+ }
+ rewind(index) {
+ this._reader.rewind(index);
+ }
+ advance() {
+ this._reader.advance();
+ }
+ eat(cp) {
+ return this._reader.eat(cp);
+ }
+ eat2(cp1, cp2) {
+ return this._reader.eat2(cp1, cp2);
+ }
+ eat3(cp1, cp2, cp3) {
+ return this._reader.eat3(cp1, cp2, cp3);
+ }
+ raise(message, context) {
+ var _a, _b, _c;
+ throw new RegExpSyntaxError(this._srcCtx, {
+ unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode),
+ unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode,
+ }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message);
+ }
+ eatRegExpBody() {
+ const start = this.index;
+ let inClass = false;
+ let escaped = false;
+ for (;;) {
+ const cp = this.currentCodePoint;
+ if (cp === -1 || isLineTerminator(cp)) {
+ const kind = inClass ? "character class" : "regular expression";
+ this.raise(`Unterminated ${kind}`);
+ }
+ if (escaped) {
+ escaped = false;
+ }
+ else if (cp === REVERSE_SOLIDUS) {
+ escaped = true;
+ }
+ else if (cp === LEFT_SQUARE_BRACKET) {
+ inClass = true;
+ }
+ else if (cp === RIGHT_SQUARE_BRACKET) {
+ inClass = false;
+ }
+ else if ((cp === SOLIDUS && !inClass) ||
+ (cp === ASTERISK && this.index === start)) {
+ break;
+ }
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ consumePattern() {
+ const start = this.index;
+ this._numCapturingParens = this.countCapturingParens();
+ this._groupNames.clear();
+ this._backreferenceNames.clear();
+ this.onPatternEnter(start);
+ this.consumeDisjunction();
+ const cp = this.currentCodePoint;
+ if (this.currentCodePoint !== -1) {
+ if (cp === RIGHT_PARENTHESIS) {
+ this.raise("Unmatched ')'");
+ }
+ if (cp === REVERSE_SOLIDUS) {
+ this.raise("\\ at end of pattern");
+ }
+ if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) {
+ this.raise("Lone quantifier brackets");
+ }
+ const c = String.fromCodePoint(cp);
+ this.raise(`Unexpected character '${c}'`);
+ }
+ for (const name of this._backreferenceNames) {
+ if (!this._groupNames.has(name)) {
+ this.raise("Invalid named capture referenced");
+ }
+ }
+ this.onPatternLeave(start, this.index);
+ }
+ countCapturingParens() {
+ const start = this.index;
+ let inClass = false;
+ let escaped = false;
+ let count = 0;
+ let cp = 0;
+ while ((cp = this.currentCodePoint) !== -1) {
+ if (escaped) {
+ escaped = false;
+ }
+ else if (cp === REVERSE_SOLIDUS) {
+ escaped = true;
+ }
+ else if (cp === LEFT_SQUARE_BRACKET) {
+ inClass = true;
+ }
+ else if (cp === RIGHT_SQUARE_BRACKET) {
+ inClass = false;
+ }
+ else if (cp === LEFT_PARENTHESIS &&
+ !inClass &&
+ (this.nextCodePoint !== QUESTION_MARK ||
+ (this.nextCodePoint2 === LESS_THAN_SIGN &&
+ this.nextCodePoint3 !== EQUALS_SIGN &&
+ this.nextCodePoint3 !== EXCLAMATION_MARK))) {
+ count += 1;
+ }
+ this.advance();
+ }
+ this.rewind(start);
+ return count;
+ }
+ consumeDisjunction() {
+ const start = this.index;
+ let i = 0;
+ this.onDisjunctionEnter(start);
+ do {
+ this.consumeAlternative(i++);
+ } while (this.eat(VERTICAL_LINE));
+ if (this.consumeQuantifier(true)) {
+ this.raise("Nothing to repeat");
+ }
+ if (this.eat(LEFT_CURLY_BRACKET)) {
+ this.raise("Lone quantifier brackets");
+ }
+ this.onDisjunctionLeave(start, this.index);
+ }
+ consumeAlternative(i) {
+ const start = this.index;
+ this.onAlternativeEnter(start, i);
+ while (this.currentCodePoint !== -1 && this.consumeTerm()) {
+ }
+ this.onAlternativeLeave(start, this.index, i);
+ }
+ consumeTerm() {
+ if (this._unicodeMode || this.strict) {
+ return (this.consumeAssertion() ||
+ (this.consumeAtom() && this.consumeOptionalQuantifier()));
+ }
+ return ((this.consumeAssertion() &&
+ (!this._lastAssertionIsQuantifiable ||
+ this.consumeOptionalQuantifier())) ||
+ (this.consumeExtendedAtom() && this.consumeOptionalQuantifier()));
+ }
+ consumeOptionalQuantifier() {
+ this.consumeQuantifier();
+ return true;
+ }
+ consumeAssertion() {
+ const start = this.index;
+ this._lastAssertionIsQuantifiable = false;
+ if (this.eat(CIRCUMFLEX_ACCENT)) {
+ this.onEdgeAssertion(start, this.index, "start");
+ return true;
+ }
+ if (this.eat(DOLLAR_SIGN)) {
+ this.onEdgeAssertion(start, this.index, "end");
+ return true;
+ }
+ if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) {
+ this.onWordBoundaryAssertion(start, this.index, "word", true);
+ return true;
+ }
+ if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) {
+ this.onWordBoundaryAssertion(start, this.index, "word", false);
+ return true;
+ }
+ if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) {
+ const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN);
+ let negate = false;
+ if (this.eat(EQUALS_SIGN) ||
+ (negate = this.eat(EXCLAMATION_MARK))) {
+ const kind = lookbehind ? "lookbehind" : "lookahead";
+ this.onLookaroundAssertionEnter(start, kind, negate);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this._lastAssertionIsQuantifiable = !lookbehind && !this.strict;
+ this.onLookaroundAssertionLeave(start, this.index, kind, negate);
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeQuantifier(noConsume = false) {
+ const start = this.index;
+ let min = 0;
+ let max = 0;
+ let greedy = false;
+ if (this.eat(ASTERISK)) {
+ min = 0;
+ max = Number.POSITIVE_INFINITY;
+ }
+ else if (this.eat(PLUS_SIGN)) {
+ min = 1;
+ max = Number.POSITIVE_INFINITY;
+ }
+ else if (this.eat(QUESTION_MARK)) {
+ min = 0;
+ max = 1;
+ }
+ else if (this.eatBracedQuantifier(noConsume)) {
+ ({ min, max } = this._lastRange);
+ }
+ else {
+ return false;
+ }
+ greedy = !this.eat(QUESTION_MARK);
+ if (!noConsume) {
+ this.onQuantifier(start, this.index, min, max, greedy);
+ }
+ return true;
+ }
+ eatBracedQuantifier(noError) {
+ const start = this.index;
+ if (this.eat(LEFT_CURLY_BRACKET)) {
+ if (this.eatDecimalDigits()) {
+ const min = this._lastIntValue;
+ let max = min;
+ if (this.eat(COMMA)) {
+ max = this.eatDecimalDigits()
+ ? this._lastIntValue
+ : Number.POSITIVE_INFINITY;
+ }
+ if (this.eat(RIGHT_CURLY_BRACKET)) {
+ if (!noError && max < min) {
+ this.raise("numbers out of order in {} quantifier");
+ }
+ this._lastRange = { min, max };
+ return true;
+ }
+ }
+ if (!noError && (this._unicodeMode || this.strict)) {
+ this.raise("Incomplete quantifier");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeAtom() {
+ return (this.consumePatternCharacter() ||
+ this.consumeDot() ||
+ this.consumeReverseSolidusAtomEscape() ||
+ Boolean(this.consumeCharacterClass()) ||
+ this.consumeUncapturingGroup() ||
+ this.consumeCapturingGroup());
+ }
+ consumeDot() {
+ if (this.eat(FULL_STOP)) {
+ this.onAnyCharacterSet(this.index - 1, this.index, "any");
+ return true;
+ }
+ return false;
+ }
+ consumeReverseSolidusAtomEscape() {
+ const start = this.index;
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeAtomEscape()) {
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeUncapturingGroup() {
+ const start = this.index;
+ if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) {
+ this.onGroupEnter(start);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this.onGroupLeave(start, this.index);
+ return true;
+ }
+ return false;
+ }
+ consumeCapturingGroup() {
+ const start = this.index;
+ if (this.eat(LEFT_PARENTHESIS)) {
+ let name = null;
+ if (this.ecmaVersion >= 2018) {
+ if (this.consumeGroupSpecifier()) {
+ name = this._lastStrValue;
+ }
+ }
+ else if (this.currentCodePoint === QUESTION_MARK) {
+ this.raise("Invalid group");
+ }
+ this.onCapturingGroupEnter(start, name);
+ this.consumeDisjunction();
+ if (!this.eat(RIGHT_PARENTHESIS)) {
+ this.raise("Unterminated group");
+ }
+ this.onCapturingGroupLeave(start, this.index, name);
+ return true;
+ }
+ return false;
+ }
+ consumeExtendedAtom() {
+ return (this.consumeDot() ||
+ this.consumeReverseSolidusAtomEscape() ||
+ this.consumeReverseSolidusFollowedByC() ||
+ Boolean(this.consumeCharacterClass()) ||
+ this.consumeUncapturingGroup() ||
+ this.consumeCapturingGroup() ||
+ this.consumeInvalidBracedQuantifier() ||
+ this.consumeExtendedPatternCharacter());
+ }
+ consumeReverseSolidusFollowedByC() {
+ const start = this.index;
+ if (this.currentCodePoint === REVERSE_SOLIDUS &&
+ this.nextCodePoint === LATIN_SMALL_LETTER_C) {
+ this._lastIntValue = this.currentCodePoint;
+ this.advance();
+ this.onCharacter(start, this.index, REVERSE_SOLIDUS);
+ return true;
+ }
+ return false;
+ }
+ consumeInvalidBracedQuantifier() {
+ if (this.eatBracedQuantifier(true)) {
+ this.raise("Nothing to repeat");
+ }
+ return false;
+ }
+ consumePatternCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 && !isSyntaxCharacter(cp)) {
+ this.advance();
+ this.onCharacter(start, this.index, cp);
+ return true;
+ }
+ return false;
+ }
+ consumeExtendedPatternCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 &&
+ cp !== CIRCUMFLEX_ACCENT &&
+ cp !== DOLLAR_SIGN &&
+ cp !== REVERSE_SOLIDUS &&
+ cp !== FULL_STOP &&
+ cp !== ASTERISK &&
+ cp !== PLUS_SIGN &&
+ cp !== QUESTION_MARK &&
+ cp !== LEFT_PARENTHESIS &&
+ cp !== RIGHT_PARENTHESIS &&
+ cp !== LEFT_SQUARE_BRACKET &&
+ cp !== VERTICAL_LINE) {
+ this.advance();
+ this.onCharacter(start, this.index, cp);
+ return true;
+ }
+ return false;
+ }
+ consumeGroupSpecifier() {
+ if (this.eat(QUESTION_MARK)) {
+ if (this.eatGroupName()) {
+ if (!this._groupNames.has(this._lastStrValue)) {
+ this._groupNames.add(this._lastStrValue);
+ return true;
+ }
+ this.raise("Duplicate capture group name");
+ }
+ this.raise("Invalid group");
+ }
+ return false;
+ }
+ consumeAtomEscape() {
+ if (this.consumeBackreference() ||
+ this.consumeCharacterClassEscape() ||
+ this.consumeCharacterEscape() ||
+ (this._nFlag && this.consumeKGroupName())) {
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ return false;
+ }
+ consumeBackreference() {
+ const start = this.index;
+ if (this.eatDecimalEscape()) {
+ const n = this._lastIntValue;
+ if (n <= this._numCapturingParens) {
+ this.onBackreference(start - 1, this.index, n);
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeCharacterClassEscape() {
+ var _a;
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_D)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "digit", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_D)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "digit", true);
+ return {};
+ }
+ if (this.eat(LATIN_SMALL_LETTER_S)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "space", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_S)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "space", true);
+ return {};
+ }
+ if (this.eat(LATIN_SMALL_LETTER_W)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "word", false);
+ return {};
+ }
+ if (this.eat(LATIN_CAPITAL_LETTER_W)) {
+ this._lastIntValue = -1;
+ this.onEscapeCharacterSet(start - 1, this.index, "word", true);
+ return {};
+ }
+ let negate = false;
+ if (this._unicodeMode &&
+ this.ecmaVersion >= 2018 &&
+ (this.eat(LATIN_SMALL_LETTER_P) ||
+ (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) {
+ this._lastIntValue = -1;
+ let result = null;
+ if (this.eat(LEFT_CURLY_BRACKET) &&
+ (result = this.eatUnicodePropertyValueExpression()) &&
+ this.eat(RIGHT_CURLY_BRACKET)) {
+ if (negate && result.strings) {
+ this.raise("Invalid property name");
+ }
+ this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false);
+ return { mayContainStrings: result.strings };
+ }
+ this.raise("Invalid property name");
+ }
+ return null;
+ }
+ consumeCharacterEscape() {
+ const start = this.index;
+ if (this.eatControlEscape() ||
+ this.eatCControlLetter() ||
+ this.eatZero() ||
+ this.eatHexEscapeSequence() ||
+ this.eatRegExpUnicodeEscapeSequence() ||
+ (!this.strict &&
+ !this._unicodeMode &&
+ this.eatLegacyOctalEscapeSequence()) ||
+ this.eatIdentityEscape()) {
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ return false;
+ }
+ consumeKGroupName() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_K)) {
+ if (this.eatGroupName()) {
+ const groupName = this._lastStrValue;
+ this._backreferenceNames.add(groupName);
+ this.onBackreference(start - 1, this.index, groupName);
+ return true;
+ }
+ this.raise("Invalid named reference");
+ }
+ return false;
+ }
+ consumeCharacterClass() {
+ const start = this.index;
+ if (this.eat(LEFT_SQUARE_BRACKET)) {
+ const negate = this.eat(CIRCUMFLEX_ACCENT);
+ this.onCharacterClassEnter(start, negate, this._unicodeSetsMode);
+ const result = this.consumeClassContents();
+ if (!this.eat(RIGHT_SQUARE_BRACKET)) {
+ if (this.currentCodePoint === -1) {
+ this.raise("Unterminated character class");
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (negate && result.mayContainStrings) {
+ this.raise("Negated character class may contain strings");
+ }
+ this.onCharacterClassLeave(start, this.index, negate);
+ return result;
+ }
+ return null;
+ }
+ consumeClassContents() {
+ if (this._unicodeSetsMode) {
+ if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) {
+ return {};
+ }
+ const result = this.consumeClassSetExpression();
+ return result;
+ }
+ const strict = this.strict || this._unicodeMode;
+ for (;;) {
+ const rangeStart = this.index;
+ if (!this.consumeClassAtom()) {
+ break;
+ }
+ const min = this._lastIntValue;
+ if (!this.eat(HYPHEN_MINUS)) {
+ continue;
+ }
+ this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS);
+ if (!this.consumeClassAtom()) {
+ break;
+ }
+ const max = this._lastIntValue;
+ if (min === -1 || max === -1) {
+ if (strict) {
+ this.raise("Invalid character class");
+ }
+ continue;
+ }
+ if (min > max) {
+ this.raise("Range out of order in character class");
+ }
+ this.onCharacterClassRange(rangeStart, this.index, min, max);
+ }
+ return {};
+ }
+ consumeClassAtom() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== -1 &&
+ cp !== REVERSE_SOLIDUS &&
+ cp !== RIGHT_SQUARE_BRACKET) {
+ this.advance();
+ this._lastIntValue = cp;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeClassEscape()) {
+ return true;
+ }
+ if (!this.strict &&
+ this.currentCodePoint === LATIN_SMALL_LETTER_C) {
+ this._lastIntValue = REVERSE_SOLIDUS;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.strict || this._unicodeMode) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ consumeClassEscape() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_B)) {
+ this._lastIntValue = BACKSPACE;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this._unicodeMode && this.eat(HYPHEN_MINUS)) {
+ this._lastIntValue = HYPHEN_MINUS;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ let cp = 0;
+ if (!this.strict &&
+ !this._unicodeMode &&
+ this.currentCodePoint === LATIN_SMALL_LETTER_C &&
+ (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) {
+ this.advance();
+ this.advance();
+ this._lastIntValue = cp % 0x20;
+ this.onCharacter(start - 1, this.index, this._lastIntValue);
+ return true;
+ }
+ return (Boolean(this.consumeCharacterClassEscape()) ||
+ this.consumeCharacterEscape());
+ }
+ consumeClassSetExpression() {
+ const start = this.index;
+ let mayContainStrings = false;
+ let result = null;
+ if (this.consumeClassSetCharacter()) {
+ if (this.consumeClassSetRangeFromOperator(start)) {
+ this.consumeClassUnionRight({});
+ return {};
+ }
+ mayContainStrings = false;
+ }
+ else if ((result = this.consumeClassSetOperand())) {
+ mayContainStrings = result.mayContainStrings;
+ }
+ else {
+ const cp = this.currentCodePoint;
+ if (cp === REVERSE_SOLIDUS) {
+ this.advance();
+ this.raise("Invalid escape");
+ }
+ if (cp === this.nextCodePoint &&
+ isClassSetReservedDoublePunctuatorCharacter(cp)) {
+ this.raise("Invalid set operation in character class");
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (this.eat2(AMPERSAND, AMPERSAND)) {
+ while (this.currentCodePoint !== AMPERSAND &&
+ (result = this.consumeClassSetOperand())) {
+ this.onClassIntersection(start, this.index);
+ if (!result.mayContainStrings) {
+ mayContainStrings = false;
+ }
+ if (this.eat2(AMPERSAND, AMPERSAND)) {
+ continue;
+ }
+ return { mayContainStrings };
+ }
+ this.raise("Invalid character in character class");
+ }
+ if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) {
+ while (this.consumeClassSetOperand()) {
+ this.onClassSubtraction(start, this.index);
+ if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) {
+ continue;
+ }
+ return { mayContainStrings };
+ }
+ this.raise("Invalid character in character class");
+ }
+ return this.consumeClassUnionRight({ mayContainStrings });
+ }
+ consumeClassUnionRight(leftResult) {
+ let mayContainStrings = leftResult.mayContainStrings;
+ for (;;) {
+ const start = this.index;
+ if (this.consumeClassSetCharacter()) {
+ this.consumeClassSetRangeFromOperator(start);
+ continue;
+ }
+ const result = this.consumeClassSetOperand();
+ if (result) {
+ if (result.mayContainStrings) {
+ mayContainStrings = true;
+ }
+ continue;
+ }
+ break;
+ }
+ return { mayContainStrings };
+ }
+ consumeClassSetRangeFromOperator(start) {
+ const currentStart = this.index;
+ const min = this._lastIntValue;
+ if (this.eat(HYPHEN_MINUS)) {
+ if (this.consumeClassSetCharacter()) {
+ const max = this._lastIntValue;
+ if (min === -1 || max === -1) {
+ this.raise("Invalid character class");
+ }
+ if (min > max) {
+ this.raise("Range out of order in character class");
+ }
+ this.onCharacterClassRange(start, this.index, min, max);
+ return true;
+ }
+ this.rewind(currentStart);
+ }
+ return false;
+ }
+ consumeClassSetOperand() {
+ let result = null;
+ if ((result = this.consumeNestedClass())) {
+ return result;
+ }
+ if ((result = this.consumeClassStringDisjunction())) {
+ return result;
+ }
+ if (this.consumeClassSetCharacter()) {
+ return {};
+ }
+ return null;
+ }
+ consumeNestedClass() {
+ const start = this.index;
+ if (this.eat(LEFT_SQUARE_BRACKET)) {
+ const negate = this.eat(CIRCUMFLEX_ACCENT);
+ this.onCharacterClassEnter(start, negate, true);
+ const result = this.consumeClassContents();
+ if (!this.eat(RIGHT_SQUARE_BRACKET)) {
+ this.raise("Unterminated character class");
+ }
+ if (negate && result.mayContainStrings) {
+ this.raise("Negated character class may contain strings");
+ }
+ this.onCharacterClassLeave(start, this.index, negate);
+ return result;
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ const result = this.consumeCharacterClassEscape();
+ if (result) {
+ return result;
+ }
+ this.rewind(start);
+ }
+ return null;
+ }
+ consumeClassStringDisjunction() {
+ const start = this.index;
+ if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) {
+ this.onClassStringDisjunctionEnter(start);
+ let i = 0;
+ let mayContainStrings = false;
+ do {
+ if (this.consumeClassString(i++).mayContainStrings) {
+ mayContainStrings = true;
+ }
+ } while (this.eat(VERTICAL_LINE));
+ if (this.eat(RIGHT_CURLY_BRACKET)) {
+ this.onClassStringDisjunctionLeave(start, this.index);
+ return { mayContainStrings };
+ }
+ this.raise("Unterminated class string disjunction");
+ }
+ return null;
+ }
+ consumeClassString(i) {
+ const start = this.index;
+ let count = 0;
+ this.onStringAlternativeEnter(start, i);
+ while (this.currentCodePoint !== -1 &&
+ this.consumeClassSetCharacter()) {
+ count++;
+ }
+ this.onStringAlternativeLeave(start, this.index, i);
+ return { mayContainStrings: count !== 1 };
+ }
+ consumeClassSetCharacter() {
+ const start = this.index;
+ const cp = this.currentCodePoint;
+ if (cp !== this.nextCodePoint ||
+ !isClassSetReservedDoublePunctuatorCharacter(cp)) {
+ if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) {
+ this._lastIntValue = cp;
+ this.advance();
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ }
+ if (this.eat(REVERSE_SOLIDUS)) {
+ if (this.consumeCharacterEscape()) {
+ return true;
+ }
+ if (isClassSetReservedPunctuator(this.currentCodePoint)) {
+ this._lastIntValue = this.currentCodePoint;
+ this.advance();
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_B)) {
+ this._lastIntValue = BACKSPACE;
+ this.onCharacter(start, this.index, this._lastIntValue);
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatGroupName() {
+ if (this.eat(LESS_THAN_SIGN)) {
+ if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) {
+ return true;
+ }
+ this.raise("Invalid capture group name");
+ }
+ return false;
+ }
+ eatRegExpIdentifierName() {
+ if (this.eatRegExpIdentifierStart()) {
+ this._lastStrValue = String.fromCodePoint(this._lastIntValue);
+ while (this.eatRegExpIdentifierPart()) {
+ this._lastStrValue += String.fromCodePoint(this._lastIntValue);
+ }
+ return true;
+ }
+ return false;
+ }
+ eatRegExpIdentifierStart() {
+ const start = this.index;
+ const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020;
+ let cp = this.currentCodePoint;
+ this.advance();
+ if (cp === REVERSE_SOLIDUS &&
+ this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
+ cp = this._lastIntValue;
+ }
+ else if (forceUFlag &&
+ isLeadSurrogate(cp) &&
+ isTrailSurrogate(this.currentCodePoint)) {
+ cp = combineSurrogatePair(cp, this.currentCodePoint);
+ this.advance();
+ }
+ if (isIdentifierStartChar(cp)) {
+ this._lastIntValue = cp;
+ return true;
+ }
+ if (this.index !== start) {
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpIdentifierPart() {
+ const start = this.index;
+ const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020;
+ let cp = this.currentCodePoint;
+ this.advance();
+ if (cp === REVERSE_SOLIDUS &&
+ this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
+ cp = this._lastIntValue;
+ }
+ else if (forceUFlag &&
+ isLeadSurrogate(cp) &&
+ isTrailSurrogate(this.currentCodePoint)) {
+ cp = combineSurrogatePair(cp, this.currentCodePoint);
+ this.advance();
+ }
+ if (isIdentifierPartChar(cp)) {
+ this._lastIntValue = cp;
+ return true;
+ }
+ if (this.index !== start) {
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatCControlLetter() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_C)) {
+ if (this.eatControlLetter()) {
+ return true;
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatZero() {
+ if (this.currentCodePoint === DIGIT_ZERO &&
+ !isDecimalDigit(this.nextCodePoint)) {
+ this._lastIntValue = 0;
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ eatControlEscape() {
+ if (this.eat(LATIN_SMALL_LETTER_F)) {
+ this._lastIntValue = FORM_FEED;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_N)) {
+ this._lastIntValue = LINE_FEED;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_R)) {
+ this._lastIntValue = CARRIAGE_RETURN;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_T)) {
+ this._lastIntValue = CHARACTER_TABULATION;
+ return true;
+ }
+ if (this.eat(LATIN_SMALL_LETTER_V)) {
+ this._lastIntValue = LINE_TABULATION;
+ return true;
+ }
+ return false;
+ }
+ eatControlLetter() {
+ const cp = this.currentCodePoint;
+ if (isLatinLetter(cp)) {
+ this.advance();
+ this._lastIntValue = cp % 0x20;
+ return true;
+ }
+ return false;
+ }
+ eatRegExpUnicodeEscapeSequence(forceUFlag = false) {
+ const start = this.index;
+ const uFlag = forceUFlag || this._unicodeMode;
+ if (this.eat(LATIN_SMALL_LETTER_U)) {
+ if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) ||
+ this.eatFixedHexDigits(4) ||
+ (uFlag && this.eatRegExpUnicodeCodePointEscape())) {
+ return true;
+ }
+ if (this.strict || uFlag) {
+ this.raise("Invalid unicode escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpUnicodeSurrogatePairEscape() {
+ const start = this.index;
+ if (this.eatFixedHexDigits(4)) {
+ const lead = this._lastIntValue;
+ if (isLeadSurrogate(lead) &&
+ this.eat(REVERSE_SOLIDUS) &&
+ this.eat(LATIN_SMALL_LETTER_U) &&
+ this.eatFixedHexDigits(4)) {
+ const trail = this._lastIntValue;
+ if (isTrailSurrogate(trail)) {
+ this._lastIntValue = combineSurrogatePair(lead, trail);
+ return true;
+ }
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatRegExpUnicodeCodePointEscape() {
+ const start = this.index;
+ if (this.eat(LEFT_CURLY_BRACKET) &&
+ this.eatHexDigits() &&
+ this.eat(RIGHT_CURLY_BRACKET) &&
+ isValidUnicode(this._lastIntValue)) {
+ return true;
+ }
+ this.rewind(start);
+ return false;
+ }
+ eatIdentityEscape() {
+ const cp = this.currentCodePoint;
+ if (this.isValidIdentityEscape(cp)) {
+ this._lastIntValue = cp;
+ this.advance();
+ return true;
+ }
+ return false;
+ }
+ isValidIdentityEscape(cp) {
+ if (cp === -1) {
+ return false;
+ }
+ if (this._unicodeMode) {
+ return isSyntaxCharacter(cp) || cp === SOLIDUS;
+ }
+ if (this.strict) {
+ return !isIdContinue(cp);
+ }
+ if (this._nFlag) {
+ return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K);
+ }
+ return cp !== LATIN_SMALL_LETTER_C;
+ }
+ eatDecimalEscape() {
+ this._lastIntValue = 0;
+ let cp = this.currentCodePoint;
+ if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) {
+ do {
+ this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO);
+ this.advance();
+ } while ((cp = this.currentCodePoint) >= DIGIT_ZERO &&
+ cp <= DIGIT_NINE);
+ return true;
+ }
+ return false;
+ }
+ eatUnicodePropertyValueExpression() {
+ const start = this.index;
+ if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) {
+ const key = this._lastStrValue;
+ if (this.eatUnicodePropertyValue()) {
+ const value = this._lastStrValue;
+ if (isValidUnicodeProperty(this.ecmaVersion, key, value)) {
+ return {
+ key,
+ value: value || null,
+ };
+ }
+ this.raise("Invalid property name");
+ }
+ }
+ this.rewind(start);
+ if (this.eatLoneUnicodePropertyNameOrValue()) {
+ const nameOrValue = this._lastStrValue;
+ if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) {
+ return {
+ key: "General_Category",
+ value: nameOrValue || null,
+ };
+ }
+ if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) {
+ return {
+ key: nameOrValue,
+ value: null,
+ };
+ }
+ if (this._unicodeSetsMode &&
+ isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) {
+ return {
+ key: nameOrValue,
+ value: null,
+ strings: true,
+ };
+ }
+ this.raise("Invalid property name");
+ }
+ return null;
+ }
+ eatUnicodePropertyName() {
+ this._lastStrValue = "";
+ while (isUnicodePropertyNameCharacter(this.currentCodePoint)) {
+ this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
+ this.advance();
+ }
+ return this._lastStrValue !== "";
+ }
+ eatUnicodePropertyValue() {
+ this._lastStrValue = "";
+ while (isUnicodePropertyValueCharacter(this.currentCodePoint)) {
+ this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
+ this.advance();
+ }
+ return this._lastStrValue !== "";
+ }
+ eatLoneUnicodePropertyNameOrValue() {
+ return this.eatUnicodePropertyValue();
+ }
+ eatHexEscapeSequence() {
+ const start = this.index;
+ if (this.eat(LATIN_SMALL_LETTER_X)) {
+ if (this.eatFixedHexDigits(2)) {
+ return true;
+ }
+ if (this._unicodeMode || this.strict) {
+ this.raise("Invalid escape");
+ }
+ this.rewind(start);
+ }
+ return false;
+ }
+ eatDecimalDigits() {
+ const start = this.index;
+ this._lastIntValue = 0;
+ while (isDecimalDigit(this.currentCodePoint)) {
+ this._lastIntValue =
+ 10 * this._lastIntValue + digitToInt(this.currentCodePoint);
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ eatHexDigits() {
+ const start = this.index;
+ this._lastIntValue = 0;
+ while (isHexDigit(this.currentCodePoint)) {
+ this._lastIntValue =
+ 16 * this._lastIntValue + digitToInt(this.currentCodePoint);
+ this.advance();
+ }
+ return this.index !== start;
+ }
+ eatLegacyOctalEscapeSequence() {
+ if (this.eatOctalDigit()) {
+ const n1 = this._lastIntValue;
+ if (this.eatOctalDigit()) {
+ const n2 = this._lastIntValue;
+ if (n1 <= 3 && this.eatOctalDigit()) {
+ this._lastIntValue = n1 * 64 + n2 * 8 + this._lastIntValue;
+ }
+ else {
+ this._lastIntValue = n1 * 8 + n2;
+ }
+ }
+ else {
+ this._lastIntValue = n1;
+ }
+ return true;
+ }
+ return false;
+ }
+ eatOctalDigit() {
+ const cp = this.currentCodePoint;
+ if (isOctalDigit(cp)) {
+ this.advance();
+ this._lastIntValue = cp - DIGIT_ZERO;
+ return true;
+ }
+ this._lastIntValue = 0;
+ return false;
+ }
+ eatFixedHexDigits(length) {
+ const start = this.index;
+ this._lastIntValue = 0;
+ for (let i = 0; i < length; ++i) {
+ const cp = this.currentCodePoint;
+ if (!isHexDigit(cp)) {
+ this.rewind(start);
+ return false;
+ }
+ this._lastIntValue = 16 * this._lastIntValue + digitToInt(cp);
+ this.advance();
+ }
+ return true;
+ }
+}
+
+const DUMMY_PATTERN = {};
+const DUMMY_FLAGS = {};
+const DUMMY_CAPTURING_GROUP = {};
+function isClassSetOperand(node) {
+ return (node.type === "Character" ||
+ node.type === "CharacterSet" ||
+ node.type === "CharacterClass" ||
+ node.type === "ExpressionCharacterClass" ||
+ node.type === "ClassStringDisjunction");
+}
+class RegExpParserState {
+ constructor(options) {
+ var _a;
+ this._node = DUMMY_PATTERN;
+ this._expressionBuffer = null;
+ this._flags = DUMMY_FLAGS;
+ this._backreferences = [];
+ this._capturingGroups = [];
+ this.source = "";
+ this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict);
+ this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion;
+ }
+ get pattern() {
+ if (this._node.type !== "Pattern") {
+ throw new Error("UnknownError");
+ }
+ return this._node;
+ }
+ get flags() {
+ if (this._flags.type !== "Flags") {
+ throw new Error("UnknownError");
+ }
+ return this._flags;
+ }
+ onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) {
+ this._flags = {
+ type: "Flags",
+ parent: null,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ global,
+ ignoreCase,
+ multiline,
+ unicode,
+ sticky,
+ dotAll,
+ hasIndices,
+ unicodeSets,
+ };
+ }
+ onPatternEnter(start) {
+ this._node = {
+ type: "Pattern",
+ parent: null,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ this._backreferences.length = 0;
+ this._capturingGroups.length = 0;
+ }
+ onPatternLeave(start, end) {
+ this._node.end = end;
+ this._node.raw = this.source.slice(start, end);
+ for (const reference of this._backreferences) {
+ const ref = reference.ref;
+ const group = typeof ref === "number"
+ ? this._capturingGroups[ref - 1]
+ : this._capturingGroups.find((g) => g.name === ref);
+ reference.resolved = group;
+ group.references.push(reference);
+ }
+ }
+ onAlternativeEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "Assertion" &&
+ parent.type !== "CapturingGroup" &&
+ parent.type !== "Group" &&
+ parent.type !== "Pattern") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "Alternative",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ elements: [],
+ };
+ parent.alternatives.push(this._node);
+ }
+ onAlternativeLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onGroupEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "Group",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ parent.elements.push(this._node);
+ }
+ onGroupLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Group" || node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onCapturingGroupEnter(start, name) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "CapturingGroup",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ name,
+ alternatives: [],
+ references: [],
+ };
+ parent.elements.push(this._node);
+ this._capturingGroups.push(this._node);
+ }
+ onCapturingGroupLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "CapturingGroup" ||
+ node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onQuantifier(start, end, min, max, greedy) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const element = parent.elements.pop();
+ if (element == null ||
+ element.type === "Quantifier" ||
+ (element.type === "Assertion" && element.kind !== "lookahead")) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "Quantifier",
+ parent,
+ start: element.start,
+ end,
+ raw: this.source.slice(element.start, end),
+ min,
+ max,
+ greedy,
+ element,
+ };
+ parent.elements.push(node);
+ element.parent = node;
+ }
+ onLookaroundAssertionEnter(start, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const node = (this._node = {
+ type: "Assertion",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ kind,
+ negate,
+ alternatives: [],
+ });
+ parent.elements.push(node);
+ }
+ onLookaroundAssertionLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "Assertion" || node.parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onEdgeAssertion(start, end, kind) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Assertion",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ });
+ }
+ onWordBoundaryAssertion(start, end, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Assertion",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ negate,
+ });
+ }
+ onAnyCharacterSet(start, end, kind) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "CharacterSet",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ });
+ }
+ onEscapeCharacterSet(start, end, kind, negate) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "CharacterSet",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ negate,
+ });
+ }
+ onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ const base = {
+ type: "CharacterSet",
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ kind,
+ key,
+ };
+ if (strings) {
+ if ((parent.type === "CharacterClass" && !parent.unicodeSets) ||
+ negate ||
+ value !== null) {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
+ }
+ else {
+ parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
+ }
+ }
+ onCharacter(start, end, value) {
+ const parent = this._node;
+ if (parent.type !== "Alternative" &&
+ parent.type !== "CharacterClass" &&
+ parent.type !== "StringAlternative") {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push({
+ type: "Character",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ value,
+ });
+ }
+ onBackreference(start, end, ref) {
+ const parent = this._node;
+ if (parent.type !== "Alternative") {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "Backreference",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ ref,
+ resolved: DUMMY_CAPTURING_GROUP,
+ };
+ parent.elements.push(node);
+ this._backreferences.push(node);
+ }
+ onCharacterClassEnter(start, negate, unicodeSets) {
+ const parent = this._node;
+ const base = {
+ type: "CharacterClass",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ unicodeSets,
+ negate,
+ elements: [],
+ };
+ if (parent.type === "Alternative") {
+ const node = Object.assign(Object.assign({}, base), { parent });
+ this._node = node;
+ parent.elements.push(node);
+ }
+ else if (parent.type === "CharacterClass" &&
+ parent.unicodeSets &&
+ unicodeSets) {
+ const node = Object.assign(Object.assign({}, base), { parent,
+ unicodeSets });
+ this._node = node;
+ parent.elements.push(node);
+ }
+ else {
+ throw new Error("UnknownError");
+ }
+ }
+ onCharacterClassLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "CharacterClass" ||
+ (node.parent.type !== "Alternative" &&
+ node.parent.type !== "CharacterClass")) {
+ throw new Error("UnknownError");
+ }
+ const parent = node.parent;
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = parent;
+ const expression = this._expressionBuffer;
+ if ((expression === null || expression === void 0 ? void 0 : expression.parent) !== node) {
+ return;
+ }
+ if (node.elements.length > 0) {
+ throw new Error("UnknownError");
+ }
+ this._expressionBuffer = null;
+ const newNode = {
+ type: "ExpressionCharacterClass",
+ parent,
+ start: node.start,
+ end: node.end,
+ raw: node.raw,
+ negate: node.negate,
+ expression,
+ };
+ expression.parent = newNode;
+ if (node !== parent.elements.pop()) {
+ throw new Error("UnknownError");
+ }
+ parent.elements.push(newNode);
+ }
+ onCharacterClassRange(start, end) {
+ const parent = this._node;
+ if (parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ const elements = parent.elements;
+ const max = elements.pop();
+ if (!max || max.type !== "Character") {
+ throw new Error("UnknownError");
+ }
+ if (!parent.unicodeSets) {
+ const hyphen = elements.pop();
+ if (!hyphen ||
+ hyphen.type !== "Character" ||
+ hyphen.value !== HYPHEN_MINUS) {
+ throw new Error("UnknownError");
+ }
+ }
+ const min = elements.pop();
+ if (!min || min.type !== "Character") {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "CharacterClassRange",
+ parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ min,
+ max,
+ };
+ min.parent = node;
+ max.parent = node;
+ elements.push(node);
+ }
+ onClassIntersection(start, end) {
+ var _a;
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ const right = parent.elements.pop();
+ const left = (_a = this._expressionBuffer) !== null && _a !== void 0 ? _a : parent.elements.pop();
+ if (!left ||
+ !right ||
+ left.type === "ClassSubtraction" ||
+ (left.type !== "ClassIntersection" && !isClassSetOperand(left)) ||
+ !isClassSetOperand(right)) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "ClassIntersection",
+ parent: parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ left,
+ right,
+ };
+ left.parent = node;
+ right.parent = node;
+ this._expressionBuffer = node;
+ }
+ onClassSubtraction(start, end) {
+ var _a;
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ const right = parent.elements.pop();
+ const left = (_a = this._expressionBuffer) !== null && _a !== void 0 ? _a : parent.elements.pop();
+ if (!left ||
+ !right ||
+ left.type === "ClassIntersection" ||
+ (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) ||
+ !isClassSetOperand(right)) {
+ throw new Error("UnknownError");
+ }
+ const node = {
+ type: "ClassSubtraction",
+ parent: parent,
+ start,
+ end,
+ raw: this.source.slice(start, end),
+ left,
+ right,
+ };
+ left.parent = node;
+ right.parent = node;
+ this._expressionBuffer = node;
+ }
+ onClassStringDisjunctionEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "CharacterClass" || !parent.unicodeSets) {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "ClassStringDisjunction",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ alternatives: [],
+ };
+ parent.elements.push(this._node);
+ }
+ onClassStringDisjunctionLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "ClassStringDisjunction" ||
+ node.parent.type !== "CharacterClass") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+ onStringAlternativeEnter(start) {
+ const parent = this._node;
+ if (parent.type !== "ClassStringDisjunction") {
+ throw new Error("UnknownError");
+ }
+ this._node = {
+ type: "StringAlternative",
+ parent,
+ start,
+ end: start,
+ raw: "",
+ elements: [],
+ };
+ parent.alternatives.push(this._node);
+ }
+ onStringAlternativeLeave(start, end) {
+ const node = this._node;
+ if (node.type !== "StringAlternative") {
+ throw new Error("UnknownError");
+ }
+ node.end = end;
+ node.raw = this.source.slice(start, end);
+ this._node = node.parent;
+ }
+}
+class RegExpParser {
+ constructor(options) {
+ this._state = new RegExpParserState(options);
+ this._validator = new RegExpValidator(this._state);
+ }
+ parseLiteral(source, start = 0, end = source.length) {
+ this._state.source = source;
+ this._validator.validateLiteral(source, start, end);
+ const pattern = this._state.pattern;
+ const flags = this._state.flags;
+ const literal = {
+ type: "RegExpLiteral",
+ parent: null,
+ start,
+ end,
+ raw: source,
+ pattern,
+ flags,
+ };
+ pattern.parent = literal;
+ flags.parent = literal;
+ return literal;
+ }
+ parseFlags(source, start = 0, end = source.length) {
+ this._state.source = source;
+ this._validator.validateFlags(source, start, end);
+ return this._state.flags;
+ }
+ parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) {
+ this._state.source = source;
+ this._validator.validatePattern(source, start, end, uFlagOrFlags);
+ return this._state.pattern;
+ }
+}
+
+class RegExpVisitor {
+ constructor(handlers) {
+ this._handlers = handlers;
+ }
+ visit(node) {
+ switch (node.type) {
+ case "Alternative":
+ this.visitAlternative(node);
+ break;
+ case "Assertion":
+ this.visitAssertion(node);
+ break;
+ case "Backreference":
+ this.visitBackreference(node);
+ break;
+ case "CapturingGroup":
+ this.visitCapturingGroup(node);
+ break;
+ case "Character":
+ this.visitCharacter(node);
+ break;
+ case "CharacterClass":
+ this.visitCharacterClass(node);
+ break;
+ case "CharacterClassRange":
+ this.visitCharacterClassRange(node);
+ break;
+ case "CharacterSet":
+ this.visitCharacterSet(node);
+ break;
+ case "ClassIntersection":
+ this.visitClassIntersection(node);
+ break;
+ case "ClassStringDisjunction":
+ this.visitClassStringDisjunction(node);
+ break;
+ case "ClassSubtraction":
+ this.visitClassSubtraction(node);
+ break;
+ case "ExpressionCharacterClass":
+ this.visitExpressionCharacterClass(node);
+ break;
+ case "Flags":
+ this.visitFlags(node);
+ break;
+ case "Group":
+ this.visitGroup(node);
+ break;
+ case "Pattern":
+ this.visitPattern(node);
+ break;
+ case "Quantifier":
+ this.visitQuantifier(node);
+ break;
+ case "RegExpLiteral":
+ this.visitRegExpLiteral(node);
+ break;
+ case "StringAlternative":
+ this.visitStringAlternative(node);
+ break;
+ default:
+ throw new Error(`Unknown type: ${node.type}`);
+ }
+ }
+ visitAlternative(node) {
+ if (this._handlers.onAlternativeEnter) {
+ this._handlers.onAlternativeEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onAlternativeLeave) {
+ this._handlers.onAlternativeLeave(node);
+ }
+ }
+ visitAssertion(node) {
+ if (this._handlers.onAssertionEnter) {
+ this._handlers.onAssertionEnter(node);
+ }
+ if (node.kind === "lookahead" || node.kind === "lookbehind") {
+ node.alternatives.forEach(this.visit, this);
+ }
+ if (this._handlers.onAssertionLeave) {
+ this._handlers.onAssertionLeave(node);
+ }
+ }
+ visitBackreference(node) {
+ if (this._handlers.onBackreferenceEnter) {
+ this._handlers.onBackreferenceEnter(node);
+ }
+ if (this._handlers.onBackreferenceLeave) {
+ this._handlers.onBackreferenceLeave(node);
+ }
+ }
+ visitCapturingGroup(node) {
+ if (this._handlers.onCapturingGroupEnter) {
+ this._handlers.onCapturingGroupEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onCapturingGroupLeave) {
+ this._handlers.onCapturingGroupLeave(node);
+ }
+ }
+ visitCharacter(node) {
+ if (this._handlers.onCharacterEnter) {
+ this._handlers.onCharacterEnter(node);
+ }
+ if (this._handlers.onCharacterLeave) {
+ this._handlers.onCharacterLeave(node);
+ }
+ }
+ visitCharacterClass(node) {
+ if (this._handlers.onCharacterClassEnter) {
+ this._handlers.onCharacterClassEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onCharacterClassLeave) {
+ this._handlers.onCharacterClassLeave(node);
+ }
+ }
+ visitCharacterClassRange(node) {
+ if (this._handlers.onCharacterClassRangeEnter) {
+ this._handlers.onCharacterClassRangeEnter(node);
+ }
+ this.visitCharacter(node.min);
+ this.visitCharacter(node.max);
+ if (this._handlers.onCharacterClassRangeLeave) {
+ this._handlers.onCharacterClassRangeLeave(node);
+ }
+ }
+ visitCharacterSet(node) {
+ if (this._handlers.onCharacterSetEnter) {
+ this._handlers.onCharacterSetEnter(node);
+ }
+ if (this._handlers.onCharacterSetLeave) {
+ this._handlers.onCharacterSetLeave(node);
+ }
+ }
+ visitClassIntersection(node) {
+ if (this._handlers.onClassIntersectionEnter) {
+ this._handlers.onClassIntersectionEnter(node);
+ }
+ this.visit(node.left);
+ this.visit(node.right);
+ if (this._handlers.onClassIntersectionLeave) {
+ this._handlers.onClassIntersectionLeave(node);
+ }
+ }
+ visitClassStringDisjunction(node) {
+ if (this._handlers.onClassStringDisjunctionEnter) {
+ this._handlers.onClassStringDisjunctionEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onClassStringDisjunctionLeave) {
+ this._handlers.onClassStringDisjunctionLeave(node);
+ }
+ }
+ visitClassSubtraction(node) {
+ if (this._handlers.onClassSubtractionEnter) {
+ this._handlers.onClassSubtractionEnter(node);
+ }
+ this.visit(node.left);
+ this.visit(node.right);
+ if (this._handlers.onClassSubtractionLeave) {
+ this._handlers.onClassSubtractionLeave(node);
+ }
+ }
+ visitExpressionCharacterClass(node) {
+ if (this._handlers.onExpressionCharacterClassEnter) {
+ this._handlers.onExpressionCharacterClassEnter(node);
+ }
+ this.visit(node.expression);
+ if (this._handlers.onExpressionCharacterClassLeave) {
+ this._handlers.onExpressionCharacterClassLeave(node);
+ }
+ }
+ visitFlags(node) {
+ if (this._handlers.onFlagsEnter) {
+ this._handlers.onFlagsEnter(node);
+ }
+ if (this._handlers.onFlagsLeave) {
+ this._handlers.onFlagsLeave(node);
+ }
+ }
+ visitGroup(node) {
+ if (this._handlers.onGroupEnter) {
+ this._handlers.onGroupEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onGroupLeave) {
+ this._handlers.onGroupLeave(node);
+ }
+ }
+ visitPattern(node) {
+ if (this._handlers.onPatternEnter) {
+ this._handlers.onPatternEnter(node);
+ }
+ node.alternatives.forEach(this.visit, this);
+ if (this._handlers.onPatternLeave) {
+ this._handlers.onPatternLeave(node);
+ }
+ }
+ visitQuantifier(node) {
+ if (this._handlers.onQuantifierEnter) {
+ this._handlers.onQuantifierEnter(node);
+ }
+ this.visit(node.element);
+ if (this._handlers.onQuantifierLeave) {
+ this._handlers.onQuantifierLeave(node);
+ }
+ }
+ visitRegExpLiteral(node) {
+ if (this._handlers.onRegExpLiteralEnter) {
+ this._handlers.onRegExpLiteralEnter(node);
+ }
+ this.visitPattern(node.pattern);
+ this.visitFlags(node.flags);
+ if (this._handlers.onRegExpLiteralLeave) {
+ this._handlers.onRegExpLiteralLeave(node);
+ }
+ }
+ visitStringAlternative(node) {
+ if (this._handlers.onStringAlternativeEnter) {
+ this._handlers.onStringAlternativeEnter(node);
+ }
+ node.elements.forEach(this.visit, this);
+ if (this._handlers.onStringAlternativeLeave) {
+ this._handlers.onStringAlternativeLeave(node);
+ }
+ }
+}
+
+function parseRegExpLiteral(source, options) {
+ return new RegExpParser(options).parseLiteral(String(source));
+}
+function validateRegExpLiteral(source, options) {
+ new RegExpValidator(options).validateLiteral(source);
+}
+function visitRegExpAST(node, handlers) {
+ new RegExpVisitor(handlers).visit(node);
+}
+
+export { ast as AST, RegExpParser, RegExpValidator, parseRegExpLiteral, validateRegExpLiteral, visitRegExpAST };
+//# sourceMappingURL=index.mjs.map
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs.map b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs.map
new file mode 100644
index 0000000..a40c1a4
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.mjs.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/unicode/src/unicode/properties-of-strings.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;AAYO,MAAM,iBAAiB,GAAG,IAAI;;ACRrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAAU,EAAA;IAChC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;AAC1B,IAAA,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;AAC7B,CAAC;AAEK,SAAU,YAAY,CAAC,EAAU,EAAA;IACnC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,KAAK,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC5B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B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B,IAAA,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;AACjE,CAAC;AAOe,SAAA,qBAAqB,CACjC,MAAc,EACd,OAAiC,EAAA;IAEjC,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AACxD,CAAC;AAEe,SAAA,cAAc,CAC1B,IAAc,EACd,QAAgC,EAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC3C;;;;"}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/package.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/package.json
new file mode 100644
index 0000000..46f7e2c
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint-community/regexpp/package.json
@@ -0,0 +1,121 @@
+{
+ "_from": "@eslint-community/regexpp@^4.6.1",
+ "_id": "@eslint-community/regexpp@4.8.1",
+ "_inBundle": false,
+ "_integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==",
+ "_location": "/@eslint-community/regexpp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@eslint-community/regexpp@^4.6.1",
+ "name": "@eslint-community/regexpp",
+ "escapedName": "@eslint-community%2fregexpp",
+ "scope": "@eslint-community",
+ "rawSpec": "^4.6.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.6.1"
+ },
+ "_requiredBy": [
+ "/eslint"
+ ],
+ "_resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz",
+ "_shasum": "8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c",
+ "_spec": "@eslint-community/regexpp@^4.6.1",
+ "_where": "C:\\Users\\Lenovo\\AppData\\Local\\Temp\\HBuilder X-P1XkOA\\uni-id-co\\node_modules\\eslint",
+ "author": {
+ "name": "Toru Nagashima"
+ },
+ "bugs": {
+ "url": "https://github.com/eslint-community/regexpp/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Regular expression parser for ECMAScript.",
+ "devDependencies": {
+ "@eslint-community/eslint-plugin-mysticatea": "^15.3.0",
+ "@rollup/plugin-node-resolve": "^14.1.0",
+ "@types/eslint": "^8.4.10",
+ "@types/jsdom": "^16.2.15",
+ "@types/mocha": "^9.1.1",
+ "@types/node": "^12.20.55",
+ "dts-bundle": "^0.7.3",
+ "eslint": "^8.31.0",
+ "js-tokens": "^8.0.1",
+ "jsdom": "^19.0.0",
+ "mocha": "^9.2.2",
+ "npm-run-all": "^4.1.5",
+ "nyc": "^14.1.1",
+ "rimraf": "^3.0.2",
+ "rollup": "^2.79.1",
+ "rollup-plugin-sourcemaps": "^0.6.3",
+ "test262": "git+https://github.com/tc39/test262.git",
+ "test262-stream": "^1.4.0",
+ "ts-node": "^10.9.1",
+ "typescript": "~5.0.2"
+ },
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ },
+ "exports": {
+ ".": {
+ "types": "./index.d.ts",
+ "import": "./index.mjs",
+ "default": "./index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "index.*"
+ ],
+ "homepage": "https://github.com/eslint-community/regexpp#readme",
+ "keywords": [
+ "regexp",
+ "regular",
+ "expression",
+ "parser",
+ "validator",
+ "ast",
+ "abstract",
+ "syntax",
+ "tree",
+ "ecmascript",
+ "es2015",
+ "es2016",
+ "es2017",
+ "es2018",
+ "es2019",
+ "es2020",
+ "es2021",
+ "annexB"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "@eslint-community/regexpp",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/eslint-community/regexpp.git"
+ },
+ "scripts": {
+ "build": "run-s build:*",
+ "build:dts": "npm run -s build:tsc -- --removeComments false && dts-bundle --name @eslint-community/regexpp --main .temp/index.d.ts --out ../index.d.ts && prettier --write index.d.ts",
+ "build:rollup": "rollup -c",
+ "build:tsc": "tsc --module es2015",
+ "clean": "rimraf .temp index.*",
+ "debug": "mocha --require ts-node/register/transpile-only \"test/*.ts\" --reporter dot --timeout 10000",
+ "lint": "eslint . --ext .ts",
+ "postversion": "git push && git push --tags",
+ "prebuild": "npm run -s clean",
+ "preversion": "npm test && npm run -s build",
+ "prewatch": "npm run -s clean",
+ "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000",
+ "update:test": "ts-node scripts/update-fixtures.ts",
+ "update:test262:extract": "ts-node -T scripts/extract-test262.ts",
+ "update:unicode": "run-s update:unicode:*",
+ "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts",
+ "update:unicode:props": "ts-node scripts/update-unicode-properties.ts",
+ "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl"
+ },
+ "version": "4.8.1"
+}
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/LICENSE b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/LICENSE
new file mode 100644
index 0000000..b607bb3
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/LICENSE
@@ -0,0 +1,19 @@
+Copyright OpenJS Foundation and other contributors,
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/README.md b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/README.md
new file mode 100644
index 0000000..9d81617
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/README.md
@@ -0,0 +1,71 @@
+# ESLintRC Library
+
+This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
+
+**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system.
+
+## Installation
+
+You can install the package as follows:
+
+```
+npm install @eslint/eslintrc --save-dev
+
+# or
+
+yarn add @eslint/eslintrc -D
+```
+
+## Usage
+
+The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:
+
+```js
+import { FlatCompat } from "@eslint/eslintrc";
+import js from "@eslint/js";
+import path from "path";
+import { fileURLToPath } from "url";
+
+// mimic CommonJS variables -- not needed if using CommonJS
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = path.dirname(__filename);
+
+const compat = new FlatCompat({
+ baseDirectory: __dirname, // optional; default: process.cwd()
+ resolvePluginsRelativeTo: __dirname, // optional
+ recommendedConfig: js.configs.recommended, // optional
+ allConfig: js.configs.all, // optional
+});
+
+export default [
+
+ // mimic ESLintRC-style extends
+ ...compat.extends("standard", "example"),
+
+ // mimic environments
+ ...compat.env({
+ es2020: true,
+ node: true
+ }),
+
+ // mimic plugins
+ ...compat.plugins("airbnb", "react"),
+
+ // translate an entire config
+ ...compat.config({
+ plugins: ["airbnb", "react"],
+ extends: "standard",
+ env: {
+ es2020: true,
+ node: true
+ },
+ rules: {
+ semi: "error"
+ }
+ })
+];
+```
+
+## License
+
+MIT License
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/config-schema.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/config-schema.js
new file mode 100644
index 0000000..ada90e1
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/config-schema.js
@@ -0,0 +1,79 @@
+/**
+ * @fileoverview Defines a schema for configs.
+ * @author Sylvan Mably
+ */
+
+const baseConfigProperties = {
+ $schema: { type: "string" },
+ env: { type: "object" },
+ extends: { $ref: "#/definitions/stringOrStrings" },
+ globals: { type: "object" },
+ overrides: {
+ type: "array",
+ items: { $ref: "#/definitions/overrideConfig" },
+ additionalItems: false
+ },
+ parser: { type: ["string", "null"] },
+ parserOptions: { type: "object" },
+ plugins: { type: "array" },
+ processor: { type: "string" },
+ rules: { type: "object" },
+ settings: { type: "object" },
+ noInlineConfig: { type: "boolean" },
+ reportUnusedDisableDirectives: { type: "boolean" },
+
+ ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
+};
+
+const configSchema = {
+ definitions: {
+ stringOrStrings: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false
+ }
+ ]
+ },
+ stringOrStringsRequired: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false,
+ minItems: 1
+ }
+ ]
+ },
+
+ // Config at top-level.
+ objectConfig: {
+ type: "object",
+ properties: {
+ root: { type: "boolean" },
+ ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
+ ...baseConfigProperties
+ },
+ additionalProperties: false
+ },
+
+ // Config in `overrides`.
+ overrideConfig: {
+ type: "object",
+ properties: {
+ excludedFiles: { $ref: "#/definitions/stringOrStrings" },
+ files: { $ref: "#/definitions/stringOrStringsRequired" },
+ ...baseConfigProperties
+ },
+ required: ["files"],
+ additionalProperties: false
+ }
+ },
+
+ $ref: "#/definitions/objectConfig"
+};
+
+export default configSchema;
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/environments.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/environments.js
new file mode 100644
index 0000000..50d1b1d
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/conf/environments.js
@@ -0,0 +1,215 @@
+/**
+ * @fileoverview Defines environment settings and globals.
+ * @author Elan Shanker
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+import globals from "globals";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the object that has difference.
+ * @param {Record} current The newer object.
+ * @param {Record} prev The older object.
+ * @returns {Record} The difference object.
+ */
+function getDiff(current, prev) {
+ const retv = {};
+
+ for (const [key, value] of Object.entries(current)) {
+ if (!Object.hasOwnProperty.call(prev, key)) {
+ retv[key] = value;
+ }
+ }
+
+ return retv;
+}
+
+const newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...
+const newGlobals2017 = {
+ Atomics: false,
+ SharedArrayBuffer: false
+};
+const newGlobals2020 = {
+ BigInt: false,
+ BigInt64Array: false,
+ BigUint64Array: false,
+ globalThis: false
+};
+
+const newGlobals2021 = {
+ AggregateError: false,
+ FinalizationRegistry: false,
+ WeakRef: false
+};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/** @type {Map} */
+export default new Map(Object.entries({
+
+ // Language
+ builtin: {
+ globals: globals.es5
+ },
+ es6: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2015: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2016: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 7
+ }
+ },
+ es2017: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 8
+ }
+ },
+ es2018: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 9
+ }
+ },
+ es2019: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 10
+ }
+ },
+ es2020: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
+ parserOptions: {
+ ecmaVersion: 11
+ }
+ },
+ es2021: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 12
+ }
+ },
+ es2022: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 13
+ }
+ },
+ es2023: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 14
+ }
+ },
+ es2024: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 15
+ }
+ },
+
+ // Platforms
+ browser: {
+ globals: globals.browser
+ },
+ node: {
+ globals: globals.node,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ "shared-node-browser": {
+ globals: globals["shared-node-browser"]
+ },
+ worker: {
+ globals: globals.worker
+ },
+ serviceworker: {
+ globals: globals.serviceworker
+ },
+
+ // Frameworks
+ commonjs: {
+ globals: globals.commonjs,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ amd: {
+ globals: globals.amd
+ },
+ mocha: {
+ globals: globals.mocha
+ },
+ jasmine: {
+ globals: globals.jasmine
+ },
+ jest: {
+ globals: globals.jest
+ },
+ phantomjs: {
+ globals: globals.phantomjs
+ },
+ jquery: {
+ globals: globals.jquery
+ },
+ qunit: {
+ globals: globals.qunit
+ },
+ prototypejs: {
+ globals: globals.prototypejs
+ },
+ shelljs: {
+ globals: globals.shelljs
+ },
+ meteor: {
+ globals: globals.meteor
+ },
+ mongo: {
+ globals: globals.mongo
+ },
+ protractor: {
+ globals: globals.protractor
+ },
+ applescript: {
+ globals: globals.applescript
+ },
+ nashorn: {
+ globals: globals.nashorn
+ },
+ atomtest: {
+ globals: globals.atomtest
+ },
+ embertest: {
+ globals: globals.embertest
+ },
+ webextensions: {
+ globals: globals.webextensions
+ },
+ greasemonkey: {
+ globals: globals.greasemonkey
+ }
+}));
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs
new file mode 100644
index 0000000..64e6666
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs
@@ -0,0 +1,1104 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var util = require('util');
+var path = require('path');
+var Ajv = require('ajv');
+var globals = require('globals');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
+var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
+var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
+var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
+
+/**
+ * @fileoverview Config file operations. This file must be usable in the browser,
+ * so no Node-specific code can be here.
+ * @author Nicholas C. Zakas
+ */
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
+ RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
+ map[value] = index;
+ return map;
+ }, {}),
+ VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Normalizes the severity value of a rule's configuration to a number
+ * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
+ * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
+ * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
+ * whose first element is one of the above values. Strings are matched case-insensitively.
+ * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
+ */
+function getRuleSeverity(ruleConfig) {
+ const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
+ return severityValue;
+ }
+
+ if (typeof severityValue === "string") {
+ return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
+ }
+
+ return 0;
+}
+
+/**
+ * Converts old-style severity settings (0, 1, 2) into new-style
+ * severity settings (off, warn, error) for all rules. Assumption is that severity
+ * values have already been validated as correct.
+ * @param {Object} config The config object to normalize.
+ * @returns {void}
+ */
+function normalizeToStrings(config) {
+
+ if (config.rules) {
+ Object.keys(config.rules).forEach(ruleId => {
+ const ruleConfig = config.rules[ruleId];
+
+ if (typeof ruleConfig === "number") {
+ config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
+ } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
+ ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
+ }
+ });
+ }
+}
+
+/**
+ * Determines if the severity for the given rule configuration represents an error.
+ * @param {int|string|Array} ruleConfig The configuration for an individual rule.
+ * @returns {boolean} True if the rule represents an error, false if not.
+ */
+function isErrorSeverity(ruleConfig) {
+ return getRuleSeverity(ruleConfig) === 2;
+}
+
+/**
+ * Checks whether a given config has valid severity or not.
+ * @param {number|string|Array} ruleConfig The configuration for an individual rule.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+function isValidSeverity(ruleConfig) {
+ let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (typeof severity === "string") {
+ severity = severity.toLowerCase();
+ }
+ return VALID_SEVERITIES.indexOf(severity) !== -1;
+}
+
+/**
+ * Checks whether every rule of a given config has valid severity or not.
+ * @param {Object} config The configuration for rules.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+function isEverySeverityValid(config) {
+ return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
+}
+
+/**
+ * Normalizes a value for a global in a config
+ * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
+ * a global directive comment
+ * @returns {("readable"|"writeable"|"off")} The value normalized as a string
+ * @throws Error if global value is invalid
+ */
+function normalizeConfigGlobal(configuredValue) {
+ switch (configuredValue) {
+ case "off":
+ return "off";
+
+ case true:
+ case "true":
+ case "writeable":
+ case "writable":
+ return "writable";
+
+ case null:
+ case false:
+ case "false":
+ case "readable":
+ case "readonly":
+ return "readonly";
+
+ default:
+ throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
+ }
+}
+
+var ConfigOps = {
+ __proto__: null,
+ getRuleSeverity: getRuleSeverity,
+ normalizeToStrings: normalizeToStrings,
+ isErrorSeverity: isErrorSeverity,
+ isValidSeverity: isValidSeverity,
+ isEverySeverityValid: isEverySeverityValid,
+ normalizeConfigGlobal: normalizeConfigGlobal
+};
+
+/**
+ * @fileoverview Provide the function that emits deprecation warnings.
+ * @author Toru Nagashima
+ */
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+// Defitions for deprecation warnings.
+const deprecationWarningMessages = {
+ ESLINT_LEGACY_ECMAFEATURES:
+ "The 'ecmaFeatures' config file property is deprecated and has no effect.",
+ ESLINT_PERSONAL_CONFIG_LOAD:
+ "'~/.eslintrc.*' config files have been deprecated. " +
+ "Please use a config file per project or the '--config' option.",
+ ESLINT_PERSONAL_CONFIG_SUPPRESS:
+ "'~/.eslintrc.*' config files have been deprecated. " +
+ "Please remove it or add 'root:true' to the config files in your " +
+ "projects in order to avoid loading '~/.eslintrc.*' accidentally."
+};
+
+const sourceFileErrorCache = new Set();
+
+/**
+ * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
+ * for each unique file path, but repeated invocations with the same file path have no effect.
+ * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
+ * @param {string} source The name of the configuration source to report the warning for.
+ * @param {string} errorCode The warning message to show.
+ * @returns {void}
+ */
+function emitDeprecationWarning(source, errorCode) {
+ const cacheKey = JSON.stringify({ source, errorCode });
+
+ if (sourceFileErrorCache.has(cacheKey)) {
+ return;
+ }
+ sourceFileErrorCache.add(cacheKey);
+
+ const rel = path__default["default"].relative(process.cwd(), source);
+ const message = deprecationWarningMessages[errorCode];
+
+ process.emitWarning(
+ `${message} (found in "${rel}")`,
+ "DeprecationWarning",
+ errorCode
+ );
+}
+
+/**
+ * @fileoverview The instance of Ajv validator.
+ * @author Evgeny Poberezkin
+ */
+
+//-----------------------------------------------------------------------------
+// Helpers
+//-----------------------------------------------------------------------------
+
+/*
+ * Copied from ajv/lib/refs/json-schema-draft-04.json
+ * The MIT License (MIT)
+ * Copyright (c) 2015-2017 Evgeny Poberezkin
+ */
+const metaSchema = {
+ id: "http://json-schema.org/draft-04/schema#",
+ $schema: "http://json-schema.org/draft-04/schema#",
+ description: "Core schema meta-schema",
+ definitions: {
+ schemaArray: {
+ type: "array",
+ minItems: 1,
+ items: { $ref: "#" }
+ },
+ positiveInteger: {
+ type: "integer",
+ minimum: 0
+ },
+ positiveIntegerDefault0: {
+ allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
+ },
+ simpleTypes: {
+ enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ stringArray: {
+ type: "array",
+ items: { type: "string" },
+ minItems: 1,
+ uniqueItems: true
+ }
+ },
+ type: "object",
+ properties: {
+ id: {
+ type: "string"
+ },
+ $schema: {
+ type: "string"
+ },
+ title: {
+ type: "string"
+ },
+ description: {
+ type: "string"
+ },
+ default: { },
+ multipleOf: {
+ type: "number",
+ minimum: 0,
+ exclusiveMinimum: true
+ },
+ maximum: {
+ type: "number"
+ },
+ exclusiveMaximum: {
+ type: "boolean",
+ default: false
+ },
+ minimum: {
+ type: "number"
+ },
+ exclusiveMinimum: {
+ type: "boolean",
+ default: false
+ },
+ maxLength: { $ref: "#/definitions/positiveInteger" },
+ minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
+ pattern: {
+ type: "string",
+ format: "regex"
+ },
+ additionalItems: {
+ anyOf: [
+ { type: "boolean" },
+ { $ref: "#" }
+ ],
+ default: { }
+ },
+ items: {
+ anyOf: [
+ { $ref: "#" },
+ { $ref: "#/definitions/schemaArray" }
+ ],
+ default: { }
+ },
+ maxItems: { $ref: "#/definitions/positiveInteger" },
+ minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
+ uniqueItems: {
+ type: "boolean",
+ default: false
+ },
+ maxProperties: { $ref: "#/definitions/positiveInteger" },
+ minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
+ required: { $ref: "#/definitions/stringArray" },
+ additionalProperties: {
+ anyOf: [
+ { type: "boolean" },
+ { $ref: "#" }
+ ],
+ default: { }
+ },
+ definitions: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ properties: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ patternProperties: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ dependencies: {
+ type: "object",
+ additionalProperties: {
+ anyOf: [
+ { $ref: "#" },
+ { $ref: "#/definitions/stringArray" }
+ ]
+ }
+ },
+ enum: {
+ type: "array",
+ minItems: 1,
+ uniqueItems: true
+ },
+ type: {
+ anyOf: [
+ { $ref: "#/definitions/simpleTypes" },
+ {
+ type: "array",
+ items: { $ref: "#/definitions/simpleTypes" },
+ minItems: 1,
+ uniqueItems: true
+ }
+ ]
+ },
+ format: { type: "string" },
+ allOf: { $ref: "#/definitions/schemaArray" },
+ anyOf: { $ref: "#/definitions/schemaArray" },
+ oneOf: { $ref: "#/definitions/schemaArray" },
+ not: { $ref: "#" }
+ },
+ dependencies: {
+ exclusiveMaximum: ["maximum"],
+ exclusiveMinimum: ["minimum"]
+ },
+ default: { }
+};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+var ajvOrig = (additionalOptions = {}) => {
+ const ajv = new Ajv__default["default"]({
+ meta: false,
+ useDefaults: true,
+ validateSchema: false,
+ missingRefs: "ignore",
+ verbose: true,
+ schemaId: "auto",
+ ...additionalOptions
+ });
+
+ ajv.addMetaSchema(metaSchema);
+ // eslint-disable-next-line no-underscore-dangle
+ ajv._opts.defaultMeta = metaSchema.id;
+
+ return ajv;
+};
+
+/**
+ * @fileoverview Defines a schema for configs.
+ * @author Sylvan Mably
+ */
+
+const baseConfigProperties = {
+ $schema: { type: "string" },
+ env: { type: "object" },
+ extends: { $ref: "#/definitions/stringOrStrings" },
+ globals: { type: "object" },
+ overrides: {
+ type: "array",
+ items: { $ref: "#/definitions/overrideConfig" },
+ additionalItems: false
+ },
+ parser: { type: ["string", "null"] },
+ parserOptions: { type: "object" },
+ plugins: { type: "array" },
+ processor: { type: "string" },
+ rules: { type: "object" },
+ settings: { type: "object" },
+ noInlineConfig: { type: "boolean" },
+ reportUnusedDisableDirectives: { type: "boolean" },
+
+ ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
+};
+
+const configSchema = {
+ definitions: {
+ stringOrStrings: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false
+ }
+ ]
+ },
+ stringOrStringsRequired: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false,
+ minItems: 1
+ }
+ ]
+ },
+
+ // Config at top-level.
+ objectConfig: {
+ type: "object",
+ properties: {
+ root: { type: "boolean" },
+ ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
+ ...baseConfigProperties
+ },
+ additionalProperties: false
+ },
+
+ // Config in `overrides`.
+ overrideConfig: {
+ type: "object",
+ properties: {
+ excludedFiles: { $ref: "#/definitions/stringOrStrings" },
+ files: { $ref: "#/definitions/stringOrStringsRequired" },
+ ...baseConfigProperties
+ },
+ required: ["files"],
+ additionalProperties: false
+ }
+ },
+
+ $ref: "#/definitions/objectConfig"
+};
+
+/**
+ * @fileoverview Defines environment settings and globals.
+ * @author Elan Shanker
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the object that has difference.
+ * @param {Record} current The newer object.
+ * @param {Record} prev The older object.
+ * @returns {Record} The difference object.
+ */
+function getDiff(current, prev) {
+ const retv = {};
+
+ for (const [key, value] of Object.entries(current)) {
+ if (!Object.hasOwnProperty.call(prev, key)) {
+ retv[key] = value;
+ }
+ }
+
+ return retv;
+}
+
+const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ...
+const newGlobals2017 = {
+ Atomics: false,
+ SharedArrayBuffer: false
+};
+const newGlobals2020 = {
+ BigInt: false,
+ BigInt64Array: false,
+ BigUint64Array: false,
+ globalThis: false
+};
+
+const newGlobals2021 = {
+ AggregateError: false,
+ FinalizationRegistry: false,
+ WeakRef: false
+};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/** @type {Map} */
+var environments = new Map(Object.entries({
+
+ // Language
+ builtin: {
+ globals: globals__default["default"].es5
+ },
+ es6: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2015: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2016: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 7
+ }
+ },
+ es2017: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 8
+ }
+ },
+ es2018: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 9
+ }
+ },
+ es2019: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 10
+ }
+ },
+ es2020: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
+ parserOptions: {
+ ecmaVersion: 11
+ }
+ },
+ es2021: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 12
+ }
+ },
+ es2022: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 13
+ }
+ },
+ es2023: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 14
+ }
+ },
+ es2024: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 15
+ }
+ },
+
+ // Platforms
+ browser: {
+ globals: globals__default["default"].browser
+ },
+ node: {
+ globals: globals__default["default"].node,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ "shared-node-browser": {
+ globals: globals__default["default"]["shared-node-browser"]
+ },
+ worker: {
+ globals: globals__default["default"].worker
+ },
+ serviceworker: {
+ globals: globals__default["default"].serviceworker
+ },
+
+ // Frameworks
+ commonjs: {
+ globals: globals__default["default"].commonjs,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ amd: {
+ globals: globals__default["default"].amd
+ },
+ mocha: {
+ globals: globals__default["default"].mocha
+ },
+ jasmine: {
+ globals: globals__default["default"].jasmine
+ },
+ jest: {
+ globals: globals__default["default"].jest
+ },
+ phantomjs: {
+ globals: globals__default["default"].phantomjs
+ },
+ jquery: {
+ globals: globals__default["default"].jquery
+ },
+ qunit: {
+ globals: globals__default["default"].qunit
+ },
+ prototypejs: {
+ globals: globals__default["default"].prototypejs
+ },
+ shelljs: {
+ globals: globals__default["default"].shelljs
+ },
+ meteor: {
+ globals: globals__default["default"].meteor
+ },
+ mongo: {
+ globals: globals__default["default"].mongo
+ },
+ protractor: {
+ globals: globals__default["default"].protractor
+ },
+ applescript: {
+ globals: globals__default["default"].applescript
+ },
+ nashorn: {
+ globals: globals__default["default"].nashorn
+ },
+ atomtest: {
+ globals: globals__default["default"].atomtest
+ },
+ embertest: {
+ globals: globals__default["default"].embertest
+ },
+ webextensions: {
+ globals: globals__default["default"].webextensions
+ },
+ greasemonkey: {
+ globals: globals__default["default"].greasemonkey
+ }
+}));
+
+/**
+ * @fileoverview Validates configs.
+ * @author Brandon Mills
+ */
+
+const ajv = ajvOrig();
+
+const ruleValidators = new WeakMap();
+const noop = Function.prototype;
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+let validateSchema;
+const severityMap = {
+ error: 2,
+ warn: 1,
+ off: 0
+};
+
+const validated = new WeakSet();
+
+//-----------------------------------------------------------------------------
+// Exports
+//-----------------------------------------------------------------------------
+
+class ConfigValidator {
+ constructor({ builtInRules = new Map() } = {}) {
+ this.builtInRules = builtInRules;
+ }
+
+ /**
+ * Gets a complete options schema for a rule.
+ * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
+ * @returns {Object} JSON Schema for the rule's options.
+ */
+ getRuleOptionsSchema(rule) {
+ if (!rule) {
+ return null;
+ }
+
+ const schema = rule.schema || rule.meta && rule.meta.schema;
+
+ // Given a tuple of schemas, insert warning level at the beginning
+ if (Array.isArray(schema)) {
+ if (schema.length) {
+ return {
+ type: "array",
+ items: schema,
+ minItems: 0,
+ maxItems: schema.length
+ };
+ }
+ return {
+ type: "array",
+ minItems: 0,
+ maxItems: 0
+ };
+
+ }
+
+ // Given a full schema, leave it alone
+ return schema || null;
+ }
+
+ /**
+ * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
+ * @param {options} options The given options for the rule.
+ * @returns {number|string} The rule's severity value
+ */
+ validateRuleSeverity(options) {
+ const severity = Array.isArray(options) ? options[0] : options;
+ const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
+
+ if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
+ return normSeverity;
+ }
+
+ throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
+
+ }
+
+ /**
+ * Validates the non-severity options passed to a rule, based on its schema.
+ * @param {{create: Function}} rule The rule to validate
+ * @param {Array} localOptions The options for the rule, excluding severity
+ * @returns {void}
+ */
+ validateRuleSchema(rule, localOptions) {
+ if (!ruleValidators.has(rule)) {
+ const schema = this.getRuleOptionsSchema(rule);
+
+ if (schema) {
+ ruleValidators.set(rule, ajv.compile(schema));
+ }
+ }
+
+ const validateRule = ruleValidators.get(rule);
+
+ if (validateRule) {
+ validateRule(localOptions);
+ if (validateRule.errors) {
+ throw new Error(validateRule.errors.map(
+ error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
+ ).join(""));
+ }
+ }
+ }
+
+ /**
+ * Validates a rule's options against its schema.
+ * @param {{create: Function}|null} rule The rule that the config is being validated for
+ * @param {string} ruleId The rule's unique name.
+ * @param {Array|number} options The given options for the rule.
+ * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
+ * no source is prepended to the message.
+ * @returns {void}
+ */
+ validateRuleOptions(rule, ruleId, options, source = null) {
+ try {
+ const severity = this.validateRuleSeverity(options);
+
+ if (severity !== 0) {
+ this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
+ }
+ } catch (err) {
+ const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
+
+ if (typeof source === "string") {
+ throw new Error(`${source}:\n\t${enhancedMessage}`);
+ } else {
+ throw new Error(enhancedMessage);
+ }
+ }
+ }
+
+ /**
+ * Validates an environment object
+ * @param {Object} environment The environment config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
+ * @returns {void}
+ */
+ validateEnvironment(
+ environment,
+ source,
+ getAdditionalEnv = noop
+ ) {
+
+ // not having an environment is ok
+ if (!environment) {
+ return;
+ }
+
+ Object.keys(environment).forEach(id => {
+ const env = getAdditionalEnv(id) || environments.get(id) || null;
+
+ if (!env) {
+ const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
+
+ throw new Error(message);
+ }
+ });
+ }
+
+ /**
+ * Validates a rules config object
+ * @param {Object} rulesConfig The rules config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
+ * @returns {void}
+ */
+ validateRules(
+ rulesConfig,
+ source,
+ getAdditionalRule = noop
+ ) {
+ if (!rulesConfig) {
+ return;
+ }
+
+ Object.keys(rulesConfig).forEach(id => {
+ const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
+
+ this.validateRuleOptions(rule, id, rulesConfig[id], source);
+ });
+ }
+
+ /**
+ * Validates a `globals` section of a config file
+ * @param {Object} globalsConfig The `globals` section
+ * @param {string|null} source The name of the configuration source to report in the event of an error.
+ * @returns {void}
+ */
+ validateGlobals(globalsConfig, source = null) {
+ if (!globalsConfig) {
+ return;
+ }
+
+ Object.entries(globalsConfig)
+ .forEach(([configuredGlobal, configuredValue]) => {
+ try {
+ normalizeConfigGlobal(configuredValue);
+ } catch (err) {
+ throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
+ }
+ });
+ }
+
+ /**
+ * Validate `processor` configuration.
+ * @param {string|undefined} processorName The processor name.
+ * @param {string} source The name of config file.
+ * @param {function(id:string): Processor} getProcessor The getter of defined processors.
+ * @returns {void}
+ */
+ validateProcessor(processorName, source, getProcessor) {
+ if (processorName && !getProcessor(processorName)) {
+ throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
+ }
+ }
+
+ /**
+ * Formats an array of schema validation errors.
+ * @param {Array} errors An array of error messages to format.
+ * @returns {string} Formatted error message
+ */
+ formatErrors(errors) {
+ return errors.map(error => {
+ if (error.keyword === "additionalProperties") {
+ const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
+
+ return `Unexpected top-level property "${formattedPropertyPath}"`;
+ }
+ if (error.keyword === "type") {
+ const formattedField = error.dataPath.slice(1);
+ const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
+ const formattedValue = JSON.stringify(error.data);
+
+ return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
+ }
+
+ const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
+
+ return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
+ }).map(message => `\t- ${message}.\n`).join("");
+ }
+
+ /**
+ * Validates the top level properties of the config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @returns {void}
+ */
+ validateConfigSchema(config, source = null) {
+ validateSchema = validateSchema || ajv.compile(configSchema);
+
+ if (!validateSchema(config)) {
+ throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
+ }
+
+ if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
+ emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
+ }
+ }
+
+ /**
+ * Validates an entire config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
+ * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
+ * @returns {void}
+ */
+ validate(config, source, getAdditionalRule, getAdditionalEnv) {
+ this.validateConfigSchema(config, source);
+ this.validateRules(config.rules, source, getAdditionalRule);
+ this.validateEnvironment(config.env, source, getAdditionalEnv);
+ this.validateGlobals(config.globals, source);
+
+ for (const override of config.overrides || []) {
+ this.validateRules(override.rules, source, getAdditionalRule);
+ this.validateEnvironment(override.env, source, getAdditionalEnv);
+ this.validateGlobals(config.globals, source);
+ }
+ }
+
+ /**
+ * Validate config array object.
+ * @param {ConfigArray} configArray The config array to validate.
+ * @returns {void}
+ */
+ validateConfigArray(configArray) {
+ const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
+ const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
+ const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
+
+ // Validate.
+ for (const element of configArray) {
+ if (validated.has(element)) {
+ continue;
+ }
+ validated.add(element);
+
+ this.validateEnvironment(element.env, element.name, getPluginEnv);
+ this.validateGlobals(element.globals, element.name);
+ this.validateProcessor(element.processor, element.name, getPluginProcessor);
+ this.validateRules(element.rules, element.name, getPluginRule);
+ }
+ }
+
+}
+
+/**
+ * @fileoverview Common helpers for naming of plugins, formatters and configs
+ */
+
+const NAMESPACE_REGEX = /^@.*\//iu;
+
+/**
+ * Brings package name to correct format based on prefix
+ * @param {string} name The name of the package.
+ * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
+ * @returns {string} Normalized name of the package
+ * @private
+ */
+function normalizePackageName(name, prefix) {
+ let normalizedName = name;
+
+ /**
+ * On Windows, name can come in with Windows slashes instead of Unix slashes.
+ * Normalize to Unix first to avoid errors later on.
+ * https://github.com/eslint/eslint/issues/5644
+ */
+ if (normalizedName.includes("\\")) {
+ normalizedName = normalizedName.replace(/\\/gu, "/");
+ }
+
+ if (normalizedName.charAt(0) === "@") {
+
+ /**
+ * it's a scoped package
+ * package name is the prefix, or just a username
+ */
+ const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
+ scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
+
+ if (scopedPackageShortcutRegex.test(normalizedName)) {
+ normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
+ } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
+
+ /**
+ * for scoped packages, insert the prefix after the first / unless
+ * the path is already @scope/eslint or @scope/eslint-xxx-yyy
+ */
+ normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
+ }
+ } else if (!normalizedName.startsWith(`${prefix}-`)) {
+ normalizedName = `${prefix}-${normalizedName}`;
+ }
+
+ return normalizedName;
+}
+
+/**
+ * Removes the prefix from a fullname.
+ * @param {string} fullname The term which may have the prefix.
+ * @param {string} prefix The prefix to remove.
+ * @returns {string} The term without prefix.
+ */
+function getShorthandName(fullname, prefix) {
+ if (fullname[0] === "@") {
+ let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
+
+ if (matchResult) {
+ return matchResult[1];
+ }
+
+ matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
+ if (matchResult) {
+ return `${matchResult[1]}/${matchResult[2]}`;
+ }
+ } else if (fullname.startsWith(`${prefix}-`)) {
+ return fullname.slice(prefix.length + 1);
+ }
+
+ return fullname;
+}
+
+/**
+ * Gets the scope (namespace) of a term.
+ * @param {string} term The term which may have the namespace.
+ * @returns {string} The namespace of the term if it has one.
+ */
+function getNamespaceFromTerm(term) {
+ const match = term.match(NAMESPACE_REGEX);
+
+ return match ? match[0] : "";
+}
+
+var naming = {
+ __proto__: null,
+ normalizePackageName: normalizePackageName,
+ getShorthandName: getShorthandName,
+ getNamespaceFromTerm: getNamespaceFromTerm
+};
+
+/**
+ * @fileoverview Package exports for @eslint/eslintrc
+ * @author Nicholas C. Zakas
+ */
+
+//-----------------------------------------------------------------------------
+// Exports
+//-----------------------------------------------------------------------------
+
+const Legacy = {
+ environments,
+
+ // shared
+ ConfigOps,
+ ConfigValidator,
+ naming
+};
+
+exports.Legacy = Legacy;
+//# sourceMappingURL=eslintrc-universal.cjs.map
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map
new file mode 100644
index 0000000..12895a6
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"eslintrc-universal.cjs","sources":["../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/index-universal.js"],"sourcesContent":["/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = [0, 1, 2, \"off\", \"warn\", \"error\"];\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.indexOf(severity) !== -1;\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwnProperty.call(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object\n * @returns {Object} JSON Schema for the rule's options.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n const schema = rule.schema || rule.meta && rule.meta.schema;\n\n // Given a tuple of schemas, insert warning level at the beginning\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n return {\n type: \"array\",\n minItems: 0,\n maxItems: 0\n };\n\n }\n\n // Given a full schema, leave it alone\n return schema || null;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n validateRule(localOptions);\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n const enhancedMessage = `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n throw new Error(`${source}:\\n\\t${enhancedMessage}`);\n } else {\n throw new Error(enhancedMessage);\n }\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {function(id:string): Processor} getProcessor The getter of defined processors.\n * @returns {void}\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwnProperty.call(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n naming\n};\n\nexport {\n Legacy\n};\n"],"names":["path","Ajv","globals","util","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AACtD,IAAI,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK;AACxE,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC3B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC;AACV,IAAI,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,UAAU,EAAE;AACrC,IAAI,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;AACjF;AACA,IAAI,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;AAC3E,QAAQ,OAAO,aAAa,CAAC;AAC7B,KAAK;AACL;AACA,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;AAC3C,QAAQ,OAAO,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;AAC/D,KAAK;AACL;AACA,IAAI,OAAO,CAAC,CAAC;AACb,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,MAAM,EAAE;AACpC;AACA,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE;AACtB,QAAQ,MAAM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AACA;AASA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,GAAG;AACf,IAAI,YAAY;AAChB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,MAAM;AACV;;;;"}
\ No newline at end of file
diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
new file mode 100644
index 0000000..9902a90
--- /dev/null
+++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
@@ -0,0 +1,4333 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var debugOrig = require('debug');
+var fs = require('fs');
+var importFresh = require('import-fresh');
+var Module = require('module');
+var path = require('path');
+var stripComments = require('strip-json-comments');
+var assert = require('assert');
+var ignore = require('ignore');
+var util = require('util');
+var minimatch = require('minimatch');
+var Ajv = require('ajv');
+var globals = require('globals');
+var os = require('os');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig);
+var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
+var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh);
+var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module);
+var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
+var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments);
+var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert);
+var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore);
+var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
+var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch);
+var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
+var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
+var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
+
+/**
+ * @fileoverview `IgnorePattern` class.
+ *
+ * `IgnorePattern` class has the set of glob patterns and the base path.
+ *
+ * It provides two static methods.
+ *
+ * - `IgnorePattern.createDefaultIgnore(cwd)`
+ * Create the default predicate function.
+ * - `IgnorePattern.createIgnore(ignorePatterns)`
+ * Create the predicate function from multiple `IgnorePattern` objects.
+ *
+ * It provides two properties and a method.
+ *
+ * - `patterns`
+ * The glob patterns that ignore to lint.
+ * - `basePath`
+ * The base path of the glob patterns. If absolute paths existed in the
+ * glob patterns, those are handled as relative paths to the base path.
+ * - `getPatternsRelativeTo(basePath)`
+ * Get `patterns` as modified for a given base path. It modifies the
+ * absolute paths in the patterns as prepending the difference of two base
+ * paths.
+ *
+ * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes
+ * `ignorePatterns` properties.
+ *
+ * @author Toru Nagashima
+ */
+
+const debug$3 = debugOrig__default["default"]("eslintrc:ignore-pattern");
+
+/** @typedef {ReturnType} Ignore */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the path to the common ancestor directory of given paths.
+ * @param {string[]} sourcePaths The paths to calculate the common ancestor.
+ * @returns {string} The path to the common ancestor directory.
+ */
+function getCommonAncestorPath(sourcePaths) {
+ let result = sourcePaths[0];
+
+ for (let i = 1; i < sourcePaths.length; ++i) {
+ const a = result;
+ const b = sourcePaths[i];
+
+ // Set the shorter one (it's the common ancestor if one includes the other).
+ result = a.length < b.length ? a : b;
+
+ // Set the common ancestor.
+ for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {
+ if (a[j] !== b[j]) {
+ result = a.slice(0, lastSepPos);
+ break;
+ }
+ if (a[j] === path__default["default"].sep) {
+ lastSepPos = j;
+ }
+ }
+ }
+
+ let resolvedResult = result || path__default["default"].sep;
+
+ // if Windows common ancestor is root of drive must have trailing slash to be absolute.
+ if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") {
+ resolvedResult += path__default["default"].sep;
+ }
+ return resolvedResult;
+}
+
+/**
+ * Make relative path.
+ * @param {string} from The source path to get relative path.
+ * @param {string} to The destination path to get relative path.
+ * @returns {string} The relative path.
+ */
+function relative(from, to) {
+ const relPath = path__default["default"].relative(from, to);
+
+ if (path__default["default"].sep === "/") {
+ return relPath;
+ }
+ return relPath.split(path__default["default"].sep).join("/");
+}
+
+/**
+ * Get the trailing slash if existed.
+ * @param {string} filePath The path to check.
+ * @returns {string} The trailing slash if existed.
+ */
+function dirSuffix(filePath) {
+ const isDir = (
+ filePath.endsWith(path__default["default"].sep) ||
+ (process.platform === "win32" && filePath.endsWith("/"))
+ );
+
+ return isDir ? "/" : "";
+}
+
+const DefaultPatterns = Object.freeze(["/**/node_modules/*"]);
+const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]);
+
+//------------------------------------------------------------------------------
+// Public
+//------------------------------------------------------------------------------
+
+class IgnorePattern {
+
+ /**
+ * The default patterns.
+ * @type {string[]}
+ */
+ static get DefaultPatterns() {
+ return DefaultPatterns;
+ }
+
+ /**
+ * Create the default predicate function.
+ * @param {string} cwd The current working directory.
+ * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}
+ * The preficate function.
+ * The first argument is an absolute path that is checked.
+ * The second argument is the flag to not ignore dotfiles.
+ * If the predicate function returned `true`, it means the path should be ignored.
+ */
+ static createDefaultIgnore(cwd) {
+ return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);
+ }
+
+ /**
+ * Create the predicate function from multiple `IgnorePattern` objects.
+ * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.
+ * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}
+ * The preficate function.
+ * The first argument is an absolute path that is checked.
+ * The second argument is the flag to not ignore dotfiles.
+ * If the predicate function returned `true`, it means the path should be ignored.
+ */
+ static createIgnore(ignorePatterns) {
+ debug$3("Create with: %o", ignorePatterns);
+
+ const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));
+ const patterns = [].concat(
+ ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))
+ );
+ const ig = ignore__default["default"]({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);
+ const dotIg = ignore__default["default"]({ allowRelativePaths: true }).add(patterns);
+
+ debug$3(" processed: %o", { basePath, patterns });
+
+ return Object.assign(
+ (filePath, dot = false) => {
+ assert__default["default"](path__default["default"].isAbsolute(filePath), "'filePath' should be an absolute path.");
+ const relPathRaw = relative(basePath, filePath);
+ const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));
+ const adoptedIg = dot ? dotIg : ig;
+ const result = relPath !== "" && adoptedIg.ignores(relPath);
+
+ debug$3("Check", { filePath, dot, relativePath: relPath, result });
+ return result;
+ },
+ { basePath, patterns }
+ );
+ }
+
+ /**
+ * Initialize a new `IgnorePattern` instance.
+ * @param {string[]} patterns The glob patterns that ignore to lint.
+ * @param {string} basePath The base path of `patterns`.
+ */
+ constructor(patterns, basePath) {
+ assert__default["default"](path__default["default"].isAbsolute(basePath), "'basePath' should be an absolute path.");
+
+ /**
+ * The glob patterns that ignore to lint.
+ * @type {string[]}
+ */
+ this.patterns = patterns;
+
+ /**
+ * The base path of `patterns`.
+ * @type {string}
+ */
+ this.basePath = basePath;
+
+ /**
+ * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.
+ *
+ * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.
+ * It's `false` as-is for `ignorePatterns` property in config files.
+ * @type {boolean}
+ */
+ this.loose = false;
+ }
+
+ /**
+ * Get `patterns` as modified for a given base path. It modifies the
+ * absolute paths in the patterns as prepending the difference of two base
+ * paths.
+ * @param {string} newBasePath The base path.
+ * @returns {string[]} Modifired patterns.
+ */
+ getPatternsRelativeTo(newBasePath) {
+ assert__default["default"](path__default["default"].isAbsolute(newBasePath), "'newBasePath' should be an absolute path.");
+ const { basePath, loose, patterns } = this;
+
+ if (newBasePath === basePath) {
+ return patterns;
+ }
+ const prefix = `/${relative(newBasePath, basePath)}`;
+
+ return patterns.map(pattern => {
+ const negative = pattern.startsWith("!");
+ const head = negative ? "!" : "";
+ const body = negative ? pattern.slice(1) : pattern;
+
+ if (body.startsWith("/") || body.startsWith("../")) {
+ return `${head}${prefix}${body}`;
+ }
+ return loose ? pattern : `${head}${prefix}/**/${body}`;
+ });
+ }
+}
+
+/**
+ * @fileoverview `ExtractedConfig` class.
+ *
+ * `ExtractedConfig` class expresses a final configuration for a specific file.
+ *
+ * It provides one method.
+ *
+ * - `toCompatibleObjectAsConfigFileContent()`
+ * Convert this configuration to the compatible object as the content of
+ * config files. It converts the loaded parser and plugins to strings.
+ * `CLIEngine#getConfigForFile(filePath)` method uses this method.
+ *
+ * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.
+ *
+ * @author Toru Nagashima
+ */
+
+// For VSCode intellisense
+/** @typedef {import("../../shared/types").ConfigData} ConfigData */
+/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
+/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */
+/** @typedef {import("./config-dependency").DependentParser} DependentParser */
+/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
+
+/**
+ * Check if `xs` starts with `ys`.
+ * @template T
+ * @param {T[]} xs The array to check.
+ * @param {T[]} ys The array that may be the first part of `xs`.
+ * @returns {boolean} `true` if `xs` starts with `ys`.
+ */
+function startsWith(xs, ys) {
+ return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);
+}
+
+/**
+ * The class for extracted config data.
+ */
+class ExtractedConfig {
+ constructor() {
+
+ /**
+ * The config name what `noInlineConfig` setting came from.
+ * @type {string}
+ */
+ this.configNameOfNoInlineConfig = "";
+
+ /**
+ * Environments.
+ * @type {Record}
+ */
+ this.env = {};
+
+ /**
+ * Global variables.
+ * @type {Record}
+ */
+ this.globals = {};
+
+ /**
+ * The glob patterns that ignore to lint.
+ * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}
+ */
+ this.ignores = void 0;
+
+ /**
+ * The flag that disables directive comments.
+ * @type {boolean|undefined}
+ */
+ this.noInlineConfig = void 0;
+
+ /**
+ * Parser definition.
+ * @type {DependentParser|null}
+ */
+ this.parser = null;
+
+ /**
+ * Options for the parser.
+ * @type {Object}
+ */
+ this.parserOptions = {};
+
+ /**
+ * Plugin definitions.
+ * @type {Record}
+ */
+ this.plugins = {};
+
+ /**
+ * Processor ID.
+ * @type {string|null}
+ */
+ this.processor = null;
+
+ /**
+ * The flag that reports unused `eslint-disable` directive comments.
+ * @type {boolean|undefined}
+ */
+ this.reportUnusedDisableDirectives = void 0;
+
+ /**
+ * Rule settings.
+ * @type {Record}
+ */
+ this.rules = {};
+
+ /**
+ * Shared settings.
+ * @type {Object}
+ */
+ this.settings = {};
+ }
+
+ /**
+ * Convert this config to the compatible object as a config file content.
+ * @returns {ConfigData} The converted object.
+ */
+ toCompatibleObjectAsConfigFileContent() {
+ const {
+ /* eslint-disable no-unused-vars */
+ configNameOfNoInlineConfig: _ignore1,
+ processor: _ignore2,
+ /* eslint-enable no-unused-vars */
+ ignores,
+ ...config
+ } = this;
+
+ config.parser = config.parser && config.parser.filePath;
+ config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();
+ config.ignorePatterns = ignores ? ignores.patterns : [];
+
+ // Strip the default patterns from `ignorePatterns`.
+ if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {
+ config.ignorePatterns =
+ config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);
+ }
+
+ return config;
+ }
+}
+
+/**
+ * @fileoverview `ConfigArray` class.
+ *
+ * `ConfigArray` class expresses the full of a configuration. It has the entry
+ * config file, base config files that were extended, loaded parsers, and loaded
+ * plugins.
+ *
+ * `ConfigArray` class provides three properties and two methods.
+ *
+ * - `pluginEnvironments`
+ * - `pluginProcessors`
+ * - `pluginRules`
+ * The `Map` objects that contain the members of all plugins that this
+ * config array contains. Those map objects don't have mutation methods.
+ * Those keys are the member ID such as `pluginId/memberName`.
+ * - `isRoot()`
+ * If `true` then this configuration has `root:true` property.
+ * - `extractConfig(filePath)`
+ * Extract the final configuration for a given file. This means merging
+ * every config array element which that `criteria` property matched. The
+ * `filePath` argument must be an absolute path.
+ *
+ * `ConfigArrayFactory` provides the loading logic of config files.
+ *
+ * @author Toru Nagashima
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+// Define types for VSCode IntelliSense.
+/** @typedef {import("../../shared/types").Environment} Environment */
+/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
+/** @typedef {import("../../shared/types").RuleConf} RuleConf */
+/** @typedef {import("../../shared/types").Rule} Rule */
+/** @typedef {import("../../shared/types").Plugin} Plugin */
+/** @typedef {import("../../shared/types").Processor} Processor */
+/** @typedef {import("./config-dependency").DependentParser} DependentParser */
+/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
+/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */
+
+/**
+ * @typedef {Object} ConfigArrayElement
+ * @property {string} name The name of this config element.
+ * @property {string} filePath The path to the source file of this config element.
+ * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.
+ * @property {Record|undefined} env The environment settings.
+ * @property {Record|undefined} globals The global variable settings.
+ * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.
+ * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.
+ * @property {DependentParser|undefined} parser The parser loader.
+ * @property {Object|undefined} parserOptions The parser options.
+ * @property {Record|undefined} plugins The plugin loaders.
+ * @property {string|undefined} processor The processor name to refer plugin's processor.
+ * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
+ * @property {boolean|undefined} root The flag to express root.
+ * @property {Record|undefined} rules The rule settings
+ * @property {Object|undefined} settings The shared settings.
+ * @property {"config" | "ignore" | "implicit-processor"} type The element type.
+ */
+
+/**
+ * @typedef {Object} ConfigArrayInternalSlots
+ * @property {Map} cache The cache to extract configs.
+ * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.
+ * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.
+ * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.
+ */
+
+/** @type {WeakMap} */
+const internalSlotsMap$2 = new class extends WeakMap {
+ get(key) {
+ let value = super.get(key);
+
+ if (!value) {
+ value = {
+ cache: new Map(),
+ envMap: null,
+ processorMap: null,
+ ruleMap: null
+ };
+ super.set(key, value);
+ }
+
+ return value;
+ }
+}();
+
+/**
+ * Get the indices which are matched to a given file.
+ * @param {ConfigArrayElement[]} elements The elements.
+ * @param {string} filePath The path to a target file.
+ * @returns {number[]} The indices.
+ */
+function getMatchedIndices(elements, filePath) {
+ const indices = [];
+
+ for (let i = elements.length - 1; i >= 0; --i) {
+ const element = elements[i];
+
+ if (!element.criteria || (filePath && element.criteria.test(filePath))) {
+ indices.push(i);
+ }
+ }
+
+ return indices;
+}
+
+/**
+ * Check if a value is a non-null object.
+ * @param {any} x The value to check.
+ * @returns {boolean} `true` if the value is a non-null object.
+ */
+function isNonNullObject(x) {
+ return typeof x === "object" && x !== null;
+}
+
+/**
+ * Merge two objects.
+ *
+ * Assign every property values of `y` to `x` if `x` doesn't have the property.
+ * If `x`'s property value is an object, it does recursive.
+ * @param {Object} target The destination to merge
+ * @param {Object|undefined} source The source to merge.
+ * @returns {void}
+ */
+function mergeWithoutOverwrite(target, source) {
+ if (!isNonNullObject(source)) {
+ return;
+ }
+
+ for (const key of Object.keys(source)) {
+ if (key === "__proto__") {
+ continue;
+ }
+
+ if (isNonNullObject(target[key])) {
+ mergeWithoutOverwrite(target[key], source[key]);
+ } else if (target[key] === void 0) {
+ if (isNonNullObject(source[key])) {
+ target[key] = Array.isArray(source[key]) ? [] : {};
+ mergeWithoutOverwrite(target[key], source[key]);
+ } else if (source[key] !== void 0) {
+ target[key] = source[key];
+ }
+ }
+ }
+}
+
+/**
+ * The error for plugin conflicts.
+ */
+class PluginConflictError extends Error {
+
+ /**
+ * Initialize this error object.
+ * @param {string} pluginId The plugin ID.
+ * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.
+ */
+ constructor(pluginId, plugins) {
+ super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`);
+ this.messageTemplate = "plugin-conflict";
+ this.messageData = { pluginId, plugins };
+ }
+}
+
+/**
+ * Merge plugins.
+ * `target`'s definition is prior to `source`'s.
+ * @param {Record} target The destination to merge
+ * @param {Record|undefined} source The source to merge.
+ * @returns {void}
+ */
+function mergePlugins(target, source) {
+ if (!isNonNullObject(source)) {
+ return;
+ }
+
+ for (const key of Object.keys(source)) {
+ if (key === "__proto__") {
+ continue;
+ }
+ const targetValue = target[key];
+ const sourceValue = source[key];
+
+ // Adopt the plugin which was found at first.
+ if (targetValue === void 0) {
+ if (sourceValue.error) {
+ throw sourceValue.error;
+ }
+ target[key] = sourceValue;
+ } else if (sourceValue.filePath !== targetValue.filePath) {
+ throw new PluginConflictError(key, [
+ {
+ filePath: targetValue.filePath,
+ importerName: targetValue.importerName
+ },
+ {
+ filePath: sourceValue.filePath,
+ importerName: sourceValue.importerName
+ }
+ ]);
+ }
+ }
+}
+
+/**
+ * Merge rule configs.
+ * `target`'s definition is prior to `source`'s.
+ * @param {Record} target The destination to merge
+ * @param {Record|undefined} source The source to merge.
+ * @returns {void}
+ */
+function mergeRuleConfigs(target, source) {
+ if (!isNonNullObject(source)) {
+ return;
+ }
+
+ for (const key of Object.keys(source)) {
+ if (key === "__proto__") {
+ continue;
+ }
+ const targetDef = target[key];
+ const sourceDef = source[key];
+
+ // Adopt the rule config which was found at first.
+ if (targetDef === void 0) {
+ if (Array.isArray(sourceDef)) {
+ target[key] = [...sourceDef];
+ } else {
+ target[key] = [sourceDef];
+ }
+
+ /*
+ * If the first found rule config is severity only and the current rule
+ * config has options, merge the severity and the options.
+ */
+ } else if (
+ targetDef.length === 1 &&
+ Array.isArray(sourceDef) &&
+ sourceDef.length >= 2
+ ) {
+ targetDef.push(...sourceDef.slice(1));
+ }
+ }
+}
+
+/**
+ * Create the extracted config.
+ * @param {ConfigArray} instance The config elements.
+ * @param {number[]} indices The indices to use.
+ * @returns {ExtractedConfig} The extracted config.
+ */
+function createConfig(instance, indices) {
+ const config = new ExtractedConfig();
+ const ignorePatterns = [];
+
+ // Merge elements.
+ for (const index of indices) {
+ const element = instance[index];
+
+ // Adopt the parser which was found at first.
+ if (!config.parser && element.parser) {
+ if (element.parser.error) {
+ throw element.parser.error;
+ }
+ config.parser = element.parser;
+ }
+
+ // Adopt the processor which was found at first.
+ if (!config.processor && element.processor) {
+ config.processor = element.processor;
+ }
+
+ // Adopt the noInlineConfig which was found at first.
+ if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {
+ config.noInlineConfig = element.noInlineConfig;
+ config.configNameOfNoInlineConfig = element.name;
+ }
+
+ // Adopt the reportUnusedDisableDirectives which was found at first.
+ if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {
+ config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;
+ }
+
+ // Collect ignorePatterns
+ if (element.ignorePattern) {
+ ignorePatterns.push(element.ignorePattern);
+ }
+
+ // Merge others.
+ mergeWithoutOverwrite(config.env, element.env);
+ mergeWithoutOverwrite(config.globals, element.globals);
+ mergeWithoutOverwrite(config.parserOptions, element.parserOptions);
+ mergeWithoutOverwrite(config.settings, element.settings);
+ mergePlugins(config.plugins, element.plugins);
+ mergeRuleConfigs(config.rules, element.rules);
+ }
+
+ // Create the predicate function for ignore patterns.
+ if (ignorePatterns.length > 0) {
+ config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());
+ }
+
+ return config;
+}
+
+/**
+ * Collect definitions.
+ * @template T, U
+ * @param {string} pluginId The plugin ID for prefix.
+ * @param {Record} defs The definitions to collect.
+ * @param {Map} map The map to output.
+ * @param {function(T): U} [normalize] The normalize function for each value.
+ * @returns {void}
+ */
+function collect(pluginId, defs, map, normalize) {
+ if (defs) {
+ const prefix = pluginId && `${pluginId}/`;
+
+ for (const [key, value] of Object.entries(defs)) {
+ map.set(
+ `${prefix}${key}`,
+ normalize ? normalize(value) : value
+ );
+ }
+ }
+}
+
+/**
+ * Normalize a rule definition.
+ * @param {Function|Rule} rule The rule definition to normalize.
+ * @returns {Rule} The normalized rule definition.
+ */
+function normalizePluginRule(rule) {
+ return typeof rule === "function" ? { create: rule } : rule;
+}
+
+/**
+ * Delete the mutation methods from a given map.
+ * @param {Map} map The map object to delete.
+ * @returns {void}
+ */
+function deleteMutationMethods(map) {
+ Object.defineProperties(map, {
+ clear: { configurable: true, value: void 0 },
+ delete: { configurable: true, value: void 0 },
+ set: { configurable: true, value: void 0 }
+ });
+}
+
+/**
+ * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
+ * @param {ConfigArrayElement[]} elements The config elements.
+ * @param {ConfigArrayInternalSlots} slots The internal slots.
+ * @returns {void}
+ */
+function initPluginMemberMaps(elements, slots) {
+ const processed = new Set();
+
+ slots.envMap = new Map();
+ slots.processorMap = new Map();
+ slots.ruleMap = new Map();
+
+ for (const element of elements) {
+ if (!element.plugins) {
+ continue;
+ }
+
+ for (const [pluginId, value] of Object.entries(element.plugins)) {
+ const plugin = value.definition;
+
+ if (!plugin || processed.has(pluginId)) {
+ continue;
+ }
+ processed.add(pluginId);
+
+ collect(pluginId, plugin.environments, slots.envMap);
+ collect(pluginId, plugin.processors, slots.processorMap);
+ collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);
+ }
+ }
+
+ deleteMutationMethods(slots.envMap);
+ deleteMutationMethods(slots.processorMap);
+ deleteMutationMethods(slots.ruleMap);
+}
+
+/**
+ * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
+ * @param {ConfigArray} instance The config elements.
+ * @returns {ConfigArrayInternalSlots} The extracted config.
+ */
+function ensurePluginMemberMaps(instance) {
+ const slots = internalSlotsMap$2.get(instance);
+
+ if (!slots.ruleMap) {
+ initPluginMemberMaps(instance, slots);
+ }
+
+ return slots;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * The Config Array.
+ *
+ * `ConfigArray` instance contains all settings, parsers, and plugins.
+ * You need to call `ConfigArray#extractConfig(filePath)` method in order to
+ * extract, merge and get only the config data which is related to an arbitrary
+ * file.
+ * @extends {Array}
+ */
+class ConfigArray extends Array {
+
+ /**
+ * Get the plugin environments.
+ * The returned map cannot be mutated.
+ * @type {ReadonlyMap} The plugin environments.
+ */
+ get pluginEnvironments() {
+ return ensurePluginMemberMaps(this).envMap;
+ }
+
+ /**
+ * Get the plugin processors.
+ * The returned map cannot be mutated.
+ * @type {ReadonlyMap} The plugin processors.
+ */
+ get pluginProcessors() {
+ return ensurePluginMemberMaps(this).processorMap;
+ }
+
+ /**
+ * Get the plugin rules.
+ * The returned map cannot be mutated.
+ * @returns {ReadonlyMap} The plugin rules.
+ */
+ get pluginRules() {
+ return ensurePluginMemberMaps(this).ruleMap;
+ }
+
+ /**
+ * Check if this config has `root` flag.
+ * @returns {boolean} `true` if this config array is root.
+ */
+ isRoot() {
+ for (let i = this.length - 1; i >= 0; --i) {
+ const root = this[i].root;
+
+ if (typeof root === "boolean") {
+ return root;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Extract the config data which is related to a given file.
+ * @param {string} filePath The absolute path to the target file.
+ * @returns {ExtractedConfig} The extracted config data.
+ */
+ extractConfig(filePath) {
+ const { cache } = internalSlotsMap$2.get(this);
+ const indices = getMatchedIndices(this, filePath);
+ const cacheKey = indices.join(",");
+
+ if (!cache.has(cacheKey)) {
+ cache.set(cacheKey, createConfig(this, indices));
+ }
+
+ return cache.get(cacheKey);
+ }
+
+ /**
+ * Check if a given path is an additional lint target.
+ * @param {string} filePath The absolute path to the target file.
+ * @returns {boolean} `true` if the file is an additional lint target.
+ */
+ isAdditionalTargetPath(filePath) {
+ for (const { criteria, type } of this) {
+ if (
+ type === "config" &&
+ criteria &&
+ !criteria.endsWithWildcard &&
+ criteria.test(filePath)
+ ) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+/**
+ * Get the used extracted configs.
+ * CLIEngine will use this method to collect used deprecated rules.
+ * @param {ConfigArray} instance The config array object to get.
+ * @returns {ExtractedConfig[]} The used extracted configs.
+ * @private
+ */
+function getUsedExtractedConfigs(instance) {
+ const { cache } = internalSlotsMap$2.get(instance);
+
+ return Array.from(cache.values());
+}
+
+/**
+ * @fileoverview `ConfigDependency` class.
+ *
+ * `ConfigDependency` class expresses a loaded parser or plugin.
+ *
+ * If the parser or plugin was loaded successfully, it has `definition` property
+ * and `filePath` property. Otherwise, it has `error` property.
+ *
+ * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it
+ * omits `definition` property.
+ *
+ * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers
+ * or plugins.
+ *
+ * @author Toru Nagashima
+ */
+
+/**
+ * The class is to store parsers or plugins.
+ * This class hides the loaded object from `JSON.stringify()` and `console.log`.
+ * @template T
+ */
+class ConfigDependency {
+
+ /**
+ * Initialize this instance.
+ * @param {Object} data The dependency data.
+ * @param {T} [data.definition] The dependency if the loading succeeded.
+ * @param {Error} [data.error] The error object if the loading failed.
+ * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.
+ * @param {string} data.id The ID of this dependency.
+ * @param {string} data.importerName The name of the config file which loads this dependency.
+ * @param {string} data.importerPath The path to the config file which loads this dependency.
+ */
+ constructor({
+ definition = null,
+ error = null,
+ filePath = null,
+ id,
+ importerName,
+ importerPath
+ }) {
+
+ /**
+ * The loaded dependency if the loading succeeded.
+ * @type {T|null}
+ */
+ this.definition = definition;
+
+ /**
+ * The error object if the loading failed.
+ * @type {Error|null}
+ */
+ this.error = error;
+
+ /**
+ * The loaded dependency if the loading succeeded.
+ * @type {string|null}
+ */
+ this.filePath = filePath;
+
+ /**
+ * The ID of this dependency.
+ * @type {string}
+ */
+ this.id = id;
+
+ /**
+ * The name of the config file which loads this dependency.
+ * @type {string}
+ */
+ this.importerName = importerName;
+
+ /**
+ * The path to the config file which loads this dependency.
+ * @type {string}
+ */
+ this.importerPath = importerPath;
+ }
+
+ // eslint-disable-next-line jsdoc/require-description
+ /**
+ * @returns {Object} a JSON compatible object.
+ */
+ toJSON() {
+ const obj = this[util__default["default"].inspect.custom]();
+
+ // Display `error.message` (`Error#message` is unenumerable).
+ if (obj.error instanceof Error) {
+ obj.error = { ...obj.error, message: obj.error.message };
+ }
+
+ return obj;
+ }
+
+ // eslint-disable-next-line jsdoc/require-description
+ /**
+ * @returns {Object} an object to display by `console.log()`.
+ */
+ [util__default["default"].inspect.custom]() {
+ const {
+ definition: _ignore, // eslint-disable-line no-unused-vars
+ ...obj
+ } = this;
+
+ return obj;
+ }
+}
+
+/**
+ * @fileoverview `OverrideTester` class.
+ *
+ * `OverrideTester` class handles `files` property and `excludedFiles` property
+ * of `overrides` config.
+ *
+ * It provides one method.
+ *
+ * - `test(filePath)`
+ * Test if a file path matches the pair of `files` property and
+ * `excludedFiles` property. The `filePath` argument must be an absolute
+ * path.
+ *
+ * `ConfigArrayFactory` creates `OverrideTester` objects when it processes
+ * `overrides` properties.
+ *
+ * @author Toru Nagashima
+ */
+
+const { Minimatch } = minimatch__default["default"];
+
+const minimatchOpts = { dot: true, matchBase: true };
+
+/**
+ * @typedef {Object} Pattern
+ * @property {InstanceType[] | null} includes The positive matchers.
+ * @property {InstanceType[] | null} excludes The negative matchers.
+ */
+
+/**
+ * Normalize a given pattern to an array.
+ * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.
+ * @returns {string[]|null} Normalized patterns.
+ * @private
+ */
+function normalizePatterns(patterns) {
+ if (Array.isArray(patterns)) {
+ return patterns.filter(Boolean);
+ }
+ if (typeof patterns === "string" && patterns) {
+ return [patterns];
+ }
+ return [];
+}
+
+/**
+ * Create the matchers of given patterns.
+ * @param {string[]} patterns The patterns.
+ * @returns {InstanceType[] | null} The matchers.
+ */
+function toMatcher(patterns) {
+ if (patterns.length === 0) {
+ return null;
+ }
+ return patterns.map(pattern => {
+ if (/^\.[/\\]/u.test(pattern)) {
+ return new Minimatch(
+ pattern.slice(2),
+
+ // `./*.js` should not match with `subdir/foo.js`
+ { ...minimatchOpts, matchBase: false }
+ );
+ }
+ return new Minimatch(pattern, minimatchOpts);
+ });
+}
+
+/**
+ * Convert a given matcher to string.
+ * @param {Pattern} matchers The matchers.
+ * @returns {string} The string expression of the matcher.
+ */
+function patternToJson({ includes, excludes }) {
+ return {
+ includes: includes && includes.map(m => m.pattern),
+ excludes: excludes && excludes.map(m => m.pattern)
+ };
+}
+
+/**
+ * The class to test given paths are matched by the patterns.
+ */
+class OverrideTester {
+
+ /**
+ * Create a tester with given criteria.
+ * If there are no criteria, returns `null`.
+ * @param {string|string[]} files The glob patterns for included files.
+ * @param {string|string[]} excludedFiles The glob patterns for excluded files.
+ * @param {string} basePath The path to the base directory to test paths.
+ * @returns {OverrideTester|null} The created instance or `null`.
+ */
+ static create(files, excludedFiles, basePath) {
+ const includePatterns = normalizePatterns(files);
+ const excludePatterns = normalizePatterns(excludedFiles);
+ let endsWithWildcard = false;
+
+ if (includePatterns.length === 0) {
+ return null;
+ }
+
+ // Rejects absolute paths or relative paths to parents.
+ for (const pattern of includePatterns) {
+ if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
+ throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
+ }
+ if (pattern.endsWith("*")) {
+ endsWithWildcard = true;
+ }
+ }
+ for (const pattern of excludePatterns) {
+ if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
+ throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
+ }
+ }
+
+ const includes = toMatcher(includePatterns);
+ const excludes = toMatcher(excludePatterns);
+
+ return new OverrideTester(
+ [{ includes, excludes }],
+ basePath,
+ endsWithWildcard
+ );
+ }
+
+ /**
+ * Combine two testers by logical and.
+ * If either of the testers was `null`, returns the other tester.
+ * The `basePath` property of the two must be the same value.
+ * @param {OverrideTester|null} a A tester.
+ * @param {OverrideTester|null} b Another tester.
+ * @returns {OverrideTester|null} Combined tester.
+ */
+ static and(a, b) {
+ if (!b) {
+ return a && new OverrideTester(
+ a.patterns,
+ a.basePath,
+ a.endsWithWildcard
+ );
+ }
+ if (!a) {
+ return new OverrideTester(
+ b.patterns,
+ b.basePath,
+ b.endsWithWildcard
+ );
+ }
+
+ assert__default["default"].strictEqual(a.basePath, b.basePath);
+ return new OverrideTester(
+ a.patterns.concat(b.patterns),
+ a.basePath,
+ a.endsWithWildcard || b.endsWithWildcard
+ );
+ }
+
+ /**
+ * Initialize this instance.
+ * @param {Pattern[]} patterns The matchers.
+ * @param {string} basePath The base path.
+ * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.
+ */
+ constructor(patterns, basePath, endsWithWildcard = false) {
+
+ /** @type {Pattern[]} */
+ this.patterns = patterns;
+
+ /** @type {string} */
+ this.basePath = basePath;
+
+ /** @type {boolean} */
+ this.endsWithWildcard = endsWithWildcard;
+ }
+
+ /**
+ * Test if a given path is matched or not.
+ * @param {string} filePath The absolute path to the target file.
+ * @returns {boolean} `true` if the path was matched.
+ */
+ test(filePath) {
+ if (typeof filePath !== "string" || !path__default["default"].isAbsolute(filePath)) {
+ throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);
+ }
+ const relativePath = path__default["default"].relative(this.basePath, filePath);
+
+ return this.patterns.every(({ includes, excludes }) => (
+ (!includes || includes.some(m => m.match(relativePath))) &&
+ (!excludes || !excludes.some(m => m.match(relativePath)))
+ ));
+ }
+
+ // eslint-disable-next-line jsdoc/require-description
+ /**
+ * @returns {Object} a JSON compatible object.
+ */
+ toJSON() {
+ if (this.patterns.length === 1) {
+ return {
+ ...patternToJson(this.patterns[0]),
+ basePath: this.basePath
+ };
+ }
+ return {
+ AND: this.patterns.map(patternToJson),
+ basePath: this.basePath
+ };
+ }
+
+ // eslint-disable-next-line jsdoc/require-description
+ /**
+ * @returns {Object} an object to display by `console.log()`.
+ */
+ [util__default["default"].inspect.custom]() {
+ return this.toJSON();
+ }
+}
+
+/**
+ * @fileoverview `ConfigArray` class.
+ * @author Toru Nagashima
+ */
+
+/**
+ * @fileoverview Config file operations. This file must be usable in the browser,
+ * so no Node-specific code can be here.
+ * @author Nicholas C. Zakas
+ */
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
+ RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
+ map[value] = index;
+ return map;
+ }, {}),
+ VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Normalizes the severity value of a rule's configuration to a number
+ * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
+ * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
+ * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
+ * whose first element is one of the above values. Strings are matched case-insensitively.
+ * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
+ */
+function getRuleSeverity(ruleConfig) {
+ const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
+ return severityValue;
+ }
+
+ if (typeof severityValue === "string") {
+ return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
+ }
+
+ return 0;
+}
+
+/**
+ * Converts old-style severity settings (0, 1, 2) into new-style
+ * severity settings (off, warn, error) for all rules. Assumption is that severity
+ * values have already been validated as correct.
+ * @param {Object} config The config object to normalize.
+ * @returns {void}
+ */
+function normalizeToStrings(config) {
+
+ if (config.rules) {
+ Object.keys(config.rules).forEach(ruleId => {
+ const ruleConfig = config.rules[ruleId];
+
+ if (typeof ruleConfig === "number") {
+ config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
+ } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
+ ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
+ }
+ });
+ }
+}
+
+/**
+ * Determines if the severity for the given rule configuration represents an error.
+ * @param {int|string|Array} ruleConfig The configuration for an individual rule.
+ * @returns {boolean} True if the rule represents an error, false if not.
+ */
+function isErrorSeverity(ruleConfig) {
+ return getRuleSeverity(ruleConfig) === 2;
+}
+
+/**
+ * Checks whether a given config has valid severity or not.
+ * @param {number|string|Array} ruleConfig The configuration for an individual rule.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+function isValidSeverity(ruleConfig) {
+ let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+ if (typeof severity === "string") {
+ severity = severity.toLowerCase();
+ }
+ return VALID_SEVERITIES.indexOf(severity) !== -1;
+}
+
+/**
+ * Checks whether every rule of a given config has valid severity or not.
+ * @param {Object} config The configuration for rules.
+ * @returns {boolean} `true` if the configuration has valid severity.
+ */
+function isEverySeverityValid(config) {
+ return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
+}
+
+/**
+ * Normalizes a value for a global in a config
+ * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
+ * a global directive comment
+ * @returns {("readable"|"writeable"|"off")} The value normalized as a string
+ * @throws Error if global value is invalid
+ */
+function normalizeConfigGlobal(configuredValue) {
+ switch (configuredValue) {
+ case "off":
+ return "off";
+
+ case true:
+ case "true":
+ case "writeable":
+ case "writable":
+ return "writable";
+
+ case null:
+ case false:
+ case "false":
+ case "readable":
+ case "readonly":
+ return "readonly";
+
+ default:
+ throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
+ }
+}
+
+var ConfigOps = {
+ __proto__: null,
+ getRuleSeverity: getRuleSeverity,
+ normalizeToStrings: normalizeToStrings,
+ isErrorSeverity: isErrorSeverity,
+ isValidSeverity: isValidSeverity,
+ isEverySeverityValid: isEverySeverityValid,
+ normalizeConfigGlobal: normalizeConfigGlobal
+};
+
+/**
+ * @fileoverview Provide the function that emits deprecation warnings.
+ * @author Toru Nagashima
+ */
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+// Defitions for deprecation warnings.
+const deprecationWarningMessages = {
+ ESLINT_LEGACY_ECMAFEATURES:
+ "The 'ecmaFeatures' config file property is deprecated and has no effect.",
+ ESLINT_PERSONAL_CONFIG_LOAD:
+ "'~/.eslintrc.*' config files have been deprecated. " +
+ "Please use a config file per project or the '--config' option.",
+ ESLINT_PERSONAL_CONFIG_SUPPRESS:
+ "'~/.eslintrc.*' config files have been deprecated. " +
+ "Please remove it or add 'root:true' to the config files in your " +
+ "projects in order to avoid loading '~/.eslintrc.*' accidentally."
+};
+
+const sourceFileErrorCache = new Set();
+
+/**
+ * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
+ * for each unique file path, but repeated invocations with the same file path have no effect.
+ * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
+ * @param {string} source The name of the configuration source to report the warning for.
+ * @param {string} errorCode The warning message to show.
+ * @returns {void}
+ */
+function emitDeprecationWarning(source, errorCode) {
+ const cacheKey = JSON.stringify({ source, errorCode });
+
+ if (sourceFileErrorCache.has(cacheKey)) {
+ return;
+ }
+ sourceFileErrorCache.add(cacheKey);
+
+ const rel = path__default["default"].relative(process.cwd(), source);
+ const message = deprecationWarningMessages[errorCode];
+
+ process.emitWarning(
+ `${message} (found in "${rel}")`,
+ "DeprecationWarning",
+ errorCode
+ );
+}
+
+/**
+ * @fileoverview The instance of Ajv validator.
+ * @author Evgeny Poberezkin
+ */
+
+//-----------------------------------------------------------------------------
+// Helpers
+//-----------------------------------------------------------------------------
+
+/*
+ * Copied from ajv/lib/refs/json-schema-draft-04.json
+ * The MIT License (MIT)
+ * Copyright (c) 2015-2017 Evgeny Poberezkin
+ */
+const metaSchema = {
+ id: "http://json-schema.org/draft-04/schema#",
+ $schema: "http://json-schema.org/draft-04/schema#",
+ description: "Core schema meta-schema",
+ definitions: {
+ schemaArray: {
+ type: "array",
+ minItems: 1,
+ items: { $ref: "#" }
+ },
+ positiveInteger: {
+ type: "integer",
+ minimum: 0
+ },
+ positiveIntegerDefault0: {
+ allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
+ },
+ simpleTypes: {
+ enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ stringArray: {
+ type: "array",
+ items: { type: "string" },
+ minItems: 1,
+ uniqueItems: true
+ }
+ },
+ type: "object",
+ properties: {
+ id: {
+ type: "string"
+ },
+ $schema: {
+ type: "string"
+ },
+ title: {
+ type: "string"
+ },
+ description: {
+ type: "string"
+ },
+ default: { },
+ multipleOf: {
+ type: "number",
+ minimum: 0,
+ exclusiveMinimum: true
+ },
+ maximum: {
+ type: "number"
+ },
+ exclusiveMaximum: {
+ type: "boolean",
+ default: false
+ },
+ minimum: {
+ type: "number"
+ },
+ exclusiveMinimum: {
+ type: "boolean",
+ default: false
+ },
+ maxLength: { $ref: "#/definitions/positiveInteger" },
+ minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
+ pattern: {
+ type: "string",
+ format: "regex"
+ },
+ additionalItems: {
+ anyOf: [
+ { type: "boolean" },
+ { $ref: "#" }
+ ],
+ default: { }
+ },
+ items: {
+ anyOf: [
+ { $ref: "#" },
+ { $ref: "#/definitions/schemaArray" }
+ ],
+ default: { }
+ },
+ maxItems: { $ref: "#/definitions/positiveInteger" },
+ minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
+ uniqueItems: {
+ type: "boolean",
+ default: false
+ },
+ maxProperties: { $ref: "#/definitions/positiveInteger" },
+ minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
+ required: { $ref: "#/definitions/stringArray" },
+ additionalProperties: {
+ anyOf: [
+ { type: "boolean" },
+ { $ref: "#" }
+ ],
+ default: { }
+ },
+ definitions: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ properties: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ patternProperties: {
+ type: "object",
+ additionalProperties: { $ref: "#" },
+ default: { }
+ },
+ dependencies: {
+ type: "object",
+ additionalProperties: {
+ anyOf: [
+ { $ref: "#" },
+ { $ref: "#/definitions/stringArray" }
+ ]
+ }
+ },
+ enum: {
+ type: "array",
+ minItems: 1,
+ uniqueItems: true
+ },
+ type: {
+ anyOf: [
+ { $ref: "#/definitions/simpleTypes" },
+ {
+ type: "array",
+ items: { $ref: "#/definitions/simpleTypes" },
+ minItems: 1,
+ uniqueItems: true
+ }
+ ]
+ },
+ format: { type: "string" },
+ allOf: { $ref: "#/definitions/schemaArray" },
+ anyOf: { $ref: "#/definitions/schemaArray" },
+ oneOf: { $ref: "#/definitions/schemaArray" },
+ not: { $ref: "#" }
+ },
+ dependencies: {
+ exclusiveMaximum: ["maximum"],
+ exclusiveMinimum: ["minimum"]
+ },
+ default: { }
+};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+var ajvOrig = (additionalOptions = {}) => {
+ const ajv = new Ajv__default["default"]({
+ meta: false,
+ useDefaults: true,
+ validateSchema: false,
+ missingRefs: "ignore",
+ verbose: true,
+ schemaId: "auto",
+ ...additionalOptions
+ });
+
+ ajv.addMetaSchema(metaSchema);
+ // eslint-disable-next-line no-underscore-dangle
+ ajv._opts.defaultMeta = metaSchema.id;
+
+ return ajv;
+};
+
+/**
+ * @fileoverview Defines a schema for configs.
+ * @author Sylvan Mably
+ */
+
+const baseConfigProperties = {
+ $schema: { type: "string" },
+ env: { type: "object" },
+ extends: { $ref: "#/definitions/stringOrStrings" },
+ globals: { type: "object" },
+ overrides: {
+ type: "array",
+ items: { $ref: "#/definitions/overrideConfig" },
+ additionalItems: false
+ },
+ parser: { type: ["string", "null"] },
+ parserOptions: { type: "object" },
+ plugins: { type: "array" },
+ processor: { type: "string" },
+ rules: { type: "object" },
+ settings: { type: "object" },
+ noInlineConfig: { type: "boolean" },
+ reportUnusedDisableDirectives: { type: "boolean" },
+
+ ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
+};
+
+const configSchema = {
+ definitions: {
+ stringOrStrings: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false
+ }
+ ]
+ },
+ stringOrStringsRequired: {
+ oneOf: [
+ { type: "string" },
+ {
+ type: "array",
+ items: { type: "string" },
+ additionalItems: false,
+ minItems: 1
+ }
+ ]
+ },
+
+ // Config at top-level.
+ objectConfig: {
+ type: "object",
+ properties: {
+ root: { type: "boolean" },
+ ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
+ ...baseConfigProperties
+ },
+ additionalProperties: false
+ },
+
+ // Config in `overrides`.
+ overrideConfig: {
+ type: "object",
+ properties: {
+ excludedFiles: { $ref: "#/definitions/stringOrStrings" },
+ files: { $ref: "#/definitions/stringOrStringsRequired" },
+ ...baseConfigProperties
+ },
+ required: ["files"],
+ additionalProperties: false
+ }
+ },
+
+ $ref: "#/definitions/objectConfig"
+};
+
+/**
+ * @fileoverview Defines environment settings and globals.
+ * @author Elan Shanker
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the object that has difference.
+ * @param {Record} current The newer object.
+ * @param {Record} prev The older object.
+ * @returns {Record} The difference object.
+ */
+function getDiff(current, prev) {
+ const retv = {};
+
+ for (const [key, value] of Object.entries(current)) {
+ if (!Object.hasOwnProperty.call(prev, key)) {
+ retv[key] = value;
+ }
+ }
+
+ return retv;
+}
+
+const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ...
+const newGlobals2017 = {
+ Atomics: false,
+ SharedArrayBuffer: false
+};
+const newGlobals2020 = {
+ BigInt: false,
+ BigInt64Array: false,
+ BigUint64Array: false,
+ globalThis: false
+};
+
+const newGlobals2021 = {
+ AggregateError: false,
+ FinalizationRegistry: false,
+ WeakRef: false
+};
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/** @type {Map} */
+var environments = new Map(Object.entries({
+
+ // Language
+ builtin: {
+ globals: globals__default["default"].es5
+ },
+ es6: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2015: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 6
+ }
+ },
+ es2016: {
+ globals: newGlobals2015,
+ parserOptions: {
+ ecmaVersion: 7
+ }
+ },
+ es2017: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 8
+ }
+ },
+ es2018: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 9
+ }
+ },
+ es2019: {
+ globals: { ...newGlobals2015, ...newGlobals2017 },
+ parserOptions: {
+ ecmaVersion: 10
+ }
+ },
+ es2020: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
+ parserOptions: {
+ ecmaVersion: 11
+ }
+ },
+ es2021: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 12
+ }
+ },
+ es2022: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 13
+ }
+ },
+ es2023: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 14
+ }
+ },
+ es2024: {
+ globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
+ parserOptions: {
+ ecmaVersion: 15
+ }
+ },
+
+ // Platforms
+ browser: {
+ globals: globals__default["default"].browser
+ },
+ node: {
+ globals: globals__default["default"].node,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ "shared-node-browser": {
+ globals: globals__default["default"]["shared-node-browser"]
+ },
+ worker: {
+ globals: globals__default["default"].worker
+ },
+ serviceworker: {
+ globals: globals__default["default"].serviceworker
+ },
+
+ // Frameworks
+ commonjs: {
+ globals: globals__default["default"].commonjs,
+ parserOptions: {
+ ecmaFeatures: {
+ globalReturn: true
+ }
+ }
+ },
+ amd: {
+ globals: globals__default["default"].amd
+ },
+ mocha: {
+ globals: globals__default["default"].mocha
+ },
+ jasmine: {
+ globals: globals__default["default"].jasmine
+ },
+ jest: {
+ globals: globals__default["default"].jest
+ },
+ phantomjs: {
+ globals: globals__default["default"].phantomjs
+ },
+ jquery: {
+ globals: globals__default["default"].jquery
+ },
+ qunit: {
+ globals: globals__default["default"].qunit
+ },
+ prototypejs: {
+ globals: globals__default["default"].prototypejs
+ },
+ shelljs: {
+ globals: globals__default["default"].shelljs
+ },
+ meteor: {
+ globals: globals__default["default"].meteor
+ },
+ mongo: {
+ globals: globals__default["default"].mongo
+ },
+ protractor: {
+ globals: globals__default["default"].protractor
+ },
+ applescript: {
+ globals: globals__default["default"].applescript
+ },
+ nashorn: {
+ globals: globals__default["default"].nashorn
+ },
+ atomtest: {
+ globals: globals__default["default"].atomtest
+ },
+ embertest: {
+ globals: globals__default["default"].embertest
+ },
+ webextensions: {
+ globals: globals__default["default"].webextensions
+ },
+ greasemonkey: {
+ globals: globals__default["default"].greasemonkey
+ }
+}));
+
+/**
+ * @fileoverview Validates configs.
+ * @author Brandon Mills
+ */
+
+const ajv = ajvOrig();
+
+const ruleValidators = new WeakMap();
+const noop = Function.prototype;
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+let validateSchema;
+const severityMap = {
+ error: 2,
+ warn: 1,
+ off: 0
+};
+
+const validated = new WeakSet();
+
+//-----------------------------------------------------------------------------
+// Exports
+//-----------------------------------------------------------------------------
+
+class ConfigValidator {
+ constructor({ builtInRules = new Map() } = {}) {
+ this.builtInRules = builtInRules;
+ }
+
+ /**
+ * Gets a complete options schema for a rule.
+ * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
+ * @returns {Object} JSON Schema for the rule's options.
+ */
+ getRuleOptionsSchema(rule) {
+ if (!rule) {
+ return null;
+ }
+
+ const schema = rule.schema || rule.meta && rule.meta.schema;
+
+ // Given a tuple of schemas, insert warning level at the beginning
+ if (Array.isArray(schema)) {
+ if (schema.length) {
+ return {
+ type: "array",
+ items: schema,
+ minItems: 0,
+ maxItems: schema.length
+ };
+ }
+ return {
+ type: "array",
+ minItems: 0,
+ maxItems: 0
+ };
+
+ }
+
+ // Given a full schema, leave it alone
+ return schema || null;
+ }
+
+ /**
+ * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
+ * @param {options} options The given options for the rule.
+ * @returns {number|string} The rule's severity value
+ */
+ validateRuleSeverity(options) {
+ const severity = Array.isArray(options) ? options[0] : options;
+ const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
+
+ if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
+ return normSeverity;
+ }
+
+ throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
+
+ }
+
+ /**
+ * Validates the non-severity options passed to a rule, based on its schema.
+ * @param {{create: Function}} rule The rule to validate
+ * @param {Array} localOptions The options for the rule, excluding severity
+ * @returns {void}
+ */
+ validateRuleSchema(rule, localOptions) {
+ if (!ruleValidators.has(rule)) {
+ const schema = this.getRuleOptionsSchema(rule);
+
+ if (schema) {
+ ruleValidators.set(rule, ajv.compile(schema));
+ }
+ }
+
+ const validateRule = ruleValidators.get(rule);
+
+ if (validateRule) {
+ validateRule(localOptions);
+ if (validateRule.errors) {
+ throw new Error(validateRule.errors.map(
+ error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
+ ).join(""));
+ }
+ }
+ }
+
+ /**
+ * Validates a rule's options against its schema.
+ * @param {{create: Function}|null} rule The rule that the config is being validated for
+ * @param {string} ruleId The rule's unique name.
+ * @param {Array|number} options The given options for the rule.
+ * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
+ * no source is prepended to the message.
+ * @returns {void}
+ */
+ validateRuleOptions(rule, ruleId, options, source = null) {
+ try {
+ const severity = this.validateRuleSeverity(options);
+
+ if (severity !== 0) {
+ this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
+ }
+ } catch (err) {
+ const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
+
+ if (typeof source === "string") {
+ throw new Error(`${source}:\n\t${enhancedMessage}`);
+ } else {
+ throw new Error(enhancedMessage);
+ }
+ }
+ }
+
+ /**
+ * Validates an environment object
+ * @param {Object} environment The environment config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
+ * @returns {void}
+ */
+ validateEnvironment(
+ environment,
+ source,
+ getAdditionalEnv = noop
+ ) {
+
+ // not having an environment is ok
+ if (!environment) {
+ return;
+ }
+
+ Object.keys(environment).forEach(id => {
+ const env = getAdditionalEnv(id) || environments.get(id) || null;
+
+ if (!env) {
+ const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
+
+ throw new Error(message);
+ }
+ });
+ }
+
+ /**
+ * Validates a rules config object
+ * @param {Object} rulesConfig The rules config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
+ * @returns {void}
+ */
+ validateRules(
+ rulesConfig,
+ source,
+ getAdditionalRule = noop
+ ) {
+ if (!rulesConfig) {
+ return;
+ }
+
+ Object.keys(rulesConfig).forEach(id => {
+ const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
+
+ this.validateRuleOptions(rule, id, rulesConfig[id], source);
+ });
+ }
+
+ /**
+ * Validates a `globals` section of a config file
+ * @param {Object} globalsConfig The `globals` section
+ * @param {string|null} source The name of the configuration source to report in the event of an error.
+ * @returns {void}
+ */
+ validateGlobals(globalsConfig, source = null) {
+ if (!globalsConfig) {
+ return;
+ }
+
+ Object.entries(globalsConfig)
+ .forEach(([configuredGlobal, configuredValue]) => {
+ try {
+ normalizeConfigGlobal(configuredValue);
+ } catch (err) {
+ throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
+ }
+ });
+ }
+
+ /**
+ * Validate `processor` configuration.
+ * @param {string|undefined} processorName The processor name.
+ * @param {string} source The name of config file.
+ * @param {function(id:string): Processor} getProcessor The getter of defined processors.
+ * @returns {void}
+ */
+ validateProcessor(processorName, source, getProcessor) {
+ if (processorName && !getProcessor(processorName)) {
+ throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
+ }
+ }
+
+ /**
+ * Formats an array of schema validation errors.
+ * @param {Array} errors An array of error messages to format.
+ * @returns {string} Formatted error message
+ */
+ formatErrors(errors) {
+ return errors.map(error => {
+ if (error.keyword === "additionalProperties") {
+ const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
+
+ return `Unexpected top-level property "${formattedPropertyPath}"`;
+ }
+ if (error.keyword === "type") {
+ const formattedField = error.dataPath.slice(1);
+ const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
+ const formattedValue = JSON.stringify(error.data);
+
+ return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
+ }
+
+ const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
+
+ return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
+ }).map(message => `\t- ${message}.\n`).join("");
+ }
+
+ /**
+ * Validates the top level properties of the config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @returns {void}
+ */
+ validateConfigSchema(config, source = null) {
+ validateSchema = validateSchema || ajv.compile(configSchema);
+
+ if (!validateSchema(config)) {
+ throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
+ }
+
+ if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
+ emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
+ }
+ }
+
+ /**
+ * Validates an entire config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
+ * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
+ * @returns {void}
+ */
+ validate(config, source, getAdditionalRule, getAdditionalEnv) {
+ this.validateConfigSchema(config, source);
+ this.validateRules(config.rules, source, getAdditionalRule);
+ this.validateEnvironment(config.env, source, getAdditionalEnv);
+ this.validateGlobals(config.globals, source);
+
+ for (const override of config.overrides || []) {
+ this.validateRules(override.rules, source, getAdditionalRule);
+ this.validateEnvironment(override.env, source, getAdditionalEnv);
+ this.validateGlobals(config.globals, source);
+ }
+ }
+
+ /**
+ * Validate config array object.
+ * @param {ConfigArray} configArray The config array to validate.
+ * @returns {void}
+ */
+ validateConfigArray(configArray) {
+ const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
+ const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
+ const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
+
+ // Validate.
+ for (const element of configArray) {
+ if (validated.has(element)) {
+ continue;
+ }
+ validated.add(element);
+
+ this.validateEnvironment(element.env, element.name, getPluginEnv);
+ this.validateGlobals(element.globals, element.name);
+ this.validateProcessor(element.processor, element.name, getPluginProcessor);
+ this.validateRules(element.rules, element.name, getPluginRule);
+ }
+ }
+
+}
+
+/**
+ * @fileoverview Common helpers for naming of plugins, formatters and configs
+ */
+
+const NAMESPACE_REGEX = /^@.*\//iu;
+
+/**
+ * Brings package name to correct format based on prefix
+ * @param {string} name The name of the package.
+ * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
+ * @returns {string} Normalized name of the package
+ * @private
+ */
+function normalizePackageName(name, prefix) {
+ let normalizedName = name;
+
+ /**
+ * On Windows, name can come in with Windows slashes instead of Unix slashes.
+ * Normalize to Unix first to avoid errors later on.
+ * https://github.com/eslint/eslint/issues/5644
+ */
+ if (normalizedName.includes("\\")) {
+ normalizedName = normalizedName.replace(/\\/gu, "/");
+ }
+
+ if (normalizedName.charAt(0) === "@") {
+
+ /**
+ * it's a scoped package
+ * package name is the prefix, or just a username
+ */
+ const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
+ scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
+
+ if (scopedPackageShortcutRegex.test(normalizedName)) {
+ normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
+ } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
+
+ /**
+ * for scoped packages, insert the prefix after the first / unless
+ * the path is already @scope/eslint or @scope/eslint-xxx-yyy
+ */
+ normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
+ }
+ } else if (!normalizedName.startsWith(`${prefix}-`)) {
+ normalizedName = `${prefix}-${normalizedName}`;
+ }
+
+ return normalizedName;
+}
+
+/**
+ * Removes the prefix from a fullname.
+ * @param {string} fullname The term which may have the prefix.
+ * @param {string} prefix The prefix to remove.
+ * @returns {string} The term without prefix.
+ */
+function getShorthandName(fullname, prefix) {
+ if (fullname[0] === "@") {
+ let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
+
+ if (matchResult) {
+ return matchResult[1];
+ }
+
+ matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
+ if (matchResult) {
+ return `${matchResult[1]}/${matchResult[2]}`;
+ }
+ } else if (fullname.startsWith(`${prefix}-`)) {
+ return fullname.slice(prefix.length + 1);
+ }
+
+ return fullname;
+}
+
+/**
+ * Gets the scope (namespace) of a term.
+ * @param {string} term The term which may have the namespace.
+ * @returns {string} The namespace of the term if it has one.
+ */
+function getNamespaceFromTerm(term) {
+ const match = term.match(NAMESPACE_REGEX);
+
+ return match ? match[0] : "";
+}
+
+var naming = {
+ __proto__: null,
+ normalizePackageName: normalizePackageName,
+ getShorthandName: getShorthandName,
+ getNamespaceFromTerm: getNamespaceFromTerm
+};
+
+/**
+ * Utility for resolving a module relative to another module
+ * @author Teddy Katz
+ */
+
+/*
+ * `Module.createRequire` is added in v12.2.0. It supports URL as well.
+ * We only support the case where the argument is a filepath, not a URL.
+ */
+const createRequire = Module__default["default"].createRequire;
+
+/**
+ * Resolves a Node module relative to another module
+ * @param {string} moduleName The name of a Node module, or a path to a Node module.
+ * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be
+ * a file rather than a directory, but the file need not actually exist.
+ * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`
+ */
+function resolve(moduleName, relativeToPath) {
+ try {
+ return createRequire(relativeToPath).resolve(moduleName);
+ } catch (error) {
+
+ // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.
+ if (
+ typeof error === "object" &&
+ error !== null &&
+ error.code === "MODULE_NOT_FOUND" &&
+ !error.requireStack &&
+ error.message.includes(moduleName)
+ ) {
+ error.message += `\nRequire stack:\n- ${relativeToPath}`;
+ }
+ throw error;
+ }
+}
+
+var ModuleResolver = {
+ __proto__: null,
+ resolve: resolve
+};
+
+/**
+ * @fileoverview The factory of `ConfigArray` objects.
+ *
+ * This class provides methods to create `ConfigArray` instance.
+ *
+ * - `create(configData, options)`
+ * Create a `ConfigArray` instance from a config data. This is to handle CLI
+ * options except `--config`.
+ * - `loadFile(filePath, options)`
+ * Create a `ConfigArray` instance from a config file. This is to handle
+ * `--config` option. If the file was not found, throws the following error:
+ * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.
+ * - If the filename was `package.json`, an IO error or an
+ * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.
+ * - Otherwise, an IO error such as `ENOENT`.
+ * - `loadInDirectory(directoryPath, options)`
+ * Create a `ConfigArray` instance from a config file which is on a given
+ * directory. This tries to load `.eslintrc.*` or `package.json`. If not
+ * found, returns an empty `ConfigArray`.
+ * - `loadESLintIgnore(filePath)`
+ * Create a `ConfigArray` instance from a config file that is `.eslintignore`
+ * format. This is to handle `--ignore-path` option.
+ * - `loadDefaultESLintIgnore()`
+ * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in
+ * the current working directory.
+ *
+ * `ConfigArrayFactory` class has the responsibility that loads configuration
+ * files, including loading `extends`, `parser`, and `plugins`. The created
+ * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.
+ *
+ * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class
+ * handles cascading and hierarchy.
+ *
+ * @author Toru Nagashima
+ */
+
+const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString());
+
+const debug$2 = debugOrig__default["default"]("eslintrc:config-array-factory");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const configFilenames = [
+ ".eslintrc.js",
+ ".eslintrc.cjs",
+ ".eslintrc.yaml",
+ ".eslintrc.yml",
+ ".eslintrc.json",
+ ".eslintrc",
+ "package.json"
+];
+
+// Define types for VSCode IntelliSense.
+/** @typedef {import("./shared/types").ConfigData} ConfigData */
+/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */
+/** @typedef {import("./shared/types").Parser} Parser */
+/** @typedef {import("./shared/types").Plugin} Plugin */
+/** @typedef {import("./shared/types").Rule} Rule */
+/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */
+/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */
+/** @typedef {ConfigArray[0]} ConfigArrayElement */
+
+/**
+ * @typedef {Object} ConfigArrayFactoryOptions
+ * @property {Map} [additionalPluginPool] The map for additional plugins.
+ * @property {string} [cwd] The path to the current working directory.
+ * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.
+ * @property {Map} builtInRules The rules that are built in to ESLint.
+ * @property {Object} [resolver=ModuleResolver] The module resolver object.
+ * @property {string} eslintAllPath The path to the definitions for eslint:all.
+ * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
+ * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
+ * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
+ */
+
+/**
+ * @typedef {Object} ConfigArrayFactoryInternalSlots
+ * @property {Map} additionalPluginPool The map for additional plugins.
+ * @property {string} cwd The path to the current working directory.
+ * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.
+ * @property {Map} builtInRules The rules that are built in to ESLint.
+ * @property {Object} [resolver=ModuleResolver] The module resolver object.
+ * @property {string} eslintAllPath The path to the definitions for eslint:all.
+ * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
+ * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
+ * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
+ */
+
+/**
+ * @typedef {Object} ConfigArrayFactoryLoadingContext
+ * @property {string} filePath The path to the current configuration.
+ * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
+ * @property {string} name The name of the current configuration.
+ * @property {string} pluginBasePath The base path to resolve plugins.
+ * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
+ */
+
+/**
+ * @typedef {Object} ConfigArrayFactoryLoadingContext
+ * @property {string} filePath The path to the current configuration.
+ * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
+ * @property {string} name The name of the current configuration.
+ * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
+ */
+
+/** @type {WeakMap} */
+const internalSlotsMap$1 = new WeakMap();
+
+/** @type {WeakMap