zaions-tool-kit
Version:
Zaions Tool Kit, this is generic tool kit package created by Zaions Dev Team (https://zaions.com), there are two other packages named "@zaionsofficial/server-tool-kit" and "@zaionsofficial/client-tool-kit" while this package is generic and contains code w
1 lines • 60.5 kB
JavaScript
'use strict';var u=require('crypto-js'),Ge=require('dayjs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var u__default=/*#__PURE__*/_interopDefault(u);var Ge__default=/*#__PURE__*/_interopDefault(Ge);var Ma=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var Oa=Object.prototype.hasOwnProperty,qa=Object.prototype.propertyIsEnumerable;var Be=(e,t,r)=>t in e?Ma(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))Oa.call(t,r)&&Be(e,r,t[r]);if(Pe)for(var r of Pe(t))qa.call(t,r)&&Be(e,r,t[r]);return e};var I=null,H=()=>{var e;if(!I||((e=I==null?void 0:I.trim())==null?void 0:e.length)<=0)throw new Error('zaions-tool-kit needs "cryptoSecret" value, call "configureZTK" to set that');return I},ue=e=>{I=e;};var Ca=e=>{let{cryptoSecret:t}=e;ue(t);};var g=(e,t="Duplicate enumObject value found:")=>{let r=Object.values(e),l=new Set;for(let s of r){if(l.has(s))throw new Error(`${t} ${s}, for enumObject: ${e}`);l.add(s);}};var Ke=e=>{var r;let t=H();try{return (r=u__default.default.AES.encrypt(JSON.stringify(e),t))==null?void 0:r.toString()}catch(l){return null}},me=e=>{var r;let t=H();try{return JSON.parse((r=u__default.default.AES.decrypt(e,t))==null?void 0:r.toString(u__default.default.enc.Utf8))}catch(l){return null}},Fe=(e,t)=>{var s;let r=(s=u__default.default.AES.encrypt(JSON.stringify(e),t))==null?void 0:s.toString();return u__default.default.enc.Base64.stringify(u__default.default.enc.Utf8.parse(r))},Ee=(e,t)=>{var s,p;let r=(s=u__default.default.enc.Base64.parse(e))==null?void 0:s.toString(u__default.default.enc.Utf8),l=(p=u__default.default.AES.decrypt(r,t))==null?void 0:p.toString(u__default.default.enc.Utf8);return JSON.parse(l)},et=(e,t)=>{let r=u__default.default.AES.decrypt(e,t);try{return JSON.parse(r==null?void 0:r.toString(u__default.default.enc.Utf8))}catch(l){return null}};var Z=(e,t,r=true)=>{try{let l={err:e,message:`[reportCustomError] - ${t!=null?t:""}`};r&&console.error(l);}catch(l){console.error({err:l});}};var x=(i=>(i.id="id",i.userId="uid",i.sortOrderNo="so",i.createdAt="cat",i.updatedAt="uat",i.deletedAt="dat",i.blockedAt="bat",i.amount="am",i.userData="ud",i.playerId="pid",i.otherPlayerId="opid",i.extraData="ed",i.playerData="pdt",i.name="n",i.email="e",i.phoneNumber="pn",i.password="pw",i.withdrawOptions="wos",i.cnic="cn",i.city="ci",i.country="cu",i.address="ad",i.referredBy="rfb",i.referralCode="rfc",i.permissions="pms",i.emailVerifiedAt="eva",i.balance="blc",i.role="r",i.firstName="fn",i.lastName="lne",i.age="a",i.gender="g",i.constellation="const",i.hometown="ht",i.language="lang",i.profileCompletePercentageNumber="pcpn",i.birthdayDate="bdt",i.aboutMe="abm",i.hobbies="hs",i.lifeStyle="ls",i.music="mc",i.movies="mos",i.travel="tl",i.books="bks",i.gym="gm",i.food="f",i.cleanliness="cln",i.smoke="sk",i.pets="ps",i.guests="gts",i.occupation="o",i.foodPreference="fp",i.workSchedule="ws",i.overnightGuests="ogs",i.getUpTime="gut",i.goToBedTime="gtt",i.roomPreference="rp",i.roommatePreference="rmp",i.whereWantToLive="wwtl",i.moveInDate="mid",i.budget="b",i.placePreference="pp",i.buildingType="bt",i.other="ot",i.min="mi",i.max="ma",i.verificationCode="vc",i.title="t",i.description="d",i.maxPlayersAllowed="mxpa",i.feePerPlayer="fpp",i.serviceCharges="scs",i.image="i",i.minPlayersToStartGame="mipa",i.isPrivate="ipt",i.roomCode="rcd",i.status="st",i.gameId="gid",i.gameRoomPlayerIds="grpsd",i.gameRoomWillStartAt="grwsat",i.firstPlayerGameRoomJoinedAt="fpgrja",i.engagerStartedTheActualGameAt="estaga",i.gameRoomWinnerPlayerId="grwpid",i.gameRoomResultScreenShot="grrss",i.timerForEngagerToStartActualGameInMinutes="tfetsag",i.timerForPlayersToJoinActualGameInMinutes="tfptjag",i.actualGameInfo="agi",i.gameData="gd",i.engagerReleasedGameRoomAt="ergrat",i.engagerDeclaredGameRoomWinnerAt="edgrat",i.agentRemarks="ars",i.transferMethod="tm",i.receptScreenshot="rs",i.transactionId="tid",i.itemId="itid",i.balanceBefore="bb",i.balanceAfter="ba",i.type="ty",i.adminUserId="auid",i.logType="lt",i.userRemarks="urs",i.otherPlayerPhoneNumber="oppn",i.otherPlayerName="opn",i.totalTopupCoins="ttcs",i.totalWithdrawCoins="twcs",i.totalWonCoins="twncs",i.totalTransferredCoins="ttdcs",i.totalReceivedCoins="trcs",i.totalLostCoins="tlcs",i.totalGamesPlayed="tgp",i.totalGamesLeft="tglt",i.totalGamesWon="tgw",i.totalGamesLost="tgl",i.gameWinStreak="gwst",i.gameLostStreak="glst",i.lastGamePlayedAt="lgpat",i.lastGameLeftAt="lglfat",i.lastGameWonAt="lgqat",i.lastGameLostAt="lglat",i.totalGameRoomReleasedForThisPlayer="tgrrftp",i.lastGameRoomReleasedForThisPlayerAt="tgrrftpat",i.totalGameRoomReleasedByThisAdminUser="tgrrbtau",i.lastGameRoomReleasedByThisAdminUserAt="tgrrbtauat",i.totalCoinsEarnedAsGameRoomEngager="tcseagre",i.totalGameRoomsCompletedAsEngager="tgrcae",i.lastGameRoomsCompletedAsEngagerAt="lgrcaeat",i.icon="ic",i.sendAt="sat",i.sendTo="sto",i.specificUsersPhoneNumbers="supns",i.roleIdentifier="ri",i.isDefault="idf",i.totalCount="tc",i.totalSoftDeletedCount="tsdc",i.totalPlayersCount="tpsc",i.totalEngagersCount="tesc",i.totalAdminsCount="tasc",i.totalActiveCount="tac",i.totalBlockedCount="tbc",i.totalCompletedCount="tcc",i.totalReleasedCount="trc",i.totalServiceCharges="tsc",i.period="ped",i.currency="cuy",i.place="pl",i.rent="re",i.generalInfo="gi",i.location="loc",i.images="ims",i.details="dts",i.latitude="lat",i.longitude="lng",i.placeId="pi",i.streetAddress="sa",i.apartmentSuit="as",i.province="pvn",i.postCode="psc",i.bedroomImages="bris",i.washroomImages="wris",i.kitchenImages="kis",i.otherImages="ois",i.availabilityTerm="abt",i.moveOutDate="mud",i.minimumLease="mil",i.houseInfo="hif",i.otherRequirements="ors",i.placeSharingDetail="psd",i.placeBenefits="pbs",i.leaseTime="lti",i.leaseTimeUnit="ltu",i.bedrooms="bds",i.washrooms="wrs",i.parking="pr",i.units="us",i.detail="dl",i.bedroom="br",i.livingRoom="lr",i.kitchen="kc",i.washroom="wr",i.livingWithLandlord="lwld",i.livingWithPersonDetails="lwpd",i.furnished="fh",i.benefits="bs",i.otherBenefits="obs",i.body="bd",i.content="ct",i.fcmDeviceToken="fcmt",i.fcmDeviceTokens="fcmts",i.apnsDeviceToken="apnt",i.apnsDeviceTokens="apnts",i.subtitle="ste",i.tag="tg",i.tags="tgs",i.badge="bge",i.notification="ncn",i.notifications="ncns",i.data="dt",i.clickAction="ca",i.link="ln",i.group="gp",i.groupSummary="gs",i.sound="sd",i.importance="ipe",i.visibility="vsb",i.light="lh",i.lights="lhs",i.lightColor="lcr",i.vibration="vbr",i.channel="cl",i.channels="cls",i.receive="rce",i.value="vle",i.actionId="aid",i.inputValue="ipv",i.gameType="gt",i.thirdPartyAppsData="tpasd",i.thirdPartyAppData="tpad",i.pubgAppId="pgai",i.uniqueId="uqid",i.userUniqueId="uuqid",i.photoURL="pul",i.displayName="dn",i.ludoStarAppId="lsaid",i.freeFireAppId="ffaid",i.callOfDutyAppId="codaid",i.robloxAppId="rxaid",i.eightBallPoolAppId="ebpaid",i.amongUsAppId="auaid",i.unoAppId="uoaid",i.miniMilitiaAppId="mmaid",i.carromAppId="cmaid",i.tennisClashAppId="tcaid",i.chessAppId="chaid",i.asphalt9AppId="a9aid",i.golfBattleAppId="gbaid",i.arenaBreakoutAppId="abaid",i))(x||{}),O=(r=>(r.asc="asc",r.desc="desc",r))(O||{}),Y=(n=>(n.lessThan="<",n.lessThanOrEqualTo="<=",n.equalTo="==",n.notEqual="!=",n.greaterThanOrEqualTo=">=",n.greaterThan=">",n.arrayContains="array-contains",n.inArray="in",n.notInArray="not-in",n.arrayContainsAny="array-contains-any",n))(Y||{});g(x,"Duplicate DBColumnKeysShortFormEnum value found:");g(O,"Duplicate FrbOrderbyDirectionEnum value found:");g(Y,"Duplicate FrbWhereConditionEnum value found:");var J=(A=>(A.success="success",A.failed="failed",A.notFound="notFound",A.badRequest="badRequest",A.serverError="serverError",A.created="created",A.deleted="deleted",A.updated="updated",A.tooManyRequests="tooManyRequests",A.invalidRequest="invalidRequest",A.unAuthenticated="unAuthenticated",A.unAuthorized="unAuthorized",A.itemExists="itemExists",A))(J||{}),S=(n=>(n[n.success=200]="success",n[n.failed=500]="failed",n[n.notFound=404]="notFound",n[n.badRequest=400]="badRequest",n[n.created=201]="created",n[n.unAuthenticated=401]="unAuthenticated",n[n.unAuthorized=403]="unAuthorized",n[n.tooManyRequests=429]="tooManyRequests",n[n.invalidRequest=410]="invalidRequest",n[n.itemExists=10001]="itemExists",n))(S||{}),X=(s=>(s.get="get",s.post="post",s.put="put",s.delete="delete",s))(X||{}),Q=(t=>(t.blank="_blank",t))(Q||{}),P=(t=>(t.encryptedDataSearchParam="s",t))(P||{}),q=(r=>(r.Json="application/json",r.FormData="multipart/form-data",r))(q||{}),C=(r=>(r[r.approved=1]="approved",r[r.rejected=2]="rejected",r))(C||{}),L=(r=>(r[r.easypaisa=1]="easypaisa",r[r.jazzcash=2]="jazzcash",r))(L||{}),W=(c=>(c[c.id=1]="id",c[c.roomCode=2]="roomCode",c[c.email=3]="email",c[c.phoneNumber=4]="phoneNumber",c[c.uniqueId=5]="uniqueId",c[c.pubgAppId=6]="pubgAppId",c))(W||{}),B=(r=>(r[r.completed=1]="completed",r[r.rejected=2]="rejected",r))(B||{}),z=(r=>(r[r.true=1]="true",r[r.false=0]="false",r))(z||{}),K=(c=>(c.STRING="string",c.OBJECT="object",c.ARRAY="array",c.boolean="boolean",c.NUMBER="number",c.FUNCTION="function",c))(K||{}),m=(l=>(l.web="web",l.android="android",l.ios="ios",l))(m||{}),j=(v=>(v.Years="years",v.Months="months",v.Days="days",v.Hours="hours",v.Minutes="minutes",v.Seconds="seconds",v.Milliseconds="milliseconds",v))(j||{});g(m,"duplicate values in PlatformTypeEnum");g(J,"duplicate values in ResponseCodeEnum");g(S,"duplicate values in ResponseStatusEnum");g(X,"duplicate values in RequestTypeEnum");g(Q,"duplicate values in LinkTargetEnum");g(P,"duplicate values in SearchParamKeysEnum");g(q,"duplicate values in RequestContentTypeEnum");g(C,"duplicate values in RequestStatusEnum");g(L,"duplicate values in TransferMethodEnum");g(W,"duplicate values in QueryKeyTypeEnum");g(B,"duplicate values in ProcessStatusEnum");g(z,"duplicate values in BooleanEnum");g(K,"duplicate values in varTypesEnum");g(j,"duplicate values in TimeUnitEnum");var F={authorizationTokenType:{bearer:"Bearer"}},tt={fallbackValue:"---"},at={formate:"DD-MM-YYYY HH:mm A"},rt={ISODateTimeFormate:"YYYY-MM-DDTHH:mm",fullDateWithTime12Hour:"MMMM D, h:mm a",compactDateTimeWithAMPM:"DD-MM-YYYY HH:mm A",compactDateWithMonthAbbr:"DD-MMM-YYYY"},ot={googleMapsApiKey:"{{googleMapsApiKey}}"},it={MINUTES:"minutes"},lt={blank:"_blank"},he={generic:{title:{min:{val:1,errorMessage:"Title is required."},max:{val:100,errorMessage:"Title max value can not be greater than 100."},isOptional:false},description:{short:{max:{val:250,errorMessage:"Description max value allowed is 250 characters."},isOptional:true},medium:{max:{val:500,errorMessage:"Description max value allowed is 500 characters."},isOptional:true}},phoneNumber:{min:{val:12,errorMessage:"Phone number min value allowed is 13 characters."},max:{val:13,errorMessage:"Phone number max value allowed is 13 characters."},startWith:{val:"+923",errorMessage:"Phone number must start with +923"},isOptional:false},remarks:{short:{max:{val:250,errorMessage:"Remarks max value allowed is 250 characters."},isOptional:true},medium:{max:{val:500,errorMessage:"Remarks max value allowed is 500 characters."},isOptional:true}},verificationCode:{length:{val:6,errorMessage:"Verification code must contain exactly 6 character(s)"}}}},E=["image/svg","image/svg+xml"],D="image/png, image/jpeg, image/gif";var st=()=>{var r,l,s;let e=(r=Date.now())==null?void 0:r.toString(36),t=(s=(l=Math.random())==null?void 0:l.toString(36))==null?void 0:s.substr(2);return e+t},ct=()=>{console.info({message:"emptyVoidReturnFunction"});},nt=async()=>{console.info({message:"emptyVoidReturnFunction"});},pt=e=>JSON.stringify(e),dt=e=>{try{return JSON.parse(e)}catch(t){return}},k=e=>{var t;return e!=null&&((t=e==null?void 0:e.trim())==null?void 0:t.length)>0},gt=e=>e==null?void 0:e.every(r=>k(r)),Re=(e,t=false)=>{let r=Number(e);return isNaN(r)?false:t?r>0:true},ft=(e,t=false)=>e==null?void 0:e.every(r=>Re(r,t)),vt=e=>{var t;return (t=e==null?void 0:e.replace(/([a-z])([A-Z])/g,"$1 $2"))==null?void 0:t.toLowerCase()},bt=e=>Ue(e)?e==null?void 0:e.replace(/^_*(.)|_+(.)/g,(t,r,l)=>r?r==null?void 0:r.toUpperCase():" "+(l==null?void 0:l.toUpperCase())):e,wt=(e,t)=>e>0&&t>0?Math.ceil(e/t):0,At=async(e,t)=>{try{if(e!==void 0&&k(e)){let r=new Headers({"Content-Type":"application/json",Authorization:`${F.authorizationTokenType.bearer} ${t!=null?t:""}`}),l=new Request(e,{method:"GET",headers:r}),s=await fetch(l);if(!s.ok)throw new Error(`Failed to fetch image. Status: ${s.status}`);let p=await s.blob();return await new Promise((v,f)=>{let w=new FileReader;w.onloadend=()=>{v(w.result);},w.onerror=n=>{f(n);},w.readAsDataURL(p);})}return ""}catch(r){return console.error("Error fetching or converting image:",r),""}},ut=({url:e,itemsId:t,urlDynamicParts:r})=>{var s,p;if((t==null?void 0:t.length)!==(r==null?void 0:r.length))throw new Error("itemsId and urlDynamicParts must have the same length.");let l=e;for(let c=0;c<(r==null?void 0:r.length);c++){let v=String(r[c]);if((s=String(l))!=null&&s.includes(v)){let f=String(t[c]);l=(p=String(l))==null?void 0:p.replace(v,f);}}return l},ht=e=>{switch(e){case "true":return true;case "false":return false;default:return !!e}},Rt=(e=6)=>{let t="abcdefghijklmnopqrstuvwxyz0123456789",r="";for(let l=0;l<e;l++){let s=Math.floor(Math.random()*(t.length));r+=t[s];}return r==null?void 0:r.toLowerCase()},Te=e=>e==null,Tt=e=>!Te(e),It=(...e)=>{},ee=(e,t=false)=>{let r=N(e,false)&&Array.isArray(e);return t?r&&!!(e!=null&&e.length):r},xt=({item:e})=>typeof e.dat=="number",Ut=({item:e})=>typeof e.bat=="number",kt=({key:e,item:t})=>{let r=t==null?void 0:t[e];if(r)return ae(r)},Nt=(e,t)=>(e.search(/^http[s]?:\/\//)===-1&&(e=(t?"http://":"https://")+e),e),N=(e,t=true)=>{var l;let r=typeof e=="object"&&e!=null&&typeof e!="undefined";return t?r&&!!((l=Object.keys(e))!=null&&l.length):r},Vt=e=>{if(!N(e))return {};let t={};for(let r in e)t.field=r,t.values=e[r];return ee(t.values)?t:{}},Gt=(e,t)=>{var r;return (t==null?void 0:t.field)===e?(r=t.values)!=null?r:[]:[]},_t=e=>new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+#]*)*(\\?[;&a-z\\d%_.~+#=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e),yt=({domain:e,url:t})=>{var s;let r=(s=t==null?void 0:t.trim())==null?void 0:s.toLowerCase();return r==="www"||r===e?false:/^((?!.*[-]{2})(?=.*[a-z0-9]$)[a-z0-9][a-z0-9-]*$)+/.test(t)},Mt=e=>/[^A-Za-z0-9&,'"""'\'-(){} ]+/.test(e),Ot=({options:e={},text:t})=>{if(!t)return;let{lowercase:r=true,separator:l="-",trim:s=true}=e,p={\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00F1:"n",\u00E7:"c",\u00DF:"ss",\u00E6:"ae",\u0153:"oe"},c=t.trim();c=c.replace(/[àáâãäåèéêëìíîïòóôõöøùúûüñçßæœ]/gi,w=>{let n=w.toLowerCase();return p[n]||w}),c=c.replace(/[^a-z0-9]/gi,l);let v=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),f=new RegExp(`${v}+`,"g");if(c=c.replace(f,l),r&&(c=c.toLowerCase()),s){let w=new RegExp(`^${v}|${v}$`,"g");c=c.replace(w,"");}return c},qt=({input:e,type:t})=>{if(!e)return {isValid:true,invalidChars:[],validatedValue:""};let r;if(t==="email")r=/[^\w.!#$%&'*+/=?^`{|}~@-]/g;else if(t==="name")r=/[<>\\^`{|}~]/g;else return {isValid:true,invalidChars:[],validatedValue:e};let l=e.match(r),s=l?[...new Set(l)]:[],p=e.replace(r,"");return {isValid:s.length===0,invalidChars:s,validatedValue:p}},Ct=e=>new Promise((t,r)=>{let l=new FileReader;l.readAsDataURL(e),l.onload=()=>t(l.result),l.onerror=s=>r(s);}),Lt=e=>{let t=["?","&","#"];return e&&(t==null?void 0:t.some(r=>e==null?void 0:e.includes(r)))},Wt=(e,t,r=null,l=true)=>Ie(e,t,l)?e[t]:r,Ie=(e,t,r=false)=>N(e,true)&&Object.hasOwnProperty.call(e,t)&&e[t]!==void 0?r?e[t]!==null:true:false,xe=(e,t)=>{if(e===t)return true;if(!(e instanceof Object)||!(t instanceof Object)||e.constructor!==t.constructor)return false;for(let r in e)if(Object.hasOwnProperty.call(e,r)){if(!Object.hasOwnProperty.call(t,r))return false;if(e[r]!==t[r]&&(typeof e[r]!="object"||!xe(e[r],t[r])))return false}for(let r in t)if(Object.hasOwnProperty.call(t,r)&&!Object.hasOwnProperty.call(e,r))return false;return true},U=e=>e*Math.PI/180,zt=(e,t,r,l)=>{let p=U(r-e),c=U(l-t);e=U(e),r=U(r);let v=Math.sin(p/2)*Math.sin(p/2)+Math.sin(c/2)*Math.sin(c/2)*Math.cos(e)*Math.cos(r);return 6371*(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)))},jt=(e,t=10)=>{var r;return e?(e==null?void 0:e.length)>t?`${(r=e==null?void 0:e.slice(0,t))!=null?r:""}...`:e!=null?e:"":""},Dt=()=>{let e=/WebKit\/([0-9]+)|$/.exec(navigator.appVersion),t=e?parseInt(e[1],10):0,r=t&&navigator.vendor.indexOf("Google")===0,l=r&&navigator.userAgent.indexOf("Android")>0,s=!l&&r&&navigator.platform.indexOf("Linux")===0&&"ontouchstart"in document.documentElement;return {webkitVer:t,isGoogle:r,isAndroid:l,androidDesktopMode:s}},$t=(e,t)=>e==null?void 0:e.every(l=>t==null?void 0:t.includes(l)),Ht=(e,t="svg")=>{var r,l,s,p;return t==="svg"?(l=E)==null?void 0:l.includes((r=e==null?void 0:e.type)==null?void 0:r.toLowerCase()):t==="other"?(p=D)==null?void 0:p.includes((s=e==null?void 0:e.type)==null?void 0:s.toLowerCase()):false},Zt=async e=>e?await new Promise(t=>{let r=document.createElement("img"),l=window.URL.createObjectURL(e),s,p;r.onload=function(c){let v=c==null?void 0:c.target;s=v.naturalHeight,p=v.naturalWidth,URL.revokeObjectURL(l),t({width:p,height:s});},r.src=l;}):null,Yt=(e,t)=>e===t?[1,1]:e>t?[Math.round(e/t),Math.round(t/t)]:e<t?[Math.round(e/e),Math.round(t/e)]:null,te=(e,t="string")=>{switch(t){case "string":return typeof e=="string"&&typeof e!="undefined";case "number":return typeof e=="number"&&typeof e!="undefined";case "boolean":return typeof e=="boolean"&&typeof e!="undefined";case "object":return N(e,true);case "array":return ee(e,true);case "function":return typeof e=="function"&&typeof e!="undefined";case "undefined":return typeof e=="undefined";default:return false}},Ue=e=>te(e,"string"),Jt=e=>te(e,"function"),ke=e=>{var t,r;return (r=D)==null?void 0:r.includes((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())},St=({file:e,sizeLimit:t})=>parseFloat(`${e.size/1024/1024}`)>t?{status:"error",type:"FILE_SIZE_LIMIT"}:ke(e)?{status:"success",type:"SUCCESS"}:{status:"error",type:"INVALID_FILE_TYPE"},Xt=e=>{var r;let t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e&&(t==null?void 0:t.test((r=String(e))==null?void 0:r.toLowerCase()))},Qt=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,r=e==="x"?t:t&3|8;return r==null?void 0:r.toString(16)}),Ne=e=>e.reduce((t,r)=>t.concat(Array.isArray(r)?Ne(r):r),[]),Pt=(e,t)=>{let r=e==null?void 0:e.toLowerCase(),l=Object.entries(t).find(([s,p])=>{var c;return ((c=String(p))==null?void 0:c.toLowerCase())===r});return l?l[1]:null},Bt=(e,t)=>(typeof t=="string"?new RegExp(t):t).test(e),Kt=e=>{var t,r,l;return e&&((l=(r=(t=e==null?void 0:e.toLowerCase())==null?void 0:t.replace(/[^\w ]+/g,""))==null?void 0:r.trim())==null?void 0:l.replace(/ +/g,""))},mt=({pagination:e,returnDefaultValues:t=true,defaultOffset:r=0,defaultLimit:l=10})=>{var c,v;let s=t?r:null,p=t?l:null;return e&&(s=(c=e==null?void 0:e.offset)!=null?c:s,p=(v=e==null?void 0:e.limit)!=null?v:p),{offset:s,limit:p}},Ft=(e="")=>{var t;return {$regex:new RegExp((t=e==null?void 0:e.trim())==null?void 0:t.toLowerCase(),"i")}},Et=e=>`$${(e/100).toFixed(2)}`,ea=e=>parseFloat(e)*100,Ve=({input:e,characters:t="\\",onlyLeading:r=false,onlyTrailing:l=false,trimWhitespace:s=false})=>{if(!e||typeof e!="string")return "";let p=s?e.trim():e;if(!p)return "";let v=(Array.isArray(t)?t:[t]).filter(w=>w&&typeof w=="string").map(w=>w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("");if(!v)return p;let f="";if(l||(f+=`^[${v}]+`),!r&&!l&&(f+="|"),r||(f+=`[${v}]+$`),f){let w=new RegExp(f,"g");p=p.replace(w,"");}return p},ta=e=>/^\/|\/$/.test(e),aa=({input:e,removeLeadingTrailing:t=false})=>{if(!e)return "";let r=e.replace(/[*?^${}()|[\]\\/-]/g,"");return t?Ve({input:r}):r},ra=e=>e.replace(/([A-Z])/g," $1").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ").trim(),oa=({valueUnit:e,value:t,outputUnit:r})=>{let l=t;switch(e){case "years":l=t*365*24*60*60;break;case "months":l=t*30*24*60*60;break;case "days":l=t*24*60*60;break;case "hours":l=t*60*60;break;case "minutes":l=t*60;break;case "seconds":l=t;break;case "milliseconds":l=t/1e3;break}switch(r){case "years":return l/(365*24*60*60);case "months":return l/(30*24*60*60);case "days":return l/(24*60*60);case "hours":return l/(60*60);case "minutes":return l/60;case "seconds":return l;case "milliseconds":return l*1e3;default:return l}},ia=({email:e="",pattern:t=/^[a-zA-Z0-9._%+-]+@privaterelay\.appleid\.com$/})=>t.test(e);var ae=e=>{var t;return (t=new Date(e))==null?void 0:t.toISOString()},la=({val:e})=>{var r;let t=Ge__default.default(e);return e&&(t!=null&&t.isValid())?(r=t==null?void 0:t.toDate())==null?void 0:r.getTime():null},sa=e=>{try{if(k(e)){let t=Ge__default.default(e);if(t!=null&&t.isValid()){let r=t==null?void 0:t.diff(Ge__default.default(new Date),"milliseconds");return Date.now()+r}else return 0}else return 0}catch(t){return Z(t),0}};var ca={authToken:"f398hv2b-77e-sdf-dfs---"};var na={limit:100,offset:0,orderBy:{fieldKey:"cat",order:"desc"}};var V=(f=>(f[f.superAdmin=1]="superAdmin",f[f.admin=2]="admin",f[f.manager=3]="manager",f[f.editor=4]="editor",f[f.creator=5]="creator",f[f.reviewer=6]="reviewer",f[f.player=7]="player",f[f.engager=8]="engager",f))(V||{}),R=(a=>(a[a.viewDashboard=1]="viewDashboard",a[a.hideEarnings=2]="hideEarnings",a[a.hideProfile=3]="hideProfile",a[a.listUsers=4]="listUsers",a[a.viewUser=5]="viewUser",a[a.createUser=6]="createUser",a[a.updateUser=7]="updateUser",a[a.deleteUser=8]="deleteUser",a[a.forceDeleteUser=9]="forceDeleteUser",a[a.blockUser=10]="blockUser",a[a.unBlockUser=11]="unBlockUser",a[a.updateUserBalance=12]="updateUserBalance",a[a.viewTrashedUsers=13]="viewTrashedUsers",a[a.viewTrashedUser=14]="viewTrashedUser",a[a.listGames=15]="listGames",a[a.viewGame=16]="viewGame",a[a.createGame=17]="createGame",a[a.updateGame=18]="updateGame",a[a.deleteGame=19]="deleteGame",a[a.forceDeleteGame=20]="forceDeleteGame",a[a.blockGame=21]="blockGame",a[a.unBlockGame=22]="unBlockGame",a[a.viewTrashedGames=23]="viewTrashedGames",a[a.viewTrashedGame=24]="viewTrashedGame",a[a.listGameRooms=25]="listGameRooms",a[a.viewGameRoom=26]="viewGameRoom",a[a.createGameRoom=27]="createGameRoom",a[a.updateGameRoom=28]="updateGameRoom",a[a.deleteGameRoom=29]="deleteGameRoom",a[a.forceDeleteGameRoom=30]="forceDeleteGameRoom",a[a.blockGameRoom=31]="blockGameRoom",a[a.unBlockGameRoom=32]="unBlockGameRoom",a[a.createPrivateGameRoom=33]="createPrivateGameRoom",a[a.viewTrashedGameRooms=34]="viewTrashedGameRooms",a[a.viewTrashedGameRoom=35]="viewTrashedGameRoom",a[a.listTopupRequests=36]="listTopupRequests",a[a.viewTopupRequest=37]="viewTopupRequest",a[a.createTopupRequest=38]="createTopupRequest",a[a.updateTopupRequest=39]="updateTopupRequest",a[a.deleteTopupRequest=40]="deleteTopupRequest",a[a.forceDeleteTopupRequest=41]="forceDeleteTopupRequest",a[a.reviewTopupRequest=42]="reviewTopupRequest",a[a.viewTrashedTopupRequests=43]="viewTrashedTopupRequests",a[a.viewTrashedTopupRequest=44]="viewTrashedTopupRequest",a[a.listWithdrawRequests=45]="listWithdrawRequests",a[a.viewWithdrawRequest=46]="viewWithdrawRequest",a[a.createWithdrawRequest=47]="createWithdrawRequest",a[a.updateWithdrawRequest=48]="updateWithdrawRequest",a[a.deleteWithdrawRequest=49]="deleteWithdrawRequest",a[a.forceDeleteWithdrawRequest=50]="forceDeleteWithdrawRequest",a[a.reviewWithdrawRequest=51]="reviewWithdrawRequest",a[a.viewTrashedWithdrawRequests=52]="viewTrashedWithdrawRequests",a[a.viewTrashedWithdrawRequest=53]="viewTrashedWithdrawRequest",a[a.listRoles=54]="listRoles",a[a.viewRole=55]="viewRole",a[a.createRole=56]="createRole",a[a.updateRole=57]="updateRole",a[a.deleteRole=58]="deleteRole",a[a.forceDeleteRole=59]="forceDeleteRole",a[a.reviewRole=60]="reviewRole",a[a.viewTrashedRoles=61]="viewTrashedRoles",a[a.viewTrashedRole=62]="viewTrashedRole",a[a.attachRole=63]="attachRole",a[a.removeRole=64]="removeRole",a[a.addListPermissionsToRole=65]="addListPermissionsToRole",a[a.addViewPermissionsToRole=66]="addViewPermissionsToRole",a[a.addCreatePermissionsToRole=67]="addCreatePermissionsToRole",a[a.addUpdatePermissionsToRole=68]="addUpdatePermissionsToRole",a[a.addForceDeletePermissionsToRole=69]="addForceDeletePermissionsToRole",a[a.addListTrashedPermissionsToRole=70]="addListTrashedPermissionsToRole",a[a.addViewTrashedPermissionsToRole=71]="addViewTrashedPermissionsToRole",a[a.addReviewPermissionsToRole=72]="addReviewPermissionsToRole",a[a.addOtherPermissionsToRole=73]="addOtherPermissionsToRole",a[a.listTransferCoinsRequests=74]="listTransferCoinsRequests",a[a.viewTransferCoinsRequest=75]="viewTransferCoinsRequest",a[a.listInAppNotifications=76]="listInAppNotifications",a[a.viewInAppNotification=77]="viewInAppNotification",a[a.createInAppNotification=78]="createInAppNotification",a[a.updateInAppNotification=79]="updateInAppNotification",a[a.deleteInAppNotification=80]="deleteInAppNotification",a[a.forceDeleteInAppNotification=81]="forceDeleteInAppNotification",a[a.viewTrashedInAppNotifications=82]="viewTrashedInAppNotifications",a[a.viewTrashedInAppNotification=83]="viewTrashedInAppNotification",a[a.sendInAppNotificationToAllPlayers=84]="sendInAppNotificationToAllPlayers",a[a.sendInAppNotificationToAllAdminLevelUsers=85]="sendInAppNotificationToAllAdminLevelUsers",a[a.sendInAppNotificationToSpecificPlayers=86]="sendInAppNotificationToSpecificPlayers",a[a.sendInAppNotificationToSpecificAdminLevelUsers=87]="sendInAppNotificationToSpecificAdminLevelUsers",a[a.scheduleInAppNotifications=88]="scheduleInAppNotifications",a[a.listAttachments=89]="listAttachments",a[a.viewAttachment=90]="viewAttachment",a[a.createAttachment=91]="createAttachment",a[a.updateAttachment=92]="updateAttachment",a[a.deleteAttachment=93]="deleteAttachment",a[a.forceDeleteAttachment=94]="forceDeleteAttachment",a[a.viewTrashedAttachments=95]="viewTrashedAttachments",a[a.viewTrashedAttachment=96]="viewTrashedAttachment",a[a.listAppSettings=97]="listAppSettings",a[a.viewAppSetting=98]="viewAppSetting",a[a.createAppSetting=99]="createAppSetting",a[a.updateAppSetting=100]="updateAppSetting",a[a.deleteAppSetting=101]="deleteAppSetting",a[a.forceDeleteAppSetting=102]="forceDeleteAppSetting",a[a.viewTrashedAppSettings=103]="viewTrashedAppSettings",a[a.viewTrashedAppSetting=104]="viewTrashedAppSetting",a[a.listTransactions=105]="listTransactions",a[a.viewTransaction=106]="viewTransaction",a[a.createTransaction=107]="createTransaction",a[a.updateTransaction=108]="updateTransaction",a[a.deleteTransaction=109]="deleteTransaction",a[a.forceDeleteTransaction=110]="forceDeleteTransaction",a[a.viewTrashedTransactions=111]="viewTrashedTransactions",a[a.viewTrashedTransaction=112]="viewTrashedTransaction",a[a.listPlaces=113]="listPlaces",a[a.viewPlace=114]="viewPlace",a[a.createPlace=115]="createPlace",a[a.updatePlace=116]="updatePlace",a[a.deletePlace=117]="deletePlace",a[a.forceDeletePlace=118]="forceDeletePlace",a[a.viewTrashedPlaces=119]="viewTrashedPlaces",a[a.viewTrashedPlace=120]="viewTrashedPlace",a[a.restoreTrashedPlace=121]="restoreTrashedPlace",a[a.blockPlace=122]="blockPlace",a[a.unBlockPlace=123]="unBlockPlace",a[a.restoreTrashedUser=124]="restoreTrashedUser",a[a.restoreTrashedGame=125]="restoreTrashedGame",a[a.restoreTrashedGameRoom=126]="restoreTrashedGameRoom",a[a.restoreTrashedTopupRequest=127]="restoreTrashedTopupRequest",a[a.restoreTrashedWithdrawRequest=128]="restoreTrashedWithdrawRequest",a[a.restoreTrashedRole=129]="restoreTrashedRole",a[a.restoreTrashedInAppNotification=130]="restoreTrashedInAppNotification",a[a.restoreTrashedAttachment=131]="restoreTrashedAttachment",a[a.restoreTrashedAppSetting=132]="restoreTrashedAppSetting",a[a.restoreTrashedTransaction=133]="restoreTrashedTransaction",a[a.addCoinsToUserAccount=134]="addCoinsToUserAccount",a[a.removeCoinsFromUserAccount=135]="removeCoinsFromUserAccount",a[a.listAdminCoinsUpdateLogs=136]="listAdminCoinsUpdateLogs",a[a.viewAdminCoinsUpdateLog=137]="viewAdminCoinsUpdateLog",a[a.listUserDetails=138]="listUserDetails",a[a.viewUserDetail=139]="viewUserDetail",a[a.createUserDetail=140]="createUserDetail",a[a.updateUserDetail=141]="updateUserDetail",a[a.deleteUserDetail=142]="deleteUserDetail",a[a.forceDeleteUserDetail=143]="forceDeleteUserDetail",a[a.viewTrashedUserDetails=144]="viewTrashedUserDetails",a[a.viewTrashedUserDetail=145]="viewTrashedUserDetail",a))(R||{}),G=(f=>(f.superAdmin="197g24g-28h3v2g9g972g3f",f.admin="28h3v2g9g9--72g3f",f.manager="38h3vrv3-ion2g9g97-2g3f",f.editor="48h3v2g9g97-2g3f",f.creator="58h3v2g9g8h-972g3f",f.reviewer="68h-3v2g9g972g3f",f.player="78h3v2g9-g972g3f",f.engager="8hfrfr----8h3v2g9-g972g3f",f))(G||{}),re=(l=>(l[l.viewTrashedItem=1]="viewTrashedItem",l[l.viewTrashedItems=2]="viewTrashedItems",l[l.viewBlockedItem=3]="viewBlockedItem",l))(re||{}),$=(r=>(r[r.every=1]="every",r[r.any=2]="any",r))($||{});g(V,"Duplicate RoleEnum value found:");g($,"Duplicate PermissionCheckModeEnum value found:");g(R,"Duplicate PermissionEnum value found:");g(G,"Duplicate _UserRoleEnum value found:");g(re,"Duplicate PermissionTypeEnum value found:");var pa=[{value:1,label:"View dashboard"},{value:2,label:"Hide earnings"},{value:3,label:"Hide profile"},{value:4,label:"List users"},{value:5,label:"View user"},{value:6,label:"Create user"},{value:7,label:"Update user"},{value:8,label:"Delete user"},{value:9,label:"Force delete user"},{value:10,label:"Block user"},{value:11,label:"Unblock user"},{value:12,label:"Update user balance"},{value:13,label:"View trashed users"},{value:14,label:"View trashed user"},{value:15,label:"List games"},{value:16,label:"View game"},{value:17,label:"Create game"},{value:18,label:"Update game"},{value:19,label:"Delete game"},{value:20,label:"Force delete game"},{value:21,label:"Block game"},{value:22,label:"Unblock game"},{value:23,label:"View trashed games"},{value:24,label:"View trashed game"},{value:25,label:"List game rooms"},{value:26,label:"View game room"},{value:27,label:"Create game room"},{value:28,label:"Update game room"},{value:29,label:"Delete game room"},{value:30,label:"Force delete game room"},{value:31,label:"Block game room"},{value:32,label:"Unblock game room"},{value:33,label:"Create private game room"},{value:34,label:"View trashed game rooms"},{value:35,label:"View trashed game room"},{value:36,label:"List top-up requests"},{value:37,label:"View top-up request"},{value:38,label:"Create top-up request"},{value:39,label:"Update top-up request"},{value:40,label:"Delete top-up request"},{value:41,label:"Force delete top-up request"},{value:42,label:"Review top-up request"},{value:43,label:"View trashed top-up requests"},{value:44,label:"View trashed top-up request"},{value:45,label:"List withdraw requests"},{value:46,label:"View withdraw request"},{value:47,label:"Create withdraw request"},{value:48,label:"Update withdraw request"},{value:49,label:"Delete withdraw request"},{value:50,label:"Force delete withdraw request"},{value:51,label:"Review withdraw request"},{value:52,label:"View trashed withdraw requests"},{value:53,label:"View trashed withdraw request"},{value:54,label:"List roles"},{value:55,label:"View role"},{value:56,label:"Create role"},{value:57,label:"Update role"},{value:58,label:"Delete role"},{value:59,label:"Force delete role"},{value:60,label:"Review role"},{value:61,label:"View trashed roles"},{value:62,label:"View trashed role"},{value:63,label:"Attach role"},{value:64,label:"Remove role"},{value:65,label:"Add list permissions to role"},{value:66,label:"Add view permissions to role"},{value:67,label:"Add create permissions to role"},{value:68,label:"Add update permissions to role"},{value:69,label:"Add force delete permissions to role"},{value:70,label:"Add list trashed permissions to role"},{value:71,label:"Add view trashed permissions to role"},{value:72,label:"Add review permissions to role"},{value:73,label:"Add other permissions to role"},{value:74,label:"List transfer coins requests"},{value:75,label:"View transfer coins request"},{value:76,label:"List in-app notifications"},{value:77,label:"View in-app notification"},{value:78,label:"Create in-app notification"},{value:79,label:"Update in-app notification"},{value:80,label:"Delete in-app notification"},{value:81,label:"Force delete in-app notification"},{value:82,label:"View trashed in-app notifications"},{value:83,label:"View trashed in-app notification"},{value:84,label:"Send in-app notification to all players"},{value:85,label:"Send in-app notification to all admin users"},{value:86,label:"Send in-app notification to specific players"},{value:87,label:"Send in-app notification to specific admin users"},{value:88,label:"Schedule in-app notifications"},{value:89,label:"List attachments"},{value:90,label:"View attachment"},{value:91,label:"Create attachment"},{value:92,label:"Update attachment"},{value:93,label:"Delete attachment"},{value:94,label:"Force delete attachment"},{value:95,label:"View trashed attachments"},{value:96,label:"View trashed attachment"},{value:97,label:"List app settings"},{value:98,label:"View app setting"},{value:99,label:"Create app setting"},{value:100,label:"Update app setting"},{value:101,label:"Delete app setting"},{value:102,label:"Force delete app setting"},{value:103,label:"View trashed app settings"},{value:104,label:"View trashed app setting"},{value:105,label:"List transactions"},{value:106,label:"View transaction"},{value:107,label:"Create transaction"},{value:108,label:"Update transaction"},{value:109,label:"Delete transaction"},{value:110,label:"Force delete transaction"},{value:111,label:"View trashed transactions"},{value:112,label:"View trashed transaction"}];var da,_e=(da=Object.keys(R))==null?void 0:da.filter(e=>isNaN(Number(e))),h=(e=[],t=[])=>{var s;let r=e==null?void 0:e.map(p=>p==null?void 0:p.toLowerCase()),l=t==null?void 0:t.map(p=>p==null?void 0:p.toLowerCase());return (s=_e==null?void 0:_e.filter(p=>{let c=p==null?void 0:p.toLowerCase();return (l==null?void 0:l.length)>0&&(l!=null&&l.includes(c))?true:!(r!=null&&r.some(v=>c==null?void 0:c.includes(v)))}))==null?void 0:s.map(p=>R[p])},ga=e=>{switch(e){case "197g24g-28h3v2g9g972g3f":return 1;case "28h3v2g9g9--72g3f":return 2;case "38h3vrv3-ion2g9g97-2g3f":return 3;case "48h3v2g9g97-2g3f":return 4;case "58h3v2g9g8h-972g3f":return 5;case "68h-3v2g9g972g3f":return 6;case "8hfrfr----8h3v2g9-g972g3f":return 8;default:return 7}},fa=e=>{var r;let t=(r=Array.from(new Set(e)))==null?void 0:r.filter(l=>l>0);return t==null?void 0:t.map(l=>R[l])},_=({permission:e,userPermissions:t})=>t==null?void 0:t.includes(e),ye=({userPermissions:e,requiredPermissions:t=[],checkModeForRequiredPermissions:r=1})=>!t||(t==null?void 0:t.length)===0?true:r===1?t==null?void 0:t.every(l=>_({userPermissions:e,permission:l})):t==null?void 0:t.some(l=>_({userPermissions:e,permission:l})),Me=({userPermissions:e,excludedPermissions:t=[],checkModeForExcludedPermissions:r=1})=>!t||(t==null?void 0:t.length)===0?true:!(r===1?t!=null&&t.every(l=>_({userPermissions:e,permission:l})):t!=null&&t.some(l=>_({userPermissions:e,permission:l}))),va=({userPermissions:e,requiredPermissions:t=[],excludedPermissions:r=[],checkModeForRequiredPermissions:l=1,checkModeForExcludedPermissions:s=1})=>!!(ye({userPermissions:e,checkModeForRequiredPermissions:l,requiredPermissions:t})&&Me({userPermissions:e,excludedPermissions:r,checkModeForExcludedPermissions:s}));var ba=["role","permission","forcedelete","trashed","transaction","appsetting","inappnotification","restore","addcoin","removecoin","admincoin"],ie=[...ba,"user","delete","topuprequest","withdrawrequest","transfercoinsrequest"],La=[...ie,"block"],oe=[...ie,"edit","update","review"],Wa=[...oe==null?void 0:oe.filter(e=>e!=="review"),"create","add","hide"],za=[...ie,"review","user","hide"],ja=["createPrivateGameRoom"],wa={1:()=>h([]),2:()=>h(ba),3:()=>h(ie),4:()=>h(La),5:()=>h(oe),6:()=>h(Wa),7:()=>[],8:()=>h(za,ja)};var Aa=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),ua=e=>/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i.test(e),ha=e=>/^\+?[1-9]\d{1,14}$/.test(e);var Ra={general:{success:"Request Completed",failed:"Request failed",created:"item created",updated:"item updated",deleted:"item deleted",notFound:"item notFound",invalidData:"invalid data",tooManyRequests:"tooManyRequests",unAuthenticated:"unAuthenticated",unAuthorized:"unAuthorized",serverError:"serverError",badRequest:"badRequest",itemExists:"itemExists"},profile:{added:"Profile data added successfully.",updated:"Profile data updated successfully."}};var le=(d=>(d.register="register",d.login="login",d.logout="logout",d.deleteUser="delete_user",d.getPersonalAccountData="get_personal_account_data",d.getUser="get_user",d.updatePersonalAccountData="update_personal_account_data",d.updateUser="update_user",d.createUser="create_user",d.listUsers="list_users",d.getAdminDashboardData="get_admin_dashboard_data",d.blockUser="block_user",d.unblockUser="unblock_user",d.searchUserData="search_user_data",d.listGames="list_games",d.getGame="get_game",d.createGame="create_game",d.updateGame="update_game",d.deleteGame="delete_game",d.listGameRooms="list_game_rooms",d.getGameRoom="get_game_room",d.createGameRoom="create_game_room",d.updateGameRoom="update_game_room",d.startGameRoom="start_game_room",d.releaseGameRoom="release_game_room",d.declareGameRoomWinner="declare_game_room_winner",d.deleteGameRoom="delete_game_room",d.getCompletedGameRoom="get_completed_game_rooms",d.getEngagerDashboardData="get_engager_dashboard_data",d.getAvailableGameRooms="get_available_game_rooms",d.listTopups="list_topups",d.requestTopup="request_topup",d.updateTopupRequest="update_topup_request",d.getPlayersTopupRequests="get_players_topup_requests",d.reviewTopupRequest="review_topup_request",d.getPlayerDashboardData="get_player_dashboard_data",d.joinGameRoom="join_game_room",d.leaveGameRoom="leave_game_room",d.listWithdrawRequests="list_withdraw_requests",d.createWithdrawRequest="create_withdraw_request",d.getPlayersWithdrawRequests="get_players_withdraw_requests",d.reviewWithdrawRequest="review_withdraw_request",d.searchGameRoom="search_game_room",d.getJoinedGameRooms="get_joined_game_rooms",d.listTransferCoinsRequests="list_transfer_coins_requests",d.transferCoins="transfer_coins",d.listInAppNotifications="list_in_app_notifications",d.createInAppNotification="create_in_app_notification",d.getInAppNotification="get_in_app_notification",d.updateInAppNotification="update_in_app_notification",d.deleteInAppNotification="delete_in_app_notification",d.getPlayersTransferCoinsRequests="get_players_transfer_coins_requests",d.getGenericInAppNotifications="get_generic_in_app_notifications",d.getUserSpecificInInAppNotifications="get_user_specific_in_app_notifications",d.getUserRoleSpecificInAppNotifications="get_user_role_specific_in_app_notifications",d.listRoles="list_roles",d.getRole="get_role",d.deleteRole="delete_role",d.updateRole="update_role",d.createRole="create_role",d.addCoinsToUserAccount="add_coins_to_user_account",d.removeCoinsToUserAccount="remove_coins_from_user_account",d.getAdminCoinsUpdateLog="get_admin_coins_update_log",d.listAdminCoinsUpdateLog="list_admin_coins_update_logs",d.collectUserGameTypeRequiredData="collect_user_game_type_required_data",d.runUniqueIdsSyncMigrationScriptV1="run_unique_ids_sync_migration_script_v1",d))(le||{});g(le,"duplicate values in ApiPathEnum");var se=(r=>(r.denied="denied",r.granted="granted",r))(se||{}),ce=(c=>(c[c.unknownError=-1]="unknownError",c[c.success=0]="success",c[c.permissionDenied=1]="permissionDenied",c[c.positionUnavailable=2]="positionUnavailable",c[c.timeout=3]="timeout",c[c.geolocationNotSupportedByBrowser=4]="geolocationNotSupportedByBrowser",c))(ce||{}),ne=(l=>(l.web="web",l.ios="ios",l.android="android",l))(ne||{});g(se,"duplicate values in GeoLocationPermissionStateEnum");g(ce,"duplicate values in GeoLocationResponseCodeEnum");g(ne,"duplicate values in CapacitorPlatformEnum");var pe=(s=>(s.success="success",s.info="info",s.warning="warning",s.error="error",s))(pe||{});g(pe,"duplicate values in AlertTypeEnum");var de=(p=>(p.bar="bar",p.line="line",p.doughnut="doughnut",p.pie="pie",p.polar="polar",p))(de||{});g(de,"duplicate values in CharTypeEnum");var ge=(o=>(o.id="id",o.userId="userId",o.userUniqueId="userUniqueId",o.itemId="itemId",o.playerId="playerId",o.createdAt="createdAt",o.updatedAt="updatedAt",o.deletedAt="deletedAt",o.blockedAt="blockedAt",o.sortOrderNo="sortOrderNo",o.userData="userData",o.playerData="playerData",o.otherPlayerId="otherPlayerId",o.otherPlayerData="otherPlayerData",o.isActive="isActive",o.extraData="extraData",o.title="title",o.description="description",o.isBlocked="isBlocked",o.actions="actions",o.action="action",o.imageFile="imageFile",o.searchText="searchText",o.iconFile="iconFile",o.gameTitle="gameTitle",o.receptScreenshotFile="receptScreenshotFile",o.body="body",o.content="content",o.fcmDeviceToken="fcmDeviceToken",o.fcmDeviceTokens="fcmDeviceTokens",o.apnsDeviceToken="apnsDeviceToken",o.apnsDeviceTokens="apnsDeviceTokens",o.subtitle="subtitle",o.tag="tag",o.tags="tags",o.badge="badge",o.notification="notification",o.notifications="notifications",o.data="data",o.clickAction="clickAction",o.link="link",o.group="group",o.groupSummary="groupSummary",o.sound="sound",o.importance="importance",o.visibility="visibility",o.light="light",o.lights="lights",o.lightColor="lightColor",o.vibration="vibration",o.channel="channel",o.channels="channels",o.receive="receive",o.value="value",o.actionId="actionId",o.inputValue="inputValue",o.firstName="firstName",o.lastName="lastName",o.name="name",o.email="email",o.phoneNumber="phoneNumber",o.password="password",o.passwordConfirmation="passwordConfirmation",o.withdrawOptions="withdrawOptions",o.cnic="cnic",o.city="city",o.country="country",o.address="address",o.referredBy="referredBy",o.referralCode="referralCode",o.disabled="disabled",o.photoURL="photoURL",o.emailVerified="emailVerified",o.emailVerifiedAt="emailVerifiedAt",o.balance="balance",o.permissions="permissions",o.role="role",o.customClaims="customClaims",o.age="age",o.gender="gender",o.constellation="constellation",o.hometown="hometown",o.language="language",o.profileCompletePercentageNumber="profileCompletePercentageNumber",o.birthdayDate="birthdayDate",o.aboutMe="aboutMe",o.hobbies="hobbies",o.lifeStyle="lifeStyle",o.music="music",o.movies="movies",o.travel="travel",o.books="books",o.gym="gym",o.food="food",o.cleanliness="cleanliness",o.smoke="smoke",o.pets="pets",o.guests="guests",o.occupation="occupation",o.foodPreference="foodPreference",o.workSchedule="workSchedule",o.overnightGuests="overnightGuests",o.getUpTime="getUpTime",o.goToBedTime="goToBedTime",o.roomPreference="roomPreference",o.roommatePreference="roommatePreference",o.whereWantToLive="whereWantToLive",o.moveInDate="moveInDate",o.budget="budget",o.placePreference="placePreference",o.buildingType="buildingType",o.other="other",o.min="min",o.max="max",o.verificationCode="verificationCode",o.maxPlayersAllowed="maxPlayersAllowed",o.feePerPlayer="feePerPlayer",o.serviceCharges="serviceCharges",o.image="image",o.minPlayersToStartGame="minPlayersToStartGame",o.isPrivate="isPrivate",o.roomCode="roomCode",o.status="status",o.gameId="gameId",o.gameData="gameData",o.gameRoomPlayerIds="gameRoomPlayerIds",o.gameRoomPlayersData="gameRoomPlayersData",o.gameRoomWillStartAt="gameRoomWillStartAt",o.playerJoinCutoffTime="playerJoinCutoffTime",o.firstPlayerGameRoomJoinedAt="firstPlayerGameRoomJoinedAt",o.engagerStartedTheActualGameAt="engagerStartedTheActualGameAt",o.gameRoomWinnerPlayerId="gameRoomWinnerPlayerId",o.gameRoomResultScreenShot="gameRoomResultScreenShot",o.timerForEngagerToStartActualGameInMinutes="timerForEngagerToStartActualGameInMinutes",o.timerForPlayersToJoinActualGameInMinutes="timerForPlayersToJoinActualGameInMinutes",o.actualGameInfo="actualGameInfo",o.engagerReleasedGameRoomAt="engagerReleasedGameRoomAt",o.engagerDeclaredGameRoomWinnerAt="engagerDeclaredGameRoomWinnerAt",o.amount="amount",o.agentRemarks="agentRemarks",o.transferMethod="transferMethod",o.receptScreenshot="receptScreenshot",o.transactionId="transactionId",o.balanceBefore="balanceBefore",o.balanceAfter="balanceAfter",o.type="type",o.adminUserId="adminUserId",o.otherPlayerPhoneNumber="otherPlayerPhoneNumber",o.otherPlayerName="otherPlayerName",o.userRemarks="userRemarks",o.queryKeyValue="queryKeyValue",o.queryKeyType="queryKeyType",o.nextPageToken="nextPageToken",o.apiKey1="v89h249v2--c--3-3-3-f-ff-fff-f-f-f-f-ff-f-igh872gv23g97293",o.totalTopupCoins="totalTopupCoins",o.totalWithdrawCoins="totalWithdrawCoins",o.totalWonCoins="totalWonCoins",o.totalTransferredCoins="totalTransferredCoins",o.totalReceivedCoins="totalReceivedCoins",o.totalLostCoins="totalLostCoins",o.totalGamesPlayed="totalGamesPlayed",o.totalGamesLeft="totalGamesLeft",o.totalGamesWon="totalGamesWon",o.totalGamesLost="totalGamesLost",o.gameWinStreak="gameWinStreak",o.gameLostStreak="gameLostStreak",o.lastGamePlayedAt="lastGamePlayedAt",o.lastGameLeftAt="lastGameLeftAt",o.lastGameWonAt="lastGameWonAt",o.lastGameLostAt="lastGameLostAt",o.totalGameRoomReleasedForThisPlayer="totalGameRoomReleasedForThisPlayer",o.lastGameRoomReleasedForThisPlayerAt="lastGameRoomReleasedForThisPlayerAt",o.totalGameRoomReleasedByThisAdminUser="totalGameRoomReleasedByThisAdminUser",o.lastGameRoomReleasedByThisAdminUserAt="lastGameRoomReleasedByThisAdminUserAt",o.totalCoinsEarnedAsGameRoomEngager="totalCoinsEarnedAsGameRoomEngager",o.totalGameRoomsCompletedAsEngager="totalGameRoomsCompletedAsEngager",o.lastGameRoomsCompletedAsEngagerAt="lastGameRoomsCompletedAsEngagerAt",o.icon="icon",o.sendAt="sendAt",o.sendTo="sendTo",o.specificUsersPhoneNumbers="specificUsersPhoneNumbers",o.saveAsDraft="saveAsDraft",o.roleIdentifier="roleIdentifier",o.isDefault="isDefault",o.totalCount="totalCount",o.totalSoftDeletedCount="totalSoftDeletedCount",o.totalPlayersCount="totalPlayersCount",o.totalEngagersCount="totalEngagersCount",o.totalAdminsCount="totalAdminsCount",o.totalActiveCount="totalActiveCount",o.totalBlockedCount="totalBlockedCount",o.totalCompletedCount="totalCompletedCount",o.totalReleasedCount="totalReleasedCount",o.totalServiceCharges="totalServiceCharges",o.period="period",o.currency="currency",o.place="place",o.rent="rent",o.generalInfo="generalInfo",o.location="location",o.images="images",o.details="details",o.latitude="latitude",o.longitude="longitude",o.placeId="placeId",o.streetAddress="streetAddress",o.apartmentSuit="apartmentSuit",o.province="province",o.postCode="postCode",o.bedroomImages="bedroomImages",o.washroomImages="washroomImages",o.kitchenImages="kitchenImages",o.otherImages="otherImages",o.availabilityTerm="availabilityTerm",o.moveOutDate="moveOutDate",o.minimumLease="minimumLease",o.houseInfo="houseInfo",o.otherRequirements="otherRequirements",o.placeSharingDetail="placeSharingDetail",o.placeBenefits="placeBenefits",o.leaseTime="leaseTime",o.leaseTimeUnit="leaseTimeUnit",o.bedrooms="bedrooms",o.washrooms="washrooms",o.parking="parking",o.units="units",o.detail="detail",o.bedroom="bedroom",o.livingRoom="livingRoom",o.kitchen="kitchen",o.washroom="washroom",o.livingWithLandlord="livingWithLandlord",o.livingWithPersonDetails="livingWithPersonDetails",o.furnished="furnished",o.benefits="benefits",o.otherBenefits="otherBenefits",o.gameType="gameType",o.thirdPartyAppsData="thirdPartyAppsData",o.thirdPartyAppData="thirdPartyAppData",o.pubgAppId="pubgAppId",o.uniqueId="uniqueId",o.ludoStarAppId="ludoStarAppId",o.freeFireAppId="freeFireAppId",o.callOfDutyAppId="callOfDutyAppId",o.robloxAppId="robloxAppId",o.eightBallPoolAppId="eightBallPoolAppId",o.amongUsAppId="amongUsAppId",o.unoAppId="unoAppId",o.miniMilitiaAppId="miniMilitiaAppId",o.carromAppId="carromAppId",o.tennisClashAppId="tennisClashAppId",o.chessAppId="chessAppId",o.asphalt9AppId="asphalt9AppId",o.golfBattleAppId="golfBattleAppId",o.arenaBreakoutAppId="arenaBreakoutAppId",o))(ge||{});g(ge,"Duplicate FormFieldsEnum value found:");var fe=(n=>(n.COUNTRY="country",n.STREET_ADDRESS="street_address",n.APT_SUITE="subpremise",n.CITY="city",n.PROVINCE="administrative_area_level_1",n.POST_CODE="postal_code",n.NEIGHBORHOOD="neighborhood",n.ROUTE="route",n.LOCALITY="locality",n.PREMISE="premise",n))(fe||{});g(fe,"duplicate values in AddressComponentTypeEnum");var Oe=(r=>(r[r.add=1]="add",r[r.subtract=2]="subtract",r))(Oe||{}),ve=(r=>(r[r.exact=1]="exact",r[r.percentage=2]="percentage",r))(ve||{}),qe=(n=>(n[n.topup=1]="topup",n[n.withdraw=2]="withdraw",n[n.transferred=3]="transferred",n[n.received=4]="received",n[n.wonGameRoomPoolPrice=5]="wonGameRoomPoolPrice",n[n.gameRoomFeeReturnedAfterReleased=6]="gameRoomFeeReturnedAfterReleased",n[n.lostGameRoom=7]="lostGameRoom",n[n.coinsAddedByAdmin=8]="coinsAddedByAdmin",n[n.coinsRemovedByAdmin=9]="coinsRemovedByAdmin",n[n.earnedGameRoomEngagerFee=10]="earnedGameRoomEngagerFee",n))(qe||{}),be=(c=>(c[c.allUsers=1]="allUsers",c[c.allAdmins=2]="allAdmins",c[c.allEngagers=3]="allEngagers",c[c.allPlayers=4]="allPlayers",c[c.allEngagersAndPlayers=5]="allEngagersAndPlayers",c[c.specificUsers=6]="specificUsers",c))(be||{}),Ce=(l=>(l[l.sent=1]="sent",l[l.pending=2]="pending",l[l.draft=3]="draft",l))(Ce||{}),Le=(c=>(c[c.waitingForPlayers=1]="waitingForPlayers",c[c.inProgress=2]="inProgress",c[c.waitingForResult=3]="waitingForResult",c[c.completed=4]="completed",c[c.waitingForEngager=5]="waitingForEngager",c[c.released=6]="released",c))(Le||{}),We=(s=>(s[s.processing=1]="processing",s[s.completed=2]="completed",s[s.rejected=3]="rejected",s[s.cancelled=4]="cancelled