forked from Simnation/Main
29 lines
108 KiB
JavaScript
29 lines
108 KiB
JavaScript
![]() |
(()=>{var xn=Object.create;var Nt=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var Tn=Object.getOwnPropertyNames;var Nn=Object.getPrototypeOf,In=Object.prototype.hasOwnProperty;var Se=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var kn=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of Tn(e))!In.call(o,u)&&u!==t&&Nt(o,u,{get:()=>e[u],enumerable:!(i=Pn(e,u))||i.enumerable});return o};var vt=(o,e,t)=>(t=o!=null?xn(Nn(o)):{},kn(e||!o||!o.__esModule?Nt(t,"default",{value:o,enumerable:!0}):t,o));var Ot=Se((Rt,St)=>{(function(o,e){typeof Rt=="object"&&typeof St<"u"?St.exports=e():typeof define=="function"&&define.amd?define(e):o.JSON5=e()})(Rt,function(){"use strict";function o(a,h){return h={exports:{}},a(h,h.exports),h.exports}var e=o(function(a){var h=a.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=h)}),t=o(function(a){var h=a.exports={version:"2.6.5"};typeof __e=="number"&&(__e=h)}),i=t.version,u=function(a){return typeof a=="object"?a!==null:typeof a=="function"},d=function(a){if(!u(a))throw TypeError(a+" is not an object!");return a},y=function(a){try{return!!a()}catch{return!0}},_=!y(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),b=e.document,A=u(b)&&u(b.createElement),v=function(a){return A?b.createElement(a):{}},re=!_&&!y(function(){return Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a!=7}),J=function(a,h){if(!u(a))return a;var F,E;if(h&&typeof(F=a.toString)=="function"&&!u(E=F.call(a))||typeof(F=a.valueOf)=="function"&&!u(E=F.call(a))||!h&&typeof(F=a.toString)=="function"&&!u(E=F.call(a)))return E;throw TypeError("Can't convert object to primitive value")},z=Object.defineProperty,Q=_?Object.defineProperty:function(h,F,E){if(d(h),F=J(F,!0),d(E),re)try{return z(h,F,E)}catch{}if("get"in E||"set"in E)throw TypeError("Accessors not supported!");return"value"in E&&(h[F]=E.value),h},le={f:Q},Ee=function(a,h){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:h}},ce=_?function(a,h,F){return le.f(a,h,Ee(1,F))}:function(a,h,F){return a[h]=F,a},Be={}.hasOwnProperty,Ce=function(a,h){return Be.call(a,h)},Oe=0,_e=Math.random(),Me=function(a){return"Symbol(".concat(a===void 0?"":a,")_",(++Oe+_e).toString(36))},O=!1,ge=o(function(a){var h="__core-js_shared__",F=e[h]||(e[h]={});(a.exports=function(E,B){return F[E]||(F[E]=B!==void 0?B:{})})("versions",[]).push({version:t.version,mode:O?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),Le=ge("native-function-to-string",Function.toString),Ue=o(function(a){var h=Me("src"),F="toString",E=(""+Le).split(F);t.inspectSource=function(B){return Le.call(B)},(a.exports=function(B,T,I,ue){var $=typeof I=="function";$&&(Ce(I,"name")||ce(I,"name",T)),B[T]!==I&&($&&(Ce(I,h)||ce(I,h,B[T]?""+B[T]:E.join(String(T)))),B===e?B[T]=I:ue?B[T]?B[T]=I:ce(B,T,I):(delete B[T],ce(B,T,I)))})(Function.prototype,F,function(){return typeof this=="function"&&this[h]||Le.call(this)})}),Ze=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a},Qe=function(a,h,F){if(Ze(a),h===void 0)return a;switch(F){case 1:return function(E){return a.call(h,E)};case 2:return function(E,B){return a.call(h,E,B)};case 3:return function(E,B,T){return a.call(h,E,B,T)}}return function(){return a.apply(h,arguments)}},M="prototype",ee=function(a,h,F){var E=a&ee.F,B=a&ee.G,T=a&ee.S,I=a&ee.P,ue=a&ee.B,$=B?e:T?e[h]||(e[h]={}):(e[h]||{})[M],Te=B?t:t[h]||(t[h]={}),We=Te[M]||(Te[M]={}),de,me,ae,Ge;B&&(F=h);for(de in F)me=!E&&$&&$[de]!==void 0,ae=(me?$:F)[de],Ge=ue&&me?Qe(ae,e):I&&typeof ae=="function"?Qe(Function.call,ae):ae,$&&Ue($,de,ae,a&ee.U),Te[de]!=ae&&ce(Te,de,Ge),I&&We[de]!=ae&&(We[de]=ae)};e.core=t,ee.F=1,ee.G=2,ee.S=4,ee.P=8,ee.B=16,ee.W=32,ee.U=64,ee.R=128;var Ae=ee,Et=Math.ceil,n=Math.floor,r=function(a){return isNaN(a=+a)?0:(a>0?n:Et)(a)},s=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a},l=function(a){return function(h,F){var E=String(s(h)),B=r
|
||
|
`?(q++,he=0):a?he+=a.length:he++,a&&(oe+=a.length),a}var xt={default:function(){switch(N){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
||
|
`:case"\r":case"\u2028":case"\u2029":D();return;case"/":D(),P="comment";return;case void 0:return D(),Y("eof")}if(G.isSpaceSeparator(N)){D();return}return xt[U]()},comment:function(){switch(N){case"*":D(),P="multiLineComment";return;case"/":D(),P="singleLineComment";return}throw H(D())},multiLineComment:function(){switch(N){case"*":D(),P="multiLineCommentAsterisk";return;case void 0:throw H(D())}D()},multiLineCommentAsterisk:function(){switch(N){case"*":D();return;case"/":D(),P="default";return;case void 0:throw H(D())}D(),P="multiLineComment"},singleLineComment:function(){switch(N){case`
|
||
|
`:case"\r":case"\u2028":case"\u2029":D(),P="default";return;case void 0:return D(),Y("eof")}D()},value:function(){switch(N){case"{":case"[":return Y("punctuator",D());case"n":return D(),xe("ull"),Y("null",null);case"t":return D(),xe("rue"),Y("boolean",!0);case"f":return D(),xe("alse"),Y("boolean",!1);case"-":case"+":D()==="-"&&(ye=-1),P="sign";return;case".":w=D(),P="decimalPointLeading";return;case"0":w=D(),P="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":w=D(),P="decimalInteger";return;case"I":return D(),xe("nfinity"),Y("numeric",1/0);case"N":return D(),xe("aN"),Y("numeric",NaN);case'"':case"'":$e=D()==='"',w="",P="string";return}throw H(D())},identifierNameStartEscape:function(){if(N!=="u")throw H(D());D();var h=Ft();switch(h){case"$":case"_":break;default:if(!G.isIdStartChar(h))throw Pt();break}w+=h,P="identifierName"},identifierName:function(){switch(N){case"$":case"_":case"\u200C":case"\u200D":w+=D();return;case"\\":D(),P="identifierNameEscape";return}if(G.isIdContinueChar(N)){w+=D();return}return Y("identifier",w)},identifierNameEscape:function(){if(N!=="u")throw H(D());D();var h=Ft();switch(h){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!G.isIdContinueChar(h))throw Pt();break}w+=h,P="identifierName"},sign:function(){switch(N){case".":w=D(),P="decimalPointLeading";return;case"0":w=D(),P="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":w=D(),P="decimalInteger";return;case"I":return D(),xe("nfinity"),Y("numeric",ye*(1/0));case"N":return D(),xe("aN"),Y("numeric",NaN)}throw H(D())},zero:function(){switch(N){case".":w+=D(),P="decimalPoint";return;case"e":case"E":w+=D(),P="decimalExponent";return;case"x":case"X":w+=D(),P="hexadecimal";return}return Y("numeric",ye*0)},decimalInteger:function(){switch(N){case".":w+=D(),P="decimalPoint";return;case"e":case"E":w+=D(),P="decimalExponent";return}if(G.isDigit(N)){w+=D();return}return Y("numeric",ye*Number(w))},decimalPointLeading:function(){if(G.isDigit(N)){w+=D(),P="decimalFraction";return}throw H(D())},decimalPoint:function(){switch(N){case"e":case"E":w+=D(),P="decimalExponent";return}if(G.isDigit(N)){w+=D(),P="decimalFraction";return}return Y("numeric",ye*Number(w))},decimalFraction:function(){switch(N){case"e":case"E":w+=D(),P="decimalExponent";return}if(G.isDigit(N)){w+=D();return}return Y("numeric",ye*Number(w))},decimalExponent:function(){switch(N){case"+":case"-":w+=D(),P="decimalExponentSign";return}if(G.isDigit(N)){w+=D(),P="decimalExponentInteger";return}throw H(D())},decimalExponentSign:function(){if(G.isDigit(N)){w+=D(),P="decimalExponentInteger";return}throw H(D())},decimalExponentInteger:function(){if(G.isDigit(N)){w+=D();return}return Y("numeric",ye*Number(w))},hexadecimal:function(){if(G.isHexDigit(N)){w+=D(),P="hexadecimalInteger";return}throw H(D())},hexadecimalInteger:function(){if(G.isHexDigit(N)){w+=D();return}return Y("numeric",ye*Number(w))},string:function(){switch(N){case"\\":D(),w+=En();return;case'"':if($e)return D(),Y("string",w);w+=D();return;case"'":if(!$e)return D(),Y("string",w);w+=D();return;case`
|
||
|
`:case"\r":throw H(D());case"\u2028":case"\u2029":Fn(N);break;case void 0:throw H(D())}w+=D()},start:function(){switch(N){case"{":case"[":return Y("punctuator",D())}P="value"},beforePropertyName:function(){switch(N){case"$":case"_":w=D(),P="identifierName";return;case"\\":D(),P="identifierNameStartEscape";return;case"}":return Y("punctuator",D());case'"':case"'":$e=D()==='"',P="string";return}if(G.isIdStartChar(N)){w+=D(),P="identifierName";return}throw H(D())},afterPropertyName:function(){if(N===":")return Y("punctuator",D());throw H(D())},beforePropertyValue:function(){P="value"},afterPropertyValue:function(){switch(N){case",":case"}":return Y("punctuator",D())}throw H(D())},beforeArrayValue:function(){if(N==="]")return Y("punctuator",D());P="value"},afterArrayValue:function(){switch(N){case",":case"]":return Y("punctuator",D())}throw H(D())},end:function(){throw H(D())}};function Y(a,h){return{type:a,value:h,line:q,column:he}}function xe(a){for(var h=0,F=a;h<F.length;h+=1){var E=F[h],B=Fe();if(B!==E)throw H(D());D()}}function En(){var a=Fe();switch(a){case"b":return D(),"\b";case"f":return D(),"\f";case"n":return D(),`
|
||
|
`;case"r":return D(),"\r";case"t":return D()," ";case"v":return D(),"\v";case"0":if(D(),G.isDigit(Fe()))throw H(D());return"\0";case"x":return D(),An();case"u":return D(),Ft();case`
|
||
|
`:case"\u2028":case"\u2029":return D(),"";case"\r":return D(),Fe()===`
|
||
|
`&&D(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw H(D());case void 0:throw H(D())}return D()}function An(){var a="",h=Fe();if(!G.isHexDigit(h)||(a+=D(),h=Fe(),!G.isHexDigit(h)))throw H(D());return a+=D(),String.fromCodePoint(parseInt(a,16))}function Ft(){for(var a="",h=4;h-- >0;){var F=Fe();if(!G.isHexDigit(F))throw H(D());a+=D()}return String.fromCodePoint(parseInt(a,16))}var yn={start:function(){if(Z.type==="eof")throw Pe();bt()},beforePropertyName:function(){switch(Z.type){case"identifier":case"string":At=Z.value,U="afterPropertyName";return;case"punctuator":et();return;case"eof":throw Pe()}},afterPropertyName:function(){if(Z.type==="eof")throw Pe();U="beforePropertyValue"},beforePropertyValue:function(){if(Z.type==="eof")throw Pe();bt()},beforeArrayValue:function(){if(Z.type==="eof")throw Pe();if(Z.type==="punctuator"&&Z.value==="]"){et();return}bt()},afterPropertyValue:function(){if(Z.type==="eof")throw Pe();switch(Z.value){case",":U="beforePropertyName";return;case"}":et()}},afterArrayValue:function(){if(Z.type==="eof")throw Pe();switch(Z.value){case",":U="beforeArrayValue";return;case"]":et()}},end:function(){}};function bt(){var a;switch(Z.type){case"punctuator":switch(Z.value){case"{":a={};break;case"[":a=[];break}break;case"null":case"boolean":case"numeric":case"string":a=Z.value;break}if(Ke===void 0)Ke=a;else{var h=se[se.length-1];Array.isArray(h)?h.push(a):Object.defineProperty(h,At,{value:a,writable:!0,enumerable:!0,configurable:!0})}if(a!==null&&typeof a=="object")se.push(a),Array.isArray(a)?U="beforeArrayValue":U="beforePropertyName";else{var F=se[se.length-1];F==null?U="end":Array.isArray(F)?U="afterArrayValue":U="afterPropertyValue"}}function et(){se.pop();var a=se[se.length-1];a==null?U="end":Array.isArray(a)?U="afterArrayValue":U="afterPropertyValue"}function H(a){return tt(a===void 0?"JSON5: invalid end of input at "+q+":"+he:"JSON5: invalid character '"+Tt(a)+"' at "+q+":"+he)}function Pe(){return tt("JSON5: invalid end of input at "+q+":"+he)}function Pt(){return he-=5,tt("JSON5: invalid identifier character at "+q+":"+he)}function Fn(a){console.warn("JSON5: '"+Tt(a)+"' in strings is not valid ECMAScript; consider escaping")}function Tt(a){var h={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(h[a])return h[a];if(a<" "){var F=a.charCodeAt(0).toString(16);return"\\x"+("00"+F).substring(F.length)}return a}function tt(a){var h=new SyntaxError(a);return h.lineNumber=q,h.columnNumber=he,h}var bn=function(h,F,E){var B=[],T="",I,ue,$="",Te;if(F!=null&&typeof F=="object"&&!Array.isArray(F)&&(E=F.space,Te=F.quote,F=F.replacer),typeof F=="function")ue=F;else if(Array.isArray(F)){I=[];for(var We=0,de=F;We<de.length;We+=1){var me=de[We],ae=void 0;typeof me=="string"?ae=me:(typeof me=="number"||me instanceof String||me instanceof Number)&&(ae=String(me)),ae!==void 0&&I.indexOf(ae)<0&&I.push(ae)}}return E instanceof Number?E=Number(E):E instanceof String&&(E=String(E)),typeof E=="number"?E>0&&(E=Math.min(10,Math.floor(E)),$=" ".substr(0,E)):typeof E=="string"&&($=E.substr(0,10)),Ge("",{"":h});function Ge(L,ne){var x=ne[L];switch(x!=null&&(typeof x.toJSON5=="function"?x=x.toJSON5(L):typeof x.toJSON=="function"&&(x=x.toJSON(L))),ue&&(x=ue.call(ne,L,x)),x instanceof Number?x=Number(x):x instanceof String?x=String(x):x instanceof Boolean&&(x=x.valueOf()),x){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof x=="string")return nt(x,!1);if(typeof x=="number")return String(x);if(typeof x=="object")return Array.isArray(x)?Mn(x):Bn(x)}function nt(L){for(var ne={"'":.1,'"':.2},x={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},te="",fe=0;fe<L.length;fe++){var ie=L[fe];switch(ie){case"'":case'"':ne[ie]++,te+=ie;continue;case"\0":if(G.isDigit(L[fe+1])){te+="\\x00";continue}}if(x[ie]){te+=x[ie];continue}if(ie<" "){var Ne=ie.charCodeAt(0).toString(16);te+="\\x
|
||
|
`+T;it=te.join(wn),Ie=`{
|
||
|
`+T+it+`,
|
||
|
`+ne+"}"}}return B.pop(),T=ne,Ie}function _n(L){if(L.length===0)return nt(L,!0);var ne=String.fromCodePoint(L.codePointAt(0));if(!G.isIdStartChar(ne))return nt(L,!0);for(var x=ne.length;x<L.length;x++)if(!G.isIdContinueChar(String.fromCodePoint(L.codePointAt(x))))return nt(L,!0);return L}function Mn(L){if(B.indexOf(L)>=0)throw TypeError("Converting circular structure to JSON5");B.push(L);var ne=T;T=T+$;for(var x=[],te=0;te<L.length;te++){var fe=Ge(String(te),L);x.push(fe!==void 0?fe:"null")}var ie;if(x.length===0)ie="[]";else if($===""){var Ne=x.join(",");ie="["+Ne+"]"}else{var be=`,
|
||
|
`+T,Re=x.join(be);ie=`[
|
||
|
`+T+Re+`,
|
||
|
`+ne+"]"}return B.pop(),T=ne,ie}},vn={parse:mn,stringify:bn},Rn=vn,Sn=Rn;return Sn})});var Gt=Se(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.boolean=void 0;var Vn=function(o){switch(Object.prototype.toString.call(o)){case"[object String]":return["true","t","yes","y","on","1"].includes(o.trim().toLowerCase());case"[object Number]":return o.valueOf()===1;case"[object Boolean]":return o.valueOf();default:return!1}};ut.boolean=Vn});var Yt=Se(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.isBooleanable=void 0;var On=function(o){switch(Object.prototype.toString.call(o)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(o.trim().toLowerCase());case"[object Number]":return[0,1].includes(o.valueOf());case"[object Boolean]":return!0;default:return!1}};at.isBooleanable=On});var Ht=Se(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.isBooleanable=He.boolean=void 0;var Ln=Gt();Object.defineProperty(He,"boolean",{enumerable:!0,get:function(){return Ln.boolean}});var Wn=Yt();Object.defineProperty(He,"isBooleanable",{enumerable:!0,get:function(){return Wn.isBooleanable}})});var jt=Se(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.tokenize=void 0;var Gn=/(?:%(?<flag>([+0-]|-\+))?(?<width>\d+)?(?<position>\d+\$)?(?<precision>\.\d+)?(?<conversion>[%BCESb-iosux]))|(\\%)/g,Yn=o=>{let e,t=[],i=0,u=0,d=null;for(;(e=Gn.exec(o))!==null;){e.index>u&&(d={literal:o.slice(u,e.index),type:"literal"},t.push(d));let y=e[0];u=e.index+y.length,y==="\\%"||y==="%%"?d&&d.type==="literal"?d.literal+="%":(d={literal:"%",type:"literal"},t.push(d)):e.groups&&(d={conversion:e.groups.conversion,flag:e.groups.flag||null,placeholder:y,position:e.groups.position?Number.parseInt(e.groups.position,10)-1:i++,precision:e.groups.precision?Number.parseInt(e.groups.precision.slice(1),10):null,type:"placeholder",width:e.groups.width?Number.parseInt(e.groups.width,10):null},t.push(d))}return u<=o.length-1&&(d&&d.type==="literal"?d.literal+=o.slice(u):t.push({literal:o.slice(u),type:"literal"})),t};ot.tokenize=Yn});var qt=Se(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.createPrintf=void 0;var zt=Ht(),Hn=jt(),jn=(o,e)=>e.placeholder,zn=o=>{var e;let t=(d,y,_)=>_==="-"?d.padEnd(y," "):_==="-+"?((Number(d)>=0?"+":"")+d).padEnd(y," "):_==="+"?((Number(d)>=0?"+":"")+d).padStart(y," "):_==="0"?d.padStart(y,"0"):d.padStart(y," "),i=(e=o?.formatUnboundExpression)!==null&&e!==void 0?e:jn,u={};return(d,...y)=>{let _=u[d];_||(_=u[d]=Hn.tokenize(d));let b="";for(let A of _)if(A.type==="literal")b+=A.literal;else{let v=y[A.position];if(v===void 0)b+=i(d,A,y);else if(A.conversion==="b")b+=zt.boolean(v)?"true":"false";else if(A.conversion==="B")b+=zt.boolean(v)?"TRUE":"FALSE";else if(A.conversion==="c")b+=v;else if(A.conversion==="C")b+=String(v).toUpperCase();else if(A.conversion==="i"||A.conversion==="d")v=String(Math.trunc(v)),A.width!==null&&(v=t(v,A.width,A.flag)),b+=v;else if(A.conversion==="e")b+=Number(v).toExponential();else if(A.conversion==="E")b+=Number(v).toExponential().toUpperCase();else if(A.conversion==="f")A.precision!==null&&(v=Number(v).toFixed(A.precision)),A.width!==null&&(v=t(String(v),A.width,A.flag)),b+=v;else if(A.conversion==="o")b+=(Number.parseInt(String(v),10)>>>0).toString(8);else if(A.conversion==="s")A.width!==null&&(v=t(String(v),A.width,A.flag)),b+=v;else if(A.conversion==="S")A.width!==null&&(v=t(String(v),A.width,A.flag)),b+=String(v).toUpperCase();else if(A.conversion==="u")b+=Number.parseInt(String(v),10)>>>0;else if(A.conversion==="x")v=(Number.parseInt(String(v),10)>>>0).toString(16),A.width!==null&&(v=t(String(v),A.width,A.flag)),b+=v;else throw new Error("Unknown format specifier.")}return b}};st.createPrintf=zn});var Kt=Se(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.printf=je.createPrintf=void 0;var Ut=qt();Object.defineProperty(je,"createPrintf",{enumerable:!0,get:function(){return Ut.createPrintf}});je.printf=Ut.createPrintf()});var Cn=Se((fn,Dn)=>
|
||
|
Missing config values can cause unexpected behavior of the script.`)}for(let u of Object.keys(e)){let d=[...t,u].join(".");u in o||console.warn(`[YaCA] Unknown config key '${d}' found in config file. This key will be ignored and can be removed.`)}return i}function Bt(o,e){let t=LoadResourceFile(GetCurrentResourceName(),o);if(!t)return e;let i=Lt.default.parse(t);return Wt(e,i)}var rt="yacaMegaphone",_t="yacaPhoneSpeaker",Mt="yacaLipSync",Je="yacaVoiceRange",pe="yacaGlobalErrorLevel";var Jt=vt(Kt()),$t=GetCurrentResourceName(),Xt={};function Zt(o,e,t){for(let[i,u]of Object.entries(o)){let d=t?`${t}.${i}`:i;typeof u=="object"?Zt(u,e,d):e[d]=String(u)}return e}var W=(o,...e)=>{let t=Xt[o];return t?e.length>0?(0,Jt.printf)(t,...e):t:o};var Qt=o=>{let e=o||"en",t=JSON.parse(LoadResourceFile($t,`locales/${e}.json`));if(!t&&(console.warn(`could not load 'locales/${e}.json'`),e!=="en"&&(t=JSON.parse(LoadResourceFile($t,"locales/en.json")),t||console.warn("could not load 'locales/en.json'")),!t))return;let i=Zt(t,{});for(let[u,d]of Object.entries(i)){let y=new RegExp(/\$\{([^}]+)}/g),_=d.match(y);if(_)for(let b of _){if(!b)break;let A=b.substring(2,b.length-1),v=i[A];v&&(i[u]=d.replace(b,v))}Xt[u]=d}};function lt(o){return new Promise(e=>setTimeout(e,o,null))}function Ye(o,e=0,t=1){return Math.max(e,Math.min(t,o))}async function en(o,e,t){let i=await o();if(i!==void 0)return i;(t||t==null)&&typeof t!="number"&&(t=1e3);let u=GetGameTimer(),d;return new Promise((y,_)=>{d=setTick(async()=>{let b=t&&GetGameTimer()-u;if(b&&b>t)return _(`${e||"failed to resolve callback"} (waited ${b}ms)`);i=await o(),i!==void 0&&y(i)})}).finally(()=>clearTick(d))}async function tn(o,e,t,i,u=3e4){return e(i)?i:(o(i),en(()=>{if(e(i))return i},`failed to load ${t} '${i}' - this may be caused by
|
||
|
- too many loaded assets
|
||
|
- oversized, invalid, or corrupted assets`,u))}var ct=o=>{if(!DoesAnimDictExist(o))throw new Error(`attempted to load invalid animDict '${o}'`);return tn(RequestAnimDict,HasAnimDictLoaded,"animDict",o)},nn=o=>{if(typeof o!="number"&&(o=ze(o)),!IsModelValid(o))throw new Error(`attempted to load invalid model '${o}'`);return tn(RequestModel,HasModelLoaded,"model",o)};var ze=(o,e=!0)=>{o=e?o:o.toLowerCase();let t=o.length,i,u;for(i=u=0;u<t;u++)i+=o.charCodeAt(u),i+=i<<10,i^=i>>>6;return i+=i<<3,i^=i>>>11,i+=i<<15,i>>>0},rn=async(o,e,t=[0,0,0],i=[0,0,0])=>{let u=await nn(o);if(!u)return;let[d,y,_]=GetEntityCoords(S.ped,!0),[b,A,v]=t,[re,J,z]=i,Q=CreateObject(u,d,y,_,!0,!0,!1);return SetEntityCollision(Q,!1,!1),AttachEntityToEntity(Q,S.ped,GetPedBoneIndex(S.ped,e),b,A,v,re,J,z,!0,!1,!1,!0,2,!0),Q};var un={fivem:{true:{name:"mic_chatter",dict:"mp_facial"},false:{name:"mood_normal_1",dict:"facials@gen_male@variations@normal"}},redm:{true:{name:"mood_talking_normal",dict:"face_human@gen_male@base"},false:{name:"mood_normal",dict:"face_human@gen_male@base"}}},an={A:1885667965,B:1287709438,C:2572789488,D:3034867124,E:3472724512,F:3002300392,G:1980406895,H:613911080,I:3248005013,J:4085452174,K:null,L:2163379861,M:3810290241,N:1271519931,O:4046460518,P:3626896338,Q:3732491838,R:3809269511,S:3531047651,T:null,U:3640078424,V:2139949496,W:2412778968,X:2362035522,Y:null,Z:652860416,RIGHTBRACKET:2780679484,LEFTBRACKET:1124438954,MOUSE1:130948705,MOUSE2:4165969743,MOUSE3:3470863184,MWUP:813099388,CTRL:3674827653,TAB:2990079499,SHIFT:2415687126,SPACEBAR:3654345152,ENTER:3350541322,BACKSPACE:359624985,LALT:2326399700,DEL:1257559155,PGUP:1147295926,PGDN:1010684785,F1:2833511527,F4:527275493,F6:1007304946,1:3874886372,2:484891115,3:1330236492,4:2409602648,5:2875386263,6:2717770406,7:2956628283,8:1110987810,DOWN:97156178,UP:1662638961,LEFT:2791226036,RIGHT:3736290067};var ke=(y=>(y.RADIO="RADIO",y.MEGAPHONE="MEGAPHONE",y.PHONE="PHONE",y.PHONE_SPEAKER="PHONE_SPEAKER",y.INTERCOM="INTERCOM",y.PHONE_HISTORICAL="PHONE_HISTORICAL",y))(ke||{});var wt={versionCheck:!0,autoConnectOnJoin:!0,buildType:0,locale:"en",unmuteDelay:400,maxPhoneSpeakerRange:5,phoneHearPlayersNearby:!1,notifications:{oxLib:!1,okoknotify:!1,gta:!0,redm:!1,own:!1},keyBinds:{increaseVoiceRange:"ADD",decreaseVoiceRange:"SUBTRACT",primaryRadioTransmit:"N",secondaryRadioTransmit:"CAPITAL",megaphone:"B",voiceRangeWithMouseWheel:"LCONTROL"},radioSettings:{animation:{dictionary:"random@arrests",name:"generic_radio_chatter",flag:49},propWhileTalking:{prop:!1,boneId:28422,position:[0,0,0],rotation:[0,0,0]},channelCount:9,mode:"None",maxDistance:1e3},voiceRange:{defaultIndex:1,ranges:[1,3,8,15,20,25,30,40],sendNotification:!0,markerColor:{enabled:!0,r:0,g:255,b:0,a:50,duration:1e3,type:1,rotate:!0}},megaphone:{range:30,automaticVehicleDetection:!0,allowedVehicleClasses:[18,19],allowedVehicleModels:["polmav"]},saltyChatBridge:!1,mufflingSettings:{mufflingRange:-1,vehicleMuffling:{enabled:!0,vehicleWhitelist:["gauntlet6","draugur","bodhi2","vagrant","outlaw","trophytruck","ratel","drifttampa","sm722","tornado4","swinger","locust","hotring"]},intensities:{differentRoom:10,bothCarsClosed:10,oneCarClosed:6,megaPhoneInCar:6}},radioAntiSpamCooldown:!1,useLocalLipSync:!1};var sn={towerPositions:[[2572,5397,56],[2663,4972,56],[2892,3911,56],[2720,3304,64],[2388,2949,64],[1830,2368,64],[1650,1316,102],[1363,680,102],[918,230,92],[567,303,58],[-47,-666,74],[-585,-902,53],[2572,5397,56],[2338,5940,77],[1916,6244,65],[1591,6371,42],[953,6504,42],[76,6606,42],[408,6587,42],[-338,-579,48],[-293,-632,47],[-269,-962,143],[98,-870,136],[-214,-744,219],[-166,-590,199],[124,-654,261],[149,-769,261],[580,89,117],[423,15,151],[424,18,151],[551,-28,93],[305,-284,68],[299,-313,68],[1240,-1090,44],[-418,-2804,14],[802,-2996,27],[253,-3145,39],[207,-3145,39],[207,-3307,39],[247,-3307,39],[484,-2178,40],[548,-2219,67],[-701,58,68],[-696,208,139],[-769,255,134],[-150,-150,96],[-202,-327,65],[-1913,-3031,22],[-1918,-3028,22],[-1039,-2385,27],[-1042,-2390,27],[-1583,-3216,28],[-1590,-3212,28],[-1308,-2626,36],[-1311,-
|
||
|
/*! Bundled license information:
|
||
|
|
||
|
eventemitter2/lib/eventemitter2.js:
|
||
|
(*!
|
||
|
* EventEmitter2
|
||
|
* https://github.com/hij1nx/EventEmitter2
|
||
|
*
|
||
|
* Copyright (c) 2013 hij1nx
|
||
|
* Licensed under the MIT license.
|
||
|
*)
|
||
|
*/
|