import{C as e,S as t,b as n,l as r,p as i}from"./_Uint8Array.DjkcCK1N.js";import{_ as a,b as o,c as s,t as c,u as l}from"./_getTag.-mRH5aCm.js";import{l as u}from"./_initCloneObject.CsAKJ5eP.js";import{n as d}from"./isArrayLikeObject.B-9Qzj88.js";import{r as f}from"./merge.DiUNFH9e.js";import{i as p,r as m}from"./_baseEach.DRw6djL6.js";import{t as h}from"./_hasUnicode.CcMNop7Z.js";import{n as g}from"./map.B3ceq9u2.js";import{t as _}from"./isString.lYex7bJl.js";import{n as v}from"./min._g1P9xuV.js";function y(e,t){return e>t}function b(e){return e&&e.length?v(e,n,y):void 0}function x(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function S(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=o(e),s=t!==void 0,c=t===null,l=t===t,u=o(t);if(!c&&!u&&!a&&e>t||a&&s&&l&&!c&&!u||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!l)return-1}return 0}function C(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=S(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function w(i,a,o){a=a.length?e(a,function(e){return t(e)?function(t){return l(t,e.length===1?e[0]:e)}:e}):[n];var s=-1;return a=e(a,r(m)),x(g(i,function(t,n,r){return{criteria:e(a,function(e){return e(t)}),index:++s,value:t}}),function(e,t){return C(e,t,o)})}var T=p(`length`),E=`\\ud800-\\udfff`,D=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,O=`\\ufe0e\\ufe0f`,k=`[`+E+`]`,A=`[`+D+`]`,j=`\\ud83c[\\udffb-\\udfff]`,M=`(?:`+A+`|`+j+`)`,N=`[^`+E+`]`,P=`(?:\\ud83c[\\udde6-\\uddff]){2}`,F=`[\\ud800-\\udbff][\\udc00-\\udfff]`,I=`\\u200d`,L=M+`?`,R=`[`+O+`]?`,z=`(?:`+I+`(?:`+[N,P,F].join(`|`)+`)`+R+L+`)*`,B=R+L+z,V=`(?:`+[N+A+`?`,A,P,F,k].join(`|`)+`)`,H=RegExp(j+`(?=`+j+`)|`+V+B,`g`);function U(e){for(var t=H.lastIndex=0;H.test(e);)++t;return t}function W(e){return h(e)?U(e):T(e)}var G=`[object Map]`,K=`[object Set]`;function q(e){if(e==null)return 0;if(i(e))return _(e)?W(e):e.length;var t=c(e);return t==G||t==K?e.size:a(e).length}var J=d(function(e,t){if(e==null)return[];var n=t.length;return n>1&&f(e,t[0],t[1])?t=[]:n>2&&f(t[0],t[1],t[2])&&(t=[t[0]]),w(e,s(t,1),[])});function Y(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function X(e,t){return Y(e||[],t||[],u)}export{b as a,w as i,J as n,q as r,X as t};