{"version":3,"file":"index-min.cjs","sources":["../../../lang/dist/esm/index-min.js","../../lib/log-level.js","../../lib/logger.js","../../lib/log-factory.js","../../lib/provider-type.js","../../lib/provider.js","../../lib/log-config.js","../../lib/console/console-logger.js","../../lib/console/console-log-factory.js","../../lib/console/index.js","../../lib/console/console-log-provider.js","../../lib/log4js/log4js-logger.js","../../lib/log4js/log4js-6x-config.js","../../lib/log4js/log4js-factory.js","../../lib/log4js/log4js-provider.js","../../lib/log4js/index.js","../../lib/index.js"],"sourcesContent":["const t={NOT_FOUND:404,NOT_SUPPORTED:505,NOT_IMPL:501};class r extends Error{static get Code(){return t}static isErrorLike(t){return null!=t&&(\"_\"===t._type&&\"number\"==typeof t.code)}static timeout(t,e){return new r(`Timeout ${e}ms: ${t}`,504)}static preconditionFailed(t){return new r(`Not Matched: ${t}`,412)}static notFound(t){return new r(`Not Found: ${t}`,404)}static notImpled(){return new r(\"Not Impled Yet\",501)}static notSupported(t){return new r(\"Not Supported:\"+t,505)}static isNotSupported(t){return 505===t?.code}constructor(t,r){super(t),this._type=\"_\",this.code=r}}class e extends Error{static isAggregatedErrorLike(t){return t&&Array.isArray(t.errors)}static isAggregatedError(t){return t instanceof e}constructor(t,r){super(t),this.errors=r??[]}addError(t){this.errors.push(t)}removeError(t){const r=this.errors.indexOf(t);return-1!==r&&(this.errors.splice(r,1),!0)}}var n={get:function(t,r,e){if(null==t)return e;if(\"string\"!=typeof r)throw new Error('\"path\" must be a string');const n=r.split(\".\");let o=t;for(const t of n){if(void 0===o[t])return e;o=o[t]}return o},constructorName:o,defaults:function(t,...r){if(null==t)throw new TypeError('\"target\" Should Not Nil');for(const e of r)if(null!=e)for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t},extend:i,extends:i,equals:function(t,r){if(t===r)return!0;if(\"function\"==typeof t?.equals)return t.equals(r);if(\"function\"==typeof r?.equals)return r.equals(t);return!1},isBrowser:s,isNode:function(){return!s()},cloneToPlainObject:function(t){if(null==t)return t;if(\"object\"!=typeof t)throw new Error(\"Only Object allowed to clone\");return{...t}},deepCloneToPlainObject:function(t){if(null==t)return t;if(\"object\"!=typeof t)throw new Error(\"Only Object allowed to clone\");return JSON.parse(JSON.stringify(t))}};function o(t){return t?.constructor?.name}function i(t,...r){if(null==t)throw new TypeError('\"target\" must not be null or undefined');for(const e of r)if(null!=e)for(const r in e)t[r]=e[r];return t}function s(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document}var u={isArray:f,isBoolean:a,isBuffer:function(t){return null!=t&&Buffer.isBuffer(t)},isFunction:c,isInstance:l,isIterable:y,isDate:function(t){return null!=t&&t instanceof Date},isError:function(t){return null!=t&&t instanceof Error},isMap:function(t){return null!=t&&\"object\"==typeof t&&t.constructor===Map},isWeakMap:function(t){return null!=t&&\"object\"==typeof t&&t.constructor===WeakMap},isNumber:b,isPositive:h,isNegative:w,isNotNegative:g,isNil:p,isNullOrUndefined:function(t){return null==t},isNull:d,isUndefined:m,isPlainObject:E,isObject:A,isPromise:N,isRegExp:function(t){return null!=t&&\"object\"==typeof t&&t.constructor===RegExp},isSet:function(t){return null!=t&&\"object\"==typeof t&&t.constructor===Set},isWeakSet:function(t){return null!=t&&\"object\"==typeof t&&t.constructor===WeakSet},isStream:function(t){return null!=t&&\"function\"==typeof t.pipe},isString:$,isSymbol:v,isPrimitive:function(t){return null!==t&&(\"string\"==typeof t||\"number\"==typeof t||\"boolean\"==typeof t)},isInt8Array:P,isUint8Array:j,isUint8ClampedArray:S,isInt16Array:x,isUint16Array:I,isInt32Array:U,isUint32Array:T,isFloat32Array:B,isFloat64Array:k,isBigInt64Array:L,isBigUint64Array:F,isTypedArray:O,isArrayBuffer:C};function f(t){return Array.isArray(t)}function a(t){return\"boolean\"==typeof t}function c(t){return\"function\"==typeof t}function l(t){return null!=t&&\"object\"==typeof t&&!E(t)}function y(t){return null!=t&&\"function\"==typeof t[Symbol.iterator]}function p(t){return null==t}function h(t){return!!b(t)&&t>0}function g(t){return!!b(t)&&t>=0}function w(t){return!!b(t)&&t<0}function d(t){return null===t}function m(t){return void 0===t}function b(t){return null!=t&&\"number\"==typeof t}function A(t){return null!=t&&\"object\"==typeof t}function E(t){return null!==t&&\"object\"==typeof t&&(t.constructor===Object||void 0===t.constructor)}function N(t){return null!=t&&\"function\"==typeof t.then}function $(t){return null!=t&&\"string\"==typeof t}function v(t){return null!=t&&\"symbol\"==typeof t}function O(t){return ArrayBuffer.isView(t)&&t.constructor!==DataView}function P(t){return t instanceof Int8Array}function j(t){return t instanceof Uint8Array}function S(t){return t instanceof Uint8ClampedArray}function x(t){return t instanceof Int16Array}function I(t){return t instanceof Uint16Array}function U(t){return t instanceof Int32Array}function T(t){return t instanceof Uint32Array}function B(t){return t instanceof Float32Array}function k(t){return t instanceof Float64Array}function L(t){return t instanceof BigInt64Array}function F(t){return t instanceof BigUint64Array}function C(t){return t instanceof ArrayBuffer}var M={assertNumber:_,assertPositive:R,assertNegative:function(t,r){if(!w(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Negative: ${t}`)},assertNotNegative:J,assertBoolean:function(t,r){if(!a(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Boolean: type=${typeof t} value=${tt(t)}`)},assertObject:W,assertPlainObject:function(t,r){if(!E(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not PlainObject: type=${typeof t} value=${tt(t)}`)},assertSymbol:function(t,r){if(!v(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Symbol: type=${typeof t} value=${tt(t)}`)},assertFunction:H,assertInstance:function(t,r){if(!l(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Class Instance: type=${typeof t} value=${tt(t)}`)},assertPromise:V,assertNil:function(t,r){if(!p(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Neither Null nor Undefined: type=${typeof t} value=${tt(t)}`)},assertNotNil:z,assertNull:function(t,r){if(!d(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Null: type=${typeof t} value=${tt(t)}`)},assertNotNull:function(t,r){if(d(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Should Not Null\")},assertUndefined:function(t,r){if(!m(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Undefined: type=${typeof t} value=${tt(t)}`)},assertString:q,assertArray:D,assertStringOrSymbol:function(t,r){if(!$(t)&&!v(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not String or Symbol: type=${typeof t} value=${tt(t)}`)},assertInt8Array:function(t,r){if(P(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Int8Array\")},assertUint8Array:function(t,r){if(j(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Uint8Array\")},assertUint8ClampedArray:function(t,r){if(S(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Uint8ClampedArray\")},assertInt16Array:function(t,r){if(x(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Int16Array\")},assertUint16Array:function(t,r){if(I(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Uint16Array\")},assertInt32Array:function(t,r){if(U(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Int32Array\")},assertUint32Array:function(t,r){if(T(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Uint32Array\")},assertFloat32Array:function(t,r){if(B(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Float32Array\")},assertFloat64Array:function(t,r){if(k(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Float64Array\")},assertBigInt64Array:function(t,r){if(L(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not BigInt64Array\")},assertBigUint64Array:function(t,r){if(F(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not BigUint64Array\")},assertTypedArray:function(t,r){if(O(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not TypedArray\")},assertArrayBuffer:G,assertIterable:function(t,r){if(!y(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not Iterable\")}};function D(t,r){if(!Array.isArray(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Array: type=${typeof t} value=${tt(t)}`)}function q(t,r){if(!$(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not String: type=${typeof t} value=${tt(t)}`)}function _(t,r){if(!b(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Number: type=${typeof t} value=${tt(t)}`)}function R(t,r){if(!h(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Positive: ${t}`)}function J(t,r){if(!g(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not \"0 or Positive\": ${t}`)}function W(t,r){if(!A(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Object: type=${typeof t} value=${tt(t)}`)}function H(t,r){if(!c(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Function: type=${typeof t} value=${tt(t)}`)}function V(t,r){if(!N(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Not Promise: type=${typeof t} value=${tt(t)}`)}function z(t,r){if(p(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Should Not Nil\")}function G(t,r){if(!C(t))throw new Error((r?'\"'+r+'\" ':\"\")+\"Not ArrayBuffer\")}var K={isEmpty:Y,assertNotEmpty:Q,isBlank:X,assertNotBlank:function(t,r){if(X(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}Is Blank: ${t}`)},capitalize:function(t){if(q(t),0===t.length)return t;const r=t.charAt(0),e=r.toUpperCase();return r===e?t:e+t.slice(1)},decapitalize:function(t){if(q(t),0===t.length)return t;const r=t.charAt(0),e=r.toLowerCase();return r===e?t:e+t.slice(1)},splitWithFixedLength:function(t,r,e=\" \"){if(q(t),_(r),q(e),0===t.length)return[];if(r<=0)throw new Error(\"length muse >=0\");if(t.length<r)return[t.padEnd(r,e)];const n=[];for(let o=0;o<t.length;o+=r){const i=t.substring(o,o+r);n.push(i.padEnd(r,e))}return n},split:function(t,...r){q(t);if(0===t.length)return[];const e=[...r];0===r.length&&r.push(\",\");const n=Z(t,...e);if(0===n.length)return[];const o=[];let i=\"\",s=0;for(const{marker:r,index:e}of n)i=t.substring(s,e),o.push(i),s=e+r.length;return i=t.substring(s),o.push(i),o},findMarkerPositions:function(t,...r){if(q(t),0===r.length)throw new Error(\"At least one marker must be provided\");const e=[];for(const n of new Set(r)){if(Y(n))continue;q(n);let r=t.indexOf(n);for(;-1!==r;)e.push({marker:n,index:r}),r=t.indexOf(n,r+n.length)}return e.sort((t,r)=>t.index-r.index),e},findMarkerPositionsRegex:Z,substringBefore:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.indexOf(r);if(-1===e)return;return t.substring(0,e)},substringBeforeLast:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.lastIndexOf(r);if(-1===e)return;return t.substring(0,e)},substringAfter:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.indexOf(r);if(-1===e)return;return t.substring(e+r.length)},substringAfterLast:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.lastIndexOf(r);if(-1===e)return;return t.substring(e+r.length)},substringBetween:function(t,r,e){Q(t),Q(r),Q(e);const n=t.indexOf(r);if(-1===n)return;const o=t.indexOf(e,n+r.length);if(-1===o)return;return t.substring(n+r.length,o)},substringBetweenGreedy:function(t,r,e){Q(t),Q(r),Q(e);const n=t.indexOf(r);if(-1===n)return;const o=t.lastIndexOf(e);if(-1===o||o<=n)return;return t.substring(n+r.length,o)},substringsBetween:function(t,r,e){Q(t),Q(r),Q(e);const n=[];let o=0;for(;;){const i=t.indexOf(r,o);if(-1===i)break;const s=t.indexOf(e,i+r.length);if(-1===s)break;n.push(t.substring(i+r.length,s)),o=s+e.length}return n},safeToString:tt};function Y(t){return null==t||(q(t),0===t.length)}function Q(t,r){if(Y(t))throw new Error(`${r?'\"'+r+'\" ':\"\"}IsEmpty String: ${t}`)}function X(t){return null==t||(q(t),0===t.trim().length)}function Z(t,...r){if(q(t),0===r.length)throw new Error(\"At least one marker must be provided\");const e=[...new Set(r.filter(t=>null!=t))].map(t=>(q(t),t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"))),n=new RegExp(e.map(t=>`(${t})`).join(\"|\"),\"g\"),o=[];let i=null;for(;null!==(i=n.exec(t));){for(let t=1;t<i.length;t++)if(i[t]){o.push({marker:r[t-1],index:i.index});break}0===i[0].length&&n.lastIndex++}return o}function tt(t){if(null===t)return\"null\";if(void 0===t)return\"undefined\";const r=typeof t;if(\"string\"===r)return t;if(\"symbol\"===r)return`Symbol(${t.description})`;if(\"function\"===r)return`Function ${t.name}(){}`;if(t instanceof String)return t.toString();if(Number.isNaN(t))return\"NaN\";if(t===1/0)return\"Infinity\";if(t===-1/0)return\"-Infinity\";if(t instanceof Error)return`${t.constructor.name}: ${t.message}`;if(t instanceof Promise)return\"Promise\";if(t instanceof Set)return`Set: ${tt(Array.from(t))}`;if(t instanceof Map)return`Map: ${tt(Array.from(t.entries()))}`;if(t instanceof RegExp)return t.toString();if(Array.isArray(t))return`[${t.map(tt).join(\", \")}]`;let e;try{e=JSON.stringify(t)}catch(r){e=t.toString()}return e}var rt={quiet:function(t,r){H(t);try{const e=t();return N(e)?e.catch(t=>{r&&r.isErrorEnabled()&&r.error(\"quiet() with async error:\",t)}):e}catch(t){r&&r.isErrorEnabled()&&r.error(\"quiet() with sync error:\",t)}},quietKeepError:function(t,r){H(t),D(r);try{const e=t();return N(e)?e.catch(t=>r.push(t)):e}catch(t){r.push(t)}}},et={any:function(t){if(D(t),0===t.length)throw new Error(\"Empty Tasks\");const r=nt(),n=[];for(let o=0;o<t.length;o++){const i=t[o];let s;if(u.isPromise(i))s=i;else{if(!u.isFunction(i)){n.push(new Error(`Invalid Task at index ${o}/${t.length-1}: ${i}`));continue}s=it(i)}s.then(t=>{r.resolve(t)}).catch(o=>{n.push(o),n.length>=t.length&&r.reject(new e(\"All Tasks Failed\",n))})}n.length===t.length&&r.reject(new e(\"All Tasks Failed\",n));return r.promise},defer:nt,delay:function(t,r){u.isNumber(t)?(r=t,t=Promise.resolve()):null==t&&null==r&&(r=1,t=Promise.resolve());null!=t&&V(t),_(r=r??1e3);const e=nt(),n=Date.now();return t.then((...t)=>{const o=Date.now()-n;o<r?setTimeout(()=>e.resolve(...t),r-o):e.resolve(...t)}).catch(t=>{const o=Date.now()-n;o<r?setTimeout(()=>e.reject(t),r-o):e.reject(t)}),e.promise},timeout:function(t,r,e){V(t),_(r=r??1);const n=nt(r,e),o=Date.now();return t.then((...t)=>{Date.now()-o<=r?n.resolve(...t):n.reject(new Error(e??`Promise Timeout: ${r}ms`))}).catch(t=>{!n.resolved&&!n.rejected&&n.reject(t)}),n.promise},allSettled:ot,returnValuePromised:it,series:async function(t){D(t);const r=[];for(const e of t)if(H(e),u.isFunction(e))r.push(await it(e));else{if(!u.isPromise(e))throw new Error(`Invalid Task: ${e}`);r.push(await e)}return r},seriesAllSettled:async function(t){D(t);const r=[];for(const e of t){H(e);try{r.push({ok:!0,result:await e()})}catch(t){r.push({ok:!1,result:t})}}return r},parallel:async function(t,r=5){if(D(t),_(r),r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);t.forEach(t=>H(t));const e=[];if(t.length<=r){const r=await Promise.all(t.map(t=>it(t)));return e.push(...r),e}const n=[];for(const o of t)if(H(o),n.push(o),n.length>=r){const t=await Promise.all(n.map(t=>it(t)));e.push(...t),n.length=0}if(n.length>0&&n.length<r){const t=await Promise.all(n.map(t=>it(t)));e.push(...t)}return e},parallelAny:async function(t,r=5,n){if(D(t,\"tasks\"),_(r),0===t.length)throw new Error(\"Empty Tasks\");if(r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);const o=[];let i=0,s=0;const f=nt();function a(){if(i>=t.length)return;if(s>r)return;const c=t[i++];let l;s++,l=u.isPromise(c)?c:u.isFunction(c)?it(c):Promise.reject(new TypeError(`Invalid task: ${typeof c}, Only Promise or Function allowed`)),l.then(t=>{s--,f.resolve(t)}).catch(r=>{o.push(r),o.length>=t.length&&f.pending?f.reject(new e(n??\"All Tasks Failed\",o)):(s--,a())})}const c=Math.min(t.length,r);for(let t=0;t<c;t++)a();return f.promise},parallelAllSettled:async function(t,r=5){if(D(t),_(r),r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);t.forEach(t=>H(t));const e=[];if(t.length<=r){const r=await ot(t.map(t=>it(t)));return e.push(...r),e}const n=[];for(const o of t)if(n.push(o),n.length>=r){const t=await ot(n.map(t=>it(t)));e.push(...t),n.length=0}if(n.length>0&&n.length<r){const t=await ot(n.map(t=>it(t)));e.push(...t)}return e},wait:function(t){J(t);const r={};let e;return r.timerHandler=e=setTimeout(()=>{clearTimeout(e),r._resolve()},t),r.promise=new Promise((t,n)=>{r._resolve=r=>{null!=e&&clearTimeout(e),t(r)}}),r.wakeup=()=>{r._resolve()},r}};function nt(t=-1,r){_(t);const e={};let n;return e.pending=!0,e.canceled=!1,e.rejected=!1,e.resolved=!1,t>=0&&(e.timerCleared=!1,e.timerHandler=n=setTimeout(()=>{clearTimeout(n),e.timerCleared=!0,e.reject(new Error(r??`Promise Timeout: ${t}ms`))},t)),e.promise=new Promise((t,r)=>{e.resolve=r=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.pending=!1,e.canceled=!1,e.rejected=!1,e.resolved=!0,t(r))},e.reject=t=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.pending=!1,e.canceled=!1,e.resolved=!1,e.rejected=!0,r(t))}}),e.cancel=e.promise.cancel=t=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.reject(t??new Error(\"Cancelled\")),e.canceled=e.promise.canceled=!0)},e}async function ot(t){D(t);const r=await Promise.allSettled(t),e=[];for(const t of r)\"fulfilled\"===t.status&&e.push({ok:!0,result:t.value}),\"rejected\"===t.status&&e.push({ok:!1,result:t.reason});return e}function it(t){try{const r=t();return u.isPromise(r)?r:Promise.resolve(r)}catch(t){return Promise.reject(t)}}const{isPlainObject:st}=u;var ut={proxy:ft,newProxyInstance:function(t,r,e,n=!0){const o=ft(t,e,n);return Reflect.construct(o,r??[])}};function ft(t,r,e=!0){if(\"function\"!=typeof t)throw new TypeError(`Not Class: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=r){if(!st(r))throw new TypeError(`Not PropertyHandler: type=${typeof r}, value=${JSON.stringify(r)}`);const{get:t,set:e}=r;if(null!=t&&\"function\"!=typeof t)throw new TypeError(`Not PropertyHandler.get: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=e&&\"function\"!=typeof e)throw new TypeError(`Not PropertyHandler.set: type=${typeof e}, value=${JSON.stringify(e)}`)}const n={construct(t,n,o){const i=Reflect.construct(t,n);return new Proxy(e?Object.preventExtensions(i):i,r??{})}};return new Proxy(t,n)}var at={proxy:function(t,r,e=!0){if(p(t)||!A(t)||f(t))throw new TypeError(`Not Object: type=${typeof t}, value=${JSON.stringify(t)}`);return new Proxy(e?Object.preventExtensions(t):t,r??{})}};function ct(t){W(t,\"obj\");const r=new Set;let e=t;for(;e&&e!==Object.prototype;){const n=Object.getOwnPropertyNames(e);for(const e of n)\"constructor\"!==e&&\"function\"==typeof t[e]&&r.add(e);e=Object.getPrototypeOf(e)}return[...new Set(r)]}var lt={getMethodsOfClass:function(t){H(t,\"cls\");const r=new Set;let e=t.prototype;for(;e&&e!==Object.prototype;){const t=Object.getOwnPropertyNames(e);for(const n of t)\"constructor\"!==n&&\"function\"==typeof e[n]&&r.add(n);e=Object.getPrototypeOf(e)}return[...new Set(r)]},getStaticMethodsOfClass:function(t){H(t,\"cls\");const r=new Set;let e=t;for(;e&&e!==Object.getPrototypeOf(Object);){const t=Object.getOwnPropertyNames(e);for(const n of t)\"function\"==typeof e[n]&&r.add(n);e=Object.getPrototypeOf(e)}return[...r]},getMethods:ct,getMethodsOfObject:ct},yt={startsWith:function(t,r){z(t,\"src\"),z(r,\"searching\");return ht(t.subarray(0,r.length),r)},isSameType:pt,equals:ht};function pt(t,r){return z(t,\"src\"),z(r,\"target\"),o(t)===o(r)}function ht(t,r){if(z(t,\"src\"),z(r,\"target\"),!pt(t,r))return!1;if(t.byteLength!==r.byteLength)return!1;const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=new DataView(r.buffer,r.byteOffset,r.byteLength);for(let r=0;r<t.byteLength;r++)if(e.getUint8(r)!==n.getUint8(r))return!1;return!0}var gt={readString:function(t,r=0,e){if(G(t),J(r),r>=t.byteLength)return;let n=null;null!=e?(R(e),n=r+e>=t.byteLength?new Uint8Array(t,r):new Uint8Array(t,r,e)):n=new Uint8Array(t,r);return wt.decode(n)},writeString:function(t,r,e=0){G(t,\"buffer\"),q(r,\"str\"),J(e,\"offset\");const n=dt.encode(r),o=n.byteLength;if(e+o>t.byteLength)throw new Error(`offset + str.byteLength > buffer.byteLength:${e+o} > ${t.byteLength}`);new Uint8Array(t,e,n.byteLength).set(n)},writeArrayBuffer:function(t,r,e=0,n=0,o){G(t),G(r),_(e),_(n);const i=t.byteLength;if(e<-1*i)e=0;else if(e<0)e+=i;else if(e>=i)throw new Error(`Out of target Bounds: targetOffset(${e}) >= targetLength(${i})`);const s=r.byteLength;if(n<-1*s)n=0;else if(n<0)n+=s;else if(n>=s)throw new Error(`Out of data Bounds: dataOffset(${n}) >= dataArrayBufferLength(${s})`);null!=o&&(R(o,\"dataLength\"),n+o>s&&(o=void 0));const u=new Uint8Array(r,n,o);if(u.byteLength>i-e)throw new Error(`Out of target Bounds: from targetOffset(${e}), No Space to store dataArrayBuffer(${n}, ${o??\"NoLimit\"})`);new Uint8Array(t).set(u,e)}};const wt=new TextDecoder,dt=new TextEncoder;const mt=1e6;var bt={s2ns:1e9,ms2ns:mt,timestamp:function(){if(\"undefined\"!=typeof performance&&\"number\"==typeof performance.timeOrigin){const t=performance.timeOrigin,r=performance.now();return Math.ceil((t+r)/mt)}return Date.now()},timestamp64:At,lapseNano:Et,lapseMillis:Nt,timeoutNano:function(t,r){return Et(t)>r},timeoutMillis:function(t,r){return Nt(t)>r}};function At(){if(\"undefined\"!=typeof performance&&\"number\"==typeof performance.timeOrigin){const t=performance.timeOrigin,r=performance.now();return BigInt((t+r)*mt)}return BigInt(Date.now()*mt)}function Et(t,r){return(r??At())-t}function Nt(t,r){r=r??At();return BigInt(r-t)/BigInt(mt)}var $t={first:function(t,r){return D(t,\"arr\"),t[0]??r},chunk:function(t,r){if(D(t,\"array\"),R(r,\"size\"),t.length<=r)return t;const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,r+n)),n+=r;return e},last:function(t,r){return D(t,\"arr\"),t[t.length-1]??r},equals:function(t,r,e){if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(e){if(0!==e(t[n],r[n]))return!1}else if(t[n]!==r[n])return!1;return!0},equalsIgnoreOrder:function(t,r,e){if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;t.sort(e),r.sort(e);for(let n=0;n<t.length;n++)if(e){if(0!==e(t[n],r[n]))return!1}else if(t[n]!==r[n])return!1;return!0},isSubArray:function(t,r){if(!Array.isArray(t))throw new Error(`\"array\" Not Array: ${t}`);if(!Array.isArray(r))throw new Error(`\"subArray\" Not Array: ${r}`);for(const e of r)if(!t.includes(e))return!1;return!0},notIn:function(t,r){if(!Array.isArray(t))throw new Error(`\"array1\" Not Array: ${t}`);if(!Array.isArray(r))throw new Error(`\"array2\" Not Array: ${r}`);return t.filter(t=>!r.includes(t))}};var vt={take:function(t,r){const e=[];let n;for(let o=0;o<r&&!(n=t.next()).done;o++)e.push(n.value);return e}};var Ot={length:function(t){M.assertIterable(t);const r=t.length??t.size;if(\"number\"==typeof r)return r;let e=0;for(const r of t)e++;return e},take:function(t,r){const e=t[Symbol.iterator](),n=[];let o;for(let t=0;t<r&&!(o=e.next()).done;t++)n.push(o.value);return n}},Pt={_Error:r,AggregatedError:e,LangUtils:n,StringUtils:K,TypeUtils:u,TypeAssert:M,ExecUtils:rt,PromiseUtils:et,Lang:n,Type:u,Exec:rt,ClassProxyUtils:ut,InstanceProxyUtils:at,ReflectUtils:lt,TypedArrayUtils:yt,ArrayBufferUtils:gt,TimeUtils:bt,ArrayUtils:$t,IteratorUtils:vt,IterableUtils:Ot};export{e as AggregatedError,gt as ArrayBufferUtils,$t as ArrayUtils,ut as ClassProxyUtils,rt as Exec,rt as ExecUtils,at as InstanceProxyUtils,Ot as IterableUtils,vt as IteratorUtils,n as Lang,n as LangUtils,et as PromiseUtils,lt as ReflectUtils,K as StringUtils,bt as TimeUtils,u as Type,M as TypeAssert,u as TypeUtils,yt as TypedArrayUtils,r as _Error,Pt as default};\n//# sourceMappingURL=index-min.js.map\n","import { TypeUtils } from '@creejs/commons-lang'\n\nconst { isNumber, isString } = TypeUtils\n/**\n * @namespace LogLevel\n * @description Defines the logging levels and provides utilities for working with them.\n */\n// module vars\nconst TRACE = 'TRACE'\nconst DEBUG = 'DEBUG'\nconst INFO = 'INFO'\nconst WARN = 'WARN'\nconst ERROR = 'ERROR'\nconst FATAL = 'FATAL'\nconst OFF = 'OFF'\nconst ALL = 'ALL'\n\nconst Names = new Set([TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF, ALL])\n/**\n * The logging level numbers, where OFF=-1, FATAL=0, ERROR=1, WARN=2, INFO=3, DEBUG=4, TRACE=5, ALL=6\n * @enum {number}\n * @memberof LogLevel\n * @static\n */\nconst Level = {\n  OFF: -1,\n  FATAL: 0,\n  ERROR: 1,\n  WARN: 2,\n  INFO: 3,\n  DEBUG: 4,\n  TRACE: 5,\n  ALL: 6\n}\n\n/**\n * Standard logging level names\n * @enum {string}\n * @memberof LogLevel\n * @static\n * @constant\n */\nconst Name = {\n  TRACE,\n  DEBUG,\n  INFO,\n  WARN,\n  ERROR,\n  FATAL,\n  OFF\n}\n\n/**\n * Internal map for quick lookup of level names by their numeric values\n * @type {Map<number, string>}\n * @private\n */\nconst Value2Name = new Map()\nfor (const [name, value] of Object.entries(Level)) {\n  Value2Name.set(value, name)\n}\n\n/**\n * The default logging level (ERROR)\n * @type {number}\n * @memberof LogLevel\n * @static\n */\nconst DefaultLevel = Level.ERROR\n\n/**\n * Converts a numeric logging level value to its corresponding name.\n * @param {number} value - The numeric logging level value to convert.\n * @returns {string|undefined} The name associated with the given logging level value, from {@link LogLevel.Name}.\n * @memberof LogLevel\n * @static\n */\nfunction value2Name (value) {\n  if (!isNumber(value)) {\n    return undefined\n  }\n  return Value2Name.get(value)\n}\n\n/**\n * Converts a logging level name to its corresponding numeric value.\n * @param {string} name - The name of the logging level.\n * @returns {number|undefined} The numeric value of the logging level from {@link LogLevel.Level}, or undefined if name is not supported.\n * @memberof LogLevel\n * @static\n */\nfunction name2Value (name) {\n  if (!isString(name)) {\n    return undefined\n  }\n  // @ts-ignore\n  return Level[name.toUpperCase()]\n}\n\n/**\n * Checks if the given level is a valid log level.\n * @param {number} level - The log level to check.\n * @returns {boolean} True if the level is valid, false otherwise.\n * @memberof LogLevel\n * @static\n */\nfunction hasLevel (level) {\n  return Value2Name.has(level)\n}\n\n/**\n * Checks if the given level name exists in the Name enum/object.\n * @param {string} levelName - The name of the log level to check.\n * @returns {boolean} True if the level name exists, false otherwise.\n * @memberof LogLevel\n * @static\n */\nfunction hasName (levelName) {\n  if (!isString(levelName)) {\n    return false\n  }\n  return Names.has(levelName.toUpperCase())\n}\n\n/**\n * Validates that a given level is a number and falls within the valid range.\n * @param {*} level - The log level to validate\n * @throws {Error} If level is not a number or outside valid range (Level.OFF to Level.ALL)\n * @memberof LogLevel\n * @static\n */\nfunction assertLevel (level) {\n  if (!isNumber(level)) {\n    throw new Error(`Level Not Number: type=${typeof level} value=${level}`)\n  }\n  if (level < Level.OFF || level > Level.ALL) {\n    throw new Error(`Not Valid Level: ${level}, Expect between ${Level.OFF} and ${Level.ALL}`)\n  }\n}\n\nconst LogLevel = {\n  Name,\n  Level,\n  DefaultLevel,\n  hasLevel,\n  hasName,\n  assertLevel,\n  /**\n   *  Same with [Name]{@link LogLevel.Name}\n   *  @type {Object}\n   *  @memberof LogLevel\n   *  @static\n   */\n  LevelName: Name,\n  /**\n   *  Same with [Level]{@link LogLevel.Level}\n   *  @type {Object}\n   *  @memberof LogLevel\n   *  @static\n   */\n  LevelValue: Level,\n\n  value2Name,\n\n  name2Value\n}\n\nexport default LogLevel\n\nexport {\n  Name,\n  Level,\n  DefaultLevel,\n  hasLevel,\n  hasName,\n  assertLevel,\n  Name as LevelName,\n  Level as LevelValue,\n  value2Name,\n  name2Value\n}\n","// internal\nimport { TypeAssert } from '@creejs/commons-lang'\n// owned\nimport LogLevel from './log-level.js'\n\nconst { Level, DefaultLevel, assertLevel } = LogLevel\nconst { assertString } = TypeAssert\n/**\n * Abstract Logger Class of All Logger\n * @abstract\n */\nexport default class Logger {\n  /**\n   * Creates a new Logger instance.\n   * @constructor\n   * @param {string} name - The name identifier for the logger\n   * @param {*} [nativeLogger]\n   * @param {number} [level] - The logging level, default is Level.ERROR=1\n   */\n  constructor (name, nativeLogger, level = DefaultLevel) {\n    assertString(name)\n    assertLevel(level)\n    this._name = name\n    this._nativeLogger = nativeLogger\n    this._level = level\n  }\n\n  get nativeLogger () {\n    return this._nativeLogger\n  }\n\n  get level () {\n    return this._level\n  }\n\n  /**\n   * Gets the name of the logger instance.\n   * @returns {string} The name of the logger.\n   */\n  get name () {\n    return this._name\n  }\n\n  /**\n   * Checks if FATAL level logging is enabled for this logger.\n   * @returns {boolean} True if FATAL level logging is enabled, false otherwise.\n   */\n  get fatalEnabled () {\n    return this.level >= Level.FATAL\n  }\n\n  /**\n   * Checks if ERROR level logging is enabled for this logger.\n   * @returns {boolean} True if ERROR level logging is enabled, false otherwise.\n   */\n  get errorEnabled () {\n    return this.level >= Level.ERROR\n  }\n\n  /**\n   * Checks if WARN level logging is enabled for this logger.\n   * @returns {boolean} True if WARN level logging is enabled, false otherwise.\n   */\n  get warnEnabled () {\n    return this.level >= Level.WARN\n  }\n\n  /**\n   * Checks if DEBUG level logging is enabled for this logger.\n   * @returns {boolean} True if DEBUG level logging is enabled, false otherwise.\n   */\n  get debugEnabled () {\n    return this.level >= Level.DEBUG\n  }\n\n  /**\n   * Checks if INFO level logging is enabled for this logger.\n   * @returns {boolean} True if INFO level logging is enabled, false otherwise.\n   */\n  get infoEnabled () {\n    return this.level >= Level.INFO\n  }\n\n  /**\n   * Checks if TRACE level logging is enabled for this logger.\n   * @returns {boolean} True if TRACE level logging is enabled, false otherwise.\n   */\n  get traceEnabled () {\n    return this.level >= Level.TRACE\n  }\n\n  /**\n   * change log level for current logger instance.\n   * @param {number} level - new log level to set\n   * @throws {Error} Currently throws an error as this method is Not Impled Yet.\n   * @abstract\n   */\n  setLevel (level) {\n    LogLevel.assertLevel(level)\n    this._setLevel(level)\n    this._level = level\n  }\n\n  /**\n   * Logs a fatal error message with timestamp and logger name.\n   * Only outputs if fatal logging is enabled for this logger instance.\n   * @param {...any} args - Arguments to log (will be space-separated)\n   */\n  fatal (...args) {\n    if (this.fatalEnabled) {\n      this._fatal(...args)\n    }\n  }\n\n  /**\n   * Logs an error message to the console with timestamp and logger name.\n   * Only logs if error logging is enabled for this logger instance.\n   * @param {...any} args - Arguments to be logged as error message\n   */\n  error (...args) {\n    if (this.errorEnabled) {\n      this._error(...args)\n    }\n  }\n\n  /**\n   * Logs a warning message to the console if warn logging is enabled.\n   * @param {...any} args - The arguments to log as a warning message.\n   */\n  warn (...args) {\n    if (this.warnEnabled) {\n      this._warn(...args)\n    }\n  }\n\n  /**\n   * Logs debug messages to console if debug mode is enabled.\n   * @param {...any} args - The data to be logged\n   */\n  debug (...args) {\n    if (this.debugEnabled) {\n      this._debug(...args)\n    }\n  }\n\n  /**\n   * Logs an info message to the console with timestamp and logger name.\n   * @param {...any} args - The data to be logged. Accepts multiple arguments.\n   */\n  info (...args) {\n    if (this.infoEnabled) {\n      this._info(...args)\n    }\n  }\n\n  /**\n   * Logs a trace message with timestamp and logger name if trace logging is enabled.\n   * @param {...any} args - Data to be logged as trace message.\n   */\n  trace (...args) {\n    if (this.traceEnabled) {\n      this._trace(...args)\n    }\n  }\n\n  /**\n   * Checks if FATAL level logging is enabled for this logger.\n   * @returns {boolean} True if FATAL level logging is enabled, false otherwise.\n   */\n  isFatalEnabled () {\n    return this.fatalEnabled\n  }\n\n  /**\n   * Checks if ERROR level logging is enabled for this logger.\n   * @returns {boolean} True if ERROR level logging is enabled, false otherwise.\n   */\n  isErrorEnabled () {\n    return this.errorEnabled\n  }\n\n  /**\n   * Checks if WARN level logging is enabled for this logger.\n   * @returns {boolean} True if WARN level logging is enabled, false otherwise.\n   */\n  isWarnEnabled () {\n    return this.warnEnabled\n  }\n\n  /**\n   * Checks if DEBUG level logging is enabled for this logger.\n   * @returns {boolean} True if DEBUG level logging is enabled, false otherwise.\n   */\n  isDebugEnabled () {\n    return this.debugEnabled\n  }\n\n  /**\n   * Checks if INFO level logging is enabled for this logger.\n   * @returns {boolean} True if INFO level logging is enabled, false otherwise.\n   */\n  isInfoEnabled () {\n    return this.infoEnabled\n  }\n\n  /**\n   * Checks if TRACE level logging is enabled for this logger.\n   * @returns {boolean} True if TRACE level logging is enabled, false otherwise.\n   */\n  isTraceEnabled () {\n    return this.traceEnabled\n  }\n\n  /**\n   * Sets the logging level\n   * @param {number} level\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error.\n   * @protected\n   * @abstract\n   */\n  _setLevel (level) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement fatal logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _fatal (...args) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement error logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _error (...args) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement warn logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _warn (...args) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement debug logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _debug (...args) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement info logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _info (...args) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Override this method to implement trace logging.\n   * @protected\n   * @param {...*} args - Variable arguments\n   * @throws {Error} Always throws \"Not Impled Yet Yet\" error\n   */\n  _trace (...args) {\n    throw new Error('Not Impled Yet')\n  }\n}\n","// owned\n// eslint-disable-next-line no-unused-vars\nimport Logger from './logger.js'\n\n/**\n * @abstract\n */\nexport default class LogFactory {\n  /**\n   * Checks if a value resembles a LogFactory by verifying it has required methods.\n   * @param {*} value - The value to check\n   * @returns {boolean}\n   */\n  static isLogFactoryLike (value) {\n    if (value == null) {\n      return false\n    }\n    return typeof value === 'object' && typeof value.createLogger === 'function' && typeof value.setLevel === 'function'\n  }\n\n  /**\n   * Asserts that the given value is a valid LogFactory-Like object.\n   * @throws {Error} Throws an error if the value is not LogFactory-Like\n   * @param {*} value - The value to check.\n   */\n  static assertLogFactoryLike (value) {\n    if (!this.isLogFactoryLike(value)) {\n      throw new Error('Not LogFactory')\n    }\n  }\n\n  /**\n   * Creates a new logging provider instance.\n   * @param {{}} libraryModule - the library module\n   * @param {{}} setting - Configuration settings for the provider\n   */\n  constructor (libraryModule, setting) {\n    this._libraryModule = libraryModule\n    this._setting = setting\n  }\n\n  get libraryModule () {\n    return this._libraryModule\n  }\n\n  get setting () {\n    return this._setting\n  }\n\n  /**\n   * Initializes the logging provider.\n   * 1. Do nothing in the default implementation.\n   * 2. Override this method to initialize the provider.\n   * @returns {Promise<void>|void}\n   */\n  init () {\n    // do nothing\n  }\n\n  /**\n   * Update factory's Log Level\n   * 1. Only Provider knows how to update\n   *    * update level in \"setting\", so the new created Logger will use the new level\n   * 2. called when users want to change global log level via CommonsLogging.setLevel()\n   * @param {number} level - The log level to set, see {@link LogLevel.Level}\n   * @returns {void}\n   * @throws {Error} Throws an error as this method is Not Impled Yet.\n   * @abstract\n   */\n  setLevel (level) {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Creates a new logger named with the \"loggerName\"\n   * @param {string} loggerName - The name to associate with the logger instance.\n   * @throws {Error} Throws an error indicating the method is Not Impled Yet yet.\n   * @returns {Logger} A new logger intance\n   * @abstract\n   */\n  createLogger (loggerName) {\n    throw new Error('Not Impled Yet')\n  }\n}\n","/**\n * @type {string}\n * @memberof ProviderType\n */\nexport const Log4js = 'LOG4JS'\n/**\n * @type {string}\n * @memberof ProviderType\n */\nexport const Console = 'CONSOLE'\n\n/**\n * @namespace ProviderType\n * @description Define the static types\n */\nexport default {\n  Log4js,\n  Console\n}\n","// owned\n// eslint-disable-next-line no-unused-vars\nimport LogFactory from './log-factory.js'\n\n/**\n * A interface that All Provider module must export\n * @interface\n */\nexport default class Provider {\n  /**\n   * Checks if a value resembles a logging provider by verifying it has required methods.\n   * @param {*} value - The value to check\n   * @returns {boolean}\n   */\n  static isProviderLike (value) {\n    if (value == null) {\n      return false\n    }\n    return typeof value === 'object' && typeof value.createLogFactory === 'function' && typeof value.getType === 'function'\n  }\n\n  /**\n   * Asserts that the given value is a valid provider-like object.\n   * @throws {Error} Throws an error if the value is not provider-like.\n   * @param {*} value - The value to check.\n   */\n  static assertProviderLike (value) {\n    if (!this.isProviderLike(value)) {\n      throw new Error('Not LogProvider')\n    }\n  }\n\n  /**\n   * The Type Name of current Provider\n   * @return {String} The type of the provider.\n   */\n  getType () {\n    throw new Error('Not Impled Yet')\n  }\n\n  /**\n   * Create a new LogFactory instance\n   * @param {*} [nativeLib] - The native library to use for logging.\n   * @param {*} [setting] - Configuration settings for the logging provider.\n   * @returns {LogFactory} A new instance of LogFactory.\n   */\n  createLogFactory (nativeLib, setting) {\n    throw new Error('Not Impled Yet')\n  }\n}\n","// internal\nimport { TypeAssert } from '@creejs/commons-lang'\n// owned\nimport { DefaultLevel } from './log-level.js'\n// eslint-disable-next-line no-unused-vars\nimport LogFactory from './log-factory.js'\nimport Provider from './provider.js'\n\nconst { assertString } = TypeAssert\n\n/**\n * @module LogConfig\n * @description Provide Impl of Log Configuration\n * @private\n */\n\n/**\n * type name of current provider\n * @type {string}\n * @public\n */\n// @ts-ignore\n// eslint-disable-next-line prefer-const\nlet currentProvider = null\n\n/**\n * Global logging level\n * @type {number}\n * @public\n */\n// @ts-ignore\n// eslint-disable-next-line prefer-const\nlet currentLevel = DefaultLevel\n\n/**\n * The map of registered logging libraries\n * @type {Map<string,Provider>}\n * @private\n */\nconst type2Provider = new Map()\n\n/**\n * Adds a logging provider for the specified type.\n * @param {string} typeName - The type identifier for the provider.\n * @param {Provider} provider - The logging provider implementation.\n * @returns {void}\n * @alias module:LogConfig.addProvider\n */\nfunction addProvider (typeName, provider) {\n  assertString(typeName)\n  Provider.assertProviderLike(provider)\n  type2Provider.set(typeName.toUpperCase(), provider)\n}\n\n/**\n * Gets the logging provider for the specified type name.\n * @param {string} typeName - The type name to look up in the provider map.\n * @returns {Provider|undefined} The logging provider instance if found, otherwise undefined.\n */\nfunction getProvider (typeName) {\n  assertString(typeName)\n  return type2Provider.get(typeName.toUpperCase())\n}\n\n/**\n * Removes a logging provider of the specified type.\n * @param {string} typeName - The type name of the provider to remove.\n * @returns {boolean}\n */\nfunction removeProvider (typeName) {\n  assertString(typeName)\n  return type2Provider.delete(typeName.toUpperCase())\n}\n\nfunction clearProviders () {\n  type2Provider.clear()\n}\n\n/**\n * Returns an array of all registered factory types and intances.\n * 1. Each entry is a [type, factory] pair\n * @returns {Array<{0:string, 1:Provider}>} An array of factory entries.\n */\nfunction listProviders () {\n  return [...type2Provider.entries()]\n}\n\n/**\n * Created LogFactories Index with type name\n * @type {Map<string, LogFactory>}\n * @public\n */\nconst type2Factory = new Map()\n\n/**\n * Registers a log factory for a given type name.\n * @param {string} typeName - The name of the log type to register.\n * @param {LogFactory} logFactory - Factory function that creates a logger for the specified type.\n */\nfunction addFactory (typeName, logFactory) {\n  assertString(typeName)\n  LogFactory.assertLogFactoryLike(logFactory)\n  type2Factory.set(typeName.toUpperCase(), logFactory)\n}\n\n/**\n * Removes a factory of the given type from the type-to-factory mapping.\n * @param {string} typeName - The name of the type whose factory should be removed.\n * @returns {boolean}\n */\nfunction removeFactory (typeName) {\n  assertString(typeName)\n  return type2Factory.delete(typeName.toUpperCase())\n}\n\n/**\n * Gets the factory function associated with the given type name.\n * @param {string} typeName - The name of the type to look up.\n * @returns {LogFactory|undefined} The factory function for the specified type.\n */\nfunction getFactory (typeName) {\n  assertString(typeName)\n  return type2Factory.get(typeName.toUpperCase())\n}\n\n/**\n * Clears all registered factories from the type2Factory instance.\n * This is typically used to reset the factory state during testing or teardown.\n */\nfunction clearFactories () {\n  type2Factory.clear()\n}\n\n/**\n * Returns an array of all registered factory types and intances.\n * 1. Each entry is a [type, factory] pair\n * @returns {Array<{0:string, 1:LogFactory}>} An array of factory entries.\n */\nfunction listFactories () {\n  return [...type2Factory.entries()]\n}\n\nfunction clear () {\n  clearProviders()\n  clearFactories()\n}\n\nexport default {\n  currentProvider,\n  currentLevel,\n  type2Provider,\n  type2Factory,\n  addProvider,\n  getProvider,\n  removeProvider,\n  clearProviders,\n  listProviders,\n  addFactory,\n  getFactory,\n  removeFactory,\n  clearFactories,\n  listFactories,\n  clear\n}\n\nexport {\n  currentProvider,\n  currentLevel,\n  type2Provider,\n  type2Factory,\n  addProvider,\n  getProvider,\n  removeProvider,\n  clearProviders,\n  listProviders,\n  addFactory,\n  getFactory,\n  removeFactory,\n  clearFactories,\n  listFactories,\n  clear\n}\n","// 3rd\n// internal\n// owned\nimport Logger from '../logger.js'\n// module vars\n/**\n * A Simple Implementation of the Logger interface that logs to the console.\n */\nexport default class ConsoleLogger extends Logger {\n  /**\n   * Creates a ConsoleLogger instance.\n   * @constructor\n   * @param {string} name - The logger name.\n   * @param {*} nativeLogger - The native console object to use for logging.\n   * @param {number} level - The initial log level.\n   */\n  constructor (name, nativeLogger, level) {\n    super(name, nativeLogger, level)\n    /**\n     * @type {{error:function, warn:function, debug:function, log:function, info:function, trace:function}}\n     */\n    this.console = nativeLogger\n  }\n\n  /**\n   * For ConsoleLogger, Nothing to do\n   * @param {number} level\n   * @override\n   * @protectd\n   */\n  _setLevel (level) {\n    // do nothing\n  }\n\n  /**\n   * Logs a fatal error message with timestamp and logger name.\n   * Only outputs if fatal logging is enabled for this logger instance.\n   * @param {...any} args\n   */\n  _fatal (...args) {\n    this.console.error(new Date().toISOString(), this.name, '[Fatal]', ...args)\n  }\n\n  /**\n   * Logs an error message to the console with timestamp and logger name.\n   * Only logs if error logging is enabled for this logger instance.\n   * @param {...any} args\n   */\n  _error (...args) {\n    this.console.error(new Date().toISOString(), this.name, '[Error]', ...args)\n  }\n\n  /**\n   * Logs a warning message to the console if warn logging is enabled.\n   * @param {...any} args\n   */\n  _warn (...args) {\n    this.console.warn(new Date().toISOString(), this.name, '[Warn]', ...args)\n  }\n\n  /**\n   * Logs debug messages to console if debug mode is enabled.\n   * @param {...any} args\n   */\n  _debug (...args) {\n    this.console.debug(new Date().toISOString(), this.name, '[Debug]', ...args)\n  }\n\n  /**\n   * Logs an info message to the console with timestamp and logger name.\n   * @param {...any} args\n   */\n  _info (...args) {\n    this.console.log(new Date().toISOString(), this.name, '[Info]', ...args)\n  }\n\n  /**\n   * Logs a trace message with timestamp and logger name if trace logging is enabled.\n   * @param {...any} args\n   */\n  _trace (...args) {\n    this.console.log(new Date().toISOString(), this.name, '[Trace]', ...args)\n  }\n}\n","// owned\n// eslint-disable-next-line no-unused-vars\nimport Logger from '../logger.js'\n// eslint-disable-next-line no-unused-vars\nimport { Level, assertLevel } from '../log-level.js'\nimport LogFactory from '../log-factory.js'\nimport ConsoleLogger from './console-logger.js'\nimport LogConfig from '../log-config.js'\n\n/**\n * Use Console as the native library\n */\nexport default class ConsoleLogFactory extends LogFactory {\n  /**\n   * the underlying \"Console\" Object.\n   * @returns {{}}\n   */\n  get console () {\n    return this._libraryModule // it's the embedded \"console\" object\n  }\n\n  /**\n   * Gets the current logging settings\n   * @returns {{level:number}} The logging settings object containing the current log level.\n   */\n  get setting () {\n    if (this._setting == null) {\n      this._setting = {\n        level: LogConfig.currentLevel\n      }\n    }\n    // @ts-ignore\n    return this._setting\n  }\n\n  /**\n   * Update factory's Log Level\n   * 1. Only Provider knows how to update\n   * @param {number} level - The log level to set, see {@link LogLevel.Level}\n   * @returns {void}\n   * @throws {Error} Throws an error as this method is Not Impled Yet.\n   * @abstract\n   */\n  setLevel (level) {\n    assertLevel(level)\n    if (level !== this.setting.level) {\n      this.setting.level = level\n    }\n    // init again\n    this.init()\n  }\n\n  /**\n   * Initializes the log4js provider by configuring it with the provided settings.\n   * @async\n   * @override\n   * @returns {Promise<void>|void}\n   */\n  init () {\n    // do nothing\n  }\n\n  /**\n   * Creates a new logger instance with the specified name and log level.\n   * @param {string} loggerName - The name of the logger to create.\n   * @returns {Logger} A new logger instance configured with the given name and level.\n   * @override\n   */\n  createLogger (loggerName) {\n    return new ConsoleLogger(loggerName, this.console, this.setting.level)\n  }\n}\n","// internal\n\n// owned\nimport ConsoleProvider from './console-log-provider.js'\n\n// module vars\nconst provider = new ConsoleProvider()\n\nexport default provider\n","// owned\nimport ProviderType from '../provider-type.js'\nimport Provider from '../provider.js'\nimport ConsoleLogFactory from './console-log-factory.js'\n\nexport default class ConsoleProvider extends Provider {\n  /**\n   * Gets the provider type (Console).\n   * @returns {string} \"CONSOLE\"\n   * @override\n   */\n  getType () {\n    return ProviderType.Console\n  }\n\n  /**\n * Creates a new Provider instance.\n * @param {Object} libraryModule - The library module to be used.\n * @param {Object} setting - Configuration settings for the provider.\n * @returns {ConsoleLogFactory} A new instance of ConsoleProvider.\n * @override\n */\n  createLogFactory (libraryModule, setting) {\n    return new ConsoleLogFactory(libraryModule, setting)\n  }\n}\n","// 3rd\n// internal\n// owned\nimport { assertLevel, value2Name, name2Value, Level } from '../log-level.js'\nimport Logger from '../logger.js'\n// module vars\n\nexport default class Log4jsLogger extends Logger {\n  /**\n   * Creates a new ConsoleLogger instance.\n   * @constructor\n   * @param {string} name - The name of the logger.\n   * @param {*} nativeLogger - Log4js library\n   */\n  constructor (name, nativeLogger) {\n    super(name, nativeLogger)\n    // @ts-ignore\n    this._level = undefined // MUST NOT accept level from outside\n    this._logger = nativeLogger\n  }\n\n  /**\n   * 1. log4js may have many categories(loggerName) with diffirent level\n   * 2. return the underlying log4js native logger's level\n   * @returns {number} The current log level.\n   */\n  get level () {\n    if (this._level == null) {\n      const levelName = this._logger.level.levelStr\n      if (levelName == null) {\n        return Level.OFF\n      }\n      const level = name2Value(levelName)\n      if (level == null) {\n        throw new Error(`Unknown level name: ${levelName}`)\n      }\n      return level\n    }\n    return this._level\n  }\n\n  /**\n   * set log4js native logger's level\n   * @param {number} level\n   * @override\n   * @protectd\n   */\n  _setLevel (level) {\n    assertLevel(level)\n    const levelName = value2Name(level)\n    if (levelName == null) {\n      throw new Error(`Invalid log level: ${level}`)\n    }\n    // log4js use string level, eg. 'error, trace'\n    this._logger.level = levelName.toLowerCase()\n  }\n\n  /**\n   * Logs a fatal error message with timestamp and logger name.\n   * Only outputs if fatal logging is enabled for this logger instance.\n   * @param {...any} args - Arguments to log (will be space-separated)\n   */\n  _fatal (...args) {\n    this._logger.fatal(...args)\n  }\n\n  /**\n   * Logs an error message to the console with timestamp and logger name.\n   * Only logs if error logging is enabled for this logger instance.\n   * @param {...any} args - Arguments to be logged as error message\n   */\n  _error (...args) {\n    this._logger.error(...args)\n  }\n\n  /**\n   * Logs a warning message to the console if warn logging is enabled.\n   * @param {...any} args - The arguments to log as a warning message.\n   */\n  _warn (...args) {\n    this._logger.warn(...args)\n  }\n\n  /**\n   * Logs debug messages to console if debug mode is enabled.\n   * @param {...any} args - The data to be logged\n   */\n  _debug (...args) {\n    this._logger.debug(...args)\n  }\n\n  /**\n   * Logs an info message to the console with timestamp and logger name.\n   * @param {...any} args - The data to be logged. Accepts multiple arguments.\n   */\n  _info (...args) {\n    this._logger.info(...args)\n  }\n\n  /**\n   * Logs a trace message with timestamp and logger name if trace logging is enabled.\n   * @param {...any} args - Data to be logged as trace message.\n   */\n  _trace (...args) {\n    this._logger.trace(...args)\n  }\n}\n","const DefaultConfig = { // 6x fromat\n  appenders: {\n    out: { type: 'console' }\n  },\n  categories: {\n    default: { appenders: ['out'], level: 'error' }\n  }\n}\n\nexport default DefaultConfig\n\nexport { DefaultConfig }\n","// internal\nimport { TypeAssert } from '@creejs/commons-lang'\n// owned\n// eslint-disable-next-line no-unused-vars\nimport Logger from '../logger.js'\n// eslint-disable-next-line no-unused-vars\nimport { Level, value2Name } from '../log-level.js'\nimport LogFactory from '../log-factory.js'\n\nimport Log4jsLogger from './log4js-logger.js'\nimport DefaultConfig from './log4js-6x-config.js'\n\nconst { assertString } = TypeAssert\n\n/**\n * Use log4js as the logging provider.\n */\nexport default class Log4jsFactory extends LogFactory {\n  /**\n   * the log4js module instance.\n   * @returns {{}} The log4js module instance.\n   */\n  get log4js () {\n    return this._libraryModule\n  }\n\n  get setting () {\n    if (this._setting == null) {\n      this._setting = cloneDefaultConfig()\n    }\n    return this._setting\n  }\n\n  /**\n   * Initializes the log4js provider by configuring it with the provided settings.\n   * @override\n   */\n  init () {\n    // @ts-ignore\n    this.log4js.configure(this.setting)\n  }\n\n  /**\n   * Update factory's Log Level\n   * 1. Only Provider knows how to update\n   * @param {number} level - The log level to set, see {@link LogLevel.Level}\n   * @returns {void}\n   * @throws {Error} Throws an error as this method is Not Impled Yet.\n   * @abstract\n   */\n  setLevel (level) {\n    let levelName = value2Name(level)\n    if (levelName == null) {\n      throw new Error(`Invalid log level: ${level}`)\n    }\n    levelName = levelName.toLowerCase()\n    let updated = false\n    // @ts-ignore\n    const { categories } = this.setting\n    for (const categoryKey in categories) {\n      const category = categories[categoryKey]\n      const { level: categoryLevel } = category\n      if (categoryLevel !== levelName) {\n        category.level = levelName.toLowerCase()\n        updated = true\n      }\n    }\n    // init log4js again\n    updated && this.init()\n  }\n\n  /**\n   * Creates a new logger instance with the specified name and log level.\n   * @param {string} loggerName - The name of the logger to create.\n   * @returns {Logger} A new logger instance configured with the given name and level.\n   * @override\n   */\n  createLogger (loggerName) {\n    assertString(loggerName)\n    // @ts-ignore\n    const nativeLogger = this.log4js.getLogger(loggerName)\n    const logger = new Log4jsLogger(loggerName, nativeLogger)\n    return logger\n  }\n}\n\nfunction cloneDefaultConfig () {\n  return JSON.parse(JSON.stringify(DefaultConfig))\n}\n","// internal\nimport { TypeAssert } from '@creejs/commons-lang'\n\n// owned\nimport ProviderType from '../provider-type.js'\nimport Provider from '../provider.js'\nimport Log4jsFactory from './log4js-factory.js'\n\nconst { assertNotNil } = TypeAssert\n\nexport default class Log4jsProvider extends Provider {\n  /**\n   * Gets the provider type (Log4js).\n   * @returns {string} \"LOG4JS\"\n   * @override\n   */\n  getType () {\n    return ProviderType.Log4js\n  }\n\n  /**\n   * Creates a new Provider instance.\n   * @param {*} libraryModule - The library module to be used.\n   * @param {*} setting - Configuration settings for the provider.\n   * @returns {Log4jsFactory} A new instance of Log4jsFactory.\n   * @override\n   */\n  createLogFactory (libraryModule, setting) {\n    assertNotNil(libraryModule)\n    const factory = new Log4jsFactory(libraryModule, setting)\n    factory.init()\n    return factory\n  }\n}\n","// internal\n\n// owned\nimport Log4jsProvider from './log4js-provider.js'\n\n// module vars\nconst log4jsProvider = new Log4jsProvider()\nexport default log4jsProvider\n","/**\n * @module CommonsLogging\n * @description Common logging library\n *\n * Follow the sequence to init log system: addProvider() -> use() -> configure() -> getLogger()\n * 1. Add ability to handle the type of library\n *    * eg. after adding Log4jsProvider, we can use Log4js library\n * 2. But we MAY NOT use it now.\n *    * call useProvider(typeName) to select which kind of LogProvider Implementation to use.\n *    * call configure(typeName, nativeLib, setting) to LogProvider Implementation\n */\n// 3rd\n// internal\nimport { TypeAssert, TypeUtils } from '@creejs/commons-lang'\n// owned\nimport LogFactory from './log-factory.js'\nimport Logger from './logger.js'\nimport ProviderType from './provider-type.js'\nimport LogLevel from './log-level.js'\nimport LogConfig from './log-config.js'\n\nimport ConsoleProvider from './console/index.js'\nimport Log4jsProvider from './log4js/index.js'\nimport Provider from './provider.js'\n\nconst { assertNotNil, assertString } = TypeAssert\nconst { isFunction, isNil } = TypeUtils\n\n/**\n * \"default\" export to support \"import CommonsLogging from '@creejs/commons-logging'\"\n */\nexport default {\n  Provider,\n  LogFactory,\n  Logger,\n  LogLevel,\n  ProviderType,\n  getLogger,\n  setLevel,\n  useProvider,\n  /**\n   * alias for {@link CommonsLogging.useProvider}\n   * @see {@link CommonsLogging.useProvider}\n   * @function\n   * @alias module:CommonsLogging.use\n   */\n  use: useProvider,\n  configureProvider,\n  /**\n   * @function\n   * @alias module:CommonsLogging.confiure\n   */\n  configure: configureProvider,\n  configureThenUseProvider,\n  /**\n   * @function\n   * @alias module:CommonsLogging.configureThenUseProvider\n   */\n  configureThenUse: configureThenUseProvider,\n  addProvider,\n  add: addProvider,\n  clearProviders,\n  currentProvider,\n  /**\n   * @function\n   * @alias module:CommonsLogging.current\n   */\n  current: currentProvider,\n  removeProvider,\n  /**\n   * @function\n   * @alias module:CommonsLogging.remove\n   */\n  remove: removeProvider,\n  /**\n   * @alias module:CommonsLogging.ConsoleProvider\n   */\n  ConsoleProvider,\n  /**\n   * @alias module:CommonsLogging.Log4jsProvider\n   */\n  Log4jsProvider\n}\n/**\n * \"named\" export to support\n * 1. import { getLogger, ... } from '@creejs/commons-logging'\n * 2. import * as CommonsLogging from '@creejs/commons-logging'\n */\nexport { Provider }\nexport { LogFactory }\nexport { Logger }\nexport { LogLevel }\nexport { ProviderType }\nexport { getLogger }\nexport { setLevel }\nexport { useProvider }\nexport { useProvider as use }\nexport { configureProvider }\nexport { configureProvider as configure }\nexport { configureThenUseProvider }\nexport { configureThenUseProvider as configureThenUse }\nexport { addProvider }\nexport { addProvider as add }\nexport { clearProviders }\nexport { currentProvider }\nexport { currentProvider as current }\nexport { removeProvider }\nexport { removeProvider as remove }\nexport { ConsoleProvider }\nexport { Log4jsProvider }\n\n// module vars\n\n/**\n * Store Created Loggers, indexed with Names\n * @type {Map<string, Logger>}\n * @private\n */\nconst name2Logger = new Map()\n\n/**\n   * set Global logging level\n   * @param {'TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL'|'OFF'|'trace'|'debug'|'info'|'warn'|'error'|'fatal'|'off'} level - The log level\n   */\nfunction setLevel (level) {\n  assertString(level)\n  const upperLevel = level.toUpperCase()\n  const levelNumber = LogLevel.name2Value(upperLevel)\n  if (levelNumber == null) {\n    throw new Error(`Invalid log level: ${level}`)\n  }\n  if (levelNumber === LogConfig.currentLevel) {\n    return // no change\n  }\n  LogConfig.currentLevel = levelNumber\n\n  // refresh existed factories\n  // @ts-ignore\n  // eslint-disable-next-line no-unused-vars\n  for (const [typeName, factory] of LogConfig.listFactories()) {\n    factory.setLevel(levelNumber)\n  }\n  // refresh existed Loggers\n  for (const logger of name2Logger.values()) {\n    if (logger.level !== levelNumber) {\n      logger.setLevel(levelNumber)\n    }\n  }\n}\n\nfunction currentProvider () {\n  return LogConfig.currentProvider\n}\n\n/**\n * Set the provider using currently\n * @param {string} typeName - The type name of the logging provider to use.\n * @returns {void}\n * @throws {Error} If the provider name is unknown.\n */\nfunction useProvider (typeName) {\n  assertString(typeName)\n  typeName = typeName.toUpperCase()\n  const provider = LogConfig.getProvider(typeName)\n  if (provider == null) {\n    throw new Error(`No Provider Named with: ${typeName}`)\n  }\n  LogConfig.currentProvider = typeName\n}\n\n/**\n * Removes and returns the provider associated with the given type name.\n * If no provider exists for the type name, the function returns undefined.\n *\n * @param {string} typeName - The type name of the provider to remove.\n * @returns {boolean} The removed provider, or undefined if not found.\n */\nfunction removeProvider (typeName) {\n  if (typeName == null) {\n    return false\n  }\n  assertString(typeName)\n  typeName = typeName.toUpperCase()\n  return LogConfig.removeProvider(typeName)\n}\n\n/**\n * Add a type of Provider\n *\n * More:\n * 1. A Provider is a Module\n * 2. The module must include the following functions:\n *   1. getType() - Returns the type name of the provider.\n *   2. createLogFactory() - Creates a new LogFactory instance.\n * @param {Provider} provider - Logging Library Module\n * @returns {void}\n */\nfunction addProvider (provider) {\n  assertNotNil(provider)\n  const { getType, createLogFactory } = provider\n  if (!isFunction(getType) || !isFunction(createLogFactory)) {\n    throw new Error('Invalid Provider Module, missing getType(), createLogFactory() functions')\n  }\n  let typeName = provider.getType()\n  assertString(typeName)\n  typeName = typeName.toUpperCase()\n  LogConfig.addProvider(typeName, provider)\n  // set current provider if not set yet\n  if (isNil(currentProvider())) {\n    useProvider(typeName)\n  }\n}\n\nfunction clearProviders () {\n  name2Logger.clear()\n  LogConfig.clear()\n}\n\n/**\n * configure provider to initialize its LogFactory\n * 1. find the LogProvider Implementation of \"typeName\"\n *    * if type is not supported, throw error\n * 2. use the nativeLib and setting to initialize the LogProvider\n * 3. create a LogFactory via teh LogProvider\n * @param {string} typeName - The type of logging provider to configure.\n * @param {*} [nativeLib] - The native library to use for logging.\n * @param {*} [setting] - Configuration settings for the logging provider.\n * @throws {Error} If the typeName is not recognized.\n */\nfunction configureProvider (typeName, nativeLib, setting) {\n  assertString(typeName)\n  typeName = typeName.toUpperCase()\n  const provider = LogConfig.getProvider(typeName)\n  if (provider == null) {\n    throw new Error(`No Provider: ${typeName}`)\n  }\n  const factory = provider.createLogFactory(nativeLib, setting)\n  LogConfig.addFactory(typeName, factory)\n}\n\n/**\n * Configures and immediately uses a logging provider with the given settings.\n * @param {string} typeName - The type/name identifier for the provider.\n * @param {*} nativeLib - The native library implementation to configure.\n * @param {*} setting - Configuration settings for the provider.\n */\nfunction configureThenUseProvider (typeName, nativeLib, setting) {\n  configureProvider(typeName, nativeLib, setting)\n  useProvider(typeName)\n}\n\n/**\n * Gets a logger instance for the specified logger name using the current provider.\n * @param {string} loggerName - The name of the logger to retrieve.\n * @returns {Logger} The logger instance.\n * @throws {Error} If no default provider is set or if the current provider is not initialized.\n */\nfunction getLogger (loggerName) {\n  // if logger already exists, return it\n  let logger = name2Logger.get(loggerName)\n  if (logger != null) {\n    return logger\n  }\n  // create a new logger via the current provider's LogFactory\n  const currentTypeName = currentProvider()\n  if (currentTypeName == null) {\n    throw new Error('No Default LogProvider, call useProvider(typeName)')\n  }\n  const factory = LogConfig.getFactory(currentTypeName)\n  if (factory == null) {\n    throw new Error('configureProvider(typeName, nativeLib, settting) before getting logger via Provider')\n  }\n  logger = factory.createLogger(loggerName)\n  name2Logger.set(loggerName, logger)\n  return logger\n}\n\nfunction initLogSystem () {\n  addProvider(Log4jsProvider)\n  // ConsoleProvider as default impl\n  addProvider(ConsoleProvider)\n  configureProvider(ProviderType.Console, console)\n  useProvider(ProviderType.Console) // Use ConsoleLogger as default\n}\n\ninitLogSystem()\n"],"names":["u","isFunction","t","isNumber","isNil","p","isString","$","M","assertNotNil","r","Error","assertString","tt","description","name","String","toString","Number","isNaN","constructor","message","Promise","Set","Array","from","Map","entries","RegExp","isArray","map","join","e","JSON","stringify","TextDecoder","TextEncoder","TypeUtils","TRACE","DEBUG","INFO","WARN","ERROR","FATAL","Names","Level","OFF","ALL","Name","Value2Name","value","Object","set","DefaultLevel","value2Name","get","name2Value","toUpperCase","assertLevel","level","LogLevel","hasLevel","has","hasName","levelName","LevelName","LevelValue","TypeAssert","Logger","nativeLogger","this","_name","_nativeLogger","_level","fatalEnabled","errorEnabled","warnEnabled","debugEnabled","infoEnabled","traceEnabled","setLevel","_setLevel","fatal","args","_fatal","error","_error","warn","_warn","debug","_debug","info","_info","trace","_trace","isFatalEnabled","isErrorEnabled","isWarnEnabled","isDebugEnabled","isInfoEnabled","isTraceEnabled","LogFactory","isLogFactoryLike","createLogger","assertLogFactoryLike","libraryModule","setting","_libraryModule","_setting","init","loggerName","ProviderType","Log4js","Console","Provider","isProviderLike","createLogFactory","getType","assertProviderLike","nativeLib","currentLevel","type2Provider","clearProviders","clear","type2Factory","clearFactories","LogConfig","currentProvider","addProvider","typeName","provider","getProvider","removeProvider","delete","listProviders","addFactory","logFactory","getFactory","removeFactory","listFactories","ConsoleLogger","super","console","Date","toISOString","log","ConsoleLogFactory","Log4jsLogger","undefined","_logger","levelStr","toLowerCase","DefaultConfig","appenders","out","type","categories","default","Log4jsFactory","log4js","parse","configure","updated","categoryKey","category","categoryLevel","getLogger","log4jsProvider","factory","index","useProvider","use","configureProvider","configureThenUseProvider","configureThenUse","add","current","remove","ConsoleProvider","Log4jsProvider","name2Logger","upperLevel","levelNumber","logger","values","currentTypeName"],"mappings":"oEAAugE,IAAIA,EAAE,CAAgFC,WAA+qC,SAAWC,GAAG,MAAM,mBAAmBA,CAAC,EAAp6BC,SAA6tC,SAAWD,GAAG,OAAO,MAAMA,GAAG,iBAAiBA,CAAC,EAAxtCE,MAAMC,EAA6ZC,SAASC,GAAgkB,SAASF,EAAEH,GAAG,OAAO,MAAMA,CAAC,CAA8Z,SAASK,EAAEL,GAAG,OAAO,MAAMA,GAAG,iBAAiBA,CAAC,CAAuqB,IAAIM,EAAE,CAAqzBC,aAA0hF,SAAWP,EAAEQ,GAAG,GAAGL,EAAEH,GAAG,MAAM,IAAIS,OAAOD,EAAE,IAAIA,EAAE,KAAK,IAAI,iBAAiB,EAA9wEE,aAAqgD,SAAWV,EAAEQ,GAAG,IAAIH,EAAEL,GAAG,MAAM,IAAIS,MAAM,GAAGD,EAAE,IAAIA,EAAE,KAAK,6BAA6BR,WAAWW,EAAGX,KAAK,GAAmqH,SAASW,EAAGX,GAAG,GAAG,OAAOA,EAAE,MAAM,OAAO,QAAG,IAASA,EAAE,MAAM,YAAY,MAAMQ,SAASR,EAAE,GAAG,WAAWQ,EAAE,OAAOR,EAAE,GAAG,WAAWQ,EAAE,MAAM,UAAUR,EAAEY,eAAe,GAAG,aAAaJ,EAAE,MAAM,YAAYR,EAAEa,WAAW,G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