react-native-onyx 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"web.development.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;+JCVA;AACA,IAAIA,MAAM,GAAG,kBAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA,SAASC,cAAc,CAACC,QAAQ,EAAE;EAC9BF,MAAM,GAAGE,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQ,CAACC,OAAO,EAAE;EACvBJ,MAAM,CAAC,EAACI,OAAO,cAAYA,OAAS,EAAEC,KAAK,EAAE,OAAO,EAAC,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,CAACF,OAAO,EAAE;EACtBJ,MAAM,CAAC,EAACI,OAAO,cAAYA,OAAS,EAAEC,KAAK,EAAE,MAAM,EAAC,CAAC;AACzD;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2IAA+D,ilCAV/D;;AAYA;AACA,IAAME,MAAM,GAAG;EACXC,GAAG,EAAE,KAAK;EACVC,KAAK,EAAE,OAAO;EACdC,gBAAgB,EAAE,iBAAiB;EACnCC,KAAK,EAAE;AACX,CAAC;;AAED;AACA,IAAIC,gBAAgB,GAAG,CAAC;;AAExB;AACA,IAAMC,sBAAsB,GAAG,CAAC,CAAC;;AAEjC;AACA,IAAIC,QAAQ,GAAG,CAAC,CAAC;;AAEjB;AACA,IAAIC,oBAAoB,GAAG,EAAE;;AAE7B;AACA;AACA,IAAIC,iBAAiB,GAAG,EAAE;;AAE1B;AACA;AACA,IAAMC,iBAAiB,GAAG,CAAC,CAAC;;AAE5B;AACA,IAAIC,gBAAgB,GAAG,CAAC,CAAC;;AAEzB;AACA,IAAMC,gB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C1B;MACA,oBAAO,qBAAC,SAAS,oBAAKC,KAAK,IAAE,YAAY,EAAEyB,GAAI,IAAG;IACtD,CAAC,CAAC;EACN,CAAC;AACL;;;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,cAAc,mBAAO,CAAC,kDAAU;AAChC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;AAC/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;AACA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,CAAM;AAC7I;AACA;;AAEA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;AC9kBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,kDAAU;;AAElC;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,EAAE,KAAK,EAIN;;;;;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;;AAIb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,sBAAsB;AACtB,uBAAuB;AACvB,uBAAuB;AACvB,eAAe;AACf,kBAAkB;AAClB,gBAAgB;AAChB,YAAY;AACZ,YAAY;AACZ,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,gBAAgB;AAChB,mBAAmB;AACnB,wBAAwB;AACxB,yBAAyB;AACzB,yBAAyB;AACzB,iBAAiB;AACjB,oBAAoB;AACpB,kBAAkB;AAClB,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,oBAAoB;AACpB,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc;AACd,GAAG;AACH;;;;;;;;;;;;ACpLa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,gIAAyD;AAC3D;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,YAAY,mBAAO,CAAC,oBAAO;;AAE3B;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,oBAAoB;AACpB,2DAA2D,UAAU;AACrE,yBAAyB,UAAU;AACnC;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,6DAA6D;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;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AAC9D,iCAAiC,mBAAO,CAAC,4GAAiC;AAC1E,sBAAsB,mBAAO,CAAC,sFAAsB;AACpD;AACA;AACA;AACA,iCAAiC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACP5F,wBAAwB,mBAAO,CAAC,0FAAwB;AACxD,sBAAsB,mBAAO,CAAC,sFAAsB;AACpD,iCAAiC,mBAAO,CAAC,4GAAiC;AAC1E,wBAAwB,mBAAO,CAAC,0FAAwB;AACxD;AACA;AACA;AACA,qCAAqC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACPhG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF,uBAAuB,mBAAO,CAAC,wFAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yBAAyB,SAAS,yBAAyB;;;;;;UCTzG;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;;;;;;;uXCPD;AACA,mGAAkC;;AAEnBjH,aAAI,CAAC,8B","sources":["webpack://react-native-onyx/web/webpack/universalModuleDefinition","webpack://react-native-onyx/web/./lib/Logger.js","webpack://react-native-onyx/web/./lib/Onyx.js","webpack://react-native-onyx/web/./lib/OnyxCache.js","webpack://react-native-onyx/web/./lib/SyncQueue.js","webpack://react-native-onyx/web/./lib/createDeferredTask.js","webpack://react-native-onyx/web/./lib/fastMerge.js","webpack://react-native-onyx/web/./lib/metrics/PerformanceUtils.js","webpack://react-native-onyx/web/./lib/metrics/index.web.js","webpack://react-native-onyx/web/./lib/storage/WebStorage.js","webpack://react-native-onyx/web/./lib/storage/index.web.js","webpack://react-native-onyx/web/./lib/storage/providers/LocalForage.js","webpack://react-native-onyx/web/./lib/withOnyx.js","webpack://react-native-onyx/web/./node_modules/object-assign/index.js","webpack://react-native-onyx/web/./node_modules/prop-types/checkPropTypes.js","webpack://react-native-onyx/web/./node_modules/prop-types/factoryWithTypeCheckers.js","webpack://react-native-onyx/web/./node_modules/prop-types/index.js","webpack://react-native-onyx/web/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://react-native-onyx/web/./node_modules/react-is/cjs/react-is.development.js","webpack://react-native-onyx/web/./node_modules/react-is/index.js","webpack://react-native-onyx/web/./node_modules/react/cjs/react-jsx-runtime.development.js","webpack://react-native-onyx/web/./node_modules/react/jsx-runtime.js","webpack://react-native-onyx/web/external umd \"expensify-common/lib/str\"","webpack://react-native-onyx/web/external umd \"fast-equals\"","webpack://react-native-onyx/web/external umd \"localforage\"","webpack://react-native-onyx/web/external umd \"lodash/get\"","webpack://react-native-onyx/web/external umd \"lodash/transform\"","webpack://react-native-onyx/web/external umd \"react\"","webpack://react-native-onyx/web/external umd \"underscore\"","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/createClass.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/inherits.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/typeof.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://react-native-onyx/web/webpack/bootstrap","webpack://react-native-onyx/web/webpack/runtime/global","webpack://react-native-onyx/web/./lib/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"underscore\"), require(\"expensify-common/lib/str\"), require(\"fast-equals\"), require(\"lodash/get\"), require(\"localforage\"), require(\"lodash/transform\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"underscore\", \"expensify-common/lib/str\", \"fast-equals\", \"lodash/get\", \"localforage\", \"lodash/transform\", \"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"react-native-onyx/web\"] = factory(require(\"underscore\"), require(\"expensify-common/lib/str\"), require(\"fast-equals\"), require(\"lodash/get\"), require(\"localforage\"), require(\"lodash/transform\"), require(\"react\"));\n\telse\n\t\troot[\"react-native-onyx/web\"] = factory(root[\"underscore\"], root[\"expensify-common/lib/str\"], root[\"fast-equals\"], root[\"lodash/get\"], root[\"localforage\"], root[\"lodash/transform\"], root[\"react\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE_underscore__, __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__, __WEBPACK_EXTERNAL_MODULE_fast_equals__, __WEBPACK_EXTERNAL_MODULE_lodash_get__, __WEBPACK_EXTERNAL_MODULE_localforage__, __WEBPACK_EXTERNAL_MODULE_lodash_transform__, __WEBPACK_EXTERNAL_MODULE_react__) => {\nreturn ","// Logging callback\nlet logger = () => {};\n\n/**\n * Register the logging callback\n *\n * @param {Function} callback\n */\nfunction registerLogger(callback) {\n logger = callback;\n}\n\n/**\n * Send an alert message to the logger\n *\n * @param {String} message\n */\nfunction logAlert(message) {\n logger({message: `[Onyx] ${message}`, level: 'alert'});\n}\n\n/**\n * Send an info message to the logger\n *\n * @param {String} message\n */\nfunction logInfo(message) {\n logger({message: `[Onyx] ${message}`, level: 'info'});\n}\n\nexport {\n registerLogger,\n logInfo,\n logAlert,\n};\n","/* eslint-disable no-continue */\nimport _ from 'underscore';\nimport Str from 'expensify-common/lib/str';\nimport {deepEqual} from 'fast-equals';\nimport lodashGet from 'lodash/get';\nimport Storage from './storage';\nimport * as Logger from './Logger';\nimport cache from './OnyxCache';\nimport createDeferredTask from './createDeferredTask';\nimport fastMerge from './fastMerge';\nimport * as PerformanceUtils from './metrics/PerformanceUtils';\n\n// Method constants\nconst METHOD = {\n SET: 'set',\n MERGE: 'merge',\n MERGE_COLLECTION: 'mergecollection',\n CLEAR: 'clear',\n};\n\n// Keeps track of the last connectionID that was used so we can keep incrementing it\nlet lastConnectionID = 0;\n\n// Holds a mapping of all the react components that want their state subscribed to a store key\nconst callbackToStateMapping = {};\n\n// Stores all of the keys that Onyx can use. Must be defined in init().\nlet onyxKeys = {};\n\n// Holds a list of keys that have been directly subscribed to or recently modified from least to most recent\nlet recentlyAccessedKeys = [];\n\n// Holds a list of keys that are safe to remove when we reach max storage. If a key does not match with\n// whatever appears in this list it will NEVER be a candidate for eviction.\nlet evictionAllowList = [];\n\n// Holds a map of keys and connectionID arrays whose keys will never be automatically evicted as\n// long as we have at least one subscriber that returns false for the canEvict property.\nconst evictionBlocklist = {};\n\n// Optional user-provided key value states set when Onyx initializes or clears\nlet defaultKeyStates = {};\n\n// Connections can be made before `Onyx.init`. They would wait for this task before resolving\nconst deferredInitTask = createDeferredTask();\n\n/**\n * Uses a selector string or function to return a simplified version of sourceData\n * @param {Mixed} sourceData\n * @param {String|Function} selector\n * If it's a string, the selector is passed to lodashGet on the sourceData\n * If it's a function, it is passed the sourceData and it should return the simplified data\n * @returns {Mixed}\n */\nconst getSubsetOfData = (sourceData, selector) => (_.isFunction(selector)\n ? selector(sourceData)\n : lodashGet(sourceData, selector));\n\n/**\n * Takes a collection of items (eg. {testKey_1:{a:'a'}, testKey_2:{b:'b'}})\n * and runs it through a reducer function to return a subset of the data according to a selector.\n * The resulting collection will only contain items that are returned by the selector.\n * @param {Object} collection\n * @param {String|Function} selector (see method docs for getSubsetOfData() for full details)\n * @returns {Object}\n */\nconst reduceCollectionWithSelector = (collection, selector) => _.reduce(collection, (finalCollection, item, key) => {\n // eslint-disable-next-line no-param-reassign\n finalCollection[key] = getSubsetOfData(item, selector);\n\n return finalCollection;\n}, {});\n\n/**\n * Get some data from the store\n *\n * @private\n * @param {string} key\n * @returns {Promise<*>}\n */\nfunction get(key) {\n // When we already have the value in cache - resolve right away\n if (cache.hasCacheForKey(key)) {\n return Promise.resolve(cache.getValue(key));\n }\n\n const taskName = `get:${key}`;\n\n // When a value retrieving task for this key is still running hook to it\n if (cache.hasPendingTask(taskName)) {\n return cache.getTaskPromise(taskName);\n }\n\n // Otherwise retrieve the value from storage and capture a promise to aid concurrent usages\n const promise = Storage.getItem(key)\n .then((val) => {\n cache.set(key, val);\n return val;\n })\n .catch(err => Logger.logInfo(`Unable to get item from persistent storage. Key: ${key} Error: ${err}`));\n\n return cache.captureTask(taskName, promise);\n}\n\n/**\n * Returns current key names stored in persisted storage\n * @private\n * @returns {Promise<string[]>}\n */\nfunction getAllKeys() {\n // When we've already read stored keys, resolve right away\n const storedKeys = cache.getAllKeys();\n if (storedKeys.length > 0) {\n return Promise.resolve(storedKeys);\n }\n\n const taskName = 'getAllKeys';\n\n // When a value retrieving task for all keys is still running hook to it\n if (cache.hasPendingTask(taskName)) {\n return cache.getTaskPromise(taskName);\n }\n\n // Otherwise retrieve the keys from storage and capture a promise to aid concurrent usages\n const promise = Storage.getAllKeys()\n .then((keys) => {\n _.each(keys, key => cache.addKey(key));\n return keys;\n });\n\n return cache.captureTask(taskName, promise);\n}\n\n/**\n * Checks to see if the a subscriber's supplied key\n * is associated with a collection of keys.\n *\n * @private\n * @param {String} key\n * @returns {Boolean}\n */\nfunction isCollectionKey(key) {\n return _.contains(_.values(onyxKeys.COLLECTION), key);\n}\n\n/**\n * @param {String} collectionKey\n * @param {String} key\n * @returns {Boolean}\n */\nfunction isCollectionMemberKey(collectionKey, key) {\n return Str.startsWith(key, collectionKey) && key.length > collectionKey.length;\n}\n\n/**\n * Checks to see if a provided key is the exact configured key of our connected subscriber\n * or if the provided key is a collection member key (in case our configured key is a \"collection key\")\n *\n * @private\n * @param {String} configKey\n * @param {String} key\n * @return {Boolean}\n */\nfunction isKeyMatch(configKey, key) {\n return isCollectionKey(configKey)\n ? Str.startsWith(key, configKey)\n : configKey === key;\n}\n\n/**\n * Checks to see if this key has been flagged as\n * safe for removal.\n *\n * @private\n * @param {String} testKey\n * @returns {Boolean}\n */\nfunction isSafeEvictionKey(testKey) {\n return _.some(evictionAllowList, key => isKeyMatch(key, testKey));\n}\n\n/**\n * Remove a key from the recently accessed key list.\n *\n * @private\n * @param {String} key\n */\nfunction removeLastAccessedKey(key) {\n recentlyAccessedKeys = _.without(recentlyAccessedKeys, key);\n}\n\n/**\n * Add a key to the list of recently accessed keys. The least\n * recently accessed key should be at the head and the most\n * recently accessed key at the tail.\n *\n * @private\n * @param {String} key\n */\nfunction addLastAccessedKey(key) {\n // Only specific keys belong in this list since we cannot remove an entire collection.\n if (isCollectionKey(key) || !isSafeEvictionKey(key)) {\n return;\n }\n\n removeLastAccessedKey(key);\n recentlyAccessedKeys.push(key);\n}\n\n/**\n * Removes a key previously added to this list\n * which will enable it to be deleted again.\n *\n * @private\n * @param {String} key\n * @param {Number} connectionID\n */\nfunction removeFromEvictionBlockList(key, connectionID) {\n evictionBlocklist[key] = _.without(evictionBlocklist[key] || [], connectionID);\n\n // Remove the key if there are no more subscribers\n if (evictionBlocklist[key].length === 0) {\n delete evictionBlocklist[key];\n }\n}\n\n/**\n * Keys added to this list can never be deleted.\n *\n * @private\n * @param {String} key\n * @param {Number} connectionID\n */\nfunction addToEvictionBlockList(key, connectionID) {\n removeFromEvictionBlockList(key, connectionID);\n\n if (!evictionBlocklist[key]) {\n evictionBlocklist[key] = [];\n }\n\n evictionBlocklist[key].push(connectionID);\n}\n\n/**\n * Take all the keys that are safe to evict and add them to\n * the recently accessed list when initializing the app. This\n * enables keys that have not recently been accessed to be\n * removed.\n *\n * @private\n * @returns {Promise}\n */\nfunction addAllSafeEvictionKeysToRecentlyAccessedList() {\n return getAllKeys()\n .then((keys) => {\n _.each(evictionAllowList, (safeEvictionKey) => {\n _.each(keys, (key) => {\n if (!isKeyMatch(safeEvictionKey, key)) {\n return;\n }\n addLastAccessedKey(key);\n });\n });\n });\n}\n\n/**\n * @private\n * @param {String} collectionKey\n * @returns {Object}\n */\nfunction getCachedCollection(collectionKey) {\n const collectionMemberKeys = _.filter(cache.getAllKeys(), (\n storedKey => isCollectionMemberKey(collectionKey, storedKey)\n ));\n\n return _.reduce(collectionMemberKeys, (prev, curr) => {\n const cachedValue = cache.getValue(curr);\n if (!cachedValue) {\n return prev;\n }\n\n // eslint-disable-next-line no-param-reassign\n prev[curr] = cachedValue;\n return prev;\n }, {});\n}\n\n/**\n * When a collection of keys change, search for any callbacks matching the collection key and trigger those callbacks\n *\n * @private\n * @param {String} collectionKey\n * @param {Object} partialCollection - a partial collection of grouped member keys\n */\nfunction keysChanged(collectionKey, partialCollection) {\n // We are iterating over all subscribers similar to keyChanged(). However, we are looking for subscribers who are subscribing to either a collection key or\n // individual collection key member for the collection that is being updated. It is important to note that the collection parameter cane be a PARTIAL collection\n // and does not represent all of the combined keys and values for a collection key. It is just the \"new\" data that was merged in via mergeCollection().\n const stateMappingKeys = _.keys(callbackToStateMapping);\n for (let i = 0; i < stateMappingKeys.length; i++) {\n const subscriber = callbackToStateMapping[stateMappingKeys[i]];\n if (!subscriber) {\n continue;\n }\n\n // Skip iteration if we do not have a collection key or a collection member key on this subscriber\n if (!Str.startsWith(subscriber.key, collectionKey)) {\n continue;\n }\n\n /**\n * e.g. Onyx.connect({key: ONYXKEYS.COLLECTION.REPORT, callback: ...});\n */\n const isSubscribedToCollectionKey = subscriber.key === collectionKey;\n\n /**\n * e.g. Onyx.connect({key: `${ONYXKEYS.COLLECTION.REPORT}{reportID}`, callback: ...});\n */\n const isSubscribedToCollectionMemberKey = isCollectionMemberKey(collectionKey, subscriber.key);\n\n // We prepare the \"cached collection\" which is the entire collection + the new partial data that\n // was merged in via mergeCollection().\n const cachedCollection = getCachedCollection(collectionKey);\n\n // Regular Onyx.connect() subscriber found.\n if (_.isFunction(subscriber.callback)) {\n // If they are subscribed to the collection key and using waitForCollectionCallback then we'll\n // send the whole cached collection.\n if (isSubscribedToCollectionKey) {\n if (subscriber.waitForCollectionCallback) {\n subscriber.callback(cachedCollection);\n continue;\n }\n\n // If they are not using waitForCollectionCallback then we notify the subscriber with\n // the new merged data but only for any keys in the partial collection.\n const dataKeys = _.keys(partialCollection);\n for (let j = 0; j < dataKeys.length; j++) {\n const dataKey = dataKeys[j];\n subscriber.callback(cachedCollection[dataKey], dataKey);\n }\n continue;\n }\n\n // And if the subscriber is specifically only tracking a particular collection member key then we will\n // notify them with the cached data for that key only.\n if (isSubscribedToCollectionMemberKey) {\n subscriber.callback(cachedCollection[subscriber.key], subscriber.key);\n continue;\n }\n\n continue;\n }\n\n // React component subscriber found.\n if (subscriber.withOnyxInstance) {\n // We are subscribed to a collection key so we must update the data in state with the new\n // collection member key values from the partial update.\n if (isSubscribedToCollectionKey) {\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousData = reduceCollectionWithSelector(prevState[subscriber.statePropertyName], subscriber.selector);\n const newData = reduceCollectionWithSelector(cachedCollection, subscriber.selector);\n\n if (!deepEqual(previousData, newData)) {\n return {\n [subscriber.statePropertyName]: newData,\n };\n }\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const finalCollection = _.clone(prevState[subscriber.statePropertyName] || {});\n const dataKeys = _.keys(partialCollection);\n for (let j = 0; j < dataKeys.length; j++) {\n const dataKey = dataKeys[j];\n finalCollection[dataKey] = cachedCollection[dataKey];\n }\n\n PerformanceUtils.logSetStateCall(subscriber, prevState[subscriber.statePropertyName], finalCollection, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: finalCollection,\n };\n });\n continue;\n }\n\n // If a React component is only interested in a single key then we can set the cached value directly to the state name.\n if (isSubscribedToCollectionMemberKey) {\n // However, we only want to update this subscriber if the partial data contains a change.\n // Otherwise, we would update them with a value they already have and trigger an unnecessary re-render.\n const dataFromCollection = partialCollection[subscriber.key];\n if (_.isUndefined(dataFromCollection)) {\n continue;\n }\n\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector and the state should only change when the subset of data changes from what\n // it was previously.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const prevData = prevState[subscriber.statePropertyName];\n const newData = getSubsetOfData(cachedCollection[subscriber.key], subscriber.selector);\n if (!deepEqual(prevData, newData)) {\n PerformanceUtils.logSetStateCall(subscriber, prevData, newData, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: newData,\n };\n }\n\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const data = cachedCollection[subscriber.key];\n const previousData = prevState[subscriber.statePropertyName];\n if (data === previousData) {\n return null;\n }\n\n PerformanceUtils.logSetStateCall(subscriber, previousData, data, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: data,\n };\n });\n }\n }\n }\n}\n\n/**\n * When a key change happens, search for any callbacks matching the key or collection key and trigger those callbacks\n *\n * @example\n * keyChanged(key, value, subscriber => subscriber.initWithStoredValues === false)\n *\n * @private\n * @param {String} key\n * @param {*} data\n * @param {Function} [canUpdateSubscriber] only subscribers that pass this truth test will be updated\n */\nfunction keyChanged(key, data, canUpdateSubscriber) {\n // Add or remove this key from the recentlyAccessedKeys lists\n if (!_.isNull(data)) {\n addLastAccessedKey(key);\n } else {\n removeLastAccessedKey(key);\n }\n\n // We are iterating over all subscribers to see if they are interested in the key that has just changed. If the subscriber's key is a collection key then we will\n // notify them if the key that changed is a collection member. Or if it is a regular key notify them when there is an exact match. Depending on whether the subscriber\n // was connected via withOnyx we will call setState() directly on the withOnyx instance. If it is a regular connection we will pass the data to the provided callback.\n const stateMappingKeys = _.keys(callbackToStateMapping);\n for (let i = 0; i < stateMappingKeys.length; i++) {\n const subscriber = callbackToStateMapping[stateMappingKeys[i]];\n if (!subscriber || !isKeyMatch(subscriber.key, key) || (_.isFunction(canUpdateSubscriber) && !canUpdateSubscriber(subscriber))) {\n continue;\n }\n\n // Subscriber is a regular call to connect() and provided a callback\n if (_.isFunction(subscriber.callback)) {\n if (isCollectionKey(subscriber.key) && subscriber.waitForCollectionCallback) {\n const cachedCollection = getCachedCollection(subscriber.key);\n cachedCollection[key] = data;\n subscriber.callback(cachedCollection);\n continue;\n }\n\n subscriber.callback(data, key);\n continue;\n }\n\n // Subscriber connected via withOnyx() HOC\n if (subscriber.withOnyxInstance) {\n // Check if we are subscribing to a collection key and overwrite the collection member key value in state\n if (isCollectionKey(subscriber.key)) {\n // If the subscriber has a selector, then the consumer of this data must only be given the data\n // returned by the selector and only when the selected data has changed.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const prevData = prevState[subscriber.statePropertyName];\n const newData = {\n [key]: getSubsetOfData(data, subscriber.selector),\n };\n const prevDataWithNewData = {\n ...prevData,\n [key]: getSubsetOfData(data, subscriber.selector),\n };\n if (!deepEqual(prevData, prevDataWithNewData)) {\n PerformanceUtils.logSetStateCall(subscriber, prevData, newData, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: prevDataWithNewData,\n };\n }\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const collection = prevState[subscriber.statePropertyName] || {};\n const newCollection = {\n ...collection,\n [key]: data,\n };\n PerformanceUtils.logSetStateCall(subscriber, collection, newCollection, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: newCollection,\n };\n });\n continue;\n }\n\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector and only if the selected data has changed.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousValue = getSubsetOfData(prevState[subscriber.statePropertyName], subscriber.selector);\n const newValue = getSubsetOfData(data, subscriber.selector);\n if (!deepEqual(previousValue, newValue)) {\n return {\n [subscriber.statePropertyName]: newValue,\n };\n }\n return null;\n });\n continue;\n }\n\n // If we did not match on a collection key then we just set the new data to the state property\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousData = prevState[subscriber.statePropertyName];\n if (previousData === data) {\n return null;\n }\n\n PerformanceUtils.logSetStateCall(subscriber, previousData, data, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: data,\n };\n });\n continue;\n }\n\n console.error('Warning: Found a matching subscriber to a key that changed, but no callback or withOnyxInstance could be found.');\n }\n}\n\n/**\n * Sends the data obtained from the keys to the connection. It either:\n * - sets state on the withOnyxInstances\n * - triggers the callback function\n *\n * @private\n * @param {Object} mapping\n * @param {Object} [mapping.withOnyxInstance]\n * @param {String} [mapping.statePropertyName]\n * @param {Function} [mapping.callback]\n * @param {String} [mapping.selector]\n * @param {*|null} val\n * @param {String} matchedKey\n */\nfunction sendDataToConnection(mapping, val, matchedKey) {\n // If the mapping no longer exists then we should not send any data.\n // This means our subscriber disconnected or withOnyx wrapped component unmounted.\n if (!callbackToStateMapping[mapping.connectionID]) {\n return;\n }\n\n if (mapping.withOnyxInstance) {\n let newData = val;\n\n // If the mapping has a selector, then the component's state must only be updated with the data\n // returned by the selector.\n if (mapping.selector) {\n if (isCollectionKey(mapping.key)) {\n newData = reduceCollectionWithSelector(val, mapping.selector);\n } else {\n newData = getSubsetOfData(val, mapping.selector);\n }\n }\n\n PerformanceUtils.logSetStateCall(mapping, null, newData, 'sendDataToConnection');\n mapping.withOnyxInstance.setWithOnyxState(mapping.statePropertyName, newData);\n return;\n }\n\n if (_.isFunction(mapping.callback)) {\n mapping.callback(val, matchedKey);\n }\n}\n\n/**\n * We check to see if this key is flagged as safe for eviction and add it to the recentlyAccessedKeys list so that when we\n * run out of storage the least recently accessed key can be removed.\n *\n * @private\n * @param {Object} mapping\n */\nfunction addKeyToRecentlyAccessedIfNeeded(mapping) {\n if (!isSafeEvictionKey(mapping.key)) {\n return;\n }\n\n // Try to free some cache whenever we connect to a safe eviction key\n cache.removeLeastRecentlyUsedKeys();\n\n if (mapping.withOnyxInstance && !isCollectionKey(mapping.key)) {\n // All React components subscribing to a key flagged as a safe eviction key must implement the canEvict property.\n if (_.isUndefined(mapping.canEvict)) {\n throw new Error(\n `Cannot subscribe to safe eviction key '${mapping.key}' without providing a canEvict value.`,\n );\n }\n\n addLastAccessedKey(mapping.key);\n }\n}\n\n/**\n * Gets the data for a given an array of matching keys, combines them into an object, and sends the result back to the subscriber.\n *\n * @private\n * @param {Array} matchingKeys\n * @param {Object} mapping\n */\nfunction getCollectionDataAndSendAsObject(matchingKeys, mapping) {\n Promise.all(_.map(matchingKeys, key => get(key)))\n .then(values => _.reduce(values, (finalObject, value, i) => {\n // eslint-disable-next-line no-param-reassign\n finalObject[matchingKeys[i]] = value;\n return finalObject;\n }, {}))\n .then(val => sendDataToConnection(mapping, val));\n}\n\n/**\n * Subscribes a react component's state directly to a store key\n *\n * @example\n * const connectionID = Onyx.connect({\n * key: ONYXKEYS.SESSION,\n * callback: onSessionChange,\n * });\n *\n * @param {Object} mapping the mapping information to connect Onyx to the components state\n * @param {String} mapping.key ONYXKEY to subscribe to\n * @param {String} [mapping.statePropertyName] the name of the property in the state to connect the data to\n * @param {Object} [mapping.withOnyxInstance] whose setState() method will be called with any changed data\n * This is used by React components to connect to Onyx\n * @param {Function} [mapping.callback] a method that will be called with changed data\n * This is used by any non-React code to connect to Onyx\n * @param {Boolean} [mapping.initWithStoredValues] If set to false, then no data will be prefilled into the\n * component\n * @param {Boolean} [mapping.waitForCollectionCallback] If set to true, it will return the entire collection to the callback as a single object\n * @param {String|Function} [mapping.selector] THIS PARAM IS ONLY USED WITH withOnyx(). If included, this will be used to subscribe to a subset of an Onyx key's data.\n * If the selector is a string, the selector is passed to lodashGet on the sourceData. If the selector is a function, the sourceData is passed to the selector and should return the\n * simplified data. Using this setting on `withOnyx` can have very positive performance benefits because the component will only re-render when the subset of data changes.\n * Otherwise, any change of data on any property would normally cause the component to re-render (and that can be expensive from a performance standpoint).\n * @returns {Number} an ID to use when calling disconnect\n */\nfunction connect(mapping) {\n const connectionID = lastConnectionID++;\n callbackToStateMapping[connectionID] = mapping;\n callbackToStateMapping[connectionID].connectionID = connectionID;\n\n if (mapping.initWithStoredValues === false) {\n return connectionID;\n }\n\n // Commit connection only after init passes\n deferredInitTask.promise\n .then(() => addKeyToRecentlyAccessedIfNeeded(mapping))\n .then(getAllKeys)\n .then((keys) => {\n // We search all the keys in storage to see if any are a \"match\" for the subscriber we are connecting so that we\n // can send data back to the subscriber. Note that multiple keys can match as a subscriber could either be\n // subscribed to a \"collection key\" or a single key.\n const matchingKeys = _.filter(keys, key => isKeyMatch(mapping.key, key));\n\n // If the key being connected to does not exist we initialize the value with null. For subscribers that connected\n // directly via connect() they will simply get a null value sent to them without any information about which key matched\n // since there are none matched. In withOnyx() we wait for all connected keys to return a value before rendering the child\n // component. This null value will be filtered out so that the connected component can utilize defaultProps.\n if (matchingKeys.length === 0) {\n sendDataToConnection(mapping, null);\n return;\n }\n\n // When using a callback subscriber we will either trigger the provided callback for each key we find or combine all values\n // into an object and just make a single call. The latter behavior is enabled by providing a waitForCollectionCallback key\n // combined with a subscription to a collection key.\n if (_.isFunction(mapping.callback)) {\n if (isCollectionKey(mapping.key)) {\n if (mapping.waitForCollectionCallback) {\n getCollectionDataAndSendAsObject(matchingKeys, mapping);\n return;\n }\n\n // We did not opt into using waitForCollectionCallback mode so the callback is called for every matching key.\n for (let i = 0; i < matchingKeys.length; i++) {\n get(matchingKeys[i]).then(val => sendDataToConnection(mapping, val, matchingKeys[i]));\n }\n return;\n }\n\n // If we are not subscribed to a collection key then there's only a single key to send an update for.\n get(mapping.key).then(val => sendDataToConnection(mapping, val, mapping.key));\n return;\n }\n\n // If we have a withOnyxInstance that means a React component has subscribed via the withOnyx() HOC and we need to\n // group collection key member data into an object.\n if (mapping.withOnyxInstance) {\n if (isCollectionKey(mapping.key)) {\n getCollectionDataAndSendAsObject(matchingKeys, mapping);\n return;\n }\n\n // If the subscriber is not using a collection key then we just send a single value back to the subscriber\n get(mapping.key).then(val => sendDataToConnection(mapping, val, mapping.key));\n return;\n }\n\n console.error('Warning: Onyx.connect() was found without a callback or withOnyxInstance');\n });\n\n // The connectionID is returned back to the caller so that it can be used to clean up the connection when it's no longer needed\n // by calling Onyx.disconnect(connectionID).\n return connectionID;\n}\n\n/**\n * Remove the listener for a react component\n * @example\n * Onyx.disconnect(connectionID);\n *\n * @param {Number} connectionID unique id returned by call to Onyx.connect()\n * @param {String} [keyToRemoveFromEvictionBlocklist]\n */\nfunction disconnect(connectionID, keyToRemoveFromEvictionBlocklist) {\n if (!callbackToStateMapping[connectionID]) {\n return;\n }\n\n // Remove this key from the eviction block list as we are no longer\n // subscribing to it and it should be safe to delete again\n if (keyToRemoveFromEvictionBlocklist) {\n removeFromEvictionBlockList(keyToRemoveFromEvictionBlocklist, connectionID);\n }\n\n delete callbackToStateMapping[connectionID];\n}\n\n/**\n * This method mostly exists for historical reasons as this library was initially designed without a memory cache and one was added later.\n * For this reason, Onyx works more similar to what you might expect from a native AsyncStorage with reads, writes, etc all becoming\n * available async. Since we have code in our main applications that might expect things to work this way it's not safe to change this\n * behavior just yet.\n *\n * @example\n * notifySubscribersOnNextTick(key, value, subscriber => subscriber.initWithStoredValues === false)\n *\n * @param {String} key\n * @param {*} value\n * @param {Function} [canUpdateSubscriber] only subscribers that pass this truth test will be updated\n */\n// eslint-disable-next-line rulesdir/no-negated-variables\nfunction notifySubscribersOnNextTick(key, value, canUpdateSubscriber) {\n Promise.resolve().then(() => keyChanged(key, value, canUpdateSubscriber));\n}\n\n/**\n * This method is similar to notifySubscribersOnNextTick but it is built for working specifically with collections\n * so that keysChanged() is triggered for the collection and not keyChanged(). If this was not done, then the\n * subscriber callbacks receive the data in a different format than they normally expect and it breaks code.\n *\n * @param {String} key\n * @param {*} value\n */\n// eslint-disable-next-line rulesdir/no-negated-variables\nfunction notifyCollectionSubscribersOnNextTick(key, value) {\n Promise.resolve().then(() => keysChanged(key, value));\n}\n\n/**\n * Remove a key from Onyx and update the subscribers\n *\n * @private\n * @param {String} key\n * @return {Promise}\n */\nfunction remove(key) {\n // Cache the fact that the value was removed\n cache.set(key, null);\n notifySubscribersOnNextTick(key, null);\n return Storage.removeItem(key);\n}\n\n/**\n * If we fail to set or merge we must handle this by\n * evicting some data from Onyx and then retrying to do\n * whatever it is we attempted to do.\n *\n * @private\n * @param {Error} error\n * @param {Function} onyxMethod\n * @param {...any} args\n * @return {Promise}\n */\nfunction evictStorageAndRetry(error, onyxMethod, ...args) {\n Logger.logInfo(`Handled error: ${error}`);\n\n if (error && Str.startsWith(error.message, 'Failed to execute \\'put\\' on \\'IDBObjectStore\\'')) {\n Logger.logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.');\n throw error;\n }\n\n // Find the first key that we can remove that has no subscribers in our blocklist\n const keyForRemoval = _.find(recentlyAccessedKeys, key => !evictionBlocklist[key]);\n\n if (!keyForRemoval) {\n Logger.logAlert('Out of storage. But found no acceptable keys to remove.');\n throw error;\n }\n\n // Remove the least recently viewed key that is not currently being accessed and retry.\n Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying.`);\n return remove(keyForRemoval)\n .then(() => onyxMethod(...args));\n}\n\n/**\n * Write a value to our store with the given key\n *\n * @param {String} key ONYXKEY to set\n * @param {*} value value to store\n *\n * @returns {Promise}\n */\nfunction set(key, value) {\n // Logging properties only since values could be sensitive things we don't want to log\n Logger.logInfo(`set() called for key: ${key}${_.isObject(value) ? ` properties: ${_.keys(value).join(',')}` : ''}`);\n\n // eslint-disable-next-line no-use-before-define\n if (hasPendingMergeForKey(key)) {\n Logger.logAlert(`Onyx.set() called after Onyx.merge() for key: ${key}. It is recommended to use set() or merge() not both.`);\n }\n\n // If the value in the cache is the same as what we have then do not update subscribers unless they\n // have initWithStoredValues: false then they MUST get all updates even if nothing has changed.\n if (!cache.hasValueChanged(key, value)) {\n cache.addToAccessedKeys(key);\n notifySubscribersOnNextTick(key, value, subscriber => subscriber.initWithStoredValues === false);\n return Promise.resolve();\n }\n\n // Adds the key to cache when it's not available\n cache.set(key, value);\n notifySubscribersOnNextTick(key, value);\n\n // Write the thing to persistent storage, which will trigger a storage event for any other tabs open on this domain\n return Storage.setItem(key, value)\n .catch(error => evictStorageAndRetry(error, set, key, value));\n}\n\n/**\n * Storage expects array like: [[\"@MyApp_user\", value_1], [\"@MyApp_key\", value_2]]\n * This method transforms an object like {'@MyApp_user': myUserValue, '@MyApp_key': myKeyValue}\n * to an array of key-value pairs in the above format\n * @private\n * @param {Record} data\n * @return {Array} an array of key - value pairs <[key, value]>\n */\nfunction prepareKeyValuePairsForStorage(data) {\n return _.map(data, (value, key) => [key, value]);\n}\n\n/**\n * Sets multiple keys and values\n *\n * @example Onyx.multiSet({'key1': 'a', 'key2': 'b'});\n *\n * @param {Object} data object keyed by ONYXKEYS and the values to set\n * @returns {Promise}\n */\nfunction multiSet(data) {\n const keyValuePairs = prepareKeyValuePairsForStorage(data);\n\n _.each(data, (val, key) => {\n // Update cache and optimistically inform subscribers on the next tick\n cache.set(key, val);\n notifySubscribersOnNextTick(key, val);\n });\n\n return Storage.multiSet(keyValuePairs)\n .catch(error => evictStorageAndRetry(error, multiSet, data));\n}\n\n// Key/value store of Onyx key and arrays of values to merge\nconst mergeQueue = {};\n\n/**\n * @private\n * @param {String} key\n * @returns {Boolean}\n */\nfunction hasPendingMergeForKey(key) {\n return Boolean(mergeQueue[key]);\n}\n\n/**\n * Given an Onyx key and value this method will combine all queued\n * value updates and return a single value. Merge attempts are\n * batched. They must occur after a single call to get() so we\n * can avoid race conditions.\n *\n * @private\n * @param {String} key\n * @param {*} data\n *\n * @returns {*}\n */\nfunction applyMerge(key, data) {\n const mergeValues = mergeQueue[key];\n if (_.isArray(data) || _.every(mergeValues, _.isArray)) {\n // Array values will always just concatenate\n // more items onto the end of the array\n return _.reduce(mergeValues, (modifiedData, mergeValue) => [\n ...modifiedData,\n ...mergeValue,\n ], data || []);\n }\n\n if (_.isObject(data) || _.every(mergeValues, _.isObject)) {\n // Object values are merged one after the other\n return _.reduce(mergeValues, (modifiedData, mergeValue) => {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n const newData = Object.assign({}, fastMerge(modifiedData, mergeValue));\n\n // We will also delete any object keys that are undefined or null.\n // Deleting keys is not supported by AsyncStorage so we do it this way.\n // Remove all first level keys that are explicitly set to null.\n return _.omit(newData, (value, finalObjectKey) => _.isNull(mergeValue[finalObjectKey]));\n }, data || {});\n }\n\n // If we have anything else we can't merge it so we'll\n // simply return the last value that was queued\n return _.last(mergeValues);\n}\n\n/**\n * Merge a new value into an existing value at a key.\n *\n * The types of values that can be merged are `Object` and `Array`. To set another type of value use `Onyx.set()`. Merge\n * behavior uses lodash/merge under the hood for `Object` and simple concatenation for `Array`. However, it's important\n * to note that if you have an array value property on an `Object` that the default behavior of lodash/merge is not to\n * concatenate. See here: https://github.com/lodash/lodash/issues/2872\n *\n * Calls to `Onyx.merge()` are batched so that any calls performed in a single tick will stack in a queue and get\n * applied in the order they were called. Note: `Onyx.set()` calls do not work this way so use caution when mixing\n * `Onyx.merge()` and `Onyx.set()`.\n *\n * @example\n * Onyx.merge(ONYXKEYS.EMPLOYEE_LIST, ['Joe']); // -> ['Joe']\n * Onyx.merge(ONYXKEYS.EMPLOYEE_LIST, ['Jack']); // -> ['Joe', 'Jack']\n * Onyx.merge(ONYXKEYS.POLICY, {id: 1}); // -> {id: 1}\n * Onyx.merge(ONYXKEYS.POLICY, {name: 'My Workspace'}); // -> {id: 1, name: 'My Workspace'}\n *\n * @param {String} key ONYXKEYS key\n * @param {(Object|Array)} value Object or Array value to merge\n * @returns {Promise}\n */\nfunction merge(key, value) {\n if (mergeQueue[key]) {\n mergeQueue[key].push(value);\n return Promise.resolve();\n }\n\n mergeQueue[key] = [value];\n return get(key)\n .then((data) => {\n try {\n const modifiedData = applyMerge(key, data);\n\n // Clean up the write queue so we\n // don't apply these changes again\n delete mergeQueue[key];\n\n return set(key, modifiedData);\n } catch (error) {\n Logger.logAlert(`An error occurred while applying merge for key: ${key}, Error: ${error}`);\n }\n\n return Promise.resolve();\n });\n}\n\n/**\n * Merge user provided default key value pairs.\n * @private\n * @returns {Promise}\n */\nfunction initializeWithDefaultKeyStates() {\n return Storage.multiGet(_.keys(defaultKeyStates))\n .then((pairs) => {\n const asObject = _.object(pairs);\n\n const merged = fastMerge(asObject, defaultKeyStates);\n cache.merge(merged);\n _.each(merged, (val, key) => keyChanged(key, val));\n });\n}\n\n/**\n * Clear out all the data in the store\n *\n * Note that calling Onyx.clear() and then Onyx.set() on a key with a default\n * key state may store an unexpected value in Storage.\n *\n * E.g.\n * Onyx.clear();\n * Onyx.set(ONYXKEYS.DEFAULT_KEY, 'default');\n * Storage.getItem(ONYXKEYS.DEFAULT_KEY)\n * .then((storedValue) => console.log(storedValue));\n * null is logged instead of the expected 'default'\n *\n * Onyx.set() might call Storage.setItem() before Onyx.clear() calls\n * Storage.setItem(). Use Onyx.merge() instead if possible. Onyx.merge() calls\n * Onyx.get(key) before calling Storage.setItem() via Onyx.set().\n * Storage.setItem() from Onyx.clear() will have already finished and the merged\n * value will be saved to storage after the default value.\n *\n * @param {Array} keysToPreserve is a list of ONYXKEYS that should not be cleared with the rest of the data\n * @returns {Promise<void>}\n */\nfunction clear(keysToPreserve = []) {\n return getAllKeys()\n .then((keys) => {\n const keyValuesToReset = [];\n const defaultKeys = _.keys(defaultKeyStates);\n\n // The only keys that should not be cleared are:\n // 1. Anything specifically passed in keysToPreserve (because some keys like language preferences, offline\n // status, or activeClients need to remain in Onyx even when signed out)\n // 2. Any keys with a default state (because they need to remain in Onyx as their default, and setting them\n // to null would cause unknown behavior)\n const keysToClear = _.difference(keys, keysToPreserve, defaultKeys);\n keyValuesToReset.push(..._.map(keysToClear, key => [key, null]));\n\n // Remove any keysToPreserve from the defaultKeyStates because if they are passed in it has been explicitly\n // called out to preserve those values instead of resetting them back\n // to the default.\n const defaultKeyValuePairs = _.pairs(_.omit(defaultKeyStates, ...keysToPreserve));\n\n // Add the default key value pairs to the keyValuesToReset so that they get set back to their default values\n // when we clear Onyx\n keyValuesToReset.push(...defaultKeyValuePairs);\n\n // We now have all the key/values that need to be reset, but we're not done yet!\n // There will be two groups of key/values and they each need to be updated a little bit differently.\n // Collection keys need to be notified differently than non collection keys\n const keyValuesToResetAsCollection = {};\n const keyValuesToResetIndividually = {};\n\n // Make sure that we also reset the cache values before clearing the values from storage.\n // We do this before clearing Storage so that any call to clear() followed by merge() on a key with a\n // default state results in the merged value getting saved, since the update from the merge() call would\n // happen on the tick after the update from this clear()\n _.each(keyValuesToReset, (keyValue) => {\n const key = keyValue[0];\n const value = keyValue[1];\n cache.set(key, value);\n\n const collectionKey = key.substring(0, key.indexOf('_') + 1);\n if (collectionKey) {\n if (!keyValuesToResetAsCollection[collectionKey]) {\n keyValuesToResetAsCollection[collectionKey] = {};\n }\n keyValuesToResetAsCollection[collectionKey][key] = value;\n return;\n }\n\n keyValuesToResetIndividually[key] = value;\n });\n\n // Notify the subscribers for each key/value group so they can receive the new values\n _.each(keyValuesToResetIndividually, (value, key) => {\n notifySubscribersOnNextTick(key, value);\n });\n _.each(keyValuesToResetAsCollection, (value, key) => {\n notifyCollectionSubscribersOnNextTick(key, value);\n });\n\n return Storage.multiSet(keyValuesToReset);\n });\n}\n\n/**\n * Merges a collection based on their keys\n *\n * @example\n *\n * Onyx.mergeCollection(ONYXKEYS.COLLECTION.REPORT, {\n * [`${ONYXKEYS.COLLECTION.REPORT}1`]: report1,\n * [`${ONYXKEYS.COLLECTION.REPORT}2`]: report2,\n * });\n *\n * @param {String} collectionKey e.g. `ONYXKEYS.COLLECTION.REPORT`\n * @param {Object} collection Object collection keyed by individual collection member keys and values\n * @returns {Promise}\n */\nfunction mergeCollection(collectionKey, collection) {\n if (!_.isObject(collection) || _.isArray(collection) || _.isEmpty(collection)) {\n Logger.logInfo('mergeCollection() called with invalid or empty value. Skipping this update.');\n return Promise.resolve();\n }\n\n // Confirm all the collection keys belong to the same parent\n _.each(collection, (_data, dataKey) => {\n if (isKeyMatch(collectionKey, dataKey)) {\n return;\n }\n\n throw new Error(`Provided collection doesn't have all its data belonging to the same parent. CollectionKey: ${collectionKey}, DataKey: ${dataKey}`);\n });\n\n return getAllKeys()\n .then((persistedKeys) => {\n // Split to keys that exist in storage and keys that don't\n const [existingKeys, newKeys] = _.chain(collection)\n .keys()\n .partition(key => persistedKeys.includes(key))\n .value();\n\n const existingKeyCollection = _.pick(collection, existingKeys);\n const newCollection = _.pick(collection, newKeys);\n const keyValuePairsForExistingCollection = prepareKeyValuePairsForStorage(existingKeyCollection);\n const keyValuePairsForNewCollection = prepareKeyValuePairsForStorage(newCollection);\n\n const promises = [];\n\n // New keys will be added via multiSet while existing keys will be updated using multiMerge\n // This is because setting a key that doesn't exist yet with multiMerge will throw errors\n if (keyValuePairsForExistingCollection.length > 0) {\n promises.push(Storage.multiMerge(keyValuePairsForExistingCollection));\n }\n\n if (keyValuePairsForNewCollection.length > 0) {\n promises.push(Storage.multiSet(keyValuePairsForNewCollection));\n }\n\n // Prefill cache if necessary by calling get() on any existing keys and then merge original data to cache\n // and update all subscribers\n Promise.all(_.map(existingKeys, get)).then(() => {\n cache.merge(collection);\n keysChanged(collectionKey, collection);\n });\n\n return Promise.all(promises)\n .catch(error => evictStorageAndRetry(error, mergeCollection, collection));\n });\n}\n\n/**\n * Insert API responses and lifecycle data into Onyx\n *\n * @param {Array} data An array of objects with shape {onyxMethod: oneOf('set', 'merge', 'mergeCollection'), key: string, value: *}\n * @returns {Promise} resolves when all operations are complete\n */\nfunction update(data) {\n // First, validate the Onyx object is in the format we expect\n _.each(data, ({onyxMethod, key}) => {\n if (!_.contains([METHOD.CLEAR, METHOD.SET, METHOD.MERGE, METHOD.MERGE_COLLECTION], onyxMethod)) {\n throw new Error(`Invalid onyxMethod ${onyxMethod} in Onyx update.`);\n }\n if (onyxMethod !== METHOD.CLEAR && !_.isString(key)) {\n throw new Error(`Invalid ${typeof key} key provided in Onyx update. Onyx key must be of type string.`);\n }\n });\n\n const promises = [];\n\n _.each(data, ({onyxMethod, key, value}) => {\n switch (onyxMethod) {\n case METHOD.SET:\n promises.push(set(key, value));\n break;\n case METHOD.MERGE:\n promises.push(merge(key, value));\n break;\n case METHOD.MERGE_COLLECTION:\n promises.push(mergeCollection(key, value));\n break;\n case METHOD.CLEAR:\n promises.push(clear());\n break;\n default:\n break;\n }\n });\n\n return Promise.all(promises);\n}\n\n/**\n * Initialize the store with actions and listening for storage events\n *\n * @param {Object} [options={}] config object\n * @param {Object} [options.keys={}] `ONYXKEYS` constants object\n * @param {Object} [options.initialKeyStates={}] initial data to set when `init()` and `clear()` is called\n * @param {String[]} [options.safeEvictionKeys=[]] This is an array of keys\n * (individual or collection patterns) that when provided to Onyx are flagged\n * as \"safe\" for removal. Any components subscribing to these keys must also\n * implement a canEvict option. See the README for more info.\n * @param {Number} [options.maxCachedKeysCount=55] Sets how many recent keys should we try to keep in cache\n * Setting this to 0 would practically mean no cache\n * We try to free cache when we connect to a safe eviction key\n * @param {Boolean} [options.captureMetrics] Enables Onyx benchmarking and exposes the get/print/reset functions\n * @param {Boolean} [options.shouldSyncMultipleInstances] Auto synchronize storage events between multiple instances\n * of Onyx running in different tabs/windows. Defaults to true for platforms that support local storage (web/desktop)\n * @param {Boolean} [options.debugSetState] Enables debugging setState() calls to connected components.\n * @example\n * Onyx.init({\n * keys: ONYXKEYS,\n * initialKeyStates: {\n * [ONYXKEYS.SESSION]: {loading: false},\n * },\n * });\n */\nfunction init({\n keys = {},\n initialKeyStates = {},\n safeEvictionKeys = [],\n maxCachedKeysCount = 1000,\n captureMetrics = false,\n shouldSyncMultipleInstances = Boolean(global.localStorage),\n debugSetState = false,\n} = {}) {\n if (captureMetrics) {\n // The code here is only bundled and applied when the captureMetrics is set\n // eslint-disable-next-line no-use-before-define\n applyDecorators();\n }\n\n if (debugSetState) {\n PerformanceUtils.setShouldDebugSetState(true);\n }\n\n if (maxCachedKeysCount > 0) {\n cache.setRecentKeysLimit(maxCachedKeysCount);\n }\n\n // Let Onyx know about all of our keys\n onyxKeys = keys;\n\n // Set our default key states to use when initializing and clearing Onyx data\n defaultKeyStates = initialKeyStates;\n\n // Let Onyx know about which keys are safe to evict\n evictionAllowList = safeEvictionKeys;\n\n // Initialize all of our keys with data provided then give green light to any pending connections\n Promise.all([\n addAllSafeEvictionKeysToRecentlyAccessedList(),\n initializeWithDefaultKeyStates(),\n ])\n .then(deferredInitTask.resolve);\n\n if (shouldSyncMultipleInstances && _.isFunction(Storage.keepInstancesSync)) {\n Storage.keepInstancesSync((key, value) => {\n cache.set(key, value);\n keyChanged(key, value);\n });\n }\n}\n\nconst Onyx = {\n connect,\n disconnect,\n set,\n multiSet,\n merge,\n mergeCollection,\n update,\n clear,\n init,\n registerLogger: Logger.registerLogger,\n addToEvictionBlockList,\n removeFromEvictionBlockList,\n isSafeEvictionKey,\n METHOD,\n};\n\n/**\n * Apply calls statistic decorators to benchmark Onyx\n *\n * @private\n */\nfunction applyDecorators() {\n // We're requiring the script dynamically here so that it's only evaluated when decorators are used\n const decorate = require('./metrics');\n\n // Re-assign with decorated functions\n /* eslint-disable no-func-assign */\n get = decorate.decorateWithMetrics(get, 'Onyx:get');\n set = decorate.decorateWithMetrics(set, 'Onyx:set');\n multiSet = decorate.decorateWithMetrics(multiSet, 'Onyx:multiSet');\n clear = decorate.decorateWithMetrics(clear, 'Onyx:clear');\n merge = decorate.decorateWithMetrics(merge, 'Onyx:merge');\n mergeCollection = decorate.decorateWithMetrics(mergeCollection, 'Onyx:mergeCollection');\n getAllKeys = decorate.decorateWithMetrics(getAllKeys, 'Onyx:getAllKeys');\n initializeWithDefaultKeyStates = decorate.decorateWithMetrics(initializeWithDefaultKeyStates, 'Onyx:defaults');\n update = decorate.decorateWithMetrics(update, 'Onyx:update');\n /* eslint-enable */\n\n // Re-expose decorated methods\n /* eslint-disable rulesdir/prefer-actions-set-data */\n Onyx.set = set;\n Onyx.multiSet = multiSet;\n Onyx.clear = clear;\n Onyx.merge = merge;\n Onyx.mergeCollection = mergeCollection;\n Onyx.update = update;\n /* eslint-enable */\n\n // Expose stats methods on Onyx\n Onyx.getMetrics = decorate.getMetrics;\n Onyx.resetMetrics = decorate.resetMetrics;\n Onyx.printMetrics = decorate.printMetrics;\n}\n\nexport default Onyx;\n","import _ from 'underscore';\nimport {deepEqual} from 'fast-equals';\nimport fastMerge from './fastMerge';\n\nconst isDefined = _.negate(_.isUndefined);\n\n/**\n * In memory cache providing data by reference\n * Encapsulates Onyx cache related functionality\n */\nclass OnyxCache {\n constructor() {\n /**\n * @private\n * Cache of all the storage keys available in persistent storage\n * @type {Set<string>}\n */\n this.storageKeys = new Set();\n\n /**\n * @private\n * Unique list of keys maintained in access order (most recent at the end)\n * @type {Set<string>}\n */\n this.recentKeys = new Set();\n\n /**\n * @private\n * A map of cached values\n * @type {Record<string, *>}\n */\n this.storageMap = {};\n\n /**\n * @private\n * Captured pending tasks for already running storage methods\n * @type {Record<string, Promise>}\n */\n this.pendingPromises = {};\n\n // bind all public methods to prevent problems with `this`\n _.bindAll(\n this,\n 'getAllKeys', 'getValue', 'hasCacheForKey', 'addKey', 'set', 'drop', 'merge',\n 'hasPendingTask', 'getTaskPromise', 'captureTask', 'removeLeastRecentlyUsedKeys',\n 'setRecentKeysLimit',\n );\n }\n\n /**\n * Get all the storage keys\n * @returns {string[]}\n */\n getAllKeys() {\n return Array.from(this.storageKeys);\n }\n\n /**\n * Get a cached value from storage\n * @param {string} key\n * @returns {*}\n */\n getValue(key) {\n this.addToAccessedKeys(key);\n return this.storageMap[key];\n }\n\n /**\n * Check whether cache has data for the given key\n * @param {string} key\n * @returns {boolean}\n */\n hasCacheForKey(key) {\n return isDefined(this.storageMap[key]);\n }\n\n /**\n * Saves a key in the storage keys list\n * Serves to keep the result of `getAllKeys` up to date\n * @param {string} key\n */\n addKey(key) {\n this.storageKeys.add(key);\n }\n\n /**\n * Set's a key value in cache\n * Adds the key to the storage keys list as well\n * @param {string} key\n * @param {*} value\n * @returns {*} value - returns the cache value\n */\n set(key, value) {\n this.addKey(key);\n this.addToAccessedKeys(key);\n this.storageMap[key] = value;\n\n return value;\n }\n\n /**\n * Forget the cached value for the given key\n * @param {string} key\n */\n drop(key) {\n delete this.storageMap[key];\n }\n\n /**\n * Deep merge data to cache, any non existing keys will be created\n * @param {Record<string, *>} data - a map of (cache) key - values\n */\n merge(data) {\n if (!_.isObject(data) || _.isArray(data)) {\n throw new Error('data passed to cache.merge() must be an Object of onyx key/value pairs');\n }\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n this.storageMap = Object.assign({}, fastMerge(this.storageMap, data));\n\n const storageKeys = this.getAllKeys();\n const mergedKeys = _.keys(data);\n this.storageKeys = new Set([...storageKeys, ...mergedKeys]);\n _.each(mergedKeys, key => this.addToAccessedKeys(key));\n }\n\n /**\n * Check whether the given task is already running\n * @param {string} taskName - unique name given for the task\n * @returns {*}\n */\n hasPendingTask(taskName) {\n return isDefined(this.pendingPromises[taskName]);\n }\n\n /**\n * Use this method to prevent concurrent calls for the same thing\n * Instead of calling the same task again use the existing promise\n * provided from this function\n * @template T\n * @param {string} taskName - unique name given for the task\n * @returns {Promise<T>}\n */\n getTaskPromise(taskName) {\n return this.pendingPromises[taskName];\n }\n\n /**\n * Capture a promise for a given task so other caller can\n * hook up to the promise if it's still pending\n * @template T\n * @param {string} taskName - unique name for the task\n * @param {Promise<T>} promise\n * @returns {Promise<T>}\n */\n captureTask(taskName, promise) {\n this.pendingPromises[taskName] = promise.finally(() => {\n delete this.pendingPromises[taskName];\n });\n\n return this.pendingPromises[taskName];\n }\n\n /**\n * @private\n * Adds a key to the top of the recently accessed keys\n * @param {string} key\n */\n addToAccessedKeys(key) {\n // Removing and re-adding a key ensures it's at the end of the list\n this.recentKeys.delete(key);\n this.recentKeys.add(key);\n }\n\n /**\n * Remove keys that don't fall into the range of recently used keys\n */\n removeLeastRecentlyUsedKeys() {\n if (this.recentKeys.size <= this.maxRecentKeysSize) {\n return;\n }\n\n // Get the last N keys by doing a negative slice\n const recentlyAccessed = [...this.recentKeys].slice(-this.maxRecentKeysSize);\n const storageKeys = _.keys(this.storageMap);\n const keysToRemove = _.difference(storageKeys, recentlyAccessed);\n\n _.each(keysToRemove, this.drop);\n }\n\n /**\n * Set the recent keys list size\n * @param {number} limit\n */\n setRecentKeysLimit(limit) {\n this.maxRecentKeysSize = limit;\n }\n\n /**\n * @param {String} key\n * @param {*} value\n * @returns {Boolean}\n */\n hasValueChanged(key, value) {\n return !deepEqual(this.storageMap[key], value);\n }\n}\n\nconst instance = new OnyxCache();\n\nexport default instance;\n","/**\n * Synchronous queue that can be used to ensure promise based tasks are run in sequence.\n * Pass to the constructor a function that returns a promise to run the task then add data.\n *\n * @example\n *\n * const queue = new SyncQueue(({key, val}) => {\n * return someAsyncProcess(key, val);\n * });\n *\n * queue.push({key: 1, val: '1'});\n * queue.push({key: 2, val: '2'});\n */\nexport default class SyncQueue {\n /**\n * @param {Function} run - must return a promise\n */\n constructor(run) {\n this.queue = [];\n this.isProcessing = false;\n this.run = run;\n }\n\n process() {\n if (this.isProcessing || this.queue.length === 0) {\n return;\n }\n\n this.isProcessing = true;\n\n const {data, resolve, reject} = this.queue.shift();\n this.run(data)\n .then(resolve)\n .catch(reject)\n .finally(() => {\n this.isProcessing = false;\n this.process();\n });\n }\n\n /**\n * @param {*} data\n * @returns {Promise}\n */\n push(data) {\n return new Promise((resolve, reject) => {\n this.queue.push({resolve, reject, data});\n this.process();\n });\n }\n}\n","/**\n * Create a deferred task that can be resolved when we call `resolve()`\n * The returned promise will complete when we call `resolve`\n * Useful when we want to wait for a tasks that is resolved from an external action\n *\n * @template T\n * @returns {{ resolve: function(*), promise: Promise<T|void> }}\n */\nexport default function createDeferredTask() {\n const deferred = {};\n deferred.promise = new Promise((res) => {\n deferred.resolve = res;\n });\n\n return deferred;\n}\n","// Mostly copied from https://medium.com/@lubaka.a/how-to-remove-lodash-performance-improvement-b306669ad0e1\n\n/**\n * @param {mixed} val\n * @returns {boolean}\n*/\nfunction isMergeableObject(val) {\n const nonNullObject = val != null ? typeof val === 'object' : false;\n return (nonNullObject\n && Object.prototype.toString.call(val) !== '[object RegExp]'\n && Object.prototype.toString.call(val) !== '[object Date]');\n}\n\n/**\n * @param {Object} target\n * @param {Object} source\n * @returns {Object}\n*/\nfunction mergeObject(target, source) {\n const destination = {};\n if (isMergeableObject(target)) {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const targetKeys = Object.keys(target);\n for (let i = 0; i < targetKeys.length; ++i) {\n const key = targetKeys[i];\n destination[key] = target[key];\n }\n }\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; ++i) {\n const key = sourceKeys[i];\n if (source[key] === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n if (!isMergeableObject(source[key]) || !target[key]) {\n destination[key] = source[key];\n } else {\n // eslint-disable-next-line no-use-before-define\n destination[key] = fastMerge(target[key], source[key]);\n }\n }\n\n return destination;\n}\n\n/**\n * @param {Object|Array} target\n * @param {Object|Array} source\n * @returns {Object|Array}\n*/\nfunction fastMerge(target, source) {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const array = Array.isArray(source);\n if (array) {\n return source;\n }\n return mergeObject(target, source);\n}\n\nexport default fastMerge;\n","import lodashTransform from 'lodash/transform';\nimport _ from 'underscore';\n\nlet debugSetState = false;\n\n/**\n * @param {Boolean} debug\n */\nfunction setShouldDebugSetState(debug) {\n debugSetState = debug;\n}\n\n/**\n * Deep diff between two objects. Useful for figuring out what changed about an object from one render to the next so\n * that state and props updates can be optimized.\n *\n * @param {Object} object\n * @param {Object} base\n * @return {Object}\n */\nfunction diffObject(object, base) {\n function changes(obj, comparisonObject) {\n return lodashTransform(obj, (result, value, key) => {\n if (_.isEqual(value, comparisonObject[key])) {\n return;\n }\n\n // eslint-disable-next-line no-param-reassign\n result[key] = (_.isObject(value) && _.isObject(comparisonObject[key]))\n ? changes(value, comparisonObject[key])\n : value;\n });\n }\n return changes(object, base);\n}\n\n/**\n * Provide insights into why a setState() call occurred by diffing the before and after values.\n *\n * @param {Object} mapping\n * @param {*} previousValue\n * @param {*} newValue\n * @param {String} caller\n * @param {String} [keyThatChanged]\n */\nfunction logSetStateCall(mapping, previousValue, newValue, caller, keyThatChanged) {\n if (!debugSetState) {\n return;\n }\n\n const logParams = {};\n if (keyThatChanged) {\n logParams.keyThatChanged = keyThatChanged;\n }\n if (_.isObject(newValue) && _.isObject(previousValue)) {\n logParams.difference = diffObject(previousValue, newValue);\n } else {\n logParams.previousValue = previousValue;\n logParams.newValue = newValue;\n }\n\n console.debug(`[Onyx-Debug] ${mapping.displayName} setState() called. Subscribed to key '${mapping.key}' (${caller})`, logParams);\n}\n\nexport {\n logSetStateCall,\n setShouldDebugSetState,\n};\n","// For web-only implementations of Onyx, this module will just be a no-op\n\nfunction decorateWithMetrics(func) { return func; }\nfunction getMetrics() {}\nfunction printMetrics() {}\nfunction resetMetrics() {}\n\nexport {\n decorateWithMetrics,\n getMetrics,\n resetMetrics,\n printMetrics,\n};\n","import _ from 'underscore';\nimport Storage from './providers/LocalForage';\n\nconst SYNC_ONYX = 'SYNC_ONYX';\n\n/**\n * Raise an event thorough `localStorage` to let other tabs know a value changed\n * @param {String} onyxKey\n */\nfunction raiseStorageSyncEvent(onyxKey) {\n global.localStorage.setItem(SYNC_ONYX, onyxKey);\n global.localStorage.removeItem(SYNC_ONYX, onyxKey);\n}\n\nconst webStorage = {\n ...Storage,\n\n /**\n * @param {Function} onStorageKeyChanged Storage synchronization mechanism keeping all opened tabs in sync\n */\n keepInstancesSync(onStorageKeyChanged) {\n // Override set, remove and clear to raise storage events that we intercept in other tabs\n this.setItem = (key, value) => Storage.setItem(key, value)\n .then(() => raiseStorageSyncEvent(key));\n\n this.removeItem = key => Storage.removeItem(key)\n .then(() => raiseStorageSyncEvent(key));\n\n // If we just call Storage.clear other tabs will have no idea which keys were available previously\n // so that they can call keysChanged for them. That's why we iterate and remove keys one by one\n this.clear = () => Storage.getAllKeys()\n .then(keys => _.map(keys, key => this.removeItem(key)))\n .then(tasks => Promise.all(tasks));\n\n // This listener will only be triggered by events coming from other tabs\n global.addEventListener('storage', (event) => {\n // Ignore events that don't originate from the SYNC_ONYX logic\n if (event.key !== SYNC_ONYX || !event.newValue) {\n return;\n }\n\n const onyxKey = event.newValue;\n Storage.getItem(onyxKey)\n .then(value => onStorageKeyChanged(onyxKey, value));\n });\n },\n};\n\nexport default webStorage;\n","import WebStorage from './WebStorage';\n\nexport default WebStorage;\n","/**\n * @file\n * The storage provider based on localforage allows us to store most anything in its\n * natural form in the underlying DB without having to stringify or de-stringify it\n */\n\nimport localforage from 'localforage';\nimport _ from 'underscore';\nimport SyncQueue from '../../SyncQueue';\nimport fastMerge from '../../fastMerge';\n\nlocalforage.config({\n name: 'OnyxDB',\n});\n\nconst provider = {\n /**\n * Writing very quickly to IndexedDB causes performance issues and can lock up the page and lead to jank.\n * So, we are slowing this process down by waiting until one write is complete before moving on\n * to the next.\n */\n setItemQueue: new SyncQueue(({key, value, shouldMerge}) => {\n if (shouldMerge) {\n return localforage.getItem(key)\n .then((existingValue) => {\n const newValue = _.isObject(existingValue)\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n ? Object.assign({}, fastMerge(existingValue, value))\n : value;\n return localforage.setItem(key, newValue);\n });\n }\n\n return localforage.setItem(key, value);\n }),\n\n /**\n * Get multiple key-value pairs for the give array of keys in a batch\n * @param {String[]} keys\n * @return {Promise<Array<[key, value]>>}\n */\n multiGet(keys) {\n const pairs = _.map(\n keys,\n key => localforage.getItem(key)\n .then(value => [key, value]),\n );\n\n return Promise.all(pairs);\n },\n\n /**\n * Multiple merging of existing and new values in a batch\n * @param {Array<[key, value]>} pairs\n * @return {Promise<void>}\n */\n multiMerge(pairs) {\n const tasks = _.map(pairs, ([key, value]) => this.setItemQueue.push({key, value, shouldMerge: true}));\n\n // We're returning Promise.resolve, otherwise the array of task results will be returned to the caller\n return Promise.all(tasks).then(() => Promise.resolve());\n },\n\n /**\n * Stores multiple key-value pairs in a batch\n * @param {Array<[key, value]>} pairs\n * @return {Promise<void>}\n */\n multiSet(pairs) {\n // We're returning Promise.resolve, otherwise the array of task results will be returned to the caller\n const tasks = _.map(pairs, ([key, value]) => this.setItem(key, value));\n return Promise.all(tasks).then(() => Promise.resolve());\n },\n\n /**\n * Clear absolutely everything from storage\n * @returns {Promise<void>}\n */\n clear: localforage.clear,\n\n /**\n * Returns all keys available in storage\n * @returns {Promise<String[]>}\n */\n getAllKeys: localforage.keys,\n\n /**\n * Get the value of a given key or return `null` if it's not available in storage\n * @param {String} key\n * @return {Promise<*>}\n */\n getItem: localforage.getItem,\n\n /**\n * Remove given key and it's value from storage\n * @param {String} key\n * @returns {Promise<void>}\n */\n removeItem: localforage.removeItem,\n\n /**\n * Sets the value for a given key. The only requirement is that the value should be serializable to JSON string\n * @param {String} key\n * @param {*} value\n * @return {Promise<void>}\n */\n setItem(key, value) {\n return this.setItemQueue.push({key, value});\n },\n};\n\nexport default provider;\n","/**\n * This is a higher order component that provides the ability to map a state property directly to\n * something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view\n * will automatically change to reflect the new data.\n */\nimport React from 'react';\nimport _ from 'underscore';\nimport PropTypes from 'prop-types';\nimport Str from 'expensify-common/lib/str';\nimport Onyx from './Onyx';\n\n/**\n * Returns the display name of a component\n *\n * @param {object} component\n * @returns {string}\n */\nfunction getDisplayName(component) {\n return component.displayName || component.name || 'Component';\n}\n\nexport default function (mapOnyxToState) {\n // A list of keys that must be present in tempState before we can render the WrappedComponent\n const requiredKeysForInit = _.chain(mapOnyxToState)\n .omit(config => config.initWithStoredValues === false)\n .keys()\n .value();\n return (WrappedComponent) => {\n const displayName = getDisplayName(WrappedComponent);\n class withOnyx extends React.Component {\n constructor(props) {\n super(props);\n\n this.setWithOnyxState = this.setWithOnyxState.bind(this);\n\n // This stores all the Onyx connection IDs to be used when the component unmounts so everything can be\n // disconnected. It is a key value store with the format {[mapping.key]: connectionID}.\n this.activeConnectionIDs = {};\n\n // Object holding the temporary initial state for the component while we load the various Onyx keys\n this.tempState = {};\n\n this.state = {\n // If there are no required keys for init then we can render the wrapped component immediately\n loading: requiredKeysForInit.length > 0,\n };\n }\n\n componentDidMount() {\n // Subscribe each of the state properties to the proper Onyx key\n _.each(mapOnyxToState, (mapping, propertyName) => {\n this.connectMappingToOnyx(mapping, propertyName);\n });\n this.checkEvictableKeys();\n }\n\n componentDidUpdate(prevProps) {\n // If any of the mappings use data from the props, then when the props change, all the\n // connections need to be reconnected with the new props\n _.each(mapOnyxToState, (mapping, propertyName) => {\n const previousKey = Str.result(mapping.key, prevProps);\n const newKey = Str.result(mapping.key, this.props);\n\n if (previousKey !== newKey) {\n Onyx.disconnect(this.activeConnectionIDs[previousKey], previousKey);\n delete this.activeConnectionIDs[previousKey];\n this.connectMappingToOnyx(mapping, propertyName);\n }\n });\n this.checkEvictableKeys();\n }\n\n componentWillUnmount() {\n // Disconnect everything from Onyx\n _.each(mapOnyxToState, (mapping) => {\n const key = Str.result(mapping.key, this.props);\n const connectionID = this.activeConnectionIDs[key];\n Onyx.disconnect(connectionID, key);\n });\n }\n\n /**\n * This method is used externally by sendDataToConnection to prevent unnecessary renders while a component\n * still in a loading state. The temporary initial state is saved to the component instance and setState()\n * only called once all the necessary data has been collected.\n *\n * @param {String} statePropertyName\n * @param {*} val\n */\n setWithOnyxState(statePropertyName, val) {\n if (!this.state.loading) {\n this.setState({[statePropertyName]: val});\n return;\n }\n\n this.tempState[statePropertyName] = val;\n\n // All state keys should exist and at least have a value of null\n if (_.some(requiredKeysForInit, key => _.isUndefined(this.tempState[key]))) {\n return;\n }\n\n this.setState({...this.tempState, loading: false});\n delete this.tempState;\n }\n\n /**\n * Makes sure each Onyx key we requested has been set to state with a value of some kind.\n * We are doing this so that the wrapped component will only render when all the data\n * it needs is available to it.\n */\n checkEvictableKeys() {\n // We will add this key to our list of recently accessed keys\n // if the canEvict function returns true. This is necessary criteria\n // we MUST use to specify if a key can be removed or not.\n _.each(mapOnyxToState, (mapping) => {\n if (_.isUndefined(mapping.canEvict)) {\n return;\n }\n\n const canEvict = Str.result(mapping.canEvict, this.props);\n const key = Str.result(mapping.key, this.props);\n\n if (!Onyx.isSafeEvictionKey(key)) {\n throw new Error(`canEvict can't be used on key '${key}'. This key must explicitly be flagged as safe for removal by adding it to Onyx.init({safeEvictionKeys: []}).`);\n }\n\n if (canEvict) {\n Onyx.removeFromEvictionBlockList(key, mapping.connectionID);\n } else {\n Onyx.addToEvictionBlockList(key, mapping.connectionID);\n }\n });\n }\n\n /**\n * Takes a single mapping and binds the state of the component to the store\n *\n * @param {object} mapping\n * @param {string|function} mapping.key key to connect to. can be a string or a\n * function that takes this.props as an argument and returns a string\n * @param {string} statePropertyName the name of the state property that Onyx will add the data to\n * @param {boolean} [mapping.initWithStoredValues] If set to false, then no data will be prefilled into the\n * component\n */\n connectMappingToOnyx(mapping, statePropertyName) {\n const key = Str.result(mapping.key, this.props);\n\n // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs\n this.activeConnectionIDs[key] = Onyx.connect({\n ...mapping,\n key,\n statePropertyName,\n withOnyxInstance: this,\n displayName,\n });\n }\n\n render() {\n if (this.state.loading) {\n return null;\n }\n\n // Remove any internal state properties used by withOnyx\n // that should not be passed to a wrapped component\n let stateToPass = _.omit(this.state, 'loading');\n stateToPass = _.omit(stateToPass, value => _.isNull(value));\n\n // Remove any null values so that React replaces them with default props\n const propsToPass = _.omit(this.props, value => _.isNull(value));\n\n // Spreading props and state is necessary in an HOC where the data cannot be predicted\n return (\n <WrappedComponent\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...propsToPass}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...stateToPass}\n ref={this.props.forwardedRef}\n />\n );\n }\n }\n\n withOnyx.propTypes = {\n forwardedRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({current: PropTypes.instanceOf(React.Component)}),\n ]),\n };\n withOnyx.defaultProps = {\n forwardedRef: undefined,\n };\n withOnyx.displayName = `withOnyx(${displayName})`;\n return React.forwardRef((props, ref) => {\n const Component = withOnyx;\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component {...props} forwardedRef={ref} />;\n });\n };\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__;","module.exports = __WEBPACK_EXTERNAL_MODULE_fast_equals__;","module.exports = __WEBPACK_EXTERNAL_MODULE_localforage__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_get__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_transform__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;","module.exports = __WEBPACK_EXTERNAL_MODULE_underscore__;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","import Onyx from './Onyx';\nimport withOnyx from './withOnyx';\n\nexport default Onyx;\nexport {withOnyx};\n"],"names":["logger","registerLogger","callback","logAlert","message","level","logInfo","METHOD","SET","MERGE","MERGE_COLLECTION","CLEAR","lastConnectionID","callbackToStateMapping","onyxKeys","recentlyAccessedKeys","evictionAllowList","evictionBlocklist","defaultKeyStates","deferredInitTask","createDeferredTask","getSubsetOfData","sourceData","selector","_","isFunction","lodashGet","reduceCollectionWithSelector","collection","reduce","finalCollection","item","key","get","cache","hasCacheForKey","Promise","resolve","getValue","taskName","hasPendingTask","getTaskPromise","promise","Storage","getItem","then","val","set","catch","err","Logger","captureTask","getAllKeys","storedKeys","length","keys","each","addKey","isCollectionKey","contains","values","COLLECTION","isCollectionMemberKey","collectionKey","Str","startsWith","isKeyMatch","configKey","isSafeEvictionKey","testKey","some","removeLastAccessedKey","without","addLastAccessedKey","push","removeFromEvictionBlockList","connectionID","addToEvictionBlockList","addAllSafeEvictionKeysToRecentlyAccessedList","safeEvictionKey","getCachedCollection","collectionMemberKeys","filter","storedKey","prev","curr","cachedValue","keysChanged","partialCollection","stateMappingKeys","i","subscriber","isSubscribedToCollectionKey","isSubscribedToCollectionMemberKey","cachedCollection","waitForCollectionCallback","dataKeys","j","dataKey","withOnyxInstance","setState","prevState","previousData","statePropertyName","newData","deepEqual","clone","PerformanceUtils","logSetStateCall","dataFromCollection","isUndefined","prevData","data","keyChanged","canUpdateSubscriber","isNull","prevDataWithNewData","newCollection","previousValue","newValue","console","error","sendDataToConnection","mapping","matchedKey","setWithOnyxState","addKeyToRecentlyAccessedIfNeeded","removeLeastRecentlyUsedKeys","canEvict","Error","getCollectionDataAndSendAsObject","matchingKeys","all","map","finalObject","value","connect","initWithStoredValues","disconnect","keyToRemoveFromEvictionBlocklist","notifySubscribersOnNextTick","notifyCollectionSubscribersOnNextTick","remove","removeItem","evictStorageAndRetry","onyxMethod","args","keyForRemoval","find","isObject","join","hasPendingMergeForKey","hasValueChanged","addToAccessedKeys","setItem","prepareKeyValuePairsForStorage","multiSet","keyValuePairs","mergeQueue","Boolean","applyMerge","mergeValues","isArray","every","modifiedData","mergeValue","Object","assign","fastMerge","omit","finalObjectKey","last","merge","initializeWithDefaultKeyStates","multiGet","pairs","asObject","object","merged","clear","keysToPreserve","keyValuesToReset","defaultKeys","keysToClear","difference","defaultKeyValuePairs","keyValuesToResetAsCollection","keyValuesToResetIndividually","keyValue","substring","indexOf","mergeCollection","isEmpty","_data","persistedKeys","chain","partition","includes","existingKeys","newKeys","existingKeyCollection","pick","keyValuePairsForExistingCollection","keyValuePairsForNewCollection","promises","multiMerge","update","isString","init","initialKeyStates","safeEvictionKeys","maxCachedKeysCount","captureMetrics","shouldSyncMultipleInstances","global","localStorage","debugSetState","applyDecorators","setShouldDebugSetState","setRecentKeysLimit","keepInstancesSync","Onyx","decorate","require","decorateWithMetrics","getMetrics","resetMetrics","printMetrics","isDefined","negate","OnyxCache","storageKeys","Set","recentKeys","storageMap","pendingPromises","bindAll","Array","from","add","mergedKeys","finally","delete","size","maxRecentKeysSize","recentlyAccessed","slice","keysToRemove","drop","limit","instance","SyncQueue","run","queue","isProcessing","shift","reject","process","deferred","res","isMergeableObject","nonNullObject","prototype","toString","call","mergeObject","target","source","destination","targetKeys","sourceKeys","undefined","array","debug","diffObject","base","changes","obj","comparisonObject","lodashTransform","result","isEqual","caller","keyThatChanged","logParams","displayName","func","SYNC_ONYX","raiseStorageSyncEvent","onyxKey","webStorage","onStorageKeyChanged","tasks","addEventListener","event","WebStorage","localforage","config","name","provider","setItemQueue","shouldMerge","existingValue","getDisplayName","component","mapOnyxToState","requiredKeysForInit","WrappedComponent","withOnyx","props","bind","activeConnectionIDs","tempState","state","loading","propertyName","connectMappingToOnyx","checkEvictableKeys","prevProps","previousKey","newKey","stateToPass","propsToPass","forwardedRef","React","Component","propTypes","PropTypes","oneOfType","shape","current","instanceOf","defaultProps","forwardRef","ref"],"sourceRoot":""}
1
+ {"version":3,"file":"web.development.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;+JCVA;AACA,IAAIA,MAAM,GAAG,kBAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA,SAASC,cAAc,CAACC,QAAQ,EAAE;EAC9BF,MAAM,GAAGE,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQ,CAACC,OAAO,EAAE;EACvBJ,MAAM,CAAC,EAACI,OAAO,cAAYA,OAAS,EAAEC,KAAK,EAAE,OAAO,EAAC,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,CAACF,OAAO,EAAE;EACtBJ,MAAM,CAAC,EAACI,OAAO,cAAYA,OAAS,EAAEC,KAAK,EAAE,MAAM,EAAC,CAAC;AACzD;;;;;;;;;;;AC3BA;AACA;AACA;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AqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,cAAc,mBAAO,CAAC,kDAAU;AAChC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;AAC/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;AACA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,CAAM;AAC7I;AACA;;AAEA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;AC9kBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,kDAAU;;AAElC;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,EAAE,KAAK,EAIN;;;;;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;;AAIb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,sBAAsB;AACtB,uBAAuB;AACvB,uBAAuB;AACvB,eAAe;AACf,kBAAkB;AAClB,gBAAgB;AAChB,YAAY;AACZ,YAAY;AACZ,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,gBAAgB;AAChB,mBAAmB;AACnB,wBAAwB;AACxB,yBAAyB;AACzB,yBAAyB;AACzB,iBAAiB;AACjB,oBAAoB;AACpB,kBAAkB;AAClB,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,oBAAoB;AACpB,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc;AACd,GAAG;AACH;;;;;;;;;;;;ACpLa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,gIAAyD;AAC3D;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,YAAY,mBAAO,CAAC,oBAAO;;AAE3B;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,oBAAoB;AACpB,2DAA2D,UAAU;AACrE,yBAAyB,UAAU;AACnC;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,6DAA6D;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;AACtC;;AAEA;;AAEA,gBAAgB;AAChB,WAAW;AACX,YAAY;AACZ,GAAG;AACH;;;;;;;;;;;;AC/xCa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,+IAAkE;AACpE;;;;;;;;;;;;ACNA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;AACA;AACA,yCAAyC,SA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AEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;;;;;;;uXCPD;AACA,mGAAkC;;AAEnBhH,aAAI,CAAC,8B","sources":["webpack://react-native-onyx/web/webpack/universalModuleDefinition","webpack://react-native-onyx/web/./lib/Logger.js","webpack://react-native-onyx/web/./lib/Onyx.js","webpack://react-native-onyx/web/./lib/OnyxCache.js","webpack://react-native-onyx/web/./lib/SyncQueue.js","webpack://react-native-onyx/web/./lib/createDeferredTask.js","webpack://react-native-onyx/web/./lib/fastMerge.js","webpack://react-native-onyx/web/./lib/metrics/PerformanceUtils.js","webpack://react-native-onyx/web/./lib/metrics/index.web.js","webpack://react-native-onyx/web/./lib/storage/WebStorage.js","webpack://react-native-onyx/web/./lib/storage/index.web.js","webpack://react-native-onyx/web/./lib/storage/providers/LocalForage.js","webpack://react-native-onyx/web/./lib/withOnyx.js","webpack://react-native-onyx/web/./node_modules/object-assign/index.js","webpack://react-native-onyx/web/./node_modules/prop-types/checkPropTypes.js","webpack://react-native-onyx/web/./node_modules/prop-types/factoryWithTypeCheckers.js","webpack://react-native-onyx/web/./node_modules/prop-types/index.js","webpack://react-native-onyx/web/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://react-native-onyx/web/./node_modules/react-is/cjs/react-is.development.js","webpack://react-native-onyx/web/./node_modules/react-is/index.js","webpack://react-native-onyx/web/./node_modules/react/cjs/react-jsx-runtime.development.js","webpack://react-native-onyx/web/./node_modules/react/jsx-runtime.js","webpack://react-native-onyx/web/external umd \"expensify-common/lib/str\"","webpack://react-native-onyx/web/external umd \"fast-equals\"","webpack://react-native-onyx/web/external umd \"localforage\"","webpack://react-native-onyx/web/external umd \"lodash/get\"","webpack://react-native-onyx/web/external umd \"lodash/transform\"","webpack://react-native-onyx/web/external umd \"react\"","webpack://react-native-onyx/web/external umd \"underscore\"","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/createClass.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/inherits.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/typeof.js","webpack://react-native-onyx/web/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://react-native-onyx/web/webpack/bootstrap","webpack://react-native-onyx/web/webpack/runtime/global","webpack://react-native-onyx/web/./lib/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"underscore\"), require(\"expensify-common/lib/str\"), require(\"fast-equals\"), require(\"lodash/get\"), require(\"localforage\"), require(\"lodash/transform\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"underscore\", \"expensify-common/lib/str\", \"fast-equals\", \"lodash/get\", \"localforage\", \"lodash/transform\", \"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"react-native-onyx/web\"] = factory(require(\"underscore\"), require(\"expensify-common/lib/str\"), require(\"fast-equals\"), require(\"lodash/get\"), require(\"localforage\"), require(\"lodash/transform\"), require(\"react\"));\n\telse\n\t\troot[\"react-native-onyx/web\"] = factory(root[\"underscore\"], root[\"expensify-common/lib/str\"], root[\"fast-equals\"], root[\"lodash/get\"], root[\"localforage\"], root[\"lodash/transform\"], root[\"react\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE_underscore__, __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__, __WEBPACK_EXTERNAL_MODULE_fast_equals__, __WEBPACK_EXTERNAL_MODULE_lodash_get__, __WEBPACK_EXTERNAL_MODULE_localforage__, __WEBPACK_EXTERNAL_MODULE_lodash_transform__, __WEBPACK_EXTERNAL_MODULE_react__) => {\nreturn ","// Logging callback\nlet logger = () => {};\n\n/**\n * Register the logging callback\n *\n * @param {Function} callback\n */\nfunction registerLogger(callback) {\n logger = callback;\n}\n\n/**\n * Send an alert message to the logger\n *\n * @param {String} message\n */\nfunction logAlert(message) {\n logger({message: `[Onyx] ${message}`, level: 'alert'});\n}\n\n/**\n * Send an info message to the logger\n *\n * @param {String} message\n */\nfunction logInfo(message) {\n logger({message: `[Onyx] ${message}`, level: 'info'});\n}\n\nexport {\n registerLogger,\n logInfo,\n logAlert,\n};\n","/* eslint-disable no-continue */\nimport _ from 'underscore';\nimport Str from 'expensify-common/lib/str';\nimport {deepEqual} from 'fast-equals';\nimport lodashGet from 'lodash/get';\nimport Storage from './storage';\nimport * as Logger from './Logger';\nimport cache from './OnyxCache';\nimport createDeferredTask from './createDeferredTask';\nimport fastMerge from './fastMerge';\nimport * as PerformanceUtils from './metrics/PerformanceUtils';\n\n// Method constants\nconst METHOD = {\n SET: 'set',\n MERGE: 'merge',\n MERGE_COLLECTION: 'mergecollection',\n CLEAR: 'clear',\n};\n\n// Keeps track of the last connectionID that was used so we can keep incrementing it\nlet lastConnectionID = 0;\n\n// Holds a mapping of all the react components that want their state subscribed to a store key\nconst callbackToStateMapping = {};\n\n// Stores all of the keys that Onyx can use. Must be defined in init().\nlet onyxKeys = {};\n\n// Holds a list of keys that have been directly subscribed to or recently modified from least to most recent\nlet recentlyAccessedKeys = [];\n\n// Holds a list of keys that are safe to remove when we reach max storage. If a key does not match with\n// whatever appears in this list it will NEVER be a candidate for eviction.\nlet evictionAllowList = [];\n\n// Holds a map of keys and connectionID arrays whose keys will never be automatically evicted as\n// long as we have at least one subscriber that returns false for the canEvict property.\nconst evictionBlocklist = {};\n\n// Optional user-provided key value states set when Onyx initializes or clears\nlet defaultKeyStates = {};\n\n// Connections can be made before `Onyx.init`. They would wait for this task before resolving\nconst deferredInitTask = createDeferredTask();\n\n/**\n * Uses a selector string or function to return a simplified version of sourceData\n * @param {Mixed} sourceData\n * @param {String|Function} selector\n * If it's a string, the selector is passed to lodashGet on the sourceData\n * If it's a function, it is passed the sourceData and it should return the simplified data\n * @returns {Mixed}\n */\nconst getSubsetOfData = (sourceData, selector) => (_.isFunction(selector)\n ? selector(sourceData)\n : lodashGet(sourceData, selector));\n\n/**\n * Takes a collection of items (eg. {testKey_1:{a:'a'}, testKey_2:{b:'b'}})\n * and runs it through a reducer function to return a subset of the data according to a selector.\n * The resulting collection will only contain items that are returned by the selector.\n * @param {Object} collection\n * @param {String|Function} selector (see method docs for getSubsetOfData() for full details)\n * @returns {Object}\n */\nconst reduceCollectionWithSelector = (collection, selector) => _.reduce(collection, (finalCollection, item, key) => {\n // eslint-disable-next-line no-param-reassign\n finalCollection[key] = getSubsetOfData(item, selector);\n\n return finalCollection;\n}, {});\n\n/**\n * Get some data from the store\n *\n * @private\n * @param {string} key\n * @returns {Promise<*>}\n */\nfunction get(key) {\n // When we already have the value in cache - resolve right away\n if (cache.hasCacheForKey(key)) {\n return Promise.resolve(cache.getValue(key));\n }\n\n const taskName = `get:${key}`;\n\n // When a value retrieving task for this key is still running hook to it\n if (cache.hasPendingTask(taskName)) {\n return cache.getTaskPromise(taskName);\n }\n\n // Otherwise retrieve the value from storage and capture a promise to aid concurrent usages\n const promise = Storage.getItem(key)\n .then((val) => {\n cache.set(key, val);\n return val;\n })\n .catch(err => Logger.logInfo(`Unable to get item from persistent storage. Key: ${key} Error: ${err}`));\n\n return cache.captureTask(taskName, promise);\n}\n\n/**\n * Returns current key names stored in persisted storage\n * @private\n * @returns {Promise<string[]>}\n */\nfunction getAllKeys() {\n // When we've already read stored keys, resolve right away\n const storedKeys = cache.getAllKeys();\n if (storedKeys.length > 0) {\n return Promise.resolve(storedKeys);\n }\n\n const taskName = 'getAllKeys';\n\n // When a value retrieving task for all keys is still running hook to it\n if (cache.hasPendingTask(taskName)) {\n return cache.getTaskPromise(taskName);\n }\n\n // Otherwise retrieve the keys from storage and capture a promise to aid concurrent usages\n const promise = Storage.getAllKeys()\n .then((keys) => {\n _.each(keys, key => cache.addKey(key));\n return keys;\n });\n\n return cache.captureTask(taskName, promise);\n}\n\n/**\n * Checks to see if the a subscriber's supplied key\n * is associated with a collection of keys.\n *\n * @private\n * @param {String} key\n * @returns {Boolean}\n */\nfunction isCollectionKey(key) {\n return _.contains(_.values(onyxKeys.COLLECTION), key);\n}\n\n/**\n * @param {String} collectionKey\n * @param {String} key\n * @returns {Boolean}\n */\nfunction isCollectionMemberKey(collectionKey, key) {\n return Str.startsWith(key, collectionKey) && key.length > collectionKey.length;\n}\n\n/**\n * Checks to see if a provided key is the exact configured key of our connected subscriber\n * or if the provided key is a collection member key (in case our configured key is a \"collection key\")\n *\n * @private\n * @param {String} configKey\n * @param {String} key\n * @return {Boolean}\n */\nfunction isKeyMatch(configKey, key) {\n return isCollectionKey(configKey)\n ? Str.startsWith(key, configKey)\n : configKey === key;\n}\n\n/**\n * Checks to see if this key has been flagged as\n * safe for removal.\n *\n * @private\n * @param {String} testKey\n * @returns {Boolean}\n */\nfunction isSafeEvictionKey(testKey) {\n return _.some(evictionAllowList, key => isKeyMatch(key, testKey));\n}\n\n/**\n * Remove a key from the recently accessed key list.\n *\n * @private\n * @param {String} key\n */\nfunction removeLastAccessedKey(key) {\n recentlyAccessedKeys = _.without(recentlyAccessedKeys, key);\n}\n\n/**\n * Add a key to the list of recently accessed keys. The least\n * recently accessed key should be at the head and the most\n * recently accessed key at the tail.\n *\n * @private\n * @param {String} key\n */\nfunction addLastAccessedKey(key) {\n // Only specific keys belong in this list since we cannot remove an entire collection.\n if (isCollectionKey(key) || !isSafeEvictionKey(key)) {\n return;\n }\n\n removeLastAccessedKey(key);\n recentlyAccessedKeys.push(key);\n}\n\n/**\n * Removes a key previously added to this list\n * which will enable it to be deleted again.\n *\n * @private\n * @param {String} key\n * @param {Number} connectionID\n */\nfunction removeFromEvictionBlockList(key, connectionID) {\n evictionBlocklist[key] = _.without(evictionBlocklist[key] || [], connectionID);\n\n // Remove the key if there are no more subscribers\n if (evictionBlocklist[key].length === 0) {\n delete evictionBlocklist[key];\n }\n}\n\n/**\n * Keys added to this list can never be deleted.\n *\n * @private\n * @param {String} key\n * @param {Number} connectionID\n */\nfunction addToEvictionBlockList(key, connectionID) {\n removeFromEvictionBlockList(key, connectionID);\n\n if (!evictionBlocklist[key]) {\n evictionBlocklist[key] = [];\n }\n\n evictionBlocklist[key].push(connectionID);\n}\n\n/**\n * Take all the keys that are safe to evict and add them to\n * the recently accessed list when initializing the app. This\n * enables keys that have not recently been accessed to be\n * removed.\n *\n * @private\n * @returns {Promise}\n */\nfunction addAllSafeEvictionKeysToRecentlyAccessedList() {\n return getAllKeys()\n .then((keys) => {\n _.each(evictionAllowList, (safeEvictionKey) => {\n _.each(keys, (key) => {\n if (!isKeyMatch(safeEvictionKey, key)) {\n return;\n }\n addLastAccessedKey(key);\n });\n });\n });\n}\n\n/**\n * @private\n * @param {String} collectionKey\n * @returns {Object}\n */\nfunction getCachedCollection(collectionKey) {\n const collectionMemberKeys = _.filter(cache.getAllKeys(), (\n storedKey => isCollectionMemberKey(collectionKey, storedKey)\n ));\n\n return _.reduce(collectionMemberKeys, (prev, curr) => {\n const cachedValue = cache.getValue(curr);\n if (!cachedValue) {\n return prev;\n }\n\n // eslint-disable-next-line no-param-reassign\n prev[curr] = cachedValue;\n return prev;\n }, {});\n}\n\n/**\n * When a collection of keys change, search for any callbacks matching the collection key and trigger those callbacks\n *\n * @private\n * @param {String} collectionKey\n * @param {Object} partialCollection - a partial collection of grouped member keys\n */\nfunction keysChanged(collectionKey, partialCollection) {\n // We are iterating over all subscribers similar to keyChanged(). However, we are looking for subscribers who are subscribing to either a collection key or\n // individual collection key member for the collection that is being updated. It is important to note that the collection parameter cane be a PARTIAL collection\n // and does not represent all of the combined keys and values for a collection key. It is just the \"new\" data that was merged in via mergeCollection().\n const stateMappingKeys = _.keys(callbackToStateMapping);\n for (let i = 0; i < stateMappingKeys.length; i++) {\n const subscriber = callbackToStateMapping[stateMappingKeys[i]];\n if (!subscriber) {\n continue;\n }\n\n // Skip iteration if we do not have a collection key or a collection member key on this subscriber\n if (!Str.startsWith(subscriber.key, collectionKey)) {\n continue;\n }\n\n /**\n * e.g. Onyx.connect({key: ONYXKEYS.COLLECTION.REPORT, callback: ...});\n */\n const isSubscribedToCollectionKey = subscriber.key === collectionKey;\n\n /**\n * e.g. Onyx.connect({key: `${ONYXKEYS.COLLECTION.REPORT}{reportID}`, callback: ...});\n */\n const isSubscribedToCollectionMemberKey = isCollectionMemberKey(collectionKey, subscriber.key);\n\n // We prepare the \"cached collection\" which is the entire collection + the new partial data that\n // was merged in via mergeCollection().\n const cachedCollection = getCachedCollection(collectionKey);\n\n // Regular Onyx.connect() subscriber found.\n if (_.isFunction(subscriber.callback)) {\n // If they are subscribed to the collection key and using waitForCollectionCallback then we'll\n // send the whole cached collection.\n if (isSubscribedToCollectionKey) {\n if (subscriber.waitForCollectionCallback) {\n subscriber.callback(cachedCollection);\n continue;\n }\n\n // If they are not using waitForCollectionCallback then we notify the subscriber with\n // the new merged data but only for any keys in the partial collection.\n const dataKeys = _.keys(partialCollection);\n for (let j = 0; j < dataKeys.length; j++) {\n const dataKey = dataKeys[j];\n subscriber.callback(cachedCollection[dataKey], dataKey);\n }\n continue;\n }\n\n // And if the subscriber is specifically only tracking a particular collection member key then we will\n // notify them with the cached data for that key only.\n if (isSubscribedToCollectionMemberKey) {\n subscriber.callback(cachedCollection[subscriber.key], subscriber.key);\n continue;\n }\n\n continue;\n }\n\n // React component subscriber found.\n if (subscriber.withOnyxInstance) {\n // We are subscribed to a collection key so we must update the data in state with the new\n // collection member key values from the partial update.\n if (isSubscribedToCollectionKey) {\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousData = reduceCollectionWithSelector(prevState[subscriber.statePropertyName], subscriber.selector);\n const newData = reduceCollectionWithSelector(cachedCollection, subscriber.selector);\n\n if (!deepEqual(previousData, newData)) {\n return {\n [subscriber.statePropertyName]: newData,\n };\n }\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const finalCollection = _.clone(prevState[subscriber.statePropertyName] || {});\n const dataKeys = _.keys(partialCollection);\n for (let j = 0; j < dataKeys.length; j++) {\n const dataKey = dataKeys[j];\n finalCollection[dataKey] = cachedCollection[dataKey];\n }\n\n PerformanceUtils.logSetStateCall(subscriber, prevState[subscriber.statePropertyName], finalCollection, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: finalCollection,\n };\n });\n continue;\n }\n\n // If a React component is only interested in a single key then we can set the cached value directly to the state name.\n if (isSubscribedToCollectionMemberKey) {\n // However, we only want to update this subscriber if the partial data contains a change.\n // Otherwise, we would update them with a value they already have and trigger an unnecessary re-render.\n const dataFromCollection = partialCollection[subscriber.key];\n if (_.isUndefined(dataFromCollection)) {\n continue;\n }\n\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector and the state should only change when the subset of data changes from what\n // it was previously.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const prevData = prevState[subscriber.statePropertyName];\n const newData = getSubsetOfData(cachedCollection[subscriber.key], subscriber.selector);\n if (!deepEqual(prevData, newData)) {\n PerformanceUtils.logSetStateCall(subscriber, prevData, newData, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: newData,\n };\n }\n\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const data = cachedCollection[subscriber.key];\n const previousData = prevState[subscriber.statePropertyName];\n if (data === previousData) {\n return null;\n }\n\n PerformanceUtils.logSetStateCall(subscriber, previousData, data, 'keysChanged', collectionKey);\n return {\n [subscriber.statePropertyName]: data,\n };\n });\n }\n }\n }\n}\n\n/**\n * When a key change happens, search for any callbacks matching the key or collection key and trigger those callbacks\n *\n * @example\n * keyChanged(key, value, subscriber => subscriber.initWithStoredValues === false)\n *\n * @private\n * @param {String} key\n * @param {*} data\n * @param {Function} [canUpdateSubscriber] only subscribers that pass this truth test will be updated\n */\nfunction keyChanged(key, data, canUpdateSubscriber) {\n // Add or remove this key from the recentlyAccessedKeys lists\n if (!_.isNull(data)) {\n addLastAccessedKey(key);\n } else {\n removeLastAccessedKey(key);\n }\n\n // We are iterating over all subscribers to see if they are interested in the key that has just changed. If the subscriber's key is a collection key then we will\n // notify them if the key that changed is a collection member. Or if it is a regular key notify them when there is an exact match. Depending on whether the subscriber\n // was connected via withOnyx we will call setState() directly on the withOnyx instance. If it is a regular connection we will pass the data to the provided callback.\n const stateMappingKeys = _.keys(callbackToStateMapping);\n for (let i = 0; i < stateMappingKeys.length; i++) {\n const subscriber = callbackToStateMapping[stateMappingKeys[i]];\n if (!subscriber || !isKeyMatch(subscriber.key, key) || (_.isFunction(canUpdateSubscriber) && !canUpdateSubscriber(subscriber))) {\n continue;\n }\n\n // Subscriber is a regular call to connect() and provided a callback\n if (_.isFunction(subscriber.callback)) {\n if (isCollectionKey(subscriber.key) && subscriber.waitForCollectionCallback) {\n const cachedCollection = getCachedCollection(subscriber.key);\n cachedCollection[key] = data;\n subscriber.callback(cachedCollection);\n continue;\n }\n\n subscriber.callback(data, key);\n continue;\n }\n\n // Subscriber connected via withOnyx() HOC\n if (subscriber.withOnyxInstance) {\n // Check if we are subscribing to a collection key and overwrite the collection member key value in state\n if (isCollectionKey(subscriber.key)) {\n // If the subscriber has a selector, then the consumer of this data must only be given the data\n // returned by the selector and only when the selected data has changed.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const prevData = prevState[subscriber.statePropertyName];\n const newData = {\n [key]: getSubsetOfData(data, subscriber.selector),\n };\n const prevDataWithNewData = {\n ...prevData,\n [key]: getSubsetOfData(data, subscriber.selector),\n };\n if (!deepEqual(prevData, prevDataWithNewData)) {\n PerformanceUtils.logSetStateCall(subscriber, prevData, newData, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: prevDataWithNewData,\n };\n }\n return null;\n });\n continue;\n }\n\n subscriber.withOnyxInstance.setState((prevState) => {\n const collection = prevState[subscriber.statePropertyName] || {};\n const newCollection = {\n ...collection,\n [key]: data,\n };\n PerformanceUtils.logSetStateCall(subscriber, collection, newCollection, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: newCollection,\n };\n });\n continue;\n }\n\n // If the subscriber has a selector, then the component's state must only be updated with the data\n // returned by the selector and only if the selected data has changed.\n if (subscriber.selector) {\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousValue = getSubsetOfData(prevState[subscriber.statePropertyName], subscriber.selector);\n const newValue = getSubsetOfData(data, subscriber.selector);\n if (!deepEqual(previousValue, newValue)) {\n return {\n [subscriber.statePropertyName]: newValue,\n };\n }\n return null;\n });\n continue;\n }\n\n // If we did not match on a collection key then we just set the new data to the state property\n subscriber.withOnyxInstance.setState((prevState) => {\n const previousData = prevState[subscriber.statePropertyName];\n if (previousData === data) {\n return null;\n }\n\n PerformanceUtils.logSetStateCall(subscriber, previousData, data, 'keyChanged', key);\n return {\n [subscriber.statePropertyName]: data,\n };\n });\n continue;\n }\n\n console.error('Warning: Found a matching subscriber to a key that changed, but no callback or withOnyxInstance could be found.');\n }\n}\n\n/**\n * Sends the data obtained from the keys to the connection. It either:\n * - sets state on the withOnyxInstances\n * - triggers the callback function\n *\n * @private\n * @param {Object} mapping\n * @param {Object} [mapping.withOnyxInstance]\n * @param {String} [mapping.statePropertyName]\n * @param {Function} [mapping.callback]\n * @param {String} [mapping.selector]\n * @param {*|null} val\n * @param {String} matchedKey\n */\nfunction sendDataToConnection(mapping, val, matchedKey) {\n // If the mapping no longer exists then we should not send any data.\n // This means our subscriber disconnected or withOnyx wrapped component unmounted.\n if (!callbackToStateMapping[mapping.connectionID]) {\n return;\n }\n\n if (mapping.withOnyxInstance) {\n let newData = val;\n\n // If the mapping has a selector, then the component's state must only be updated with the data\n // returned by the selector.\n if (mapping.selector) {\n if (isCollectionKey(mapping.key)) {\n newData = reduceCollectionWithSelector(val, mapping.selector);\n } else {\n newData = getSubsetOfData(val, mapping.selector);\n }\n }\n\n PerformanceUtils.logSetStateCall(mapping, null, newData, 'sendDataToConnection');\n mapping.withOnyxInstance.setWithOnyxState(mapping.statePropertyName, newData);\n return;\n }\n\n if (_.isFunction(mapping.callback)) {\n mapping.callback(val, matchedKey);\n }\n}\n\n/**\n * We check to see if this key is flagged as safe for eviction and add it to the recentlyAccessedKeys list so that when we\n * run out of storage the least recently accessed key can be removed.\n *\n * @private\n * @param {Object} mapping\n */\nfunction addKeyToRecentlyAccessedIfNeeded(mapping) {\n if (!isSafeEvictionKey(mapping.key)) {\n return;\n }\n\n // Try to free some cache whenever we connect to a safe eviction key\n cache.removeLeastRecentlyUsedKeys();\n\n if (mapping.withOnyxInstance && !isCollectionKey(mapping.key)) {\n // All React components subscribing to a key flagged as a safe eviction key must implement the canEvict property.\n if (_.isUndefined(mapping.canEvict)) {\n throw new Error(\n `Cannot subscribe to safe eviction key '${mapping.key}' without providing a canEvict value.`,\n );\n }\n\n addLastAccessedKey(mapping.key);\n }\n}\n\n/**\n * Gets the data for a given an array of matching keys, combines them into an object, and sends the result back to the subscriber.\n *\n * @private\n * @param {Array} matchingKeys\n * @param {Object} mapping\n */\nfunction getCollectionDataAndSendAsObject(matchingKeys, mapping) {\n Promise.all(_.map(matchingKeys, key => get(key)))\n .then(values => _.reduce(values, (finalObject, value, i) => {\n // eslint-disable-next-line no-param-reassign\n finalObject[matchingKeys[i]] = value;\n return finalObject;\n }, {}))\n .then(val => sendDataToConnection(mapping, val));\n}\n\n/**\n * Subscribes a react component's state directly to a store key\n *\n * @example\n * const connectionID = Onyx.connect({\n * key: ONYXKEYS.SESSION,\n * callback: onSessionChange,\n * });\n *\n * @param {Object} mapping the mapping information to connect Onyx to the components state\n * @param {String} mapping.key ONYXKEY to subscribe to\n * @param {String} [mapping.statePropertyName] the name of the property in the state to connect the data to\n * @param {Object} [mapping.withOnyxInstance] whose setState() method will be called with any changed data\n * This is used by React components to connect to Onyx\n * @param {Function} [mapping.callback] a method that will be called with changed data\n * This is used by any non-React code to connect to Onyx\n * @param {Boolean} [mapping.initWithStoredValues] If set to false, then no data will be prefilled into the\n * component\n * @param {Boolean} [mapping.waitForCollectionCallback] If set to true, it will return the entire collection to the callback as a single object\n * @param {String|Function} [mapping.selector] THIS PARAM IS ONLY USED WITH withOnyx(). If included, this will be used to subscribe to a subset of an Onyx key's data.\n * If the selector is a string, the selector is passed to lodashGet on the sourceData. If the selector is a function, the sourceData is passed to the selector and should return the\n * simplified data. Using this setting on `withOnyx` can have very positive performance benefits because the component will only re-render when the subset of data changes.\n * Otherwise, any change of data on any property would normally cause the component to re-render (and that can be expensive from a performance standpoint).\n * @returns {Number} an ID to use when calling disconnect\n */\nfunction connect(mapping) {\n const connectionID = lastConnectionID++;\n callbackToStateMapping[connectionID] = mapping;\n callbackToStateMapping[connectionID].connectionID = connectionID;\n\n if (mapping.initWithStoredValues === false) {\n return connectionID;\n }\n\n // Commit connection only after init passes\n deferredInitTask.promise\n .then(() => addKeyToRecentlyAccessedIfNeeded(mapping))\n .then(getAllKeys)\n .then((keys) => {\n // We search all the keys in storage to see if any are a \"match\" for the subscriber we are connecting so that we\n // can send data back to the subscriber. Note that multiple keys can match as a subscriber could either be\n // subscribed to a \"collection key\" or a single key.\n const matchingKeys = _.filter(keys, key => isKeyMatch(mapping.key, key));\n\n // If the key being connected to does not exist we initialize the value with null. For subscribers that connected\n // directly via connect() they will simply get a null value sent to them without any information about which key matched\n // since there are none matched. In withOnyx() we wait for all connected keys to return a value before rendering the child\n // component. This null value will be filtered out so that the connected component can utilize defaultProps.\n if (matchingKeys.length === 0) {\n sendDataToConnection(mapping, null);\n return;\n }\n\n // When using a callback subscriber we will either trigger the provided callback for each key we find or combine all values\n // into an object and just make a single call. The latter behavior is enabled by providing a waitForCollectionCallback key\n // combined with a subscription to a collection key.\n if (_.isFunction(mapping.callback)) {\n if (isCollectionKey(mapping.key)) {\n if (mapping.waitForCollectionCallback) {\n getCollectionDataAndSendAsObject(matchingKeys, mapping);\n return;\n }\n\n // We did not opt into using waitForCollectionCallback mode so the callback is called for every matching key.\n for (let i = 0; i < matchingKeys.length; i++) {\n get(matchingKeys[i]).then(val => sendDataToConnection(mapping, val, matchingKeys[i]));\n }\n return;\n }\n\n // If we are not subscribed to a collection key then there's only a single key to send an update for.\n get(mapping.key).then(val => sendDataToConnection(mapping, val, mapping.key));\n return;\n }\n\n // If we have a withOnyxInstance that means a React component has subscribed via the withOnyx() HOC and we need to\n // group collection key member data into an object.\n if (mapping.withOnyxInstance) {\n if (isCollectionKey(mapping.key)) {\n getCollectionDataAndSendAsObject(matchingKeys, mapping);\n return;\n }\n\n // If the subscriber is not using a collection key then we just send a single value back to the subscriber\n get(mapping.key).then(val => sendDataToConnection(mapping, val, mapping.key));\n return;\n }\n\n console.error('Warning: Onyx.connect() was found without a callback or withOnyxInstance');\n });\n\n // The connectionID is returned back to the caller so that it can be used to clean up the connection when it's no longer needed\n // by calling Onyx.disconnect(connectionID).\n return connectionID;\n}\n\n/**\n * Remove the listener for a react component\n * @example\n * Onyx.disconnect(connectionID);\n *\n * @param {Number} connectionID unique id returned by call to Onyx.connect()\n * @param {String} [keyToRemoveFromEvictionBlocklist]\n */\nfunction disconnect(connectionID, keyToRemoveFromEvictionBlocklist) {\n if (!callbackToStateMapping[connectionID]) {\n return;\n }\n\n // Remove this key from the eviction block list as we are no longer\n // subscribing to it and it should be safe to delete again\n if (keyToRemoveFromEvictionBlocklist) {\n removeFromEvictionBlockList(keyToRemoveFromEvictionBlocklist, connectionID);\n }\n\n delete callbackToStateMapping[connectionID];\n}\n\n/**\n * This method mostly exists for historical reasons as this library was initially designed without a memory cache and one was added later.\n * For this reason, Onyx works more similar to what you might expect from a native AsyncStorage with reads, writes, etc all becoming\n * available async. Since we have code in our main applications that might expect things to work this way it's not safe to change this\n * behavior just yet.\n *\n * @example\n * notifySubscribersOnNextTick(key, value, subscriber => subscriber.initWithStoredValues === false)\n *\n * @param {String} key\n * @param {*} value\n * @param {Function} [canUpdateSubscriber] only subscribers that pass this truth test will be updated\n */\n// eslint-disable-next-line rulesdir/no-negated-variables\nfunction notifySubscribersOnNextTick(key, value, canUpdateSubscriber) {\n Promise.resolve().then(() => keyChanged(key, value, canUpdateSubscriber));\n}\n\n/**\n * This method is similar to notifySubscribersOnNextTick but it is built for working specifically with collections\n * so that keysChanged() is triggered for the collection and not keyChanged(). If this was not done, then the\n * subscriber callbacks receive the data in a different format than they normally expect and it breaks code.\n *\n * @param {String} key\n * @param {*} value\n */\n// eslint-disable-next-line rulesdir/no-negated-variables\nfunction notifyCollectionSubscribersOnNextTick(key, value) {\n Promise.resolve().then(() => keysChanged(key, value));\n}\n\n/**\n * Remove a key from Onyx and update the subscribers\n *\n * @private\n * @param {String} key\n * @return {Promise}\n */\nfunction remove(key) {\n cache.drop(key);\n notifySubscribersOnNextTick(key, null);\n return Storage.removeItem(key);\n}\n\n/**\n * If we fail to set or merge we must handle this by\n * evicting some data from Onyx and then retrying to do\n * whatever it is we attempted to do.\n *\n * @private\n * @param {Error} error\n * @param {Function} onyxMethod\n * @param {...any} args\n * @return {Promise}\n */\nfunction evictStorageAndRetry(error, onyxMethod, ...args) {\n Logger.logInfo(`Handled error: ${error}`);\n\n if (error && Str.startsWith(error.message, 'Failed to execute \\'put\\' on \\'IDBObjectStore\\'')) {\n Logger.logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.');\n throw error;\n }\n\n // Find the first key that we can remove that has no subscribers in our blocklist\n const keyForRemoval = _.find(recentlyAccessedKeys, key => !evictionBlocklist[key]);\n\n if (!keyForRemoval) {\n Logger.logAlert('Out of storage. But found no acceptable keys to remove.');\n throw error;\n }\n\n // Remove the least recently viewed key that is not currently being accessed and retry.\n Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying.`);\n return remove(keyForRemoval)\n .then(() => onyxMethod(...args));\n}\n\n/**\n * Write a value to our store with the given key\n *\n * @param {String} key ONYXKEY to set\n * @param {*} value value to store\n *\n * @returns {Promise}\n */\nfunction set(key, value) {\n if (_.isNull(value)) {\n return remove(key);\n }\n\n // eslint-disable-next-line no-use-before-define\n if (hasPendingMergeForKey(key)) {\n Logger.logAlert(`Onyx.set() called after Onyx.merge() for key: ${key}. It is recommended to use set() or merge() not both.`);\n }\n\n // If the value in the cache is the same as what we have then do not update subscribers unless they\n // have initWithStoredValues: false then they MUST get all updates even if nothing has changed.\n if (!cache.hasValueChanged(key, value)) {\n cache.addToAccessedKeys(key);\n notifySubscribersOnNextTick(key, value, subscriber => subscriber.initWithStoredValues === false);\n return Promise.resolve();\n }\n\n // Adds the key to cache when it's not available\n cache.set(key, value);\n notifySubscribersOnNextTick(key, value);\n\n // Write the thing to persistent storage, which will trigger a storage event for any other tabs open on this domain\n return Storage.setItem(key, value)\n .catch(error => evictStorageAndRetry(error, set, key, value));\n}\n\n/**\n * Storage expects array like: [[\"@MyApp_user\", value_1], [\"@MyApp_key\", value_2]]\n * This method transforms an object like {'@MyApp_user': myUserValue, '@MyApp_key': myKeyValue}\n * to an array of key-value pairs in the above format\n * @private\n * @param {Record} data\n * @return {Array} an array of key - value pairs <[key, value]>\n */\nfunction prepareKeyValuePairsForStorage(data) {\n return _.map(data, (value, key) => [key, value]);\n}\n\n/**\n * Sets multiple keys and values\n *\n * @example Onyx.multiSet({'key1': 'a', 'key2': 'b'});\n *\n * @param {Object} data object keyed by ONYXKEYS and the values to set\n * @returns {Promise}\n */\nfunction multiSet(data) {\n const keyValuePairs = prepareKeyValuePairsForStorage(data);\n\n _.each(data, (val, key) => {\n // Update cache and optimistically inform subscribers on the next tick\n cache.set(key, val);\n notifySubscribersOnNextTick(key, val);\n });\n\n return Storage.multiSet(keyValuePairs)\n .catch(error => evictStorageAndRetry(error, multiSet, data));\n}\n\n// Key/value store of Onyx key and arrays of values to merge\nconst mergeQueue = {};\n\n/**\n * @private\n * @param {String} key\n * @returns {Boolean}\n */\nfunction hasPendingMergeForKey(key) {\n return Boolean(mergeQueue[key]);\n}\n\n/**\n * Given an Onyx key and value this method will combine all queued\n * value updates and return a single value. Merge attempts are\n * batched. They must occur after a single call to get() so we\n * can avoid race conditions.\n *\n * @private\n * @param {String} key\n * @param {*} data\n *\n * @returns {*}\n */\nfunction applyMerge(key, data) {\n const mergeValues = mergeQueue[key];\n if (_.isArray(data) || _.every(mergeValues, _.isArray)) {\n // Array values will always just concatenate\n // more items onto the end of the array\n return _.reduce(mergeValues, (modifiedData, mergeValue) => [\n ...modifiedData,\n ...mergeValue,\n ], data || []);\n }\n\n if (_.isObject(data) || _.every(mergeValues, _.isObject)) {\n // Object values are merged one after the other\n return _.reduce(mergeValues, (modifiedData, mergeValue) => {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n const newData = Object.assign({}, fastMerge(modifiedData, mergeValue));\n\n // We will also delete any object keys that are undefined or null.\n // Deleting keys is not supported by AsyncStorage so we do it this way.\n // Remove all first level keys that are explicitly set to null.\n return _.omit(newData, (value, finalObjectKey) => _.isNull(mergeValue[finalObjectKey]));\n }, data || {});\n }\n\n // If we have anything else we can't merge it so we'll\n // simply return the last value that was queued\n return _.last(mergeValues);\n}\n\n/**\n * Merge a new value into an existing value at a key.\n *\n * The types of values that can be merged are `Object` and `Array`. To set another type of value use `Onyx.set()`. Merge\n * behavior uses lodash/merge under the hood for `Object` and simple concatenation for `Array`. However, it's important\n * to note that if you have an array value property on an `Object` that the default behavior of lodash/merge is not to\n * concatenate. See here: https://github.com/lodash/lodash/issues/2872\n *\n * Calls to `Onyx.merge()` are batched so that any calls performed in a single tick will stack in a queue and get\n * applied in the order they were called. Note: `Onyx.set()` calls do not work this way so use caution when mixing\n * `Onyx.merge()` and `Onyx.set()`.\n *\n * @example\n * Onyx.merge(ONYXKEYS.EMPLOYEE_LIST, ['Joe']); // -> ['Joe']\n * Onyx.merge(ONYXKEYS.EMPLOYEE_LIST, ['Jack']); // -> ['Joe', 'Jack']\n * Onyx.merge(ONYXKEYS.POLICY, {id: 1}); // -> {id: 1}\n * Onyx.merge(ONYXKEYS.POLICY, {name: 'My Workspace'}); // -> {id: 1, name: 'My Workspace'}\n *\n * @param {String} key ONYXKEYS key\n * @param {(Object|Array)} value Object or Array value to merge\n * @returns {Promise}\n */\nfunction merge(key, value) {\n if (mergeQueue[key]) {\n mergeQueue[key].push(value);\n return Promise.resolve();\n }\n\n mergeQueue[key] = [value];\n return get(key)\n .then((data) => {\n try {\n const modifiedData = applyMerge(key, data);\n\n // Clean up the write queue so we\n // don't apply these changes again\n delete mergeQueue[key];\n\n return set(key, modifiedData);\n } catch (error) {\n Logger.logAlert(`An error occurred while applying merge for key: ${key}, Error: ${error}`);\n }\n\n return Promise.resolve();\n });\n}\n\n/**\n * Merge user provided default key value pairs.\n * @private\n * @returns {Promise}\n */\nfunction initializeWithDefaultKeyStates() {\n return Storage.multiGet(_.keys(defaultKeyStates))\n .then((pairs) => {\n const asObject = _.object(pairs);\n\n const merged = fastMerge(asObject, defaultKeyStates);\n cache.merge(merged);\n _.each(merged, (val, key) => keyChanged(key, val));\n });\n}\n\n/**\n * Clear out all the data in the store\n *\n * Note that calling Onyx.clear() and then Onyx.set() on a key with a default\n * key state may store an unexpected value in Storage.\n *\n * E.g.\n * Onyx.clear();\n * Onyx.set(ONYXKEYS.DEFAULT_KEY, 'default');\n * Storage.getItem(ONYXKEYS.DEFAULT_KEY)\n * .then((storedValue) => console.log(storedValue));\n * null is logged instead of the expected 'default'\n *\n * Onyx.set() might call Storage.setItem() before Onyx.clear() calls\n * Storage.setItem(). Use Onyx.merge() instead if possible. Onyx.merge() calls\n * Onyx.get(key) before calling Storage.setItem() via Onyx.set().\n * Storage.setItem() from Onyx.clear() will have already finished and the merged\n * value will be saved to storage after the default value.\n *\n * @param {Array} keysToPreserve is a list of ONYXKEYS that should not be cleared with the rest of the data\n * @returns {Promise<void>}\n */\nfunction clear(keysToPreserve = []) {\n return getAllKeys()\n .then((keys) => {\n const keyValuesToReset = [];\n const defaultKeys = _.keys(defaultKeyStates);\n\n // The only keys that should not be cleared are:\n // 1. Anything specifically passed in keysToPreserve (because some keys like language preferences, offline\n // status, or activeClients need to remain in Onyx even when signed out)\n // 2. Any keys with a default state (because they need to remain in Onyx as their default, and setting them\n // to null would cause unknown behavior)\n const keysToClear = _.difference(keys, keysToPreserve, defaultKeys);\n keyValuesToReset.push(..._.map(keysToClear, key => [key, null]));\n\n // Remove any keysToPreserve from the defaultKeyStates because if they are passed in it has been explicitly\n // called out to preserve those values instead of resetting them back\n // to the default.\n const defaultKeyValuePairs = _.pairs(_.omit(defaultKeyStates, ...keysToPreserve));\n\n // Add the default key value pairs to the keyValuesToReset so that they get set back to their default values\n // when we clear Onyx\n keyValuesToReset.push(...defaultKeyValuePairs);\n\n // We now have all the key/values that need to be reset, but we're not done yet!\n // There will be two groups of key/values and they each need to be updated a little bit differently.\n // Collection keys need to be notified differently than non collection keys\n const keyValuesToResetAsCollection = {};\n const keyValuesToResetIndividually = {};\n\n // Make sure that we also reset the cache values before clearing the values from storage.\n // We do this before clearing Storage so that any call to clear() followed by merge() on a key with a\n // default state results in the merged value getting saved, since the update from the merge() call would\n // happen on the tick after the update from this clear()\n _.each(keyValuesToReset, (keyValue) => {\n const key = keyValue[0];\n const value = keyValue[1];\n cache.set(key, value);\n\n const collectionKey = key.substring(0, key.indexOf('_') + 1);\n if (collectionKey) {\n if (!keyValuesToResetAsCollection[collectionKey]) {\n keyValuesToResetAsCollection[collectionKey] = {};\n }\n keyValuesToResetAsCollection[collectionKey][key] = value;\n return;\n }\n\n keyValuesToResetIndividually[key] = value;\n });\n\n // Notify the subscribers for each key/value group so they can receive the new values\n _.each(keyValuesToResetIndividually, (value, key) => {\n notifySubscribersOnNextTick(key, value);\n });\n _.each(keyValuesToResetAsCollection, (value, key) => {\n notifyCollectionSubscribersOnNextTick(key, value);\n });\n\n return Storage.multiSet(keyValuesToReset);\n });\n}\n\n/**\n * Merges a collection based on their keys\n *\n * @example\n *\n * Onyx.mergeCollection(ONYXKEYS.COLLECTION.REPORT, {\n * [`${ONYXKEYS.COLLECTION.REPORT}1`]: report1,\n * [`${ONYXKEYS.COLLECTION.REPORT}2`]: report2,\n * });\n *\n * @param {String} collectionKey e.g. `ONYXKEYS.COLLECTION.REPORT`\n * @param {Object} collection Object collection keyed by individual collection member keys and values\n * @returns {Promise}\n */\nfunction mergeCollection(collectionKey, collection) {\n if (!_.isObject(collection) || _.isArray(collection) || _.isEmpty(collection)) {\n Logger.logInfo('mergeCollection() called with invalid or empty value. Skipping this update.');\n return Promise.resolve();\n }\n\n // Confirm all the collection keys belong to the same parent\n _.each(collection, (_data, dataKey) => {\n if (isKeyMatch(collectionKey, dataKey)) {\n return;\n }\n\n throw new Error(`Provided collection doesn't have all its data belonging to the same parent. CollectionKey: ${collectionKey}, DataKey: ${dataKey}`);\n });\n\n return getAllKeys()\n .then((persistedKeys) => {\n // Split to keys that exist in storage and keys that don't\n const [existingKeys, newKeys] = _.chain(collection)\n .keys()\n .partition(key => persistedKeys.includes(key))\n .value();\n\n const existingKeyCollection = _.pick(collection, existingKeys);\n const newCollection = _.pick(collection, newKeys);\n const keyValuePairsForExistingCollection = prepareKeyValuePairsForStorage(existingKeyCollection);\n const keyValuePairsForNewCollection = prepareKeyValuePairsForStorage(newCollection);\n\n const promises = [];\n\n // New keys will be added via multiSet while existing keys will be updated using multiMerge\n // This is because setting a key that doesn't exist yet with multiMerge will throw errors\n if (keyValuePairsForExistingCollection.length > 0) {\n promises.push(Storage.multiMerge(keyValuePairsForExistingCollection));\n }\n\n if (keyValuePairsForNewCollection.length > 0) {\n promises.push(Storage.multiSet(keyValuePairsForNewCollection));\n }\n\n // Prefill cache if necessary by calling get() on any existing keys and then merge original data to cache\n // and update all subscribers\n Promise.all(_.map(existingKeys, get)).then(() => {\n cache.merge(collection);\n keysChanged(collectionKey, collection);\n });\n\n return Promise.all(promises)\n .catch(error => evictStorageAndRetry(error, mergeCollection, collection));\n });\n}\n\n/**\n * Insert API responses and lifecycle data into Onyx\n *\n * @param {Array} data An array of objects with shape {onyxMethod: oneOf('set', 'merge', 'mergeCollection'), key: string, value: *}\n * @returns {Promise} resolves when all operations are complete\n */\nfunction update(data) {\n // First, validate the Onyx object is in the format we expect\n _.each(data, ({onyxMethod, key}) => {\n if (!_.contains([METHOD.CLEAR, METHOD.SET, METHOD.MERGE, METHOD.MERGE_COLLECTION], onyxMethod)) {\n throw new Error(`Invalid onyxMethod ${onyxMethod} in Onyx update.`);\n }\n if (onyxMethod !== METHOD.CLEAR && !_.isString(key)) {\n throw new Error(`Invalid ${typeof key} key provided in Onyx update. Onyx key must be of type string.`);\n }\n });\n\n const promises = [];\n\n _.each(data, ({onyxMethod, key, value}) => {\n switch (onyxMethod) {\n case METHOD.SET:\n promises.push(set(key, value));\n break;\n case METHOD.MERGE:\n promises.push(merge(key, value));\n break;\n case METHOD.MERGE_COLLECTION:\n promises.push(mergeCollection(key, value));\n break;\n case METHOD.CLEAR:\n promises.push(clear());\n break;\n default:\n break;\n }\n });\n\n return Promise.all(promises);\n}\n\n/**\n * Initialize the store with actions and listening for storage events\n *\n * @param {Object} [options={}] config object\n * @param {Object} [options.keys={}] `ONYXKEYS` constants object\n * @param {Object} [options.initialKeyStates={}] initial data to set when `init()` and `clear()` is called\n * @param {String[]} [options.safeEvictionKeys=[]] This is an array of keys\n * (individual or collection patterns) that when provided to Onyx are flagged\n * as \"safe\" for removal. Any components subscribing to these keys must also\n * implement a canEvict option. See the README for more info.\n * @param {Number} [options.maxCachedKeysCount=55] Sets how many recent keys should we try to keep in cache\n * Setting this to 0 would practically mean no cache\n * We try to free cache when we connect to a safe eviction key\n * @param {Boolean} [options.captureMetrics] Enables Onyx benchmarking and exposes the get/print/reset functions\n * @param {Boolean} [options.shouldSyncMultipleInstances] Auto synchronize storage events between multiple instances\n * of Onyx running in different tabs/windows. Defaults to true for platforms that support local storage (web/desktop)\n * @param {Boolean} [options.debugSetState] Enables debugging setState() calls to connected components.\n * @example\n * Onyx.init({\n * keys: ONYXKEYS,\n * initialKeyStates: {\n * [ONYXKEYS.SESSION]: {loading: false},\n * },\n * });\n */\nfunction init({\n keys = {},\n initialKeyStates = {},\n safeEvictionKeys = [],\n maxCachedKeysCount = 1000,\n captureMetrics = false,\n shouldSyncMultipleInstances = Boolean(global.localStorage),\n debugSetState = false,\n} = {}) {\n if (captureMetrics) {\n // The code here is only bundled and applied when the captureMetrics is set\n // eslint-disable-next-line no-use-before-define\n applyDecorators();\n }\n\n if (debugSetState) {\n PerformanceUtils.setShouldDebugSetState(true);\n }\n\n if (maxCachedKeysCount > 0) {\n cache.setRecentKeysLimit(maxCachedKeysCount);\n }\n\n // Let Onyx know about all of our keys\n onyxKeys = keys;\n\n // Set our default key states to use when initializing and clearing Onyx data\n defaultKeyStates = initialKeyStates;\n\n // Let Onyx know about which keys are safe to evict\n evictionAllowList = safeEvictionKeys;\n\n // Initialize all of our keys with data provided then give green light to any pending connections\n Promise.all([\n addAllSafeEvictionKeysToRecentlyAccessedList(),\n initializeWithDefaultKeyStates(),\n ])\n .then(deferredInitTask.resolve);\n\n if (shouldSyncMultipleInstances && _.isFunction(Storage.keepInstancesSync)) {\n Storage.keepInstancesSync((key, value) => {\n cache.set(key, value);\n keyChanged(key, value);\n });\n }\n}\n\nconst Onyx = {\n connect,\n disconnect,\n set,\n multiSet,\n merge,\n mergeCollection,\n update,\n clear,\n getAllKeys,\n init,\n registerLogger: Logger.registerLogger,\n addToEvictionBlockList,\n removeFromEvictionBlockList,\n isSafeEvictionKey,\n METHOD,\n};\n\n/**\n * Apply calls statistic decorators to benchmark Onyx\n *\n * @private\n */\nfunction applyDecorators() {\n // We're requiring the script dynamically here so that it's only evaluated when decorators are used\n const decorate = require('./metrics');\n\n // Re-assign with decorated functions\n /* eslint-disable no-func-assign */\n get = decorate.decorateWithMetrics(get, 'Onyx:get');\n set = decorate.decorateWithMetrics(set, 'Onyx:set');\n multiSet = decorate.decorateWithMetrics(multiSet, 'Onyx:multiSet');\n clear = decorate.decorateWithMetrics(clear, 'Onyx:clear');\n merge = decorate.decorateWithMetrics(merge, 'Onyx:merge');\n mergeCollection = decorate.decorateWithMetrics(mergeCollection, 'Onyx:mergeCollection');\n getAllKeys = decorate.decorateWithMetrics(getAllKeys, 'Onyx:getAllKeys');\n initializeWithDefaultKeyStates = decorate.decorateWithMetrics(initializeWithDefaultKeyStates, 'Onyx:defaults');\n update = decorate.decorateWithMetrics(update, 'Onyx:update');\n /* eslint-enable */\n\n // Re-expose decorated methods\n /* eslint-disable rulesdir/prefer-actions-set-data */\n Onyx.set = set;\n Onyx.multiSet = multiSet;\n Onyx.clear = clear;\n Onyx.merge = merge;\n Onyx.mergeCollection = mergeCollection;\n Onyx.update = update;\n /* eslint-enable */\n\n // Expose stats methods on Onyx\n Onyx.getMetrics = decorate.getMetrics;\n Onyx.resetMetrics = decorate.resetMetrics;\n Onyx.printMetrics = decorate.printMetrics;\n}\n\nexport default Onyx;\n","import _ from 'underscore';\nimport {deepEqual} from 'fast-equals';\nimport fastMerge from './fastMerge';\n\nconst isDefined = _.negate(_.isUndefined);\n\n/**\n * In memory cache providing data by reference\n * Encapsulates Onyx cache related functionality\n */\nclass OnyxCache {\n constructor() {\n /**\n * @private\n * Cache of all the storage keys available in persistent storage\n * @type {Set<string>}\n */\n this.storageKeys = new Set();\n\n /**\n * @private\n * Unique list of keys maintained in access order (most recent at the end)\n * @type {Set<string>}\n */\n this.recentKeys = new Set();\n\n /**\n * @private\n * A map of cached values\n * @type {Record<string, *>}\n */\n this.storageMap = {};\n\n /**\n * @private\n * Captured pending tasks for already running storage methods\n * @type {Record<string, Promise>}\n */\n this.pendingPromises = {};\n\n // bind all public methods to prevent problems with `this`\n _.bindAll(\n this,\n 'getAllKeys', 'getValue', 'hasCacheForKey', 'addKey', 'set', 'drop', 'merge',\n 'hasPendingTask', 'getTaskPromise', 'captureTask', 'removeLeastRecentlyUsedKeys',\n 'setRecentKeysLimit',\n );\n }\n\n /**\n * Get all the storage keys\n * @returns {string[]}\n */\n getAllKeys() {\n return Array.from(this.storageKeys);\n }\n\n /**\n * Get a cached value from storage\n * @param {string} key\n * @returns {*}\n */\n getValue(key) {\n this.addToAccessedKeys(key);\n return this.storageMap[key];\n }\n\n /**\n * Check whether cache has data for the given key\n * @param {string} key\n * @returns {boolean}\n */\n hasCacheForKey(key) {\n return isDefined(this.storageMap[key]);\n }\n\n /**\n * Saves a key in the storage keys list\n * Serves to keep the result of `getAllKeys` up to date\n * @param {string} key\n */\n addKey(key) {\n this.storageKeys.add(key);\n }\n\n /**\n * Set's a key value in cache\n * Adds the key to the storage keys list as well\n * @param {string} key\n * @param {*} value\n * @returns {*} value - returns the cache value\n */\n set(key, value) {\n this.addKey(key);\n this.addToAccessedKeys(key);\n this.storageMap[key] = value;\n\n return value;\n }\n\n /**\n * Forget the cached value for the given key\n * @param {string} key\n */\n drop(key) {\n delete this.storageMap[key];\n this.storageKeys.delete(key);\n this.recentKeys.delete(key);\n }\n\n /**\n * Deep merge data to cache, any non existing keys will be created\n * @param {Record<string, *>} data - a map of (cache) key - values\n */\n merge(data) {\n if (!_.isObject(data) || _.isArray(data)) {\n throw new Error('data passed to cache.merge() must be an Object of onyx key/value pairs');\n }\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n this.storageMap = Object.assign({}, fastMerge(this.storageMap, data));\n\n const storageKeys = this.getAllKeys();\n const mergedKeys = _.keys(data);\n this.storageKeys = new Set([...storageKeys, ...mergedKeys]);\n _.each(mergedKeys, key => this.addToAccessedKeys(key));\n }\n\n /**\n * Check whether the given task is already running\n * @param {string} taskName - unique name given for the task\n * @returns {*}\n */\n hasPendingTask(taskName) {\n return isDefined(this.pendingPromises[taskName]);\n }\n\n /**\n * Use this method to prevent concurrent calls for the same thing\n * Instead of calling the same task again use the existing promise\n * provided from this function\n * @template T\n * @param {string} taskName - unique name given for the task\n * @returns {Promise<T>}\n */\n getTaskPromise(taskName) {\n return this.pendingPromises[taskName];\n }\n\n /**\n * Capture a promise for a given task so other caller can\n * hook up to the promise if it's still pending\n * @template T\n * @param {string} taskName - unique name for the task\n * @param {Promise<T>} promise\n * @returns {Promise<T>}\n */\n captureTask(taskName, promise) {\n this.pendingPromises[taskName] = promise.finally(() => {\n delete this.pendingPromises[taskName];\n });\n\n return this.pendingPromises[taskName];\n }\n\n /**\n * @private\n * Adds a key to the top of the recently accessed keys\n * @param {string} key\n */\n addToAccessedKeys(key) {\n // Removing and re-adding a key ensures it's at the end of the list\n this.recentKeys.delete(key);\n this.recentKeys.add(key);\n }\n\n /**\n * Remove keys that don't fall into the range of recently used keys\n */\n removeLeastRecentlyUsedKeys() {\n if (this.recentKeys.size <= this.maxRecentKeysSize) {\n return;\n }\n\n // Get the last N keys by doing a negative slice\n const recentlyAccessed = [...this.recentKeys].slice(-this.maxRecentKeysSize);\n const storageKeys = _.keys(this.storageMap);\n const keysToRemove = _.difference(storageKeys, recentlyAccessed);\n\n _.each(keysToRemove, this.drop);\n }\n\n /**\n * Set the recent keys list size\n * @param {number} limit\n */\n setRecentKeysLimit(limit) {\n this.maxRecentKeysSize = limit;\n }\n\n /**\n * @param {String} key\n * @param {*} value\n * @returns {Boolean}\n */\n hasValueChanged(key, value) {\n return !deepEqual(this.storageMap[key], value);\n }\n}\n\nconst instance = new OnyxCache();\n\nexport default instance;\n","/**\n * Synchronous queue that can be used to ensure promise based tasks are run in sequence.\n * Pass to the constructor a function that returns a promise to run the task then add data.\n *\n * @example\n *\n * const queue = new SyncQueue(({key, val}) => {\n * return someAsyncProcess(key, val);\n * });\n *\n * queue.push({key: 1, val: '1'});\n * queue.push({key: 2, val: '2'});\n */\nexport default class SyncQueue {\n /**\n * @param {Function} run - must return a promise\n */\n constructor(run) {\n this.queue = [];\n this.isProcessing = false;\n this.run = run;\n }\n\n process() {\n if (this.isProcessing || this.queue.length === 0) {\n return;\n }\n\n this.isProcessing = true;\n\n const {data, resolve, reject} = this.queue.shift();\n this.run(data)\n .then(resolve)\n .catch(reject)\n .finally(() => {\n this.isProcessing = false;\n this.process();\n });\n }\n\n /**\n * @param {*} data\n * @returns {Promise}\n */\n push(data) {\n return new Promise((resolve, reject) => {\n this.queue.push({resolve, reject, data});\n this.process();\n });\n }\n}\n","/**\n * Create a deferred task that can be resolved when we call `resolve()`\n * The returned promise will complete when we call `resolve`\n * Useful when we want to wait for a tasks that is resolved from an external action\n *\n * @template T\n * @returns {{ resolve: function(*), promise: Promise<T|void> }}\n */\nexport default function createDeferredTask() {\n const deferred = {};\n deferred.promise = new Promise((res) => {\n deferred.resolve = res;\n });\n\n return deferred;\n}\n","// Mostly copied from https://medium.com/@lubaka.a/how-to-remove-lodash-performance-improvement-b306669ad0e1\n\n/**\n * @param {mixed} val\n * @returns {boolean}\n*/\nfunction isMergeableObject(val) {\n const nonNullObject = val != null ? typeof val === 'object' : false;\n return (nonNullObject\n && Object.prototype.toString.call(val) !== '[object RegExp]'\n && Object.prototype.toString.call(val) !== '[object Date]');\n}\n\n/**\n * @param {Object} target\n * @param {Object} source\n * @returns {Object}\n*/\nfunction mergeObject(target, source) {\n const destination = {};\n if (isMergeableObject(target)) {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const targetKeys = Object.keys(target);\n for (let i = 0; i < targetKeys.length; ++i) {\n const key = targetKeys[i];\n destination[key] = target[key];\n }\n }\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; ++i) {\n const key = sourceKeys[i];\n if (source[key] === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n if (!isMergeableObject(source[key]) || !target[key]) {\n destination[key] = source[key];\n } else {\n // eslint-disable-next-line no-use-before-define\n destination[key] = fastMerge(target[key], source[key]);\n }\n }\n\n return destination;\n}\n\n/**\n * @param {Object|Array} target\n * @param {Object|Array} source\n * @returns {Object|Array}\n*/\nfunction fastMerge(target, source) {\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line rulesdir/prefer-underscore-method\n const array = Array.isArray(source);\n if (array) {\n return source;\n }\n return mergeObject(target, source);\n}\n\nexport default fastMerge;\n","import lodashTransform from 'lodash/transform';\nimport _ from 'underscore';\n\nlet debugSetState = false;\n\n/**\n * @param {Boolean} debug\n */\nfunction setShouldDebugSetState(debug) {\n debugSetState = debug;\n}\n\n/**\n * Deep diff between two objects. Useful for figuring out what changed about an object from one render to the next so\n * that state and props updates can be optimized.\n *\n * @param {Object} object\n * @param {Object} base\n * @return {Object}\n */\nfunction diffObject(object, base) {\n function changes(obj, comparisonObject) {\n return lodashTransform(obj, (result, value, key) => {\n if (_.isEqual(value, comparisonObject[key])) {\n return;\n }\n\n // eslint-disable-next-line no-param-reassign\n result[key] = (_.isObject(value) && _.isObject(comparisonObject[key]))\n ? changes(value, comparisonObject[key])\n : value;\n });\n }\n return changes(object, base);\n}\n\n/**\n * Provide insights into why a setState() call occurred by diffing the before and after values.\n *\n * @param {Object} mapping\n * @param {*} previousValue\n * @param {*} newValue\n * @param {String} caller\n * @param {String} [keyThatChanged]\n */\nfunction logSetStateCall(mapping, previousValue, newValue, caller, keyThatChanged) {\n if (!debugSetState) {\n return;\n }\n\n const logParams = {};\n if (keyThatChanged) {\n logParams.keyThatChanged = keyThatChanged;\n }\n if (_.isObject(newValue) && _.isObject(previousValue)) {\n logParams.difference = diffObject(previousValue, newValue);\n } else {\n logParams.previousValue = previousValue;\n logParams.newValue = newValue;\n }\n\n console.debug(`[Onyx-Debug] ${mapping.displayName} setState() called. Subscribed to key '${mapping.key}' (${caller})`, logParams);\n}\n\nexport {\n logSetStateCall,\n setShouldDebugSetState,\n};\n","// For web-only implementations of Onyx, this module will just be a no-op\n\nfunction decorateWithMetrics(func) { return func; }\nfunction getMetrics() {}\nfunction printMetrics() {}\nfunction resetMetrics() {}\n\nexport {\n decorateWithMetrics,\n getMetrics,\n resetMetrics,\n printMetrics,\n};\n","import _ from 'underscore';\nimport Storage from './providers/LocalForage';\n\nconst SYNC_ONYX = 'SYNC_ONYX';\n\n/**\n * Raise an event thorough `localStorage` to let other tabs know a value changed\n * @param {String} onyxKey\n */\nfunction raiseStorageSyncEvent(onyxKey) {\n global.localStorage.setItem(SYNC_ONYX, onyxKey);\n global.localStorage.removeItem(SYNC_ONYX, onyxKey);\n}\n\nconst webStorage = {\n ...Storage,\n\n /**\n * @param {Function} onStorageKeyChanged Storage synchronization mechanism keeping all opened tabs in sync\n */\n keepInstancesSync(onStorageKeyChanged) {\n // Override set, remove and clear to raise storage events that we intercept in other tabs\n this.setItem = (key, value) => Storage.setItem(key, value)\n .then(() => raiseStorageSyncEvent(key));\n\n this.removeItem = key => Storage.removeItem(key)\n .then(() => raiseStorageSyncEvent(key));\n\n // If we just call Storage.clear other tabs will have no idea which keys were available previously\n // so that they can call keysChanged for them. That's why we iterate and remove keys one by one\n this.clear = () => Storage.getAllKeys()\n .then(keys => _.map(keys, key => this.removeItem(key)))\n .then(tasks => Promise.all(tasks));\n\n // This listener will only be triggered by events coming from other tabs\n global.addEventListener('storage', (event) => {\n // Ignore events that don't originate from the SYNC_ONYX logic\n if (event.key !== SYNC_ONYX || !event.newValue) {\n return;\n }\n\n const onyxKey = event.newValue;\n Storage.getItem(onyxKey)\n .then(value => onStorageKeyChanged(onyxKey, value));\n });\n },\n};\n\nexport default webStorage;\n","import WebStorage from './WebStorage';\n\nexport default WebStorage;\n","/**\n * @file\n * The storage provider based on localforage allows us to store most anything in its\n * natural form in the underlying DB without having to stringify or de-stringify it\n */\n\nimport localforage from 'localforage';\nimport _ from 'underscore';\nimport SyncQueue from '../../SyncQueue';\nimport fastMerge from '../../fastMerge';\n\nlocalforage.config({\n name: 'OnyxDB',\n});\n\nconst provider = {\n /**\n * Writing very quickly to IndexedDB causes performance issues and can lock up the page and lead to jank.\n * So, we are slowing this process down by waiting until one write is complete before moving on\n * to the next.\n */\n setItemQueue: new SyncQueue(({key, value, shouldMerge}) => {\n if (shouldMerge) {\n return localforage.getItem(key)\n .then((existingValue) => {\n const newValue = _.isObject(existingValue)\n\n // lodash adds a small overhead so we don't use it here\n // eslint-disable-next-line prefer-object-spread, rulesdir/prefer-underscore-method\n ? Object.assign({}, fastMerge(existingValue, value))\n : value;\n return localforage.setItem(key, newValue);\n });\n }\n\n return localforage.setItem(key, value);\n }),\n\n /**\n * Get multiple key-value pairs for the give array of keys in a batch\n * @param {String[]} keys\n * @return {Promise<Array<[key, value]>>}\n */\n multiGet(keys) {\n const pairs = _.map(\n keys,\n key => localforage.getItem(key)\n .then(value => [key, value]),\n );\n\n return Promise.all(pairs);\n },\n\n /**\n * Multiple merging of existing and new values in a batch\n * @param {Array<[key, value]>} pairs\n * @return {Promise<void>}\n */\n multiMerge(pairs) {\n const tasks = _.map(pairs, ([key, value]) => this.setItemQueue.push({key, value, shouldMerge: true}));\n\n // We're returning Promise.resolve, otherwise the array of task results will be returned to the caller\n return Promise.all(tasks).then(() => Promise.resolve());\n },\n\n /**\n * Stores multiple key-value pairs in a batch\n * @param {Array<[key, value]>} pairs\n * @return {Promise<void>}\n */\n multiSet(pairs) {\n // We're returning Promise.resolve, otherwise the array of task results will be returned to the caller\n const tasks = _.map(pairs, ([key, value]) => this.setItem(key, value));\n return Promise.all(tasks).then(() => Promise.resolve());\n },\n\n /**\n * Clear absolutely everything from storage\n * @returns {Promise<void>}\n */\n clear: localforage.clear,\n\n /**\n * Returns all keys available in storage\n * @returns {Promise<String[]>}\n */\n getAllKeys: localforage.keys,\n\n /**\n * Get the value of a given key or return `null` if it's not available in storage\n * @param {String} key\n * @return {Promise<*>}\n */\n getItem: localforage.getItem,\n\n /**\n * Remove given key and it's value from storage\n * @param {String} key\n * @returns {Promise<void>}\n */\n removeItem: localforage.removeItem,\n\n /**\n * Sets the value for a given key. The only requirement is that the value should be serializable to JSON string\n * @param {String} key\n * @param {*} value\n * @return {Promise<void>}\n */\n setItem(key, value) {\n return this.setItemQueue.push({key, value});\n },\n};\n\nexport default provider;\n","/**\n * This is a higher order component that provides the ability to map a state property directly to\n * something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view\n * will automatically change to reflect the new data.\n */\nimport React from 'react';\nimport _ from 'underscore';\nimport PropTypes from 'prop-types';\nimport Str from 'expensify-common/lib/str';\nimport Onyx from './Onyx';\n\n/**\n * Returns the display name of a component\n *\n * @param {object} component\n * @returns {string}\n */\nfunction getDisplayName(component) {\n return component.displayName || component.name || 'Component';\n}\n\nexport default function (mapOnyxToState) {\n // A list of keys that must be present in tempState before we can render the WrappedComponent\n const requiredKeysForInit = _.chain(mapOnyxToState)\n .omit(config => config.initWithStoredValues === false)\n .keys()\n .value();\n return (WrappedComponent) => {\n const displayName = getDisplayName(WrappedComponent);\n class withOnyx extends React.Component {\n constructor(props) {\n super(props);\n\n this.setWithOnyxState = this.setWithOnyxState.bind(this);\n\n // This stores all the Onyx connection IDs to be used when the component unmounts so everything can be\n // disconnected. It is a key value store with the format {[mapping.key]: connectionID}.\n this.activeConnectionIDs = {};\n\n // Object holding the temporary initial state for the component while we load the various Onyx keys\n this.tempState = {};\n\n this.state = {\n // If there are no required keys for init then we can render the wrapped component immediately\n loading: requiredKeysForInit.length > 0,\n };\n }\n\n componentDidMount() {\n // Subscribe each of the state properties to the proper Onyx key\n _.each(mapOnyxToState, (mapping, propertyName) => {\n this.connectMappingToOnyx(mapping, propertyName);\n });\n this.checkEvictableKeys();\n }\n\n componentDidUpdate(prevProps) {\n // If any of the mappings use data from the props, then when the props change, all the\n // connections need to be reconnected with the new props\n _.each(mapOnyxToState, (mapping, propertyName) => {\n const previousKey = Str.result(mapping.key, prevProps);\n const newKey = Str.result(mapping.key, this.props);\n\n if (previousKey !== newKey) {\n Onyx.disconnect(this.activeConnectionIDs[previousKey], previousKey);\n delete this.activeConnectionIDs[previousKey];\n this.connectMappingToOnyx(mapping, propertyName);\n }\n });\n this.checkEvictableKeys();\n }\n\n componentWillUnmount() {\n // Disconnect everything from Onyx\n _.each(mapOnyxToState, (mapping) => {\n const key = Str.result(mapping.key, this.props);\n const connectionID = this.activeConnectionIDs[key];\n Onyx.disconnect(connectionID, key);\n });\n }\n\n /**\n * This method is used externally by sendDataToConnection to prevent unnecessary renders while a component\n * still in a loading state. The temporary initial state is saved to the component instance and setState()\n * only called once all the necessary data has been collected.\n *\n * @param {String} statePropertyName\n * @param {*} val\n */\n setWithOnyxState(statePropertyName, val) {\n if (!this.state.loading) {\n this.setState({[statePropertyName]: val});\n return;\n }\n\n this.tempState[statePropertyName] = val;\n\n // All state keys should exist and at least have a value of null\n if (_.some(requiredKeysForInit, key => _.isUndefined(this.tempState[key]))) {\n return;\n }\n\n this.setState({...this.tempState, loading: false});\n delete this.tempState;\n }\n\n /**\n * Makes sure each Onyx key we requested has been set to state with a value of some kind.\n * We are doing this so that the wrapped component will only render when all the data\n * it needs is available to it.\n */\n checkEvictableKeys() {\n // We will add this key to our list of recently accessed keys\n // if the canEvict function returns true. This is necessary criteria\n // we MUST use to specify if a key can be removed or not.\n _.each(mapOnyxToState, (mapping) => {\n if (_.isUndefined(mapping.canEvict)) {\n return;\n }\n\n const canEvict = Str.result(mapping.canEvict, this.props);\n const key = Str.result(mapping.key, this.props);\n\n if (!Onyx.isSafeEvictionKey(key)) {\n throw new Error(`canEvict can't be used on key '${key}'. This key must explicitly be flagged as safe for removal by adding it to Onyx.init({safeEvictionKeys: []}).`);\n }\n\n if (canEvict) {\n Onyx.removeFromEvictionBlockList(key, mapping.connectionID);\n } else {\n Onyx.addToEvictionBlockList(key, mapping.connectionID);\n }\n });\n }\n\n /**\n * Takes a single mapping and binds the state of the component to the store\n *\n * @param {object} mapping\n * @param {string|function} mapping.key key to connect to. can be a string or a\n * function that takes this.props as an argument and returns a string\n * @param {string} statePropertyName the name of the state property that Onyx will add the data to\n * @param {boolean} [mapping.initWithStoredValues] If set to false, then no data will be prefilled into the\n * component\n */\n connectMappingToOnyx(mapping, statePropertyName) {\n const key = Str.result(mapping.key, this.props);\n\n // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs\n this.activeConnectionIDs[key] = Onyx.connect({\n ...mapping,\n key,\n statePropertyName,\n withOnyxInstance: this,\n displayName,\n });\n }\n\n render() {\n if (this.state.loading) {\n return null;\n }\n\n // Remove any internal state properties used by withOnyx\n // that should not be passed to a wrapped component\n let stateToPass = _.omit(this.state, 'loading');\n stateToPass = _.omit(stateToPass, value => _.isNull(value));\n\n // Remove any null values so that React replaces them with default props\n const propsToPass = _.omit(this.props, value => _.isNull(value));\n\n // Spreading props and state is necessary in an HOC where the data cannot be predicted\n return (\n <WrappedComponent\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...propsToPass}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...stateToPass}\n ref={this.props.forwardedRef}\n />\n );\n }\n }\n\n withOnyx.propTypes = {\n forwardedRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({current: PropTypes.instanceOf(React.Component)}),\n ]),\n };\n withOnyx.defaultProps = {\n forwardedRef: undefined,\n };\n withOnyx.displayName = `withOnyx(${displayName})`;\n return React.forwardRef((props, ref) => {\n const Component = withOnyx;\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component {...props} forwardedRef={ref} />;\n });\n };\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE_expensify_common_lib_str__;","module.exports = __WEBPACK_EXTERNAL_MODULE_fast_equals__;","module.exports = __WEBPACK_EXTERNAL_MODULE_localforage__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_get__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_transform__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;","module.exports = __WEBPACK_EXTERNAL_MODULE_underscore__;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","import Onyx from './Onyx';\nimport withOnyx from './withOnyx';\n\nexport default Onyx;\nexport {withOnyx};\n"],"names":["logger","registerLogger","callback","logAlert","message","level","logInfo","METHOD","SET","MERGE","MERGE_COLLECTION","CLEAR","lastConnectionID","callbackToStateMapping","onyxKeys","recentlyAccessedKeys","evictionAllowList","evictionBlocklist","defaultKeyStates","deferredInitTask","createDeferredTask","getSubsetOfData","sourceData","selector","_","isFunction","lodashGet","reduceCollectionWithSelector","collection","reduce","finalCollection","item","key","get","cache","hasCacheForKey","Promise","resolve","getValue","taskName","hasPendingTask","getTaskPromise","promise","Storage","getItem","then","val","set","catch","err","Logger","captureTask","getAllKeys","storedKeys","length","keys","each","addKey","isCollectionKey","contains","values","COLLECTION","isCollectionMemberKey","collectionKey","Str","startsWith","isKeyMatch","configKey","isSafeEvictionKey","testKey","some","removeLastAccessedKey","without","addLastAccessedKey","push","removeFromEvictionBlockList","connectionID","addToEvictionBlockList","addAllSafeEvictionKeysToRecentlyAccessedList","safeEvictionKey","getCachedCollection","collectionMemberKeys","filter","storedKey","prev","curr","cachedValue","keysChanged","partialCollection","stateMappingKeys","i","subscriber","isSubscribedToCollectionKey","isSubscribedToCollectionMemberKey","cachedCollection","waitForCollectionCallback","dataKeys","j","dataKey","withOnyxInstance","setState","prevState","previousData","statePropertyName","newData","deepEqual","clone","PerformanceUtils","logSetStateCall","dataFromCollection","isUndefined","prevData","data","keyChanged","canUpdateSubscriber","isNull","prevDataWithNewData","newCollection","previousValue","newValue","console","error","sendDataToConnection","mapping","matchedKey","setWithOnyxState","addKeyToRecentlyAccessedIfNeeded","removeLeastRecentlyUsedKeys","canEvict","Error","getCollectionDataAndSendAsObject","matchingKeys","all","map","finalObject","value","connect","initWithStoredValues","disconnect","keyToRemoveFromEvictionBlocklist","notifySubscribersOnNextTick","notifyCollectionSubscribersOnNextTick","remove","drop","removeItem","evictStorageAndRetry","onyxMethod","args","keyForRemoval","find","hasPendingMergeForKey","hasValueChanged","addToAccessedKeys","setItem","prepareKeyValuePairsForStorage","multiSet","keyValuePairs","mergeQueue","Boolean","applyMerge","mergeValues","isArray","every","modifiedData","mergeValue","isObject","Object","assign","fastMerge","omit","finalObjectKey","last","merge","initializeWithDefaultKeyStates","multiGet","pairs","asObject","object","merged","clear","keysToPreserve","keyValuesToReset","defaultKeys","keysToClear","difference","defaultKeyValuePairs","keyValuesToResetAsCollection","keyValuesToResetIndividually","keyValue","substring","indexOf","mergeCollection","isEmpty","_data","persistedKeys","chain","partition","includes","existingKeys","newKeys","existingKeyCollection","pick","keyValuePairsForExistingCollection","keyValuePairsForNewCollection","promises","multiMerge","update","isString","init","initialKeyStates","safeEvictionKeys","maxCachedKeysCount","captureMetrics","shouldSyncMultipleInstances","global","localStorage","debugSetState","applyDecorators","setShouldDebugSetState","setRecentKeysLimit","keepInstancesSync","Onyx","decorate","require","decorateWithMetrics","getMetrics","resetMetrics","printMetrics","isDefined","negate","OnyxCache","storageKeys","Set","recentKeys","storageMap","pendingPromises","bindAll","Array","from","add","delete","mergedKeys","finally","size","maxRecentKeysSize","recentlyAccessed","slice","keysToRemove","limit","instance","SyncQueue","run","queue","isProcessing","shift","reject","process","deferred","res","isMergeableObject","nonNullObject","prototype","toString","call","mergeObject","target","source","destination","targetKeys","sourceKeys","undefined","array","debug","diffObject","base","changes","obj","comparisonObject","lodashTransform","result","isEqual","caller","keyThatChanged","logParams","displayName","func","SYNC_ONYX","raiseStorageSyncEvent","onyxKey","webStorage","onStorageKeyChanged","tasks","addEventListener","event","WebStorage","localforage","config","name","provider","setItemQueue","shouldMerge","existingValue","getDisplayName","component","mapOnyxToState","requiredKeysForInit","WrappedComponent","withOnyx","props","bind","activeConnectionIDs","tempState","state","loading","propertyName","connectMappingToOnyx","checkEvictableKeys","prevProps","previousKey","newKey","stateToPass","propsToPass","forwardedRef","React","Component","propTypes","PropTypes","oneOfType","shape","current","instanceOf","defaultProps","forwardRef","ref"],"sourceRoot":""}