diff --git a/.buildkite/Dockerfile.agent b/.buildkite/Dockerfile.agent deleted file mode 100644 index 8b5a6b52e..000000000 --- a/.buildkite/Dockerfile.agent +++ /dev/null @@ -1,55 +0,0 @@ -FROM 528451384384.dkr.ecr.us-west-2.amazonaws.com/buildkite-agent-node16:node-16.16 - -# 2. Install WebKit dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libwoff1 \ - libopus0 \ - libwebp6 \ - libwebpdemux2 \ - libenchant1c2a \ - libgudev-1.0-0 \ - libsecret-1-0 \ - libhyphen0 \ - libgdk-pixbuf2.0-0 \ - libegl1 \ - libnotify4 \ - libxslt1.1 \ - libevent-2.1-6 \ - libgles2 \ - libvpx5 \ - libxcomposite1 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libepoxy0 \ - libgtk-3-0 \ - libharfbuzz-icu0 - -# 3. Install gstreamer and plugins to support video playback in WebKit. -RUN apt-get update && apt-get install -y --no-install-recommends \ - libgstreamer-gl1.0-0 \ - libgstreamer-plugins-bad1.0-0 \ - gstreamer1.0-plugins-good \ - gstreamer1.0-libav - -# 4. Install Chromium dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libnss3 \ - libxss1 \ - libasound2 \ - fonts-noto-color-emoji \ - libxtst6 - -# 5. Install Firefox dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libdbus-glib-1-2 \ - libxt6 - -# 6. Install ffmpeg to bring in audio and video codecs necessary for playing videos in Firefox. -RUN apt-get update && apt-get install -y --no-install-recommends \ - ffmpeg - -# 7. (Optional) Install XVFB if there's a need to run browsers in headful mode -RUN apt-get update && apt-get install -y --no-install-recommends \ - xvfb - -ENTRYPOINT [] diff --git a/.buildkite/Makefile b/.buildkite/Makefile deleted file mode 100644 index c759c9e7f..000000000 --- a/.buildkite/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -ECR_REPOSITORY = 528451384384.dkr.ecr.us-west-2.amazonaws.com -IMAGE = ${ECR_REPOSITORY}/analytics-next-ci-agent:latest - -agent: - docker build --pull . -f Dockerfile.agent -t ${IMAGE} - aws-okta exec ops-write -- docker push ${IMAGE} -.PHONY: agent \ No newline at end of file diff --git a/.buildkite/Readme.md b/.buildkite/Readme.md deleted file mode 100644 index c38a7468c..000000000 --- a/.buildkite/Readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Buildkite setup - -## Dockerfile.agent - -Builds the base image that is used by analytics-next in CI. - -```bash -$ robo docker.login-privileged -$ make agent -``` - -## .pipeline - -Full buildkite configuration. diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index e38280816..000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,167 +0,0 @@ -env: - SEGMENT_CONTEXTS: 'snyk,npm,aws-credentials,ecr,npm-publish' - SEGMENT_BUILDKITE_IMAGE: 'analytics-next-ci-agent' -steps: - - label: '[Monorepo] QA' - key: monorepo - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - - echo "+++ Run tests" - - yarn constraints - - yarn run test:scripts - - yarn run test:check-dts - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: '[Browser] Lint + Test' - key: browser-lint-test - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - yarn install --immutable - - yarn run -T browser exec make ci - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - save: true - - - label: '[Browser] QA / E2E :perfection:' - key: qa - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - yarn install --immutable - - echo "+++ Run QA Tests :pray:" - - yarn run -T browser exec make test-qa - retry: - automatic: - - exit_status: '*' - limit: 2 - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: '[Browser] Integration Tests :perfection:' - key: browser-integ - agents: - queue: v1 - commands: - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install --immutable - - PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install - - echo "+++ Run Browser integration tests :pray:" - - PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers yarn turbo run --filter=browser-integration-tests test - retry: - automatic: - - exit_status: '*' - limit: 2 - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: '[Core] Lint + Test' - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - - echo "--- Build bundles" - - yarn run -T core+deps build - - echo "+++ Run tests" - - yarn run -T core lint - - yarn run -T core test - - yarn turbo run --filter=core-integration-tests lint - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: ':thisisfine: [Browser] Destinations QA / E2E' - key: destinations - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - yarn install --immutable - - echo "+++ Run Destinations QA Tests :pray:" - - yarn run -T browser exec make test-qa-destinations - soft_fail: - - exit_status: '*' - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: '[Browser] Release to CDN :rocket:' - branches: '!v* !@segment/* !publish-test' - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - - echo "+++ Release to CDN" - - yarn run -T browser release:cdn - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: '[Examples] Lint + Test :hammer:' - key: examples - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - - echo "--- Build bundles" - - yarn turbo run --filter='./examples/*' build - - echo "+++ Run tests" - - yarn turbo run --filter='./examples/*' lint - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - # Deploy and NPM publish releases - - label: '[Browser] Publish Packages to NPM :rocket:' - if: | - // Only run when Version Packages PR is merged in - build.message =~ /^Version Packages/ && - build.branch == "master" && - build.message !~ /\[skip\]/i - agents: - queue: v1 - commands: - - npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN} - - git config --global user.name "buildkite-agent" - - git config --global user.email "buildkite-agent@segment.com" - - echo "--- Install dependencies" - - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - - echo "+++ Release packages" - - yarn release - plugins: - - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: - key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" - paths: ['.yarn/cache/'] - - - label: 'Snyk :lock:' - agents: - queue: v1 - command: 'bk-snyk' diff --git a/.changeset/README.md b/.changeset/README.md deleted file mode 100644 index e5b6d8d6a..000000000 --- a/.changeset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changesets - -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) - -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index 02dc1dc9d..000000000 --- a/.changeset/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json", - "ignore": ["@example/*"], - "changelog": [ - "@changesets/changelog-github", - { - "repo": "segmentio/analytics-next" - } - ], - "commit": false, - "access": "public", - "baseBranch": "master", - "linked": [] -} diff --git a/.changeset/kind-crabs-report.md b/.changeset/kind-crabs-report.md new file mode 100644 index 000000000..4d1e24530 --- /dev/null +++ b/.changeset/kind-crabs-report.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': minor +--- + +Support loading analytics into a custom global variable when using snippet version 5.2.1 or later diff --git a/.changeset/mean-apricots-hammer.md b/.changeset/mean-apricots-hammer.md new file mode 100644 index 000000000..76b8b9065 --- /dev/null +++ b/.changeset/mean-apricots-hammer.md @@ -0,0 +1,6 @@ +--- +'@segment/analytics-next': minor +'@segment/analytics-core': minor +--- + +Adds `globalAnalyticsKey` option for setting custom global window buffers diff --git a/.eslintrc.isomorphic.js b/.eslintrc.isomorphic.js deleted file mode 100644 index 9892f874c..000000000 --- a/.eslintrc.isomorphic.js +++ /dev/null @@ -1,26 +0,0 @@ -/** @type { import('eslint').Linter.Config } */ -module.exports = { - extends: ['./.eslintrc'], - plugins: ['import'], - overrides: [ - { - // this library should not have any node OR browser runtime dependencies. - // In particular, nextjs and vercel edge functions will break if _any_ node dependencies are introduced. - files: ['src/**'], - excludedFiles: ['**/__tests__/**'], - rules: { - 'no-restricted-globals': [ - 'error', - 'document', - 'window', - 'self', - 'process', - 'global', - 'navigator', - 'location', - ], - 'import/no-nodejs-modules': 'error', - }, - }, - ], -} diff --git a/.eslintrc.js b/.eslintrc.js index 3345f1a90..15df73ad8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,11 @@ module.exports = { parserOptions: { ecmaVersion: 2020, }, + env: { + es6: true, + node: true, + browser: true, + }, extends: [ // Turn on on eslint recommended rules https://github.com/eslint/eslint/blob/main/conf/eslint-recommended.js 'eslint:recommended', @@ -12,6 +17,13 @@ module.exports = { 'prettier', ], overrides: [ + { + files: ['*.{js,mjs}'], + extends: [ + // Handle prettier rules through eslint https://github.com/prettier/eslint-plugin-prettier/blob/master/eslint-plugin-prettier.js#L65 + 'plugin:prettier/recommended', + ], + }, { files: ['*.{ts,tsx}'], parser: '@typescript-eslint/parser', @@ -53,7 +65,7 @@ module.exports = { }, overrides: [ { - files: ['**/__tests__/**', '**/scripts/**'], + files: ['*.test.*'], rules: { 'require-await': 'off', '@typescript-eslint/require-await': 'off', @@ -61,17 +73,5 @@ module.exports = { }, ], }, - { - files: ['*.{js,mjs}'], - env: { - // Config files and possible scripts. Allow anything, we don't really care. - browser: true, - node: true, - }, - extends: [ - // Handle prettier rules through eslint https://github.com/prettier/eslint-plugin-prettier/blob/master/eslint-plugin-prettier.js#L65 - 'plugin:prettier/recommended', - ], - }, ], } diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 91a5fd85a..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,6 +0,0 @@ -@libraries-web-team -@nettofarah -@juliofarah -@danieljackins -@pooyaj -@dk1027 \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 601e5799f..000000000 --- a/.github/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,12 +0,0 @@ - - - -[] I've included a changeset (psst. run `yarn changeset`. Read about changesets [here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)). \ No newline at end of file diff --git a/.github/architecture.png b/.github/architecture.png deleted file mode 100644 index 1b4d77d71..000000000 Binary files a/.github/architecture.png and /dev/null differ diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..8720eb6e7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "yarn" + directory: "/" + schedule: + interval: "monthly" + versioning-strategy: increase \ No newline at end of file diff --git a/.github/test-app/index.html b/.github/test-app/index.html new file mode 100644 index 000000000..44a933506 --- /dev/null +++ b/.github/test-app/index.html @@ -0,0 +1,13 @@ + + +
+ + + +{function sU(){this.__data__=[],this.size=0}fS.exports=sU});var tD=ce((P$,dS)=>{function aU(i,o){return i===o||i!==i&&o!==o}dS.exports=aU});var qy=ce((I$,pS)=>{var fU=tD();function cU(i,o){for(var f=i.length;f--;)if(fU(i[f][0],o))return f;return-1}pS.exports=cU});var vS=ce((B$,hS)=>{var dU=qy(),pU=Array.prototype,hU=pU.splice;function vU(i){var o=this.__data__,f=dU(o,i);if(f<0)return!1;var p=o.length-1;return f==p?o.pop():hU.call(o,f,1),--this.size,!0}hS.exports=vU});var yS=ce((U$,mS)=>{var mU=qy();function yU(i){var o=this.__data__,f=mU(o,i);return f<0?void 0:o[f][1]}mS.exports=yU});var _S=ce((j$,gS)=>{var gU=qy();function _U(i){return gU(this.__data__,i)>-1}gS.exports=_U});var DS=ce((z$,ES)=>{var EU=qy();function DU(i,o){var f=this.__data__,p=EU(f,i);return p<0?(++this.size,f.push([i,o])):f[p][1]=o,this}ES.exports=DU});var Hy=ce((q$,wS)=>{var wU=cS(),SU=vS(),TU=yS(),CU=_S(),xU=DS();function jv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o {var xz=sd(),Az=function(){try{var i=xz(Object,"defineProperty");return i({},"",{}),i}catch(o){}}();UT.exports=Az});var sD=ce((Aee,jT)=>{var zT=lD();function Rz(i,o,f){o=="__proto__"&&zT?zT(i,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[o]=f}jT.exports=Rz});var aD=ce((Ree,qT)=>{var Oz=sD(),kz=tD(),Mz=Object.prototype,Nz=Mz.hasOwnProperty;function Lz(i,o,f){var p=i[o];(!(Nz.call(i,o)&&kz(p,f))||f===void 0&&!(o in i))&&Oz(i,o,f)}qT.exports=Lz});var Gv=ce((Oee,HT)=>{var Fz=aD(),bz=sD();function Pz(i,o,f,p){var E=!f;f||(f={});for(var t=-1,k=o.length;++t {function LH(i,o){for(var f=-1,p=i==null?0:i.length,E=0,t=[];++f {function FH(){return[]}qC.exports=FH});var U_=ce((nte,HC)=>{var bH=zC(),PH=yD(),IH=Object.prototype,BH=IH.propertyIsEnumerable,WC=Object.getOwnPropertySymbols,UH=WC?function(i){return i==null?[]:(i=Object(i),bH(WC(i),function(o){return BH.call(i,o)}))}:PH;HC.exports=UH});var GC=ce((rte,VC)=>{var jH=Gv(),zH=U_();function qH(i,o){return jH(i,zH(i),o)}VC.exports=qH});var j_=ce((ite,YC)=>{function HH(i,o){for(var f=-1,p=o.length,E=i.length;++f {var WH=vD(),VH=WH(Object.getPrototypeOf,Object);KC.exports=VH});var gD=ce((ote,XC)=>{var GH=j_(),YH=z_(),KH=U_(),XH=yD(),QH=Object.getOwnPropertySymbols,JH=QH?function(i){for(var o=[];i;)GH(o,KH(i)),i=YH(i);return o}:XH;XC.exports=JH});var JC=ce((lte,QC)=>{var ZH=Gv(),$H=gD();function eW(i,o){return ZH(i,$H(i),o)}QC.exports=eW});var _D=ce((ste,ZC)=>{var tW=j_(),nW=fd();function rW(i,o,f){var p=o(i);return nW(i)?p:tW(p,f(i))}ZC.exports=rW});var e6=ce((ate,$C)=>{var iW=_D(),uW=U_(),oW=I_();function lW(i){return iW(i,oW,uW)}$C.exports=lW});var ED=ce((fte,t6)=>{var sW=_D(),aW=gD(),fW=B_();function cW(i){return sW(i,fW,aW)}t6.exports=cW});var r6=ce((cte,n6)=>{var dW=sd(),pW=Yf(),hW=dW(pW,"DataView");n6.exports=hW});var u6=ce((dte,i6)=>{var vW=sd(),mW=Yf(),yW=vW(mW,"Promise");i6.exports=yW});var l6=ce((pte,o6)=>{var gW=sd(),_W=Yf(),EW=gW(_W,"Set");o6.exports=EW});var a6=ce((hte,s6)=>{var DW=sd(),wW=Yf(),SW=DW(wW,"WeakMap");s6.exports=SW});var q_=ce((vte,f6)=>{var DD=r6(),wD=L_(),SD=u6(),TD=l6(),CD=a6(),c6=Qp(),Qv=uD(),d6="[object Map]",TW="[object Object]",p6="[object Promise]",h6="[object Set]",v6="[object WeakMap]",m6="[object DataView]",CW=Qv(DD),xW=Qv(wD),AW=Qv(SD),RW=Qv(TD),OW=Qv(CD),Jp=c6;(DD&&Jp(new DD(new ArrayBuffer(1)))!=m6||wD&&Jp(new wD)!=d6||SD&&Jp(SD.resolve())!=p6||TD&&Jp(new TD)!=h6||CD&&Jp(new CD)!=v6)&&(Jp=function(i){var o=c6(i),f=o==TW?i.constructor:void 0,p=f?Qv(f):"";if(p)switch(p){case CW:return m6;case xW:return d6;case AW:return p6;case RW:return h6;case OW:return v6}return o});f6.exports=Jp});var g6=ce((mte,y6)=>{var kW=Object.prototype,MW=kW.hasOwnProperty;function NW(i){var o=i.length,f=new i.constructor(o);return o&&typeof i[0]=="string"&&MW.call(i,"index")&&(f.index=i.index,f.input=i.input),f}y6.exports=NW});var E6=ce((yte,_6)=>{var LW=Yf(),FW=LW.Uint8Array;_6.exports=FW});var H_=ce((gte,D6)=>{var w6=E6();function bW(i){var o=new i.constructor(i.byteLength);return new w6(o).set(new w6(i)),o}D6.exports=bW});var T6=ce((_te,S6)=>{var PW=H_();function IW(i,o){var f=o?PW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}S6.exports=IW});var x6=ce((Ete,C6)=>{var BW=/\w*$/;function UW(i){var o=new i.constructor(i.source,BW.exec(i));return o.lastIndex=i.lastIndex,o}C6.exports=UW});var M6=ce((Dte,A6)=>{var R6=zv(),O6=R6?R6.prototype:void 0,k6=O6?O6.valueOf:void 0;function jW(i){return k6?Object(k6.call(i)):{}}A6.exports=jW});var L6=ce((wte,N6)=>{var zW=H_();function qW(i,o){var f=o?zW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}N6.exports=qW});var b6=ce((Ste,F6)=>{var HW=H_(),WW=T6(),VW=x6(),GW=M6(),YW=L6(),KW="[object Boolean]",XW="[object Date]",QW="[object Map]",JW="[object Number]",ZW="[object RegExp]",$W="[object Set]",eV="[object String]",tV="[object Symbol]",nV="[object ArrayBuffer]",rV="[object DataView]",iV="[object Float32Array]",uV="[object Float64Array]",oV="[object Int8Array]",lV="[object Int16Array]",sV="[object Int32Array]",aV="[object Uint8Array]",fV="[object Uint8ClampedArray]",cV="[object Uint16Array]",dV="[object Uint32Array]";function pV(i,o,f){var p=i.constructor;switch(o){case nV:return HW(i);case KW:case XW:return new p(+i);case rV:return WW(i,f);case iV:case uV:case oV:case lV:case sV:case aV:case fV:case cV:case dV:return YW(i,f);case QW:return new p;case JW:case eV:return new p(i);case ZW:return VW(i);case $W:return new p;case tV:return GW(i)}}F6.exports=pV});var B6=ce((Tte,P6)=>{var hV=qv(),I6=Object.create,vV=function(){function i(){}return function(o){if(!hV(o))return{};if(I6)return I6(o);i.prototype=o;var f=new i;return i.prototype=void 0,f}}();P6.exports=vV});var j6=ce((Cte,U6)=>{var mV=B6(),yV=z_(),gV=P_();function _V(i){return typeof i.constructor=="function"&&!gV(i)?mV(yV(i)):{}}U6.exports=_V});var q6=ce((xte,z6)=>{var EV=q_(),DV=ad(),wV="[object Map]";function SV(i){return DV(i)&&EV(i)==wV}z6.exports=SV});var G6=ce((Ate,H6)=>{var TV=q6(),CV=F_(),W6=b_(),V6=W6&&W6.isMap,xV=V6?CV(V6):TV;H6.exports=xV});var K6=ce((Rte,Y6)=>{var AV=q_(),RV=ad(),OV="[object Set]";function kV(i){return RV(i)&&AV(i)==OV}Y6.exports=kV});var Z6=ce((Ote,X6)=>{var MV=K6(),NV=F_(),Q6=b_(),J6=Q6&&Q6.isSet,LV=J6?NV(J6):MV;X6.exports=LV});var rx=ce((kte,$6)=>{var FV=PT(),bV=BT(),PV=aD(),IV=CC(),BV=NC(),UV=IC(),jV=UC(),zV=GC(),qV=JC(),HV=e6(),WV=ED(),VV=q_(),GV=g6(),YV=b6(),KV=j6(),XV=fd(),QV=cD(),JV=G6(),ZV=qv(),$V=Z6(),eG=I_(),tG=B_(),nG=1,rG=2,iG=4,ex="[object Arguments]",uG="[object Array]",oG="[object Boolean]",lG="[object Date]",sG="[object Error]",tx="[object Function]",aG="[object GeneratorFunction]",fG="[object Map]",cG="[object Number]",nx="[object Object]",dG="[object RegExp]",pG="[object Set]",hG="[object String]",vG="[object Symbol]",mG="[object WeakMap]",yG="[object ArrayBuffer]",gG="[object DataView]",_G="[object Float32Array]",EG="[object Float64Array]",DG="[object Int8Array]",wG="[object Int16Array]",SG="[object Int32Array]",TG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",AG="[object Uint32Array]",Wu={};Wu[ex]=Wu[uG]=Wu[yG]=Wu[gG]=Wu[oG]=Wu[lG]=Wu[_G]=Wu[EG]=Wu[DG]=Wu[wG]=Wu[SG]=Wu[fG]=Wu[cG]=Wu[nx]=Wu[dG]=Wu[pG]=Wu[hG]=Wu[vG]=Wu[TG]=Wu[CG]=Wu[xG]=Wu[AG]=!0;Wu[sG]=Wu[tx]=Wu[mG]=!1;function W_(i,o,f,p,E,t){var k,L=o&nG,N=o&rG,C=o&iG;if(f&&(k=E?f(i,p,E,t):f(i)),k!==void 0)return k;if(!ZV(i))return i;var U=XV(i);if(U){if(k=GV(i),!L)return jV(i,k)}else{var q=VV(i),W=q==tx||q==aG;if(QV(i))return UV(i,L);if(q==nx||q==ex||W&&!E){if(k=N||W?{}:KV(i),!L)return N?qV(i,BV(k,i)):zV(i,IV(k,i))}else{if(!Wu[q])return E?i:{};k=YV(i,q,L)}}t||(t=new FV);var ne=t.get(i);if(ne)return ne;t.set(i,k),$V(i)?i.forEach(function(Se){k.add(W_(Se,o,f,Se,i,t))}):JV(i)&&i.forEach(function(Se,he){k.set(he,W_(Se,o,f,he,i,t))});var m=C?N?WV:HV:N?tG:eG,we=U?void 0:m(i);return bV(we||i,function(Se,he){we&&(he=Se,Se=i[he]),PV(k,he,W_(Se,o,f,he,i,t))}),k}$6.exports=W_});var V_=ce((Mte,ix)=>{var RG=Qp(),OG=ad(),kG="[object Symbol]";function MG(i){return typeof i=="symbol"||OG(i)&&RG(i)==kG}ix.exports=MG});var ox=ce((Nte,ux)=>{var NG=fd(),LG=V_(),FG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bG=/^\w*$/;function PG(i,o){if(NG(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||LG(i)?!0:bG.test(i)||!FG.test(i)||o!=null&&i in Object(o)}ux.exports=PG});var ax=ce((Lte,lx)=>{var sx=oD(),IG="Expected a function";function xD(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(IG);var f=function(){var p=arguments,E=o?o.apply(this,p):p[0],t=f.cache;if(t.has(E))return t.get(E);var k=i.apply(this,p);return f.cache=t.set(E,k)||t,k};return f.cache=new(xD.Cache||sx),f}xD.Cache=sx;lx.exports=xD});var cx=ce((Fte,fx)=>{var BG=ax(),UG=500;function jG(i){var o=BG(i,function(p){return f.size===UG&&f.clear(),p}),f=o.cache;return o}fx.exports=jG});var px=ce((bte,dx)=>{var zG=cx(),qG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HG=/\\(\\)?/g,WG=zG(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(qG,function(f,p,E,t){o.push(E?t.replace(HG,"$1"):p||f)}),o});dx.exports=WG});var _x=ce((Pte,hx)=>{var vx=zv(),VG=eD(),GG=fd(),YG=V_(),KG=1/0,mx=vx?vx.prototype:void 0,yx=mx?mx.toString:void 0;function gx(i){if(typeof i=="string")return i;if(GG(i))return VG(i,gx)+"";if(YG(i))return yx?yx.call(i):"";var o=i+"";return o=="0"&&1/i==-KG?"-0":o}hx.exports=gx});var Dx=ce((Ite,Ex)=>{var XG=_x();function QG(i){return i==null?"":XG(i)}Ex.exports=QG});var G_=ce((Bte,wx)=>{var JG=fd(),ZG=ox(),$G=px(),eY=Dx();function tY(i,o){return JG(i)?i:ZG(i,o)?[i]:$G(eY(i))}wx.exports=tY});var Tx=ce((Ute,Sx)=>{function nY(i){var o=i==null?0:i.length;return o?i[o-1]:void 0}Sx.exports=nY});var AD=ce((jte,Cx)=>{var rY=V_(),iY=1/0;function uY(i){if(typeof i=="string"||rY(i))return i;var o=i+"";return o=="0"&&1/i==-iY?"-0":o}Cx.exports=uY});var Ax=ce((zte,xx)=>{var oY=G_(),lY=AD();function sY(i,o){o=oY(o,i);for(var f=0,p=o.length;i!=null&&f {function aY(i,o,f){var p=-1,E=i.length;o<0&&(o=-o>E?0:E+o),f=f>E?E:f,f<0&&(f+=E),E=o>f?0:f-o>>>0,o>>>=0;for(var t=Array(E);++p1&&arguments[1]!==void 0?arguments[1]:NaN,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jf.DIRECTION_LTR;return k.call(this,L,N,C)}),$K({Config:o.Config,Node:o.Node,Layout:i("Layout",eX),Size:i("Size",C9),Value:i("Value",x9),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},Jf)}});var R9=ce((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){o(f);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return f?p:p.toString()},Module.readBinary=function(o){var f=Module.read(o,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var f=read(o,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(o,f,p){var E=new XMLHttpRequest;E.open("GET",o,!0),E.responseType="arraybuffer",E.onload=function(){E.status==200||E.status==0&&E.response?f(E.response):p()},E.onerror=p,E.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,f){return f&&f.length?Module["dynCall_"+i].apply(null,[o].concat(f)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o
>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?S>>>0>>1>>>0?S>>>0