import{b7 as v,b8 as Oe}from"./index-BgKoOiXL.js";var ae={},Ae=/(\*|\?)/g;function G(e,r){this.text=e=e||"",this.hasWild=e.indexOf("*")>=0,this.separator=r,this.parts=e.split(r).map(this.classifyPart.bind(this))}G.prototype.match=function(e){var r=!0,n=this.parts,t,i=n.length,u;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)r=!1;else{for(u=(e||"").split(this.separator),t=0;r&&t<i;t++)n[t]!=="*"&&(t<u.length?r=n[t]instanceof RegExp?n[t].test(u[t]):n[t]===u[t]:r=!1);r=r&&u}else if(typeof e.splice=="function")for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if(typeof e=="object"){r={};for(var o in e)this.match(o)&&(r[o]=e[o])}return r};G.prototype.classifyPart=function(e){return e==="*"?e:e.indexOf("*")>=0||e.indexOf("?")>=0?new RegExp(e.replace(Ae,".$1")):e};var _e=function(e,r,n){var t=new G(e,n||/[\/\.]/);return typeof r<"u"?t.match(r):t},B={},we=v&&v.__read||function(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,u=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)u.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return u};Object.defineProperty(B,"__esModule",{value:!0});function Re(e,r){var n=we(e),t=n[0],i=n.slice(1),u=t;return i.forEach(function(o){u=Se(u,o,r)}),u}function Se(e,r,n){var t={};return Object.keys(e).concat(Object.keys(r)).forEach(function(i){var u=n(e[i],r[i],i);t[i]=typeof u>"u"?e[i]:u}),t}B.default=Re;var N={},Pe=Object.prototype.toString,fe=function(r){if(r===void 0)return"undefined";if(r===null)return"null";var n=typeof r;if(n==="boolean")return"boolean";if(n==="string")return"string";if(n==="number")return"number";if(n==="symbol")return"symbol";if(n==="function")return Ce(r)?"generatorfunction":"function";if(ze(r))return"array";if(xe(r))return"buffer";if(We(r))return"arguments";if(ke(r))return"date";if(Ee(r))return"error";if(Me(r))return"regexp";switch(se(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(Ue(r))return"generator";switch(n=Pe.call(r),n){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")};function se(e){return typeof e.constructor=="function"?e.constructor.name:null}function ze(e){return Array.isArray?Array.isArray(e):e instanceof Array}function Ee(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ke(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Me(e){return e instanceof RegExp?!0:typeof e.flags=="string"&&typeof e.ignoreCase=="boolean"&&typeof e.multiline=="boolean"&&typeof e.global=="boolean"}function Ce(e,r){return se(e)==="GeneratorFunction"}function Ue(e){return typeof e.throw=="function"&&typeof e.return=="function"&&typeof e.next=="function"}function We(e){try{if(typeof e.length=="number"&&typeof e.callee=="function")return!0}catch(r){if(r.message.indexOf("callee")!==-1)return!0}return!1}function xe(e){return e.constructor&&typeof e.constructor.isBuffer=="function"?e.constructor.isBuffer(e):!1}/*! * shallow-clone <https://github.com/jonschlinkert/shallow-clone> * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. */const re=Symbol.prototype.valueOf,De=fe;function Te(e,r){switch(De(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return Ie(e);case"symbol":return Ke(e);case"arraybuffer":return Be(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return Fe(e);case"regexp":return $e(e);case"error":return Object.create(e);default:return e}}function $e(e){const r=e.flags!==void 0?e.flags:/\w+$/.exec(e)||void 0,n=new e.constructor(e.source,r);return n.lastIndex=e.lastIndex,n}function Be(e){const r=new e.constructor(e.byteLength);return new Uint8Array(r).set(new Uint8Array(e)),r}function Fe(e,r){return new e.constructor(e.buffer,e.byteOffset,e.length)}function Ie(e){const r=e.length,n=Buffer.allocUnsafe?Buffer.allocUnsafe(r):Buffer.from(r);return e.copy(n),n}function Ke(e){return re?Object(re.call(e)):{}}var qe=Te;/*! * isobject <https://github.com/jonschlinkert/isobject> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var Ge=function(r){return r!=null&&typeof r=="object"&&Array.isArray(r)===!1};/*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var Ne=Ge;function te(e){return Ne(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var Le=function(r){var n,t;return!(te(r)===!1||(n=r.constructor,typeof n!="function")||(t=n.prototype,te(t)===!1)||t.hasOwnProperty("isPrototypeOf")===!1)};const Xe=qe,He=fe,Je=Le;function L(e,r){switch(He(e)){case"object":return Qe(e,r);case"array":return Ye(e,r);default:return Xe(e)}}function Qe(e,r){if(typeof r=="function")return r(e);if(r||Je(e)){const n=new e.constructor;for(let t in e)n[t]=L(e[t],r);return n}return e}function Ye(e,r){const n=new e.constructor(e.length);for(let t=0;t<e.length;t++)n[t]=L(e[t],r);return n}var Ze=L,R={},Ve=$;$.flatten=$;$.unflatten=de;function le(e){return e&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function ye(e){return e}function $(e,r){r=r||{};const n=r.delimiter||".",t=r.maxDepth,i=r.transformKey||ye,u={};function o(c,s,d){d=d||1,Object.keys(c).forEach(function(l){const f=c[l],p=r.safe&&Array.isArray(f),O=Object.prototype.toString.call(f),g=le(f),z=O==="[object Object]"||O==="[object Array]",k=s?s+n+i(l):i(l);if(!p&&!g&&z&&Object.keys(f).length&&(!r.maxDepth||d<t))return o(f,k,d+1);u[k]=f})}return o(e),u}function de(e,r){r=r||{};const n=r.delimiter||".",t=r.overwrite||!1,i=r.transformKey||ye,u={};if(le(e)||Object.prototype.toString.call(e)!=="[object Object]")return e;function c(l){const f=Number(l);return isNaN(f)||l.indexOf(".")!==-1||r.object?l:f}function s(l,f,p){return Object.keys(p).reduce(function(O,g){return O[l+n+g]=p[g],O},f)}function d(l){const f=Object.prototype.toString.call(l),p=f==="[object Array]",O=f==="[object Object]";if(l){if(p)return!l.length;if(O)return!Object.keys(l).length}else return!0}return e=Object.keys(e).reduce(function(l,f){const p=Object.prototype.toString.call(e[f]);return!(p==="[object Object]"||p==="[object Array]")||d(e[f])?(l[f]=e[f],l):s(f,l,$(e[f],r))},{}),Object.keys(e).forEach(function(l){const f=l.split(n).map(i);let p=c(f.shift()),O=c(f[0]),g=u;for(;O!==void 0;){if(p==="__proto__")return;const z=Object.prototype.toString.call(g[p]),k=z==="[object Object]"||z==="[object Array]";if(!t&&!k&&typeof g[p]<"u")return;(t&&!k||!t&&g[p]==null)&&(g[p]=typeof O=="number"&&!r.object?[]:{}),g=g[p],f.length>0&&(p=c(f.shift()),O=c(f[0]))}g[p]=de(e[l],r)}),u}var ne=v&&v.__read||function(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,u=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)u.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return u};Object.defineProperty(R,"__esModule",{value:!0});R.isSameCondition=R.isUndefined=R.isPlainObject=R.isFunction=R.isRegex=void 0;var ue=Ve;function K(e){return e instanceof RegExp}R.isRegex=K;function q(e){return e&&{}.toString.call(e)==="[object Function]"}R.isFunction=q;function er(e){return e===null||Array.isArray(e)?!1:typeof e=="object"}R.isPlainObject=er;function rr(e){return typeof e>"u"}R.isUndefined=rr;function tr(e,r){var n,t;if(!e||!r)return e===r;if(typeof e=="string"||typeof r=="string"||K(e)||K(r)||q(e)||q(r))return e.toString()===r.toString();var i=Object.entries((0,ue.flatten)(e)),u=Object.entries((0,ue.flatten)(r));if(i.length!==u.length)return!1;for(var o=0;o<i.length;o++)i[o][0]=i[o][0].replace(/\b\d+\b/g,"[]"),u[o][0]=u[o][0].replace(/\b\d+\b/g,"[]");function c(s,d){var l=ne(s,2),f=l[0],p=l[1],O=ne(d,2),g=O[0],z=O[1];return f<g?-1:f>g?1:p<z?-1:p>z?1:0}if(i.sort(c),u.sort(c),i.length!==u.length)return!1;for(var o=0;o<i.length;o++)if(i[o][0]!==u[o][0]||((n=i[o][1])===null||n===void 0?void 0:n.toString())!==((t=u[o][1])===null||t===void 0?void 0:t.toString()))return!1;return!0}R.isSameCondition=tr;var D=v&&v.__read||function(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,u=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)u.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return u},T=v&&v.__spreadArray||function(e,r,n){if(n||arguments.length===2)for(var t=0,i=r.length,u;t<i;t++)(u||!(t in r))&&(u||(u=Array.prototype.slice.call(r,0,t)),u[t]=r[t]);return e.concat(u||Array.prototype.slice.call(r))},pe=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(N,"__esModule",{value:!0});var nr=pe(Ze),ur=pe(B),U=R,I=Array.isArray;function me(e){var r=e===void 0?{}:e,n=r.customizeArray,t=r.customizeObject,i=r.key;return function u(o,c,s){var d=i?"".concat(i,".").concat(s):s;if((0,U.isFunction)(o)&&(0,U.isFunction)(c))return function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];return u(o.apply(void 0,T([],D(f),!1)),c.apply(void 0,T([],D(f),!1)),s)};if(I(o)&&I(c)){var l=n&&n(o,c,d);return l||T(T([],D(o),!1),D(c),!1)}if((0,U.isRegex)(c))return c;if((0,U.isPlainObject)(o)&&(0,U.isPlainObject)(c)){var l=t&&t(o,c,d);return l||(0,ur.default)([o,c],me({customizeArray:n,customizeObject:t,key:d}))}return(0,U.isPlainObject)(c)?(0,nr.default)(c):I(c)?T([],D(c),!1):c}}N.default=me;var X={},ie=v&&v.__read||function(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,u=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)u.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return u},oe=v&&v.__spreadArray||function(e,r,n){if(n||arguments.length===2)for(var t=0,i=r.length,u;t<i;t++)(u||!(t in r))&&(u||(u=Array.prototype.slice.call(r,0,t)),u[t]=r[t]);return e.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(X,"__esModule",{value:!0});function ir(e,r,n){var t=new Set(r);return function(i,u,o){return o===e&&Array.from(oe(oe([],ie(i),!1),ie(u),!1).map(function(c){return{key:n(c),value:c}}).map(function(c){var s=c.key,d=c.value;return{key:t.has(s)?s:d,value:d}}).reduce(function(c,s){var d=s.key,l=s.value;return c.delete(d),c.set(d,l)},new Map).values())}}X.default=ir;var F={};Object.defineProperty(F,"__esModule",{value:!0});F.CustomizeRule=void 0;var ce;(function(e){e.Match="match",e.Merge="merge",e.Append="append",e.Prepend="prepend",e.Replace="replace"})(ce||(F.CustomizeRule=ce={}));(function(e){var r=v&&v.__read||function(y,m){var a=typeof Symbol=="function"&&y[Symbol.iterator];if(!a)return y;var b=a.call(y),h,_=[],S;try{for(;(m===void 0||m-- >0)&&!(h=b.next()).done;)_.push(h.value)}catch(w){S={error:w}}finally{try{h&&!h.done&&(a=b.return)&&a.call(b)}finally{if(S)throw S.error}}return _},n=v&&v.__spreadArray||function(y,m,a){if(a||arguments.length===2)for(var b=0,h=m.length,_;b<h;b++)(_||!(b in m))&&(_||(_=Array.prototype.slice.call(m,0,b)),_[b]=m[b]);return y.concat(_||Array.prototype.slice.call(m))},t=v&&v.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.unique=e.mergeWithRules=e.mergeWithCustomize=e.default=e.merge=e.CustomizeRule=e.customizeObject=e.customizeArray=void 0;var i=t(_e),u=t(B),o=t(N),c=t(X);e.unique=c.default;var s=F;Object.defineProperty(e,"CustomizeRule",{enumerable:!0,get:function(){return s.CustomizeRule}});var d=R;function l(y){for(var m=[],a=1;a<arguments.length;a++)m[a-1]=arguments[a];return f({}).apply(void 0,n([y],r(m),!1))}e.merge=l,e.default=l;function f(y){return function(a){for(var b=[],h=1;h<arguments.length;h++)b[h-1]=arguments[h];if((0,d.isUndefined)(a)||b.some(d.isUndefined))throw new TypeError("Merging undefined is not supported");if(a.then)throw new TypeError("Promises are not supported");if(!a)return{};if(b.length===0){if(Array.isArray(a)){if(a.length===0)return{};if(a.some(d.isUndefined))throw new TypeError("Merging undefined is not supported");if(a[0].then)throw new TypeError("Promises are not supported");return(0,u.default)(a,(0,o.default)(y))}return a}return(0,u.default)([a].concat(b),(0,o.default)(y))}}e.mergeWithCustomize=f;function p(y){return function(m,a,b){var h=Object.keys(y).find(function(_){return(0,i.default)(_,b)})||"";if(h)switch(y[h]){case s.CustomizeRule.Prepend:return n(n([],r(a),!1),r(m),!1);case s.CustomizeRule.Replace:return a;case s.CustomizeRule.Append:default:return n(n([],r(m),!1),r(a),!1)}}}e.customizeArray=p;function O(y){return f({customizeArray:function(m,a,b){var h=y;if(b.split(".").forEach(function(_){h&&(h=h[_])}),(0,d.isPlainObject)(h))return z({currentRule:h,a:m,b:a});if(typeof h=="string")return k({currentRule:h,a:m,b:a})}})}e.mergeWithRules=O;var g=Array.isArray;function z(y){var m=y.currentRule,a=y.a,b=y.b;if(!g(a))return a;var h=[],_=a.map(function(S){if(!(0,d.isPlainObject)(m))return S;var w={},H=[],J={};Object.entries(m).forEach(function(C){var E=r(C,2),j=E[0],A=E[1];A===s.CustomizeRule.Match?H.push(j):J[j]=A});var P=b.filter(function(C){var E=H.every(function(j){return(0,d.isSameCondition)(S[j],C[j])});return E&&h.push(C),E});return(0,d.isPlainObject)(S)?(Object.entries(S).forEach(function(C){var E=r(C,2),j=E[0],A=E[1],he=m;switch(m[j]){case s.CustomizeRule.Match:w[j]=A,Object.entries(he).forEach(function(M){var x=r(M,2),V=x[0],ve=x[1];if(ve===s.CustomizeRule.Replace&&P.length>0){var ee=W(P)[V];typeof ee<"u"&&(w[V]=ee)}});break;case s.CustomizeRule.Append:if(!P.length){w[j]=A;break}var Q=W(P)[j];if(!g(A)||!g(Q))throw new TypeError("Trying to append non-arrays");w[j]=A.concat(Q);break;case s.CustomizeRule.Merge:if(!P.length){w[j]=A;break}var Y=W(P)[j];if(!(0,d.isPlainObject)(A)||!(0,d.isPlainObject)(Y))throw new TypeError("Trying to merge non-objects");w[j]=l(A,Y);break;case s.CustomizeRule.Prepend:if(!P.length){w[j]=A;break}var Z=W(P)[j];if(!g(A)||!g(Z))throw new TypeError("Trying to prepend non-arrays");w[j]=Z.concat(A);break;case s.CustomizeRule.Replace:w[j]=P.length>0?W(P)[j]:A;break;default:var ge=J[j],je=P.map(function(M){return M[j]}).reduce(function(M,x){return g(M)&&g(x)?n(n([],r(M),!1),r(x),!1):M},[]);w[j]=z({currentRule:ge,a:A,b:je});break}}),w):S});return _.concat(b.filter(function(S){return!h.includes(S)}))}function k(y){var m=y.currentRule,a=y.a,b=y.b;switch(m){case s.CustomizeRule.Append:return a.concat(b);case s.CustomizeRule.Prepend:return b.concat(a);case s.CustomizeRule.Replace:return b}return a}function W(y){return y[y.length-1]}function be(y){return function(m,a,b){switch(y[b]){case s.CustomizeRule.Prepend:return(0,u.default)([a,m],(0,o.default)());case s.CustomizeRule.Replace:return a;case s.CustomizeRule.Append:return(0,u.default)([m,a],(0,o.default)())}}}e.customizeObject=be})(ae);const cr=Oe(ae);export{cr as m};