import{__exports as r}from"../../../_virtual/es.json.stringify.mjs";import{__require as i}from"../internals/export.mjs";import{__require as t}from"../internals/get-built-in.mjs";import{__require as e}from"../internals/function-apply.mjs";import{__require as n}from"../internals/function-call.mjs";import{__require as s}from"../internals/function-uncurry-this.mjs";import{__require as a}from"../internals/fails.mjs";import{__require as o}from"../internals/is-array.mjs";import{__require as u}from"../internals/is-callable.mjs";import{__require as m}from"../internals/is-raw-json.mjs";import{__require as f}from"../internals/is-symbol.mjs";import{__require as l}from"../internals/classof-raw.mjs";import{__require as _}from"../internals/to-string.mjs";import{__require as c}from"../internals/array-slice.mjs";import{__require as p}from"../internals/parse-json-string.mjs";import{__require as j}from"../internals/uid.mjs";import{__require as g}from"../internals/symbol-constructor-detection.mjs";import{__require as q}from"../internals/native-raw-json.mjs";var v;function d(){if(v)return r;v=1;var d=i(),y=t(),h=e(),b=n(),F=s(),S=a(),D=o(),w=u(),x=m(),N=f(),O=l(),J=_(),A=c(),C=p(),$=j(),B=g(),k=q(),z=String,E=y("JSON","stringify"),G=F(/./.exec),H=F("".charAt),I=F("".charCodeAt),K=F("".replace),L=F("".slice),M=F([].push),P=F(1.1.toString),Q=/[\uD800-\uDFFF]/g,R=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,U=$(),V=U.length,W=!B||S(function(){var r=y("Symbol")("stringify detection");return"[null]"!==E([r])||"{}"!==E({a:r})||"{}"!==E(Object(r))}),X=S(function(){return'"\\udf06\\ud834"'!==E("\udf06\ud834")||'"\\udead"'!==E("\udead")}),Y=W?function(r,i){var t=A(arguments),e=rr(i);if(w(e)||void 0!==r&&!N(r))return t[1]=function(r,i){if(w(e)&&(i=b(e,this,z(r),i)),!N(i))return i},h(E,null,t)}:E,Z=function(r,i,t){var e=H(t,i-1),n=H(t,i+1);return G(R,r)&&!G(T,n)||G(T,r)&&!G(R,e)?"\\u"+P(I(r,0),16):r},rr=function(r){if(w(r))return r;if(D(r)){for(var i=r.length,t=[],e=0;e<i;e++){var n=r[e];"string"==typeof n?M(t,n):"number"!=typeof n&&"Number"!==O(n)&&"String"!==O(n)||M(t,J(n))}var s=t.length,a=!0;return function(r,i){if(a)return a=!1,i;if(D(this))return i;for(var e=0;e<s;e++)if(t[e]===r)return i}}};return E&&d({target:"JSON",stat:!0,arity:3,forced:W||X||!k},{stringify:function(r,i,t){var e=rr(i),n=[],s=Y(r,function(r,i){var t=w(e)?b(e,this,z(r),i):i;return!k&&x(t)?U+(M(n,t.rawJSON)-1):t},t);if("string"!=typeof s)return s;if(X&&(s=K(s,Q,Z)),k)return s;for(var a="",o=s.length,u=0;u<o;u++){var m=H(s,u);if('"'===m){var f=C(s,++u).end-1,l=L(s,u,f);a+=L(l,0,V)===U?n[L(l,V)]:'"'+l+'"',u=f}else a+=m}return a}}),r}export{d as __require};